{"version":3,"file":"static/chunks/3c706662-f6b89a47e4eebc4e.js","mappings":"ACAA,4EAA4E,GDEzC,CAAAA,KAAAC,gBAAA,CAAAD,KAAAC,gBAAA,MAAAC,IAAA,wBAAAC,MAAA,CAAAC,wBAAA,CAAAC,mBAAA,MAAAC,OAAAC,CAAAA,OAAAD,QAAA,SAAAE,2CAAA,kBAAAC,CAAA,MAAAC,EAAA,YAAAC,EAAAC,CAAA,KAAAF,CAAA,CAAAE,EAAA,QAAAF,CAAA,CAAAE,EAAA,CAAAC,OAAA,KAAAC,EAAAJ,CAAA,CAAAE,EAAA,EAAAG,EAAAH,EAAAI,EAAA,GAAAH,QAAA,WAAAJ,CAAA,CAAAG,EAAA,CAAAK,IAAA,CAAAH,EAAAD,OAAA,CAAAC,EAAAA,EAAAD,OAAA,CAAAF,GAAAG,EAAAE,CAAA,IAAAF,EAAAD,OAAA,QAAAF,EAAAO,CAAA,CAAAT,EAAAE,EAAAQ,CAAA,CAAAT,EAAAC,EAAAS,CAAA,UAAAX,CAAA,CAAAC,CAAA,CAAAE,CAAA,EAAAD,EAAAU,CAAA,CAAAZ,EAAAC,IAAAY,OAAAC,cAAA,CAAAd,EAAAC,EAAA,CAAAc,WAAA,GAAAC,IAAAb,CAAA,IAAAD,EAAAC,CAAA,UAAAH,CAAA,sBAAAiB,QAAAA,OAAAC,WAAA,EAAAL,OAAAC,cAAA,CAAAd,EAAAiB,OAAAC,WAAA,EAAAC,MAAA,WAAAN,OAAAC,cAAA,CAAAd,EAAA,cAAAmB,MAAA,MAAAjB,EAAAA,CAAA,UAAAF,CAAA,CAAAC,CAAA,OAAAA,GAAAD,CAAAA,EAAAE,EAAAF,EAAA,IAAAC,GAAA,EAAAA,GAAA,iBAAAD,GAAAA,GAAAA,EAAAoB,UAAA,QAAApB,CAAA,KAAAG,EAAAU,OAAAQ,MAAA,UAAAnB,EAAAC,CAAA,CAAAA,GAAAU,OAAAC,cAAA,CAAAX,EAAA,WAAAY,WAAA,GAAAI,MAAAnB,CAAA,KAAAC,GAAA,iBAAAD,CAAA,SAAAK,KAAAL,EAAAE,EAAAS,CAAA,CAAAR,EAAAE,EAAA,UAAAJ,CAAA,SAAAD,CAAA,CAAAC,EAAA,GAAAqB,IAAA,MAAAjB,GAAA,QAAAF,CAAA,EAAAD,EAAAD,CAAA,UAAAD,CAAA,MAAAC,EAAAD,GAAAA,EAAAoB,UAAA,mBAAApB,EAAAuB,OAAA,oBAAAvB,CAAA,SAAAE,EAAAS,CAAA,CAAAV,EAAA,IAAAA,GAAAA,CAAA,EAAAC,EAAAU,CAAA,UAAAZ,CAAA,CAAAC,CAAA,SAAAY,OAAAW,SAAA,CAAAC,cAAA,CAAAjB,IAAA,CAAAR,EAAAC,EAAA,EAAAC,EAAAwB,CAAA,IAAAxB,EAAAA,EAAAyB,CAAA,8EAAAjC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,snBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yoCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kjCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gtRAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,0zmBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0oIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ogtCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,k9GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kjGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kr9BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q+bAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,66HAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,shHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mmOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i7KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k0PAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i8pCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mmKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8XAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4mNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,iwGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qhMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w+GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2vGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,83qCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gpdAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gyfAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i8UAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i/UAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,oiNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gnWAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m1KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+uKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kt0CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+0LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gmMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qyGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0oHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,84JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wnIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ytGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+qJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qtKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,svHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wqQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w/IAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,inJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,muIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6lIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8zQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wsJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o+VAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,s3OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i7EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+zFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0/EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ihFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+hFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,uqFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+oFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,oxGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,08EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gmIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2hFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,uwGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+tLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y9EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m+EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k7KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6lTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qqSAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kkpFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,godAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ilJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o4LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ypXAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6y4BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2l3BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,49JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yoFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,srTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mvHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qyGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,umwBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u0KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+8GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u48BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+ihBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,g0OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m2QAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2wdAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8iJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mh/BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2mmBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gznCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yhqBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,62VAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4gKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2hIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,upJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,msIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qiIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6hHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,28GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,omJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y1HAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qnHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y1FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,isHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2gHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o7MAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q1KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wyFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ivHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w1HAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+tGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i4JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y6EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,s+EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0kFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mzKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ygeAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y4VAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ysGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,61SAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,81aAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4uHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,02YAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gkXAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qlaAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+lHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8vHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gvHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wpPAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6nQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gxQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,22kCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,krcAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o3OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2yUAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,utLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,sqIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4nOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0oeAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k4gBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kzaAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o8HAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gqIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ulKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,s9FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0nIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8gGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qrFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ygGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8wHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,izGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,izFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qqFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,knFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6wDAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qzIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+xGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6rIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q2TAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mpTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,uoOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q7sBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y2EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,g5OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,syjBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,84EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u7KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k9dAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2uOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ktQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,grPAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ygGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m9JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0iTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0hQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q5MAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,klbAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,20nBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,86oBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gtMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ijUAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y5LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m7SAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yjKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,sgHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qnMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+1OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kyPAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o+NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ivGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q+FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ulIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y1GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8mGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0wFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,28GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4+NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y0NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+jLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i8FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wqKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q/EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y9EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2qFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0tIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,slHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y7KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8gFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mnFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o6HAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yhFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u8EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qoFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+nHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,s4FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,onGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m7FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8uFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q2LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2jLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w1LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mzGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y2FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w3GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2hbAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,s9CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,k0hBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ovBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,yjBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,wvEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,un6CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,q6qDAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,smvDAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,iuwBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,+5DAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,8xEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,sonCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,msYAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,g6BAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,qmBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,oQAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,6QAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,y8HAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,oprCAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,klgEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,25JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,sy5BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+oSAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,maAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,giGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wxbAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k1XAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y0KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yr5BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q9fAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,ogBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,ivDAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+6IAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kvjDAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,mmEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q6CAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,mnLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,8wNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ySAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kjJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,unEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,igiCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0oQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,sxrBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,63EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ioEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,iTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,8zDAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,gSAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,k4BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,4RAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,8RAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,26DAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,8YAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,q8NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,uyIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yvTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,i8EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ygOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,2+DAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,28g5CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,0gBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,2dAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,4mBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,omCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,skBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,upBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ukBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,0fAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,slBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,g1BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ykBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,2cAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,mmBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,mpBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,qoBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ozBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,6nBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,8dAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,olBAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,usBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,8iBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,gzBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,4gBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,mnBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,igBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w+IAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,2/0BAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,omVAAAlC,MAAA,CAAAmC,mBAAA,CAAAjC,mBAAA,eAAAgC,KAAA,wmUAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,o3DAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,ip2CAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,0hOAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,yvHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,w+YAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,8nBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,u8RAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,+4lCAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,+0oBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,4LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,6LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,uMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,uLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,mKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8fAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u1FAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4/JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2hKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,smKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,6MAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i0VAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,6NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u8JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,izJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kxJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8uRAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,g9NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kgOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6lNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k0aAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w0MAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w5JAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,4MAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,g0PAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8nBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,sxPAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8kKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,wkLAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,26OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ogNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kgMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,svTAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,2NAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y2QAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6hMAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0wNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mgQAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y4WAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i6LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qoPAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,8LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,uhNAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4gCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u5UAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k4CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,44KAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,44PAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mqUAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q1GAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i9PAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,olFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4khBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w5OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2wJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,snIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0zdAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u9TAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mqJAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,u0MAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,+LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y4CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,k5LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,y0CAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,yoIAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,iqOAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,q7jBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,2LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,2jKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4g5DAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6tEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6tBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w2OAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,29LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o1HAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,0neAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,EAAAgC,KAAA,qKAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,otCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,s+BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,m3BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kiEAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,40LAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,00EAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,iWAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,o2BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,6+BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,+iBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,shGAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,8jBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,gpBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,mcAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,qlFAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,ijBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,kwCAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,4mBAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w0BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,syHAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,w+BAAAlC,MAAA,CAAAU,OAAA,CAAAR,mBAAA,eAAAgC,KAAA,i5+BAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,wGAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,wGAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,gGAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,gHAAAlC,MAAA,CAAAU,OAAA,EAAAwB,KAAA,6QAAAlC,OAAAU,OAAA,CAAAP,QAAAD,oBAAA","sources":["webpack://_N_E/./node_modules/cloudinary-video-player/dist/cld-video-player.js","webpack://_N_E/<anon>"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"cloudinary-core\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"cloudinary-core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cloudinaryVideoPlayer\"] = factory(require(\"cloudinary-core\"));\n\telse\n\t\troot[\"cloudinaryVideoPlayer\"] = factory(root[\"cloudinary\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE_cloudinary_core__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./index.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"../node_modules/@babel/runtime/helpers/extends.js\":\n/*!*********************************************************!*\\\n  !*** ../node_modules/@babel/runtime/helpers/extends.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _extends() {\\n  module.exports = _extends = Object.assign || function (target) {\\n    for (var i = 1; i < arguments.length; i++) {\\n      var source = arguments[i];\\n\\n      for (var key in source) {\\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\\n          target[key] = source[key];\\n        }\\n      }\\n    }\\n\\n    return target;\\n  };\\n\\n  return _extends.apply(this, arguments);\\n}\\n\\nmodule.exports = _extends;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@babel/runtime/helpers/extends.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(Buffer) {/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */\\n\\n\\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\\n\\nvar window = _interopDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nvar atob = function atob(s) {\\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\\n};\\n\\nfunction decodeB64ToUint8Array(b64Text) {\\n  var decodedString = atob(b64Text);\\n  var array = new Uint8Array(decodedString.length);\\n\\n  for (var i = 0; i < decodedString.length; i++) {\\n    array[i] = decodedString.charCodeAt(i);\\n  }\\n\\n  return array;\\n}\\n\\nmodule.exports = decodeB64ToUint8Array;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node-libs-browser/node_modules/buffer/index.js */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/@videojs/vhs-utils/dist/resolve-url.js\":\n/*!**************************************************************!*\\\n  !*** ../node_modules/@videojs/vhs-utils/dist/resolve-url.js ***!\n  \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */\\n\\n\\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\\n\\nvar URLToolkit = _interopDefault(__webpack_require__(/*! url-toolkit */ \\\"../node_modules/url-toolkit/src/url-toolkit.js\\\"));\\nvar window = _interopDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\\n  // return early if we don't need to resolve\\n  if (/^[a-z]+:/i.test(relativeUrl)) {\\n    return relativeUrl;\\n  } // if the base URL is relative then combine with the current location\\n\\n\\n  if (!/\\\\/\\\\//i.test(baseUrl)) {\\n    baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\\n  }\\n\\n  return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\\n};\\n\\nmodule.exports = resolveUrl;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@videojs/vhs-utils/dist/resolve-url.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/@videojs/xhr/index.js\":\n/*!*********************************************!*\\\n  !*** ../node_modules/@videojs/xhr/index.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nvar window = __webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\")\\nvar _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ \\\"../node_modules/@babel/runtime/helpers/extends.js\\\");\\nvar isFunction = __webpack_require__(/*! is-function */ \\\"../node_modules/is-function/index.js\\\");\\n\\n/**\\n * @license\\n * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n * Copyright (c) 2014 David Björklund\\n * Available under the MIT license\\n * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n */\\n\\nvar parseHeaders = function(headers) {\\n    var result = {};\\n\\n    if (!headers) {\\n        return result;\\n    }\\n\\n    headers.trim().split('\\\\n').forEach(function(row) {\\n        var index = row.indexOf(':');\\n        var key = row.slice(0, index).trim().toLowerCase();\\n        var value = row.slice(index + 1).trim();\\n\\n        if (typeof(result[key]) === 'undefined') {\\n          result[key] = value\\n        } else if (Array.isArray(result[key])) {\\n          result[key].push(value)\\n        } else {\\n          result[key] = [ result[key], value ]\\n        }\\n    });\\n\\n    return result;\\n};\\n\\nmodule.exports = createXHR\\n// Allow use of default import syntax in TypeScript\\nmodule.exports.default = createXHR;\\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\\ncreateXHR.XDomainRequest = \\\"withCredentials\\\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\\n\\nforEachArray([\\\"get\\\", \\\"put\\\", \\\"post\\\", \\\"patch\\\", \\\"head\\\", \\\"delete\\\"], function(method) {\\n    createXHR[method === \\\"delete\\\" ? \\\"del\\\" : method] = function(uri, options, callback) {\\n        options = initParams(uri, options, callback)\\n        options.method = method.toUpperCase()\\n        return _createXHR(options)\\n    }\\n})\\n\\nfunction forEachArray(array, iterator) {\\n    for (var i = 0; i < array.length; i++) {\\n        iterator(array[i])\\n    }\\n}\\n\\nfunction isEmpty(obj){\\n    for(var i in obj){\\n        if(obj.hasOwnProperty(i)) return false\\n    }\\n    return true\\n}\\n\\nfunction initParams(uri, options, callback) {\\n    var params = uri\\n\\n    if (isFunction(options)) {\\n        callback = options\\n        if (typeof uri === \\\"string\\\") {\\n            params = {uri:uri}\\n        }\\n    } else {\\n        params = _extends({}, options, {uri: uri})\\n    }\\n\\n    params.callback = callback\\n    return params\\n}\\n\\nfunction createXHR(uri, options, callback) {\\n    options = initParams(uri, options, callback)\\n    return _createXHR(options)\\n}\\n\\nfunction _createXHR(options) {\\n    if(typeof options.callback === \\\"undefined\\\"){\\n        throw new Error(\\\"callback argument missing\\\")\\n    }\\n\\n    var called = false\\n    var callback = function cbOnce(err, response, body){\\n        if(!called){\\n            called = true\\n            options.callback(err, response, body)\\n        }\\n    }\\n\\n    function readystatechange() {\\n        if (xhr.readyState === 4) {\\n            setTimeout(loadFunc, 0)\\n        }\\n    }\\n\\n    function getBody() {\\n        // Chrome with requestType=blob throws errors arround when even testing access to responseText\\n        var body = undefined\\n\\n        if (xhr.response) {\\n            body = xhr.response\\n        } else {\\n            body = xhr.responseText || getXml(xhr)\\n        }\\n\\n        if (isJson) {\\n            try {\\n                body = JSON.parse(body)\\n            } catch (e) {}\\n        }\\n\\n        return body\\n    }\\n\\n    function errorFunc(evt) {\\n        clearTimeout(timeoutTimer)\\n        if(!(evt instanceof Error)){\\n            evt = new Error(\\\"\\\" + (evt || \\\"Unknown XMLHttpRequest Error\\\") )\\n        }\\n        evt.statusCode = 0\\n        return callback(evt, failureResponse)\\n    }\\n\\n    // will load the data & process the response in a special response object\\n    function loadFunc() {\\n        if (aborted) return\\n        var status\\n        clearTimeout(timeoutTimer)\\n        if(options.useXDR && xhr.status===undefined) {\\n            //IE8 CORS GET successful response doesn't have a status field, but body is fine\\n            status = 200\\n        } else {\\n            status = (xhr.status === 1223 ? 204 : xhr.status)\\n        }\\n        var response = failureResponse\\n        var err = null\\n\\n        if (status !== 0){\\n            response = {\\n                body: getBody(),\\n                statusCode: status,\\n                method: method,\\n                headers: {},\\n                url: uri,\\n                rawRequest: xhr\\n            }\\n            if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\\n                response.headers = parseHeaders(xhr.getAllResponseHeaders())\\n            }\\n        } else {\\n            err = new Error(\\\"Internal XMLHttpRequest Error\\\")\\n        }\\n        return callback(err, response, response.body)\\n    }\\n\\n    var xhr = options.xhr || null\\n\\n    if (!xhr) {\\n        if (options.cors || options.useXDR) {\\n            xhr = new createXHR.XDomainRequest()\\n        }else{\\n            xhr = new createXHR.XMLHttpRequest()\\n        }\\n    }\\n\\n    var key\\n    var aborted\\n    var uri = xhr.url = options.uri || options.url\\n    var method = xhr.method = options.method || \\\"GET\\\"\\n    var body = options.body || options.data\\n    var headers = xhr.headers = options.headers || {}\\n    var sync = !!options.sync\\n    var isJson = false\\n    var timeoutTimer\\n    var failureResponse = {\\n        body: undefined,\\n        headers: {},\\n        statusCode: 0,\\n        method: method,\\n        url: uri,\\n        rawRequest: xhr\\n    }\\n\\n    if (\\\"json\\\" in options && options.json !== false) {\\n        isJson = true\\n        headers[\\\"accept\\\"] || headers[\\\"Accept\\\"] || (headers[\\\"Accept\\\"] = \\\"application/json\\\") //Don't override existing accept header declared by user\\n        if (method !== \\\"GET\\\" && method !== \\\"HEAD\\\") {\\n            headers[\\\"content-type\\\"] || headers[\\\"Content-Type\\\"] || (headers[\\\"Content-Type\\\"] = \\\"application/json\\\") //Don't override existing accept header declared by user\\n            body = JSON.stringify(options.json === true ? body : options.json)\\n        }\\n    }\\n\\n    xhr.onreadystatechange = readystatechange\\n    xhr.onload = loadFunc\\n    xhr.onerror = errorFunc\\n    // IE9 must have onprogress be set to a unique function.\\n    xhr.onprogress = function () {\\n        // IE must die\\n    }\\n    xhr.onabort = function(){\\n        aborted = true;\\n    }\\n    xhr.ontimeout = errorFunc\\n    xhr.open(method, uri, !sync, options.username, options.password)\\n    //has to be after open\\n    if(!sync) {\\n        xhr.withCredentials = !!options.withCredentials\\n    }\\n    // Cannot set timeout with sync request\\n    // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\\n    // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\\n    if (!sync && options.timeout > 0 ) {\\n        timeoutTimer = setTimeout(function(){\\n            if (aborted) return\\n            aborted = true//IE9 may still call readystatechange\\n            xhr.abort(\\\"timeout\\\")\\n            var e = new Error(\\\"XMLHttpRequest timeout\\\")\\n            e.code = \\\"ETIMEDOUT\\\"\\n            errorFunc(e)\\n        }, options.timeout )\\n    }\\n\\n    if (xhr.setRequestHeader) {\\n        for(key in headers){\\n            if(headers.hasOwnProperty(key)){\\n                xhr.setRequestHeader(key, headers[key])\\n            }\\n        }\\n    } else if (options.headers && !isEmpty(options.headers)) {\\n        throw new Error(\\\"Headers cannot be set on an XDomainRequest object\\\")\\n    }\\n\\n    if (\\\"responseType\\\" in options) {\\n        xhr.responseType = options.responseType\\n    }\\n\\n    if (\\\"beforeSend\\\" in options &&\\n        typeof options.beforeSend === \\\"function\\\"\\n    ) {\\n        options.beforeSend(xhr)\\n    }\\n\\n    // Microsoft Edge browser sends \\\"undefined\\\" when send is called with undefined value.\\n    // XMLHttpRequest spec says to pass null as body to indicate no body\\n    // See https://github.com/naugtur/xhr/issues/100.\\n    xhr.send(body || null)\\n\\n    return xhr\\n\\n\\n}\\n\\nfunction getXml(xhr) {\\n    // xhr.responseXML will throw Exception \\\"InvalidStateError\\\" or \\\"DOMException\\\"\\n    // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\\n    try {\\n        if (xhr.responseType === \\\"document\\\") {\\n            return xhr.responseXML\\n        }\\n        var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \\\"parsererror\\\"\\n        if (xhr.responseType === \\\"\\\" && !firefoxBugTakenEffect) {\\n            return xhr.responseXML\\n        }\\n    } catch (e) {}\\n\\n    return null\\n}\\n\\nfunction noop() {}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@videojs/xhr/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/aes-decrypter/dist/aes-decrypter.es.js\":\n/*!**************************************************************!*\\\n  !*** ../node_modules/aes-decrypter/dist/aes-decrypter.es.js ***!\n  \\**************************************************************/\n/*! exports provided: decrypt, Decrypter, AsyncStream */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"decrypt\\\", function() { return decrypt; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Decrypter\\\", function() { return Decrypter; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"AsyncStream\\\", function() { return AsyncStream; });\\n/* harmony import */ var pkcs7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! pkcs7 */ \\\"../node_modules/pkcs7/dist/pkcs7.es.js\\\");\\n\\n\\nvar classCallCheck = function (instance, Constructor) {\\n  if (!(instance instanceof Constructor)) {\\n    throw new TypeError(\\\"Cannot call a class as a function\\\");\\n  }\\n};\\n\\nvar createClass = function () {\\n  function defineProperties(target, props) {\\n    for (var i = 0; i < props.length; i++) {\\n      var descriptor = props[i];\\n      descriptor.enumerable = descriptor.enumerable || false;\\n      descriptor.configurable = true;\\n      if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n      Object.defineProperty(target, descriptor.key, descriptor);\\n    }\\n  }\\n\\n  return function (Constructor, protoProps, staticProps) {\\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n    if (staticProps) defineProperties(Constructor, staticProps);\\n    return Constructor;\\n  };\\n}();\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar inherits = function (subClass, superClass) {\\n  if (typeof superClass !== \\\"function\\\" && superClass !== null) {\\n    throw new TypeError(\\\"Super expression must either be null or a function, not \\\" + typeof superClass);\\n  }\\n\\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\\n    constructor: {\\n      value: subClass,\\n      enumerable: false,\\n      writable: true,\\n      configurable: true\\n    }\\n  });\\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar possibleConstructorReturn = function (self, call) {\\n  if (!self) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return call && (typeof call === \\\"object\\\" || typeof call === \\\"function\\\") ? call : self;\\n};\\n\\n/**\\n * @file aes.js\\n *\\n * This file contains an adaptation of the AES decryption algorithm\\n * from the Standford Javascript Cryptography Library. That work is\\n * covered by the following copyright and permissions notice:\\n *\\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without\\n * modification, are permitted provided that the following conditions are\\n * met:\\n *\\n * 1. Redistributions of source code must retain the above copyright\\n *    notice, this list of conditions and the following disclaimer.\\n *\\n * 2. Redistributions in binary form must reproduce the above\\n *    copyright notice, this list of conditions and the following\\n *    disclaimer in the documentation and/or other materials provided\\n *    with the distribution.\\n *\\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n *\\n * The views and conclusions contained in the software and documentation\\n * are those of the authors and should not be interpreted as representing\\n * official policies, either expressed or implied, of the authors.\\n */\\n\\n/**\\n * Expand the S-box tables.\\n *\\n * @private\\n */\\nvar precompute = function precompute() {\\n  var tables = [[[], [], [], [], []], [[], [], [], [], []]];\\n  var encTable = tables[0];\\n  var decTable = tables[1];\\n  var sbox = encTable[4];\\n  var sboxInv = decTable[4];\\n  var i = void 0;\\n  var x = void 0;\\n  var xInv = void 0;\\n  var d = [];\\n  var th = [];\\n  var x2 = void 0;\\n  var x4 = void 0;\\n  var x8 = void 0;\\n  var s = void 0;\\n  var tEnc = void 0;\\n  var tDec = void 0;\\n\\n  // Compute double and third tables\\n  for (i = 0; i < 256; i++) {\\n    th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\\n  }\\n\\n  for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\\n    // Compute sbox\\n    s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\\n    s = s >> 8 ^ s & 255 ^ 99;\\n    sbox[x] = s;\\n    sboxInv[s] = x;\\n\\n    // Compute MixColumns\\n    x8 = d[x4 = d[x2 = d[x]]];\\n    tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\\n    tEnc = d[s] * 0x101 ^ s * 0x1010100;\\n\\n    for (i = 0; i < 4; i++) {\\n      encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\\n      decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\\n    }\\n  }\\n\\n  // Compactify. Considerable speedup on Firefox.\\n  for (i = 0; i < 5; i++) {\\n    encTable[i] = encTable[i].slice(0);\\n    decTable[i] = decTable[i].slice(0);\\n  }\\n  return tables;\\n};\\nvar aesTables = null;\\n\\n/**\\n * Schedule out an AES key for both encryption and decryption. This\\n * is a low-level class. Use a cipher mode to do bulk encryption.\\n *\\n * @class AES\\n * @param key {Array} The key as an array of 4, 6 or 8 words.\\n */\\n\\nvar AES = function () {\\n  function AES(key) {\\n    classCallCheck(this, AES);\\n\\n    /**\\n     * The expanded S-box and inverse S-box tables. These will be computed\\n     * on the client so that we don't have to send them down the wire.\\n     *\\n     * There are two tables, _tables[0] is for encryption and\\n     * _tables[1] is for decryption.\\n     *\\n     * The first 4 sub-tables are the expanded S-box with MixColumns. The\\n     * last (_tables[01][4]) is the S-box itself.\\n     *\\n     * @private\\n     */\\n    // if we have yet to precompute the S-box tables\\n    // do so now\\n    if (!aesTables) {\\n      aesTables = precompute();\\n    }\\n    // then make a copy of that object for use\\n    this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\\n    var i = void 0;\\n    var j = void 0;\\n    var tmp = void 0;\\n    var encKey = void 0;\\n    var decKey = void 0;\\n    var sbox = this._tables[0][4];\\n    var decTable = this._tables[1];\\n    var keyLen = key.length;\\n    var rcon = 1;\\n\\n    if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\\n      throw new Error('Invalid aes key size');\\n    }\\n\\n    encKey = key.slice(0);\\n    decKey = [];\\n    this._key = [encKey, decKey];\\n\\n    // schedule encryption keys\\n    for (i = keyLen; i < 4 * keyLen + 28; i++) {\\n      tmp = encKey[i - 1];\\n\\n      // apply sbox\\n      if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\\n        tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\\n\\n        // shift rows and add rcon\\n        if (i % keyLen === 0) {\\n          tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\\n          rcon = rcon << 1 ^ (rcon >> 7) * 283;\\n        }\\n      }\\n\\n      encKey[i] = encKey[i - keyLen] ^ tmp;\\n    }\\n\\n    // schedule decryption keys\\n    for (j = 0; i; j++, i--) {\\n      tmp = encKey[j & 3 ? i : i - 4];\\n      if (i <= 4 || j < 4) {\\n        decKey[j] = tmp;\\n      } else {\\n        decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\\n      }\\n    }\\n  }\\n\\n  /**\\n   * Decrypt 16 bytes, specified as four 32-bit words.\\n   *\\n   * @param {Number} encrypted0 the first word to decrypt\\n   * @param {Number} encrypted1 the second word to decrypt\\n   * @param {Number} encrypted2 the third word to decrypt\\n   * @param {Number} encrypted3 the fourth word to decrypt\\n   * @param {Int32Array} out the array to write the decrypted words\\n   * into\\n   * @param {Number} offset the offset into the output array to start\\n   * writing results\\n   * @return {Array} The plaintext.\\n   */\\n\\n\\n  AES.prototype.decrypt = function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\\n    var key = this._key[1];\\n    // state variables a,b,c,d are loaded with pre-whitened data\\n    var a = encrypted0 ^ key[0];\\n    var b = encrypted3 ^ key[1];\\n    var c = encrypted2 ^ key[2];\\n    var d = encrypted1 ^ key[3];\\n    var a2 = void 0;\\n    var b2 = void 0;\\n    var c2 = void 0;\\n\\n    // key.length === 2 ?\\n    var nInnerRounds = key.length / 4 - 2;\\n    var i = void 0;\\n    var kIndex = 4;\\n    var table = this._tables[1];\\n\\n    // load up the tables\\n    var table0 = table[0];\\n    var table1 = table[1];\\n    var table2 = table[2];\\n    var table3 = table[3];\\n    var sbox = table[4];\\n\\n    // Inner rounds. Cribbed from OpenSSL.\\n    for (i = 0; i < nInnerRounds; i++) {\\n      a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\\n      b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\\n      c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\\n      d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\\n      kIndex += 4;\\n      a = a2;b = b2;c = c2;\\n    }\\n\\n    // Last round.\\n    for (i = 0; i < 4; i++) {\\n      out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\\n      a2 = a;a = b;b = c;c = d;d = a2;\\n    }\\n  };\\n\\n  return AES;\\n}();\\n\\n/**\\n * @file stream.js\\n */\\n/**\\n * A lightweight readable stream implemention that handles event dispatching.\\n *\\n * @class Stream\\n */\\nvar Stream = function () {\\n  function Stream() {\\n    classCallCheck(this, Stream);\\n\\n    this.listeners = {};\\n  }\\n\\n  /**\\n   * Add a listener for a specified event type.\\n   *\\n   * @param {String} type the event name\\n   * @param {Function} listener the callback to be invoked when an event of\\n   * the specified type occurs\\n   */\\n\\n\\n  Stream.prototype.on = function on(type, listener) {\\n    if (!this.listeners[type]) {\\n      this.listeners[type] = [];\\n    }\\n    this.listeners[type].push(listener);\\n  };\\n\\n  /**\\n   * Remove a listener for a specified event type.\\n   *\\n   * @param {String} type the event name\\n   * @param {Function} listener  a function previously registered for this\\n   * type of event through `on`\\n   * @return {Boolean} if we could turn it off or not\\n   */\\n\\n\\n  Stream.prototype.off = function off(type, listener) {\\n    if (!this.listeners[type]) {\\n      return false;\\n    }\\n\\n    var index = this.listeners[type].indexOf(listener);\\n\\n    this.listeners[type].splice(index, 1);\\n    return index > -1;\\n  };\\n\\n  /**\\n   * Trigger an event of the specified type on this stream. Any additional\\n   * arguments to this function are passed as parameters to event listeners.\\n   *\\n   * @param {String} type the event name\\n   */\\n\\n\\n  Stream.prototype.trigger = function trigger(type) {\\n    var callbacks = this.listeners[type];\\n\\n    if (!callbacks) {\\n      return;\\n    }\\n\\n    // Slicing the arguments on every invocation of this method\\n    // can add a significant amount of overhead. Avoid the\\n    // intermediate object creation for the common case of a\\n    // single callback argument\\n    if (arguments.length === 2) {\\n      var length = callbacks.length;\\n\\n      for (var i = 0; i < length; ++i) {\\n        callbacks[i].call(this, arguments[1]);\\n      }\\n    } else {\\n      var args = Array.prototype.slice.call(arguments, 1);\\n      var _length = callbacks.length;\\n\\n      for (var _i = 0; _i < _length; ++_i) {\\n        callbacks[_i].apply(this, args);\\n      }\\n    }\\n  };\\n\\n  /**\\n   * Destroys the stream and cleans up.\\n   */\\n\\n\\n  Stream.prototype.dispose = function dispose() {\\n    this.listeners = {};\\n  };\\n  /**\\n   * Forwards all `data` events on this stream to the destination stream. The\\n   * destination stream should provide a method `push` to receive the data\\n   * events as they arrive.\\n   *\\n   * @param {Stream} destination the stream that will receive all `data` events\\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n   */\\n\\n\\n  Stream.prototype.pipe = function pipe(destination) {\\n    this.on('data', function (data) {\\n      destination.push(data);\\n    });\\n  };\\n\\n  return Stream;\\n}();\\n\\n/**\\n * @file async-stream.js\\n */\\n/**\\n * A wrapper around the Stream class to use setTiemout\\n * and run stream \\\"jobs\\\" Asynchronously\\n *\\n * @class AsyncStream\\n * @extends Stream\\n */\\n\\nvar AsyncStream = function (_Stream) {\\n  inherits(AsyncStream, _Stream);\\n\\n  function AsyncStream() {\\n    classCallCheck(this, AsyncStream);\\n\\n    var _this = possibleConstructorReturn(this, _Stream.call(this, Stream));\\n\\n    _this.jobs = [];\\n    _this.delay = 1;\\n    _this.timeout_ = null;\\n    return _this;\\n  }\\n\\n  /**\\n   * process an async job\\n   *\\n   * @private\\n   */\\n\\n\\n  AsyncStream.prototype.processJob_ = function processJob_() {\\n    this.jobs.shift()();\\n    if (this.jobs.length) {\\n      this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n    } else {\\n      this.timeout_ = null;\\n    }\\n  };\\n\\n  /**\\n   * push a job into the stream\\n   *\\n   * @param {Function} job the job to push into the stream\\n   */\\n\\n\\n  AsyncStream.prototype.push = function push(job) {\\n    this.jobs.push(job);\\n    if (!this.timeout_) {\\n      this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n    }\\n  };\\n\\n  return AsyncStream;\\n}(Stream);\\n\\n/**\\n * @file decrypter.js\\n *\\n * An asynchronous implementation of AES-128 CBC decryption with\\n * PKCS#7 padding.\\n */\\n\\n/**\\n * Convert network-order (big-endian) bytes into their little-endian\\n * representation.\\n */\\nvar ntoh = function ntoh(word) {\\n  return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\\n};\\n\\n/**\\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\\n *\\n * @param {Uint8Array} encrypted the encrypted bytes\\n * @param {Uint32Array} key the bytes of the decryption key\\n * @param {Uint32Array} initVector the initialization vector (IV) to\\n * use for the first round of CBC.\\n * @return {Uint8Array} the decrypted bytes\\n *\\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\\n * @see https://tools.ietf.org/html/rfc2315\\n */\\nvar decrypt = function decrypt(encrypted, key, initVector) {\\n  // word-level access to the encrypted bytes\\n  var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\\n\\n  var decipher = new AES(Array.prototype.slice.call(key));\\n\\n  // byte and word-level access for the decrypted output\\n  var decrypted = new Uint8Array(encrypted.byteLength);\\n  var decrypted32 = new Int32Array(decrypted.buffer);\\n\\n  // temporary variables for working with the IV, encrypted, and\\n  // decrypted data\\n  var init0 = void 0;\\n  var init1 = void 0;\\n  var init2 = void 0;\\n  var init3 = void 0;\\n  var encrypted0 = void 0;\\n  var encrypted1 = void 0;\\n  var encrypted2 = void 0;\\n  var encrypted3 = void 0;\\n\\n  // iteration variable\\n  var wordIx = void 0;\\n\\n  // pull out the words of the IV to ensure we don't modify the\\n  // passed-in reference and easier access\\n  init0 = initVector[0];\\n  init1 = initVector[1];\\n  init2 = initVector[2];\\n  init3 = initVector[3];\\n\\n  // decrypt four word sequences, applying cipher-block chaining (CBC)\\n  // to each decrypted block\\n  for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\\n    // convert big-endian (network order) words into little-endian\\n    // (javascript order)\\n    encrypted0 = ntoh(encrypted32[wordIx]);\\n    encrypted1 = ntoh(encrypted32[wordIx + 1]);\\n    encrypted2 = ntoh(encrypted32[wordIx + 2]);\\n    encrypted3 = ntoh(encrypted32[wordIx + 3]);\\n\\n    // decrypt the block\\n    decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx);\\n\\n    // XOR with the IV, and restore network byte-order to obtain the\\n    // plaintext\\n    decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\\n    decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\\n    decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\\n    decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3);\\n\\n    // setup the IV for the next round\\n    init0 = encrypted0;\\n    init1 = encrypted1;\\n    init2 = encrypted2;\\n    init3 = encrypted3;\\n  }\\n\\n  return decrypted;\\n};\\n\\n/**\\n * The `Decrypter` class that manages decryption of AES\\n * data through `AsyncStream` objects and the `decrypt`\\n * function\\n *\\n * @param {Uint8Array} encrypted the encrypted bytes\\n * @param {Uint32Array} key the bytes of the decryption key\\n * @param {Uint32Array} initVector the initialization vector (IV) to\\n * @param {Function} done the function to run when done\\n * @class Decrypter\\n */\\n\\nvar Decrypter = function () {\\n  function Decrypter(encrypted, key, initVector, done) {\\n    classCallCheck(this, Decrypter);\\n\\n    var step = Decrypter.STEP;\\n    var encrypted32 = new Int32Array(encrypted.buffer);\\n    var decrypted = new Uint8Array(encrypted.byteLength);\\n    var i = 0;\\n\\n    this.asyncStream_ = new AsyncStream();\\n\\n    // split up the encryption job and do the individual chunks asynchronously\\n    this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n    for (i = step; i < encrypted32.length; i += step) {\\n      initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\\n      this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n    }\\n    // invoke the done() callback when everything is finished\\n    this.asyncStream_.push(function () {\\n      // remove pkcs#7 padding from the decrypted bytes\\n      done(null, Object(pkcs7__WEBPACK_IMPORTED_MODULE_0__[\\\"unpad\\\"])(decrypted));\\n    });\\n  }\\n\\n  /**\\n   * a getter for step the maximum number of bytes to process at one time\\n   *\\n   * @return {Number} the value of step 32000\\n   */\\n\\n\\n  /**\\n   * @private\\n   */\\n  Decrypter.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\\n    return function () {\\n      var bytes = decrypt(encrypted, key, initVector);\\n\\n      decrypted.set(bytes, encrypted.byteOffset);\\n    };\\n  };\\n\\n  createClass(Decrypter, null, [{\\n    key: 'STEP',\\n    get: function get$$1() {\\n      // 4 * 8000;\\n      return 32000;\\n    }\\n  }]);\\n  return Decrypter;\\n}();\\n\\n/**\\n * @file index.js\\n *\\n * Index module to easily import the primary components of AES-128\\n * decryption. Like this:\\n *\\n * ```js\\n * import {Decrypter, decrypt, AsyncStream} from 'aes-decrypter';\\n * ```\\n */\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/aes-decrypter/dist/aes-decrypter.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/base64-js/index.js\":\n/*!******************************************!*\\\n  !*** ../node_modules/base64-js/index.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nexports.byteLength = byteLength\\nexports.toByteArray = toByteArray\\nexports.fromByteArray = fromByteArray\\n\\nvar lookup = []\\nvar revLookup = []\\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\\n\\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\\nfor (var i = 0, len = code.length; i < len; ++i) {\\n  lookup[i] = code[i]\\n  revLookup[code.charCodeAt(i)] = i\\n}\\n\\n// Support decoding URL-safe base64 strings, as Node.js does.\\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\\nrevLookup['-'.charCodeAt(0)] = 62\\nrevLookup['_'.charCodeAt(0)] = 63\\n\\nfunction getLens (b64) {\\n  var len = b64.length\\n\\n  if (len % 4 > 0) {\\n    throw new Error('Invalid string. Length must be a multiple of 4')\\n  }\\n\\n  // Trim off extra bytes after placeholder bytes are found\\n  // See: https://github.com/beatgammit/base64-js/issues/42\\n  var validLen = b64.indexOf('=')\\n  if (validLen === -1) validLen = len\\n\\n  var placeHoldersLen = validLen === len\\n    ? 0\\n    : 4 - (validLen % 4)\\n\\n  return [validLen, placeHoldersLen]\\n}\\n\\n// base64 is 4/3 + up to two characters of the original data\\nfunction byteLength (b64) {\\n  var lens = getLens(b64)\\n  var validLen = lens[0]\\n  var placeHoldersLen = lens[1]\\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\n}\\n\\nfunction _byteLength (b64, validLen, placeHoldersLen) {\\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\n}\\n\\nfunction toByteArray (b64) {\\n  var tmp\\n  var lens = getLens(b64)\\n  var validLen = lens[0]\\n  var placeHoldersLen = lens[1]\\n\\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\\n\\n  var curByte = 0\\n\\n  // if there are placeholders, only get up to the last complete 4 chars\\n  var len = placeHoldersLen > 0\\n    ? validLen - 4\\n    : validLen\\n\\n  var i\\n  for (i = 0; i < len; i += 4) {\\n    tmp =\\n      (revLookup[b64.charCodeAt(i)] << 18) |\\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\\n      revLookup[b64.charCodeAt(i + 3)]\\n    arr[curByte++] = (tmp >> 16) & 0xFF\\n    arr[curByte++] = (tmp >> 8) & 0xFF\\n    arr[curByte++] = tmp & 0xFF\\n  }\\n\\n  if (placeHoldersLen === 2) {\\n    tmp =\\n      (revLookup[b64.charCodeAt(i)] << 2) |\\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\\n    arr[curByte++] = tmp & 0xFF\\n  }\\n\\n  if (placeHoldersLen === 1) {\\n    tmp =\\n      (revLookup[b64.charCodeAt(i)] << 10) |\\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\\n    arr[curByte++] = (tmp >> 8) & 0xFF\\n    arr[curByte++] = tmp & 0xFF\\n  }\\n\\n  return arr\\n}\\n\\nfunction tripletToBase64 (num) {\\n  return lookup[num >> 18 & 0x3F] +\\n    lookup[num >> 12 & 0x3F] +\\n    lookup[num >> 6 & 0x3F] +\\n    lookup[num & 0x3F]\\n}\\n\\nfunction encodeChunk (uint8, start, end) {\\n  var tmp\\n  var output = []\\n  for (var i = start; i < end; i += 3) {\\n    tmp =\\n      ((uint8[i] << 16) & 0xFF0000) +\\n      ((uint8[i + 1] << 8) & 0xFF00) +\\n      (uint8[i + 2] & 0xFF)\\n    output.push(tripletToBase64(tmp))\\n  }\\n  return output.join('')\\n}\\n\\nfunction fromByteArray (uint8) {\\n  var tmp\\n  var len = uint8.length\\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\\n  var parts = []\\n  var maxChunkLength = 16383 // must be multiple of 3\\n\\n  // go through the array every three bytes, we'll deal with trailing stuff later\\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\\n    parts.push(encodeChunk(\\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\\n    ))\\n  }\\n\\n  // pad the end with zeros, but make sure to not forget the extra bytes\\n  if (extraBytes === 1) {\\n    tmp = uint8[len - 1]\\n    parts.push(\\n      lookup[tmp >> 2] +\\n      lookup[(tmp << 4) & 0x3F] +\\n      '=='\\n    )\\n  } else if (extraBytes === 2) {\\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\\n    parts.push(\\n      lookup[tmp >> 10] +\\n      lookup[(tmp >> 4) & 0x3F] +\\n      lookup[(tmp << 2) & 0x3F] +\\n      '='\\n    )\\n  }\\n\\n  return parts.join('')\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/base64-js/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/codem-isoboxer/dist/iso_boxer.js\":\n/*!********************************************************!*\\\n  !*** ../node_modules/codem-isoboxer/dist/iso_boxer.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */\\nvar ISOBoxer = {};\\n\\nISOBoxer.parseBuffer = function(arrayBuffer) {\\n  return new ISOFile(arrayBuffer).parse();\\n};\\n\\nISOBoxer.addBoxProcessor = function(type, parser) {\\n  if (typeof type !== 'string' || typeof parser !== 'function') {\\n    return;\\n  }\\n  ISOBox.prototype._boxProcessors[type] = parser;\\n};\\n\\nISOBoxer.createFile = function() {\\n  return new ISOFile();\\n};\\n\\n// See ISOBoxer.append() for 'pos' parameter syntax\\nISOBoxer.createBox = function(type, parent, pos) {\\n  var newBox = ISOBox.create(type);\\n  if (parent) {\\n    parent.append(newBox, pos);\\n  }\\n  return newBox;\\n};\\n\\n// See ISOBoxer.append() for 'pos' parameter syntax\\nISOBoxer.createFullBox = function(type, parent, pos) {\\n  var newBox = ISOBoxer.createBox(type, parent, pos);\\n  newBox.version = 0;\\n  newBox.flags = 0;\\n  return newBox;\\n};\\n\\nISOBoxer.Utils = {};\\nISOBoxer.Utils.dataViewToString = function(dataView, encoding) {\\n  var impliedEncoding = encoding || 'utf-8';\\n  if (typeof TextDecoder !== 'undefined') {\\n    return new TextDecoder(impliedEncoding).decode(dataView);\\n  }\\n  var a = [];\\n  var i = 0;\\n\\n  if (impliedEncoding === 'utf-8') {\\n    /* The following algorithm is essentially a rewrite of the UTF8.decode at\\n    http://bannister.us/weblog/2007/simple-base64-encodedecode-javascript/\\n    */\\n\\n    while (i < dataView.byteLength) {\\n      var c = dataView.getUint8(i++);\\n      if (c < 0x80) {\\n        // 1-byte character (7 bits)\\n      } else if (c < 0xe0) {\\n        // 2-byte character (11 bits)\\n        c = (c & 0x1f) << 6;\\n        c |= (dataView.getUint8(i++) & 0x3f);\\n      } else if (c < 0xf0) {\\n        // 3-byte character (16 bits)\\n        c = (c & 0xf) << 12;\\n        c |= (dataView.getUint8(i++) & 0x3f) << 6;\\n        c |= (dataView.getUint8(i++) & 0x3f);\\n      } else {\\n        // 4-byte character (21 bits)\\n        c = (c & 0x7) << 18;\\n        c |= (dataView.getUint8(i++) & 0x3f) << 12;\\n        c |= (dataView.getUint8(i++) & 0x3f) << 6;\\n        c |= (dataView.getUint8(i++) & 0x3f);\\n      }\\n      a.push(String.fromCharCode(c));\\n    }\\n  } else { // Just map byte-by-byte (probably wrong)\\n    while (i < dataView.byteLength) {\\n      a.push(String.fromCharCode(dataView.getUint8(i++)));\\n    }\\n  }\\n  return a.join('');\\n};\\n\\nISOBoxer.Utils.utf8ToByteArray = function(string) {\\n  // Only UTF-8 encoding is supported by TextEncoder\\n  var u, i;\\n  if (typeof TextEncoder !== 'undefined') {\\n    u = new TextEncoder().encode(string);\\n  } else {\\n    u = [];\\n    for (i = 0; i < string.length; ++i) {\\n      var c = string.charCodeAt(i);\\n      if (c < 0x80) {\\n        u.push(c);\\n      } else if (c < 0x800) {\\n        u.push(0xC0 | (c >> 6));\\n        u.push(0x80 | (63 & c));\\n      } else if (c < 0x10000) {\\n        u.push(0xE0 | (c >> 12));\\n        u.push(0x80 | (63 & (c >> 6)));\\n        u.push(0x80 | (63 & c));\\n      } else {\\n        u.push(0xF0 | (c >> 18));\\n        u.push(0x80 | (63 & (c >> 12)));\\n        u.push(0x80 | (63 & (c >> 6)));\\n        u.push(0x80 | (63 & c));\\n      }\\n    }\\n  }\\n  return u;\\n};\\n\\n// Method to append a box in the list of child boxes\\n// The 'pos' parameter can be either:\\n//   - (number) a position index at which to insert the new box\\n//   - (string) the type of the box after which to insert the new box\\n//   - (object) the box after which to insert the new box\\nISOBoxer.Utils.appendBox = function(parent, box, pos) {\\n  box._offset = parent._cursor.offset;\\n  box._root = (parent._root ? parent._root : parent);\\n  box._raw = parent._raw;\\n  box._parent = parent;\\n\\n  if (pos === -1) {\\n    // The new box is a sub-box of the parent but not added in boxes array,\\n    // for example when the new box is set as an entry (see dref and stsd for example)\\n    return;\\n  }\\n\\n  if (pos === undefined || pos === null) {\\n    parent.boxes.push(box);\\n    return;\\n  }\\n\\n  var index = -1,\\n      type;\\n\\n  if (typeof pos === \\\"number\\\") {\\n    index = pos;\\n  } else {\\n    if (typeof pos === \\\"string\\\") {\\n      type = pos;\\n    } else if (typeof pos === \\\"object\\\" && pos.type) {\\n      type = pos.type;\\n    } else {\\n      parent.boxes.push(box);\\n      return;\\n    }\\n\\n    for (var i = 0; i < parent.boxes.length; i++) {\\n      if (type === parent.boxes[i].type) {\\n        index = i + 1;\\n        break;\\n      }\\n    }\\n  }\\n  parent.boxes.splice(index, 0, box);\\n};\\n\\nif (true) {\\n  exports.parseBuffer     = ISOBoxer.parseBuffer;\\n  exports.addBoxProcessor = ISOBoxer.addBoxProcessor;\\n  exports.createFile      = ISOBoxer.createFile;\\n  exports.createBox       = ISOBoxer.createBox;\\n  exports.createFullBox   = ISOBoxer.createFullBox;\\n  exports.Utils           = ISOBoxer.Utils;\\n}\\n\\nISOBoxer.Cursor = function(initialOffset) {\\n  this.offset = (typeof initialOffset == 'undefined' ? 0 : initialOffset);\\n};\\n\\nvar ISOFile = function(arrayBuffer) {\\n  this._cursor = new ISOBoxer.Cursor();\\n  this.boxes = [];\\n  if (arrayBuffer) {\\n    this._raw = new DataView(arrayBuffer);\\n  }\\n};\\n\\nISOFile.prototype.fetch = function(type) {\\n  var result = this.fetchAll(type, true);\\n  return (result.length ? result[0] : null);\\n};\\n\\nISOFile.prototype.fetchAll = function(type, returnEarly) {\\n  var result = [];\\n  ISOFile._sweep.call(this, type, result, returnEarly);\\n  return result;\\n};\\n\\nISOFile.prototype.parse = function() {\\n  this._cursor.offset = 0;\\n  this.boxes = [];\\n  while (this._cursor.offset < this._raw.byteLength) {\\n    var box = ISOBox.parse(this);\\n\\n    // Box could not be parsed\\n    if (typeof box.type === 'undefined') break;\\n\\n    this.boxes.push(box);\\n  }\\n  return this;\\n};\\n\\nISOFile._sweep = function(type, result, returnEarly) {\\n  if (this.type && this.type == type) result.push(this);\\n  for (var box in this.boxes) {\\n    if (result.length && returnEarly) return;\\n    ISOFile._sweep.call(this.boxes[box], type, result, returnEarly);\\n  }\\n};\\n\\nISOFile.prototype.write = function() {\\n\\n  var length = 0,\\n      i;\\n\\n  for (i = 0; i < this.boxes.length; i++) {\\n    length += this.boxes[i].getLength(false);\\n  }\\n\\n  var bytes = new Uint8Array(length);\\n  this._rawo = new DataView(bytes.buffer);\\n  this.bytes = bytes;\\n  this._cursor.offset = 0;\\n\\n  for (i = 0; i < this.boxes.length; i++) {\\n    this.boxes[i].write();\\n  }\\n\\n  return bytes.buffer;\\n};\\n\\nISOFile.prototype.append = function(box, pos) {\\n  ISOBoxer.Utils.appendBox(this, box, pos);\\n};\\nvar ISOBox = function() {\\n  this._cursor = new ISOBoxer.Cursor();\\n};\\n\\nISOBox.parse = function(parent) {\\n  var newBox = new ISOBox();\\n  newBox._offset = parent._cursor.offset;\\n  newBox._root = (parent._root ? parent._root : parent);\\n  newBox._raw = parent._raw;\\n  newBox._parent = parent;\\n  newBox._parseBox();\\n  parent._cursor.offset = newBox._raw.byteOffset + newBox._raw.byteLength;\\n  return newBox;\\n};\\n\\nISOBox.create = function(type) {\\n  var newBox = new ISOBox();\\n  newBox.type = type;\\n  newBox.boxes = [];\\n  return newBox;\\n};\\n\\nISOBox.prototype._boxContainers = ['dinf', 'edts', 'mdia', 'meco', 'mfra', 'minf', 'moof', 'moov', 'mvex', 'stbl', 'strk', 'traf', 'trak', 'tref', 'udta', 'vttc', 'sinf', 'schi', 'encv', 'enca'];\\n\\nISOBox.prototype._boxProcessors = {};\\n\\n///////////////////////////////////////////////////////////////////////////////////////////////////\\n// Generic read/write functions\\n\\nISOBox.prototype._procField = function (name, type, size) {\\n  if (this._parsing) {\\n    this[name] = this._readField(type, size);\\n  }\\n  else {\\n    this._writeField(type, size, this[name]);\\n  }\\n};\\n\\nISOBox.prototype._procFieldArray = function (name, length, type, size) {\\n  var i;\\n  if (this._parsing) {\\n    this[name] = [];\\n    for (i = 0; i < length; i++) {\\n      this[name][i] = this._readField(type, size);\\n    }\\n  }\\n  else {\\n    for (i = 0; i < this[name].length; i++) {\\n      this._writeField(type, size, this[name][i]);\\n    }\\n  }\\n};\\n\\nISOBox.prototype._procFullBox = function() {\\n  this._procField('version', 'uint', 8);\\n  this._procField('flags', 'uint', 24);\\n};\\n\\nISOBox.prototype._procEntries = function(name, length, fn) {\\n  var i;\\n  if (this._parsing) {\\n    this[name] = [];\\n    for (i = 0; i < length; i++) {\\n      this[name].push({});\\n      fn.call(this, this[name][i]);\\n    }\\n  }\\n  else {\\n    for (i = 0; i < length; i++) {\\n      fn.call(this, this[name][i]);\\n    }\\n  }\\n};\\n\\nISOBox.prototype._procSubEntries = function(entry, name, length, fn) {\\n  var i;\\n  if (this._parsing) {\\n    entry[name] = [];\\n    for (i = 0; i < length; i++) {\\n      entry[name].push({});\\n      fn.call(this, entry[name][i]);\\n    }\\n  }\\n  else {\\n    for (i = 0; i < length; i++) {\\n      fn.call(this, entry[name][i]);\\n    }\\n  }\\n};\\n\\nISOBox.prototype._procEntryField = function (entry, name, type, size) {\\n  if (this._parsing) {\\n    entry[name] = this._readField(type, size);\\n  }\\n  else {\\n    this._writeField(type, size, entry[name]);\\n  }\\n};\\n\\nISOBox.prototype._procSubBoxes = function(name, length) {\\n  var i;\\n  if (this._parsing) {\\n    this[name] = [];\\n    for (i = 0; i < length; i++) {\\n      this[name].push(ISOBox.parse(this));\\n    }\\n  }\\n  else {\\n    for (i = 0; i < length; i++) {\\n      if (this._rawo) {\\n        this[name][i].write();\\n      } else {\\n        this.size += this[name][i].getLength();\\n      }\\n    }\\n  }\\n};\\n\\n///////////////////////////////////////////////////////////////////////////////////////////////////\\n// Read/parse functions\\n\\nISOBox.prototype._readField = function(type, size) {\\n  switch (type) {\\n    case 'uint':\\n      return this._readUint(size);\\n    case 'int':\\n      return this._readInt(size);\\n    case 'template':\\n      return this._readTemplate(size);\\n    case 'string':\\n      return (size === -1) ? this._readTerminatedString() : this._readString(size);\\n    case 'data':\\n      return this._readData(size);\\n    case 'utf8':\\n      return this._readUTF8String();\\n    default:\\n      return -1;\\n  }\\n};\\n\\nISOBox.prototype._readInt = function(size) {\\n  var result = null,\\n      offset = this._cursor.offset - this._raw.byteOffset;\\n  switch(size) {\\n  case 8:\\n    result = this._raw.getInt8(offset);\\n    break;\\n  case 16:\\n    result = this._raw.getInt16(offset);\\n    break;\\n  case 32:\\n    result = this._raw.getInt32(offset);\\n    break;\\n  case 64:\\n    // Warning: JavaScript cannot handle 64-bit integers natively.\\n    // This will give unexpected results for integers >= 2^53\\n    var s1 = this._raw.getInt32(offset);\\n    var s2 = this._raw.getInt32(offset + 4);\\n    result = (s1 * Math.pow(2,32)) + s2;\\n    break;\\n  }\\n  this._cursor.offset += (size >> 3);\\n  return result;\\n};\\n\\nISOBox.prototype._readUint = function(size) {\\n  var result = null,\\n      offset = this._cursor.offset - this._raw.byteOffset,\\n      s1, s2;\\n  switch(size) {\\n  case 8:\\n    result = this._raw.getUint8(offset);\\n    break;\\n  case 16:\\n    result = this._raw.getUint16(offset);\\n    break;\\n  case 24:\\n    s1 = this._raw.getUint16(offset);\\n    s2 = this._raw.getUint8(offset + 2);\\n    result = (s1 << 8) + s2;\\n    break;\\n  case 32:\\n    result = this._raw.getUint32(offset);\\n    break;\\n  case 64:\\n    // Warning: JavaScript cannot handle 64-bit integers natively.\\n    // This will give unexpected results for integers >= 2^53\\n    s1 = this._raw.getUint32(offset);\\n    s2 = this._raw.getUint32(offset + 4);\\n    result = (s1 * Math.pow(2,32)) + s2;\\n    break;\\n  }\\n  this._cursor.offset += (size >> 3);\\n  return result;\\n};\\n\\nISOBox.prototype._readString = function(length) {\\n  var str = '';\\n  for (var c = 0; c < length; c++) {\\n    var char = this._readUint(8);\\n    str += String.fromCharCode(char);\\n  }\\n  return str;\\n};\\n\\nISOBox.prototype._readTemplate = function(size) {\\n  var pre = this._readUint(size / 2);\\n  var post = this._readUint(size / 2);\\n  return pre + (post / Math.pow(2, size / 2));\\n};\\n\\nISOBox.prototype._readTerminatedString = function() {\\n  var str = '';\\n  while (this._cursor.offset - this._offset < this._raw.byteLength) {\\n    var char = this._readUint(8);\\n    if (char === 0) break;\\n    str += String.fromCharCode(char);\\n  }\\n  return str;\\n};\\n\\nISOBox.prototype._readData = function(size) {\\n  var length = (size > 0) ? size : (this._raw.byteLength - (this._cursor.offset - this._offset));\\n  if (length > 0) {\\n    var data = new Uint8Array(this._raw.buffer, this._cursor.offset, length);\\n\\n    this._cursor.offset += length;\\n    return data;\\n  }\\n  else {\\n    return null;\\n  }\\n};\\n\\nISOBox.prototype._readUTF8String = function() {\\n  var length = this._raw.byteLength - (this._cursor.offset - this._offset);\\n  var data = null;\\n  if (length > 0) {\\n    data = new DataView(this._raw.buffer, this._cursor.offset, length);\\n    this._cursor.offset += length;\\n  }\\n \\n  return data ? ISOBoxer.Utils.dataViewToString(data) : data;\\n};\\n\\nISOBox.prototype._parseBox = function() {\\n  this._parsing = true;\\n  this._cursor.offset = this._offset;\\n\\n  // return immediately if there are not enough bytes to read the header\\n  if (this._offset + 8 > this._raw.buffer.byteLength) {\\n    this._root._incomplete = true;\\n    return;\\n  }\\n\\n  this._procField('size', 'uint', 32);\\n  this._procField('type', 'string', 4);\\n\\n  if (this.size === 1)      { this._procField('largesize', 'uint', 64); }\\n  if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\\n\\n  switch(this.size) {\\n  case 0:\\n    this._raw = new DataView(this._raw.buffer, this._offset, (this._raw.byteLength - this._cursor.offset + 8));\\n    break;\\n  case 1:\\n    if (this._offset + this.size > this._raw.buffer.byteLength) {\\n      this._incomplete = true;\\n      this._root._incomplete = true;\\n    } else {\\n      this._raw = new DataView(this._raw.buffer, this._offset, this.largesize);\\n    }\\n    break;\\n  default:\\n    if (this._offset + this.size > this._raw.buffer.byteLength) {\\n      this._incomplete = true;\\n      this._root._incomplete = true;\\n    } else {\\n      this._raw = new DataView(this._raw.buffer, this._offset, this.size);\\n    }\\n  }\\n\\n  // additional parsing\\n  if (!this._incomplete) {\\n    if (this._boxProcessors[this.type]) {\\n      this._boxProcessors[this.type].call(this);\\n    }\\n    if (this._boxContainers.indexOf(this.type) !== -1) {\\n      this._parseContainerBox();\\n    } else{\\n      // Unknown box => read and store box content\\n      this._data = this._readData();\\n    }\\n  }\\n};\\n\\nISOBox.prototype._parseFullBox = function() {\\n  this.version = this._readUint(8);\\n  this.flags = this._readUint(24);\\n};\\n\\nISOBox.prototype._parseContainerBox = function() {\\n  this.boxes = [];\\n  while (this._cursor.offset - this._raw.byteOffset < this._raw.byteLength) {\\n    this.boxes.push(ISOBox.parse(this));\\n  }\\n};\\n\\n///////////////////////////////////////////////////////////////////////////////////////////////////\\n// Write functions\\n\\nISOBox.prototype.append = function(box, pos) {\\n  ISOBoxer.Utils.appendBox(this, box, pos);\\n};\\n\\nISOBox.prototype.getLength = function() {\\n  this._parsing = false;\\n  this._rawo = null;\\n\\n  this.size = 0;\\n  this._procField('size', 'uint', 32);\\n  this._procField('type', 'string', 4);\\n\\n  if (this.size === 1)      { this._procField('largesize', 'uint', 64); }\\n  if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\\n\\n  if (this._boxProcessors[this.type]) {\\n    this._boxProcessors[this.type].call(this);\\n  }\\n\\n  if (this._boxContainers.indexOf(this.type) !== -1) {\\n    for (var i = 0; i < this.boxes.length; i++) {\\n      this.size += this.boxes[i].getLength();\\n    }\\n  } \\n\\n  if (this._data) {\\n    this._writeData(this._data);\\n  }\\n\\n  return this.size;\\n};\\n\\nISOBox.prototype.write = function() {\\n  this._parsing = false;\\n  this._cursor.offset = this._parent._cursor.offset;\\n\\n  switch(this.size) {\\n  case 0:\\n    this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, (this.parent._rawo.byteLength - this._cursor.offset));\\n    break;\\n  case 1:\\n      this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, this.largesize);\\n    break;\\n  default:\\n      this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, this.size);\\n  }\\n\\n  this._procField('size', 'uint', 32);\\n  this._procField('type', 'string', 4);\\n\\n  if (this.size === 1)      { this._procField('largesize', 'uint', 64); }\\n  if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\\n\\n  if (this._boxProcessors[this.type]) {\\n    this._boxProcessors[this.type].call(this);\\n  }\\n\\n  if (this._boxContainers.indexOf(this.type) !== -1) {\\n    for (var i = 0; i < this.boxes.length; i++) {\\n      this.boxes[i].write();\\n    }\\n  } \\n\\n  if (this._data) {\\n    this._writeData(this._data);\\n  }\\n\\n  this._parent._cursor.offset += this.size;\\n\\n  return this.size;\\n};\\n\\nISOBox.prototype._writeInt = function(size, value) {\\n  if (this._rawo) {\\n    var offset = this._cursor.offset - this._rawo.byteOffset;\\n    switch(size) {\\n    case 8:\\n      this._rawo.setInt8(offset, value);\\n      break;\\n    case 16:\\n      this._rawo.setInt16(offset, value);\\n      break;\\n    case 32:\\n      this._rawo.setInt32(offset, value);\\n      break;\\n    case 64:\\n      // Warning: JavaScript cannot handle 64-bit integers natively.\\n      // This will give unexpected results for integers >= 2^53\\n      var s1 = Math.floor(value / Math.pow(2,32));\\n      var s2 = value - (s1 * Math.pow(2,32));\\n      this._rawo.setUint32(offset, s1);\\n      this._rawo.setUint32(offset + 4, s2);\\n      break;\\n    }\\n    this._cursor.offset += (size >> 3);\\n  } else {\\n    this.size += (size >> 3);\\n  }\\n};\\n\\nISOBox.prototype._writeUint = function(size, value) {\\n\\n  if (this._rawo) {\\n    var offset = this._cursor.offset - this._rawo.byteOffset,\\n        s1, s2;\\n    switch(size) {\\n    case 8:\\n      this._rawo.setUint8(offset, value);\\n      break;\\n    case 16:\\n      this._rawo.setUint16(offset, value);\\n      break;\\n    case 24:\\n      s1 = (value & 0xFFFF00) >> 8;\\n      s2 = (value & 0x0000FF);\\n      this._rawo.setUint16(offset, s1);\\n      this._rawo.setUint8(offset + 2, s2);\\n      break;\\n    case 32:\\n      this._rawo.setUint32(offset, value);\\n      break;\\n    case 64:\\n      // Warning: JavaScript cannot handle 64-bit integers natively.\\n      // This will give unexpected results for integers >= 2^53\\n      s1 = Math.floor(value / Math.pow(2,32));\\n      s2 = value - (s1 * Math.pow(2,32));\\n      this._rawo.setUint32(offset, s1);\\n      this._rawo.setUint32(offset + 4, s2);\\n      break;\\n    }\\n    this._cursor.offset += (size >> 3);\\n  } else {\\n    this.size += (size >> 3);\\n  }\\n};\\n\\nISOBox.prototype._writeString = function(size, str) {\\n  for (var c = 0; c < size; c++) {\\n    this._writeUint(8, str.charCodeAt(c));\\n  }\\n};\\n\\nISOBox.prototype._writeTerminatedString = function(str) {\\n  if (str.length === 0) {\\n    return;\\n  }\\n  for (var c = 0; c < str.length; c++) {\\n    this._writeUint(8, str.charCodeAt(c));\\n  }\\n  this._writeUint(8, 0);\\n};\\n\\nISOBox.prototype._writeTemplate = function(size, value) {\\n  var pre = Math.floor(value);\\n  var post = (value - pre) * Math.pow(2, size / 2);\\n  this._writeUint(size / 2, pre);\\n  this._writeUint(size / 2, post);\\n};\\n\\nISOBox.prototype._writeData = function(data) {\\n  var i;\\n  //data to copy\\n  if (data) {\\n    if (this._rawo) {\\n      //Array and Uint8Array has also to be managed\\n      if (data instanceof Array) {\\n        var offset = this._cursor.offset - this._rawo.byteOffset;\\n        for (var i = 0; i < data.length; i++) {\\n          this._rawo.setInt8(offset + i, data[i]);\\n        }\\n        this._cursor.offset += data.length;\\n      } \\n\\n      if (data instanceof Uint8Array) {\\n        this._root.bytes.set(data, this._cursor.offset);\\n        this._cursor.offset += data.length;\\n      }\\n\\n    } else {\\n      //nothing to copy only size to compute\\n      this.size += data.length;\\n    }\\n  }\\n};\\n\\nISOBox.prototype._writeUTF8String = function(string) {\\n  var u = ISOBoxer.Utils.utf8ToByteArray(string);\\n  if (this._rawo) {\\n    var dataView = new DataView(this._rawo.buffer, this._cursor.offset, u.length);\\n    for (var i = 0; i < u.length; i++) {\\n      dataView.setUint8(i, u[i]);\\n    }\\n  } else {\\n    this.size += u.length;\\n  }\\n};\\n\\nISOBox.prototype._writeField = function(type, size, value) {\\n  switch (type) {\\n  case 'uint':\\n    this._writeUint(size, value);\\n    break;\\n  case 'int':\\n    this._writeInt(size, value);\\n    break;\\n  case 'template':\\n    this._writeTemplate(size, value);\\n    break;\\n  case 'string':\\n      if (size == -1) {\\n        this._writeTerminatedString(value);\\n      } else {\\n        this._writeString(size, value);\\n      }\\n      break;\\n  case 'data':\\n    this._writeData(value);\\n    break;\\n  case 'utf8':\\n    this._writeUTF8String(value);\\n    break;\\n  default:\\n    break;\\n  }\\n};\\n\\n// ISO/IEC 14496-15:2014 - avc1 box\\nISOBox.prototype._boxProcessors['avc1'] = ISOBox.prototype._boxProcessors['encv'] = function() {\\n  // SampleEntry fields\\n  this._procFieldArray('reserved1', 6,    'uint', 8);\\n  this._procField('data_reference_index', 'uint', 16);\\n  // VisualSampleEntry fields\\n  this._procField('pre_defined1',         'uint',     16);\\n  this._procField('reserved2',            'uint',     16);\\n  this._procFieldArray('pre_defined2', 3, 'uint',     32);\\n  this._procField('width',                'uint',     16);\\n  this._procField('height',               'uint',     16);\\n  this._procField('horizresolution',      'template', 32);\\n  this._procField('vertresolution',       'template', 32);\\n  this._procField('reserved3',            'uint',     32);\\n  this._procField('frame_count',          'uint',     16);\\n  this._procFieldArray('compressorname', 32,'uint',    8);\\n  this._procField('depth',                'uint',     16);\\n  this._procField('pre_defined3',         'int',      16);\\n  // AVCSampleEntry fields\\n  this._procField('config', 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box\\nISOBox.prototype._boxProcessors['dref'] = function() {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procSubBoxes('entries', this.entry_count);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.6.6 Edit List Box\\nISOBox.prototype._boxProcessors['elst'] = function() {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procEntries('entries', this.entry_count, function(entry) {\\n    this._procEntryField(entry, 'segment_duration',     'uint', (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'media_time',           'int',  (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'media_rate_integer',   'int',  16);\\n    this._procEntryField(entry, 'media_rate_fraction',  'int',  16);\\n  });\\n};\\n\\n// ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box\\nISOBox.prototype._boxProcessors['emsg'] = function() {\\n  this._procFullBox();\\n  if (this.version == 1) {\\n    this._procField('timescale',                'uint',   32);\\n    this._procField('presentation_time',        'uint',   64);\\n    this._procField('event_duration',           'uint',   32);\\n    this._procField('id',                       'uint',   32);\\n    this._procField('scheme_id_uri',            'string', -1);\\n    this._procField('value',                    'string', -1);\\n  } else {\\n    this._procField('scheme_id_uri',            'string', -1);\\n    this._procField('value',                    'string', -1);\\n    this._procField('timescale',                'uint',   32);\\n    this._procField('presentation_time_delta',  'uint',   32);\\n    this._procField('event_duration',           'uint',   32);\\n    this._procField('id',                       'uint',   32);\\n  }\\n  this._procField('message_data',             'data',   -1);\\n};\\n// ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box\\nISOBox.prototype._boxProcessors['free'] = ISOBox.prototype._boxProcessors['skip'] = function() {\\n  this._procField('data', 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.12.2 Original Format Box\\nISOBox.prototype._boxProcessors['frma'] = function() {\\n  this._procField('data_format', 'uint', 32);\\n};\\n// ISO/IEC 14496-12:2012 - 4.3 File Type Box / 8.16.2 Segment Type Box\\nISOBox.prototype._boxProcessors['ftyp'] =\\nISOBox.prototype._boxProcessors['styp'] = function() {\\n  this._procField('major_brand', 'string', 4);\\n  this._procField('minor_version', 'uint', 32);\\n  var nbCompatibleBrands = -1;\\n  if (this._parsing) {\\n    nbCompatibleBrands = (this._raw.byteLength - (this._cursor.offset - this._raw.byteOffset)) / 4;\\n  }\\n  this._procFieldArray('compatible_brands', nbCompatibleBrands, 'string', 4);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.3 Handler Reference Box\\nISOBox.prototype._boxProcessors['hdlr'] = function() {\\n  this._procFullBox();\\n  this._procField('pre_defined',      'uint',   32);\\n  this._procField('handler_type',     'string', 4);\\n  this._procFieldArray('reserved', 3, 'uint', 32);\\n  this._procField('name',             'string', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box\\nISOBox.prototype._boxProcessors['mdat'] = function() {\\n  this._procField('data', 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box\\nISOBox.prototype._boxProcessors['mdhd'] = function() {\\n  this._procFullBox();\\n  this._procField('creation_time',      'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('modification_time',  'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('timescale',          'uint', 32);\\n  this._procField('duration',           'uint', (this.version == 1) ? 64 : 32);\\n  if (!this._parsing && typeof this.language === 'string') {\\n    // In case of writing and language has been set as a string, then convert it into char codes array\\n    this.language = ((this.language.charCodeAt(0) - 0x60) << 10) |\\n                    ((this.language.charCodeAt(1) - 0x60) << 5) |\\n                    ((this.language.charCodeAt(2) - 0x60));\\n  }\\n  this._procField('language',           'uint', 16);\\n  if (this._parsing) {\\n    this.language = String.fromCharCode(((this.language >> 10) & 0x1F) + 0x60,\\n                                        ((this.language >> 5) & 0x1F) + 0x60,\\n                                        (this.language & 0x1F) + 0x60);\\n  }\\n  this._procField('pre_defined',        'uint', 16);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box\\nISOBox.prototype._boxProcessors['mehd'] = function() {\\n  this._procFullBox();\\n  this._procField('fragment_duration', 'uint', (this.version == 1) ? 64 : 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box\\nISOBox.prototype._boxProcessors['mfhd'] = function() {\\n  this._procFullBox();\\n  this._procField('sequence_number', 'uint', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Box\\nISOBox.prototype._boxProcessors['mfro'] = function() {\\n  this._procFullBox();\\n  this._procField('mfra_size', 'uint', 32); // Called mfra_size to distinguish from the normal \\\"size\\\" attribute of a box\\n};\\n\\n\\n// ISO/IEC 14496-12:2012 - 8.5.2.2 mp4a box (use AudioSampleEntry definition and naming)\\nISOBox.prototype._boxProcessors['mp4a'] = ISOBox.prototype._boxProcessors['enca'] = function() {\\n  // SampleEntry fields\\n  this._procFieldArray('reserved1', 6,    'uint', 8);\\n  this._procField('data_reference_index', 'uint', 16);\\n  // AudioSampleEntry fields\\n  this._procFieldArray('reserved2', 2,    'uint', 32);\\n  this._procField('channelcount',         'uint', 16);\\n  this._procField('samplesize',           'uint', 16);\\n  this._procField('pre_defined',          'uint', 16);\\n  this._procField('reserved3',            'uint', 16);\\n  this._procField('samplerate',           'template', 32);\\n  // ESDescriptor fields\\n  this._procField('esds',                 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box\\nISOBox.prototype._boxProcessors['mvhd'] = function() {\\n  this._procFullBox();\\n  this._procField('creation_time',      'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('modification_time',  'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('timescale',          'uint',     32);\\n  this._procField('duration',           'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('rate',               'template', 32);\\n  this._procField('volume',             'template', 16);\\n  this._procField('reserved1',          'uint',  16);\\n  this._procFieldArray('reserved2', 2,  'uint',     32);\\n  this._procFieldArray('matrix', 9,     'template', 32);\\n  this._procFieldArray('pre_defined', 6,'uint',   32);\\n  this._procField('next_track_ID',      'uint',     32);\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Cue Payload Box.\\nISOBox.prototype._boxProcessors['payl'] = function() {\\n  this._procField('cue_text', 'utf8');\\n};\\n\\n//ISO/IEC 23001-7:2011 - 8.1 Protection System Specific Header Box\\nISOBox.prototype._boxProcessors['pssh'] = function() {\\n  this._procFullBox();\\n  \\n  this._procFieldArray('SystemID', 16, 'uint', 8);\\n  this._procField('DataSize', 'uint', 32);\\n  this._procFieldArray('Data', this.DataSize, 'uint', 8);\\n};\\n// ISO/IEC 14496-12:2012 - 8.12.5 Scheme Type Box\\nISOBox.prototype._boxProcessors['schm'] = function() {\\n    this._procFullBox();\\n    \\n    this._procField('scheme_type', 'uint', 32);\\n    this._procField('scheme_version', 'uint', 32);\\n\\n    if (this.flags & 0x000001) {\\n        this._procField('scheme_uri', 'string', -1);\\n    }\\n};\\n// ISO/IEC 14496-12:2012 - 8.6.4.1 sdtp box \\nISOBox.prototype._boxProcessors['sdtp'] = function() {\\n  this._procFullBox();\\n\\n  var sample_count = -1;\\n  if (this._parsing) {\\n    sample_count = (this._raw.byteLength - (this._cursor.offset - this._raw.byteOffset));\\n  }\\n\\n  this._procFieldArray('sample_dependency_table', sample_count, 'uint', 8);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box\\nISOBox.prototype._boxProcessors['sidx'] = function() {\\n  this._procFullBox();\\n  this._procField('reference_ID', 'uint', 32);\\n  this._procField('timescale', 'uint', 32);\\n  this._procField('earliest_presentation_time', 'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('first_offset', 'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('reserved', 'uint', 16);\\n  this._procField('reference_count', 'uint', 16);\\n  this._procEntries('references', this.reference_count, function(entry) {\\n    if (!this._parsing) {\\n      entry.reference  = (entry.reference_type  & 0x00000001) << 31;\\n      entry.reference |= (entry.referenced_size & 0x7FFFFFFF);\\n      entry.sap  = (entry.starts_with_SAP & 0x00000001) << 31;\\n      entry.sap |= (entry.SAP_type        & 0x00000003) << 28;\\n      entry.sap |= (entry.SAP_delta_time  & 0x0FFFFFFF);\\n    }\\n    this._procEntryField(entry, 'reference', 'uint', 32);\\n    this._procEntryField(entry, 'subsegment_duration', 'uint', 32);\\n    this._procEntryField(entry, 'sap', 'uint', 32);\\n    if (this._parsing) {\\n      entry.reference_type = (entry.reference >> 31) & 0x00000001;\\n      entry.referenced_size = entry.reference & 0x7FFFFFFF;\\n      entry.starts_with_SAP  = (entry.sap >> 31) & 0x00000001;\\n      entry.SAP_type = (entry.sap >> 28) & 0x00000007;\\n      entry.SAP_delta_time = (entry.sap  & 0x0FFFFFFF);\\n    }\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.5.3 Sound Media Header Box\\nISOBox.prototype._boxProcessors['smhd'] = function() {\\n  this._procFullBox();\\n  this._procField('balance',  'uint', 16);\\n  this._procField('reserved', 'uint', 16);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box\\nISOBox.prototype._boxProcessors['ssix'] = function() {\\n  this._procFullBox();\\n  this._procField('subsegment_count', 'uint', 32);\\n  this._procEntries('subsegments', this.subsegment_count, function(subsegment) {\\n    this._procEntryField(subsegment, 'ranges_count', 'uint', 32);\\n    this._procSubEntries(subsegment, 'ranges', subsegment.ranges_count, function(range) {\\n      this._procEntryField(range, 'level', 'uint', 8);\\n      this._procEntryField(range, 'range_size', 'uint', 24);\\n    });\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.5.2 Sample Description Box\\nISOBox.prototype._boxProcessors['stsd'] = function() {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procSubBoxes('entries', this.entry_count);\\n};\\n\\n// ISO/IEC 14496-12:2015 - 8.7.7 Sub-Sample Information Box\\nISOBox.prototype._boxProcessors['subs'] = function () {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procEntries('entries', this.entry_count, function(entry) {\\n    this._procEntryField(entry, 'sample_delta', 'uint', 32);\\n    this._procEntryField(entry, 'subsample_count', 'uint', 16);\\n    this._procSubEntries(entry, 'subsamples', entry.subsample_count, function(subsample) {\\n      this._procEntryField(subsample, 'subsample_size', 'uint', (this.version === 1) ? 32 : 16);\\n      this._procEntryField(subsample, 'subsample_priority', 'uint', 8);\\n      this._procEntryField(subsample, 'discardable', 'uint', 8);\\n      this._procEntryField(subsample, 'codec_specific_parameters', 'uint', 32);\\n    });\\n  });\\n};\\n\\n//ISO/IEC 23001-7:2011 - 8.2 Track Encryption Box\\nISOBox.prototype._boxProcessors['tenc'] = function() {\\n    this._procFullBox();\\n\\n    this._procField('default_IsEncrypted', 'uint', 24);\\n    this._procField('default_IV_size', 'uint', 8);\\n    this._procFieldArray('default_KID', 16,    'uint', 8);\\n };\\n\\n// ISO/IEC 14496-12:2012 - 8.8.12 Track Fragmnent Decode Time\\nISOBox.prototype._boxProcessors['tfdt'] = function() {\\n  this._procFullBox();\\n  this._procField('baseMediaDecodeTime', 'uint', (this.version == 1) ? 64 : 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box\\nISOBox.prototype._boxProcessors['tfhd'] = function() {\\n  this._procFullBox();\\n  this._procField('track_ID', 'uint', 32);\\n  if (this.flags & 0x01) this._procField('base_data_offset',          'uint', 64);\\n  if (this.flags & 0x02) this._procField('sample_description_offset', 'uint', 32);\\n  if (this.flags & 0x08) this._procField('default_sample_duration',   'uint', 32);\\n  if (this.flags & 0x10) this._procField('default_sample_size',       'uint', 32);\\n  if (this.flags & 0x20) this._procField('default_sample_flags',      'uint', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box\\nISOBox.prototype._boxProcessors['tfra'] = function() {\\n  this._procFullBox();\\n  this._procField('track_ID', 'uint', 32);\\n  if (!this._parsing) {\\n    this.reserved = 0;\\n    this.reserved |= (this.length_size_of_traf_num  & 0x00000030) << 4;\\n    this.reserved |= (this.length_size_of_trun_num  & 0x0000000C) << 2;\\n    this.reserved |= (this.length_size_of_sample_num  & 0x00000003);\\n  }\\n  this._procField('reserved', 'uint', 32);\\n  if (this._parsing) {\\n    this.length_size_of_traf_num = (this.reserved & 0x00000030) >> 4;\\n    this.length_size_of_trun_num = (this.reserved & 0x0000000C) >> 2;\\n    this.length_size_of_sample_num = (this.reserved & 0x00000003);\\n  }\\n  this._procField('number_of_entry', 'uint', 32);\\n  this._procEntries('entries', this.number_of_entry, function(entry) {\\n    this._procEntryField(entry, 'time', 'uint', (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'moof_offset', 'uint', (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'traf_number', 'uint', (this.length_size_of_traf_num + 1) * 8);\\n    this._procEntryField(entry, 'trun_number', 'uint', (this.length_size_of_trun_num + 1) * 8);\\n    this._procEntryField(entry, 'sample_number', 'uint', (this.length_size_of_sample_num + 1) * 8);\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.3.2 Track Header Box\\nISOBox.prototype._boxProcessors['tkhd'] = function() {\\n  this._procFullBox();\\n  this._procField('creation_time',      'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('modification_time',  'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('track_ID',           'uint',     32);\\n  this._procField('reserved1',          'uint',     32);\\n  this._procField('duration',           'uint',     (this.version == 1) ? 64 : 32);\\n  this._procFieldArray('reserved2', 2,  'uint',     32);\\n  this._procField('layer',              'uint',     16);\\n  this._procField('alternate_group',    'uint',     16);\\n  this._procField('volume',             'template', 16);\\n  this._procField('reserved3',          'uint',     16);\\n  this._procFieldArray('matrix', 9,     'template', 32);\\n  this._procField('width',              'template', 32);\\n  this._procField('height',             'template', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.3 Track Extends Box\\nISOBox.prototype._boxProcessors['trex'] = function() {\\n  this._procFullBox();\\n  this._procField('track_ID',                         'uint', 32);\\n  this._procField('default_sample_description_index', 'uint', 32);\\n  this._procField('default_sample_duration',          'uint', 32);\\n  this._procField('default_sample_size',              'uint', 32);\\n  this._procField('default_sample_flags',             'uint', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box\\n// Note: the 'trun' box has a direct relation to the 'tfhd' box for defaults.\\n// These defaults are not set explicitly here, but are left to resolve for the user.\\nISOBox.prototype._boxProcessors['trun'] = function() {\\n  this._procFullBox();\\n  this._procField('sample_count', 'uint', 32);\\n  if (this.flags & 0x1) this._procField('data_offset', 'int', 32);\\n  if (this.flags & 0x4) this._procField('first_sample_flags', 'uint', 32);\\n  this._procEntries('samples', this.sample_count, function(sample) {\\n    if (this.flags & 0x100) this._procEntryField(sample, 'sample_duration', 'uint', 32);\\n    if (this.flags & 0x200) this._procEntryField(sample, 'sample_size', 'uint', 32);\\n    if (this.flags & 0x400) this._procEntryField(sample, 'sample_flags', 'uint', 32);\\n    if (this.flags & 0x800) this._procEntryField(sample, 'sample_composition_time_offset', (this.version === 1) ? 'int' : 'uint',  32);\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box\\nISOBox.prototype._boxProcessors['url '] = ISOBox.prototype._boxProcessors['urn '] = function() {\\n  this._procFullBox();\\n  if (this.type === 'urn ') {\\n    this._procField('name', 'string', -1);\\n  }\\n  this._procField('location', 'string', -1);\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Source Label Box\\nISOBox.prototype._boxProcessors['vlab'] = function() {\\n  this._procField('source_label', 'utf8');\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.5.2 Video Media Header Box\\nISOBox.prototype._boxProcessors['vmhd'] = function() {\\n  this._procFullBox();\\n  this._procField('graphicsmode', 'uint', 16);\\n  this._procFieldArray('opcolor', 3, 'uint', 16);\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Configuration Box\\nISOBox.prototype._boxProcessors['vttC'] = function() {\\n  this._procField('config', 'utf8');\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Empty Sample Box\\nISOBox.prototype._boxProcessors['vtte'] = function() {\\n  // Nothing should happen here.\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/codem-isoboxer/dist/iso_boxer.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/core-util-is/lib/util.js\":\n/*!************************************************!*\\\n  !*** ../node_modules/core-util-is/lib/util.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// NOTE: These type checking functions intentionally don't use `instanceof`\\n// because it is fragile and can be easily faked with `Object.create()`.\\n\\nfunction isArray(arg) {\\n  if (Array.isArray) {\\n    return Array.isArray(arg);\\n  }\\n  return objectToString(arg) === '[object Array]';\\n}\\nexports.isArray = isArray;\\n\\nfunction isBoolean(arg) {\\n  return typeof arg === 'boolean';\\n}\\nexports.isBoolean = isBoolean;\\n\\nfunction isNull(arg) {\\n  return arg === null;\\n}\\nexports.isNull = isNull;\\n\\nfunction isNullOrUndefined(arg) {\\n  return arg == null;\\n}\\nexports.isNullOrUndefined = isNullOrUndefined;\\n\\nfunction isNumber(arg) {\\n  return typeof arg === 'number';\\n}\\nexports.isNumber = isNumber;\\n\\nfunction isString(arg) {\\n  return typeof arg === 'string';\\n}\\nexports.isString = isString;\\n\\nfunction isSymbol(arg) {\\n  return typeof arg === 'symbol';\\n}\\nexports.isSymbol = isSymbol;\\n\\nfunction isUndefined(arg) {\\n  return arg === void 0;\\n}\\nexports.isUndefined = isUndefined;\\n\\nfunction isRegExp(re) {\\n  return objectToString(re) === '[object RegExp]';\\n}\\nexports.isRegExp = isRegExp;\\n\\nfunction isObject(arg) {\\n  return typeof arg === 'object' && arg !== null;\\n}\\nexports.isObject = isObject;\\n\\nfunction isDate(d) {\\n  return objectToString(d) === '[object Date]';\\n}\\nexports.isDate = isDate;\\n\\nfunction isError(e) {\\n  return (objectToString(e) === '[object Error]' || e instanceof Error);\\n}\\nexports.isError = isError;\\n\\nfunction isFunction(arg) {\\n  return typeof arg === 'function';\\n}\\nexports.isFunction = isFunction;\\n\\nfunction isPrimitive(arg) {\\n  return arg === null ||\\n         typeof arg === 'boolean' ||\\n         typeof arg === 'number' ||\\n         typeof arg === 'string' ||\\n         typeof arg === 'symbol' ||  // ES6 symbol\\n         typeof arg === 'undefined';\\n}\\nexports.isPrimitive = isPrimitive;\\n\\nexports.isBuffer = Buffer.isBuffer;\\n\\nfunction objectToString(o) {\\n  return Object.prototype.toString.call(o);\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/node_modules/buffer/index.js */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/core-util-is/lib/util.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/externals/base64.js\":\n/*!************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/externals/base64.js ***!\n  \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* $Date: 2007-06-12 18:02:31 $ */// from: http://bannister.us/weblog/2007/06/09/simple-base64-encodedecode-javascript/\\n// Handles encode/decode of ASCII and Unicode strings.\\nvar UTF8={};UTF8.encode=function(s){var u=[];for(var i=0;i<s.length;++i){var c=s.charCodeAt(i);if(c<0x80){u.push(c);}else if(c<0x800){u.push(0xC0|c>>6);u.push(0x80|63&c);}else if(c<0x10000){u.push(0xE0|c>>12);u.push(0x80|63&c>>6);u.push(0x80|63&c);}else{u.push(0xF0|c>>18);u.push(0x80|63&c>>12);u.push(0x80|63&c>>6);u.push(0x80|63&c);}}return u;};UTF8.decode=function(u){var a=[];var i=0;while(i<u.length){var v=u[i++];if(v<0x80){// no need to mask byte\\n}else if(v<0xE0){v=(31&v)<<6;v|=63&u[i++];}else if(v<0xF0){v=(15&v)<<12;v|=(63&u[i++])<<6;v|=63&u[i++];}else{v=(7&v)<<18;v|=(63&u[i++])<<12;v|=(63&u[i++])<<6;v|=63&u[i++];}a.push(String.fromCharCode(v));}return a.join('');};var BASE64={};(function(T){var encodeArray=function encodeArray(u){var i=0;var a=[];var n=0|u.length/3;while(0<n--){var v=(u[i]<<16)+(u[i+1]<<8)+u[i+2];i+=3;a.push(T.charAt(63&v>>18));a.push(T.charAt(63&v>>12));a.push(T.charAt(63&v>>6));a.push(T.charAt(63&v));}if(2==u.length-i){var v=(u[i]<<16)+(u[i+1]<<8);a.push(T.charAt(63&v>>18));a.push(T.charAt(63&v>>12));a.push(T.charAt(63&v>>6));a.push('=');}else if(1==u.length-i){var v=u[i]<<16;a.push(T.charAt(63&v>>18));a.push(T.charAt(63&v>>12));a.push('==');}return a.join('');};var R=function(){var a=[];for(var i=0;i<T.length;++i){a[T.charCodeAt(i)]=i;}a['='.charCodeAt(0)]=0;return a;}();var decodeArray=function decodeArray(s){var i=0;var u=[];var n=0|s.length/4;while(0<n--){var v=(R[s.charCodeAt(i)]<<18)+(R[s.charCodeAt(i+1)]<<12)+(R[s.charCodeAt(i+2)]<<6)+R[s.charCodeAt(i+3)];u.push(255&v>>16);u.push(255&v>>8);u.push(255&v);i+=4;}if(u){if('='==s.charAt(i-2)){u.pop();u.pop();}else if('='==s.charAt(i-1)){u.pop();}}return u;};var ASCII={};ASCII.encode=function(s){var u=[];for(var i=0;i<s.length;++i){u.push(s.charCodeAt(i));}return u;};ASCII.decode=function(u){for(var i=0;i<s.length;++i){a[i]=String.fromCharCode(a[i]);}return a.join('');};BASE64.decodeArray=function(s){var u=decodeArray(s);return new Uint8Array(u);};BASE64.encodeASCII=function(s){var u=ASCII.encode(s);return encodeArray(u);};BASE64.decodeASCII=function(s){var a=decodeArray(s);return ASCII.decode(a);};BASE64.encode=function(s){var u=UTF8.encode(s);return encodeArray(u);};BASE64.decode=function(s){var u=decodeArray(s);return UTF8.decode(u);};})(\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\");/*The following polyfills are not used in dash.js but have caused multiplayer integration issues.\\n Therefore commenting them out.\\nif (undefined === btoa) {\\n    var btoa = BASE64.encode;\\n}\\nif (undefined === atob) {\\n    var atob = BASE64.decode;\\n}\\n*/if(true){exports.decode=BASE64.decode;exports.decodeArray=BASE64.decodeArray;exports.encode=BASE64.encode;exports.encodeASCII=BASE64.encodeASCII;}\\n//# sourceMappingURL=base64.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/externals/base64.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/externals/cea608-parser.js\":\n/*!*******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/externals/cea608-parser.js ***!\n  \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2015-2016, DASH Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  1. Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  2. Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */(function(exports){\\\"use strict\\\";/**\\n     *  Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\\n     */var specialCea608CharsCodes={0x2a:0xe1,// lowercase a, acute accent\\n0x5c:0xe9,// lowercase e, acute accent\\n0x5e:0xed,// lowercase i, acute accent\\n0x5f:0xf3,// lowercase o, acute accent\\n0x60:0xfa,// lowercase u, acute accent\\n0x7b:0xe7,// lowercase c with cedilla\\n0x7c:0xf7,// division symbol\\n0x7d:0xd1,// uppercase N tilde\\n0x7e:0xf1,// lowercase n tilde\\n0x7f:0x2588,// Full block\\n// THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\\n// THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\\n// THIS MEANS THAT \\\\x50 MUST BE ADDED TO THE VALUES\\n0x80:0xae,// Registered symbol (R)\\n0x81:0xb0,// degree sign\\n0x82:0xbd,// 1/2 symbol\\n0x83:0xbf,// Inverted (open) question mark\\n0x84:0x2122,// Trademark symbol (TM)\\n0x85:0xa2,// Cents symbol\\n0x86:0xa3,// Pounds sterling\\n0x87:0x266a,// Music 8'th note\\n0x88:0xe0,// lowercase a, grave accent\\n0x89:0x20,// transparent space (regular)\\n0x8a:0xe8,// lowercase e, grave accent\\n0x8b:0xe2,// lowercase a, circumflex accent\\n0x8c:0xea,// lowercase e, circumflex accent\\n0x8d:0xee,// lowercase i, circumflex accent\\n0x8e:0xf4,// lowercase o, circumflex accent\\n0x8f:0xfb,// lowercase u, circumflex accent\\n// THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\\n// THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\\n0x90:0xc1,// capital letter A with acute\\n0x91:0xc9,// capital letter E with acute\\n0x92:0xd3,// capital letter O with acute\\n0x93:0xda,// capital letter U with acute\\n0x94:0xdc,// capital letter U with diaresis\\n0x95:0xfc,// lowercase letter U with diaeresis\\n0x96:0x2018,// opening single quote\\n0x97:0xa1,// inverted exclamation mark\\n0x98:0x2a,// asterisk\\n0x99:0x2019,// closing single quote\\n0x9a:0x2501,// box drawings heavy horizontal\\n0x9b:0xa9,// copyright sign\\n0x9c:0x2120,// Service mark\\n0x9d:0x2022,// (round) bullet\\n0x9e:0x201c,// Left double quotation mark\\n0x9f:0x201d,// Right double quotation mark\\n0xa0:0xc0,// uppercase A, grave accent\\n0xa1:0xc2,// uppercase A, circumflex\\n0xa2:0xc7,// uppercase C with cedilla\\n0xa3:0xc8,// uppercase E, grave accent\\n0xa4:0xca,// uppercase E, circumflex\\n0xa5:0xcb,// capital letter E with diaresis\\n0xa6:0xeb,// lowercase letter e with diaresis\\n0xa7:0xce,// uppercase I, circumflex\\n0xa8:0xcf,// uppercase I, with diaresis\\n0xa9:0xef,// lowercase i, with diaresis\\n0xaa:0xd4,// uppercase O, circumflex\\n0xab:0xd9,// uppercase U, grave accent\\n0xac:0xf9,// lowercase u, grave accent\\n0xad:0xdb,// uppercase U, circumflex\\n0xae:0xab,// left-pointing double angle quotation mark\\n0xaf:0xbb,// right-pointing double angle quotation mark\\n// THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\\n// THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\\n0xb0:0xc3,// Uppercase A, tilde\\n0xb1:0xe3,// Lowercase a, tilde\\n0xb2:0xcd,// Uppercase I, acute accent\\n0xb3:0xcc,// Uppercase I, grave accent\\n0xb4:0xec,// Lowercase i, grave accent\\n0xb5:0xd2,// Uppercase O, grave accent\\n0xb6:0xf2,// Lowercase o, grave accent\\n0xb7:0xd5,// Uppercase O, tilde\\n0xb8:0xf5,// Lowercase o, tilde\\n0xb9:0x7b,// Open curly brace\\n0xba:0x7d,// Closing curly brace\\n0xbb:0x5c,// Backslash\\n0xbc:0x5e,// Caret\\n0xbd:0x5f,// Underscore\\n0xbe:0x7c,// Pipe (vertical line)\\n0xbf:0x223c,// Tilde operator\\n0xc0:0xc4,// Uppercase A, umlaut\\n0xc1:0xe4,// Lowercase A, umlaut\\n0xc2:0xd6,// Uppercase O, umlaut\\n0xc3:0xf6,// Lowercase o, umlaut\\n0xc4:0xdf,// Esszett (sharp S)\\n0xc5:0xa5,// Yen symbol\\n0xc6:0xa4,// Generic currency sign\\n0xc7:0x2503,// Box drawings heavy vertical\\n0xc8:0xc5,// Uppercase A, ring\\n0xc9:0xe5,// Lowercase A, ring\\n0xca:0xd8,// Uppercase O, stroke\\n0xcb:0xf8,// Lowercase o, strok\\n0xcc:0x250f,// Box drawings heavy down and right\\n0xcd:0x2513,// Box drawings heavy down and left\\n0xce:0x2517,// Box drawings heavy up and right\\n0xcf:0x251b// Box drawings heavy up and left\\n};/**\\n     * Get Unicode Character from CEA-608 byte code\\n     */var getCharForByte=function getCharForByte(byte){var charCode=byte;if(specialCea608CharsCodes.hasOwnProperty(byte)){charCode=specialCea608CharsCodes[byte];}return String.fromCharCode(charCode);};var NR_ROWS=15,NR_COLS=32;// Tables to look up row from PAC data\\nvar rowsLowCh1={0x11:1,0x12:3,0x15:5,0x16:7,0x17:9,0x10:11,0x13:12,0x14:14};var rowsHighCh1={0x11:2,0x12:4,0x15:6,0x16:8,0x17:10,0x13:13,0x14:15};var rowsLowCh2={0x19:1,0x1A:3,0x1D:5,0x1E:7,0x1F:9,0x18:11,0x1B:12,0x1C:14};var rowsHighCh2={0x19:2,0x1A:4,0x1D:6,0x1E:8,0x1F:10,0x1B:13,0x1C:15};var backgroundColors=['white','green','blue','cyan','red','yellow','magenta','black','transparent'];/**\\n     * Simple logger class to be able to write with time-stamps and filter on level.\\n     */var logger={verboseFilter:{'DATA':3,'DEBUG':3,'INFO':2,'WARNING':2,'TEXT':1,'ERROR':0},time:null,verboseLevel:0,// Only write errors\\nsetTime:function setTime(newTime){this.time=newTime;},log:function log(severity,msg){var minLevel=this.verboseFilter[severity];if(this.verboseLevel>=minLevel){console.log(this.time+\\\" [\\\"+severity+\\\"] \\\"+msg);}}};var numArrayToHexArray=function numArrayToHexArray(numArray){var hexArray=[];for(var j=0;j<numArray.length;j++){hexArray.push(numArray[j].toString(16));}return hexArray;};/**\\n     * State of CEA-608 pen or character\\n     * @constructor\\n     */var PenState=function PenState(foreground,underline,italics,background,flash){this.foreground=foreground||\\\"white\\\";this.underline=underline||false;this.italics=italics||false;this.background=background||\\\"black\\\";this.flash=flash||false;};PenState.prototype={reset:function reset(){this.foreground=\\\"white\\\";this.underline=false;this.italics=false;this.background=\\\"black\\\";this.flash=false;},setStyles:function setStyles(styles){var attribs=[\\\"foreground\\\",\\\"underline\\\",\\\"italics\\\",\\\"background\\\",\\\"flash\\\"];for(var i=0;i<attribs.length;i++){var style=attribs[i];if(styles.hasOwnProperty(style)){this[style]=styles[style];}}},isDefault:function isDefault(){return this.foreground===\\\"white\\\"&&!this.underline&&!this.italics&&this.background===\\\"black\\\"&&!this.flash;},equals:function equals(other){return this.foreground===other.foreground&&this.underline===other.underline&&this.italics===other.italics&&this.background===other.background&&this.flash===other.flash;},copy:function copy(newPenState){this.foreground=newPenState.foreground;this.underline=newPenState.underline;this.italics=newPenState.italics;this.background=newPenState.background;this.flash=newPenState.flash;},toString:function toString(){return\\\"color=\\\"+this.foreground+\\\", underline=\\\"+this.underline+\\\", italics=\\\"+this.italics+\\\", background=\\\"+this.background+\\\", flash=\\\"+this.flash;}};/**\\n     * Unicode character with styling and background.\\n     * @constructor\\n     */var StyledUnicodeChar=function StyledUnicodeChar(uchar,foreground,underline,italics,background,flash){this.uchar=uchar||' ';// unicode character\\nthis.penState=new PenState(foreground,underline,italics,background,flash);};StyledUnicodeChar.prototype={reset:function reset(){this.uchar=' ';this.penState.reset();},setChar:function setChar(uchar,newPenState){this.uchar=uchar;this.penState.copy(newPenState);},setPenState:function setPenState(newPenState){this.penState.copy(newPenState);},equals:function equals(other){return this.uchar===other.uchar&&this.penState.equals(other.penState);},copy:function copy(newChar){this.uchar=newChar.uchar;this.penState.copy(newChar.penState);},isEmpty:function isEmpty(){return this.uchar===' '&&this.penState.isDefault();}};/**\\n     * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\\n     * @constructor\\n     */var Row=function Row(){this.chars=[];for(var i=0;i<NR_COLS;i++){this.chars.push(new StyledUnicodeChar());}this.pos=0;this.currPenState=new PenState();};Row.prototype={equals:function equals(other){var equal=true;for(var i=0;i<NR_COLS;i++){if(!this.chars[i].equals(other.chars[i])){equal=false;break;}}return equal;},copy:function copy(other){for(var i=0;i<NR_COLS;i++){this.chars[i].copy(other.chars[i]);}},isEmpty:function isEmpty(){var empty=true;for(var i=0;i<NR_COLS;i++){if(!this.chars[i].isEmpty()){empty=false;break;}}return empty;},/**\\n         *  Set the cursor to a valid column.\\n         */setCursor:function setCursor(absPos){if(this.pos!==absPos){this.pos=absPos;}if(this.pos<0){logger.log(\\\"ERROR\\\",\\\"Negative cursor position \\\"+this.pos);this.pos=0;}else if(this.pos>NR_COLS){logger.log(\\\"ERROR\\\",\\\"Too large cursor position \\\"+this.pos);this.pos=NR_COLS;}},/** \\n         * Move the cursor relative to current position.\\n         */moveCursor:function moveCursor(relPos){var newPos=this.pos+relPos;if(relPos>1){for(var i=this.pos+1;i<newPos+1;i++){this.chars[i].setPenState(this.currPenState);}}this.setCursor(newPos);},/**\\n         * Backspace, move one step back and clear character.\\n         */backSpace:function backSpace(){this.moveCursor(-1);this.chars[this.pos].setChar(' ',this.currPenState);},insertChar:function insertChar(byte){if(byte>=0x90){//Extended char\\nthis.backSpace();}var char=getCharForByte(byte);if(this.pos>=NR_COLS){logger.log(\\\"ERROR\\\",\\\"Cannot insert \\\"+byte.toString(16)+\\\" (\\\"+char+\\\") at position \\\"+this.pos+\\\". Skipping it!\\\");return;}this.chars[this.pos].setChar(char,this.currPenState);this.moveCursor(1);},clearFromPos:function clearFromPos(startPos){var i;for(i=startPos;i<NR_COLS;i++){this.chars[i].reset();}},clear:function clear(){this.clearFromPos(0);this.pos=0;this.currPenState.reset();},clearToEndOfRow:function clearToEndOfRow(){this.clearFromPos(this.pos);},getTextString:function getTextString(){var chars=[];var empty=true;for(var i=0;i<NR_COLS;i++){var char=this.chars[i].uchar;if(char!==\\\" \\\"){empty=false;}chars.push(char);}if(empty){return\\\"\\\";}else{return chars.join(\\\"\\\");}},setPenStyles:function setPenStyles(styles){this.currPenState.setStyles(styles);var currChar=this.chars[this.pos];currChar.setPenState(this.currPenState);}};/**\\n     * Keep a CEA-608 screen of 32x15 styled characters\\n     * @constructor\\n    */var CaptionScreen=function CaptionScreen(){this.rows=[];for(var i=0;i<NR_ROWS;i++){this.rows.push(new Row());// Note that we use zero-based numbering (0-14)\\n}this.currRow=NR_ROWS-1;this.nrRollUpRows=null;this.reset();};CaptionScreen.prototype={reset:function reset(){for(var i=0;i<NR_ROWS;i++){this.rows[i].clear();}this.currRow=NR_ROWS-1;},equals:function equals(other){var equal=true;for(var i=0;i<NR_ROWS;i++){if(!this.rows[i].equals(other.rows[i])){equal=false;break;}}return equal;},copy:function copy(other){for(var i=0;i<NR_ROWS;i++){this.rows[i].copy(other.rows[i]);}},isEmpty:function isEmpty(){var empty=true;for(var i=0;i<NR_ROWS;i++){if(!this.rows[i].isEmpty()){empty=false;break;}}return empty;},backSpace:function backSpace(){var row=this.rows[this.currRow];row.backSpace();},clearToEndOfRow:function clearToEndOfRow(){var row=this.rows[this.currRow];row.clearToEndOfRow();},/**\\n         * Insert a character (without styling) in the current row.\\n         */insertChar:function insertChar(char){var row=this.rows[this.currRow];row.insertChar(char);},setPen:function setPen(styles){var row=this.rows[this.currRow];row.setPenStyles(styles);},moveCursor:function moveCursor(relPos){var row=this.rows[this.currRow];row.moveCursor(relPos);},setCursor:function setCursor(absPos){logger.log(\\\"INFO\\\",\\\"setCursor: \\\"+absPos);var row=this.rows[this.currRow];row.setCursor(absPos);},setPAC:function setPAC(pacData){logger.log(\\\"INFO\\\",\\\"pacData = \\\"+JSON.stringify(pacData));var newRow=pacData.row-1;if(this.nrRollUpRows&&newRow<this.nrRollUpRows-1){newRow=this.nrRollUpRows-1;}this.currRow=newRow;var row=this.rows[this.currRow];if(pacData.indent!==null){var indent=pacData.indent;var prevPos=Math.max(indent-1,0);row.setCursor(pacData.indent);pacData.color=row.chars[prevPos].penState.foreground;}var styles={foreground:pacData.color,underline:pacData.underline,italics:pacData.italics,background:'black',flash:false};this.setPen(styles);},/**\\n         * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\\n         */setBkgData:function setBkgData(bkgData){logger.log(\\\"INFO\\\",\\\"bkgData = \\\"+JSON.stringify(bkgData));this.backSpace();this.setPen(bkgData);this.insertChar(0x20);//Space\\n},setRollUpRows:function setRollUpRows(nrRows){this.nrRollUpRows=nrRows;},rollUp:function rollUp(){if(this.nrRollUpRows===null){logger.log(\\\"DEBUG\\\",\\\"roll_up but nrRollUpRows not set yet\\\");return;//Not properly setup\\n}logger.log(\\\"TEXT\\\",this.getDisplayText());var topRowIndex=this.currRow+1-this.nrRollUpRows;var topRow=this.rows.splice(topRowIndex,1)[0];topRow.clear();this.rows.splice(this.currRow,0,topRow);logger.log(\\\"INFO\\\",\\\"Rolling up\\\");//logger.log(\\\"TEXT\\\", this.get_display_text())\\n},/**\\n        * Get all non-empty rows with as unicode text. \\n        */getDisplayText:function getDisplayText(asOneRow){asOneRow=asOneRow||false;var displayText=[];var text=\\\"\\\";var rowNr=-1;for(var i=0;i<NR_ROWS;i++){var rowText=this.rows[i].getTextString();if(rowText){rowNr=i+1;if(asOneRow){displayText.push(\\\"Row \\\"+rowNr+': \\\"'+rowText+'\\\"');}else{displayText.push(rowText.trim());}}}if(displayText.length>0){if(asOneRow){text=\\\"[\\\"+displayText.join(\\\" | \\\")+\\\"]\\\";}else{text=displayText.join(\\\"\\\\n\\\");}}return text;},getTextAndFormat:function getTextAndFormat(){return this.rows;}};/**\\n     * Handle a CEA-608 channel and send decoded data to outputFilter\\n     * @constructor\\n     * @param {Number} channelNumber (1 or 2)\\n     * @param {CueHandler} outputFilter Output from channel1 newCue(startTime, endTime, captionScreen)\\n    */var Cea608Channel=function Cea608Channel(channelNumber,outputFilter){this.chNr=channelNumber;this.outputFilter=outputFilter;this.mode=null;this.verbose=0;this.displayedMemory=new CaptionScreen();this.nonDisplayedMemory=new CaptionScreen();this.lastOutputScreen=new CaptionScreen();this.currRollUpRow=this.displayedMemory.rows[NR_ROWS-1];this.writeScreen=this.displayedMemory;this.mode=null;this.cueStartTime=null;// Keeps track of where a cue started.\\n};Cea608Channel.prototype={modes:[\\\"MODE_ROLL-UP\\\",\\\"MODE_POP-ON\\\",\\\"MODE_PAINT-ON\\\",\\\"MODE_TEXT\\\"],reset:function reset(){this.mode=null;this.displayedMemory.reset();this.nonDisplayedMemory.reset();this.lastOutputScreen.reset();this.currRollUpRow=this.displayedMemory.rows[NR_ROWS-1];this.writeScreen=this.displayedMemory;this.mode=null;this.cueStartTime=null;this.lastCueEndTime=null;},getHandler:function getHandler(){return this.outputFilter;},setHandler:function setHandler(newHandler){this.outputFilter=newHandler;},setPAC:function setPAC(pacData){this.writeScreen.setPAC(pacData);},setBkgData:function setBkgData(bkgData){this.writeScreen.setBkgData(bkgData);},setMode:function setMode(newMode){if(newMode===this.mode){return;}this.mode=newMode;logger.log(\\\"INFO\\\",\\\"MODE=\\\"+newMode);if(this.mode==\\\"MODE_POP-ON\\\"){this.writeScreen=this.nonDisplayedMemory;}else{this.writeScreen=this.displayedMemory;this.writeScreen.reset();}if(this.mode!==\\\"MODE_ROLL-UP\\\"){this.displayedMemory.nrRollUpRows=null;this.nonDisplayedMemory.nrRollUpRows=null;}this.mode=newMode;},insertChars:function insertChars(chars){for(var i=0;i<chars.length;i++){this.writeScreen.insertChar(chars[i]);}var screen=this.writeScreen===this.displayedMemory?\\\"DISP\\\":\\\"NON_DISP\\\";logger.log(\\\"INFO\\\",screen+\\\": \\\"+this.writeScreen.getDisplayText(true));if(this.mode===\\\"MODE_PAINT-ON\\\"||this.mode===\\\"MODE_ROLL-UP\\\"){logger.log(\\\"TEXT\\\",\\\"DISPLAYED: \\\"+this.displayedMemory.getDisplayText(true));this.outputDataUpdate();}},cc_RCL:function cc_RCL(){// Resume Caption Loading (switch mode to Pop On)\\nlogger.log(\\\"INFO\\\",\\\"RCL - Resume Caption Loading\\\");this.setMode(\\\"MODE_POP-ON\\\");},cc_BS:function cc_BS(){// BackSpace\\nlogger.log(\\\"INFO\\\",\\\"BS - BackSpace\\\");if(this.mode===\\\"MODE_TEXT\\\"){return;}this.writeScreen.backSpace();if(this.writeScreen===this.displayedMemory){this.outputDataUpdate();}},cc_AOF:function cc_AOF(){// Reserved (formerly Alarm Off)\\nreturn;},cc_AON:function cc_AON(){// Reserved (formerly Alarm On)\\nreturn;},cc_DER:function cc_DER(){// Delete to End of Row\\nlogger.log(\\\"INFO\\\",\\\"DER- Delete to End of Row\\\");this.writeScreen.clearToEndOfRow();this.outputDataUpdate();},cc_RU:function cc_RU(nrRows){//Roll-Up Captions-2,3,or 4 Rows\\nlogger.log(\\\"INFO\\\",\\\"RU(\\\"+nrRows+\\\") - Roll Up\\\");this.writeScreen=this.displayedMemory;this.setMode(\\\"MODE_ROLL-UP\\\");this.writeScreen.setRollUpRows(nrRows);},cc_FON:function cc_FON(){//Flash On\\nlogger.log(\\\"INFO\\\",\\\"FON - Flash On\\\");this.writeScreen.setPen({flash:true});},cc_RDC:function cc_RDC(){// Resume Direct Captioning (switch mode to PaintOn)\\nlogger.log(\\\"INFO\\\",\\\"RDC - Resume Direct Captioning\\\");this.setMode(\\\"MODE_PAINT-ON\\\");},cc_TR:function cc_TR(){// Text Restart in text mode (not supported, however)\\nlogger.log(\\\"INFO\\\",\\\"TR\\\");this.setMode(\\\"MODE_TEXT\\\");},cc_RTD:function cc_RTD(){// Resume Text Display in Text mode (not supported, however)\\nlogger.log(\\\"INFO\\\",\\\"RTD\\\");this.setMode(\\\"MODE_TEXT\\\");},cc_EDM:function cc_EDM(){// Erase Displayed Memory\\nlogger.log(\\\"INFO\\\",\\\"EDM - Erase Displayed Memory\\\");this.displayedMemory.reset();this.outputDataUpdate();},cc_CR:function cc_CR(){// Carriage Return\\nlogger.log(\\\"CR - Carriage Return\\\");this.writeScreen.rollUp();this.outputDataUpdate();},cc_ENM:function cc_ENM(){//Erase Non-Displayed Memory\\nlogger.log(\\\"INFO\\\",\\\"ENM - Erase Non-displayed Memory\\\");this.nonDisplayedMemory.reset();},cc_EOC:function cc_EOC(){//End of Caption (Flip Memories)\\nlogger.log(\\\"INFO\\\",\\\"EOC - End Of Caption\\\");if(this.mode===\\\"MODE_POP-ON\\\"){var tmp=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory;this.nonDisplayedMemory=tmp;this.writeScreen=this.nonDisplayedMemory;logger.log(\\\"TEXT\\\",\\\"DISP: \\\"+this.displayedMemory.getDisplayText());}this.outputDataUpdate();},cc_TO:function cc_TO(nrCols){// Tab Offset 1,2, or 3 columns\\nlogger.log(\\\"INFO\\\",\\\"TO(\\\"+nrCols+\\\") - Tab Offset\\\");this.writeScreen.moveCursor(nrCols);},cc_MIDROW:function cc_MIDROW(secondByte){// Parse MIDROW command\\nvar styles={flash:false};styles.underline=secondByte%2===1;styles.italics=secondByte>=0x2e;if(!styles.italics){var colorIndex=Math.floor(secondByte/2)-0x10;var colors=[\\\"white\\\",\\\"green\\\",\\\"blue\\\",\\\"cyan\\\",\\\"red\\\",\\\"yellow\\\",\\\"magenta\\\"];styles.foreground=colors[colorIndex];}else{styles.foreground=\\\"white\\\";}logger.log(\\\"INFO\\\",\\\"MIDROW: \\\"+JSON.stringify(styles));this.writeScreen.setPen(styles);},outputDataUpdate:function outputDataUpdate(){var t=logger.time;if(t===null){return;}if(this.outputFilter){if(this.outputFilter.updateData){this.outputFilter.updateData(t,this.displayedMemory);}if(this.cueStartTime===null&&!this.displayedMemory.isEmpty()){// Start of a new cue\\nthis.cueStartTime=t;}else{if(!this.displayedMemory.equals(this.lastOutputScreen)){if(this.outputFilter.newCue){this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen);}this.cueStartTime=this.displayedMemory.isEmpty()?null:t;}}this.lastOutputScreen.copy(this.displayedMemory);}},cueSplitAtTime:function cueSplitAtTime(t){if(this.outputFilter){if(!this.displayedMemory.isEmpty()){if(this.outputFilter.newCue){this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory);}this.cueStartTime=t;}}}};/**\\n     * Parse CEA-608 data and send decoded data to out1 and out2.\\n     * @constructor\\n     * @param {Number} field  CEA-608 field (1 or 2)\\n     * @param {CueHandler} out1 Output from channel1 newCue(startTime, endTime, captionScreen)\\n     * @param {CueHandler} out2 Output from channel2 newCue(startTime, endTime, captionScreen)\\n     */var Cea608Parser=function Cea608Parser(field,out1,out2){this.field=field||1;this.outputs=[out1,out2];this.channels=[new Cea608Channel(1,out1),new Cea608Channel(2,out2)];this.currChNr=-1;// Will be 1 or 2\\nthis.lastCmdA=null;// First byte of last command\\nthis.lastCmdB=null;// Second byte of last command\\nthis.bufferedData=[];this.startTime=null;this.lastTime=null;this.dataCounters={'padding':0,'char':0,'cmd':0,'other':0};};Cea608Parser.prototype={getHandler:function getHandler(index){return this.channels[index].getHandler();},setHandler:function setHandler(index,newHandler){this.channels[index].setHandler(newHandler);},/**\\n         * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\\n         */addData:function addData(t,byteList){var cmdFound,a,b,charsFound=false;this.lastTime=t;logger.setTime(t);for(var i=0;i<byteList.length;i+=2){a=byteList[i]&0x7f;b=byteList[i+1]&0x7f;if(a>=0x10&&a<=0x1f&&a===this.lastCmdA&&b===this.lastCmdB){this.lastCmdA=null;this.lastCmdB=null;logger.log(\\\"DEBUG\\\",\\\"Repeated command (\\\"+numArrayToHexArray([a,b])+\\\") is dropped\\\");continue;// Repeated commands are dropped (once)\\n}if(a===0&&b===0){this.dataCounters.padding+=2;continue;}else{logger.log(\\\"DATA\\\",\\\"[\\\"+numArrayToHexArray([byteList[i],byteList[i+1]])+\\\"] -> (\\\"+numArrayToHexArray([a,b])+\\\")\\\");}cmdFound=this.parseCmd(a,b);if(!cmdFound){cmdFound=this.parseMidrow(a,b);}if(!cmdFound){cmdFound=this.parsePAC(a,b);}if(!cmdFound){cmdFound=this.parseBackgroundAttributes(a,b);}if(!cmdFound){charsFound=this.parseChars(a,b);if(charsFound){if(this.currChNr&&this.currChNr>=0){var channel=this.channels[this.currChNr-1];channel.insertChars(charsFound);}else{logger.log(\\\"WARNING\\\",\\\"No channel found yet. TEXT-MODE?\\\");}}}if(cmdFound){this.dataCounters.cmd+=2;}else if(charsFound){this.dataCounters.char+=2;}else{this.dataCounters.other+=2;logger.log(\\\"WARNING\\\",\\\"Couldn't parse cleaned data \\\"+numArrayToHexArray([a,b])+\\\" orig: \\\"+numArrayToHexArray([byteList[i],byteList[i+1]]));}}},/**\\n         * Parse Command.\\n         * @returns {Boolean} Tells if a command was found\\n         */parseCmd:function parseCmd(a,b){var chNr=null;var cond1=(a===0x14||a===0x15||a===0x1C||a===0x1D)&&0x20<=b&&b<=0x2F;var cond2=(a===0x17||a===0x1F)&&0x21<=b&&b<=0x23;if(!(cond1||cond2)){return false;}if(a===0x14||a===0x15||a===0x17){chNr=1;}else{chNr=2;// (a === 0x1C || a === 0x1D || a=== 0x1f)\\n}var channel=this.channels[chNr-1];if(a===0x14||a===0x15||a===0x1C||a===0x1D){if(b===0x20){channel.cc_RCL();}else if(b===0x21){channel.cc_BS();}else if(b===0x22){channel.cc_AOF();}else if(b===0x23){channel.cc_AON();}else if(b===0x24){channel.cc_DER();}else if(b===0x25){channel.cc_RU(2);}else if(b===0x26){channel.cc_RU(3);}else if(b===0x27){channel.cc_RU(4);}else if(b===0x28){channel.cc_FON();}else if(b===0x29){channel.cc_RDC();}else if(b===0x2A){channel.cc_TR();}else if(b===0x2B){channel.cc_RTD();}else if(b===0x2C){channel.cc_EDM();}else if(b===0x2D){channel.cc_CR();}else if(b===0x2E){channel.cc_ENM();}else if(b===0x2F){channel.cc_EOC();}}else{//a == 0x17 || a == 0x1F\\nchannel.cc_TO(b-0x20);}this.lastCmdA=a;this.lastCmdB=b;this.currChNr=chNr;return true;},/**\\n         * Parse midrow styling command\\n         * @returns {Boolean}\\n         */parseMidrow:function parseMidrow(a,b){var chNr=null;if((a===0x11||a===0x19)&&0x20<=b&&b<=0x2f){if(a===0x11){chNr=1;}else{chNr=2;}if(chNr!==this.currChNr){logger.log(\\\"ERROR\\\",\\\"Mismatch channel in midrow parsing\\\");return false;}var channel=this.channels[chNr-1];// cea608 spec says midrow codes should inject a space\\nchannel.insertChars([0x20]);channel.cc_MIDROW(b);logger.log(\\\"DEBUG\\\",\\\"MIDROW (\\\"+numArrayToHexArray([a,b])+\\\")\\\");this.lastCmdA=a;this.lastCmdB=b;return true;}return false;},/**\\n         * Parse Preable Access Codes (Table 53).\\n         * @returns {Boolean} Tells if PAC found\\n         */parsePAC:function parsePAC(a,b){var chNr=null;var row=null;var case1=(0x11<=a&&a<=0x17||0x19<=a&&a<=0x1F)&&0x40<=b&&b<=0x7F;var case2=(a===0x10||a===0x18)&&0x40<=b&&b<=0x5F;if(!(case1||case2)){return false;}chNr=a<=0x17?1:2;if(0x40<=b&&b<=0x5F){row=chNr===1?rowsLowCh1[a]:rowsLowCh2[a];}else{// 0x60 <= b <= 0x7F\\nrow=chNr===1?rowsHighCh1[a]:rowsHighCh2[a];}var pacData=this.interpretPAC(row,b);var channel=this.channels[chNr-1];channel.setPAC(pacData);this.lastCmdA=a;this.lastCmdB=b;this.currChNr=chNr;return true;},/**\\n         * Interpret the second byte of the pac, and return the information.\\n         * @returns {Object} pacData with style parameters.\\n         */interpretPAC:function interpretPAC(row,byte){var pacIndex=byte;var pacData={color:null,italics:false,indent:null,underline:false,row:row};if(byte>0x5F){pacIndex=byte-0x60;}else{pacIndex=byte-0x40;}pacData.underline=(pacIndex&1)===1;if(pacIndex<=0xd){pacData.color=['white','green','blue','cyan','red','yellow','magenta','white'][Math.floor(pacIndex/2)];}else if(pacIndex<=0xf){pacData.italics=true;pacData.color='white';}else{pacData.indent=Math.floor((pacIndex-0x10)/2)*4;}return pacData;// Note that row has zero offset. The spec uses 1.\\n},/**\\n         * Parse characters.\\n         * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\\n         */parseChars:function parseChars(a,b){var channelNr=null,charCodes=null,charCode1=null,charCode2=null;if(a>=0x19){channelNr=2;charCode1=a-8;}else{channelNr=1;charCode1=a;}if(0x11<=charCode1&&charCode1<=0x13){// Special character\\nvar oneCode=b;if(charCode1===0x11){oneCode=b+0x50;}else if(charCode1===0x12){oneCode=b+0x70;}else{oneCode=b+0x90;}logger.log(\\\"INFO\\\",\\\"Special char '\\\"+getCharForByte(oneCode)+\\\"' in channel \\\"+channelNr);charCodes=[oneCode];this.lastCmdA=a;this.lastCmdB=b;}else if(0x20<=a&&a<=0x7f){charCodes=b===0?[a]:[a,b];this.lastCmdA=null;this.lastCmdB=null;}if(charCodes){var hexCodes=numArrayToHexArray(charCodes);logger.log(\\\"DEBUG\\\",\\\"Char codes =  \\\"+hexCodes.join(\\\",\\\"));}return charCodes;},/**\\n        * Parse extended background attributes as well as new foreground color black.\\n        * @returns{Boolean} Tells if background attributes are found\\n        */parseBackgroundAttributes:function parseBackgroundAttributes(a,b){var bkgData,index,chNr,channel;var case1=(a===0x10||a===0x18)&&0x20<=b&&b<=0x2f;var case2=(a===0x17||a===0x1f)&&0x2d<=b&&b<=0x2f;if(!(case1||case2)){return false;}bkgData={};if(a===0x10||a===0x18){index=Math.floor((b-0x20)/2);bkgData.background=backgroundColors[index];if(b%2===1){bkgData.background=bkgData.background+\\\"_semi\\\";}}else if(b===0x2d){bkgData.background=\\\"transparent\\\";}else{bkgData.foreground=\\\"black\\\";if(b===0x2f){bkgData.underline=true;}}chNr=a<0x18?1:2;channel=this.channels[chNr-1];channel.setBkgData(bkgData);this.lastCmdA=a;this.lastCmdB=b;return true;},/**\\n         * Reset state of parser and its channels.\\n         */reset:function reset(){for(var i=0;i<this.channels.length;i++){if(this.channels[i]){this.channels[i].reset();}}this.lastCmdA=null;this.lastCmdB=null;},/**\\n         * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\\n         */cueSplitAtTime:function cueSplitAtTime(t){for(var i=0;i<this.channels.length;i++){if(this.channels[i]){this.channels[i].cueSplitAtTime(t);}}}};/**\\n     * Find ranges corresponding to SEA CEA-608 NALUS in sizeprepended NALU array.\\n     * @param {raw} dataView of binary data\\n     * @param {startPos} start position in raw\\n     * @param {size} total size of data in raw to consider\\n     * @returns \\n     */var findCea608Nalus=function findCea608Nalus(raw,startPos,size){var nalSize=0,cursor=startPos,nalType=0,cea608NaluRanges=[],// Check SEI data according to ANSI-SCTE 128\\nisCEA608SEI=function isCEA608SEI(payloadType,payloadSize,raw,pos){if(payloadType!==4||payloadSize<8){return null;}var countryCode=raw.getUint8(pos);var providerCode=raw.getUint16(pos+1);var userIdentifier=raw.getUint32(pos+3);var userDataTypeCode=raw.getUint8(pos+7);return countryCode==0xB5&&providerCode==0x31&&userIdentifier==0x47413934&&userDataTypeCode==0x3;};while(cursor<startPos+size){nalSize=raw.getUint32(cursor);nalType=raw.getUint8(cursor+4)&0x1F;//console.log(time + \\\"  NAL \\\" + nalType);\\nif(nalType===6){// SEI NAL Unit. The NAL header is the first byte\\n//console.log(\\\"SEI NALU of size \\\" + nalSize + \\\" at time \\\" + time);\\nvar pos=cursor+5;var payloadType=-1;while(pos<cursor+4+nalSize-1){// The last byte should be rbsp_trailing_bits\\npayloadType=0;var b=0xFF;while(b===0xFF){b=raw.getUint8(pos);payloadType+=b;pos++;}var payloadSize=0;b=0xFF;while(b===0xFF){b=raw.getUint8(pos);payloadSize+=b;pos++;}if(isCEA608SEI(payloadType,payloadSize,raw,pos)){//console.log(\\\"CEA608 SEI \\\" + time + \\\" \\\" + payloadSize);\\ncea608NaluRanges.push([pos,payloadSize]);}pos+=payloadSize;}}cursor+=nalSize+4;}return cea608NaluRanges;};var extractCea608DataFromRange=function extractCea608DataFromRange(raw,cea608Range){var pos=cea608Range[0];var fieldData=[[],[]];pos+=8;// Skip the identifier up to userDataTypeCode\\nvar ccCount=raw.getUint8(pos)&0x1f;pos+=2;// Advance 1 and skip reserved byte\\nfor(var i=0;i<ccCount;i++){var byte=raw.getUint8(pos);var ccValid=byte&0x4;var ccType=byte&0x3;pos++;var ccData1=raw.getUint8(pos);// Keep parity bit\\npos++;var ccData2=raw.getUint8(pos);// Keep parity bit\\npos++;if(ccValid&&(ccData1&0x7f)+(ccData2&0x7f)!==0){//Check validity and non-empty data\\nif(ccType===0){fieldData[0].push(ccData1);fieldData[0].push(ccData2);}else if(ccType===1){fieldData[1].push(ccData1);fieldData[1].push(ccData2);}}}return fieldData;};exports.logger=logger;exports.PenState=PenState;exports.CaptionScreen=CaptionScreen;exports.Cea608Parser=Cea608Parser;exports.findCea608Nalus=findCea608Nalus;exports.extractCea608DataFromRange=extractCea608DataFromRange;})( false?undefined:exports);\\n//# sourceMappingURL=cea608-parser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/externals/cea608-parser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/externals/xml2json.js\":\n/*!**************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/externals/xml2json.js ***!\n  \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/*\\n Copyright 2011-2013 Abdulla Abdurakhmanov\\n Original sources are available at https://code.google.com/p/x2js/\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n *//*\\n  Further modified for dashjs to:\\n  - keep track of children nodes in order in attribute __children.\\n  - add type conversion matchers\\n  - re-add ignoreRoot\\n  - allow zero-length attributePrefix\\n  - don't add white-space text nodes\\n  - remove explicit RequireJS support\\n*/function X2JS(config){'use strict';var VERSION=\\\"1.2.0\\\";config=config||{};initConfigDefaults();initRequiredPolyfills();function initConfigDefaults(){if(config.escapeMode===undefined){config.escapeMode=true;}if(config.attributePrefix===undefined){config.attributePrefix=\\\"_\\\";}config.arrayAccessForm=config.arrayAccessForm||\\\"none\\\";config.emptyNodeForm=config.emptyNodeForm||\\\"text\\\";if(config.enableToStringFunc===undefined){config.enableToStringFunc=true;}config.arrayAccessFormPaths=config.arrayAccessFormPaths||[];if(config.skipEmptyTextNodesForObj===undefined){config.skipEmptyTextNodesForObj=true;}if(config.stripWhitespaces===undefined){config.stripWhitespaces=true;}config.datetimeAccessFormPaths=config.datetimeAccessFormPaths||[];if(config.useDoubleQuotes===undefined){config.useDoubleQuotes=false;}config.xmlElementsFilter=config.xmlElementsFilter||[];config.jsonPropertiesFilter=config.jsonPropertiesFilter||[];if(config.keepCData===undefined){config.keepCData=false;}if(config.ignoreRoot===undefined){config.ignoreRoot=false;}}var DOMNodeTypes={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function initRequiredPolyfills(){}function getNodeLocalName(node){var nodeLocalName=node.localName;if(nodeLocalName==null)// Yeah, this is IE!!\\nnodeLocalName=node.baseName;if(nodeLocalName==null||nodeLocalName==\\\"\\\")// ==\\\"\\\" is IE too\\nnodeLocalName=node.nodeName;return nodeLocalName;}function getNodePrefix(node){return node.prefix;}function escapeXmlChars(str){if(typeof str==\\\"string\\\")return str.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\\\"/g,'&quot;').replace(/'/g,'&apos;');else return str;}function unescapeXmlChars(str){return str.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'\\\"').replace(/&apos;/g,\\\"'\\\").replace(/&amp;/g,'&');}function checkInStdFiltersArrayForm(stdFiltersArrayForm,obj,name,path){var idx=0;for(;idx<stdFiltersArrayForm.length;idx++){var filterPath=stdFiltersArrayForm[idx];if(typeof filterPath===\\\"string\\\"){if(filterPath==path)break;}else if(filterPath instanceof RegExp){if(filterPath.test(path))break;}else if(typeof filterPath===\\\"function\\\"){if(filterPath(obj,name,path))break;}}return idx!=stdFiltersArrayForm.length;}function toArrayAccessForm(obj,childName,path){switch(config.arrayAccessForm){case\\\"property\\\":if(!(obj[childName]instanceof Array))obj[childName+\\\"_asArray\\\"]=[obj[childName]];else obj[childName+\\\"_asArray\\\"]=obj[childName];break;/*case \\\"none\\\":\\n                break;*/}if(!(obj[childName]instanceof Array)&&config.arrayAccessFormPaths.length>0){if(checkInStdFiltersArrayForm(config.arrayAccessFormPaths,obj,childName,path)){obj[childName]=[obj[childName]];}}}function fromXmlDateTime(prop){// Implementation based up on http://stackoverflow.com/questions/8178598/xml-datetime-to-javascript-date-object\\n// Improved to support full spec and optional parts\\nvar bits=prop.split(/[-T:+Z]/g);var d=new Date(bits[0],bits[1]-1,bits[2]);var secondBits=bits[5].split(\\\"\\\\.\\\");d.setHours(bits[3],bits[4],secondBits[0]);if(secondBits.length>1)d.setMilliseconds(secondBits[1]);// Get supplied time zone offset in minutes\\nif(bits[6]&&bits[7]){var offsetMinutes=bits[6]*60+Number(bits[7]);var sign=/\\\\d\\\\d-\\\\d\\\\d:\\\\d\\\\d$/.test(prop)?'-':'+';// Apply the sign\\noffsetMinutes=0+(sign=='-'?-1*offsetMinutes:offsetMinutes);// Apply offset and local timezone\\nd.setMinutes(d.getMinutes()-offsetMinutes-d.getTimezoneOffset());}else if(prop.indexOf(\\\"Z\\\",prop.length-1)!==-1){d=new Date(Date.UTC(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()));}// d is now a local time equivalent to the supplied time\\nreturn d;}function checkFromXmlDateTimePaths(value,childName,fullPath){if(config.datetimeAccessFormPaths.length>0){var path=fullPath.split(\\\"\\\\.#\\\")[0];if(checkInStdFiltersArrayForm(config.datetimeAccessFormPaths,value,childName,path)){return fromXmlDateTime(value);}else return value;}else return value;}function checkXmlElementsFilter(obj,childType,childName,childPath){if(childType==DOMNodeTypes.ELEMENT_NODE&&config.xmlElementsFilter.length>0){return checkInStdFiltersArrayForm(config.xmlElementsFilter,obj,childName,childPath);}else return true;}function parseDOMChildren(node,path){if(node.nodeType==DOMNodeTypes.DOCUMENT_NODE){var result=new Object();var nodeChildren=node.childNodes;// Alternative for firstElementChild which is not supported in some environments\\nfor(var cidx=0;cidx<nodeChildren.length;cidx++){var child=nodeChildren[cidx];if(child.nodeType==DOMNodeTypes.ELEMENT_NODE){if(config.ignoreRoot){result=parseDOMChildren(child);}else{result={};var childName=getNodeLocalName(child);result[childName]=parseDOMChildren(child);}}}return result;}else if(node.nodeType==DOMNodeTypes.ELEMENT_NODE){var result=new Object();result.__cnt=0;var children=[];var nodeChildren=node.childNodes;// Children nodes\\nfor(var cidx=0;cidx<nodeChildren.length;cidx++){var child=nodeChildren[cidx];var childName=getNodeLocalName(child);if(child.nodeType!=DOMNodeTypes.COMMENT_NODE){var childPath=path+\\\".\\\"+childName;if(checkXmlElementsFilter(result,child.nodeType,childName,childPath)){result.__cnt++;if(result[childName]==null){var c=parseDOMChildren(child,childPath);if(childName!=\\\"#text\\\"||/[^\\\\s]/.test(c)){var o={};o[childName]=c;children.push(o);}result[childName]=c;toArrayAccessForm(result,childName,childPath);}else{if(result[childName]!=null){if(!(result[childName]instanceof Array)){result[childName]=[result[childName]];toArrayAccessForm(result,childName,childPath);}}var c=parseDOMChildren(child,childPath);if(childName!=\\\"#text\\\"||/[^\\\\s]/.test(c)){// Don't add white-space text nodes\\nvar o={};o[childName]=c;children.push(o);}result[childName][result[childName].length]=c;}}}}result.__children=children;// Attributes\\nvar nodeLocalName=getNodeLocalName(node);for(var aidx=0;aidx<node.attributes.length;aidx++){var attr=node.attributes[aidx];result.__cnt++;var value2=attr.value;for(var m=0,ml=config.matchers.length;m<ml;m++){var matchobj=config.matchers[m];if(matchobj.test(attr,nodeLocalName))value2=matchobj.converter(attr.value);}result[config.attributePrefix+attr.name]=value2;}// Node namespace prefix\\nvar nodePrefix=getNodePrefix(node);if(nodePrefix!=null&&nodePrefix!=\\\"\\\"){result.__cnt++;result.__prefix=nodePrefix;}if(result[\\\"#text\\\"]!=null){result.__text=result[\\\"#text\\\"];if(result.__text instanceof Array){result.__text=result.__text.join(\\\"\\\\n\\\");}//if(config.escapeMode)\\n//\\tresult.__text = unescapeXmlChars(result.__text);\\nif(config.stripWhitespaces)result.__text=result.__text.trim();delete result[\\\"#text\\\"];if(config.arrayAccessForm==\\\"property\\\")delete result[\\\"#text_asArray\\\"];result.__text=checkFromXmlDateTimePaths(result.__text,childName,path+\\\".\\\"+childName);}if(result[\\\"#cdata-section\\\"]!=null){result.__cdata=result[\\\"#cdata-section\\\"];delete result[\\\"#cdata-section\\\"];if(config.arrayAccessForm==\\\"property\\\")delete result[\\\"#cdata-section_asArray\\\"];}if(result.__cnt==0&&config.emptyNodeForm==\\\"text\\\"){result='';}else if(result.__cnt==1&&result.__text!=null){result=result.__text;}else if(result.__cnt==1&&result.__cdata!=null&&!config.keepCData){result=result.__cdata;}else if(result.__cnt>1&&result.__text!=null&&config.skipEmptyTextNodesForObj){if(config.stripWhitespaces&&result.__text==\\\"\\\"||result.__text.trim()==\\\"\\\"){delete result.__text;}}delete result.__cnt;if(config.enableToStringFunc&&(result.__text!=null||result.__cdata!=null)){result.toString=function(){return(this.__text!=null?this.__text:'')+(this.__cdata!=null?this.__cdata:'');};}return result;}else if(node.nodeType==DOMNodeTypes.TEXT_NODE||node.nodeType==DOMNodeTypes.CDATA_SECTION_NODE){return node.nodeValue;}}function startTag(jsonObj,element,attrList,closed){var resultStr=\\\"<\\\"+(jsonObj!=null&&jsonObj.__prefix!=null?jsonObj.__prefix+\\\":\\\":\\\"\\\")+element;if(attrList!=null){for(var aidx=0;aidx<attrList.length;aidx++){var attrName=attrList[aidx];var attrVal=jsonObj[attrName];if(config.escapeMode)attrVal=escapeXmlChars(attrVal);resultStr+=\\\" \\\"+attrName.substr(config.attributePrefix.length)+\\\"=\\\";if(config.useDoubleQuotes)resultStr+='\\\"'+attrVal+'\\\"';else resultStr+=\\\"'\\\"+attrVal+\\\"'\\\";}}if(!closed)resultStr+=\\\">\\\";else resultStr+=\\\"/>\\\";return resultStr;}function endTag(jsonObj,elementName){return\\\"</\\\"+(jsonObj.__prefix!=null?jsonObj.__prefix+\\\":\\\":\\\"\\\")+elementName+\\\">\\\";}function endsWith(str,suffix){return str.indexOf(suffix,str.length-suffix.length)!==-1;}function jsonXmlSpecialElem(jsonObj,jsonObjField){if(config.arrayAccessForm==\\\"property\\\"&&endsWith(jsonObjField.toString(),\\\"_asArray\\\")||jsonObjField.toString().indexOf(config.attributePrefix)==0||jsonObjField.toString().indexOf(\\\"__\\\")==0||jsonObj[jsonObjField]instanceof Function)return true;else return false;}function jsonXmlElemCount(jsonObj){var elementsCnt=0;if(jsonObj instanceof Object){for(var it in jsonObj){if(jsonXmlSpecialElem(jsonObj,it))continue;elementsCnt++;}}return elementsCnt;}function checkJsonObjPropertiesFilter(jsonObj,propertyName,jsonObjPath){return config.jsonPropertiesFilter.length==0||jsonObjPath==\\\"\\\"||checkInStdFiltersArrayForm(config.jsonPropertiesFilter,jsonObj,propertyName,jsonObjPath);}function parseJSONAttributes(jsonObj){var attrList=[];if(jsonObj instanceof Object){for(var ait in jsonObj){if(ait.toString().indexOf(\\\"__\\\")==-1&&ait.toString().indexOf(config.attributePrefix)==0){attrList.push(ait);}}}return attrList;}function parseJSONTextAttrs(jsonTxtObj){var result=\\\"\\\";if(jsonTxtObj.__cdata!=null){result+=\\\"<![CDATA[\\\"+jsonTxtObj.__cdata+\\\"]]>\\\";}if(jsonTxtObj.__text!=null){if(config.escapeMode)result+=escapeXmlChars(jsonTxtObj.__text);else result+=jsonTxtObj.__text;}return result;}function parseJSONTextObject(jsonTxtObj){var result=\\\"\\\";if(jsonTxtObj instanceof Object){result+=parseJSONTextAttrs(jsonTxtObj);}else if(jsonTxtObj!=null){if(config.escapeMode)result+=escapeXmlChars(jsonTxtObj);else result+=jsonTxtObj;}return result;}function getJsonPropertyPath(jsonObjPath,jsonPropName){if(jsonObjPath===\\\"\\\"){return jsonPropName;}else return jsonObjPath+\\\".\\\"+jsonPropName;}function parseJSONArray(jsonArrRoot,jsonArrObj,attrList,jsonObjPath){var result=\\\"\\\";if(jsonArrRoot.length==0){result+=startTag(jsonArrRoot,jsonArrObj,attrList,true);}else{for(var arIdx=0;arIdx<jsonArrRoot.length;arIdx++){result+=startTag(jsonArrRoot[arIdx],jsonArrObj,parseJSONAttributes(jsonArrRoot[arIdx]),false);result+=parseJSONObject(jsonArrRoot[arIdx],getJsonPropertyPath(jsonObjPath,jsonArrObj));result+=endTag(jsonArrRoot[arIdx],jsonArrObj);}}return result;}function parseJSONObject(jsonObj,jsonObjPath){var result=\\\"\\\";var elementsCnt=jsonXmlElemCount(jsonObj);if(elementsCnt>0){for(var it in jsonObj){if(jsonXmlSpecialElem(jsonObj,it)||jsonObjPath!=\\\"\\\"&&!checkJsonObjPropertiesFilter(jsonObj,it,getJsonPropertyPath(jsonObjPath,it)))continue;var subObj=jsonObj[it];var attrList=parseJSONAttributes(subObj);if(subObj==null||subObj==undefined){result+=startTag(subObj,it,attrList,true);}else if(subObj instanceof Object){if(subObj instanceof Array){result+=parseJSONArray(subObj,it,attrList,jsonObjPath);}else if(subObj instanceof Date){result+=startTag(subObj,it,attrList,false);result+=subObj.toISOString();result+=endTag(subObj,it);}else{var subObjElementsCnt=jsonXmlElemCount(subObj);if(subObjElementsCnt>0||subObj.__text!=null||subObj.__cdata!=null){result+=startTag(subObj,it,attrList,false);result+=parseJSONObject(subObj,getJsonPropertyPath(jsonObjPath,it));result+=endTag(subObj,it);}else{result+=startTag(subObj,it,attrList,true);}}}else{result+=startTag(subObj,it,attrList,false);result+=parseJSONTextObject(subObj);result+=endTag(subObj,it);}}}result+=parseJSONTextObject(jsonObj);return result;}this.parseXmlString=function(xmlDocStr){var isIEParser=window.ActiveXObject||\\\"ActiveXObject\\\"in window;if(xmlDocStr===undefined){return null;}var xmlDoc;if(window.DOMParser){var parser=new window.DOMParser();var parsererrorNS=null;try{xmlDoc=parser.parseFromString(xmlDocStr,\\\"text/xml\\\");if(xmlDoc.getElementsByTagNameNS(\\\"*\\\",\\\"parsererror\\\").length>0){xmlDoc=null;}}catch(err){xmlDoc=null;}}else{// IE :(\\nif(xmlDocStr.indexOf(\\\"<?\\\")==0){xmlDocStr=xmlDocStr.substr(xmlDocStr.indexOf(\\\"?>\\\")+2);}xmlDoc=new ActiveXObject(\\\"Microsoft.XMLDOM\\\");xmlDoc.async=\\\"false\\\";xmlDoc.loadXML(xmlDocStr);}return xmlDoc;};this.asArray=function(prop){if(prop===undefined||prop==null)return[];else if(prop instanceof Array)return prop;else return[prop];};this.toXmlDateTime=function(dt){if(dt instanceof Date)return dt.toISOString();else if(typeof dt==='number')return new Date(dt).toISOString();else return null;};this.asDateTime=function(prop){if(typeof prop==\\\"string\\\"){return fromXmlDateTime(prop);}else return prop;};this.xml2json=function(xmlDoc){return parseDOMChildren(xmlDoc);};this.xml_str2json=function(xmlDocStr){var xmlDoc=this.parseXmlString(xmlDocStr);if(xmlDoc!=null)return this.xml2json(xmlDoc);else return null;};this.json2xml_str=function(jsonObj){return parseJSONObject(jsonObj,\\\"\\\");};this.json2xml=function(jsonObj){var xmlDocStr=this.json2xml_str(jsonObj);return this.parseXmlString(xmlDocStr);};this.getVersion=function(){return VERSION;};}exports.default=X2JS;\\n//# sourceMappingURL=xml2json.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/externals/xml2json.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/index.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/index.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.supportsMediaSource=exports.Debug=exports.MediaPlayerFactory=exports.MetricsReporting=exports.Protection=exports.MediaPlayer=undefined;var _index_mediaplayerOnly=__webpack_require__(/*! ./index_mediaplayerOnly */ \\\"../node_modules/dashjs/build/es5/index_mediaplayerOnly.js\\\");var _Capabilities=__webpack_require__(/*! ./src/streaming/utils/Capabilities */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js\\\");var _MetricsReporting=__webpack_require__(/*! ./src/streaming/metrics/MetricsReporting */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js\\\");var _MetricsReporting2=_interopRequireDefault(_MetricsReporting);var _Protection=__webpack_require__(/*! ./src/streaming/protection/Protection */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js\\\");var _Protection2=_interopRequireDefault(_Protection);var _MediaPlayerFactory=__webpack_require__(/*! ./src/streaming/MediaPlayerFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js\\\");var _MediaPlayerFactory2=_interopRequireDefault(_MediaPlayerFactory);var _Debug=__webpack_require__(/*! ./src/core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */dashjs.Protection=_Protection2.default;dashjs.MetricsReporting=_MetricsReporting2.default;dashjs.MediaPlayerFactory=_MediaPlayerFactory2.default;dashjs.Debug=_Debug2.default;dashjs.supportsMediaSource=_Capabilities.supportsMediaSource;exports.default=dashjs;exports.MediaPlayer=_index_mediaplayerOnly.MediaPlayer;exports.Protection=_Protection2.default;exports.MetricsReporting=_MetricsReporting2.default;exports.MediaPlayerFactory=_MediaPlayerFactory2.default;exports.Debug=_Debug2.default;exports.supportsMediaSource=_Capabilities.supportsMediaSource;\\n//# sourceMappingURL=index.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/index_mediaplayerOnly.js\":\n/*!*****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/index_mediaplayerOnly.js ***!\n  \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.Debug=exports.FactoryMaker=exports.MediaPlayer=undefined;var _MediaPlayer=__webpack_require__(/*! ./src/streaming/MediaPlayer */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js\\\");var _MediaPlayer2=_interopRequireDefault(_MediaPlayer);var _FactoryMaker=__webpack_require__(/*! ./src/core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ./src/core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Version=__webpack_require__(/*! ./src/core/Version */ \\\"../node_modules/dashjs/build/es5/src/core/Version.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// Shove both of these into the global scope\\n/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var context=typeof window!=='undefined'&&window||global;var dashjs=context.dashjs;if(!dashjs){dashjs=context.dashjs={};}dashjs.MediaPlayer=_MediaPlayer2.default;dashjs.FactoryMaker=_FactoryMaker2.default;dashjs.Debug=_Debug2.default;dashjs.Version=(0,_Version.getVersionString)();exports.default=dashjs;exports.MediaPlayer=_MediaPlayer2.default;exports.FactoryMaker=_FactoryMaker2.default;exports.Debug=_Debug2.default;\\n//# sourceMappingURL=index_mediaplayerOnly.js.map\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/index_mediaplayerOnly.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/Debug.js\":\n/*!**********************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/Debug.js ***!\n  \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ./EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ./events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ./FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var LOG_LEVEL_NONE=0;/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var LOG_LEVEL_FATAL=1;var LOG_LEVEL_ERROR=2;var LOG_LEVEL_WARNING=3;var LOG_LEVEL_INFO=4;var LOG_LEVEL_DEBUG=5;/**\\n * @module Debug\\n * @param {object} config\\n * @ignore\\n */function Debug(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=config.settings;var logFn=[];var instance=void 0,showLogTimestamp=void 0,showCalleeName=void 0,startTime=void 0;function setup(){showLogTimestamp=true;showCalleeName=true;startTime=new Date().getTime();if(typeof window!=='undefined'&&window.console){logFn[LOG_LEVEL_FATAL]=getLogFn(window.console.error);logFn[LOG_LEVEL_ERROR]=getLogFn(window.console.error);logFn[LOG_LEVEL_WARNING]=getLogFn(window.console.warn);logFn[LOG_LEVEL_INFO]=getLogFn(window.console.info);logFn[LOG_LEVEL_DEBUG]=getLogFn(window.console.debug);}}function getLogFn(fn){if(fn&&fn.bind){return fn.bind(window.console);}// if not define, return the default function for reporting logs\\nreturn window.console.log.bind(window.console);}/**\\n     * Retrieves a logger which can be used to write logging information in browser console.\\n     * @param {object} instance Object for which the logger is created. It is used\\n     * to include calle object information in log messages.\\n     * @memberof module:Debug\\n     * @returns {Logger}\\n     * @instance\\n     */function getLogger(instance){return{fatal:fatal.bind(instance),error:error.bind(instance),warn:warn.bind(instance),info:info.bind(instance),debug:debug.bind(instance)};}/**\\n     * Prepends a timestamp in milliseconds to each log message.\\n     * @param {boolean} value Set to true if you want to see a timestamp in each log message.\\n     * @default LOG_LEVEL_WARNING\\n     * @memberof module:Debug\\n     * @instance\\n     */function setLogTimestampVisible(value){showLogTimestamp=value;}/**\\n     * Prepends the callee object name, and media type if available, to each log message.\\n     * @param {boolean} value Set to true if you want to see the callee object name and media type in each log message.\\n     * @default true\\n     * @memberof module:Debug\\n     * @instance\\n     */function setCalleeNameVisible(value){showCalleeName=value;}function fatal(){for(var _len=arguments.length,params=Array(_len),_key=0;_key<_len;_key++){params[_key]=arguments[_key];}doLog.apply(undefined,[LOG_LEVEL_FATAL,this].concat(params));}function error(){for(var _len2=arguments.length,params=Array(_len2),_key2=0;_key2<_len2;_key2++){params[_key2]=arguments[_key2];}doLog.apply(undefined,[LOG_LEVEL_ERROR,this].concat(params));}function warn(){for(var _len3=arguments.length,params=Array(_len3),_key3=0;_key3<_len3;_key3++){params[_key3]=arguments[_key3];}doLog.apply(undefined,[LOG_LEVEL_WARNING,this].concat(params));}function info(){for(var _len4=arguments.length,params=Array(_len4),_key4=0;_key4<_len4;_key4++){params[_key4]=arguments[_key4];}doLog.apply(undefined,[LOG_LEVEL_INFO,this].concat(params));}function debug(){for(var _len5=arguments.length,params=Array(_len5),_key5=0;_key5<_len5;_key5++){params[_key5]=arguments[_key5];}doLog.apply(undefined,[LOG_LEVEL_DEBUG,this].concat(params));}function doLog(level,_this){var message='';var logTime=null;if(showLogTimestamp){logTime=new Date().getTime();message+='['+(logTime-startTime)+']';}if(showCalleeName&&_this&&_this.getClassName){message+='['+_this.getClassName()+']';if(_this.getType){message+='['+_this.getType()+']';}}if(message.length>0){message+=' ';}for(var _len6=arguments.length,params=Array(_len6>2?_len6-2:0),_key6=2;_key6<_len6;_key6++){params[_key6-2]=arguments[_key6];}Array.apply(null,params).forEach(function(item){message+=item+' ';});// log to console if the log level is high enough\\nif(logFn[level]&&settings.get().debug.logLevel>=level){logFn[level](message);}// send log event regardless of log level\\nif(settings&&settings.get().debug.dispatchEvent){eventBus.trigger(_Events2.default.LOG,{message:message,level:level});}}instance={getLogger:getLogger,setLogTimestampVisible:setLogTimestampVisible,setCalleeNameVisible:setCalleeNameVisible};setup();return instance;}Debug.__dashjs_factory_name='Debug';var factory=_FactoryMaker2.default.getSingletonFactory(Debug);factory.LOG_LEVEL_NONE=LOG_LEVEL_NONE;factory.LOG_LEVEL_FATAL=LOG_LEVEL_FATAL;factory.LOG_LEVEL_ERROR=LOG_LEVEL_ERROR;factory.LOG_LEVEL_WARNING=LOG_LEVEL_WARNING;factory.LOG_LEVEL_INFO=LOG_LEVEL_INFO;factory.LOG_LEVEL_DEBUG=LOG_LEVEL_DEBUG;_FactoryMaker2.default.updateSingletonFactory(Debug.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=Debug.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Debug.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\":\n/*!*************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/EventBus.js ***!\n  \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ./FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _MediaPlayerEvents=__webpack_require__(/*! ../streaming/MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var EVENT_PRIORITY_LOW=0;var EVENT_PRIORITY_HIGH=5000;function EventBus(){var handlers={};function on(type,listener,scope){var options=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!type){throw new Error('event type cannot be null or undefined');}if(!listener||typeof listener!=='function'){throw new Error('listener must be a function: '+listener);}var priority=options.priority||EVENT_PRIORITY_LOW;if(getHandlerIdx(type,listener,scope)>=0)return;handlers[type]=handlers[type]||[];var handler={callback:listener,scope:scope,priority:priority};if(scope&&scope.getStreamId){handler.streamId=scope.getStreamId();}if(scope&&scope.getType){handler.mediaType=scope.getType();}if(options&&options.mode){handler.mode=options.mode;}var inserted=handlers[type].some(function(item,idx){if(item&&priority>item.priority){handlers[type].splice(idx,0,handler);return true;}});if(!inserted){handlers[type].push(handler);}}function off(type,listener,scope){if(!type||!listener||!handlers[type])return;var idx=getHandlerIdx(type,listener,scope);if(idx<0)return;handlers[type][idx]=null;}function trigger(type){var payload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var filters=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!type||!handlers[type])return;payload=payload||{};if(payload.hasOwnProperty('type'))throw new Error('\\\\'type\\\\' is a reserved word for event dispatching');payload.type=type;if(filters.streamId){payload.streamId=filters.streamId;}if(filters.mediaType){payload.mediaType=filters.mediaType;}handlers[type].filter(function(handler){if(!handler){return false;}if(filters.streamId&&handler.streamId&&handler.streamId!==filters.streamId){return false;}if(filters.mediaType&&handler.mediaType&&handler.mediaType!==filters.mediaType){return false;}// This is used for dispatching DASH events. By default we use the onStart mode. Consequently we filter everything that has a non matching mode and the onReceive events for handlers that did not specify a mode.\\nif(filters.mode&&handler.mode&&handler.mode!==filters.mode||!handler.mode&&filters.mode&&filters.mode===_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE){return false;}return true;}).forEach(function(handler){return handler&&handler.callback.call(handler.scope,payload);});}function getHandlerIdx(type,listener,scope){var idx=-1;if(!handlers[type])return idx;handlers[type].some(function(item,index){if(item&&item.callback===listener&&(!scope||scope===item.scope)){idx=index;return true;}});return idx;}function reset(){handlers={};}var instance={on:on,off:off,trigger:trigger,reset:reset};return instance;}EventBus.__dashjs_factory_name='EventBus';var factory=_FactoryMaker2.default.getSingletonFactory(EventBus);factory.EVENT_PRIORITY_LOW=EVENT_PRIORITY_LOW;factory.EVENT_PRIORITY_HIGH=EVENT_PRIORITY_HIGH;_FactoryMaker2.default.updateSingletonFactory(EventBus.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=EventBus.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/EventBus.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\":\n/*!*****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/FactoryMaker.js ***!\n  \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @module FactoryMaker\\n * @ignore\\n */var FactoryMaker=function(){var instance=void 0;var singletonContexts=[];var singletonFactories={};var classFactories={};function extend(name,childInstance,override,context){if(!context[name]&&childInstance){context[name]={instance:childInstance,override:override};}}/**\\n     * Use this method from your extended object.  this.factory is injected into your object.\\n     * this.factory.getSingletonInstance(this.context, 'VideoModel')\\n     * will return the video model for use in the extended object.\\n     *\\n     * @param {Object} context - injected into extended object as this.context\\n     * @param {string} className - string name found in all dash.js objects\\n     * with name __dashjs_factory_name Will be at the bottom. Will be the same as the object's name.\\n     * @returns {*} Context aware instance of specified singleton name.\\n     * @memberof module:FactoryMaker\\n     * @instance\\n     */function getSingletonInstance(context,className){for(var i in singletonContexts){var obj=singletonContexts[i];if(obj.context===context&&obj.name===className){return obj.instance;}}return null;}/**\\n     * Use this method to add an singleton instance to the system.  Useful for unit testing to mock objects etc.\\n     *\\n     * @param {Object} context\\n     * @param {string} className\\n     * @param {Object} instance\\n     * @memberof module:FactoryMaker\\n     * @instance\\n     */function setSingletonInstance(context,className,instance){for(var i in singletonContexts){var obj=singletonContexts[i];if(obj.context===context&&obj.name===className){singletonContexts[i].instance=instance;return;}}singletonContexts.push({name:className,context:context,instance:instance});}/**\\n     * Use this method to remove all singleton instances associated with a particular context.\\n     *\\n     * @param {Object} context\\n     * @memberof module:FactoryMaker\\n     * @instance\\n     */function deleteSingletonInstances(context){singletonContexts=singletonContexts.filter(function(x){return x.context!==context;});}/*------------------------------------------------------------------------------------------*/// Factories storage Management\\n/*------------------------------------------------------------------------------------------*/function getFactoryByName(name,factoriesArray){return factoriesArray[name];}function updateFactory(name,factory,factoriesArray){if(name in factoriesArray){factoriesArray[name]=factory;}}/*------------------------------------------------------------------------------------------*/// Class Factories Management\\n/*------------------------------------------------------------------------------------------*/function updateClassFactory(name,factory){updateFactory(name,factory,classFactories);}function getClassFactoryByName(name){return getFactoryByName(name,classFactories);}function getClassFactory(classConstructor){var factory=getFactoryByName(classConstructor.__dashjs_factory_name,classFactories);if(!factory){factory=function factory(context){if(context===undefined){context={};}return{create:function create(){return merge(classConstructor,context,arguments);}};};classFactories[classConstructor.__dashjs_factory_name]=factory;// store factory\\n}return factory;}/*------------------------------------------------------------------------------------------*/// Singleton Factory MAangement\\n/*------------------------------------------------------------------------------------------*/function updateSingletonFactory(name,factory){updateFactory(name,factory,singletonFactories);}function getSingletonFactoryByName(name){return getFactoryByName(name,singletonFactories);}function getSingletonFactory(classConstructor){var factory=getFactoryByName(classConstructor.__dashjs_factory_name,singletonFactories);if(!factory){factory=function factory(context){var instance=void 0;if(context===undefined){context={};}return{getInstance:function getInstance(){// If we don't have an instance yet check for one on the context\\nif(!instance){instance=getSingletonInstance(context,classConstructor.__dashjs_factory_name);}// If there's no instance on the context then create one\\nif(!instance){instance=merge(classConstructor,context,arguments);singletonContexts.push({name:classConstructor.__dashjs_factory_name,context:context,instance:instance});}return instance;}};};singletonFactories[classConstructor.__dashjs_factory_name]=factory;// store factory\\n}return factory;}function merge(classConstructor,context,args){var classInstance=void 0;var className=classConstructor.__dashjs_factory_name;var extensionObject=context[className];if(extensionObject){var extension=extensionObject.instance;if(extensionObject.override){//Override public methods in parent but keep parent.\\nclassInstance=classConstructor.apply({context:context},args);extension=extension.apply({context:context,factory:instance,parent:classInstance},args);for(var prop in extension){if(classInstance.hasOwnProperty(prop)){classInstance[prop]=extension[prop];}}}else{//replace parent object completely with new object. Same as dijon.\\nreturn extension.apply({context:context,factory:instance},args);}}else{// Create new instance of the class\\nclassInstance=classConstructor.apply({context:context},args);}// Add getClassName function to class instance prototype (used by Debug)\\nclassInstance.getClassName=function(){return className;};return classInstance;}instance={extend:extend,getSingletonInstance:getSingletonInstance,setSingletonInstance:setSingletonInstance,deleteSingletonInstances:deleteSingletonInstances,getSingletonFactory:getSingletonFactory,getSingletonFactoryByName:getSingletonFactoryByName,updateSingletonFactory:updateSingletonFactory,getClassFactory:getClassFactory,getClassFactoryByName:getClassFactoryByName,updateClassFactory:updateClassFactory};return instance;}();exports.default=FactoryMaker;\\n//# sourceMappingURL=FactoryMaker.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/FactoryMaker.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/Settings.js\":\n/*!*************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/Settings.js ***!\n  \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};var _FactoryMaker=__webpack_require__(/*! ./FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Utils=__webpack_require__(/*! ./Utils.js */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../streaming/vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//** @module Settings\\n * @description Define the configuration parameters of Dash.js MediaPlayer.\\n * @see {@link module:Settings~PlayerSettings PlayerSettings} for further information about the supported configuration properties.\\n *//**\\n * @typedef {Object} PlayerSettings\\n * @property {module:Settings~DebugSettings} [debug]\\n * Debug related settings.\\n * @property {module:Settings~StreamingSettings} [streaming]\\n * Streaming related settings.\\n * @example\\n *\\n * // Full settings object\\n * settings = {\\n *      debug: {\\n *          logLevel: Debug.LOG_LEVEL_WARNING,\\n *          dispatchEvent: false\\n *      },\\n *      streaming: {\\n *          metricsMaxListDepth: 1000,\\n *          abandonLoadTimeout: 10000,\\n *          liveDelayFragmentCount: NaN,\\n *          liveDelay: null,\\n *          scheduleWhilePaused: true,\\n *          fastSwitchEnabled: false,\\n *          flushBufferAtTrackSwitch: false,\\n *          calcSegmentAvailabilityRangeFromTimeline: false,\\n *          reuseExistingSourceBuffers: true,\\n *          bufferPruningInterval: 10,\\n *          bufferToKeep: 20,\\n *          jumpGaps: true,\\n *          jumpLargeGaps: true,\\n *          smallGapLimit: 1.5,\\n *          stableBufferTime: 12,\\n *          bufferTimeAtTopQuality: 30,\\n *          bufferTimeAtTopQualityLongForm: 60,\\n *          longFormContentDurationThreshold: 600,\\n *          wallclockTimeUpdateInterval: 50,\\n *          lowLatencyEnabled: false,\\n *          keepProtectionMediaKeys: false,\\n *          useManifestDateHeaderTimeSource: true,\\n *          useSuggestedPresentationDelay: true,\\n *          useAppendWindow: true,\\n *          manifestUpdateRetryInterval: 100,\\n *          stallThreshold: 0.5,\\n *          filterUnsupportedEssentialProperties: true,\\n *          utcSynchronization: {\\n *              backgroundAttempts: 2,\\n *              timeBetweenSyncAttempts: 30,\\n *              maximumTimeBetweenSyncAttempts: 600,\\n *              minimumTimeBetweenSyncAttempts: 2,\\n *              timeBetweenSyncAttemptsAdjustmentFactor: 2,\\n *              maximumAllowedDrift: 100,\\n *              enableBackgroundSyncAfterSegmentDownloadError: true,\\n *              defaultTimingSource: {\\n *                   scheme: 'urn:mpeg:dash:utc:http-xsdate:2014',\\n *                   value: 'http://time.akamai.com/?iso&ms'\\n *               }\\n *          },\\n *          liveCatchup: {\\n *              minDrift: 0.02,\\n *              maxDrift: 0,\\n *              playbackRate: 0.5,\\n *              latencyThreshold: NaN,\\n *              playbackBufferMin: NaN,\\n *              enabled: false,\\n *              mode: Constants.LIVE_CATCHUP_MODE_DEFAULT\\n *           },\\n *          lastBitrateCachingInfo: { enabled: true, ttl: 360000 },\\n *          lastMediaSettingsCachingInfo: { enabled: true, ttl: 360000 },\\n *          cacheLoadThresholds: { video: 50, audio: 5 },\\n *          trackSwitchMode: {\\n *              audio: Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE,\\n *              video: Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\\n *          },\\n *          selectionModeForInitialTrack: Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE,\\n *          fragmentRequestTimeout: 0,\\n *          retryIntervals: {\\n *              MPD: 500,\\n *              XLinkExpansion: 500,\\n *              InitializationSegment: 1000,\\n *              IndexSegment: 1000,\\n *              MediaSegment: 1000,\\n *              BitstreamSwitchingSegment: 1000,\\n *              other: 1000,\\n *              lowLatencyReductionFactor: 10\\n *          },\\n *          retryAttempts: {\\n *              MPD: 3,\\n *              XLinkExpansion: 1,\\n *              InitializationSegment: 3,\\n *              IndexSegment: 3,\\n *              MediaSegment: 3,\\n *              BitstreamSwitchingSegment: 3,\\n *              other: 3,\\n *              lowLatencyMultiplyFactor: 5\\n *          },\\n *          abr: {\\n *              movingAverageMethod: Constants.MOVING_AVERAGE_SLIDING_WINDOW,\\n *              ABRStrategy: Constants.ABR_STRATEGY_DYNAMIC,\\n *              bandwidthSafetyFactor: 0.9,\\n *              useDefaultABRRules: true,\\n *              useDeadTimeLatency: true,\\n *              limitBitrateByPortal: false,\\n *              usePixelRatioInLimitBitrateByPortal: false,\\n *              maxBitrate: { audio: -1, video: -1 },\\n *              minBitrate: { audio: -1, video: -1 },\\n *              maxRepresentationRatio: { audio: 1, video: 1 },\\n *              initialBitrate: { audio: -1, video: -1 },\\n *              initialRepresentationRatio: { audio: -1, video: -1 },\\n *              autoSwitchBitrate: { audio: true, video: true },\\n *              fetchThroughputCalculationMode: Constants.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA\\n *          },\\n *          cmcd: {\\n *              enabled: false,\\n *              sid: null,\\n *              cid: null,\\n *              rtp: null,\\n *              rtpSafetyFactor: 5\\n *          }\\n *      }\\n * }\\n *//**\\n * @typedef {Object} DebugSettings\\n * @property {number} [logLevel=dashjs.Debug.LOG_LEVEL_WARNING]\\n * Sets up the log level. The levels are cumulative.\\n *\\n * For example, if you set the log level to dashjs.Debug.LOG_LEVEL_WARNING all warnings, errors and fatals will be logged.\\n *\\n * Possible values.\\n *\\n * - dashjs.Debug.LOG_LEVEL_NONE\\n * No message is written in the browser console.\\n *\\n * - dashjs.Debug.LOG_LEVEL_FATAL\\n * Log fatal errors.\\n * An error is considered fatal when it causes playback to fail completely.\\n *\\n * - dashjs.Debug.LOG_LEVEL_ERROR\\n * Log error messages.\\n *\\n * - dashjs.Debug.LOG_LEVEL_WARNING\\n * Log warning messages.\\n *\\n * - dashjs.Debug.LOG_LEVEL_INFO\\n * Log info messages.\\n *\\n * - dashjs.Debug.LOG_LEVEL_DEBUG\\n * Log debug messages.\\n * @property {boolean} [dispatchEvent=false]\\n * Enable to trigger a Events.LOG event whenever log output is generated.\\n *\\n * Note this will be dispatched regardless of log level.\\n *//**\\n * @typedef {Object} AbrSettings\\n * @property {string} [movingAverageMethod=\\\"slidingWindow\\\"]\\n * Sets the moving average method used for smoothing throughput estimates.\\n *\\n * Valid methods are \\\"slidingWindow\\\" and \\\"ewma\\\".\\n *\\n * The call has no effect if an invalid method is passed.\\n *\\n * The sliding window moving average method computes the average throughput using the last four segments downloaded.\\n *\\n * If the stream is live (as opposed to VOD), then only the last three segments are used.\\n *\\n * If wide variations in throughput are detected, the number of segments can be dynamically increased to avoid oscillations.\\n *\\n * The exponentially weighted moving average (EWMA) method computes the average using exponential smoothing.\\n *\\n * Two separate estimates are maintained, a fast one with a three-second half life and a slow one with an eight-second half life.\\n *\\n * The throughput estimate at any time is the minimum of the fast and slow estimates.\\n *\\n * This allows a fast reaction to a bandwidth drop and prevents oscillations on bandwidth spikes.\\n * @property {string} [ABRStrategy=\\\"abrDynamic\\\"]\\n * Returns the current ABR strategy being used: \\\"abrDynamic\\\", \\\"abrBola\\\" or \\\"abrThroughput\\\".\\n * @property {number} [bandwidthSafetyFactor=0.9]\\n * Standard ABR throughput rules multiply the throughput by this value.\\n *\\n * It should be between 0 and 1, with lower values giving less rebuffering (but also lower quality).\\n * @property {boolean} [useDefaultABRRules=true]\\n * Should the default ABR rules be used, or the custom ones added.\\n * @property {boolean} [useDeadTimeLatency=true]\\n * If true, only the download portion will be considered part of the download bitrate and latency will be regarded as static.\\n *\\n * If false, the reciprocal of the whole transfer time will be used.\\n * @property {boolean} [limitBitrateByPortal=false]\\n * If true, the size of the video portal will limit the max chosen video resolution.\\n * @property {boolean} [usePixelRatioInLimitBitrateByPortal=false]\\n * Sets whether to take into account the device's pixel ratio when defining the portal dimensions.\\n *\\n * Useful on, for example, retina displays.\\n * @property {module:Settings~AudioVideoSettings} [maxBitrate={audio: -1, video: -1}]\\n * The maximum bitrate that the ABR algorithms will choose.\\n *\\n * Use NaN for no limit.\\n * @property {module:Settings~AudioVideoSettings} [minBitrate={audio: -1, video: -1}]\\n * The minimum bitrate that the ABR algorithms will choose.\\n *\\n * Use NaN for no limit.\\n * @property {module:Settings~AudioVideoSettings} [maxRepresentationRatio={audio: 1, video: 1}]\\n * When switching multi-bitrate content (auto or manual mode) this property specifies the maximum representation allowed, as a proportion of the size of the representation set.\\n *\\n * You can set or remove this cap at anytime before or during playback.\\n *\\n * To clear this setting you set the value to 1.\\n *\\n * If both this and maxAllowedBitrate are defined, maxAllowedBitrate is evaluated first, then maxAllowedRepresentation, i.e. the lowest value from executing these rules is used.\\n *\\n * This feature is typically used to reserve higher representations for playback only when connected over a fast connection.\\n * @property {module:Settings~AudioVideoSettings} [initialBitrate={audio: -1, video: -1}]\\n * Explicitly set the starting bitrate for audio or video.\\n * @property {module:Settings~AudioVideoSettings} [initialRepresentationRatio={audio: -1, video: -1}]\\n * Explicitly set the initial representation ratio.\\n *\\n * If initalBitrate is specified, this is ignored.\\n * @property {module:Settings~AudioVideoSettings} [autoSwitchBitrate={audio: true, video: true}]\\n * Indicates whether the player should enable ABR algorithms to switch the bitrate.\\n *\\n * @property {string} [fetchThroughputCalculationMode=\\\"abrFetchThroughputCalculationDownloadedData\\\"]\\n * Algorithm to determine the throughput in case the Fetch API is used for low latency streaming.\\n *\\n * For details please check the samples section and FetchLoader.js.\\n *//**\\n * @typedef {Object} StreamingSettings\\n * @property {number} [metricsMaxListDepth=1000]\\n * Maximum list depth of metrics.\\n * @property {number} [abandonLoadTimeout=10000]\\n * A timeout value in seconds, which during the ABRController will block switch-up events.\\n *\\n * This will only take effect after an abandoned fragment event occurs.\\n * @property {number} [liveDelayFragmentCount=NaN]\\n * Changing this value will lower or increase live stream latency.\\n *\\n * The detected segment duration will be multiplied by this value to define a time in seconds to delay a live stream from the live edge.\\n *\\n * Lowering this value will lower latency but may decrease the player's ability to build a stable buffer.\\n * @property {number} [liveDelay]\\n * Equivalent in seconds of setLiveDelayFragmentCount.\\n *\\n * Lowering this value will lower latency but may decrease the player's ability to build a stable buffer.\\n *\\n * This value should be less than the manifest duration by a couple of segment durations to avoid playback issues.\\n *\\n * If set, this parameter will take precedence over setLiveDelayFragmentCount and manifest info.\\n * @property {boolean} [scheduleWhilePaused=true]\\n * Set to true if you would like dash.js to keep downloading fragments in the background when the video element is paused.\\n * @property {boolean} [fastSwitchEnabled=false]\\n * When enabled, after an ABR up-switch in quality, instead of requesting and appending the next fragment at the end of the current buffer range it is requested and appended closer to the current time.\\n *\\n * When enabled, The maximum time to render a higher quality is current time + (1.5 * fragment duration).\\n *\\n * Note, When ABR down-switch is detected, we appended the lower quality at the end of the buffer range to preserve the\\n * higher quality media for as long as possible.\\n *\\n * If enabled, it should be noted there are a few cases when the client will not replace inside buffer range but rather just append at the end.\\n * 1. When the buffer level is less than one fragment duration.\\n * 2. The client is in an Abandonment State due to recent fragment abandonment event.\\n *\\n * Known issues:\\n * 1. In IE11 with auto switching off, if a user switches to a quality they can not download in time the fragment may be appended in the same range as the playhead or even in the past, in IE11 it may cause a stutter or stall in playback.\\n * @property {boolean} [flushBufferAtTrackSwitch=false]\\n * When enabled, after a track switch and in case buffer is being replaced (see MediaPlayer.setTrackSwitchModeFor(Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE)), the video element is flushed (seek at current playback time) once a segment of the new track is appended in buffer in order to force video decoder to play new track.\\n *\\n * This can be required on some devices like GoogleCast devices to make track switching functional.\\n *\\n * Otherwise track switching will be effective only once after previous buffered track is fully consumed.\\n * @property {boolean} [calcSegmentAvailabilityRangeFromTimeline=false]\\n * Enable calculation of the DVR window for SegmentTimeline manifests based on the entries in \\\\<SegmentTimeline\\\\>.\\n * @property {boolean} [reuseExistingSourceBuffers=true]\\n * Enable reuse of existing MediaSource Sourcebuffers during period transition.\\n * @property {number} [bufferPruningInterval=10]\\n * The interval of pruning buffer in seconds.\\n * @property {number} [bufferToKeep=20]\\n * This value influences the buffer pruning logic.\\n *\\n * Allows you to modify the buffer that is kept in source buffer in seconds.\\n * 0|-----------bufferToPrune-----------|-----bufferToKeep-----|currentTime|\\n * @property {boolean} [jumpGaps=true]\\n * Sets whether player should jump small gaps (discontinuities) in the buffer.\\n * @property {boolean} [jumpLargeGaps=true]\\n * Sets whether player should jump large gaps (discontinuities) in the buffer.\\n * @property {number} [smallGapLimit=1.8]\\n * Time in seconds for a gap to be considered small.\\n * @property {number} [stableBufferTime=12]\\n * The time that the internal buffer target will be set to post startup/seeks (NOT top quality).\\n *\\n * When the time is set higher than the default you will have to wait longer to see automatic bitrate switches but will have a larger buffer which will increase stability.\\n * @property {number} [bufferTimeAtTopQuality=30]\\n * The time that the internal buffer target will be set to once playing the top quality.\\n *\\n * If there are multiple bitrates in your adaptation, and the media is playing at the highest bitrate, then we try to build a larger buffer at the top quality to increase stability and to maintain media quality.\\n * @property {number} [bufferTimeAtTopQualityLongForm=60]\\n * The time that the internal buffer target will be set to once playing the top quality for long form content.\\n * @property {number} [longFormContentDurationThreshold=600]\\n * The threshold which defines if the media is considered long form content.\\n *\\n * This will directly affect the buffer targets when playing back at the top quality.\\n * @property {number} [wallclockTimeUpdateInterval=50]\\n * How frequently the wallclockTimeUpdated internal event is triggered (in milliseconds).\\n * @property {boolean} [lowLatencyEnabled=false]\\n * Enable or disable low latency mode.\\n * @property {boolean} [keepProtectionMediaKeys=false]\\n * Set the value for the ProtectionController and MediaKeys life cycle.\\n *\\n * If true, the ProtectionController and then created MediaKeys and MediaKeySessions will be preserved during the MediaPlayer lifetime.\\n * @property {boolean} [useManifestDateHeaderTimeSource=true]\\n * Allows you to enable the use of the Date Header, if exposed with CORS, as a timing source for live edge detection.\\n *\\n * The use of the date header will happen only after the other timing source that take precedence fail or are omitted as described.\\n * @property {boolean} [useSuggestedPresentationDelay=true]\\n * Set to true if you would like to override the default live delay and honor the SuggestedPresentationDelay attribute in by the manifest.\\n * @property {boolean} [useAppendWindow=true]\\n * Specifies if the appendWindow attributes of the MSE SourceBuffers should be set according to content duration from manifest.\\n * @property {number} [manifestUpdateRetryInterval=100]\\n * For live streams, set the interval-frequency in milliseconds at which dash.js will check if the current manifest is still processed before downloading the next manifest once the minimumUpdatePeriod time has.\\n * @property {number} [stallThreshold=0.5]\\n * Stall threshold used in BufferController.js to determine whether a track should still be changed and which buffer range to prune.\\n * @property {boolean} [filterUnsupportedEssentialProperties=true]\\n * Enable to filter all the AdaptationSets and Representations which contain an unsupported \\\\<EssentialProperty\\\\> element.\\n * @property {module:Settings~UtcSynchronizationSettings} utcSynchronization Settings related to UTC clock synchronization\\n * @property {module:Settings~LiveCatchupSettings} liveCatchup  Settings related to live catchup.\\n * @property {module:Settings~CachingInfoSettings} [lastBitrateCachingInfo={enabled: true, ttl: 360000}]\\n * Set to false if you would like to disable the last known bit rate from being stored during playback and used to set the initial bit rate for subsequent playback within the expiration window.\\n *\\n * The default expiration is one hour, defined in milliseconds.\\n *\\n * If expired, the default initial bit rate (closest to 1000 kbps) will be used for that session and a new bit rate will be stored during that session.\\n * @property {module:Settings~CachingInfoSettings} [lastMediaSettingsCachingInfo={enabled: true, ttl: 360000}]\\n * Set to false if you would like to disable the last known lang for audio (or camera angle for video) from being stored during playback and used to set the initial settings for subsequent playback within the expiration window.\\n *\\n * The default expiration is one hour, defined in milliseconds.\\n *\\n * If expired, the default settings will be used for that session and a new settings will be stored during that session.\\n * @property {module:Settings~AudioVideoSettings} [cacheLoadThresholds={video: 50, audio: 5}]\\n * For a given media type, the threshold which defines if the response to a fragment request is coming from browser cache or not.\\n * @property {module:Settings~AudioVideoSettings} [trackSwitchMode={video: \\\"neverReplace\\\", audio: \\\"alwaysReplace\\\"}]\\n * For a given media type defines if existing segments in the buffer should be overwritten once the track is switched. For instance if the user switches the audio language the existing segments in the audio buffer will be replaced when setting this value to \\\"alwaysReplace\\\".\\n *\\n * Possible values\\n *\\n * - Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE\\n * Replace existing segments in the buffer\\n *\\n * - Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\\n * Do not replace existing segments in the buffer\\n *\\n * @property {string} [selectionModeForInitialTrack=\\\"highestBitrate\\\"]\\n * Sets the selection mode for the initial track. This mode defines how the initial track will be selected if no initial media settings are set. If initial media settings are set this parameter will be ignored. Available options are:\\n *\\n * Possible values\\n *\\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE\\n * This mode makes the player select the track with a highest bitrate. This mode is a default mode.\\n *\\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY\\n * This mode makes the player select the track with the lowest bitrate per pixel average.\\n *\\n * - Constants.TRACK_SELECTION_MODE_WIDEST_RANGE\\n * This mode makes the player select the track with a widest range of bitrates.\\n *\\n *\\n * @property {number} [fragmentRequestTimeout=0]\\n * Time in milliseconds before timing out on loading a media fragment.\\n *\\n * Fragments that timeout are retried as if they failed.\\n * @property {module:Settings~RequestTypeSettings} [retryIntervals]\\n * Time in milliseconds of which to reload a failed file load attempt.\\n *\\n * For low latency mode these values are divided by lowLatencyReductionFactor.\\n * @property {module:Settings~RequestTypeSettings} [retryAttempts]\\n * Total number of retry attempts that will occur on a file load before it fails.\\n *\\n * For low latency mode these values are multiplied by lowLatencyMultiplyFactor.\\n * @property {module:Settings~AbrSettings} abr\\n * Adaptive Bitrate algorithm related settings.\\n * @property {module:Settings~CmcdSettings} cmcd\\n * Settings related to Common Media Client Data reporting.\\n *//**\\n * @typedef {Object} CachingInfoSettings\\n * @property {boolean} [enable]\\n * Enable or disable the caching feature.\\n * @property {number} [ttl]\\n * Time to live.\\n *\\n * A value defined in milliseconds representing how log to cache the settings for.\\n *//**\\n * @typedef {Object} module:Settings~AudioVideoSettings\\n * @property {number|boolean|string} [audio]\\n * Configuration for audio media type of tracks.\\n * @property {number|boolean|string} [video]\\n * Configuration for video media type of tracks.\\n *//**\\n * @typedef {Object} RequestTypeSettings\\n * @property {number} [MPD]\\n * Manifest type of requests.\\n * @property {number} [XLinkExpansion]\\n * XLink expansion type of requests.\\n * @property {number} [InitializationSegment]\\n * Request to retrieve an initialization segment.\\n * @property {number} [IndexSegment]\\n * Request to retrieve an index segment (SegmentBase).\\n * @property {number} [MediaSegment]\\n * Request to retrieve a media segment (video/audio/image/text chunk).\\n * @property {number} [BitstreamSwitchingSegment]\\n * Bitrate stream switching type of request.\\n * @property {number} [other]\\n * Other type of request.\\n * @property {number} [lowLatencyReductionFactor]\\n * For low latency mode, values of type of request are divided by lowLatencyReductionFactor.\\n *\\n * Note: It's not type of request.\\n * @property {number} [lowLatencyMultiplyFactor]\\n * For low latency mode, values of type of request are multiplied by lowLatencyMultiplyFactor.\\n *\\n * Note: It's not type of request.\\n *//**\\n * @typedef {Object} module:Settings~CmcdSettings\\n * @property {boolean} [enable=false]\\n * Enable or disable the CMCD reporting.\\n * @property {string} [sid]\\n * GUID identifying the current playback session.\\n *\\n * Should be in UUID format.\\n *\\n * If not specified a UUID will be automatically generated.\\n * @property {string} [cid]\\n * A unique string to identify the current content.\\n *\\n * If not specified it will be a hash of the MPD url.\\n * @property {number} [rtp]\\n * The requested maximum throughput that the client considers sufficient for delivery of the asset.\\n *\\n * If not specified this value will be dynamically calculated in the CMCDModel based on the current buffer level.\\n * @property {number} [rtpSafetyFactor]\\n * This value is used as a factor for the rtp value calculation: rtp = minBandwidth * rtpSafetyFactor\\n *\\n * If not specified this value defaults to 5. Note that this value is only used when no static rtp value is defined.\\n *//**\\n * @typedef {Object} module:Settings~UtcSynchronizationSettings\\n * @property {number} [backgroundAttempts=2]\\n * Number of synchronization attempts to perform in the background after an initial synchronization request has been done. This is used to verify that the derived client-server offset is correct.\\n *\\n * The background requests are async and done in parallel to the start of the playback.\\n *\\n * This value is also used to perform a resync after 404 errors on segments.\\n * @property {number} [timeBetweenSyncAttempts=30]\\n * The time in seconds between two consecutive sync attempts.\\n *\\n * Note: This value is used as an initial starting value. The internal value of the TimeSyncController is adjusted during playback based on the drift between two consecutive synchronization attempts.\\n *\\n * Note: A sync is only performed after an MPD update. In case the @minimumUpdatePeriod is larger than this value the sync will be delayed until the next MPD update.\\n * @property {number} [maximumTimeBetweenSyncAttempts=600]\\n * The maximum time in seconds between two consecutive sync attempts.\\n *\\n * @property {number} [minimumTimeBetweenSyncAttempts=2]\\n * The minimum time in seconds between two consecutive sync attempts.\\n *\\n * @property {number} [timeBetweenSyncAttemptsAdjustmentFactor=2]\\n * The factor used to multiply or divide the timeBetweenSyncAttempts parameter after a sync. The maximumAllowedDrift defines whether this value is used as a factor or a dividend.\\n *\\n * @property {number} [maximumAllowedDrift=100]\\n * The maximum allowed drift specified in milliseconds between two consecutive synchronization attempts.\\n *\\n * @property {boolean} [enableBackgroundSyncAfterSegmentDownloadError=true]\\n * Enables or disables the background sync after the player ran into a segment download error.\\n *\\n * @property {object} [defaultTimingSource={scheme:'urn:mpeg:dash:utc:http-xsdate:2014',value: 'http://time.akamai.com/?iso&ms'}]\\n * The default timing source to be used. The timing sources in the MPD take precedence over this one.\\n *//**\\n * @typedef {Object} module:Settings~LiveCatchupSettings\\n * @property {number} [minDrift=0.02]\\n * Use this method to set the minimum latency deviation allowed before activating catch-up mechanism.\\n *\\n * In low latency mode, when the difference between the measured latency and the target one, as an absolute number, is higher than the one sets with this method, then dash.js increases/decreases playback rate until target latency is reached.\\n *\\n * LowLatencyMinDrift should be provided in seconds, and it uses values between 0.0 and 0.5.\\n *\\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\\n * @property {number} [maxDrift=0]\\n * Use this method to set the maximum latency deviation allowed before dash.js to do a seeking to live position.\\n *\\n * In low latency mode, when the difference between the measured latency and the target one, as an absolute number, is higher than the one sets with this method, then dash.js does a seek to live edge position minus the target live delay.\\n *\\n * LowLatencyMaxDriftBeforeSeeking should be provided in seconds.\\n *\\n * If 0, then seeking operations won't be used for fixing latency deviations.\\n *\\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\\n * @property {number} [playbackRate=0.5]\\n * Use this parameter to set the maximum catch up rate, as a percentage, for low latency live streams.\\n *\\n * In low latency mode, when measured latency is higher/lower than the target one, dash.js increases/decreases playback rate respectively up to (+/-) the percentage defined with this method until target is reached.\\n *\\n * Valid values for catch up rate are in range 0-0.5 (0-50%).\\n *\\n * Set it to 0 to turn off live catch up feature.\\n *\\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\\n * @property {number} [latencyThreshold=NaN]\\n * Use this parameter to set the maximum threshold for which live catch up is applied.\\n *\\n * For instance, if this value is set to 8 seconds, then live catchup is only applied if the current live latency is equal or below 8 seconds.\\n *\\n * The reason behind this parameter is to avoid an increase of the playback rate if the user seeks within the DVR window.\\n *\\n * If no value is specified this will be twice the maximum live delay.\\n *\\n * The maximum live delay is either specified in the manifest as part of a ServiceDescriptor or calculated the following:\\n * maximumLiveDelay = targetDelay + liveCatchupMinDrift.\\n *\\n * @property {number} [playbackBufferMin=NaN]\\n * Use this parameter to specify the minimum buffer which is used for LoL+ based playback rate reduction.\\n *\\n *\\n * @property {boolean} [enabled=false]\\n * Use this parameter to enable the catchup mode for non low-latency streams.\\n *\\n * @property {string} [mode=\\\"liveCatchupModeDefault\\\"]\\n * Use this parameter to switch between different catchup modes.\\n *\\n * Options: \\\"liveCatchupModeDefault\\\" or \\\"liveCatchupModeLOLP\\\".\\n *\\n * Note: Catch-up mechanism is automatically applied when playing low latency live streams.\\n *//**\\n * @class\\n * @ignore\\n */function Settings(){var _retryIntervals,_retryAttempts;var instance=void 0;/**\\n     * @const {PlayerSettings} defaultSettings\\n     * @ignore\\n     */var defaultSettings={debug:{logLevel:_Debug2.default.LOG_LEVEL_WARNING,dispatchEvent:false},streaming:{metricsMaxListDepth:1000,abandonLoadTimeout:10000,liveDelayFragmentCount:NaN,liveDelay:null,scheduleWhilePaused:true,fastSwitchEnabled:false,flushBufferAtTrackSwitch:false,calcSegmentAvailabilityRangeFromTimeline:false,reuseExistingSourceBuffers:true,bufferPruningInterval:10,bufferToKeep:20,jumpGaps:true,jumpLargeGaps:true,smallGapLimit:1.5,stableBufferTime:12,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,longFormContentDurationThreshold:600,wallclockTimeUpdateInterval:50,lowLatencyEnabled:false,keepProtectionMediaKeys:false,useManifestDateHeaderTimeSource:true,useSuggestedPresentationDelay:true,useAppendWindow:true,manifestUpdateRetryInterval:100,stallThreshold:0.5,filterUnsupportedEssentialProperties:true,utcSynchronization:{backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:true,defaultTimingSource:{scheme:'urn:mpeg:dash:utc:http-xsdate:2014',value:'http://time.akamai.com/?iso&ms'}},liveCatchup:{minDrift:0.02,maxDrift:0,playbackRate:0.5,latencyThreshold:60,playbackBufferMin:0.5,enabled:false,mode:_Constants2.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:true,ttl:360000},lastMediaSettingsCachingInfo:{enabled:true,ttl:360000},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:_Constants2.default.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:_Constants2.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,fragmentRequestTimeout:0,retryIntervals:(_retryIntervals={},_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.MPD_TYPE,500),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE,500),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.INDEX_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.OTHER_TYPE,1000),_defineProperty(_retryIntervals,'lowLatencyReductionFactor',10),_retryIntervals),retryAttempts:(_retryAttempts={},_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.MPD_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE,1),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.INDEX_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.OTHER_TYPE,3),_defineProperty(_retryAttempts,'lowLatencyMultiplyFactor',5),_retryAttempts),abr:{movingAverageMethod:_Constants2.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:_Constants2.default.ABR_STRATEGY_DYNAMIC,bandwidthSafetyFactor:0.9,useDefaultABRRules:true,useDeadTimeLatency:true,limitBitrateByPortal:false,usePixelRatioInLimitBitrateByPortal:false,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:true,video:true},fetchThroughputCalculationMode:_Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA},cmcd:{enabled:false,sid:null,cid:null,rtp:null,rtpSafetyFactor:5}}};var settings=_Utils2.default.clone(defaultSettings);//Merge in the settings. If something exists in the new config that doesn't match the schema of the default config,\\n//regard it as an error and log it.\\nfunction mixinSettings(source,dest,path){for(var n in source){if(source.hasOwnProperty(n)){if(dest.hasOwnProperty(n)){if(_typeof(source[n])==='object'&&source[n]!==null){mixinSettings(source[n],dest[n],path.slice()+n+'.');}else{dest[n]=_Utils2.default.clone(source[n]);}}}}}/**\\n     * Return the settings object. Don't copy/store this object, you won't get updates.\\n     * @func\\n     * @instance\\n     */function get(){return settings;}/**\\n     * @func\\n     * @instance\\n     * @param {object} settingsObj - This should be a partial object of the Settings.Schema type. That is, fields defined should match the path (e.g.\\n     * settingsObj.streaming.abr.autoSwitchBitrate.audio -> defaultSettings.streaming.abr.autoSwitchBitrate.audio). Where an element's path does\\n     * not match it is ignored, and a warning is logged.\\n     *\\n     * Use to change the settings object. Any new values defined will overwrite the settings and anything undefined will not change.\\n     * Implementers of new settings should add it in an approriate namespace to the defaultSettings object and give it a default value (that is not undefined).\\n     *\\n     */function update(settingsObj){if((typeof settingsObj==='undefined'?'undefined':_typeof(settingsObj))==='object'){mixinSettings(settingsObj,settings,'');}}/**\\n     * Resets the settings object. Everything is set to its default value.\\n     * @func\\n     * @instance\\n     *\\n     */function reset(){settings=_Utils2.default.clone(defaultSettings);}instance={get:get,update:update,reset:reset};return instance;}Settings.__dashjs_factory_name='Settings';var factory=_FactoryMaker2.default.getSingletonFactory(Settings);exports.default=factory;\\n//# sourceMappingURL=Settings.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Settings.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/Utils.js\":\n/*!**********************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/Utils.js ***!\n  \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Utils=function(){function Utils(){_classCallCheck(this,Utils);}_createClass(Utils,null,[{key:'mixin',value:function mixin(dest,source,copy){var s=void 0;var empty={};if(dest){for(var name in source){if(source.hasOwnProperty(name)){s=source[name];if(!(name in dest)||dest[name]!==s&&(!(name in empty)||empty[name]!==s)){if(_typeof(dest[name])==='object'&&dest[name]!==null){dest[name]=Utils.mixin(dest[name],s,copy);}else{dest[name]=copy(s);}}}}}return dest;}},{key:'clone',value:function clone(src){if(!src||(typeof src==='undefined'?'undefined':_typeof(src))!=='object'){return src;// anything\\n}var r=void 0;if(src instanceof Array){// array\\nr=[];for(var i=0,l=src.length;i<l;++i){if(i in src){r.push(Utils.clone(src[i]));}}}else{r={};}return Utils.mixin(r,src,Utils.clone);}},{key:'addAditionalQueryParameterToUrl',value:function addAditionalQueryParameterToUrl(url,params){try{if(!params||params.length===0){return url;}var modifiedUrl=new URL(url);params.forEach(function(param){if(param.key&&param.value){modifiedUrl.searchParams.set(param.key,param.value);}});return modifiedUrl.href;}catch(e){return url;}}},{key:'parseHttpHeaders',value:function parseHttpHeaders(headerStr){var headers={};if(!headerStr){return headers;}// Trim headerStr to fix a MS Edge bug with xhr.getAllResponseHeaders method\\n// which send a string starting with a \\\"\\\\n\\\" character\\nvar headerPairs=headerStr.trim().split('\\\\r\\\\n');for(var i=0,ilen=headerPairs.length;i<ilen;i++){var headerPair=headerPairs[i];var index=headerPair.indexOf(': ');if(index>0){headers[headerPair.substring(0,index)]=headerPair.substring(index+2);}}return headers;}},{key:'generateUuid',value:function generateUuid(){var dt=new Date().getTime();var uuid='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=(dt+Math.random()*16)%16|0;dt=Math.floor(dt/16);return(c=='x'?r:r&0x3|0x8).toString(16);});return uuid;}},{key:'generateHashCode',value:function generateHashCode(string){var hash=0;if(string.length===0){return hash;}for(var i=0;i<string.length;i++){var chr=string.charCodeAt(i);hash=(hash<<5)-hash+chr;hash|=0;}return hash;}}]);return Utils;}();exports.default=Utils;\\n//# sourceMappingURL=Utils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Utils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/Version.js\":\n/*!************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/Version.js ***!\n  \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.getVersionString=getVersionString;var VERSION='3.2.1';function getVersionString(){return VERSION;}\\n//# sourceMappingURL=Version.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Version.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\":\n/*!******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/errors/Errors.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ErrorsBase2=__webpack_require__(/*! ./ErrorsBase */ \\\"../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js\\\");var _ErrorsBase3=_interopRequireDefault(_ErrorsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Errors declaration\\n * @class\\n */var Errors=function(_ErrorsBase){_inherits(Errors,_ErrorsBase);function Errors(){_classCallCheck(this,Errors);/**\\n         * Error code returned when a manifest parsing error occurs\\n         */var _this=_possibleConstructorReturn(this,(Errors.__proto__||Object.getPrototypeOf(Errors)).call(this));_this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10;/**\\n         * Error code returned when a manifest loading error occurs\\n         */_this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11;/**\\n         * Error code returned when a xlink loading error occurs\\n         */_this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12;/**\\n         * Error code returned when the update of segments list has failed\\n         */_this.SEGMENTS_UPDATE_FAILED_ERROR_CODE=13;_this.SEGMENTS_UNAVAILABLE_ERROR_CODE=14;_this.SEGMENT_BASE_LOADER_ERROR_CODE=15;_this.TIME_SYNC_FAILED_ERROR_CODE=16;_this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17;_this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18;_this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19;_this.APPEND_ERROR_CODE=20;_this.REMOVE_ERROR_CODE=21;_this.DATA_UPDATE_FAILED_ERROR_CODE=22;/**\\n         * Error code returned when MediaSource is not supported by the browser\\n         */_this.CAPABILITY_MEDIASOURCE_ERROR_CODE=23;/**\\n         * Error code returned when Protected contents are not supported\\n         */_this.CAPABILITY_MEDIAKEYS_ERROR_CODE=24;_this.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25;_this.DOWNLOAD_ERROR_ID_SIDX_CODE=26;_this.DOWNLOAD_ERROR_ID_CONTENT_CODE=27;_this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28;_this.DOWNLOAD_ERROR_ID_XLINK_CODE=29;_this.MANIFEST_ERROR_ID_CODEC_CODE=30;_this.MANIFEST_ERROR_ID_PARSE_CODE=31;/**\\n         * Error code returned when no stream (period) has been detected in the manifest\\n         */_this.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32;/**\\n         * Error code returned when something wrong has append during subtitles parsing (TTML or VTT)\\n         */_this.TIMED_TEXT_ERROR_ID_PARSE_CODE=33;/**\\n         * Error code returned when a 'muxed' media type has been detected in the manifest. This type is not supported\\n         */_this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34;/**\\n         * Error code returned when a media source type is not supported\\n         */_this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35;_this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE='parsing failed for ';_this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE='Failed loading manifest: ';_this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE='Failed loading Xlink element: ';_this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE='Segments update failed';_this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE='no segments are available yet';_this.SEGMENT_BASE_LOADER_ERROR_MESSAGE='error loading segments';_this.TIME_SYNC_FAILED_ERROR_MESSAGE='Failed to synchronize time';_this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE='request is null';_this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE='Failed to resolve a valid URL';_this.APPEND_ERROR_MESSAGE='chunk is not defined';_this.REMOVE_ERROR_MESSAGE='buffer is not defined';_this.DATA_UPDATE_FAILED_ERROR_MESSAGE='Data update failed';_this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE='mediasource is not supported';_this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE='mediakeys is not supported';_this.TIMED_TEXT_ERROR_MESSAGE_PARSE='parsing error :';_this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE='Error creating source buffer of type : ';return _this;}return Errors;}(_ErrorsBase3.default);var errors=new Errors();exports.default=errors;\\n//# sourceMappingURL=Errors.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/errors/Errors.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var ErrorsBase=function(){function ErrorsBase(){_classCallCheck(this,ErrorsBase);}_createClass(ErrorsBase,[{key:'extend',value:function extend(errors,config){if(!errors)return;var override=config?config.override:false;var publicOnly=config?config.publicOnly:false;for(var err in errors){if(!errors.hasOwnProperty(err)||this[err]&&!override)continue;if(publicOnly&&errors[err].indexOf('public_')===-1)continue;this[err]=errors[err];}}}]);return ErrorsBase;}();exports.default=ErrorsBase;\\n//# sourceMappingURL=ErrorsBase.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ./EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * These are internal events that should not be needed at the player level.\\n * If you find and event in here that you would like access to from MediaPlayer level\\n * please add an issue at https://github.com/Dash-Industry-Forum/dash.js/issues/new\\n * @class\\n * @ignore\\n */var CoreEvents=function(_EventsBase){_inherits(CoreEvents,_EventsBase);function CoreEvents(){_classCallCheck(this,CoreEvents);var _this=_possibleConstructorReturn(this,(CoreEvents.__proto__||Object.getPrototypeOf(CoreEvents)).call(this));_this.ATTEMPT_BACKGROUND_SYNC='attemptBackgroundSync';_this.BUFFERING_COMPLETED='bufferingCompleted';_this.BUFFER_CLEARED='bufferCleared';_this.BUFFER_LEVEL_UPDATED='bufferLevelUpdated';_this.BYTES_APPENDED='bytesAppended';_this.BYTES_APPENDED_END_FRAGMENT='bytesAppendedEndFragment';_this.CHECK_FOR_EXISTENCE_COMPLETED='checkForExistenceCompleted';_this.CURRENT_TRACK_CHANGED='currentTrackChanged';_this.DATA_UPDATE_COMPLETED='dataUpdateCompleted';_this.DATA_UPDATE_STARTED='dataUpdateStarted';_this.INBAND_EVENTS='inbandEvents';_this.INITIALIZATION_LOADED='initializationLoaded';_this.INIT_FRAGMENT_LOADED='initFragmentLoaded';_this.INIT_FRAGMENT_NEEDED='initFragmentNeeded';_this.INTERNAL_MANIFEST_LOADED='internalManifestLoaded';_this.ORIGINAL_MANIFEST_LOADED='originalManifestLoaded';_this.LIVE_EDGE_SEARCH_COMPLETED='liveEdgeSearchCompleted';_this.LOADING_COMPLETED='loadingCompleted';_this.LOADING_PROGRESS='loadingProgress';_this.LOADING_DATA_PROGRESS='loadingDataProgress';_this.LOADING_ABANDONED='loadingAborted';_this.MANIFEST_UPDATED='manifestUpdated';_this.MEDIA_FRAGMENT_LOADED='mediaFragmentLoaded';_this.MEDIA_FRAGMENT_NEEDED='mediaFragmentNeeded';_this.QUOTA_EXCEEDED='quotaExceeded';_this.REPRESENTATION_UPDATE_STARTED='representationUpdateStarted';_this.REPRESENTATION_UPDATE_COMPLETED='representationUpdateCompleted';_this.SEGMENTS_LOADED='segmentsLoaded';_this.SERVICE_LOCATION_BLACKLIST_ADD='serviceLocationBlacklistAdd';_this.SERVICE_LOCATION_BLACKLIST_CHANGED='serviceLocationBlacklistChanged';_this.SOURCEBUFFER_REMOVE_COMPLETED='sourceBufferRemoveCompleted';_this.STREAMS_COMPOSED='streamsComposed';_this.STREAM_BUFFERING_COMPLETED='streamBufferingCompleted';_this.STREAM_COMPLETED='streamCompleted';_this.TEXT_TRACKS_QUEUE_INITIALIZED='textTracksQueueInitialized';_this.TIME_SYNCHRONIZATION_COMPLETED='timeSynchronizationComplete';_this.UPDATE_TIME_SYNC_OFFSET='updateTimeSyncOffset';_this.URL_RESOLUTION_FAILED='urlResolutionFailed';_this.VIDEO_CHUNK_RECEIVED='videoChunkReceived';_this.WALLCLOCK_TIME_UPDATED='wallclockTimeUpdated';_this.XLINK_ELEMENT_LOADED='xlinkElementLoaded';_this.XLINK_READY='xlinkReady';_this.SEGMENTBASE_INIT_REQUEST_NEEDED='segmentBaseInitRequestNeeded';_this.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED='segmentBaseSegmentsListRequestNeeded';_this.SEEK_TARGET='seekTarget';return _this;}return CoreEvents;}(_EventsBase3.default);exports.default=CoreEvents;\\n//# sourceMappingURL=CoreEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\":\n/*!******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/events/Events.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CoreEvents2=__webpack_require__(/*! ./CoreEvents */ \\\"../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js\\\");var _CoreEvents3=_interopRequireDefault(_CoreEvents2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Events=function(_CoreEvents){_inherits(Events,_CoreEvents);function Events(){_classCallCheck(this,Events);return _possibleConstructorReturn(this,(Events.__proto__||Object.getPrototypeOf(Events)).apply(this,arguments));}return Events;}(_CoreEvents3.default);var events=new Events();exports.default=events;\\n//# sourceMappingURL=Events.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/events/Events.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/core/events/EventsBase.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var EventsBase=function(){function EventsBase(){_classCallCheck(this,EventsBase);}_createClass(EventsBase,[{key:'extend',value:function extend(events,config){if(!events)return;var override=config?config.override:false;var publicOnly=config?config.publicOnly:false;for(var evt in events){if(!events.hasOwnProperty(evt)||this[evt]&&!override)continue;if(publicOnly&&events[evt].indexOf('public_')===-1)continue;this[evt]=events[evt];}}}]);return EventsBase;}();exports.default=EventsBase;\\n//# sourceMappingURL=EventsBase.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/events/EventsBase.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/DashAdapter.js\":\n/*!****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/DashAdapter.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashConstants=__webpack_require__(/*! ./constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _RepresentationInfo=__webpack_require__(/*! ./vo/RepresentationInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js\\\");var _RepresentationInfo2=_interopRequireDefault(_RepresentationInfo);var _MediaInfo=__webpack_require__(/*! ./vo/MediaInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js\\\");var _MediaInfo2=_interopRequireDefault(_MediaInfo);var _StreamInfo=__webpack_require__(/*! ./vo/StreamInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js\\\");var _StreamInfo2=_interopRequireDefault(_StreamInfo);var _ManifestInfo=__webpack_require__(/*! ./vo/ManifestInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js\\\");var _ManifestInfo2=_interopRequireDefault(_ManifestInfo);var _Event=__webpack_require__(/*! ./vo/Event */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Event.js\\\");var _Event2=_interopRequireDefault(_Event);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashManifestModel=__webpack_require__(/*! ./models/DashManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\\\");var _DashManifestModel2=_interopRequireDefault(_DashManifestModel);var _PatchManifestModel=__webpack_require__(/*! ./models/PatchManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js\\\");var _PatchManifestModel2=_interopRequireDefault(_PatchManifestModel);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module DashAdapter\\n */function DashAdapter(){var instance=void 0,dashManifestModel=void 0,patchManifestModel=void 0,voPeriods=void 0,voAdaptations=void 0,currentMediaInfo=void 0,constants=void 0,cea608parser=void 0;var context=this.context;var PROFILE_DVB='urn:dvb:dash:profile:dvb-dash:2014';function setup(){dashManifestModel=(0,_DashManifestModel2.default)(context).getInstance();patchManifestModel=(0,_PatchManifestModel2.default)(context).getInstance();reset();}// #region PUBLIC FUNCTIONS\\n// --------------------------------------------------\\nfunction getVoAdaptations(){return voAdaptations;}function getVoPeriods(){return voPeriods;}function setConfig(config){if(!config)return;if(config.constants){constants=config.constants;}if(config.cea608parser){cea608parser=config.cea608parser;}if(config.errHandler){dashManifestModel.setConfig({errHandler:config.errHandler});}if(config.BASE64){dashManifestModel.setConfig({BASE64:config.BASE64});}}/**\\n     * Creates an instance of RepresentationInfo based on a representation value object\\n     * @param {object} voRepresentation\\n     * @returns {RepresentationInfo|null} representationInfo\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function convertRepresentationToRepresentationInfo(voRepresentation){if(voRepresentation){var representationInfo=new _RepresentationInfo2.default();var realAdaptation=voRepresentation.adaptation.period.mpd.manifest.Period_asArray[voRepresentation.adaptation.period.index].AdaptationSet_asArray[voRepresentation.adaptation.index];var realRepresentation=dashManifestModel.getRepresentationFor(voRepresentation.index,realAdaptation);representationInfo.id=voRepresentation.id;representationInfo.quality=voRepresentation.index;representationInfo.bandwidth=dashManifestModel.getBandwidth(realRepresentation);representationInfo.DVRWindow=voRepresentation.segmentAvailabilityRange;representationInfo.fragmentDuration=voRepresentation.segmentDuration||(voRepresentation.segments&&voRepresentation.segments.length>0?voRepresentation.segments[0].duration:NaN);representationInfo.MSETimeOffset=voRepresentation.MSETimeOffset;representationInfo.mediaInfo=convertAdaptationToMediaInfo(voRepresentation.adaptation);return representationInfo;}else{return null;}}/**\\n     * Returns a MediaInfo object for a given media type.\\n     * @param {object} streamInfo\\n     * @param {MediaType }type\\n     * @returns {null|MediaInfo} mediaInfo\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getMediaInfoForType(streamInfo,type){if(voPeriods.length===0||!streamInfo){return null;}var selectedVoPeriod=getPeriodForStreamInfo(streamInfo,voPeriods);if(!selectedVoPeriod)return null;var periodId=selectedVoPeriod.id;voAdaptations[periodId]=voAdaptations[periodId]||dashManifestModel.getAdaptationsForPeriod(selectedVoPeriod);var realAdaptation=getAdaptationForType(streamInfo.index,type,streamInfo);if(!realAdaptation)return null;var idx=dashManifestModel.getIndexForAdaptation(realAdaptation,voPeriods[0].mpd.manifest,streamInfo.index);return convertAdaptationToMediaInfo(voAdaptations[periodId][idx]);}/**\\n     * Checks if the role of the specified AdaptationSet is set to main\\n     * @param {object} adaptation\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getIsMain(adaptation){return dashManifestModel.getRolesForAdaptation(adaptation).filter(function(role){return role.value===_DashConstants2.default.MAIN;})[0];}/**\\n     * Returns the AdaptationSet for a given period and a given mediaType.\\n     * @param {number} periodIndex\\n     * @param {MediaType} type\\n     * @param {object} streamInfo\\n     * @returns {null|object} adaptation\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getAdaptationForType(periodIndex,type,streamInfo){var adaptations=dashManifestModel.getAdaptationsForType(voPeriods[0].mpd.manifest,periodIndex,type);if(!adaptations||adaptations.length===0)return null;if(adaptations.length>1&&streamInfo){var allMediaInfoForType=getAllMediaInfoForType(streamInfo,type);if(currentMediaInfo[streamInfo.id]&&currentMediaInfo[streamInfo.id][type]){for(var i=0,ln=adaptations.length;i<ln;i++){if(areMediaInfosEqual(currentMediaInfo[streamInfo.id][type],allMediaInfoForType[i])){return adaptations[i];}}}for(var _i=0,_ln=adaptations.length;_i<_ln;_i++){if(getIsMain(adaptations[_i])){return adaptations[_i];}}}return adaptations[0];}/**\\n     * Compares two mediaInfo objects\\n     * @param {MediaInfo} mInfoOne\\n     * @param {MediaInfo} mInfoTwo\\n     * @returns {boolean}\\n     */function areMediaInfosEqual(mInfoOne,mInfoTwo){if(!mInfoOne||!mInfoTwo){return false;}var sameId=mInfoOne.id===mInfoTwo.id;var sameViewpoint=mInfoOne.viewpoint===mInfoTwo.viewpoint;var sameLang=mInfoOne.lang===mInfoTwo.lang;var sameRoles=mInfoOne.roles.toString()===mInfoTwo.roles.toString();var sameAccessibility=mInfoOne.accessibility.toString()===mInfoTwo.accessibility.toString();var sameAudioChannelConfiguration=mInfoOne.audioChannelConfiguration.toString()===mInfoTwo.audioChannelConfiguration.toString();return sameId&&sameViewpoint&&sameLang&&sameRoles&&sameAccessibility&&sameAudioChannelConfiguration;}/**\\n     * Returns the mediaInfo for a given mediaType\\n     * @param {object} streamInfo\\n     * @param {MediaType} type\\n     * @param {object} externalManifest Set to null or undefined if no external manifest is to be used\\n     * @returns {Array} mediaArr\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getAllMediaInfoForType(streamInfo,type,externalManifest){var voLocalPeriods=voPeriods;var manifest=externalManifest;var mediaArr=[];var data=void 0,media=void 0,idx=void 0,i=void 0,j=void 0,ln=void 0,periodId=void 0;if(manifest){checkConfig();voLocalPeriods=getRegularPeriods(manifest);}else{if(voPeriods.length>0){manifest=voPeriods[0].mpd.manifest;}else{return mediaArr;}}var selectedVoPeriod=getPeriodForStreamInfo(streamInfo,voLocalPeriods);if(selectedVoPeriod){periodId=selectedVoPeriod.id;}var adaptationsForType=dashManifestModel.getAdaptationsForType(manifest,streamInfo?streamInfo.index:null,type!==constants.EMBEDDED_TEXT?type:constants.VIDEO);if(!adaptationsForType||adaptationsForType.length===0)return mediaArr;voAdaptations[periodId]=voAdaptations[periodId]||dashManifestModel.getAdaptationsForPeriod(selectedVoPeriod);for(i=0,ln=adaptationsForType.length;i<ln;i++){data=adaptationsForType[i];idx=dashManifestModel.getIndexForAdaptation(data,manifest,streamInfo.index);media=convertAdaptationToMediaInfo(voAdaptations[periodId][idx]);if(type===constants.EMBEDDED_TEXT){var accessibilityLength=media.accessibility.length;for(j=0;j<accessibilityLength;j++){if(!media){continue;}var accessibility=media.accessibility[j];if(accessibility.indexOf('cea-608:')===0){var value=accessibility.substring(8);var parts=value.split(';');if(parts[0].substring(0,2)==='CC'){for(j=0;j<parts.length;j++){if(!media){media=convertAdaptationToMediaInfo.call(this,voAdaptations[periodId][idx]);}convertVideoInfoToEmbeddedTextInfo(media,parts[j].substring(0,3),parts[j].substring(4));mediaArr.push(media);media=null;}}else{for(j=0;j<parts.length;j++){// Only languages for CC1, CC2, ...\\nif(!media){media=convertAdaptationToMediaInfo.call(this,voAdaptations[periodId][idx]);}convertVideoInfoToEmbeddedTextInfo(media,'CC'+(j+1),parts[j]);mediaArr.push(media);media=null;}}}else if(accessibility.indexOf('cea-608')===0){// Nothing known. We interpret it as CC1=eng\\nconvertVideoInfoToEmbeddedTextInfo(media,constants.CC1,'eng');mediaArr.push(media);media=null;}}}else if(type===constants.IMAGE){convertVideoInfoToThumbnailInfo(media);mediaArr.push(media);media=null;}else if(media){mediaArr.push(media);}}return mediaArr;}/**\\n     * @param {object} newManifest\\n     * @returns {*}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function updatePeriods(newManifest){if(!newManifest)return null;checkConfig();voPeriods=getRegularPeriods(newManifest);voAdaptations={};}/**\\n     * @param {object} externalManifest\\n     * @param {number} maxStreamsInfo\\n     * @returns {Array} streams\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getStreamsInfo(externalManifest,maxStreamsInfo){var streams=[];var voLocalPeriods=voPeriods;//if manifest is defined, getStreamsInfo is for an outside manifest, not the current one\\nif(externalManifest){checkConfig();voLocalPeriods=getRegularPeriods(externalManifest);}if(voLocalPeriods.length>0){if(!maxStreamsInfo||maxStreamsInfo>voLocalPeriods.length){maxStreamsInfo=voLocalPeriods.length;}for(var i=0;i<maxStreamsInfo;i++){streams.push(convertPeriodToStreamInfo(voLocalPeriods[i]));}}return streams;}/**\\n     *\\n     * @param {object} streamInfo\\n     * @param {object} mediaInfo\\n     * @returns {object} realAdaptation\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getRealAdaptation(streamInfo,mediaInfo){var id=void 0,realAdaptation=void 0;var selectedVoPeriod=getPeriodForStreamInfo(streamInfo,voPeriods);id=mediaInfo?mediaInfo.id:null;if(voPeriods.length>0&&selectedVoPeriod){realAdaptation=id?dashManifestModel.getAdaptationForId(id,voPeriods[0].mpd.manifest,selectedVoPeriod.index):dashManifestModel.getAdaptationForIndex(mediaInfo?mediaInfo.index:null,voPeriods[0].mpd.manifest,selectedVoPeriod.index);}return realAdaptation;}/**\\n     * Return all EssentialProperties of a Representation\\n     * @param {object} representation\\n     * @return {array}\\n     */function getEssentialPropertiesForRepresentation(representation){try{return dashManifestModel.getEssentialPropertiesForRepresentation(representation);}catch(e){return[];}}/**\\n     * Returns the period by index\\n     * @param {number} index\\n     * @return {object}\\n     */function getRealPeriodByIndex(index){return dashManifestModel.getRealPeriodForIndex(index,voPeriods[0].mpd.manifest);}/**\\n     * Returns all voRepresentations for a given mediaInfo\\n     * @param {object} mediaInfo\\n     * @returns {Array} voReps\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getVoRepresentations(mediaInfo){var voReps=void 0;var voAdaptation=getAdaptationForMediaInfo(mediaInfo);voReps=dashManifestModel.getRepresentationsForAdaptation(voAdaptation);return voReps;}/**\\n     *\\n     * @param {object} eventBox\\n     * @param {object} eventStreams\\n     * @param {number} mediaStartTime\\n     * @param {object} voRepresentation\\n     * @returns {null|Event}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getEvent(eventBox,eventStreams,mediaStartTime,voRepresentation){try{if(!eventBox||!eventStreams||isNaN(mediaStartTime)||!voRepresentation){return null;}var schemeIdUri=eventBox.scheme_id_uri;var value=eventBox.value;if(!eventStreams[schemeIdUri+'/'+value]){return null;}var event=new _Event2.default();var timescale=eventBox.timescale||1;var periodStart=voRepresentation.adaptation.period.start;var eventStream=eventStreams[schemeIdUri+'/'+value];var presentationTimeOffset=!isNaN(voRepresentation.presentationTimeOffset)?voRepresentation.presentationTimeOffset:!isNaN(eventStream.presentationTimeOffset)?eventStream.presentationTimeOffset:0;var presentationTimeDelta=eventBox.presentation_time_delta/timescale;// In case of version 1 events the presentation_time is parsed as presentation_time_delta\\nvar calculatedPresentationTime=void 0;if(eventBox.version===0){calculatedPresentationTime=periodStart+mediaStartTime-presentationTimeOffset+presentationTimeDelta;}else{calculatedPresentationTime=periodStart-presentationTimeOffset+presentationTimeDelta;}var duration=eventBox.event_duration;var id=eventBox.id;var messageData=eventBox.message_data;event.eventStream=eventStream;event.eventStream.value=value;event.eventStream.timescale=timescale;event.duration=duration;event.id=id;event.calculatedPresentationTime=calculatedPresentationTime;event.messageData=messageData;event.presentationTimeDelta=presentationTimeDelta;return event;}catch(e){return null;}}/**\\n     *\\n     * @param {object} info\\n     * @param {object} voRepresentation\\n     * @returns {Array}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getEventsFor(info,voRepresentation){var events=[];if(voPeriods.length>0){var manifest=voPeriods[0].mpd.manifest;if(info instanceof _StreamInfo2.default){events=dashManifestModel.getEventsForPeriod(getPeriodForStreamInfo(info,voPeriods));}else if(info instanceof _MediaInfo2.default){events=dashManifestModel.getEventStreamForAdaptationSet(manifest,getAdaptationForMediaInfo(info));}else if(info instanceof _RepresentationInfo2.default){events=dashManifestModel.getEventStreamForRepresentation(manifest,voRepresentation);}}return events;}/**\\n     *\\n     * @param {number} streamId\\n     * @param {MediaType} type\\n     * @param {object} mediaInfo\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function setCurrentMediaInfo(streamId,type,mediaInfo){currentMediaInfo[streamId]=currentMediaInfo[streamId]||{};currentMediaInfo[streamId][type]=currentMediaInfo[streamId][type]||{};currentMediaInfo[streamId][type]=mediaInfo;}/**\\n     *\\n     * @param {String} type\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getIsTextTrack(type){return dashManifestModel.getIsTextTrack(type);}/**\\n     * Returns the UTC Timing Sources specified in the manifest\\n     * @returns {Array} utcTimingSources\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getUTCTimingSources(){var manifest=getManifest();return dashManifestModel.getUTCTimingSources(manifest);}/**\\n     * Returns the suggestedPresentationDelay as specified in the manifest\\n     * @returns {String} suggestedPresentationDelay\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getSuggestedPresentationDelay(){var mpd=voPeriods.length>0?voPeriods[0].mpd:null;return dashManifestModel.getSuggestedPresentationDelay(mpd);}/**\\n     * Returns the availabilityStartTime as specified in the manifest\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {string} availabilityStartTime\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getAvailabilityStartTime(externalManifest){var mpd=getMpd(externalManifest);return dashManifestModel.getAvailabilityStartTime(mpd);}/**\\n     * Returns a boolean indicating if the manifest is dynamic or not\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getIsDynamic(externalManifest){var manifest=getManifest(externalManifest);return dashManifestModel.getIsDynamic(manifest);}/**\\n     * Returns the duration of the MPD\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {number} duration\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getDuration(externalManifest){var manifest=getManifest(externalManifest);return dashManifestModel.getDuration(manifest);}/**\\n     * Returns all periods of the MPD\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {Array} periods\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getRegularPeriods(externalManifest){var mpd=getMpd(externalManifest);return dashManifestModel.getRegularPeriods(mpd);}/**\\n     * Returns an MPD object\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {object} MPD\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getMpd(externalManifest){var manifest=getManifest(externalManifest);return dashManifestModel.getMpd(manifest);}/**\\n     * Returns the location element of the MPD\\n     * @param {object} manifest\\n     * @returns {String} location\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getLocation(manifest){return dashManifestModel.getLocation(manifest);}/**\\n     * Returns the manifest update period used for dynamic manifests\\n     * @param {object} manifest\\n     * @param {number} latencyOfLastUpdate\\n     * @returns {NaN|number} manifestUpdatePeriod\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getManifestUpdatePeriod(manifest){var latencyOfLastUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;return dashManifestModel.getManifestUpdatePeriod(manifest,latencyOfLastUpdate);}/**\\n     * Returns the publish time from the manifest\\n     * @param {object} manifest\\n     * @returns {Date|null} publishTime\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getPublishTime(manifest){return dashManifestModel.getPublishTime(manifest);}/**\\n     * Returns the patch location of the MPD if one exists and it is still valid\\n     * @param {object} manifest\\n     * @returns {(String|null)} patch location\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getPatchLocation(manifest){var patchLocation=dashManifestModel.getPatchLocation(manifest);var publishTime=dashManifestModel.getPublishTime(manifest);// short-circuit when no patch location or publish time exists\\nif(!patchLocation||!publishTime){return null;}// if a ttl is provided, ensure patch location has not expired\\nif(patchLocation.hasOwnProperty('ttl')&&publishTime){// attribute describes number of seconds as a double\\nvar ttl=parseFloat(patchLocation.ttl)*1000;// check if the patch location has expired, if so do not consider it\\nif(publishTime.getTime()+ttl<=new Date().getTime()){return null;}}// the patch location exists and, if a ttl applies, has not expired\\nreturn patchLocation.__text;}/**\\n     * Checks if the manifest has a DVB profile\\n     * @param {object} manifest\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getIsDVB(manifest){return dashManifestModel.hasProfile(manifest,PROFILE_DVB);}/**\\n     * Checks if the manifest is actually just a patch manifest\\n     * @param  {object} manifest\\n     * @return {boolean}\\n     */function getIsPatch(manifest){return patchManifestModel.getIsPatch(manifest);}/**\\n     *\\n     * @param {object} node\\n     * @returns {Array}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getBaseURLsFromElement(node){return dashManifestModel.getBaseURLsFromElement(node);}/**\\n     *\\n     * @returns {*}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getRepresentationSortFunction(){return dashManifestModel.getRepresentationSortFunction();}/**\\n     * Returns the codec for a given adaptation set and a given representation id.\\n     * @param {object} adaptation\\n     * @param {number} representationId\\n     * @param {boolean} addResolutionInfo Defines whether to include resolution information in the output\\n     * @returns {String} codec\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getCodec(adaptation,representationId,addResolutionInfo){return dashManifestModel.getCodec(adaptation,representationId,addResolutionInfo);}/**\\n     * Returns the bandwidth for a given representation id\\n     * @param {number} representationId\\n     * @param {number} periodIdx\\n     * @returns {number} bandwidth\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getBandwidthForRepresentation(representationId,periodIdx){var representation=void 0;var period=getPeriod(periodIdx);representation=findRepresentation(period,representationId);return representation?representation.bandwidth:null;}/**\\n     * Returns the index for a given representation id\\n     * @param {string} representationId\\n     * @param {number} periodIdx\\n     * @returns {number} index\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getIndexForRepresentation(representationId,periodIdx){var period=getPeriod(periodIdx);return findRepresentationIndex(period,representationId);}/**\\n     * This method returns the current max index based on what is defined in the MPD.\\n     *\\n     * @param {string} bufferType - String 'audio' or 'video',\\n     * @param {number} periodIdx - Make sure this is the period index not id\\n     * @return {number}\\n     * @memberof module:DashAdapter\\n     * @instance\\n     */function getMaxIndexForBufferType(bufferType,periodIdx){var period=getPeriod(periodIdx);return findMaxBufferIndex(period,bufferType);}/**\\n     * Returns the voPeriod object for a given id\\n     * @param {String} id\\n     * @returns {object|null}\\n     */function getPeriodById(id){if(!id||voPeriods.length===0){return null;}var periods=voPeriods.filter(function(p){return p.id===id;});if(periods&&periods.length>0){return periods[0];}return null;}function getIsTypeOf(adaptation,type){return dashManifestModel.getIsTypeOf(adaptation,type);}function reset(){voPeriods=[];voAdaptations={};currentMediaInfo={};}/**\\n     * Checks if the supplied manifest is compatible for application of the supplied patch\\n     * @param  {object}  manifest\\n     * @param  {object}  patch\\n     * @return {boolean}\\n     */function isPatchValid(manifest,patch){var manifestId=dashManifestModel.getId(manifest);var patchManifestId=patchManifestModel.getMpdId(patch);var manifestPublishTime=dashManifestModel.getPublishTime(manifest);var patchPublishTime=patchManifestModel.getPublishTime(patch);var originalManifestPublishTime=patchManifestModel.getOriginalPublishTime(patch);// Patches are considered compatible if the following are true\\n// - MPD@id == Patch@mpdId\\n// - MPD@publishTime == Patch@originalPublishTime\\n// - MPD@publishTime < Patch@publishTime\\n// - All values in comparison exist\\nreturn!!(manifestId&&patchManifestId&&manifestId==patchManifestId&&manifestPublishTime&&originalManifestPublishTime&&manifestPublishTime.getTime()==originalManifestPublishTime.getTime()&&patchPublishTime&&manifestPublishTime.getTime()<patchPublishTime.getTime());}/**\\n     * Takes a given patch and applies it to the provided manifest, assumes patch is valid for manifest\\n     * @param  {object} manifest\\n     * @param  {object} patch\\n     */function applyPatchToManifest(manifest,patch){// get all operations from the patch and apply them in document order\\npatchManifestModel.getPatchOperations(patch).forEach(function(operation){var result=operation.getMpdTarget(manifest);// operation supplies a path that doesn't match mpd, skip\\nif(result===null){return;}var name=result.name,target=result.target,leaf=result.leaf;// short circuit for attribute selectors\\nif(operation.xpath.findsAttribute()){switch(operation.action){case'add':case'replace':// add and replace are just setting the value\\ntarget[name]=operation.value;break;case'remove':// remove is deleting the value\\ndelete target[name];break;}return;}// determine the relative insert position prior to possible removal\\nvar relativePosition=(target[name+'_asArray']||[]).indexOf(leaf);var insertBefore=operation.position==='prepend'||operation.position==='before';// perform removal operation first, we have already capture the appropriate relative position\\nif(operation.action==='remove'||operation.action==='replace'){// note that we ignore the 'ws' attribute of patch operations as it does not effect parsed mpd operations\\n// purge the directly named entity\\ndelete target[name];// if we did have a positional reference we need to purge from array set and restore X2JS proper semantics\\nif(relativePosition!=-1){var targetArray=target[name+'_asArray'];targetArray.splice(relativePosition,1);if(targetArray.length>1){target[name]=targetArray;}else if(targetArray.length==1){// xml parsing semantics, singular asArray must be non-array in the unsuffixed key\\ntarget[name]=targetArray[0];}else{// all nodes of this type deleted, remove entry\\ndelete target[name+'_asArray'];}}}// Perform any add/replace operations now, technically RFC5261 only allows a single element to take the\\n// place of a replaced element while the add case allows an arbitrary number of children.\\n// Due to the both operations requiring the same insertion logic they have been combined here and we will\\n// not enforce single child operations for replace, assertions should be made at patch parse time if necessary\\nif(operation.action==='add'||operation.action==='replace'){// value will be an object with element name keys pointing to arrays of objects\\nObject.keys(operation.value).forEach(function(insert){var insertNodes=operation.value[insert];var updatedNodes=target[insert+'_asArray']||[];if(updatedNodes.length===0&&target[insert]){updatedNodes.push(target[insert]);}if(updatedNodes.length===0){// no original nodes for this element type\\nupdatedNodes=insertNodes;}else{// compute the position we need to insert at, default to end of set\\nvar position=updatedNodes.length;if(insert==name&&relativePosition!=-1){// if the inserted element matches the operation target (not leaf) and there is a relative position we\\n// want the inserted position to be set such that our insertion is relative to original position\\n// since replace has modified the array length we reduce the insert point by 1\\nposition=relativePosition+(insertBefore?0:1)+(operation.action=='replace'?-1:0);}else{// otherwise we are in an add append/prepend case or replace case that removed the target name completely\\nposition=insertBefore?0:updatedNodes.length;}// we dont have to perform element removal for the replace case as that was done above\\nupdatedNodes.splice.apply(updatedNodes,[position,0].concat(insertNodes));}// now we properly reset the element keys on the target to match parsing semantics\\ntarget[insert+'_asArray']=updatedNodes;target[insert]=updatedNodes.length==1?updatedNodes[0]:updatedNodes;});}});}// #endregion PUBLIC FUNCTIONS\\n// #region PRIVATE FUNCTIONS\\n// --------------------------------------------------\\nfunction getManifest(externalManifest){return externalManifest?externalManifest:voPeriods.length>0?voPeriods[0].mpd.manifest:null;}function getAdaptationForMediaInfo(mediaInfo){if(!mediaInfo||!mediaInfo.streamInfo||mediaInfo.streamInfo.id===undefined||!voAdaptations[mediaInfo.streamInfo.id])return null;return voAdaptations[mediaInfo.streamInfo.id][mediaInfo.index];}function getPeriodForStreamInfo(streamInfo,voPeriodsArray){var ln=voPeriodsArray.length;for(var i=0;i<ln;i++){var voPeriod=voPeriodsArray[i];if(streamInfo&&streamInfo.id===voPeriod.id)return voPeriod;}return null;}function convertAdaptationToMediaInfo(adaptation){if(!adaptation){return null;}var mediaInfo=new _MediaInfo2.default();var realAdaptation=adaptation.period.mpd.manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index];var viewpoint=void 0;mediaInfo.id=adaptation.id;mediaInfo.index=adaptation.index;mediaInfo.type=adaptation.type;mediaInfo.streamInfo=convertPeriodToStreamInfo(adaptation.period);mediaInfo.representationCount=dashManifestModel.getRepresentationCount(realAdaptation);mediaInfo.labels=dashManifestModel.getLabelsForAdaptation(realAdaptation);mediaInfo.lang=dashManifestModel.getLanguageForAdaptation(realAdaptation);viewpoint=dashManifestModel.getViewpointForAdaptation(realAdaptation);mediaInfo.viewpoint=viewpoint?viewpoint.value:undefined;mediaInfo.accessibility=dashManifestModel.getAccessibilityForAdaptation(realAdaptation).map(function(accessibility){var accessibilityValue=accessibility.value;var accessibilityData=accessibilityValue;if(accessibility.schemeIdUri&&accessibility.schemeIdUri.search('cea-608')>=0&&typeof cea608parser!=='undefined'){if(accessibilityValue){accessibilityData='cea-608:'+accessibilityValue;}else{accessibilityData='cea-608';}mediaInfo.embeddedCaptions=true;}return accessibilityData;});mediaInfo.audioChannelConfiguration=dashManifestModel.getAudioChannelConfigurationForAdaptation(realAdaptation).map(function(audioChannelConfiguration){return audioChannelConfiguration.value;});if(mediaInfo.audioChannelConfiguration.length===0&&Array.isArray(realAdaptation.Representation_asArray)&&realAdaptation.Representation_asArray.length>0){mediaInfo.audioChannelConfiguration=dashManifestModel.getAudioChannelConfigurationForRepresentation(realAdaptation.Representation_asArray[0]).map(function(audioChannelConfiguration){return audioChannelConfiguration.value;});}mediaInfo.roles=dashManifestModel.getRolesForAdaptation(realAdaptation).map(function(role){return role.value;});mediaInfo.codec=dashManifestModel.getCodec(realAdaptation);mediaInfo.mimeType=dashManifestModel.getMimeType(realAdaptation);mediaInfo.contentProtection=dashManifestModel.getContentProtectionData(realAdaptation);mediaInfo.bitrateList=dashManifestModel.getBitrateListForAdaptation(realAdaptation);if(mediaInfo.contentProtection){mediaInfo.contentProtection.forEach(function(item){item.KID=dashManifestModel.getKID(item);});}mediaInfo.isText=dashManifestModel.getIsTextTrack(mediaInfo.mimeType);mediaInfo.supplementalProperties=dashManifestModel.getSupplementalPropperties(realAdaptation);return mediaInfo;}function convertVideoInfoToEmbeddedTextInfo(mediaInfo,channel,lang){mediaInfo.id=channel;// CC1, CC2, CC3, or CC4\\nmediaInfo.index=100+parseInt(channel.substring(2,3));mediaInfo.type=constants.EMBEDDED_TEXT;mediaInfo.codec='cea-608-in-SEI';mediaInfo.isText=true;mediaInfo.isEmbedded=true;mediaInfo.lang=lang;mediaInfo.roles=['caption'];}function convertVideoInfoToThumbnailInfo(mediaInfo){mediaInfo.type=constants.IMAGE;}function convertPeriodToStreamInfo(period){var streamInfo=new _StreamInfo2.default();var THRESHOLD=1;streamInfo.id=period.id;streamInfo.index=period.index;streamInfo.start=period.start;streamInfo.duration=period.duration;streamInfo.manifestInfo=convertMpdToManifestInfo(period.mpd);streamInfo.isLast=period.mpd.manifest.Period_asArray.length===1||Math.abs(streamInfo.start+streamInfo.duration-streamInfo.manifestInfo.duration)<THRESHOLD;return streamInfo;}function convertMpdToManifestInfo(mpd){var manifestInfo=new _ManifestInfo2.default();manifestInfo.DVRWindowSize=mpd.timeShiftBufferDepth;manifestInfo.loadedTime=mpd.manifest.loadedTime;manifestInfo.availableFrom=mpd.availabilityStartTime;manifestInfo.minBufferTime=mpd.manifest.minBufferTime;manifestInfo.maxFragmentDuration=mpd.maxSegmentDuration;manifestInfo.duration=dashManifestModel.getDuration(mpd.manifest);manifestInfo.isDynamic=dashManifestModel.getIsDynamic(mpd.manifest);manifestInfo.serviceDescriptions=dashManifestModel.getServiceDescriptions(mpd.manifest);manifestInfo.protocol=mpd.manifest.protocol;return manifestInfo;}function checkConfig(){if(!constants){throw new Error('setConfig function has to be called previously');}}function getPeriod(periodIdx){return voPeriods.length>0?voPeriods[0].mpd.manifest.Period_asArray[periodIdx]:null;}function findRepresentationIndex(period,representationId){var index=findRepresentation(period,representationId,true);return index!==null?index:-1;}function findRepresentation(period,representationId,returnIndex){var adaptationSet=void 0,adaptationSetArray=void 0,representation=void 0,representationArray=void 0,adaptationSetArrayIndex=void 0,representationArrayIndex=void 0;if(period){adaptationSetArray=period.AdaptationSet_asArray;for(adaptationSetArrayIndex=0;adaptationSetArrayIndex<adaptationSetArray.length;adaptationSetArrayIndex=adaptationSetArrayIndex+1){adaptationSet=adaptationSetArray[adaptationSetArrayIndex];representationArray=adaptationSet.Representation_asArray;for(representationArrayIndex=0;representationArrayIndex<representationArray.length;representationArrayIndex=representationArrayIndex+1){representation=representationArray[representationArrayIndex];if(representationId===representation.id){if(returnIndex){return representationArrayIndex;}else{return representation;}}}}}return null;}function findMaxBufferIndex(period,bufferType){var adaptationSet=void 0,adaptationSetArray=void 0,representationArray=void 0,adaptationSetArrayIndex=void 0;if(!period||!bufferType)return-1;adaptationSetArray=period.AdaptationSet_asArray;for(adaptationSetArrayIndex=0;adaptationSetArrayIndex<adaptationSetArray.length;adaptationSetArrayIndex=adaptationSetArrayIndex+1){adaptationSet=adaptationSetArray[adaptationSetArrayIndex];representationArray=adaptationSet.Representation_asArray;if(dashManifestModel.getIsTypeOf(adaptationSet,bufferType)){return representationArray.length;}}return-1;}// #endregion PRIVATE FUNCTIONS\\ninstance={getBandwidthForRepresentation:getBandwidthForRepresentation,getIndexForRepresentation:getIndexForRepresentation,getMaxIndexForBufferType:getMaxIndexForBufferType,convertDataToRepresentationInfo:convertRepresentationToRepresentationInfo,getDataForMedia:getAdaptationForMediaInfo,getStreamsInfo:getStreamsInfo,getMediaInfoForType:getMediaInfoForType,getAllMediaInfoForType:getAllMediaInfoForType,getAdaptationForType:getAdaptationForType,getRealAdaptation:getRealAdaptation,getRealPeriodByIndex:getRealPeriodByIndex,getEssentialPropertiesForRepresentation:getEssentialPropertiesForRepresentation,getVoRepresentations:getVoRepresentations,getEventsFor:getEventsFor,getEvent:getEvent,getMpd:getMpd,setConfig:setConfig,updatePeriods:updatePeriods,getIsTextTrack:getIsTextTrack,getUTCTimingSources:getUTCTimingSources,getSuggestedPresentationDelay:getSuggestedPresentationDelay,getAvailabilityStartTime:getAvailabilityStartTime,getIsTypeOf:getIsTypeOf,getIsDynamic:getIsDynamic,getDuration:getDuration,getRegularPeriods:getRegularPeriods,getLocation:getLocation,getPatchLocation:getPatchLocation,getManifestUpdatePeriod:getManifestUpdatePeriod,getPublishTime:getPublishTime,getIsDVB:getIsDVB,getIsPatch:getIsPatch,getBaseURLsFromElement:getBaseURLsFromElement,getRepresentationSortFunction:getRepresentationSortFunction,getCodec:getCodec,getVoAdaptations:getVoAdaptations,getVoPeriods:getVoPeriods,getPeriodById:getPeriodById,setCurrentMediaInfo:setCurrentMediaInfo,isPatchValid:isPatchValid,applyPatchToManifest:applyPatchToManifest,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashAdapter.__dashjs_factory_name='DashAdapter';exports.default=_FactoryMaker2.default.getSingletonFactory(DashAdapter);\\n//# sourceMappingURL=DashAdapter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/DashAdapter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/DashHandler.js\":\n/*!****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/DashHandler.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FragmentRequest=__webpack_require__(/*! ../streaming/vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _HTTPRequest=__webpack_require__(/*! ../streaming/vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SegmentsUtils=__webpack_require__(/*! ./utils/SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");var _SegmentsController=__webpack_require__(/*! ./controllers/SegmentsController */ \\\"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js\\\");var _SegmentsController2=_interopRequireDefault(_SegmentsController);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DashHandler(config){config=config||{};var context=this.context;var eventBus=config.eventBus;var events=config.events;var debug=config.debug;var dashConstants=config.dashConstants;var urlUtils=config.urlUtils;var type=config.type;var streamInfo=config.streamInfo;var timelineConverter=config.timelineConverter;var dashMetrics=config.dashMetrics;var baseURLController=config.baseURLController;var instance=void 0,logger=void 0,segmentIndex=void 0,lastSegment=void 0,requestedTime=void 0,isDynamicManifest=void 0,dynamicStreamCompleted=void 0,selectedMimeType=void 0,segmentsController=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();segmentsController=(0,_SegmentsController2.default)(context).create(config);eventBus.on(events.INITIALIZATION_LOADED,onInitializationLoaded,instance);eventBus.on(events.SEGMENTS_LOADED,onSegmentsLoaded,instance);eventBus.on(events.REPRESENTATION_UPDATE_STARTED,onRepresentationUpdateStarted,instance);eventBus.on(events.DYNAMIC_TO_STATIC,onDynamicToStatic,instance);}function initialize(isDynamic){isDynamicManifest=isDynamic;dynamicStreamCompleted=false;segmentsController.initialize(isDynamic);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function getStreamInfo(){return streamInfo;}function setCurrentIndex(value){segmentIndex=value;}function getCurrentIndex(){return segmentIndex;}function resetIndex(){segmentIndex=-1;lastSegment=null;}function resetInitialSettings(){resetIndex();requestedTime=null;segmentsController=null;selectedMimeType=null;}function reset(){resetInitialSettings();eventBus.off(events.INITIALIZATION_LOADED,onInitializationLoaded,instance);eventBus.off(events.SEGMENTS_LOADED,onSegmentsLoaded,instance);eventBus.off(events.REPRESENTATION_UPDATE_STARTED,onRepresentationUpdateStarted,instance);eventBus.off(events.DYNAMIC_TO_STATIC,onDynamicToStatic,instance);}function setRequestUrl(request,destination,representation){var baseURL=baseURLController.resolve(representation.path);var url=void 0,serviceLocation=void 0;if(!baseURL||destination===baseURL.url||!urlUtils.isRelative(destination)){url=destination;}else{url=baseURL.url;serviceLocation=baseURL.serviceLocation;if(destination){url=urlUtils.resolve(destination,url);}}if(urlUtils.isRelative(url)){return false;}request.url=url;request.serviceLocation=serviceLocation;return true;}function generateInitRequest(mediaInfo,representation,mediaType){var request=new _FragmentRequest2.default();var period=representation.adaptation.period;var presentationStartTime=period.start;request.mediaType=mediaType;request.type=_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE;request.range=representation.range;request.availabilityStartTime=timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime,period.mpd,isDynamicManifest);request.availabilityEndTime=timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationStartTime+period.duration,period.mpd,isDynamicManifest);request.quality=representation.index;request.mediaInfo=mediaInfo;request.representationId=representation.id;if(setRequestUrl(request,representation.initialization,representation)){request.url=(0,_SegmentsUtils.replaceTokenForTemplate)(request.url,'Bandwidth',representation.bandwidth);return request;}}function getInitRequest(mediaInfo,representation){if(!representation)return null;var request=generateInitRequest(mediaInfo,representation,getType());return request;}function setMimeType(newMimeType){selectedMimeType=newMimeType;}function setExpectedLiveEdge(liveEdge){timelineConverter.setExpectedLiveEdge(liveEdge);dashMetrics.updateManifestUpdateInfo({presentationStartTime:liveEdge});}function onRepresentationUpdateStarted(e){processRepresentation(e.representation);}function processRepresentation(voRepresentation){var hasInitialization=voRepresentation.hasInitialization();var hasSegments=voRepresentation.hasSegments();// If representation has initialization and segments information, REPRESENTATION_UPDATE_COMPLETED can be triggered immediately\\n// otherwise, it means that a request has to be made to get initialization and/or segments informations\\nif(hasInitialization&&hasSegments){eventBus.trigger(events.REPRESENTATION_UPDATE_COMPLETED,{representation:voRepresentation},{streamId:streamInfo.id,mediaType:type});}else{segmentsController.update(voRepresentation,selectedMimeType,hasInitialization,hasSegments);}}function getRequestForSegment(mediaInfo,segment){if(segment===null||segment===undefined){return null;}var request=new _FragmentRequest2.default();var representation=segment.representation;var bandwidth=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].bandwidth;var url=segment.media;url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Number',segment.replacementNumber);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Time',segment.replacementTime);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Bandwidth',bandwidth);url=(0,_SegmentsUtils.replaceIDForTemplate)(url,representation.id);url=(0,_SegmentsUtils.unescapeDollarsInTemplate)(url);request.mediaType=getType();request.type=_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE;request.range=segment.mediaRange;request.startTime=segment.presentationStartTime;request.mediaStartTime=segment.mediaStartTime;request.duration=segment.duration;request.timescale=representation.timescale;request.availabilityStartTime=segment.availabilityStartTime;request.availabilityEndTime=segment.availabilityEndTime;request.wallStartTime=segment.wallStartTime;request.quality=representation.index;request.index=segment.availabilityIdx;request.mediaInfo=mediaInfo;request.adaptationIndex=representation.adaptation.index;request.representationId=representation.id;if(setRequestUrl(request,url,representation)){return request;}}function isMediaFinished(representation){var isFinished=false;if(!representation)return isFinished;if(!isDynamicManifest){if(segmentIndex>=representation.availableSegmentsNumber){isFinished=true;}}else{if(dynamicStreamCompleted){isFinished=true;}else if(lastSegment){var time=parseFloat((lastSegment.presentationStartTime-representation.adaptation.period.start).toFixed(5));var endTime=lastSegment.duration>0?time+1.5*lastSegment.duration:time;var duration=representation.adaptation.period.duration;isFinished=endTime>=duration;}}return isFinished;}function getSegmentRequestForTime(mediaInfo,representation,time,options){var request=null;if(!representation||!representation.segmentInfoType){return request;}var idx=segmentIndex;var keepIdx=options?options.keepIdx:false;var ignoreIsFinished=options&&options.ignoreIsFinished?true:false;if(requestedTime!==time){// When playing at live edge with 0 delay we may loop back with same time and index until it is available. Reduces verboseness of logs.\\nrequestedTime=time;logger.debug('Getting the request for time : '+time);}var segment=segmentsController.getSegmentByTime(representation,time);if(segment){segmentIndex=segment.availabilityIdx;lastSegment=segment;logger.debug('Index for time '+time+' is '+segmentIndex);request=getRequestForSegment(mediaInfo,segment);}else{var finished=!ignoreIsFinished?isMediaFinished(representation):false;if(finished){request=new _FragmentRequest2.default();request.action=_FragmentRequest2.default.ACTION_COMPLETE;request.index=segmentIndex-1;request.mediaType=type;request.mediaInfo=mediaInfo;logger.debug('Signal complete in getSegmentRequestForTime');}}if(keepIdx&&idx>=0){segmentIndex=representation.segmentInfoType===dashConstants.SEGMENT_TIMELINE&&isDynamicManifest?segmentIndex:idx;}return request;}/**\\n     * This function returns the next segment request without modifying any internal variables. Any class (e.g CMCD Model) that needs information about the upcoming request should use this method.\\n     * @param {object} mediaInfo\\n     * @param {object} representation\\n     * @return {FragmentRequest|null}\\n     */function getNextSegmentRequestIdempotent(mediaInfo,representation){var request=null;var indexToRequest=segmentIndex+1;var segment=segmentsController.getSegmentByIndex(representation,indexToRequest,lastSegment?lastSegment.mediaStartTime:-1);if(!segment)return null;request=getRequestForSegment(mediaInfo,segment);return request;}/**\\n     * Main function to get the next segment request.\\n     * @param {object} mediaInfo\\n     * @param {object} representation\\n     * @return {FragmentRequest|null}\\n     */function getNextSegmentRequest(mediaInfo,representation){var request=null;if(!representation||!representation.segmentInfoType){return null;}requestedTime=null;var indexToRequest=segmentIndex+1;logger.debug('Getting the next request at index: '+indexToRequest);// check that there is a segment in this index\\nvar segment=segmentsController.getSegmentByIndex(representation,indexToRequest,lastSegment?lastSegment.mediaStartTime:-1);if(!segment&&isEndlessMedia(representation)&&!dynamicStreamCompleted){logger.debug(getType()+' No segment found at index: '+indexToRequest+'. Wait for next loop');return null;}else{if(segment){request=getRequestForSegment(mediaInfo,segment);segmentIndex=segment.availabilityIdx;}else{if(isDynamicManifest){segmentIndex=indexToRequest-1;}else{segmentIndex=indexToRequest;}}}if(segment){lastSegment=segment;}else{var finished=isMediaFinished(representation,segment);if(finished){request=new _FragmentRequest2.default();request.action=_FragmentRequest2.default.ACTION_COMPLETE;request.index=segmentIndex-1;request.mediaType=getType();request.mediaInfo=mediaInfo;logger.debug('Signal complete');}}return request;}function isEndlessMedia(representation){return!isFinite(representation.adaptation.period.duration);}function onInitializationLoaded(e){var representation=e.representation;if(!representation.segments)return;eventBus.trigger(events.REPRESENTATION_UPDATE_COMPLETED,{representation:representation},{streamId:streamInfo.id,mediaType:type});}function onSegmentsLoaded(e){if(e.error)return;var fragments=e.segments;var representation=e.representation;var segments=[];var count=0;var i=void 0,len=void 0,s=void 0,seg=void 0;for(i=0,len=fragments?fragments.length:0;i<len;i++){s=fragments[i];seg=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,isDynamicManifest,representation,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,count);if(seg){segments.push(seg);seg=null;count++;}}if(segments.length>0){representation.segmentAvailabilityRange={start:segments[0].presentationStartTime,end:segments[segments.length-1].presentationStartTime};representation.availableSegmentsNumber=segments.length;representation.segments=segments;if(isDynamicManifest){var _lastSegment=segments[segments.length-1];var liveEdge=_lastSegment.presentationStartTime-8;// the last segment is the Expected, not calculated, live edge.\\nsetExpectedLiveEdge(liveEdge);}}if(!representation.hasInitialization()){return;}eventBus.trigger(events.REPRESENTATION_UPDATE_COMPLETED,{representation:representation},{streamId:streamInfo.id,mediaType:type});}function onDynamicToStatic(){logger.debug('Dynamic stream complete');dynamicStreamCompleted=true;}instance={initialize:initialize,getStreamId:getStreamId,getType:getType,getStreamInfo:getStreamInfo,getInitRequest:getInitRequest,getRequestForSegment:getRequestForSegment,getSegmentRequestForTime:getSegmentRequestForTime,getNextSegmentRequest:getNextSegmentRequest,setCurrentIndex:setCurrentIndex,getCurrentIndex:getCurrentIndex,isMediaFinished:isMediaFinished,reset:reset,resetIndex:resetIndex,setMimeType:setMimeType,getNextSegmentRequestIdempotent:getNextSegmentRequestIdempotent};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashHandler.__dashjs_factory_name='DashHandler';exports.default=_FactoryMaker2.default.getClassFactory(DashHandler);\\n//# sourceMappingURL=DashHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/DashHandler.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/DashMetrics.js\":\n/*!****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/DashMetrics.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../streaming/vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _MetricsConstants=__webpack_require__(/*! ../streaming/constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _Round=__webpack_require__(/*! ./utils/Round10 */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/Round10.js\\\");var _Round2=_interopRequireDefault(_Round);var _MetricsModel=__webpack_require__(/*! ../streaming/models/MetricsModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js\\\");var _MetricsModel2=_interopRequireDefault(_MetricsModel);var _Utils=__webpack_require__(/*! ../core/Utils */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);var _PlayList=__webpack_require__(/*! ../streaming/vo/metrics/PlayList */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module DashMetrics\\n * @param {object} config\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function DashMetrics(config){config=config||{};var context=this.context;var instance=void 0,playListTraceMetricsClosed=void 0,playListTraceMetrics=void 0,playListMetrics=void 0;var metricsModel=config.metricsModel;function setup(){metricsModel=metricsModel||(0,_MetricsModel2.default)(context).getInstance({settings:config.settings});resetInitialSettings();}function resetInitialSettings(){playListTraceMetricsClosed=true;playListTraceMetrics=null;playListMetrics=null;}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentRepresentationSwitch(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);return getCurrent(metrics,_MetricsConstants2.default.TRACK_SWITCH);}/**\\n     * @param {MediaType} mediaType\\n     * @param {Date} t time of the switch event\\n     * @param {Date} mt media presentation time\\n     * @param {string} to id of representation\\n     * @param {string} lto if present, subrepresentation reference\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addRepresentationSwitch(mediaType,t,mt,to,lto){metricsModel.addRepresentationSwitch(mediaType,t,mt,to,lto);}/**\\n     * @param {MediaType} type\\n     * @returns {number}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentBufferState(type){var metrics=metricsModel.getMetricsFor(type,true);return getCurrent(metrics,_MetricsConstants2.default.BUFFER_STATE);}/**\\n     * @param {MediaType} type\\n     * @returns {number}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentBufferLevel(type){var metrics=metricsModel.getMetricsFor(type,true);var metric=getCurrent(metrics,_MetricsConstants2.default.BUFFER_LEVEL);if(metric){return _Round2.default.round10(metric.level/1000,-3);}return 0;}/**\\n     * @param {MediaType} mediaType\\n     * @param {number} t\\n     * @param {number} level\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addBufferLevel(mediaType,t,level){metricsModel.addBufferLevel(mediaType,t,level);}/**\\n     * @param {MediaType} mediaType\\n     * @param {string} state\\n     * @param {number} target\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addBufferState(mediaType,state,target){metricsModel.addBufferState(mediaType,state,target);}/**\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function clearAllCurrentMetrics(){metricsModel.clearAllCurrentMetrics();}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentHttpRequest(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);if(!metrics){return null;}var httpList=metrics.HttpList;var currentHttpList=null;var httpListLastIndex=void 0;if(!httpList||httpList.length<=0){return null;}httpListLastIndex=httpList.length-1;while(httpListLastIndex>=0){if(httpList[httpListLastIndex].responsecode){currentHttpList=httpList[httpListLastIndex];break;}httpListLastIndex--;}return currentHttpList;}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getHttpRequests(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);if(!metrics){return[];}return!!metrics.HttpList?metrics.HttpList:[];}/**\\n     * @param {MediaType} mediaType\\n     * @param {Array} loadingRequests\\n     * @param {Array} executedRequests\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addRequestsQueue(mediaType,loadingRequests,executedRequests){metricsModel.addRequestsQueue(mediaType,loadingRequests,executedRequests);}/**\\n     * @param {MetricsList} metrics\\n     * @param {string} metricName\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrent(metrics,metricName){if(!metrics){return null;}var list=metrics[metricName];return!list||list.length===0?null:list[list.length-1];}/**\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function getCurrentDroppedFrames(){var metrics=metricsModel.getMetricsFor(_Constants2.default.VIDEO,true);return getCurrent(metrics,_MetricsConstants2.default.DROPPED_FRAMES);}/**\\n     * @param {number} quality\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addDroppedFrames(quality){metricsModel.addDroppedFrames(_Constants2.default.VIDEO,quality);}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentSchedulingInfo(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);return getCurrent(metrics,_MetricsConstants2.default.SCHEDULING_INFO);}/**\\n     * @param {object} request\\n     * @param {string} state\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addSchedulingInfo(request,state){metricsModel.addSchedulingInfo(request.mediaType,new Date(),request.type,request.startTime,request.availabilityStartTime,request.duration,request.quality,request.range,state);}/**\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentManifestUpdate(){var streamMetrics=metricsModel.getMetricsFor(_Constants2.default.STREAM);return getCurrent(streamMetrics,_MetricsConstants2.default.MANIFEST_UPDATE);}/**\\n     * @param {object} updatedFields fields to be updated\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function updateManifestUpdateInfo(updatedFields){var manifestUpdate=this.getCurrentManifestUpdate();metricsModel.updateManifestUpdateInfo(manifestUpdate,updatedFields);}/**\\n     * @param {object} streamInfo\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addManifestUpdateStreamInfo(streamInfo){if(streamInfo){var manifestUpdate=this.getCurrentManifestUpdate();metricsModel.addManifestUpdateStreamInfo(manifestUpdate,streamInfo.id,streamInfo.index,streamInfo.start,streamInfo.duration);}}/**\\n     * @param {object} request\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addManifestUpdate(request){metricsModel.addManifestUpdate(_Constants2.default.STREAM,request.type,request.requestStartDate,request.requestEndDate);}/**\\n     * @param {object} request\\n     * @param {string} responseURL\\n     * @param {number} responseStatus\\n     * @param {object} responseHeaders\\n     * @param {object} traces\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addHttpRequest(request,responseURL,responseStatus,responseHeaders,traces){metricsModel.addHttpRequest(request.mediaType,null,request.type,request.url,request.quality,responseURL,request.serviceLocation||null,request.range||null,request.requestStartDate,request.firstByteDate,request.requestEndDate,responseStatus,request.duration,responseHeaders,traces);}/**\\n     * @param {object} representation\\n     * @param {MediaType} mediaType\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addManifestUpdateRepresentationInfo(representation,mediaType){if(representation){var manifestUpdateInfo=this.getCurrentManifestUpdate();metricsModel.addManifestUpdateRepresentationInfo(manifestUpdateInfo,representation.id,representation.index,representation.streamIndex,mediaType,representation.presentationTimeOffset,representation.startNumber,representation.fragmentInfoType);}}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentDVRInfo(mediaType){var metrics=mediaType?metricsModel.getMetricsFor(mediaType,true):metricsModel.getMetricsFor(_Constants2.default.VIDEO,true)||metricsModel.getMetricsFor(_Constants2.default.AUDIO,true);return getCurrent(metrics,_MetricsConstants2.default.DVR_INFO);}/**\\n     * @param {MediaType} mediaType\\n     * @param {Date} currentTime time of the switch event\\n     * @param {object} mpd mpd reference\\n     * @param {object} range range of the dvr info\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addDVRInfo(mediaType,currentTime,mpd,range){metricsModel.addDVRInfo(mediaType,currentTime,mpd,range);}/**\\n     * @param {string} id\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getLatestMPDRequestHeaderValueByID(id){var headers={};var httpRequestList=void 0,httpRequest=void 0,i=void 0;httpRequestList=getHttpRequests(_Constants2.default.STREAM);for(i=httpRequestList.length-1;i>=0;i--){httpRequest=httpRequestList[i];if(httpRequest.type===_HTTPRequest.HTTPRequest.MPD_TYPE){headers=_Utils2.default.parseHttpHeaders(httpRequest._responseHeaders);break;}}return headers[id]===undefined?null:headers[id];}/**\\n     * @param {string} type\\n     * @param {string} id\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getLatestFragmentRequestHeaderValueByID(type,id){var headers={};var httpRequest=getCurrentHttpRequest(type,true);if(httpRequest){headers=_Utils2.default.parseHttpHeaders(httpRequest._responseHeaders);}return headers[id]===undefined?null:headers[id];}/**\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addPlayList(){if(playListMetrics){metricsModel.addPlayList(playListMetrics);playListMetrics=null;}}function createPlaylistMetrics(mediaStartTime,startReason){playListMetrics=new _PlayList.PlayList();playListMetrics.start=new Date();playListMetrics.mstart=mediaStartTime;playListMetrics.starttype=startReason;}function createPlaylistTraceMetrics(representationId,mediaStartTime,speed){if(playListTraceMetricsClosed===true){playListTraceMetricsClosed=false;playListTraceMetrics=new _PlayList.PlayListTrace();playListTraceMetrics.representationid=representationId;playListTraceMetrics.start=new Date();playListTraceMetrics.mstart=mediaStartTime;playListTraceMetrics.playbackspeed=speed!==null?speed.toString():null;}}function updatePlayListTraceMetrics(traceToUpdate){if(playListTraceMetrics){for(var field in playListTraceMetrics){playListTraceMetrics[field]=traceToUpdate[field];}}}function pushPlayListTraceMetrics(endTime,reason){if(playListTraceMetricsClosed===false&&playListMetrics&&playListTraceMetrics&&playListTraceMetrics.start){var startTime=playListTraceMetrics.start;var duration=endTime.getTime()-startTime.getTime();playListTraceMetrics.duration=duration;playListTraceMetrics.stopreason=reason;playListMetrics.trace.push(playListTraceMetrics);playListTraceMetricsClosed=true;}}/**\\n     * @param {object} errors\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addDVBErrors(errors){metricsModel.addDVBErrors(errors);}instance={getCurrentRepresentationSwitch:getCurrentRepresentationSwitch,getCurrentBufferState:getCurrentBufferState,getCurrentBufferLevel:getCurrentBufferLevel,getCurrentHttpRequest:getCurrentHttpRequest,getHttpRequests:getHttpRequests,getCurrentDroppedFrames:getCurrentDroppedFrames,getCurrentSchedulingInfo:getCurrentSchedulingInfo,getCurrentDVRInfo:getCurrentDVRInfo,getCurrentManifestUpdate:getCurrentManifestUpdate,getLatestFragmentRequestHeaderValueByID:getLatestFragmentRequestHeaderValueByID,getLatestMPDRequestHeaderValueByID:getLatestMPDRequestHeaderValueByID,addRepresentationSwitch:addRepresentationSwitch,addDVRInfo:addDVRInfo,updateManifestUpdateInfo:updateManifestUpdateInfo,addManifestUpdateStreamInfo:addManifestUpdateStreamInfo,addManifestUpdateRepresentationInfo:addManifestUpdateRepresentationInfo,addManifestUpdate:addManifestUpdate,addHttpRequest:addHttpRequest,addSchedulingInfo:addSchedulingInfo,addRequestsQueue:addRequestsQueue,addBufferLevel:addBufferLevel,addBufferState:addBufferState,addDroppedFrames:addDroppedFrames,addPlayList:addPlayList,addDVBErrors:addDVBErrors,createPlaylistMetrics:createPlaylistMetrics,createPlaylistTraceMetrics:createPlaylistTraceMetrics,updatePlayListTraceMetrics:updatePlayListTraceMetrics,pushPlayListTraceMetrics:pushPlayListTraceMetrics,clearAllCurrentMetrics:clearAllCurrentMetrics};setup();return instance;}DashMetrics.__dashjs_factory_name='DashMetrics';exports.default=_FactoryMaker2.default.getSingletonFactory(DashMetrics);\\n//# sourceMappingURL=DashMetrics.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/DashMetrics.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Segment=__webpack_require__(/*! ./vo/Segment */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\\\");var _Segment2=_interopRequireDefault(_Segment);var _DashJSError=__webpack_require__(/*! ../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _FragmentRequest=__webpack_require__(/*! ../streaming/vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _URLLoader=__webpack_require__(/*! ../streaming/net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SegmentBaseLoader(){var context=this.context;var instance=void 0,logger=void 0,errHandler=void 0,boxParser=void 0,requestModifier=void 0,dashMetrics=void 0,settings=void 0,mediaPlayerModel=void 0,urlLoader=void 0,events=void 0,eventBus=void 0,errors=void 0,constants=void 0,dashConstants=void 0,urlUtils=void 0,baseURLController=void 0;function setup(){}function initialize(){urlLoader=(0,_URLLoader2.default)(context).create({errHandler:errHandler,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,requestModifier:requestModifier,useFetch:settings?settings.get().streaming.lowLatencyEnabled:null,boxParser:boxParser,errors:errors,urlUtils:urlUtils,constants:constants,dashConstants:dashConstants});}function setConfig(config){if(config.baseURLController){baseURLController=config.baseURLController;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.errHandler){errHandler=config.errHandler;}if(config.settings){settings=config.settings;}if(config.boxParser){boxParser=config.boxParser;}if(config.events){events=config.events;}if(config.eventBus){eventBus=config.eventBus;}if(config.debug){logger=config.debug.getLogger(instance);}if(config.requestModifier){requestModifier=config.requestModifier;}if(config.errors){errors=config.errors;}if(config.urlUtils){urlUtils=config.urlUtils;}if(config.constants){constants=config.constants;}if(config.dashConstants){dashConstants=config.dashConstants;}}function checkConfig(){if(!baseURLController||!baseURLController.hasOwnProperty('resolve')){throw new Error('setConfig function has to be called previously');}}function loadInitialization(streamId,mediaType,representation,loadingInfo){checkConfig();var initRange=null;var baseUrl=representation?baseURLController.resolve(representation.path):null;var info=loadingInfo||{init:true,url:baseUrl?baseUrl.url:undefined,range:{start:0,end:1500},searching:false,bytesLoaded:0,bytesToLoad:1500,mediaType:mediaType};logger.debug('Start searching for initialization.');var request=getFragmentRequest(info);var onload=function onload(response){info.bytesLoaded=info.range.end;initRange=boxParser.findInitRange(response);if(initRange){representation.range=initRange;// note that we don't explicitly set rep.initialization as this\\n// will be computed when all BaseURLs are resolved later\\neventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});}else{info.range.end=info.bytesLoaded+info.bytesToLoad;loadInitialization(streamId,mediaType,representation,info);}};var onerror=function onerror(){eventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});};urlLoader.load({request:request,success:onload,error:onerror});logger.debug('Perform init search: '+info.url);}function loadSegments(streamId,mediaType,representation,range,callback,loadingInfo){checkConfig();if(range&&(range.start===undefined||range.end===undefined)){var parts=range?range.toString().split('-'):null;range=parts?{start:parseFloat(parts[0]),end:parseFloat(parts[1])}:null;}callback=!callback?onLoaded:callback;var isoFile=null;var sidx=null;var hasRange=!!range;var baseUrl=representation?baseURLController.resolve(representation.path):null;var info={init:false,url:baseUrl?baseUrl.url:undefined,range:hasRange?range:{start:0,end:1500},searching:!hasRange,bytesLoaded:loadingInfo?loadingInfo.bytesLoaded:0,bytesToLoad:1500,mediaType:mediaType};var request=getFragmentRequest(info);var onload=function onload(response){var extraBytes=info.bytesToLoad;var loadedLength=response.byteLength;info.bytesLoaded=info.range.end-info.range.start;isoFile=boxParser.parse(response);sidx=isoFile.getBox('sidx');if(!sidx||!sidx.isComplete){if(sidx){info.range.start=sidx.offset||info.range.start;info.range.end=info.range.start+(sidx.size||extraBytes);}else if(loadedLength<info.bytesLoaded){// if we have reached a search limit or if we have reached the end of the file we have to stop trying to find sidx\\ncallback(streamId,mediaType,null,representation);return;}else{var lastBox=isoFile.getLastBox();if(lastBox&&lastBox.size){info.range.start=lastBox.offset+lastBox.size;info.range.end=info.range.start+extraBytes;}else{info.range.end+=extraBytes;}}loadSegments(streamId,mediaType,representation,info.range,callback,info);}else{var ref=sidx.references;var loadMultiSidx=void 0,segments=void 0;if(ref!==null&&ref!==undefined&&ref.length>0){loadMultiSidx=ref[0].reference_type===1;}if(loadMultiSidx){logger.debug('Initiate multiple SIDX load.');info.range.end=info.range.start+sidx.size;var j=void 0,len=void 0,ss=void 0,se=void 0,r=void 0;var segs=[];var count=0;var offset=(sidx.offset||info.range.start)+sidx.size;var tmpCallback=function tmpCallback(streamId,mediaType,result){if(result){segs=segs.concat(result);count++;if(count>=len){// http requests can be processed in a wrong order, so, we have to reorder segments with an ascending start Time order\\nsegs.sort(function(a,b){return a.startTime-b.startTime<0?-1:0;});callback(streamId,mediaType,segs,representation);}}else{callback(streamId,mediaType,null,representation);}};for(j=0,len=ref.length;j<len;j++){ss=offset;se=offset+ref[j].referenced_size-1;offset=offset+ref[j].referenced_size;r={start:ss,end:se};loadSegments(streamId,mediaType,representation,r,tmpCallback,info);}}else{logger.debug('Parsing segments from SIDX. representation '+mediaType+' - id: '+representation.id+' for range : '+info.range.start+' - '+info.range.end);segments=getSegmentsForSidx(sidx,info);callback(streamId,mediaType,segments,representation);}}};var onerror=function onerror(){callback(streamId,mediaType,null,representation);};urlLoader.load({request:request,success:onload,error:onerror});logger.debug('Perform SIDX load: '+info.url+' with range : '+info.range.start+' - '+info.range.end);}function reset(){urlLoader.abort();urlLoader=null;errHandler=null;boxParser=null;requestModifier=null;}function getSegmentsForSidx(sidx,info){var refs=sidx.references;var len=refs.length;var timescale=sidx.timescale;var time=sidx.earliest_presentation_time;var start=info.range.start+sidx.offset+sidx.first_offset+sidx.size;var segments=[];var segment=void 0,end=void 0,duration=void 0,size=void 0;for(var i=0;i<len;i++){duration=refs[i].subsegment_duration;size=refs[i].referenced_size;segment=new _Segment2.default();// note that we don't explicitly set segment.media as this will be\\n// computed when all BaseURLs are resolved later\\nsegment.duration=duration;segment.startTime=time;segment.timescale=timescale;end=start+size-1;segment.mediaRange=start+'-'+end;segments.push(segment);time+=duration;start+=size;}return segments;}function getFragmentRequest(info){if(!info.url){return;}var request=new _FragmentRequest2.default();request.setInfo(info);return request;}function onLoaded(streamId,mediaType,segments,representation){eventBus.trigger(events.SEGMENTS_LOADED,{segments:segments,representation:representation,error:segments?undefined:new _DashJSError2.default(errors.SEGMENT_BASE_LOADER_ERROR_CODE,errors.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:streamId,mediaType:mediaType});}instance={setConfig:setConfig,initialize:initialize,loadInitialization:loadInitialization,loadSegments:loadSegments,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */SegmentBaseLoader.__dashjs_factory_name='SegmentBaseLoader';exports.default=_FactoryMaker2.default.getSingletonFactory(SegmentBaseLoader);\\n//# sourceMappingURL=SegmentBaseLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EBMLParser=__webpack_require__(/*! ../streaming/utils/EBMLParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js\\\");var _EBMLParser2=_interopRequireDefault(_EBMLParser);var _Constants=__webpack_require__(/*! ../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Segment=__webpack_require__(/*! ./vo/Segment */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\\\");var _Segment2=_interopRequireDefault(_Segment);var _FragmentRequest=__webpack_require__(/*! ../streaming/vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _URLLoader=__webpack_require__(/*! ../streaming/net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _DashJSError=__webpack_require__(/*! ../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function WebmSegmentBaseLoader(){var context=this.context;var instance=void 0,logger=void 0,WebM=void 0,errHandler=void 0,requestModifier=void 0,dashMetrics=void 0,mediaPlayerModel=void 0,urlLoader=void 0,settings=void 0,eventBus=void 0,events=void 0,errors=void 0,baseURLController=void 0;function setup(){WebM={EBML:{tag:0x1A45DFA3,required:true},Segment:{tag:0x18538067,required:true,SeekHead:{tag:0x114D9B74,required:true},Info:{tag:0x1549A966,required:true,TimecodeScale:{tag:0x2AD7B1,required:true,parse:'getMatroskaUint'},Duration:{tag:0x4489,required:true,parse:'getMatroskaFloat'}},Tracks:{tag:0x1654AE6B,required:true},Cues:{tag:0x1C53BB6B,required:true,CuePoint:{tag:0xBB,required:true,CueTime:{tag:0xB3,required:true,parse:'getMatroskaUint'},CueTrackPositions:{tag:0xB7,required:true,CueTrack:{tag:0xF7,required:true,parse:'getMatroskaUint'},CueClusterPosition:{tag:0xF1,required:true,parse:'getMatroskaUint'}}}}},Void:{tag:0xEC,required:true}};}function initialize(){urlLoader=(0,_URLLoader2.default)(context).create({errHandler:errHandler,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,requestModifier:requestModifier,useFetch:settings?settings.get().streaming.lowLatencyEnabled:null,errors:errors});}function setConfig(config){if(!config.baseURLController||!config.dashMetrics||!config.mediaPlayerModel||!config.errHandler){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}baseURLController=config.baseURLController;dashMetrics=config.dashMetrics;mediaPlayerModel=config.mediaPlayerModel;errHandler=config.errHandler;settings=config.settings;events=config.events;eventBus=config.eventBus;errors=config.errors;logger=config.debug.getLogger(instance);requestModifier=config.requestModifier;}function parseCues(ab){var cues=[];var ebmlParser=(0,_EBMLParser2.default)(context).create({data:ab});var cue=void 0,cueTrack=void 0;ebmlParser.consumeTagAndSize(WebM.Segment.Cues);while(ebmlParser.moreData()&&ebmlParser.consumeTagAndSize(WebM.Segment.Cues.CuePoint,true)){cue={};cue.CueTime=ebmlParser.parseTag(WebM.Segment.Cues.CuePoint.CueTime);cue.CueTracks=[];while(ebmlParser.moreData()&&ebmlParser.consumeTag(WebM.Segment.Cues.CuePoint.CueTrackPositions,true)){var cueTrackPositionSize=ebmlParser.getMatroskaCodedNum();var startPos=ebmlParser.getPos();cueTrack={};cueTrack.Track=ebmlParser.parseTag(WebM.Segment.Cues.CuePoint.CueTrackPositions.CueTrack);if(cueTrack.Track===0){throw new Error('Cue track cannot be 0');}cueTrack.ClusterPosition=ebmlParser.parseTag(WebM.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition);cue.CueTracks.push(cueTrack);// we're not interested any other elements - skip remaining bytes\\nebmlParser.setPos(startPos+cueTrackPositionSize);}if(cue.CueTracks.length===0){throw new Error('Mandatory cuetrack not found');}cues.push(cue);}if(cues.length===0){throw new Error('mandatory cuepoint not found');}return cues;}function parseSegments(data,segmentStart,segmentEnd,segmentDuration){var duration=void 0,parsed=void 0,segments=void 0,segment=void 0,i=void 0,len=void 0,start=void 0,end=void 0;parsed=parseCues(data);segments=[];// we are assuming one cue track per cue point\\n// both duration and media range require the i + 1 segment\\n// the final segment has to use global segment parameters\\nfor(i=0,len=parsed.length;i<len;i+=1){segment=new _Segment2.default();duration=0;if(i<parsed.length-1){duration=parsed[i+1].CueTime-parsed[i].CueTime;}else{duration=segmentDuration-parsed[i].CueTime;}// note that we don't explicitly set segment.media as this will be\\n// computed when all BaseURLs are resolved later\\nsegment.duration=duration;segment.startTime=parsed[i].CueTime;segment.timescale=1000;// hardcoded for ms\\nstart=parsed[i].CueTracks[0].ClusterPosition+segmentStart;if(i<parsed.length-1){end=parsed[i+1].CueTracks[0].ClusterPosition+segmentStart-1;}else{end=segmentEnd-1;}segment.mediaRange=start+'-'+end;segments.push(segment);}logger.debug('Parsed cues: '+segments.length+' cues.');return segments;}function parseEbmlHeader(data,media,theRange,callback){if(!data||data.byteLength===0){callback(null);return;}var ebmlParser=(0,_EBMLParser2.default)(context).create({data:data});var duration=void 0,segments=void 0,segmentEnd=void 0,segmentStart=void 0;var parts=theRange?theRange.split('-'):null;var request=null;var info={url:media,range:{start:parts?parseFloat(parts[0]):null,end:parts?parseFloat(parts[1]):null},request:request};logger.debug('Parse EBML header: '+info.url);// skip over the header itself\\nebmlParser.skipOverElement(WebM.EBML);ebmlParser.consumeTag(WebM.Segment);// segments start here\\nsegmentEnd=ebmlParser.getMatroskaCodedNum();segmentEnd+=ebmlParser.getPos();segmentStart=ebmlParser.getPos();// skip over any top level elements to get to the segment info\\nwhile(ebmlParser.moreData()&&!ebmlParser.consumeTagAndSize(WebM.Segment.Info,true)){if(!(ebmlParser.skipOverElement(WebM.Segment.SeekHead,true)||ebmlParser.skipOverElement(WebM.Segment.Tracks,true)||ebmlParser.skipOverElement(WebM.Segment.Cues,true)||ebmlParser.skipOverElement(WebM.Void,true))){throw new Error('no valid top level element found');}}// we only need one thing in segment info, duration\\nwhile(duration===undefined){var infoTag=ebmlParser.getMatroskaCodedNum(true);var infoElementSize=ebmlParser.getMatroskaCodedNum();switch(infoTag){case WebM.Segment.Info.Duration.tag:duration=ebmlParser[WebM.Segment.Info.Duration.parse](infoElementSize);break;default:ebmlParser.setPos(ebmlParser.getPos()+infoElementSize);break;}}// once we have what we need from segment info, we jump right to the\\n// cues\\nrequest=getFragmentRequest(info);var onload=function onload(response){segments=parseSegments(response,segmentStart,segmentEnd,duration);callback(segments);};var onloadend=function onloadend(){logger.error('Download Error: Cues '+info.url);callback(null);};urlLoader.load({request:request,success:onload,error:onloadend});logger.debug('Perform cues load: '+info.url+' bytes='+info.range.start+'-'+info.range.end);}function checkConfig(){if(!baseURLController||!baseURLController.hasOwnProperty('resolve')){throw new Error('setConfig function has to be called previously');}}function loadInitialization(streamId,mediaType,representation,loadingInfo){checkConfig();var request=null;var baseUrl=representation?baseURLController.resolve(representation.path):null;var initRange=representation?representation.range.split('-'):null;var info=loadingInfo||{range:{start:initRange?parseFloat(initRange[0]):null,end:initRange?parseFloat(initRange[1]):null},request:request,url:baseUrl?baseUrl.url:undefined,init:true,mediaType:mediaType};logger.info('Start loading initialization.');request=getFragmentRequest(info);var onload=function onload(){// note that we don't explicitly set rep.initialization as this\\n// will be computed when all BaseURLs are resolved later\\neventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});};var onloadend=function onloadend(){eventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});};urlLoader.load({request:request,success:onload,error:onloadend});logger.debug('Perform init load: '+info.url);}function loadSegments(streamId,mediaType,representation,theRange,callback){checkConfig();var request=null;var baseUrl=representation?baseURLController.resolve(representation.path):null;var media=baseUrl?baseUrl.url:undefined;var bytesToLoad=8192;var info={bytesLoaded:0,bytesToLoad:bytesToLoad,range:{start:0,end:bytesToLoad},request:request,url:media,init:false,mediaType:mediaType};callback=!callback?onLoaded:callback;request=getFragmentRequest(info);// first load the header, but preserve the manifest range so we can\\n// load the cues after parsing the header\\n// NOTE: we expect segment info to appear in the first 8192 bytes\\nlogger.debug('Parsing ebml header');var onload=function onload(response){parseEbmlHeader(response,media,theRange,function(segments){callback(streamId,mediaType,segments,representation);});};var onloadend=function onloadend(){callback(streamId,mediaType,null,representation);};urlLoader.load({request:request,success:onload,error:onloadend});}function onLoaded(streamId,mediaType,segments,representation){eventBus.trigger(events.SEGMENTS_LOADED,{segments:segments,representation:representation,error:segments?undefined:new _DashJSError2.default(errors.SEGMENT_BASE_LOADER_ERROR_CODE,errors.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:streamId,mediaType:mediaType});}function getFragmentRequest(info){var request=new _FragmentRequest2.default();request.setInfo(info);return request;}function reset(){errHandler=null;requestModifier=null;}instance={setConfig:setConfig,initialize:initialize,loadInitialization:loadInitialization,loadSegments:loadSegments,reset:reset};setup();return instance;}WebmSegmentBaseLoader.__dashjs_factory_name='WebmSegmentBaseLoader';exports.default=_FactoryMaker2.default.getSingletonFactory(WebmSegmentBaseLoader);\\n//# sourceMappingURL=WebmSegmentBaseLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Dash constants declaration\\n * @class\\n * @ignore\\n */var DashConstants=function(){_createClass(DashConstants,[{key:'init',value:function init(){this.BASE_URL='BaseURL';this.SEGMENT_BASE='SegmentBase';this.SEGMENT_TEMPLATE='SegmentTemplate';this.SEGMENT_LIST='SegmentList';this.SEGMENT_URL='SegmentURL';this.SEGMENT_TIMELINE='SegmentTimeline';this.SEGMENT_PROFILES='segmentProfiles';this.ADAPTATION_SET='AdaptationSet';this.REPRESENTATION='Representation';this.REPRESENTATION_INDEX='RepresentationIndex';this.SUB_REPRESENTATION='SubRepresentation';this.INITIALIZATION='Initialization';this.INITIALIZATION_MINUS='initialization';this.MPD='MPD';this.PERIOD='Period';this.ASSET_IDENTIFIER='AssetIdentifier';this.EVENT_STREAM='EventStream';this.ID='id';this.PROFILES='profiles';this.SERVICE_LOCATION='serviceLocation';this.RANGE='range';this.INDEX='index';this.MEDIA='media';this.BYTE_RANGE='byteRange';this.INDEX_RANGE='indexRange';this.MEDIA_RANGE='mediaRange';this.VALUE='value';this.CONTENT_TYPE='contentType';this.MIME_TYPE='mimeType';this.BITSTREAM_SWITCHING='BitstreamSwitching';this.BITSTREAM_SWITCHING_MINUS='bitstreamSwitching';this.CODECS='codecs';this.DEPENDENCY_ID='dependencyId';this.MEDIA_STREAM_STRUCTURE_ID='mediaStreamStructureId';this.METRICS='Metrics';this.METRICS_MINUS='metrics';this.REPORTING='Reporting';this.WIDTH='width';this.HEIGHT='height';this.SAR='sar';this.FRAMERATE='frameRate';this.AUDIO_SAMPLING_RATE='audioSamplingRate';this.MAXIMUM_SAP_PERIOD='maximumSAPPeriod';this.START_WITH_SAP='startWithSAP';this.MAX_PLAYOUT_RATE='maxPlayoutRate';this.CODING_DEPENDENCY='codingDependency';this.SCAN_TYPE='scanType';this.FRAME_PACKING='FramePacking';this.AUDIO_CHANNEL_CONFIGURATION='AudioChannelConfiguration';this.CONTENT_PROTECTION='ContentProtection';this.ESSENTIAL_PROPERTY='EssentialProperty';this.SUPPLEMENTAL_PROPERTY='SupplementalProperty';this.INBAND_EVENT_STREAM='InbandEventStream';this.ACCESSIBILITY='Accessibility';this.ROLE='Role';this.RATING='Rating';this.CONTENT_COMPONENT='ContentComponent';this.SUBSET='Subset';this.LANG='lang';this.VIEWPOINT='Viewpoint';this.ROLE_ASARRAY='Role_asArray';this.ACCESSIBILITY_ASARRAY='Accessibility_asArray';this.AUDIOCHANNELCONFIGURATION_ASARRAY='AudioChannelConfiguration_asArray';this.CONTENTPROTECTION_ASARRAY='ContentProtection_asArray';this.MAIN='main';this.DYNAMIC='dynamic';this.STATIC='static';this.MEDIA_PRESENTATION_DURATION='mediaPresentationDuration';this.MINIMUM_UPDATE_PERIOD='minimumUpdatePeriod';this.CODEC_PRIVATE_DATA='codecPrivateData';this.BANDWITH='bandwidth';this.SOURCE_URL='sourceURL';this.TIMESCALE='timescale';this.DURATION='duration';this.START_NUMBER='startNumber';this.PRESENTATION_TIME_OFFSET='presentationTimeOffset';this.AVAILABILITY_START_TIME='availabilityStartTime';this.AVAILABILITY_END_TIME='availabilityEndTime';this.TIMESHIFT_BUFFER_DEPTH='timeShiftBufferDepth';this.MAX_SEGMENT_DURATION='maxSegmentDuration';this.PRESENTATION_TIME='presentationTime';this.MIN_BUFFER_TIME='minBufferTime';this.MAX_SUBSEGMENT_DURATION='maxSubsegmentDuration';this.START='start';this.AVAILABILITY_TIME_OFFSET='availabilityTimeOffset';this.AVAILABILITY_TIME_COMPLETE='availabilityTimeComplete';this.CENC_DEFAULT_KID='cenc:default_KID';this.DVB_PRIORITY='dvb:priority';this.DVB_WEIGHT='dvb:weight';this.SUGGESTED_PRESENTATION_DELAY='suggestedPresentationDelay';this.SERVICE_DESCRIPTION='ServiceDescription';this.SERVICE_DESCRIPTION_SCOPE='Scope';this.SERVICE_DESCRIPTION_LATENCY='Latency';this.SERVICE_DESCRIPTION_PLAYBACK_RATE='PlaybackRate';this.PATCH_LOCATION='PatchLocation';this.PUBLISH_TIME='publishTime';this.ORIGINAL_PUBLISH_TIME='originalPublishTime';this.ORIGINAL_MPD_ID='mpdId';}}]);function DashConstants(){_classCallCheck(this,DashConstants);this.init();}return DashConstants;}();var constants=new DashConstants();exports.default=constants;\\n//# sourceMappingURL=DashConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js\":\n/*!*****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js ***!\n  \\*****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashJSError=__webpack_require__(/*! ../../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RepresentationController(config){config=config||{};var eventBus=config.eventBus;var events=config.events;var errors=config.errors;var abrController=config.abrController;var dashMetrics=config.dashMetrics;var playbackController=config.playbackController;var timelineConverter=config.timelineConverter;var type=config.type;var streamInfo=config.streamInfo;var dashConstants=config.dashConstants;var instance=void 0,realAdaptation=void 0,updating=void 0,voAvailableRepresentations=void 0,currentVoRepresentation=void 0;function setup(){resetInitialSettings();eventBus.on(events.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.on(events.REPRESENTATION_UPDATE_COMPLETED,onRepresentationUpdated,instance);eventBus.on(events.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,instance);eventBus.on(events.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function checkConfig(){if(!abrController||!dashMetrics||!playbackController||!timelineConverter){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getData(){return realAdaptation;}function isUpdating(){return updating;}function getCurrentRepresentation(){return currentVoRepresentation;}function resetInitialSettings(){realAdaptation=null;updating=true;voAvailableRepresentations=[];}function reset(){eventBus.off(events.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.off(events.REPRESENTATION_UPDATE_COMPLETED,onRepresentationUpdated,instance);eventBus.off(events.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,instance);eventBus.off(events.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);resetInitialSettings();}function updateData(newRealAdaptation,availableRepresentations,type,quality){checkConfig();startDataUpdate();voAvailableRepresentations=availableRepresentations;currentVoRepresentation=getRepresentationForQuality(quality);realAdaptation=newRealAdaptation;if(type!==_Constants2.default.VIDEO&&type!==_Constants2.default.AUDIO&&type!==_Constants2.default.FRAGMENTED_TEXT){endDataUpdate();return;}updateAvailabilityWindow(playbackController.getIsDynamic(),true);}function addRepresentationSwitch(){checkConfig();var now=new Date();var currentRepresentation=getCurrentRepresentation();var currentVideoTimeMs=playbackController.getTime()*1000;if(currentRepresentation){dashMetrics.addRepresentationSwitch(currentRepresentation.adaptation.type,now,currentVideoTimeMs,currentRepresentation.id);}}function getRepresentationForQuality(quality){return quality===null||quality===undefined||quality>=voAvailableRepresentations.length?null:voAvailableRepresentations[quality];}function getQualityForRepresentation(voRepresentation){return voAvailableRepresentations.indexOf(voRepresentation);}function isAllRepresentationsUpdated(){for(var i=0,ln=voAvailableRepresentations.length;i<ln;i++){var segmentInfoType=voAvailableRepresentations[i].segmentInfoType;if(voAvailableRepresentations[i].segmentAvailabilityRange===null||!voAvailableRepresentations[i].hasInitialization()||(segmentInfoType===dashConstants.SEGMENT_BASE||segmentInfoType===dashConstants.BASE_URL)&&!voAvailableRepresentations[i].segments){return false;}}return true;}function setExpectedLiveEdge(liveEdge){timelineConverter.setExpectedLiveEdge(liveEdge);dashMetrics.updateManifestUpdateInfo({presentationStartTime:liveEdge});}function updateRepresentation(representation,isDynamic){representation.segmentAvailabilityRange=timelineConverter.calcSegmentAvailabilityRange(representation,isDynamic);if(representation.segmentAvailabilityRange.end<representation.segmentAvailabilityRange.start){var error=new _DashJSError2.default(errors.SEGMENTS_UNAVAILABLE_ERROR_CODE,errors.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:representation.segmentAvailabilityRange.start-representation.segmentAvailabilityRange.end});endDataUpdate(error);return;}if(isDynamic){setExpectedLiveEdge(representation.segmentAvailabilityRange.end);}}function updateAvailabilityWindow(isDynamic,notifyUpdate){checkConfig();for(var i=0,ln=voAvailableRepresentations.length;i<ln;i++){updateRepresentation(voAvailableRepresentations[i],isDynamic);if(notifyUpdate){eventBus.trigger(events.REPRESENTATION_UPDATE_STARTED,{representation:voAvailableRepresentations[i]},{streamId:streamInfo.id,mediaType:type});}}}function resetAvailabilityWindow(){voAvailableRepresentations.forEach(function(rep){rep.segmentAvailabilityRange=null;});}function startDataUpdate(){updating=true;eventBus.trigger(events.DATA_UPDATE_STARTED,{},{streamId:streamInfo.id,mediaType:type});}function endDataUpdate(error){updating=false;eventBus.trigger(events.DATA_UPDATE_COMPLETED,{data:realAdaptation,currentRepresentation:currentVoRepresentation,error:error},{streamId:streamInfo.id,mediaType:type});}function postponeUpdate(postponeTimePeriod){var delay=postponeTimePeriod;var update=function update(){if(isUpdating())return;startDataUpdate();// clear the segmentAvailabilityRange for all reps.\\n// this ensures all are updated before the live edge search starts\\nresetAvailabilityWindow();updateAvailabilityWindow(playbackController.getIsDynamic(),true);};eventBus.trigger(events.AST_IN_FUTURE,{delay:delay});setTimeout(update,delay);}function onRepresentationUpdated(e){if(!isUpdating())return;if(e.error){endDataUpdate(e.error);return;}var r=e.representation;var manifestUpdateInfo=dashMetrics.getCurrentManifestUpdate();var alreadyAdded=false;var postponeTimePeriod=0;var repInfo=void 0,err=void 0,repSwitch=void 0;if(r.adaptation.period.mpd.manifest.type===dashConstants.DYNAMIC&&!r.adaptation.period.mpd.manifest.ignorePostponeTimePeriod&&playbackController.getStreamController().getStreams().length<=1){// We must put things to sleep unless till e.g. the startTime calculation in ScheduleController.onLiveEdgeSearchCompleted fall after the segmentAvailabilityRange.start\\npostponeTimePeriod=getRepresentationUpdatePostponeTimePeriod(r);}if(postponeTimePeriod>0){postponeUpdate(postponeTimePeriod);err=new _DashJSError2.default(errors.SEGMENTS_UPDATE_FAILED_ERROR_CODE,errors.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE);endDataUpdate(err);return;}if(manifestUpdateInfo){for(var i=0;i<manifestUpdateInfo.representationInfo.length;i++){repInfo=manifestUpdateInfo.representationInfo[i];if(repInfo.index===r.index&&repInfo.mediaType===getType()){alreadyAdded=true;break;}}if(!alreadyAdded){dashMetrics.addManifestUpdateRepresentationInfo(r,getType());}}if(isAllRepresentationsUpdated()){abrController.setPlaybackQuality(getType(),streamInfo,getQualityForRepresentation(currentVoRepresentation));dashMetrics.updateManifestUpdateInfo({latency:currentVoRepresentation.segmentAvailabilityRange.end-playbackController.getTime()});repSwitch=dashMetrics.getCurrentRepresentationSwitch(getCurrentRepresentation().adaptation.type);if(!repSwitch){addRepresentationSwitch();}endDataUpdate();}}function getRepresentationUpdatePostponeTimePeriod(representation){try{var streamController=playbackController.getStreamController();var activeStreamInfo=streamController.getActiveStreamInfo();var startTimeAnchor=representation.segmentAvailabilityRange.start;if(activeStreamInfo&&activeStreamInfo.id&&activeStreamInfo.id!==streamInfo.id){// We need to consider the currently playing period if a period switch is performed.\\nstartTimeAnchor=Math.min(playbackController.getTime(),startTimeAnchor);}var segmentAvailabilityTimePeriod=representation.segmentAvailabilityRange.end-startTimeAnchor;var liveDelay=playbackController.getLiveDelay();return(liveDelay-segmentAvailabilityTimePeriod)*1000;}catch(e){return 0;}}function onWallclockTimeUpdated(e){if(e.isDynamic){updateAvailabilityWindow(e.isDynamic);}}function onQualityChanged(e){currentVoRepresentation=getRepresentationForQuality(e.newQuality);addRepresentationSwitch();}function onManifestValidityChanged(e){if(e.newDuration){var representation=getCurrentRepresentation();if(representation&&representation.adaptation.period){var period=representation.adaptation.period;period.duration=e.newDuration;}}}instance={getStreamId:getStreamId,getType:getType,getData:getData,isUpdating:isUpdating,updateData:updateData,updateRepresentation:updateRepresentation,getCurrentRepresentation:getCurrentRepresentation,getRepresentationForQuality:getRepresentationForQuality,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RepresentationController.__dashjs_factory_name='RepresentationController';exports.default=_FactoryMaker2.default.getClassFactory(RepresentationController);\\n//# sourceMappingURL=RepresentationController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SegmentBaseLoader=__webpack_require__(/*! ../SegmentBaseLoader */ \\\"../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js\\\");var _SegmentBaseLoader2=_interopRequireDefault(_SegmentBaseLoader);var _WebmSegmentBaseLoader=__webpack_require__(/*! ../WebmSegmentBaseLoader */ \\\"../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js\\\");var _WebmSegmentBaseLoader2=_interopRequireDefault(_WebmSegmentBaseLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SegmentBaseController(config){config=config||{};var context=this.context;var eventBus=config.eventBus;var events=config.events;var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var errHandler=config.errHandler;var baseURLController=config.baseURLController;var debug=config.debug;var boxParser=config.boxParser;var requestModifier=config.requestModifier;var errors=config.errors;var instance=void 0,segmentBaseLoader=void 0,webmSegmentBaseLoader=void 0;function setup(){segmentBaseLoader=(0,_SegmentBaseLoader2.default)(context).getInstance();webmSegmentBaseLoader=(0,_WebmSegmentBaseLoader2.default)(context).getInstance();segmentBaseLoader.setConfig({baseURLController:baseURLController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,eventBus:eventBus,events:events,errors:errors,debug:debug,boxParser:boxParser,requestModifier:requestModifier});webmSegmentBaseLoader.setConfig({baseURLController:baseURLController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,eventBus:eventBus,events:events,errors:errors,debug:debug,requestModifier:requestModifier});}function isWebM(mimeType){var type=mimeType?mimeType.split('/')[1]:'';return'webm'===type.toLowerCase();}function initialize(){eventBus.on(events.SEGMENTBASE_INIT_REQUEST_NEEDED,onInitSegmentBaseNeeded,instance);eventBus.on(events.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,onSegmentsListSegmentBaseNeeded,instance);segmentBaseLoader.initialize();webmSegmentBaseLoader.initialize();}function onInitSegmentBaseNeeded(e){if(isWebM(e.mimeType)){webmSegmentBaseLoader.loadInitialization(e.streamId,e.mediaType,e.representation);}else{segmentBaseLoader.loadInitialization(e.streamId,e.mediaType,e.representation);}}function onSegmentsListSegmentBaseNeeded(e){if(isWebM(e.mimeType)){webmSegmentBaseLoader.loadSegments(e.streamId,e.mediaType,e.representation,e.representation?e.representation.indexRange:null,e.callback);}else{segmentBaseLoader.loadSegments(e.streamId,e.mediaType,e.representation,e.representation?e.representation.indexRange:null,e.callback);}}function reset(){eventBus.off(events.SEGMENTBASE_INIT_REQUEST_NEEDED,onInitSegmentBaseNeeded,instance);eventBus.off(events.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,onSegmentsListSegmentBaseNeeded,instance);}instance={initialize:initialize,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */SegmentBaseController.__dashjs_factory_name='SegmentBaseController';var factory=_FactoryMaker2.default.getSingletonFactory(SegmentBaseController);exports.default=factory;\\n//# sourceMappingURL=SegmentBaseController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _TimelineSegmentsGetter=__webpack_require__(/*! ../utils/TimelineSegmentsGetter */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js\\\");var _TimelineSegmentsGetter2=_interopRequireDefault(_TimelineSegmentsGetter);var _TemplateSegmentsGetter=__webpack_require__(/*! ../utils/TemplateSegmentsGetter */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js\\\");var _TemplateSegmentsGetter2=_interopRequireDefault(_TemplateSegmentsGetter);var _ListSegmentsGetter=__webpack_require__(/*! ../utils/ListSegmentsGetter */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js\\\");var _ListSegmentsGetter2=_interopRequireDefault(_ListSegmentsGetter);var _SegmentBaseGetter=__webpack_require__(/*! ../utils/SegmentBaseGetter */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js\\\");var _SegmentBaseGetter2=_interopRequireDefault(_SegmentBaseGetter);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SegmentsController(config){config=config||{};var context=this.context;var events=config.events;var eventBus=config.eventBus;var dashConstants=config.dashConstants;var streamInfo=config.streamInfo;var type=config.type;var instance=void 0,getters=void 0;function setup(){getters={};}function initialize(isDynamic){getters[dashConstants.SEGMENT_TIMELINE]=(0,_TimelineSegmentsGetter2.default)(context).create(config,isDynamic);getters[dashConstants.SEGMENT_TEMPLATE]=(0,_TemplateSegmentsGetter2.default)(context).create(config,isDynamic);getters[dashConstants.SEGMENT_LIST]=(0,_ListSegmentsGetter2.default)(context).create(config,isDynamic);getters[dashConstants.SEGMENT_BASE]=(0,_SegmentBaseGetter2.default)(context).create(config,isDynamic);}function update(voRepresentation,mimeType,hasInitialization,hasSegments){if(!hasInitialization){eventBus.trigger(events.SEGMENTBASE_INIT_REQUEST_NEEDED,{streamId:streamInfo.id,mediaType:type,mimeType:mimeType,representation:voRepresentation});}if(!hasSegments){eventBus.trigger(events.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:streamInfo.id,mediaType:type,mimeType:mimeType,representation:voRepresentation});}}function getSegmentsGetter(representation){return representation?representation.segments?getters[dashConstants.SEGMENT_BASE]:getters[representation.segmentInfoType]:null;}function getSegmentByIndex(representation,index,lastSegmentTime){var getter=getSegmentsGetter(representation);return getter?getter.getSegmentByIndex(representation,index,lastSegmentTime):null;}function getSegmentByTime(representation,time){var getter=getSegmentsGetter(representation);return getter?getter.getSegmentByTime(representation,time):null;}instance={initialize:initialize,update:update,getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */SegmentsController.__dashjs_factory_name='SegmentsController';var factory=_FactoryMaker2.default.getClassFactory(SegmentsController);exports.default=factory;\\n//# sourceMappingURL=SegmentsController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _Representation=__webpack_require__(/*! ../vo/Representation */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Representation.js\\\");var _Representation2=_interopRequireDefault(_Representation);var _AdaptationSet=__webpack_require__(/*! ../vo/AdaptationSet */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js\\\");var _AdaptationSet2=_interopRequireDefault(_AdaptationSet);var _Period=__webpack_require__(/*! ../vo/Period */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Period.js\\\");var _Period2=_interopRequireDefault(_Period);var _Mpd=__webpack_require__(/*! ../vo/Mpd */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js\\\");var _Mpd2=_interopRequireDefault(_Mpd);var _UTCTiming=__webpack_require__(/*! ../vo/UTCTiming */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js\\\");var _UTCTiming2=_interopRequireDefault(_UTCTiming);var _Event=__webpack_require__(/*! ../vo/Event */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Event.js\\\");var _Event2=_interopRequireDefault(_Event);var _BaseURL=__webpack_require__(/*! ../vo/BaseURL */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js\\\");var _BaseURL2=_interopRequireDefault(_BaseURL);var _EventStream=__webpack_require__(/*! ../vo/EventStream */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js\\\");var _EventStream2=_interopRequireDefault(_EventStream);var _ObjectUtils=__webpack_require__(/*! ../../streaming/utils/ObjectUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js\\\");var _ObjectUtils2=_interopRequireDefault(_ObjectUtils);var _URLUtils=__webpack_require__(/*! ../../streaming/utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _DashJSError=__webpack_require__(/*! ../../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _ThumbnailTracks=__webpack_require__(/*! ../../streaming/thumbnail/ThumbnailTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DashManifestModel(){var instance=void 0,logger=void 0,errHandler=void 0,BASE64=void 0;var context=this.context;var urlUtils=(0,_URLUtils2.default)(context).getInstance();var isInteger=Number.isInteger||function(value){return typeof value==='number'&&isFinite(value)&&Math.floor(value)===value;};function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getIsTypeOf(adaptation,type){var i=void 0,len=void 0,representation=void 0,col=void 0,mimeTypeRegEx=void 0,codecs=void 0;var result=false;var found=false;if(!adaptation){throw new Error('adaptation is not defined');}if(!type){throw new Error('type is not defined');}if(adaptation.hasOwnProperty('ContentComponent_asArray')){col=adaptation.ContentComponent_asArray;}mimeTypeRegEx=type!==_Constants2.default.TEXT?new RegExp(type):new RegExp('(vtt|ttml)');if(adaptation.Representation_asArray&&adaptation.Representation_asArray.length&&adaptation.Representation_asArray.length>0){var essentialProperties=getEssentialPropertiesForRepresentation(adaptation.Representation_asArray[0]);if(essentialProperties&&essentialProperties.length>0&&_ThumbnailTracks.THUMBNAILS_SCHEME_ID_URIS.indexOf(essentialProperties[0].schemeIdUri)>=0){return type===_Constants2.default.IMAGE;}if(adaptation.Representation_asArray[0].hasOwnProperty(_DashConstants2.default.CODECS)){// Just check the start of the codecs string\\ncodecs=adaptation.Representation_asArray[0].codecs;if(codecs.search(_Constants2.default.STPP)===0||codecs.search(_Constants2.default.WVTT)===0){return type===_Constants2.default.FRAGMENTED_TEXT;}}}if(col){if(col.length>1){return type===_Constants2.default.MUXED;}else if(col[0]&&col[0].contentType===type){result=true;found=true;}}if(adaptation.hasOwnProperty(_DashConstants2.default.MIME_TYPE)){result=mimeTypeRegEx.test(adaptation.mimeType);found=true;}// couldn't find on adaptationset, so check a representation\\nif(!found){i=0;len=adaptation.Representation_asArray&&adaptation.Representation_asArray.length?adaptation.Representation_asArray.length:0;while(!found&&i<len){representation=adaptation.Representation_asArray[i];if(representation.hasOwnProperty(_DashConstants2.default.MIME_TYPE)){result=mimeTypeRegEx.test(representation.mimeType);found=true;}i++;}}return result;}function getIsAudio(adaptation){return getIsTypeOf(adaptation,_Constants2.default.AUDIO);}function getIsVideo(adaptation){return getIsTypeOf(adaptation,_Constants2.default.VIDEO);}function getIsFragmentedText(adaptation){return getIsTypeOf(adaptation,_Constants2.default.FRAGMENTED_TEXT);}function getIsMuxed(adaptation){return getIsTypeOf(adaptation,_Constants2.default.MUXED);}function getIsImage(adaptation){return getIsTypeOf(adaptation,_Constants2.default.IMAGE);}function getIsTextTrack(type){return type==='text/vtt'||type==='application/ttml+xml';}function getLanguageForAdaptation(adaptation){var lang='';if(adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.LANG)){//Filter out any other characters not allowed according to RFC5646\\nlang=adaptation.lang.replace(/[^A-Za-z0-9-]/g,'');}return lang;}function getViewpointForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.VIEWPOINT)?adaptation.Viewpoint:null;}function getRolesForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.ROLE_ASARRAY)?adaptation.Role_asArray:[];}function getAccessibilityForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.ACCESSIBILITY_ASARRAY)?adaptation.Accessibility_asArray:[];}function getAudioChannelConfigurationForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?adaptation.AudioChannelConfiguration_asArray:[];}function getAudioChannelConfigurationForRepresentation(representation){return representation&&representation.hasOwnProperty(_DashConstants2.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?representation.AudioChannelConfiguration_asArray:[];}function getRepresentationSortFunction(){return function(a,b){return a.bandwidth-b.bandwidth;};}function processAdaptation(realAdaptation){if(realAdaptation&&Array.isArray(realAdaptation.Representation_asArray)){realAdaptation.Representation_asArray.sort(getRepresentationSortFunction());}return realAdaptation;}function getRealAdaptations(manifest,periodIndex){return manifest&&manifest.Period_asArray&&isInteger(periodIndex)?manifest.Period_asArray[periodIndex]?manifest.Period_asArray[periodIndex].AdaptationSet_asArray:[]:[];}function getRealPeriods(manifest){return manifest&&manifest.Period_asArray?manifest.Period_asArray:[];}function getRealPeriodForIndex(index,manifest){var realPeriods=getRealPeriods(manifest);if(realPeriods.length>0&&isInteger(index)){return realPeriods[index];}else{return null;}}function getAdaptationForId(id,manifest,periodIndex){var realAdaptations=getRealAdaptations(manifest,periodIndex);var i=void 0,len=void 0;for(i=0,len=realAdaptations.length;i<len;i++){if(realAdaptations[i].hasOwnProperty(_DashConstants2.default.ID)&&realAdaptations[i].id===id){return realAdaptations[i];}}return null;}function getAdaptationForIndex(index,manifest,periodIndex){var realAdaptations=getRealAdaptations(manifest,periodIndex);if(realAdaptations.length>0&&isInteger(index)){return realAdaptations[index];}else{return null;}}function getIndexForAdaptation(realAdaptation,manifest,periodIndex){if(!realAdaptation){return-1;}var realAdaptations=getRealAdaptations(manifest,periodIndex);for(var i=0;i<realAdaptations.length;i++){var objectUtils=(0,_ObjectUtils2.default)(context).getInstance();if(objectUtils.areEqual(realAdaptations[i],realAdaptation)){return i;}}return-1;}function getAdaptationsForType(manifest,periodIndex,type){var realAdaptations=getRealAdaptations(manifest,periodIndex);var i=void 0,len=void 0;var adaptations=[];for(i=0,len=realAdaptations.length;i<len;i++){if(getIsTypeOf(realAdaptations[i],type)){adaptations.push(processAdaptation(realAdaptations[i]));}}return adaptations;}function getCodec(adaptation,representationId,addResolutionInfo){var codec=null;if(adaptation&&adaptation.Representation_asArray&&adaptation.Representation_asArray.length>0){var representation=isInteger(representationId)&&representationId>=0&&representationId<adaptation.Representation_asArray.length?adaptation.Representation_asArray[representationId]:adaptation.Representation_asArray[0];if(representation){codec=representation.mimeType+';codecs=\\\"'+representation.codecs+'\\\"';if(addResolutionInfo&&representation.width!==undefined){codec+=';width=\\\"'+representation.width+'\\\";height=\\\"'+representation.height+'\\\"';}}}// If the codec contains a profiles parameter we remove it. Otherwise it will cause problems when checking for codec capabilities of the platform\\nif(codec){codec=codec.replace(/\\\\sprofiles=[^;]*/g,'');}return codec;}function getMimeType(adaptation){return adaptation&&adaptation.Representation_asArray&&adaptation.Representation_asArray.length>0?adaptation.Representation_asArray[0].mimeType:null;}function getKID(adaptation){if(!adaptation||!adaptation.hasOwnProperty(_DashConstants2.default.CENC_DEFAULT_KID)){return null;}return adaptation[_DashConstants2.default.CENC_DEFAULT_KID];}function getLabelsForAdaptation(adaptation){if(!adaptation||!Array.isArray(adaptation.Label_asArray)){return[];}var labelArray=[];for(var i=0;i<adaptation.Label_asArray.length;i++){labelArray.push({lang:adaptation.Label_asArray[i].lang,text:adaptation.Label_asArray[i].__text||adaptation.Label_asArray[i]});}return labelArray;}function getContentProtectionData(adaptation){if(!adaptation||!adaptation.hasOwnProperty(_DashConstants2.default.CONTENTPROTECTION_ASARRAY)||adaptation.ContentProtection_asArray.length===0){return null;}return adaptation.ContentProtection_asArray;}function getIsDynamic(manifest){var isDynamic=false;if(manifest&&manifest.hasOwnProperty('type')){isDynamic=manifest.type===_DashConstants2.default.DYNAMIC;}return isDynamic;}function getId(manifest){return manifest&&manifest[_DashConstants2.default.ID]||null;}function hasProfile(manifest,profile){var has=false;if(manifest&&manifest.profiles&&manifest.profiles.length>0){has=manifest.profiles.indexOf(profile)!==-1;}return has;}function getDuration(manifest){var mpdDuration=void 0;//@mediaPresentationDuration specifies the duration of the entire Media Presentation.\\n//If the attribute is not present, the duration of the Media Presentation is unknown.\\nif(manifest&&manifest.hasOwnProperty(_DashConstants2.default.MEDIA_PRESENTATION_DURATION)){mpdDuration=manifest.mediaPresentationDuration;}else if(manifest&&manifest.type=='dynamic'){mpdDuration=Number.POSITIVE_INFINITY;}else{mpdDuration=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE;}return mpdDuration;}function getBandwidth(representation){return representation&&representation.bandwidth?representation.bandwidth:NaN;}function getManifestUpdatePeriod(manifest){var latencyOfLastUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var delay=NaN;if(manifest&&manifest.hasOwnProperty(_DashConstants2.default.MINIMUM_UPDATE_PERIOD)){delay=manifest.minimumUpdatePeriod;}return isNaN(delay)?delay:Math.max(delay-latencyOfLastUpdate,1);}function getPublishTime(manifest){return manifest&&manifest.hasOwnProperty(_DashConstants2.default.PUBLISH_TIME)?new Date(manifest[_DashConstants2.default.PUBLISH_TIME]):null;}function getRepresentationCount(adaptation){return adaptation&&Array.isArray(adaptation.Representation_asArray)?adaptation.Representation_asArray.length:0;}function getBitrateListForAdaptation(realAdaptation){var processedRealAdaptation=processAdaptation(realAdaptation);var realRepresentations=processedRealAdaptation&&Array.isArray(processedRealAdaptation.Representation_asArray)?processedRealAdaptation.Representation_asArray:[];return realRepresentations.map(function(realRepresentation){return{bandwidth:realRepresentation.bandwidth,width:realRepresentation.width||0,height:realRepresentation.height||0,scanType:realRepresentation.scanType||null,id:realRepresentation.id||null};});}function getEssentialPropertiesForRepresentation(realRepresentation){if(!realRepresentation||!realRepresentation.EssentialProperty_asArray||!realRepresentation.EssentialProperty_asArray.length)return null;return realRepresentation.EssentialProperty_asArray.map(function(prop){return{schemeIdUri:prop.schemeIdUri,value:prop.value};});}function getRepresentationFor(index,adaptation){return adaptation&&adaptation.Representation_asArray&&adaptation.Representation_asArray.length>0&&isInteger(index)?adaptation.Representation_asArray[index]:null;}function getRealAdaptationFor(voAdaptation){if(voAdaptation&&voAdaptation.period&&isInteger(voAdaptation.period.index)){var periodArray=voAdaptation.period.mpd.manifest.Period_asArray[voAdaptation.period.index];if(periodArray&&periodArray.AdaptationSet_asArray&&isInteger(voAdaptation.index)){return processAdaptation(periodArray.AdaptationSet_asArray[voAdaptation.index]);}}}function getRepresentationsForAdaptation(voAdaptation){var voRepresentations=[];var processedRealAdaptation=getRealAdaptationFor(voAdaptation);var segmentInfo=void 0,baseUrl=void 0;if(processedRealAdaptation&&processedRealAdaptation.Representation_asArray){// TODO: TO BE REMOVED. We should get just the baseUrl elements that affects to the representations\\n// that we are processing. Making it works properly will require much further changes and given\\n// parsing base Urls parameters is needed for our ultra low latency examples, we will\\n// keep this \\\"tricky\\\" code until the real (and good) solution comes\\nif(voAdaptation&&voAdaptation.period&&isInteger(voAdaptation.period.index)){var baseUrls=getBaseURLsFromElement(voAdaptation.period.mpd.manifest);if(baseUrls){baseUrl=baseUrls[0];}}for(var i=0,len=processedRealAdaptation.Representation_asArray.length;i<len;++i){var realRepresentation=processedRealAdaptation.Representation_asArray[i];var voRepresentation=new _Representation2.default();voRepresentation.index=i;voRepresentation.adaptation=voAdaptation;if(realRepresentation.hasOwnProperty(_DashConstants2.default.ID)){voRepresentation.id=realRepresentation.id;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.CODECS)){voRepresentation.codecs=realRepresentation.codecs;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.CODEC_PRIVATE_DATA)){voRepresentation.codecPrivateData=realRepresentation.codecPrivateData;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.BANDWITH)){voRepresentation.bandwidth=realRepresentation.bandwidth;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.WIDTH)){voRepresentation.width=realRepresentation.width;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.HEIGHT)){voRepresentation.height=realRepresentation.height;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.SCAN_TYPE)){voRepresentation.scanType=realRepresentation.scanType;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.MAX_PLAYOUT_RATE)){voRepresentation.maxPlayoutRate=realRepresentation.maxPlayoutRate;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_BASE)){segmentInfo=realRepresentation.SegmentBase;voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_BASE;}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_LIST)){segmentInfo=realRepresentation.SegmentList;if(segmentInfo.hasOwnProperty(_DashConstants2.default.SEGMENT_TIMELINE)){voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_TIMELINE;}else{voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_LIST;}}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_TEMPLATE)){segmentInfo=realRepresentation.SegmentTemplate;if(segmentInfo.hasOwnProperty(_DashConstants2.default.SEGMENT_TIMELINE)){voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_TIMELINE;}else{voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_TEMPLATE;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.INITIALIZATION_MINUS)){voRepresentation.initialization=segmentInfo.initialization.split('$Bandwidth$').join(realRepresentation.bandwidth).split('$RepresentationID$').join(realRepresentation.id);}}else{voRepresentation.segmentInfoType=_DashConstants2.default.BASE_URL;}voRepresentation.essentialProperties=getEssentialPropertiesForRepresentation(realRepresentation);if(segmentInfo){if(segmentInfo.hasOwnProperty(_DashConstants2.default.INITIALIZATION)){var initialization=segmentInfo.Initialization;if(initialization.hasOwnProperty(_DashConstants2.default.SOURCE_URL)){voRepresentation.initialization=initialization.sourceURL;}if(initialization.hasOwnProperty(_DashConstants2.default.RANGE)){voRepresentation.range=initialization.range;// initialization source url will be determined from\\n// BaseURL when resolved at load time.\\n}}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.MIME_TYPE)&&getIsTextTrack(realRepresentation.mimeType)){voRepresentation.range=0;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.TIMESCALE)){voRepresentation.timescale=segmentInfo.timescale;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.DURATION)){// TODO according to the spec @maxSegmentDuration specifies the maximum duration of any Segment in any Representation in the Media Presentation\\n// It is also said that for a SegmentTimeline any @d value shall not exceed the value of MPD@maxSegmentDuration, but nothing is said about\\n// SegmentTemplate @duration attribute. We need to find out if @maxSegmentDuration should be used instead of calculated duration if the the duration\\n// exceeds @maxSegmentDuration\\nvoRepresentation.segmentDuration=segmentInfo.duration/voRepresentation.timescale;}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_TEMPLATE)){segmentInfo=realRepresentation.SegmentTemplate;if(segmentInfo.hasOwnProperty(_DashConstants2.default.SEGMENT_TIMELINE)){voRepresentation.segmentDuration=calcSegmentDuration(segmentInfo.SegmentTimeline)/voRepresentation.timescale;}}if(segmentInfo.hasOwnProperty(_DashConstants2.default.MEDIA)){voRepresentation.media=segmentInfo.media;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.START_NUMBER)){voRepresentation.startNumber=segmentInfo.startNumber;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.INDEX_RANGE)){voRepresentation.indexRange=segmentInfo.indexRange;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.PRESENTATION_TIME_OFFSET)){voRepresentation.presentationTimeOffset=segmentInfo.presentationTimeOffset/voRepresentation.timescale;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_OFFSET)){voRepresentation.availabilityTimeOffset=segmentInfo.availabilityTimeOffset;}else if(baseUrl&&baseUrl.availabilityTimeOffset!==undefined){voRepresentation.availabilityTimeOffset=baseUrl.availabilityTimeOffset;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_COMPLETE)){voRepresentation.availabilityTimeComplete=segmentInfo.availabilityTimeComplete!=='false';}else if(baseUrl&&baseUrl.availabilityTimeComplete!==undefined){voRepresentation.availabilityTimeComplete=baseUrl.availabilityTimeComplete;}}voRepresentation.MSETimeOffset=calcMSETimeOffset(voRepresentation);voRepresentation.path=[voAdaptation.period.index,voAdaptation.index,i];voRepresentations.push(voRepresentation);}}return voRepresentations;}function calcSegmentDuration(segmentTimeline){var s0=segmentTimeline.S_asArray[0];var s1=segmentTimeline.S_asArray[1];return s0.hasOwnProperty('d')?s0.d:s1.t-s0.t;}function calcMSETimeOffset(representation){// The MSEOffset is offset from AST for media. It is Period@start - presentationTimeOffset\\nvar presentationOffset=representation.presentationTimeOffset;var periodStart=representation.adaptation.period.start;return periodStart-presentationOffset;}function getAdaptationsForPeriod(voPeriod){var realPeriod=voPeriod&&isInteger(voPeriod.index)?voPeriod.mpd.manifest.Period_asArray[voPeriod.index]:null;var voAdaptations=[];var voAdaptationSet=void 0,realAdaptationSet=void 0,i=void 0;if(realPeriod&&realPeriod.AdaptationSet_asArray){for(i=0;i<realPeriod.AdaptationSet_asArray.length;i++){realAdaptationSet=realPeriod.AdaptationSet_asArray[i];voAdaptationSet=new _AdaptationSet2.default();if(realAdaptationSet.hasOwnProperty(_DashConstants2.default.ID)){voAdaptationSet.id=realAdaptationSet.id;}voAdaptationSet.index=i;voAdaptationSet.period=voPeriod;if(getIsMuxed(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.MUXED;}else if(getIsAudio(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.AUDIO;}else if(getIsVideo(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.VIDEO;}else if(getIsFragmentedText(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.FRAGMENTED_TEXT;}else if(getIsImage(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.IMAGE;}else{voAdaptationSet.type=_Constants2.default.TEXT;}voAdaptations.push(voAdaptationSet);}}return voAdaptations;}function getRegularPeriods(mpd){var isDynamic=mpd?getIsDynamic(mpd.manifest):false;var voPeriods=[];var realPreviousPeriod=null;var realPeriod=null;var voPreviousPeriod=null;var voPeriod=null;var len=void 0,i=void 0;for(i=0,len=mpd&&mpd.manifest&&mpd.manifest.Period_asArray?mpd.manifest.Period_asArray.length:0;i<len;i++){realPeriod=mpd.manifest.Period_asArray[i];// If the attribute @start is present in the Period, then the\\n// Period is a regular Period and the PeriodStart is equal\\n// to the value of this attribute.\\nif(realPeriod.hasOwnProperty(_DashConstants2.default.START)){voPeriod=new _Period2.default();voPeriod.start=realPeriod.start;}// If the @start attribute is absent, but the previous Period\\n// element contains a @duration attribute then then this new\\n// Period is also a regular Period. The start time of the new\\n// Period PeriodStart is the sum of the start time of the previous\\n// Period PeriodStart and the value of the attribute @duration\\n// of the previous Period.\\nelse if(realPreviousPeriod!==null&&realPreviousPeriod.hasOwnProperty(_DashConstants2.default.DURATION)&&voPreviousPeriod!==null){voPeriod=new _Period2.default();voPeriod.start=parseFloat((voPreviousPeriod.start+voPreviousPeriod.duration).toFixed(5));}// If (i) @start attribute is absent, and (ii) the Period element\\n// is the first in the MPD, and (iii) the MPD@type is 'static',\\n// then the PeriodStart time shall be set to zero.\\nelse if(i===0&&!isDynamic){voPeriod=new _Period2.default();voPeriod.start=0;}// The Period extends until the PeriodStart of the next Period.\\n// The difference between the PeriodStart time of a Period and\\n// the PeriodStart time of the following Period.\\nif(voPreviousPeriod!==null&&isNaN(voPreviousPeriod.duration)){if(voPeriod!==null){voPreviousPeriod.duration=parseFloat((voPeriod.start-voPreviousPeriod.start).toFixed(5));}else{logger.warn('First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback');}}if(voPeriod!==null){voPeriod.id=getPeriodId(realPeriod,i);voPeriod.index=i;voPeriod.mpd=mpd;if(realPeriod.hasOwnProperty(_DashConstants2.default.DURATION)){voPeriod.duration=realPeriod.duration;}voPeriods.push(voPeriod);realPreviousPeriod=realPeriod;voPreviousPeriod=voPeriod;}realPeriod=null;voPeriod=null;}if(voPeriods.length===0){return voPeriods;}// The last Period extends until the end of the Media Presentation.\\n// The difference between the PeriodStart time of the last Period\\n// and the mpd duration\\nif(voPreviousPeriod!==null&&isNaN(voPreviousPeriod.duration)){voPreviousPeriod.duration=parseFloat((getEndTimeForLastPeriod(voPreviousPeriod)-voPreviousPeriod.start).toFixed(5));}return voPeriods;}function getPeriodId(realPeriod,i){if(!realPeriod){throw new Error('Period cannot be null or undefined');}var id=_Period2.default.DEFAULT_ID+'_'+i;if(realPeriod.hasOwnProperty(_DashConstants2.default.ID)&&realPeriod.id.length>0&&realPeriod.id!=='__proto__'){id=realPeriod.id;}return id;}function getMpd(manifest){var mpd=new _Mpd2.default();if(manifest){mpd.manifest=manifest;if(manifest.hasOwnProperty(_DashConstants2.default.AVAILABILITY_START_TIME)){mpd.availabilityStartTime=new Date(manifest.availabilityStartTime.getTime());}else{if(manifest.loadedTime){mpd.availabilityStartTime=new Date(manifest.loadedTime.getTime());}}if(manifest.hasOwnProperty(_DashConstants2.default.AVAILABILITY_END_TIME)){mpd.availabilityEndTime=new Date(manifest.availabilityEndTime.getTime());}if(manifest.hasOwnProperty(_DashConstants2.default.MINIMUM_UPDATE_PERIOD)){mpd.minimumUpdatePeriod=manifest.minimumUpdatePeriod;}if(manifest.hasOwnProperty(_DashConstants2.default.MEDIA_PRESENTATION_DURATION)){mpd.mediaPresentationDuration=manifest.mediaPresentationDuration;}if(manifest.hasOwnProperty(_DashConstants2.default.SUGGESTED_PRESENTATION_DELAY)){mpd.suggestedPresentationDelay=manifest.suggestedPresentationDelay;}if(manifest.hasOwnProperty(_DashConstants2.default.TIMESHIFT_BUFFER_DEPTH)){mpd.timeShiftBufferDepth=manifest.timeShiftBufferDepth;}if(manifest.hasOwnProperty(_DashConstants2.default.MAX_SEGMENT_DURATION)){mpd.maxSegmentDuration=manifest.maxSegmentDuration;}if(manifest.hasOwnProperty(_DashConstants2.default.PUBLISH_TIME)){mpd.publishTime=new Date(manifest.publishTime);}}return mpd;}function checkConfig(){if(!errHandler||!errHandler.hasOwnProperty('error')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getEndTimeForLastPeriod(voPeriod){checkConfig();var isDynamic=getIsDynamic(voPeriod.mpd.manifest);var periodEnd=void 0;if(voPeriod.mpd.manifest.mediaPresentationDuration){periodEnd=voPeriod.mpd.manifest.mediaPresentationDuration;}else if(voPeriod.duration){periodEnd=voPeriod.duration;}else if(isDynamic){periodEnd=Number.POSITIVE_INFINITY;}else{errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_PARSE_CODE,'Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.',voPeriod));}return periodEnd;}function getEventsForPeriod(period){var manifest=period&&period.mpd&&period.mpd.manifest?period.mpd.manifest:null;var periodArray=manifest?manifest.Period_asArray:null;var eventStreams=periodArray&&period&&isInteger(period.index)?periodArray[period.index].EventStream_asArray:null;var events=[];var i=void 0,j=void 0;if(eventStreams){for(i=0;i<eventStreams.length;i++){var eventStream=new _EventStream2.default();eventStream.period=period;eventStream.timescale=1;if(eventStreams[i].hasOwnProperty(_Constants2.default.SCHEME_ID_URI)){eventStream.schemeIdUri=eventStreams[i][_Constants2.default.SCHEME_ID_URI];}else{throw new Error('Invalid EventStream. SchemeIdUri has to be set');}if(eventStreams[i].hasOwnProperty(_DashConstants2.default.TIMESCALE)){eventStream.timescale=eventStreams[i][_DashConstants2.default.TIMESCALE];}if(eventStreams[i].hasOwnProperty(_DashConstants2.default.VALUE)){eventStream.value=eventStreams[i][_DashConstants2.default.VALUE];}if(eventStreams[i].hasOwnProperty(_DashConstants2.default.PRESENTATION_TIME_OFFSET)){eventStream.presentationTimeOffset=eventStreams[i][_DashConstants2.default.PRESENTATION_TIME_OFFSET];}for(j=0;eventStreams[i].Event_asArray&&j<eventStreams[i].Event_asArray.length;j++){var currentMpdEvent=eventStreams[i].Event_asArray[j];var event=new _Event2.default();event.presentationTime=0;event.eventStream=eventStream;if(currentMpdEvent.hasOwnProperty(_DashConstants2.default.PRESENTATION_TIME)){event.presentationTime=currentMpdEvent.presentationTime;var presentationTimeOffset=eventStream.presentationTimeOffset?eventStream.presentationTimeOffset/eventStream.timescale:0;event.calculatedPresentationTime=event.presentationTime/eventStream.timescale+period.start-presentationTimeOffset;}if(currentMpdEvent.hasOwnProperty(_DashConstants2.default.DURATION)){event.duration=currentMpdEvent.duration/eventStream.timescale;}if(currentMpdEvent.hasOwnProperty(_DashConstants2.default.ID)){event.id=currentMpdEvent.id;}if(currentMpdEvent.Signal&&currentMpdEvent.Signal.Binary){// toString is used to manage both regular and namespaced tags\\nevent.messageData=BASE64.decodeArray(currentMpdEvent.Signal.Binary.toString());}else{// From Cor.1: 'NOTE: this attribute is an alternative\\n// to specifying a complete XML element(s) in the Event.\\n// It is useful when an event leans itself to a compact\\n// string representation'.\\nevent.messageData=currentMpdEvent.messageData||currentMpdEvent.__text;}events.push(event);}}}return events;}function getEventStreams(inbandStreams,representation){var eventStreams=[];var i=void 0;if(!inbandStreams)return eventStreams;for(i=0;i<inbandStreams.length;i++){var eventStream=new _EventStream2.default();eventStream.timescale=1;eventStream.representation=representation;if(inbandStreams[i].hasOwnProperty(_Constants2.default.SCHEME_ID_URI)){eventStream.schemeIdUri=inbandStreams[i].schemeIdUri;}else{throw new Error('Invalid EventStream. SchemeIdUri has to be set');}if(inbandStreams[i].hasOwnProperty(_DashConstants2.default.TIMESCALE)){eventStream.timescale=inbandStreams[i].timescale;}if(inbandStreams[i].hasOwnProperty(_DashConstants2.default.VALUE)){eventStream.value=inbandStreams[i].value;}eventStreams.push(eventStream);}return eventStreams;}function getEventStreamForAdaptationSet(manifest,adaptation){var inbandStreams=void 0,periodArray=void 0,adaptationArray=void 0;if(manifest&&manifest.Period_asArray&&adaptation&&adaptation.period&&isInteger(adaptation.period.index)){periodArray=manifest.Period_asArray[adaptation.period.index];if(periodArray&&periodArray.AdaptationSet_asArray&&isInteger(adaptation.index)){adaptationArray=periodArray.AdaptationSet_asArray[adaptation.index];if(adaptationArray){inbandStreams=adaptationArray.InbandEventStream_asArray;}}}return getEventStreams(inbandStreams,null);}function getEventStreamForRepresentation(manifest,representation){var inbandStreams=void 0,periodArray=void 0,adaptationArray=void 0,representationArray=void 0;if(manifest&&manifest.Period_asArray&&representation&&representation.adaptation&&representation.adaptation.period&&isInteger(representation.adaptation.period.index)){periodArray=manifest.Period_asArray[representation.adaptation.period.index];if(periodArray&&periodArray.AdaptationSet_asArray&&isInteger(representation.adaptation.index)){adaptationArray=periodArray.AdaptationSet_asArray[representation.adaptation.index];if(adaptationArray&&adaptationArray.Representation_asArray&&isInteger(representation.index)){representationArray=adaptationArray.Representation_asArray[representation.index];if(representationArray){inbandStreams=representationArray.InbandEventStream_asArray;}}}}return getEventStreams(inbandStreams,representation);}function getUTCTimingSources(manifest){var isDynamic=getIsDynamic(manifest);var hasAST=manifest?manifest.hasOwnProperty(_DashConstants2.default.AVAILABILITY_START_TIME):false;var utcTimingsArray=manifest?manifest.UTCTiming_asArray:null;var utcTimingEntries=[];// do not bother synchronizing the clock unless MPD is live,\\n// or it is static and has availabilityStartTime attribute\\nif(isDynamic||hasAST){if(utcTimingsArray){// the order is important here - 23009-1 states that the order\\n// in the manifest \\\"indicates relative preference, first having\\n// the highest, and the last the lowest priority\\\".\\nutcTimingsArray.forEach(function(utcTiming){var entry=new _UTCTiming2.default();if(utcTiming.hasOwnProperty(_Constants2.default.SCHEME_ID_URI)){entry.schemeIdUri=utcTiming.schemeIdUri;}else{// entries of type DescriptorType with no schemeIdUri\\n// are meaningless. let's just ignore this entry and\\n// move on.\\nreturn;}// this is (incorrectly) interpreted as a number - schema\\n// defines it as a string\\nif(utcTiming.hasOwnProperty(_DashConstants2.default.VALUE)){entry.value=utcTiming.value.toString();}else{// without a value, there's not a lot we can do with\\n// this entry. let's just ignore this one and move on\\nreturn;}// we're not interested in the optional id or any other\\n// attributes which might be attached to the entry\\nutcTimingEntries.push(entry);});}}return utcTimingEntries;}function getBaseURLsFromElement(node){var baseUrls=[];// if node.BaseURL_asArray and node.baseUri are undefined entries\\n// will be [undefined] which entries.some will just skip\\nvar entries=node.BaseURL_asArray||[node.baseUri];var earlyReturn=false;entries.some(function(entry){if(entry){var baseUrl=new _BaseURL2.default();var text=entry.__text||entry;if(urlUtils.isRelative(text)){// it doesn't really make sense to have relative and\\n// absolute URLs at the same level, or multiple\\n// relative URLs at the same level, so assume we are\\n// done from this level of the MPD\\nearlyReturn=true;// deal with the specific case where the MPD@BaseURL\\n// is specified and is relative. when no MPD@BaseURL\\n// entries exist, that case is handled by the\\n// [node.baseUri] in the entries definition.\\nif(node.baseUri){text=urlUtils.resolve(text,node.baseUri);}}baseUrl.url=text;// serviceLocation is optional, but we need it in order\\n// to blacklist correctly. if it's not available, use\\n// anything unique since there's no relationship to any\\n// other BaseURL and, in theory, the url should be\\n// unique so use this instead.\\nif(entry.hasOwnProperty(_DashConstants2.default.SERVICE_LOCATION)&&entry.serviceLocation.length){baseUrl.serviceLocation=entry.serviceLocation;}else{baseUrl.serviceLocation=text;}if(entry.hasOwnProperty(_DashConstants2.default.DVB_PRIORITY)){baseUrl.dvb_priority=entry[_DashConstants2.default.DVB_PRIORITY];}if(entry.hasOwnProperty(_DashConstants2.default.DVB_WEIGHT)){baseUrl.dvb_weight=entry[_DashConstants2.default.DVB_WEIGHT];}if(entry.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_OFFSET)){baseUrl.availabilityTimeOffset=entry[_DashConstants2.default.AVAILABILITY_TIME_OFFSET];}if(entry.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_COMPLETE)){baseUrl.availabilityTimeComplete=entry[_DashConstants2.default.AVAILABILITY_TIME_COMPLETE]!=='false';}/* NOTE: byteRange currently unused\\n                 */baseUrls.push(baseUrl);return earlyReturn;}});return baseUrls;}function getLocation(manifest){if(manifest&&manifest.hasOwnProperty(_Constants2.default.LOCATION)){// for now, do not support multiple Locations -\\n// just set Location to the first Location.\\nmanifest.Location=manifest.Location_asArray[0];return manifest.Location;}// may well be undefined\\nreturn undefined;}function getPatchLocation(manifest){if(manifest&&manifest.hasOwnProperty(_DashConstants2.default.PATCH_LOCATION)){// only include support for single patch location currently\\nmanifest.PatchLocation=manifest.PatchLocation_asArray[0];return manifest.PatchLocation;}// no patch location provided\\nreturn undefined;}function getSuggestedPresentationDelay(mpd){return mpd&&mpd.hasOwnProperty(_DashConstants2.default.SUGGESTED_PRESENTATION_DELAY)?mpd.suggestedPresentationDelay:null;}function getAvailabilityStartTime(mpd){return mpd&&mpd.hasOwnProperty(_DashConstants2.default.AVAILABILITY_START_TIME)&&mpd.availabilityStartTime!==null?mpd.availabilityStartTime.getTime():null;}function getServiceDescriptions(manifest){var serviceDescriptions=[];if(manifest&&manifest.hasOwnProperty(_DashConstants2.default.SERVICE_DESCRIPTION)){var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=manifest.ServiceDescription_asArray[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var sd=_step.value;// Convert each of the properties defined in\\nvar id=void 0,schemeIdUri=void 0,latency=void 0,playbackRate=void 0;for(var prop in sd){if(sd.hasOwnProperty(prop)){if(prop===_DashConstants2.default.ID){id=sd[prop];}else if(prop===_DashConstants2.default.SERVICE_DESCRIPTION_SCOPE){schemeIdUri=sd[prop].schemeIdUri;}else if(prop===_DashConstants2.default.SERVICE_DESCRIPTION_LATENCY){latency={target:sd[prop].target,max:sd[prop].max,min:sd[prop].min};}else if(prop===_DashConstants2.default.SERVICE_DESCRIPTION_PLAYBACK_RATE){playbackRate={max:sd[prop].max,min:sd[prop].min};}}}// we have a ServiceDescription for low latency. Add it if it really has parameters defined\\nif(schemeIdUri===_Constants2.default.SERVICE_DESCRIPTION_LL_SCHEME&&(latency||playbackRate)){serviceDescriptions.push({id:id,schemeIdUri:schemeIdUri,latency:latency,playbackRate:playbackRate});}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}}return serviceDescriptions;}function getSupplementalPropperties(adaptation){var supplementalProperties={};if(adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.SUPPLEMENTAL_PROPERTY)){var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=adaptation.SupplementalProperty_asArray[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var sp=_step2.value;if(sp.hasOwnProperty(_Constants2.default.SCHEME_ID_URI)&&sp.hasOwnProperty(_DashConstants2.default.VALUE)){supplementalProperties[sp[_Constants2.default.SCHEME_ID_URI]]=sp[_DashConstants2.default.VALUE];}}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return();}}finally{if(_didIteratorError2){throw _iteratorError2;}}}}return supplementalProperties;}function setConfig(config){if(!config)return;if(config.errHandler){errHandler=config.errHandler;}if(config.BASE64){BASE64=config.BASE64;}}instance={getIsTypeOf:getIsTypeOf,getIsTextTrack:getIsTextTrack,getLanguageForAdaptation:getLanguageForAdaptation,getViewpointForAdaptation:getViewpointForAdaptation,getRolesForAdaptation:getRolesForAdaptation,getAccessibilityForAdaptation:getAccessibilityForAdaptation,getAudioChannelConfigurationForAdaptation:getAudioChannelConfigurationForAdaptation,getAudioChannelConfigurationForRepresentation:getAudioChannelConfigurationForRepresentation,getAdaptationForIndex:getAdaptationForIndex,getIndexForAdaptation:getIndexForAdaptation,getAdaptationForId:getAdaptationForId,getAdaptationsForType:getAdaptationsForType,getRealPeriods:getRealPeriods,getRealPeriodForIndex:getRealPeriodForIndex,getCodec:getCodec,getMimeType:getMimeType,getKID:getKID,getLabelsForAdaptation:getLabelsForAdaptation,getContentProtectionData:getContentProtectionData,getIsDynamic:getIsDynamic,getId:getId,hasProfile:hasProfile,getDuration:getDuration,getBandwidth:getBandwidth,getManifestUpdatePeriod:getManifestUpdatePeriod,getPublishTime:getPublishTime,getRepresentationCount:getRepresentationCount,getBitrateListForAdaptation:getBitrateListForAdaptation,getRepresentationFor:getRepresentationFor,getRepresentationsForAdaptation:getRepresentationsForAdaptation,getAdaptationsForPeriod:getAdaptationsForPeriod,getRegularPeriods:getRegularPeriods,getMpd:getMpd,getEventsForPeriod:getEventsForPeriod,getEssentialPropertiesForRepresentation:getEssentialPropertiesForRepresentation,getEventStreamForAdaptationSet:getEventStreamForAdaptationSet,getEventStreamForRepresentation:getEventStreamForRepresentation,getUTCTimingSources:getUTCTimingSources,getBaseURLsFromElement:getBaseURLsFromElement,getRepresentationSortFunction:getRepresentationSortFunction,getLocation:getLocation,getPatchLocation:getPatchLocation,getSuggestedPresentationDelay:getSuggestedPresentationDelay,getAvailabilityStartTime:getAvailabilityStartTime,getServiceDescriptions:getServiceDescriptions,getSupplementalPropperties:getSupplementalPropperties,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashManifestModel.__dashjs_factory_name='DashManifestModel';exports.default=_FactoryMaker2.default.getSingletonFactory(DashManifestModel);\\n//# sourceMappingURL=DashManifestModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SimpleXPath=__webpack_require__(/*! ../vo/SimpleXPath */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js\\\");var _SimpleXPath2=_interopRequireDefault(_SimpleXPath);var _PatchOperation=__webpack_require__(/*! ../vo/PatchOperation */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js\\\");var _PatchOperation2=_interopRequireDefault(_PatchOperation);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PatchManifestModel(){var instance=void 0,logger=void 0;var context=this.context;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getIsPatch(patch){return patch&&patch.hasOwnProperty(_DashConstants2.default.ORIGINAL_MPD_ID)||false;}function getPublishTime(patch){return patch&&patch.hasOwnProperty(_DashConstants2.default.PUBLISH_TIME)?new Date(patch[_DashConstants2.default.PUBLISH_TIME]):null;}function getOriginalPublishTime(patch){return patch&&patch.hasOwnProperty(_DashConstants2.default.ORIGINAL_PUBLISH_TIME)?new Date(patch[_DashConstants2.default.ORIGINAL_PUBLISH_TIME]):null;}function getMpdId(patch){return patch&&patch[_DashConstants2.default.ORIGINAL_MPD_ID]||null;}function getPatchOperations(patch){if(!patch){return[];}// Go through the patch operations in order and parse their actions out for usage\\nreturn(patch.__children||[]).map(function(nodeContainer){var action=Object.keys(nodeContainer)[0];// we only look add add/remove/replace actions\\nif(action!=='add'&&action!=='remove'&&action!=='replace'){logger.warn('Ignoring node of invalid action: '+action);return null;}var node=nodeContainer[action];var selector=node.sel;// add action can have special targeting via the 'type' attribute\\nif(action==='add'&&node.type){if(!node.type.startsWith('@')){logger.warn('Ignoring add action for prefixed namespace declaration: '+node.type+'='+node.__text);return null;}// for our purposes adding/replacing attribute are equivalent and we can normalize\\n// our processing logic by appending the attribute to the selector path\\nselector=selector+'/'+node.type;}var xpath=new _SimpleXPath2.default(selector);if(!xpath.isValid()){logger.warn('Ignoring action with invalid selector: '+action+' - '+selector);return null;}var value=null;if(xpath.findsAttribute()){value=node.__text||'';}else if(action!=='remove'){value=node.__children.reduce(function(groups,child){// note that this is informed by xml2js parse structure for the __children array\\n// which will be something like this for each child:\\n// {\\n//     \\\"<node-name>\\\": { <xml2js-node-object> }\\n// }\\nvar key=Object.keys(child)[0];// we also ignore\\nif(key!=='#text'){groups[key]=groups[key]||[];groups[key].push(child[key]);}return groups;},{});}var operation=new _PatchOperation2.default(action,xpath,value);if(action==='add'){operation.position=node.pos;}return operation;}).filter(function(operation){return!!operation;});}instance={getIsPatch:getIsPatch,getPublishTime:getPublishTime,getOriginalPublishTime:getOriginalPublishTime,getMpdId:getMpdId,getPatchOperations:getPatchOperations};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */PatchManifestModel.__dashjs_factory_name='PatchManifestModel';exports.default=_FactoryMaker2.default.getSingletonFactory(PatchManifestModel);\\n//# sourceMappingURL=PatchManifestModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _objectiron=__webpack_require__(/*! ./objectiron */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js\\\");var _objectiron2=_interopRequireDefault(_objectiron);var _xml2json=__webpack_require__(/*! ../../../externals/xml2json */ \\\"../node_modules/dashjs/build/es5/externals/xml2json.js\\\");var _xml2json2=_interopRequireDefault(_xml2json);var _StringMatcher=__webpack_require__(/*! ./matchers/StringMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js\\\");var _StringMatcher2=_interopRequireDefault(_StringMatcher);var _DurationMatcher=__webpack_require__(/*! ./matchers/DurationMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js\\\");var _DurationMatcher2=_interopRequireDefault(_DurationMatcher);var _DateTimeMatcher=__webpack_require__(/*! ./matchers/DateTimeMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js\\\");var _DateTimeMatcher2=_interopRequireDefault(_DateTimeMatcher);var _NumericMatcher=__webpack_require__(/*! ./matchers/NumericMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js\\\");var _NumericMatcher2=_interopRequireDefault(_NumericMatcher);var _RepresentationBaseValuesMap=__webpack_require__(/*! ./maps/RepresentationBaseValuesMap */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js\\\");var _RepresentationBaseValuesMap2=_interopRequireDefault(_RepresentationBaseValuesMap);var _SegmentValuesMap=__webpack_require__(/*! ./maps/SegmentValuesMap */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js\\\");var _SegmentValuesMap2=_interopRequireDefault(_SegmentValuesMap);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DashParser(config){config=config||{};var context=this.context;var debug=config.debug;var instance=void 0,logger=void 0,matchers=void 0,converter=void 0,objectIron=void 0;function setup(){logger=debug.getLogger(instance);matchers=[new _DurationMatcher2.default(),new _DateTimeMatcher2.default(),new _NumericMatcher2.default(),new _StringMatcher2.default()// last in list to take precedence over NumericMatcher\\n];converter=new _xml2json2.default({escapeMode:false,attributePrefix:'',arrayAccessForm:'property',emptyNodeForm:'object',stripWhitespaces:false,enableToStringFunc:true,ignoreRoot:false,matchers:matchers});objectIron=(0,_objectiron2.default)(context).create({adaptationset:new _RepresentationBaseValuesMap2.default(),period:new _SegmentValuesMap2.default()});}function getMatchers(){return matchers;}function getIron(){return objectIron;}function parse(data){var manifest=void 0;var startTime=window.performance.now();manifest=converter.xml_str2json(data);if(!manifest){throw new Error('parsing the manifest failed');}var jsonTime=window.performance.now();// handle full MPD and Patch ironing separately\\nif(manifest.Patch){manifest=manifest.Patch;// drop root reference\\n// apply iron to patch operations individually\\nif(manifest.add_asArray){manifest.add_asArray.forEach(function(operand){return objectIron.run(operand);});}if(manifest.replace_asArray){manifest.replace_asArray.forEach(function(operand){return objectIron.run(operand);});}// note that we don't need to iron remove as they contain no children\\n}else{manifest=manifest.MPD;// drop root reference\\nobjectIron.run(manifest);}var ironedTime=window.performance.now();logger.info('Parsing complete: ( xml2json: '+(jsonTime-startTime).toPrecision(3)+'ms, objectiron: '+(ironedTime-jsonTime).toPrecision(3)+'ms, total: '+((ironedTime-startTime)/1000).toPrecision(3)+'s)');manifest.protocol='DASH';return manifest;}instance={parse:parse,getMatchers:getMatchers,getIron:getIron};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashParser.__dashjs_factory_name='DashParser';exports.default=_FactoryMaker2.default.getClassFactory(DashParser);\\n//# sourceMappingURL=DashParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a property belonging to a MapNode\\n * @ignore\\n */var CommonProperty=function(){function CommonProperty(name){_classCallCheck(this,CommonProperty);var getDefaultMergeForName=function getDefaultMergeForName(n){return n&&n.length&&n.charAt(0)===n.charAt(0).toUpperCase();};this._name=name;this._merge=getDefaultMergeForName(name);}_createClass(CommonProperty,[{key:\\\"name\\\",get:function get(){return this._name;}},{key:\\\"merge\\\",get:function get(){return this._merge;}}]);return CommonProperty;}();exports.default=CommonProperty;\\n//# sourceMappingURL=CommonProperty.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a node at some level in a ValueMap\\n */var _CommonProperty=__webpack_require__(/*! ./CommonProperty */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js\\\");var _CommonProperty2=_interopRequireDefault(_CommonProperty);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}var MapNode=function(){function MapNode(name,properties,children){var _this=this;_classCallCheck(this,MapNode);this._name=name||'';this._properties=[];this._children=children||[];if(Array.isArray(properties)){properties.forEach(function(p){_this._properties.push(new _CommonProperty2.default(p));});}}_createClass(MapNode,[{key:'name',get:function get(){return this._name;}},{key:'children',get:function get(){return this._children;}},{key:'properties',get:function get(){return this._properties;}}]);return MapNode;}();exports.default=MapNode;\\n//# sourceMappingURL=MapNode.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js\":\n/*!********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js ***!\n  \\********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MapNode2=__webpack_require__(/*! ./MapNode */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js\\\");var _MapNode3=_interopRequireDefault(_MapNode2);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a RepresentationBaseValuesMap type for input to objectiron\\n */var RepresentationBaseValuesMap=function(_MapNode){_inherits(RepresentationBaseValuesMap,_MapNode);function RepresentationBaseValuesMap(){_classCallCheck(this,RepresentationBaseValuesMap);var commonProperties=[_DashConstants2.default.PROFILES,_DashConstants2.default.WIDTH,_DashConstants2.default.HEIGHT,_DashConstants2.default.SAR,_DashConstants2.default.FRAMERATE,_DashConstants2.default.AUDIO_SAMPLING_RATE,_DashConstants2.default.MIME_TYPE,_DashConstants2.default.SEGMENT_PROFILES,_DashConstants2.default.CODECS,_DashConstants2.default.MAXIMUM_SAP_PERIOD,_DashConstants2.default.START_WITH_SAP,_DashConstants2.default.MAX_PLAYOUT_RATE,_DashConstants2.default.CODING_DEPENDENCY,_DashConstants2.default.SCAN_TYPE,_DashConstants2.default.FRAME_PACKING,_DashConstants2.default.AUDIO_CHANNEL_CONFIGURATION,_DashConstants2.default.CONTENT_PROTECTION,_DashConstants2.default.ESSENTIAL_PROPERTY,_DashConstants2.default.SUPPLEMENTAL_PROPERTY,_DashConstants2.default.INBAND_EVENT_STREAM];return _possibleConstructorReturn(this,(RepresentationBaseValuesMap.__proto__||Object.getPrototypeOf(RepresentationBaseValuesMap)).call(this,_DashConstants2.default.ADAPTATION_SET,commonProperties,[new _MapNode3.default(_DashConstants2.default.REPRESENTATION,commonProperties,[new _MapNode3.default(_DashConstants2.default.SUB_REPRESENTATION,commonProperties)])]));}return RepresentationBaseValuesMap;}(_MapNode3.default);exports.default=RepresentationBaseValuesMap;\\n//# sourceMappingURL=RepresentationBaseValuesMap.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MapNode2=__webpack_require__(/*! ./MapNode */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js\\\");var _MapNode3=_interopRequireDefault(_MapNode2);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a SegmentValuesMap type for input to objectiron\\n */var SegmentValuesMap=function(_MapNode){_inherits(SegmentValuesMap,_MapNode);function SegmentValuesMap(){_classCallCheck(this,SegmentValuesMap);var commonProperties=[_DashConstants2.default.SEGMENT_BASE,_DashConstants2.default.SEGMENT_TEMPLATE,_DashConstants2.default.SEGMENT_LIST];return _possibleConstructorReturn(this,(SegmentValuesMap.__proto__||Object.getPrototypeOf(SegmentValuesMap)).call(this,_DashConstants2.default.PERIOD,commonProperties,[new _MapNode3.default(_DashConstants2.default.ADAPTATION_SET,commonProperties,[new _MapNode3.default(_DashConstants2.default.REPRESENTATION,commonProperties)])]));}return SegmentValuesMap;}(_MapNode3.default);exports.default=SegmentValuesMap;\\n//# sourceMappingURL=SegmentValuesMap.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a base type for matching and converting types in manifest to\\n * something more useful\\n * @ignore\\n */var BaseMatcher=function(){function BaseMatcher(test,converter){_classCallCheck(this,BaseMatcher);this._test=test;this._converter=converter;}_createClass(BaseMatcher,[{key:\\\"test\\\",get:function get(){return this._test;}},{key:\\\"converter\\\",get:function get(){return this._converter;}}]);return BaseMatcher;}();exports.default=BaseMatcher;\\n//# sourceMappingURL=BaseMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js\":\n/*!************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js ***!\n  \\************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\\\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc matches and converts xs:datetime to Date\\n */var SECONDS_IN_MIN=60;var MINUTES_IN_HOUR=60;var MILLISECONDS_IN_SECONDS=1000;var datetimeRegex=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\\\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/;var DateTimeMatcher=function(_BaseMatcher){_inherits(DateTimeMatcher,_BaseMatcher);function DateTimeMatcher(){_classCallCheck(this,DateTimeMatcher);return _possibleConstructorReturn(this,(DateTimeMatcher.__proto__||Object.getPrototypeOf(DateTimeMatcher)).call(this,function(attr){return datetimeRegex.test(attr.value);},function(str){var match=datetimeRegex.exec(str);var utcDate=void 0;// If the string does not contain a timezone offset different browsers can interpret it either\\n// as UTC or as a local time so we have to parse the string manually to normalize the given date value for\\n// all browsers\\nutcDate=Date.UTC(parseInt(match[1],10),parseInt(match[2],10)-1,// months start from zero\\nparseInt(match[3],10),parseInt(match[4],10),parseInt(match[5],10),match[6]&&parseInt(match[6],10)||0,match[7]&&parseFloat(match[7])*MILLISECONDS_IN_SECONDS||0);// If the date has timezone offset take it into account as well\\nif(match[9]&&match[10]){var timezoneOffset=parseInt(match[9],10)*MINUTES_IN_HOUR+parseInt(match[10],10);utcDate+=(match[8]==='+'?-1:+1)*timezoneOffset*SECONDS_IN_MIN*MILLISECONDS_IN_SECONDS;}return new Date(utcDate);}));}return DateTimeMatcher;}(_BaseMatcher3.default);exports.default=DateTimeMatcher;\\n//# sourceMappingURL=DateTimeMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js\":\n/*!************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js ***!\n  \\************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\\\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);var _Constants=__webpack_require__(/*! ../../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc matches and converts xs:duration to seconds\\n */var durationRegex=/^([-])?P(([\\\\d.]*)Y)?(([\\\\d.]*)M)?(([\\\\d.]*)D)?T?(([\\\\d.]*)H)?(([\\\\d.]*)M)?(([\\\\d.]*)S)?/;var SECONDS_IN_YEAR=365*24*60*60;var SECONDS_IN_MONTH=30*24*60*60;var SECONDS_IN_DAY=24*60*60;var SECONDS_IN_HOUR=60*60;var SECONDS_IN_MIN=60;var DurationMatcher=function(_BaseMatcher){_inherits(DurationMatcher,_BaseMatcher);function DurationMatcher(){_classCallCheck(this,DurationMatcher);return _possibleConstructorReturn(this,(DurationMatcher.__proto__||Object.getPrototypeOf(DurationMatcher)).call(this,function(attr){var attributeList=[_DashConstants2.default.MIN_BUFFER_TIME,_DashConstants2.default.MEDIA_PRESENTATION_DURATION,_DashConstants2.default.MINIMUM_UPDATE_PERIOD,_DashConstants2.default.TIMESHIFT_BUFFER_DEPTH,_DashConstants2.default.MAX_SEGMENT_DURATION,_DashConstants2.default.MAX_SUBSEGMENT_DURATION,_DashConstants2.default.SUGGESTED_PRESENTATION_DELAY,_DashConstants2.default.START,_Constants2.default.START_TIME,_DashConstants2.default.DURATION];var len=attributeList.length;for(var i=0;i<len;i++){if(attr.nodeName===attributeList[i]){return durationRegex.test(attr.value);}}return false;},function(str){//str = \\\"P10Y10M10DT10H10M10.1S\\\";\\nvar match=durationRegex.exec(str);var result=parseFloat(match[3]||0)*SECONDS_IN_YEAR+parseFloat(match[5]||0)*SECONDS_IN_MONTH+parseFloat(match[7]||0)*SECONDS_IN_DAY+parseFloat(match[9]||0)*SECONDS_IN_HOUR+parseFloat(match[11]||0)*SECONDS_IN_MIN+parseFloat(match[13]||0);if(match[1]!==undefined){result=-result;}return result;}));}return DurationMatcher;}(_BaseMatcher3.default);exports.default=DurationMatcher;\\n//# sourceMappingURL=DurationMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\\\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Matches and converts xs:numeric to float\\n */var numericRegex=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/;var NumericMatcher=function(_BaseMatcher){_inherits(NumericMatcher,_BaseMatcher);function NumericMatcher(){_classCallCheck(this,NumericMatcher);return _possibleConstructorReturn(this,(NumericMatcher.__proto__||Object.getPrototypeOf(NumericMatcher)).call(this,function(attr){return numericRegex.test(attr.value);},function(str){return parseFloat(str);}));}return NumericMatcher;}(_BaseMatcher3.default);exports.default=NumericMatcher;\\n//# sourceMappingURL=NumericMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\\\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Matches and converts xs:string to string, but only for specific attributes on specific nodes\\n */var StringMatcher=function(_BaseMatcher){_inherits(StringMatcher,_BaseMatcher);function StringMatcher(){_classCallCheck(this,StringMatcher);return _possibleConstructorReturn(this,(StringMatcher.__proto__||Object.getPrototypeOf(StringMatcher)).call(this,function(attr,nodeName){var _stringAttrsInElement;var stringAttrsInElements=(_stringAttrsInElement={},_defineProperty(_stringAttrsInElement,_DashConstants2.default.MPD,[_DashConstants2.default.ID,_DashConstants2.default.PROFILES]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.PERIOD,[_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.BASE_URL,[_DashConstants2.default.SERVICE_LOCATION,_DashConstants2.default.BYTE_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_BASE,[_DashConstants2.default.INDEX_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.INITIALIZATION,[_DashConstants2.default.RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.REPRESENTATION_INDEX,[_DashConstants2.default.RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_LIST,[_DashConstants2.default.INDEX_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.BITSTREAM_SWITCHING,[_DashConstants2.default.RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_URL,[_DashConstants2.default.MEDIA_RANGE,_DashConstants2.default.INDEX_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_TEMPLATE,[_DashConstants2.default.INDEX_RANGE,_DashConstants2.default.MEDIA,_DashConstants2.default.INDEX,_DashConstants2.default.INITIALIZATION_MINUS,_DashConstants2.default.BITSTREAM_SWITCHING_MINUS]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ASSET_IDENTIFIER,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.EVENT_STREAM,[_DashConstants2.default.VALUE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ADAPTATION_SET,[_DashConstants2.default.PROFILES,_DashConstants2.default.MIME_TYPE,_DashConstants2.default.SEGMENT_PROFILES,_DashConstants2.default.CODECS,_DashConstants2.default.CONTENT_TYPE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.FRAME_PACKING,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.AUDIO_CHANNEL_CONFIGURATION,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.CONTENT_PROTECTION,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ESSENTIAL_PROPERTY,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SUPPLEMENTAL_PROPERTY,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.INBAND_EVENT_STREAM,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ACCESSIBILITY,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ROLE,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.RATING,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.VIEWPOINT,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.CONTENT_COMPONENT,[_DashConstants2.default.CONTENT_TYPE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.REPRESENTATION,[_DashConstants2.default.ID,_DashConstants2.default.DEPENDENCY_ID,_DashConstants2.default.MEDIA_STREAM_STRUCTURE_ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SUBSET,[_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.METRICS,[_DashConstants2.default.METRICS_MINUS]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.REPORTING,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_stringAttrsInElement);if(stringAttrsInElements.hasOwnProperty(nodeName)){var attrNames=stringAttrsInElements[nodeName];if(attrNames!==undefined){return attrNames.indexOf(attr.name)>=0;}else{return false;}}return false;},function(str){return String(str);}));}return StringMatcher;}(_BaseMatcher3.default);exports.default=StringMatcher;\\n//# sourceMappingURL=StringMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ObjectIron(mappers){function mergeValues(parentItem,childItem){for(var name in parentItem){if(!childItem.hasOwnProperty(name)){childItem[name]=parentItem[name];}}}function mapProperties(properties,parent,child){for(var i=0,len=properties.length;i<len;++i){var property=properties[i];if(parent[property.name]){if(child[property.name]){// check to see if we should merge\\nif(property.merge){var parentValue=parent[property.name];var childValue=child[property.name];// complex objects; merge properties\\nif((typeof parentValue==='undefined'?'undefined':_typeof(parentValue))==='object'&&(typeof childValue==='undefined'?'undefined':_typeof(childValue))==='object'){mergeValues(parentValue,childValue);}// simple objects; merge them together\\nelse{child[property.name]=parentValue+childValue;}}}else{// just add the property\\nchild[property.name]=parent[property.name];}}}}function mapItem(item,node){for(var i=0,len=item.children.length;i<len;++i){var childItem=item.children[i];var array=node[childItem.name+'_asArray'];if(array){for(var v=0,len2=array.length;v<len2;++v){var childNode=array[v];mapProperties(item.properties,node,childNode);mapItem(childItem,childNode);}}}}function run(source){if(source===null||(typeof source==='undefined'?'undefined':_typeof(source))!=='object'){return source;}if(source.Period_asArray&&'period'in mappers){var periodMapper=mappers.period;var periods=source.Period_asArray;for(var i=0,len=periods.length;i<len;++i){var period=periods[i];mapItem(periodMapper,period);if('adaptationset'in mappers){var adaptationSets=period.AdaptationSet_asArray;if(adaptationSets){var adaptationSetMapper=mappers.adaptationset;for(var _i=0,_len=adaptationSets.length;_i<_len;++_i){mapItem(adaptationSetMapper,adaptationSets[_i]);}}}}}return source;}return{run:run};}ObjectIron.__dashjs_factory_name='ObjectIron';var factory=_FactoryMaker2.default.getClassFactory(ObjectIron);exports.default=factory;\\n//# sourceMappingURL=objectiron.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _SegmentsUtils=__webpack_require__(/*! ./SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ListSegmentsGetter(config,isDynamic){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSegmentByIndex(representation,index){checkConfig();if(!representation){return null;}var list=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;var len=list.SegmentURL_asArray.length;var startNumber=representation&&!isNaN(representation.startNumber)?representation.startNumber:1;var offsetToSubtract=Math.max(startNumber-1,0);var relativeIndex=Math.max(index-offsetToSubtract,0);var segment=null;if(relativeIndex<len){var s=list.SegmentURL_asArray[relativeIndex];segment=(0,_SegmentsUtils.getIndexBasedSegment)(timelineConverter,isDynamic,representation,index);if(segment){segment.replacementTime=(startNumber+index-1)*representation.segmentDuration;segment.media=s.media?s.media:'';segment.mediaRange=s.mediaRange;segment.index=index;segment.indexRange=s.indexRange;}}representation.availableSegmentsNumber=len;return segment;}function getSegmentByTime(representation,requestedTime){checkConfig();if(!representation){return null;}var duration=representation.segmentDuration;if(isNaN(duration)){return null;}var periodTime=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,requestedTime);var index=Math.floor(periodTime/duration);return getSegmentByIndex(representation,index);}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ListSegmentsGetter.__dashjs_factory_name='ListSegmentsGetter';var factory=_FactoryMaker2.default.getClassFactory(ListSegmentsGetter);exports.default=factory;\\n//# sourceMappingURL=ListSegmentsGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/Round10.js\":\n/*!******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/Round10.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Static methods for rounding decimals\\n *\\n * Modified version of the CC0-licenced example at:\\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\\n *\\n * @export\\n * @class Round10\\n * @ignore\\n */var Round10=function(){function Round10(){_classCallCheck(this,Round10);}_createClass(Round10,null,[{key:'round10',/**\\n    * Decimal round.\\n    *\\n    * @param {Number}  value The number.\\n    * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).\\n    * @returns {Number} The adjusted value.\\n    * @ignore\\n    */value:function round10(value,exp){return _decimalAdjust('round',value,exp);}}]);return Round10;}();/**\\n * Decimal adjustment of a number.\\n *\\n * @param {String}  type  The type of adjustment.\\n * @param {Number}  value The number.\\n * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).\\n * @returns {Number} The adjusted value.\\n * @ignore\\n */exports.default=Round10;function _decimalAdjust(type,value,exp){// If the exp is undefined or zero...\\nif(typeof exp==='undefined'||+exp===0){return Math[type](value);}value=+value;exp=+exp;// If the value is not a number or the exp is not an integer...\\nif(value===null||isNaN(value)||!(typeof exp==='number'&&exp%1===0)){return NaN;}// Shift\\nvalue=value.toString().split('e');value=Math[type](+(value[0]+'e'+(value[1]?+value[1]-exp:-exp)));// Shift back\\nvalue=value.toString().split('e');return+(value[0]+'e'+(value[1]?+value[1]+exp:exp));}\\n//# sourceMappingURL=Round10.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/Round10.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function SegmentBaseGetter(config){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSegmentByIndex(representation,index){checkConfig();if(!representation){return null;}var len=representation.segments?representation.segments.length:-1;var seg=void 0;if(index<len){seg=representation.segments[index];if(seg&&seg.availabilityIdx===index){return seg;}}for(var i=0;i<len;i++){seg=representation.segments[i];if(seg&&seg.availabilityIdx===index){return seg;}}return null;}function getSegmentByTime(representation,requestedTime){checkConfig();var index=getIndexByTime(representation,requestedTime);return getSegmentByIndex(representation,index);}function getIndexByTime(representation,time){if(!representation){return-1;}var segments=representation.segments;var ln=segments?segments.length:null;var idx=-1;var epsilon=void 0,frag=void 0,ft=void 0,fd=void 0,i=void 0;if(segments&&ln>0){for(i=0;i<ln;i++){frag=segments[i];ft=frag.presentationStartTime;fd=frag.duration;epsilon=fd/2;if(time+epsilon>=ft&&time-epsilon<ft+fd){idx=frag.availabilityIdx;break;}}}return idx;}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}SegmentBaseGetter.__dashjs_factory_name='SegmentBaseGetter';var factory=_FactoryMaker2.default.getClassFactory(SegmentBaseGetter);exports.default=factory;\\n//# sourceMappingURL=SegmentBaseGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.unescapeDollarsInTemplate=unescapeDollarsInTemplate;exports.replaceIDForTemplate=replaceIDForTemplate;exports.replaceTokenForTemplate=replaceTokenForTemplate;exports.getIndexBasedSegment=getIndexBasedSegment;exports.getTimeBasedSegment=getTimeBasedSegment;var _Segment=__webpack_require__(/*! ./../vo/Segment */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\\\");var _Segment2=_interopRequireDefault(_Segment);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function zeroPadToLength(numStr,minStrLength){while(numStr.length<minStrLength){numStr='0'+numStr;}return numStr;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function getNumberForSegment(segment,segmentIndex){return segment.representation.startNumber+segmentIndex;}function unescapeDollarsInTemplate(url){return url?url.split('$$').join('$'):url;}function replaceIDForTemplate(url,value){if(!value||!url||url.indexOf('$RepresentationID$')===-1){return url;}var v=value.toString();return url.split('$RepresentationID$').join(v);}function replaceTokenForTemplate(url,token,value){var formatTag='%0';var startPos=void 0,endPos=void 0,formatTagPos=void 0,specifier=void 0,width=void 0,paddedValue=void 0;var tokenLen=token.length;var formatTagLen=formatTag.length;if(!url){return url;}// keep looping round until all instances of <token> have been\\n// replaced. once that has happened, startPos below will be -1\\n// and the completed url will be returned.\\nwhile(true){// check if there is a valid $<token>...$ identifier\\n// if not, return the url as is.\\nstartPos=url.indexOf('$'+token);if(startPos<0){return url;}// the next '$' must be the end of the identifier\\n// if there isn't one, return the url as is.\\nendPos=url.indexOf('$',startPos+tokenLen);if(endPos<0){return url;}// now see if there is an additional format tag suffixed to\\n// the identifier within the enclosing '$' characters\\nformatTagPos=url.indexOf(formatTag,startPos+tokenLen);if(formatTagPos>startPos&&formatTagPos<endPos){specifier=url.charAt(endPos-1);width=parseInt(url.substring(formatTagPos+formatTagLen,endPos-1),10);// support the minimum specifiers required by IEEE 1003.1\\n// (d, i , o, u, x, and X) for completeness\\nswitch(specifier){// treat all int types as uint,\\n// hence deliberate fallthrough\\ncase'd':case'i':case'u':paddedValue=zeroPadToLength(value.toString(),width);break;case'x':paddedValue=zeroPadToLength(value.toString(16),width);break;case'X':paddedValue=zeroPadToLength(value.toString(16),width).toUpperCase();break;case'o':paddedValue=zeroPadToLength(value.toString(8),width);break;default:return url;}}else{paddedValue=value;}url=url.substring(0,startPos)+paddedValue+url.substring(endPos+1);}}function getSegment(representation,duration,presentationStartTime,mediaStartTime,availabilityStartTime,timelineConverter,presentationEndTime,isDynamic,index){var seg=new _Segment2.default();seg.representation=representation;seg.duration=duration;seg.presentationStartTime=presentationStartTime;seg.mediaStartTime=mediaStartTime;seg.availabilityStartTime=availabilityStartTime;seg.availabilityEndTime=timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime,representation.adaptation.period.mpd,isDynamic);seg.wallStartTime=timelineConverter.calcWallTimeForSegment(seg,isDynamic);seg.replacementNumber=getNumberForSegment(seg,index);seg.availabilityIdx=index;return seg;}function isSegmentAvailable(timelineConverter,representation,segment,isDynamic){var periodEnd=timelineConverter.getPeriodEnd(representation,isDynamic);var periodRelativeEnd=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,periodEnd);var segmentTime=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,segment.presentationStartTime);if(segmentTime>=periodRelativeEnd){if(isDynamic){// segment is not available in current period, but it may be segment available in another period that current one (in DVR window)\\n// if not (time > segmentAvailabilityRange.end), then return false\\nif(representation.segmentAvailabilityRange&&segment.presentationStartTime>=representation.segmentAvailabilityRange.end){return false;}}else{return false;}}return true;}function getIndexBasedSegment(timelineConverter,isDynamic,representation,index){var duration=void 0,presentationStartTime=void 0,presentationEndTime=void 0;duration=representation.segmentDuration;/*\\n     * From spec - If neither @duration attribute nor SegmentTimeline element is present, then the Representation\\n     * shall contain exactly one Media Segment. The MPD start time is 0 and the MPD duration is obtained\\n     * in the same way as for the last Media Segment in the Representation.\\n     */if(isNaN(duration)){duration=representation.adaptation.period.duration;}presentationStartTime=parseFloat((representation.adaptation.period.start+index*duration).toFixed(5));presentationEndTime=parseFloat((presentationStartTime+duration).toFixed(5));var segment=getSegment(representation,duration,presentationStartTime,timelineConverter.calcMediaTimeFromPresentationTime(presentationStartTime,representation),timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime,representation.adaptation.period.mpd,isDynamic),timelineConverter,presentationEndTime,isDynamic,index);if(!isSegmentAvailable(timelineConverter,representation,segment,isDynamic)){return null;}return segment;}function getTimeBasedSegment(timelineConverter,isDynamic,representation,time,duration,fTimescale,url,range,index,tManifest){var scaledTime=time/fTimescale;var scaledDuration=Math.min(duration/fTimescale,representation.adaptation.period.mpd.maxSegmentDuration);var presentationStartTime=void 0,presentationEndTime=void 0,seg=void 0;presentationStartTime=timelineConverter.calcPresentationTimeFromMediaTime(scaledTime,representation);presentationEndTime=presentationStartTime+scaledDuration;seg=getSegment(representation,scaledDuration,presentationStartTime,scaledTime,representation.adaptation.period.mpd.manifest.loadedTime,timelineConverter,presentationEndTime,isDynamic,index);if(!isSegmentAvailable(timelineConverter,representation,seg,isDynamic)){return null;}seg.replacementTime=tManifest?tManifest:time;url=replaceTokenForTemplate(url,'Number',seg.replacementNumber);url=replaceTokenForTemplate(url,'Time',seg.replacementTime);seg.media=url;seg.mediaRange=range;return seg;}\\n//# sourceMappingURL=SegmentsUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _SegmentsUtils=__webpack_require__(/*! ./SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TemplateSegmentsGetter(config,isDynamic){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSegmentByIndex(representation,index){checkConfig();if(!representation){return null;}var template=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate;index=Math.max(index,0);var seg=(0,_SegmentsUtils.getIndexBasedSegment)(timelineConverter,isDynamic,representation,index);if(seg){seg.replacementTime=Math.round((index-1)*representation.segmentDuration*representation.timescale,10);var url=template.media;url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Number',seg.replacementNumber);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Time',seg.replacementTime);seg.media=url;}var duration=representation.segmentDuration;var availabilityWindow=representation.segmentAvailabilityRange;if(isNaN(duration)){representation.availableSegmentsNumber=1;}else{representation.availableSegmentsNumber=Math.ceil((availabilityWindow.end-availabilityWindow.start)/duration);}return seg;}function getSegmentByTime(representation,requestedTime){checkConfig();if(!representation){return null;}var duration=representation.segmentDuration;if(isNaN(duration)){return null;}var periodTime=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,requestedTime);var index=Math.floor(periodTime/duration);return getSegmentByIndex(representation,index);}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TemplateSegmentsGetter.__dashjs_factory_name='TemplateSegmentsGetter';var factory=_FactoryMaker2.default.getClassFactory(TemplateSegmentsGetter);exports.default=factory;\\n//# sourceMappingURL=TemplateSegmentsGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _DashManifestModel=__webpack_require__(/*! ../models/DashManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\\\");var _DashManifestModel2=_interopRequireDefault(_DashManifestModel);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function TimelineConverter(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();var instance=void 0,dashManifestModel=void 0,clientServerTimeShift=void 0,isClientServerTimeSyncCompleted=void 0,expectedLiveEdge=void 0;function setup(){dashManifestModel=(0,_DashManifestModel2.default)(context).getInstance();reset();}function initialize(){resetInitialSettings();eventBus.on(_Events2.default.UPDATE_TIME_SYNC_OFFSET,_onUpdateTimeSyncOffset,this);}function getClientTimeOffset(){return clientServerTimeShift;}function setClientTimeOffset(value){clientServerTimeShift=value;}function getExpectedLiveEdge(){return expectedLiveEdge;}function setExpectedLiveEdge(value){expectedLiveEdge=value;}function calcAvailabilityTimeFromPresentationTime(presentationTime,mpd,isDynamic,calculateEnd){var availabilityTime=NaN;if(calculateEnd){//@timeShiftBufferDepth specifies the duration of the time shifting buffer that is guaranteed\\n// to be available for a Media Presentation with type 'dynamic'.\\n// When not present, the value is infinite.\\nif(isDynamic&&mpd.timeShiftBufferDepth!=Number.POSITIVE_INFINITY){availabilityTime=new Date(mpd.availabilityStartTime.getTime()+(presentationTime+mpd.timeShiftBufferDepth)*1000);}else{availabilityTime=mpd.availabilityEndTime;}}else{if(isDynamic){availabilityTime=new Date(mpd.availabilityStartTime.getTime()+(presentationTime-clientServerTimeShift)*1000);}else{// in static mpd, all segments are available at the same time\\navailabilityTime=mpd.availabilityStartTime;}}return availabilityTime;}function calcAvailabilityStartTimeFromPresentationTime(presentationTime,mpd,isDynamic){return calcAvailabilityTimeFromPresentationTime.call(this,presentationTime,mpd,isDynamic);}function calcAvailabilityEndTimeFromPresentationTime(presentationTime,mpd,isDynamic){return calcAvailabilityTimeFromPresentationTime.call(this,presentationTime,mpd,isDynamic,true);}function calcPresentationTimeFromWallTime(wallTime,period){return(wallTime.getTime()-period.mpd.availabilityStartTime.getTime()+clientServerTimeShift*1000)/1000;}function calcPresentationTimeFromMediaTime(mediaTime,representation){var periodStart=representation.adaptation.period.start;var presentationOffset=representation.presentationTimeOffset;return mediaTime+(periodStart-presentationOffset);}function calcMediaTimeFromPresentationTime(presentationTime,representation){var periodStart=representation.adaptation.period.start;var presentationOffset=representation.presentationTimeOffset;return presentationTime-periodStart+presentationOffset;}function calcWallTimeForSegment(segment,isDynamic){var suggestedPresentationDelay=void 0,displayStartTime=void 0,wallTime=void 0;if(isDynamic){suggestedPresentationDelay=segment.representation.adaptation.period.mpd.suggestedPresentationDelay;displayStartTime=segment.presentationStartTime+suggestedPresentationDelay;wallTime=new Date(segment.availabilityStartTime.getTime()+displayStartTime*1000);}return wallTime;}function calcSegmentAvailabilityRange(voRepresentation,isDynamic){// Static Range Finder\\nvar voPeriod=voRepresentation.adaptation.period;var range={start:voPeriod.start,end:voPeriod.start+voPeriod.duration};if(!isDynamic)return range;if(!isClientServerTimeSyncCompleted&&voRepresentation.segmentAvailabilityRange){return voRepresentation.segmentAvailabilityRange;}// Dynamic Range Finder\\nvar d=voRepresentation.segmentDuration||(voRepresentation.segments&&voRepresentation.segments.length?voRepresentation.segments[voRepresentation.segments.length-1].duration:0);// Specific use case of SegmentTimeline without timeShiftBufferDepth\\nif(voRepresentation.segmentInfoType===_DashConstants2.default.SEGMENT_TIMELINE&&settings.get().streaming.calcSegmentAvailabilityRangeFromTimeline){return calcSegmentAvailabilityRangeFromTimeline(voRepresentation);}var now=calcPresentationTimeFromWallTime(new Date(),voPeriod);var periodEnd=voPeriod.start+voPeriod.duration;range.start=Math.max(now-voPeriod.mpd.timeShiftBufferDepth,voPeriod.start);var endOffset=voRepresentation.availabilityTimeOffset!==undefined&&voRepresentation.availabilityTimeOffset<d?d-voRepresentation.availabilityTimeOffset:d;range.end=now>=periodEnd&&now-endOffset<periodEnd?periodEnd:now-endOffset;return range;}function calcSegmentAvailabilityRangeFromTimeline(voRepresentation){var adaptation=voRepresentation.adaptation.period.mpd.manifest.Period_asArray[voRepresentation.adaptation.period.index].AdaptationSet_asArray[voRepresentation.adaptation.index];var representation=dashManifestModel.getRepresentationFor(voRepresentation.index,adaptation);var timeline=representation.SegmentTemplate.SegmentTimeline;var timescale=representation.SegmentTemplate.timescale;var segments=timeline.S_asArray;var range={start:0,end:0};var d=0;var segment=void 0,repeat=void 0,i=void 0,len=void 0;range.start=calcPresentationTimeFromMediaTime(segments[0].t/timescale,voRepresentation);for(i=0,len=segments.length;i<len;i++){segment=segments[i];repeat=0;if(segment.hasOwnProperty('r')){repeat=segment.r;}d+=segment.d/timescale*(1+repeat);}range.end=range.start+d;return range;}function getPeriodEnd(voRepresentation,isDynamic){// Static Range Finder\\nvar voPeriod=voRepresentation.adaptation.period;if(!isDynamic){return voPeriod.start+voPeriod.duration;}if(!isClientServerTimeSyncCompleted&&voRepresentation.segmentAvailabilityRange){return voRepresentation.segmentAvailabilityRange;}// Dynamic Range Finder\\nvar d=voRepresentation.segmentDuration||(voRepresentation.segments&&voRepresentation.segments.length?voRepresentation.segments[voRepresentation.segments.length-1].duration:0);var now=calcPresentationTimeFromWallTime(new Date(),voPeriod);var periodEnd=voPeriod.start+voPeriod.duration;var endOffset=voRepresentation.availabilityTimeOffset!==undefined&&voRepresentation.availabilityTimeOffset<d?d-voRepresentation.availabilityTimeOffset:d;return Math.min(now-endOffset,periodEnd);}function calcPeriodRelativeTimeFromMpdRelativeTime(representation,mpdRelativeTime){var periodStartTime=representation.adaptation.period.start;return mpdRelativeTime-periodStartTime;}/*\\n    * We need to figure out if we want to timesync for segmentTimeine where useCalculatedLiveEdge = true\\n    * seems we figure out client offset based on logic in liveEdgeFinder getLiveEdge timelineConverter.setClientTimeOffset(liveEdge - representationInfo.DVRWindow.end);\\n    * FYI StreamController's onManifestUpdated entry point to timeSync\\n    * */function _onUpdateTimeSyncOffset(e){if(e.offset!==undefined){setClientTimeOffset(e.offset/1000);isClientServerTimeSyncCompleted=true;}}function resetInitialSettings(){clientServerTimeShift=0;isClientServerTimeSyncCompleted=false;expectedLiveEdge=NaN;}function reset(){eventBus.off(_Events2.default.UPDATE_TIME_SYNC_OFFSET,_onUpdateTimeSyncOffset,this);resetInitialSettings();}instance={initialize:initialize,getClientTimeOffset:getClientTimeOffset,setClientTimeOffset:setClientTimeOffset,getExpectedLiveEdge:getExpectedLiveEdge,setExpectedLiveEdge:setExpectedLiveEdge,calcAvailabilityStartTimeFromPresentationTime:calcAvailabilityStartTimeFromPresentationTime,calcAvailabilityEndTimeFromPresentationTime:calcAvailabilityEndTimeFromPresentationTime,calcPresentationTimeFromWallTime:calcPresentationTimeFromWallTime,calcPresentationTimeFromMediaTime:calcPresentationTimeFromMediaTime,calcPeriodRelativeTimeFromMpdRelativeTime:calcPeriodRelativeTimeFromMpdRelativeTime,calcMediaTimeFromPresentationTime:calcMediaTimeFromPresentationTime,calcSegmentAvailabilityRange:calcSegmentAvailabilityRange,getPeriodEnd:getPeriodEnd,calcWallTimeForSegment:calcWallTimeForSegment,reset:reset};setup();return instance;}TimelineConverter.__dashjs_factory_name='TimelineConverter';exports.default=_FactoryMaker2.default.getSingletonFactory(TimelineConverter);\\n//# sourceMappingURL=TimelineConverter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _SegmentsUtils=__webpack_require__(/*! ./SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TimelineSegmentsGetter(config,isDynamic){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('calcMediaTimeFromPresentationTime')||!timelineConverter.hasOwnProperty('calcSegmentAvailabilityRange')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function iterateSegments(representation,iterFunc){var base=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate||representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;var timeline=base.SegmentTimeline;var list=base.SegmentURL_asArray;var time=0;var scaledTime=0;var availabilityIdx=-1;var fragments=void 0,frag=void 0,i=void 0,len=void 0,j=void 0,repeat=void 0,repeatEndTime=void 0,nextFrag=void 0,fTimescale=void 0;fTimescale=representation.timescale;fragments=timeline.S_asArray;var breakIterator=false;for(i=0,len=fragments.length;i<len&&!breakIterator;i++){frag=fragments[i];repeat=0;if(frag.hasOwnProperty('r')){repeat=frag.r;}// For a repeated S element, t belongs only to the first segment\\nif(frag.hasOwnProperty('t')){time=frag.t;scaledTime=time/fTimescale;}// This is a special case: \\\"A negative value of the @r attribute of the S element indicates that the duration indicated in @d attribute repeats until the start of the next S element, the end of the Period or until the\\n// next MPD update.\\\"\\nif(repeat<0){nextFrag=fragments[i+1];if(nextFrag&&nextFrag.hasOwnProperty('t')){repeatEndTime=nextFrag.t/fTimescale;}else{var availabilityEnd=representation.segmentAvailabilityRange?representation.segmentAvailabilityRange.end:timelineConverter.calcSegmentAvailabilityRange(representation,isDynamic).end;repeatEndTime=timelineConverter.calcMediaTimeFromPresentationTime(availabilityEnd,representation);representation.segmentDuration=frag.d/fTimescale;}repeat=Math.ceil((repeatEndTime-scaledTime)/(frag.d/fTimescale))-1;}for(j=0;j<=repeat&&!breakIterator;j++){availabilityIdx++;breakIterator=iterFunc(time,scaledTime,base,list,frag,fTimescale,availabilityIdx,i);if(breakIterator){representation.segmentDuration=frag.d/fTimescale;// check if there is at least one more segment\\nif(j<repeat-1||i<len-1){availabilityIdx++;}}time+=frag.d;scaledTime=time/fTimescale;}}representation.availableSegmentsNumber=availabilityIdx;}function getSegmentByIndex(representation,index,lastSegmentTime){checkConfig();if(!representation){return null;}var segment=null;var found=false;iterateSegments(representation,function(time,scaledTime,base,list,frag,fTimescale,availabilityIdx,i){if(found||lastSegmentTime<0){var media=base.media;var mediaRange=frag.mediaRange;if(list){media=list[i].media||'';mediaRange=list[i].mediaRange;}segment=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,isDynamic,representation,time,frag.d,fTimescale,media,mediaRange,availabilityIdx,frag.tManifest);return true;}else if(scaledTime>=lastSegmentTime-frag.d*0.5/fTimescale){// same logic, if deviation is\\n// 50% of segment duration, segment is found if scaledTime is greater than or equal to (startTime of previous segment - half of the previous segment duration)\\nfound=true;}return false;});return segment;}function getSegmentByTime(representation,requestedTime){checkConfig();if(!representation){return null;}if(requestedTime===undefined){requestedTime=null;}var segment=null;var requiredMediaTime=timelineConverter.calcMediaTimeFromPresentationTime(requestedTime,representation);iterateSegments(representation,function(time,scaledTime,base,list,frag,fTimescale,availabilityIdx,i){// In some cases when requiredMediaTime = actual end time of the last segment\\n// it is possible that this time a bit exceeds the declared end time of the last segment.\\n// in this case we still need to include the last segment in the segment list.\\nif(requiredMediaTime<scaledTime+frag.d/fTimescale){var media=base.media;var mediaRange=frag.mediaRange;if(list){media=list[i].media||'';mediaRange=list[i].mediaRange;}segment=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,isDynamic,representation,time,frag.d,fTimescale,media,mediaRange,availabilityIdx,frag.tManifest);return true;}return false;});return segment;}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TimelineSegmentsGetter.__dashjs_factory_name='TimelineSegmentsGetter';var factory=_FactoryMaker2.default.getClassFactory(TimelineSegmentsGetter);exports.default=factory;\\n//# sourceMappingURL=TimelineSegmentsGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js\":\n/*!*********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js ***!\n  \\*********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var AdaptationSet=function AdaptationSet(){_classCallCheck(this,AdaptationSet);this.period=null;this.index=-1;this.type=null;};exports.default=AdaptationSet;\\n//# sourceMappingURL=AdaptationSet.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js\":\n/*!***************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DEFAULT_DVB_PRIORITY=1;var DEFAULT_DVB_WEIGHT=1;var BaseURL=function BaseURL(url,serviceLocation,priority,weight){_classCallCheck(this,BaseURL);this.url=url||'';this.serviceLocation=serviceLocation||url||'';// DVB extensions\\nthis.dvb_priority=priority||DEFAULT_DVB_PRIORITY;this.dvb_weight=weight||DEFAULT_DVB_WEIGHT;this.availabilityTimeOffset=0;this.availabilityTimeComplete=true;/* currently unused:\\n         * byteRange,\\n         */};BaseURL.DEFAULT_DVB_PRIORITY=DEFAULT_DVB_PRIORITY;BaseURL.DEFAULT_DVB_WEIGHT=DEFAULT_DVB_WEIGHT;exports.default=BaseURL;\\n//# sourceMappingURL=BaseURL.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/Event.js\":\n/*!*************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/Event.js ***!\n  \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Event=function Event(){_classCallCheck(this,Event);this.duration=NaN;this.presentationTime=NaN;this.id=NaN;this.messageData='';this.eventStream=null;this.presentationTimeDelta=NaN;// Specific EMSG Box parameter\\n};exports.default=Event;\\n//# sourceMappingURL=Event.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Event.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js\":\n/*!*******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js ***!\n  \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var EventStream=function EventStream(){_classCallCheck(this,EventStream);this.adaptionSet=null;this.representation=null;this.period=null;this.timescale=1;this.value='';this.schemeIdUri='';this.presentationTimeOffset=0;};exports.default=EventStream;\\n//# sourceMappingURL=EventStream.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js\":\n/*!********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js ***!\n  \\********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var ManifestInfo=function ManifestInfo(){_classCallCheck(this,ManifestInfo);this.DVRWindowSize=NaN;this.loadedTime=null;this.availableFrom=null;this.minBufferTime=NaN;this.duration=NaN;this.isDynamic=false;this.maxFragmentDuration=null;};exports.default=ManifestInfo;\\n//# sourceMappingURL=ManifestInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js\":\n/*!*****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js ***!\n  \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var MediaInfo=function MediaInfo(){_classCallCheck(this,MediaInfo);this.id=null;this.index=null;this.type=null;this.streamInfo=null;this.representationCount=0;this.lang=null;this.viewpoint=null;this.accessibility=null;this.audioChannelConfiguration=null;this.roles=null;this.codec=null;this.mimeType=null;this.contentProtection=null;this.isText=false;this.KID=null;this.bitrateList=null;};exports.default=MediaInfo;\\n//# sourceMappingURL=MediaInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js\":\n/*!***********************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Mpd=function Mpd(){_classCallCheck(this,Mpd);this.manifest=null;this.suggestedPresentationDelay=0;this.availabilityStartTime=null;this.availabilityEndTime=Number.POSITIVE_INFINITY;this.timeShiftBufferDepth=Number.POSITIVE_INFINITY;this.maxSegmentDuration=Number.POSITIVE_INFINITY;this.publishTime=null;this.minimumUpdatePeriod=NaN;this.mediaPresentationDuration=NaN;};exports.default=Mpd;\\n//# sourceMappingURL=Mpd.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var PatchOperation=function(){function PatchOperation(action,xpath,value){_classCallCheck(this,PatchOperation);this.action=action;this.xpath=xpath;this.value=value;this.position=null;}_createClass(PatchOperation,[{key:'getMpdTarget',value:function getMpdTarget(root){var isSiblingOperation=this.action==='remove'||this.action==='replace'||this.position==='before'||this.position==='after';return this.xpath.getMpdTarget(root,isSiblingOperation);}}]);return PatchOperation;}();exports.default=PatchOperation;\\n//# sourceMappingURL=PatchOperation.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/Period.js\":\n/*!**************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/Period.js ***!\n  \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Period=function Period(){_classCallCheck(this,Period);this.id=null;this.index=-1;this.duration=NaN;this.start=NaN;this.mpd=null;};Period.DEFAULT_ID='defaultId';exports.default=Period;\\n//# sourceMappingURL=Period.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Period.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/Representation.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/Representation.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}var Representation=function(){function Representation(){_classCallCheck(this,Representation);this.id=null;this.index=-1;this.adaptation=null;this.segmentInfoType=null;this.initialization=null;this.codecs=null;this.codecPrivateData=null;this.segmentDuration=NaN;this.timescale=1;this.startNumber=1;this.indexRange=null;this.range=null;this.presentationTimeOffset=0;// Set the source buffer timeOffset to this\\nthis.MSETimeOffset=NaN;this.segmentAvailabilityRange=null;this.availableSegmentsNumber=0;this.bandwidth=NaN;this.width=NaN;this.height=NaN;this.scanType=null;this.maxPlayoutRate=NaN;this.availabilityTimeOffset=0;this.availabilityTimeComplete=true;}_createClass(Representation,[{key:'hasInitialization',value:function hasInitialization(){return this.initialization!==null||this.range!==null;}},{key:'hasSegments',value:function hasSegments(){return this.segmentInfoType!==_DashConstants2.default.BASE_URL&&this.segmentInfoType!==_DashConstants2.default.SEGMENT_BASE&&!this.indexRange;}}]);return Representation;}();exports.default=Representation;\\n//# sourceMappingURL=Representation.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Representation.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var RepresentationInfo=function RepresentationInfo(){_classCallCheck(this,RepresentationInfo);this.id=null;this.quality=null;this.DVRWindow=null;this.fragmentDuration=null;this.mediaInfo=null;this.MSETimeOffset=null;};exports.default=RepresentationInfo;\\n//# sourceMappingURL=RepresentationInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\":\n/*!***************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/Segment.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Segment=function Segment(){_classCallCheck(this,Segment);this.indexRange=null;this.index=null;this.mediaRange=null;this.media=null;this.duration=NaN;// this is the time that should be inserted into the media url\\nthis.replacementTime=null;// this is the number that should be inserted into the media url\\nthis.replacementNumber=NaN;// This is supposed to match the time encoded in the media Segment\\nthis.mediaStartTime=NaN;// When the source buffer timeOffset is set to MSETimeOffset this is the\\n// time that will match the seekTarget and video.currentTime\\nthis.presentationStartTime=NaN;// Do not schedule this segment until\\nthis.availabilityStartTime=NaN;// Ignore and  discard this segment after\\nthis.availabilityEndTime=NaN;// The index of the segment inside the availability window\\nthis.availabilityIdx=NaN;// For dynamic mpd's, this is the wall clock time that the video\\n// element currentTime should be presentationStartTime\\nthis.wallStartTime=NaN;this.representation=null;};exports.default=Segment;\\n//# sourceMappingURL=Segment.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Segment.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js\":\n/*!*******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js ***!\n  \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var SimpleXPath=function(){function SimpleXPath(selector){var _this=this;_classCallCheck(this,SimpleXPath);// establish validation of the path, to catch unsupported cases\\nthis.valid=selector[0]=='/';// first check, we only support absolute addressing\\n// establish parsed path, example:\\n// /MPD/Period[@id=\\\"foobar\\\"]/AdaptationSet[@id=\\\"2\\\"]/SegmentTemplate/SegmentTimeline\\nthis.path=selector.split('/').filter(function(component){return component.length!==0;})// remove excess empty components\\n.map(function(component){var parsed={name:component};var qualifierPoint=component.indexOf('[');if(qualifierPoint!=-1){parsed.name=component.substring(0,qualifierPoint);var qualifier=component.substring(qualifierPoint+1,component.length-1);// quick sanity check are there additional qualifiers making this invalid\\n_this.valid=_this.valid&&qualifier.indexOf('[')==-1;var equalityPoint=qualifier.indexOf('=');if(equalityPoint!=-1){parsed.attribute={name:qualifier.substring(1,equalityPoint),// skip the @\\nvalue:qualifier.substring(equalityPoint+1)};// check for single and double quoted attribute values\\nif(['\\\\'','\\\"'].indexOf(parsed.attribute.value[0])!=-1){parsed.attribute.value=parsed.attribute.value.substring(1,parsed.attribute.value.length-1);}}else{// positional access in xpath is 1-based index\\n// internal processes will assume 0-based so we normalize that here\\nparsed.position=parseInt(qualifier,10)-1;}}return parsed;});}_createClass(SimpleXPath,[{key:'isValid',value:function isValid(){return this.valid;}},{key:'findsElement',value:function findsElement(){return!this.findsAttribute();}},{key:'findsAttribute',value:function findsAttribute(){return this.path[this.path.length-1].name.startsWith('@');}},{key:'getMpdTarget',value:function getMpdTarget(root,isSiblingOperation){var parent=null;var leaf=root;// assume root is MPD and we start at next level match\\nvar level=1;var name='MPD';while(level<this.path.length&&leaf!==null){// set parent to current\\nparent=leaf;// select next leaf based on component\\nvar component=this.path[level];name=component.name;// stop one early if this is the last element and an attribute\\nif(level!==this.path.length-1||!name.startsWith('@')){var children=parent[name+'_asArray']||[];if(children.length===0&&parent[name]){children.push(parent[name]);}if(component.position){leaf=children[component.position]||null;}else if(component.attribute){(function(){var attr=component.attribute;leaf=children.filter(function(elm){return elm[attr.name]==attr.value;})[0]||null;})();}else{// default case, select first\\nleaf=children[0]||null;}}level++;}if(leaf===null){// given path not found in root\\nreturn null;}// attributes the target is the leaf node, the name is the attribute\\nif(name.startsWith('@')){return{name:name.substring(1),leaf:leaf,target:leaf};}// otherwise we target the parent for sibling operations and leaf for child operations\\nreturn{name:name,leaf:leaf,target:isSiblingOperation?parent:leaf};}}]);return SimpleXPath;}();exports.default=SimpleXPath;\\n//# sourceMappingURL=SimpleXPath.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js\":\n/*!******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var StreamInfo=function StreamInfo(){_classCallCheck(this,StreamInfo);this.id=null;this.index=null;this.start=NaN;this.duration=NaN;this.manifestInfo=null;this.isLast=true;};exports.default=StreamInfo;\\n//# sourceMappingURL=StreamInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js\":\n/*!*****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js ***!\n  \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var UTCTiming=function UTCTiming(){_classCallCheck(this,UTCTiming);// UTCTiming is a DescriptorType and doesn't have any additional fields\\nthis.schemeIdUri='';this.value='';};exports.default=UTCTiming;\\n//# sourceMappingURL=UTCTiming.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _URLLoader=__webpack_require__(/*! ./net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _HeadRequest=__webpack_require__(/*! ./vo/HeadRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js\\\");var _HeadRequest2=_interopRequireDefault(_HeadRequest);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function FragmentLoader(config){config=config||{};var context=this.context;var eventBus=config.eventBus;var events=config.events;var urlUtils=config.urlUtils;var errors=config.errors;var instance=void 0,urlLoader=void 0;function setup(){urlLoader=(0,_URLLoader2.default)(context).create({errHandler:config.errHandler,errors:errors,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,useFetch:config.settings.get().streaming.lowLatencyEnabled,urlUtils:urlUtils,constants:_Constants2.default,boxParser:config.boxParser,dashConstants:config.dashConstants,requestTimeout:config.settings.get().streaming.fragmentRequestTimeout});}function checkForExistence(request){var report=function report(success){eventBus.trigger(events.CHECK_FOR_EXISTENCE_COMPLETED,{request:request,exists:success});};if(request){var headRequest=new _HeadRequest2.default(request.url);urlLoader.load({request:headRequest,success:function success(){report(true);},error:function error(){report(false);}});}else{report(false);}}function load(request){var report=function report(data,error){eventBus.trigger(events.LOADING_COMPLETED,{request:request,response:data||null,error:error||null,sender:instance});};if(request){urlLoader.load({request:request,progress:function progress(event){eventBus.trigger(events.LOADING_PROGRESS,{request:request,stream:event.stream});if(event.data){eventBus.trigger(events.LOADING_DATA_PROGRESS,{request:request,response:event.data||null,error:null,sender:instance});}},success:function success(data){report(data);},error:function error(request,statusText,errorText){report(undefined,new _DashJSError2.default(errors.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,errorText,statusText));},abort:function abort(request){if(request){eventBus.trigger(events.LOADING_ABANDONED,{mediaType:request.mediaType,request:request,sender:instance});}}});}else{report(undefined,new _DashJSError2.default(errors.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,errors.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE));}}function abort(){if(urlLoader){urlLoader.abort();}}function reset(){if(urlLoader){urlLoader.abort();urlLoader=null;}}instance={checkForExistence:checkForExistence,load:load,abort:abort,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */FragmentLoader.__dashjs_factory_name='FragmentLoader';exports.default=_FactoryMaker2.default.getClassFactory(FragmentLoader);\\n//# sourceMappingURL=FragmentLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _XlinkController=__webpack_require__(/*! ./controllers/XlinkController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js\\\");var _XlinkController2=_interopRequireDefault(_XlinkController);var _URLLoader=__webpack_require__(/*! ./net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _URLUtils=__webpack_require__(/*! ./utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _TextRequest=__webpack_require__(/*! ./vo/TextRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js\\\");var _TextRequest2=_interopRequireDefault(_TextRequest);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _HTTPRequest=__webpack_require__(/*! ./vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashParser=__webpack_require__(/*! ../dash/parser/DashParser */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js\\\");var _DashParser2=_interopRequireDefault(_DashParser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestLoader(config){config=config||{};var context=this.context;var debug=config.debug;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,logger=void 0,urlLoader=void 0,xlinkController=void 0,parser=void 0;var mssHandler=config.mssHandler;var errHandler=config.errHandler;function setup(){logger=debug.getLogger(instance);eventBus.on(_Events2.default.XLINK_READY,onXlinkReady,instance);urlLoader=(0,_URLLoader2.default)(context).create({errHandler:config.errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,useFetch:config.settings.get().streaming.lowLatencyEnabled,urlUtils:urlUtils,constants:_Constants2.default,dashConstants:_DashConstants2.default,errors:_Errors2.default});xlinkController=(0,_XlinkController2.default)(context).create({errHandler:errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,settings:config.settings});parser=null;}function onXlinkReady(event){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:event.manifest});}function createParser(data){var parser=null;// Analyze manifest content to detect protocol and select appropriate parser\\nif(data.indexOf('SmoothStreamingMedia')>-1){//do some business to transform it into a Dash Manifest\\nif(mssHandler){parser=mssHandler.createMssParser();mssHandler.registerEvents();}return parser;}else if(data.indexOf('MPD')>-1||data.indexOf('Patch')>-1){return(0,_DashParser2.default)(context).create({debug:debug});}else{return parser;}}function load(url){var request=new _TextRequest2.default(url,_HTTPRequest.HTTPRequest.MPD_TYPE);urlLoader.load({request:request,success:function success(data,textStatus,responseURL){// Manage situations in which success is called after calling reset\\nif(!xlinkController)return;var actualUrl=void 0,baseUri=void 0,manifest=void 0;// Handle redirects for the MPD - as per RFC3986 Section 5.1.3\\n// also handily resolves relative MPD URLs to absolute\\nif(responseURL&&responseURL!==url){baseUri=urlUtils.parseBaseUrl(responseURL);actualUrl=responseURL;}else{// usually this case will be caught and resolved by\\n// responseURL above but it is not available for IE11 and Edge/12 and Edge/13\\n// baseUri must be absolute for BaseURL resolution later\\nif(urlUtils.isRelative(url)){url=urlUtils.resolve(url,window.location.href);}baseUri=urlUtils.parseBaseUrl(url);}// A response of no content implies in-memory is properly up to date\\nif(textStatus=='No Content'){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null});return;}// Create parser according to manifest type\\nif(parser===null){parser=createParser(data);}if(parser===null){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(''+url))});return;}// init xlinkcontroller with matchers and iron object from created parser\\nxlinkController.setMatchers(parser.getMatchers());xlinkController.setIron(parser.getIron());try{manifest=parser.parse(data);}catch(e){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(''+url))});return;}if(manifest){manifest.url=actualUrl||url;// URL from which the MPD was originally retrieved (MPD updates will not change this value)\\nif(!manifest.originalUrl){manifest.originalUrl=manifest.url;}// In the following, we only use the first Location entry even if many are available\\n// Compare with ManifestUpdater/DashManifestModel\\nif(manifest.hasOwnProperty(_Constants2.default.LOCATION)){baseUri=urlUtils.parseBaseUrl(manifest.Location_asArray[0]);logger.debug('BaseURI set by Location to: '+baseUri);}manifest.baseUri=baseUri;manifest.loadedTime=new Date();xlinkController.resolveManifestOnLoad(manifest);eventBus.trigger(_Events2.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:data});}else{eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(''+url))});}},error:function error(request,statusText,errorText){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(url+', '+errorText))});}});}function reset(){eventBus.off(_Events2.default.XLINK_READY,onXlinkReady,instance);if(xlinkController){xlinkController.reset();xlinkController=null;}if(urlLoader){urlLoader.abort();urlLoader=null;}if(mssHandler){mssHandler.reset();}}instance={load:load,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ManifestLoader.__dashjs_factory_name='ManifestLoader';var factory=_FactoryMaker2.default.getClassFactory(ManifestLoader);exports.default=factory;\\n//# sourceMappingURL=ManifestLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _URLUtils=__webpack_require__(/*! ./utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestUpdater(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,logger=void 0,refreshDelay=void 0,refreshTimer=void 0,isPaused=void 0,isStopped=void 0,isUpdating=void 0,manifestLoader=void 0,manifestModel=void 0,adapter=void 0,errHandler=void 0,settings=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function setConfig(config){if(!config)return;if(config.manifestModel){manifestModel=config.manifestModel;}if(config.adapter){adapter=config.adapter;}if(config.manifestLoader){manifestLoader=config.manifestLoader;}if(config.errHandler){errHandler=config.errHandler;}if(config.settings){settings=config.settings;}}function initialize(){resetInitialSettings();eventBus.on(_Events2.default.STREAMS_COMPOSED,onStreamsComposed,this);eventBus.on(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.on(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,this);eventBus.on(_Events2.default.INTERNAL_MANIFEST_LOADED,onManifestLoaded,this);}function setManifest(manifest){update(manifest);}function resetInitialSettings(){refreshDelay=NaN;isUpdating=false;isPaused=true;isStopped=false;stopManifestRefreshTimer();}function reset(){eventBus.off(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.off(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,this);eventBus.off(_Events2.default.STREAMS_COMPOSED,onStreamsComposed,this);eventBus.off(_Events2.default.INTERNAL_MANIFEST_LOADED,onManifestLoaded,this);resetInitialSettings();}function stopManifestRefreshTimer(){if(refreshTimer!==null){clearTimeout(refreshTimer);refreshTimer=null;}}function startManifestRefreshTimer(delay){stopManifestRefreshTimer();if(isStopped){return;}if(isNaN(delay)&&!isNaN(refreshDelay)){delay=refreshDelay*1000;}if(!isNaN(delay)){logger.debug('Refresh manifest in '+delay+' milliseconds.');refreshTimer=setTimeout(onRefreshTimer,delay);}}function refreshManifest(){var ignorePatch=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;isUpdating=true;var manifest=manifestModel.getValue();// default to the original url in the manifest\\nvar url=manifest.url;// Check for PatchLocation and Location alternatives\\nvar patchLocation=adapter.getPatchLocation(manifest);var location=adapter.getLocation(manifest);if(patchLocation&&!ignorePatch){url=patchLocation;}else if(location){url=location;}// if one of the alternatives was relative, convert to absolute\\nif(urlUtils.isRelative(url)){url=urlUtils.resolve(url,manifest.url);}manifestLoader.load(url);}function update(manifest){if(!manifest){// successful update with no content implies existing manifest remains valid\\nmanifest=manifestModel.getValue();// override load time to avoid invalid latency tracking and ensure update cadence\\nmanifest.loadedTime=new Date();}else if(adapter.getIsPatch(manifest)){// with patches the in-memory manifest is our base\\nvar patch=manifest;manifest=manifestModel.getValue();// check for patch validity\\nvar isPatchValid=adapter.isPatchValid(manifest,patch);var patchSuccessful=isPatchValid;if(isPatchValid){// grab publish time before update\\nvar publishTime=adapter.getPublishTime(manifest);// apply validated patch to manifest\\npatchSuccessful=adapter.applyPatchToManifest(manifest,patch);// get the updated publish time\\nvar updatedPublishTime=adapter.getPublishTime(manifest);// ensure the patch properly updated the in-memory publish time\\npatchSuccessful=publishTime.getTime()!=updatedPublishTime.getTime();}// if the patch failed to apply, force a full manifest refresh\\nif(!patchSuccessful){logger.debug('Patch provided is invalid, performing full manifest refresh');refreshManifest(true);return;}// override load time to avoid invalid latency tracking and ensure update cadence\\nmanifest.loadedTime=new Date();}// See DASH-IF IOP v4.3 section 4.6.4 \\\"Transition Phase between Live and On-Demand\\\"\\n// Stop manifest update, ignore static manifest and signal end of dynamic stream to detect end of stream\\nif(manifestModel.getValue()&&manifestModel.getValue().type===_DashConstants2.default.DYNAMIC&&manifest.type===_DashConstants2.default.STATIC){eventBus.trigger(_Events2.default.DYNAMIC_TO_STATIC);isUpdating=false;isStopped=true;return;}manifestModel.setValue(manifest);var date=new Date();var latencyOfLastUpdate=(date.getTime()-manifest.loadedTime.getTime())/1000;refreshDelay=adapter.getManifestUpdatePeriod(manifest,latencyOfLastUpdate);// setTimeout uses a 32 bit number to store the delay. Any number greater than it\\n// will cause event associated with setTimeout to trigger immediately\\nif(refreshDelay*1000>0x7FFFFFFF){refreshDelay=0x7FFFFFFF/1000;}eventBus.trigger(_Events2.default.MANIFEST_UPDATED,{manifest:manifest});logger.info('Manifest has been refreshed at '+date+'['+date.getTime()/1000+'] ');if(!isPaused){startManifestRefreshTimer();}}function onRefreshTimer(){if(isPaused){return;}if(isUpdating){startManifestRefreshTimer(settings.get().streaming.manifestUpdateRetryInterval);return;}refreshManifest();}function onManifestLoaded(e){if(!e.error){update(e.manifest);}else if(e.error.code===_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE){errHandler.error(e.error);}}function onPlaybackStarted()/*e*/{isPaused=false;startManifestRefreshTimer();}function onPlaybackPaused()/*e*/{isPaused=!settings.get().streaming.scheduleWhilePaused;if(isPaused){stopManifestRefreshTimer();}}function onStreamsComposed()/*e*/{// When streams are ready we can consider manifest update completed. Resolve the update promise.\\nisUpdating=false;}instance={initialize:initialize,setManifest:setManifest,refreshManifest:refreshManifest,setConfig:setConfig,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ManifestUpdater.__dashjs_factory_name='ManifestUpdater';exports.default=_FactoryMaker2.default.getClassFactory(ManifestUpdater);\\n//# sourceMappingURL=ManifestUpdater.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js\":\n/*!*********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js ***!\n  \\*********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _cea608Parser=__webpack_require__(/*! ../../externals/cea608-parser */ \\\"../node_modules/dashjs/build/es5/externals/cea608-parser.js\\\");var _cea608Parser2=_interopRequireDefault(_cea608Parser);var _Constants=__webpack_require__(/*! ./constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _MetricsConstants=__webpack_require__(/*! ./constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _PlaybackController=__webpack_require__(/*! ./controllers/PlaybackController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js\\\");var _PlaybackController2=_interopRequireDefault(_PlaybackController);var _StreamController=__webpack_require__(/*! ./controllers/StreamController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js\\\");var _StreamController2=_interopRequireDefault(_StreamController);var _GapController=__webpack_require__(/*! ./controllers/GapController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js\\\");var _GapController2=_interopRequireDefault(_GapController);var _MediaController=__webpack_require__(/*! ./controllers/MediaController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js\\\");var _MediaController2=_interopRequireDefault(_MediaController);var _BaseURLController=__webpack_require__(/*! ./controllers/BaseURLController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js\\\");var _BaseURLController2=_interopRequireDefault(_BaseURLController);var _ManifestLoader=__webpack_require__(/*! ./ManifestLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js\\\");var _ManifestLoader2=_interopRequireDefault(_ManifestLoader);var _ErrorHandler=__webpack_require__(/*! ./utils/ErrorHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js\\\");var _ErrorHandler2=_interopRequireDefault(_ErrorHandler);var _Capabilities=__webpack_require__(/*! ./utils/Capabilities */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js\\\");var _Capabilities2=_interopRequireDefault(_Capabilities);var _CapabilitiesFilter=__webpack_require__(/*! ./utils/CapabilitiesFilter */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js\\\");var _CapabilitiesFilter2=_interopRequireDefault(_CapabilitiesFilter);var _TextTracks=__webpack_require__(/*! ./text/TextTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\\\");var _TextTracks2=_interopRequireDefault(_TextTracks);var _RequestModifier=__webpack_require__(/*! ./utils/RequestModifier */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\\\");var _RequestModifier2=_interopRequireDefault(_RequestModifier);var _TextController=__webpack_require__(/*! ./text/TextController */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\\\");var _TextController2=_interopRequireDefault(_TextController);var _URIFragmentModel=__webpack_require__(/*! ./models/URIFragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js\\\");var _URIFragmentModel2=_interopRequireDefault(_URIFragmentModel);var _ManifestModel=__webpack_require__(/*! ./models/ManifestModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js\\\");var _ManifestModel2=_interopRequireDefault(_ManifestModel);var _MediaPlayerModel=__webpack_require__(/*! ./models/MediaPlayerModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js\\\");var _MediaPlayerModel2=_interopRequireDefault(_MediaPlayerModel);var _AbrController=__webpack_require__(/*! ./controllers/AbrController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js\\\");var _AbrController2=_interopRequireDefault(_AbrController);var _SchemeLoaderFactory=__webpack_require__(/*! ./net/SchemeLoaderFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js\\\");var _SchemeLoaderFactory2=_interopRequireDefault(_SchemeLoaderFactory);var _VideoModel=__webpack_require__(/*! ./models/VideoModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js\\\");var _VideoModel2=_interopRequireDefault(_VideoModel);var _CmcdModel=__webpack_require__(/*! ./models/CmcdModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js\\\");var _CmcdModel2=_interopRequireDefault(_CmcdModel);var _DOMStorage=__webpack_require__(/*! ./utils/DOMStorage */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js\\\");var _DOMStorage2=_interopRequireDefault(_DOMStorage);var _Debug=__webpack_require__(/*! ./../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Errors=__webpack_require__(/*! ./../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _EventBus=__webpack_require__(/*! ./../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ./../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _MediaPlayerEvents=__webpack_require__(/*! ./MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Settings=__webpack_require__(/*! ../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);var _Version=__webpack_require__(/*! ./../core/Version */ \\\"../node_modules/dashjs/build/es5/src/core/Version.js\\\");var _SegmentBaseController=__webpack_require__(/*! ../dash/controllers/SegmentBaseController */ \\\"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js\\\");var _SegmentBaseController2=_interopRequireDefault(_SegmentBaseController);var _DashAdapter=__webpack_require__(/*! ../dash/DashAdapter */ \\\"../node_modules/dashjs/build/es5/src/dash/DashAdapter.js\\\");var _DashAdapter2=_interopRequireDefault(_DashAdapter);var _DashMetrics=__webpack_require__(/*! ../dash/DashMetrics */ \\\"../node_modules/dashjs/build/es5/src/dash/DashMetrics.js\\\");var _DashMetrics2=_interopRequireDefault(_DashMetrics);var _TimelineConverter=__webpack_require__(/*! ../dash/utils/TimelineConverter */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js\\\");var _TimelineConverter2=_interopRequireDefault(_TimelineConverter);var _HTTPRequest=__webpack_require__(/*! ./vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _base=__webpack_require__(/*! ../../externals/base64 */ \\\"../node_modules/dashjs/build/es5/externals/base64.js\\\");var _base2=_interopRequireDefault(_base);var _codemIsoboxer=__webpack_require__(/*! codem-isoboxer */ \\\"../node_modules/codem-isoboxer/dist/iso_boxer.js\\\");var _codemIsoboxer2=_interopRequireDefault(_codemIsoboxer);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _SupervisorTools=__webpack_require__(/*! ./utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");var _ManifestUpdater=__webpack_require__(/*! ./ManifestUpdater */ \\\"../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js\\\");var _ManifestUpdater2=_interopRequireDefault(_ManifestUpdater);var _URLUtils=__webpack_require__(/*! ../streaming/utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _BoxParser=__webpack_require__(/*! ./utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/* jscs:disable *//**\\n * The media types\\n * @typedef {(\\\"video\\\" | \\\"audio\\\" | \\\"text\\\" | \\\"fragmentedText\\\" | \\\"embeddedText\\\" | \\\"image\\\")} MediaType\\n *//* jscs:enable *//**\\n * @module MediaPlayer\\n * @description The MediaPlayer is the primary dash.js Module and a Facade to build your player around.\\n * It will allow you access to all the important dash.js properties/methods via the public API and all the\\n * events to build a robust DASH media player.\\n *///Dash\\n/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function MediaPlayer(){/**\\n     * @constant {string} STREAMING_NOT_INITIALIZED_ERROR error string thrown when a function is called before the dash.js has been fully initialized\\n     * @inner\\n     */var STREAMING_NOT_INITIALIZED_ERROR='You must first call initialize() and set a source before calling this method';/**\\n     * @constant {string} PLAYBACK_NOT_INITIALIZED_ERROR error string thrown when a function is called before the dash.js has been fully initialized\\n     * @inner\\n     */var PLAYBACK_NOT_INITIALIZED_ERROR='You must first call initialize() and set a valid source and view before calling this method';/**\\n     * @constant {string} ELEMENT_NOT_ATTACHED_ERROR error string thrown when a function is called before the dash.js has received a reference of an HTML5 video element\\n     * @inner\\n     */var ELEMENT_NOT_ATTACHED_ERROR='You must first call attachView() to set the video element before calling this method';/**\\n     * @constant {string} SOURCE_NOT_ATTACHED_ERROR error string thrown when a function is called before the dash.js has received a valid source stream.\\n     * @inner\\n     */var SOURCE_NOT_ATTACHED_ERROR='You must first call attachSource() with a valid source before calling this method';/**\\n     * @constant {string} MEDIA_PLAYER_NOT_INITIALIZED_ERROR error string thrown when a function is called before the dash.js has been fully initialized.\\n     * @inner\\n     */var MEDIA_PLAYER_NOT_INITIALIZED_ERROR='MediaPlayer not initialized!';var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();var debug=(0,_Debug2.default)(context).getInstance({settings:settings});var instance=void 0,logger=void 0,source=void 0,protectionData=void 0,mediaPlayerInitialized=void 0,streamingInitialized=void 0,playbackInitialized=void 0,autoPlay=void 0,abrController=void 0,schemeLoaderFactory=void 0,timelineConverter=void 0,mediaController=void 0,protectionController=void 0,metricsReportingController=void 0,mssHandler=void 0,offlineController=void 0,adapter=void 0,mediaPlayerModel=void 0,errHandler=void 0,baseURLController=void 0,capabilities=void 0,capabilitiesFilter=void 0,streamController=void 0,gapController=void 0,playbackController=void 0,dashMetrics=void 0,manifestModel=void 0,cmcdModel=void 0,videoModel=void 0,textController=void 0,uriFragmentModel=void 0,domStorage=void 0,segmentBaseController=void 0,licenseRequestFilters=void 0,licenseResponseFilters=void 0;/*\\n    ---------------------------------------------------------------------------\\n\\n        INIT FUNCTIONS\\n\\n    ---------------------------------------------------------------------------\\n    */function setup(){logger=debug.getLogger(instance);mediaPlayerInitialized=false;playbackInitialized=false;streamingInitialized=false;autoPlay=true;protectionController=null;offlineController=null;protectionData=null;adapter=null;segmentBaseController=null;_Events2.default.extend(_MediaPlayerEvents2.default);mediaPlayerModel=(0,_MediaPlayerModel2.default)(context).getInstance();videoModel=(0,_VideoModel2.default)(context).getInstance();uriFragmentModel=(0,_URIFragmentModel2.default)(context).getInstance();licenseRequestFilters=[];licenseResponseFilters=[];}/**\\n     * Configure media player with customs controllers. Helpful for tests\\n     *\\n     * @param {object=} config controllers configuration\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setConfig(config){if(!config){return;}if(config.capabilities){capabilities=config.capabilities;}if(config.capabilitiesFilter){capabilitiesFilter=config.capabilitiesFilter;}if(config.streamController){streamController=config.streamController;}if(config.gapController){gapController=config.gapController;}if(config.playbackController){playbackController=config.playbackController;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.abrController){abrController=config.abrController;}if(config.schemeLoaderFactory){schemeLoaderFactory=config.schemeLoaderFactory;}if(config.mediaController){mediaController=config.mediaController;}if(config.settings){settings=config.settings;}}/**\\n     * Upon creating the MediaPlayer you must call initialize before you call anything else.\\n     * There is one exception to this rule. It is crucial to call {@link module:MediaPlayer#extend extend()}\\n     * with all your extensions prior to calling initialize.\\n     *\\n     * ALL arguments are optional and there are individual methods to set each argument later on.\\n     * The args in this method are just for convenience and should only be used for a simple player setup.\\n     *\\n     * @param {HTML5MediaElement=} view - Optional arg to set the video element. {@link module:MediaPlayer#attachView attachView()}\\n     * @param {string=} source - Optional arg to set the media source. {@link module:MediaPlayer#attachSource attachSource()}\\n     * @param {boolean=} AutoPlay - Optional arg to set auto play. {@link module:MediaPlayer#setAutoPlay setAutoPlay()}\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @see {@link module:MediaPlayer#setAutoPlay setAutoPlay()}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function initialize(view,source,AutoPlay){if(!capabilities){capabilities=(0,_Capabilities2.default)(context).getInstance();}errHandler=(0,_ErrorHandler2.default)(context).getInstance();if(!capabilities.supportsMediaSource()){errHandler.error(new _DashJSError2.default(_Errors2.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,_Errors2.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE));return;}if(mediaPlayerInitialized)return;mediaPlayerInitialized=true;// init some controllers and models\\ntimelineConverter=(0,_TimelineConverter2.default)(context).getInstance();if(!abrController){abrController=(0,_AbrController2.default)(context).getInstance();abrController.setConfig({settings:settings});}if(!schemeLoaderFactory){schemeLoaderFactory=(0,_SchemeLoaderFactory2.default)(context).getInstance();}if(!playbackController){playbackController=(0,_PlaybackController2.default)(context).getInstance();}if(!mediaController){mediaController=(0,_MediaController2.default)(context).getInstance();}if(!streamController){streamController=(0,_StreamController2.default)(context).getInstance();}if(!gapController){gapController=(0,_GapController2.default)(context).getInstance();}if(!capabilitiesFilter){capabilitiesFilter=(0,_CapabilitiesFilter2.default)(context).getInstance();}adapter=(0,_DashAdapter2.default)(context).getInstance();manifestModel=(0,_ManifestModel2.default)(context).getInstance();cmcdModel=(0,_CmcdModel2.default)(context).getInstance();dashMetrics=(0,_DashMetrics2.default)(context).getInstance({settings:settings});textController=(0,_TextController2.default)(context).getInstance();domStorage=(0,_DOMStorage2.default)(context).getInstance({settings:settings});adapter.setConfig({constants:_Constants2.default,cea608parser:_cea608Parser2.default,errHandler:errHandler,BASE64:_base2.default});if(!baseURLController){baseURLController=(0,_BaseURLController2.default)(context).create();}baseURLController.setConfig({adapter:adapter});segmentBaseController=(0,_SegmentBaseController2.default)(context).getInstance({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,baseURLController:baseURLController,events:_Events2.default,eventBus:eventBus,debug:debug,boxParser:(0,_BoxParser2.default)(context).getInstance(),requestModifier:(0,_RequestModifier2.default)(context).getInstance(),errors:_Errors2.default});segmentBaseController.initialize();// configure controllers\\nmediaController.setConfig({domStorage:domStorage,settings:settings});restoreDefaultUTCTimingSources();setAutoPlay(AutoPlay!==undefined?AutoPlay:true);// Detect and initialize offline module to support offline contents playback\\ndetectOffline();if(view){attachView(view);}if(source){attachSource(source);}logger.info('[dash.js '+getVersion()+'] '+'MediaPlayer has been initialized');}/**\\n     * Sets the MPD source and the video element to null. You can also reset the MediaPlayer by\\n     * calling attachSource with a new source file.\\n     *\\n     * This call does not destroy the MediaPlayer. To destroy the MediaPlayer and free all of its\\n     * memory, call destroy().\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function reset(){attachSource(null);attachView(null);protectionData=null;if(protectionController){protectionController.reset();protectionController=null;}if(metricsReportingController){metricsReportingController.reset();metricsReportingController=null;}segmentBaseController.reset();settings.reset();if(offlineController){offlineController.reset();offlineController=null;}}/**\\n     * Completely destroys the media player and frees all memory.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function destroy(){reset();licenseRequestFilters=[];licenseResponseFilters=[];_FactoryMaker2.default.deleteSingletonInstances(context);}/**\\n     * The ready state of the MediaPlayer based on both the video element and MPD source being defined.\\n     *\\n     * @returns {boolean} The current ready state of the MediaPlayer\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isReady(){return!!source&&!!videoModel.getElement();}/**\\n     * Use the on method to listen for public events found in MediaPlayer.events. {@link MediaPlayerEvents}\\n     *\\n     * @param {string} type - {@link MediaPlayerEvents}\\n     * @param {Function} listener - callback method when the event fires.\\n     * @param {Object} scope - context of the listener so it can be removed properly.\\n     * @param {Object} options - object to define various options such as priority and mode\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function on(type,listener,scope,options){eventBus.on(type,listener,scope,options);}/**\\n     * Use the off method to remove listeners for public events found in MediaPlayer.events. {@link MediaPlayerEvents}\\n     *\\n     * @param {string} type - {@link MediaPlayerEvents}\\n     * @param {Function} listener - callback method when the event fires.\\n     * @param {Object} scope - context of the listener so it can be removed properly.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function off(type,listener,scope){eventBus.off(type,listener,scope);}/**\\n     * Current version of Dash.js\\n     * @returns {string} the current dash.js version string.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getVersion(){return(0,_Version.getVersionString)();}/**\\n     * Use this method to access the dash.js logging class.\\n     *\\n     * @returns {Debug}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDebug(){return debug;}/*\\n    ---------------------------------------------------------------------------\\n\\n        PLAYBACK FUNCTIONS\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Causes the player to begin streaming the media as set by the {@link module:MediaPlayer#attachSource attachSource()}\\n     * method in preparation for playing. It specifically does not require a view to be attached with {@link module:MediaPlayer#attachSource attachView()} to begin preloading.\\n     * When a view is attached after preloading, the buffered data is transferred to the attached mediaSource buffers.\\n     *\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~SOURCE_NOT_ATTACHED_ERROR SOURCE_NOT_ATTACHED_ERROR} if called before attachSource function\\n     * @instance\\n     */function preload(){if(videoModel.getElement()||streamingInitialized){return false;}if(source){initializePlayback();}else{throw SOURCE_NOT_ATTACHED_ERROR;}}/**\\n     * The play method initiates playback of the media defined by the {@link module:MediaPlayer#attachSource attachSource()} method.\\n     * This method will call play on the native Video Element.\\n     *\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function play(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}if(!autoPlay||isPaused()&&playbackInitialized){playbackController.play();}}/**\\n     * This method will call pause on the native Video Element.\\n     *\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function pause(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}playbackController.pause();}/**\\n     * Returns a Boolean that indicates whether the Video Element is paused.\\n     * @return {boolean}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isPaused(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return playbackController.isPaused();}/**\\n     * Sets the currentTime property of the attached video element.  If it is a live stream with a\\n     * timeShiftBufferLength, then the DVR window offset will be automatically calculated.\\n     *\\n     * @param {number} value - A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected\\n     * @see {@link module:MediaPlayer#getDVRSeekOffset getDVRSeekOffset()}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not number type or is NaN.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function seek(value){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}(0,_SupervisorTools.checkParameterType)(value,'number');if(isNaN(value)){throw _Constants2.default.BAD_ARGUMENT_ERROR;}var s=playbackController.getIsDynamic()?getDVRSeekOffset(value):value;playbackController.seek(s);}/**\\n     * Returns a Boolean that indicates whether the media is in the process of seeking to a new position.\\n     * @return {boolean}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isSeeking(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return playbackController.isSeeking();}/**\\n     * Returns a Boolean that indicates whether the media is in the process of dynamic.\\n     * @return {boolean}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isDynamic(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return playbackController.getIsDynamic();}/**\\n     * Use this method to set the native Video Element's playback rate.\\n     * @param {number} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setPlaybackRate(value){getVideoElement().playbackRate=value;}/**\\n     * Returns the current playback rate.\\n     * @returns {number}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getPlaybackRate(){return getVideoElement().playbackRate;}/**\\n     * Use this method to set the native Video Element's muted state. Takes a Boolean that determines whether audio is muted. true if the audio is muted and false otherwise.\\n     * @param {boolean} value\\n     * @memberof module:MediaPlayer\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not boolean type.\\n     * @instance\\n     */function setMute(value){(0,_SupervisorTools.checkParameterType)(value,'boolean');getVideoElement().muted=value;}/**\\n     * A Boolean that determines whether audio is muted.\\n     * @returns {boolean}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isMuted(){return getVideoElement().muted;}/**\\n     * A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).\\n     * @param {number} value\\n     * @memberof module:MediaPlayer\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not number type, or is NaN or not between 0 and 1.\\n     * @instance\\n     */function setVolume(value){if(typeof value!=='number'||isNaN(value)||value<0.0||value>1.0){throw _Constants2.default.BAD_ARGUMENT_ERROR;}getVideoElement().volume=value;}/**\\n     * Returns the current audio volume, from 0.0 (silent) to 1.0 (loudest).\\n     * @returns {number}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getVolume(){return getVideoElement().volume;}/**\\n     * The length of the buffer for a given media type, in seconds. Valid media\\n     * types are \\\"video\\\", \\\"audio\\\" and \\\"fragmentedText\\\". If no type is passed\\n     * in, then the minimum of video, audio and fragmentedText buffer length is\\n     * returned. NaN is returned if an invalid type is requested, the\\n     * presentation does not contain that type, or if no arguments are passed\\n     * and the presentation does not include any adaption sets of valid media\\n     * type.\\n     *\\n     * @param {MediaType} type - 'video', 'audio' or 'fragmentedText'\\n     * @returns {number} The length of the buffer for the given media type, in\\n     *  seconds, or NaN\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getBufferLength(type){var types=[_Constants2.default.VIDEO,_Constants2.default.AUDIO,_Constants2.default.FRAGMENTED_TEXT];if(!type){var buffer=types.map(function(t){return getTracksFor(t).length>0?getDashMetrics().getCurrentBufferLevel(t):Number.MAX_VALUE;}).reduce(function(p,c){return Math.min(p,c);});return buffer===Number.MAX_VALUE?NaN:buffer;}else{if(types.indexOf(type)!==-1){var _buffer=getDashMetrics().getCurrentBufferLevel(type);return _buffer?_buffer:NaN;}else{logger.warn('getBufferLength requested for invalid type');return NaN;}}}/**\\n     * The timeShiftBufferLength (DVR Window), in seconds.\\n     *\\n     * @returns {number} The window of allowable play time behind the live point of a live stream.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDVRWindowSize(){var metric=dashMetrics.getCurrentDVRInfo();if(!metric){return 0;}return metric.manifestInfo.DVRWindowSize;}/**\\n     * This method should only be used with a live stream that has a valid timeShiftBufferLength (DVR Window).\\n     * NOTE - If you do not need the raw offset value (i.e. media analytics, tracking, etc) consider using the {@link module:MediaPlayer#seek seek()} method\\n     * which will calculate this value for you and set the video element's currentTime property all in one simple call.\\n     *\\n     * @param {number} value - A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected.\\n     * @returns {number} A value that is relative the available range within the timeShiftBufferLength (DVR Window).\\n     * @see {@link module:MediaPlayer#seek seek()}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDVRSeekOffset(value){var metric=dashMetrics.getCurrentDVRInfo();if(!metric){return 0;}var liveDelay=playbackController.getLiveDelay();var val=metric.range.start+value;if(val>metric.range.end-liveDelay){val=metric.range.end-liveDelay;}return val;}/**\\n     * Current time of the playhead, in seconds.\\n     *\\n     * If called with no arguments then the returned time value is time elapsed since the start point of the first stream, or if it is a live stream, then the time will be based on the return value of the {@link module:MediaPlayer#duration duration()} method.\\n     * However if a stream ID is supplied then time is relative to the start of that stream, or is null if there is no such stream id in the manifest.\\n     *\\n     * @param {string} streamId - The ID of a stream that the returned playhead time must be relative to the start of. If undefined, then playhead time is relative to the first stream.\\n     * @returns {number} The current playhead time of the media, or null.\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function time(streamId){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}var t=getVideoElement().currentTime;if(streamId!==undefined){t=streamController.getTimeRelativeToStreamId(t,streamId);}else if(playbackController.getIsDynamic()){var metric=dashMetrics.getCurrentDVRInfo();t=metric===null?0:duration()-(metric.range.end-metric.time);}return t;}/**\\n     * Duration of the media's playback, in seconds.\\n     *\\n     * @returns {number} The current duration of the media.\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function duration(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}var d=getVideoElement().duration;if(playbackController.getIsDynamic()){var metric=dashMetrics.getCurrentDVRInfo();var range=void 0;if(!metric){return 0;}range=metric.range.end-metric.range.start;d=range<metric.manifestInfo.DVRWindowSize?range:metric.manifestInfo.DVRWindowSize;}return d;}/**\\n     * Use this method to get the current playhead time as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.\\n     * Note - this property only has meaning for live streams. If called before play() has begun, it will return a value of NaN.\\n     *\\n     * @returns {number} The current playhead time as UTC timestamp.\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function timeAsUTC(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}if(time()<0){return NaN;}return getAsUTC(time());}/**\\n     * Use this method to get the current duration as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.\\n     * Note - this property only has meaning for live streams.\\n     *\\n     * @returns {number} The current duration as UTC timestamp.\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function durationAsUTC(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return getAsUTC(duration());}/*\\n    ---------------------------------------------------------------------------\\n\\n        AUTO BITRATE\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Gets the top quality BitrateInfo checking portal limit and max allowed.\\n     * It calls getTopQualityIndexFor internally\\n     *\\n     * @param {MediaType} type - 'video' or 'audio'\\n     * @memberof module:MediaPlayer\\n     * @returns {BitrateInfo | null}\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getTopBitrateInfoFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}return abrController.getTopBitrateInfoFor(type);}/**\\n     * Gets the current download quality for media type video, audio or images. For video and audio types the ABR\\n     * rules update this value before every new download unless setAutoSwitchQualityFor(type, false) is called. For 'image'\\n     * type, thumbnails, there is no ABR algorithm and quality is set manually.\\n     *\\n     * @param {MediaType} type - 'video', 'audio' or 'image' (thumbnails)\\n     * @returns {number} the quality index, 0 corresponding to the lowest bitrate\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#setAutoSwitchQualityFor setAutoSwitchQualityFor()}\\n     * @see {@link module:MediaPlayer#setQualityFor setQualityFor()}\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getQualityFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}if(type===_Constants2.default.IMAGE){var activeStream=getActiveStream();if(!activeStream){return-1;}var thumbnailController=activeStream.getThumbnailController();return!thumbnailController?-1:thumbnailController.getCurrentTrackIndex();}return abrController.getQualityFor(type);}/**\\n     * Sets the current quality for media type instead of letting the ABR Heuristics automatically selecting it.\\n     * This value will be overwritten by the ABR rules unless setAutoSwitchQualityFor(type, false) is called.\\n     *\\n     * @param {MediaType} type - 'video', 'audio' or 'image'\\n     * @param {number} value - the quality index, 0 corresponding to the lowest bitrate\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#setAutoSwitchQualityFor setAutoSwitchQualityFor()}\\n     * @see {@link module:MediaPlayer#getQualityFor getQualityFor()}\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function setQualityFor(type,value){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}if(type===_Constants2.default.IMAGE){var activeStream=getActiveStream();if(!activeStream){return;}var thumbnailController=activeStream.getThumbnailController();if(thumbnailController){thumbnailController.setTrackByIndex(value);}}abrController.setPlaybackQuality(type,streamController.getActiveStreamInfo(),value);}/**\\n     * Update the video element size variables\\n     * Should be called on window resize (or any other time player is resized). Fullscreen does trigger a window resize event.\\n     *\\n     * Once windowResizeEventCalled = true, abrController.checkPortalSize() will use element size variables rather than querying clientWidth every time.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function updatePortalSize(){abrController.setElementSize();abrController.setWindowResizeEventCalled(true);}/*\\n    ---------------------------------------------------------------------------\\n\\n        MEDIA PLAYER CONFIGURATION\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * <p>Set to false to prevent stream from auto-playing when the view is attached.</p>\\n     *\\n     * @param {boolean} value\\n     * @default true\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not boolean type.\\n     * @instance\\n     *\\n     */function setAutoPlay(value){(0,_SupervisorTools.checkParameterType)(value,'boolean');autoPlay=value;}/**\\n     * @returns {boolean} The current autoPlay state.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getAutoPlay(){return autoPlay;}/**\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     * @returns {number|NaN} Current live stream latency in seconds. It is the difference between current time and time position at the playback head.\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     */function getCurrentLiveLatency(){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}if(!playbackInitialized){return NaN;}return playbackController.getCurrentLiveLatency();}/**\\n     * Add a custom ABR Rule\\n     * Rule will be apply on next stream if a stream is being played\\n     *\\n     * @param {string} type - rule type (one of ['qualitySwitchRules','abandonFragmentRules'])\\n     * @param {string} rulename - name of rule (used to identify custom rule). If one rule of same name has been added, then existing rule will be updated\\n     * @param {object} rule - the rule object instance\\n     * @memberof module:MediaPlayer\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with invalid arguments.\\n     * @instance\\n     */function addABRCustomRule(type,rulename,rule){mediaPlayerModel.addABRCustomRule(type,rulename,rule);}/**\\n     * Remove a custom ABR Rule\\n     *\\n     * @param {string} rulename - name of the rule to be removed\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function removeABRCustomRule(rulename){mediaPlayerModel.removeABRCustomRule(rulename);}/**\\n     * Remove all custom rules\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function removeAllABRCustomRule(){mediaPlayerModel.removeABRCustomRule();}/**\\n     * <p>Allows you to set a scheme and server source for UTC live edge detection for dynamic streams.\\n     * If UTCTiming is defined in the manifest, it will take precedence over any time source manually added.</p>\\n     * <p>If you have exposed the Date header, use the method {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}.\\n     * This will allow the date header on the manifest to be used instead of a time server</p>\\n     * @param {string} schemeIdUri - <ul>\\n     * <li>urn:mpeg:dash:utc:http-head:2014</li>\\n     * <li>urn:mpeg:dash:utc:http-xsdate:2014</li>\\n     * <li>urn:mpeg:dash:utc:http-iso:2014</li>\\n     * <li>urn:mpeg:dash:utc:direct:2014</li>\\n     * </ul>\\n     * <p>Some specs referencing early ISO23009-1 drafts incorrectly use\\n     * 2012 in the URI, rather than 2014. support these for now.</p>\\n     * <ul>\\n     * <li>urn:mpeg:dash:utc:http-head:2012</li>\\n     * <li>urn:mpeg:dash:utc:http-xsdate:2012</li>\\n     * <li>urn:mpeg:dash:utc:http-iso:2012</li>\\n     * <li>urn:mpeg:dash:utc:direct:2012</li>\\n     * </ul>\\n     * @param {string} value - Path to a time source.\\n     * @default\\n     * <ul>\\n     *     <li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li>\\n     *     <li>value:http://time.akamai.com/?iso&ms/li>\\n     * </ul>\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#removeUTCTimingSource removeUTCTimingSource()}\\n     * @instance\\n     */function addUTCTimingSource(schemeIdUri,value){mediaPlayerModel.addUTCTimingSource(schemeIdUri,value);}/**\\n     * <p>Allows you to remove a UTC time source. Both schemeIdUri and value need to match the Dash.vo.UTCTiming properties in order for the\\n     * entry to be removed from the array</p>\\n     * @param {string} schemeIdUri - see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\\n     * @param {string} value - see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with invalid arguments, schemeIdUri and value are not string type.\\n     * @instance\\n     */function removeUTCTimingSource(schemeIdUri,value){mediaPlayerModel.removeUTCTimingSource(schemeIdUri,value);}/**\\n     * <p>Allows you to clear the stored array of time sources.</p>\\n     * <p>Example use: If you have exposed the Date header, calling this method\\n     * will allow the date header on the manifest to be used instead of the time server.</p>\\n     * <p>Example use: Calling this method, assuming there is not an exposed date header on the manifest,  will default back\\n     * to using a binary search to discover the live edge</p>\\n     *\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#restoreDefaultUTCTimingSources restoreDefaultUTCTimingSources()}\\n     * @instance\\n     */function clearDefaultUTCTimingSources(){mediaPlayerModel.clearDefaultUTCTimingSources();}/**\\n     * <p>Allows you to restore the default time sources after calling {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}</p>\\n     *\\n     * @default\\n     * <ul>\\n     *     <li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li>\\n     *     <li>value:http://time.akamai.com/?iso&ms</li>\\n     * </ul>\\n     *\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\\n     * @instance\\n     */function restoreDefaultUTCTimingSources(){mediaPlayerModel.restoreDefaultUTCTimingSources();}/**\\n     * Returns the average throughput computed in the ABR logic\\n     *\\n     * @param {MediaType} type\\n     * @return {number} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getAverageThroughput(type){var throughputHistory=abrController.getThroughputHistory();return throughputHistory?throughputHistory.getAverageThroughput(type):0;}/**\\n     * Sets whether withCredentials on XHR requests for a particular request\\n     * type is true or false\\n     *\\n     * @default false\\n     * @param {string} type - one of HTTPRequest.*_TYPE\\n     * @param {boolean} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setXHRWithCredentialsForType(type,value){mediaPlayerModel.setXHRWithCredentialsForType(type,value);}/**\\n     * Gets whether withCredentials on XHR requests for a particular request\\n     * type is true or false\\n     *\\n     * @param {string} type - one of HTTPRequest.*_TYPE\\n     * @return {boolean}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getXHRWithCredentialsForType(type){return mediaPlayerModel.getXHRWithCredentialsForType(type);}/*\\n    ---------------------------------------------------------------------------\\n\\n        OFFLINE\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Detects if Offline is included and returns an instance of OfflineController.js\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getOfflineController(){return detectOffline();}/*\\n    ---------------------------------------------------------------------------\\n\\n        METRICS\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Returns the DashMetrics.js Module. You use this Module to get access to all the public metrics\\n     * stored in dash.js\\n     *\\n     * @see {@link module:DashMetrics}\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDashMetrics(){return dashMetrics;}/*\\n    ---------------------------------------------------------------------------\\n\\n        TEXT MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Set default language for text. If default language is not one of text tracks, dash will choose the first one.\\n     *\\n     * @param {string} lang - default language\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     * @deprecated will be removed in version 3.2.0. Please use setInitialMediaSettingsFor(\\\"fragmentedText\\\", { lang: lang }) instead\\n     */function setTextDefaultLanguage(lang){logger.warn('setTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use setInitialMediaSettingsFor(\\\"fragmentedText\\\", { lang: lang }) instead');if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.setTextDefaultLanguage(lang);}/**\\n     * Get default language for text.\\n     *\\n     * @return {string} the default language if it has been set using setTextDefaultLanguage\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     * @deprecated will be removed in version 3.2.0. Please use getInitialMediaSettingsFor(\\\"fragmentedText\\\").lang instead\\n     */function getTextDefaultLanguage(){logger.warn('getTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use getInitialMediaSettingsFor(\\\"fragmentedText\\\").lang instead');if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}return textController.getTextDefaultLanguage();}/**\\n     * Set enabled default state.\\n     * This is used to enable/disable text when a file is loaded.\\n     * During playback, use enableText to enable text for the file\\n     *\\n     * @param {boolean} enable - true to enable text, false otherwise\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setTextDefaultEnabled(enable){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.setTextDefaultEnabled(enable);}/**\\n     * Get enabled default state.\\n     *\\n     * @return {boolean}  default enable state\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getTextDefaultEnabled(){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}return textController.getTextDefaultEnabled();}/**\\n     * Enable/disable text\\n     * When enabling text, dash will choose the previous selected text track\\n     *\\n     * @param {boolean} enable - true to enable text, false otherwise (same as setTextTrack(-1))\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function enableText(enable){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.enableText(enable);}/**\\n     * Enable/disable text\\n     * When enabling dash will keep downloading and process fragmented text tracks even if all tracks are in mode \\\"hidden\\\"\\n     *\\n     * @param {boolean} enable - true to enable text streaming even if all text tracks are hidden.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function enableForcedTextStreaming(enable){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.enableForcedTextStreaming(enable);}/**\\n     * Return if text is enabled\\n     *\\n     * @return {boolean} return true if text is enabled, false otherwise\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isTextEnabled(){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}return textController.isTextEnabled();}/**\\n     * Use this method to change the current text track for both external time text files and fragmented text tracks. There is no need to\\n     * set the track mode on the video object to switch a track when using this method.\\n     * @param {number} idx - Index of track based on the order of the order the tracks are added Use -1 to disable all tracks. (turn captions off).  Use module:MediaPlayer#dashjs.MediaPlayer.events.TEXT_TRACK_ADDED.\\n     * @see {@link MediaPlayerEvents#event:TEXT_TRACK_ADDED dashjs.MediaPlayer.events.TEXT_TRACK_ADDED}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setTextTrack(idx){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.setTextTrack(idx);}function getCurrentTextTrackIndex(){var idx=NaN;if(textController){idx=textController.getCurrentTrackIdx();}return idx;}/**\\n     * This method serves to control captions z-index value. If 'true' is passed, the captions will have the highest z-index and be\\n     * displayed on top of other html elements. Default value is 'false' (z-index is not set).\\n     * @param {boolean} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function displayCaptionsOnTop(value){var textTracks=(0,_TextTracks2.default)(context).getInstance();textTracks.setConfig({videoModel:videoModel});textTracks.initialize();textTracks.setDisplayCConTop(value);}/*\\n    ---------------------------------------------------------------------------\\n\\n        VIDEO ELEMENT MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Returns instance of Video Element that was attached by calling attachView()\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~ELEMENT_NOT_ATTACHED_ERROR ELEMENT_NOT_ATTACHED_ERROR} if called before attachView function\\n     * @instance\\n     */function getVideoElement(){if(!videoModel.getElement()){throw ELEMENT_NOT_ATTACHED_ERROR;}return videoModel.getElement();}/**\\n     * Use this method to attach an HTML5 VideoElement for dash.js to operate upon.\\n     *\\n     * @param {Object} element - An HTMLMediaElement that has already been defined in the DOM (or equivalent stub).\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function attachView(element){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}videoModel.setElement(element);if(element){detectProtection();detectMetricsReporting();detectMss();if(streamController){streamController.switchToVideoElement();}}if(playbackInitialized){//Reset if we have been playing before, so this is a new element.\\nresetPlaybackControllers();}initializePlayback();}/**\\n     * Returns instance of Div that was attached by calling attachTTMLRenderingDiv()\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getTTMLRenderingDiv(){return videoModel?videoModel.getTTMLRenderingDiv():null;}/**\\n     * Use this method to attach an HTML5 div for dash.js to render rich TTML subtitles.\\n     *\\n     * @param {HTMLDivElement} div - An unstyled div placed after the video element. It will be styled to match the video size and overlay z-order.\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~ELEMENT_NOT_ATTACHED_ERROR ELEMENT_NOT_ATTACHED_ERROR} if called before attachView function\\n     * @instance\\n     */function attachTTMLRenderingDiv(div){if(!videoModel.getElement()){throw ELEMENT_NOT_ATTACHED_ERROR;}videoModel.setTTMLRenderingDiv(div);}/*\\n    ---------------------------------------------------------------------------\\n\\n        STREAM AND TRACK MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * @param {MediaType} type\\n     * @returns {Array}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getBitrateInfoListFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var stream=getActiveStream();return stream?stream.getBitrateListFor(type):[];}/**\\n     * This method returns the list of all available streams from a given manifest\\n     * @param {Object} manifest\\n     * @returns {Array} list of {@link StreamInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getStreamsFromManifest(manifest){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}return adapter.getStreamsInfo(manifest);}/**\\n     * This method returns the list of all available tracks for a given media type\\n     * @param {MediaType} type\\n     * @returns {Array} list of {@link MediaInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getTracksFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var streamInfo=streamController.getActiveStreamInfo();return mediaController.getTracksFor(type,streamInfo);}/**\\n     * This method returns the list of all available tracks for a given media type and streamInfo from a given manifest\\n     * @param {MediaType} type\\n     * @param {Object} manifest\\n     * @param {Object} streamInfo\\n     * @returns {Array}  list of {@link MediaInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getTracksForTypeFromManifest(type,manifest,streamInfo){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}streamInfo=streamInfo||adapter.getStreamsInfo(manifest,1)[0];return streamInfo?adapter.getAllMediaInfoForType(streamInfo,type,manifest):[];}/**\\n     * @param {MediaType} type\\n     * @returns {Object|null} {@link MediaInfo}\\n     *\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getCurrentTrackFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var streamInfo=streamController.getActiveStreamInfo();return mediaController.getCurrentTrackFor(type,streamInfo);}/**\\n     * This method allows to set media settings that will be used to pick the initial track. Format of the settings\\n     * is following: <br />\\n     * {lang: langValue (can be either a string or a regex to match),\\n     *  index: indexValue,\\n     *  viewpoint: viewpointValue,\\n     *  audioChannelConfiguration: audioChannelConfigurationValue,\\n     *  accessibility: accessibilityValue,\\n     *  role: roleValue}\\n     *\\n     * @param {MediaType} type\\n     * @param {Object} value\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function setInitialMediaSettingsFor(type,value){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}mediaController.setInitialSettings(type,value);if(type===_Constants2.default.FRAGMENTED_TEXT){textController.setInitialSettings(value);}}/**\\n     * This method returns media settings that is used to pick the initial track. Format of the settings\\n     * is following:\\n     * {lang: langValue,\\n     *  index: indexValue,\\n     *  viewpoint: viewpointValue,\\n     *  audioChannelConfiguration: audioChannelConfigurationValue,\\n     *  accessibility: accessibilityValue,\\n     *  role: roleValue}\\n     * @param {MediaType} type\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function getInitialMediaSettingsFor(type){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}return mediaController.getInitialSettings(type);}/**\\n     * @param {MediaInfo} track - instance of {@link MediaInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function setCurrentTrack(track){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}mediaController.setTrack(track);}/**\\n     * This method returns the current track switch mode.\\n     *\\n     * @param {MediaType} type\\n     * @returns {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function getTrackSwitchModeFor(type){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}return mediaController.getSwitchMode(type);}/**\\n     * This method sets the current track switch mode. Available options are:\\n     *\\n     * Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\\n     * (used to forbid clearing the buffered data (prior to current playback position) after track switch.\\n     * Defers to fastSwitchEnabled for placement of new data. Default for video)\\n     *\\n     * Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE\\n     * (used to clear the buffered data (prior to current playback position) after track switch. Default for audio)\\n     *\\n     * @param {MediaType} type\\n     * @param {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function setTrackSwitchModeFor(type,mode){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}mediaController.setSwitchMode(type,mode);}/**\\n     * This method sets the selection mode for the initial track. This mode defines how the initial track will be selected\\n     * if no initial media settings are set. If initial media settings are set this parameter will be ignored. Available options are:\\n     *\\n     * Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE\\n     * This mode makes the player select the track with a highest bitrate. This mode is a default mode.\\n     *\\n     * Constants.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY\\n     * This mode makes the player select the track with the lowest bitrate per pixel average.\\n     *\\n     * Constants.TRACK_SELECTION_MODE_WIDEST_RANGE\\n     * This mode makes the player select the track with a widest range of bitrates.\\n     *\\n     * @param {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function setSelectionModeForInitialTrack(mode){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}mediaController.setSelectionModeForInitialTrack(mode);}/**\\n     * This method returns the track selection mode.\\n     *\\n     * @returns {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function getSelectionModeForInitialTrack(){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}return mediaController.getSelectionModeForInitialTrack();}/*\\n    ---------------------------------------------------------------------------\\n\\n        PROTECTION MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Detects if Protection is included and returns an instance of ProtectionController.js\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getProtectionController(){return detectProtection();}/**\\n     * Will override dash.js protection controller.\\n     * @param {ProtectionController} value - valid protection controller instance.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function attachProtectionController(value){protectionController=value;}/**\\n     * Sets Protection Data required to setup the Protection Module (DRM). Protection Data must\\n     * be set before initializing MediaPlayer or, once initialized, before PROTECTION_CREATED event is fired.\\n     * @see {@link module:MediaPlayer#initialize initialize()}\\n     * @see {@link ProtectionEvents#event:PROTECTION_CREATED dashjs.Protection.events.PROTECTION_CREATED}\\n     * @param {ProtectionDataSet} value - object containing\\n     * property names corresponding to key system name strings and associated\\n     * values being instances of.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setProtectionData(value){protectionData=value;// Propagate changes in case StreamController is already created\\nif(streamController){streamController.setProtectionData(protectionData);}}/**\\n     * Registers a license request filter. This enables application to manipulate/overwrite any request parameter and/or request data.\\n     * The provided callback function shall return a promise that shall be resolved once the filter process is completed.\\n     * The filters are applied in the order they are registered.\\n     * @param {function} filter - the license request filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function registerLicenseRequestFilter(filter){licenseRequestFilters.push(filter);if(protectionController){protectionController.setLicenseRequestFilters(licenseRequestFilters);}}/**\\n     * Registers a license response filter. This enables application to manipulate/overwrite the response data\\n     * The provided callback function shall return a promise that shall be resolved once the filter process is completed.\\n     * The filters are applied in the order they are registered.\\n     * @param {function} filter - the license response filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function registerLicenseResponseFilter(filter){licenseResponseFilters.push(filter);if(protectionController){protectionController.setLicenseResponseFilters(licenseResponseFilters);}}/**\\n     * Unregisters a license request filter.\\n     * @param {function} filter - the license request filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function unregisterLicenseRequestFilter(filter){unregisterFilter(licenseRequestFilters,filter);if(protectionController){protectionController.setLicenseRequestFilters(licenseRequestFilters);}}/**\\n     * Unregisters a license response filter.\\n     * @param {function} filter - the license response filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function unregisterLicenseResponseFilter(filter){unregisterFilter(licenseResponseFilters,filter);if(protectionController){protectionController.setLicenseResponseFilters(licenseResponseFilters);}}function unregisterFilter(filters,filter){var index=-1;filters.some(function(item,i){if(item===filter){index=i;return true;}});if(index<0)return;filters.splice(index,1);}/*\\n    ---------------------------------------------------------------------------\\n\\n        THUMBNAILS MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Provide the thumbnail at time position. This can be asynchronous, so you must provide a callback ro retrieve thumbnails informations\\n     * @param {number} time - A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected\\n     * @param {function} callback - A Callback function provided when retrieving thumbnail the given time position. Thumbnail object is null in case there are is not a thumbnails representation or\\n     * if it doesn't contain a thumbnail for the given time position.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function provideThumbnail(time,callback){if(typeof callback!=='function'){return;}if(time<0){callback(null);return;}var s=playbackController.getIsDynamic()?getDVRSeekOffset(time):time;var stream=streamController.getStreamForTime(s);if(stream===null){callback(null);return;}var thumbnailController=stream.getThumbnailController();if(!thumbnailController){callback(null);return;}var timeInPeriod=streamController.getTimeRelativeToStreamId(s,stream.getId());return thumbnailController.provide(timeInPeriod,callback);}/*\\n    ---------------------------------------------------------------------------\\n\\n        TOOLS AND OTHERS FUNCTIONS\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Allows application to retrieve a manifest.  Manifest loading is asynchro\\n     * nous and\\n     * requires the app-provided callback function\\n     *\\n     * @param {string} url - url the manifest url\\n     * @param {function} callback - A Callback function provided when retrieving manifests\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function retrieveManifest(url,callback){var manifestLoader=createManifestLoader();var self=this;var handler=function handler(e){if(!e.error){callback(e.manifest);}else{callback(null,e.error);}eventBus.off(_Events2.default.INTERNAL_MANIFEST_LOADED,handler,self);manifestLoader.reset();};eventBus.on(_Events2.default.INTERNAL_MANIFEST_LOADED,handler,self);uriFragmentModel.initialize(url);manifestLoader.load(url);}/**\\n     * Returns the source string or manifest that was attached by calling attachSource()\\n     * @returns {string | manifest}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~SOURCE_NOT_ATTACHED_ERROR SOURCE_NOT_ATTACHED_ERROR} if called before attachSource function\\n     * @instance\\n     */function getSource(){if(!source){throw SOURCE_NOT_ATTACHED_ERROR;}return source;}/**\\n     * Use this method to set a source URL to a valid MPD manifest file OR\\n     * a previously downloaded and parsed manifest object.  Optionally, can\\n     * also provide protection information\\n     *\\n     * @param {string|Object} urlOrManifest - A URL to a valid MPD manifest file, or a\\n     * parsed manifest object.\\n     *\\n     *\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function attachSource(urlOrManifest){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}if(typeof urlOrManifest==='string'){uriFragmentModel.initialize(urlOrManifest);}source=urlOrManifest;if(streamingInitialized||playbackInitialized){resetPlaybackControllers();}if(isReady()){initializePlayback();}}/**\\n     * Get the current settings object being used on the player.\\n     * @returns {PlayerSettings} The settings object being used.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getSettings(){return settings.get();}/**\\n     * @summary Update the current settings object being used on the player. Anything left unspecified is not modified.\\n     * @param {PlayerSettings} settingsObj - An object corresponding to the settings definition.\\n     * @description This function does not update the entire object, only properties in the passed in object are updated.\\n     *\\n     * This means that updateSettings({a: x}) and updateSettings({b: y}) are functionally equivalent to\\n     * updateSettings({a: x, b: y}). If the default values are required again, @see{@link resetSettings}.\\n     * @example\\n     * player.updateSettings({\\n     *      streaming: {\\n     *          liveDelayFragmentCount: 8\\n     *          abr: {\\n     *              maxBitrate: { audio: 100, video: 1000 }\\n     *          }\\n     *      }\\n     *  });\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function updateSettings(settingsObj){settings.update(settingsObj);}/**\\n     * Resets the settings object back to the default.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function resetSettings(){settings.reset();}/**\\n     * A utility methods which converts UTC timestamp value into a valid time and date string.\\n     *\\n     * @param {number} time - UTC timestamp to be converted into date and time.\\n     * @param {string} locales - a region identifier (i.e. en_US).\\n     * @param {boolean} hour12 - 12 vs 24 hour. Set to true for 12 hour time formatting.\\n     * @param {boolean} withDate - default is false. Set to true to append current date to UTC time format.\\n     * @returns {string} A formatted time and date string.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function formatUTC(time,locales,hour12){var withDate=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var dt=new Date(time*1000);var d=dt.toLocaleDateString(locales);var t=dt.toLocaleTimeString(locales,{hour12:hour12});return withDate?t+' '+d:t;}/**\\n     * A utility method which converts seconds into TimeCode (i.e. 300 --> 05:00).\\n     *\\n     * @param {number} value - A number in seconds to be converted into a formatted time code.\\n     * @returns {string} A formatted time code string.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function convertToTimeCode(value){value=Math.max(value,0);var h=Math.floor(value/3600);var m=Math.floor(value%3600/60);var s=Math.floor(value%3600%60);return(h===0?'':h<10?'0'+h.toString()+':':h.toString()+':')+(m<10?'0'+m.toString():m.toString())+':'+(s<10?'0'+s.toString():s.toString());}/**\\n     * This method should be used to extend or replace internal dash.js objects.\\n     * There are two ways to extend dash.js (determined by the override argument):\\n     * <ol>\\n     * <li>If you set override to true any public method or property in your custom object will\\n     * override the dash.js parent object's property(ies) and will be used instead but the\\n     * dash.js parent module will still be created.</li>\\n     *\\n     * <li>If you set override to false your object will completely replace the dash.js object.\\n     * (Note: This is how it was in 1.x of Dash.js with Dijon).</li>\\n     * </ol>\\n     * <b>When you extend you get access to this.context, this.factory and this.parent to operate with in your custom object.</b>\\n     * <ul>\\n     * <li><b>this.context</b> - can be used to pass context for singleton access.</li>\\n     * <li><b>this.factory</b> - can be used to call factory.getSingletonInstance().</li>\\n     * <li><b>this.parent</b> - is the reference of the parent object to call other public methods. (this.parent is excluded if you extend with override set to false or option 2)</li>\\n     * </ul>\\n     * <b>You must call extend before you call initialize</b>\\n     * @see {@link module:MediaPlayer#initialize initialize()}\\n     * @param {string} parentNameString - name of parent module\\n     * @param {Object} childInstance - overriding object\\n     * @param {boolean} override - replace only some methods (true) or the whole object (false)\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function extend(parentNameString,childInstance,override){_FactoryMaker2.default.extend(parentNameString,childInstance,override,context);}/**\\n     * This method returns the active stream\\n     *\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getActiveStream(){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var streamInfo=streamController.getActiveStreamInfo();return streamInfo?streamController.getStreamById(streamInfo.id):null;}//***********************************\\n// PRIVATE METHODS\\n//***********************************\\nfunction resetPlaybackControllers(){playbackInitialized=false;streamingInitialized=false;adapter.reset();streamController.reset();gapController.reset();playbackController.reset();abrController.reset();mediaController.reset();textController.reset();if(protectionController){if(settings.get().streaming.keepProtectionMediaKeys){protectionController.stop();}else{protectionController.reset();protectionController=null;detectProtection();}}cmcdModel.reset();}function createPlaybackControllers(){// creates or get objects instances\\nvar manifestLoader=createManifestLoader();if(!streamController){streamController=(0,_StreamController2.default)(context).getInstance();}capabilitiesFilter.setConfig({capabilities:capabilities,adapter:adapter,settings:settings});streamController.setConfig({capabilities:capabilities,capabilitiesFilter:capabilitiesFilter,manifestLoader:manifestLoader,manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,protectionController:protectionController,adapter:adapter,dashMetrics:dashMetrics,errHandler:errHandler,timelineConverter:timelineConverter,videoModel:videoModel,playbackController:playbackController,abrController:abrController,mediaController:mediaController,textController:textController,settings:settings,baseURLController:baseURLController});gapController.setConfig({settings:settings,playbackController:playbackController,streamController:streamController,videoModel:videoModel,timelineConverter:timelineConverter,adapter:adapter});playbackController.setConfig({streamController:streamController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,adapter:adapter,videoModel:videoModel,timelineConverter:timelineConverter,uriFragmentModel:uriFragmentModel,settings:settings});abrController.setConfig({streamController:streamController,domStorage:domStorage,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,adapter:adapter,videoModel:videoModel,settings:settings});textController.setConfig({errHandler:errHandler,manifestModel:manifestModel,adapter:adapter,mediaController:mediaController,streamController:streamController,videoModel:videoModel});cmcdModel.setConfig({abrController:abrController,dashMetrics:dashMetrics,playbackController:playbackController});// initialises controller\\nstreamController.initialize(autoPlay,protectionData);gapController.initialize();cmcdModel.initialize();}function createManifestLoader(){return(0,_ManifestLoader2.default)(context).create({debug:debug,errHandler:errHandler,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,requestModifier:(0,_RequestModifier2.default)(context).getInstance(),mssHandler:mssHandler,settings:settings});}function detectProtection(){if(protectionController){return protectionController;}// do not require Protection as dependencies as this is optional and intended to be loaded separately\\nvar Protection=dashjs.Protection;/* jshint ignore:line */if(typeof Protection==='function'){//TODO need a better way to register/detect plugin components\\nvar protection=Protection(context).create();_Events2.default.extend(Protection.events);_MediaPlayerEvents2.default.extend(Protection.events,{publicOnly:true});_Errors2.default.extend(Protection.errors);if(!capabilities){capabilities=(0,_Capabilities2.default)(context).getInstance();}protectionController=protection.createProtectionSystem({debug:debug,errHandler:errHandler,videoModel:videoModel,capabilities:capabilities,eventBus:eventBus,events:_Events2.default,BASE64:_base2.default,constants:_Constants2.default,cmcdModel:cmcdModel});if(protectionController){protectionController.setLicenseRequestFilters(licenseRequestFilters);protectionController.setLicenseResponseFilters(licenseResponseFilters);}return protectionController;}return null;}function detectMetricsReporting(){if(metricsReportingController){return;}// do not require MetricsReporting as dependencies as this is optional and intended to be loaded separately\\nvar MetricsReporting=dashjs.MetricsReporting;/* jshint ignore:line */if(typeof MetricsReporting==='function'){//TODO need a better way to register/detect plugin components\\nvar metricsReporting=MetricsReporting(context).create();metricsReportingController=metricsReporting.createMetricsReporting({debug:debug,eventBus:eventBus,mediaElement:getVideoElement(),adapter:adapter,dashMetrics:dashMetrics,events:_Events2.default,constants:_Constants2.default,metricsConstants:_MetricsConstants2.default});}}function detectMss(){if(mssHandler){return;}// do not require MssHandler as dependencies as this is optional and intended to be loaded separately\\nvar MssHandler=dashjs.MssHandler;/* jshint ignore:line */if(typeof MssHandler==='function'){//TODO need a better way to register/detect plugin components\\n_Errors2.default.extend(MssHandler.errors);mssHandler=MssHandler(context).create({eventBus:eventBus,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,manifestModel:manifestModel,playbackController:playbackController,streamController:streamController,protectionController:protectionController,baseURLController:baseURLController,errHandler:errHandler,events:_Events2.default,constants:_Constants2.default,debug:debug,initSegmentType:_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:_base2.default,ISOBoxer:_codemIsoboxer2.default,settings:settings});}}function detectOffline(){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}if(offlineController){return offlineController;}// do not require Offline as dependencies as this is optional and intended to be loaded separately\\nvar OfflineController=dashjs.OfflineController;/* jshint ignore:line */if(typeof OfflineController==='function'){//TODO need a better way to register/detect plugin components\\n_Events2.default.extend(OfflineController.events);_MediaPlayerEvents2.default.extend(OfflineController.events,{publicOnly:true});_Errors2.default.extend(OfflineController.errors);var manifestLoader=createManifestLoader();var manifestUpdater=(0,_ManifestUpdater2.default)(context).create();manifestUpdater.setConfig({manifestModel:manifestModel,adapter:adapter,manifestLoader:manifestLoader,errHandler:errHandler});offlineController=OfflineController(context).create({debug:debug,manifestUpdater:manifestUpdater,baseURLController:baseURLController,manifestLoader:manifestLoader,manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,abrController:abrController,playbackController:playbackController,adapter:adapter,errHandler:errHandler,dashMetrics:dashMetrics,timelineConverter:timelineConverter,schemeLoaderFactory:schemeLoaderFactory,eventBus:eventBus,events:_Events2.default,errors:_Errors2.default,constants:_Constants2.default,settings:settings,dashConstants:_DashConstants2.default,urlUtils:(0,_URLUtils2.default)(context).getInstance()});return offlineController;}return null;}function getAsUTC(valToConvert){var metric=dashMetrics.getCurrentDVRInfo();var availableFrom=void 0,utcValue=void 0;if(!metric){return 0;}availableFrom=metric.manifestInfo.availableFrom.getTime()/1000;utcValue=valToConvert+(availableFrom+metric.range.start);return utcValue;}function initializePlayback(){if(offlineController){offlineController.resetRecords();}if(!streamingInitialized&&source){streamingInitialized=true;logger.info('Streaming Initialized');createPlaybackControllers();if(typeof source==='string'){streamController.load(source);}else{streamController.loadWithManifest(source);}}if(!playbackInitialized&&isReady()){playbackInitialized=true;logger.info('Playback Initialized');}}/**\\n     * Returns the DashAdapter.js Module.\\n     *\\n     * @see {@link module:DashAdapter}\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDashAdapter(){return adapter;}instance={initialize:initialize,setConfig:setConfig,on:on,off:off,extend:extend,attachView:attachView,attachSource:attachSource,isReady:isReady,preload:preload,play:play,isPaused:isPaused,pause:pause,isSeeking:isSeeking,isDynamic:isDynamic,seek:seek,setPlaybackRate:setPlaybackRate,getPlaybackRate:getPlaybackRate,setMute:setMute,isMuted:isMuted,setVolume:setVolume,getVolume:getVolume,time:time,duration:duration,timeAsUTC:timeAsUTC,durationAsUTC:durationAsUTC,getActiveStream:getActiveStream,getDVRWindowSize:getDVRWindowSize,getDVRSeekOffset:getDVRSeekOffset,convertToTimeCode:convertToTimeCode,formatUTC:formatUTC,getVersion:getVersion,getDebug:getDebug,getBufferLength:getBufferLength,getTTMLRenderingDiv:getTTMLRenderingDiv,getVideoElement:getVideoElement,getSource:getSource,getCurrentLiveLatency:getCurrentLiveLatency,getTopBitrateInfoFor:getTopBitrateInfoFor,setAutoPlay:setAutoPlay,getAutoPlay:getAutoPlay,getDashMetrics:getDashMetrics,getQualityFor:getQualityFor,setQualityFor:setQualityFor,updatePortalSize:updatePortalSize,setTextDefaultLanguage:setTextDefaultLanguage,getTextDefaultLanguage:getTextDefaultLanguage,setTextDefaultEnabled:setTextDefaultEnabled,getTextDefaultEnabled:getTextDefaultEnabled,enableText:enableText,enableForcedTextStreaming:enableForcedTextStreaming,isTextEnabled:isTextEnabled,setTextTrack:setTextTrack,getBitrateInfoListFor:getBitrateInfoListFor,getStreamsFromManifest:getStreamsFromManifest,getTracksFor:getTracksFor,getTracksForTypeFromManifest:getTracksForTypeFromManifest,getCurrentTrackFor:getCurrentTrackFor,setInitialMediaSettingsFor:setInitialMediaSettingsFor,getInitialMediaSettingsFor:getInitialMediaSettingsFor,setCurrentTrack:setCurrentTrack,getTrackSwitchModeFor:getTrackSwitchModeFor,setTrackSwitchModeFor:setTrackSwitchModeFor,setSelectionModeForInitialTrack:setSelectionModeForInitialTrack,getSelectionModeForInitialTrack:getSelectionModeForInitialTrack,addABRCustomRule:addABRCustomRule,removeABRCustomRule:removeABRCustomRule,removeAllABRCustomRule:removeAllABRCustomRule,getAverageThroughput:getAverageThroughput,retrieveManifest:retrieveManifest,addUTCTimingSource:addUTCTimingSource,removeUTCTimingSource:removeUTCTimingSource,clearDefaultUTCTimingSources:clearDefaultUTCTimingSources,restoreDefaultUTCTimingSources:restoreDefaultUTCTimingSources,setXHRWithCredentialsForType:setXHRWithCredentialsForType,getXHRWithCredentialsForType:getXHRWithCredentialsForType,getProtectionController:getProtectionController,attachProtectionController:attachProtectionController,setProtectionData:setProtectionData,registerLicenseRequestFilter:registerLicenseRequestFilter,registerLicenseResponseFilter:registerLicenseResponseFilter,unregisterLicenseRequestFilter:unregisterLicenseRequestFilter,unregisterLicenseResponseFilter:unregisterLicenseResponseFilter,displayCaptionsOnTop:displayCaptionsOnTop,attachTTMLRenderingDiv:attachTTMLRenderingDiv,getCurrentTextTrackIndex:getCurrentTextTrackIndex,provideThumbnail:provideThumbnail,getDashAdapter:getDashAdapter,getOfflineController:getOfflineController,getSettings:getSettings,updateSettings:updateSettings,resetSettings:resetSettings,reset:reset,destroy:destroy};setup();return instance;}MediaPlayer.__dashjs_factory_name='MediaPlayer';var factory=_FactoryMaker2.default.getClassFactory(MediaPlayer);factory.events=_MediaPlayerEvents2.default;factory.errors=_Errors2.default;_FactoryMaker2.default.updateClassFactory(MediaPlayer.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=MediaPlayer.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\":\n/*!***************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ../core/events/EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @implements EventsBase\\n */var MediaPlayerEvents=function(_EventsBase){_inherits(MediaPlayerEvents,_EventsBase);/**\\n     * @description Public facing external events to be used when developing a player that implements dash.js.\\n     */function MediaPlayerEvents(){_classCallCheck(this,MediaPlayerEvents);/**\\n         * Triggered when playback will not start yet\\n         * as the MPD's availabilityStartTime is in the future.\\n         * Check delay property in payload to determine time before playback will start.\\n         * @event MediaPlayerEvents#AST_IN_FUTURE\\n         */var _this=_possibleConstructorReturn(this,(MediaPlayerEvents.__proto__||Object.getPrototypeOf(MediaPlayerEvents)).call(this));_this.AST_IN_FUTURE='astInFuture';/**\\n         * Triggered when the video element's buffer state changes to stalled.\\n         * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\\n         * @event MediaPlayerEvents#BUFFER_EMPTY\\n         */_this.BUFFER_EMPTY='bufferStalled';/**\\n         * Triggered when the video element's buffer state changes to loaded.\\n         * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\\n         * @event MediaPlayerEvents#BUFFER_LOADED\\n         */_this.BUFFER_LOADED='bufferLoaded';/**\\n         * Triggered when the video element's buffer state changes, either stalled or loaded. Check payload for state.\\n         * @event MediaPlayerEvents#BUFFER_LEVEL_STATE_CHANGED\\n         */_this.BUFFER_LEVEL_STATE_CHANGED='bufferStateChanged';/**\\n         * Triggered when a dynamic stream changed to static (transition phase between Live and On-Demand).\\n         * @event MediaPlayerEvents#DYNAMIC_TO_STATIC\\n         */_this.DYNAMIC_TO_STATIC='dynamicToStatic';/**\\n         * Triggered when there is an error from the element or MSE source buffer.\\n         * @event MediaPlayerEvents#ERROR\\n         */_this.ERROR='error';/**\\n         * Triggered when a fragment download has completed.\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_COMPLETED\\n         */_this.FRAGMENT_LOADING_COMPLETED='fragmentLoadingCompleted';/**\\n         * Triggered when a partial fragment download has completed.\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_PROGRESS\\n         */_this.FRAGMENT_LOADING_PROGRESS='fragmentLoadingProgress';/**\\n         * Triggered when a fragment download has started.\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_STARTED\\n         */_this.FRAGMENT_LOADING_STARTED='fragmentLoadingStarted';/**\\n         * Triggered when a fragment download is abandoned due to detection of slow download base on the ABR abandon rule..\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_ABANDONED\\n         */_this.FRAGMENT_LOADING_ABANDONED='fragmentLoadingAbandoned';/**\\n         * Triggered when {@link module:Debug} logger methods are called.\\n         * @event MediaPlayerEvents#LOG\\n         */_this.LOG='log';//TODO refactor with internal event\\n/**\\n         * Triggered when the manifest load is complete\\n         * @event MediaPlayerEvents#MANIFEST_LOADED\\n         */_this.MANIFEST_LOADED='manifestLoaded';/**\\n         * Triggered anytime there is a change to the overall metrics.\\n         * @event MediaPlayerEvents#METRICS_CHANGED\\n         */_this.METRICS_CHANGED='metricsChanged';/**\\n         * Triggered when an individual metric is added, updated or cleared.\\n         * @event MediaPlayerEvents#METRIC_CHANGED\\n         */_this.METRIC_CHANGED='metricChanged';/**\\n         * Triggered every time a new metric is added.\\n         * @event MediaPlayerEvents#METRIC_ADDED\\n         */_this.METRIC_ADDED='metricAdded';/**\\n         * Triggered every time a metric is updated.\\n         * @event MediaPlayerEvents#METRIC_UPDATED\\n         */_this.METRIC_UPDATED='metricUpdated';/**\\n         * Triggered at the stream end of a period.\\n         * @event MediaPlayerEvents#PERIOD_SWITCH_COMPLETED\\n         */_this.PERIOD_SWITCH_COMPLETED='periodSwitchCompleted';/**\\n         * Triggered when a new period starts.\\n         * @event MediaPlayerEvents#PERIOD_SWITCH_STARTED\\n         */_this.PERIOD_SWITCH_STARTED='periodSwitchStarted';/**\\n         * Triggered when an ABR up /down switch is initiated; either by user in manual mode or auto mode via ABR rules.\\n         * @event MediaPlayerEvents#QUALITY_CHANGE_REQUESTED\\n         */_this.QUALITY_CHANGE_REQUESTED='qualityChangeRequested';/**\\n         * Triggered when the new ABR quality is being rendered on-screen.\\n         * @event MediaPlayerEvents#QUALITY_CHANGE_RENDERED\\n         */_this.QUALITY_CHANGE_RENDERED='qualityChangeRendered';/**\\n         * Triggered when the new track is being rendered.\\n         * @event MediaPlayerEvents#TRACK_CHANGE_RENDERED\\n         */_this.TRACK_CHANGE_RENDERED='trackChangeRendered';/**\\n         * Triggered when the source is setup and ready.\\n         * @event MediaPlayerEvents#SOURCE_INITIALIZED\\n         */_this.SOURCE_INITIALIZED='sourceInitialized';/**\\n         * Triggered when a stream (period) is being loaded\\n         * @event MediaPlayerEvents#STREAM_INITIALIZING\\n         */_this.STREAM_INITIALIZING='streamInitializing';/**\\n         * Triggered when a stream (period) is loaded\\n         * @event MediaPlayerEvents#STREAM_UPDATED\\n         */_this.STREAM_UPDATED='streamUpdated';/**\\n         * Triggered when a stream (period) is updated\\n         * @event MediaPlayerEvents#STREAM_INITIALIZED\\n         */_this.STREAM_INITIALIZED='streamInitialized';/**\\n         * Triggered when the player has been reset.\\n         * @event MediaPlayerEvents#STREAM_TEARDOWN_COMPLETE\\n         */_this.STREAM_TEARDOWN_COMPLETE='streamTeardownComplete';/**\\n         * Triggered once all text tracks detected in the MPD are added to the video element.\\n         * @event MediaPlayerEvents#TEXT_TRACKS_ADDED\\n         */_this.TEXT_TRACKS_ADDED='allTextTracksAdded';/**\\n         * Triggered when a text track is added to the video element's TextTrackList\\n         * @event MediaPlayerEvents#TEXT_TRACK_ADDED\\n         */_this.TEXT_TRACK_ADDED='textTrackAdded';/**\\n         * Triggered when a ttml chunk is parsed.\\n         * @event MediaPlayerEvents#TTML_PARSED\\n         */_this.TTML_PARSED='ttmlParsed';/**\\n         * Triggered when a ttml chunk has to be parsed.\\n         * @event MediaPlayerEvents#TTML_TO_PARSE\\n         */_this.TTML_TO_PARSE='ttmlToParse';/**\\n         * Triggered when a caption is rendered.\\n         * @event MediaPlayerEvents#CAPTION_RENDERED\\n         */_this.CAPTION_RENDERED='captionRendered';/**\\n         * Triggered when the caption container is resized.\\n         * @event MediaPlayerEvents#CAPTION_CONTAINER_RESIZE\\n         */_this.CAPTION_CONTAINER_RESIZE='captionContainerResize';/**\\n         * Sent when enough data is available that the media can be played,\\n         * at least for a couple of frames.  This corresponds to the\\n         * HAVE_ENOUGH_DATA readyState.\\n         * @event MediaPlayerEvents#CAN_PLAY\\n         */_this.CAN_PLAY='canPlay';/**\\n         * Sent when playback completes.\\n         * @event MediaPlayerEvents#PLAYBACK_ENDED\\n         */_this.PLAYBACK_ENDED='playbackEnded';/**\\n         * Sent when an error occurs.  The element's error\\n         * attribute contains more information.\\n         * @event MediaPlayerEvents#PLAYBACK_ERROR\\n         */_this.PLAYBACK_ERROR='playbackError';/**\\n         * Sent when playback is not allowed (for example if user gesture is needed).\\n         * @event MediaPlayerEvents#PLAYBACK_NOT_ALLOWED\\n         */_this.PLAYBACK_NOT_ALLOWED='playbackNotAllowed';/**\\n         * The media's metadata has finished loading; all attributes now\\n         * contain as much useful information as they're going to.\\n         * @event MediaPlayerEvents#PLAYBACK_METADATA_LOADED\\n         */_this.PLAYBACK_METADATA_LOADED='playbackMetaDataLoaded';/**\\n         * Sent when playback is paused.\\n         * @event MediaPlayerEvents#PLAYBACK_PAUSED\\n         */_this.PLAYBACK_PAUSED='playbackPaused';/**\\n         * Sent when the media begins to play (either for the first time, after having been paused,\\n         * or after ending and then restarting).\\n         *\\n         * @event MediaPlayerEvents#PLAYBACK_PLAYING\\n         */_this.PLAYBACK_PLAYING='playbackPlaying';/**\\n         * Sent periodically to inform interested parties of progress downloading\\n         * the media. Information about the current amount of the media that has\\n         * been downloaded is available in the media element's buffered attribute.\\n         * @event MediaPlayerEvents#PLAYBACK_PROGRESS\\n         */_this.PLAYBACK_PROGRESS='playbackProgress';/**\\n         * Sent when the playback speed changes.\\n         * @event MediaPlayerEvents#PLAYBACK_RATE_CHANGED\\n         */_this.PLAYBACK_RATE_CHANGED='playbackRateChanged';/**\\n         * Sent when a seek operation completes.\\n         * @event MediaPlayerEvents#PLAYBACK_SEEKED\\n         */_this.PLAYBACK_SEEKED='playbackSeeked';/**\\n         * Sent when a seek operation begins.\\n         * @event MediaPlayerEvents#PLAYBACK_SEEKING\\n         */_this.PLAYBACK_SEEKING='playbackSeeking';/**\\n         * Sent when a seek operation has been asked.\\n         * @event MediaPlayerEvents#PLAYBACK_SEEK_ASKED\\n         */_this.PLAYBACK_SEEK_ASKED='playbackSeekAsked';/**\\n         * Sent when the video element reports stalled\\n         * @event MediaPlayerEvents#PLAYBACK_STALLED\\n         */_this.PLAYBACK_STALLED='playbackStalled';/**\\n         * Sent when playback of the media starts after having been paused;\\n         * that is, when playback is resumed after a prior pause event.\\n         *\\n         * @event MediaPlayerEvents#PLAYBACK_STARTED\\n         */_this.PLAYBACK_STARTED='playbackStarted';/**\\n         * The time indicated by the element's currentTime attribute has changed.\\n         * @event MediaPlayerEvents#PLAYBACK_TIME_UPDATED\\n         */_this.PLAYBACK_TIME_UPDATED='playbackTimeUpdated';/**\\n         * Sent when the media playback has stopped because of a temporary lack of data.\\n         *\\n         * @event MediaPlayerEvents#PLAYBACK_WAITING\\n         */_this.PLAYBACK_WAITING='playbackWaiting';/**\\n         * Manifest validity changed - As a result of an MPD validity expiration event.\\n         * @event MediaPlayerEvents#MANIFEST_VALIDITY_CHANGED\\n         */_this.MANIFEST_VALIDITY_CHANGED='manifestValidityChanged';/**\\n         * A gap occured in the timeline which requires a seek to the next period\\n         * @event MediaPlayerEvents#GAP_CAUSED_SEEK_TO_PERIOD_END\\n         */_this.GAP_CAUSED_SEEK_TO_PERIOD_END='gapCausedSeekToPeriodEnd';/**\\n         * A gap occured in the timeline which requires an internal seek\\n         * @event MediaPlayerEvents#GAP_CAUSED_INTERNAL_SEEK\\n         */_this.GAP_CAUSED_INTERNAL_SEEK='gapCausedInternalSeek';/**\\n         * Dash events are triggered at their respective start points on the timeline.\\n         * @event MediaPlayerEvents#EVENT_MODE_ON_START\\n         */_this.EVENT_MODE_ON_START='eventModeOnStart';/**\\n         * Dash events are triggered as soon as they were parsed.\\n         * @event MediaPlayerEvents#EVENT_MODE_ON_RECEIVE\\n         */_this.EVENT_MODE_ON_RECEIVE='eventModeOnReceive';/**\\n         * Event that is dispatched whenever the player encounters a potential conformance validation that might lead to unexpected/not optimal behavior\\n         * @event MediaPlayerEvents#CONFORMANCE_VIOLATION\\n         */_this.CONFORMANCE_VIOLATION='conformanceViolation';return _this;}return MediaPlayerEvents;}(_EventsBase3.default);var mediaPlayerEvents=new MediaPlayerEvents();exports.default=mediaPlayerEvents;\\n//# sourceMappingURL=MediaPlayerEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MediaPlayer=__webpack_require__(/*! ./MediaPlayer */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js\\\");var _MediaPlayer2=_interopRequireDefault(_MediaPlayer);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MediaPlayerFactory(){/**\\n     * mime-type identifier for any source content to be accepted as a dash manifest by the create() method.\\n     * @type {string}\\n     */var SUPPORTED_MIME_TYPE='application/dash+xml';var logger=void 0;/**\\n     *  A new MediaPlayer is instantiated for the supplied videoElement and optional source and context.  If no context is provided,\\n     *  a default DashContext is used. If no source is provided, the videoElement is interrogated to extract the first source whose\\n     *  type is application/dash+xml.\\n     * The autoplay property of the videoElement is preserved. Any preload attribute is ignored. This method should be called after the page onLoad event is dispatched.\\n     * @param {HTMLMediaElement} video\\n     * @param {HTMLSourceElement} source\\n     * @param {Object} context\\n     * @returns {MediaPlayer|null}\\n     */function create(video,source,context){if(!video||!/^VIDEO$/i.test(video.nodeName))return null;if(video._dashjs_player)return video._dashjs_player;var player=void 0;var videoID=video.id||video.name||'video element';source=source||[].slice.call(video.querySelectorAll('source')).filter(function(s){return s.type==SUPPORTED_MIME_TYPE;})[0];if(!source&&video.src){source=document.createElement('source');source.src=video.src;}else if(!source&&!video.src){return null;}context=context||{};player=(0,_MediaPlayer2.default)(context).create();player.initialize(video,source.src,video.autoplay);if(!logger){logger=player.getDebug().getLogger();}logger.debug('Converted '+videoID+' to dash.js player and added content: '+source.src);// Store a reference to the player on the video element so it can be gotten at for debugging and so we know its\\n// already been setup.\\nvideo._dashjs_player=player;return player;}/**\\n     * Searches the provided scope for all instances of the indicated selector. If no scope is provided, document is used. If no selector is\\n     * specified, [data-dashjs-player] is used. The declarative setup also looks for source elements with the type attribute set to 'application/dash+xml'.\\n     * It then looks for those video elements which have a source element defined with a type matching 'application/dash+xml'.\\n     * A new MediaPlayer is instantiated for each matching video element and the appropriate source is assigned.\\n     * The autoplay property of the video element is preserved. Any preload attribute is ignored. This method should be called after the page onLoad event is dispatched.\\n     * Returns an array holding all the MediaPlayer instances that were added by this method.\\n     * @param {string} selector - CSS selector\\n     * @param {Object} scope\\n     * @returns {Array} an array of MediaPlayer objects\\n     */function createAll(selector,scope){var aPlayers=[];selector=selector||'[data-dashjs-player]';scope=scope||document;var videos=scope.querySelectorAll(selector);for(var i=0;i<videos.length;i++){var player=create(videos[i],null);aPlayers.push(player);}var sources=scope.querySelectorAll('source[type=\\\"'+SUPPORTED_MIME_TYPE+'\\\"]');for(var _i=0;_i<sources.length;_i++){var video=findVideo(sources[_i]);var _player=create(video,null);aPlayers.push(_player);}return aPlayers;}function findVideo(el){if(/^VIDEO$/i.test(el.nodeName)){return el;}else{return findVideo(el.parentNode);}}return{create:create,createAll:createAll};}var instance=MediaPlayerFactory();var loadInterval=void 0;function loadHandler(){window.removeEventListener('load',loadHandler);instance.createAll();}function loadIntervalHandler(){if(window.dashjs){window.clearInterval(loadInterval);instance.createAll();}}var avoidAutoCreate=typeof window!=='undefined'&&window&&window.dashjs&&window.dashjs.skipAutoCreate;if(!avoidAutoCreate&&typeof window!=='undefined'&&window&&window.addEventListener){if(window.document.readyState==='complete'){if(window.dashjs){instance.createAll();}else{// If loaded asynchronously, window.readyState may be 'complete' even if dashjs hasn't loaded yet\\nloadInterval=window.setInterval(loadIntervalHandler,500);}}else{window.addEventListener('load',loadHandler);}}exports.default=instance;\\n//# sourceMappingURL=MediaPlayerFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js\":\n/*!***********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * This is a sink that is used to temporarily hold onto media chunks before a video element is added.\\n * The discharge() function is used to get the chunks out of the PreBuffer for adding to a real SourceBuffer.\\n *\\n * @class PreBufferSink\\n * @ignore\\n * @implements FragmentSink\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function PreBufferSink(onAppendedCallback){var context=this.context;var instance=void 0,logger=void 0,outstandingInit=void 0;var chunks=[];var onAppended=onAppendedCallback;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function reset(){chunks=[];outstandingInit=null;onAppended=null;}function append(chunk){if(chunk.segmentType!=='InitializationSegment'){//Init segments are stored in the initCache.\\nchunks.push(chunk);chunks.sort(function(a,b){return a.start-b.start;});outstandingInit=null;}else{//We need to hold an init chunk for when a corresponding media segment is being downloaded when the discharge happens.\\noutstandingInit=chunk;}logger.debug('PreBufferSink appended chunk s: '+chunk.start+'; e: '+chunk.end);if(onAppended){onAppended({chunk:chunk});}}function remove(start,end){chunks=chunks.filter(function(a){return!((isNaN(end)||a.start<end)&&(isNaN(start)||a.end>start));});//The opposite of the getChunks predicate.\\n}//Nothing async, nothing to abort.\\nfunction abort(){}function getAllBufferRanges(){var ranges=[];for(var i=0;i<chunks.length;i++){var chunk=chunks[i];if(ranges.length===0||chunk.start>ranges[ranges.length-1].end){ranges.push({start:chunk.start,end:chunk.end});}else{ranges[ranges.length-1].end=chunk.end;}}//Implements TimeRanges interface. So acts just like sourceBuffer.buffered.\\nvar timeranges={start:function start(n){return ranges[n].start;},end:function end(n){return ranges[n].end;}};Object.defineProperty(timeranges,'length',{get:function get(){return ranges.length;}});return timeranges;}function hasDiscontinuitiesAfter(){return false;}function updateTimestampOffset(){// Nothing to do\\n}function getBuffer(){return this;}/**\\n     * Return the all chunks in the buffer the lie between times start and end.\\n     * Because a chunk cannot be split, this returns the full chunk if any part of its time lies in the requested range.\\n     * Chunks are removed from the buffer when they are discharged.\\n     * @function PreBufferSink#discharge\\n     * @param {?Number} start The start time from which to discharge from the buffer. If NaN, it is regarded as unbounded.\\n     * @param {?Number} end The end time from which to discharge from the buffer. If NaN, it is regarded as unbounded.\\n     * @returns {Array} The set of chunks from the buffer within the time ranges.\\n     */function discharge(start,end){var result=getChunksAt(start,end);if(outstandingInit){result.push(outstandingInit);outstandingInit=null;}remove(start,end);return result;}function getChunksAt(start,end){return chunks.filter(function(a){return(isNaN(end)||a.start<end)&&(isNaN(start)||a.end>start);});}function waitForUpdateEnd(callback){callback();}instance={getAllBufferRanges:getAllBufferRanges,append:append,remove:remove,abort:abort,discharge:discharge,reset:reset,updateTimestampOffset:updateTimestampOffset,hasDiscontinuitiesAfter:hasDiscontinuitiesAfter,waitForUpdateEnd:waitForUpdateEnd,getBuffer:getBuffer};setup();return instance;}PreBufferSink.__dashjs_factory_name='PreBufferSink';var factory=_FactoryMaker2.default.getClassFactory(PreBufferSink);exports.default=factory;\\n//# sourceMappingURL=PreBufferSink.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _TextController=__webpack_require__(/*! ./text/TextController */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\\\");var _TextController2=_interopRequireDefault(_TextController);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var MAX_ALLOWED_DISCONTINUITY=0.1;// 100 milliseconds\\n/**\\n * @class SourceBufferSink\\n * @ignore\\n * @implements FragmentSink\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function SourceBufferSink(mediaSource,mediaInfo,onAppendedCallback,oldBuffer){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,type=void 0,logger=void 0,buffer=void 0,isAppendingInProgress=void 0,intervalId=void 0;var callbacks=[];var appendQueue=[];var onAppended=onAppendedCallback;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);isAppendingInProgress=false;type=mediaInfo.type;var codec=mediaInfo.codec;try{// Safari claims to support anything starting 'application/mp4'.\\n// it definitely doesn't understand 'application/mp4;codecs=\\\"stpp\\\"'\\n// - currently no browser does, so check for it and use our own\\n// implementation. The same is true for codecs=\\\"wvtt\\\".\\nif(codec.match(/application\\\\/mp4;\\\\s*codecs=\\\"(stpp|wvtt).*\\\"/i)){throw new Error('not really supported');}buffer=oldBuffer?oldBuffer:mediaSource.addSourceBuffer(codec);if(buffer.changeType&&oldBuffer){logger.debug('Doing period transition with changeType');buffer.changeType(codec);}updateAppendWindow();var CHECK_INTERVAL=50;// use updateend event if possible\\nif(typeof buffer.addEventListener==='function'){try{buffer.addEventListener('updateend',updateEndHandler,false);buffer.addEventListener('error',errHandler,false);buffer.addEventListener('abort',errHandler,false);}catch(err){// use setInterval to periodically check if updating has been completed\\nintervalId=setInterval(checkIsUpdateEnded,CHECK_INTERVAL);}}else{// use setInterval to periodically check if updating has been completed\\nintervalId=setInterval(checkIsUpdateEnded,CHECK_INTERVAL);}}catch(ex){// Note that in the following, the quotes are open to allow for extra text after stpp and wvtt\\nif(mediaInfo.isText||codec.indexOf('codecs=\\\"stpp')!==-1||codec.indexOf('codecs=\\\"wvtt')!==-1){var textController=(0,_TextController2.default)(context).getInstance();buffer=textController.getTextSourceBuffer();}else{throw ex;}}}function getType(){return type;}function reset(keepBuffer){if(buffer){if(typeof buffer.removeEventListener==='function'){buffer.removeEventListener('updateend',updateEndHandler,false);buffer.removeEventListener('error',errHandler,false);buffer.removeEventListener('abort',errHandler,false);}clearInterval(intervalId);callbacks=[];if(!keepBuffer){try{if(!buffer.getClassName||buffer.getClassName()!=='TextSourceBuffer'){logger.debug('Removing sourcebuffer from media source');mediaSource.removeSourceBuffer(buffer);}}catch(e){logger.error('Failed to remove source buffer from media source.');}buffer=null;}isAppendingInProgress=false;}appendQueue=[];onAppended=null;}function getBuffer(){return buffer;}function getAllBufferRanges(){try{return buffer.buffered;}catch(e){logger.error('getAllBufferRanges exception: '+e.message);return null;}}function hasDiscontinuitiesAfter(time){try{var ranges=getAllBufferRanges();if(ranges&&ranges.length>1){for(var i=0,len=ranges.length;i<len;i++){if(i>0){if(time<ranges.start(i)&&ranges.start(i)>ranges.end(i-1)+MAX_ALLOWED_DISCONTINUITY){return true;}}}}}catch(e){logger.error('hasDiscontinuities exception: '+e.message);}return false;}function append(chunk){if(!chunk){onAppended({chunk:chunk,error:new _DashJSError2.default(_Errors2.default.APPEND_ERROR_CODE,_Errors2.default.APPEND_ERROR_MESSAGE)});return;}appendQueue.push(chunk);if(!isAppendingInProgress){waitForUpdateEnd(appendNextInQueue.bind(this));}}function updateTimestampOffset(MSETimeOffset){if(buffer.timestampOffset!==MSETimeOffset&&!isNaN(MSETimeOffset)){waitForUpdateEnd(function(){if(MSETimeOffset<0){MSETimeOffset+=0.001;}buffer.timestampOffset=MSETimeOffset;});}}function updateAppendWindow(sInfo){if(!buffer){return;}waitForUpdateEnd(function(){try{var appendWindowEnd=mediaSource.duration;var appendWindowStart=0;if(sInfo&&!isNaN(sInfo.start)&&!isNaN(sInfo.duration)&&isFinite(sInfo.duration)){appendWindowEnd=sInfo.start+sInfo.duration;}if(sInfo&&!isNaN(sInfo.start)){appendWindowStart=sInfo.start;}buffer.appendWindowStart=0;buffer.appendWindowEnd=appendWindowEnd;buffer.appendWindowStart=appendWindowStart;logger.debug('Updated append window. Set start to '+buffer.appendWindowStart+' and end to '+buffer.appendWindowEnd);}catch(e){logger.warn('Failed to set append window');}});}function remove(start,end,forceRemoval){var sourceBufferSink=this;// make sure that the given time range is correct. Otherwise we will get InvalidAccessError\\nwaitForUpdateEnd(function(){try{if(start>=0&&end>start&&(forceRemoval||mediaSource.readyState!=='ended')){buffer.remove(start,end);}// updating is in progress, we should wait for it to complete before signaling that this operation is done\\nwaitForUpdateEnd(function(){eventBus.trigger(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:sourceBufferSink,from:start,to:end,unintended:false});});}catch(err){eventBus.trigger(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:sourceBufferSink,from:start,to:end,unintended:false,error:new _DashJSError2.default(err.code,err.message)});}});}function appendNextInQueue(){var sourceBufferSink=this;if(appendQueue.length>0){isAppendingInProgress=true;var nextChunk=appendQueue[0];appendQueue.splice(0,1);var oldRanges=[];var afterSuccess=function afterSuccess(){// Safari sometimes drops a portion of a buffer after appending. Handle these situations here\\nvar newRanges=getAllBufferRanges();checkBufferGapsAfterAppend(sourceBufferSink,oldRanges,newRanges,nextChunk);if(appendQueue.length>0){appendNextInQueue.call(this);}else{isAppendingInProgress=false;if(onAppended){onAppended({chunk:nextChunk});}}};try{if(nextChunk.bytes.length===0){afterSuccess.call(this);}else{oldRanges=getAllBufferRanges();if(buffer.appendBuffer){buffer.appendBuffer(nextChunk.bytes);}else{buffer.append(nextChunk.bytes,nextChunk);}// updating is in progress, we should wait for it to complete before signaling that this operation is done\\nwaitForUpdateEnd(afterSuccess.bind(this));}}catch(err){logger.fatal('SourceBuffer append failed \\\"'+err+'\\\"');if(appendQueue.length>0){appendNextInQueue();}else{isAppendingInProgress=false;}if(onAppended){onAppended({chunk:nextChunk,error:new _DashJSError2.default(err.code,err.message)});}}}}function checkBufferGapsAfterAppend(buffer,oldRanges,newRanges,chunk){if(oldRanges&&oldRanges.length>0&&oldRanges.length<newRanges.length&&isChunkAlignedWithRange(oldRanges,chunk)){// A split in the range was created while appending\\neventBus.trigger(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:buffer,from:newRanges.end(newRanges.length-2),to:newRanges.start(newRanges.length-1),unintended:true});}}function isChunkAlignedWithRange(oldRanges,chunk){for(var i=0;i<oldRanges.length;i++){var start=Math.round(oldRanges.start(i));var end=Math.round(oldRanges.end(i));if(end===chunk.start||start===chunk.end||chunk.start>=start&&chunk.end<=end){return true;}}return false;}function abort(){try{if(mediaSource.readyState==='open'){buffer.abort();}else if(buffer.setTextTrack&&mediaSource.readyState==='ended'){buffer.abort();//The cues need to be removed from the TextSourceBuffer via a call to abort()\\n}}catch(ex){logger.error('SourceBuffer append abort failed: \\\"'+ex+'\\\"');}appendQueue=[];}function executeCallback(){if(callbacks.length>0){var cb=callbacks.shift();if(buffer.updating){waitForUpdateEnd(cb);}else{cb();// Try to execute next callback if still not updating\\nexecuteCallback();}}}function checkIsUpdateEnded(){// if updating is still in progress do nothing and wait for the next check again.\\nif(buffer.updating)return;// updating is completed, now we can stop checking and resolve the promise\\nexecuteCallback();}function updateEndHandler(){if(buffer.updating)return;executeCallback();}function errHandler(){logger.error('SourceBufferSink error');}function waitForUpdateEnd(callback){callbacks.push(callback);if(!buffer.updating){executeCallback();}}instance={getType:getType,getAllBufferRanges:getAllBufferRanges,getBuffer:getBuffer,append:append,remove:remove,abort:abort,reset:reset,updateTimestampOffset:updateTimestampOffset,hasDiscontinuitiesAfter:hasDiscontinuitiesAfter,waitForUpdateEnd:waitForUpdateEnd,updateAppendWindow:updateAppendWindow};setup();return instance;}SourceBufferSink.__dashjs_factory_name='SourceBufferSink';var factory=_FactoryMaker2.default.getClassFactory(SourceBufferSink);exports.default=factory;\\n//# sourceMappingURL=SourceBufferSink.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/Stream.js\":\n/*!****************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/Stream.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _StreamProcessor=__webpack_require__(/*! ./StreamProcessor */ \\\"../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js\\\");var _StreamProcessor2=_interopRequireDefault(_StreamProcessor);var _FragmentController=__webpack_require__(/*! ./controllers/FragmentController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js\\\");var _FragmentController2=_interopRequireDefault(_FragmentController);var _ThumbnailController=__webpack_require__(/*! ./thumbnail/ThumbnailController */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js\\\");var _ThumbnailController2=_interopRequireDefault(_ThumbnailController);var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _BoxParser=__webpack_require__(/*! ./utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _URLUtils=__webpack_require__(/*! ./utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Stream(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var manifestModel=config.manifestModel;var mediaPlayerModel=config.mediaPlayerModel;var manifestUpdater=config.manifestUpdater;var adapter=config.adapter;var capabilities=config.capabilities;var capabilitiesFilter=config.capabilitiesFilter;var errHandler=config.errHandler;var timelineConverter=config.timelineConverter;var dashMetrics=config.dashMetrics;var abrController=config.abrController;var playbackController=config.playbackController;var eventController=config.eventController;var mediaController=config.mediaController;var textController=config.textController;var protectionController=config.protectionController;var videoModel=config.videoModel;var settings=config.settings;var streamInfo=config.streamInfo;var instance=void 0,logger=void 0,streamProcessors=void 0,isStreamInitialized=void 0,isStreamActivated=void 0,isMediaInitialized=void 0,hasVideoTrack=void 0,hasAudioTrack=void 0,updateError=void 0,isUpdating=void 0,fragmentController=void 0,thumbnailController=void 0,preloaded=void 0,boxParser=void 0,preloadingScheduled=void 0,debug=void 0,isEndedEventSignaled=void 0,trackChangedEvent=void 0;function setup(){debug=(0,_Debug2.default)(context).getInstance();logger=debug.getLogger(instance);resetInitialSettings();boxParser=(0,_BoxParser2.default)(context).getInstance();fragmentController=(0,_FragmentController2.default)(context).create({streamInfo:streamInfo,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,errHandler:errHandler,settings:settings,boxParser:boxParser,dashConstants:_DashConstants2.default,urlUtils:urlUtils});}function initialize(){registerEvents();registerProtectionEvents();eventBus.trigger(_Events2.default.STREAM_UPDATED,{streamInfo:streamInfo});}function registerEvents(){eventBus.on(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,instance);eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.on(_Events2.default.INBAND_EVENTS,onInbandEvents,instance);}function unRegisterEvents(){eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.off(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,instance);eventBus.off(_Events2.default.INBAND_EVENTS,onInbandEvents,instance);}function registerProtectionEvents(){if(protectionController){eventBus.on(_Events2.default.KEY_ERROR,onProtectionError,instance);eventBus.on(_Events2.default.SERVER_CERTIFICATE_UPDATED,onProtectionError,instance);eventBus.on(_Events2.default.LICENSE_REQUEST_COMPLETE,onProtectionError,instance);eventBus.on(_Events2.default.KEY_SYSTEM_SELECTED,onProtectionError,instance);eventBus.on(_Events2.default.KEY_SESSION_CREATED,onProtectionError,instance);eventBus.on(_Events2.default.KEY_STATUSES_CHANGED,onProtectionError,instance);}}function unRegisterProtectionEvents(){if(protectionController){eventBus.off(_Events2.default.KEY_ERROR,onProtectionError,instance);eventBus.off(_Events2.default.SERVER_CERTIFICATE_UPDATED,onProtectionError,instance);eventBus.off(_Events2.default.LICENSE_REQUEST_COMPLETE,onProtectionError,instance);eventBus.off(_Events2.default.KEY_SYSTEM_SELECTED,onProtectionError,instance);eventBus.off(_Events2.default.KEY_SESSION_CREATED,onProtectionError,instance);eventBus.off(_Events2.default.KEY_STATUSES_CHANGED,onProtectionError,instance);}}function getStreamId(){return streamInfo?streamInfo.id:null;}/**\\n     * Activates Stream by re-initializing some of its components\\n     * @param {MediaSource} mediaSource\\n     * @memberof Stream#\\n     * @param {SourceBuffer} previousBuffers\\n     */function activate(mediaSource,previousBuffers){if(!isStreamActivated){var result=void 0;eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);if(!getPreloaded()){result=initializeMedia(mediaSource,previousBuffers);}else{initializeAfterPreload();result=previousBuffers;}isStreamActivated=true;return result;}return previousBuffers;}/**\\n     * Partially resets some of the Stream elements\\n     * @memberof Stream#\\n     * @param {boolean} keepBuffers\\n     */function deactivate(keepBuffers){var ln=streamProcessors?streamProcessors.length:0;var errored=false;for(var i=0;i<ln;i++){var fragmentModel=streamProcessors[i].getFragmentModel();fragmentModel.removeExecutedRequestsBeforeTime(getStartTime()+getDuration());streamProcessors[i].reset(errored,keepBuffers);}streamProcessors=[];isStreamActivated=false;isMediaInitialized=false;setPreloaded(false);eventBus.off(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);}function isActive(){return isStreamActivated;}function setMediaSource(mediaSource){for(var i=0;i<streamProcessors.length;){if(isMediaSupported(streamProcessors[i].getMediaInfo())){streamProcessors[i].setMediaSource(mediaSource);i++;}else{streamProcessors[i].reset();streamProcessors.splice(i,1);}}for(var _i=0;_i<streamProcessors.length;_i++){//Adding of new tracks to a stream processor isn't guaranteed by the spec after the METADATA_LOADED state\\n//so do this after the buffers are created above.\\nstreamProcessors[_i].dischargePreBuffer();}if(streamProcessors.length===0){var msg='No streams to play.';errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,msg+'nostreams',manifestModel.getValue()));logger.fatal(msg);}}function resetInitialSettings(){deactivate();isStreamInitialized=false;hasVideoTrack=false;hasAudioTrack=false;updateError={};isUpdating=false;preloadingScheduled=false;isEndedEventSignaled=false;}function reset(){if(playbackController){playbackController.pause();}if(fragmentController){fragmentController.reset();fragmentController=null;}streamInfo=null;resetInitialSettings();unRegisterEvents();unRegisterProtectionEvents();setPreloaded(false);}function getDuration(){return streamInfo?streamInfo.duration:NaN;}function getIsEndedEventSignaled(){return isEndedEventSignaled;}function setIsEndedEventSignaled(value){isEndedEventSignaled=value;}function getStartTime(){return streamInfo?streamInfo.start:NaN;}function getPreloadingScheduled(){return preloadingScheduled;}function setPreloadingScheduled(value){preloadingScheduled=value;}function getLiveStartTime(){if(!streamInfo.manifestInfo.isDynamic)return NaN;// Get live start time of the video stream (1st in array of streams)\\n// or audio if no video stream\\nfor(var i=0;i<streamProcessors.length;i++){if(streamProcessors[i].getType()===_Constants2.default.AUDIO||streamProcessors[i].getType()===_Constants2.default.VIDEO){return streamProcessors[i].getLiveStartTime();}}return NaN;}function getId(){return streamInfo?streamInfo.id:null;}function getStreamInfo(){return streamInfo;}function getHasAudioTrack(){return hasAudioTrack;}function getHasVideoTrack(){return hasVideoTrack;}function getThumbnailController(){return thumbnailController;}function checkConfig(){if(!videoModel||!abrController||!abrController.hasOwnProperty('getBitrateList')||!adapter||!adapter.hasOwnProperty('getAllMediaInfoForType')||!adapter.hasOwnProperty('getEventsFor')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}/**\\n     * @param {string} type\\n     * @returns {Array}\\n     * @memberof Stream#\\n     */function getBitrateListFor(type){checkConfig();if(type===_Constants2.default.IMAGE){if(!thumbnailController){return[];}return thumbnailController.getBitrateList();}var mediaInfo=getMediaInfo(type);return abrController.getBitrateList(mediaInfo);}function onProtectionError(event){if(event.error){errHandler.error(event.error);logger.fatal(event.error.message);reset();}}function isMediaSupported(mediaInfo){var type=mediaInfo?mediaInfo.type:null;var codec=void 0,msg=void 0;if(type===_Constants2.default.MUXED){msg='Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines';logger.fatal(msg);errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,msg,manifestModel.getValue()));return false;}if(type===_Constants2.default.TEXT||type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.EMBEDDED_TEXT||type===_Constants2.default.IMAGE){return true;}codec=mediaInfo.codec;logger.debug(type+' codec: '+codec);if(!!mediaInfo.contentProtection&&!capabilities.supportsEncryptedMedia()){errHandler.error(new _DashJSError2.default(_Errors2.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,_Errors2.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));}else if(!capabilities.supportsCodec(codec)){msg=type+'Codec ('+codec+') is not supported.';logger.error(msg);return false;}return true;}function onCurrentTrackChanged(e){if(!streamInfo||e.newMediaInfo.streamInfo.id!==streamInfo.id)return;var mediaInfo=e.newMediaInfo;var manifest=manifestModel.getValue();adapter.setCurrentMediaInfo(streamInfo.id,mediaInfo.type,mediaInfo);var processor=getProcessorForMediaInfo(mediaInfo);if(!processor)return;var currentTime=playbackController.getTime();logger.info('Stream -  Process track changed at current time '+currentTime);logger.debug('Stream -  Update stream controller');if(manifest.refreshManifestOnSwitchTrack){// Applies only for MSS streams\\nlogger.debug('Stream -  Refreshing manifest for switch track');trackChangedEvent=e;manifestUpdater.refreshManifest();}else{processor.selectMediaInfo(mediaInfo);if(mediaInfo.type!==_Constants2.default.FRAGMENTED_TEXT){abrController.updateTopQualityIndex(mediaInfo);processor.switchTrackAsked();processor.getFragmentModel().abortRequests();}else{processor.getScheduleController().setSeekTarget(currentTime);processor.setBufferingTime(currentTime);processor.resetIndexHandler();}}}function createStreamProcessor(mediaInfo,allMediaForType,mediaSource,optionalSettings){var fragmentModel=fragmentController.getModel(mediaInfo?mediaInfo.type:null);var streamProcessor=(0,_StreamProcessor2.default)(context).create({streamInfo:streamInfo,type:mediaInfo?mediaInfo.type:null,mimeType:mediaInfo?mediaInfo.mimeType:null,timelineConverter:timelineConverter,adapter:adapter,manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,fragmentModel:fragmentModel,dashMetrics:config.dashMetrics,baseURLController:config.baseURLController,abrController:abrController,playbackController:playbackController,mediaController:mediaController,textController:textController,errHandler:errHandler,settings:settings,boxParser:boxParser});streamProcessor.initialize(mediaSource,hasVideoTrack);abrController.updateTopQualityIndex(mediaInfo);if(optionalSettings){streamProcessor.setBuffer(optionalSettings.buffer);streamProcessor.setBufferingTime(optionalSettings.currentTime);streamProcessors[optionalSettings.replaceIdx]=streamProcessor;}else{streamProcessors.push(streamProcessor);}if(optionalSettings&&optionalSettings.ignoreMediaInfo){return;}if(mediaInfo&&(mediaInfo.type===_Constants2.default.TEXT||mediaInfo.type===_Constants2.default.FRAGMENTED_TEXT)){var idx=void 0;for(var i=0;i<allMediaForType.length;i++){if(allMediaForType[i].index===mediaInfo.index){idx=i;}streamProcessor.addMediaInfo(allMediaForType[i]);//creates text tracks for all adaptations in one stream processor\\n}streamProcessor.selectMediaInfo(allMediaForType[idx]);//sets the initial media info\\n}else{streamProcessor.addMediaInfo(mediaInfo,true);}}function initializeMediaForType(type,mediaSource){var allMediaForType=adapter.getAllMediaInfoForType(streamInfo,type);var mediaInfo=null;var initialMediaInfo=void 0;if(!allMediaForType||allMediaForType.length===0){logger.info('No '+type+' data.');return;}if(type===_Constants2.default.VIDEO){hasVideoTrack=true;}if(type===_Constants2.default.AUDIO){hasAudioTrack=true;}for(var i=0,ln=allMediaForType.length;i<ln;i++){mediaInfo=allMediaForType[i];if(type===_Constants2.default.EMBEDDED_TEXT){textController.addEmbeddedTrack(mediaInfo);}else{if(!isMediaSupported(mediaInfo))continue;mediaController.addTrack(mediaInfo);}}if(type===_Constants2.default.EMBEDDED_TEXT||mediaController.getTracksFor(type,streamInfo).length===0){return;}if(type===_Constants2.default.IMAGE){thumbnailController=(0,_ThumbnailController2.default)(context).create({streamInfo:streamInfo,adapter:adapter,baseURLController:config.baseURLController,timelineConverter:config.timelineConverter,debug:debug,eventBus:eventBus,events:_Events2.default,dashConstants:_DashConstants2.default});return;}mediaController.checkInitialMediaSettingsForType(type,streamInfo);initialMediaInfo=mediaController.getCurrentTrackFor(type,streamInfo);eventBus.trigger(_Events2.default.STREAM_INITIALIZING,{streamInfo:streamInfo,mediaInfo:mediaInfo});// TODO : How to tell index handler live/duration?\\n// TODO : Pass to controller and then pass to each method on handler?\\ncreateStreamProcessor(initialMediaInfo,allMediaForType,mediaSource);}function addInlineEvents(){if(eventController){var events=adapter.getEventsFor(streamInfo);eventController.addInlineEvents(events);}}function addInbandEvents(events){if(eventController){eventController.addInbandEvents(events);}}function initializeMedia(mediaSource,previousBuffers){checkConfig();var element=videoModel.getElement();addInlineEvents();isUpdating=true;capabilitiesFilter.filterUnsupportedFeaturesOfPeriod(streamInfo);if(!element||element&&/^VIDEO$/i.test(element.nodeName)){initializeMediaForType(_Constants2.default.VIDEO,mediaSource);}initializeMediaForType(_Constants2.default.AUDIO,mediaSource);initializeMediaForType(_Constants2.default.TEXT,mediaSource);initializeMediaForType(_Constants2.default.FRAGMENTED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.EMBEDDED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.MUXED,mediaSource);initializeMediaForType(_Constants2.default.IMAGE,mediaSource);//TODO. Consider initialization of TextSourceBuffer here if embeddedText, but no sideloadedText.\\nvar buffers=createBuffers(previousBuffers);isMediaInitialized=true;isUpdating=false;if(streamProcessors.length===0){var msg='No streams to play.';errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,msg,manifestModel.getValue()));logger.fatal(msg);}else{checkIfInitializationCompleted();}return buffers;}function initializeAfterPreload(){isUpdating=true;checkConfig();capabilitiesFilter.filterUnsupportedFeaturesOfPeriod(streamInfo);isMediaInitialized=true;isUpdating=false;if(streamProcessors.length===0){var msg='No streams to play.';errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,msg,manifestModel.getValue()));logger.debug(msg);}else{checkIfInitializationCompleted();}}function checkIfInitializationCompleted(){var ln=streamProcessors.length;var hasError=!!updateError.audio||!!updateError.video;var error=hasError?new _DashJSError2.default(_Errors2.default.DATA_UPDATE_FAILED_ERROR_CODE,_Errors2.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null;for(var i=0;i<ln;i++){if(streamProcessors[i].isUpdating()||isUpdating){return;}}if(!isMediaInitialized){return;}if(protectionController){// Need to check if streamProcessors exists because streamProcessors\\n// could be cleared in case an error is detected while initializing DRM keysystem\\nprotectionController.clearMediaInfoArrayByStreamId(getId());for(var _i2=0;_i2<ln&&streamProcessors[_i2];_i2++){var type=streamProcessors[_i2].getType();if(type===_Constants2.default.AUDIO||type===_Constants2.default.VIDEO||type===_Constants2.default.FRAGMENTED_TEXT){var mediaInfo=streamProcessors[_i2].getMediaInfo();if(mediaInfo){protectionController.initializeForMedia(mediaInfo);}}}}if(error){errHandler.error(error);}else if(!isStreamInitialized){isStreamInitialized=true;eventBus.trigger(_Events2.default.STREAM_INITIALIZED,{streamInfo:streamInfo,liveStartTime:!preloaded?getLiveStartTime():NaN});}// (Re)start ScheduleController:\\n// - in case stream initialization has been completed after 'play' event (case for SegmentBase streams)\\n// - in case stream is complete but a track switch has been requested\\nfor(var _i3=0;_i3<ln&&streamProcessors[_i3];_i3++){streamProcessors[_i3].getScheduleController().start();}}function getMediaInfo(type){var streamProcessor=null;for(var i=0;i<streamProcessors.length;i++){streamProcessor=streamProcessors[i];if(streamProcessor.getType()===type){return streamProcessor.getMediaInfo();}}return null;}function createBuffers(previousBuffers){var buffers={};for(var i=0,ln=streamProcessors.length;i<ln;i++){var buffer=streamProcessors[i].createBuffer(previousBuffers);if(buffer){buffers[streamProcessors[i].getType()]=buffer.getBuffer();}}return buffers;}function onBufferingCompleted(){var processors=getProcessors();var ln=processors.length;if(ln===0){logger.warn('onBufferingCompleted - can\\\\'t trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined');return;}// if there is at least one buffer controller that has not completed buffering yet do nothing\\nfor(var i=0;i<ln;i++){//if audio or video buffer is not buffering completed state, do not send STREAM_BUFFERING_COMPLETED\\nif(!processors[i].isBufferingCompleted()&&(processors[i].getType()===_Constants2.default.AUDIO||processors[i].getType()===_Constants2.default.VIDEO)){logger.warn('onBufferingCompleted - One streamProcessor has finished but',processors[i].getType(),'one is not buffering completed');return;}}logger.debug('onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED');eventBus.trigger(_Events2.default.STREAM_BUFFERING_COMPLETED,{streamInfo:streamInfo});}function onDataUpdateCompleted(e){updateError[e.mediaType]=e.error;checkIfInitializationCompleted();}function onInbandEvents(e){addInbandEvents(e.events);}function getProcessorForMediaInfo(mediaInfo){if(!mediaInfo){return null;}var processors=getProcessors();return processors.filter(function(processor){return processor.getType()===mediaInfo.type;})[0];}function getProcessors(){var arr=[];var type=void 0,streamProcessor=void 0;for(var i=0;i<streamProcessors.length;i++){streamProcessor=streamProcessors[i];type=streamProcessor.getType();if(type===_Constants2.default.AUDIO||type===_Constants2.default.VIDEO||type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.TEXT){arr.push(streamProcessor);}}return arr;}function updateData(updatedStreamInfo){logger.info('Manifest updated... updating data system wide.');isStreamActivated=false;isUpdating=true;streamInfo=updatedStreamInfo;eventBus.trigger(_Events2.default.STREAM_UPDATED,{streamInfo:streamInfo});if(eventController){addInlineEvents();}capabilitiesFilter.filterUnsupportedFeaturesOfPeriod(streamInfo);for(var i=0,ln=streamProcessors.length;i<ln;i++){var streamProcessor=streamProcessors[i];streamProcessor.updateStreamInfo(streamInfo);var mediaInfo=adapter.getMediaInfoForType(streamInfo,streamProcessor.getType());// Check if AdaptationSet has not been removed in MPD update\\nif(mediaInfo){abrController.updateTopQualityIndex(mediaInfo);streamProcessor.addMediaInfo(mediaInfo,true);}}if(trackChangedEvent){var _mediaInfo=trackChangedEvent.newMediaInfo;if(_mediaInfo.type!==_Constants2.default.FRAGMENTED_TEXT){var processor=getProcessorForMediaInfo(trackChangedEvent.oldMediaInfo);if(!processor)return;processor.switchTrackAsked();trackChangedEvent=undefined;}}isUpdating=false;checkIfInitializationCompleted();}function isMediaCodecCompatible(newStream){var previousStream=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return compareCodecs(newStream,_Constants2.default.VIDEO,previousStream)&&compareCodecs(newStream,_Constants2.default.AUDIO,previousStream);}function isProtectionCompatible(stream){var previousStream=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return compareProtectionConfig(stream,_Constants2.default.VIDEO,previousStream)&&compareProtectionConfig(stream,_Constants2.default.AUDIO,previousStream);}function compareProtectionConfig(stream,type){var previousStream=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!stream){return false;}var newStreamInfo=stream.getStreamInfo();var currentStreamInfo=previousStream?previousStream.getStreamInfo():getStreamInfo();if(!newStreamInfo||!currentStreamInfo){return false;}var newAdaptation=adapter.getAdaptationForType(newStreamInfo.index,type,newStreamInfo);var currentAdaptation=adapter.getAdaptationForType(currentStreamInfo.index,type,currentStreamInfo);if(!newAdaptation||!currentAdaptation){// If there is no adaptation for neither the old or the new stream they're compatible\\nreturn!newAdaptation&&!currentAdaptation;}// If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers.\\nreturn!(!isAdaptationDrmProtected(currentAdaptation)&&isAdaptationDrmProtected(newAdaptation));}function isAdaptationDrmProtected(adaptation){if(!adaptation){// If there is no adaptation for neither the old or the new stream they're compatible\\nreturn false;}// If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers.\\nreturn!!(adaptation.ContentProtection||adaptation.Representation&&adaptation.Representation.length>0&&adaptation.Representation[0].ContentProtection);}function compareCodecs(newStream,type){var previousStream=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!newStream||!newStream.hasOwnProperty('getStreamInfo')){return false;}var newStreamInfo=newStream.getStreamInfo();var currentStreamInfo=previousStream?previousStream.getStreamInfo():getStreamInfo();if(!newStreamInfo||!currentStreamInfo){return false;}var newAdaptation=adapter.getAdaptationForType(newStreamInfo.index,type,newStreamInfo);var currentAdaptation=adapter.getAdaptationForType(currentStreamInfo.index,type,currentStreamInfo);if(!newAdaptation||!currentAdaptation){// If there is no adaptation for neither the old or the new stream they're compatible\\nreturn!newAdaptation&&!currentAdaptation;}var sameMimeType=newAdaptation&&currentAdaptation&&newAdaptation.mimeType===currentAdaptation.mimeType;var oldCodecs=currentAdaptation.Representation_asArray.map(function(representation){return representation.codecs;});var newCodecs=newAdaptation.Representation_asArray.map(function(representation){return representation.codecs;});var codecMatch=newCodecs.some(function(newCodec){return oldCodecs.indexOf(newCodec)>-1;});var partialCodecMatch=newCodecs.some(function(newCodec){return oldCodecs.some(function(oldCodec){return capabilities.codecRootCompatibleWithCodec(oldCodec,newCodec);});});return codecMatch||partialCodecMatch&&sameMimeType;}function setPreloaded(value){preloaded=value;}function getPreloaded(){return preloaded;}function preload(mediaSource,previousBuffers){if(!getPreloaded()){addInlineEvents();initializeMediaForType(_Constants2.default.VIDEO,mediaSource);initializeMediaForType(_Constants2.default.AUDIO,mediaSource);initializeMediaForType(_Constants2.default.TEXT,mediaSource);initializeMediaForType(_Constants2.default.FRAGMENTED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.EMBEDDED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.MUXED,mediaSource);initializeMediaForType(_Constants2.default.IMAGE,mediaSource);createBuffers(previousBuffers);eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);for(var i=0;i<streamProcessors.length&&streamProcessors[i];i++){streamProcessors[i].getScheduleController().start();}setPreloaded(true);}}instance={initialize:initialize,getStreamId:getStreamId,activate:activate,deactivate:deactivate,isActive:isActive,getDuration:getDuration,getStartTime:getStartTime,getId:getId,getStreamInfo:getStreamInfo,getHasAudioTrack:getHasAudioTrack,getHasVideoTrack:getHasVideoTrack,preload:preload,getThumbnailController:getThumbnailController,getBitrateListFor:getBitrateListFor,updateData:updateData,reset:reset,getProcessors:getProcessors,setMediaSource:setMediaSource,isMediaCodecCompatible:isMediaCodecCompatible,isProtectionCompatible:isProtectionCompatible,getPreloaded:getPreloaded,getPreloadingScheduled:getPreloadingScheduled,setPreloadingScheduled:setPreloadingScheduled,getIsEndedEventSignaled:getIsEndedEventSignaled,setIsEndedEventSignaled:setIsEndedEventSignaled};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */Stream.__dashjs_factory_name='Stream';exports.default=_FactoryMaker2.default.getClassFactory(Stream);\\n//# sourceMappingURL=Stream.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/Stream.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _MetricsConstants=__webpack_require__(/*! ./constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _FragmentModel=__webpack_require__(/*! ./models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _BufferController=__webpack_require__(/*! ./controllers/BufferController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js\\\");var _BufferController2=_interopRequireDefault(_BufferController);var _TextBufferController=__webpack_require__(/*! ./text/TextBufferController */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js\\\");var _TextBufferController2=_interopRequireDefault(_TextBufferController);var _ScheduleController=__webpack_require__(/*! ./controllers/ScheduleController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js\\\");var _ScheduleController2=_interopRequireDefault(_ScheduleController);var _RepresentationController=__webpack_require__(/*! ../dash/controllers/RepresentationController */ \\\"../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js\\\");var _RepresentationController2=_interopRequireDefault(_RepresentationController);var _LiveEdgeFinder=__webpack_require__(/*! ./utils/LiveEdgeFinder */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js\\\");var _LiveEdgeFinder2=_interopRequireDefault(_LiveEdgeFinder);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SupervisorTools=__webpack_require__(/*! ./utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _DashHandler=__webpack_require__(/*! ../dash/DashHandler */ \\\"../node_modules/dashjs/build/es5/src/dash/DashHandler.js\\\");var _DashHandler2=_interopRequireDefault(_DashHandler);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _RequestModifier=__webpack_require__(/*! ./utils/RequestModifier */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\\\");var _RequestModifier2=_interopRequireDefault(_RequestModifier);var _URLUtils=__webpack_require__(/*! ../streaming/utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _BoxParser=__webpack_require__(/*! ./utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _FragmentRequest=__webpack_require__(/*! ./vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _PlayList=__webpack_require__(/*! ./vo/metrics/PlayList */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function StreamProcessor(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var streamInfo=config.streamInfo;var type=config.type;var errHandler=config.errHandler;var mimeType=config.mimeType;var timelineConverter=config.timelineConverter;var adapter=config.adapter;var manifestModel=config.manifestModel;var mediaPlayerModel=config.mediaPlayerModel;var fragmentModel=config.fragmentModel;var abrController=config.abrController;var playbackController=config.playbackController;var mediaController=config.mediaController;var textController=config.textController;var dashMetrics=config.dashMetrics;var settings=config.settings;var boxParser=config.boxParser;var instance=void 0,logger=void 0,isDynamic=void 0,mediaInfo=void 0,mediaInfoArr=void 0,bufferController=void 0,scheduleController=void 0,representationController=void 0,liveEdgeFinder=void 0,indexHandler=void 0,bufferingTime=void 0,bufferPruned=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});// High priority to be notified before Stream\\neventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.on(_Events2.default.INIT_FRAGMENT_NEEDED,onInitFragmentNeeded,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_NEEDED,onMediaFragmentNeeded,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.on(_Events2.default.BUFFER_LEVEL_UPDATED,onBufferLevelUpdated,instance);eventBus.on(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,instance);eventBus.on(_Events2.default.BUFFER_CLEARED,onBufferCleared,instance);eventBus.on(_Events2.default.SEEK_TARGET,onSeekTarget,instance);}function initialize(mediaSource,hasVideoTrack){indexHandler=(0,_DashHandler2.default)(context).create({streamInfo:streamInfo,type:type,timelineConverter:timelineConverter,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,baseURLController:config.baseURLController,errHandler:errHandler,settings:settings,boxParser:boxParser,events:_Events2.default,eventBus:eventBus,errors:_Errors2.default,debug:(0,_Debug2.default)(context).getInstance(),requestModifier:(0,_RequestModifier2.default)(context).getInstance(),dashConstants:_DashConstants2.default,constants:_Constants2.default,urlUtils:(0,_URLUtils2.default)(context).getInstance()});// Create live edge finder for dynamic streams\\nisDynamic=streamInfo.manifestInfo.isDynamic;if(isDynamic){liveEdgeFinder=(0,_LiveEdgeFinder2.default)(context).create({timelineConverter:timelineConverter});}// Create/initialize controllers\\nindexHandler.initialize(isDynamic);abrController.registerStreamType(type,instance);representationController=(0,_RepresentationController2.default)(context).create({streamInfo:streamInfo,type:type,abrController:abrController,dashMetrics:dashMetrics,playbackController:playbackController,timelineConverter:timelineConverter,dashConstants:_DashConstants2.default,events:_Events2.default,eventBus:eventBus,errors:_Errors2.default});bufferController=createBufferControllerForType(type);if(bufferController){bufferController.initialize(mediaSource);}scheduleController=(0,_ScheduleController2.default)(context).create({streamInfo:streamInfo,type:type,mimeType:mimeType,adapter:adapter,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,fragmentModel:fragmentModel,abrController:abrController,playbackController:playbackController,textController:textController,mediaController:mediaController,bufferController:bufferController,settings:settings});scheduleController.initialize(hasVideoTrack);bufferingTime=0;bufferPruned=false;}function getStreamId(){return streamInfo.id;}function getType(){return type;}function resetInitialSettings(){mediaInfoArr=[];mediaInfo=null;bufferingTime=0;}function reset(errored,keepBuffers){if(indexHandler){indexHandler.reset();}if(bufferController){bufferController.reset(errored,keepBuffers);bufferController=null;}if(scheduleController){scheduleController.reset();scheduleController=null;}if(representationController){representationController.reset();representationController=null;}if(liveEdgeFinder){liveEdgeFinder.reset();liveEdgeFinder=null;}if(abrController&&!keepBuffers){abrController.unRegisterStreamType(type);}eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.off(_Events2.default.INIT_FRAGMENT_NEEDED,onInitFragmentNeeded,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_NEEDED,onMediaFragmentNeeded,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.off(_Events2.default.BUFFER_LEVEL_UPDATED,onBufferLevelUpdated,instance);eventBus.off(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,instance);eventBus.off(_Events2.default.BUFFER_CLEARED,onBufferCleared,instance);eventBus.off(_Events2.default.SEEK_TARGET,onSeekTarget,instance);resetInitialSettings();type=null;streamInfo=null;}function isUpdating(){return representationController?representationController.isUpdating():false;}function onDataUpdateCompleted(e){if(!e.error){// Update representation if no error\\nscheduleController.setCurrentRepresentation(adapter.convertDataToRepresentationInfo(e.currentRepresentation));}if(!e.error||e.error.code===_Errors2.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE){// Update has been postponed, update nevertheless DVR info\\nvar activeStreamId=playbackController.getStreamController().getActiveStreamInfo().id;if(activeStreamId===streamInfo.id){addDVRMetric();}}}function onQualityChanged(e){var representationInfo=getRepresentationInfo(e.newQuality);scheduleController.setCurrentRepresentation(representationInfo);dashMetrics.pushPlayListTraceMetrics(new Date(),_PlayList.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON);dashMetrics.createPlaylistTraceMetrics(representationInfo.id,playbackController.getTime()*1000,playbackController.getPlaybackRate());}function onBufferLevelUpdated(e){dashMetrics.addBufferLevel(type,new Date(),e.bufferLevel*1000);var activeStreamId=playbackController.getStreamController().getActiveStreamInfo().id;if(!manifestModel.getValue().doNotUpdateDVRWindowOnBufferUpdated&&streamInfo.id===activeStreamId){addDVRMetric();}}function onBufferLevelStateChanged(e){dashMetrics.addBufferState(type,e.state,scheduleController.getBufferTarget());if(e.state===_MetricsConstants2.default.BUFFER_EMPTY&&!playbackController.isSeeking()){// logger.info('Buffer is empty! Stalling!');\\ndashMetrics.pushPlayListTraceMetrics(new Date(),_PlayList.PlayListTrace.REBUFFERING_REASON);}}function onBufferCleared(e){// Remove executed requests not buffered anymore\\nfragmentModel.syncExecutedRequestsWithBufferedRange(bufferController.getBuffer().getAllBufferRanges(),streamInfo.duration);// If buffer removed ahead current time (QuotaExceededError or automatic buffer pruning) then adjust current index handler time\\nif(e.from>playbackController.getTime()){bufferingTime=e.from;bufferPruned=true;}}function addDVRMetric(){var manifestInfo=streamInfo.manifestInfo;var isDynamic=manifestInfo.isDynamic;var range=timelineConverter.calcSegmentAvailabilityRange(representationController.getCurrentRepresentation(),isDynamic);dashMetrics.addDVRInfo(getType(),playbackController.getTime(),manifestInfo,range);}function getRepresentationController(){return representationController;}function getBuffer(){return bufferController?bufferController.getBuffer():null;}function setBuffer(buffer){bufferController.setBuffer(buffer);}function getBufferController(){return bufferController;}function getFragmentModel(){return fragmentModel;}function updateStreamInfo(newStreamInfo){streamInfo=newStreamInfo;if(settings.get().streaming.useAppendWindow){bufferController.updateAppendWindow();}}function getStreamInfo(){return streamInfo;}function selectMediaInfo(newMediaInfo){if(newMediaInfo!==mediaInfo&&(!newMediaInfo||!mediaInfo||newMediaInfo.type===mediaInfo.type)){mediaInfo=newMediaInfo;}var newRealAdaptation=adapter.getRealAdaptation(streamInfo,mediaInfo);var voRepresentations=adapter.getVoRepresentations(mediaInfo);if(representationController){var realAdaptation=representationController.getData();var maxQuality=abrController.getTopQualityIndexFor(type,streamInfo.id);var minIdx=abrController.getMinAllowedIndexFor(type);var quality=void 0,averageThroughput=void 0;var bitrate=null;if((realAdaptation===null||realAdaptation.id!=newRealAdaptation.id)&&type!==_Constants2.default.FRAGMENTED_TEXT){averageThroughput=abrController.getThroughputHistory().getAverageThroughput(type);bitrate=averageThroughput||abrController.getInitialBitrateFor(type);quality=abrController.getQualityForBitrate(mediaInfo,bitrate);}else{quality=abrController.getQualityFor(type);}if(minIdx!==undefined&&quality<minIdx){quality=minIdx;}if(quality>maxQuality){quality=maxQuality;}indexHandler.setMimeType(mediaInfo?mediaInfo.mimeType:null);representationController.updateData(newRealAdaptation,voRepresentations,type,quality);}}function addMediaInfo(newMediaInfo,selectNewMediaInfo){if(mediaInfoArr.indexOf(newMediaInfo)===-1){mediaInfoArr.push(newMediaInfo);}if(selectNewMediaInfo){this.selectMediaInfo(newMediaInfo);}}function getMediaInfoArr(){return mediaInfoArr;}function getMediaInfo(){return mediaInfo;}function getMediaSource(){return bufferController.getMediaSource();}function setMediaSource(mediaSource){bufferController.setMediaSource(mediaSource,getMediaInfoArr());}function dischargePreBuffer(){bufferController.dischargePreBuffer();}function getScheduleController(){return scheduleController;}/**\\n     * Get a specific voRepresentation. If quality parameter is defined, this function will return the voRepresentation for this quality.\\n     * Otherwise, this function will return the current voRepresentation used by the representationController.\\n     * @param {number} quality - quality index of the voRepresentaion expected.\\n     */function getRepresentationInfo(quality){var voRepresentation=void 0;if(quality!==undefined){(0,_SupervisorTools.checkInteger)(quality);voRepresentation=representationController?representationController.getRepresentationForQuality(quality):null;}else{voRepresentation=representationController?representationController.getCurrentRepresentation():null;}return adapter.convertDataToRepresentationInfo(voRepresentation);}function isBufferingCompleted(){return bufferController?bufferController.getIsBufferingCompleted():false;}function getBufferLevel(){return bufferController?bufferController.getBufferLevel():0;}function onInitFragmentNeeded(e){// Event propagation may have been stopped (see MssHandler)\\nif(!e.sender)return;if(adapter.getIsTextTrack(mimeType)&&!textController.isTextEnabled())return;if(bufferController&&e.representationId){if(!bufferController.appendInitSegment(e.representationId)){// Init segment not in cache, send new request\\nvar request=indexHandler?indexHandler.getInitRequest(getMediaInfo(),representationController.getCurrentRepresentation()):null;scheduleController.processInitRequest(request);}}}function onMediaFragmentNeeded(e){var request=void 0;// Don't schedule next fragments while pruning to avoid buffer inconsistencies\\nif(!bufferController.getIsPruningInProgress()){request=findNextRequest(e.seekTarget,e.replacement);if(request){scheduleController.setSeekTarget(NaN);if(!e.replacement){if(!isNaN(request.startTime+request.duration)){bufferingTime=request.startTime+request.duration;}request.delayLoadingTime=new Date().getTime()+scheduleController.getTimeToLoadDelay();scheduleController.setTimeToLoadDelay(0);}}}scheduleController.processMediaRequest(request);}/**\\n     * Probe the next request. This is used in the CMCD model to get information about the upcoming request. Note: No actual request is performed here.\\n     * @return {FragmentRequest|null}\\n     */function probeNextRequest(){var representationInfo=getRepresentationInfo();var representation=representationController&&representationInfo?representationController.getRepresentationForQuality(representationInfo.quality):null;var request=indexHandler.getNextSegmentRequestIdempotent(getMediaInfo(),representation);return request;}function findNextRequest(seekTarget,requestToReplace){var representationInfo=getRepresentationInfo();var hasSeekTarget=!isNaN(seekTarget);var currentTime=playbackController.getNormalizedTime();var time=hasSeekTarget?seekTarget:bufferingTime;var bufferIsDivided=false;var request=void 0;if(isNaN(time)||getType()===_Constants2.default.FRAGMENTED_TEXT&&!textController.isTextEnabled()){return null;}/**\\n         * This is critical for IE/Safari/EDGE\\n         * */if(bufferController){var range=bufferController.getRangeAt(time);var playingRange=bufferController.getRangeAt(currentTime);if((range!==null||playingRange!==null)&&!hasSeekTarget){if(!range||playingRange&&playingRange.start!=range.start&&playingRange.end!=range.end){var hasDiscontinuities=bufferController.getBuffer().hasDiscontinuitiesAfter(currentTime);if(hasDiscontinuities&&getType()!==_Constants2.default.FRAGMENTED_TEXT){fragmentModel.removeExecutedRequestsAfterTime(playingRange.end);bufferIsDivided=true;}}}}if(requestToReplace){time=requestToReplace.startTime+requestToReplace.duration/2;request=getFragmentRequest(representationInfo,time,{timeThreshold:0,ignoreIsFinished:true});}else{// Use time just whenever is strictly needed\\nvar useTime=hasSeekTarget||bufferPruned||bufferIsDivided;request=getFragmentRequest(representationInfo,useTime?time:undefined,{keepIdx:!useTime});bufferPruned=false;// Then, check if this request was downloaded or not\\nwhile(request&&request.action!==_FragmentRequest2.default.ACTION_COMPLETE&&fragmentModel.isFragmentLoaded(request)){// loop until we found not loaded fragment, or no fragment\\nrequest=getFragmentRequest(representationInfo);}}return request;}function onMediaFragmentLoaded(e){var chunk=e.chunk;var bytes=chunk.bytes;var quality=chunk.quality;var currentRepresentation=getRepresentationInfo(quality);var voRepresentation=representationController&&currentRepresentation?representationController.getRepresentationForQuality(currentRepresentation.quality):null;var eventStreamMedia=adapter.getEventsFor(currentRepresentation.mediaInfo);var eventStreamTrack=adapter.getEventsFor(currentRepresentation,voRepresentation);if(eventStreamMedia&&eventStreamMedia.length>0||eventStreamTrack&&eventStreamTrack.length>0){var request=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,quality:quality,index:chunk.index})[0];var events=handleInbandEvents(bytes,request,eventStreamMedia,eventStreamTrack);eventBus.trigger(_Events2.default.INBAND_EVENTS,{events:events},{streamId:streamInfo.id});}}function handleInbandEvents(data,request,mediaInbandEvents,trackInbandEvents){try{var eventStreams={};var events=[];/* Extract the possible schemeIdUri : If a DASH client detects an event message box with a scheme that is not defined in MPD, the client is expected to ignore it */var inbandEvents=mediaInbandEvents.concat(trackInbandEvents);for(var i=0,ln=inbandEvents.length;i<ln;i++){eventStreams[inbandEvents[i].schemeIdUri+'/'+inbandEvents[i].value]=inbandEvents[i];}var isoFile=(0,_BoxParser2.default)(context).getInstance().parse(data);var eventBoxes=isoFile.getBoxes('emsg');if(!eventBoxes||eventBoxes.length===0){return events;}var sidx=isoFile.getBox('sidx');var mediaAnchorTime=sidx&&!isNaN(sidx.earliest_presentation_time)&&!isNaN(sidx.timescale)?sidx.earliest_presentation_time/sidx.timescale:request&&!isNaN(request.mediaStartTime)?request.mediaStartTime:0;var fragmentMediaStartTime=Math.max(mediaAnchorTime,0);var voRepresentation=representationController.getCurrentRepresentation();for(var _i=0,_ln=eventBoxes.length;_i<_ln;_i++){var event=adapter.getEvent(eventBoxes[_i],eventStreams,fragmentMediaStartTime,voRepresentation);if(event){events.push(event);}}return events;}catch(e){return[];}}function createBuffer(previousBuffers){return getBuffer()||bufferController?bufferController.createBuffer(mediaInfoArr,previousBuffers):null;}function switchTrackAsked(){scheduleController.switchTrackAsked();}function createBufferControllerForType(type){var controller=null;if(!type){errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+'not properly defined'));return null;}if(type===_Constants2.default.VIDEO||type===_Constants2.default.AUDIO){controller=(0,_BufferController2.default)(context).create({streamInfo:streamInfo,type:type,mediaPlayerModel:mediaPlayerModel,manifestModel:manifestModel,fragmentModel:fragmentModel,errHandler:errHandler,mediaController:mediaController,representationController:representationController,adapter:adapter,textController:textController,abrController:abrController,playbackController:playbackController,settings:settings});}else{controller=(0,_TextBufferController2.default)(context).create({streamInfo:streamInfo,type:type,mimeType:mimeType,mediaPlayerModel:mediaPlayerModel,manifestModel:manifestModel,fragmentModel:fragmentModel,errHandler:errHandler,mediaController:mediaController,representationController:representationController,adapter:adapter,textController:textController,abrController:abrController,playbackController:playbackController,settings:settings});}return controller;}function getLiveStartTime(){if(!isDynamic)return NaN;if(!liveEdgeFinder)return NaN;var liveStartTime=NaN;var currentRepresentationInfo=getRepresentationInfo();var liveEdge=liveEdgeFinder.getLiveEdge(currentRepresentationInfo);if(isNaN(liveEdge)){return NaN;}var request=findRequestForLiveEdge(liveEdge,currentRepresentationInfo);if(request){// When low latency mode is selected but browser doesn't support fetch\\n// start at the beginning of the segment to avoid consuming the whole buffer\\nif(settings.get().streaming.lowLatencyEnabled){liveStartTime=request.duration<mediaPlayerModel.getLiveDelay()?request.startTime:request.startTime+request.duration-mediaPlayerModel.getLiveDelay();}else{liveStartTime=request.startTime;}}return liveStartTime;}function findRequestForLiveEdge(liveEdge,currentRepresentationInfo){try{var request=null;var liveDelay=playbackController.getLiveDelay();var dvrWindowSize=!isNaN(streamInfo.manifestInfo.DVRWindowSize)?streamInfo.manifestInfo.DVRWindowSize:liveDelay;var dvrWindowSafetyMargin=0.1*dvrWindowSize;var startTime=void 0;// Make sure that we have at least a valid request for the end of the DVR window, otherwise we might try forever\\nif(!isFinite(dvrWindowSize)||getFragmentRequest(currentRepresentationInfo,liveEdge-dvrWindowSize+dvrWindowSafetyMargin,{ignoreIsFinished:true})){// Try to find a request as close as possible to the targeted live edge\\nwhile(!request&&liveDelay<=dvrWindowSize){startTime=liveEdge-liveDelay;request=getFragmentRequest(currentRepresentationInfo,startTime,{ignoreIsFinished:true});if(!request){liveDelay+=1;// Increase by one second for each iteration\\n}}}if(request){playbackController.setLiveDelay(liveDelay,true);}logger.debug('live edge: '+liveEdge+', live delay: '+liveDelay+', live target: '+startTime);return request;}catch(e){return null;}}function onSeekTarget(e){bufferingTime=e.time;scheduleController.setSeekTarget(e.time);}function setBufferingTime(value){bufferingTime=value;}function resetIndexHandler(){if(indexHandler){indexHandler.resetIndex();}}function getInitRequest(quality){(0,_SupervisorTools.checkInteger)(quality);var representation=representationController?representationController.getRepresentationForQuality(quality):null;return indexHandler?indexHandler.getInitRequest(getMediaInfo(),representation):null;}function getFragmentRequest(representationInfo,time,options){var fragRequest=null;if(indexHandler){var representation=representationController&&representationInfo?representationController.getRepresentationForQuality(representationInfo.quality):null;// if time and options are undefined, it means the next segment is requested\\n// otherwise, the segment at this specific time is requested.\\nif(time!==undefined&&options!==undefined){fragRequest=indexHandler.getSegmentRequestForTime(getMediaInfo(),representation,time,options);}else{fragRequest=indexHandler.getNextSegmentRequest(getMediaInfo(),representation);}}return fragRequest;}function finalisePlayList(time,reason){dashMetrics.pushPlayListTraceMetrics(time,reason);}instance={initialize:initialize,getStreamId:getStreamId,getType:getType,isUpdating:isUpdating,getBufferController:getBufferController,getFragmentModel:getFragmentModel,getScheduleController:getScheduleController,getRepresentationController:getRepresentationController,getRepresentationInfo:getRepresentationInfo,getBufferLevel:getBufferLevel,isBufferingCompleted:isBufferingCompleted,createBuffer:createBuffer,updateStreamInfo:updateStreamInfo,getStreamInfo:getStreamInfo,selectMediaInfo:selectMediaInfo,addMediaInfo:addMediaInfo,getLiveStartTime:getLiveStartTime,switchTrackAsked:switchTrackAsked,getMediaInfoArr:getMediaInfoArr,getMediaInfo:getMediaInfo,getMediaSource:getMediaSource,setMediaSource:setMediaSource,dischargePreBuffer:dischargePreBuffer,getBuffer:getBuffer,setBuffer:setBuffer,setBufferingTime:setBufferingTime,resetIndexHandler:resetIndexHandler,getInitRequest:getInitRequest,getFragmentRequest:getFragmentRequest,finalisePlayList:finalisePlayList,probeNextRequest:probeNextRequest,reset:reset};setup();return instance;}StreamProcessor.__dashjs_factory_name='StreamProcessor';exports.default=_FactoryMaker2.default.getClassFactory(StreamProcessor);\\n//# sourceMappingURL=StreamProcessor.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js\":\n/*!*********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js ***!\n  \\*********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _URLLoader=__webpack_require__(/*! ./net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _HTTPRequest=__webpack_require__(/*! ./vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _TextRequest=__webpack_require__(/*! ./vo/TextRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js\\\");var _TextRequest2=_interopRequireDefault(_TextRequest);var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function XlinkLoader(config){config=config||{};var RESOLVE_TO_ZERO='urn:mpeg:dash:resolve-to-zero:2013';var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlLoader=(0,_URLLoader2.default)(context).create({errHandler:config.errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,useFetch:config.settings?config.settings.get().streaming.lowLatencyEnabled:null,errors:_Errors2.default});var instance=void 0;function load(url,element,resolveObject){var report=function report(content,resolveToZero){element.resolved=true;element.resolvedContent=content?content:null;eventBus.trigger(_Events2.default.XLINK_ELEMENT_LOADED,{element:element,resolveObject:resolveObject,error:content||resolveToZero?null:new _DashJSError2.default(_Errors2.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,_Errors2.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+url)});};if(url===RESOLVE_TO_ZERO){report(null,true);}else{var request=new _TextRequest2.default(url,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE);urlLoader.load({request:request,success:function success(data){report(data);},error:function error(){report(null);}});}}function reset(){if(urlLoader){urlLoader.abort();urlLoader=null;}}instance={load:load,reset:reset};return instance;}XlinkLoader.__dashjs_factory_name='XlinkLoader';exports.default=_FactoryMaker2.default.getClassFactory(XlinkLoader);\\n//# sourceMappingURL=XlinkLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js\":\n/*!*************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js ***!\n  \\*************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */exports.default={LEVELS:{SUGGESTION:'Suggestion',WARNING:'Warning',ERROR:'Error'},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:'NO_UTC_TIMING_ELEMENT',message:'No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/'},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:'NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE',message:'SMPTE 2052-1:2013 defines the attribute name as \\\"imageType\\\" and does not define \\\"imagetype\\\"'}}};\\n//# sourceMappingURL=ConformanceViolationConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Constants declaration\\n * @class\\n * @ignore\\n * @hideconstructor\\n */var Constants=function(){_createClass(Constants,[{key:'init',value:function init(){/**\\n         *  @constant {string} STREAM Stream media type. Mainly used to report metrics relative to the full stream\\n         *  @memberof Constants#\\n         *  @static\\n         */this.STREAM='stream';/**\\n         *  @constant {string} VIDEO Video media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.VIDEO='video';/**\\n         *  @constant {string} AUDIO Audio media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.AUDIO='audio';/**\\n         *  @constant {string} TEXT Text media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TEXT='text';/**\\n         *  @constant {string} FRAGMENTED_TEXT Fragmented text media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.FRAGMENTED_TEXT='fragmentedText';/**\\n         *  @constant {string} EMBEDDED_TEXT Embedded text media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.EMBEDDED_TEXT='embeddedText';/**\\n         *  @constant {string} MUXED Muxed (video/audio in the same chunk) media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MUXED='muxed';/**\\n         *  @constant {string} IMAGE Image media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.IMAGE='image';/**\\n         *  @constant {string} STPP STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.STPP='stpp';/**\\n         *  @constant {string} TTML STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TTML='ttml';/**\\n         *  @constant {string} VTT STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.VTT='vtt';/**\\n         *  @constant {string} WVTT STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.WVTT='wvtt';/**\\n         *  @constant {string} ABR_STRATEGY_DYNAMIC Dynamic Adaptive bitrate algorithm\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_DYNAMIC='abrDynamic';/**\\n         *  @constant {string} ABR_STRATEGY_BOLA Adaptive bitrate algorithm based on Bola (buffer level)\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_BOLA='abrBola';/**\\n         *  @constant {string} ABR_STRATEGY_L2A Adaptive bitrate algorithm based on L2A (online learning)\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_L2A='abrL2A';/**\\n         *  @constant {string} ABR_STRATEGY_LoLP Adaptive bitrate algorithm based on LoL+\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_LoLP='abrLoLP';/**\\n         *  @constant {string} ABR_STRATEGY_THROUGHPUT Adaptive bitrate algorithm based on throughput\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_THROUGHPUT='abrThroughput';/**\\n         *  @constant {string} ABR_FETCH_THROUGHPUT_CALUCUALTION_DOWNLOADED_DATA Throughput calculation based on downloaded data array\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA='abrFetchThroughputCalculationDownloadedData';/**\\n         *  @constant {string} ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING Throughput calculation based on moof parsing\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING='abrFetchThroughputCalculationMoofParsing';/**\\n         *  @constant {string} LIVE_CATCHUP_MODE_DEFAULT Throughput calculation based on moof parsing\\n         *  @memberof Constants#\\n         *  @static\\n         */this.LIVE_CATCHUP_MODE_DEFAULT='liveCatchupModeDefault';/**\\n         *  @constant {string} LIVE_CATCHUP_MODE_LOLP Throughput calculation based on moof parsing\\n         *  @memberof Constants#\\n         *  @static\\n         */this.LIVE_CATCHUP_MODE_LOLP='liveCatchupModeLoLP';/**\\n         *  @constant {string} MOVING_AVERAGE_SLIDING_WINDOW Moving average sliding window\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MOVING_AVERAGE_SLIDING_WINDOW='slidingWindow';/**\\n         *  @constant {string} EWMA Exponential moving average\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MOVING_AVERAGE_EWMA='ewma';/**\\n         *  @constant {string} BAD_ARGUMENT_ERROR Invalid Arguments type of error\\n         *  @memberof Constants#\\n         *  @static\\n         */this.BAD_ARGUMENT_ERROR='Invalid Arguments';/**\\n         *  @constant {string} MISSING_CONFIG_ERROR Missing configuration parameters type of error\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MISSING_CONFIG_ERROR='Missing config parameter(s)';/**\\n         *  @constant {string} TRACK_SWITCH_MODE_ALWAYS_REPLACE used to clear the buffered data (prior to current playback position) after track switch. Default for audio\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SWITCH_MODE_ALWAYS_REPLACE='alwaysReplace';/**\\n         *  @constant {string} TRACK_SWITCH_MODE_NEVER_REPLACE used to forbid clearing the buffered data (prior to current playback position) after track switch. Defers to fastSwitchEnabled for placement of new data. Default for video\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SWITCH_MODE_NEVER_REPLACE='neverReplace';/**\\n         *  @constant {string} TRACK_SELECTION_MODE_HIGHEST_BITRATE makes the player select the track with a highest bitrate. This mode is a default mode.\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SELECTION_MODE_HIGHEST_BITRATE='highestBitrate';/**\\n         *  @constant {string} TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY makes the player select the track with the lowest bitrate per pixel average.\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY='highestEfficiency';/**\\n         *  @constant {string} TRACK_SELECTION_MODE_WIDEST_RANGE makes the player select the track with a widest range of bitrates.\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SELECTION_MODE_WIDEST_RANGE='widestRange';this.LOCATION='Location';this.INITIALIZE='initialize';this.TEXT_SHOWING='showing';this.TEXT_HIDDEN='hidden';this.CC1='CC1';this.CC3='CC3';this.UTF8='utf-8';this.SCHEME_ID_URI='schemeIdUri';this.START_TIME='starttime';this.SERVICE_DESCRIPTION_LL_SCHEME='urn:dvb:dash:lowlatency:scope:2019';this.SUPPLEMENTAL_PROPERTY_LL_SCHEME='urn:dvb:dash:lowlatency:critical:2019';this.XML='XML';this.ARRAY_BUFFER='ArrayBuffer';this.DVB_REPORTING_URL='dvb:reportingUrl';this.DVB_PROBABILITY='dvb:probability';}}]);function Constants(){_classCallCheck(this,Constants);this.init();}return Constants;}();var constants=new Constants();exports.default=constants;\\n//# sourceMappingURL=Constants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\":\n/*!************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js ***!\n  \\************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Metrics Constants declaration\\n * @class\\n * @ignore\\n */var MetricsConstants=function(){_createClass(MetricsConstants,[{key:'init',value:function init(){this.TCP_CONNECTION='TcpList';this.HTTP_REQUEST='HttpList';this.TRACK_SWITCH='RepSwitchList';this.BUFFER_LEVEL='BufferLevel';this.BUFFER_LOADED='bufferLoaded';this.ABANDON_LOAD='abandonload';this.ALLOW_LOAD='allowload';this.BUFFER_EMPTY='bufferStalled';this.BUFFER_STATE='BufferState';this.DVR_INFO='DVRInfo';this.DROPPED_FRAMES='DroppedFrames';this.SCHEDULING_INFO='SchedulingInfo';this.REQUESTS_QUEUE='RequestsQueue';this.MANIFEST_UPDATE='ManifestUpdate';this.MANIFEST_UPDATE_STREAM_INFO='ManifestUpdatePeriodInfo';this.MANIFEST_UPDATE_TRACK_INFO='ManifestUpdateRepresentationInfo';this.PLAY_LIST='PlayList';this.DVB_ERRORS='DVBErrors';}}]);function MetricsConstants(){_classCallCheck(this,MetricsConstants);this.init();}return MetricsConstants;}();var constants=new MetricsConstants();exports.default=constants;\\n//# sourceMappingURL=MetricsConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Protection Constants declaration\\n * @class\\n * @ignore\\n */var ProtectionConstants=function(){_createClass(ProtectionConstants,[{key:'init',value:function init(){this.CLEARKEY_KEYSTEM_STRING='org.w3.clearkey';this.WIDEVINE_KEYSTEM_STRING='com.widevine.alpha';this.PLAYREADY_KEYSTEM_STRING='com.microsoft.playready';}}]);function ProtectionConstants(){_classCallCheck(this,ProtectionConstants);this.init();}return ProtectionConstants;}();var constants=new ProtectionConstants();exports.default=constants;\\n//# sourceMappingURL=ProtectionConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ABRRulesCollection=__webpack_require__(/*! ../rules/abr/ABRRulesCollection */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js\\\");var _ABRRulesCollection2=_interopRequireDefault(_ABRRulesCollection);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _BitrateInfo=__webpack_require__(/*! ../vo/BitrateInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js\\\");var _BitrateInfo2=_interopRequireDefault(_BitrateInfo);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _RulesContext=__webpack_require__(/*! ../rules/RulesContext */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js\\\");var _RulesContext2=_interopRequireDefault(_RulesContext);var _SwitchRequest=__webpack_require__(/*! ../rules/SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _SwitchRequestHistory=__webpack_require__(/*! ../rules/SwitchRequestHistory */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js\\\");var _SwitchRequestHistory2=_interopRequireDefault(_SwitchRequestHistory);var _DroppedFramesHistory=__webpack_require__(/*! ../rules/DroppedFramesHistory */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js\\\");var _DroppedFramesHistory2=_interopRequireDefault(_DroppedFramesHistory);var _ThroughputHistory=__webpack_require__(/*! ../rules/ThroughputHistory */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js\\\");var _ThroughputHistory2=_interopRequireDefault(_ThroughputHistory);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var DEFAULT_VIDEO_BITRATE=1000;var DEFAULT_AUDIO_BITRATE=100;var QUALITY_DEFAULT=0;function AbrController(){var context=this.context;var debug=(0,_Debug2.default)(context).getInstance();var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,abrRulesCollection=void 0,streamController=void 0,topQualities=void 0,qualityDict=void 0,streamProcessorDict=void 0,abandonmentStateDict=void 0,abandonmentTimeout=void 0,windowResizeEventCalled=void 0,elementWidth=void 0,elementHeight=void 0,adapter=void 0,videoModel=void 0,mediaPlayerModel=void 0,domStorage=void 0,playbackIndex=void 0,switchHistoryDict=void 0,droppedFramesHistory=void 0,throughputHistory=void 0,isUsingBufferOccupancyABRDict=void 0,isUsingL2AABRDict=void 0,isUsingLoLPBRDict=void 0,dashMetrics=void 0,settings=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();}function registerStreamType(type,streamProcessor){switchHistoryDict[type]=switchHistoryDict[type]||(0,_SwitchRequestHistory2.default)(context).create();streamProcessorDict[type]=streamProcessor;abandonmentStateDict[type]=abandonmentStateDict[type]||{};abandonmentStateDict[type].state=_MetricsConstants2.default.ALLOW_LOAD;isUsingBufferOccupancyABRDict[type]=false;isUsingL2AABRDict[type]=false;isUsingLoLPBRDict[type]=false;eventBus.on(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,instance);if(type===_Constants2.default.VIDEO){eventBus.on(_Events2.default.QUALITY_CHANGE_RENDERED,onQualityChangeRendered,instance);droppedFramesHistory=droppedFramesHistory||(0,_DroppedFramesHistory2.default)(context).create();setElementSize();}eventBus.on(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.on(_Events2.default.PERIOD_SWITCH_COMPLETED,createAbrRulesCollection,instance);throughputHistory=throughputHistory||(0,_ThroughputHistory2.default)(context).create({settings:settings});}function unRegisterStreamType(type){delete streamProcessorDict[type];}function createAbrRulesCollection(){abrRulesCollection=(0,_ABRRulesCollection2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings});abrRulesCollection.initialize();}function resetInitialSettings(){topQualities={};qualityDict={};abandonmentStateDict={};streamProcessorDict={};switchHistoryDict={};isUsingBufferOccupancyABRDict={};isUsingL2AABRDict={};isUsingLoLPBRDict={};if(windowResizeEventCalled===undefined){windowResizeEventCalled=false;}playbackIndex=undefined;droppedFramesHistory=undefined;throughputHistory=undefined;clearTimeout(abandonmentTimeout);abandonmentTimeout=null;}function reset(){resetInitialSettings();eventBus.off(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_RENDERED,onQualityChangeRendered,instance);eventBus.off(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.off(_Events2.default.PERIOD_SWITCH_COMPLETED,createAbrRulesCollection,instance);if(abrRulesCollection){abrRulesCollection.reset();}}function setConfig(config){if(!config)return;if(config.streamController){streamController=config.streamController;}if(config.domStorage){domStorage=config.domStorage;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.adapter){adapter=config.adapter;}if(config.videoModel){videoModel=config.videoModel;}if(config.settings){settings=config.settings;}}function checkConfig(){if(!domStorage||!domStorage.hasOwnProperty('getSavedBitrateSettings')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function onQualityChangeRendered(e){if(e.mediaType===_Constants2.default.VIDEO){if(playbackIndex!==undefined){droppedFramesHistory.push(playbackIndex,videoModel.getPlaybackQuality());}playbackIndex=e.newQuality;}}function onMetricAdded(e){if(e.metric===_MetricsConstants2.default.HTTP_REQUEST&&e.value&&e.value.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE&&(e.mediaType===_Constants2.default.AUDIO||e.mediaType===_Constants2.default.VIDEO)){throughputHistory.push(e.mediaType,e.value,settings.get().streaming.abr.useDeadTimeLatency);}if(e.metric===_MetricsConstants2.default.BUFFER_LEVEL&&(e.mediaType===_Constants2.default.AUDIO||e.mediaType===_Constants2.default.VIDEO)){_updateAbrStrategy(e.mediaType,0.001*e.value.level);}}function getTopQualityIndexFor(type,id){var idx=void 0;topQualities[id]=topQualities[id]||{};if(!topQualities[id].hasOwnProperty(type)){topQualities[id][type]=0;}idx=checkMaxBitrate(topQualities[id][type],type);idx=checkMaxRepresentationRatio(idx,type,topQualities[id][type]);idx=checkPortalSize(idx,type);return idx;}/**\\n     * Gets top BitrateInfo for the player\\n     * @param {string} type - 'video' or 'audio' are the type options.\\n     * @returns {BitrateInfo | null}\\n     */function getTopBitrateInfoFor(type){if(type&&streamProcessorDict&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();if(streamInfo&&streamInfo.id){var idx=getTopQualityIndexFor(type,streamInfo.id);var bitrates=getBitrateList(streamProcessorDict[type].getMediaInfo());return bitrates[idx]?bitrates[idx]:null;}}return null;}/**\\n     * @param {string} type\\n     * @returns {number} A value of the initial bitrate, kbps\\n     * @memberof AbrController#\\n     */function getInitialBitrateFor(type){checkConfig();if(type===_Constants2.default.TEXT||type===_Constants2.default.FRAGMENTED_TEXT){return NaN;}var savedBitrate=domStorage.getSavedBitrateSettings(type);var configBitrate=settings.get().streaming.abr.initialBitrate[type];var configRatio=settings.get().streaming.abr.initialRepresentationRatio[type];if(configBitrate===-1){if(configRatio>-1){var representation=adapter.getAdaptationForType(0,type).Representation;if(Array.isArray(representation)){var repIdx=Math.max(Math.round(representation.length*configRatio)-1,0);configBitrate=representation[repIdx].bandwidth;}else{configBitrate=0;}}else if(!isNaN(savedBitrate)){configBitrate=savedBitrate;}else{configBitrate=type===_Constants2.default.VIDEO?DEFAULT_VIDEO_BITRATE:DEFAULT_AUDIO_BITRATE;}}return configBitrate;}function getMaxAllowedBitrateFor(type){return settings.get().streaming.abr.maxBitrate[type];}function getMinAllowedBitrateFor(type){return settings.get().streaming.abr.minBitrate[type];}function getMaxAllowedIndexFor(type){var maxBitrate=getMaxAllowedBitrateFor(type);if(maxBitrate>-1){return getQualityForBitrate(streamProcessorDict[type].getMediaInfo(),maxBitrate);}else{return undefined;}}function getMinAllowedIndexFor(type){var minBitrate=getMinAllowedBitrateFor(type);if(minBitrate>-1){var mediaInfo=streamProcessorDict[type].getMediaInfo();var bitrateList=getBitrateList(mediaInfo);// This returns the quality index <= for the given bitrate\\nvar minIdx=getQualityForBitrate(mediaInfo,minBitrate);if(bitrateList[minIdx]&&minIdx<bitrateList.length-1&&bitrateList[minIdx].bitrate<minBitrate*1000){minIdx++;// Go to the next bitrate\\n}return minIdx;}else{return undefined;}}function checkPlaybackQuality(type){if(type&&streamProcessorDict&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();var streamId=streamInfo?streamInfo.id:null;var oldQuality=getQualityFor(type);var rulesContext=(0,_RulesContext2.default)(context).create({abrController:instance,streamProcessor:streamProcessorDict[type],currentValue:oldQuality,switchHistory:switchHistoryDict[type],droppedFramesHistory:droppedFramesHistory,useBufferOccupancyABR:useBufferOccupancyABR(type),useL2AABR:useL2AABR(type),useLoLPABR:useLoLPABR(type),videoModel:videoModel});if(droppedFramesHistory){var playbackQuality=videoModel.getPlaybackQuality();if(playbackQuality){droppedFramesHistory.push(playbackIndex,playbackQuality);}}if(!!settings.get().streaming.abr.autoSwitchBitrate[type]){var minIdx=getMinAllowedIndexFor(type);var topQualityIdx=getTopQualityIndexFor(type,streamId);var switchRequest=abrRulesCollection.getMaxQuality(rulesContext);var newQuality=switchRequest.quality;if(minIdx!==undefined&&(newQuality>_SwitchRequest2.default.NO_CHANGE?newQuality:oldQuality)<minIdx){newQuality=minIdx;}if(newQuality>topQualityIdx){newQuality=topQualityIdx;}switchHistoryDict[type].push({oldValue:oldQuality,newValue:newQuality});if(newQuality>_SwitchRequest2.default.NO_CHANGE&&newQuality!=oldQuality){if(abandonmentStateDict[type].state===_MetricsConstants2.default.ALLOW_LOAD||newQuality>oldQuality){changeQuality(type,oldQuality,newQuality,topQualityIdx,switchRequest.reason);}}else if(settings.get().debug.logLevel===_Debug2.default.LOG_LEVEL_DEBUG){var bufferLevel=dashMetrics.getCurrentBufferLevel(type,true);logger.debug('['+type+'] stay on '+oldQuality+'/'+topQualityIdx+' (buffer: '+bufferLevel+')');}}}}function setPlaybackQuality(type,streamInfo,newQuality,reason){var id=streamInfo.id;var oldQuality=getQualityFor(type);(0,_SupervisorTools.checkInteger)(newQuality);var topQualityIdx=getTopQualityIndexFor(type,id);if(newQuality!==oldQuality&&newQuality>=0&&newQuality<=topQualityIdx){changeQuality(type,oldQuality,newQuality,topQualityIdx,reason);}}function changeQuality(type,oldQuality,newQuality,topQualityIdx,reason){if(type&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();var id=streamInfo?streamInfo.id:null;if(settings.get().debug.logLevel===_Debug2.default.LOG_LEVEL_DEBUG){var bufferLevel=dashMetrics.getCurrentBufferLevel(type);logger.info('['+type+'] switch from '+oldQuality+' to '+newQuality+'/'+topQualityIdx+' (buffer: '+bufferLevel+') '+(reason?JSON.stringify(reason):'.'));}setQualityFor(type,id,newQuality);eventBus.trigger(_Events2.default.QUALITY_CHANGE_REQUESTED,{oldQuality:oldQuality,newQuality:newQuality,reason:reason},{streamId:streamInfo.id,mediaType:type});var bitrate=throughputHistory.getAverageThroughput(type);if(!isNaN(bitrate)){domStorage.setSavedBitrateSettings(type,bitrate);}}}function setAbandonmentStateFor(type,state){abandonmentStateDict[type].state=state;}function getAbandonmentStateFor(type){return abandonmentStateDict[type]?abandonmentStateDict[type].state:null;}/**\\n     * @param {MediaInfo} mediaInfo\\n     * @param {number} bitrate A bitrate value, kbps\\n     * @param {number} latency Expected latency of connection, ms\\n     * @returns {number} A quality index <= for the given bitrate\\n     * @memberof AbrController#\\n     */function getQualityForBitrate(mediaInfo,bitrate,latency){var voRepresentation=mediaInfo&&mediaInfo.type?streamProcessorDict[mediaInfo.type].getRepresentationInfo():null;if(settings.get().streaming.abr.useDeadTimeLatency&&latency&&voRepresentation&&voRepresentation.fragmentDuration){latency=latency/1000;var fragmentDuration=voRepresentation.fragmentDuration;if(latency>fragmentDuration){return 0;}else{var deadTimeRatio=latency/fragmentDuration;bitrate=bitrate*(1-deadTimeRatio);}}var bitrateList=getBitrateList(mediaInfo);for(var i=bitrateList.length-1;i>=0;i--){var bitrateInfo=bitrateList[i];if(bitrate*1000>=bitrateInfo.bitrate){return i;}}return QUALITY_DEFAULT;}/**\\n     * @param {MediaInfo} mediaInfo\\n     * @returns {Array|null} A list of {@link BitrateInfo} objects\\n     * @memberof AbrController#\\n     */function getBitrateList(mediaInfo){var infoList=[];if(!mediaInfo||!mediaInfo.bitrateList)return infoList;var bitrateList=mediaInfo.bitrateList;var type=mediaInfo.type;var bitrateInfo=void 0;for(var i=0,ln=bitrateList.length;i<ln;i++){bitrateInfo=new _BitrateInfo2.default();bitrateInfo.mediaType=type;bitrateInfo.qualityIndex=i;bitrateInfo.bitrate=bitrateList[i].bandwidth;bitrateInfo.width=bitrateList[i].width;bitrateInfo.height=bitrateList[i].height;bitrateInfo.scanType=bitrateList[i].scanType;infoList.push(bitrateInfo);}return infoList;}function _updateAbrStrategy(mediaType,bufferLevel){var strategy=settings.get().streaming.abr.ABRStrategy;if(strategy===_Constants2.default.ABR_STRATEGY_L2A){isUsingBufferOccupancyABRDict[mediaType]=false;isUsingLoLPBRDict[mediaType]=false;isUsingL2AABRDict[mediaType]=true;return;}if(strategy===_Constants2.default.ABR_STRATEGY_LoLP){isUsingBufferOccupancyABRDict[mediaType]=false;isUsingLoLPBRDict[mediaType]=true;isUsingL2AABRDict[mediaType]=false;return;}else if(strategy===_Constants2.default.ABR_STRATEGY_BOLA){isUsingBufferOccupancyABRDict[mediaType]=true;isUsingLoLPBRDict[mediaType]=false;isUsingL2AABRDict[mediaType]=false;return;}else if(strategy===_Constants2.default.ABR_STRATEGY_THROUGHPUT){isUsingBufferOccupancyABRDict[mediaType]=false;isUsingLoLPBRDict[mediaType]=false;isUsingL2AABRDict[mediaType]=false;return;}// else ABR_STRATEGY_DYNAMIC\\n_updateDynamicAbrStrategy(mediaType,bufferLevel);}function _updateDynamicAbrStrategy(mediaType,bufferLevel){var stableBufferTime=mediaPlayerModel.getStableBufferTime();var switchOnThreshold=stableBufferTime;var switchOffThreshold=0.5*stableBufferTime;var useBufferABR=isUsingBufferOccupancyABRDict[mediaType];var newUseBufferABR=bufferLevel>(useBufferABR?switchOffThreshold:switchOnThreshold);// use hysteresis to avoid oscillating rules\\nisUsingBufferOccupancyABRDict[mediaType]=newUseBufferABR;if(newUseBufferABR!==useBufferABR){if(newUseBufferABR){logger.info('['+mediaType+'] switching from throughput to buffer occupancy ABR rule (buffer: '+bufferLevel.toFixed(3)+').');}else{logger.info('['+mediaType+'] switching from buffer occupancy to throughput ABR rule (buffer: '+bufferLevel.toFixed(3)+').');}}}function useBufferOccupancyABR(mediaType){return isUsingBufferOccupancyABRDict[mediaType];}function useL2AABR(mediaType){return isUsingL2AABRDict[mediaType];}function useLoLPABR(mediaType){return isUsingLoLPBRDict[mediaType];}function getThroughputHistory(){return throughputHistory;}function updateTopQualityIndex(mediaInfo){var type=mediaInfo.type;var streamId=mediaInfo.streamInfo.id;var max=mediaInfo.representationCount-1;setTopQualityIndex(type,streamId,max);return max;}function isPlayingAtTopQuality(streamInfo){var streamId=streamInfo?streamInfo.id:null;var audioQuality=getQualityFor(_Constants2.default.AUDIO);var videoQuality=getQualityFor(_Constants2.default.VIDEO);var isAtTop=audioQuality===getTopQualityIndexFor(_Constants2.default.AUDIO,streamId)&&videoQuality===getTopQualityIndexFor(_Constants2.default.VIDEO,streamId);return isAtTop;}function getQualityFor(type){if(type&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();var id=streamInfo?streamInfo.id:null;var quality=void 0;if(id){qualityDict[id]=qualityDict[id]||{};if(!qualityDict[id].hasOwnProperty(type)){qualityDict[id][type]=QUALITY_DEFAULT;}quality=qualityDict[id][type];return quality;}}return QUALITY_DEFAULT;}function setQualityFor(type,id,value){qualityDict[id]=qualityDict[id]||{};qualityDict[id][type]=value;}function setTopQualityIndex(type,id,value){topQualities[id]=topQualities[id]||{};topQualities[id][type]=value;}function checkMaxBitrate(idx,type){var newIdx=idx;if(!streamProcessorDict[type]){return newIdx;}var minIdx=getMinAllowedIndexFor(type);if(minIdx!==undefined){newIdx=Math.max(idx,minIdx);}var maxIdx=getMaxAllowedIndexFor(type);if(maxIdx!==undefined){newIdx=Math.min(newIdx,maxIdx);}return newIdx;}function checkMaxRepresentationRatio(idx,type,maxIdx){var maxRepresentationRatio=settings.get().streaming.abr.maxRepresentationRatio[type];if(isNaN(maxRepresentationRatio)||maxRepresentationRatio>=1||maxRepresentationRatio<0){return idx;}return Math.min(idx,Math.round(maxIdx*maxRepresentationRatio));}function setWindowResizeEventCalled(value){windowResizeEventCalled=value;}function setElementSize(){if(videoModel){var hasPixelRatio=settings.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty('devicePixelRatio');var pixelRatio=hasPixelRatio?window.devicePixelRatio:1;elementWidth=videoModel.getClientWidth()*pixelRatio;elementHeight=videoModel.getClientHeight()*pixelRatio;}}function checkPortalSize(idx,type){if(type!==_Constants2.default.VIDEO||!settings.get().streaming.abr.limitBitrateByPortal||!streamProcessorDict[type]){return idx;}if(!windowResizeEventCalled){setElementSize();}var representation=adapter.getAdaptationForType(0,type).Representation;var newIdx=idx;if(elementWidth>0&&elementHeight>0){while(newIdx>0&&representation[newIdx]&&elementWidth<representation[newIdx].width&&elementWidth-representation[newIdx-1].width<representation[newIdx].width-elementWidth){newIdx=newIdx-1;}// Make sure that in case of multiple representation elements have same\\n// resolution, every such element is included\\nwhile(newIdx<representation.length-1&&representation[newIdx].width===representation[newIdx+1].width){newIdx=newIdx+1;}}return newIdx;}function onFragmentLoadProgress(e){var type=e.request.mediaType;if(!!settings.get().streaming.abr.autoSwitchBitrate[type]){var streamProcessor=streamProcessorDict[type];if(!streamProcessor)return;// There may be a fragment load in progress when we switch periods and recreated some controllers.\\nvar rulesContext=(0,_RulesContext2.default)(context).create({abrController:instance,streamProcessor:streamProcessor,currentRequest:e.request,useBufferOccupancyABR:useBufferOccupancyABR(type),useL2AABR:useL2AABR(type),useLoLPABR:useLoLPABR(type),videoModel:videoModel});var switchRequest=abrRulesCollection.shouldAbandonFragment(rulesContext);if(switchRequest.quality>_SwitchRequest2.default.NO_CHANGE){var fragmentModel=streamProcessor.getFragmentModel();var request=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_LOADING,index:e.request.index})[0];if(request){//TODO Check if we should abort or if better to finish download. check bytesLoaded/Total\\nfragmentModel.abortRequests();setAbandonmentStateFor(type,_MetricsConstants2.default.ABANDON_LOAD);switchHistoryDict[type].reset();switchHistoryDict[type].push({oldValue:getQualityFor(type),newValue:switchRequest.quality,confidence:1,reason:switchRequest.reason});setPlaybackQuality(type,streamController.getActiveStreamInfo(),switchRequest.quality,switchRequest.reason);clearTimeout(abandonmentTimeout);abandonmentTimeout=setTimeout(function(){setAbandonmentStateFor(type,_MetricsConstants2.default.ALLOW_LOAD);abandonmentTimeout=null;},settings.get().streaming.abandonLoadTimeout);}}}}instance={isPlayingAtTopQuality:isPlayingAtTopQuality,updateTopQualityIndex:updateTopQualityIndex,getThroughputHistory:getThroughputHistory,getBitrateList:getBitrateList,getQualityForBitrate:getQualityForBitrate,getTopBitrateInfoFor:getTopBitrateInfoFor,getMaxAllowedIndexFor:getMaxAllowedIndexFor,getMinAllowedIndexFor:getMinAllowedIndexFor,getInitialBitrateFor:getInitialBitrateFor,getQualityFor:getQualityFor,getAbandonmentStateFor:getAbandonmentStateFor,setPlaybackQuality:setPlaybackQuality,checkPlaybackQuality:checkPlaybackQuality,getTopQualityIndexFor:getTopQualityIndexFor,setElementSize:setElementSize,setWindowResizeEventCalled:setWindowResizeEventCalled,createAbrRulesCollection:createAbrRulesCollection,registerStreamType:registerStreamType,unRegisterStreamType:unRegisterStreamType,setConfig:setConfig,reset:reset};setup();return instance;}AbrController.__dashjs_factory_name='AbrController';var factory=_FactoryMaker2.default.getSingletonFactory(AbrController);factory.QUALITY_DEFAULT=QUALITY_DEFAULT;_FactoryMaker2.default.updateSingletonFactory(AbrController.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=AbrController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BaseURLTreeModel=__webpack_require__(/*! ../models/BaseURLTreeModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js\\\");var _BaseURLTreeModel2=_interopRequireDefault(_BaseURLTreeModel);var _BaseURLSelector=__webpack_require__(/*! ../utils/BaseURLSelector */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js\\\");var _BaseURLSelector2=_interopRequireDefault(_BaseURLSelector);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _BaseURL=__webpack_require__(/*! ../../dash/vo/BaseURL */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js\\\");var _BaseURL2=_interopRequireDefault(_BaseURL);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BaseURLController(){var instance=void 0,adapter=void 0;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var baseURLTreeModel=void 0,baseURLSelector=void 0;function onBlackListChanged(e){baseURLTreeModel.invalidateSelectedIndexes(e.entry);}function setup(){baseURLTreeModel=(0,_BaseURLTreeModel2.default)(context).create();baseURLSelector=(0,_BaseURLSelector2.default)(context).create();eventBus.on(_Events2.default.SERVICE_LOCATION_BLACKLIST_CHANGED,onBlackListChanged,instance);}function setConfig(config){if(config.baseURLTreeModel){baseURLTreeModel=config.baseURLTreeModel;}if(config.baseURLSelector){baseURLSelector=config.baseURLSelector;}if(config.adapter){adapter=config.adapter;}}function update(manifest){baseURLTreeModel.update(manifest);baseURLSelector.chooseSelector(adapter.getIsDVB(manifest));}function resolve(path){var baseUrls=baseURLTreeModel.getForPath(path);var baseUrl=baseUrls.reduce(function(p,c){var b=baseURLSelector.select(c);if(b){if(!urlUtils.isRelative(b.url)){p.url=b.url;p.serviceLocation=b.serviceLocation;}else{p.url=urlUtils.resolve(b.url,p.url);}p.availabilityTimeOffset=b.availabilityTimeOffset;p.availabilityTimeComplete=b.availabilityTimeComplete;}else{return new _BaseURL2.default();}return p;},new _BaseURL2.default());if(!urlUtils.isRelative(baseUrl.url)){return baseUrl;}}function reset(){baseURLTreeModel.reset();baseURLSelector.reset();}function initialize(data){// report config to baseURLTreeModel and baseURLSelector\\nbaseURLTreeModel.setConfig({adapter:adapter});update(data);}instance={reset:reset,initialize:initialize,resolve:resolve,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BaseURLController.__dashjs_factory_name='BaseURLController';exports.default=_FactoryMaker2.default.getClassFactory(BaseURLController);\\n//# sourceMappingURL=BaseURLController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js\":\n/*!*****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js ***!\n  \\*****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function BlackListController(config){config=config||{};var instance=void 0;var blacklist=[];var eventBus=(0,_EventBus2.default)(this.context).getInstance();var updateEventName=config.updateEventName;var addBlacklistEventName=config.addBlacklistEventName;function contains(query){if(!blacklist.length||!query||!query.length){return false;}return blacklist.indexOf(query)!==-1;}function add(entry){if(blacklist.indexOf(entry)!==-1){return;}blacklist.push(entry);eventBus.trigger(updateEventName,{entry:entry});}function onAddBlackList(e){add(e.entry);}function setup(){if(addBlacklistEventName){eventBus.on(addBlacklistEventName,onAddBlackList,instance);}}function reset(){blacklist=[];}instance={add:add,contains:contains,reset:reset};setup();return instance;}BlackListController.__dashjs_factory_name='BlackListController';exports.default=_FactoryMaker2.default.getClassFactory(BlackListController);\\n//# sourceMappingURL=BlacklistController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _SourceBufferSink=__webpack_require__(/*! ../SourceBufferSink */ \\\"../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js\\\");var _SourceBufferSink2=_interopRequireDefault(_SourceBufferSink);var _PreBufferSink=__webpack_require__(/*! ../PreBufferSink */ \\\"../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js\\\");var _PreBufferSink2=_interopRequireDefault(_PreBufferSink);var _AbrController=__webpack_require__(/*! ./AbrController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js\\\");var _AbrController2=_interopRequireDefault(_AbrController);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _InitCache=__webpack_require__(/*! ../utils/InitCache */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\\\");var _InitCache2=_interopRequireDefault(_InitCache);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var BUFFERING_COMPLETED_THRESHOLD=0.1;var BUFFER_END_THRESHOLD=0.5;var BUFFER_RANGE_CALCULATION_THRESHOLD=0.01;var QUOTA_EXCEEDED_ERROR_CODE=22;var BUFFER_CONTROLLER_TYPE='BufferController';function BufferController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var errHandler=config.errHandler;var fragmentModel=config.fragmentModel;var representationController=config.representationController;var mediaController=config.mediaController;var adapter=config.adapter;var textController=config.textController;var abrController=config.abrController;var playbackController=config.playbackController;var streamInfo=config.streamInfo;var type=config.type;var settings=config.settings;var instance=void 0,logger=void 0,requiredQuality=void 0,isBufferingCompleted=void 0,bufferLevel=void 0,criticalBufferLevel=void 0,mediaSource=void 0,maxAppendedIndex=void 0,lastIndex=void 0,buffer=void 0,dischargeBuffer=void 0,dischargeFragments=void 0,bufferState=void 0,appendedBytesInfo=void 0,wallclockTicked=void 0,isPruningInProgress=void 0,isQuotaExceeded=void 0,initCache=void 0,seekTarget=void 0,seekClearedBufferingCompleted=void 0,pendingPruningRanges=void 0,replacingBuffer=void 0,mediaChunk=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);initCache=(0,_InitCache2.default)(context).getInstance();resetInitialSettings();}function getBufferControllerType(){return BUFFER_CONTROLLER_TYPE;}function initialize(Source){setMediaSource(Source);requiredQuality=abrController.getQualityFor(type);eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.on(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,this);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,this);eventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,this);eventBus.on(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.on(_Events2.default.PLAYBACK_PLAYING,onPlaybackPlaying,this);eventBus.on(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.on(_Events2.default.PLAYBACK_SEEKED,onPlaybackSeeked,this);eventBus.on(_Events2.default.PLAYBACK_STALLED,onPlaybackStalled,this);eventBus.on(_Events2.default.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,this);eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,this,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});eventBus.on(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,onRemoved,this);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function getRepresentationInfo(quality){return adapter.convertDataToRepresentationInfo(representationController.getRepresentationForQuality(quality));}function createBuffer(mediaInfoArr,oldBuffers){if(!initCache||!mediaInfoArr)return null;var mediaInfo=mediaInfoArr[0];if(mediaSource){try{if(oldBuffers&&oldBuffers[type]){buffer=(0,_SourceBufferSink2.default)(context).create(mediaSource,mediaInfo,onAppended.bind(this),oldBuffers[type]);}else{buffer=(0,_SourceBufferSink2.default)(context).create(mediaSource,mediaInfo,onAppended.bind(this),null);}if(settings.get().streaming.useAppendWindow){buffer.updateAppendWindow(streamInfo);}if(typeof buffer.getBuffer().initialize==='function'){buffer.getBuffer().initialize(type,streamInfo,mediaInfoArr,fragmentModel);}}catch(e){logger.fatal('Caught error on create SourceBuffer: '+e);errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+type));}}else{buffer=(0,_PreBufferSink2.default)(context).create(onAppended.bind(this));}updateBufferTimestampOffset(getRepresentationInfo(requiredQuality));return buffer;}function dischargePreBuffer(){if(buffer&&dischargeBuffer&&typeof dischargeBuffer.discharge==='function'){var ranges=dischargeBuffer.getAllBufferRanges();if(ranges.length>0){var rangeStr='Beginning '+type+'PreBuffer discharge, adding buffer for:';for(var i=0;i<ranges.length;i++){rangeStr+=' start: '+ranges.start(i)+', end: '+ranges.end(i)+';';}logger.debug(rangeStr);}else{logger.debug('PreBuffer discharge requested, but there were no media segments in the PreBuffer.');}//A list of fragments to supress bytesAppended events for. This makes transferring from a prebuffer to a sourcebuffer silent.\\ndischargeFragments=[];var chunks=dischargeBuffer.discharge();var lastInit=null;for(var j=0;j<chunks.length;j++){var chunk=chunks[j];if(chunk.segmentType!=='InitializationSegment'){var initChunk=initCache.extract(chunk.streamId,chunk.representationId);if(initChunk){if(lastInit!==initChunk){dischargeFragments.push(initChunk);buffer.append(initChunk);lastInit=initChunk;}}}dischargeFragments.push(chunk);buffer.append(chunk);}dischargeBuffer.reset();dischargeBuffer=null;}}function onInitFragmentLoaded(e){logger.info('Init fragment finished loading saving to',type+'\\\\'s init cache');initCache.save(e.chunk);logger.debug('Append Init fragment',type,' with representationId:',e.chunk.representationId,' and quality:',e.chunk.quality,', data size:',e.chunk.bytes.byteLength);appendToBuffer(e.chunk);}function appendInitSegment(representationId){// Get init segment from cache\\nvar chunk=initCache.extract(streamInfo.id,representationId);if(!chunk){// Init segment not in cache, shall be requested\\nreturn false;}// Append init segment into buffer\\nlogger.info('Append Init fragment',type,' with representationId:',chunk.representationId,' and quality:',chunk.quality,', data size:',chunk.bytes.byteLength);appendToBuffer(chunk);return true;}function onMediaFragmentLoaded(e){var chunk=e.chunk;if(replacingBuffer){mediaChunk=chunk;var ranges=buffer&&buffer.getAllBufferRanges();if(ranges&&ranges.length>0&&playbackController.getTimeToStreamEnd()>settings.get().streaming.stallThreshold){logger.debug('Clearing buffer because track changed - '+(ranges.end(ranges.length-1)+BUFFER_END_THRESHOLD));clearBuffers([{start:0,end:ranges.end(ranges.length-1)+BUFFER_END_THRESHOLD,force:true// Force buffer removal even when buffering is completed and MediaSource is ended\\n}]);}}else{appendToBuffer(chunk);}}function appendToBuffer(chunk){buffer.append(chunk);if(chunk.mediaInfo.type===_Constants2.default.VIDEO){triggerEvent(_Events2.default.VIDEO_CHUNK_RECEIVED,{chunk:chunk});}}function showBufferRanges(ranges){if(ranges&&ranges.length>0){for(var i=0,len=ranges.length;i<len;i++){logger.debug('Buffered range: '+ranges.start(i)+' - '+ranges.end(i)+', currentTime = ',playbackController.getTime());}}}function onAppended(e){if(e.error){if(e.error.code===QUOTA_EXCEEDED_ERROR_CODE){isQuotaExceeded=true;criticalBufferLevel=getTotalBufferedTime()*0.8;logger.warn('Quota exceeded, Critical Buffer: '+criticalBufferLevel);if(criticalBufferLevel>0){// recalculate buffer lengths according to criticalBufferLevel\\nvar bufferToKeep=Math.max(0.2*criticalBufferLevel,1);var bufferAhead=criticalBufferLevel-bufferToKeep;var bufferTimeAtTopQuality=Math.min(settings.get().streaming.bufferTimeAtTopQuality,bufferAhead*0.9);var bufferTimeAtTopQualityLongForm=Math.min(settings.get().streaming.bufferTimeAtTopQualityLongForm,bufferAhead*0.9);var s={streaming:{bufferToKeep:parseFloat(bufferToKeep.toFixed(5)),bufferTimeAtTopQuality:parseFloat(bufferTimeAtTopQuality.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(bufferTimeAtTopQualityLongForm.toFixed(5))}};settings.update(s);}}if(e.error.code===QUOTA_EXCEEDED_ERROR_CODE||!hasEnoughSpaceToAppend()){logger.warn('Clearing playback buffer to overcome quota exceed situation');// Notify Schedulecontroller to stop scheduling until buffer has been pruned\\ntriggerEvent(_Events2.default.QUOTA_EXCEEDED,{criticalBufferLevel:criticalBufferLevel});clearBuffers(getClearRanges());}return;}isQuotaExceeded=false;appendedBytesInfo=e.chunk;if(appendedBytesInfo&&!isNaN(appendedBytesInfo.index)){maxAppendedIndex=Math.max(appendedBytesInfo.index,maxAppendedIndex);checkIfBufferingCompleted();}var ranges=buffer.getAllBufferRanges();if(appendedBytesInfo.segmentType===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){showBufferRanges(ranges);onPlaybackProgression();adjustSeekTarget();}else if(replacingBuffer){// When replacing buffer due to switch track, and once new initialization segment has been appended\\n// (and previous buffered data removed) then seek stream to current time\\nvar currentTime=playbackController.getTime();logger.debug('AppendToBuffer seek target should be '+currentTime);triggerEvent(_Events2.default.SEEK_TARGET,{time:currentTime});}var suppressAppendedEvent=false;if(dischargeFragments){if(dischargeFragments.indexOf(appendedBytesInfo)>0){suppressAppendedEvent=true;}dischargeFragments=null;}if(appendedBytesInfo&&!suppressAppendedEvent){triggerEvent(appendedBytesInfo.endFragment?_Events2.default.BYTES_APPENDED_END_FRAGMENT:_Events2.default.BYTES_APPENDED,{quality:appendedBytesInfo.quality,startTime:appendedBytesInfo.start,index:appendedBytesInfo.index,bufferedRanges:ranges,mediaType:type});}}function adjustSeekTarget(){// Check buffered data only for audio and video\\nif(type!==_Constants2.default.AUDIO&&type!==_Constants2.default.VIDEO)return;if(isNaN(seekTarget))return;// Check if current buffered range already contains seek target (and current video element time)\\nvar currentTime=playbackController.getTime();var range=getRangeAt(seekTarget,0);if(currentTime===seekTarget&&range)return;// Get buffered range corresponding to the seek target\\nvar segmentDuration=representationController.getCurrentRepresentation().segmentDuration;range=getRangeAt(seekTarget,segmentDuration);if(!range)return;if(Math.abs(currentTime-seekTarget)>segmentDuration){// If current video model time is decorrelated from seek target (and appended buffer) then seek video element\\n// (in case of live streams on some browsers/devices for which we can't set video element time at unavalaible range)\\n// Check if appended segment is not anterior from seek target (segments timeline/template tolerance)\\nif(seekTarget<=range.end){// Seek video element to seek target or range start if appended buffer starts after seek target (segments timeline/template tolerance)\\nplaybackController.seek(Math.max(seekTarget,range.start),false,true);seekTarget=NaN;}}else if(currentTime<range.start){// If appended buffer starts after seek target (segments timeline/template tolerance) then seek to range start\\nplaybackController.seek(range.start,false,true);seekTarget=NaN;}}function onQualityChanged(e){if(requiredQuality===e.newQuality)return;updateBufferTimestampOffset(this.getRepresentationInfo(e.newQuality));requiredQuality=e.newQuality;}//**********************************************************************\\n// START Buffer Level, State & Sufficiency Handling.\\n//**********************************************************************\\nfunction onPlaybackSeeking(e){seekTarget=e.seekTime;if(isBufferingCompleted){seekClearedBufferingCompleted=true;isBufferingCompleted=false;//a seek command has occured, reset lastIndex value, it will be set next time that onStreamCompleted will be called.\\nlastIndex=Number.POSITIVE_INFINITY;}if(type!==_Constants2.default.FRAGMENTED_TEXT){// remove buffer after seeking operations\\npruneAllSafely();}else{onPlaybackProgression();}}function onPlaybackSeeked(){seekTarget=NaN;}// Prune full buffer but what is around current time position\\nfunction pruneAllSafely(){buffer.waitForUpdateEnd(function(){var ranges=getAllRangesWithSafetyFactor();if(!ranges||ranges.length===0){onPlaybackProgression();}clearBuffers(ranges);});}// Get all buffer ranges but a range around current time position\\nfunction getAllRangesWithSafetyFactor(){var clearRanges=[];var ranges=buffer.getAllBufferRanges();if(!ranges||ranges.length===0){return clearRanges;}var currentTime=playbackController.getTime();var endOfBuffer=ranges.end(ranges.length-1)+BUFFER_END_THRESHOLD;var currentTimeRequest=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTime,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];// There is no request in current time position yet. Let's remove everything\\nif(!currentTimeRequest){logger.debug('getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 -',endOfBuffer);clearRanges.push({start:0,end:endOfBuffer});}else{// Build buffer behind range. To avoid pruning time around current time position,\\n// we include fragment right behind the one in current time position\\nvar behindRange={start:0,end:currentTimeRequest.startTime-settings.get().streaming.stallThreshold};var prevReq=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTimeRequest.startTime-currentTimeRequest.duration/2,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];if(prevReq&&prevReq.startTime!=currentTimeRequest.startTime){behindRange.end=prevReq.startTime;}if(behindRange.start<behindRange.end&&behindRange.end>ranges.start(0)){clearRanges.push(behindRange);}// Build buffer ahead range. To avoid pruning time around current time position,\\n// we include fragment right after the one in current time position\\nvar aheadRange={start:currentTimeRequest.startTime+currentTimeRequest.duration+settings.get().streaming.stallThreshold,end:endOfBuffer};var nextReq=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTimeRequest.startTime+currentTimeRequest.duration+settings.get().streaming.stallThreshold,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];if(nextReq&&nextReq.startTime!==currentTimeRequest.startTime){aheadRange.start=nextReq.startTime+nextReq.duration+settings.get().streaming.stallThreshold;}if(aheadRange.start<aheadRange.end&&aheadRange.start<endOfBuffer){clearRanges.push(aheadRange);}}return clearRanges;}function getWorkingTime(){return isNaN(seekTarget)?playbackController.getTime():seekTarget;}function onPlaybackProgression(){if(!replacingBuffer||type===_Constants2.default.FRAGMENTED_TEXT&&textController.isTextEnabled()){updateBufferLevel();}}function onPlaybackStalled(){checkIfSufficientBuffer();}function onPlaybackPlaying(){seekTarget=NaN;checkIfSufficientBuffer();}function getRangeAt(time,tolerance){var ranges=buffer.getAllBufferRanges();var start=0;var end=0;var firstStart=null;var lastEnd=null;var gap=0;var len=void 0,i=void 0;var toler=!isNaN(tolerance)?tolerance:0.15;if(ranges!==null&&ranges!==undefined){for(i=0,len=ranges.length;i<len;i++){start=ranges.start(i);end=ranges.end(i);if(firstStart===null){gap=Math.abs(start-time);if(time>=start&&time<end){// start the range\\nfirstStart=start;lastEnd=end;}else if(gap<=toler){// start the range even though the buffer does not contain time 0\\nfirstStart=start;lastEnd=end;}}else{gap=start-lastEnd;if(gap<=toler){// the discontinuity is smaller than the tolerance, combine the ranges\\nlastEnd=end;}else{break;}}}if(firstStart!==null){return{start:firstStart,end:lastEnd};}}return null;}function getBufferLength(time,tolerance){var range=void 0,length=void 0;// Consider gap/discontinuity limit as tolerance\\nif(settings.get().streaming.jumpGaps){tolerance=settings.get().streaming.smallGapLimit;}range=getRangeAt(time,tolerance);if(range===null){length=0;}else{length=range.end-time;}return length;}function updateBufferLevel(){if(playbackController){bufferLevel=getBufferLength(getWorkingTime()||0);triggerEvent(_Events2.default.BUFFER_LEVEL_UPDATED,{bufferLevel:bufferLevel});checkIfSufficientBuffer();}}function checkIfBufferingCompleted(){var isLastIdxAppended=maxAppendedIndex>=lastIndex-1;// Handles 0 and non 0 based request index\\nif(isLastIdxAppended&&!isBufferingCompleted&&buffer.discharge===undefined){isBufferingCompleted=true;logger.debug('checkIfBufferingCompleted trigger BUFFERING_COMPLETED for '+type);triggerEvent(_Events2.default.BUFFERING_COMPLETED);}}function checkIfSufficientBuffer(){// No need to check buffer if type is not audio or video (for example if several errors occur during text parsing, so that the buffer cannot be filled, no error must occur on video playback)\\nif(type!==_Constants2.default.AUDIO&&type!==_Constants2.default.VIDEO)return;if(seekClearedBufferingCompleted&&!isBufferingCompleted&&bufferLevel>0&&playbackController&&playbackController.getTimeToStreamEnd()-bufferLevel<BUFFERING_COMPLETED_THRESHOLD){seekClearedBufferingCompleted=false;isBufferingCompleted=true;logger.debug('checkIfSufficientBuffer trigger BUFFERING_COMPLETED for type '+type);triggerEvent(_Events2.default.BUFFERING_COMPLETED);}// When the player is working in low latency mode, the buffer is often below settings.get().streaming.stallThreshold.\\n// So, when in low latency mode, change dash.js behavior so it notifies a stall just when\\n// buffer reach 0 seconds\\nif((!settings.get().streaming.lowLatencyEnabled&&bufferLevel<settings.get().streaming.stallThreshold||bufferLevel===0)&&!isBufferingCompleted){notifyBufferStateChanged(_MetricsConstants2.default.BUFFER_EMPTY);}else{if(isBufferingCompleted||bufferLevel>=streamInfo.manifestInfo.minBufferTime){notifyBufferStateChanged(_MetricsConstants2.default.BUFFER_LOADED);}}}function notifyBufferStateChanged(state){if(bufferState===state||state===_MetricsConstants2.default.BUFFER_EMPTY&&playbackController.getTime()===0||// Don't trigger BUFFER_EMPTY if it's initial loading\\ntype===_Constants2.default.FRAGMENTED_TEXT&&!textController.isTextEnabled()){return;}bufferState=state;triggerEvent(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,{state:state});triggerEvent(state===_MetricsConstants2.default.BUFFER_LOADED?_Events2.default.BUFFER_LOADED:_Events2.default.BUFFER_EMPTY);logger.debug(state===_MetricsConstants2.default.BUFFER_LOADED?'Got enough buffer to start':'Waiting for more buffer before starting playback');}/* prune buffer on our own in background to avoid browsers pruning buffer silently */function pruneBuffer(){if(!buffer||type===_Constants2.default.FRAGMENTED_TEXT){return;}if(!isBufferingCompleted){clearBuffers(getClearRanges());}}function getClearRanges(){var clearRanges=[];var ranges=buffer.getAllBufferRanges();if(!ranges||ranges.length===0){return clearRanges;}var currentTime=playbackController.getTime();var startRangeToKeep=Math.max(0,currentTime-settings.get().streaming.bufferToKeep);var currentTimeRequest=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTime,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];// Ensure we keep full range of current fragment\\nif(currentTimeRequest){startRangeToKeep=Math.min(currentTimeRequest.startTime,startRangeToKeep);}else if(currentTime===0&&playbackController.getIsDynamic()){// Don't prune before the live stream starts, it messes with low latency\\nreturn[];}if(ranges.start(0)<=startRangeToKeep){var behindRange={start:0,end:startRangeToKeep};for(var i=0;i<ranges.length&&ranges.end(i)<=startRangeToKeep;i++){behindRange.end=ranges.end(i);}if(behindRange.start<behindRange.end){clearRanges.push(behindRange);}}return clearRanges;}function clearBuffers(ranges){if(!ranges||!buffer||ranges.length===0)return;pendingPruningRanges.push.apply(pendingPruningRanges,ranges);if(isPruningInProgress){return;}clearNextRange();}function clearNextRange(){// If there's nothing to prune reset state\\nif(pendingPruningRanges.length===0||!buffer){logger.debug('Nothing to prune, halt pruning');pendingPruningRanges=[];isPruningInProgress=false;return;}var sourceBuffer=buffer.getBuffer();// If there's nothing buffered any pruning is invalid, so reset our state\\nif(!sourceBuffer||!sourceBuffer.buffered||sourceBuffer.buffered.length===0){logger.debug('SourceBuffer is empty (or does not exist), halt pruning');pendingPruningRanges=[];isPruningInProgress=false;return;}var range=pendingPruningRanges.shift();logger.debug('Removing buffer from:',range.start,'to',range.end);isPruningInProgress=true;// If removing buffer ahead current playback position, update maxAppendedIndex\\nvar currentTime=playbackController.getTime();if(currentTime<range.end){isBufferingCompleted=false;maxAppendedIndex=0;}buffer.remove(range.start,range.end,range.force);}function onRemoved(e){if(buffer!==e.buffer)return;logger.debug('onRemoved buffer from:',e.from,'to',e.to);var ranges=buffer.getAllBufferRanges();showBufferRanges(ranges);if(pendingPruningRanges.length===0){isPruningInProgress=false;}if(e.unintended){logger.warn('Detected unintended removal from:',e.from,'to',e.to,'setting index handler time to',e.from);triggerEvent(_Events2.default.SEEK_TARGET,{time:e.from,mediaType:type,streamId:streamInfo.id});}if(isPruningInProgress){clearNextRange();}else{if(!replacingBuffer){updateBufferLevel();}else{replacingBuffer=false;if(mediaChunk){appendToBuffer(mediaChunk);}}triggerEvent(_Events2.default.BUFFER_CLEARED,{from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:hasEnoughSpaceToAppend(),quotaExceeded:isQuotaExceeded});}}function updateBufferTimestampOffset(representationInfo){if(!representationInfo||representationInfo.MSETimeOffset===undefined)return;// Each track can have its own @presentationTimeOffset, so we should set the offset\\n// if it has changed after switching the quality or updating an mpd\\nif(buffer&&buffer.updateTimestampOffset){buffer.updateTimestampOffset(representationInfo.MSETimeOffset);}}function updateAppendWindow(){if(buffer&&!isBufferingCompleted){buffer.updateAppendWindow(streamInfo);}}function onDataUpdateCompleted(e){if(e.error||isBufferingCompleted)return;updateBufferTimestampOffset(e.currentRepresentation);}function onStreamCompleted(e){lastIndex=e.request.index;checkIfBufferingCompleted();}function onCurrentTrackChanged(e){if(e.newMediaInfo.streamInfo.id!==streamInfo.id||e.newMediaInfo.type!==type)return;var ranges=buffer&&buffer.getAllBufferRanges();if(!ranges)return;logger.info('Track change asked');if(mediaController.getSwitchMode(type)===_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE){if(ranges&&ranges.length>0&&playbackController.getTimeToStreamEnd()>settings.get().streaming.stallThreshold){isBufferingCompleted=false;lastIndex=Number.POSITIVE_INFINITY;}}}function onWallclockTimeUpdated(){wallclockTicked++;var secondsElapsed=wallclockTicked*(settings.get().streaming.wallclockTimeUpdateInterval/1000);if(secondsElapsed>=settings.get().streaming.bufferPruningInterval){wallclockTicked=0;pruneBuffer();}}function onPlaybackRateChanged(){checkIfSufficientBuffer();}function getBuffer(){return buffer;}function setBuffer(newBuffer){buffer=newBuffer;}function getBufferLevel(){return bufferLevel;}function setMediaSource(value,mediaInfo){mediaSource=value;if(buffer&&mediaInfo){//if we have a prebuffer, we should prepare to discharge it, and make a new sourceBuffer ready\\nif(typeof buffer.discharge==='function'){dischargeBuffer=buffer;createBuffer(mediaInfo);}}}function getMediaSource(){return mediaSource;}function replaceBuffer(){replacingBuffer=true;}function getIsBufferingCompleted(){return isBufferingCompleted;}function getIsPruningInProgress(){return isPruningInProgress;}function getTotalBufferedTime(){var ranges=buffer.getAllBufferRanges();var totalBufferedTime=0;var ln=void 0,i=void 0;if(!ranges)return totalBufferedTime;for(i=0,ln=ranges.length;i<ln;i++){totalBufferedTime+=ranges.end(i)-ranges.start(i);}return totalBufferedTime;}function hasEnoughSpaceToAppend(){var totalBufferedTime=getTotalBufferedTime();return totalBufferedTime<criticalBufferLevel;}function triggerEvent(eventType,data){var payload=data||{};eventBus.trigger(eventType,payload,{streamId:streamInfo.id,mediaType:type});}function resetInitialSettings(errored,keepBuffers){criticalBufferLevel=Number.POSITIVE_INFINITY;bufferState=undefined;requiredQuality=_AbrController2.default.QUALITY_DEFAULT;lastIndex=Number.POSITIVE_INFINITY;maxAppendedIndex=0;appendedBytesInfo=null;isBufferingCompleted=false;isPruningInProgress=false;isQuotaExceeded=false;seekClearedBufferingCompleted=false;bufferLevel=0;wallclockTicked=0;pendingPruningRanges=[];seekTarget=NaN;if(buffer){if(!errored){buffer.abort();}buffer.reset(keepBuffers);buffer=null;}replacingBuffer=false;}function reset(errored,keepBuffers){eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.off(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,this);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,this);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,this);eventBus.off(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.off(_Events2.default.PLAYBACK_PLAYING,onPlaybackPlaying,this);eventBus.off(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.off(_Events2.default.PLAYBACK_SEEKED,onPlaybackSeeked,this);eventBus.off(_Events2.default.PLAYBACK_STALLED,onPlaybackStalled,this);eventBus.off(_Events2.default.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,this);eventBus.off(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,this);eventBus.off(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,onRemoved,this);resetInitialSettings(errored,keepBuffers);}instance={initialize:initialize,getStreamId:getStreamId,getType:getType,getBufferControllerType:getBufferControllerType,getRepresentationInfo:getRepresentationInfo,createBuffer:createBuffer,dischargePreBuffer:dischargePreBuffer,getBuffer:getBuffer,setBuffer:setBuffer,getBufferLevel:getBufferLevel,getRangeAt:getRangeAt,setMediaSource:setMediaSource,getMediaSource:getMediaSource,appendInitSegment:appendInitSegment,replaceBuffer:replaceBuffer,getIsBufferingCompleted:getIsBufferingCompleted,getIsPruningInProgress:getIsPruningInProgress,reset:reset,updateAppendWindow:updateAppendWindow};setup();return instance;}BufferController.__dashjs_factory_name=BUFFER_CONTROLLER_TYPE;exports.default=_FactoryMaker2.default.getClassFactory(BufferController);\\n//# sourceMappingURL=BufferController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _MediaPlayerEvents=__webpack_require__(/*! ../../streaming/MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _XHRLoader=__webpack_require__(/*! ../net/XHRLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\\\");var _XHRLoader2=_interopRequireDefault(_XHRLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function EventController(){var MPD_RELOAD_SCHEME='urn:mpeg:dash:event:2012';var MPD_RELOAD_VALUE=1;var MPD_CALLBACK_SCHEME='urn:mpeg:dash:event:callback:2015';var MPD_CALLBACK_VALUE=1;var REFRESH_DELAY=100;var REMAINING_EVENTS_THRESHOLD=300;var EVENT_HANDLED_STATES={DISCARDED:'discarded',UPDATED:'updated',ADDED:'added'};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,inlineEvents=void 0,// Holds all Inline Events not triggered yet\\ninbandEvents=void 0,// Holds all Inband Events not triggered yet\\neventInterval=void 0,// variable holding the setInterval\\nlastEventTimerCall=void 0,manifestUpdater=void 0,playbackController=void 0,eventHandlingInProgress=void 0,isStarted=void 0;/**\\n     * Internal setup when class is instanced\\n     */function _setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);_resetInitialSettings();}/**\\n     * Checks if the provded configuration is valid\\n     */function checkConfig(){if(!manifestUpdater||!playbackController){throw new Error('setConfig function has to be called previously');}}/**\\n     * Reset to initial settings\\n     */function _resetInitialSettings(){isStarted=false;inlineEvents={};// Format inlineEvents[schemeIdUri]\\ninbandEvents={};// Format inlineEvents[schemeIdUri]\\neventInterval=null;eventHandlingInProgress=false;lastEventTimerCall=Date.now()/1000;}/**\\n     * Stops the EventController by clearing the event interval\\n     */function _stop(){try{if(eventInterval!==null&&isStarted){clearInterval(eventInterval);eventInterval=null;isStarted=false;_onStopEventController();}}catch(e){throw e;}}/**\\n     * Starts the interval function of the EventController\\n     */function start(){try{checkConfig();logger.debug('Start Event Controller');if(!isStarted&&!isNaN(REFRESH_DELAY)){isStarted=true;eventInterval=setInterval(_onEventTimer,REFRESH_DELAY);}}catch(e){throw e;}}/**\\n     * Add MPD events to the list of events.\\n     * Events that are not in the MPD anymore but not triggered yet will still be deleted.\\n     * Existing events might get updated.\\n     * @param {Array.<Object>} values\\n     */function addInlineEvents(values){try{checkConfig();if(values){for(var i=0;i<values.length;i++){var event=values[i];var result=_addOrUpdateEvent(event,inlineEvents,true);if(result===EVENT_HANDLED_STATES.ADDED){logger.debug('Added inline event with id '+event.id);// If we see the event for the first time we trigger it in onReceive mode\\n_startEvent(event,values,_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE);}else if(result===EVENT_HANDLED_STATES.UPDATED){logger.debug('Updated inline event with id '+event.id);}}}logger.debug('Added '+values.length+' inline events');}catch(e){throw e;}}/**\\n     * Add EMSG events to the list of events\\n     * Messages with the same id within the scope of the same scheme_id_uri and value pair are equivalent , i.e. processing of any one event message box with the same id is sufficient.\\n     * @param {Array.<Object>} values\\n     */function addInbandEvents(values){try{checkConfig();for(var i=0;i<values.length;i++){var event=values[i];var result=_addOrUpdateEvent(event,inbandEvents,false);if(result===EVENT_HANDLED_STATES.ADDED){if(event.eventStream.schemeIdUri===MPD_RELOAD_SCHEME&&inbandEvents[event.id]===undefined){_handleManifestReloadEvent(event);}logger.debug('Added inband event with id '+event.id);_startEvent(event,values,_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE);}else{logger.debug('Inband event with scheme_id_uri '+event.eventStream.schemeIdUri+', value '+event.eventStream.value+' and id '+event.id+' was ignored because it has been added before.');}}_onEventTimer();}catch(e){throw e;}}/**\\n     * Adds or updates an event to/in the list of events\\n     * @param {object} event\\n     * @param {object} events\\n     * @param {boolean} shouldOverwriteExistingEvents\\n     * @return {string}\\n     * @private\\n     */function _addOrUpdateEvent(event,events){var shouldOverwriteExistingEvents=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var schemeIdUri=event.eventStream.schemeIdUri;var value=event.eventStream.value;var id=event.id;var eventState=EVENT_HANDLED_STATES.DISCARDED;if(!events[schemeIdUri]){events[schemeIdUri]=[];}var indexOfExistingEvent=events[schemeIdUri].findIndex(function(e){return(!value||e.eventStream.value&&e.eventStream.value===value)&&e.id===id;});if(indexOfExistingEvent===-1){events[schemeIdUri].push(event);eventState=EVENT_HANDLED_STATES.ADDED;}else if(shouldOverwriteExistingEvents){events[schemeIdUri][indexOfExistingEvent]=event;eventState=EVENT_HANDLED_STATES.UPDATED;}return eventState;}/**\\n     * Triggers an MPD reload\\n     * @param {object} event\\n     * @private\\n     */function _handleManifestReloadEvent(event){try{if(event.eventStream.value==MPD_RELOAD_VALUE){var validUntil=event.calculatedPresentationTime;var newDuration=void 0;if(event.calculatedPresentationTime==0xFFFFFFFF){//0xFF... means remaining duration unknown\\nnewDuration=NaN;}else{newDuration=event.calculatedPresentationTime+event.duration;}//logger.info('Manifest validity changed: Valid until: ' + validUntil + '; remaining duration: ' + newDuration);\\neventBus.trigger(_MediaPlayerEvents2.default.MANIFEST_VALIDITY_CHANGED,{id:event.id,validUntil:validUntil,newDuration:newDuration,newManifestValidAfter:NaN//event.message_data - this is an arraybuffer with a timestring in it, but not used yet\\n},{mode:_MediaPlayerEvents2.default.EVENT_MODE_ON_START});}}catch(e){}}/**\\n     * Iterate through the eventList and trigger the events\\n     */function _onEventTimer(){try{if(!eventHandlingInProgress){eventHandlingInProgress=true;var currentVideoTime=playbackController.getTime();var presentationTimeThreshold=currentVideoTime-lastEventTimerCall;// For dynamic streams lastEventTimeCall will be large in the first iteration. Avoid firing all events at once.\\npresentationTimeThreshold=lastEventTimerCall>0?Math.max(0,presentationTimeThreshold):0;_triggerEvents(inbandEvents,presentationTimeThreshold,currentVideoTime);_triggerEvents(inlineEvents,presentationTimeThreshold,currentVideoTime);lastEventTimerCall=currentVideoTime;eventHandlingInProgress=false;}}catch(e){eventHandlingInProgress=false;}}/**\\n     * When the EventController is stopped this callback is triggered. Starts the remaining events.\\n     * @private\\n     */function _onStopEventController(){try{// EventController might be stopped before the period is over. Before we stop the event controller we check for events that needs to be triggered at the period boundary.\\n_triggerRemainingEvents(inbandEvents);_triggerRemainingEvents(inlineEvents);}catch(e){}}/**\\n     * Iterate over a list of events and trigger the ones for which the presentation time is within the current timing interval\\n     * @param {object} events\\n     * @param {number} presentationTimeThreshold\\n     * @param {number} currentVideoTime\\n     * @private\\n     */function _triggerEvents(events,presentationTimeThreshold,currentVideoTime){try{var callback=function callback(event){if(event!==undefined){var duration=!isNaN(event.duration)?event.duration:0;// The event is either about to start or has already been started and we are within its duration\\nif(event.calculatedPresentationTime<=currentVideoTime&&event.calculatedPresentationTime+presentationTimeThreshold+duration>=currentVideoTime){_startEvent(event,events,_MediaPlayerEvents2.default.EVENT_MODE_ON_START);}else if(_eventHasExpired(currentVideoTime,duration+presentationTimeThreshold,event.calculatedPresentationTime)||_eventIsInvalid(event)){logger.debug('Deleting event '+event.id+' as it is expired or invalid');_removeEvent(events,event);}}};_iterateAndTriggerCallback(events,callback);}catch(e){}}/**\\n     * Triggers the remaining events after the EventController has been stopped\\n     * @param {object} events\\n     * @private\\n     */function _triggerRemainingEvents(events){try{var currentTime=playbackController.getTime();var callback=function callback(event){var periodDuration=event.eventStream&&event.eventStream.period&&!isNaN(event.eventStream.period.duration)?event.eventStream.period.duration:NaN;var periodStart=event.eventStream&&event.eventStream.period&&!isNaN(event.eventStream.period.start)?event.eventStream.period.start:NaN;if(isNaN(periodDuration)||isNaN(periodStart)){return;}var calculatedPresentationTimeInSeconds=event.calculatedPresentationTime;if(Math.abs(calculatedPresentationTimeInSeconds-currentTime)<REMAINING_EVENTS_THRESHOLD){_startEvent(event,events,_MediaPlayerEvents2.default.EVENT_MODE_ON_START);}};_iterateAndTriggerCallback(events,callback());}catch(e){}}/**\\n     * Iterates over the inline/inband event object and triggers a callback for each event\\n     * @param {object} events\\n     * @param {function} callback\\n     * @private\\n     */function _iterateAndTriggerCallback(events,callback){try{if(events){var schemeIdUris=Object.keys(events);for(var i=0;i<schemeIdUris.length;i++){var schemeIdEvents=events[schemeIdUris[i]];schemeIdEvents.forEach(function(event){if(event!==undefined){callback(event);}});}}}catch(e){}}/**\\n     * Checks if an event is expired. For instance if the presentationTime + the duration of an event are smaller than the current video time.\\n     * @param {number} currentVideoTime\\n     * @param {number} threshold\\n     * @param {number} calculatedPresentationTimeInSeconds\\n     * @return {boolean}\\n     * @private\\n     */function _eventHasExpired(currentVideoTime,threshold,calculatedPresentationTimeInSeconds){try{return currentVideoTime-threshold>calculatedPresentationTimeInSeconds;}catch(e){return false;}}/**\\n     * Checks if an event is invalid. This is the case if the end time of the parent period is smaller than the presentation time of the event.\\n     * @param {object} event\\n     * @return {boolean}\\n     * @private\\n     */function _eventIsInvalid(event){try{var periodEndTime=event.eventStream.period.start+event.eventStream.period.duration;return event.calculatedPresentationTime>periodEndTime;}catch(e){return false;}}/**\\n     * Starts an event. Depending on the schemeIdUri we distinguis between\\n     * - MPD Reload events\\n     * - MPD Callback events\\n     * - Events to be dispatched to the application\\n     * Events should be removed from the list before beeing triggered. Otherwise the event handler might cause an error and the remove function will not be called.\\n     * @param {object} event\\n     * @param {object} events\\n     * @param {String} mode\\n     * @private\\n     */function _startEvent(event,events,mode){try{var currentVideoTime=playbackController.getTime();var eventId=event.id;if(mode===_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE){logger.debug('Received event '+eventId);eventBus.trigger(event.eventStream.schemeIdUri,{event:event},{mode:mode});return;}if(event.eventStream.schemeIdUri===MPD_RELOAD_SCHEME&&event.eventStream.value===MPD_RELOAD_VALUE){if(event.duration!==0||event.presentationTimeDelta!==0){//If both are set to zero, it indicates the media is over at this point. Don't reload the manifest.\\nlogger.debug('Starting manifest refresh event '+eventId+' at '+currentVideoTime);_removeEvent(events,event);_refreshManifest();}}else if(event.eventStream.schemeIdUri===MPD_CALLBACK_SCHEME&&event.eventStream.value===MPD_CALLBACK_VALUE){logger.debug('Starting callback event '+eventId+' at '+currentVideoTime);_removeEvent(events,event);_sendCallbackRequest(event.messageData);}else{logger.debug('Starting event '+eventId+' at '+currentVideoTime);_removeEvent(events,event);eventBus.trigger(event.eventStream.schemeIdUri,{event:event},{mode:mode});}}catch(e){}}/**\\n     * Removes an event from the list. If this is the last event of type \\\"schemeIdUri\\\"  the corresponding schemeIdUri Object in the list of events is deleted.\\n     * @param {object} events\\n     * @param {object} event\\n     * @private\\n     */function _removeEvent(events,event){var schemeIdUri=event.eventStream.schemeIdUri;var value=event.eventStream.value;var id=event.id;events[schemeIdUri]=events[schemeIdUri].filter(function(e){return value&&e.eventStream.value&&e.eventStream.value!==value||e.id!==id;});if(events[schemeIdUri].length===0){delete events[schemeIdUri];}}/**\\n     * Refresh the manifest\\n     * @private\\n     */function _refreshManifest(){try{checkConfig();manifestUpdater.refreshManifest();}catch(e){}}/**\\n     * Send a callback request\\n     * @param {String} url\\n     * @private\\n     */function _sendCallbackRequest(url){try{var loader=(0,_XHRLoader2.default)(context).create({});loader.load({method:'get',url:url,request:{responseType:'arraybuffer'}});}catch(e){throw e;}}/**\\n     * Set the config of the EventController\\n     * @param {object} config\\n     */function setConfig(config){try{if(!config){return;}if(config.manifestUpdater){manifestUpdater=config.manifestUpdater;}if(config.playbackController){playbackController=config.playbackController;}}catch(e){throw e;}}/**\\n     * Returns all inline events that have not been triggered yet\\n     * @return {object}\\n     */function getInlineEvents(){return inlineEvents;}/**\\n     * Returns all inband events that have not been triggered yet\\n     * @return {object}\\n     */function getInbandEvents(){return inbandEvents;}/**\\n     * Stop the EventController and reset all initial settings\\n     */function reset(){_stop();_resetInitialSettings();}instance={addInlineEvents:addInlineEvents,addInbandEvents:addInbandEvents,getInbandEvents:getInbandEvents,getInlineEvents:getInlineEvents,start:start,setConfig:setConfig,reset:reset};_setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */EventController.__dashjs_factory_name='EventController';exports.default=_FactoryMaker2.default.getSingletonFactory(EventController);\\n//# sourceMappingURL=EventController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DataChunk=__webpack_require__(/*! ../vo/DataChunk */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js\\\");var _DataChunk2=_interopRequireDefault(_DataChunk);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _FragmentLoader=__webpack_require__(/*! ../FragmentLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js\\\");var _FragmentLoader2=_interopRequireDefault(_FragmentLoader);var _RequestModifier=__webpack_require__(/*! ../utils/RequestModifier */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\\\");var _RequestModifier2=_interopRequireDefault(_RequestModifier);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function FragmentController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var errHandler=config.errHandler;var mediaPlayerModel=config.mediaPlayerModel;var dashMetrics=config.dashMetrics;var debug=(0,_Debug2.default)(context).getInstance();var streamInfo=config.streamInfo;var instance=void 0,logger=void 0,fragmentModels=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,instance);eventBus.on(_Events2.default.FRAGMENT_LOADING_PROGRESS,onFragmentLoadingCompleted,instance);}function getStreamId(){return streamInfo.id;}function getModel(type){var model=fragmentModels[type];if(!model){model=(0,_FragmentModel2.default)(context).create({streamInfo:streamInfo,type:type,dashMetrics:dashMetrics,fragmentLoader:(0,_FragmentLoader2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,requestModifier:(0,_RequestModifier2.default)(context).getInstance(),settings:config.settings,boxParser:config.boxParser,eventBus:eventBus,events:_Events2.default,errors:_Errors2.default,dashConstants:config.dashConstants,urlUtils:config.urlUtils}),debug:debug,eventBus:eventBus,events:_Events2.default});fragmentModels[type]=model;}return model;}function resetInitialSettings(){for(var model in fragmentModels){fragmentModels[model].reset();}fragmentModels={};}function reset(){eventBus.off(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,this);eventBus.off(_Events2.default.FRAGMENT_LOADING_PROGRESS,onFragmentLoadingCompleted,this);resetInitialSettings();}function createDataChunk(bytes,request,streamId,endFragment){var chunk=new _DataChunk2.default();chunk.streamId=streamId;chunk.mediaInfo=request.mediaInfo;chunk.segmentType=request.type;chunk.start=request.startTime;chunk.duration=request.duration;chunk.end=chunk.start+chunk.duration;chunk.bytes=bytes;chunk.index=request.index;chunk.quality=request.quality;chunk.representationId=request.representationId;chunk.endFragment=endFragment;return chunk;}function onFragmentLoadingCompleted(e){// Event propagation may have been stopped (see MssHandler)\\nif(!e.sender)return;var request=e.request;var bytes=e.response;var isInit=request.isInitializationRequest();var strInfo=request.mediaInfo.streamInfo;if(e.error){if(request.mediaType===_Constants2.default.AUDIO||request.mediaType===_Constants2.default.VIDEO||request.mediaType===_Constants2.default.FRAGMENTED_TEXT){// add service location to blacklist controller - only for audio or video. text should not set errors\\neventBus.trigger(_Events2.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:e.request.serviceLocation});}}if(!bytes||!strInfo){logger.warn('No '+request.mediaType+' bytes to push or stream is inactive.');return;}var chunk=createDataChunk(bytes,request,streamInfo.id,e.type!==_Events2.default.FRAGMENT_LOADING_PROGRESS);eventBus.trigger(isInit?_Events2.default.INIT_FRAGMENT_LOADED:_Events2.default.MEDIA_FRAGMENT_LOADED,{chunk:chunk,request:request},{streamId:strInfo.id,mediaType:request.mediaType});}instance={getStreamId:getStreamId,getModel:getModel,reset:reset};setup();return instance;}FragmentController.__dashjs_factory_name='FragmentController';exports.default=_FactoryMaker2.default.getClassFactory(FragmentController);\\n//# sourceMappingURL=FragmentController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var GAP_HANDLER_INTERVAL=100;var THRESHOLD_TO_STALLS=30;var GAP_THRESHOLD=0.1;function GapController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,lastPlaybackTime=void 0,settings=void 0,wallclockTicked=void 0,gapHandlerInterval=void 0,lastGapJumpPosition=void 0,playbackController=void 0,streamController=void 0,videoModel=void 0,timelineConverter=void 0,adapter=void 0,jumpTimeoutHandler=void 0,logger=void 0;function initialize(){registerEvents();}function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}function reset(){stopGapHandler();unregisterEvents();resetInitialSettings();}function resetInitialSettings(){gapHandlerInterval=null;lastGapJumpPosition=NaN;wallclockTicked=0;jumpTimeoutHandler=null;}function setConfig(config){if(!config){return;}if(config.settings){settings=config.settings;}if(config.playbackController){playbackController=config.playbackController;}if(config.streamController){streamController=config.streamController;}if(config.videoModel){videoModel=config.videoModel;}if(config.timelineConverter){timelineConverter=config.timelineConverter;}if(config.adapter){adapter=config.adapter;}}function registerEvents(){eventBus.on(_Events2.default.WALLCLOCK_TIME_UPDATED,_onWallclockTimeUpdated,this);eventBus.on(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,this);eventBus.on(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,instance);}function unregisterEvents(){eventBus.off(_Events2.default.WALLCLOCK_TIME_UPDATED,_onWallclockTimeUpdated,this);eventBus.off(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,this);eventBus.off(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,instance);}function onBytesAppended(){if(!gapHandlerInterval){startGapHandler();}}function _onPlaybackSeeking(){if(jumpTimeoutHandler){clearTimeout(jumpTimeoutHandler);jumpTimeoutHandler=null;}}function _onWallclockTimeUpdated()/*e*/{if(!_shouldCheckForGaps()){return;}wallclockTicked++;if(wallclockTicked>=THRESHOLD_TO_STALLS){var currentTime=playbackController.getTime();if(lastPlaybackTime===currentTime){jumpGap(currentTime,true);}else{lastPlaybackTime=currentTime;lastGapJumpPosition=NaN;}wallclockTicked=0;}}function _shouldCheckForGaps(){return settings.get().streaming.jumpGaps&&streamController.getActiveStreamProcessors().length>0&&(!playbackController.isSeeking()||streamController.hasStreamFinishedBuffering(streamController.getActiveStream()))&&!playbackController.isPaused()&&!streamController.getIsStreamSwitchInProgress()&&!streamController.getHasMediaOrIntialisationError();}function getNextRangeIndex(ranges,currentTime){try{if(!ranges||ranges.length<=1&&currentTime>0){return NaN;}var nextRangeIndex=NaN;var j=0;while(isNaN(nextRangeIndex)&&j<ranges.length){var rangeEnd=j>0?ranges.end(j-1):0;if(currentTime<ranges.start(j)&&rangeEnd-currentTime<GAP_THRESHOLD){nextRangeIndex=j;}j+=1;}return nextRangeIndex;}catch(e){return null;}}function startGapHandler(){try{if(!gapHandlerInterval){logger.debug('Starting the gap controller');gapHandlerInterval=setInterval(function(){if(!_shouldCheckForGaps()){return;}var currentTime=playbackController.getTime();jumpGap(currentTime);},GAP_HANDLER_INTERVAL);}}catch(e){}}function stopGapHandler(){logger.debug('Stopping the gap controller');if(gapHandlerInterval){clearInterval(gapHandlerInterval);gapHandlerInterval=null;}}function jumpGap(currentTime){var playbackStalled=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var smallGapLimit=settings.get().streaming.smallGapLimit;var jumpLargeGaps=settings.get().streaming.jumpLargeGaps;var ranges=videoModel.getBufferRange();var nextRangeIndex=void 0;var seekToPosition=NaN;var jumpToStreamEnd=false;// Get the range just after current time position\\nnextRangeIndex=getNextRangeIndex(ranges,currentTime);if(!isNaN(nextRangeIndex)){var start=ranges.start(nextRangeIndex);var gap=start-currentTime;if(gap>0&&(gap<=smallGapLimit||jumpLargeGaps)){seekToPosition=start;}}// Playback has stalled before period end. We seek to the end of the period\\nvar timeToStreamEnd=playbackController.getTimeToStreamEnd();if(isNaN(seekToPosition)&&playbackStalled&&isFinite(timeToStreamEnd)&&!isNaN(timeToStreamEnd)&&timeToStreamEnd<smallGapLimit){seekToPosition=parseFloat(playbackController.getStreamEndTime().toFixed(5));jumpToStreamEnd=true;}if(seekToPosition>0&&lastGapJumpPosition!==seekToPosition&&seekToPosition>currentTime&&!jumpTimeoutHandler){var timeUntilGapEnd=seekToPosition-currentTime;if(jumpToStreamEnd){logger.warn('Jumping to end of stream because of gap from '+currentTime+' to '+seekToPosition+'. Gap duration: '+timeUntilGapEnd);eventBus.trigger(_Events2.default.GAP_CAUSED_SEEK_TO_PERIOD_END,{seekTime:seekToPosition,duration:timeUntilGapEnd});}else{var isDynamic=playbackController.getIsDynamic();var _start=nextRangeIndex>0?ranges.end(nextRangeIndex-1):currentTime;var timeToWait=!isDynamic?0:timeUntilGapEnd*1000;jumpTimeoutHandler=window.setTimeout(function(){playbackController.seek(seekToPosition,true,true);logger.warn('Jumping gap starting at '+_start+' and ending at '+seekToPosition+'. Jumping by: '+timeUntilGapEnd);eventBus.trigger(_Events2.default.GAP_CAUSED_INTERNAL_SEEK,{seekTime:seekToPosition,duration:timeUntilGapEnd});jumpTimeoutHandler=null;},timeToWait);}lastGapJumpPosition=seekToPosition;}}instance={reset:reset,setConfig:setConfig,initialize:initialize};setup();return instance;}GapController.__dashjs_factory_name='GapController';exports.default=_FactoryMaker2.default.getSingletonFactory(GapController);\\n//# sourceMappingURL=GapController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MediaController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,tracks=void 0,settings=void 0,initialSettings=void 0,domStorage=void 0;var validTrackSwitchModes=[_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,_Constants2.default.TRACK_SWITCH_MODE_NEVER_REPLACE];var validTrackSelectionModes=[_Constants2.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,_Constants2.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY,_Constants2.default.TRACK_SELECTION_MODE_WIDEST_RANGE];function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}/**\\n     * @param {string} type\\n     * @param {StreamInfo} streamInfo\\n     * @memberof MediaController#\\n     */function checkInitialMediaSettingsForType(type,streamInfo){var settings=getInitialSettings(type);var tracksForType=getTracksFor(type,streamInfo);var tracks=[];if(!settings){settings=domStorage.getSavedMediaSettings(type);setInitialSettings(type,settings);}if(!tracksForType||tracksForType.length===0)return;if(settings){tracksForType.forEach(function(track){if(matchSettings(settings,track)){tracks.push(track);}});}if(tracks.length===0){setTrack(this.selectInitialTrack(type,tracksForType),true);}else{if(tracks.length>1){setTrack(this.selectInitialTrack(type,tracks));}else{setTrack(tracks[0]);}}}/**\\n     * @param {MediaInfo} track\\n     * @memberof MediaController#\\n     */function addTrack(track){if(!track)return;var mediaType=track.type;if(!isMultiTrackSupportedByType(mediaType))return;var streamId=track.streamInfo.id;if(!tracks[streamId]){tracks[streamId]=createTrackInfo();}var mediaTracks=tracks[streamId][mediaType].list;for(var i=0,len=mediaTracks.length;i<len;++i){//track is already set.\\nif(isTracksEqual(mediaTracks[i],track)){return;}}mediaTracks.push(track);var initSettings=getInitialSettings(mediaType);if(initSettings&&matchSettings(initSettings,track)&&!getCurrentTrackFor(mediaType,track.streamInfo)){setTrack(track);}}/**\\n     * @param {string} type\\n     * @param {StreamInfo} streamInfo\\n     * @returns {Array}\\n     * @memberof MediaController#\\n     */function getTracksFor(type,streamInfo){if(!type||!streamInfo)return[];var id=streamInfo.id;if(!tracks[id]||!tracks[id][type])return[];return tracks[id][type].list;}/**\\n     * @param {string} type\\n     * @param {StreamInfo} streamInfo\\n     * @returns {Object|null}\\n     * @memberof MediaController#\\n     */function getCurrentTrackFor(type,streamInfo){if(!type||!streamInfo||streamInfo&&!tracks[streamInfo.id])return null;return tracks[streamInfo.id][type].current;}/**\\n     * @param {MediaInfo} track\\n     * @returns {boolean}\\n     * @memberof MediaController#\\n     */function isCurrentTrack(track){if(!track){return false;}var type=track.type;var id=track.streamInfo.id;return tracks[id]&&tracks[id][type]&&isTracksEqual(tracks[id][type].current,track);}/**\\n     * @param {MediaInfo} track\\n     * @param {boolean} noSettingsSave specify if settings must be not be saved\\n     * @memberof MediaController#\\n     */function setTrack(track,noSettingsSave){if(!track||!track.streamInfo)return;var type=track.type;var streamInfo=track.streamInfo;var id=streamInfo.id;var current=getCurrentTrackFor(type,streamInfo);if(!tracks[id]||!tracks[id][type]||isTracksEqual(track,current))return;tracks[id][type].current=track;if(tracks[id][type].current&&!(noSettingsSave&&type===_Constants2.default.FRAGMENTED_TEXT)){eventBus.trigger(_Events2.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:current,newMediaInfo:track,switchMode:getSwitchMode(type)});}if(!noSettingsSave){var _settings=extractSettings(track);if(!_settings||!tracks[id][type].storeLastSettings)return;if(_settings.roles){_settings.role=_settings.roles[0];delete _settings.roles;}if(_settings.accessibility){_settings.accessibility=_settings.accessibility[0];}if(_settings.audioChannelConfiguration){_settings.audioChannelConfiguration=_settings.audioChannelConfiguration[0];}domStorage.setSavedMediaSettings(type,_settings);}}/**\\n     * @param {string} type\\n     * @param {Object} value\\n     * @memberof MediaController#\\n     */function setInitialSettings(type,value){if(!type||!value)return;initialSettings[type]=value;}/**\\n     * @param {string} type\\n     * @returns {Object|null}\\n     * @memberof MediaController#\\n     */function getInitialSettings(type){if(!type)return null;return initialSettings[type];}/**\\n     * @memberof MediaController#\\n     */function saveTextSettingsDisabled(){domStorage.setSavedMediaSettings(_Constants2.default.FRAGMENTED_TEXT,null);}/**\\n     * @param {string} type\\n     * @param {string} mode\\n     * @memberof MediaController#\\n     * @deprecated Please use updateSettings({streaming: { trackSwitchMode: mode } }) instead\\n     */function setSwitchMode(type,mode){logger.warn('deprecated: Please use updateSettings({streaming: { trackSwitchMode: mode } }) instead');var isModeSupported=validTrackSwitchModes.indexOf(mode)!==-1;if(!isModeSupported){logger.warn('Track switch mode is not supported: '+mode);return;}var switchMode={};switchMode[type]=mode;settings.update({streaming:{trackSwitchMode:switchMode}});}/**\\n     * @param {string} type\\n     * @returns {string} mode\\n     * @memberof MediaController#\\n     */function getSwitchMode(type){return settings.get().streaming.trackSwitchMode[type];}/**\\n     * @param {string} mode\\n     * @memberof MediaController#\\n     * @deprecated Please use updateSettings({streaming: { selectionModeForInitialTrack: mode } }) instead\\n     */function setSelectionModeForInitialTrack(mode){logger.warn('deprecated: Please use updateSettings({streaming: { selectionModeForInitialTrack: mode } }) instead');var isModeSupported=validTrackSelectionModes.indexOf(mode)!==-1;if(!isModeSupported){logger.warn('Track selection mode is not supported: '+mode);return;}settings.update({streaming:{selectionModeForInitialTrack:mode}});}/**\\n     * @returns {string} mode\\n     * @memberof MediaController#\\n     */function getSelectionModeForInitialTrack(){return settings.get().streaming.selectionModeForInitialTrack;}/**\\n     * @param {string} type\\n     * @returns {boolean}\\n     * @memberof MediaController#\\n     */function isMultiTrackSupportedByType(type){return type===_Constants2.default.AUDIO||type===_Constants2.default.VIDEO||type===_Constants2.default.TEXT||type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.IMAGE;}/**\\n     * @param {MediaInfo} t1 - first track to compare\\n     * @param {MediaInfo} t2 - second track to compare\\n     * @returns {boolean}\\n     * @memberof MediaController#\\n     */function isTracksEqual(t1,t2){if(!t1&&!t2){return true;}if(!t1||!t2){return false;}var sameId=t1.id===t2.id;var sameViewpoint=t1.viewpoint===t2.viewpoint;var sameLang=t1.lang===t2.lang;var sameRoles=t1.roles.toString()===t2.roles.toString();var sameAccessibility=t1.accessibility.toString()===t2.accessibility.toString();var sameAudioChannelConfiguration=t1.audioChannelConfiguration.toString()===t2.audioChannelConfiguration.toString();return sameId&&sameViewpoint&&sameLang&&sameRoles&&sameAccessibility&&sameAudioChannelConfiguration;}function setConfig(config){if(!config)return;if(config.domStorage){domStorage=config.domStorage;}if(config.settings){settings=config.settings;}}/**\\n     * @memberof MediaController#\\n     */function reset(){tracks={};resetInitialSettings();}function extractSettings(mediaInfo){var settings={lang:mediaInfo.lang,viewpoint:mediaInfo.viewpoint,roles:mediaInfo.roles,accessibility:mediaInfo.accessibility,audioChannelConfiguration:mediaInfo.audioChannelConfiguration};var notEmpty=settings.lang||settings.viewpoint||settings.role&&settings.role.length>0||settings.accessibility&&settings.accessibility.length>0||settings.audioChannelConfiguration&&settings.audioChannelConfiguration.length>0;return notEmpty?settings:null;}function matchSettings(settings,track){var matchLang=!settings.lang||track.lang.match(settings.lang);var matchIndex=settings.index===undefined||settings.index===null||track.index===settings.index;var matchViewPoint=!settings.viewpoint||settings.viewpoint===track.viewpoint;var matchRole=!settings.role||!!track.roles.filter(function(item){return item===settings.role;})[0];var matchAccessibility=!settings.accessibility||!!track.accessibility.filter(function(item){return item===settings.accessibility;})[0];var matchAudioChannelConfiguration=!settings.audioChannelConfiguration||!!track.audioChannelConfiguration.filter(function(item){return item===settings.audioChannelConfiguration;})[0];return matchLang&&matchIndex&&matchViewPoint&&matchRole&&matchAccessibility&&matchAudioChannelConfiguration;}function resetInitialSettings(){initialSettings={audio:null,video:null,fragmentedText:null};}function getTracksWithHighestBitrate(trackArr){var max=0;var result=[];var tmp=void 0;trackArr.forEach(function(track){tmp=Math.max.apply(Math,track.bitrateList.map(function(obj){return obj.bandwidth;}));if(tmp>max){max=tmp;result=[track];}else if(tmp===max){result.push(track);}});return result;}function getTracksWithHighestEfficiency(trackArr){var min=Infinity;var result=[];var tmp=void 0;trackArr.forEach(function(track){var sum=track.bitrateList.reduce(function(acc,obj){var resolution=Math.max(1,obj.width*obj.height);var efficiency=obj.bandwidth/resolution;return acc+efficiency;},0);tmp=sum/track.bitrateList.length;if(tmp<min){min=tmp;result=[track];}else if(tmp===min){result.push(track);}});return result;}function getTracksWithWidestRange(trackArr){var max=0;var result=[];var tmp=void 0;trackArr.forEach(function(track){tmp=track.representationCount;if(tmp>max){max=tmp;result=[track];}else if(tmp===max){result.push(track);}});return result;}function selectInitialTrack(type,tracks){if(type===_Constants2.default.FRAGMENTED_TEXT)return tracks[0];var mode=getSelectionModeForInitialTrack();var tmpArr=[];switch(mode){case _Constants2.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:tmpArr=getTracksWithHighestBitrate(tracks);if(tmpArr.length>1){tmpArr=getTracksWithWidestRange(tmpArr);}break;case _Constants2.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:tmpArr=getTracksWithHighestEfficiency(tracks);if(tmpArr.length>1){tmpArr=getTracksWithHighestBitrate(tmpArr);}break;case _Constants2.default.TRACK_SELECTION_MODE_WIDEST_RANGE:tmpArr=getTracksWithWidestRange(tracks);if(tmpArr.length>1){tmpArr=getTracksWithHighestBitrate(tracks);}break;default:logger.warn('Track selection mode is not supported: '+mode);break;}return tmpArr[0];}function createTrackInfo(){return{audio:{list:[],storeLastSettings:true,current:null},video:{list:[],storeLastSettings:true,current:null},text:{list:[],storeLastSettings:true,current:null},fragmentedText:{list:[],storeLastSettings:true,current:null},image:{list:[],storeLastSettings:true,current:null}};}instance={checkInitialMediaSettingsForType:checkInitialMediaSettingsForType,addTrack:addTrack,getTracksFor:getTracksFor,getCurrentTrackFor:getCurrentTrackFor,isCurrentTrack:isCurrentTrack,setTrack:setTrack,setInitialSettings:setInitialSettings,getInitialSettings:getInitialSettings,setSwitchMode:setSwitchMode,getSwitchMode:getSwitchMode,selectInitialTrack:selectInitialTrack,getTracksWithHighestBitrate:getTracksWithHighestBitrate,getTracksWithHighestEfficiency:getTracksWithHighestEfficiency,getTracksWithWidestRange:getTracksWithWidestRange,setSelectionModeForInitialTrack:setSelectionModeForInitialTrack,getSelectionModeForInitialTrack:getSelectionModeForInitialTrack,isMultiTrackSupportedByType:isMultiTrackSupportedByType,isTracksEqual:isTracksEqual,matchSettings:matchSettings,saveTextSettingsDisabled:saveTextSettingsDisabled,setConfig:setConfig,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MediaController.__dashjs_factory_name='MediaController';var factory=_FactoryMaker2.default.getSingletonFactory(MediaController);_FactoryMaker2.default.updateSingletonFactory(MediaController.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=MediaController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js\":\n/*!*******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js ***!\n  \\*******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function MediaSourceController(){var instance=void 0,logger=void 0;var context=this.context;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function createMediaSource(){var hasWebKit='WebKitMediaSource'in window;var hasMediaSource='MediaSource'in window;if(hasMediaSource){return new MediaSource();}else if(hasWebKit){return new WebKitMediaSource();}return null;}function attachMediaSource(source,videoModel){var objectURL=window.URL.createObjectURL(source);videoModel.setSource(objectURL);return objectURL;}function detachMediaSource(videoModel){videoModel.setSource(null);}function setDuration(source,value){if(!source||source.readyState!=='open')return;if(value===null&&isNaN(value))return;if(source.duration===value)return;if(!isBufferUpdating(source)){logger.info('Set MediaSource duration:'+value);source.duration=value;}else{setTimeout(setDuration.bind(null,source,value),50);}}function setSeekable(source,start,end){if(source&&typeof source.setLiveSeekableRange==='function'&&typeof source.clearLiveSeekableRange==='function'&&source.readyState==='open'&&start>=0&&start<end){source.clearLiveSeekableRange();source.setLiveSeekableRange(start,end);}}function signalEndOfStream(source){if(!source||source.readyState!=='open'){return;}var buffers=source.sourceBuffers;for(var i=0;i<buffers.length;i++){if(buffers[i].updating){return;}if(buffers[i].buffered.length===0){return;}}logger.info('call to mediaSource endOfStream');source.endOfStream();}function isBufferUpdating(source){var buffers=source.sourceBuffers;for(var i=0;i<buffers.length;i++){if(buffers[i].updating){return true;}}return false;}instance={createMediaSource:createMediaSource,attachMediaSource:attachMediaSource,detachMediaSource:detachMediaSource,setDuration:setDuration,setSeekable:setSeekable,signalEndOfStream:signalEndOfStream};setup();return instance;}MediaSourceController.__dashjs_factory_name='MediaSourceController';exports.default=_FactoryMaker2.default.getSingletonFactory(MediaSourceController);\\n//# sourceMappingURL=MediaSourceController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var LIVE_UPDATE_PLAYBACK_TIME_INTERVAL_MS=500;function PlaybackController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,streamController=void 0,dashMetrics=void 0,adapter=void 0,videoModel=void 0,timelineConverter=void 0,streamSwitch=void 0,streamSeekTime=void 0,wallclockTimeIntervalId=void 0,liveDelay=void 0,streamInfo=void 0,isDynamic=void 0,mediaPlayerModel=void 0,playOnceInitialized=void 0,lastLivePlaybackTime=void 0,availabilityStartTime=void 0,seekTarget=void 0,isLowLatencySeekingInProgress=void 0,playbackStalled=void 0,minPlaybackRateChange=void 0,uriFragmentModel=void 0,settings=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}function initialize(sInfo,periodSwitch,seekTime){streamInfo=sInfo;addAllListeners();isDynamic=streamInfo.manifestInfo.isDynamic;isLowLatencySeekingInProgress=false;playbackStalled=false;streamSwitch=periodSwitch===true;streamSeekTime=seekTime;var ua=typeof navigator!=='undefined'?navigator.userAgent.toLowerCase():'';// Detect safari browser (special behavior for low latency streams)\\nvar isSafari=/safari/.test(ua)&&!/chrome/.test(ua);minPlaybackRateChange=isSafari?0.25:0.02;eventBus.on(_Events2.default.STREAM_INITIALIZED,onStreamInitialized,this);eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.on(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,this);eventBus.on(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,this);eventBus.on(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_ENDED,onPlaybackEnded,this,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});eventBus.on(_Events2.default.STREAM_INITIALIZING,onStreamInitializing,this);if(playOnceInitialized){playOnceInitialized=false;play();}}function onStreamInitialized(e){// Seamless period switch\\nif(streamSwitch&&isNaN(streamSeekTime))return;// Seek new stream in priority order:\\n// - at seek time (streamSeekTime) when switching period\\n// - at start time provided in URI parameters\\n// - at stream/period start time (for static streams) or live start time (for dynamic streams)\\nvar startTime=streamSeekTime;if(isNaN(startTime)){if(isDynamic){// For dynamic stream, start by default at (live edge - live delay)\\nstartTime=e.liveStartTime;// If start time in URI, take min value between live edge time and time from URI (capped by DVR window range)\\nvar dvrInfo=dashMetrics.getCurrentDVRInfo();var dvrWindow=dvrInfo?dvrInfo.range:null;if(dvrWindow){// #t shall be relative to period start\\nvar startTimeFromUri=getStartTimeFromUriParameters(true);if(!isNaN(startTimeFromUri)){logger.info('Start time from URI parameters: '+startTimeFromUri);startTime=Math.max(Math.min(startTime,startTimeFromUri),dvrWindow.start);}}}else{// For static stream, start by default at period start\\nstartTime=streamInfo.start;// If start time in URI, take max value between period start and time from URI (if in period range)\\nvar _startTimeFromUri=getStartTimeFromUriParameters(false);if(!isNaN(_startTimeFromUri)&&_startTimeFromUri<startTime+streamInfo.duration){logger.info('Start time from URI parameters: '+_startTimeFromUri);startTime=Math.max(startTime,_startTimeFromUri);}}}if(!isNaN(startTime)&&startTime!==videoModel.getTime()){// Trigger PLAYBACK_SEEKING event for controllers\\neventBus.trigger(_Events2.default.PLAYBACK_SEEKING,{seekTime:startTime});// Seek video model\\nseek(startTime,false,true);}}function getTimeToStreamEnd(){return parseFloat((getStreamEndTime()-getTime()).toFixed(5));}function getStreamEndTime(){return streamInfo.start+streamInfo.duration;}function play(){if(streamInfo&&videoModel&&videoModel.getElement()){videoModel.play();}else{playOnceInitialized=true;}}function isPaused(){return streamInfo&&videoModel?videoModel.isPaused():null;}function pause(){if(streamInfo&&videoModel){videoModel.pause();}}function isSeeking(){return streamInfo&&videoModel?videoModel.isSeeking():null;}function seek(time,stickToBuffered,internalSeek){if(!streamInfo||!videoModel)return;var currentTime=!isNaN(seekTarget)?seekTarget:videoModel.getTime();if(time===currentTime)return;if(internalSeek===true){// Internal seek = seek video model only (disable 'seeking' listener)\\n// buffer(s) are already appended at requested time\\nvideoModel.removeEventListener('seeking',onPlaybackSeeking);logger.info('Requesting internal seek to time: '+time);videoModel.setCurrentTime(time,stickToBuffered);}else{seekTarget=time;eventBus.trigger(_Events2.default.PLAYBACK_SEEK_ASKED);logger.info('Requesting seek to time: '+time);videoModel.setCurrentTime(time,stickToBuffered);}}function seekToLive(){var DVRMetrics=dashMetrics.getCurrentDVRInfo();var DVRWindow=DVRMetrics?DVRMetrics.range:null;seek(DVRWindow.end-mediaPlayerModel.getLiveDelay(),true,false);}function getTime(){return streamInfo&&videoModel?videoModel.getTime():null;}function getNormalizedTime(){var t=getTime();if(isDynamic&&!isNaN(availabilityStartTime)){var timeOffset=availabilityStartTime/1000;// Fix current time for firefox and safari (returned as an absolute time)\\nif(t>timeOffset){t-=timeOffset;}}return t;}function getPlaybackRate(){return streamInfo&&videoModel?videoModel.getPlaybackRate():null;}function getPlayedRanges(){return streamInfo&&videoModel?videoModel.getPlayedRanges():null;}function getEnded(){return streamInfo&&videoModel?videoModel.getEnded():null;}function getIsDynamic(){return isDynamic;}function getStreamController(){return streamController;}/**\\n     * Computes the desirable delay for the live edge to avoid a risk of getting 404 when playing at the bleeding edge\\n     * @param {number} fragmentDuration - seconds?\\n     * @param {number} dvrWindowSize - seconds?\\n     * @param {number} minBufferTime - seconds?\\n     * @returns {number} object\\n     * @memberof PlaybackController#\\n     */function computeAndSetLiveDelay(fragmentDuration,dvrWindowSize,minBufferTime){var delay=void 0,ret=void 0,startTime=void 0;var END_OF_PLAYLIST_PADDING=10;var MIN_BUFFER_TIME_FACTOR=4;var FRAGMENT_DURATION_FACTOR=4;var adjustedFragmentDuration=!isNaN(fragmentDuration)&&isFinite(fragmentDuration)?fragmentDuration:NaN;var suggestedPresentationDelay=adapter.getSuggestedPresentationDelay();if(settings.get().streaming.lowLatencyEnabled){delay=0;}else if(mediaPlayerModel.getLiveDelay()){delay=mediaPlayerModel.getLiveDelay();// If set by user, this value takes precedence\\n}else if(settings.get().streaming.liveDelayFragmentCount!==null&&!isNaN(settings.get().streaming.liveDelayFragmentCount)&&!isNaN(adjustedFragmentDuration)){delay=adjustedFragmentDuration*settings.get().streaming.liveDelayFragmentCount;}else if(settings.get().streaming.useSuggestedPresentationDelay===true&&suggestedPresentationDelay!==null&&!isNaN(suggestedPresentationDelay)&&suggestedPresentationDelay>0){delay=suggestedPresentationDelay;}else if(!isNaN(adjustedFragmentDuration)){delay=adjustedFragmentDuration*FRAGMENT_DURATION_FACTOR;}else{delay=!isNaN(minBufferTime)?minBufferTime*MIN_BUFFER_TIME_FACTOR:streamInfo.manifestInfo.minBufferTime*MIN_BUFFER_TIME_FACTOR;}startTime=adapter.getAvailabilityStartTime();if(startTime!==null){availabilityStartTime=startTime;}if(dvrWindowSize>0){// cap target latency to:\\n// - dvrWindowSize / 2 for short playlists\\n// - dvrWindowSize - END_OF_PLAYLIST_PADDING for longer playlists\\nvar targetDelayCapping=Math.max(dvrWindowSize-END_OF_PLAYLIST_PADDING,dvrWindowSize/2);ret=Math.min(delay,targetDelayCapping);}else{ret=delay;}liveDelay=ret;return ret;}function getLiveDelay(){return liveDelay;}function setLiveDelay(value){var useMaxValue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(useMaxValue&&value<liveDelay){return;}liveDelay=value;}function getCurrentLiveLatency(){if(!isDynamic||isNaN(availabilityStartTime)){return NaN;}var currentTime=getNormalizedTime();if(isNaN(currentTime)||currentTime===0){return 0;}var now=new Date().getTime()+timelineConverter.getClientTimeOffset()*1000;return Math.max(((now-availabilityStartTime-currentTime*1000)/1000).toFixed(3),0);}function reset(){playOnceInitialized=false;streamSwitch=false;streamSeekTime=NaN;liveDelay=0;availabilityStartTime=0;seekTarget=NaN;if(videoModel){eventBus.off(_Events2.default.STREAM_INITIALIZED,onStreamInitialized,this);eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.off(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,this);eventBus.off(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,this);eventBus.off(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_ENDED,onPlaybackEnded,this);eventBus.off(_Events2.default.STREAM_INITIALIZING,onStreamInitializing,this);stopUpdatingWallclockTime();removeAllListeners();}wallclockTimeIntervalId=null;videoModel=null;streamInfo=null;isDynamic=null;}function setConfig(config){if(!config)return;if(config.streamController){streamController=config.streamController;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.adapter){adapter=config.adapter;}if(config.videoModel){videoModel=config.videoModel;}if(config.timelineConverter){timelineConverter=config.timelineConverter;}if(config.uriFragmentModel){uriFragmentModel=config.uriFragmentModel;}if(config.settings){settings=config.settings;}}function getStartTimeFromUriParameters(isDynamic){var fragData=uriFragmentModel.getURIFragmentData();if(!fragData||!fragData.t){return NaN;}var refStream=streamController.getStreams()[0];var refStreamStartTime=refStream.getStreamInfo().start;// Consider only start time of MediaRange\\n// TODO: consider end time of MediaRange to stop playback at provided end time\\nfragData.t=fragData.t.split(',')[0];// \\\"t=<time>\\\" : time is relative to 1st period start\\n// \\\"t=posix:<time>\\\" : time is absolute start time as number of seconds since 01-01-1970\\nvar posix=fragData.t.indexOf('posix:')!==-1?fragData.t.substring(6)==='now'?Date.now()/1000:parseInt(fragData.t.substring(6)):NaN;var startTime=isDynamic&&!isNaN(posix)?posix-availabilityStartTime/1000:parseInt(fragData.t)+refStreamStartTime;return startTime;}function getActualPresentationTime(currentTime){var DVRMetrics=dashMetrics.getCurrentDVRInfo();var DVRWindow=DVRMetrics?DVRMetrics.range:null;var actualTime=void 0;if(!DVRWindow){return NaN;}logger.debug('Checking DVR window for at '+currentTime+' with DVR window range '+DVRWindow.start+' - '+DVRWindow.end);if(currentTime>DVRWindow.end){actualTime=Math.max(DVRWindow.end-liveDelay,DVRWindow.start);}else if(currentTime>0&&currentTime+0.250<DVRWindow.start&&Math.abs(currentTime-DVRWindow.start)<315360000){// Checking currentTime plus 250ms as the 'timeupdate' is fired with a frequency between 4Hz and 66Hz\\n// https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate\\n// http://w3c.github.io/html/single-page.html#offsets-into-the-media-resource\\n// Checking also duration of the DVR makes sense. We detected temporary situations in which currentTime\\n// is bad reported by the browser which causes playback to jump to start (315360000 = 1 year)\\n//actualTime = DVRWindow.start;\\nactualTime=DVRWindow.start;}else{actualTime=currentTime;}return actualTime;}function startUpdatingWallclockTime(){if(wallclockTimeIntervalId!==null)return;var tick=function tick(){onWallclockTime();};wallclockTimeIntervalId=setInterval(tick,settings.get().streaming.wallclockTimeUpdateInterval);}function stopUpdatingWallclockTime(){clearInterval(wallclockTimeIntervalId);wallclockTimeIntervalId=null;}function updateCurrentTime(){if(isPaused()||!isDynamic||videoModel.getReadyState()===0)return;var currentTime=getNormalizedTime();var actualTime=getActualPresentationTime(currentTime);var timeChanged=!isNaN(actualTime)&&actualTime!==currentTime;if(timeChanged){logger.debug('UpdateCurrentTime: Seek to actual time: '+actualTime+' from currentTime: '+currentTime);seek(actualTime);}}function onDataUpdateCompleted(e){if(e.error)return;var representationInfo=adapter.convertDataToRepresentationInfo(e.currentRepresentation);var info=representationInfo?representationInfo.mediaInfo.streamInfo:null;if(info===null||streamInfo.id!==info.id)return;streamInfo=info;updateCurrentTime();}function onCanPlay(){eventBus.trigger(_Events2.default.CAN_PLAY);}function onPlaybackStart(){logger.info('Native video element event: play');updateCurrentTime();startUpdatingWallclockTime();eventBus.trigger(_Events2.default.PLAYBACK_STARTED,{startTime:getTime()});}function onPlaybackWaiting(){logger.info('Native video element event: waiting');eventBus.trigger(_Events2.default.PLAYBACK_WAITING,{playingTime:getTime()});}function onPlaybackPlaying(){logger.info('Native video element event: playing');eventBus.trigger(_Events2.default.PLAYBACK_PLAYING,{playingTime:getTime()});}function onPlaybackPaused(){logger.info('Native video element event: pause');eventBus.trigger(_Events2.default.PLAYBACK_PAUSED,{ended:getEnded()});}function onPlaybackSeeking(){var seekTime=getTime();// On some browsers/devices, in case of live streams, setting current time on video element fails when there is no buffered data at requested time\\n// Then re-set seek target time and video element will be seeked afterwhile once data is buffered (see BufferContoller)\\nif(!isNaN(seekTarget)&&seekTarget!==seekTime){seekTime=seekTarget;}seekTarget=NaN;logger.info('Seeking to: '+seekTime);startUpdatingWallclockTime();eventBus.trigger(_Events2.default.PLAYBACK_SEEKING,{seekTime:seekTime});}function onPlaybackSeeked(){logger.info('Native video element event: seeked');eventBus.trigger(_Events2.default.PLAYBACK_SEEKED);// Reactivate 'seeking' event listener (see seek())\\nvideoModel.addEventListener('seeking',onPlaybackSeeking);}function onPlaybackTimeUpdated(){if(streamInfo){eventBus.trigger(_Events2.default.PLAYBACK_TIME_UPDATED,{timeToEnd:getTimeToStreamEnd(),time:getTime()});}}function updateLivePlaybackTime(){var now=Date.now();if(!lastLivePlaybackTime||now>lastLivePlaybackTime+LIVE_UPDATE_PLAYBACK_TIME_INTERVAL_MS){lastLivePlaybackTime=now;onPlaybackTimeUpdated();}}function onPlaybackProgress(){eventBus.trigger(_Events2.default.PLAYBACK_PROGRESS);}function onPlaybackRateChanged(){var rate=getPlaybackRate();logger.info('Native video element event: ratechange: ',rate);eventBus.trigger(_Events2.default.PLAYBACK_RATE_CHANGED,{playbackRate:rate});}function onPlaybackMetaDataLoaded(){logger.info('Native video element event: loadedmetadata');eventBus.trigger(_Events2.default.PLAYBACK_METADATA_LOADED);startUpdatingWallclockTime();}// Event to handle the native video element ended event\\nfunction onNativePlaybackEnded(){logger.info('Native video element event: ended');pause();stopUpdatingWallclockTime();eventBus.trigger(_Events2.default.PLAYBACK_ENDED,{'isLast':streamController.getActiveStreamInfo().isLast});}// Handle DASH PLAYBACK_ENDED event\\nfunction onPlaybackEnded(e){if(wallclockTimeIntervalId&&e.isLast){// PLAYBACK_ENDED was triggered elsewhere, react.\\nlogger.info('onPlaybackEnded -- PLAYBACK_ENDED but native video element didn\\\\'t fire ended');var seekTime=e.seekTime?e.seekTime:getStreamEndTime();videoModel.setCurrentTime(seekTime);pause();stopUpdatingWallclockTime();}}function onPlaybackError(event){var target=event.target||event.srcElement;eventBus.trigger(_Events2.default.PLAYBACK_ERROR,{error:target.error});}function onWallclockTime(){eventBus.trigger(_Events2.default.WALLCLOCK_TIME_UPDATED,{isDynamic:isDynamic,time:new Date()});// Updates playback time for paused dynamic streams\\n// (video element doesn't call timeupdate when the playback is paused)\\nif(getIsDynamic()&&isPaused()){updateLivePlaybackTime();}}function onPlaybackProgression(){if(isDynamic&&_isCatchupEnabled()&&settings.get().streaming.liveCatchup.playbackRate>0&&!isPaused()&&!isSeeking()){if(_needToCatchUp()){startPlaybackCatchUp();}else{stopPlaybackCatchUp();}}}function _isCatchupEnabled(){return settings.get().streaming.liveCatchup.enabled||settings.get().streaming.lowLatencyEnabled;}function getBufferLevel(){var bufferLevel=null;streamController.getActiveStreamProcessors().forEach(function(p){var bl=p.getBufferLevel();if(bufferLevel===null){bufferLevel=bl;}else{bufferLevel=Math.min(bufferLevel,bl);}});return bufferLevel;}/**\\n     * Returns the mode for live playback catchup.\\n     * @return {String}\\n     * @private\\n     */function _getCatchupMode(){var playbackBufferMin=settings.get().streaming.liveCatchup.playbackBufferMin;return settings.get().streaming.liveCatchup.mode===_Constants2.default.LIVE_CATCHUP_MODE_LOLP&&playbackBufferMin!==null&&!isNaN(playbackBufferMin)?_Constants2.default.LIVE_CATCHUP_MODE_LOLP:_Constants2.default.LIVE_CATCHUP_MODE_DEFAULT;}/**\\n     * Checks whether the catchup mechanism should be enabled\\n     * @return {boolean}\\n     */function _needToCatchUp(){try{if(_isCatchupEnabled()&&settings.get().streaming.liveCatchup.playbackRate>0&&getTime()>0){var catchupMode=_getCatchupMode();var currentLiveLatency=getCurrentLiveLatency();var _liveDelay=mediaPlayerModel.getLiveDelay();var liveCatchupLatencyThreshold=mediaPlayerModel.getLiveCatchupLatencyThreshold();var liveCatchUpMinDrift=settings.get().streaming.liveCatchup.minDrift;if(catchupMode===_Constants2.default.LIVE_CATCHUP_MODE_LOLP){var currentBuffer=getBufferLevel();var playbackBufferMin=settings.get().streaming.liveCatchup.playbackBufferMin;return _lolpNeedToCatchUpCustom(currentLiveLatency,_liveDelay,liveCatchUpMinDrift,currentBuffer,playbackBufferMin,liveCatchupLatencyThreshold);}else{return _defaultNeedToCatchUp(currentLiveLatency,_liveDelay,liveCatchupLatencyThreshold,liveCatchUpMinDrift);}}}catch(e){return false;}}/**\\n     * Default algorithm to determine if catchup mode should be enabled\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} liveCatchupLatencyThreshold\\n     * @param {number} minDrift\\n     * @return {boolean}\\n     * @private\\n     */function _defaultNeedToCatchUp(currentLiveLatency,liveDelay,liveCatchupLatencyThreshold,minDrift){try{var latencyDrift=Math.abs(currentLiveLatency-liveDelay);return latencyDrift>minDrift&&(isNaN(liveCatchupLatencyThreshold)||currentLiveLatency<=liveCatchupLatencyThreshold);}catch(e){return false;}}/**\\n     * LoL+ logic to determine if catchup mode should be enabled\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} minDrift\\n     * @param {number} currentBuffer\\n     * @param {number} playbackBufferMin\\n     * @param {number} liveCatchupLatencyThreshold\\n     * @return {boolean}\\n     * @private\\n     */function _lolpNeedToCatchUpCustom(currentLiveLatency,liveDelay,minDrift,currentBuffer,playbackBufferMin,liveCatchupLatencyThreshold){try{var latencyDrift=Math.abs(currentLiveLatency-liveDelay);return(isNaN(liveCatchupLatencyThreshold)||currentLiveLatency<=liveCatchupLatencyThreshold)&&(latencyDrift>minDrift||currentBuffer<playbackBufferMin);}catch(e){return false;}}/**\\n     * Apply catchup mode\\n     */function startPlaybackCatchUp(){if(videoModel){var results=void 0;var currentPlaybackRate=videoModel.getPlaybackRate();var liveCatchupPlaybackRate=settings.get().streaming.liveCatchup.playbackRate;var currentLiveLatency=getCurrentLiveLatency();var _liveDelay2=mediaPlayerModel.getLiveDelay();var bufferLevel=getBufferLevel();// Custom playback control: Based on buffer level\\nif(_getCatchupMode()===_Constants2.default.LIVE_CATCHUP_MODE_LOLP){var liveCatchUpMinDrift=settings.get().streaming.liveCatchup.minDrift;var playbackBufferMin=settings.get().streaming.liveCatchup.playbackBufferMin;results=_calculateNewPlaybackRateLolP(liveCatchupPlaybackRate,currentLiveLatency,_liveDelay2,liveCatchUpMinDrift,playbackBufferMin,bufferLevel,currentPlaybackRate);}else{// Default playback control: Based on target and current latency\\nresults=_calculateNewPlaybackRateDefault(liveCatchupPlaybackRate,currentLiveLatency,_liveDelay2,bufferLevel,currentPlaybackRate);}// Obtain newRate and apply to video model\\nvar newRate=results.newRate;if(newRate){// non-null\\nvideoModel.setPlaybackRate(newRate);}var deltaLatency=currentLiveLatency-_liveDelay2;if(settings.get().streaming.liveCatchup.maxDrift>0&&!isLowLatencySeekingInProgress&&deltaLatency>settings.get().streaming.liveCatchup.maxDrift){logger.info('Low Latency catchup mechanism. Latency too high, doing a seek to live point');isLowLatencySeekingInProgress=true;seekToLive();}else{isLowLatencySeekingInProgress=false;}}}/**\\n     * Default algorithm to calculate the new playback rate\\n     * @param {number} liveCatchUpPlaybackRate\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} bufferLevel\\n     * @param {number} currentPlaybackRate\\n     * @return {{newRate: number}}\\n     * @private\\n     */function _calculateNewPlaybackRateDefault(liveCatchUpPlaybackRate,currentLiveLatency,liveDelay,bufferLevel,currentPlaybackRate){var cpr=liveCatchUpPlaybackRate;var deltaLatency=currentLiveLatency-liveDelay;var d=deltaLatency*5;// Playback rate must be between (1 - cpr) - (1 + cpr)\\n// ex: if cpr is 0.5, it can have values between 0.5 - 1.5\\nvar s=cpr*2/(1+Math.pow(Math.E,-d));var newRate=1-cpr+s;// take into account situations in which there are buffer stalls,\\n// in which increasing playbackRate to reach target latency will\\n// just cause more and more stall situations\\nif(playbackStalled){// const bufferLevel = getBufferLevel();\\nif(bufferLevel>liveDelay/2){// playbackStalled = false;\\nplaybackStalled=false;}else if(deltaLatency>0){newRate=1.0;}}// don't change playbackrate for small variations (don't overload element with playbackrate changes)\\nif(Math.abs(currentPlaybackRate-newRate)<=minPlaybackRateChange){newRate=null;}return{newRate:newRate};}/**\\n     * Lol+ algorithm to calculate the new playback rate\\n     * @param {number} liveCatchUpPlaybackRate\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} minDrift\\n     * @param {number} playbackBufferMin\\n     * @param {number} bufferLevel\\n     * @param {number} currentPlaybackRate\\n     * @return {{newRate: number}}\\n     * @private\\n     */function _calculateNewPlaybackRateLolP(liveCatchUpPlaybackRate,currentLiveLatency,liveDelay,minDrift,playbackBufferMin,bufferLevel,currentPlaybackRate){var cpr=liveCatchUpPlaybackRate;var newRate=void 0;// Hybrid: Buffer-based\\nif(bufferLevel<playbackBufferMin){// Buffer in danger, slow down\\nvar deltaBuffer=bufferLevel-playbackBufferMin;// -ve value\\nvar d=deltaBuffer*5;// Playback rate must be between (1 - cpr) - (1 + cpr)\\n// ex: if cpr is 0.5, it can have values between 0.5 - 1.5\\nvar s=cpr*2/(1+Math.pow(Math.E,-d));newRate=1-cpr+s;logger.debug('[LoL+ playback control_buffer-based] bufferLevel: '+bufferLevel+', newRate: '+newRate);}else{// Hybrid: Latency-based\\n// Buffer is safe, vary playback rate based on latency\\n// Check if latency is within range of target latency\\nvar minDifference=0.02;if(Math.abs(currentLiveLatency-liveDelay)<=minDifference*liveDelay){newRate=1;}else{var deltaLatency=currentLiveLatency-liveDelay;var _d=deltaLatency*5;// Playback rate must be between (1 - cpr) - (1 + cpr)\\n// ex: if cpr is 0.5, it can have values between 0.5 - 1.5\\nvar _s=cpr*2/(1+Math.pow(Math.E,-_d));newRate=1-cpr+_s;}logger.debug('[LoL+ playback control_latency-based] latency: '+currentLiveLatency+', newRate: '+newRate);}if(playbackStalled){if(bufferLevel>liveDelay/2){playbackStalled=false;}}// don't change playbackrate for small variations (don't overload element with playbackrate changes)\\nif(Math.abs(currentPlaybackRate-newRate)<=minPlaybackRateChange){newRate=null;}return{newRate:newRate};}function stopPlaybackCatchUp(){if(videoModel){videoModel.setPlaybackRate(1.0);}}function onFragmentLoadProgress(e){// If using fetch and stream mode is not available, readjust live latency so it is 20% higher than segment duration\\nif(e.stream===false&&settings.get().streaming.lowLatencyEnabled&&!isNaN(e.request.duration)){var minDelay=1.2*e.request.duration;if(minDelay>mediaPlayerModel.getLiveDelay()){logger.warn('Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:',minDelay.toFixed(2));var s={streaming:{liveDelay:minDelay}};settings.update(s);}}}function onBufferLevelStateChanged(e){// do not stall playback when get an event from Stream that is not active\\nif(e.streamId!==streamInfo.id)return;if(_isCatchupEnabled()){if(e.state===_MetricsConstants2.default.BUFFER_EMPTY&&!isSeeking()){if(!playbackStalled){playbackStalled=true;stopPlaybackCatchUp();}}}else{videoModel.setStallState(e.mediaType,e.state===_MetricsConstants2.default.BUFFER_EMPTY);}}function onPlaybackStalled(e){eventBus.trigger(_Events2.default.PLAYBACK_STALLED,{e:e});}function onStreamInitializing(e){applyServiceDescription(e.streamInfo,e.mediaInfo);}function applyServiceDescription(streamInfo,mediaInfo){if(streamInfo&&streamInfo.manifestInfo&&streamInfo.manifestInfo.serviceDescriptions){// is there a service description for low latency defined?\\nvar llsd=void 0;for(var i=0;i<streamInfo.manifestInfo.serviceDescriptions.length;i++){var sd=streamInfo.manifestInfo.serviceDescriptions[i];if(sd.schemeIdUri===_Constants2.default.SERVICE_DESCRIPTION_LL_SCHEME){llsd=sd;break;}}if(llsd){if(mediaInfo&&mediaInfo.supplementalProperties&&mediaInfo.supplementalProperties[_Constants2.default.SUPPLEMENTAL_PROPERTY_LL_SCHEME]==='true'){if(llsd.latency&&llsd.latency.target>0){logger.debug('Apply LL properties coming from service description. Target Latency (ms):',llsd.latency.target);settings.update({streaming:{lowLatencyEnabled:true,liveDelay:llsd.latency.target/1000,liveCatchup:{minDrift:llsd.latency.max>llsd.latency.target?(llsd.latency.max-llsd.latency.target)/1000:undefined}}});}if(llsd.playbackRate&&llsd.playbackRate.max>1.0){logger.debug('Apply LL properties coming from service description. Max PlaybackRate:',llsd.playbackRate.max);settings.update({streaming:{lowLatencyEnabled:true,liveCatchup:{playbackRate:llsd.playbackRate.max-1.0}}});}}}}}function addAllListeners(){videoModel.addEventListener('canplay',onCanPlay);videoModel.addEventListener('play',onPlaybackStart);videoModel.addEventListener('waiting',onPlaybackWaiting);videoModel.addEventListener('playing',onPlaybackPlaying);videoModel.addEventListener('pause',onPlaybackPaused);videoModel.addEventListener('error',onPlaybackError);videoModel.addEventListener('seeking',onPlaybackSeeking);videoModel.addEventListener('seeked',onPlaybackSeeked);videoModel.addEventListener('timeupdate',onPlaybackTimeUpdated);videoModel.addEventListener('progress',onPlaybackProgress);videoModel.addEventListener('ratechange',onPlaybackRateChanged);videoModel.addEventListener('loadedmetadata',onPlaybackMetaDataLoaded);videoModel.addEventListener('stalled',onPlaybackStalled);videoModel.addEventListener('ended',onNativePlaybackEnded);}function removeAllListeners(){videoModel.removeEventListener('canplay',onCanPlay);videoModel.removeEventListener('play',onPlaybackStart);videoModel.removeEventListener('waiting',onPlaybackWaiting);videoModel.removeEventListener('playing',onPlaybackPlaying);videoModel.removeEventListener('pause',onPlaybackPaused);videoModel.removeEventListener('error',onPlaybackError);videoModel.removeEventListener('seeking',onPlaybackSeeking);videoModel.removeEventListener('seeked',onPlaybackSeeked);videoModel.removeEventListener('timeupdate',onPlaybackTimeUpdated);videoModel.removeEventListener('progress',onPlaybackProgress);videoModel.removeEventListener('ratechange',onPlaybackRateChanged);videoModel.removeEventListener('loadedmetadata',onPlaybackMetaDataLoaded);videoModel.removeEventListener('stalled',onPlaybackStalled);videoModel.removeEventListener('ended',onNativePlaybackEnded);}instance={initialize:initialize,setConfig:setConfig,getStartTimeFromUriParameters:getStartTimeFromUriParameters,getTimeToStreamEnd:getTimeToStreamEnd,getTime:getTime,getNormalizedTime:getNormalizedTime,getPlaybackRate:getPlaybackRate,getPlayedRanges:getPlayedRanges,getEnded:getEnded,getIsDynamic:getIsDynamic,getStreamController:getStreamController,computeAndSetLiveDelay:computeAndSetLiveDelay,getLiveDelay:getLiveDelay,setLiveDelay:setLiveDelay,getCurrentLiveLatency:getCurrentLiveLatency,play:play,isPaused:isPaused,pause:pause,isSeeking:isSeeking,getStreamEndTime:getStreamEndTime,seek:seek,reset:reset};setup();return instance;}PlaybackController.__dashjs_factory_name='PlaybackController';exports.default=_FactoryMaker2.default.getSingletonFactory(PlaybackController);\\n//# sourceMappingURL=PlaybackController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _BufferLevelRule=__webpack_require__(/*! ../rules/scheduling/BufferLevelRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js\\\");var _BufferLevelRule2=_interopRequireDefault(_BufferLevelRule);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ScheduleController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var adapter=config.adapter;var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var fragmentModel=config.fragmentModel;var abrController=config.abrController;var playbackController=config.playbackController;var textController=config.textController;var streamInfo=config.streamInfo;var type=config.type;var mimeType=config.mimeType;var mediaController=config.mediaController;var bufferController=config.bufferController;var settings=config.settings;var instance=void 0,logger=void 0,currentRepresentationInfo=void 0,initialRequest=void 0,isStopped=void 0,isFragmentProcessingInProgress=void 0,timeToLoadDelay=void 0,scheduleTimeout=void 0,seekTarget=void 0,hasVideoTrack=void 0,bufferLevelRule=void 0,lastFragmentRequest=void 0,topQualityIndex=void 0,lastInitQuality=void 0,replaceRequestArray=void 0,switchTrack=void 0,replacingBuffer=void 0,mediaRequest=void 0,checkPlaybackQuality=void 0,isReplacementRequest=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();}function initialize(_hasVideoTrack){hasVideoTrack=_hasVideoTrack;bufferLevelRule=(0,_BufferLevelRule2.default)(context).create({abrController:abrController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,textController:textController,settings:settings});//eventBus.on(Events.LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\\neventBus.on(_Events2.default.DATA_UPDATE_STARTED,onDataUpdateStarted,this);eventBus.on(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,this);eventBus.on(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.on(_Events2.default.BUFFER_CLEARED,onBufferCleared,this);eventBus.on(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,this);eventBus.on(_Events2.default.QUOTA_EXCEEDED,onQuotaExceeded,this);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.on(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.on(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,this);eventBus.on(_Events2.default.URL_RESOLUTION_FAILED,onURLResolutionFailed,this);eventBus.on(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,this);eventBus.on(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,this);}function getType(){return type;}function getStreamId(){return streamInfo.id;}function setCurrentRepresentation(representationInfo){currentRepresentationInfo=representationInfo;}function isStarted(){return isStopped===false;}function start(){if(isStarted())return;if(!currentRepresentationInfo||bufferController.getIsBufferingCompleted())return;logger.debug('Schedule Controller starts');isStopped=false;dashMetrics.createPlaylistTraceMetrics(currentRepresentationInfo.id,playbackController.getTime()*1000,playbackController.getPlaybackRate());if(initialRequest){initialRequest=false;}startScheduleTimer(0);}function stop(){if(isStopped)return;logger.debug('Schedule Controller stops');logger.debug(type+' Schedule Controller stops');isStopped=true;clearTimeout(scheduleTimeout);}function hasTopQualityChanged(type,id){topQualityIndex[id]=topQualityIndex[id]||{};var newTopQualityIndex=abrController.getTopQualityIndexFor(type,id);if(topQualityIndex[id][type]!=newTopQualityIndex){logger.info('Top quality '+type+' index has changed from '+topQualityIndex[id][type]+' to '+newTopQualityIndex);topQualityIndex[id][type]=newTopQualityIndex;return true;}return false;}function schedule(){if(isStopped||isFragmentProcessingInProgress||playbackController.isPaused()&&!settings.get().streaming.scheduleWhilePaused||(type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.TEXT)&&!textController.isTextEnabled()||bufferController.getIsBufferingCompleted()){stop();return;}validateExecutedFragmentRequest();var isReplacement=replaceRequestArray.length>0;if(replacingBuffer||isNaN(lastInitQuality)||switchTrack||isReplacement||hasTopQualityChanged(type,streamInfo.id)||bufferLevelRule.execute(type,currentRepresentationInfo,hasVideoTrack)){var getNextFragment=function getNextFragment(){if((currentRepresentationInfo.quality!==lastInitQuality||switchTrack)&&!replacingBuffer){if(switchTrack){logger.debug('Switch track for '+type+', representation id = '+currentRepresentationInfo.id);replacingBuffer=mediaController.getSwitchMode(type)===_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE;if(replacingBuffer&&bufferController.replaceBuffer){bufferController.replaceBuffer();}switchTrack=false;}else{logger.debug('Quality has changed, get init request for representationid = '+currentRepresentationInfo.id);}eventBus.trigger(_Events2.default.INIT_FRAGMENT_NEEDED,{representationId:currentRepresentationInfo.id,sender:instance},{streamId:streamInfo.id,mediaType:type});lastInitQuality=currentRepresentationInfo.quality;checkPlaybackQuality=false;}else{var replacement=replaceRequestArray.shift();if(replacement&&replacement.isInitializationRequest()){// To be sure the specific init segment had not already been loaded\\neventBus.trigger(_Events2.default.INIT_FRAGMENT_NEEDED,{representationId:replacement.representationId,sender:instance},{streamId:streamInfo.id,mediaType:type});checkPlaybackQuality=false;}else{eventBus.trigger(_Events2.default.MEDIA_FRAGMENT_NEEDED,{seekTarget:seekTarget,replacement:replacement},{streamId:streamInfo.id,mediaType:type});checkPlaybackQuality=true;}}};setFragmentProcessState(true);if(!isReplacement&&checkPlaybackQuality){abrController.checkPlaybackQuality(type);}getNextFragment();}else{startScheduleTimer(500);}}function validateExecutedFragmentRequest(){// Validate that the fragment request executed and appended into the source buffer is as\\n// good of quality as the current quality and is the correct media track.\\nvar time=playbackController.getTime();var safeBufferLevel=1.5;if(isNaN(currentRepresentationInfo.fragmentDuration)){//fragmentDuration of representationInfo is not defined,\\n// call metrics function to have data in the latest scheduling info...\\n// if no metric, returns 0. In this case, rule will return false.\\nvar schedulingInfo=dashMetrics.getCurrentSchedulingInfo(currentRepresentationInfo.mediaInfo.type);safeBufferLevel=schedulingInfo?schedulingInfo.duration*1.5:1.5;}var request=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:time+safeBufferLevel,threshold:0})[0];if(request&&replaceRequestArray.indexOf(request)===-1&&!adapter.getIsTextTrack(mimeType)){var fastSwitchModeEnabled=settings.get().streaming.fastSwitchEnabled;var bufferLevel=bufferController.getBufferLevel();var abandonmentState=abrController.getAbandonmentStateFor(type);// Only replace on track switch when NEVER_REPLACE\\nvar trackChanged=!mediaController.isCurrentTrack(request.mediaInfo)&&mediaController.getSwitchMode(request.mediaInfo.type)===_Constants2.default.TRACK_SWITCH_MODE_NEVER_REPLACE;var qualityChanged=request.quality<currentRepresentationInfo.quality;if(fastSwitchModeEnabled&&(trackChanged||qualityChanged)&&bufferLevel>=safeBufferLevel&&abandonmentState!==_MetricsConstants2.default.ABANDON_LOAD){replaceRequest(request);isReplacementRequest=true;logger.debug('Reloading outdated fragment at index: ',request.index);}else if(request.quality>currentRepresentationInfo.quality&&!replacingBuffer){// The buffer has better quality it in then what we would request so set append point to end of buffer!!\\nsetSeekTarget(playbackController.getTime()+bufferLevel);}}}function startScheduleTimer(value){clearTimeout(scheduleTimeout);scheduleTimeout=setTimeout(schedule,value);}function setFragmentProcessState(state){if(isFragmentProcessingInProgress!==state){isFragmentProcessingInProgress=state;}else{logger.debug('isFragmentProcessingInProgress is already equal to',state);}}function processInitRequest(request){if(request){setFragmentProcessState(true);fragmentModel.executeRequest(request);}}function processMediaRequest(request){if(request){logger.debug('Next fragment request url is '+request.url);fragmentModel.executeRequest(request);}else{// Use case - Playing at the bleeding live edge and frag is not available yet. Cycle back around.\\nif(playbackController.getIsDynamic()){logger.debug('Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling.');}setFragmentProcessState(false);startScheduleTimer(settings.get().streaming.lowLatencyEnabled?100:500);}}function switchTrackAsked(){switchTrack=true;}function replaceRequest(request){replaceRequestArray.push(request);}function completeQualityChange(trigger){if(playbackController&&fragmentModel){var item=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:playbackController.getTime(),threshold:0})[0];if(item&&playbackController.getTime()>=item.startTime){if((!lastFragmentRequest.mediaInfo||item.mediaInfo.type===lastFragmentRequest.mediaInfo.type&&item.mediaInfo.id!==lastFragmentRequest.mediaInfo.id)&&trigger){eventBus.trigger(_Events2.default.TRACK_CHANGE_RENDERED,{mediaType:type,oldMediaInfo:lastFragmentRequest.mediaInfo,newMediaInfo:item.mediaInfo});}if((item.quality!==lastFragmentRequest.quality||item.adaptationIndex!==lastFragmentRequest.adaptationIndex)&&trigger){eventBus.trigger(_Events2.default.QUALITY_CHANGE_RENDERED,{mediaType:type,oldQuality:lastFragmentRequest.quality,newQuality:item.quality});}lastFragmentRequest={mediaInfo:item.mediaInfo,quality:item.quality,adaptationIndex:item.adaptationIndex};}}}function onStreamCompleted(){stop();setFragmentProcessState(false);logger.info('Stream '+streamInfo.id+' is complete');}function onFragmentLoadingCompleted(e){if(e.request.mediaInfo.streamInfo.id!==streamInfo.id||e.request.mediaType!==type)return;logger.info('OnFragmentLoadingCompleted - Url:',e.request?e.request.url:'undefined',e.request.range?', Range:'+e.request.range:'');if(adapter.getIsTextTrack(mimeType)){setFragmentProcessState(false);}if(e.error&&e.request.serviceLocation&&!isStopped){replaceRequest(e.request);setFragmentProcessState(false);startScheduleTimer(0);}if(replacingBuffer){mediaRequest=e.request;}}function onPlaybackTimeUpdated(){completeQualityChange(true);}function onBytesAppended(e){if(replacingBuffer&&!isNaN(e.startTime)){replacingBuffer=false;fragmentModel.addExecutedRequest(mediaRequest);}setFragmentProcessState(false);if(isReplacementRequest&&!isNaN(e.startTime)){//replace requests process is in progress, call schedule in n seconds.\\n//it is done in order to not add a fragment at the new quality at the end of the buffer before replace process is over.\\n//Indeed, if schedule is called too early, the executed request tested is the same that the one tested during previous schedule (at the new quality).\\nvar currentTime=playbackController.getTime();var fragEndTime=e.startTime+currentRepresentationInfo.fragmentDuration;var safeBufferLevel=currentRepresentationInfo.fragmentDuration*1.5;if(currentTime+safeBufferLevel>=fragEndTime){startScheduleTimer(0);}else{startScheduleTimer((fragEndTime-(currentTime+safeBufferLevel))*1000);}isReplacementRequest=false;}else{startScheduleTimer(0);}}function onFragmentLoadingAbandoned(e){logger.info('onFragmentLoadingAbandoned request: '+e.request.url+' has been aborted');if(!playbackController.isSeeking()&&!switchTrack){logger.info('onFragmentLoadingAbandoned request: '+e.request.url+' has to be downloaded again, origin is not seeking process or switch track call');replaceRequest(e.request);}setFragmentProcessState(false);startScheduleTimer(0);}function onDataUpdateStarted()/*e*/{// stop();\\n}function onBufferingCompleted()/*e*/{stop();}function onBufferCleared(e){if(replacingBuffer&&settings.get().streaming.flushBufferAtTrackSwitch){// For some devices (like chromecast) it is necessary to seek the video element to reset the internal decoding buffer,\\n// otherwise audio track switch will be effective only once after previous buffered track is consumed\\nplaybackController.seek(playbackController.getTime()+0.001,false,true);}// (Re)start schedule once buffer has been pruned after a QuotaExceededError\\nif(e.hasEnoughSpaceToAppend&&e.quotaExceeded){start();}}function onQuotaExceeded()/*e*/{// Stop scheduler (will be restarted once buffer is pruned)\\nstop();setFragmentProcessState(false);}function onURLResolutionFailed(){fragmentModel.abortRequests();stop();}function onPlaybackStarted(){if(isStopped||!settings.get().streaming.scheduleWhilePaused){start();}}function onPlaybackSeeking(e){setSeekTarget(e.seekTime);setTimeToLoadDelay(0);if(isStopped){start();}var latency=currentRepresentationInfo.DVRWindow&&playbackController?currentRepresentationInfo.DVRWindow.end-playbackController.getTime():NaN;dashMetrics.updateManifestUpdateInfo({latency:latency});if(!isFragmentProcessingInProgress){// No pending request, request next segment at seek target\\nstartScheduleTimer(0);}else{// Abort current request\\nfragmentModel.abortRequests();}}function onPlaybackRateChanged(e){dashMetrics.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()});}function setSeekTarget(value){seekTarget=value;}function setTimeToLoadDelay(value){timeToLoadDelay=value;}function getTimeToLoadDelay(){return timeToLoadDelay;}function getBufferTarget(){return bufferLevelRule.getBufferTarget(type,currentRepresentationInfo,hasVideoTrack);}function resetInitialSettings(){checkPlaybackQuality=true;isFragmentProcessingInProgress=false;timeToLoadDelay=0;seekTarget=NaN;initialRequest=true;lastInitQuality=NaN;lastFragmentRequest={mediaInfo:undefined,quality:NaN,adaptationIndex:NaN};topQualityIndex={};replaceRequestArray=[];isStopped=true;switchTrack=false;replacingBuffer=false;mediaRequest=null;isReplacementRequest=false;}function reset(){//eventBus.off(Events.LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\\neventBus.off(_Events2.default.DATA_UPDATE_STARTED,onDataUpdateStarted,this);eventBus.off(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,this);eventBus.off(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.off(_Events2.default.BUFFER_CLEARED,onBufferCleared,this);eventBus.off(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,this);eventBus.off(_Events2.default.QUOTA_EXCEEDED,onQuotaExceeded,this);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.off(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.off(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,this);eventBus.off(_Events2.default.URL_RESOLUTION_FAILED,onURLResolutionFailed,this);eventBus.off(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,this);eventBus.off(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,this);stop();completeQualityChange(false);resetInitialSettings();}function getPlaybackController(){return playbackController;}instance={initialize:initialize,getType:getType,getStreamId:getStreamId,setCurrentRepresentation:setCurrentRepresentation,setSeekTarget:setSeekTarget,setTimeToLoadDelay:setTimeToLoadDelay,getTimeToLoadDelay:getTimeToLoadDelay,switchTrackAsked:switchTrackAsked,isStarted:isStarted,start:start,stop:stop,reset:reset,getBufferTarget:getBufferTarget,processInitRequest:processInitRequest,processMediaRequest:processMediaRequest,getPlaybackController:getPlaybackController};setup();return instance;}ScheduleController.__dashjs_factory_name='ScheduleController';exports.default=_FactoryMaker2.default.getClassFactory(ScheduleController);\\n//# sourceMappingURL=ScheduleController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _Stream=__webpack_require__(/*! ../Stream */ \\\"../node_modules/dashjs/build/es5/src/streaming/Stream.js\\\");var _Stream2=_interopRequireDefault(_Stream);var _ManifestUpdater=__webpack_require__(/*! ../ManifestUpdater */ \\\"../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js\\\");var _ManifestUpdater2=_interopRequireDefault(_ManifestUpdater);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _PlayList=__webpack_require__(/*! ../vo/metrics/PlayList */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\\\");var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _InitCache=__webpack_require__(/*! ../utils/InitCache */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\\\");var _InitCache2=_interopRequireDefault(_InitCache);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _MediaPlayerEvents=__webpack_require__(/*! ../MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _TimeSyncController=__webpack_require__(/*! ./TimeSyncController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js\\\");var _TimeSyncController2=_interopRequireDefault(_TimeSyncController);var _MediaSourceController=__webpack_require__(/*! ./MediaSourceController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js\\\");var _MediaSourceController2=_interopRequireDefault(_MediaSourceController);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _EventController=__webpack_require__(/*! ./EventController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js\\\");var _EventController2=_interopRequireDefault(_EventController);var _ConformanceViolationConstants=__webpack_require__(/*! ../constants/ConformanceViolationConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js\\\");var _ConformanceViolationConstants2=_interopRequireDefault(_ConformanceViolationConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var PLAYBACK_ENDED_TIMER_INTERVAL=200;var PREBUFFERING_CAN_START_INTERVAL=500;function StreamController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,capabilities=void 0,capabilitiesFilter=void 0,manifestUpdater=void 0,manifestLoader=void 0,manifestModel=void 0,adapter=void 0,dashMetrics=void 0,mediaSourceController=void 0,timeSyncController=void 0,baseURLController=void 0,abrController=void 0,mediaController=void 0,eventController=void 0,textController=void 0,initCache=void 0,urlUtils=void 0,errHandler=void 0,timelineConverter=void 0,streams=void 0,activeStream=void 0,protectionController=void 0,protectionData=void 0,autoPlay=void 0,isStreamSwitchingInProgress=void 0,hasMediaError=void 0,hasInitialisationError=void 0,mediaSource=void 0,videoModel=void 0,playbackController=void 0,mediaPlayerModel=void 0,isPaused=void 0,initialPlayback=void 0,isPeriodSwitchInProgress=void 0,playbackEndedTimerInterval=void 0,prebufferingCanStartInterval=void 0,buffers=void 0,preloadingStreams=void 0,supportsChangeType=void 0,settings=void 0,preBufferingCheckInProgress=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);timeSyncController=(0,_TimeSyncController2.default)(context).getInstance();mediaSourceController=(0,_MediaSourceController2.default)(context).getInstance();initCache=(0,_InitCache2.default)(context).getInstance();urlUtils=(0,_URLUtils2.default)(context).getInstance();resetInitialSettings();}function initialize(autoPl,protData){checkConfig();autoPlay=autoPl;protectionData=protData;timelineConverter.initialize();manifestUpdater=(0,_ManifestUpdater2.default)(context).create();manifestUpdater.setConfig({manifestModel:manifestModel,adapter:adapter,manifestLoader:manifestLoader,errHandler:errHandler,settings:settings});manifestUpdater.initialize();eventController=(0,_EventController2.default)(context).getInstance();eventController.setConfig({manifestUpdater:manifestUpdater,playbackController:playbackController});eventController.start();timeSyncController.setConfig({dashMetrics:dashMetrics,baseURLController:baseURLController,settings:settings});timeSyncController.initialize();registerEvents();}function registerEvents(){eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,instance);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.on(_Events2.default.GAP_CAUSED_SEEK_TO_PERIOD_END,onGapCausedPlaybackSeek,instance);eventBus.on(_Events2.default.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.on(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,instance);eventBus.on(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,instance);eventBus.on(_Events2.default.PLAYBACK_ENDED,onEnded,instance,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});eventBus.on(_Events2.default.MANIFEST_UPDATED,onManifestUpdated,instance);eventBus.on(_Events2.default.STREAM_BUFFERING_COMPLETED,onStreamBufferingCompleted,instance);eventBus.on(_Events2.default.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);eventBus.on(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED,onTimeSyncCompleted,instance);eventBus.on(_MediaPlayerEvents2.default.METRIC_ADDED,onMetricAdded,instance);}function unRegisterEvents(){eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,instance);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.off(_Events2.default.GAP_CAUSED_SEEK_TO_PERIOD_END,onGapCausedPlaybackSeek,instance);eventBus.off(_Events2.default.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.off(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,instance);eventBus.off(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,instance);eventBus.off(_Events2.default.PLAYBACK_ENDED,onEnded,instance);eventBus.off(_Events2.default.MANIFEST_UPDATED,onManifestUpdated,instance);eventBus.off(_Events2.default.STREAM_BUFFERING_COMPLETED,onStreamBufferingCompleted,instance);eventBus.off(_Events2.default.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);eventBus.off(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED,onTimeSyncCompleted,instance);eventBus.off(_MediaPlayerEvents2.default.METRIC_ADDED,onMetricAdded,instance);}/*\\n     * Called when current playback position is changed.\\n     * Used to determine the time current stream is finished and we should switch to the next stream.\\n     */function onPlaybackTimeUpdated()/*e*/{if(hasVideoTrack()){var playbackQuality=videoModel.getPlaybackQuality();if(playbackQuality){dashMetrics.addDroppedFrames(playbackQuality);}}}function onPlaybackSeeking(e){var seekingStream=getStreamForTime(e.seekTime);if(seekingStream===activeStream&&preloadingStreams&&preloadingStreams.length>0){// Seeking to the current period was requested while preloading the next one, deactivate preloading one\\npreloadingStreams.forEach(function(s){s.deactivate(true);});}if(seekingStream&&seekingStream!==activeStream){// If we're preloading other stream, the active one was deactivated and we need to switch back\\nflushPlaylistMetrics(_PlayList.PlayListTrace.END_OF_PERIOD_STOP_REASON);switchStream(seekingStream,activeStream,e.seekTime);}else{flushPlaylistMetrics(_PlayList.PlayListTrace.USER_REQUEST_STOP_REASON);}createPlaylistMetrics(_PlayList.PlayList.SEEK_START_REASON);}function onGapCausedPlaybackSeek(e){var nextStream=getNextStream();flushPlaylistMetrics(_PlayList.PlayListTrace.END_OF_PERIOD_STOP_REASON);switchStream(nextStream,activeStream,e.seekTime);createPlaylistMetrics(_PlayList.PlayList.SEEK_START_REASON);}function onPlaybackStarted()/*e*/{logger.debug('[onPlaybackStarted]');if(initialPlayback){initialPlayback=false;createPlaylistMetrics(_PlayList.PlayList.INITIAL_PLAYOUT_START_REASON);}else{if(isPaused){isPaused=false;createPlaylistMetrics(_PlayList.PlayList.RESUME_FROM_PAUSE_START_REASON);}}}function onPlaybackPaused(e){logger.debug('[onPlaybackPaused]');if(!e.ended){isPaused=true;flushPlaylistMetrics(_PlayList.PlayListTrace.USER_REQUEST_STOP_REASON);}}function startPlaybackEndedTimerInterval(){if(!playbackEndedTimerInterval){playbackEndedTimerInterval=setInterval(function(){if(!isStreamSwitchingInProgress&&playbackController.getTimeToStreamEnd()<=0){eventBus.trigger(_Events2.default.PLAYBACK_ENDED,{'isLast':getActiveStreamInfo().isLast});}},PLAYBACK_ENDED_TIMER_INTERVAL);}}function stopPlaybackEndedTimerInterval(){if(playbackEndedTimerInterval){clearInterval(playbackEndedTimerInterval);playbackEndedTimerInterval=null;}}function startCheckIfPrebufferingCanStartInterval(){if(!prebufferingCanStartInterval){prebufferingCanStartInterval=setInterval(function(){checkIfPrebufferingCanStart();},PREBUFFERING_CAN_START_INTERVAL);}}function stopCheckIfPrebufferingCanStartInterval(){clearInterval(prebufferingCanStartInterval);prebufferingCanStartInterval=null;}function checkIfPrebufferingCanStart(){// In multiperiod situations, we constantly check if the streams have finished buffering so we can immediately start buffering the next stream\\nif(!activeStream||!hasStreamFinishedBuffering(activeStream)){return;}var upcomingStreams=getNextStreams(activeStream);var i=0;var _loop=function _loop(){var stream=upcomingStreams[i];var previousStream=i===0?activeStream:upcomingStreams[i-1];// If the preloading for the current stream is not scheduled, but its predecessor has finished buffering we can start prebuffering this stream\\nif(!stream.getPreloadingScheduled()&&hasStreamFinishedBuffering(previousStream)){if(mediaSource){// We can not start prebuffering if the start of the next period is in the future. This will cause problems when calculating the segmentAvailabilityRange and updating the representations in the RepresentationController\\n// As long as the timeline converter returns an invalid range we do not start the prebuffering\\nvar mediaTypes=[_Constants2.default.VIDEO,_Constants2.default.AUDIO];var segmentAvailabilityRangeIsOk=true;mediaTypes.forEach(function(mediaType){var mediaInfo=adapter.getMediaInfoForType(stream.getStreamInfo(),mediaType);var voRepresentations=adapter.getVoRepresentations(mediaInfo);voRepresentations.forEach(function(voRep){var isDynamic=adapter.getIsDynamic();var range=timelineConverter.calcSegmentAvailabilityRange(voRep,isDynamic);if(range.end<range.start){segmentAvailabilityRangeIsOk=false;}});});if(segmentAvailabilityRangeIsOk){onStreamCanLoadNext(stream,previousStream);}}}i+=1;};while(i<upcomingStreams.length){_loop();}}function hasStreamFinishedBuffering(stream){try{if(!stream){return false;}var streamProcessors=stream.getProcessors().filter(function(sp){return sp.getType()===_Constants2.default.AUDIO||sp.getType()===_Constants2.default.VIDEO;});if(!streamProcessors||streamProcessors.length===0){return false;}var unfinishedStreamProcessors=streamProcessors.filter(function(sp){return!sp.isBufferingCompleted();});return unfinishedStreamProcessors&&unfinishedStreamProcessors.length===0;}catch(e){return false;}}function onStreamBufferingCompleted(){var isLast=getActiveStreamInfo().isLast;if(mediaSource&&isLast){logger.info('[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController.');mediaSourceController.signalEndOfStream(mediaSource);}}function canSourceBuffersBeReused(nextStream,previousStream){try{return settings.get().streaming.reuseExistingSourceBuffers&&previousStream.isProtectionCompatible(nextStream,previousStream)&&(supportsChangeType||previousStream.isMediaCodecCompatible(nextStream,previousStream))&&!hasCriticalTexttracks(nextStream);}catch(e){return false;}}function onStreamCanLoadNext(nextStream){var previousStream=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(mediaSource&&!nextStream.getPreloaded()){// Seamless period switch allowed only if:\\n// - none of the periods uses contentProtection.\\n// - AND changeType method implemented by browser or periods use the same codec.\\nvar seamlessPeriodSwitch=canSourceBuffersBeReused(nextStream,previousStream);if(seamlessPeriodSwitch){nextStream.setPreloadingScheduled(true);logger.info('[onStreamCanLoadNext] Preloading next stream with id '+nextStream.getId());isPeriodSwitchInProgress=true;nextStream.preload(mediaSource,buffers);preloadingStreams.push(nextStream);nextStream.getProcessors().forEach(function(p){p.setBufferingTime(nextStream.getStartTime());});}}}function hasCriticalTexttracks(stream){try{// if the upcoming stream has stpp or wvtt texttracks we need to reset the sourcebuffers and can not prebuffer\\nvar streamInfo=stream.getStreamInfo();var as=adapter.getAdaptationForType(streamInfo.index,_Constants2.default.FRAGMENTED_TEXT,streamInfo);if(!as){return false;}return as.codecs.indexOf('stpp')!==-1||as.codecs.indexOf('wvtt')!==-1;}catch(e){return false;}}function getStreamForTime(time){if(isNaN(time)){return null;}var streamDuration=0;var stream=null;var ln=streams.length;if(ln>0){streamDuration+=streams[0].getStartTime();}for(var i=0;i<ln;i++){stream=streams[i];streamDuration=parseFloat((streamDuration+stream.getDuration()).toFixed(5));if(time<streamDuration){return stream;}}return null;}/**\\n     * Returns a playhead time, in seconds, converted to be relative\\n     * to the start of an identified stream/period or null if no such stream\\n     * @param {number} time\\n     * @param {string} id\\n     * @returns {number|null}\\n     */function getTimeRelativeToStreamId(time,id){var stream=null;var baseStart=0;var streamStart=0;var streamDur=null;for(var i=0;i<streams.length;i++){stream=streams[i];streamStart=stream.getStartTime();streamDur=stream.getDuration();// use start time, if not undefined or NaN or similar\\nif(Number.isFinite(streamStart)){baseStart=streamStart;}if(stream.getId()===id){return time-baseStart;}else{// use duration if not undefined or NaN or similar\\nif(Number.isFinite(streamDur)){baseStart+=streamDur;}}}return null;}function getActiveStreamProcessors(){return activeStream?activeStream.getProcessors():[];}function onEnded(e){if(!activeStream.getIsEndedEventSignaled()){activeStream.setIsEndedEventSignaled(true);var nextStream=getNextStream();if(nextStream){logger.debug('StreamController onEnded, found next stream with id '+nextStream.getStreamInfo().id);switchStream(nextStream,activeStream,NaN);}else{logger.debug('StreamController no next stream found');activeStream.setIsEndedEventSignaled(false);}flushPlaylistMetrics(nextStream?_PlayList.PlayListTrace.END_OF_PERIOD_STOP_REASON:_PlayList.PlayListTrace.END_OF_CONTENT_STOP_REASON);isPeriodSwitchInProgress=false;}if(e&&e.isLast){stopPlaybackEndedTimerInterval();}}function getNextStream(){var stream=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var refStream=stream?stream:activeStream?activeStream:null;if(refStream){var start=refStream.getStreamInfo().start;var duration=refStream.getStreamInfo().duration;var streamEnd=parseFloat((start+duration).toFixed(5));var i=0;var targetIndex=-1;var lastDiff=NaN;while(i<streams.length){var s=streams[i];var diff=s.getStreamInfo().start-streamEnd;if(diff>=0&&(isNaN(lastDiff)||diff<lastDiff)){lastDiff=diff;targetIndex=i;}i+=1;}if(targetIndex>=0){return streams[targetIndex];}return null;}return null;}function getNextStreams(stream){try{var refStream=stream?stream:activeStream?activeStream:null;if(refStream){var start=refStream.getStreamInfo().start;return streams.filter(function(stream){return stream.getStreamInfo().start>start;});}}catch(e){return[];}}function switchStream(stream,previousStream,seekTime){if(isStreamSwitchingInProgress||!stream||previousStream===stream&&stream.isActive())return;isStreamSwitchingInProgress=true;eventBus.trigger(_Events2.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:previousStream?previousStream.getStreamInfo():null,toStreamInfo:stream.getStreamInfo()});var seamlessPeriodSwitch=false;if(previousStream){seamlessPeriodSwitch=canSourceBuffersBeReused(stream,previousStream);previousStream.deactivate(seamlessPeriodSwitch);}// Determine seek time when switching to new period\\n// - seek at given seek time\\n// - or seek at period start if upcoming period is not prebuffered\\nseekTime=!isNaN(seekTime)?seekTime:!seamlessPeriodSwitch&&previousStream?stream.getStreamInfo().start:NaN;logger.info('Switch to stream '+stream.getId()+'. Seektime is '+seekTime+', current playback time is '+playbackController.getTime());logger.info('Seamless period switch is set to '+seamlessPeriodSwitch);activeStream=stream;preloadingStreams=preloadingStreams.filter(function(s){return s.getId()!==activeStream.getId();});playbackController.initialize(getActiveStreamInfo(),!!previousStream,seekTime);if(videoModel.getElement()){openMediaSource(seekTime,previousStream===null,false,seamlessPeriodSwitch);}else{activateStream(seekTime,seamlessPeriodSwitch);}isPeriodSwitchInProgress=false;}function switchToVideoElement(seekTime){if(activeStream){playbackController.initialize(getActiveStreamInfo());openMediaSource(seekTime,false,true,false);}}function openMediaSource(seekTime,sourceInitialized,streamActivated,keepBuffers){var sourceUrl=void 0;function onMediaSourceOpen(){// Manage situations in which a call to reset happens while MediaSource is being opened\\nif(!mediaSource||mediaSource.readyState!=='open')return;logger.debug('MediaSource is open!');window.URL.revokeObjectURL(sourceUrl);mediaSource.removeEventListener('sourceopen',onMediaSourceOpen);mediaSource.removeEventListener('webkitsourceopen',onMediaSourceOpen);setMediaDuration();if(!sourceInitialized){eventBus.trigger(_Events2.default.SOURCE_INITIALIZED);}if(streamActivated){activeStream.setMediaSource(mediaSource);}else{activateStream(seekTime,keepBuffers);}}if(!mediaSource){mediaSource=mediaSourceController.createMediaSource();mediaSource.addEventListener('sourceopen',onMediaSourceOpen,false);mediaSource.addEventListener('webkitsourceopen',onMediaSourceOpen,false);sourceUrl=mediaSourceController.attachMediaSource(mediaSource,videoModel);logger.debug('MediaSource attached to element.  Waiting on open...');}else{if(keepBuffers){activateStream(seekTime,keepBuffers);if(!sourceInitialized){eventBus.trigger(_Events2.default.SOURCE_INITIALIZED);}}else{mediaSourceController.detachMediaSource(videoModel);mediaSource.addEventListener('sourceopen',onMediaSourceOpen,false);mediaSource.addEventListener('webkitsourceopen',onMediaSourceOpen,false);sourceUrl=mediaSourceController.attachMediaSource(mediaSource,videoModel);logger.debug('MediaSource attached to element.  Waiting on open...');}}}function getActiveStream(){return activeStream;}function activateStream(seekTime,keepBuffers){buffers=activeStream.activate(mediaSource,keepBuffers?buffers:undefined);// check if change type is supported by the browser\\nif(buffers){var keys=Object.keys(buffers);if(keys.length>0&&buffers[keys[0]].changeType){supportsChangeType=true;}}if(!initialPlayback){if(!isNaN(seekTime)){// If the streamswitch has been triggered by a seek command there is no need to seek again. Still we need to trigger the seeking event in order for the controllers to adjust the new time\\nif(seekTime===playbackController.getTime()){eventBus.trigger(_Events2.default.SEEK_TARGET,{time:seekTime},{streamId:activeStream.getId()});}else{playbackController.seek(seekTime);}}}if(autoPlay||!initialPlayback){playbackController.play();}isStreamSwitchingInProgress=false;eventBus.trigger(_Events2.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:getActiveStreamInfo()});}function setMediaDuration(duration){var manifestDuration=duration?duration:getActiveStreamInfo().manifestInfo.duration;mediaSourceController.setDuration(mediaSource,manifestDuration);}function getComposedStream(streamInfo){for(var i=0,ln=streams.length;i<ln;i++){if(streams[i].getId()===streamInfo.id){return streams[i];}}return null;}function composeStreams(){try{var streamsInfo=adapter.getStreamsInfo();if(streamsInfo.length===0){throw new Error('There are no streams');}dashMetrics.updateManifestUpdateInfo({currentTime:playbackController.getTime(),buffered:videoModel.getBufferRange(),presentationStartTime:streamsInfo[0].start,clientTimeOffset:timelineConverter.getClientTimeOffset()});// Filter streams that are outdated and not included in the MPD anymore\\nif(streams.length>0){streams=streams.filter(function(stream){var isStillIncluded=streamsInfo.filter(function(sInfo){return sInfo.id===stream.getId();}).length>0;var shouldKeepStream=isStillIncluded||stream.getId()===activeStream.getId();if(!shouldKeepStream){logger.debug('Removing stream '+stream.getId());}return shouldKeepStream;});}for(var i=0,ln=streamsInfo.length;i<ln;i++){// If the Stream object does not exist we probably loaded the manifest the first time or it was\\n// introduced in the updated manifest, so we need to create a new Stream and perform all the initialization operations\\nvar streamInfo=streamsInfo[i];var _stream=getComposedStream(streamInfo);if(!_stream){_stream=(0,_Stream2.default)(context).create({manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,manifestUpdater:manifestUpdater,adapter:adapter,timelineConverter:timelineConverter,capabilities:capabilities,capabilitiesFilter:capabilitiesFilter,errHandler:errHandler,baseURLController:baseURLController,abrController:abrController,playbackController:playbackController,eventController:eventController,mediaController:mediaController,textController:textController,protectionController:protectionController,videoModel:videoModel,streamInfo:streamInfo,settings:settings});streams.push(_stream);_stream.initialize();}else{_stream.updateData(streamInfo);}dashMetrics.addManifestUpdateStreamInfo(streamInfo);}if(!activeStream){if(adapter.getIsDynamic()&&streams.length){// Compute and set live delay\\nvar manifestInfo=streamsInfo[0].manifestInfo;var fragmentDuration=getFragmentDurationForLiveDelayCalculation(streamsInfo,manifestInfo);playbackController.computeAndSetLiveDelay(fragmentDuration,manifestInfo.DVRWindowSize,manifestInfo.minBufferTime);}// we need to figure out what the correct starting period is\\nvar initialStream=null;var startTimeFromUri=playbackController.getStartTimeFromUriParameters(adapter.getIsDynamic());initialStream=getStreamForTime(startTimeFromUri);// For multiperiod streams we should avoid a switch of streams after the seek to the live edge. So we do a calculation of the expected seek time to find the right stream object.\\nif(!initialStream&&adapter.getIsDynamic()&&streams.length){logger.debug('Dynamic stream: Trying to find the correct starting period');initialStream=getInitialStream();}var startStream=initialStream!==null?initialStream:streams[0];switchStream(startStream,null,NaN);startPlaybackEndedTimerInterval();startCheckIfPrebufferingCanStartInterval();}eventBus.trigger(_Events2.default.STREAMS_COMPOSED);}catch(e){errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+'nostreamscomposed',manifestModel.getValue()));hasInitialisationError=true;reset();}}function getInitialStream(){try{var liveEdge=timelineConverter.calcPresentationTimeFromWallTime(new Date(),adapter.getRegularPeriods()[0]);var targetDelay=playbackController.getLiveDelay();var targetTime=liveEdge-targetDelay;return getStreamForTime(targetTime);}catch(e){return null;}}function getFragmentDurationForLiveDelayCalculation(streamInfos,manifestInfo){try{var fragmentDuration=NaN;//  We use the maxFragmentDuration attribute if present\\nif(manifestInfo&&!isNaN(manifestInfo.maxFragmentDuration)&&isFinite(manifestInfo.maxFragmentDuration)){return manifestInfo.maxFragmentDuration;}// For single period manifests we can iterate over all AS and use the maximum segment length\\nif(streamInfos&&streamInfos.length===1){var streamInfo=streamInfos[0];var mediaTypes=[_Constants2.default.VIDEO,_Constants2.default.AUDIO,_Constants2.default.FRAGMENTED_TEXT];var fragmentDurations=mediaTypes.reduce(function(acc,mediaType){var mediaInfo=adapter.getMediaInfoForType(streamInfo,mediaType);if(mediaInfo){acc.push(mediaInfo);}return acc;},[]).reduce(function(acc,mediaInfo){var voRepresentations=adapter.getVoRepresentations(mediaInfo);if(voRepresentations&&voRepresentations.length>0){voRepresentations.forEach(function(voRepresentation){if(voRepresentation){acc.push(voRepresentation);}});}return acc;},[]).reduce(function(acc,voRepresentation){var representation=adapter.convertDataToRepresentationInfo(voRepresentation);if(representation&&representation.fragmentDuration&&!isNaN(representation.fragmentDuration)){acc.push(representation.fragmentDuration);}return acc;},[]);fragmentDuration=Math.max.apply(Math,_toConsumableArray(fragmentDurations));}return isFinite(fragmentDuration)?fragmentDuration:NaN;}catch(e){return NaN;}}function onTimeSyncCompleted()/*e*/{var manifest=manifestModel.getValue();//TODO check if we can move this to initialize??\\nif(protectionController){eventBus.trigger(_Events2.default.PROTECTION_CREATED,{controller:protectionController,manifest:manifest});protectionController.setMediaElement(videoModel.getElement());if(protectionData){protectionController.setProtectionData(protectionData);}}composeStreams();}function onManifestUpdated(e){if(!e.error){//Since streams are not composed yet , need to manually look up useCalculatedLiveEdgeTime to detect if stream\\n//is SegmentTimeline to avoid using time source\\nvar manifest=e.manifest;adapter.updatePeriods(manifest);var manifestUTCTimingSources=adapter.getUTCTimingSources();if(adapter.getIsDynamic()&&(!manifestUTCTimingSources||manifestUTCTimingSources.length===0)){eventBus.trigger(_MediaPlayerEvents2.default.CONFORMANCE_VIOLATION,{level:_ConformanceViolationConstants2.default.LEVELS.WARNING,event:_ConformanceViolationConstants2.default.EVENTS.NO_UTC_TIMING_ELEMENT});}var allUTCTimingSources=!adapter.getIsDynamic()?manifestUTCTimingSources:manifestUTCTimingSources.concat(mediaPlayerModel.getUTCTimingSources());var isHTTPS=urlUtils.isHTTPS(e.manifest.url);//If https is detected on manifest then lets apply that protocol to only the default time source(s). In the future we may find the need to apply this to more then just default so left code at this level instead of in MediaPlayer.\\nallUTCTimingSources.forEach(function(item){if(item.value.replace(/.*?:\\\\/\\\\//g,'')===mediaPlayerModel.getDefaultUtcTimingSource().value.replace(/.*?:\\\\/\\\\//g,'')){item.value=item.value.replace(isHTTPS?new RegExp(/^(http:)?\\\\/\\\\//i):new RegExp(/^(https:)?\\\\/\\\\//i),isHTTPS?'https://':'http://');logger.debug('Matching default timing source protocol to manifest protocol: ',item.value);}});baseURLController.initialize(manifest);timeSyncController.attemptSync(allUTCTimingSources);}else{hasInitialisationError=true;reset();}}function hasVideoTrack(){return activeStream?activeStream.getHasVideoTrack():false;}function hasAudioTrack(){return activeStream?activeStream.getHasAudioTrack():false;}function flushPlaylistMetrics(reason,time){time=time||new Date();getActiveStreamProcessors().forEach(function(p){p.finalisePlayList(time,reason);});dashMetrics.addPlayList();}function createPlaylistMetrics(startReason){dashMetrics.createPlaylistMetrics(playbackController.getTime()*1000,startReason);}function onPlaybackError(e){if(!e.error)return;var msg='';switch(e.error.code){case 1:msg='MEDIA_ERR_ABORTED';break;case 2:msg='MEDIA_ERR_NETWORK';break;case 3:msg='MEDIA_ERR_DECODE';break;case 4:msg='MEDIA_ERR_SRC_NOT_SUPPORTED';break;case 5:msg='MEDIA_ERR_ENCRYPTED';break;default:msg='UNKNOWN';break;}hasMediaError=true;if(e.error.message){msg+=' ('+e.error.message+')';}if(e.error.msExtendedCode){msg+=' (0x'+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+')';}logger.fatal('Video Element Error: '+msg);if(e.error){logger.fatal(e.error);}errHandler.error(new _DashJSError2.default(e.error.code,msg));reset();}function getActiveStreamInfo(){return activeStream?activeStream.getStreamInfo():null;}function getIsStreamSwitchInProgress(){return isStreamSwitchingInProgress;}function getHasMediaOrIntialisationError(){return hasMediaError||hasInitialisationError;}function getStreamById(id){return streams.filter(function(item){return item.getId()===id;})[0];}function checkConfig(){if(!manifestLoader||!manifestLoader.hasOwnProperty('load')||!timelineConverter||!timelineConverter.hasOwnProperty('initialize')||!timelineConverter.hasOwnProperty('reset')||!timelineConverter.hasOwnProperty('getClientTimeOffset')||!manifestModel||!errHandler||!dashMetrics||!playbackController){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function checkInitialize(){if(!manifestUpdater||!manifestUpdater.hasOwnProperty('setManifest')){throw new Error('initialize function has to be called previously');}}function load(url){checkConfig();manifestLoader.load(url);}function loadWithManifest(manifest){checkInitialize();manifestUpdater.setManifest(manifest);}function onManifestValidityChanged(e){if(!isNaN(e.newDuration)){setMediaDuration(e.newDuration);}}function setConfig(config){if(!config)return;if(config.capabilities){capabilities=config.capabilities;}if(config.capabilitiesFilter){capabilitiesFilter=config.capabilitiesFilter;}if(config.manifestLoader){manifestLoader=config.manifestLoader;}if(config.manifestModel){manifestModel=config.manifestModel;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.protectionController){protectionController=config.protectionController;}if(config.adapter){adapter=config.adapter;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.errHandler){errHandler=config.errHandler;}if(config.timelineConverter){timelineConverter=config.timelineConverter;}if(config.videoModel){videoModel=config.videoModel;}if(config.playbackController){playbackController=config.playbackController;}if(config.abrController){abrController=config.abrController;}if(config.mediaController){mediaController=config.mediaController;}if(config.textController){textController=config.textController;}if(config.settings){settings=config.settings;}if(config.baseURLController){baseURLController=config.baseURLController;}}function setProtectionData(protData){protectionData=protData;}function resetInitialSettings(){streams=[];protectionController=null;isStreamSwitchingInProgress=false;activeStream=null;hasMediaError=false;hasInitialisationError=false;initialPlayback=true;isPaused=false;autoPlay=true;playbackEndedTimerInterval=null;isPeriodSwitchInProgress=false;prebufferingCanStartInterval=null;preBufferingCheckInProgress=false;preloadingStreams=[];}function reset(){checkConfig();timeSyncController.reset();flushPlaylistMetrics(hasMediaError||hasInitialisationError?_PlayList.PlayListTrace.FAILURE_STOP_REASON:_PlayList.PlayListTrace.USER_REQUEST_STOP_REASON);for(var i=0,ln=streams?streams.length:0;i<ln;i++){var _stream2=streams[i];_stream2.reset(hasMediaError);}unRegisterEvents();baseURLController.reset();manifestUpdater.reset();eventController.reset();dashMetrics.clearAllCurrentMetrics();manifestModel.setValue(null);manifestLoader.reset();timelineConverter.reset();initCache.reset();if(mediaSource){mediaSourceController.detachMediaSource(videoModel);mediaSource=null;}videoModel=null;if(protectionController){protectionController.setMediaElement(null);protectionController=null;protectionData=null;if(manifestModel.getValue()){eventBus.trigger(_Events2.default.PROTECTION_DESTROYED,{data:manifestModel.getValue().url});}}stopPlaybackEndedTimerInterval();stopCheckIfPrebufferingCanStartInterval();eventBus.trigger(_Events2.default.STREAM_TEARDOWN_COMPLETE);resetInitialSettings();}function onMetricAdded(e){if(e.metric===_MetricsConstants2.default.DVR_INFO){//Match media type? How can DVR window be different for media types?\\n//Should we normalize and union the two?\\nvar targetMediaType=hasAudioTrack()?_Constants2.default.AUDIO:_Constants2.default.VIDEO;if(e.mediaType===targetMediaType){mediaSourceController.setSeekable(mediaSource,e.value.range.start,e.value.range.end);}}}function getStreams(){return streams;}instance={initialize:initialize,getActiveStreamInfo:getActiveStreamInfo,hasVideoTrack:hasVideoTrack,hasAudioTrack:hasAudioTrack,switchToVideoElement:switchToVideoElement,getStreamById:getStreamById,getStreamForTime:getStreamForTime,getTimeRelativeToStreamId:getTimeRelativeToStreamId,load:load,loadWithManifest:loadWithManifest,getActiveStreamProcessors:getActiveStreamProcessors,setConfig:setConfig,setProtectionData:setProtectionData,getIsStreamSwitchInProgress:getIsStreamSwitchInProgress,getHasMediaOrIntialisationError:getHasMediaOrIntialisationError,hasStreamFinishedBuffering:hasStreamFinishedBuffering,getStreams:getStreams,getActiveStream:getActiveStream,reset:reset};setup();return instance;}StreamController.__dashjs_factory_name='StreamController';exports.default=_FactoryMaker2.default.getSingletonFactory(StreamController);\\n//# sourceMappingURL=StreamController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashJSError=__webpack_require__(/*! ./../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _EventBus=__webpack_require__(/*! ./../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ./../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Errors=__webpack_require__(/*! ./../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var HTTP_TIMEOUT_MS=5000;var DEFAULT_MAXIMUM_ALLOWED_DRIFT=100;var DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS_ADJUSTMENT_FACTOR=2;var DEFAULT_BACKGROUND_ATTEMPTS=2;var DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS=30;var DEFAULT_MINIMUM_TIME_BETWEEN_BACKGROUND_SYNC_ATTEMPTS=30;var DEFAULT_MAXIMUM_TIME_BETWEEN_SYNC=600;var DEFAULT_MINIMUM_TIME_BETWEEN_SYNC=2;function TimeSyncController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,logger=void 0,isSynchronizing=void 0,isBackgroundSynchronizing=void 0,settings=void 0,handlers=void 0,dashMetrics=void 0,backgroundSyncTimeOffsets=void 0,timingSources=void 0,timeOfLastSync=void 0,timeOfLastBackgroundSync=void 0,lastOffset=void 0,lastTimingSource=void 0,internalTimeBetweenSyncAttempts=void 0,baseURLController=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);eventBus.on(_Events2.default.ATTEMPT_BACKGROUND_SYNC,_onAttemptBackgroundSync,instance);}function setConfig(config){if(!config)return;if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.baseURLController){baseURLController=config.baseURLController;}if(config.settings){settings=config.settings;}}function _resetInitialSettings(){backgroundSyncTimeOffsets=[];timingSources=[];timeOfLastSync=null;timeOfLastBackgroundSync=null;lastTimingSource=null;lastOffset=NaN;isSynchronizing=false;isBackgroundSynchronizing=false;internalTimeBetweenSyncAttempts=settings.get().streaming.utcSynchronization.timeBetweenSyncAttempts;}/**\\n     * Register the timing handler depending on the schemeIdUris. This method is called once when the StreamController is initialized\\n     */function initialize(){_resetInitialSettings();// a list of known schemeIdUris and a method to call with @value\\nhandlers={'urn:mpeg:dash:utc:http-head:2014':_httpHeadHandler,'urn:mpeg:dash:utc:http-xsdate:2014':_httpHandler.bind(null,_xsdatetimeDecoder),'urn:mpeg:dash:utc:http-iso:2014':_httpHandler.bind(null,_iso8601Decoder),'urn:mpeg:dash:utc:direct:2014':_directHandler,// some specs referencing early ISO23009-1 drafts incorrectly use\\n// 2012 in the URI, rather than 2014. support these for now.\\n'urn:mpeg:dash:utc:http-head:2012':_httpHeadHandler,'urn:mpeg:dash:utc:http-xsdate:2012':_httpHandler.bind(null,_xsdatetimeDecoder),'urn:mpeg:dash:utc:http-iso:2012':_httpHandler.bind(null,_iso8601Decoder),'urn:mpeg:dash:utc:direct:2012':_directHandler,// it isn't clear how the data returned would be formatted, and\\n// no public examples available so http-ntp not supported for now.\\n// presumably you would do an arraybuffer type xhr and decode the\\n// binary data returned but I would want to see a sample first.\\n'urn:mpeg:dash:utc:http-ntp:2014':_notSupportedHandler,// not clear how this would be supported in javascript (in browser)\\n'urn:mpeg:dash:utc:ntp:2014':_notSupportedHandler,'urn:mpeg:dash:utc:sntp:2014':_notSupportedHandler};}/**\\n     * Sync against a timing source. T\\n     * @param {array} tSources\\n     */function attemptSync(tSources){timingSources=tSources;// Stop if we are already synchronizing\\nif(isSynchronizing){return;}// No synchronization required we can signal the completion immediately\\nif(!_shouldPerformSynchronization()){eventBus.trigger(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED);return;}isSynchronizing=true;_attemptRecursiveSync();}/**\\n     * Does a synchronization in the background in case the last offset should be verified or a 404 occurs\\n     */function _onAttemptBackgroundSync(){if(isSynchronizing||isBackgroundSynchronizing||!lastTimingSource||!lastTimingSource.value||!lastTimingSource.schemeIdUri||isNaN(lastOffset)||isNaN(settings.get().streaming.utcSynchronization.backgroundAttempts)){return;}if(timeOfLastBackgroundSync&&(Date.now()-timeOfLastBackgroundSync)/1000<DEFAULT_MINIMUM_TIME_BETWEEN_BACKGROUND_SYNC_ATTEMPTS){return;}backgroundSyncTimeOffsets=[];isBackgroundSynchronizing=true;var backgroundAttempts=!isNaN(settings.get().streaming.utcSynchronization.backgroundAttempts)?settings.get().streaming.utcSynchronization.backgroundAttempts:DEFAULT_BACKGROUND_ATTEMPTS;_attemptBackgroundSync(backgroundAttempts);}/**\\n     * Perform a defined number of background attempts\\n     * @param {number} attempts\\n     * @private\\n     */function _attemptBackgroundSync(attempts){try{if(attempts<=0){_completeBackgroundTimeSyncSequence();return;}var deviceTimeBeforeSync=Date.now();handlers[lastTimingSource.schemeIdUri](lastTimingSource.value,function(serverTime){// the timing source returned something useful\\nvar deviceTimeAfterSync=Date.now();var offset=_calculateOffset(deviceTimeBeforeSync,deviceTimeAfterSync,serverTime);backgroundSyncTimeOffsets.push(offset);_attemptBackgroundSync(attempts-1);},function(){_completeBackgroundTimeSyncSequence();});}catch(e){_completeBackgroundTimeSyncSequence();}}/**\\n     * Sync against a timing source. This method is called recursively if the time sync for the first entry in timingSources fails.\\n     * @param {number} sourceIndex\\n     */function _attemptRecursiveSync(){var sourceIndex=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;// if called with no sourceIndex, use zero (highest priority)\\nvar index=sourceIndex||0;// the sources should be ordered in priority from the manifest.\\n// try each in turn, from the top, until either something\\n// sensible happens, or we run out of sources to try.\\nif(!timingSources||timingSources.length===0||index>=timingSources.length){_onComplete();return;}var source=timingSources[index];if(source){// check if there is a handler for this @schemeIdUri\\nif(handlers.hasOwnProperty(source.schemeIdUri)){// if so, call it with its @value\\nvar deviceTimeBeforeSync=new Date().getTime();handlers[source.schemeIdUri](source.value,function(serverTime){// the timing source returned something useful\\nvar deviceTimeAfterSync=new Date().getTime();var offset=_calculateOffset(deviceTimeBeforeSync,deviceTimeAfterSync,serverTime);lastTimingSource=source;_onComplete(offset);},function(){// the timing source was probably uncontactable\\n// or returned something we can't use - try again\\n// with the remaining sources\\n_attemptRecursiveSync(index+1);});}else{// an unknown schemeIdUri must have been found\\n// try again with the remaining sources\\n_attemptRecursiveSync(index+1);}}else{// no valid time source could be found, just use device time\\n_onComplete();}}/**\\n     * Calculate the offset between client and server. Account for the roundtrip time\\n     * @param {number} deviceTimeBeforeSync\\n     * @param {number} deviceTimeAfterSync\\n     * @param {number} serverTime\\n     * @return {number}\\n     * @private\\n     */function _calculateOffset(deviceTimeBeforeSync,deviceTimeAfterSync,serverTime){var deviceReferenceTime=deviceTimeAfterSync-(deviceTimeAfterSync-deviceTimeBeforeSync)/2;return serverTime-deviceReferenceTime;}/**\\n     * Checks if a synchronization is required\\n     * @return {boolean}\\n     * @private\\n     */function _shouldPerformSynchronization(){try{var timeBetweenSyncAttempts=!isNaN(internalTimeBetweenSyncAttempts)?internalTimeBetweenSyncAttempts:DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS;if(!timeOfLastSync||!timeBetweenSyncAttempts||isNaN(timeBetweenSyncAttempts)){return true;}return(Date.now()-timeOfLastSync)/1000>=timeBetweenSyncAttempts;}catch(e){return true;}}/**\\n     * Callback after sync has been completed\\n     * @param {number} offset\\n     * @private\\n     */function _onComplete(){var offset=arguments.length>0&&arguments[0]!==undefined?arguments[0]:NaN;var failed=isNaN(offset);if(failed&&settings.get().streaming.useManifestDateHeaderTimeSource){//Before falling back to binary search , check if date header exists on MPD. if so, use for a time source.\\n_checkForDateHeader();}else{_completeTimeSyncSequence(failed,offset);}}/**\\n     * Takes xsdatetime and returns milliseconds since UNIX epoch. May not be necessary as xsdatetime is very similar to ISO 8601 which is natively understood by javascript Date parser\\n     * @param {string} xsdatetimeStr\\n     * @return {number}\\n     * @private\\n     */function _alternateXsdatetimeDecoder(xsdatetimeStr){// taken from DashParser - should probably refactor both uses\\nvar SECONDS_IN_MIN=60;var MINUTES_IN_HOUR=60;var MILLISECONDS_IN_SECONDS=1000;var datetimeRegex=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\\\.[0-9]*)?)?(?:([+\\\\-])([0-9]{2})([0-9]{2}))?/;var utcDate=void 0,timezoneOffset=void 0;var match=datetimeRegex.exec(xsdatetimeStr);// If the string does not contain a timezone offset different browsers can interpret it either\\n// as UTC or as a local time so we have to parse the string manually to normalize the given date value for\\n// all browsers\\nutcDate=Date.UTC(parseInt(match[1],10),parseInt(match[2],10)-1,// months start from zero\\nparseInt(match[3],10),parseInt(match[4],10),parseInt(match[5],10),match[6]&&(parseInt(match[6],10)||0),match[7]&&parseFloat(match[7])*MILLISECONDS_IN_SECONDS||0);// If the date has timezone offset take it into account as well\\nif(match[9]&&match[10]){timezoneOffset=parseInt(match[9],10)*MINUTES_IN_HOUR+parseInt(match[10],10);utcDate+=(match[8]==='+'?-1:+1)*timezoneOffset*SECONDS_IN_MIN*MILLISECONDS_IN_SECONDS;}return new Date(utcDate).getTime();}/**\\n     * Try to use the built in parser, since xsdate is a constrained ISO8601 which is supported natively by Date.parse. if that fails, try a regex-based version used elsewhere in this application.\\n     * @param {string} xsdatetimeStr\\n     * @return {number}\\n     */function _xsdatetimeDecoder(xsdatetimeStr){var parsedDate=Date.parse(xsdatetimeStr);if(isNaN(parsedDate)){parsedDate=_alternateXsdatetimeDecoder(xsdatetimeStr);}return parsedDate;}/**\\n     * Takes ISO 8601 timestamp and returns milliseconds since UNIX epoch\\n     * @param {string} isoStr\\n     * @return {number}\\n     */function _iso8601Decoder(isoStr){return Date.parse(isoStr);}/**\\n     * Takes RFC 1123 timestamp (which is same as ISO8601) and returns milliseconds since UNIX epoch\\n     * @param {string} dateStr\\n     * @return {number}\\n     */function _rfc1123Decoder(dateStr){return Date.parse(dateStr);}/**\\n     * Handler for unsupported scheme ids.\\n     * @param {string} url\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     * @private\\n     */function _notSupportedHandler(url,onSuccessCB,onFailureCB){onFailureCB();}/**\\n     * Direct handler\\n     * @param {string} xsdatetimeStr\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     */function _directHandler(xsdatetimeStr,onSuccessCB,onFailureCB){var time=_xsdatetimeDecoder(xsdatetimeStr);if(!isNaN(time)){onSuccessCB(time);return;}onFailureCB();}/**\\n     * Generic http handler\\n     * @param {function} decoder\\n     * @param {string} url\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     * @param {boolean} isHeadRequest\\n     * @private\\n     */function _httpHandler(decoder,url,onSuccessCB,onFailureCB,isHeadRequest){var oncomplete=void 0,onload=void 0;var complete=false;var req=new XMLHttpRequest();var verb=isHeadRequest?_HTTPRequest.HTTPRequest.HEAD:_HTTPRequest.HTTPRequest.GET;var urls=url.match(/\\\\S+/g);// according to ISO 23009-1, url could be a white-space\\n// separated list of URLs. just handle one at a time.\\nurl=urls.shift();oncomplete=function oncomplete(){if(complete){return;}// we only want to pass through here once per xhr,\\n// regardless of whether the load was successful.\\ncomplete=true;// if there are more urls to try, call self.\\nif(urls.length){_httpHandler(decoder,urls.join(' '),onSuccessCB,onFailureCB,isHeadRequest);}else{onFailureCB();}};onload=function onload(){var time=void 0,result=void 0;if(req.status===200){time=isHeadRequest?req.getResponseHeader('Date'):req.response;result=decoder(time);// decoder returns NaN if non-standard input\\nif(!isNaN(result)){onSuccessCB(result);complete=true;}}};if(urlUtils.isRelative(url)){// passing no path to resolve will return just MPD BaseURL/baseUri\\nvar baseUrl=baseURLController.resolve();if(baseUrl){url=urlUtils.resolve(url,baseUrl.url);}}req.open(verb,url);req.timeout=HTTP_TIMEOUT_MS||0;req.onload=onload;req.onloadend=oncomplete;req.send();}/**\\n     * Handler for http-head schemeIdUri\\n     * @param {string} url\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     * @private\\n     */function _httpHeadHandler(url,onSuccessCB,onFailureCB){_httpHandler(_rfc1123Decoder,url,onSuccessCB,onFailureCB,true);}/**\\n     * Checks if a date header is present in the MPD response and calculates the offset based on the header\\n     * @private\\n     */function _checkForDateHeader(){var dateHeaderValue=dashMetrics.getLatestMPDRequestHeaderValueByID('Date');var dateHeaderTime=dateHeaderValue!==null?new Date(dateHeaderValue).getTime():Number.NaN;if(!isNaN(dateHeaderTime)){var offsetToDeviceTimeMs=dateHeaderTime-Date.now();_completeTimeSyncSequence(false,offsetToDeviceTimeMs);}else{_completeTimeSyncSequence(true);}}/**\\n     * Triggers the event to signal that the time synchronization was completed\\n     * @param {boolean} failed\\n     * @param {number} offset\\n     * @private\\n     */function _completeTimeSyncSequence(failed,offset){// Adjust the time of the next sync based on the drift between current offset and last offset\\nif(!isNaN(lastOffset)&&!isNaN(offset)&&!failed){_adjustTimeBetweenSyncAttempts(offset);}// Update the internal data\\nif(!failed&&!isNaN(offset)){timeOfLastSync=Date.now();isSynchronizing=false;// if this is the first sync we are doing perform background syncs as well to confirm current offset\\nvar shouldAttemptBackgroundSync=isNaN(lastOffset);lastOffset=offset;if(shouldAttemptBackgroundSync){_onAttemptBackgroundSync();}logger.debug('Completed UTC sync. Setting client - server offset to '+offset);}if(failed){lastTimingSource=null;}// Notify other classes\\neventBus.trigger(_Events2.default.UPDATE_TIME_SYNC_OFFSET,{offset:offset,error:failed?new _DashJSError2.default(_Errors2.default.TIME_SYNC_FAILED_ERROR_CODE,_Errors2.default.TIME_SYNC_FAILED_ERROR_MESSAGE):null});eventBus.trigger(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED);}function _adjustTimeBetweenSyncAttempts(offset){try{var isOffsetDriftWithinThreshold=_isOffsetDriftWithinThreshold(offset);var timeBetweenSyncAttempts=!isNaN(internalTimeBetweenSyncAttempts)?internalTimeBetweenSyncAttempts:DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS;var timeBetweenSyncAttemptsAdjustmentFactor=!isNaN(settings.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?settings.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor:DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS_ADJUSTMENT_FACTOR;var maximumTimeBetweenSyncAttempts=!isNaN(settings.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?settings.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts:DEFAULT_MAXIMUM_TIME_BETWEEN_SYNC;var minimumTimeBetweenSyncAttempts=!isNaN(settings.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?settings.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts:DEFAULT_MINIMUM_TIME_BETWEEN_SYNC;var adjustedTimeBetweenSyncAttempts=void 0;if(isOffsetDriftWithinThreshold){// The drift between the current offset and the last offset is within the allowed threshold. Increase sync time\\nadjustedTimeBetweenSyncAttempts=Math.min(timeBetweenSyncAttempts*timeBetweenSyncAttemptsAdjustmentFactor,maximumTimeBetweenSyncAttempts);logger.debug('Increasing timeBetweenSyncAttempts to '+adjustedTimeBetweenSyncAttempts);}else{// Drift between the current offset and the last offset is not within the allowed threshold. Decrease sync time\\nadjustedTimeBetweenSyncAttempts=Math.max(timeBetweenSyncAttempts/timeBetweenSyncAttemptsAdjustmentFactor,minimumTimeBetweenSyncAttempts);logger.debug('Decreasing timeBetweenSyncAttempts to '+adjustedTimeBetweenSyncAttempts);}internalTimeBetweenSyncAttempts=adjustedTimeBetweenSyncAttempts;}catch(e){}}/**\\n     * Callback after all background syncs have been completed.\\n     * @private\\n     */function _completeBackgroundTimeSyncSequence(){if(!backgroundSyncTimeOffsets||backgroundSyncTimeOffsets.length===0){return;}var averageOffset=backgroundSyncTimeOffsets.reduce(function(acc,curr){return acc+curr;},0)/backgroundSyncTimeOffsets.length;if(!_isOffsetDriftWithinThreshold(averageOffset)){logger.debug('Completed background UTC sync. Setting client - server offset to '+averageOffset);lastOffset=averageOffset;eventBus.trigger(_Events2.default.UPDATE_TIME_SYNC_OFFSET,{offset:lastOffset});}else{logger.debug('Completed background UTC sync. Offset is within allowed threshold and is not adjusted.');}isBackgroundSynchronizing=false;timeOfLastBackgroundSync=Date.now();}function _isOffsetDriftWithinThreshold(offset){try{if(isNaN(lastOffset)){return true;}var maxAllowedDrift=settings.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(settings.get().streaming.utcSynchronization.maximumAllowedDrift)?settings.get().streaming.utcSynchronization.maximumAllowedDrift:DEFAULT_MAXIMUM_ALLOWED_DRIFT;var lowerBound=lastOffset-maxAllowedDrift;var upperBound=lastOffset+maxAllowedDrift;return offset>=lowerBound&&offset<=upperBound;}catch(e){return true;}}function reset(){_resetInitialSettings();eventBus.off(_Events2.default.ATTEMPT_BACKGROUND_SYNC,_onAttemptBackgroundSync,instance);}instance={initialize:initialize,attemptSync:attemptSync,setConfig:setConfig,reset:reset};setup();return instance;}TimeSyncController.__dashjs_factory_name='TimeSyncController';var factory=_FactoryMaker2.default.getSingletonFactory(TimeSyncController);factory.HTTP_TIMEOUT_MS=HTTP_TIMEOUT_MS;_FactoryMaker2.default.updateSingletonFactory(TimeSyncController.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=TimeSyncController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _XlinkLoader=__webpack_require__(/*! ../XlinkLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js\\\");var _XlinkLoader2=_interopRequireDefault(_XlinkLoader);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _xml2json=__webpack_require__(/*! ../../../externals/xml2json */ \\\"../node_modules/dashjs/build/es5/externals/xml2json.js\\\");var _xml2json2=_interopRequireDefault(_xml2json);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _DashConstants=__webpack_require__(/*! ../../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var RESOLVE_TYPE_ONLOAD='onLoad';/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var RESOLVE_TYPE_ONACTUATE='onActuate';var RESOLVE_TO_ZERO='urn:mpeg:dash:resolve-to-zero:2013';function XlinkController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,matchers=void 0,iron=void 0,manifest=void 0,converter=void 0,xlinkLoader=void 0;function setup(){eventBus.on(_Events2.default.XLINK_ELEMENT_LOADED,onXlinkElementLoaded,instance);xlinkLoader=(0,_XlinkLoader2.default)(context).create({errHandler:config.errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,settings:config.settings});}function setMatchers(value){if(value){matchers=value;}}function setIron(value){if(value){iron=value;}}/**\\n     * <p>Triggers the resolution of the xlink.onLoad attributes in the manifest file </p>\\n     * @param {Object} mpd - the manifest\\n     */function resolveManifestOnLoad(mpd){var elements=void 0;// First resolve all periods, so unnecessary requests inside onLoad Periods with Default content are avoided\\nconverter=new _xml2json2.default({escapeMode:false,attributePrefix:'',arrayAccessForm:'property',emptyNodeForm:'object',stripWhitespaces:false,enableToStringFunc:false,ignoreRoot:true,matchers:matchers});manifest=mpd;if(manifest.Period_asArray){elements=getElementsToResolve(manifest.Period_asArray,manifest,_DashConstants2.default.PERIOD,RESOLVE_TYPE_ONLOAD);resolve(elements,_DashConstants2.default.PERIOD,RESOLVE_TYPE_ONLOAD);}else{eventBus.trigger(_Events2.default.XLINK_READY,{manifest:manifest});}}function reset(){eventBus.off(_Events2.default.XLINK_ELEMENT_LOADED,onXlinkElementLoaded,instance);if(xlinkLoader){xlinkLoader.reset();xlinkLoader=null;}}function resolve(elements,type,resolveType){var resolveObject={};var element=void 0,url=void 0;resolveObject.elements=elements;resolveObject.type=type;resolveObject.resolveType=resolveType;// If nothing to resolve, directly call allElementsLoaded\\nif(resolveObject.elements.length===0){onXlinkAllElementsLoaded(resolveObject);}for(var i=0;i<resolveObject.elements.length;i++){element=resolveObject.elements[i];if(urlUtils.isHTTPURL(element.url)){url=element.url;}else{url=element.originalContent.BaseURL+element.url;}xlinkLoader.load(url,element,resolveObject);}}function onXlinkElementLoaded(event){var element=void 0,resolveObject=void 0;var openingTag='<response>';var closingTag='</response>';var mergedContent='';element=event.element;resolveObject=event.resolveObject;// if the element resolved into content parse the content\\nif(element.resolvedContent){var index=0;// we add a parent elements so the converter is able to parse multiple elements of the same type which are not wrapped inside a container\\nif(element.resolvedContent.indexOf('<?xml')===0){index=element.resolvedContent.indexOf('?>')+2;//find the closing position of the xml declaration, if it exists.\\n}mergedContent=element.resolvedContent.substr(0,index)+openingTag+element.resolvedContent.substr(index)+closingTag;element.resolvedContent=converter.xml_str2json(mergedContent);}if(isResolvingFinished(resolveObject)){onXlinkAllElementsLoaded(resolveObject);}}// We got to wait till all elements of the current queue are resolved before merging back\\nfunction onXlinkAllElementsLoaded(resolveObject){var elements=[];var i=void 0,obj=void 0;mergeElementsBack(resolveObject);if(resolveObject.resolveType===RESOLVE_TYPE_ONACTUATE){eventBus.trigger(_Events2.default.XLINK_READY,{manifest:manifest});}if(resolveObject.resolveType===RESOLVE_TYPE_ONLOAD){switch(resolveObject.type){// Start resolving the other elements. We can do Adaptation Set and EventStream in parallel\\ncase _DashConstants2.default.PERIOD:for(i=0;i<manifest[_DashConstants2.default.PERIOD+'_asArray'].length;i++){obj=manifest[_DashConstants2.default.PERIOD+'_asArray'][i];if(obj.hasOwnProperty(_DashConstants2.default.ADAPTATION_SET+'_asArray')){elements=elements.concat(getElementsToResolve(obj[_DashConstants2.default.ADAPTATION_SET+'_asArray'],obj,_DashConstants2.default.ADAPTATION_SET,RESOLVE_TYPE_ONLOAD));}if(obj.hasOwnProperty(_DashConstants2.default.EVENT_STREAM+'_asArray')){elements=elements.concat(getElementsToResolve(obj[_DashConstants2.default.EVENT_STREAM+'_asArray'],obj,_DashConstants2.default.EVENT_STREAM,RESOLVE_TYPE_ONLOAD));}}resolve(elements,_DashConstants2.default.ADAPTATION_SET,RESOLVE_TYPE_ONLOAD);break;case _DashConstants2.default.ADAPTATION_SET:// TODO: Resolve SegmentList here\\neventBus.trigger(_Events2.default.XLINK_READY,{manifest:manifest});break;}}}// Returns the elements with the specific resolve Type\\nfunction getElementsToResolve(elements,parentElement,type,resolveType){var toResolve=[];var element=void 0,i=void 0,xlinkObject=void 0;// first remove all the resolve-to-zero elements\\nfor(i=elements.length-1;i>=0;i--){element=elements[i];if(element.hasOwnProperty('xlink:href')&&element['xlink:href']===RESOLVE_TO_ZERO){elements.splice(i,1);}}// now get the elements with the right resolve type\\nfor(i=0;i<elements.length;i++){element=elements[i];if(element.hasOwnProperty('xlink:href')&&element.hasOwnProperty('xlink:actuate')&&element['xlink:actuate']===resolveType){xlinkObject=createXlinkObject(element['xlink:href'],parentElement,type,i,resolveType,element);toResolve.push(xlinkObject);}}return toResolve;}function mergeElementsBack(resolveObject){var resolvedElements=[];var element=void 0,type=void 0,obj=void 0,i=void 0,j=void 0,k=void 0;// Start merging back from the end because of index shifting. Note that the elements with the same parent have to be ordered by index ascending\\nfor(i=resolveObject.elements.length-1;i>=0;i--){element=resolveObject.elements[i];type=element.type+'_asArray';// Element couldn't be resolved or is TODO Inappropriate target: Remove all Xlink attributes\\nif(!element.resolvedContent||isInappropriateTarget()){delete element.originalContent['xlink:actuate'];delete element.originalContent['xlink:href'];resolvedElements.push(element.originalContent);}// Element was successfully resolved\\nelse if(element.resolvedContent){for(j=0;j<element.resolvedContent[type].length;j++){//TODO Contains another Xlink attribute with xlink:actuate set to onload. Remove all xLink attributes\\nobj=element.resolvedContent[type][j];resolvedElements.push(obj);}}// Replace the old elements in the parent with the resolved ones\\nelement.parentElement[type].splice(element.index,1);for(k=0;k<resolvedElements.length;k++){element.parentElement[type].splice(element.index+k,0,resolvedElements[k]);}resolvedElements=[];}if(resolveObject.elements.length>0){iron.run(manifest);}}function createXlinkObject(url,parentElement,type,index,resolveType,originalContent){return{url:url,parentElement:parentElement,type:type,index:index,resolveType:resolveType,originalContent:originalContent,resolvedContent:null,resolved:false};}// Check if all pending requests are finished\\nfunction isResolvingFinished(elementsToResolve){var i=void 0,obj=void 0;for(i=0;i<elementsToResolve.elements.length;i++){obj=elementsToResolve.elements[i];if(obj.resolved===false){return false;}}return true;}// TODO : Do some syntax check here if the target is valid or not\\nfunction isInappropriateTarget(){return false;}instance={resolveManifestOnLoad:resolveManifestOnLoad,setMatchers:setMatchers,setIron:setIron,reset:reset};setup();return instance;}XlinkController.__dashjs_factory_name='XlinkController';exports.default=_FactoryMaker2.default.getClassFactory(XlinkController);\\n//# sourceMappingURL=XlinkController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DVBErrorsTranslator=__webpack_require__(/*! ./utils/DVBErrorsTranslator */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js\\\");var _DVBErrorsTranslator2=_interopRequireDefault(_DVBErrorsTranslator);var _MetricsReportingEvents=__webpack_require__(/*! ./MetricsReportingEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\\\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);var _MetricsCollectionController=__webpack_require__(/*! ./controllers/MetricsCollectionController */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js\\\");var _MetricsCollectionController2=_interopRequireDefault(_MetricsCollectionController);var _MetricsHandlerFactory=__webpack_require__(/*! ./metrics/MetricsHandlerFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js\\\");var _MetricsHandlerFactory2=_interopRequireDefault(_MetricsHandlerFactory);var _ReportingFactory=__webpack_require__(/*! ./reporting/ReportingFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js\\\");var _ReportingFactory2=_interopRequireDefault(_ReportingFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsReporting(){var context=this.context;var instance=void 0,dvbErrorsTranslator=void 0;/**\\n     * Create a MetricsCollectionController, and a DVBErrorsTranslator\\n     * @param {Object} config - dependancies from owner\\n     * @return {MetricsCollectionController} Metrics Collection Controller\\n     */function createMetricsReporting(config){dvbErrorsTranslator=(0,_DVBErrorsTranslator2.default)(context).getInstance({eventBus:config.eventBus,dashMetrics:config.dashMetrics,metricsConstants:config.metricsConstants,events:config.events});return(0,_MetricsCollectionController2.default)(context).create(config);}/**\\n     * Get the ReportingFactory to allow new reporters to be registered\\n     * @return {ReportingFactory} Reporting Factory\\n     */function getReportingFactory(){return(0,_ReportingFactory2.default)(context).getInstance();}/**\\n     * Get the MetricsHandlerFactory to allow new handlers to be registered\\n     * @return {MetricsHandlerFactory} Metrics Handler Factory\\n     */function getMetricsHandlerFactory(){return(0,_MetricsHandlerFactory2.default)(context).getInstance();}instance={createMetricsReporting:createMetricsReporting,getReportingFactory:getReportingFactory,getMetricsHandlerFactory:getMetricsHandlerFactory};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsReporting.__dashjs_factory_name='MetricsReporting';var factory=dashjs.FactoryMaker.getClassFactory(MetricsReporting);/* jshint ignore:line */factory.events=_MetricsReportingEvents2.default;dashjs.FactoryMaker.updateClassFactory(MetricsReporting.__dashjs_factory_name,factory);/* jshint ignore:line */exports.default=factory;\\n//# sourceMappingURL=MetricsReporting.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ../../core/events/EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var MetricsReportingEvents=function(_EventsBase){_inherits(MetricsReportingEvents,_EventsBase);function MetricsReportingEvents(){_classCallCheck(this,MetricsReportingEvents);var _this=_possibleConstructorReturn(this,(MetricsReportingEvents.__proto__||Object.getPrototypeOf(MetricsReportingEvents)).call(this));_this.METRICS_INITIALISATION_COMPLETE='internal_metricsReportingInitialized';_this.BECAME_REPORTING_PLAYER='internal_becameReportingPlayer';/**\\n         * Triggered when CMCD data was generated for a HTTP request\\n         * @event MetricsReportingEvents#CMCD_DATA_GENERATED\\n         */_this.CMCD_DATA_GENERATED='cmcdDataGenerated';return _this;}return MetricsReportingEvents;}(_EventsBase3.default);var metricsReportingEvents=new MetricsReportingEvents();exports.default=metricsReportingEvents;\\n//# sourceMappingURL=MetricsReportingEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js\":\n/*!*********************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js ***!\n  \\*********************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsController=__webpack_require__(/*! ./MetricsController */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js\\\");var _MetricsController2=_interopRequireDefault(_MetricsController);var _ManifestParsing=__webpack_require__(/*! ../utils/ManifestParsing */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js\\\");var _ManifestParsing2=_interopRequireDefault(_ManifestParsing);var _MetricsReportingEvents=__webpack_require__(/*! ../MetricsReportingEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\\\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsCollectionController(config){config=config||{};var instance=void 0;var metricsControllers={};var context=this.context;var eventBus=config.eventBus;var events=config.events;function update(e){if(e.error){return;}// start by assuming all existing controllers need removing\\nvar controllersToRemove=Object.keys(metricsControllers);var metrics=(0,_ManifestParsing2.default)(context).getInstance({adapter:config.adapter,constants:config.constants}).getMetrics(e.manifest);metrics.forEach(function(m){var key=JSON.stringify(m);if(!metricsControllers.hasOwnProperty(key)){try{var controller=(0,_MetricsController2.default)(context).create(config);controller.initialize(m);metricsControllers[key]=controller;}catch(e){// fail quietly\\n}}else{// we still need this controller - delete from removal list\\ncontrollersToRemove.splice(key,1);}});// now remove the unwanted controllers\\ncontrollersToRemove.forEach(function(c){metricsControllers[c].reset();delete metricsControllers[c];});eventBus.trigger(_MetricsReportingEvents2.default.METRICS_INITIALISATION_COMPLETE);}function resetMetricsControllers(){Object.keys(metricsControllers).forEach(function(key){metricsControllers[key].reset();});metricsControllers={};}function setup(){eventBus.on(events.MANIFEST_UPDATED,update,instance);eventBus.on(events.STREAM_TEARDOWN_COMPLETE,resetMetricsControllers,instance);}function reset(){eventBus.off(events.MANIFEST_UPDATED,update,instance);eventBus.off(events.STREAM_TEARDOWN_COMPLETE,resetMetricsControllers,instance);}instance={reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsCollectionController.__dashjs_factory_name='MetricsCollectionController';exports.default=dashjs.FactoryMaker.getClassFactory(MetricsCollectionController);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsCollectionController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js\":\n/*!***********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js ***!\n  \\***********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _RangeController=__webpack_require__(/*! ./RangeController */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js\\\");var _RangeController2=_interopRequireDefault(_RangeController);var _ReportingController=__webpack_require__(/*! ./ReportingController */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js\\\");var _ReportingController2=_interopRequireDefault(_ReportingController);var _MetricsHandlersController=__webpack_require__(/*! ./MetricsHandlersController */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js\\\");var _MetricsHandlersController2=_interopRequireDefault(_MetricsHandlersController);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsController(config){config=config||{};var metricsHandlersController=void 0,reportingController=void 0,rangeController=void 0,instance=void 0;var context=this.context;function initialize(metricsEntry){try{rangeController=(0,_RangeController2.default)(context).create({mediaElement:config.mediaElement});rangeController.initialize(metricsEntry.Range);reportingController=(0,_ReportingController2.default)(context).create({debug:config.debug,metricsConstants:config.metricsConstants});reportingController.initialize(metricsEntry.Reporting,rangeController);metricsHandlersController=(0,_MetricsHandlersController2.default)(context).create({debug:config.debug,eventBus:config.eventBus,metricsConstants:config.metricsConstants,events:config.events});metricsHandlersController.initialize(metricsEntry.metrics,reportingController);}catch(e){reset();throw e;}}function reset(){if(metricsHandlersController){metricsHandlersController.reset();}if(reportingController){reportingController.reset();}if(rangeController){rangeController.reset();}}instance={initialize:initialize,reset:reset};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsController.__dashjs_factory_name='MetricsController';exports.default=dashjs.FactoryMaker.getClassFactory(MetricsController);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js\":\n/*!*******************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js ***!\n  \\*******************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsHandlerFactory=__webpack_require__(/*! ../metrics/MetricsHandlerFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js\\\");var _MetricsHandlerFactory2=_interopRequireDefault(_MetricsHandlerFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsHandlersController(config){config=config||{};var handlers=[];var instance=void 0;var context=this.context;var eventBus=config.eventBus;var Events=config.events;var metricsHandlerFactory=(0,_MetricsHandlerFactory2.default)(context).getInstance({debug:config.debug,eventBus:config.eventBus,metricsConstants:config.metricsConstants});function handle(e){handlers.forEach(function(handler){handler.handleNewMetric(e.metric,e.value,e.mediaType);});}function initialize(metrics,reportingController){metrics.split(',').forEach(function(m,midx,ms){var handler=void 0;// there is a bug in ISO23009-1 where the metrics attribute\\n// is a comma-separated list but HttpList key can contain a\\n// comma enclosed by ().\\nif(m.indexOf('(')!==-1&&m.indexOf(')')===-1){var nextm=ms[midx+1];if(nextm&&nextm.indexOf('(')===-1&&nextm.indexOf(')')!==-1){m+=','+nextm;// delete the next metric so forEach does not visit.\\ndelete ms[midx+1];}}handler=metricsHandlerFactory.create(m,reportingController);if(handler){handlers.push(handler);}});eventBus.on(Events.METRIC_ADDED,handle,instance);eventBus.on(Events.METRIC_UPDATED,handle,instance);}function reset(){eventBus.off(Events.METRIC_ADDED,handle,instance);eventBus.off(Events.METRIC_UPDATED,handle,instance);handlers.forEach(function(handler){return handler.reset();});handlers=[];}instance={initialize:initialize,reset:reset};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsHandlersController.__dashjs_factory_name='MetricsHandlersController';exports.default=dashjs.FactoryMaker.getClassFactory(MetricsHandlersController);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsHandlersController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js\":\n/*!*********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js ***!\n  \\*********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CustomTimeRanges=__webpack_require__(/*! ../../utils/CustomTimeRanges */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js\\\");var _CustomTimeRanges2=_interopRequireDefault(_CustomTimeRanges);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RangeController(config){config=config||{};var useWallClockTime=false;var context=this.context;var instance=void 0,ranges=void 0;var mediaElement=config.mediaElement;function initialize(rs){if(rs&&rs.length){rs.forEach(function(r){var start=r.starttime;var end=start+r.duration;ranges.add(start,end);});useWallClockTime=!!rs[0]._useWallClockTime;}}function reset(){ranges.clear();}function setup(){ranges=(0,_CustomTimeRanges2.default)(context).create();}function isEnabled(){var numRanges=ranges.length;var time=void 0;if(!numRanges){return true;}// When not present, DASH Metrics reporting is requested\\n// for the whole duration of the content.\\ntime=useWallClockTime?new Date().getTime()/1000:mediaElement.currentTime;for(var i=0;i<numRanges;i+=1){var start=ranges.start(i);var end=ranges.end(i);if(start<=time&&time<end){return true;}}return false;}instance={initialize:initialize,reset:reset,isEnabled:isEnabled};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RangeController.__dashjs_factory_name='RangeController';exports.default=dashjs.FactoryMaker.getClassFactory(RangeController);/* jshint ignore:line */\\n//# sourceMappingURL=RangeController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js\":\n/*!*************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js ***!\n  \\*************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ReportingFactory=__webpack_require__(/*! ../reporting/ReportingFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js\\\");var _ReportingFactory2=_interopRequireDefault(_ReportingFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReportingController(config){var reporters=[];var instance=void 0;var reportingFactory=(0,_ReportingFactory2.default)(this.context).getInstance(config);function initialize(reporting,rangeController){// \\\"if multiple Reporting elements are present, it is expected that\\n// the client processes one of the recognized reporting schemes.\\\"\\n// to ignore this, and support multiple Reporting per Metric,\\n// simply change the 'some' below to 'forEach'\\nreporting.some(function(r){var reporter=reportingFactory.create(r,rangeController);if(reporter){reporters.push(reporter);return true;}});}function reset(){reporters.forEach(function(r){return r.reset();});reporters=[];}function report(type,vos){reporters.forEach(function(r){return r.report(type,vos);});}instance={initialize:initialize,reset:reset,report:report};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ReportingController.__dashjs_factory_name='ReportingController';exports.default=dashjs.FactoryMaker.getClassFactory(ReportingController);/* jshint ignore:line */\\n//# sourceMappingURL=ReportingController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js\":\n/*!***********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js ***!\n  \\***********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BufferLevelHandler=__webpack_require__(/*! ./handlers/BufferLevelHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js\\\");var _BufferLevelHandler2=_interopRequireDefault(_BufferLevelHandler);var _DVBErrorsHandler=__webpack_require__(/*! ./handlers/DVBErrorsHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js\\\");var _DVBErrorsHandler2=_interopRequireDefault(_DVBErrorsHandler);var _HttpListHandler=__webpack_require__(/*! ./handlers/HttpListHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js\\\");var _HttpListHandler2=_interopRequireDefault(_HttpListHandler);var _GenericMetricHandler=__webpack_require__(/*! ./handlers/GenericMetricHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js\\\");var _GenericMetricHandler2=_interopRequireDefault(_GenericMetricHandler);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function MetricsHandlerFactory(config){config=config||{};var instance=void 0;var logger=config.debug?config.debug.getLogger(instance):{};// group 1: key, [group 3: n [, group 5: type]]\\nvar keyRegex=/([a-zA-Z]*)(\\\\(([0-9]*)(\\\\,\\\\s*([a-zA-Z]*))?\\\\))?/;var context=this.context;var knownFactoryProducts={BufferLevel:_BufferLevelHandler2.default,DVBErrors:_DVBErrorsHandler2.default,HttpList:_HttpListHandler2.default,PlayList:_GenericMetricHandler2.default,RepSwitchList:_GenericMetricHandler2.default,TcpList:_GenericMetricHandler2.default};function create(listType,reportingController){var matches=listType.match(keyRegex);var handler;if(!matches){return;}try{handler=knownFactoryProducts[matches[1]](context).create({eventBus:config.eventBus,metricsConstants:config.metricsConstants});handler.initialize(matches[1],reportingController,matches[3],matches[5]);}catch(e){handler=null;logger.error('MetricsHandlerFactory: Could not create handler for type '+matches[1]+' with args '+matches[3]+', '+matches[5]+' ('+e.message+')');}return handler;}function register(key,handler){knownFactoryProducts[key]=handler;}function unregister(key){delete knownFactoryProducts[key];}instance={create:create,register:register,unregister:unregister};return instance;}MetricsHandlerFactory.__dashjs_factory_name='MetricsHandlerFactory';exports.default=dashjs.FactoryMaker.getSingletonFactory(MetricsHandlerFactory);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsHandlerFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js\":\n/*!*****************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js ***!\n  \\*****************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _HandlerHelpers=__webpack_require__(/*! ../../utils/HandlerHelpers */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js\\\");var _HandlerHelpers2=_interopRequireDefault(_HandlerHelpers);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BufferLevelHandler(config){config=config||{};var instance=void 0,reportingController=void 0,n=void 0,name=void 0,interval=void 0,lastReportedTime=void 0;var context=this.context;var handlerHelpers=(0,_HandlerHelpers2.default)(context).getInstance();var storedVOs=[];var metricsConstants=config.metricsConstants;function getLowestBufferLevelVO(){try{return Object.keys(storedVOs).map(function(key){return storedVOs[key];}).reduce(function(a,b){return a.level<b.level?a:b;});}catch(e){return;}}function intervalCallback(){var vo=getLowestBufferLevelVO();if(vo){if(lastReportedTime!==vo.t){lastReportedTime=vo.t;reportingController.report(name,vo);}}}function initialize(basename,rc,n_ms){if(rc){// this will throw if n is invalid, to be\\n// caught by the initialize caller.\\nn=handlerHelpers.validateN(n_ms);reportingController=rc;name=handlerHelpers.reconstructFullMetricName(basename,n_ms);interval=setInterval(intervalCallback,n);}}function reset(){clearInterval(interval);interval=null;n=0;reportingController=null;lastReportedTime=null;}function handleNewMetric(metric,vo,type){if(metric===metricsConstants.BUFFER_LEVEL){storedVOs[type]=vo;}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BufferLevelHandler.__dashjs_factory_name='BufferLevelHandler';exports.default=dashjs.FactoryMaker.getClassFactory(BufferLevelHandler);/* jshint ignore:line */\\n//# sourceMappingURL=BufferLevelHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js\":\n/*!***************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js ***!\n  \\***************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsReportingEvents=__webpack_require__(/*! ../../MetricsReportingEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\\\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DVBErrorsHandler(config){config=config||{};var instance=void 0,reportingController=void 0;var eventBus=config.eventBus;var metricsConstants=config.metricsConstants;function onInitialisationComplete(){// we only want to report this once per call to initialize\\neventBus.off(_MetricsReportingEvents2.default.METRICS_INITIALISATION_COMPLETE,onInitialisationComplete,this);// Note: A Player becoming a reporting Player is itself\\n// something which is recorded by the DVBErrors metric.\\neventBus.trigger(_MetricsReportingEvents2.default.BECAME_REPORTING_PLAYER);}function initialize(unused,rc){if(rc){reportingController=rc;eventBus.on(_MetricsReportingEvents2.default.METRICS_INITIALISATION_COMPLETE,onInitialisationComplete,this);}}function reset(){reportingController=null;}function handleNewMetric(metric,vo){// simply pass metric straight through\\nif(metric===metricsConstants.DVB_ERRORS){if(reportingController){reportingController.report(metric,vo);}}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */exports.default=dashjs.FactoryMaker.getClassFactory(DVBErrorsHandler);/* jshint ignore:line */\\n//# sourceMappingURL=DVBErrorsHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js\":\n/*!*******************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js ***!\n  \\*******************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n  * @ignore\\n  */function GenericMetricHandler(){var instance=void 0,metricName=void 0,reportingController=void 0;function initialize(name,rc){metricName=name;reportingController=rc;}function reset(){reportingController=null;metricName=undefined;}function handleNewMetric(metric,vo){// simply pass metric straight through\\nif(metric===metricName){if(reportingController){reportingController.report(metricName,vo);}}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}GenericMetricHandler.__dashjs_factory_name='GenericMetricHandler';exports.default=dashjs.FactoryMaker.getClassFactory(GenericMetricHandler);/* jshint ignore:line */\\n//# sourceMappingURL=GenericMetricHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js\":\n/*!**************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js ***!\n  \\**************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _HandlerHelpers=__webpack_require__(/*! ../../utils/HandlerHelpers */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js\\\");var _HandlerHelpers2=_interopRequireDefault(_HandlerHelpers);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function HttpListHandler(config){config=config||{};var instance=void 0,reportingController=void 0,n=void 0,type=void 0,name=void 0,interval=void 0;var storedVos=[];var handlerHelpers=(0,_HandlerHelpers2.default)(this.context).getInstance();var metricsConstants=config.metricsConstants;function intervalCallback(){var vos=storedVos;if(vos.length){if(reportingController){reportingController.report(name,vos);}}storedVos=[];}function initialize(basename,rc,n_ms,requestType){if(rc){// this will throw if n is invalid, to be\\n// caught by the initialize caller.\\nn=handlerHelpers.validateN(n_ms);reportingController=rc;if(requestType&&requestType.length){type=requestType;}name=handlerHelpers.reconstructFullMetricName(basename,n_ms,requestType);interval=setInterval(intervalCallback,n);}}function reset(){clearInterval(interval);interval=null;n=null;type=null;storedVos=[];reportingController=null;}function handleNewMetric(metric,vo){if(metric===metricsConstants.HTTP_REQUEST){if(!type||type===vo.type){storedVos.push(vo);}}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */HttpListHandler.__dashjs_factory_name='HttpListHandler';exports.default=dashjs.FactoryMaker.getClassFactory(HttpListHandler);/* jshint ignore:line */\\n//# sourceMappingURL=HttpListHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js\":\n/*!********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js ***!\n  \\********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DVBReporting=__webpack_require__(/*! ./reporters/DVBReporting */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js\\\");var _DVBReporting2=_interopRequireDefault(_DVBReporting);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReportingFactory(config){config=config||{};var knownReportingSchemeIdUris={'urn:dvb:dash:reporting:2014':_DVBReporting2.default};var context=this.context;var instance=void 0;var logger=config.debug?config.debug.getLogger(instance):{};var metricsConstants=config.metricsConstants;function create(entry,rangeController){var reporting=void 0;try{reporting=knownReportingSchemeIdUris[entry.schemeIdUri](context).create({metricsConstants:metricsConstants});reporting.initialize(entry,rangeController);}catch(e){reporting=null;logger.error('ReportingFactory: could not create Reporting with schemeIdUri '+entry.schemeIdUri+' ('+e.message+')');}return reporting;}function register(schemeIdUri,moduleName){knownReportingSchemeIdUris[schemeIdUri]=moduleName;}function unregister(schemeIdUri){delete knownReportingSchemeIdUris[schemeIdUri];}instance={create:create,register:register,unregister:unregister};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ReportingFactory.__dashjs_factory_name='ReportingFactory';exports.default=dashjs.FactoryMaker.getSingletonFactory(ReportingFactory);/* jshint ignore:line */\\n//# sourceMappingURL=ReportingFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js\":\n/*!**************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js ***!\n  \\**************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricSerialiser=__webpack_require__(/*! ../../utils/MetricSerialiser */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js\\\");var _MetricSerialiser2=_interopRequireDefault(_MetricSerialiser);var _RNG=__webpack_require__(/*! ../../utils/RNG */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js\\\");var _RNG2=_interopRequireDefault(_RNG);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function DVBReporting(config){config=config||{};var instance=void 0;var context=this.context;var metricSerialiser=void 0,randomNumberGenerator=void 0,reportingPlayerStatusDecided=void 0,isReportingPlayer=void 0,reportingUrl=void 0,rangeController=void 0;var USE_DRAFT_DVB_SPEC=true;var allowPendingRequestsToCompleteOnReset=true;var pendingRequests=[];var metricsConstants=config.metricsConstants;function setup(){metricSerialiser=(0,_MetricSerialiser2.default)(context).getInstance();randomNumberGenerator=(0,_RNG2.default)(context).getInstance();resetInitialSettings();}function doGetRequest(url,successCB,failureCB){var req=new XMLHttpRequest();var oncomplete=function oncomplete(){var reqIndex=pendingRequests.indexOf(req);if(reqIndex===-1){return;}else{pendingRequests.splice(reqIndex,1);}if(req.status>=200&&req.status<300){if(successCB){successCB();}}else{if(failureCB){failureCB();}}};pendingRequests.push(req);try{req.open('GET',url);req.onloadend=oncomplete;req.onerror=oncomplete;req.send();}catch(e){req.onerror();}}function report(type,vos){if(!Array.isArray(vos)){vos=[vos];}// If the Player is not a reporting Player, then the Player shall\\n// not report any errors.\\n// ... In addition to any time restrictions specified by a Range\\n// element within the Metrics element.\\nif(isReportingPlayer&&rangeController.isEnabled()){// This reporting mechanism operates by creating one HTTP GET\\n// request for every entry in the top level list of the metric.\\nvos.forEach(function(vo){var url=metricSerialiser.serialise(vo);// this has been proposed for errata\\nif(USE_DRAFT_DVB_SPEC&&type!==metricsConstants.DVB_ERRORS){url='metricname='+type+'&'+url;}// Take the value of the @reportingUrl attribute, append a\\n// question mark ('?') character and then append the string\\n// created in the previous step.\\nurl=reportingUrl+'?'+url;// Make an HTTP GET request to the URL contained within the\\n// string created in the previous step.\\ndoGetRequest(url,null,function(){// If the Player is unable to make the report, for\\n// example because the @reportingUrl is invalid, the\\n// host cannot be reached, or an HTTP status code other\\n// than one in the 200 series is received, the Player\\n// shall cease being a reporting Player for the\\n// duration of the MPD.\\nisReportingPlayer=false;});});}}function initialize(entry,rc){var probability=void 0;rangeController=rc;reportingUrl=entry.dvb_reportingUrl;// If a required attribute is missing, the Reporting descriptor may\\n// be ignored by the Player\\nif(!reportingUrl){throw new Error('required parameter missing (dvb:reportingUrl)');}// A Player's status, as a reporting Player or not, shall remain\\n// static for the duration of the MPD, regardless of MPD updates.\\n// (i.e. only calling reset (or failure) changes this state)\\nif(!reportingPlayerStatusDecided){probability=entry.dvb_probability;// TS 103 285 Clause 10.12.3.4\\n// If the @probability attribute is set to 1000, it shall be a reporting Player.\\n// If the @probability attribute is absent it will take the default value of 1000.\\n// For any other value of the @probability attribute, it shall decide at random whether to be a\\n// reporting Player, such that the probability of being one is @probability/1000.\\nif(probability&&(probability===1000||probability/1000>=randomNumberGenerator.random())){isReportingPlayer=true;}reportingPlayerStatusDecided=true;}}function resetInitialSettings(){reportingPlayerStatusDecided=false;isReportingPlayer=false;reportingUrl=null;rangeController=null;}function reset(){if(!allowPendingRequestsToCompleteOnReset){pendingRequests.forEach(function(req){return req.abort();});pendingRequests=[];}resetInitialSettings();}instance={report:report,initialize:initialize,reset:reset};setup();return instance;}DVBReporting.__dashjs_factory_name='DVBReporting';exports.default=dashjs.FactoryMaker.getClassFactory(DVBReporting);/* jshint ignore:line */\\n//# sourceMappingURL=DVBReporting.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js\":\n/*!*******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js ***!\n  \\*******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DVBErrors=__webpack_require__(/*! ../vo/DVBErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js\\\");var _DVBErrors2=_interopRequireDefault(_DVBErrors);var _MetricsReportingEvents=__webpack_require__(/*! ../MetricsReportingEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\\\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function DVBErrorsTranslator(config){config=config||{};var instance=void 0,mpd=void 0;var eventBus=config.eventBus;var dashMetrics=config.dashMetrics;var metricsConstants=config.metricsConstants;//MediaPlayerEvents have been added to Events in MediaPlayer class\\nvar Events=config.events;function report(vo){var o=new _DVBErrors2.default();if(!mpd){return;}for(var key in vo){if(vo.hasOwnProperty(key)){o[key]=vo[key];}}if(!o.mpdurl){o.mpdurl=mpd.originalUrl||mpd.url;}if(!o.terror){o.terror=new Date();}dashMetrics.addDVBErrors(o);}function onManifestUpdate(e){if(e.error){return;}mpd=e.manifest;}function onServiceLocationChanged(e){report({errorcode:_DVBErrors2.default.BASE_URL_CHANGED,servicelocation:e.entry});}function onBecameReporter(){report({errorcode:_DVBErrors2.default.BECAME_REPORTER});}function handleHttpMetric(vo){if(vo.responsecode===0||// connection failure - unknown\\nvo.responsecode>=400||// HTTP error status code\\nvo.responsecode<100||// unknown status codes\\nvo.responsecode>=600){// unknown status codes\\nreport({errorcode:vo.responsecode||_DVBErrors2.default.CONNECTION_ERROR,url:vo.url,terror:vo.tresponse,servicelocation:vo._serviceLocation});}}function onMetricEvent(e){switch(e.metric){case metricsConstants.HTTP_REQUEST:handleHttpMetric(e.value);break;default:break;}}function onPlaybackError(e){var reason=e.error?e.error.code:0;var errorcode=void 0;switch(reason){case MediaError.MEDIA_ERR_NETWORK:errorcode=_DVBErrors2.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:errorcode=_DVBErrors2.default.CORRUPT_MEDIA_OTHER;break;default:return;}report({errorcode:errorcode});}function initialise(){eventBus.on(Events.MANIFEST_UPDATED,onManifestUpdate,instance);eventBus.on(Events.SERVICE_LOCATION_BLACKLIST_CHANGED,onServiceLocationChanged,instance);eventBus.on(Events.METRIC_ADDED,onMetricEvent,instance);eventBus.on(Events.METRIC_UPDATED,onMetricEvent,instance);eventBus.on(Events.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.on(_MetricsReportingEvents2.default.BECAME_REPORTING_PLAYER,onBecameReporter,instance);}function reset(){eventBus.off(Events.MANIFEST_UPDATED,onManifestUpdate,instance);eventBus.off(Events.SERVICE_LOCATION_BLACKLIST_CHANGED,onServiceLocationChanged,instance);eventBus.off(Events.METRIC_ADDED,onMetricEvent,instance);eventBus.off(Events.METRIC_UPDATED,onMetricEvent,instance);eventBus.off(Events.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.off(_MetricsReportingEvents2.default.BECAME_REPORTING_PLAYER,onBecameReporter,instance);}instance={initialise:initialise,reset:reset};initialise();return instance;}DVBErrorsTranslator.__dashjs_factory_name='DVBErrorsTranslator';exports.default=dashjs.FactoryMaker.getSingletonFactory(DVBErrorsTranslator);/* jshint ignore:line */\\n//# sourceMappingURL=DVBErrorsTranslator.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n  * @ignore\\n  */function HandlerHelpers(){return{reconstructFullMetricName:function reconstructFullMetricName(key,n,type){var mn=key;if(n){mn+='('+n;if(type&&type.length){mn+=','+type;}mn+=')';}return mn;},validateN:function validateN(n_ms){if(!n_ms){throw new Error('missing n');}if(isNaN(n_ms)){throw new Error('n is NaN');}// n is a positive integer is defined to refer to the metric\\n// in which the buffer level is recorded every n ms.\\nif(n_ms<0){throw new Error('n must be positive');}return n_ms;}};}HandlerHelpers.__dashjs_factory_name='HandlerHelpers';exports.default=dashjs.FactoryMaker.getSingletonFactory(HandlerHelpers);/* jshint ignore:line */\\n//# sourceMappingURL=HandlerHelpers.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Metrics=__webpack_require__(/*! ../vo/Metrics */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js\\\");var _Metrics2=_interopRequireDefault(_Metrics);var _Range=__webpack_require__(/*! ../vo/Range */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js\\\");var _Range2=_interopRequireDefault(_Range);var _Reporting=__webpack_require__(/*! ../vo/Reporting */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js\\\");var _Reporting2=_interopRequireDefault(_Reporting);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestParsing(config){config=config||{};var instance=void 0;var adapter=config.adapter;var constants=config.constants;function getMetricsRangeStartTime(manifest,dynamic,range){var voPeriods=void 0,reportingStartTime=void 0;var presentationStartTime=0;if(dynamic){// For services with MPD@type='dynamic', the start time is\\n// indicated in wall clock time by adding the value of this\\n// attribute to the value of the MPD@availabilityStartTime\\n// attribute.\\npresentationStartTime=adapter.getAvailabilityStartTime(manifest)/1000;}else{// For services with MPD@type='static', the start time is indicated\\n// in Media Presentation time and is relative to the PeriodStart\\n// time of the first Period in this MPD.\\nvoPeriods=adapter.getRegularPeriods(manifest);if(voPeriods.length){presentationStartTime=voPeriods[0].start;}}// When not present, DASH Metrics collection is\\n// requested from the beginning of content\\n// consumption.\\nreportingStartTime=presentationStartTime;if(range&&range.hasOwnProperty(constants.START_TIME)){reportingStartTime+=range.starttime;}return reportingStartTime;}function getMetrics(manifest){var metrics=[];if(manifest&&manifest.Metrics_asArray){manifest.Metrics_asArray.forEach(function(metric){var metricEntry=new _Metrics2.default();var isDynamic=adapter.getIsDynamic(manifest);if(metric.hasOwnProperty('metrics')){metricEntry.metrics=metric.metrics;}else{return;}if(metric.Range_asArray){metric.Range_asArray.forEach(function(range){var rangeEntry=new _Range2.default();rangeEntry.starttime=getMetricsRangeStartTime(manifest,isDynamic,range);if(range.hasOwnProperty('duration')){rangeEntry.duration=range.duration;}else{// if not present, the value is identical to the\\n// Media Presentation duration.\\nrangeEntry.duration=adapter.getDuration(manifest);}rangeEntry._useWallClockTime=isDynamic;metricEntry.Range.push(rangeEntry);});}if(metric.Reporting_asArray){metric.Reporting_asArray.forEach(function(reporting){var reportingEntry=new _Reporting2.default();if(reporting.hasOwnProperty(constants.SCHEME_ID_URI)){reportingEntry.schemeIdUri=reporting.schemeIdUri;}else{// Invalid Reporting. schemeIdUri must be set. Ignore.\\nreturn;}if(reporting.hasOwnProperty('value')){reportingEntry.value=reporting.value;}if(reporting.hasOwnProperty(constants.DVB_REPORTING_URL)){reportingEntry.dvb_reportingUrl=reporting[constants.DVB_REPORTING_URL];}if(reporting.hasOwnProperty(constants.DVB_PROBABILITY)){reportingEntry.dvb_probability=reporting[constants.DVB_PROBABILITY];}metricEntry.Reporting.push(reportingEntry);});}else{// Invalid Metrics. At least one reporting must be present. Ignore\\nreturn;}metrics.push(metricEntry);});}return metrics;}instance={getMetrics:getMetrics};return instance;}ManifestParsing.__dashjs_factory_name='ManifestParsing';exports.default=dashjs.FactoryMaker.getSingletonFactory(ManifestParsing);/* jshint ignore:line */\\n//# sourceMappingURL=ManifestParsing.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @ignore\\n */function MetricSerialiser(){// For each entry in the top level list within the metric (in the case\\n// of the DVBErrors metric each entry corresponds to an \\\"error event\\\"\\n// described in clause 10.8.4) the Player shall:\\nfunction serialise(metric){var pairs=[];var obj=[];var key=void 0,value=void 0;// Take each (key, value) pair from the metric entry and create a\\n// string consisting of the name of the key, followed by an equals\\n// ('=') character, followed by the string representation of the\\n// value. The string representation of the value is created based\\n// on the type of the value following the instructions in Table 22.\\nfor(key in metric){if(metric.hasOwnProperty(key)&&key.indexOf('_')!==0){value=metric[key];// we want to ensure that keys still end up in the report\\n// even if there is no value\\nif(value===undefined||value===null){value='';}// DVB A168 10.12.4 Table 22\\nif(Array.isArray(value)){// if trace or similar is null, do not include in output\\nif(!value.length){continue;}obj=[];value.forEach(function(v){var isBuiltIn=Object.prototype.toString.call(v).slice(8,-1)!=='Object';obj.push(isBuiltIn?v:serialise(v));});value=obj.map(encodeURIComponent).join(',');}else if(typeof value==='string'){value=encodeURIComponent(value);}else if(value instanceof Date){value=value.toISOString();}else if(typeof value==='number'){value=Math.round(value);}pairs.push(key+'='+value);}}// Concatenate the strings created in the previous step with an\\n// ampersand ('&') character between each one.\\nreturn pairs.join('&');}return{serialise:serialise};}MetricSerialiser.__dashjs_factory_name='MetricSerialiser';exports.default=dashjs.FactoryMaker.getSingletonFactory(MetricSerialiser);/* jshint ignore:line */\\n//# sourceMappingURL=MetricSerialiser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js\":\n/*!***************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n  * @ignore\\n  */function RNG(){// check whether secure random numbers are available. if not, revert to\\n// using Math.random\\nvar crypto=window.crypto||window.msCrypto;// could just as easily use any other array type by changing line below\\nvar ArrayType=Uint32Array;var MAX_VALUE=Math.pow(2,ArrayType.BYTES_PER_ELEMENT*8)-1;// currently there is only one client for this code, and that only uses\\n// a single random number per initialisation. may want to increase this\\n// number if more consumers in the future\\nvar NUM_RANDOM_NUMBERS=10;var randomNumbers=void 0,index=void 0,instance=void 0;function initialise(){if(crypto){if(!randomNumbers){randomNumbers=new ArrayType(NUM_RANDOM_NUMBERS);}crypto.getRandomValues(randomNumbers);index=0;}}function rand(min,max){var r=void 0;if(!min){min=0;}if(!max){max=1;}if(crypto){if(index===randomNumbers.length){initialise();}r=randomNumbers[index]/MAX_VALUE;index+=1;}else{r=Math.random();}return r*(max-min)+min;}instance={random:rand};initialise();return instance;}RNG.__dashjs_factory_name='RNG';exports.default=dashjs.FactoryMaker.getSingletonFactory(RNG);/* jshint ignore:line */\\n//# sourceMappingURL=RNG.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DVBErrors=function DVBErrors(){_classCallCheck(this,DVBErrors);this.mpdurl=null;// String - Absolute URL from which the MPD was originally\\n// retrieved (MPD updates will not change this value).\\nthis.errorcode=null;// String - The value of errorcode depends upon the type\\n// of error being reported. For an error listed in the\\n// ErrorType column below the value is as described in the\\n// Value column.\\n//\\n// ErrorType                                            Value\\n// ---------                                            -----\\n// HTTP error status code                               HTTP status code\\n// Unknown HTTP status code                             HTTP status code\\n// SSL connection failed                                \\\"SSL\\\" followed by SSL alert value\\n// DNS resolution failed                                \\\"C00\\\"\\n// Host unreachable                                     \\\"C01\\\"\\n// Connection refused                                   \\\"C02\\\"\\n// Connection error – Not otherwise specified           \\\"C03\\\"\\n// Corrupt media – ISO BMFF container cannot be parsed  \\\"M00\\\"\\n// Corrupt media – Not otherwise specified              \\\"M01\\\"\\n// Changing Base URL in use due to errors               \\\"F00\\\"\\n// Becoming an error reporting Player                   \\\"S00\\\"\\nthis.terror=null;// Real-Time - Date and time at which error occurred in UTC,\\n// formatted as a combined date and time according to ISO 8601.\\nthis.url=null;// String - Absolute URL from which data was being requested\\n// when this error occurred. If the error report is in relation\\n// to corrupt media or changing BaseURL, this may be a null\\n// string if the URL from which the media was obtained or\\n// which led to the change of BaseURL is no longer known.\\nthis.ipaddress=null;// String - IP Address which the host name in \\\"url\\\" resolved to.\\n// If the error report is in relation to corrupt media or\\n// changing BaseURL, this may be a null string if the URL\\n// from which the media was obtained or which led to the\\n// change of BaseURL is no longer known.\\nthis.servicelocation=null;// String - The value of the serviceLocation field in the\\n// BaseURL being used. In the event of this report indicating\\n// a change of BaseURL this is the value from the BaseURL\\n// being moved from.\\n};DVBErrors.SSL_CONNECTION_FAILED_PREFIX='SSL';DVBErrors.DNS_RESOLUTION_FAILED='C00';DVBErrors.HOST_UNREACHABLE='C01';DVBErrors.CONNECTION_REFUSED='C02';DVBErrors.CONNECTION_ERROR='C03';DVBErrors.CORRUPT_MEDIA_ISOBMFF='M00';DVBErrors.CORRUPT_MEDIA_OTHER='M01';DVBErrors.BASE_URL_CHANGED='F00';DVBErrors.BECAME_REPORTER='S00';exports.default=DVBErrors;\\n//# sourceMappingURL=DVBErrors.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Metrics=function Metrics(){_classCallCheck(this,Metrics);this.metrics='';this.Range=[];this.Reporting=[];};exports.default=Metrics;\\n//# sourceMappingURL=Metrics.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Range=function Range(){_classCallCheck(this,Range);// as defined in ISO23009-1\\nthis.starttime=0;this.duration=Infinity;// for internal use\\nthis._useWallClockTime=false;};exports.default=Range;\\n//# sourceMappingURL=Range.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */// TS 103 285 Clause 10.12.3.3\\nvar DEFAULT_DVB_PROBABILITY=1000;var Reporting=function Reporting(){_classCallCheck(this,Reporting);this.schemeIdUri='';this.value='';// DVB Extensions\\nthis.dvb_reportingUrl='';this.dvb_probability=DEFAULT_DVB_PROBABILITY;};exports.default=Reporting;\\n//# sourceMappingURL=Reporting.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ObjectUtils=__webpack_require__(/*! ../utils/ObjectUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js\\\");var _ObjectUtils2=_interopRequireDefault(_ObjectUtils);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var DEFAULT_INDEX=NaN;var Node=function Node(_baseUrls,_selectedIdx){_classCallCheck(this,Node);this.data={baseUrls:_baseUrls||null,selectedIdx:_selectedIdx||DEFAULT_INDEX};this.children=[];};function BaseURLTreeModel(){var instance=void 0,root=void 0,adapter=void 0;var context=this.context;var objectUtils=(0,_ObjectUtils2.default)(context).getInstance();function setup(){reset();}function setConfig(config){if(config.adapter){adapter=config.adapter;}}function checkConfig(){if(!adapter||!adapter.hasOwnProperty('getBaseURLsFromElement')||!adapter.hasOwnProperty('getRepresentationSortFunction')){throw new Error('setConfig function has to be called previously');}}function updateChildData(node,index,element){var baseUrls=adapter.getBaseURLsFromElement(element);if(!node[index]){node[index]=new Node(baseUrls);}else{if(!objectUtils.areEqual(baseUrls,node[index].data.baseUrls)){node[index].data.baseUrls=baseUrls;node[index].data.selectedIdx=DEFAULT_INDEX;}}}function getBaseURLCollectionsFromManifest(manifest){checkConfig();var baseUrls=adapter.getBaseURLsFromElement(manifest);if(!objectUtils.areEqual(baseUrls,root.data.baseUrls)){root.data.baseUrls=baseUrls;root.data.selectedIdx=DEFAULT_INDEX;}if(manifest&&manifest.Period_asArray){manifest.Period_asArray.forEach(function(p,pi){updateChildData(root.children,pi,p);if(p.AdaptationSet_asArray){p.AdaptationSet_asArray.forEach(function(a,ai){updateChildData(root.children[pi].children,ai,a);if(a.Representation_asArray){a.Representation_asArray.sort(adapter.getRepresentationSortFunction()).forEach(function(r,ri){updateChildData(root.children[pi].children[ai].children,ri,r);});}});}});}}function walk(callback,node){var target=node||root;callback(target.data);if(target.children){target.children.forEach(function(child){return walk(callback,child);});}}function invalidateSelectedIndexes(serviceLocation){walk(function(data){if(!isNaN(data.selectedIdx)){if(serviceLocation===data.baseUrls[data.selectedIdx].serviceLocation){data.selectedIdx=DEFAULT_INDEX;}}});}function update(manifest){getBaseURLCollectionsFromManifest(manifest);}function reset(){root=new Node();}function getForPath(path){var target=root;var nodes=[target.data];if(path){path.forEach(function(p){target=target.children[p];if(target){nodes.push(target.data);}});}return nodes.filter(function(n){return n.baseUrls.length;});}instance={reset:reset,update:update,getForPath:getForPath,invalidateSelectedIndexes:invalidateSelectedIndexes,setConfig:setConfig};setup();return instance;}BaseURLTreeModel.__dashjs_factory_name='BaseURLTreeModel';exports.default=_FactoryMaker2.default.getClassFactory(BaseURLTreeModel);\\n//# sourceMappingURL=BaseURLTreeModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _MediaPlayerEvents=__webpack_require__(/*! ../MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _MetricsReportingEvents=__webpack_require__(/*! ../metrics/MetricsReportingEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\\\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _DashManifestModel=__webpack_require__(/*! ../../dash/models/DashManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\\\");var _DashManifestModel2=_interopRequireDefault(_DashManifestModel);var _Utils=__webpack_require__(/*! ../../core/Utils */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var CMCD_REQUEST_FIELD_NAME='CMCD';var CMCD_VERSION=1;var OBJECT_TYPES={MANIFEST:'m',AUDIO:'a',VIDEO:'v',INIT:'i',CAPTION:'c',ISOBMFF_TEXT_TRACK:'tt',ENCRYPTION_KEY:'k',OTHER:'o'};var STREAMING_FORMATS={DASH:'d',MSS:'s'};var STREAM_TYPES={VOD:'v',LIVE:'l'};var RTP_SAFETY_FACTOR=5;function CmcdModel(){var logger=void 0,dashManifestModel=void 0,instance=void 0,internalData=void 0,abrController=void 0,dashMetrics=void 0,playbackController=void 0,streamProcessors=void 0,_isStartup=void 0,_bufferLevelStarved=void 0,_initialMediaRequestsDone=void 0;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);dashManifestModel=(0,_DashManifestModel2.default)(context).getInstance();_resetInitialSettings();}function initialize(){eventBus.on(_MediaPlayerEvents2.default.PLAYBACK_RATE_CHANGED,_onPlaybackRateChanged,instance);eventBus.on(_MediaPlayerEvents2.default.MANIFEST_LOADED,_onManifestLoaded,instance);eventBus.on(_MediaPlayerEvents2.default.BUFFER_LEVEL_STATE_CHANGED,_onBufferLevelStateChanged,instance);eventBus.on(_MediaPlayerEvents2.default.PLAYBACK_SEEKED,_onPlaybackSeeked,instance);eventBus.on(_MediaPlayerEvents2.default.PERIOD_SWITCH_COMPLETED,_onPeriodSwitchComplete,instance);}function setConfig(config){if(!config)return;if(config.abrController){abrController=config.abrController;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.playbackController){playbackController=config.playbackController;}}function _resetInitialSettings(){internalData={pr:1,nor:null,st:null,sf:null,sid:''+_Utils2.default.generateUuid(),cid:null};_bufferLevelStarved={};_isStartup={};_initialMediaRequestsDone={};_updateStreamProcessors();}function _onPeriodSwitchComplete(){_updateStreamProcessors();}function _updateStreamProcessors(){if(!playbackController)return;var streamController=playbackController.getStreamController();if(!streamController)return;if(typeof streamController.getActiveStream!=='function')return;var activeStream=streamController.getActiveStream();if(!activeStream)return;streamProcessors=activeStream.getProcessors();}function getQueryParameter(request){try{if(settings.get().streaming.cmcd&&settings.get().streaming.cmcd.enabled){var cmcdData=_getCmcdData(request);var finalPayloadString=_buildFinalString(cmcdData);eventBus.trigger(_MetricsReportingEvents2.default.CMCD_DATA_GENERATED,{url:request.url,mediaType:request.mediaType,cmcdData:cmcdData,cmcdString:finalPayloadString});return{key:CMCD_REQUEST_FIELD_NAME,value:finalPayloadString};}return null;}catch(e){return null;}}function _getCmcdData(request){try{var cmcdData=null;if(request.type===_HTTPRequest.HTTPRequest.MPD_TYPE){return _getCmcdDataForMpd(request);}else if(request.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){_initForMediaType(request.mediaType);return _getCmcdDataForMediaSegment(request);}else if(request.type===_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE){return _getCmcdDataForInitSegment(request);}else if(request.type===_HTTPRequest.HTTPRequest.OTHER_TYPE||request.type===_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE){return _getCmcdDataForOther(request);}else if(request.type===_HTTPRequest.HTTPRequest.LICENSE){return _getCmcdDataForLicense(request);}return cmcdData;}catch(e){return null;}}function _getCmcdDataForLicense(request){var data=_getGenericCmcdData(request);data.ot=OBJECT_TYPES.ENCRYPTION_KEY;return data;}function _getCmcdDataForMpd(){var data=_getGenericCmcdData();data.ot=''+OBJECT_TYPES.MANIFEST;return data;}function _getCmcdDataForMediaSegment(request){var data=_getGenericCmcdData();var encodedBitrate=_getBitrateByRequest(request);var d=_getObjectDurationByRequest(request);var mtp=_getMeasuredThroughputByType(request.mediaType);var dl=_getDeadlineByType(request.mediaType);var bl=_getBufferLevelByType(request.mediaType);var tb=_getTopBitrateByType(request.mediaType);var pr=internalData.pr;var nextRequest=_probeNextRequest(request.mediaType);var ot=void 0;if(request.mediaType===_Constants2.default.VIDEO)ot=OBJECT_TYPES.VIDEO;if(request.mediaType===_Constants2.default.AUDIO)ot=OBJECT_TYPES.AUDIO;if(request.mediaType===_Constants2.default.FRAGMENTED_TEXT){if(request.mediaInfo.mimeType==='application/mp4'){ot=OBJECT_TYPES.ISOBMFF_TEXT_TRACK;}else{ot=OBJECT_TYPES.CAPTION;}}var rtp=settings.get().streaming.cmcd.rtp;if(!rtp){rtp=_calculateRtp(request);}data.rtp=rtp;if(nextRequest){if(request.url!==nextRequest.url){var url=new URL(nextRequest.url);data.nor=url.pathname;}else if(nextRequest.range){data.nrr=nextRequest.range;}}if(encodedBitrate){data.br=encodedBitrate;}if(ot){data.ot=ot;}if(!isNaN(d)){data.d=d;}if(!isNaN(mtp)){data.mtp=mtp;}if(!isNaN(dl)){data.dl=dl;}if(!isNaN(bl)){data.bl=bl;}if(!isNaN(tb)){data.tb=tb;}if(!isNaN(pr)&&pr!==1){data.pr=pr;}if(_bufferLevelStarved[request.mediaType]){data.bs=true;_bufferLevelStarved[request.mediaType]=false;}if(_isStartup[request.mediaType]||!_initialMediaRequestsDone[request.mediaType]){data.su=true;_isStartup[request.mediaType]=false;_initialMediaRequestsDone[request.mediaType]=true;}return data;}function _initForMediaType(mediaType){if(!_initialMediaRequestsDone.hasOwnProperty(mediaType)){_initialMediaRequestsDone[mediaType]=false;}if(!_isStartup.hasOwnProperty(mediaType)){_isStartup[mediaType]=false;}if(!_bufferLevelStarved.hasOwnProperty(mediaType)){_bufferLevelStarved[mediaType]=false;}}function _getCmcdDataForInitSegment(){var data=_getGenericCmcdData();data.ot=''+OBJECT_TYPES.INIT;data.su=true;return data;}function _getCmcdDataForOther(){var data=_getGenericCmcdData();data.ot=''+OBJECT_TYPES.OTHER;return data;}function _getGenericCmcdData(){var data={};var cid=settings.get().streaming.cmcd.cid?settings.get().streaming.cmcd.cid:internalData.cid;data.v=CMCD_VERSION;data.sid=settings.get().streaming.cmcd.sid?settings.get().streaming.cmcd.sid:internalData.sid;data.sid=''+data.sid;if(cid){data.cid=''+cid;}if(!isNaN(internalData.pr)&&internalData.pr!==1&&internalData.pr!==null){data.pr=internalData.pr;}if(internalData.st){data.st=internalData.st;}if(internalData.sf){data.sf=internalData.sf;}return data;}function _getBitrateByRequest(request){try{var quality=request.quality;var bitrateList=request.mediaInfo.bitrateList;return parseInt(bitrateList[quality].bandwidth/1000);}catch(e){return null;}}function _getTopBitrateByType(mediaType){try{var info=abrController.getTopBitrateInfoFor(mediaType);return Math.round(info.bitrate/1000);}catch(e){return null;}}function _getObjectDurationByRequest(request){try{return!isNaN(request.duration)?Math.round(request.duration*1000):null;}catch(e){return null;}}function _getMeasuredThroughputByType(mediaType){try{return parseInt(abrController.getThroughputHistory().getSafeAverageThroughput(mediaType)/100)*100;}catch(e){return null;}}function _getDeadlineByType(mediaType){try{var playbackRate=internalData.pr;var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);if(!isNaN(playbackRate)&&!isNaN(bufferLevel)){return parseInt(bufferLevel/playbackRate*10)*100;}return null;}catch(e){return null;}}function _getBufferLevelByType(mediaType){try{var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);if(!isNaN(bufferLevel)){return parseInt(bufferLevel*10)*100;}return null;}catch(e){return null;}}function _onPlaybackRateChanged(data){try{internalData.pr=data.playbackRate;}catch(e){}}function _onManifestLoaded(data){try{var isDynamic=dashManifestModel.getIsDynamic(data.data);var st=isDynamic?''+STREAM_TYPES.LIVE:''+STREAM_TYPES.VOD;var sf=data.protocol&&data.protocol==='MSS'?''+STREAMING_FORMATS.MSS:''+STREAMING_FORMATS.DASH;internalData.st=''+st;internalData.sf=''+sf;}catch(e){}}function _onBufferLevelStateChanged(data){try{if(data.state&&data.mediaType){if(data.state===_MediaPlayerEvents2.default.BUFFER_EMPTY){if(!_bufferLevelStarved[data.mediaType]){_bufferLevelStarved[data.mediaType]=true;}if(!_isStartup[data.mediaType]){_isStartup[data.mediaType]=true;}}}}catch(e){}}function _onPlaybackSeeked(){for(var key in _bufferLevelStarved){if(_bufferLevelStarved.hasOwnProperty(key)){_bufferLevelStarved[key]=true;}}for(var _key in _isStartup){if(_isStartup.hasOwnProperty(_key)){_isStartup[_key]=true;}}}function _buildFinalString(cmcdData){try{if(!cmcdData){return null;}var keys=Object.keys(cmcdData).sort(function(a,b){return a.localeCompare(b);});var length=keys.length;var cmcdString=keys.reduce(function(acc,key,index){if(key==='v'&&cmcdData[key]===1)return acc;// Version key should only be reported if it is != 1\\nif(typeof cmcdData[key]==='string'&&(key!=='ot'||key!=='sf'||key!=='st')){var string=cmcdData[key].replace(/\\\"/g,'\\\\\\\"');acc+=key+'=\\\"'+string+'\\\"';}else{acc+=key+'='+cmcdData[key];}if(index<length-1){acc+=',';}return acc;},'');cmcdString=cmcdString.replace(/=true/g,'');return cmcdString;}catch(e){return null;}}function _probeNextRequest(mediaType){if(!streamProcessors||streamProcessors.length===0)return;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=streamProcessors[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var streamProcessor=_step.value;if(streamProcessor.getType()===mediaType){return streamProcessor.probeNextRequest();}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}}function _calculateRtp(request){// Get the values we need\\nvar playbackRate=playbackController.getPlaybackRate();if(!playbackRate)playbackRate=1;var quality=request.quality,mediaType=request.mediaType,mediaInfo=request.mediaInfo,duration=request.duration;var currentBufferLevel=_getBufferLevelByType(mediaType);if(currentBufferLevel===0)currentBufferLevel=500;var bitrate=mediaInfo.bitrateList[quality].bandwidth;// Calculate RTP\\nvar segmentSize=bitrate*duration/1000;// Calculate file size in kilobits\\nvar timeToLoad=currentBufferLevel/playbackRate/1000;// Calculate time available to load file in seconds\\nvar minBandwidth=segmentSize/timeToLoad;// Calculate the exact bandwidth required\\nvar rtpSafetyFactor=settings.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(settings.get().streaming.cmcd.rtpSafetyFactor)?settings.get().streaming.cmcd.rtpSafetyFactor:RTP_SAFETY_FACTOR;var maxBandwidth=minBandwidth*rtpSafetyFactor;// Include a safety buffer\\nvar rtp=(parseInt(maxBandwidth/100)+1)*100;// Round to the next multiple of 100\\nreturn rtp;}function reset(){eventBus.off(_MediaPlayerEvents2.default.PLAYBACK_RATE_CHANGED,_onPlaybackRateChanged,this);eventBus.off(_MediaPlayerEvents2.default.MANIFEST_LOADED,_onManifestLoaded,this);eventBus.off(_MediaPlayerEvents2.default.BUFFER_LEVEL_STATE_CHANGED,_onBufferLevelStateChanged,instance);eventBus.off(_MediaPlayerEvents2.default.PLAYBACK_SEEKED,_onPlaybackSeeked,instance);_resetInitialSettings();}instance={getQueryParameter:getQueryParameter,setConfig:setConfig,reset:reset,initialize:initialize};setup();return instance;}CmcdModel.__dashjs_factory_name='CmcdModel';exports.default=_FactoryMaker2.default.getSingletonFactory(CmcdModel);\\n//# sourceMappingURL=CmcdModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _FragmentRequest=__webpack_require__(/*! ../vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var FRAGMENT_MODEL_LOADING='loading';var FRAGMENT_MODEL_EXECUTED='executed';var FRAGMENT_MODEL_CANCELED='canceled';var FRAGMENT_MODEL_FAILED='failed';function FragmentModel(config){config=config||{};var eventBus=config.eventBus;var events=config.events;var dashMetrics=config.dashMetrics;var fragmentLoader=config.fragmentLoader;var debug=config.debug;var streamInfo=config.streamInfo;var type=config.type;var instance=void 0,logger=void 0,executedRequests=void 0,loadingRequests=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();eventBus.on(events.LOADING_COMPLETED,onLoadingCompleted,instance);eventBus.on(events.LOADING_DATA_PROGRESS,onLoadingInProgress,instance);eventBus.on(events.LOADING_ABANDONED,onLoadingAborted,instance);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function isFragmentLoaded(request){var isEqualComplete=function isEqualComplete(req1,req2){return req1.action===_FragmentRequest2.default.ACTION_COMPLETE&&req1.action===req2.action;};var isEqualMedia=function isEqualMedia(req1,req2){return!isNaN(req1.index)&&req1.startTime===req2.startTime&&req1.adaptationIndex===req2.adaptationIndex&&req1.type===req2.type;};var isEqualInit=function isEqualInit(req1,req2){return isNaN(req1.index)&&isNaN(req2.index)&&req1.quality===req2.quality;};var check=function check(requests){var isLoaded=false;requests.some(function(req){if(isEqualMedia(request,req)||isEqualInit(request,req)||isEqualComplete(request,req)){isLoaded=true;return isLoaded;}});return isLoaded;};if(!request){return false;}return check(executedRequests);}function isFragmentLoadedOrPending(request){var isLoaded=false;var i=0;var req=void 0;// First, check if the fragment has already been loaded\\nisLoaded=isFragmentLoaded(request);// Then, check if the fragment is about to be loeaded\\nif(!isLoaded){for(i=0;i<loadingRequests.length;i++){req=loadingRequests[i];if(request.url===req.url&&request.startTime===req.startTime){isLoaded=true;}}}return isLoaded;}/**\\n     *\\n     * Gets an array of {@link FragmentRequest} objects\\n     *\\n     * @param {Object} filter The object with properties by which the method filters the requests to be returned.\\n     *  the only mandatory property is state, which must be a value from\\n     *  other properties should match the properties of {@link FragmentRequest}. E.g.:\\n     *  getRequests({state: FragmentModel.FRAGMENT_MODEL_EXECUTED, quality: 0}) - returns\\n     *  all the requests from executedRequests array where requests.quality = filter.quality\\n     *\\n     * @returns {Array}\\n     * @memberof FragmentModel#\\n     */function getRequests(filter){var states=filter?filter.state instanceof Array?filter.state:[filter.state]:[];var filteredRequests=[];states.forEach(function(state){var requests=getRequestsForState(state);filteredRequests=filteredRequests.concat(filterRequests(requests,filter));});return filteredRequests;}function getRequestThreshold(req){return isNaN(req.duration)?0.25:Math.min(req.duration/8,0.5);}function removeExecutedRequestsBeforeTime(time){executedRequests=executedRequests.filter(function(req){var threshold=getRequestThreshold(req);return isNaN(req.startTime)||(time!==undefined?req.startTime>=time-threshold:false);});}function removeExecutedRequestsAfterTime(time){executedRequests=executedRequests.filter(function(req){return isNaN(req.startTime)||(time!==undefined?req.startTime<time:false);});}function removeExecutedRequestsInTimeRange(start,end){if(end<=start+0.5){return;}executedRequests=executedRequests.filter(function(req){var threshold=getRequestThreshold(req);return isNaN(req.startTime)||req.startTime>=end-threshold||isNaN(req.duration)||req.startTime+req.duration<=start+threshold;});}// Remove requests that are not \\\"represented\\\" by any of buffered ranges\\nfunction syncExecutedRequestsWithBufferedRange(bufferedRanges,streamDuration){if(!bufferedRanges||bufferedRanges.length===0){removeExecutedRequestsBeforeTime();return;}var start=0;for(var i=0,ln=bufferedRanges.length;i<ln;i++){removeExecutedRequestsInTimeRange(start,bufferedRanges.start(i));start=bufferedRanges.end(i);}if(streamDuration>0){removeExecutedRequestsInTimeRange(start,streamDuration);}}function abortRequests(){logger.debug('abort requests');fragmentLoader.abort();loadingRequests=[];}function executeRequest(request){switch(request.action){case _FragmentRequest2.default.ACTION_COMPLETE:executedRequests.push(request);addSchedulingInfoMetrics(request,FRAGMENT_MODEL_EXECUTED);logger.debug('STREAM_COMPLETED');eventBus.trigger(events.STREAM_COMPLETED,{request:request},{streamId:request.mediaInfo.streamInfo.id,mediaType:request.mediaType});break;case _FragmentRequest2.default.ACTION_DOWNLOAD:addSchedulingInfoMetrics(request,FRAGMENT_MODEL_LOADING);loadingRequests.push(request);loadCurrentFragment(request);break;default:logger.warn('Unknown request action.');}}function loadCurrentFragment(request){eventBus.trigger(events.FRAGMENT_LOADING_STARTED,{request:request},{streamId:streamInfo.id,mediaType:type});fragmentLoader.load(request);}function getRequestForTime(arr,time,threshold){// loop through the executed requests and pick the one for which the playback interval matches the given time\\nvar lastIdx=arr.length-1;for(var i=lastIdx;i>=0;i--){var req=arr[i];var start=req.startTime;var end=start+req.duration;threshold=!isNaN(threshold)?threshold:getRequestThreshold(req);if(!isNaN(start)&&!isNaN(end)&&time+threshold>=start&&time-threshold<end||isNaN(start)&&isNaN(time)){return req;}}return null;}function filterRequests(arr,filter){// for time use a specific filtration function\\nif(filter.hasOwnProperty('time')){return[getRequestForTime(arr,filter.time,filter.threshold)];}return arr.filter(function(request){for(var prop in filter){if(prop==='state')continue;if(filter.hasOwnProperty(prop)&&request[prop]!=filter[prop])return false;}return true;});}function getRequestsForState(state){var requests=void 0;switch(state){case FRAGMENT_MODEL_LOADING:requests=loadingRequests;break;case FRAGMENT_MODEL_EXECUTED:requests=executedRequests;break;default:requests=[];}return requests;}function addSchedulingInfoMetrics(request,state){dashMetrics.addSchedulingInfo(request,state);dashMetrics.addRequestsQueue(request.mediaType,loadingRequests,executedRequests);}function onLoadingCompleted(e){if(e.sender!==fragmentLoader)return;loadingRequests.splice(loadingRequests.indexOf(e.request),1);if(e.response&&!e.error){executedRequests.push(e.request);}addSchedulingInfoMetrics(e.request,e.error?FRAGMENT_MODEL_FAILED:FRAGMENT_MODEL_EXECUTED);eventBus.trigger(events.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:streamInfo.id,mediaType:type});}function onLoadingInProgress(e){if(e.sender!==fragmentLoader)return;eventBus.trigger(events.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:streamInfo.id,mediaType:type});}function onLoadingAborted(e){if(e.sender!==fragmentLoader)return;eventBus.trigger(events.FRAGMENT_LOADING_ABANDONED,{request:e.request},{streamId:streamInfo.id,mediaType:type});}function resetInitialSettings(){executedRequests=[];loadingRequests=[];}function reset(){eventBus.off(events.LOADING_COMPLETED,onLoadingCompleted,this);eventBus.off(events.LOADING_DATA_PROGRESS,onLoadingInProgress,this);eventBus.off(events.LOADING_ABANDONED,onLoadingAborted,this);if(fragmentLoader){fragmentLoader.reset();}resetInitialSettings();}function addExecutedRequest(request){executedRequests.push(request);}instance={getStreamId:getStreamId,getType:getType,getRequests:getRequests,isFragmentLoaded:isFragmentLoaded,isFragmentLoadedOrPending:isFragmentLoadedOrPending,removeExecutedRequestsBeforeTime:removeExecutedRequestsBeforeTime,removeExecutedRequestsAfterTime:removeExecutedRequestsAfterTime,syncExecutedRequestsWithBufferedRange:syncExecutedRequestsWithBufferedRange,abortRequests:abortRequests,executeRequest:executeRequest,reset:reset,addExecutedRequest:addExecutedRequest};setup();return instance;}FragmentModel.__dashjs_factory_name='FragmentModel';var factory=_FactoryMaker2.default.getClassFactory(FragmentModel);factory.FRAGMENT_MODEL_LOADING=FRAGMENT_MODEL_LOADING;factory.FRAGMENT_MODEL_EXECUTED=FRAGMENT_MODEL_EXECUTED;factory.FRAGMENT_MODEL_CANCELED=FRAGMENT_MODEL_CANCELED;factory.FRAGMENT_MODEL_FAILED=FRAGMENT_MODEL_FAILED;_FactoryMaker2.default.updateClassFactory(FragmentModel.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=FragmentModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestModel(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,manifest=void 0;function getValue(){return manifest;}function setValue(value){manifest=value;if(value){eventBus.trigger(_Events2.default.MANIFEST_LOADED,{data:value});}}instance={getValue:getValue,setValue:setValue};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ManifestModel.__dashjs_factory_name='ManifestModel';exports.default=_FactoryMaker2.default.getSingletonFactory(ManifestModel);\\n//# sourceMappingURL=ManifestModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _UTCTiming=__webpack_require__(/*! ../../dash/vo/UTCTiming */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js\\\");var _UTCTiming2=_interopRequireDefault(_UTCTiming);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _ABRRulesCollection=__webpack_require__(/*! ../rules/abr/ABRRulesCollection */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js\\\");var _ABRRulesCollection2=_interopRequireDefault(_ABRRulesCollection);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var DEFAULT_MIN_BUFFER_TIME=12;var DEFAULT_MIN_BUFFER_TIME_FAST_SWITCH=20;var DEFAULT_LOW_LATENCY_LIVE_DELAY=3.0;var LOW_LATENCY_REDUCTION_FACTOR=10;var LOW_LATENCY_MULTIPLY_FACTOR=5;var DEFAULT_LIVE_LATENCY_CATCHUP_THRESHOLD_FACTOR=4;var MINIMUM_LIVE_LATENCY_CATCHUP=5;var DEFAULT_XHR_WITH_CREDENTIALS=false;function MediaPlayerModel(){var instance=void 0,UTCTimingSources=void 0,xhrWithCredentials=void 0,customABRRule=void 0;var context=this.context;var settings=(0,_Settings2.default)(context).getInstance();function setup(){UTCTimingSources=[];xhrWithCredentials={default:DEFAULT_XHR_WITH_CREDENTIALS};customABRRule=[];}//TODO Should we use Object.define to have setters/getters? makes more readable code on other side.\\nfunction findABRCustomRuleIndex(rulename){var i=void 0;for(i=0;i<customABRRule.length;i++){if(customABRRule[i].rulename===rulename){return i;}}return-1;}function getABRCustomRules(){return customABRRule;}function addABRCustomRule(type,rulename,rule){if(typeof type!=='string'||type!==_ABRRulesCollection2.default.ABANDON_FRAGMENT_RULES&&type!==_ABRRulesCollection2.default.QUALITY_SWITCH_RULES||typeof rulename!=='string'){throw _Constants2.default.BAD_ARGUMENT_ERROR;}var index=findABRCustomRuleIndex(rulename);if(index===-1){// add rule\\ncustomABRRule.push({type:type,rulename:rulename,rule:rule});}else{// update rule\\ncustomABRRule[index].type=type;customABRRule[index].rule=rule;}}function removeABRCustomRule(rulename){if(rulename){var index=findABRCustomRuleIndex(rulename);//if no rulename custom rule has been found, do nothing\\nif(index!==-1){// remove rule\\ncustomABRRule.splice(index,1);}}else{//if no rulename is defined, remove all ABR custome rules\\ncustomABRRule=[];}}function getStableBufferTime(){if(settings.get().streaming.lowLatencyEnabled){return getLiveDelay()*0.6;}var stableBufferTime=settings.get().streaming.stableBufferTime;return stableBufferTime>-1?stableBufferTime:settings.get().streaming.fastSwitchEnabled?DEFAULT_MIN_BUFFER_TIME_FAST_SWITCH:DEFAULT_MIN_BUFFER_TIME;}function getRetryAttemptsForType(type){var lowLatencyMultiplyFactor=!isNaN(settings.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?settings.get().streaming.retryAttempts.lowLatencyMultiplyFactor:LOW_LATENCY_MULTIPLY_FACTOR;return settings.get().streaming.lowLatencyEnabled?settings.get().streaming.retryAttempts[type]*lowLatencyMultiplyFactor:settings.get().streaming.retryAttempts[type];}function getRetryIntervalsForType(type){var lowLatencyReductionFactor=!isNaN(settings.get().streaming.retryIntervals.lowLatencyReductionFactor)?settings.get().streaming.retryIntervals.lowLatencyReductionFactor:LOW_LATENCY_REDUCTION_FACTOR;return settings.get().streaming.lowLatencyEnabled?settings.get().streaming.retryIntervals[type]/lowLatencyReductionFactor:settings.get().streaming.retryIntervals[type];}function getLiveDelay(){if(settings.get().streaming.lowLatencyEnabled){return settings.get().streaming.liveDelay||DEFAULT_LOW_LATENCY_LIVE_DELAY;}return settings.get().streaming.liveDelay;}function getLiveCatchupLatencyThreshold(){try{var liveCatchupLatencyThreshold=settings.get().streaming.liveCatchup.latencyThreshold;var liveDelay=getLiveDelay();if(liveCatchupLatencyThreshold!==null&&!isNaN(liveCatchupLatencyThreshold)){return Math.max(liveCatchupLatencyThreshold,liveDelay);}var liveCatchupMinDrift=settings.get().streaming.liveCatchup.minDrift;var maximumLiveDelay=!isNaN(liveDelay)&&liveDelay?!isNaN(liveCatchupMinDrift)?settings.get().streaming.liveCatchup.minDrift+getLiveDelay():getLiveDelay():NaN;if(maximumLiveDelay&&!isNaN(maximumLiveDelay)){return Math.max(maximumLiveDelay*DEFAULT_LIVE_LATENCY_CATCHUP_THRESHOLD_FACTOR,MINIMUM_LIVE_LATENCY_CATCHUP);}return NaN;}catch(e){return NaN;}}function addUTCTimingSource(schemeIdUri,value){removeUTCTimingSource(schemeIdUri,value);//check if it already exists and remove if so.\\nvar vo=new _UTCTiming2.default();vo.schemeIdUri=schemeIdUri;vo.value=value;UTCTimingSources.push(vo);}function getUTCTimingSources(){return UTCTimingSources;}function removeUTCTimingSource(schemeIdUri,value){(0,_SupervisorTools.checkParameterType)(schemeIdUri,'string');(0,_SupervisorTools.checkParameterType)(value,'string');UTCTimingSources.forEach(function(obj,idx){if(obj.schemeIdUri===schemeIdUri&&obj.value===value){UTCTimingSources.splice(idx,1);}});}function clearDefaultUTCTimingSources(){UTCTimingSources=[];}function restoreDefaultUTCTimingSources(){var defaultUtcTimingSource=settings.get().streaming.utcSynchronization.defaultTimingSource;addUTCTimingSource(defaultUtcTimingSource.scheme,defaultUtcTimingSource.value);}function setXHRWithCredentialsForType(type,value){if(!type){Object.keys(xhrWithCredentials).forEach(function(key){setXHRWithCredentialsForType(key,value);});}else{xhrWithCredentials[type]=!!value;}}function getXHRWithCredentialsForType(type){var useCreds=xhrWithCredentials[type];return useCreds===undefined?xhrWithCredentials.default:useCreds;}function getDefaultUtcTimingSource(){return settings.get().streaming.utcSynchronization.defaultTimingSource;}function reset(){//TODO need to figure out what props to persist across sessions and which to reset if any.\\n//setup();\\n}instance={getABRCustomRules:getABRCustomRules,addABRCustomRule:addABRCustomRule,removeABRCustomRule:removeABRCustomRule,getStableBufferTime:getStableBufferTime,getRetryAttemptsForType:getRetryAttemptsForType,getRetryIntervalsForType:getRetryIntervalsForType,getLiveDelay:getLiveDelay,getLiveCatchupLatencyThreshold:getLiveCatchupLatencyThreshold,addUTCTimingSource:addUTCTimingSource,removeUTCTimingSource:removeUTCTimingSource,getUTCTimingSources:getUTCTimingSources,clearDefaultUTCTimingSources:clearDefaultUTCTimingSources,restoreDefaultUTCTimingSources:restoreDefaultUTCTimingSources,setXHRWithCredentialsForType:setXHRWithCredentialsForType,getXHRWithCredentialsForType:getXHRWithCredentialsForType,getDefaultUtcTimingSource:getDefaultUtcTimingSource,reset:reset};setup();return instance;}//TODO see if you can move this and not export and just getter to get default value.\\nMediaPlayerModel.__dashjs_factory_name='MediaPlayerModel';exports.default=_FactoryMaker2.default.getSingletonFactory(MediaPlayerModel);\\n//# sourceMappingURL=MediaPlayerModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _MetricsList=__webpack_require__(/*! ../vo/MetricsList */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js\\\");var _MetricsList2=_interopRequireDefault(_MetricsList);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _RepresentationSwitch=__webpack_require__(/*! ../vo/metrics/RepresentationSwitch */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js\\\");var _RepresentationSwitch2=_interopRequireDefault(_RepresentationSwitch);var _BufferLevel=__webpack_require__(/*! ../vo/metrics/BufferLevel */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js\\\");var _BufferLevel2=_interopRequireDefault(_BufferLevel);var _BufferState=__webpack_require__(/*! ../vo/metrics/BufferState */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js\\\");var _BufferState2=_interopRequireDefault(_BufferState);var _DVRInfo=__webpack_require__(/*! ../vo/metrics/DVRInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js\\\");var _DVRInfo2=_interopRequireDefault(_DVRInfo);var _DroppedFrames=__webpack_require__(/*! ../vo/metrics/DroppedFrames */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js\\\");var _DroppedFrames2=_interopRequireDefault(_DroppedFrames);var _ManifestUpdate=__webpack_require__(/*! ../vo/metrics/ManifestUpdate */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js\\\");var _SchedulingInfo=__webpack_require__(/*! ../vo/metrics/SchedulingInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js\\\");var _SchedulingInfo2=_interopRequireDefault(_SchedulingInfo);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _RequestsQueue=__webpack_require__(/*! ../vo/metrics/RequestsQueue */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js\\\");var _RequestsQueue2=_interopRequireDefault(_RequestsQueue);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsModel(config){config=config||{};var settings=config.settings;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,streamMetrics=void 0;function setup(){streamMetrics={};}function metricsChanged(){eventBus.trigger(_Events2.default.METRICS_CHANGED);}function metricChanged(mediaType){eventBus.trigger(_Events2.default.METRIC_CHANGED,{mediaType:mediaType});metricsChanged();}function metricUpdated(mediaType,metricType,vo){eventBus.trigger(_Events2.default.METRIC_UPDATED,{mediaType:mediaType,metric:metricType,value:vo});metricChanged(mediaType);}function metricAdded(mediaType,metricType,vo){eventBus.trigger(_Events2.default.METRIC_ADDED,{mediaType:mediaType,metric:metricType,value:vo});metricChanged(mediaType);}function clearCurrentMetricsForType(type){delete streamMetrics[type];metricChanged(type);}function clearAllCurrentMetrics(){streamMetrics={};metricsChanged();}function getMetricsFor(type,readOnly){var metrics=null;if(!type){return metrics;}if(streamMetrics.hasOwnProperty(type)){metrics=streamMetrics[type];}else if(!readOnly){metrics=new _MetricsList2.default();streamMetrics[type]=metrics;}return metrics;}function pushMetrics(type,list,value){var metrics=getMetricsFor(type);if(metrics!==null){metrics[list].push(value);if(metrics[list].length>settings.get().streaming.metricsMaxListDepth){metrics[list].shift();}}}function appendHttpTrace(httpRequest,s,d,b){var vo=new _HTTPRequest.HTTPRequestTrace();vo.s=s;vo.d=d;vo.b=b;httpRequest.trace.push(vo);if(!httpRequest.interval){httpRequest.interval=0;}httpRequest.interval+=d;return vo;}function addHttpRequest(mediaType,tcpid,type,url,quality,actualurl,serviceLocation,range,trequest,tresponse,tfinish,responsecode,mediaduration,responseHeaders,traces){var vo=new _HTTPRequest.HTTPRequest();// ISO 23009-1 D.4.3 NOTE 2:\\n// All entries for a given object will have the same URL and range\\n// and so can easily be correlated. If there were redirects or\\n// failures there will be one entry for each redirect/failure.\\n// The redirect-to URL or alternative url (where multiple have been\\n// provided in the MPD) will appear as the actualurl of the next\\n// entry with the same url value.\\nif(actualurl&&actualurl!==url){// given the above, add an entry for the original request\\naddHttpRequest(mediaType,null,type,url,quality,null,null,range,trequest,null,// unknown\\nnull,// unknown\\nnull,// unknown, probably a 302\\nmediaduration,null,null);vo.actualurl=actualurl;}vo.tcpid=tcpid;vo.type=type;vo.url=url;vo.range=range;vo.trequest=trequest;vo.tresponse=tresponse;vo.responsecode=responsecode;vo._tfinish=tfinish;vo._stream=mediaType;vo._mediaduration=mediaduration;vo._quality=quality;vo._responseHeaders=responseHeaders;vo._serviceLocation=serviceLocation;if(traces){traces.forEach(function(trace){appendHttpTrace(vo,trace.s,trace.d,trace.b);});}else{// The interval and trace shall be absent for redirect and failure records.\\ndelete vo.interval;delete vo.trace;}pushAndNotify(mediaType,_MetricsConstants2.default.HTTP_REQUEST,vo);}function addRepresentationSwitch(mediaType,t,mt,to,lto){var vo=new _RepresentationSwitch2.default();vo.t=t;vo.mt=mt;vo.to=to;if(lto){vo.lto=lto;}else{delete vo.lto;}pushAndNotify(mediaType,_MetricsConstants2.default.TRACK_SWITCH,vo);}function pushAndNotify(mediaType,metricType,metricObject){pushMetrics(mediaType,metricType,metricObject);metricAdded(mediaType,metricType,metricObject);}function addBufferLevel(mediaType,t,level){var vo=new _BufferLevel2.default();vo.t=t;vo.level=level;pushAndNotify(mediaType,_MetricsConstants2.default.BUFFER_LEVEL,vo);}function addBufferState(mediaType,state,target){var vo=new _BufferState2.default();vo.target=target;vo.state=state;pushAndNotify(mediaType,_MetricsConstants2.default.BUFFER_STATE,vo);}function addDVRInfo(mediaType,currentTime,mpd,range){var vo=new _DVRInfo2.default();vo.time=currentTime;vo.range=range;vo.manifestInfo=mpd;pushAndNotify(mediaType,_MetricsConstants2.default.DVR_INFO,vo);}function addDroppedFrames(mediaType,quality){var vo=new _DroppedFrames2.default();var list=getMetricsFor(mediaType).DroppedFrames;if(!quality){return;}vo.time=quality.creationTime;vo.droppedFrames=quality.droppedVideoFrames;if(list.length>0&&list[list.length-1]==vo){return;}pushAndNotify(mediaType,_MetricsConstants2.default.DROPPED_FRAMES,vo);}function addSchedulingInfo(mediaType,t,type,startTime,availabilityStartTime,duration,quality,range,state){var vo=new _SchedulingInfo2.default();vo.mediaType=mediaType;vo.t=t;vo.type=type;vo.startTime=startTime;vo.availabilityStartTime=availabilityStartTime;vo.duration=duration;vo.quality=quality;vo.range=range;vo.state=state;pushAndNotify(mediaType,_MetricsConstants2.default.SCHEDULING_INFO,vo);}function addRequestsQueue(mediaType,loadingRequests,executedRequests){var vo=new _RequestsQueue2.default();vo.loadingRequests=loadingRequests;vo.executedRequests=executedRequests;getMetricsFor(mediaType).RequestsQueue=vo;metricAdded(mediaType,_MetricsConstants2.default.REQUESTS_QUEUE,vo);}function addManifestUpdate(mediaType,type,requestTime,fetchTime,availabilityStartTime,presentationStartTime,clientTimeOffset,currentTime,buffered,latency){var vo=new _ManifestUpdate.ManifestUpdate();vo.mediaType=mediaType;vo.type=type;vo.requestTime=requestTime;// when this manifest update was requested\\nvo.fetchTime=fetchTime;// when this manifest update was received\\nvo.availabilityStartTime=availabilityStartTime;vo.presentationStartTime=presentationStartTime;// the seek point (liveEdge for dynamic, Stream[0].startTime for static)\\nvo.clientTimeOffset=clientTimeOffset;// the calculated difference between the server and client wall clock time\\nvo.currentTime=currentTime;// actual element.currentTime\\nvo.buffered=buffered;// actual element.ranges\\nvo.latency=latency;// (static is fixed value of zero. dynamic should be ((Now-@availabilityStartTime) - currentTime)\\npushMetrics(_Constants2.default.STREAM,_MetricsConstants2.default.MANIFEST_UPDATE,vo);metricAdded(mediaType,_MetricsConstants2.default.MANIFEST_UPDATE,vo);}function updateManifestUpdateInfo(manifestUpdate,updatedFields){if(manifestUpdate){for(var field in updatedFields){manifestUpdate[field]=updatedFields[field];}metricUpdated(manifestUpdate.mediaType,_MetricsConstants2.default.MANIFEST_UPDATE,manifestUpdate);}}function addManifestUpdateStreamInfo(manifestUpdate,id,index,start,duration){if(manifestUpdate){var vo=new _ManifestUpdate.ManifestUpdateStreamInfo();vo.id=id;vo.index=index;vo.start=start;vo.duration=duration;manifestUpdate.streamInfo.push(vo);metricUpdated(manifestUpdate.mediaType,_MetricsConstants2.default.MANIFEST_UPDATE_STREAM_INFO,manifestUpdate);}}function addManifestUpdateRepresentationInfo(manifestUpdate,id,index,streamIndex,mediaType,presentationTimeOffset,startNumber,fragmentInfoType){if(manifestUpdate&&manifestUpdate.representationInfo){var vo=new _ManifestUpdate.ManifestUpdateRepresentationInfo();vo.id=id;vo.index=index;vo.streamIndex=streamIndex;vo.mediaType=mediaType;vo.startNumber=startNumber;vo.fragmentInfoType=fragmentInfoType;vo.presentationTimeOffset=presentationTimeOffset;manifestUpdate.representationInfo.push(vo);metricUpdated(manifestUpdate.mediaType,_MetricsConstants2.default.MANIFEST_UPDATE_TRACK_INFO,manifestUpdate);}}function addPlayList(vo){if(vo.trace&&Array.isArray(vo.trace)){vo.trace.forEach(function(trace){if(trace.hasOwnProperty('subreplevel')&&!trace.subreplevel){delete trace.subreplevel;}});}else{delete vo.trace;}pushAndNotify(_Constants2.default.STREAM,_MetricsConstants2.default.PLAY_LIST,vo);}function addDVBErrors(vo){pushAndNotify(_Constants2.default.STREAM,_MetricsConstants2.default.DVB_ERRORS,vo);}instance={clearCurrentMetricsForType:clearCurrentMetricsForType,clearAllCurrentMetrics:clearAllCurrentMetrics,getMetricsFor:getMetricsFor,addHttpRequest:addHttpRequest,addRepresentationSwitch:addRepresentationSwitch,addBufferLevel:addBufferLevel,addBufferState:addBufferState,addDVRInfo:addDVRInfo,addDroppedFrames:addDroppedFrames,addSchedulingInfo:addSchedulingInfo,addRequestsQueue:addRequestsQueue,addManifestUpdate:addManifestUpdate,updateManifestUpdateInfo:updateManifestUpdateInfo,addManifestUpdateStreamInfo:addManifestUpdateStreamInfo,addManifestUpdateRepresentationInfo:addManifestUpdateRepresentationInfo,addPlayList:addPlayList,addDVBErrors:addDVBErrors};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsModel.__dashjs_factory_name='MetricsModel';exports.default=_FactoryMaker2.default.getSingletonFactory(MetricsModel);\\n//# sourceMappingURL=MetricsModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _URIFragmentData=__webpack_require__(/*! ../vo/URIFragmentData */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js\\\");var _URIFragmentData2=_interopRequireDefault(_URIFragmentData);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * Model class managing URI fragments.\\n * @ignore\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function URIFragmentModel(){var instance=void 0,URIFragmentDataVO=void 0;/**\\n     * @param {string} uri The URI to parse for fragment extraction\\n     * @memberof module:URIFragmentModel\\n     * @instance\\n     */function initialize(uri){URIFragmentDataVO=new _URIFragmentData2.default();if(!uri)return null;var hashIndex=uri.indexOf('#');if(hashIndex!==-1){var fragments=uri.substr(hashIndex+1).split('&');for(var i=0,len=fragments.length;i<len;++i){var fragment=fragments[i];var equalIndex=fragment.indexOf('=');if(equalIndex!==-1){var key=fragment.substring(0,equalIndex);if(URIFragmentDataVO.hasOwnProperty(key)){URIFragmentDataVO[key]=fragment.substr(equalIndex+1);}}}}}/**\\n     * @returns {URIFragmentData} Object containing supported URI fragments\\n     * @memberof module:URIFragmentModel\\n     * @instance\\n     */function getURIFragmentData(){return URIFragmentDataVO;}instance={initialize:initialize,getURIFragmentData:getURIFragmentData};return instance;}URIFragmentModel.__dashjs_factory_name='URIFragmentModel';exports.default=_FactoryMaker2.default.getSingletonFactory(URIFragmentModel);\\n//# sourceMappingURL=URIFragmentModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js\":\n/*!***************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function VideoModel(){var instance=void 0,logger=void 0,element=void 0,TTMLRenderingDiv=void 0,previousPlaybackRate=void 0;var VIDEO_MODEL_WRONG_ELEMENT_TYPE='element is not video or audio DOM type!';var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var stalledStreams=[];function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function initialize(){eventBus.on(_Events2.default.PLAYBACK_PLAYING,onPlaying,this);}function reset(){eventBus.off(_Events2.default.PLAYBACK_PLAYING,onPlaying,this);}function onPlaybackCanPlay(){if(element){element.playbackRate=previousPlaybackRate||1;element.removeEventListener('canplay',onPlaybackCanPlay);}}function setPlaybackRate(value){if(!element)return;if(element.readyState<=2&&value>0){// If media element hasn't loaded enough data to play yet, wait until it has\\nelement.addEventListener('canplay',onPlaybackCanPlay);}else{element.playbackRate=value;}}//TODO Move the DVR window calculations from MediaPlayer to Here.\\nfunction setCurrentTime(currentTime,stickToBuffered){if(element){//_currentTime = currentTime;\\n// We don't set the same currentTime because it can cause firing unexpected Pause event in IE11\\n// providing playbackRate property equals to zero.\\nif(element.currentTime==currentTime)return;// TODO Despite the fact that MediaSource 'open' event has been fired IE11 cannot set videoElement.currentTime\\n// immediately (it throws InvalidStateError). It seems that this is related to videoElement.readyState property\\n// Initially it is 0, but soon after 'open' event it goes to 1 and setting currentTime is allowed. Chrome allows to\\n// set currentTime even if readyState = 0.\\n// setTimeout is used to workaround InvalidStateError in IE11\\ntry{currentTime=stickToBuffered?stickTimeToBuffered(currentTime):currentTime;element.currentTime=currentTime;}catch(e){if(element.readyState===0&&e.code===e.INVALID_STATE_ERR){setTimeout(function(){element.currentTime=currentTime;},400);}}}}function stickTimeToBuffered(time){var buffered=getBufferRange();var closestTime=time;var closestDistance=9999999999;if(buffered){for(var i=0;i<buffered.length;i++){var start=buffered.start(i);var end=buffered.end(i);var distanceToStart=Math.abs(start-time);var distanceToEnd=Math.abs(end-time);if(time>=start&&time<=end){return time;}if(distanceToStart<closestDistance){closestDistance=distanceToStart;closestTime=start;}if(distanceToEnd<closestDistance){closestDistance=distanceToEnd;closestTime=end;}}}return closestTime;}function getElement(){return element;}function setElement(value){//add check of value type\\nif(value===null||value===undefined||value&&/^(VIDEO|AUDIO)$/i.test(value.nodeName)){element=value;// Workaround to force Firefox to fire the canplay event.\\nif(element){element.preload='auto';}}else{throw VIDEO_MODEL_WRONG_ELEMENT_TYPE;}}function setSource(source){if(element){if(source){element.src=source;}else{element.removeAttribute('src');element.load();}}}function getSource(){return element?element.src:null;}function getTTMLRenderingDiv(){return TTMLRenderingDiv;}function setTTMLRenderingDiv(div){TTMLRenderingDiv=div;// The styling will allow the captions to match the video window size and position.\\nTTMLRenderingDiv.style.position='absolute';TTMLRenderingDiv.style.display='flex';TTMLRenderingDiv.style.overflow='hidden';TTMLRenderingDiv.style.pointerEvents='none';TTMLRenderingDiv.style.top=0;TTMLRenderingDiv.style.left=0;}function setStallState(type,state){stallStream(type,state);}function isStalled(){return stalledStreams.length>0;}function addStalledStream(type){var event=void 0;if(type===null||!element||element.seeking||stalledStreams.indexOf(type)!==-1){return;}stalledStreams.push(type);if(element&&stalledStreams.length===1){// Halt playback until nothing is stalled.\\nevent=document.createEvent('Event');event.initEvent('waiting',true,false);previousPlaybackRate=element.playbackRate;setPlaybackRate(0);element.dispatchEvent(event);}}function removeStalledStream(type){var index=stalledStreams.indexOf(type);var event=void 0;if(type===null){return;}if(index!==-1){stalledStreams.splice(index,1);}// If nothing is stalled resume playback.\\nif(element&&isStalled()===false&&element.playbackRate===0){setPlaybackRate(previousPlaybackRate||1);if(!element.paused){event=document.createEvent('Event');event.initEvent('playing',true,false);element.dispatchEvent(event);}}}function stallStream(type,isStalled){if(isStalled){addStalledStream(type);}else{removeStalledStream(type);}}//Calling play on the element will emit playing - even if the stream is stalled. If the stream is stalled, emit a waiting event.\\nfunction onPlaying(){if(element&&isStalled()&&element.playbackRate===0){var event=document.createEvent('Event');event.initEvent('waiting',true,false);element.dispatchEvent(event);}}function getPlaybackQuality(){if(!element){return null;}var hasWebKit='webkitDroppedFrameCount'in element&&'webkitDecodedFrameCount'in element;var hasQuality='getVideoPlaybackQuality'in element;var result=null;if(hasQuality){result=element.getVideoPlaybackQuality();}else if(hasWebKit){result={droppedVideoFrames:element.webkitDroppedFrameCount,totalVideoFrames:element.webkitDroppedFrameCount+element.webkitDecodedFrameCount,creationTime:new Date()};}return result;}function play(){if(element){element.autoplay=true;var p=element.play();if(p&&p.catch&&typeof Promise!=='undefined'){p.catch(function(e){if(e.name==='NotAllowedError'){eventBus.trigger(_Events2.default.PLAYBACK_NOT_ALLOWED);}logger.warn('Caught pending play exception - continuing ('+e+')');});}}}function isPaused(){return element?element.paused:null;}function pause(){if(element){element.pause();element.autoplay=false;}}function isSeeking(){return element?element.seeking:null;}function getTime(){return element?element.currentTime:null;}function getPlaybackRate(){return element?element.playbackRate:null;}function getPlayedRanges(){return element?element.played:null;}function getEnded(){return element?element.ended:null;}function addEventListener(eventName,eventCallBack){if(element){element.addEventListener(eventName,eventCallBack);}}function removeEventListener(eventName,eventCallBack){if(element){element.removeEventListener(eventName,eventCallBack);}}function getReadyState(){return element?element.readyState:NaN;}function getBufferRange(){return element?element.buffered:null;}function getClientWidth(){return element?element.clientWidth:NaN;}function getClientHeight(){return element?element.clientHeight:NaN;}function getVideoWidth(){return element?element.videoWidth:NaN;}function getVideoHeight(){return element?element.videoHeight:NaN;}function getVideoRelativeOffsetTop(){var parentElement=element.parentNode.host||element.parentNode;return parentElement?element.getBoundingClientRect().top-parentElement.getBoundingClientRect().top:NaN;}function getVideoRelativeOffsetLeft(){var parentElement=element.parentNode.host||element.parentNode;return parentElement?element.getBoundingClientRect().left-parentElement.getBoundingClientRect().left:NaN;}function getTextTracks(){return element?element.textTracks:[];}function getTextTrack(kind,label,lang,isTTML,isEmbedded){if(element){for(var i=0;i<element.textTracks.length;i++){//label parameter could be a number (due to adaptationSet), but label, the attribute of textTrack, is a string => to modify...\\n//label could also be undefined (due to adaptationSet)\\nif(element.textTracks[i].kind===kind&&(label?element.textTracks[i].label==label:true)&&element.textTracks[i].language===lang&&element.textTracks[i].isTTML===isTTML&&element.textTracks[i].isEmbedded===isEmbedded){return element.textTracks[i];}}}return null;}function addTextTrack(kind,label,lang,isTTML,isEmbedded){if(!element){return null;}// check if track of same type has not been already created for previous stream\\n// then use it (no way to remove existing text track from video element)\\nvar track=getTextTrack(kind,label,lang,isTTML,isEmbedded);if(!track){track=element.addTextTrack(kind,label,lang);track.isEmbedded=isEmbedded;track.isTTML=isTTML;}return track;}function appendChild(childElement){if(element){element.appendChild(childElement);//in Chrome, we need to differenciate textTrack with same lang, kind and label but different format (vtt, ttml, etc...)\\nif(childElement.isTTML!==undefined){element.textTracks[element.textTracks.length-1].isTTML=childElement.isTTML;element.textTracks[element.textTracks.length-1].isEmbedded=childElement.isEmbedded;}}}function removeChild(childElement){if(element){element.removeChild(childElement);}}instance={initialize:initialize,setCurrentTime:setCurrentTime,play:play,isPaused:isPaused,pause:pause,isStalled:isStalled,isSeeking:isSeeking,getTime:getTime,getPlaybackRate:getPlaybackRate,setPlaybackRate:setPlaybackRate,getPlayedRanges:getPlayedRanges,getEnded:getEnded,setStallState:setStallState,getElement:getElement,setElement:setElement,setSource:setSource,getSource:getSource,getTTMLRenderingDiv:getTTMLRenderingDiv,setTTMLRenderingDiv:setTTMLRenderingDiv,getPlaybackQuality:getPlaybackQuality,addEventListener:addEventListener,removeEventListener:removeEventListener,getReadyState:getReadyState,getBufferRange:getBufferRange,getClientWidth:getClientWidth,getClientHeight:getClientHeight,getTextTracks:getTextTracks,getTextTrack:getTextTrack,addTextTrack:addTextTrack,appendChild:appendChild,removeChild:removeChild,getVideoWidth:getVideoWidth,getVideoHeight:getVideoHeight,getVideoRelativeOffsetTop:getVideoRelativeOffsetTop,getVideoRelativeOffsetLeft:getVideoRelativeOffsetLeft,reset:reset};setup();return instance;}VideoModel.__dashjs_factory_name='VideoModel';exports.default=_FactoryMaker2.default.getSingletonFactory(VideoModel);\\n//# sourceMappingURL=VideoModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module FetchLoader\\n * @ignore\\n * @description Manages download of resources via HTTP using fetch.\\n * @param {Object} cfg - dependencies from parent\\n */function FetchLoader(cfg){cfg=cfg||{};var context=this.context;var requestModifier=cfg.requestModifier;var boxParser=cfg.boxParser;var settings=(0,_Settings2.default)(context).getInstance();var instance=void 0;function load(httpRequest){// Variables will be used in the callback functions\\nvar requestStartTime=new Date();var request=httpRequest.request;var headers=new Headers();/*jshint ignore:line*/if(request.range){headers.append('Range','bytes='+request.range);}if(!request.requestStartDate){request.requestStartDate=requestStartTime;}if(requestModifier){// modifyRequestHeader expects a XMLHttpRequest object so,\\n// to keep backward compatibility, we should expose a setRequestHeader method\\n// TODO: Remove RequestModifier dependency on XMLHttpRequest object and define\\n// a more generic way to intercept/modify requests\\nrequestModifier.modifyRequestHeader({setRequestHeader:function setRequestHeader(header,value){headers.append(header,value);}});}var abortController=void 0;if(typeof window.AbortController==='function'){abortController=new AbortController();/*jshint ignore:line*/httpRequest.abortController=abortController;abortController.signal.onabort=httpRequest.onabort;}var reqOptions={method:httpRequest.method,headers:headers,credentials:httpRequest.withCredentials?'include':undefined,signal:abortController?abortController.signal:undefined};fetch(httpRequest.url,reqOptions).then(function(response){if(!httpRequest.response){httpRequest.response={};}httpRequest.response.status=response.status;httpRequest.response.statusText=response.statusText;httpRequest.response.responseURL=response.url;if(!response.ok){httpRequest.onerror();}var responseHeaders='';var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=response.headers.keys()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var key=_step.value;responseHeaders+=key+': '+response.headers.get(key)+'\\\\r\\\\n';}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}httpRequest.response.responseHeaders=responseHeaders;if(!response.body){// Fetch returning a ReadableStream response body is not currently supported by all browsers.\\n// Browser compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\\n// If it is not supported, returning the whole segment when it's ready (as xhr)\\nreturn response.arrayBuffer().then(function(buffer){httpRequest.response.response=buffer;var event={loaded:buffer.byteLength,total:buffer.byteLength,stream:false};httpRequest.progress(event);httpRequest.onload();httpRequest.onend();return;});}var totalBytes=parseInt(response.headers.get('Content-Length'),10);var bytesReceived=0;var signaledFirstByte=false;var remaining=new Uint8Array();var offset=0;httpRequest.reader=response.body.getReader();var downloadedData=[];var startTimeData=[];var endTimeData=[];var lastChunkWasFinished=true;var calculationMode=settings.get().streaming.abr.fetchThroughputCalculationMode;var processResult=function processResult(_ref){var value=_ref.value,done=_ref.done;// Bug fix Parse whenever data is coming [value] better than 1ms looking that increase CPU\\nif(done){if(remaining){// If there is pending data, call progress so network metrics\\n// are correctly generated\\n// Same structure as https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget/\\nhttpRequest.progress({loaded:bytesReceived,total:isNaN(totalBytes)?bytesReceived:totalBytes,lengthComputable:true,time:calculateDownloadedTime(calculationMode,startTimeData,endTimeData,downloadedData,bytesReceived),stream:true});httpRequest.response.response=remaining.buffer;}httpRequest.onload();httpRequest.onend();return;}if(value&&value.length>0){remaining=concatTypedArray(remaining,value);bytesReceived+=value.length;downloadedData.push({ts:Date.now(),bytes:value.length});if(calculationMode===_Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&lastChunkWasFinished){// Parse the payload and capture the the 'moof' box\\nvar _boxesInfo=boxParser.findLastTopIsoBoxCompleted(['moof'],remaining,offset);if(_boxesInfo.found){// Store the beginning time of each chunk download in array StartTimeData\\nlastChunkWasFinished=false;startTimeData.push({ts:performance.now(),/* jshint ignore:line */bytes:value.length});}}var boxesInfo=boxParser.findLastTopIsoBoxCompleted(['moov','mdat'],remaining,offset);if(boxesInfo.found){var end=boxesInfo.lastCompletedOffset+boxesInfo.size;// Store the end time of each chunk download  with its size in array EndTimeData\\nif(calculationMode===_Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING){lastChunkWasFinished=true;endTimeData.push({ts:performance.now(),/* jshint ignore:line */bytes:remaining.length});}// If we are going to pass full buffer, avoid copying it and pass\\n// complete buffer. Otherwise clone the part of the buffer that is completed\\n// and adjust remaining buffer. A clone is needed because ArrayBuffer of a typed-array\\n// keeps a reference to the original data\\nvar data=void 0;if(end===remaining.length){data=remaining;remaining=new Uint8Array();}else{data=new Uint8Array(remaining.subarray(0,end));remaining=remaining.subarray(end);}// Announce progress but don't track traces. Throughput measures are quite unstable\\n// when they are based in small amount of data\\nhttpRequest.progress({data:data.buffer,lengthComputable:false,noTrace:true});offset=0;}else{offset=boxesInfo.lastCompletedOffset;// Call progress so it generates traces that will be later used to know when the first byte\\n// were received\\nif(!signaledFirstByte){httpRequest.progress({lengthComputable:false,noTrace:true});signaledFirstByte=true;}}}read(httpRequest,processResult);};read(httpRequest,processResult);}).catch(function(e){if(httpRequest.onerror){httpRequest.onerror(e);}});}function read(httpRequest,processResult){httpRequest.reader.read().then(processResult).catch(function(e){if(httpRequest.onerror&&httpRequest.response.status===200){// Error, but response code is 200, trigger error\\nhttpRequest.onerror(e);}});}function concatTypedArray(remaining,data){if(remaining.length===0){return data;}var result=new Uint8Array(remaining.length+data.length);result.set(remaining);result.set(data,remaining.length);return result;}function abort(request){if(request.abortController){// For firefox and edge\\nrequest.abortController.abort();}else if(request.reader){// For Chrome\\ntry{request.reader.cancel();request.onabort();}catch(e){// throw exceptions (TypeError) when reader was previously closed,\\n// for example, because a network issue\\n}}}// Compute the download time of a segment\\nfunction calculateDownloadedTime(calculationMode,startTimeData,endTimeData,downloadedData,bytesReceived){switch(calculationMode){case _Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING:return _calculateDownloadedTimeByMoofParsing(startTimeData,endTimeData);case _Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA:return _calculateDownloadedTimeByBytesReceived(downloadedData,bytesReceived);default:return _calculateDownloadedTimeByBytesReceived(downloadedData,bytesReceived);}}function _calculateDownloadedTimeByMoofParsing(startTimeData,endTimeData){try{var datum=void 0,datumE=void 0;// Filter the first and last chunks in a segment in both arrays [StartTimeData and EndTimeData]\\ndatum=startTimeData.filter(function(data,i){return i>0&&i<startTimeData.length-1;});datumE=endTimeData.filter(function(dataE,i){return i>0&&i<endTimeData.length-1;});// Compute the download time of a segment based on the filtered data [last chunk end time - first chunk beginning time]\\nvar segDownloadTime=0;if(datum.length>1){for(var i=0;i<datum.length;i++){if(datum[i]&&datumE[i]){var chunkDownladTime=datumE[i].ts-datum[i].ts;segDownloadTime+=chunkDownladTime;}}return segDownloadTime;}return null;}catch(e){return null;}}function _calculateDownloadedTimeByBytesReceived(downloadedData,bytesReceived){try{downloadedData=downloadedData.filter(function(data){return data.bytes>bytesReceived/4/downloadedData.length;});if(downloadedData.length>1){var time=0;var avgTimeDistance=(downloadedData[downloadedData.length-1].ts-downloadedData[0].ts)/downloadedData.length;downloadedData.forEach(function(data,index){// To be counted the data has to be over a threshold\\nvar next=downloadedData[index+1];if(next){var distance=next.ts-data.ts;time+=distance<avgTimeDistance?distance:0;}});return time;}return null;}catch(e){return null;}}instance={load:load,abort:abort,calculateDownloadedTime:calculateDownloadedTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */FetchLoader.__dashjs_factory_name='FetchLoader';var factory=_FactoryMaker2.default.getClassFactory(FetchLoader);exports.default=factory;\\n//# sourceMappingURL=FetchLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _XHRLoader=__webpack_require__(/*! ./XHRLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\\\");var _XHRLoader2=_interopRequireDefault(_XHRLoader);var _FetchLoader=__webpack_require__(/*! ./FetchLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js\\\");var _FetchLoader2=_interopRequireDefault(_FetchLoader);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _CmcdModel=__webpack_require__(/*! ../models/CmcdModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js\\\");var _CmcdModel2=_interopRequireDefault(_CmcdModel);var _Utils=__webpack_require__(/*! ../../core/Utils */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @module HTTPLoader\\n * @ignore\\n * @description Manages download of resources via HTTP.\\n * @param {Object} cfg - dependancies from parent\\n */function HTTPLoader(cfg){cfg=cfg||{};var context=this.context;var errHandler=cfg.errHandler;var dashMetrics=cfg.dashMetrics;var mediaPlayerModel=cfg.mediaPlayerModel;var requestModifier=cfg.requestModifier;var boxParser=cfg.boxParser;var useFetch=cfg.useFetch||false;var errors=cfg.errors;var requestTimeout=cfg.requestTimeout||0;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();var instance=void 0,requests=void 0,delayedRequests=void 0,retryRequests=void 0,downloadErrorToRequestTypeMap=void 0,cmcdModel=void 0,logger=void 0;function setup(){var _downloadErrorToReque;logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);requests=[];delayedRequests=[];retryRequests=[];cmcdModel=(0,_CmcdModel2.default)(context).getInstance();downloadErrorToRequestTypeMap=(_downloadErrorToReque={},_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.MPD_TYPE,errors.DOWNLOAD_ERROR_ID_MANIFEST_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE,errors.DOWNLOAD_ERROR_ID_XLINK_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.INDEX_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.OTHER_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_downloadErrorToReque);}function internalLoad(config,remainingAttempts){var request=config.request;var traces=[];var firstProgress=true;var needFailureReport=true;var requestStartTime=new Date();var lastTraceTime=requestStartTime;var lastTraceReceivedCount=0;var httpRequest=void 0;if(!requestModifier||!dashMetrics||!errHandler){throw new Error('config object is not correct or missing');}var handleLoaded=function handleLoaded(success){needFailureReport=false;request.requestStartDate=requestStartTime;request.requestEndDate=new Date();request.firstByteDate=request.firstByteDate||requestStartTime;if(!request.checkExistenceOnly){dashMetrics.addHttpRequest(request,httpRequest.response?httpRequest.response.responseURL:null,httpRequest.response?httpRequest.response.status:null,httpRequest.response&&httpRequest.response.getAllResponseHeaders?httpRequest.response.getAllResponseHeaders():httpRequest.response?httpRequest.response.responseHeaders:[],success?traces:null);if(request.type===_HTTPRequest.HTTPRequest.MPD_TYPE){dashMetrics.addManifestUpdate(request);}}};var onloadend=function onloadend(){if(requests.indexOf(httpRequest)===-1){return;}else{requests.splice(requests.indexOf(httpRequest),1);}if(needFailureReport){handleLoaded(false);if(remainingAttempts>0){// If we get a 404 to a media segment we should check the client clock again and perform a UTC sync in the background.\\ntry{if(settings.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&request.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){// Only trigger a sync if the loading failed for the first time\\nvar initialNumberOfAttempts=mediaPlayerModel.getRetryAttemptsForType(_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE);if(initialNumberOfAttempts===remainingAttempts){eventBus.trigger(_Events2.default.ATTEMPT_BACKGROUND_SYNC);}}}catch(e){}remainingAttempts--;var retryRequest={config:config};retryRequests.push(retryRequest);retryRequest.timeout=setTimeout(function(){if(retryRequests.indexOf(retryRequest)===-1){return;}else{retryRequests.splice(retryRequests.indexOf(retryRequest),1);}internalLoad(config,remainingAttempts);},mediaPlayerModel.getRetryIntervalsForType(request.type));}else{errHandler.error(new _DashJSError2.default(downloadErrorToRequestTypeMap[request.type],request.url+' is not available',{request:request,response:httpRequest.response}));if(config.error){config.error(request,'error',httpRequest.response.statusText);}if(config.complete){config.complete(request,httpRequest.response.statusText);}}}};var progress=function progress(event){var currentTime=new Date();if(firstProgress){firstProgress=false;if(!event.lengthComputable||event.lengthComputable&&event.total!==event.loaded){request.firstByteDate=currentTime;}}if(event.lengthComputable){request.bytesLoaded=event.loaded;request.bytesTotal=event.total;}if(!event.noTrace){traces.push({s:lastTraceTime,d:event.time?event.time:currentTime.getTime()-lastTraceTime.getTime(),b:[event.loaded?event.loaded-lastTraceReceivedCount:0]});lastTraceTime=currentTime;lastTraceReceivedCount=event.loaded;}if(config.progress&&event){config.progress(event);}};var onload=function onload(){if(httpRequest.response.status>=200&&httpRequest.response.status<=299){handleLoaded(true);if(config.success){config.success(httpRequest.response.response,httpRequest.response.statusText,httpRequest.response.responseURL);}if(config.complete){config.complete(request,httpRequest.response.statusText);}}};var onabort=function onabort(){if(config.abort){config.abort(request);}};var ontimeout=function ontimeout(event){var timeoutMessage=void 0;if(event.lengthComputable){var percentageComplete=event.loaded/event.total*100;timeoutMessage='Request timeout: loaded: '+event.loaded+', out of: '+event.total+' : '+percentageComplete.toFixed(3)+'% Completed';}else{timeoutMessage='Request timeout: non-computable download size';}logger.warn(timeoutMessage);};var loader=void 0;if(useFetch&&window.fetch&&request.responseType==='arraybuffer'&&request.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){loader=(0,_FetchLoader2.default)(context).create({requestModifier:requestModifier,boxParser:boxParser});}else{loader=(0,_XHRLoader2.default)(context).create({requestModifier:requestModifier});}var modifiedUrl=requestModifier.modifyRequestURL(request.url);var additionalQueryParameter=_getAdditionalQueryParameter(request);modifiedUrl=_Utils2.default.addAditionalQueryParameterToUrl(modifiedUrl,additionalQueryParameter);var verb=request.checkExistenceOnly?_HTTPRequest.HTTPRequest.HEAD:_HTTPRequest.HTTPRequest.GET;var withCredentials=mediaPlayerModel.getXHRWithCredentialsForType(request.type);httpRequest={url:modifiedUrl,method:verb,withCredentials:withCredentials,request:request,onload:onload,onend:onloadend,onerror:onloadend,progress:progress,onabort:onabort,ontimeout:ontimeout,loader:loader,timeout:requestTimeout};// Adds the ability to delay single fragment loading time to control buffer.\\nvar now=new Date().getTime();if(isNaN(request.delayLoadingTime)||now>=request.delayLoadingTime){// no delay - just send\\nrequests.push(httpRequest);loader.load(httpRequest);}else{// delay\\nvar delayedRequest={httpRequest:httpRequest};delayedRequests.push(delayedRequest);delayedRequest.delayTimeout=setTimeout(function(){if(delayedRequests.indexOf(delayedRequest)===-1){return;}else{delayedRequests.splice(delayedRequests.indexOf(delayedRequest),1);}try{requestStartTime=new Date();lastTraceTime=requestStartTime;requests.push(delayedRequest.httpRequest);loader.load(delayedRequest.httpRequest);}catch(e){delayedRequest.httpRequest.onerror();}},request.delayLoadingTime-now);}}function _getAdditionalQueryParameter(request){try{var additionalQueryParameter=[];var cmcdQueryParameter=cmcdModel.getQueryParameter(request);if(cmcdQueryParameter){additionalQueryParameter.push(cmcdQueryParameter);}return additionalQueryParameter;}catch(e){return[];}}/**\\n     * Initiates a download of the resource described by config.request\\n     * @param {Object} config - contains request (FragmentRequest or derived type), and callbacks\\n     * @memberof module:HTTPLoader\\n     * @instance\\n     */function load(config){if(config.request){internalLoad(config,mediaPlayerModel.getRetryAttemptsForType(config.request.type));}else{if(config.error){config.error(config.request,'error');}}}/**\\n     * Aborts any inflight downloads\\n     * @memberof module:HTTPLoader\\n     * @instance\\n     */function abort(){retryRequests.forEach(function(t){clearTimeout(t.timeout);// abort request in order to trigger LOADING_ABANDONED event\\nif(t.config.request&&t.config.abort){t.config.abort(t.config.request);}});retryRequests=[];delayedRequests.forEach(function(x){return clearTimeout(x.delayTimeout);});delayedRequests=[];requests.forEach(function(x){// abort will trigger onloadend which we don't want\\n// when deliberately aborting inflight requests -\\n// set them to undefined so they are not called\\nx.onloadend=x.onerror=x.onprogress=undefined;x.loader.abort(x);});requests=[];}instance={load:load,abort:abort};setup();return instance;}HTTPLoader.__dashjs_factory_name='HTTPLoader';var factory=_FactoryMaker2.default.getClassFactory(HTTPLoader);exports.default=factory;\\n//# sourceMappingURL=HTTPLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _HTTPLoader=__webpack_require__(/*! ../../streaming/net/HTTPLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js\\\");var _HTTPLoader2=_interopRequireDefault(_HTTPLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module\\n * @description Choose right url loader for scheme\\n * @ignore\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function SchemeLoaderFactory(){var instance=void 0;var schemeLoaderMap=void 0;function registerLoader(scheme,loader){schemeLoaderMap[scheme]=loader;}function unregisterLoader(scheme){if(schemeLoaderMap[scheme]){delete schemeLoaderMap[scheme];}}function unregisterAllLoader(){schemeLoaderMap={};}function getLoader(url){// iterates through schemeLoaderMap to find a loader for the scheme\\nfor(var scheme in schemeLoaderMap){if(schemeLoaderMap.hasOwnProperty(scheme)&&url.startsWith(scheme)){return schemeLoaderMap[scheme];}}return _HTTPLoader2.default;}function reset(){unregisterAllLoader();}function setup(){reset();}setup();instance={getLoader:getLoader,registerLoader:registerLoader,unregisterLoader:unregisterLoader,unregisterAllLoader:unregisterAllLoader,reset:reset};return instance;}SchemeLoaderFactory.__dashjs_factory_name='SchemeLoaderFactory';var factory=_FactoryMaker2.default.getSingletonFactory(SchemeLoaderFactory);exports.default=factory;\\n//# sourceMappingURL=SchemeLoaderFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\":\n/*!***********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SchemeLoaderFactory=__webpack_require__(/*! ../../streaming/net/SchemeLoaderFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js\\\");var _SchemeLoaderFactory2=_interopRequireDefault(_SchemeLoaderFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @class URLLoader\\n * @description  Call Offline Loader or Online Loader dependaing on URL\\n * @param {Object} cfg - dependances\\n * @ignore\\n*//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function URLLoader(cfg){cfg=cfg||{};var context=this.context;var instance=void 0,schemeLoaderFactory=void 0,loader=void 0;schemeLoaderFactory=(0,_SchemeLoaderFactory2.default)(context).getInstance();function load(config){var loaderFactory=schemeLoaderFactory.getLoader(config&&config.request?config.request.url:null);loader=loaderFactory(context).create({errHandler:cfg.errHandler,mediaPlayerModel:cfg.mediaPlayerModel,requestModifier:cfg.requestModifier,useFetch:cfg.useFetch||null,dashMetrics:cfg.dashMetrics,boxParser:cfg.boxParser?cfg.boxParser:null,constants:cfg.constants?cfg.constants:null,dashConstants:cfg.dashConstants?cfg.dashConstants:null,urlUtils:cfg.urlUtils?cfg.urlUtils:null,requestTimeout:!isNaN(cfg.requestTimeout)?cfg.requestTimeout:0,errors:cfg.errors});loader.load(config);}function abort(){if(loader){loader.abort();}}instance={load:load,abort:abort};return instance;}URLLoader.__dashjs_factory_name='URLLoader';var factory=_FactoryMaker2.default.getClassFactory(URLLoader);exports.default=factory;\\n//# sourceMappingURL=URLLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\":\n/*!***********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module XHRLoader\\n * @ignore\\n * @description Manages download of resources via HTTP.\\n * @param {Object} cfg - dependencies from parent\\n */function XHRLoader(cfg){cfg=cfg||{};var requestModifier=cfg.requestModifier;var instance=void 0;function load(httpRequest){// Variables will be used in the callback functions\\nvar requestStartTime=new Date();var request=httpRequest.request;var xhr=new XMLHttpRequest();xhr.open(httpRequest.method,httpRequest.url,true);if(request.responseType){xhr.responseType=request.responseType;}if(request.range){xhr.setRequestHeader('Range','bytes='+request.range);}if(!request.requestStartDate){request.requestStartDate=requestStartTime;}if(requestModifier){xhr=requestModifier.modifyRequestHeader(xhr);}xhr.withCredentials=httpRequest.withCredentials;xhr.onload=httpRequest.onload;xhr.onloadend=httpRequest.onend;xhr.onerror=httpRequest.onerror;xhr.onprogress=httpRequest.progress;xhr.onabort=httpRequest.onabort;xhr.ontimeout=httpRequest.ontimeout;xhr.timeout=httpRequest.timeout;xhr.send();httpRequest.response=xhr;}function abort(request){var x=request.response;x.onloadend=x.onerror=x.onprogress=undefined;//Ignore events from aborted requests.\\nx.abort();}instance={load:load,abort:abort};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */XHRLoader.__dashjs_factory_name='XHRLoader';var factory=_FactoryMaker2.default.getClassFactory(XHRLoader);exports.default=factory;\\n//# sourceMappingURL=XHRLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var CommonEncryption=function(){function CommonEncryption(){_classCallCheck(this,CommonEncryption);}_createClass(CommonEncryption,null,[{key:'findCencContentProtection',/**\\n     * Find and return the ContentProtection element in the given array\\n     * that indicates support for MPEG Common Encryption\\n     *\\n     * @param {Array} cpArray array of content protection elements\\n     * @returns {Object|null} the Common Encryption content protection element or\\n     * null if one was not found\\n     */value:function findCencContentProtection(cpArray){var retVal=null;for(var i=0;i<cpArray.length;++i){var cp=cpArray[i];if(cp.schemeIdUri.toLowerCase()==='urn:mpeg:dash:mp4protection:2011'&&(cp.value.toLowerCase()==='cenc'||cp.value.toLowerCase()==='cbcs'))retVal=cp;}return retVal;}/**\\n     * Returns just the data portion of a single PSSH\\n     *\\n     * @param {ArrayBuffer} pssh - the PSSH\\n     * @return {ArrayBuffer} data portion of the PSSH\\n     */},{key:'getPSSHData',value:function getPSSHData(pssh){var offset=8;// Box size and type fields\\nvar view=new DataView(pssh);// Read version\\nvar version=view.getUint8(offset);offset+=20;// Version (1), flags (3), system ID (16)\\nif(version>0){offset+=4+16*view.getUint32(offset);// Key ID count (4) and All key IDs (16*count)\\n}offset+=4;// Data size\\nreturn pssh.slice(offset);}/**\\n     * Returns the PSSH associated with the given key system from the concatenated\\n     * list of PSSH boxes in the given initData\\n     *\\n     * @param {KeySystem} keySystem the desired\\n     * key system\\n     * @param {ArrayBuffer} initData 'cenc' initialization data.  Concatenated list of PSSH.\\n     * @returns {ArrayBuffer|null} The PSSH box data corresponding to the given key system, null if not found\\n     * or null if a valid association could not be found.\\n     */},{key:'getPSSHForKeySystem',value:function getPSSHForKeySystem(keySystem,initData){var psshList=CommonEncryption.parsePSSHList(initData);if(keySystem&&psshList.hasOwnProperty(keySystem.uuid.toLowerCase())){return psshList[keySystem.uuid.toLowerCase()];}return null;}/**\\n     * Parse a standard common encryption PSSH which contains a simple\\n     * base64-encoding of the init data\\n     *\\n     * @param {Object} cpData the ContentProtection element\\n     * @param {BASE64} BASE64 reference\\n     * @returns {ArrayBuffer|null} the init data or null if not found\\n     */},{key:'parseInitDataFromContentProtection',value:function parseInitDataFromContentProtection(cpData,BASE64){if('pssh'in cpData){// Remove whitespaces and newlines from pssh text\\ncpData.pssh.__text=cpData.pssh.__text.replace(/\\\\r?\\\\n|\\\\r/g,'').replace(/\\\\s+/g,'');return BASE64.decodeArray(cpData.pssh.__text).buffer;}return null;}/**\\n     * Parses list of PSSH boxes into keysystem-specific PSSH data\\n     *\\n     * @param {ArrayBuffer} data - the concatenated list of PSSH boxes as provided by\\n     * CDM as initialization data when CommonEncryption content is detected\\n     * @returns {Object|Array} an object that has a property named according to each of\\n     * the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)\\n     * and a ArrayBuffer (the entire PSSH box) as the property value\\n     */},{key:'parsePSSHList',value:function parsePSSHList(data){if(data===null||data===undefined)return[];var dv=new DataView(data.buffer||data);// data.buffer first for Uint8Array support\\nvar done=false;var pssh={};// TODO: Need to check every data read for end of buffer\\nvar byteCursor=0;while(!done){var size=void 0,nextBox=void 0,version=void 0,systemID=void 0,psshDataSize=void 0;var boxStart=byteCursor;if(byteCursor>=dv.buffer.byteLength)break;/* Box size */size=dv.getUint32(byteCursor);nextBox=byteCursor+size;byteCursor+=4;/* Verify PSSH */if(dv.getUint32(byteCursor)!==0x70737368){byteCursor=nextBox;continue;}byteCursor+=4;/* Version must be 0 or 1 */version=dv.getUint8(byteCursor);if(version!==0&&version!==1){byteCursor=nextBox;continue;}byteCursor++;byteCursor+=3;/* skip flags */// 16-byte UUID/SystemID\\nsystemID='';var i=void 0,val=void 0;for(i=0;i<4;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=4;systemID+='-';for(i=0;i<2;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=2;systemID+='-';for(i=0;i<2;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=2;systemID+='-';for(i=0;i<2;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=2;systemID+='-';for(i=0;i<6;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=6;systemID=systemID.toLowerCase();/* PSSH Data Size */psshDataSize=dv.getUint32(byteCursor);byteCursor+=4;/* PSSH Data */pssh[systemID]=dv.buffer.slice(boxStart,nextBox);byteCursor=nextBox;}return pssh;}}]);return CommonEncryption;}();exports.default=CommonEncryption;\\n//# sourceMappingURL=CommonEncryption.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionController=__webpack_require__(/*! ./controllers/ProtectionController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js\\\");var _ProtectionController2=_interopRequireDefault(_ProtectionController);var _ProtectionKeyController=__webpack_require__(/*! ./controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _ProtectionEvents=__webpack_require__(/*! ./ProtectionEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js\\\");var _ProtectionEvents2=_interopRequireDefault(_ProtectionEvents);var _ProtectionErrors=__webpack_require__(/*! ./errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _ProtectionModel_21Jan=__webpack_require__(/*! ./models/ProtectionModel_21Jan2015 */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js\\\");var _ProtectionModel_21Jan2=_interopRequireDefault(_ProtectionModel_21Jan);var _ProtectionModel_3Feb=__webpack_require__(/*! ./models/ProtectionModel_3Feb2014 */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js\\\");var _ProtectionModel_3Feb2=_interopRequireDefault(_ProtectionModel_3Feb);var _ProtectionModel_01b=__webpack_require__(/*! ./models/ProtectionModel_01b */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js\\\");var _ProtectionModel_01b2=_interopRequireDefault(_ProtectionModel_01b);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var APIS_ProtectionModel_01b=[// Un-prefixed as per spec\\n{// Video Element\\ngenerateKeyRequest:'generateKeyRequest',addKey:'addKey',cancelKeyRequest:'cancelKeyRequest',// Events\\nneedkey:'needkey',keyerror:'keyerror',keyadded:'keyadded',keymessage:'keymessage'},// Webkit-prefixed (early Chrome versions and Chrome with EME disabled in chrome://flags)\\n{// Video Element\\ngenerateKeyRequest:'webkitGenerateKeyRequest',addKey:'webkitAddKey',cancelKeyRequest:'webkitCancelKeyRequest',// Events\\nneedkey:'webkitneedkey',keyerror:'webkitkeyerror',keyadded:'webkitkeyadded',keymessage:'webkitkeymessage'}];/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var APIS_ProtectionModel_3Feb2014=[// Un-prefixed as per spec\\n// Chrome 38-39 (and some earlier versions) with chrome://flags -- Enable Encrypted Media Extensions\\n{// Video Element\\nsetMediaKeys:'setMediaKeys',// MediaKeys\\nMediaKeys:'MediaKeys',// MediaKeySession\\nrelease:'close',// Events\\nneedkey:'needkey',error:'keyerror',message:'keymessage',ready:'keyadded',close:'keyclose'},// MS-prefixed (IE11, Windows 8.1)\\n{// Video Element\\nsetMediaKeys:'msSetMediaKeys',// MediaKeys\\nMediaKeys:'MSMediaKeys',// MediaKeySession\\nrelease:'close',// Events\\nneedkey:'msneedkey',error:'mskeyerror',message:'mskeymessage',ready:'mskeyadded',close:'mskeyclose'}];function Protection(){var instance=void 0;var context=this.context;/**\\n     * Create a ProtectionController and associated ProtectionModel for use with\\n     * a single piece of content.\\n     *\\n     * @param {Object} config\\n     * @return {ProtectionController} protection controller\\n     *\\n     */function createProtectionSystem(config){var controller=null;var protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();protectionKeyController.setConfig({debug:config.debug,BASE64:config.BASE64});protectionKeyController.initialize();var protectionModel=getProtectionModel(config);if(!controller&&protectionModel){//TODO add ability to set external controller if still needed at all?\\ncontroller=(0,_ProtectionController2.default)(context).create({protectionModel:protectionModel,protectionKeyController:protectionKeyController,eventBus:config.eventBus,debug:config.debug,events:config.events,BASE64:config.BASE64,constants:config.constants,cmcdModel:config.cmcdModel});config.capabilities.setEncryptedMediaSupported(true);}return controller;}function getProtectionModel(config){var debug=config.debug;var logger=debug.getLogger(instance);var eventBus=config.eventBus;var errHandler=config.errHandler;var videoElement=config.videoModel?config.videoModel.getElement():null;if((!videoElement||videoElement.onencrypted!==undefined)&&(!videoElement||videoElement.mediaKeys!==undefined)){logger.info('EME detected on this user agent! (ProtectionModel_21Jan2015)');return(0,_ProtectionModel_21Jan2.default)(context).create({debug:debug,eventBus:eventBus,events:config.events});}else if(getAPI(videoElement,APIS_ProtectionModel_3Feb2014)){logger.info('EME detected on this user agent! (ProtectionModel_3Feb2014)');return(0,_ProtectionModel_3Feb2.default)(context).create({debug:debug,eventBus:eventBus,events:config.events,api:getAPI(videoElement,APIS_ProtectionModel_3Feb2014)});}else if(getAPI(videoElement,APIS_ProtectionModel_01b)){logger.info('EME detected on this user agent! (ProtectionModel_01b)');return(0,_ProtectionModel_01b2.default)(context).create({debug:debug,eventBus:eventBus,errHandler:errHandler,events:config.events,api:getAPI(videoElement,APIS_ProtectionModel_01b)});}else{logger.warn('No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!');return null;}}function getAPI(videoElement,apis){for(var i=0;i<apis.length;i++){var api=apis[i];// detect if api is supported by browser\\n// check only first function in api -> should be fine\\nif(typeof videoElement[api[Object.keys(api)[0]]]!=='function'){continue;}return api;}return null;}instance={createProtectionSystem:createProtectionSystem};return instance;}Protection.__dashjs_factory_name='Protection';var factory=dashjs.FactoryMaker.getClassFactory(Protection);/* jshint ignore:line */factory.events=_ProtectionEvents2.default;factory.errors=_ProtectionErrors2.default;dashjs.FactoryMaker.updateClassFactory(Protection.__dashjs_factory_name,factory);/* jshint ignore:line */exports.default=factory;\\n//# sourceMappingURL=Protection.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ../../core/events/EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n  */var ProtectionEvents=function(_EventsBase){_inherits(ProtectionEvents,_EventsBase);/**\\n     * @description Public facing external events to be used when including protection package.\\n     * All public events will be aggregated into the MediaPlayerEvents Class and can be accessed\\n     * via MediaPlayer.events.  public_ is the prefix that we use to move event names to MediaPlayerEvents.\\n     */function ProtectionEvents(){_classCallCheck(this,ProtectionEvents);/**\\n         * Event ID for events delivered when the protection set receives\\n         * a key message from the CDM\\n         *\\n         * @ignore\\n         */var _this=_possibleConstructorReturn(this,(ProtectionEvents.__proto__||Object.getPrototypeOf(ProtectionEvents)).call(this));_this.INTERNAL_KEY_MESSAGE='internalKeyMessage';/**\\n         * Event ID for events delivered when a key system selection procedure\\n         * completes\\n         * @ignore\\n         */_this.INTERNAL_KEY_SYSTEM_SELECTED='internalKeySystemSelected';/**\\n         * Event ID for events delivered when the status of one decryption keys has changed\\n         * @ignore\\n         */_this.INTERNAL_KEY_STATUS_CHANGED='internalkeyStatusChanged';/**\\n         * Event ID for events delivered when a new key has been added\\n         *\\n         * @constant\\n         * @deprecated The latest versions of the EME specification no longer\\n         * use this event.  {@MediaPlayer.models.protectionModel.eventList.KEY_STATUSES_CHANGED}\\n         * is preferred.\\n         * @event ProtectionEvents#KEY_ADDED\\n         */_this.KEY_ADDED='public_keyAdded';/**\\n         * Event ID for events delivered when an error is encountered by the CDM\\n         * while processing a license server response message\\n         * @event ProtectionEvents#KEY_ERROR\\n         */_this.KEY_ERROR='public_keyError';/**\\n         * Event ID for events delivered when the protection set receives\\n         * a key message from the CDM\\n         * @event ProtectionEvents#KEY_MESSAGE\\n         */_this.KEY_MESSAGE='public_keyMessage';/**\\n         * Event ID for events delivered when a key session close\\n         * process has completed\\n         * @event ProtectionEvents#KEY_SESSION_CLOSED\\n         */_this.KEY_SESSION_CLOSED='public_keySessionClosed';/**\\n         * Event ID for events delivered when a new key sessions creation\\n         * process has completed\\n         * @event ProtectionEvents#KEY_SESSION_CREATED\\n         */_this.KEY_SESSION_CREATED='public_keySessionCreated';/**\\n         * Event ID for events delivered when a key session removal\\n         * process has completed\\n         * @event ProtectionEvents#KEY_SESSION_REMOVED\\n         */_this.KEY_SESSION_REMOVED='public_keySessionRemoved';/**\\n         * Event ID for events delivered when the status of one or more\\n         * decryption keys has changed\\n         * @event ProtectionEvents#KEY_STATUSES_CHANGED\\n         */_this.KEY_STATUSES_CHANGED='public_keyStatusesChanged';/**\\n         * Event ID for events delivered when a key system access procedure\\n         * has completed\\n         * @ignore\\n         */_this.KEY_SYSTEM_ACCESS_COMPLETE='public_keySystemAccessComplete';/**\\n         * Event ID for events delivered when a key system selection procedure\\n         * completes\\n         * @event ProtectionEvents#KEY_SYSTEM_SELECTED\\n         */_this.KEY_SYSTEM_SELECTED='public_keySystemSelected';/**\\n         * Event ID for events delivered when a license request procedure\\n         * has completed\\n         * @event ProtectionEvents#LICENSE_REQUEST_COMPLETE\\n         */_this.LICENSE_REQUEST_COMPLETE='public_licenseRequestComplete';/**\\n         * Sending a license rquest\\n         * @event ProtectionEvents#LICENSE_REQUEST_SENDING\\n         */_this.LICENSE_REQUEST_SENDING='public_licenseRequestSending';/**\\n         * Event ID for needkey/encrypted events\\n         * @ignore\\n         */_this.NEED_KEY='needkey';/**\\n         * Event ID for events delivered when the Protection system is detected and created.\\n         * @event ProtectionEvents#PROTECTION_CREATED\\n         */_this.PROTECTION_CREATED='public_protectioncreated';/**\\n         * Event ID for events delivered when the Protection system is destroyed.\\n         * @event ProtectionEvents#PROTECTION_DESTROYED\\n         */_this.PROTECTION_DESTROYED='public_protectiondestroyed';/**\\n         * Event ID for events delivered when a new server certificate has\\n         * been delivered to the CDM\\n         * @ignore\\n         */_this.SERVER_CERTIFICATE_UPDATED='serverCertificateUpdated';/**\\n         * Event ID for events delivered when the process of shutting down\\n         * a protection set has completed\\n         * @ignore\\n         */_this.TEARDOWN_COMPLETE='protectionTeardownComplete';/**\\n         * Event ID for events delivered when a HTMLMediaElement has been\\n         * associated with the protection set\\n         * @ignore\\n         */_this.VIDEO_ELEMENT_SELECTED='videoElementSelected';return _this;}return ProtectionEvents;}(_EventsBase3.default);var protectionEvents=new ProtectionEvents();exports.default=protectionEvents;\\n//# sourceMappingURL=ProtectionEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js\":\n/*!*****************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js ***!\n  \\*****************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _MediaCapability=__webpack_require__(/*! ../vo/MediaCapability */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js\\\");var _MediaCapability2=_interopRequireDefault(_MediaCapability);var _KeySystemConfiguration=__webpack_require__(/*! ../vo/KeySystemConfiguration */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\\\");var _KeySystemConfiguration2=_interopRequireDefault(_KeySystemConfiguration);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _LicenseRequest=__webpack_require__(/*! ../vo/LicenseRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js\\\");var _LicenseRequest2=_interopRequireDefault(_LicenseRequest);var _LicenseResponse=__webpack_require__(/*! ../vo/LicenseResponse */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js\\\");var _LicenseResponse2=_interopRequireDefault(_LicenseResponse);var _HTTPRequest=__webpack_require__(/*! ../../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _Utils=__webpack_require__(/*! ../../../core/Utils */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var NEEDKEY_BEFORE_INITIALIZE_RETRIES=5;var NEEDKEY_BEFORE_INITIALIZE_TIMEOUT=500;var LICENSE_SERVER_REQUEST_RETRIES=3;var LICENSE_SERVER_REQUEST_RETRY_INTERVAL=1000;var LICENSE_SERVER_REQUEST_DEFAULT_TIMEOUT=8000;/**\\n * @module ProtectionController\\n * @description Provides access to media protection information and functionality.  Each\\n * ProtectionController manages a single {@link MediaPlayer.models.ProtectionModel}\\n * which encapsulates a set of protection information (EME APIs, selected key system,\\n * key sessions).  The APIs of ProtectionController mostly align with the latest EME\\n * APIs.  Key system selection is mostly automated when combined with app-overrideable\\n * functionality provided in {@link ProtectionKeyController}.\\n * @todo ProtectionController does almost all of its tasks automatically after init() is\\n * called.  Applications might want more control over this process and want to go through\\n * each step manually (key system selection, session creation, session maintenance).\\n * @param {Object} config\\n */function ProtectionController(config){config=config||{};var protectionKeyController=config.protectionKeyController;var protectionModel=config.protectionModel;var eventBus=config.eventBus;var events=config.events;var debug=config.debug;var BASE64=config.BASE64;var constants=config.constants;var needkeyRetries=[];var cmcdModel=config.cmcdModel;var instance=void 0,logger=void 0,pendingNeedKeyData=void 0,mediaInfoArr=void 0,protDataSet=void 0,sessionType=void 0,robustnessLevel=void 0,keySystem=void 0,licenseRequestFilters=void 0,licenseResponseFilters=void 0;function setup(){logger=debug.getLogger(instance);pendingNeedKeyData=[];mediaInfoArr=[];sessionType='temporary';robustnessLevel='';licenseRequestFilters=[];licenseResponseFilters=[];}function checkConfig(){if(!eventBus||!eventBus.hasOwnProperty('on')||!protectionKeyController||!protectionKeyController.hasOwnProperty('getSupportedKeySystemsFromContentProtection')){throw new Error('Missing config parameter(s)');}}/**\\n     * Initialize this protection system with a given audio\\n     * or video stream information.\\n     *\\n     * @param {StreamInfo} [mediaInfo] Media information\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @todo This API will change when we have better support for allowing applications\\n     * to select different adaptation sets for playback.  Right now it is clunky for\\n     * applications to create {@link StreamInfo} with the right information,\\n     * @ignore\\n     */function initializeForMedia(mediaInfo){// Not checking here if a session for similar KS/KID combination is already created\\n// because still don't know which keysystem will be selected.\\n// Once Keysystem is selected and before creating the session, we will do that check\\n// so we create the strictly necessary DRM sessions\\nif(!mediaInfo){throw new Error('mediaInfo can not be null or undefined');}checkConfig();eventBus.on(events.INTERNAL_KEY_MESSAGE,onKeyMessage,this);eventBus.on(events.INTERNAL_KEY_STATUS_CHANGED,onKeyStatusChanged,this);mediaInfoArr.push(mediaInfo);// ContentProtection elements are specified at the AdaptationSet level, so the CP for audio\\n// and video will be the same.  Just use one valid MediaInfo object\\nvar supportedKS=protectionKeyController.getSupportedKeySystemsFromContentProtection(mediaInfo.contentProtection);if(supportedKS&&supportedKS.length>0){selectKeySystem(supportedKS,true);}}/**\\n     * Removes all entries from the mediaInfoArr array for a specific stream id\\n     * @param {String} streamId\\n     */function clearMediaInfoArrayByStreamId(streamId){mediaInfoArr=mediaInfoArr.filter(function(mediaInfo){return mediaInfo.streamInfo.id!==streamId;});}/**\\n     * Returns a set of supported key systems and CENC initialization data\\n     * from the given array of ContentProtection elements.  Only\\n     * key systems that are supported by this player will be returned.\\n     * Key systems are returned in priority order (highest first).\\n     *\\n     * @param {Array.<Object>} cps - array of content protection elements parsed\\n     * from the manifest\\n     * @returns {Array.<Object>} array of objects indicating which supported key\\n     * systems were found.  Empty array is returned if no\\n     * supported key systems were found\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     * @ignore\\n     */function getSupportedKeySystemsFromContentProtection(cps){checkConfig();return protectionKeyController.getSupportedKeySystemsFromContentProtection(cps);}/**\\n     * Create a new key session associated with the given initialization data from\\n     * the MPD or from the PSSH box in the media\\n     *\\n     * @param {ArrayBuffer} initData the initialization data\\n     * @param {Uint8Array} cdmData the custom data to provide to licenser\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionCreated\\n     * @todo In older versions of the EME spec, there was a one-to-one relationship between\\n     * initialization data and key sessions.  That is no longer true in the latest APIs.  This\\n     * API will need to modified (and a new \\\"generateRequest(keySession, initData)\\\" API created)\\n     * to come up to speed with the latest EME standard\\n     * @ignore\\n     */function createKeySession(initData,cdmData){var initDataForKS=_CommonEncryption2.default.getPSSHForKeySystem(keySystem,initData);var protData=getProtData(keySystem);if(initDataForKS){// Check for duplicate initData\\nif(_isInitDataDuplicate(initDataForKS)){return;}try{protectionModel.createKeySession(initDataForKS,protData,getSessionType(keySystem),cdmData);}catch(error){eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+error.message)});}}else if(initData){protectionModel.createKeySession(initData,protData,getSessionType(keySystem),cdmData);}else{eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Selected key system is '+(keySystem?keySystem.systemString:null)+'.  needkey/encrypted event contains no initData corresponding to that key system!')});}}/**\\n     * Checks if the provided init data is equal to one of the existing init data values\\n     * @param {any} initDataForKS\\n     * @return {boolean}\\n     * @private\\n     */function _isInitDataDuplicate(initDataForKS){if(!initDataForKS){return false;}try{var currentInitData=protectionModel.getAllInitData();for(var i=0;i<currentInitData.length;i++){if(protectionKeyController.initDataEquals(initDataForKS,currentInitData[i])){logger.debug('DRM: Ignoring initData because we have already seen it!');return true;}}return false;}catch(e){return false;}}/**\\n     * Loads a key session with the given session ID from persistent storage.  This\\n     * essentially creates a new key session\\n     *\\n     * @param {string} sessionID\\n     * @param {string} initData\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionCreated\\n     * @ignore\\n     */function loadKeySession(sessionID,initData){checkConfig();protectionModel.loadKeySession(sessionID,initData,getSessionType(keySystem));}/**\\n     * Removes the given key session from persistent storage and closes the session\\n     * as if {@link ProtectionController#closeKeySession}\\n     * was called\\n     *\\n     * @param {SessionToken} sessionToken the session\\n     * token\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionRemoved\\n     * @fires ProtectionController#KeySessionClosed\\n     * @ignore\\n     */function removeKeySession(sessionToken){checkConfig();protectionModel.removeKeySession(sessionToken);}/**\\n     * Closes the key session and releases all associated decryption keys.  These\\n     * keys will no longer be available for decrypting media\\n     *\\n     * @param {SessionToken} sessionToken the session\\n     * token\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionClosed\\n     * @ignore\\n     */function closeKeySession(sessionToken){checkConfig();protectionModel.closeKeySession(sessionToken);}/**\\n     * Sets a server certificate for use by the CDM when signing key messages\\n     * intended for a particular license server.  This will fire\\n     * an error event if a key system has not yet been selected.\\n     *\\n     * @param {ArrayBuffer} serverCertificate a CDM-specific license server\\n     * certificate\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#ServerCertificateUpdated\\n     */function setServerCertificate(serverCertificate){checkConfig();protectionModel.setServerCertificate(serverCertificate);}/**\\n     * Associate this protection system with the given HTMLMediaElement.  This\\n     * causes the system to register for needkey/encrypted events from the given\\n     * element and provides a destination for setting of MediaKeys\\n     *\\n     * @param {HTMLMediaElement} element the media element to which the protection\\n     * system should be associated\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function setMediaElement(element){checkConfig();if(element){protectionModel.setMediaElement(element);eventBus.on(events.NEED_KEY,onNeedKey,this);}else if(element===null){protectionModel.setMediaElement(element);eventBus.off(events.NEED_KEY,onNeedKey,this);}}/**\\n     * Sets the session type to use when creating key sessions.  Either \\\"temporary\\\" or\\n     * \\\"persistent-license\\\".  Default is \\\"temporary\\\".\\n     *\\n     * @param {string} value the session type\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function setSessionType(value){sessionType=value;}/**\\n     * Sets the robustness level for video and audio capabilities. Optional to remove Chrome warnings.\\n     * Possible values are SW_SECURE_CRYPTO, SW_SECURE_DECODE, HW_SECURE_CRYPTO, HW_SECURE_CRYPTO, HW_SECURE_DECODE, HW_SECURE_ALL.\\n     *\\n     * @param {string} level the robustness level\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function setRobustnessLevel(level){robustnessLevel=level;}/**\\n     * Attach KeySystem-specific data to use for license acquisition with EME\\n     *\\n     * @param {Object} data an object containing property names corresponding to\\n     * key system name strings (e.g. \\\"org.w3.clearkey\\\") and associated values\\n     * being instances of {@link ProtectionData}\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @ignore\\n     */function setProtectionData(data){protDataSet=data;protectionKeyController.setProtectionData(data);}/**\\n     * Stop method is called when current playback is stopped/resetted.\\n     *\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function stop(){if(protectionModel){protectionModel.stop();}}/**\\n     * Destroys all protection data associated with this protection set.  This includes\\n     * deleting all key sessions. In the case of persistent key sessions, the sessions\\n     * will simply be unloaded and not deleted.  Additionally, if this protection set is\\n     * associated with a HTMLMediaElement, it will be detached from that element.\\n     *\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @ignore\\n     */function reset(){checkConfig();licenseRequestFilters=[];licenseResponseFilters=[];eventBus.off(events.INTERNAL_KEY_MESSAGE,onKeyMessage,this);eventBus.off(events.INTERNAL_KEY_STATUS_CHANGED,onKeyStatusChanged,this);setMediaElement(null);keySystem=undefined;if(protectionModel){protectionModel.reset();protectionModel=null;}needkeyRetries.forEach(function(retryTimeout){return clearTimeout(retryTimeout);});needkeyRetries=[];mediaInfoArr=[];}///////////////\\n// Private\\n///////////////\\nfunction getProtData(keySystem){var protData=null;if(keySystem){var keySystemString=keySystem.systemString;if(protDataSet){protData=keySystemString in protDataSet?protDataSet[keySystemString]:null;}}return protData;}function getKeySystemConfiguration(keySystem){var protData=getProtData(keySystem);var audioCapabilities=[];var videoCapabilities=[];var audioRobustness=protData&&protData.audioRobustness&&protData.audioRobustness.length>0?protData.audioRobustness:robustnessLevel;var videoRobustness=protData&&protData.videoRobustness&&protData.videoRobustness.length>0?protData.videoRobustness:robustnessLevel;var ksSessionType=getSessionType(keySystem);var distinctiveIdentifier=protData&&protData.distinctiveIdentifier?protData.distinctiveIdentifier:'optional';var persistentState=protData&&protData.persistentState?protData.persistentState:ksSessionType==='temporary'?'optional':'required';mediaInfoArr.forEach(function(media){if(media.type===constants.AUDIO){audioCapabilities.push(new _MediaCapability2.default(media.codec,audioRobustness));}else if(media.type===constants.VIDEO){videoCapabilities.push(new _MediaCapability2.default(media.codec,videoRobustness));}});return new _KeySystemConfiguration2.default(audioCapabilities,videoCapabilities,distinctiveIdentifier,persistentState,[ksSessionType]);}function getSessionType(keySystem){var protData=getProtData(keySystem);var ksSessionType=protData&&protData.sessionType?protData.sessionType:sessionType;return ksSessionType;}function selectKeySystem(supportedKS,fromManifest){// Reorder key systems according to priority order provided in protectionData\\nsupportedKS=supportedKS.sort(function(ksA,ksB){var indexA=protDataSet&&protDataSet[ksA.ks.systemString]&&protDataSet[ksA.ks.systemString].priority>=0?protDataSet[ksA.ks.systemString].priority:supportedKS.length;var indexB=protDataSet&&protDataSet[ksB.ks.systemString]&&protDataSet[ksB.ks.systemString].priority>=0?protDataSet[ksB.ks.systemString].priority:supportedKS.length;return indexA-indexB;});// First time, so we need to select a key system\\nif(keySystem===undefined){_selectInitialKeySystem(supportedKS,fromManifest);}// We already selected a key system. we only need to trigger a new license exchange if the init data has changed\\nelse if(keySystem){_selectWithExistingKeySystem(supportedKS,fromManifest);}// We are in the process of selecting a key system, so just save the data which might be coming from additional AdaptationSets.\\nelse{pendingNeedKeyData.push(supportedKS);}}function _selectWithExistingKeySystem(supportedKS,fromManifest){var self=this;var requestedKeySystems=[];var ksIdx=supportedKS.findIndex(function(entry){return entry.ks===keySystem;});if(ksIdx===-1||!supportedKS[ksIdx].initData){return;}//  we only need to call this if the init data has changed\\nvar initDataForKs=_CommonEncryption2.default.getPSSHForKeySystem(keySystem,supportedKS[ksIdx].initData);if(_isInitDataDuplicate(initDataForKs)){return;}requestedKeySystems.push({ks:supportedKS[ksIdx].ks,configs:[getKeySystemConfiguration(keySystem)]});// Ensure that we would be granted key system access using the key\\n// system and codec information\\nvar onKeySystemAccessComplete=function onKeySystemAccessComplete(event){eventBus.off(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);if(event.error){if(!fromManifest){eventBus.trigger(events.KEY_SYSTEM_SELECTED,{error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+event.error)});}}else{logger.info('DRM: KeySystem Access Granted');eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:event.data});var protData=getProtData(keySystem);if(protectionKeyController.isClearKey(keySystem)){// For Clearkey: if parameters for generating init data was provided by the user, use them for generating\\n// initData and overwrite possible initData indicated in encrypted event (EME)\\nif(protData&&protData.hasOwnProperty('clearkeys')){var initData={kids:Object.keys(protData.clearkeys)};supportedKS[ksIdx].initData=new TextEncoder().encode(JSON.stringify(initData));}}if(supportedKS[ksIdx].sessionId){// Load MediaKeySession with sessionId\\nloadKeySession(supportedKS[ksIdx].sessionId,supportedKS[ksIdx].initData);}else if(supportedKS[ksIdx].initData){// Create new MediaKeySession with initData\\ncreateKeySession(supportedKS[ksIdx].initData,supportedKS[ksIdx].cdmData);}}};eventBus.on(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);protectionModel.requestKeySystemAccess(requestedKeySystems);}function _selectInitialKeySystem(supportedKS,fromManifest){var self=this;var requestedKeySystems=[];var ksIdx=void 0;// First time through, so we need to select a key system\\nkeySystem=null;pendingNeedKeyData.push(supportedKS);// Add all key systems to our request list since we have yet to select a key system\\nfor(var i=0;i<supportedKS.length;i++){requestedKeySystems.push({ks:supportedKS[i].ks,configs:[getKeySystemConfiguration(supportedKS[i].ks)]});}var keySystemAccess=void 0;var onKeySystemAccessComplete=function onKeySystemAccessComplete(event){eventBus.off(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);if(event.error){keySystem=undefined;eventBus.off(events.INTERNAL_KEY_SYSTEM_SELECTED,onKeySystemSelected,self);if(!fromManifest){eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+event.error)});}}else{keySystemAccess=event.data;logger.info('DRM: KeySystem Access Granted ('+keySystemAccess.keySystem.systemString+')!  Selecting key system...');protectionModel.selectKeySystem(keySystemAccess);}};var onKeySystemSelected=function onKeySystemSelected(event){eventBus.off(events.INTERNAL_KEY_SYSTEM_SELECTED,onKeySystemSelected,self);eventBus.off(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);if(!event.error){if(!protectionModel){return;}keySystem=protectionModel.getKeySystem();eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:keySystemAccess});// Set server certificate from protData\\nvar protData=getProtData(keySystem);if(protData&&protData.serverCertificate&&protData.serverCertificate.length>0){protectionModel.setServerCertificate(BASE64.decodeArray(protData.serverCertificate).buffer);}// Create key session for the remaining AdaptationSets which have been added to pendingNeedKeyData\\nfor(var _i=0;_i<pendingNeedKeyData.length;_i++){for(ksIdx=0;ksIdx<pendingNeedKeyData[_i].length;ksIdx++){if(keySystem===pendingNeedKeyData[_i][ksIdx].ks){if(protectionKeyController.isClearKey(keySystem)){// For Clearkey: if parameters for generating init data was provided by the user, use them for generating\\n// initData and overwrite possible initData indicated in encrypted event (EME)\\nif(protData&&protData.hasOwnProperty('clearkeys')){var initData={kids:Object.keys(protData.clearkeys)};pendingNeedKeyData[_i][ksIdx].initData=new TextEncoder().encode(JSON.stringify(initData));}}if(pendingNeedKeyData[_i][ksIdx].sessionId){// Load MediaKeySession with sessionId\\nloadKeySession(pendingNeedKeyData[_i][ksIdx].sessionId,pendingNeedKeyData[_i][ksIdx].initData);}else if(pendingNeedKeyData[_i][ksIdx].initData!==null){// Create new MediaKeySession with initData\\ncreateKeySession(pendingNeedKeyData[_i][ksIdx].initData,pendingNeedKeyData[_i][ksIdx].cdmData);}break;}}}}else{keySystem=undefined;if(!fromManifest){eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+'Error selecting key system! -- '+event.error)});}}};eventBus.on(events.INTERNAL_KEY_SYSTEM_SELECTED,onKeySystemSelected,self);eventBus.on(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);protectionModel.requestKeySystemAccess(requestedKeySystems);}function sendLicenseRequestCompleteEvent(data,error){eventBus.trigger(events.LICENSE_REQUEST_COMPLETE,{data:data,error:error});}function onKeyStatusChanged(e){if(e.error){eventBus.trigger(events.KEY_STATUSES_CHANGED,{data:null,error:e.error});}else{logger.debug('DRM: key status = '+e.status);}}function onKeyMessage(e){logger.debug('DRM: onKeyMessage');// Dispatch event to applications indicating we received a key message\\nvar keyMessage=e.data;eventBus.trigger(events.KEY_MESSAGE,{data:keyMessage});var messageType=keyMessage.messageType?keyMessage.messageType:'license-request';var message=keyMessage.message;var sessionToken=keyMessage.sessionToken;var protData=getProtData(keySystem);var keySystemString=keySystem?keySystem.systemString:null;var licenseServerData=protectionKeyController.getLicenseServer(keySystem,protData,messageType);var eventData={sessionToken:sessionToken,messageType:messageType};// Ensure message from CDM is not empty\\nif(!message||message.byteLength===0){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE));return;}// Message not destined for license server\\nif(!licenseServerData){logger.debug('DRM: License server request not required for this message (type = '+e.data.messageType+').  Session ID = '+sessionToken.getSessionID());sendLicenseRequestCompleteEvent(eventData);return;}// Perform any special handling for ClearKey\\nif(protectionKeyController.isClearKey(keySystem)){var clearkeys=protectionKeyController.processClearKeyLicenseRequest(keySystem,protData,message);if(clearkeys){logger.debug('DRM: ClearKey license request handled by application!');sendLicenseRequestCompleteEvent(eventData);protectionModel.updateKeySession(sessionToken,clearkeys);return;}}// All remaining key system scenarios require a request to a remote license server\\n// Determine license server URL\\nvar url=null;if(protData&&protData.serverURL){var serverURL=protData.serverURL;if(typeof serverURL==='string'&&serverURL!==''){url=serverURL;}else if((typeof serverURL==='undefined'?'undefined':_typeof(serverURL))==='object'&&serverURL.hasOwnProperty(messageType)){url=serverURL[messageType];}}else if(protData&&protData.laURL&&protData.laURL!==''){// TODO: Deprecated!\\nurl=protData.laURL;}else{// For clearkey use the url defined in the manifest\\nif(protectionKeyController.isClearKey(keySystem)){url=keySystem.getLicenseServerUrlFromMediaInfo(mediaInfoArr);}else{var psshData=_CommonEncryption2.default.getPSSHData(sessionToken.initData);url=keySystem.getLicenseServerURLFromInitData(psshData);if(!url){url=e.data.laURL;}}}// Possibly update or override the URL based on the message\\nurl=licenseServerData.getServerURLFromMessage(url,message,messageType);// Ensure valid license server URL\\nif(!url){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));return;}// Set optional XMLHttpRequest headers from protection data and message\\nvar reqHeaders={};var withCredentials=false;var updateHeaders=function updateHeaders(headers){if(headers){for(var key in headers){if('authorization'===key.toLowerCase()){withCredentials=true;}reqHeaders[key]=headers[key];}}};if(protData){updateHeaders(protData.httpRequestHeaders);}updateHeaders(keySystem.getRequestHeadersFromMessage(message));// Overwrite withCredentials property from protData if present\\nif(protData&&typeof protData.withCredentials=='boolean'){withCredentials=protData.withCredentials;}var reportError=function reportError(xhr,eventData,keySystemString,messageType){var errorMsg=xhr.response?licenseServerData.getErrorResponse(xhr.response,keySystemString,messageType):'NONE';sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+keySystemString+' update, XHR complete. status is \\\"'+xhr.statusText+'\\\" ('+xhr.status+'), readyState is '+xhr.readyState+'.  Response is '+errorMsg));};var onLoad=function onLoad(xhr){if(!protectionModel){return;}if(xhr.status===200){var licenseResponse=new _LicenseResponse2.default(xhr.responseURL,_Utils2.default.parseHttpHeaders(xhr.getAllResponseHeaders?xhr.getAllResponseHeaders():null),xhr.response);applyFilters(licenseResponseFilters,licenseResponse).then(function(){var licenseMessage=licenseServerData.getLicenseMessage(licenseResponse.data,keySystemString,messageType);if(licenseMessage!==null){sendLicenseRequestCompleteEvent(eventData);protectionModel.updateKeySession(sessionToken,licenseMessage);}else{reportError(xhr,eventData,keySystemString,messageType);}});}else{reportError(xhr,eventData,keySystemString,messageType);}};var onAbort=function onAbort(xhr){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+keySystemString+' update, XHR aborted. status is \\\"'+xhr.statusText+'\\\" ('+xhr.status+'), readyState is '+xhr.readyState));};var onError=function onError(xhr){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+keySystemString+' update, XHR error. status is \\\"'+xhr.statusText+'\\\" ('+xhr.status+'), readyState is '+xhr.readyState));};var reqPayload=keySystem.getLicenseRequestFromMessage(message);var reqMethod=licenseServerData.getHTTPMethod(messageType);var responseType=licenseServerData.getResponseType(keySystemString,messageType);var timeout=protData&&!isNaN(protData.httpTimeout)?protData.httpTimeout:LICENSE_SERVER_REQUEST_DEFAULT_TIMEOUT;var sessionId=sessionToken.getSessionID()||null;var licenseRequest=new _LicenseRequest2.default(url,reqMethod,responseType,reqHeaders,withCredentials,messageType,sessionId,reqPayload);applyFilters(licenseRequestFilters,licenseRequest).then(function(){doLicenseRequest(licenseRequest,LICENSE_SERVER_REQUEST_RETRIES,timeout,onLoad,onAbort,onError);});}// Implement license requests with a retry mechanism to avoid temporary network issues to affect playback experience\\nfunction doLicenseRequest(request,retriesCount,timeout,onLoad,onAbort,onError){var xhr=new XMLHttpRequest();var cmcdParams=cmcdModel.getQueryParameter({url:request.url,type:_HTTPRequest.HTTPRequest.LICENSE});if(cmcdParams){request.url=_Utils2.default.addAditionalQueryParameterToUrl(request.url,[cmcdParams]);}xhr.open(request.method,request.url,true);xhr.responseType=request.responseType;xhr.withCredentials=request.withCredentials;if(timeout>0){xhr.timeout=timeout;}for(var key in request.headers){xhr.setRequestHeader(key,request.headers[key]);}var retryRequest=function retryRequest(){// fail silently and retry\\nretriesCount--;setTimeout(function(){doLicenseRequest(request,retriesCount,timeout,onLoad,onAbort,onError);},LICENSE_SERVER_REQUEST_RETRY_INTERVAL);};xhr.onload=function(){if(this.status===200||retriesCount<=0){onLoad(this);}else{logger.warn('License request failed ('+this.status+'). Retrying it... Pending retries: '+retriesCount);retryRequest();}};xhr.ontimeout=xhr.onerror=function(){if(retriesCount<=0){onError(this);}else{logger.warn('License request network request failed . Retrying it... Pending retries: '+retriesCount);retryRequest();}};xhr.onabort=function(){onAbort(this);};// deprecated, to be removed\\neventBus.trigger(events.LICENSE_REQUEST_SENDING,{url:request.url,headers:request.headers,payload:request.data,sessionId:request.sessionId});xhr.send(request.data);}function onNeedKey(event,retry){logger.debug('DRM: onNeedKey');// Ignore non-cenc initData\\nif(event.key.initDataType!=='cenc'){logger.warn('DRM:  Only \\\\'cenc\\\\' initData is supported!  Ignoring initData of type: '+event.key.initDataType);return;}if(mediaInfoArr.length===0){logger.warn('DRM: onNeedKey called before initializeForMedia, wait until initialized');retry=typeof retry==='undefined'?1:retry+1;if(retry<NEEDKEY_BEFORE_INITIALIZE_RETRIES){needkeyRetries.push(setTimeout(function(){onNeedKey(event,retry);},NEEDKEY_BEFORE_INITIALIZE_TIMEOUT));return;}}// Some browsers return initData as Uint8Array (IE), some as ArrayBuffer (Chrome).\\n// Convert to ArrayBuffer\\nvar abInitData=event.key.initData;if(ArrayBuffer.isView(abInitData)){abInitData=abInitData.buffer;}// If key system has already been selected and initData already seen, then do nothing\\nif(keySystem){var initDataForKS=_CommonEncryption2.default.getPSSHForKeySystem(keySystem,abInitData);if(initDataForKS){// Check for duplicate initData\\nif(_isInitDataDuplicate(initDataForKS)){return;}}}logger.debug('DRM: initData:',String.fromCharCode.apply(null,new Uint8Array(abInitData)));var supportedKS=protectionKeyController.getSupportedKeySystems(abInitData,protDataSet);if(supportedKS.length===0){logger.debug('DRM: Received needkey event with initData, but we don\\\\'t support any of the key systems!');return;}selectKeySystem(supportedKS,false);}function getKeySystems(){return protectionKeyController?protectionKeyController.getKeySystems():[];}function setKeySystems(keySystems){if(protectionKeyController){protectionKeyController.setKeySystems(keySystems);}}function setLicenseRequestFilters(filters){licenseRequestFilters=filters;}function setLicenseResponseFilters(filters){licenseResponseFilters=filters;}function applyFilters(filters,param){if(!filters)return Promise.resolve();return filters.reduce(function(prev,next){return prev.then(function(){return next(param);});},Promise.resolve());}instance={initializeForMedia:initializeForMedia,clearMediaInfoArrayByStreamId:clearMediaInfoArrayByStreamId,createKeySession:createKeySession,loadKeySession:loadKeySession,removeKeySession:removeKeySession,closeKeySession:closeKeySession,setServerCertificate:setServerCertificate,setMediaElement:setMediaElement,setSessionType:setSessionType,setRobustnessLevel:setRobustnessLevel,setProtectionData:setProtectionData,getSupportedKeySystemsFromContentProtection:getSupportedKeySystemsFromContentProtection,getKeySystems:getKeySystems,setKeySystems:setKeySystems,setLicenseRequestFilters:setLicenseRequestFilters,setLicenseResponseFilters:setLicenseResponseFilters,stop:stop,reset:reset};setup();return instance;}ProtectionController.__dashjs_factory_name='ProtectionController';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionController);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\":\n/*!********************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js ***!\n  \\********************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CommonEncryption=__webpack_require__(/*! ./../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _KeySystemClearKey=__webpack_require__(/*! ./../drm/KeySystemClearKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js\\\");var _KeySystemClearKey2=_interopRequireDefault(_KeySystemClearKey);var _KeySystemW3CClearKey=__webpack_require__(/*! ./../drm/KeySystemW3CClearKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js\\\");var _KeySystemW3CClearKey2=_interopRequireDefault(_KeySystemW3CClearKey);var _KeySystemWidevine=__webpack_require__(/*! ./../drm/KeySystemWidevine */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js\\\");var _KeySystemWidevine2=_interopRequireDefault(_KeySystemWidevine);var _KeySystemPlayReady=__webpack_require__(/*! ./../drm/KeySystemPlayReady */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js\\\");var _KeySystemPlayReady2=_interopRequireDefault(_KeySystemPlayReady);var _DRMToday=__webpack_require__(/*! ./../servers/DRMToday */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js\\\");var _DRMToday2=_interopRequireDefault(_DRMToday);var _PlayReady=__webpack_require__(/*! ./../servers/PlayReady */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js\\\");var _PlayReady2=_interopRequireDefault(_PlayReady);var _Widevine=__webpack_require__(/*! ./../servers/Widevine */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js\\\");var _Widevine2=_interopRequireDefault(_Widevine);var _ClearKey=__webpack_require__(/*! ./../servers/ClearKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js\\\");var _ClearKey2=_interopRequireDefault(_ClearKey);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module ProtectionKeyController\\n * @ignore\\n * @description Media protection key system functionality that can be modified/overridden by applications\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ProtectionKeyController(){var context=this.context;var instance=void 0,debug=void 0,logger=void 0,keySystems=void 0,BASE64=void 0,clearkeyKeySystem=void 0,clearkeyW3CKeySystem=void 0;function setConfig(config){if(!config)return;if(config.debug){debug=config.debug;logger=debug.getLogger(instance);}if(config.BASE64){BASE64=config.BASE64;}}function initialize(){keySystems=[];var keySystem=void 0;// PlayReady\\nkeySystem=(0,_KeySystemPlayReady2.default)(context).getInstance({BASE64:BASE64});keySystems.push(keySystem);// Widevine\\nkeySystem=(0,_KeySystemWidevine2.default)(context).getInstance({BASE64:BASE64});keySystems.push(keySystem);// ClearKey\\nkeySystem=(0,_KeySystemClearKey2.default)(context).getInstance({BASE64:BASE64});keySystems.push(keySystem);clearkeyKeySystem=keySystem;// W3C ClearKey\\nkeySystem=(0,_KeySystemW3CClearKey2.default)(context).getInstance({BASE64:BASE64,debug:debug});keySystems.push(keySystem);clearkeyW3CKeySystem=keySystem;}/**\\n     * Returns a prioritized list of key systems supported\\n     * by this player (not necessarily those supported by the\\n     * user agent)\\n     *\\n     * @returns {Array.<KeySystem>} a prioritized\\n     * list of key systems\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getKeySystems(){return keySystems;}/**\\n     * Sets the prioritized list of key systems to be supported\\n     * by this player.\\n     *\\n     * @param {Array.<KeySystem>} newKeySystems the new prioritized\\n     * list of key systems\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function setKeySystems(newKeySystems){keySystems=newKeySystems;}/**\\n     * Returns the key system associated with the given key system string\\n     * name (i.e. 'org.w3.clearkey')\\n     *\\n     * @param {string} systemString the system string\\n     * @returns {KeySystem|null} the key system\\n     * or null if no supported key system is associated with the given key\\n     * system string\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getKeySystemBySystemString(systemString){for(var i=0;i<keySystems.length;i++){if(keySystems[i].systemString===systemString){return keySystems[i];}}return null;}/**\\n     * Determines whether the given key system is ClearKey.  This is\\n     * necessary because the EME spec defines ClearKey and its method\\n     * for providing keys to the key session; and this method has changed\\n     * between the various API versions.  Our EME-specific ProtectionModels\\n     * must know if the system is ClearKey so that it can format the keys\\n     * according to the particular spec version.\\n     *\\n     * @param {Object} keySystem the key\\n     * @returns {boolean} true if this is the ClearKey key system, false\\n     * otherwise\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function isClearKey(keySystem){return keySystem===clearkeyKeySystem||keySystem===clearkeyW3CKeySystem;}/**\\n     * Check equality of initData array buffers.\\n     *\\n     * @param {ArrayBuffer} initData1 - first initData\\n     * @param {ArrayBuffer} initData2 - second initData\\n     * @returns {boolean} true if the initData arrays are equal in size and\\n     * contents, false otherwise\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function initDataEquals(initData1,initData2){if(initData1.byteLength===initData2.byteLength){var data1=new Uint8Array(initData1);var data2=new Uint8Array(initData2);for(var j=0;j<data1.length;j++){if(data1[j]!==data2[j]){return false;}}return true;}return false;}/**\\n     * Returns a set of supported key systems and CENC initialization data\\n     * from the given array of ContentProtection elements.  Only\\n     * key systems that are supported by this player will be returned.\\n     * Key systems are returned in priority order (highest first).\\n     *\\n     * @param {Array.<Object>} cps - array of content protection elements parsed\\n     * from the manifest\\n     * @returns {Array.<Object>} array of objects indicating which supported key\\n     * systems were found.  Empty array is returned if no\\n     * supported key systems were found\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getSupportedKeySystemsFromContentProtection(cps){var cp=void 0,ks=void 0,ksIdx=void 0,cpIdx=void 0;var supportedKS=[];if(cps){var cencContentProtection=_CommonEncryption2.default.findCencContentProtection(cps);for(ksIdx=0;ksIdx<keySystems.length;++ksIdx){ks=keySystems[ksIdx];for(cpIdx=0;cpIdx<cps.length;++cpIdx){cp=cps[cpIdx];if(cp.schemeIdUri.toLowerCase()===ks.schemeIdURI){// Look for DRM-specific ContentProtection\\nvar initData=ks.getInitData(cp,cencContentProtection);supportedKS.push({ks:keySystems[ksIdx],initData:initData,cdmData:ks.getCDMData(),sessionId:ks.getSessionId(cp)});}}}}return supportedKS;}/**\\n     * Returns key systems supported by this player for the given PSSH\\n     * initializationData. Only key systems supported by this player\\n     * that have protection data present will be returned.  Key systems are returned in priority order\\n     * (highest priority first)\\n     *\\n     * @param {ArrayBuffer} initData Concatenated PSSH data for all DRMs\\n     * supported by the content\\n     * @param {ProtectionData} protDataSet user specified protection data - license server url etc\\n     * supported by the content\\n     * @returns {Array.<Object>} array of objects indicating which supported key\\n     * systems were found.  Empty array is returned if no\\n     * supported key systems were found\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getSupportedKeySystems(initData,protDataSet){var supportedKS=[];var pssh=_CommonEncryption2.default.parsePSSHList(initData);var ks=void 0,keySystemString=void 0,shouldNotFilterOutKeySystem=void 0;for(var ksIdx=0;ksIdx<keySystems.length;++ksIdx){ks=keySystems[ksIdx];keySystemString=ks.systemString;shouldNotFilterOutKeySystem=protDataSet?keySystemString in protDataSet:true;if(ks.uuid in pssh&&shouldNotFilterOutKeySystem){supportedKS.push({ks:ks,initData:pssh[ks.uuid],cdmData:ks.getCDMData(),sessionId:ks.getSessionId()});}}return supportedKS;}/**\\n     * Returns the license server implementation data that should be used for this request.\\n     *\\n     * @param {KeySystem} keySystem the key system\\n     * associated with this license request\\n     * @param {ProtectionData} protData protection data to use for the\\n     * request\\n     * @param {string} [messageType=\\\"license-request\\\"] the message type associated with this\\n     * request.  Supported message types can be found\\n     * {@link https://w3c.github.io/encrypted-media/#idl-def-MediaKeyMessageType|here}.\\n     * @returns {LicenseServer|null} the license server\\n     * implementation that should be used for this request or null if the player should not\\n     * pass messages of the given type to a license server\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     *\\n     */function getLicenseServer(keySystem,protData,messageType){// Our default server implementations do not do anything with \\\"license-release\\\" or\\n// \\\"individualization-request\\\" messages, so we just send a success event\\nif(messageType==='license-release'||messageType==='individualization-request'){return null;}var licenseServerData=null;if(protData&&protData.hasOwnProperty('drmtoday')){licenseServerData=(0,_DRMToday2.default)(context).getInstance({BASE64:BASE64});}else if(keySystem.systemString===_ProtectionConstants2.default.WIDEVINE_KEYSTEM_STRING){licenseServerData=(0,_Widevine2.default)(context).getInstance();}else if(keySystem.systemString===_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING){licenseServerData=(0,_PlayReady2.default)(context).getInstance();}else if(keySystem.systemString===_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING){licenseServerData=(0,_ClearKey2.default)(context).getInstance();}return licenseServerData;}/**\\n     * Allows application-specific retrieval of ClearKey keys.\\n     *\\n     * @param {KeySystem} clearkeyKeySystem They exact ClearKey System to be used\\n     * @param {ProtectionData} protData protection data to use for the\\n     * request\\n     * @param {ArrayBuffer} message the key message from the CDM\\n     * @return {ClearKeyKeySet|null} the clear keys associated with\\n     * the request or null if no keys can be returned by this function\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function processClearKeyLicenseRequest(clearkeyKeySystem,protData,message){try{return clearkeyKeySystem.getClearKeysFromProtectionData(protData,message);}catch(error){logger.error('Failed to retrieve clearkeys from ProtectionData');return null;}}function setProtectionData(protectionDataSet){var getProtectionData=function getProtectionData(keySystemString){var protData=null;if(protectionDataSet){protData=keySystemString in protectionDataSet?protectionDataSet[keySystemString]:null;}return protData;};for(var i=0;i<keySystems.length;i++){var keySystem=keySystems[i];if(keySystem.hasOwnProperty('init')){keySystem.init(getProtectionData(keySystem.systemString));}}}instance={initialize:initialize,setProtectionData:setProtectionData,isClearKey:isClearKey,initDataEquals:initDataEquals,getKeySystems:getKeySystems,setKeySystems:setKeySystems,getKeySystemBySystemString:getKeySystemBySystemString,getSupportedKeySystemsFromContentProtection:getSupportedKeySystemsFromContentProtection,getSupportedKeySystems:getSupportedKeySystems,getLicenseServer:getLicenseServer,processClearKeyLicenseRequest:processClearKeyLicenseRequest,setConfig:setConfig};return instance;}ProtectionKeyController.__dashjs_factory_name='ProtectionKeyController';exports.default=dashjs.FactoryMaker.getSingletonFactory(ProtectionKeyController);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionKeyController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js\":\n/*!******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js ***!\n  \\******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _KeyPair=__webpack_require__(/*! ../vo/KeyPair */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\\\");var _KeyPair2=_interopRequireDefault(_KeyPair);var _ClearKeyKeySet=__webpack_require__(/*! ../vo/ClearKeyKeySet */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\\\");var _ClearKeyKeySet2=_interopRequireDefault(_ClearKeyKeySet);var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var uuid='e2719d58-a985-b3c9-781a-b030af78d30e';var systemString=_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;function KeySystemClearKey(config){config=config||{};var instance=void 0;var BASE64=config.BASE64;var LICENSE_SERVER_MANIFEST_CONFIGURATIONS={attributes:['Laurl','laurl'],prefixes:['clearkey','dashif']};/**\\n     * Returns desired clearkeys (as specified in the CDM message) from protection data\\n     *\\n     * @param {ProtectionData} protectionData the protection data\\n     * @param {ArrayBuffer} message the ClearKey CDM message\\n     * @returns {ClearKeyKeySet} the key set or null if none found\\n     * @throws {Error} if a keyID specified in the CDM message was not found in the\\n     * protection data\\n     * @memberof KeySystemClearKey\\n     */function getClearKeysFromProtectionData(protectionData,message){var clearkeySet=null;if(protectionData){// ClearKey is the only system that does not require a license server URL, so we\\n// handle it here when keys are specified in protection data\\nvar jsonMsg=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(message)));var keyPairs=[];for(var i=0;i<jsonMsg.kids.length;i++){var clearkeyID=jsonMsg.kids[i];var clearkey=protectionData.clearkeys&&protectionData.clearkeys.hasOwnProperty(clearkeyID)?protectionData.clearkeys[clearkeyID]:null;if(!clearkey){throw new Error('DRM: ClearKey keyID ('+clearkeyID+') is not known!');}// KeyIDs from CDM are not base64 padded.  Keys may or may not be padded\\nkeyPairs.push(new _KeyPair2.default(clearkeyID,clearkey));}clearkeySet=new _ClearKeyKeySet2.default(keyPairs);}return clearkeySet;}function getInitData(cp,cencContentProtection){try{var initData=_CommonEncryption2.default.parseInitDataFromContentProtection(cp,BASE64);if(!initData&&cencContentProtection){var cencDefaultKid=cencDefaultKidToBase64Representation(cencContentProtection['cenc:default_KID']);var data={kids:[cencDefaultKid]};initData=new TextEncoder().encode(JSON.stringify(data));}return initData;}catch(e){return null;}}function cencDefaultKidToBase64Representation(cencDefaultKid){try{var kid=cencDefaultKid.replace(/-/g,'');kid=btoa(kid.match(/\\\\w{2}/g).map(function(a){return String.fromCharCode(parseInt(a,16));}).join(''));return kid.replace(/=/g,'');}catch(e){return null;}}function getRequestHeadersFromMessage()/*message*/{// Set content type to application/json by default\\nreturn{'Content-Type':'application/json'};}function getLicenseRequestFromMessage(message){return JSON.parse(String.fromCharCode.apply(null,new Uint8Array(message)));}function getLicenseServerURLFromInitData()/*initData*/{return null;}function getLicenseServerUrlFromMediaInfo(mediaInfo){try{if(!mediaInfo||mediaInfo.length===0){return null;}var i=0;var licenseServer=null;while(i<mediaInfo.length&&!licenseServer){var info=mediaInfo[i];if(info&&info.contentProtection&&info.contentProtection.length>0){var clearkeyProtData=info.contentProtection.filter(function(cp){return cp.schemeIdUri&&cp.schemeIdUri===schemeIdURI;});if(clearkeyProtData&&clearkeyProtData.length>0){var j=0;while(j<clearkeyProtData.length&&!licenseServer){var ckData=clearkeyProtData[j];var k=0;while(k<LICENSE_SERVER_MANIFEST_CONFIGURATIONS.attributes.length&&!licenseServer){var l=0;var attribute=LICENSE_SERVER_MANIFEST_CONFIGURATIONS.attributes[k];while(l<LICENSE_SERVER_MANIFEST_CONFIGURATIONS.prefixes.length&&!licenseServer){var prefix=LICENSE_SERVER_MANIFEST_CONFIGURATIONS.prefixes[l];if(ckData[attribute]&&ckData[attribute].__prefix&&ckData[attribute].__prefix===prefix&&ckData[attribute].__text){licenseServer=ckData[attribute].__text;}l+=1;}k+=1;}j+=1;}}}i+=1;}return licenseServer;}catch(e){return null;}}function getCDMData(){return null;}function getSessionId()/*cp*/{return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId,getLicenseServerUrlFromMediaInfo:getLicenseServerUrlFromMediaInfo,getClearKeysFromProtectionData:getClearKeysFromProtectionData};return instance;}KeySystemClearKey.__dashjs_factory_name='KeySystemClearKey';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemClearKey);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemClearKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js\":\n/*!*******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js ***!\n  \\*******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Microsoft PlayReady DRM\\n *\\n * @class\\n * @implements KeySystem\\n */var uuid='9a04f079-9840-4286-ab92-e65be0885f95';var systemString=_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;var PRCDMData='<PlayReadyCDMData type=\\\"LicenseAcquisition\\\"><LicenseAcquisition version=\\\"1.0\\\" Proactive=\\\"false\\\"><CustomData encoding=\\\"base64encoded\\\">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>';var protData=void 0;function KeySystemPlayReady(config){config=config||{};var instance=void 0;var messageFormat='utf-16';var BASE64=config.BASE64;function checkConfig(){if(!BASE64||!BASE64.hasOwnProperty('decodeArray')||!BASE64.hasOwnProperty('decodeArray')){throw new Error('Missing config parameter(s)');}}function getRequestHeadersFromMessage(message){var msg=void 0,xmlDoc=void 0;var headers={};var parser=new DOMParser();var dataview=messageFormat==='utf-16'?new Uint16Array(message):new Uint8Array(message);msg=String.fromCharCode.apply(null,dataview);xmlDoc=parser.parseFromString(msg,'application/xml');var headerNameList=xmlDoc.getElementsByTagName('name');var headerValueList=xmlDoc.getElementsByTagName('value');for(var i=0;i<headerNameList.length;i++){headers[headerNameList[i].childNodes[0].nodeValue]=headerValueList[i].childNodes[0].nodeValue;}// Some versions of the PlayReady CDM return 'Content' instead of 'Content-Type'.\\n// this is NOT w3c conform and license servers may reject the request!\\n// -> rename it to proper w3c definition!\\nif(headers.hasOwnProperty('Content')){headers['Content-Type']=headers.Content;delete headers.Content;}// Set Content-Type header by default if not provided in the the CDM message (<PlayReadyKeyMessage/>)\\n// or if the message contains directly the challenge itself (Ex: LG SmartTVs)\\nif(!headers.hasOwnProperty('Content-Type')){headers['Content-Type']='text/xml; charset=utf-8';}return headers;}function getLicenseRequestFromMessage(message){var licenseRequest=null;var parser=new DOMParser();var dataview=messageFormat==='utf-16'?new Uint16Array(message):new Uint8Array(message);checkConfig();var msg=String.fromCharCode.apply(null,dataview);var xmlDoc=parser.parseFromString(msg,'application/xml');if(xmlDoc.getElementsByTagName('PlayReadyKeyMessage')[0]){var Challenge=xmlDoc.getElementsByTagName('Challenge')[0].childNodes[0].nodeValue;if(Challenge){licenseRequest=BASE64.decode(Challenge);}}else{// The message from CDM is not a wrapped message as on IE11 and Edge,\\n// thus it contains direclty the challenge itself\\n// (note that the xmlDoc at this point may be unreadable since it may have been interpreted as UTF-16)\\nreturn message;}return licenseRequest;}function getLicenseServerURLFromInitData(initData){if(initData){var data=new DataView(initData);var numRecords=data.getUint16(4,true);var offset=6;var parser=new DOMParser();for(var i=0;i<numRecords;i++){// Parse the PlayReady Record header\\nvar recordType=data.getUint16(offset,true);offset+=2;var recordLength=data.getUint16(offset,true);offset+=2;if(recordType!==0x0001){offset+=recordLength;continue;}var recordData=initData.slice(offset,offset+recordLength);var record=String.fromCharCode.apply(null,new Uint16Array(recordData));var xmlDoc=parser.parseFromString(record,'application/xml');// First try <LA_URL>\\nif(xmlDoc.getElementsByTagName('LA_URL')[0]){var laurl=xmlDoc.getElementsByTagName('LA_URL')[0].childNodes[0].nodeValue;if(laurl){return laurl;}}// Optionally, try <LUI_URL>\\nif(xmlDoc.getElementsByTagName('LUI_URL')[0]){var luiurl=xmlDoc.getElementsByTagName('LUI_URL')[0].childNodes[0].nodeValue;if(luiurl){return luiurl;}}}}return null;}function getInitData(cpData){// * desc@ getInitData\\n// *   generate PSSH data from PROHeader defined in MPD file\\n// *   PSSH format:\\n// *   size (4)\\n// *   box type(PSSH) (8)\\n// *   Protection SystemID (16)\\n// *   protection system data size (4) - length of decoded PROHeader\\n// *   decoded PROHeader data from MPD file\\nvar PSSHBoxType=new Uint8Array([0x70,0x73,0x73,0x68,0x00,0x00,0x00,0x00]);//'PSSH' 8 bytes\\nvar playreadySystemID=new Uint8Array([0x9a,0x04,0xf0,0x79,0x98,0x40,0x42,0x86,0xab,0x92,0xe6,0x5b,0xe0,0x88,0x5f,0x95]);var byteCursor=0;var uint8arraydecodedPROHeader=null;var PROSize=void 0,PSSHSize=void 0,PSSHBoxBuffer=void 0,PSSHBox=void 0,PSSHData=void 0;checkConfig();if(!cpData){return null;}// Handle common encryption PSSH\\nif('pssh'in cpData){return _CommonEncryption2.default.parseInitDataFromContentProtection(cpData,BASE64);}// Handle native MS PlayReady ContentProtection elements\\nif('pro'in cpData){uint8arraydecodedPROHeader=BASE64.decodeArray(cpData.pro.__text);}else if('prheader'in cpData){uint8arraydecodedPROHeader=BASE64.decodeArray(cpData.prheader.__text);}else{return null;}PROSize=uint8arraydecodedPROHeader.length;PSSHSize=0x4+PSSHBoxType.length+playreadySystemID.length+0x4+PROSize;PSSHBoxBuffer=new ArrayBuffer(PSSHSize);PSSHBox=new Uint8Array(PSSHBoxBuffer);PSSHData=new DataView(PSSHBoxBuffer);PSSHData.setUint32(byteCursor,PSSHSize);byteCursor+=0x4;PSSHBox.set(PSSHBoxType,byteCursor);byteCursor+=PSSHBoxType.length;PSSHBox.set(playreadySystemID,byteCursor);byteCursor+=playreadySystemID.length;PSSHData.setUint32(byteCursor,PROSize);byteCursor+=0x4;PSSHBox.set(uint8arraydecodedPROHeader,byteCursor);byteCursor+=PROSize;return PSSHBox.buffer;}/**\\n     * It seems that some PlayReady implementations return their XML-based CDM\\n     * messages using UTF16, while others return them as UTF8.  Use this function\\n     * to modify the message format to expect when parsing CDM messages.\\n     *\\n     * @param {string} format the expected message format.  Either \\\"utf-8\\\" or \\\"utf-16\\\".\\n     * @throws {Error} Specified message format is not one of \\\"utf8\\\" or \\\"utf16\\\"\\n     */function setPlayReadyMessageFormat(format){if(format!=='utf-8'&&format!=='utf-16'){throw new Error('Specified message format is not one of \\\"utf-8\\\" or \\\"utf-16\\\"');}messageFormat=format;}/**\\n     * Initialize the Key system with protection data\\n     * @param {Object} protectionData the protection data\\n     */function init(protectionData){if(protectionData){protData=protectionData;}}/**\\n     * Get Playready Custom data\\n     */function getCDMData(){var customData=void 0,cdmData=void 0,cdmDataBytes=void 0,i=void 0;checkConfig();if(protData&&protData.cdmData){// Convert custom data into multibyte string\\ncustomData=[];for(i=0;i<protData.cdmData.length;++i){customData.push(protData.cdmData.charCodeAt(i));customData.push(0);}customData=String.fromCharCode.apply(null,customData);// Encode in Base 64 the custom data string\\ncustomData=BASE64.encode(customData);// Initialize CDM data with Base 64 encoded custom data\\n// (see https://msdn.microsoft.com/en-us/library/dn457361.aspx)\\ncdmData=PRCDMData.replace('%CUSTOMDATA%',customData);// Convert CDM data into multibyte characters\\ncdmDataBytes=[];for(i=0;i<cdmData.length;++i){cdmDataBytes.push(cdmData.charCodeAt(i));cdmDataBytes.push(0);}return new Uint8Array(cdmDataBytes).buffer;}return null;}function getSessionId(cp){// Get sessionId from protectionData or from manifest\\nif(protData&&protData.sessionId){return protData.sessionId;}else if(cp&&cp.sessionId){return cp.sessionId;}return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId,setPlayReadyMessageFormat:setPlayReadyMessageFormat,init:init};return instance;}KeySystemPlayReady.__dashjs_factory_name='KeySystemPlayReady';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemPlayReady);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemPlayReady.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js\":\n/*!*********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js ***!\n  \\*********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _KeyPair=__webpack_require__(/*! ../vo/KeyPair */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\\\");var _KeyPair2=_interopRequireDefault(_KeyPair);var _ClearKeyKeySet=__webpack_require__(/*! ../vo/ClearKeyKeySet */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\\\");var _ClearKeyKeySet2=_interopRequireDefault(_ClearKeyKeySet);var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var uuid='1077efec-c0b2-4d02-ace3-3c1e52e2fb4b';var systemString=_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;function KeySystemW3CClearKey(config){var instance=void 0;var BASE64=config.BASE64;var logger=config.debug.getLogger(instance);/**\\n     * Returns desired clearkeys (as specified in the CDM message) from protection data\\n     *\\n     * @param {ProtectionDataSet} protectionData the protection data\\n     * @param {ArrayBuffer} message the ClearKey CDM message\\n     * @returns {ClearKeyKeySet} the key set or null if none found\\n     * @throws {Error} if a keyID specified in the CDM message was not found in the\\n     * protection data\\n     * @memberof KeySystemClearKey\\n     */function getClearKeysFromProtectionData(protectionData,message){var clearkeySet=null;if(protectionData){// ClearKey is the only system that does not require a license server URL, so we\\n// handle it here when keys are specified in protection data\\nvar jsonMsg=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(message)));var keyPairs=[];for(var i=0;i<jsonMsg.kids.length;i++){var clearkeyID=jsonMsg.kids[i];var clearkey=protectionData.clearkeys&&protectionData.clearkeys.hasOwnProperty(clearkeyID)?protectionData.clearkeys[clearkeyID]:null;if(!clearkey){throw new Error('DRM: ClearKey keyID ('+clearkeyID+') is not known!');}// KeyIDs from CDM are not base64 padded.  Keys may or may not be padded\\nkeyPairs.push(new _KeyPair2.default(clearkeyID,clearkey));}clearkeySet=new _ClearKeyKeySet2.default(keyPairs);logger.warn('ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4');}return clearkeySet;}function getInitData(cp){return _CommonEncryption2.default.parseInitDataFromContentProtection(cp,BASE64);}function getRequestHeadersFromMessage()/*message*/{return null;}function getLicenseRequestFromMessage(message){return new Uint8Array(message);}function getLicenseServerURLFromInitData()/*initData*/{return null;}function getCDMData(){return null;}function getSessionId()/*cp*/{return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId,getClearKeysFromProtectionData:getClearKeysFromProtectionData};return instance;}KeySystemW3CClearKey.__dashjs_factory_name='KeySystemW3CClearKey';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemW3CClearKey);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemW3CClearKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js\":\n/*!******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js ***!\n  \\******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Google Widevine DRM\\n *\\n * @class\\n * @implements MediaPlayer.dependencies.protection.KeySystem\\n */var uuid='edef8ba9-79d6-4ace-a3c8-27dcd51d21ed';var systemString=_ProtectionConstants2.default.WIDEVINE_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;function KeySystemWidevine(config){config=config||{};var instance=void 0;var protData=null;var BASE64=config.BASE64;function init(protectionData){if(protectionData){protData=protectionData;}}function getInitData(cp){return _CommonEncryption2.default.parseInitDataFromContentProtection(cp,BASE64);}function getRequestHeadersFromMessage()/*message*/{return null;}function getLicenseRequestFromMessage(message){return new Uint8Array(message);}function getLicenseServerURLFromInitData()/*initData*/{return null;}function getCDMData(){return null;}function getSessionId(cp){// Get sessionId from protectionData or from manifest\\nif(protData&&protData.sessionId){return protData.sessionId;}else if(cp&&cp.sessionId){return cp.sessionId;}return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,init:init,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId};return instance;}KeySystemWidevine.__dashjs_factory_name='KeySystemWidevine';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemWidevine);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemWidevine.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\":\n/*!********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js ***!\n  \\********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ErrorsBase2=__webpack_require__(/*! ../../../core/errors/ErrorsBase */ \\\"../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js\\\");var _ErrorsBase3=_interopRequireDefault(_ErrorsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n */var ProtectionErrors=function(_ErrorsBase){_inherits(ProtectionErrors,_ErrorsBase);function ProtectionErrors(){_classCallCheck(this,ProtectionErrors);/**\\n         *  Generid key Error code\\n         */var _this=_possibleConstructorReturn(this,(ProtectionErrors.__proto__||Object.getPrototypeOf(ProtectionErrors)).call(this));_this.MEDIA_KEYERR_CODE=100;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_UNKNOWN_CODE=101;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_CLIENT_CODE=102;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_SERVICE_CODE=103;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_OUTPUT_CODE=104;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_DOMAIN_CODE=106;/**\\n         *  Error code returned when an error occured in keymessage event for ProtectionModel_01b\\n         */_this.MEDIA_KEY_MESSAGE_ERROR_CODE=107;/**\\n         *  Error code returned when challenge is invalid in keymessage event (event triggered by CDM)\\n         */_this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108;/**\\n         *  Error code returned when License server certificate has not been successfully updated\\n         */_this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109;/**\\n         *  Error code returned when license validity has expired\\n         */_this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110;/**\\n         *  Error code returned when no licenser url is defined\\n         */_this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111;/**\\n         *  Error code returned when key system access is denied\\n         */_this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112;/**\\n         *  Error code returned when key session has not been successfully created\\n         */_this.KEY_SESSION_CREATED_ERROR_CODE=113;/**\\n         *  Error code returned when license request failed after a keymessage event has been triggered\\n         */_this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114;_this.MEDIA_KEYERR_UNKNOWN_MESSAGE='An unspecified error occurred. This value is used for errors that don\\\\'t match any of the other codes.';_this.MEDIA_KEYERR_CLIENT_MESSAGE='The Key System could not be installed or updated.';_this.MEDIA_KEYERR_SERVICE_MESSAGE='The message passed into update indicated an error from the license service.';_this.MEDIA_KEYERR_OUTPUT_MESSAGE='There is no available output device with the required characteristics for the content protection system.';_this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE='A hardware configuration change caused a content protection error.';_this.MEDIA_KEYERR_DOMAIN_MESSAGE='An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.';_this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE='Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!';_this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE='DRM: Empty key message from CDM';_this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE='Error updating server certificate -- ';_this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE='DRM: KeyStatusChange error! -- License has expired';_this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE='DRM: No license server URL specified!';_this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE='DRM: KeySystem Access Denied! -- ';_this.KEY_SESSION_CREATED_ERROR_MESSAGE='DRM: unable to create session! --';_this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE='DRM: licenser error! --';return _this;}return ProtectionErrors;}(_ErrorsBase3.default);var protectionErrors=new ProtectionErrors();exports.default=protectionErrors;\\n//# sourceMappingURL=ProtectionErrors.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js\":\n/*!***********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js ***!\n  \\***********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionKeyController=__webpack_require__(/*! ../controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _NeedKey=__webpack_require__(/*! ../vo/NeedKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\\\");var _NeedKey2=_interopRequireDefault(_NeedKey);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _KeyMessage=__webpack_require__(/*! ../vo/KeyMessage */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\\\");var _KeyMessage2=_interopRequireDefault(_KeyMessage);var _KeySystemConfiguration=__webpack_require__(/*! ../vo/KeySystemConfiguration */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\\\");var _KeySystemConfiguration2=_interopRequireDefault(_KeySystemConfiguration);var _KeySystemAccess=__webpack_require__(/*! ../vo/KeySystemAccess */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\\\");var _KeySystemAccess2=_interopRequireDefault(_KeySystemAccess);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ProtectionModel_01b(config){config=config||{};var context=this.context;var eventBus=config.eventBus;//Need to pass in here so we can use same instance since this is optional module\\nvar events=config.events;var debug=config.debug;var api=config.api;var errHandler=config.errHandler;var instance=void 0,logger=void 0,videoElement=void 0,keySystem=void 0,protectionKeyController=void 0,// With this version of the EME APIs, sessionIDs are not assigned to\\n// sessions until the first key message is received.  We are assuming\\n// that in the case of multiple sessions, key messages will be received\\n// in the order that generateKeyRequest() is called.\\n// Holding spot for newly-created sessions until we determine whether or\\n// not the CDM supports sessionIDs\\npendingSessions=void 0,// List of sessions that have been initialized.  Only the first position will\\n// be used in the case that the CDM does not support sessionIDs\\nsessions=void 0,// Not all CDMs support the notion of sessionIDs.  Without sessionIDs\\n// there is no way for us to differentiate between sessions, therefore\\n// we must only allow a single session.  Once we receive the first key\\n// message we can set this flag to determine if more sessions are allowed\\nmoreSessionsAllowed=void 0,// This is our main event handler for all desired HTMLMediaElement events\\n// related to EME.  These events are translated into our API-independent\\n// versions of the same events\\neventHandler=void 0;function setup(){logger=debug.getLogger(instance);videoElement=null;keySystem=null;pendingSessions=[];sessions=[];protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();eventHandler=createEventHandler();}function reset(){if(videoElement){removeEventListeners();}for(var i=0;i<sessions.length;i++){closeKeySession(sessions[i]);}eventBus.trigger(events.TEARDOWN_COMPLETE);}function getKeySystem(){return keySystem;}function getAllInitData(){var retVal=[];for(var i=0;i<pendingSessions.length;i++){retVal.push(pendingSessions[i].initData);}for(var _i=0;_i<sessions.length;_i++){retVal.push(sessions[_i].initData);}return retVal;}function requestKeySystemAccess(ksConfigurations){var ve=videoElement;if(!ve){// Must have a video element to do this capability tests\\nve=document.createElement('video');}// Try key systems in order, first one with supported key system configuration\\n// is used\\nvar found=false;for(var ksIdx=0;ksIdx<ksConfigurations.length;ksIdx++){var systemString=ksConfigurations[ksIdx].ks.systemString;var configs=ksConfigurations[ksIdx].configs;var supportedAudio=null;var supportedVideo=null;// Try key system configs in order, first one with supported audio/video\\n// is used\\nfor(var configIdx=0;configIdx<configs.length;configIdx++){//let audios = configs[configIdx].audioCapabilities;\\nvar videos=configs[configIdx].videoCapabilities;// Look for supported video container/codecs\\nif(videos&&videos.length!==0){supportedVideo=[];// Indicates that we have a requested video config\\nfor(var videoIdx=0;videoIdx<videos.length;videoIdx++){if(ve.canPlayType(videos[videoIdx].contentType,systemString)!==''){supportedVideo.push(videos[videoIdx]);}}}// No supported audio or video in this configuration OR we have\\n// requested audio or video configuration that is not supported\\nif(!supportedAudio&&!supportedVideo||supportedAudio&&supportedAudio.length===0||supportedVideo&&supportedVideo.length===0){continue;}// This configuration is supported\\nfound=true;var ksConfig=new _KeySystemConfiguration2.default(supportedAudio,supportedVideo);var ks=protectionKeyController.getKeySystemBySystemString(systemString);eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{data:new _KeySystemAccess2.default(ks,ksConfig)});break;}}if(!found){eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Key system access denied! -- No valid audio/video content configurations detected!'});}}function selectKeySystem(keySystemAccess){keySystem=keySystemAccess.keySystem;eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);}function setMediaElement(mediaElement){if(videoElement===mediaElement){return;}// Replacing the previous element\\nif(videoElement){removeEventListeners();// Close any open sessions - avoids memory leak on LG webOS 2016/2017 TVs\\nfor(var i=0;i<sessions.length;i++){closeKeySession(sessions[i]);}sessions=[];}videoElement=mediaElement;// Only if we are not detaching from the existing element\\nif(videoElement){videoElement.addEventListener(api.keyerror,eventHandler);videoElement.addEventListener(api.needkey,eventHandler);videoElement.addEventListener(api.keymessage,eventHandler);videoElement.addEventListener(api.keyadded,eventHandler);eventBus.trigger(events.VIDEO_ELEMENT_SELECTED);}}function createKeySession(initData/*, protData, keySystemType */){if(!keySystem){throw new Error('Can not create sessions until you have selected a key system');}// Determine if creating a new session is allowed\\nif(moreSessionsAllowed||sessions.length===0){var newSession={// Implements SessionToken\\nsessionID:null,initData:initData,getSessionID:function getSessionID(){return this.sessionID;},getExpirationTime:function getExpirationTime(){return NaN;},getSessionType:function getSessionType(){return'temporary';}};pendingSessions.push(newSession);// Send our request to the CDM\\nvideoElement[api.generateKeyRequest](keySystem.systemString,new Uint8Array(initData));return newSession;}else{throw new Error('Multiple sessions not allowed!');}}function updateKeySession(sessionToken,message){var sessionID=sessionToken.sessionID;if(!protectionKeyController.isClearKey(keySystem)){// Send our request to the CDM\\nvideoElement[api.addKey](keySystem.systemString,new Uint8Array(message),new Uint8Array(sessionToken.initData),sessionID);}else{// For clearkey, message is a ClearKeyKeySet\\nfor(var i=0;i<message.keyPairs.length;i++){videoElement[api.addKey](keySystem.systemString,message.keyPairs[i].key,message.keyPairs[i].keyID,sessionID);}}}function closeKeySession(sessionToken){// Send our request to the CDM\\ntry{videoElement[api.cancelKeyRequest](keySystem.systemString,sessionToken.sessionID);}catch(error){eventBus.trigger(events.KEY_SESSION_CLOSED,{data:null,error:'Error closing session ('+sessionToken.sessionID+') '+error.message});}}function setServerCertificate()/*serverCertificate*/{/* Not supported */}function loadKeySession()/*sessionID*/{/* Not supported */}function removeKeySession()/*sessionToken*/{/* Not supported */}function createEventHandler(){return{handleEvent:function handleEvent(event){var sessionToken=null;switch(event.type){case api.needkey:var initData=ArrayBuffer.isView(event.initData)?event.initData.buffer:event.initData;eventBus.trigger(events.NEED_KEY,{key:new _NeedKey2.default(initData,'cenc')});break;case api.keyerror:sessionToken=findSessionByID(sessions,event.sessionId);if(!sessionToken){sessionToken=findSessionByID(pendingSessions,event.sessionId);}if(sessionToken){var code=_ProtectionErrors2.default.MEDIA_KEYERR_CODE;var msg='';switch(event.errorCode.code){case 1:code=_ProtectionErrors2.default.MEDIA_KEYERR_UNKNOWN_CODE;msg+='MEDIA_KEYERR_UNKNOWN - '+_ProtectionErrors2.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:code=_ProtectionErrors2.default.MEDIA_KEYERR_CLIENT_CODE;msg+='MEDIA_KEYERR_CLIENT - '+_ProtectionErrors2.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:code=_ProtectionErrors2.default.MEDIA_KEYERR_SERVICE_CODE;msg+='MEDIA_KEYERR_SERVICE - '+_ProtectionErrors2.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:code=_ProtectionErrors2.default.MEDIA_KEYERR_OUTPUT_CODE;msg+='MEDIA_KEYERR_OUTPUT - '+_ProtectionErrors2.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:code=_ProtectionErrors2.default.MEDIA_KEYERR_HARDWARECHANGE_CODE;msg+='MEDIA_KEYERR_HARDWARECHANGE - '+_ProtectionErrors2.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:code=_ProtectionErrors2.default.MEDIA_KEYERR_DOMAIN_CODE;msg+='MEDIA_KEYERR_DOMAIN - '+_ProtectionErrors2.default.MEDIA_KEYERR_DOMAIN_MESSAGE;break;}msg+='  System Code = '+event.systemCode;// TODO: Build error string based on key error\\neventBus.trigger(events.KEY_ERROR,{data:new _DashJSError2.default(code,msg,sessionToken)});}else{logger.error('No session token found for key error');}break;case api.keyadded:sessionToken=findSessionByID(sessions,event.sessionId);if(!sessionToken){sessionToken=findSessionByID(pendingSessions,event.sessionId);}if(sessionToken){logger.debug('DRM: Key added.');eventBus.trigger(events.KEY_ADDED,{data:sessionToken});//TODO not sure anything is using sessionToken? why there?\\n}else{logger.debug('No session token found for key added');}break;case api.keymessage:// If this CDM does not support session IDs, we will be limited\\n// to a single session\\nmoreSessionsAllowed=event.sessionId!==null&&event.sessionId!==undefined;// SessionIDs supported\\nif(moreSessionsAllowed){// Attempt to find an uninitialized token with this sessionID\\nsessionToken=findSessionByID(sessions,event.sessionId);if(!sessionToken&&pendingSessions.length>0){// This is the first message for our latest session, so set the\\n// sessionID and add it to our list\\nsessionToken=pendingSessions.shift();sessions.push(sessionToken);sessionToken.sessionID=event.sessionId;eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}}else if(pendingSessions.length>0){// SessionIDs not supported\\nsessionToken=pendingSessions.shift();sessions.push(sessionToken);if(pendingSessions.length!==0){errHandler.error(new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE));}}if(sessionToken){var message=ArrayBuffer.isView(event.message)?event.message.buffer:event.message;// For ClearKey, the spec mandates that you pass this message to the\\n// addKey method, so we always save it to the token since there is no\\n// way to tell which key system is in use\\nsessionToken.keyMessage=message;eventBus.trigger(events.INTERNAL_KEY_MESSAGE,{data:new _KeyMessage2.default(sessionToken,message,event.defaultURL)});}else{logger.warn('No session token found for key message');}break;}}};}/**\\n     * Helper function to retrieve the stored session token based on a given\\n     * sessionID value\\n     *\\n     * @param {Array} sessionArray - the array of sessions to search\\n     * @param {*} sessionID - the sessionID to search for\\n     * @returns {*} the session token with the given sessionID\\n     */function findSessionByID(sessionArray,sessionID){if(!sessionID||!sessionArray){return null;}else{var len=sessionArray.length;for(var i=0;i<len;i++){if(sessionArray[i].sessionID==sessionID){return sessionArray[i];}}return null;}}function removeEventListeners(){videoElement.removeEventListener(api.keyerror,eventHandler);videoElement.removeEventListener(api.needkey,eventHandler);videoElement.removeEventListener(api.keymessage,eventHandler);videoElement.removeEventListener(api.keyadded,eventHandler);}instance={getAllInitData:getAllInitData,requestKeySystemAccess:requestKeySystemAccess,getKeySystem:getKeySystem,selectKeySystem:selectKeySystem,setMediaElement:setMediaElement,createKeySession:createKeySession,updateKeySession:updateKeySession,closeKeySession:closeKeySession,setServerCertificate:setServerCertificate,loadKeySession:loadKeySession,removeKeySession:removeKeySession,stop:reset,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Initial implementation of EME\\n *\\n * Implemented by Google Chrome prior to v36\\n *\\n * @implements ProtectionModel\\n * @class\\n */ProtectionModel_01b.__dashjs_factory_name='ProtectionModel_01b';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionModel_01b);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionModel_01b.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js\":\n/*!*****************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js ***!\n  \\*****************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionKeyController=__webpack_require__(/*! ../controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _NeedKey=__webpack_require__(/*! ../vo/NeedKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\\\");var _NeedKey2=_interopRequireDefault(_NeedKey);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _KeyMessage=__webpack_require__(/*! ../vo/KeyMessage */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\\\");var _KeyMessage2=_interopRequireDefault(_KeyMessage);var _KeySystemAccess=__webpack_require__(/*! ../vo/KeySystemAccess */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\\\");var _KeySystemAccess2=_interopRequireDefault(_KeySystemAccess);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ProtectionModel_21Jan2015(config){config=config||{};var context=this.context;var eventBus=config.eventBus;//Need to pass in here so we can use same instance since this is optional module\\nvar events=config.events;var debug=config.debug;var instance=void 0,logger=void 0,keySystem=void 0,videoElement=void 0,mediaKeys=void 0,sessions=void 0,eventHandler=void 0,protectionKeyController=void 0;function setup(){logger=debug.getLogger(instance);keySystem=null;videoElement=null;mediaKeys=null;sessions=[];protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();eventHandler=createEventHandler();}function reset(){var numSessions=sessions.length;var session=void 0;if(numSessions!==0){(function(){// Called when we are done closing a session.  Success or fail\\nvar done=function done(session){removeSession(session);if(sessions.length===0){if(videoElement){videoElement.removeEventListener('encrypted',eventHandler);videoElement.setMediaKeys(null).then(function(){eventBus.trigger(events.TEARDOWN_COMPLETE);});}else{eventBus.trigger(events.TEARDOWN_COMPLETE);}}};for(var i=0;i<numSessions;i++){session=sessions[i];(function(s){// Override closed promise resolver\\nsession.session.closed.then(function(){done(s);});// Close the session and handle errors, otherwise promise\\n// resolver above will be called\\ncloseKeySessionInternal(session).catch(function(){done(s);});})(session);}})();}else{eventBus.trigger(events.TEARDOWN_COMPLETE);}}function stop(){// Close and remove not usable sessions\\nvar session=void 0;for(var i=0;i<sessions.length;i++){session=sessions[i];if(!session.getUsable()){closeKeySessionInternal(session).catch(function(){removeSession(session);});}}}function getKeySystem(){return keySystem;}function getAllInitData(){var retVal=[];for(var i=0;i<sessions.length;i++){if(sessions[i].initData){retVal.push(sessions[i].initData);}}return retVal;}function requestKeySystemAccess(ksConfigurations){requestKeySystemAccessInternal(ksConfigurations,0);}function selectKeySystem(keySystemAccess){keySystemAccess.mksa.createMediaKeys().then(function(mkeys){keySystem=keySystemAccess.keySystem;mediaKeys=mkeys;if(videoElement){videoElement.setMediaKeys(mediaKeys).then(function(){eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);});}else{eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);}}).catch(function(){eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED,{error:'Error selecting keys system ('+keySystemAccess.keySystem.systemString+')! Could not create MediaKeys -- TODO'});});}function setMediaElement(mediaElement){if(videoElement===mediaElement)return;// Replacing the previous element\\nif(videoElement){videoElement.removeEventListener('encrypted',eventHandler);if(videoElement.setMediaKeys){videoElement.setMediaKeys(null);}}videoElement=mediaElement;// Only if we are not detaching from the existing element\\nif(videoElement){videoElement.addEventListener('encrypted',eventHandler);if(videoElement.setMediaKeys&&mediaKeys){videoElement.setMediaKeys(mediaKeys);}}}function setServerCertificate(serverCertificate){if(!keySystem||!mediaKeys){throw new Error('Can not set server certificate until you have selected a key system');}mediaKeys.setServerCertificate(serverCertificate).then(function(){logger.info('DRM: License server certificate successfully updated.');eventBus.trigger(events.SERVER_CERTIFICATE_UPDATED);}).catch(function(error){eventBus.trigger(events.SERVER_CERTIFICATE_UPDATED,{error:new _DashJSError2.default(_ProtectionErrors2.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,_ProtectionErrors2.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+error.name)});});}function createKeySession(initData,protData,sessionType){if(!keySystem||!mediaKeys){throw new Error('Can not create sessions until you have selected a key system');}var session=mediaKeys.createSession(sessionType);var sessionToken=createSessionToken(session,initData,sessionType);var ks=this.getKeySystem();// Generate initial key request.\\n// keyids type is used for clearkey when keys are provided directly in the protection data and then request to a license server is not needed\\nvar dataType=ks.systemString===_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING&&(initData||protData&&protData.clearkeys)?'keyids':'cenc';session.generateRequest(dataType,initData).then(function(){logger.debug('DRM: Session created.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}).catch(function(error){// TODO: Better error string\\nremoveSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Error generating key request -- '+error.name)});});}function updateKeySession(sessionToken,message){var session=sessionToken.session;// Send our request to the key session\\nif(protectionKeyController.isClearKey(keySystem)){message=message.toJWK();}session.update(message).catch(function(error){eventBus.trigger(events.KEY_ERROR,{data:new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEYERR_CODE,'Error sending update() message! '+error.name,sessionToken)});});}function loadKeySession(sessionID,initData,sessionType){if(!keySystem||!mediaKeys){throw new Error('Can not load sessions until you have selected a key system');}// Check if session Id is not already loaded or loading\\nfor(var i=0;i<sessions.length;i++){if(sessionID===sessions[i].sessionId){logger.warn('DRM: Ignoring session ID because we have already seen it!');return;}}var session=mediaKeys.createSession(sessionType);var sessionToken=createSessionToken(session,initData,sessionType,sessionID);// Load persisted session data into our newly created session object\\nsession.load(sessionID).then(function(success){if(success){logger.debug('DRM: Session loaded.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}else{removeSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Could not load session! Invalid Session ID ('+sessionID+')')});}}).catch(function(error){removeSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Could not load session ('+sessionID+')! '+error.name)});});}function removeKeySession(sessionToken){var session=sessionToken.session;session.remove().then(function(){logger.debug('DRM: Session removed.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_REMOVED,{data:sessionToken.getSessionID()});},function(error){eventBus.trigger(events.KEY_SESSION_REMOVED,{data:null,error:'Error removing session ('+sessionToken.getSessionID()+'). '+error.name});});}function closeKeySession(sessionToken){// Send our request to the key session\\ncloseKeySessionInternal(sessionToken).catch(function(error){removeSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CLOSED,{data:null,error:'Error closing session ('+sessionToken.getSessionID()+') '+error.name});});}function requestKeySystemAccessInternal(ksConfigurations,idx){if(navigator.requestMediaKeySystemAccess===undefined||typeof navigator.requestMediaKeySystemAccess!=='function'){eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Insecure origins are not allowed'});return;}(function(i){var keySystem=ksConfigurations[i].ks;var configs=ksConfigurations[i].configs;var systemString=keySystem.systemString;// PATCH to support persistent licenses on Edge browser (see issue #2658)\\nif(systemString===_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING&&configs[0].persistentState==='required'){systemString+='.recommendation';}navigator.requestMediaKeySystemAccess(systemString,configs).then(function(mediaKeySystemAccess){// Chrome 40 does not currently implement MediaKeySystemAccess.getConfiguration()\\nvar configuration=typeof mediaKeySystemAccess.getConfiguration==='function'?mediaKeySystemAccess.getConfiguration():null;var keySystemAccess=new _KeySystemAccess2.default(keySystem,configuration);keySystemAccess.mksa=mediaKeySystemAccess;eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{data:keySystemAccess});}).catch(function(error){if(++i<ksConfigurations.length){requestKeySystemAccessInternal(ksConfigurations,i);}else{eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Key system access denied! '+error.message});}});})(idx);}function closeKeySessionInternal(sessionToken){var session=sessionToken.session;// Remove event listeners\\nsession.removeEventListener('keystatuseschange',sessionToken);session.removeEventListener('message',sessionToken);// Send our request to the key session\\nreturn session.close();}// This is our main event handler for all desired HTMLMediaElement events\\n// related to EME.  These events are translated into our API-independent\\n// versions of the same events\\nfunction createEventHandler(){return{handleEvent:function handleEvent(event){switch(event.type){case'encrypted':if(event.initData){var initData=ArrayBuffer.isView(event.initData)?event.initData.buffer:event.initData;eventBus.trigger(events.NEED_KEY,{key:new _NeedKey2.default(initData,event.initDataType)});}break;}}};}function removeSession(token){// Remove from our session list\\nfor(var i=0;i<sessions.length;i++){if(sessions[i]===token){sessions.splice(i,1);break;}}}function parseKeyStatus(args){// Edge and Chrome implement different version of keystatues, param are not on same order\\nvar status=void 0,keyId=void 0;if(args&&args.length>0){if(args[0]){if(typeof args[0]==='string'){status=args[0];}else{keyId=args[0];}}if(args[1]){if(typeof args[1]==='string'){status=args[1];}else{keyId=args[1];}}}return{status:status,keyId:keyId};}// Function to create our session token objects which manage the EME\\n// MediaKeySession and session-specific event handler\\nfunction createSessionToken(session,initData,sessionType,sessionID){var token={// Implements SessionToken\\nsession:session,initData:initData,sessionId:sessionID,// This is our main event handler for all desired MediaKeySession events\\n// These events are translated into our API-independent versions of the\\n// same events\\nhandleEvent:function handleEvent(event){switch(event.type){case'keystatuseschange':eventBus.trigger(events.KEY_STATUSES_CHANGED,{data:this});event.target.keyStatuses.forEach(function(){var keyStatus=parseKeyStatus(arguments);switch(keyStatus.status){case'expired':eventBus.trigger(events.INTERNAL_KEY_STATUS_CHANGED,{error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,_ProtectionErrors2.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)});break;default:eventBus.trigger(events.INTERNAL_KEY_STATUS_CHANGED,keyStatus);break;}});break;case'message':var message=ArrayBuffer.isView(event.message)?event.message.buffer:event.message;eventBus.trigger(events.INTERNAL_KEY_MESSAGE,{data:new _KeyMessage2.default(this,message,undefined,event.messageType)});break;}},getSessionID:function getSessionID(){return session.sessionId;},getExpirationTime:function getExpirationTime(){return session.expiration;},getKeyStatuses:function getKeyStatuses(){return session.keyStatuses;},getUsable:function getUsable(){var usable=false;session.keyStatuses.forEach(function(){var keyStatus=parseKeyStatus(arguments);if(keyStatus.status==='usable'){usable=true;}});return usable;},getSessionType:function getSessionType(){return sessionType;}};// Add all event listeners\\nsession.addEventListener('keystatuseschange',token);session.addEventListener('message',token);// Register callback for session closed Promise\\nsession.closed.then(function(){removeSession(token);logger.debug('DRM: Session closed.  SessionID = '+token.getSessionID());eventBus.trigger(events.KEY_SESSION_CLOSED,{data:token.getSessionID()});});// Add to our session list\\nsessions.push(token);return token;}instance={getAllInitData:getAllInitData,requestKeySystemAccess:requestKeySystemAccess,getKeySystem:getKeySystem,selectKeySystem:selectKeySystem,setMediaElement:setMediaElement,setServerCertificate:setServerCertificate,createKeySession:createKeySession,updateKeySession:updateKeySession,loadKeySession:loadKeySession,removeKeySession:removeKeySession,closeKeySession:closeKeySession,stop:stop,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Most recent EME implementation\\n *\\n * Implemented by Google Chrome v36+ (Windows, OSX, Linux)\\n *\\n * @implements ProtectionModel\\n * @class\\n */ProtectionModel_21Jan2015.__dashjs_factory_name='ProtectionModel_21Jan2015';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionModel_21Jan2015);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionModel_21Jan2015.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js\":\n/*!****************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js ***!\n  \\****************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionKeyController=__webpack_require__(/*! ../controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _NeedKey=__webpack_require__(/*! ../vo/NeedKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\\\");var _NeedKey2=_interopRequireDefault(_NeedKey);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _KeyMessage=__webpack_require__(/*! ../vo/KeyMessage */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\\\");var _KeyMessage2=_interopRequireDefault(_KeyMessage);var _KeySystemConfiguration=__webpack_require__(/*! ../vo/KeySystemConfiguration */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\\\");var _KeySystemConfiguration2=_interopRequireDefault(_KeySystemConfiguration);var _KeySystemAccess=__webpack_require__(/*! ../vo/KeySystemAccess */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\\\");var _KeySystemAccess2=_interopRequireDefault(_KeySystemAccess);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ProtectionModel_3Feb2014(config){config=config||{};var context=this.context;var eventBus=config.eventBus;//Need to pass in here so we can use same instance since this is optional module\\nvar events=config.events;var debug=config.debug;var api=config.api;var instance=void 0,logger=void 0,videoElement=void 0,keySystem=void 0,mediaKeys=void 0,keySystemAccess=void 0,sessions=void 0,eventHandler=void 0,protectionKeyController=void 0;function setup(){logger=debug.getLogger(instance);videoElement=null;keySystem=null;mediaKeys=null;keySystemAccess=null;sessions=[];protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();eventHandler=createEventHandler();}function reset(){try{for(var i=0;i<sessions.length;i++){closeKeySession(sessions[i]);}if(videoElement){videoElement.removeEventListener(api.needkey,eventHandler);}eventBus.trigger(events.TEARDOWN_COMPLETE);}catch(error){eventBus.trigger(events.TEARDOWN_COMPLETE,{error:'Error tearing down key sessions and MediaKeys! -- '+error.message});}}function getKeySystem(){return keySystem;}function getAllInitData(){var retVal=[];for(var i=0;i<sessions.length;i++){retVal.push(sessions[i].initData);}return retVal;}function requestKeySystemAccess(ksConfigurations){// Try key systems in order, first one with supported key system configuration\\n// is used\\nvar found=false;for(var ksIdx=0;ksIdx<ksConfigurations.length;ksIdx++){var systemString=ksConfigurations[ksIdx].ks.systemString;var configs=ksConfigurations[ksIdx].configs;var supportedAudio=null;var supportedVideo=null;// Try key system configs in order, first one with supported audio/video\\n// is used\\nfor(var configIdx=0;configIdx<configs.length;configIdx++){var audios=configs[configIdx].audioCapabilities;var videos=configs[configIdx].videoCapabilities;// Look for supported audio container/codecs\\nif(audios&&audios.length!==0){supportedAudio=[];// Indicates that we have a requested audio config\\nfor(var audioIdx=0;audioIdx<audios.length;audioIdx++){if(window[api.MediaKeys].isTypeSupported(systemString,audios[audioIdx].contentType)){supportedAudio.push(audios[audioIdx]);}}}// Look for supported video container/codecs\\nif(videos&&videos.length!==0){supportedVideo=[];// Indicates that we have a requested video config\\nfor(var videoIdx=0;videoIdx<videos.length;videoIdx++){if(window[api.MediaKeys].isTypeSupported(systemString,videos[videoIdx].contentType)){supportedVideo.push(videos[videoIdx]);}}}// No supported audio or video in this configuration OR we have\\n// requested audio or video configuration that is not supported\\nif(!supportedAudio&&!supportedVideo||supportedAudio&&supportedAudio.length===0||supportedVideo&&supportedVideo.length===0){continue;}// This configuration is supported\\nfound=true;var ksConfig=new _KeySystemConfiguration2.default(supportedAudio,supportedVideo);var ks=protectionKeyController.getKeySystemBySystemString(systemString);eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{data:new _KeySystemAccess2.default(ks,ksConfig)});break;}}if(!found){eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Key system access denied! -- No valid audio/video content configurations detected!'});}}function selectKeySystem(ksAccess){try{mediaKeys=ksAccess.mediaKeys=new window[api.MediaKeys](ksAccess.keySystem.systemString);keySystem=ksAccess.keySystem;keySystemAccess=ksAccess;if(videoElement){setMediaKeys();}eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);}catch(error){eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED,{error:'Error selecting keys system ('+keySystem.systemString+')! Could not create MediaKeys -- TODO'});}}function setMediaElement(mediaElement){if(videoElement===mediaElement)return;// Replacing the previous element\\nif(videoElement){videoElement.removeEventListener(api.needkey,eventHandler);}videoElement=mediaElement;// Only if we are not detaching from the existing element\\nif(videoElement){videoElement.addEventListener(api.needkey,eventHandler);if(mediaKeys){setMediaKeys();}}}function createKeySession(initData,protData,sessionType,cdmData){if(!keySystem||!mediaKeys||!keySystemAccess){throw new Error('Can not create sessions until you have selected a key system');}// Use the first video capability for the contentType.\\n// TODO:  Not sure if there is a way to concatenate all capability data into a RFC6386-compatible format\\n// If player is trying to playback Audio only stream - don't error out.\\nvar capabilities=null;if(keySystemAccess.ksConfiguration.videoCapabilities&&keySystemAccess.ksConfiguration.videoCapabilities.length>0){capabilities=keySystemAccess.ksConfiguration.videoCapabilities[0];}if(capabilities===null&&keySystemAccess.ksConfiguration.audioCapabilities&&keySystemAccess.ksConfiguration.audioCapabilities.length>0){capabilities=keySystemAccess.ksConfiguration.audioCapabilities[0];}if(capabilities===null){throw new Error('Can not create sessions for unknown content types.');}var contentType=capabilities.contentType;var session=mediaKeys.createSession(contentType,new Uint8Array(initData),cdmData?new Uint8Array(cdmData):null);var sessionToken=createSessionToken(session,initData);// Add all event listeners\\nsession.addEventListener(api.error,sessionToken);session.addEventListener(api.message,sessionToken);session.addEventListener(api.ready,sessionToken);session.addEventListener(api.close,sessionToken);// Add to our session list\\nsessions.push(sessionToken);logger.debug('DRM: Session created.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}function updateKeySession(sessionToken,message){var session=sessionToken.session;if(!protectionKeyController.isClearKey(keySystem)){// Send our request to the key session\\nsession.update(new Uint8Array(message));}else{// For clearkey, message is a ClearKeyKeySet\\nsession.update(new Uint8Array(message.toJWK()));}}/**\\n     * Close the given session and release all associated keys.  Following\\n     * this call, the sessionToken becomes invalid\\n     *\\n     * @param {Object} sessionToken - the session token\\n     */function closeKeySession(sessionToken){var session=sessionToken.session;// Remove event listeners\\nsession.removeEventListener(api.error,sessionToken);session.removeEventListener(api.message,sessionToken);session.removeEventListener(api.ready,sessionToken);session.removeEventListener(api.close,sessionToken);// Remove from our session list\\nfor(var i=0;i<sessions.length;i++){if(sessions[i]===sessionToken){sessions.splice(i,1);break;}}// Send our request to the key session\\nsession[api.release]();}function setServerCertificate()/*serverCertificate*/{/* Not supported */}function loadKeySession()/*sessionID*/{/* Not supported */}function removeKeySession()/*sessionToken*/{/* Not supported */}function createEventHandler(){return{handleEvent:function handleEvent(event){switch(event.type){case api.needkey:if(event.initData){var initData=ArrayBuffer.isView(event.initData)?event.initData.buffer:event.initData;eventBus.trigger(events.NEED_KEY,{key:new _NeedKey2.default(initData,'cenc')});}break;}}};}// IE11 does not let you set MediaKeys until it has entered a certain\\n// readyState, so we need this logic to ensure we don't set the keys\\n// too early\\nfunction setMediaKeys(){var boundDoSetKeys=null;var doSetKeys=function doSetKeys(){videoElement.removeEventListener('loadedmetadata',boundDoSetKeys);videoElement[api.setMediaKeys](mediaKeys);eventBus.trigger(events.VIDEO_ELEMENT_SELECTED);};if(videoElement.readyState>=1){doSetKeys();}else{boundDoSetKeys=doSetKeys.bind(this);videoElement.addEventListener('loadedmetadata',boundDoSetKeys);}}// Function to create our session token objects which manage the EME\\n// MediaKeySession and session-specific event handler\\nfunction createSessionToken(keySession,initData){return{// Implements SessionToken\\nsession:keySession,initData:initData,getSessionID:function getSessionID(){return this.session.sessionId;},getExpirationTime:function getExpirationTime(){return NaN;},getSessionType:function getSessionType(){return'temporary';},// This is our main event handler for all desired MediaKeySession events\\n// These events are translated into our API-independent versions of the\\n// same events\\nhandleEvent:function handleEvent(event){switch(event.type){case api.error:var errorStr='KeyError';// TODO: Make better string from event\\neventBus.trigger(events.KEY_ERROR,{data:new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEYERR_CODE,errorStr,this)});break;case api.message:var message=ArrayBuffer.isView(event.message)?event.message.buffer:event.message;eventBus.trigger(events.INTERNAL_KEY_MESSAGE,{data:new _KeyMessage2.default(this,message,event.destinationURL)});break;case api.ready:logger.debug('DRM: Key added.');eventBus.trigger(events.KEY_ADDED);break;case api.close:logger.debug('DRM: Session closed.  SessionID = '+this.getSessionID());eventBus.trigger(events.KEY_SESSION_CLOSED,{data:this.getSessionID()});break;}}};}instance={getAllInitData:getAllInitData,requestKeySystemAccess:requestKeySystemAccess,getKeySystem:getKeySystem,selectKeySystem:selectKeySystem,setMediaElement:setMediaElement,createKeySession:createKeySession,updateKeySession:updateKeySession,closeKeySession:closeKeySession,setServerCertificate:setServerCertificate,loadKeySession:loadKeySession,removeKeySession:removeKeySession,stop:reset,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Implementation of the EME APIs as of the 3 Feb 2014 state of the specification.\\n *\\n * Implemented by Internet Explorer 11 (Windows 8.1)\\n *\\n * @implements ProtectionModel\\n * @class\\n */ProtectionModel_3Feb2014.__dashjs_factory_name='ProtectionModel_3Feb2014';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionModel_3Feb2014);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionModel_3Feb2014.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _KeyPair=__webpack_require__(/*! ../vo/KeyPair */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\\\");var _KeyPair2=_interopRequireDefault(_KeyPair);var _ClearKeyKeySet=__webpack_require__(/*! ../vo/ClearKeyKeySet */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\\\");var _ClearKeyKeySet2=_interopRequireDefault(_ClearKeyKeySet);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * CableLabs ClearKey license server implementation\\n *\\n * For testing purposes and evaluating potential uses for ClearKey, we have developed\\n * a dirt-simple API for requesting ClearKey licenses from a remote server.\\n *\\n * @implements LicenseServer\\n * @class\\n */function ClearKey(){var instance=void 0;function getServerURLFromMessage(url/* message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType()/*keySystemStr*/{return'json';}function getLicenseMessage(serverResponse/*, keySystemStr, messageType*/){if(!serverResponse.hasOwnProperty('keys')){return null;}var keyPairs=[];for(var i=0;i<serverResponse.keys.length;i++){var keypair=serverResponse.keys[i];var keyid=keypair.kid.replace(/=/g,'');var key=keypair.k.replace(/=/g,'');keyPairs.push(new _KeyPair2.default(keyid,key));}return new _ClearKeyKeySet2.default(keyPairs);}function getErrorResponse(serverResponse/*, keySystemStr, messageType*/){return String.fromCharCode.apply(null,new Uint8Array(serverResponse));}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}ClearKey.__dashjs_factory_name='ClearKey';exports.default=dashjs.FactoryMaker.getSingletonFactory(ClearKey);/* jshint ignore:line */\\n//# sourceMappingURL=ClearKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DRMToday(config){config=config||{};var BASE64=config.BASE64;var keySystems={};keySystems[_ProtectionConstants2.default.WIDEVINE_KEYSTEM_STRING]={responseType:'json',getLicenseMessage:function getLicenseMessage(response){return BASE64.decodeArray(response.license);},getErrorResponse:function getErrorResponse(response){return response;}};keySystems[_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING]={responseType:'arraybuffer',getLicenseMessage:function getLicenseMessage(response){return response;},getErrorResponse:function getErrorResponse(response){return String.fromCharCode.apply(null,new Uint8Array(response));}};var instance=void 0;function checkConfig(){if(!BASE64||!BASE64.hasOwnProperty('decodeArray')){throw new Error('Missing config parameter(s)');}}function getServerURLFromMessage(url/*, message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType(keySystemStr/*, messageType*/){return keySystems[keySystemStr].responseType;}function getLicenseMessage(serverResponse,keySystemStr/*, messageType*/){checkConfig();return keySystems[keySystemStr].getLicenseMessage(serverResponse);}function getErrorResponse(serverResponse,keySystemStr/*, messageType*/){return keySystems[keySystemStr].getErrorResponse(serverResponse);}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * CastLabs DRMToday License Server implementation\\n *\\n * @implements LicenseServer\\n * @class\\n */DRMToday.__dashjs_factory_name='DRMToday';exports.default=dashjs.FactoryMaker.getSingletonFactory(DRMToday);/* jshint ignore:line */\\n//# sourceMappingURL=DRMToday.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//* global escape: true *//**\\n * Microsoft PlayReady Test License Server\\n *\\n * For testing content that uses the PlayReady test server at\\n *\\n * @implements LicenseServer\\n * @class\\n * @ignore\\n */function PlayReady(){var instance=void 0;var soap='http://schemas.xmlsoap.org/soap/envelope/';function uintToString(arrayBuffer){var encodedString=String.fromCharCode.apply(null,new Uint8Array(arrayBuffer));var decodedString=decodeURIComponent(escape(encodedString));return decodedString;}function parseServerResponse(serverResponse){if(window.DOMParser){var stringResponse=uintToString(serverResponse);var parser=new window.DOMParser();var xmlDoc=parser.parseFromString(stringResponse,'text/xml');var envelope=xmlDoc?xmlDoc.getElementsByTagNameNS(soap,'Envelope')[0]:null;var body=envelope?envelope.getElementsByTagNameNS(soap,'Body')[0]:null;var fault=body?body.getElementsByTagNameNS(soap,'Fault')[0]:null;if(fault){return null;}}return serverResponse;}function parseErrorResponse(serverResponse){var faultstring='';var statusCode='';var message='';var idStart=-1;var idEnd=-1;if(window.DOMParser){var stringResponse=uintToString(serverResponse);var parser=new window.DOMParser();var xmlDoc=parser.parseFromString(stringResponse,'text/xml');var envelope=xmlDoc?xmlDoc.getElementsByTagNameNS(soap,'Envelope')[0]:null;var body=envelope?envelope.getElementsByTagNameNS(soap,'Body')[0]:null;var fault=body?body.getElementsByTagNameNS(soap,'Fault')[0]:null;var detail=fault?fault.getElementsByTagName('detail')[0]:null;var exception=detail?detail.getElementsByTagName('Exception')[0]:null;var node=null;if(fault===null){return stringResponse;}node=fault.getElementsByTagName('faultstring')[0].firstChild;faultstring=node?node.nodeValue:null;if(exception!==null){node=exception.getElementsByTagName('StatusCode')[0];statusCode=node?node.firstChild.nodeValue:null;node=exception.getElementsByTagName('Message')[0];message=node?node.firstChild.nodeValue:null;idStart=message?message.lastIndexOf('[')+1:-1;idEnd=message?message.indexOf(']'):-1;message=message?message.substring(idStart,idEnd):'';}}var errorString='code: '+statusCode+', name: '+faultstring;if(message){errorString+=', message: '+message;}return errorString;}function getServerURLFromMessage(url/*, message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType()/*keySystemStr, messageType*/{return'arraybuffer';}function getLicenseMessage(serverResponse/*, keySystemStr, messageType*/){return parseServerResponse.call(this,serverResponse);}function getErrorResponse(serverResponse/*, keySystemStr, messageType*/){return parseErrorResponse.call(this,serverResponse);}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}PlayReady.__dashjs_factory_name='PlayReady';exports.default=dashjs.FactoryMaker.getSingletonFactory(PlayReady);/* jshint ignore:line */\\n//# sourceMappingURL=PlayReady.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @ignore\\n */function Widevine(){var instance=void 0;function getServerURLFromMessage(url/*, message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType()/*keySystemStr, messageType*/{return'arraybuffer';}function getLicenseMessage(serverResponse/*, keySystemStr, messageType*/){return serverResponse;}function getErrorResponse(serverResponse/*, keySystemStr, messageType*/){return String.fromCharCode.apply(null,new Uint8Array(serverResponse));}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}Widevine.__dashjs_factory_name='Widevine';exports.default=dashjs.FactoryMaker.getSingletonFactory(Widevine);/* jshint ignore:line */\\n//# sourceMappingURL=Widevine.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc A collection of ClearKey encryption keys with an (optional) associated\\n *  type\\n * @ignore\\n */var ClearKeyKeySet=function(){/**\\n     * @param {Array.<KeyPair>} keyPairs\\n     * @param {string} type the type of keys in this set.  One of either 'persistent'\\n     * or 'temporary'.  Can also be null or undefined.\\n     * @class\\n     * @ignore\\n     */function ClearKeyKeySet(keyPairs,type){_classCallCheck(this,ClearKeyKeySet);if(type&&type!=='persistent'&&type!=='temporary')throw new Error('Invalid ClearKey key set type!  Must be one of \\\\'persistent\\\\' or \\\\'temporary\\\\'');this.keyPairs=keyPairs;this.type=type;}/**\\n     * Convert this key set to its JSON Web Key (JWK) representation\\n     *\\n     * @return {ArrayBuffer} JWK object UTF-8 encoded as ArrayBuffer\\n     */_createClass(ClearKeyKeySet,[{key:'toJWK',value:function toJWK(){var i=void 0;var numKeys=this.keyPairs.length;var jwk={keys:[]};for(i=0;i<numKeys;i++){var key={kty:'oct',alg:'A128KW',kid:this.keyPairs[i].keyID,k:this.keyPairs[i].key};jwk.keys.push(key);}if(this.type){jwk.type=this.type;}var jwkString=JSON.stringify(jwk);var len=jwkString.length;// Convert JSON string to ArrayBuffer\\nvar buf=new ArrayBuffer(len);var bView=new Uint8Array(buf);for(i=0;i<len;i++){bView[i]=jwkString.charCodeAt(i);}return buf;}}]);return ClearKeyKeySet;}();exports.default=ClearKeyKeySet;\\n//# sourceMappingURL=ClearKeyKeySet.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc EME-independent KeyMessage\\n * @ignore\\n */var KeyMessage=/**\\n     * @param {SessionToken} sessionToken the session\\n     * to which the key message is associated\\n     * @param {ArrayBuffer} message the key message\\n     * @param {string} defaultURL license acquisition URL provided by the CDM\\n     * @param {string} messageType Supported message types can be found\\n     * {@link https://w3c.github.io/encrypted-media/#idl-def-MediaKeyMessageType|here}.\\n     * @class\\n     */function KeyMessage(sessionToken,message,defaultURL,messageType){_classCallCheck(this,KeyMessage);this.sessionToken=sessionToken;this.message=message;this.defaultURL=defaultURL;this.messageType=messageType?messageType:'license-request';};exports.default=KeyMessage;\\n//# sourceMappingURL=KeyMessage.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Represents a 128-bit keyID and 128-bit encryption key\\n * @ignore\\n */var KeyPair=/**\\n     * @param {string} keyID 128-bit key ID, base64 encoded, with no padding\\n     * @param {string} key 128-bit encryption key, base64 encoded, with no padding\\n     * @class\\n     * @ignore\\n     */function KeyPair(keyID,key){_classCallCheck(this,KeyPair);this.keyID=keyID;this.key=key;};exports.default=KeyPair;\\n//# sourceMappingURL=KeyPair.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Creates a new key system access token.  Represents a valid key system for\\n * given piece of content and key system requirements.  Used to initialize license\\n * acquisition operations.\\n * @ignore\\n */var KeySystemAccess=/**\\n     * @param {MediaPlayer.dependencies.protection.KeySystem} keySystem the key system\\n     * @param {KeySystemConfiguration} ksConfiguration the\\n     * subset of configurations passed to the key system access request that are supported\\n     * by this user agent\\n     * @class\\n     * @ignore\\n     */function KeySystemAccess(keySystem,ksConfiguration){_classCallCheck(this,KeySystemAccess);this.keySystem=keySystem;this.ksConfiguration=ksConfiguration;};exports.default=KeySystemAccess;\\n//# sourceMappingURL=KeySystemAccess.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\":\n/*!**********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js ***!\n  \\**********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Represents a set of configurations that describe the capabilities desired for\\n *  support by a given CDM\\n * @ignore\\n */var KeySystemConfiguration=/**\\n     * @param {Array.<MediaCapability>} audioCapabilities array of\\n     * desired audio capabilities.  Higher preference capabilities should be placed earlier\\n     * in the array.\\n     * @param {Array.<MediaCapability>} videoCapabilities array of\\n     * desired video capabilities.  Higher preference capabilities should be placed earlier\\n     * in the array.\\n     * @param {string} distinctiveIdentifier desired use of distinctive identifiers.\\n     * One of \\\"required\\\", \\\"optional\\\", or \\\"not-allowed\\\"\\n     * @param {string} persistentState desired support for persistent storage of\\n     * key systems.  One of \\\"required\\\", \\\"optional\\\", or \\\"not-allowed\\\"\\n     * @param {Array.<string>} sessionTypes List of session types that must\\n     * be supported by the key system\\n     * @class\\n     */function KeySystemConfiguration(audioCapabilities,videoCapabilities,distinctiveIdentifier,persistentState,sessionTypes){_classCallCheck(this,KeySystemConfiguration);this.initDataTypes=['cenc'];if(audioCapabilities&&audioCapabilities.length){this.audioCapabilities=audioCapabilities;}if(videoCapabilities&&videoCapabilities.length){this.videoCapabilities=videoCapabilities;}this.distinctiveIdentifier=distinctiveIdentifier;this.persistentState=persistentState;this.sessionTypes=sessionTypes;};exports.default=KeySystemConfiguration;\\n//# sourceMappingURL=KeySystemConfiguration.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Defines a license request\\n * @ignore\\n */var LicenseRequest=/**\\n     * Defines a license request\\n     *\\n     * @class\\n     */function LicenseRequest(url,method,responseType,headers,withCredentials,messageType,sessionId,data){_classCallCheck(this,LicenseRequest);/**\\n         * The license request url\\n         */this.url=url;/**\\n         * The HTTP method\\n         */this.method=method;/**\\n         * The HTTP response type\\n         */this.responseType=responseType;/**\\n         * The HTP request headers\\n         */this.headers=headers;/**\\n         * Wether request is done using credentials (cross-site cookies)\\n         */this.withCredentials=withCredentials;/**\\n         * The license request message type (see https://www.w3.org/TR/encrypted-media/#dom-mediakeymessagetype)\\n         */this.messageType=messageType;/**\\n         * The corresponding EME session ID\\n         */this.sessionId=sessionId;/**\\n         * The license request data\\n         */this.data=data;};exports.default=LicenseRequest;\\n//# sourceMappingURL=LicenseRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Defines a license response\\n */var LicenseResponse=/**\\n     * Defines a license request\\n     *\\n     * @class\\n     * @ignore\\n     */function LicenseResponse(url,headers,data){_classCallCheck(this,LicenseResponse);/**\\n         * The url that was loaded, that can be redirected from original request url\\n         */this.url=url;/**\\n         * The HTP response headers\\n         */this.headers=headers;/**\\n         * The license response data\\n         */this.data=data;};exports.default=LicenseResponse;\\n//# sourceMappingURL=LicenseResponse.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc A media capability\\n * @ignore\\n */var MediaCapability=/**\\n     * @param {string} contentType MIME type and codecs (RFC6386)\\n     * @param {string} robustness\\n     * @class\\n     * @ignore\\n     */function MediaCapability(contentType,robustness){_classCallCheck(this,MediaCapability);this.contentType=contentType;this.robustness=robustness;};exports.default=MediaCapability;\\n//# sourceMappingURL=MediaCapability.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc NeedKey\\n * @ignore\\n */var NeedKey=/**\\n     * @param {ArrayBuffer} initData the initialization data\\n     * @param {string} initDataType initialization data type\\n     * @class\\n     */function NeedKey(initData,initDataType){_classCallCheck(this,NeedKey);this.initData=initData;this.initDataType=initDataType;};exports.default=NeedKey;\\n//# sourceMappingURL=NeedKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js\":\n/*!************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js ***!\n  \\************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DroppedFramesHistory(){var values=[];var lastDroppedFrames=0;var lastTotalFrames=0;function push(index,playbackQuality){var droppedVideoFrames=playbackQuality&&playbackQuality.droppedVideoFrames?playbackQuality.droppedVideoFrames:0;var totalVideoFrames=playbackQuality&&playbackQuality.totalVideoFrames?playbackQuality.totalVideoFrames:0;var intervalDroppedFrames=droppedVideoFrames-lastDroppedFrames;lastDroppedFrames=droppedVideoFrames;var intervalTotalFrames=totalVideoFrames-lastTotalFrames;lastTotalFrames=totalVideoFrames;if(!isNaN(index)){if(!values[index]){values[index]={droppedVideoFrames:intervalDroppedFrames,totalVideoFrames:intervalTotalFrames};}else{values[index].droppedVideoFrames+=intervalDroppedFrames;values[index].totalVideoFrames+=intervalTotalFrames;}}}function getDroppedFrameHistory(){return values;}function reset(playbackQuality){values=[];lastDroppedFrames=playbackQuality.droppedVideoFrames;lastTotalFrames=playbackQuality.totalVideoFrames;}return{push:push,getFrameHistory:getDroppedFrameHistory,reset:reset};}DroppedFramesHistory.__dashjs_factory_name='DroppedFramesHistory';var factory=_FactoryMaker2.default.getClassFactory(DroppedFramesHistory);exports.default=factory;\\n//# sourceMappingURL=DroppedFramesHistory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RulesContext(config){config=config||{};var instance=void 0;var abrController=config.abrController;var switchHistory=config.switchHistory;var droppedFramesHistory=config.droppedFramesHistory;var currentRequest=config.currentRequest;var bufferOccupancyABR=config.useBufferOccupancyABR;var l2AABR=config.useL2AABR;var loLP=config.useLoLPABR;var scheduleController=config.streamProcessor?config.streamProcessor.getScheduleController():null;var representationInfo=config.streamProcessor?config.streamProcessor.getRepresentationInfo():null;var videoModel=config.videoModel?config.videoModel:null;function getMediaType(){var mediaInfo=getMediaInfo();return mediaInfo?mediaInfo.type:null;}function getStreamInfo(){var mediaInfo=getMediaInfo();return mediaInfo?mediaInfo.streamInfo:null;}function getMediaInfo(){return representationInfo?representationInfo.mediaInfo:null;}function getRepresentationInfo(){return representationInfo;}function getScheduleController(){return scheduleController;}function getAbrController(){return abrController;}function getSwitchHistory(){return switchHistory;}function getVideoModel(){return videoModel;}function getDroppedFramesHistory(){return droppedFramesHistory;}function getCurrentRequest(){return currentRequest;}function useBufferOccupancyABR(){return bufferOccupancyABR;}function useL2AABR(){return l2AABR;}function useLoLPABR(){return loLP;}instance={getMediaType:getMediaType,getMediaInfo:getMediaInfo,getDroppedFramesHistory:getDroppedFramesHistory,getCurrentRequest:getCurrentRequest,getSwitchHistory:getSwitchHistory,getStreamInfo:getStreamInfo,getScheduleController:getScheduleController,getAbrController:getAbrController,getRepresentationInfo:getRepresentationInfo,useBufferOccupancyABR:useBufferOccupancyABR,useL2AABR:useL2AABR,useLoLPABR:useLoLPABR,getVideoModel:getVideoModel};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RulesContext.__dashjs_factory_name='RulesContext';exports.default=_FactoryMaker2.default.getClassFactory(RulesContext);\\n//# sourceMappingURL=RulesContext.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var NO_CHANGE=-1;/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var PRIORITY={DEFAULT:0.5,STRONG:1,WEAK:0};function SwitchRequest(q,r,p){//TODO refactor all the calls to this to use config to be like everything else.\\nvar instance=void 0,quality=void 0,priority=void 0,reason=void 0;// check priority value\\nfunction getPriority(p){var ret=PRIORITY.DEFAULT;// check that p is one of declared priority value\\nif(p===PRIORITY.DEFAULT||p===PRIORITY.STRONG||p===PRIORITY.WEAK){ret=p;}return ret;}// init attributes\\nquality=q===undefined?NO_CHANGE:q;priority=getPriority(p);reason=r===undefined?null:r;instance={quality:quality,reason:reason,priority:priority};return instance;}SwitchRequest.__dashjs_factory_name='SwitchRequest';var factory=_FactoryMaker2.default.getClassFactory(SwitchRequest);factory.NO_CHANGE=NO_CHANGE;factory.PRIORITY=PRIORITY;_FactoryMaker2.default.updateClassFactory(SwitchRequest.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=SwitchRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js\":\n/*!************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js ***!\n  \\************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SwitchRequest=__webpack_require__(/*! ./SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var SWITCH_REQUEST_HISTORY_DEPTH=8;// must be > SwitchHistoryRule SAMPLE_SIZE to enable rule\\nfunction SwitchRequestHistory(){var switchRequests=[];// running total\\nvar srHistory=[];// history of each switch\\nfunction push(switchRequest){if(switchRequest.newValue===_SwitchRequest2.default.NO_CHANGE){switchRequest.newValue=switchRequest.oldValue;}if(!switchRequests[switchRequest.oldValue]){switchRequests[switchRequest.oldValue]={noDrops:0,drops:0,dropSize:0};}// Set switch details\\nvar indexDiff=switchRequest.newValue-switchRequest.oldValue;var drop=indexDiff<0?1:0;var dropSize=drop?-indexDiff:0;var noDrop=drop?0:1;// Update running totals\\nswitchRequests[switchRequest.oldValue].drops+=drop;switchRequests[switchRequest.oldValue].dropSize+=dropSize;switchRequests[switchRequest.oldValue].noDrops+=noDrop;// Save to history\\nsrHistory.push({idx:switchRequest.oldValue,noDrop:noDrop,drop:drop,dropSize:dropSize});// Shift earliest switch off srHistory and readjust to keep depth of running totals constant\\nif(srHistory.length>SWITCH_REQUEST_HISTORY_DEPTH){var srHistoryFirst=srHistory.shift();switchRequests[srHistoryFirst.idx].drops-=srHistoryFirst.drop;switchRequests[srHistoryFirst.idx].dropSize-=srHistoryFirst.dropSize;switchRequests[srHistoryFirst.idx].noDrops-=srHistoryFirst.noDrop;}}function getSwitchRequests(){return switchRequests;}function reset(){switchRequests=[];srHistory=[];}return{push:push,getSwitchRequests:getSwitchRequests,reset:reset};}SwitchRequestHistory.__dashjs_factory_name='SwitchRequestHistory';var factory=_FactoryMaker2.default.getClassFactory(SwitchRequestHistory);exports.default=factory;\\n//# sourceMappingURL=SwitchRequestHistory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// throughput generally stored in kbit/s\\n// latency generally stored in ms\\n/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2017, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ThroughputHistory(config){config=config||{};// sliding window constants\\nvar MAX_MEASUREMENTS_TO_KEEP=20;var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE=3;var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD=4;var AVERAGE_LATENCY_SAMPLE_AMOUNT=4;var THROUGHPUT_DECREASE_SCALE=1.3;var THROUGHPUT_INCREASE_SCALE=1.3;// EWMA constants\\nvar EWMA_THROUGHPUT_SLOW_HALF_LIFE_SECONDS=8;var EWMA_THROUGHPUT_FAST_HALF_LIFE_SECONDS=3;var EWMA_LATENCY_SLOW_HALF_LIFE_COUNT=2;var EWMA_LATENCY_FAST_HALF_LIFE_COUNT=1;var settings=config.settings;var throughputDict=void 0,latencyDict=void 0,ewmaThroughputDict=void 0,ewmaLatencyDict=void 0,ewmaHalfLife=void 0;function setup(){ewmaHalfLife={throughputHalfLife:{fast:EWMA_THROUGHPUT_FAST_HALF_LIFE_SECONDS,slow:EWMA_THROUGHPUT_SLOW_HALF_LIFE_SECONDS},latencyHalfLife:{fast:EWMA_LATENCY_FAST_HALF_LIFE_COUNT,slow:EWMA_LATENCY_SLOW_HALF_LIFE_COUNT}};reset();}function isCachedResponse(mediaType,latencyMs,downloadTimeMs){if(mediaType===_Constants2.default.VIDEO){return downloadTimeMs<settings.get().streaming.cacheLoadThresholds[_Constants2.default.VIDEO];}else if(mediaType===_Constants2.default.AUDIO){return downloadTimeMs<settings.get().streaming.cacheLoadThresholds[_Constants2.default.AUDIO];}}function push(mediaType,httpRequest,useDeadTimeLatency){if(!httpRequest.trace||!httpRequest.trace.length){return;}var latencyTimeInMilliseconds=httpRequest.tresponse.getTime()-httpRequest.trequest.getTime()||1;var downloadTimeInMilliseconds=httpRequest._tfinish.getTime()-httpRequest.tresponse.getTime()||1;//Make sure never 0 we divide by this value. Avoid infinity!\\nvar downloadBytes=httpRequest.trace.reduce(function(a,b){return a+b.b[0];},0);var throughputMeasureTime=void 0;if(settings.get().streaming.lowLatencyEnabled){throughputMeasureTime=httpRequest.trace.reduce(function(a,b){return a+b.d;},0);}else{throughputMeasureTime=useDeadTimeLatency?downloadTimeInMilliseconds:latencyTimeInMilliseconds+downloadTimeInMilliseconds;}var throughput=Math.round(8*downloadBytes/throughputMeasureTime);// bits/ms = kbits/s\\ncheckSettingsForMediaType(mediaType);if(isCachedResponse(mediaType,latencyTimeInMilliseconds,downloadTimeInMilliseconds)){if(throughputDict[mediaType].length>0&&!throughputDict[mediaType].hasCachedEntries){// already have some entries which are not cached entries\\n// prevent cached fragment loads from skewing the average values\\nreturn;}else{// have no entries || have cached entries\\n// no uncached entries yet, rely on cached entries because ABR rules need something to go by\\nthroughputDict[mediaType].hasCachedEntries=true;}}else if(throughputDict[mediaType]&&throughputDict[mediaType].hasCachedEntries){// if we are here then we have some entries already, but they are cached, and now we have a new uncached entry\\nclearSettingsForMediaType(mediaType);}throughputDict[mediaType].push(throughput);if(throughputDict[mediaType].length>MAX_MEASUREMENTS_TO_KEEP){throughputDict[mediaType].shift();}latencyDict[mediaType].push(latencyTimeInMilliseconds);if(latencyDict[mediaType].length>MAX_MEASUREMENTS_TO_KEEP){latencyDict[mediaType].shift();}updateEwmaEstimate(ewmaThroughputDict[mediaType],throughput,0.001*downloadTimeInMilliseconds,ewmaHalfLife.throughputHalfLife);updateEwmaEstimate(ewmaLatencyDict[mediaType],latencyTimeInMilliseconds,1,ewmaHalfLife.latencyHalfLife);}function updateEwmaEstimate(ewmaObj,value,weight,halfLife){// Note about startup:\\n// Estimates start at 0, so early values are underestimated.\\n// This effect is countered in getAverageEwma() by dividing the estimates by:\\n//     1 - Math.pow(0.5, ewmaObj.totalWeight / halfLife)\\nvar fastAlpha=Math.pow(0.5,weight/halfLife.fast);ewmaObj.fastEstimate=(1-fastAlpha)*value+fastAlpha*ewmaObj.fastEstimate;var slowAlpha=Math.pow(0.5,weight/halfLife.slow);ewmaObj.slowEstimate=(1-slowAlpha)*value+slowAlpha*ewmaObj.slowEstimate;ewmaObj.totalWeight+=weight;}function getSampleSize(isThroughput,mediaType,isLive){var arr=void 0,sampleSize=void 0;if(isThroughput){arr=throughputDict[mediaType];sampleSize=isLive?AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE:AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD;}else{arr=latencyDict[mediaType];sampleSize=AVERAGE_LATENCY_SAMPLE_AMOUNT;}if(!arr){sampleSize=0;}else if(sampleSize>=arr.length){sampleSize=arr.length;}else if(isThroughput){// if throughput samples vary a lot, average over a wider sample\\nfor(var i=1;i<sampleSize;++i){var ratio=arr[arr.length-i]/arr[arr.length-i-1];if(ratio>=THROUGHPUT_INCREASE_SCALE||ratio<=1/THROUGHPUT_DECREASE_SCALE){sampleSize+=1;if(sampleSize===arr.length){// cannot increase sampleSize beyond arr.length\\nbreak;}}}}return sampleSize;}function getAverage(isThroughput,mediaType,isDynamic){// only two moving average methods defined at the moment\\nreturn settings.get().streaming.abr.movingAverageMethod!==_Constants2.default.MOVING_AVERAGE_SLIDING_WINDOW?getAverageEwma(isThroughput,mediaType):getAverageSlidingWindow(isThroughput,mediaType,isDynamic);}function getAverageSlidingWindow(isThroughput,mediaType,isDynamic){var sampleSize=getSampleSize(isThroughput,mediaType,isDynamic);var dict=isThroughput?throughputDict:latencyDict;var arr=dict[mediaType];if(sampleSize===0||!arr||arr.length===0){return NaN;}arr=arr.slice(-sampleSize);// still works if sampleSize too large\\n// arr.length >= 1\\nreturn arr.reduce(function(total,elem){return total+elem;})/arr.length;}function getAverageEwma(isThroughput,mediaType){var halfLife=isThroughput?ewmaHalfLife.throughputHalfLife:ewmaHalfLife.latencyHalfLife;var ewmaObj=isThroughput?ewmaThroughputDict[mediaType]:ewmaLatencyDict[mediaType];if(!ewmaObj||ewmaObj.totalWeight<=0){return NaN;}// to correct for startup, divide by zero factor = 1 - Math.pow(0.5, ewmaObj.totalWeight / halfLife)\\nvar fastEstimate=ewmaObj.fastEstimate/(1-Math.pow(0.5,ewmaObj.totalWeight/halfLife.fast));var slowEstimate=ewmaObj.slowEstimate/(1-Math.pow(0.5,ewmaObj.totalWeight/halfLife.slow));return isThroughput?Math.min(fastEstimate,slowEstimate):Math.max(fastEstimate,slowEstimate);}function getAverageThroughput(mediaType,isDynamic){return getAverage(true,mediaType,isDynamic);}function getSafeAverageThroughput(mediaType,isDynamic){var average=getAverageThroughput(mediaType,isDynamic);if(!isNaN(average)){average*=settings.get().streaming.abr.bandwidthSafetyFactor;}return average;}function getAverageLatency(mediaType){return getAverage(false,mediaType);}function checkSettingsForMediaType(mediaType){throughputDict[mediaType]=throughputDict[mediaType]||[];latencyDict[mediaType]=latencyDict[mediaType]||[];ewmaThroughputDict[mediaType]=ewmaThroughputDict[mediaType]||{fastEstimate:0,slowEstimate:0,totalWeight:0};ewmaLatencyDict[mediaType]=ewmaLatencyDict[mediaType]||{fastEstimate:0,slowEstimate:0,totalWeight:0};}function clearSettingsForMediaType(mediaType){delete throughputDict[mediaType];delete latencyDict[mediaType];delete ewmaThroughputDict[mediaType];delete ewmaLatencyDict[mediaType];checkSettingsForMediaType(mediaType);}function reset(){throughputDict={};latencyDict={};ewmaThroughputDict={};ewmaLatencyDict={};}var instance={push:push,getAverageThroughput:getAverageThroughput,getSafeAverageThroughput:getSafeAverageThroughput,getAverageLatency:getAverageLatency,reset:reset};setup();return instance;}ThroughputHistory.__dashjs_factory_name='ThroughputHistory';exports.default=_FactoryMaker2.default.getClassFactory(ThroughputHistory);\\n//# sourceMappingURL=ThroughputHistory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ThroughputRule=__webpack_require__(/*! ./ThroughputRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js\\\");var _ThroughputRule2=_interopRequireDefault(_ThroughputRule);var _InsufficientBufferRule=__webpack_require__(/*! ./InsufficientBufferRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js\\\");var _InsufficientBufferRule2=_interopRequireDefault(_InsufficientBufferRule);var _AbandonRequestsRule=__webpack_require__(/*! ./AbandonRequestsRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js\\\");var _AbandonRequestsRule2=_interopRequireDefault(_AbandonRequestsRule);var _DroppedFramesRule=__webpack_require__(/*! ./DroppedFramesRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js\\\");var _DroppedFramesRule2=_interopRequireDefault(_DroppedFramesRule);var _SwitchHistoryRule=__webpack_require__(/*! ./SwitchHistoryRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js\\\");var _SwitchHistoryRule2=_interopRequireDefault(_SwitchHistoryRule);var _BolaRule=__webpack_require__(/*! ./BolaRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js\\\");var _BolaRule2=_interopRequireDefault(_BolaRule);var _L2ARule=__webpack_require__(/*! ./L2ARule.js */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js\\\");var _L2ARule2=_interopRequireDefault(_L2ARule);var _LoLpRule=__webpack_require__(/*! ./lolp/LoLpRule.js */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js\\\");var _LoLpRule2=_interopRequireDefault(_LoLpRule);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var QUALITY_SWITCH_RULES='qualitySwitchRules';/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var ABANDON_FRAGMENT_RULES='abandonFragmentRules';function ABRRulesCollection(config){config=config||{};var context=this.context;var mediaPlayerModel=config.mediaPlayerModel;var dashMetrics=config.dashMetrics;var settings=config.settings;var instance=void 0,qualitySwitchRules=void 0,abandonFragmentRules=void 0;function initialize(){qualitySwitchRules=[];abandonFragmentRules=[];if(settings.get().streaming.abr.useDefaultABRRules){// If L2A is used we only need this one rule\\nif(settings.get().streaming.abr.ABRStrategy===_Constants2.default.ABR_STRATEGY_L2A){qualitySwitchRules.push((0,_L2ARule2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings}));}// If LoLP is used we only need this one rule\\nelse if(settings.get().streaming.abr.ABRStrategy===_Constants2.default.ABR_STRATEGY_LoLP){qualitySwitchRules.push((0,_LoLpRule2.default)(context).create({dashMetrics:dashMetrics}));}else{// Only one of BolaRule and ThroughputRule will give a switchRequest.quality !== SwitchRequest.NO_CHANGE.\\n// This is controlled by useBufferOccupancyABR mechanism in AbrController.\\nqualitySwitchRules.push((0,_BolaRule2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings}));qualitySwitchRules.push((0,_ThroughputRule2.default)(context).create({dashMetrics:dashMetrics}));qualitySwitchRules.push((0,_InsufficientBufferRule2.default)(context).create({dashMetrics:dashMetrics}));qualitySwitchRules.push((0,_SwitchHistoryRule2.default)(context).create());qualitySwitchRules.push((0,_DroppedFramesRule2.default)(context).create());abandonFragmentRules.push((0,_AbandonRequestsRule2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings}));}}// add custom ABR rules if any\\nvar customRules=mediaPlayerModel.getABRCustomRules();customRules.forEach(function(rule){if(rule.type===QUALITY_SWITCH_RULES){qualitySwitchRules.push(rule.rule(context).create());}if(rule.type===ABANDON_FRAGMENT_RULES){abandonFragmentRules.push(rule.rule(context).create());}});}function getActiveRules(srArray){return srArray.filter(function(sr){return sr.quality>_SwitchRequest2.default.NO_CHANGE;});}/**\\n     *\\n     * @param {array} srArray\\n     * @return {object} SwitchRequest\\n     */function getMinSwitchRequest(srArray){var values={};var newSwitchReq=null;var i=void 0,len=void 0,req=void 0,quality=void 0,reason=void 0;if(srArray.length===0){return;}values[_SwitchRequest2.default.PRIORITY.STRONG]={quality:_SwitchRequest2.default.NO_CHANGE,reason:null};values[_SwitchRequest2.default.PRIORITY.WEAK]={quality:_SwitchRequest2.default.NO_CHANGE,reason:null};values[_SwitchRequest2.default.PRIORITY.DEFAULT]={quality:_SwitchRequest2.default.NO_CHANGE,reason:null};for(i=0,len=srArray.length;i<len;i+=1){req=srArray[i];if(req.quality!==_SwitchRequest2.default.NO_CHANGE){// We only use the new quality in case it is lower than the already saved one or if no new quality has been selected for the respective priority\\nif(values[req.priority].quality===_SwitchRequest2.default.NO_CHANGE||values[req.priority].quality>req.quality){values[req.priority].quality=req.quality;values[req.priority].reason=req.reason||null;}}}if(values[_SwitchRequest2.default.PRIORITY.WEAK].quality!==_SwitchRequest2.default.NO_CHANGE){newSwitchReq=values[_SwitchRequest2.default.PRIORITY.WEAK];}if(values[_SwitchRequest2.default.PRIORITY.DEFAULT].quality!==_SwitchRequest2.default.NO_CHANGE){newSwitchReq=values[_SwitchRequest2.default.PRIORITY.DEFAULT];}if(values[_SwitchRequest2.default.PRIORITY.STRONG].quality!==_SwitchRequest2.default.NO_CHANGE){newSwitchReq=values[_SwitchRequest2.default.PRIORITY.STRONG];}if(newSwitchReq){quality=newSwitchReq.quality;reason=newSwitchReq.reason;}return(0,_SwitchRequest2.default)(context).create(quality,reason);}function getMaxQuality(rulesContext){var switchRequestArray=qualitySwitchRules.map(function(rule){return rule.getMaxIndex(rulesContext);});var activeRules=getActiveRules(switchRequestArray);var maxQuality=getMinSwitchRequest(activeRules);return maxQuality||(0,_SwitchRequest2.default)(context).create();}function shouldAbandonFragment(rulesContext){var abandonRequestArray=abandonFragmentRules.map(function(rule){return rule.shouldAbandon(rulesContext);});var activeRules=getActiveRules(abandonRequestArray);var shouldAbandon=getMinSwitchRequest(activeRules);return shouldAbandon||(0,_SwitchRequest2.default)(context).create();}function reset(){[qualitySwitchRules,abandonFragmentRules].forEach(function(rules){if(rules&&rules.length){rules.forEach(function(rule){return rule.reset&&rule.reset();});}});qualitySwitchRules=[];abandonFragmentRules=[];}function getQualitySwitchRules(){return qualitySwitchRules;}instance={initialize:initialize,reset:reset,getMaxQuality:getMaxQuality,getMinSwitchRequest:getMinSwitchRequest,shouldAbandonFragment:shouldAbandonFragment,getQualitySwitchRules:getQualitySwitchRules};return instance;}ABRRulesCollection.__dashjs_factory_name='ABRRulesCollection';var factory=_FactoryMaker2.default.getClassFactory(ABRRulesCollection);factory.QUALITY_SWITCH_RULES=QUALITY_SWITCH_RULES;factory.ABANDON_FRAGMENT_RULES=ABANDON_FRAGMENT_RULES;_FactoryMaker2.default.updateSingletonFactory(ABRRulesCollection.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=ABRRulesCollection.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function AbandonRequestsRule(config){config=config||{};var ABANDON_MULTIPLIER=1.8;var GRACE_TIME_THRESHOLD=500;var MIN_LENGTH_TO_AVERAGE=5;var context=this.context;var mediaPlayerModel=config.mediaPlayerModel;var dashMetrics=config.dashMetrics;var settings=config.settings;var instance=void 0,logger=void 0,fragmentDict=void 0,abandonDict=void 0,throughputArray=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}function setFragmentRequestDict(type,id){fragmentDict[type]=fragmentDict[type]||{};fragmentDict[type][id]=fragmentDict[type][id]||{};}function storeLastRequestThroughputByType(type,throughput){throughputArray[type]=throughputArray[type]||[];throughputArray[type].push(throughput);}function shouldAbandon(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create(_SwitchRequest2.default.NO_CHANGE,{name:AbandonRequestsRule.__dashjs_factory_name});if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('getCurrentRequest')||!rulesContext.hasOwnProperty('getRepresentationInfo')||!rulesContext.hasOwnProperty('getAbrController')){return switchRequest;}var mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var req=rulesContext.getCurrentRequest();if(!isNaN(req.index)){setFragmentRequestDict(mediaType,req.index);var stableBufferTime=mediaPlayerModel.getStableBufferTime();var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);if(bufferLevel>stableBufferTime){return switchRequest;}var fragmentInfo=fragmentDict[mediaType][req.index];if(fragmentInfo===null||req.firstByteDate===null||abandonDict.hasOwnProperty(fragmentInfo.id)){return switchRequest;}//setup some init info based on first progress event\\nif(fragmentInfo.firstByteTime===undefined){throughputArray[mediaType]=[];fragmentInfo.firstByteTime=req.firstByteDate.getTime();fragmentInfo.segmentDuration=req.duration;fragmentInfo.bytesTotal=req.bytesTotal;fragmentInfo.id=req.index;}fragmentInfo.bytesLoaded=req.bytesLoaded;fragmentInfo.elapsedTime=new Date().getTime()-fragmentInfo.firstByteTime;if(fragmentInfo.bytesLoaded>0&&fragmentInfo.elapsedTime>0){storeLastRequestThroughputByType(mediaType,Math.round(fragmentInfo.bytesLoaded*8/fragmentInfo.elapsedTime));}if(throughputArray[mediaType].length>=MIN_LENGTH_TO_AVERAGE&&fragmentInfo.elapsedTime>GRACE_TIME_THRESHOLD&&fragmentInfo.bytesLoaded<fragmentInfo.bytesTotal){var totalSampledValue=throughputArray[mediaType].reduce(function(a,b){return a+b;},0);fragmentInfo.measuredBandwidthInKbps=Math.round(totalSampledValue/throughputArray[mediaType].length);fragmentInfo.estimatedTimeOfDownload=+(fragmentInfo.bytesTotal*8/fragmentInfo.measuredBandwidthInKbps/1000).toFixed(2);if(fragmentInfo.estimatedTimeOfDownload<fragmentInfo.segmentDuration*ABANDON_MULTIPLIER||rulesContext.getRepresentationInfo().quality===0){return switchRequest;}else if(!abandonDict.hasOwnProperty(fragmentInfo.id)){var abrController=rulesContext.getAbrController();var bytesRemaining=fragmentInfo.bytesTotal-fragmentInfo.bytesLoaded;var bitrateList=abrController.getBitrateList(mediaInfo);var quality=abrController.getQualityForBitrate(mediaInfo,fragmentInfo.measuredBandwidthInKbps*settings.get().streaming.abr.bandwidthSafetyFactor);var minQuality=abrController.getMinAllowedIndexFor(mediaType);var newQuality=minQuality!==undefined?Math.max(minQuality,quality):quality;var estimateOtherBytesTotal=fragmentInfo.bytesTotal*bitrateList[newQuality].bitrate/bitrateList[abrController.getQualityFor(mediaType)].bitrate;if(bytesRemaining>estimateOtherBytesTotal){switchRequest.quality=newQuality;switchRequest.reason.throughput=fragmentInfo.measuredBandwidthInKbps;switchRequest.reason.fragmentID=fragmentInfo.id;abandonDict[fragmentInfo.id]=fragmentInfo;logger.debug('['+mediaType+'] frag id',fragmentInfo.id,' is asking to abandon and switch to quality to ',newQuality,' measured bandwidth was',fragmentInfo.measuredBandwidthInKbps);delete fragmentDict[mediaType][fragmentInfo.id];}}}else if(fragmentInfo.bytesLoaded===fragmentInfo.bytesTotal){delete fragmentDict[mediaType][fragmentInfo.id];}}return switchRequest;}function reset(){fragmentDict={};abandonDict={};throughputArray=[];}instance={shouldAbandon:shouldAbandon,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */AbandonRequestsRule.__dashjs_factory_name='AbandonRequestsRule';exports.default=_FactoryMaker2.default.getClassFactory(AbandonRequestsRule);\\n//# sourceMappingURL=AbandonRequestsRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _HTTPRequest=__webpack_require__(/*! ../../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _EventBus=__webpack_require__(/*! ../../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// BOLA_STATE_ONE_BITRATE   : If there is only one bitrate (or initialization failed), always return NO_CHANGE.\\n// BOLA_STATE_STARTUP       : Set placeholder buffer such that we download fragments at most recently measured throughput.\\n// BOLA_STATE_STEADY        : Buffer primed, we switch to steady operation.\\n// TODO: add BOLA_STATE_SEEK and tune BOLA behavior on seeking\\nvar BOLA_STATE_ONE_BITRATE=0;/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2016, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */// For a description of the BOLA adaptive bitrate (ABR) algorithm, see http://arxiv.org/abs/1601.06748\\nvar BOLA_STATE_STARTUP=1;var BOLA_STATE_STEADY=2;var MINIMUM_BUFFER_S=10;// BOLA should never add artificial delays if buffer is less than MINIMUM_BUFFER_S.\\nvar MINIMUM_BUFFER_PER_BITRATE_LEVEL_S=2;// E.g. if there are 5 bitrates, BOLA switches to top bitrate at buffer = 10 + 5 * 2 = 20s.\\n// If Schedule Controller does not allow buffer to reach that level, it can be achieved through the placeholder buffer level.\\nvar PLACEHOLDER_BUFFER_DECAY=0.99;// Make sure placeholder buffer does not stick around too long.\\nfunction BolaRule(config){config=config||{};var context=this.context;var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,bolaStateDict=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.BUFFER_EMPTY,onBufferEmpty,instance);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.on(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChangeRequested,instance);eventBus.on(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,instance);}function utilitiesFromBitrates(bitrates){return bitrates.map(function(b){return Math.log(b);});// no need to worry about offset, utilities will be offset (uniformly) anyway later\\n}// NOTE: in live streaming, the real buffer level can drop below minimumBufferS, but bola should not stick to lowest bitrate by using a placeholder buffer level\\nfunction calculateBolaParameters(stableBufferTime,bitrates,utilities){var highestUtilityIndex=utilities.reduce(function(highestIndex,u,uIndex){return u>utilities[highestIndex]?uIndex:highestIndex;},0);if(highestUtilityIndex===0){// if highestUtilityIndex === 0, then always use lowest bitrate\\nreturn null;}var bufferTime=Math.max(stableBufferTime,MINIMUM_BUFFER_S+MINIMUM_BUFFER_PER_BITRATE_LEVEL_S*bitrates.length);// TODO: Investigate if following can be better if utilities are not the default Math.log utilities.\\n// If using Math.log utilities, we can choose Vp and gp to always prefer bitrates[0] at minimumBufferS and bitrates[max] at bufferTarget.\\n// (Vp * (utility + gp) - bufferLevel) / bitrate has the maxima described when:\\n// Vp * (utilities[0] + gp - 1) === minimumBufferS and Vp * (utilities[max] + gp - 1) === bufferTarget\\n// giving:\\nvar gp=(utilities[highestUtilityIndex]-1)/(bufferTime/MINIMUM_BUFFER_S-1);var Vp=MINIMUM_BUFFER_S/gp;// note that expressions for gp and Vp assume utilities[0] === 1, which is true because of normalization\\nreturn{gp:gp,Vp:Vp};}function getInitialBolaState(rulesContext){var initialState={};var mediaInfo=rulesContext.getMediaInfo();var bitrates=mediaInfo.bitrateList.map(function(b){return b.bandwidth;});var utilities=utilitiesFromBitrates(bitrates);utilities=utilities.map(function(u){return u-utilities[0]+1;});// normalize\\nvar stableBufferTime=mediaPlayerModel.getStableBufferTime();var params=calculateBolaParameters(stableBufferTime,bitrates,utilities);if(!params){// only happens when there is only one bitrate level\\ninitialState.state=BOLA_STATE_ONE_BITRATE;}else{initialState.state=BOLA_STATE_STARTUP;initialState.bitrates=bitrates;initialState.utilities=utilities;initialState.stableBufferTime=stableBufferTime;initialState.Vp=params.Vp;initialState.gp=params.gp;initialState.lastQuality=0;clearBolaStateOnSeek(initialState);}return initialState;}function clearBolaStateOnSeek(bolaState){bolaState.placeholderBuffer=0;bolaState.mostAdvancedSegmentStart=NaN;bolaState.lastSegmentWasReplacement=false;bolaState.lastSegmentStart=NaN;bolaState.lastSegmentDurationS=NaN;bolaState.lastSegmentRequestTimeMs=NaN;bolaState.lastSegmentFinishTimeMs=NaN;}// If the buffer target is changed (can this happen mid-stream?), then adjust BOLA parameters accordingly.\\nfunction checkBolaStateStableBufferTime(bolaState,mediaType){var stableBufferTime=mediaPlayerModel.getStableBufferTime();if(bolaState.stableBufferTime!==stableBufferTime){var params=calculateBolaParameters(stableBufferTime,bolaState.bitrates,bolaState.utilities);if(params.Vp!==bolaState.Vp||params.gp!==bolaState.gp){// correct placeholder buffer using two criteria:\\n// 1. do not change effective buffer level at effectiveBufferLevel === MINIMUM_BUFFER_S ( === Vp * gp )\\n// 2. scale placeholder buffer by Vp subject to offset indicated in 1.\\nvar bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var effectiveBufferLevel=bufferLevel+bolaState.placeholderBuffer;effectiveBufferLevel-=MINIMUM_BUFFER_S;effectiveBufferLevel*=params.Vp/bolaState.Vp;effectiveBufferLevel+=MINIMUM_BUFFER_S;bolaState.stableBufferTime=stableBufferTime;bolaState.Vp=params.Vp;bolaState.gp=params.gp;bolaState.placeholderBuffer=Math.max(0,effectiveBufferLevel-bufferLevel);}}}function getBolaState(rulesContext){var mediaType=rulesContext.getMediaType();var bolaState=bolaStateDict[mediaType];if(!bolaState){bolaState=getInitialBolaState(rulesContext);bolaStateDict[mediaType]=bolaState;}else if(bolaState.state!==BOLA_STATE_ONE_BITRATE){checkBolaStateStableBufferTime(bolaState,mediaType);}return bolaState;}// The core idea of BOLA.\\nfunction getQualityFromBufferLevel(bolaState,bufferLevel){var bitrateCount=bolaState.bitrates.length;var quality=NaN;var score=NaN;for(var i=0;i<bitrateCount;++i){var s=(bolaState.Vp*(bolaState.utilities[i]+bolaState.gp)-bufferLevel)/bolaState.bitrates[i];if(isNaN(score)||s>=score){score=s;quality=i;}}return quality;}// maximum buffer level which prefers to download at quality rather than wait\\nfunction maxBufferLevelForQuality(bolaState,quality){return bolaState.Vp*(bolaState.utilities[quality]+bolaState.gp);}// the minimum buffer level that would cause BOLA to choose quality rather than a lower bitrate\\nfunction minBufferLevelForQuality(bolaState,quality){var qBitrate=bolaState.bitrates[quality];var qUtility=bolaState.utilities[quality];var min=0;for(var i=quality-1;i>=0;--i){// for each bitrate less than bitrates[quality], BOLA should prefer quality (unless other bitrate has higher utility)\\nif(bolaState.utilities[i]<bolaState.utilities[quality]){var iBitrate=bolaState.bitrates[i];var iUtility=bolaState.utilities[i];var level=bolaState.Vp*(bolaState.gp+(qBitrate*iUtility-iBitrate*qUtility)/(qBitrate-iBitrate));min=Math.max(min,level);// we want min to be small but at least level(i) for all i\\n}}return min;}/*\\n     * The placeholder buffer increases the effective buffer that is used to calculate the bitrate.\\n     * There are two main reasons we might want to increase the placeholder buffer:\\n     *\\n     * 1. When a segment finishes downloading, we would expect to get a call on getMaxIndex() regarding the quality for\\n     *    the next segment. However, there might be a delay before the next call. E.g. when streaming live content, the\\n     *    next segment might not be available yet. If the call to getMaxIndex() does happens after a delay, we don't\\n     *    want the delay to change the BOLA decision - we only want to factor download time to decide on bitrate level.\\n     *\\n     * 2. It is possible to get a call to getMaxIndex() without having a segment download. The buffer target in dash.js\\n     *    is different for top-quality segments and lower-quality segments. If getMaxIndex() returns a lower-than-top\\n     *    quality, then the buffer controller might decide not to download a segment. When dash.js is ready for the next\\n     *    segment, getMaxIndex() will be called again. We don't want this extra delay to factor in the bitrate decision.\\n     */function updatePlaceholderBuffer(bolaState,mediaType){var nowMs=Date.now();if(!isNaN(bolaState.lastSegmentFinishTimeMs)){// compensate for non-bandwidth-derived delays, e.g., live streaming availability, buffer controller\\nvar delay=0.001*(nowMs-bolaState.lastSegmentFinishTimeMs);bolaState.placeholderBuffer+=Math.max(0,delay);}else if(!isNaN(bolaState.lastCallTimeMs)){// no download after last call, compensate for delay between calls\\nvar _delay=0.001*(nowMs-bolaState.lastCallTimeMs);bolaState.placeholderBuffer+=Math.max(0,_delay);}bolaState.lastCallTimeMs=nowMs;bolaState.lastSegmentStart=NaN;bolaState.lastSegmentRequestTimeMs=NaN;bolaState.lastSegmentFinishTimeMs=NaN;checkBolaStateStableBufferTime(bolaState,mediaType);}function onBufferEmpty(){// if we rebuffer, we don't want the placeholder buffer to artificially raise BOLA quality\\nfor(var mediaType in bolaStateDict){if(bolaStateDict.hasOwnProperty(mediaType)&&bolaStateDict[mediaType].state===BOLA_STATE_STEADY){bolaStateDict[mediaType].placeholderBuffer=0;}}}function onPlaybackSeeking(){// TODO: 1. Verify what happens if we seek mid-fragment.\\n// TODO: 2. If e.g. we have 10s fragments and seek, we might want to download the first fragment at a lower quality to restart playback quickly.\\nfor(var mediaType in bolaStateDict){if(bolaStateDict.hasOwnProperty(mediaType)){var bolaState=bolaStateDict[mediaType];if(bolaState.state!==BOLA_STATE_ONE_BITRATE){bolaState.state=BOLA_STATE_STARTUP;// TODO: BOLA_STATE_SEEK?\\nclearBolaStateOnSeek(bolaState);}}}}function onMediaFragmentLoaded(e){if(e&&e.chunk&&e.chunk.mediaInfo){var bolaState=bolaStateDict[e.chunk.mediaInfo.type];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){var start=e.chunk.start;if(isNaN(bolaState.mostAdvancedSegmentStart)||start>bolaState.mostAdvancedSegmentStart){bolaState.mostAdvancedSegmentStart=start;bolaState.lastSegmentWasReplacement=false;}else{bolaState.lastSegmentWasReplacement=true;}bolaState.lastSegmentStart=start;bolaState.lastSegmentDurationS=e.chunk.duration;bolaState.lastQuality=e.chunk.quality;checkNewSegment(bolaState,e.chunk.mediaInfo.type);}}}function onMetricAdded(e){if(e&&e.metric===_MetricsConstants2.default.HTTP_REQUEST&&e.value&&e.value.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var bolaState=bolaStateDict[e.mediaType];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){bolaState.lastSegmentRequestTimeMs=e.value.trequest.getTime();bolaState.lastSegmentFinishTimeMs=e.value._tfinish.getTime();checkNewSegment(bolaState,e.mediaType);}}}/*\\n     * When a new segment is downloaded, we get two notifications: onMediaFragmentLoaded() and onMetricAdded(). It is\\n     * possible that the quality for the downloaded segment was lower (not higher) than the quality indicated by BOLA.\\n     * This might happen because of other rules such as the DroppedFramesRule. When this happens, we trim the\\n     * placeholder buffer to make BOLA more stable. This mechanism also avoids inflating the buffer when BOLA itself\\n     * decides not to increase the quality to avoid oscillations.\\n     *\\n     * We should also check for replacement segments (fast switching). In this case, a segment is downloaded but does\\n     * not grow the actual buffer. Fast switching might cause the buffer to deplete, causing BOLA to drop the bitrate.\\n     * We avoid this by growing the placeholder buffer.\\n     */function checkNewSegment(bolaState,mediaType){if(!isNaN(bolaState.lastSegmentStart)&&!isNaN(bolaState.lastSegmentRequestTimeMs)&&!isNaN(bolaState.placeholderBuffer)){bolaState.placeholderBuffer*=PLACEHOLDER_BUFFER_DECAY;// Find what maximum buffer corresponding to last segment was, and ensure placeholder is not relatively larger.\\nif(!isNaN(bolaState.lastSegmentFinishTimeMs)){var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var bufferAtLastSegmentRequest=bufferLevel+0.001*(bolaState.lastSegmentFinishTimeMs-bolaState.lastSegmentRequestTimeMs);// estimate\\nvar maxEffectiveBufferForLastSegment=maxBufferLevelForQuality(bolaState,bolaState.lastQuality);var maxPlaceholderBuffer=Math.max(0,maxEffectiveBufferForLastSegment-bufferAtLastSegmentRequest);bolaState.placeholderBuffer=Math.min(maxPlaceholderBuffer,bolaState.placeholderBuffer);}// then see if we should grow placeholder buffer\\nif(bolaState.lastSegmentWasReplacement&&!isNaN(bolaState.lastSegmentDurationS)){// compensate for segments that were downloaded but did not grow the buffer\\nbolaState.placeholderBuffer+=bolaState.lastSegmentDurationS;}bolaState.lastSegmentStart=NaN;bolaState.lastSegmentRequestTimeMs=NaN;}}function onQualityChangeRequested(e){// Useful to store change requests when abandoning a download.\\nif(e){var bolaState=bolaStateDict[e.mediaType];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){bolaState.abrQuality=e.newQuality;}}}function onFragmentLoadingAbandoned(e){if(e){var bolaState=bolaStateDict[e.mediaType];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){// deflate placeholderBuffer - note that we want to be conservative when abandoning\\nvar bufferLevel=dashMetrics.getCurrentBufferLevel(e.mediaType);var wantEffectiveBufferLevel=void 0;if(bolaState.abrQuality>0){// deflate to point where BOLA just chooses newQuality over newQuality-1\\nwantEffectiveBufferLevel=minBufferLevelForQuality(bolaState,bolaState.abrQuality);}else{wantEffectiveBufferLevel=MINIMUM_BUFFER_S;}var maxPlaceholderBuffer=Math.max(0,wantEffectiveBufferLevel-bufferLevel);bolaState.placeholderBuffer=Math.min(bolaState.placeholderBuffer,maxPlaceholderBuffer);}}}function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('getScheduleController')||!rulesContext.hasOwnProperty('getStreamInfo')||!rulesContext.hasOwnProperty('getAbrController')||!rulesContext.hasOwnProperty('useBufferOccupancyABR')){return switchRequest;}var mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var scheduleController=rulesContext.getScheduleController();var streamInfo=rulesContext.getStreamInfo();var abrController=rulesContext.getAbrController();var throughputHistory=abrController.getThroughputHistory();var streamId=streamInfo?streamInfo.id:null;var isDynamic=streamInfo&&streamInfo.manifestInfo&&streamInfo.manifestInfo.isDynamic;var useBufferOccupancyABR=rulesContext.useBufferOccupancyABR();switchRequest.reason=switchRequest.reason||{};if(!useBufferOccupancyABR){return switchRequest;}scheduleController.setTimeToLoadDelay(0);var bolaState=getBolaState(rulesContext);if(bolaState.state===BOLA_STATE_ONE_BITRATE){// shouldn't even have been called\\nreturn switchRequest;}var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var throughput=throughputHistory.getAverageThroughput(mediaType,isDynamic);var safeThroughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);var latency=throughputHistory.getAverageLatency(mediaType);var quality=void 0;switchRequest.reason.state=bolaState.state;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;if(isNaN(throughput)){// isNaN(throughput) === isNaN(safeThroughput) === isNaN(latency)\\n// still starting up - not enough information\\nreturn switchRequest;}switch(bolaState.state){case BOLA_STATE_STARTUP:quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);switchRequest.quality=quality;switchRequest.reason.throughput=safeThroughput;bolaState.placeholderBuffer=Math.max(0,minBufferLevelForQuality(bolaState,quality)-bufferLevel);bolaState.lastQuality=quality;if(!isNaN(bolaState.lastSegmentDurationS)&&bufferLevel>=bolaState.lastSegmentDurationS){bolaState.state=BOLA_STATE_STEADY;}break;// BOLA_STATE_STARTUP\\ncase BOLA_STATE_STEADY:// NB: The placeholder buffer is added to bufferLevel to come up with a bitrate.\\n//     This might lead BOLA to be too optimistic and to choose a bitrate that would lead to rebuffering -\\n//     if the real buffer bufferLevel runs out, the placeholder buffer cannot prevent rebuffering.\\n//     However, the InsufficientBufferRule takes care of this scenario.\\nupdatePlaceholderBuffer(bolaState,mediaType);quality=getQualityFromBufferLevel(bolaState,bufferLevel+bolaState.placeholderBuffer);// we want to avoid oscillations\\n// We implement the \\\"BOLA-O\\\" variant: when network bandwidth lies between two encoded bitrate levels, stick to the lowest level.\\nvar qualityForThroughput=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);if(quality>bolaState.lastQuality&&quality>qualityForThroughput){// only intervene if we are trying to *increase* quality to an *unsustainable* level\\n// we are only avoid oscillations - do not drop below last quality\\nquality=Math.max(qualityForThroughput,bolaState.lastQuality);}// We do not want to overfill buffer with low quality chunks.\\n// Note that there will be no delay if buffer level is below MINIMUM_BUFFER_S, probably even with some margin higher than MINIMUM_BUFFER_S.\\nvar delayS=Math.max(0,bufferLevel+bolaState.placeholderBuffer-maxBufferLevelForQuality(bolaState,quality));// First reduce placeholder buffer, then tell schedule controller to pause.\\nif(delayS<=bolaState.placeholderBuffer){bolaState.placeholderBuffer-=delayS;delayS=0;}else{delayS-=bolaState.placeholderBuffer;bolaState.placeholderBuffer=0;if(quality<abrController.getTopQualityIndexFor(mediaType,streamId)){// At top quality, allow schedule controller to decide how far to fill buffer.\\nscheduleController.setTimeToLoadDelay(1000*delayS);}else{delayS=0;}}switchRequest.quality=quality;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;switchRequest.reason.bufferLevel=bufferLevel;switchRequest.reason.placeholderBuffer=bolaState.placeholderBuffer;switchRequest.reason.delay=delayS;bolaState.lastQuality=quality;// keep bolaState.state === BOLA_STATE_STEADY\\nbreak;// BOLA_STATE_STEADY\\ndefault:logger.debug('BOLA ABR rule invoked in bad state.');// should not arrive here, try to recover\\nswitchRequest.quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);switchRequest.reason.state=bolaState.state;switchRequest.reason.throughput=safeThroughput;switchRequest.reason.latency=latency;bolaState.state=BOLA_STATE_STARTUP;clearBolaStateOnSeek(bolaState);}return switchRequest;}function resetInitialSettings(){bolaStateDict={};}function reset(){resetInitialSettings();eventBus.off(_Events2.default.BUFFER_EMPTY,onBufferEmpty,instance);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.off(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChangeRequested,instance);eventBus.off(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,instance);}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}BolaRule.__dashjs_factory_name='BolaRule';exports.default=_FactoryMaker2.default.getClassFactory(BolaRule);\\n//# sourceMappingURL=BolaRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DroppedFramesRule(){var context=this.context;var instance=void 0,logger=void 0;var DROPPED_PERCENTAGE_FORBID=0.15;var GOOD_SAMPLE_SIZE=375;//Don't apply the rule until this many frames have been rendered(and counted under those indices).\\nfunction setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getDroppedFramesHistory')){return switchRequest;}var droppedFramesHistory=rulesContext.getDroppedFramesHistory();if(droppedFramesHistory){var dfh=droppedFramesHistory.getFrameHistory();var droppedFrames=0;var totalFrames=0;var maxIndex=_SwitchRequest2.default.NO_CHANGE;for(var i=1;i<dfh.length;i++){//No point in measuring dropped frames for the zeroeth index.\\nif(dfh[i]){droppedFrames=dfh[i].droppedVideoFrames;totalFrames=dfh[i].totalVideoFrames;if(totalFrames>GOOD_SAMPLE_SIZE&&droppedFrames/totalFrames>DROPPED_PERCENTAGE_FORBID){maxIndex=i-1;logger.debug('index: '+maxIndex+' Dropped Frames: '+droppedFrames+' Total Frames: '+totalFrames);break;}}}return(0,_SwitchRequest2.default)(context).create(maxIndex,{droppedFrames:droppedFrames});}return switchRequest;}instance={getMaxIndex:getMaxIndex};setup();return instance;}DroppedFramesRule.__dashjs_factory_name='DroppedFramesRule';exports.default=_FactoryMaker2.default.getClassFactory(DroppedFramesRule);\\n//# sourceMappingURL=DroppedFramesRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js\":\n/*!******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js ***!\n  \\******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function InsufficientBufferRule(config){config=config||{};var INSUFFICIENT_BUFFER_SAFETY_FACTOR=0.5;var SEGMENT_IGNORE_COUNT=2;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var dashMetrics=config.dashMetrics;var instance=void 0,logger=void 0,bufferStateDict=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.on(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onEndFragment,instance);}function checkConfig(){if(!dashMetrics||!dashMetrics.hasOwnProperty('getCurrentBufferLevel')||!dashMetrics.hasOwnProperty('getCurrentBufferState')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}/*\\n     * InsufficientBufferRule does not kick in before the first BUFFER_LOADED event happens. This is reset at every seek.\\n     *\\n     * If a BUFFER_EMPTY event happens, then InsufficientBufferRule returns switchRequest.quality=0 until BUFFER_LOADED happens.\\n     *\\n     * Otherwise InsufficientBufferRule gives a maximum bitrate depending on throughput and bufferLevel such that\\n     * a whole fragment can be downloaded before the buffer runs out, subject to a conservative safety factor of 0.5.\\n     * If the bufferLevel is low, then InsufficientBufferRule avoids rebuffering risk.\\n     * If the bufferLevel is high, then InsufficientBufferRule give a high MaxIndex allowing other rules to take over.\\n     */function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaType')){return switchRequest;}checkConfig();var mediaType=rulesContext.getMediaType();var currentBufferState=dashMetrics.getCurrentBufferState(mediaType);var representationInfo=rulesContext.getRepresentationInfo();var fragmentDuration=representationInfo.fragmentDuration;// Don't ask for a bitrate change if there is not info about buffer state or if fragmentDuration is not defined\\nif(shouldIgnore(mediaType)||!fragmentDuration){return switchRequest;}if(currentBufferState&&currentBufferState.state===_MetricsConstants2.default.BUFFER_EMPTY){logger.debug('['+mediaType+'] Switch to index 0; buffer is empty.');switchRequest.quality=0;switchRequest.reason='InsufficientBufferRule: Buffer is empty';}else{var mediaInfo=rulesContext.getMediaInfo();var abrController=rulesContext.getAbrController();var throughputHistory=abrController.getThroughputHistory();var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var throughput=throughputHistory.getAverageThroughput(mediaType);var latency=throughputHistory.getAverageLatency(mediaType);var bitrate=throughput*(bufferLevel/fragmentDuration)*INSUFFICIENT_BUFFER_SAFETY_FACTOR;switchRequest.quality=abrController.getQualityForBitrate(mediaInfo,bitrate,latency);switchRequest.reason='InsufficientBufferRule: being conservative to avoid immediate rebuffering';}return switchRequest;}function shouldIgnore(mediaType){return bufferStateDict[mediaType].ignoreCount>0;}function resetInitialSettings(){bufferStateDict={};bufferStateDict[_Constants2.default.VIDEO]={ignoreCount:SEGMENT_IGNORE_COUNT};bufferStateDict[_Constants2.default.AUDIO]={ignoreCount:SEGMENT_IGNORE_COUNT};}function onPlaybackSeeking(){resetInitialSettings();}function onEndFragment(e){if(!isNaN(e.startTime)&&(e.mediaType===_Constants2.default.AUDIO||e.mediaType===_Constants2.default.VIDEO)){if(bufferStateDict[e.mediaType].ignoreCount>0){bufferStateDict[e.mediaType].ignoreCount--;}}}function reset(){resetInitialSettings();eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.off(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onEndFragment,instance);}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */InsufficientBufferRule.__dashjs_factory_name='InsufficientBufferRule';exports.default=_FactoryMaker2.default.getClassFactory(InsufficientBufferRule);\\n//# sourceMappingURL=InsufficientBufferRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js\":\n/*!***************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _HTTPRequest=__webpack_require__(/*! ../../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _EventBus=__webpack_require__(/*! ../../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2020, Unified Streaming.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */// For a description of the Learn2Adapt-LowLatency (L2A-LL) bitrate adaptation algorithm, see https://github.com/unifiedstreaming/Learn2Adapt-LowLatency/blob/master/Online_learning_for_bitrate_adaptation_in_low_latency_live_streaming_CR.pdf\\nvar L2A_STATE_ONE_BITRATE=0;// If there is only one bitrate (or initialization failed), always return NO_CHANGE.\\nvar L2A_STATE_STARTUP=1;// Set placeholder buffer such that we download fragments at most recently measured throughput.\\nvar L2A_STATE_STEADY=2;// Buffer primed, we switch to steady operation.\\nfunction L2ARule(config){config=config||{};var context=this.context;var dashMetrics=config.dashMetrics;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,l2AStateDict=void 0,l2AParameterDict=void 0,logger=void 0;/**\\n     * Setup function to initialize L2ARule\\n     */function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);_resetInitialSettings();eventBus.on(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,_onMediaFragmentLoaded,instance);eventBus.on(_Events2.default.METRIC_ADDED,_onMetricAdded,instance);eventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,_onQualityChangeRequested,instance);}/**\\n     * Sets the initial state of the algorithm. Calls the initialize function for the paramteters.\\n     * @param {object} rulesContext\\n     * @return {object} initialState\\n     * @private\\n     */function _getInitialL2AState(rulesContext){var initialState={};var mediaInfo=rulesContext.getMediaInfo();var bitrates=mediaInfo.bitrateList.map(function(b){return b.bandwidth/1000;});initialState.state=L2A_STATE_STARTUP;initialState.bitrates=bitrates;initialState.lastQuality=0;_initializeL2AParameters(mediaInfo);_clearL2AStateOnSeek(initialState);return initialState;}/**\\n     * Initializes the parameters of the algorithm. This will be done once for each media type.\\n     * @param {object} mediaInfo\\n     * @private\\n     */function _initializeL2AParameters(mediaInfo){if(!mediaInfo||!mediaInfo.type){return;}l2AParameterDict[mediaInfo.type]={};l2AParameterDict[mediaInfo.type].w=[];//Vector of probabilities associated with bitrate decisions\\nl2AParameterDict[mediaInfo.type].prev_w=[];//Vector of probabilities associated with bitrate decisions calculated in the previous step\\nl2AParameterDict[mediaInfo.type].Q=0;//Initialization of Lagrangian multiplier (This keeps track of the buffer displacement)\\nl2AParameterDict[mediaInfo.type].segment_request_start_s=0;l2AParameterDict[mediaInfo.type].segment_download_finish_s=0;l2AParameterDict[mediaInfo.type].B_target=1.5;//Target buffer level\\n}/**\\n     * Clears the state object\\n     * @param {object} l2AState\\n     * @private\\n     */function _clearL2AStateOnSeek(l2AState){l2AState.placeholderBuffer=0;l2AState.mostAdvancedSegmentStart=NaN;l2AState.lastSegmentWasReplacement=false;l2AState.lastSegmentStart=NaN;l2AState.lastSegmentDurationS=NaN;l2AState.lastSegmentRequestTimeMs=NaN;l2AState.lastSegmentFinishTimeMs=NaN;}/**\\n     * Returns the state object for a fiven media type. If the state object is not yet defined _getInitialL2AState is called\\n     * @param {object} rulesContext\\n     * @return {object} l2AState\\n     * @private\\n     */function _getL2AState(rulesContext){var mediaType=rulesContext.getMediaType();var l2AState=l2AStateDict[mediaType];if(!l2AState){l2AState=_getInitialL2AState(rulesContext);l2AStateDict[mediaType]=l2AState;}return l2AState;}/**\\n     * Event handler for the seeking event.\\n     * @private\\n     */function _onPlaybackSeeking(){for(var mediaType in l2AStateDict){if(l2AStateDict.hasOwnProperty(mediaType)){var l2aState=l2AStateDict[mediaType];if(l2aState.state!==L2A_STATE_ONE_BITRATE){l2aState.state=L2A_STATE_STARTUP;_clearL2AStateOnSeek(l2aState);}}}}/**\\n     * Event handler for the mediaFragmentLoaded event\\n     * @param {object} e\\n     * @private\\n     */function _onMediaFragmentLoaded(e){if(e&&e.chunk&&e.chunk.mediaInfo){var l2AState=l2AStateDict[e.chunk.mediaInfo.type];var l2AParameters=l2AParameterDict[e.chunk.mediaInfo.type];if(l2AState&&l2AState.state!==L2A_STATE_ONE_BITRATE){var start=e.chunk.start;if(isNaN(l2AState.mostAdvancedSegmentStart)||start>l2AState.mostAdvancedSegmentStart){l2AState.mostAdvancedSegmentStart=start;l2AState.lastSegmentWasReplacement=false;}else{l2AState.lastSegmentWasReplacement=true;}l2AState.lastSegmentStart=start;l2AState.lastSegmentDurationS=e.chunk.duration;l2AState.lastQuality=e.chunk.quality;_checkNewSegment(l2AState,l2AParameters);}}}/**\\n     * Event handler for the metricAdded event\\n     * @param {object} e\\n     * @private\\n     */function _onMetricAdded(e){if(e&&e.metric===_MetricsConstants2.default.HTTP_REQUEST&&e.value&&e.value.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var l2AState=l2AStateDict[e.mediaType];var l2AParameters=l2AParameterDict[e.mediaType];if(l2AState&&l2AState.state!==L2A_STATE_ONE_BITRATE){l2AState.lastSegmentRequestTimeMs=e.value.trequest.getTime();l2AState.lastSegmentFinishTimeMs=e.value._tfinish.getTime();_checkNewSegment(l2AState,l2AParameters);}}}/**\\n     * When a new metric has been added or a media fragment has been loaded the state is adjusted accordingly\\n     * @param {object} L2AState\\n     * @param {object} l2AParameters\\n     * @private\\n     */function _checkNewSegment(L2AState,l2AParameters){if(!isNaN(L2AState.lastSegmentStart)&&!isNaN(L2AState.lastSegmentRequestTimeMs)){l2AParameters.segment_request_start_s=0.001*L2AState.lastSegmentRequestTimeMs;l2AParameters.segment_download_finish_s=0.001*L2AState.lastSegmentFinishTimeMs;L2AState.lastSegmentStart=NaN;L2AState.lastSegmentRequestTimeMs=NaN;}}/**\\n     * Event handler for the qualityChangeRequested event\\n     * @param {object} e\\n     * @private\\n     */function _onQualityChangeRequested(e){// Useful to store change requests when abandoning a download.\\nif(e&&e.mediaType){var L2AState=l2AStateDict[e.mediaType];if(L2AState&&L2AState.state!==L2A_STATE_ONE_BITRATE){L2AState.abrQuality=e.newQuality;}}}/**\\n     * Dot multiplication of two arrays\\n     * @param {array} arr1\\n     * @param {array} arr2\\n     * @return {number} sumdot\\n     * @private\\n     */function _dotmultiplication(arr1,arr2){if(arr1.length!==arr2.length){return-1;}var sumdot=0;for(var i=0;i<arr1.length;i++){sumdot=sumdot+arr1[i]*arr2[i];}return sumdot;}/**\\n     * Project an n-dim vector y to the simplex Dn\\n     * Dn = { x : x n-dim, 1 >= x >= 0, sum(x) = 1}\\n     * Algorithm is explained at http://arxiv.org/abs/1101.6081\\n     * @param {array} arr\\n     * @return {array}\\n     */function euclideanProjection(arr){var m=arr.length;var bget=false;var arr2=[];for(var ii=0;ii<m;++ii){arr2[ii]=arr[ii];}var s=arr.sort(function(a,b){return b-a;});var tmpsum=0;var tmax=0;var x=[];for(var _ii=0;_ii<m-1;++_ii){tmpsum=tmpsum+s[_ii];tmax=(tmpsum-1)/(_ii+1);if(tmax>=s[_ii+1]){bget=true;break;}}if(!bget){tmax=(tmpsum+s[m-1]-1)/m;}for(var _ii2=0;_ii2<m;++_ii2){x[_ii2]=Math.max(arr2[_ii2]-tmax,0);}return x;}/**\\n     * Returns a switch request object indicating which quality is to be played\\n     * @param {object} rulesContext\\n     * @return {object}\\n     */function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();var horizon=4;// Optimization horizon (The amount of steps required to achieve convergence)\\nvar vl=Math.pow(horizon,0.99);// Cautiousness parameter, used to control aggressiveness of the bitrate decision process.\\nvar alpha=Math.max(Math.pow(horizon,1),vl*Math.sqrt(horizon));// Step size, used for gradient descent exploration granularity\\nvar mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var bitrates=mediaInfo.bitrateList.map(function(b){return b.bandwidth;});var bitrateCount=bitrates.length;var scheduleController=rulesContext.getScheduleController();var streamInfo=rulesContext.getStreamInfo();var abrController=rulesContext.getAbrController();var throughputHistory=abrController.getThroughputHistory();var isDynamic=streamInfo&&streamInfo.manifestInfo&&streamInfo.manifestInfo.isDynamic;var useL2AABR=rulesContext.useL2AABR();var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType,true);var safeThroughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);var throughput=throughputHistory.getAverageThroughput(mediaType,isDynamic);// In kbits/s\\nvar react=2;// Reactiveness to volatility (abrupt throughput drops), used to re-calibrate Lagrangian multiplier Q\\nvar latency=throughputHistory.getAverageLatency(mediaType);var videoModel=rulesContext.getVideoModel();var quality=void 0;var currentPlaybackRate=videoModel.getPlaybackRate();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('getScheduleController')||!rulesContext.hasOwnProperty('getStreamInfo')||!rulesContext.hasOwnProperty('getAbrController')||!rulesContext.hasOwnProperty('useL2AABR')){return switchRequest;}switchRequest.reason=switchRequest.reason||{};if(!useL2AABR||mediaType===_Constants2.default.AUDIO){// L2A decides bitrate only for video. Audio to be included in decision process in a later stage\\nreturn switchRequest;}scheduleController.setTimeToLoadDelay(0);var l2AState=_getL2AState(rulesContext);if(l2AState.state===L2A_STATE_ONE_BITRATE){// shouldn't even have been called\\nreturn switchRequest;}var l2AParameter=l2AParameterDict[mediaType];if(!l2AParameter){return switchRequest;}switchRequest.reason.state=l2AState.state;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;if(isNaN(throughput)){// still starting up - not enough information\\nreturn switchRequest;}switch(l2AState.state){case L2A_STATE_STARTUP:quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);//During strat-up phase abr.controller is responsible for bitrate decisions.\\nswitchRequest.quality=quality;switchRequest.reason.throughput=safeThroughput;l2AState.lastQuality=quality;if(!isNaN(l2AState.lastSegmentDurationS)&&bufferLevel>=l2AParameter.B_target){l2AState.state=L2A_STATE_STEADY;l2AParameter.Q=vl;// Initialization of Q langrangian multiplier\\n// Update of probability vector w, to be used in main adaptation logic of L2A below (steady state)\\nfor(var i=0;i<bitrateCount;++i){if(i===l2AState.lastQuality){l2AParameter.prev_w[i]=1;}else{l2AParameter.prev_w[i]=0;}}}break;// L2A_STATE_STARTUP\\ncase L2A_STATE_STEADY:var diff1=[];//Used to calculate the difference between consecutive decisions (w-w_prev)\\n// Manual calculation of latency and throughput during previous request\\nvar throughputMeasureTime=dashMetrics.getCurrentHttpRequest(mediaType).trace.reduce(function(a,b){return a+b.d;},0);var downloadBytes=dashMetrics.getCurrentHttpRequest(mediaType).trace.reduce(function(a,b){return a+b.b[0];},0);var lastthroughput=Math.round(8*downloadBytes/throughputMeasureTime);// bits/ms = kbits/s\\nif(lastthroughput<1){lastthroughput=1;}//To avoid division with 0 (avoid infinity) in case of an absolute network outage\\nvar V=l2AState.lastSegmentDurationS;var sign=1;//Main adaptation logic of L2A-LL\\nfor(var _i=0;_i<bitrateCount;++_i){bitrates[_i]=bitrates[_i]/1000;// Originally in bps, now in Kbps\\nif(currentPlaybackRate*bitrates[_i]>lastthroughput){// In this case buffer would deplete, leading to a stall, which increases latency and thus the particular probability of selsection of bitrate[i] should be decreased.\\nsign=-1;}// The objective of L2A is to minimize the overall latency=request-response time + buffer length after download+ potential stalling (if buffer less than chunk downlad time)\\nl2AParameter.w[_i]=l2AParameter.prev_w[_i]+sign*(V/(2*alpha))*((l2AParameter.Q+vl)*(currentPlaybackRate*bitrates[_i]/lastthroughput));//Lagrangian descent\\n}// Apply euclidean projection on w to ensure w expresses a probability distribution\\nl2AParameter.w=euclideanProjection(l2AParameter.w);for(var _i2=0;_i2<bitrateCount;++_i2){diff1[_i2]=l2AParameter.w[_i2]-l2AParameter.prev_w[_i2];l2AParameter.prev_w[_i2]=l2AParameter.w[_i2];}// Lagrangian multiplier Q calculation:\\nl2AParameter.Q=Math.max(0,l2AParameter.Q-V+V*currentPlaybackRate*((_dotmultiplication(bitrates,l2AParameter.prev_w)+_dotmultiplication(bitrates,diff1))/lastthroughput));// Quality is calculated as argmin of the absolute difference between available bitrates (bitrates[i]) and bitrate estimation (dotmultiplication(w,bitrates)).\\nvar temp=[];for(var _i3=0;_i3<bitrateCount;++_i3){temp[_i3]=Math.abs(bitrates[_i3]-_dotmultiplication(l2AParameter.w,bitrates));}// Quality is calculated based on the probability distribution w (the output of L2A)\\nquality=temp.indexOf(Math.min.apply(Math,temp));// We employ a cautious -stepwise- ascent\\nif(quality>l2AState.lastQuality){if(bitrates[l2AState.lastQuality+1]<=lastthroughput){quality=l2AState.lastQuality+1;}}// Provision against bitrate over-estimation, by re-calibrating the Lagrangian multiplier Q, to be taken into account for the next chunk\\nif(bitrates[quality]>=lastthroughput){l2AParameter.Q=react*Math.max(vl,l2AParameter.Q);}switchRequest.quality=quality;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;switchRequest.reason.bufferLevel=bufferLevel;l2AState.lastQuality=switchRequest.quality;break;default:// should not arrive here, try to recover\\nlogger.debug('L2A ABR rule invoked in bad state.');switchRequest.quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);switchRequest.reason.state=l2AState.state;switchRequest.reason.throughput=safeThroughput;switchRequest.reason.latency=latency;l2AState.state=L2A_STATE_STARTUP;_clearL2AStateOnSeek(l2AState);}return switchRequest;}/**\\n     * Reset objects to their initial state\\n     * @private\\n     */function _resetInitialSettings(){l2AStateDict={};l2AParameterDict={};}/**\\n     * Reset the rule\\n     */function reset(){_resetInitialSettings();eventBus.off(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,_onMediaFragmentLoaded,instance);eventBus.off(_Events2.default.METRIC_ADDED,_onMetricAdded,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,_onQualityChangeRequested,instance);}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}L2ARule.__dashjs_factory_name='L2ARule';exports.default=_FactoryMaker2.default.getClassFactory(L2ARule);\\n//# sourceMappingURL=L2ARule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SwitchHistoryRule(){var context=this.context;var instance=void 0,logger=void 0;//MAX_SWITCH is the number of drops made. It doesn't consider the size of the drop.\\nvar MAX_SWITCH=0.075;//Before this number of switch requests(no switch or actual), don't apply the rule.\\n//must be < SwitchRequestHistory SWITCH_REQUEST_HISTORY_DEPTH to enable rule\\nvar SAMPLE_SIZE=6;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getMaxIndex(rulesContext){var switchRequestHistory=rulesContext?rulesContext.getSwitchHistory():null;var switchRequests=switchRequestHistory?switchRequestHistory.getSwitchRequests():[];var drops=0;var noDrops=0;var dropSize=0;var switchRequest=(0,_SwitchRequest2.default)(context).create();for(var i=0;i<switchRequests.length;i++){if(switchRequests[i]!==undefined){drops+=switchRequests[i].drops;noDrops+=switchRequests[i].noDrops;dropSize+=switchRequests[i].dropSize;if(drops+noDrops>=SAMPLE_SIZE&&drops/noDrops>MAX_SWITCH){switchRequest.quality=i>0&&switchRequests[i].drops>0?i-1:i;switchRequest.reason={index:switchRequest.quality,drops:drops,noDrops:noDrops,dropSize:dropSize};logger.debug('Switch history rule index: '+switchRequest.quality+' samples: '+(drops+noDrops)+' drops: '+drops);break;}}}return switchRequest;}instance={getMaxIndex:getMaxIndex};setup();return instance;}SwitchHistoryRule.__dashjs_factory_name='SwitchHistoryRule';exports.default=_FactoryMaker2.default.getClassFactory(SwitchHistoryRule);\\n//# sourceMappingURL=SwitchHistoryRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ThroughputRule(config){config=config||{};var context=this.context;var dashMetrics=config.dashMetrics;var instance=void 0,logger=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function checkConfig(){if(!dashMetrics||!dashMetrics.hasOwnProperty('getCurrentBufferState')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('useBufferOccupancyABR')||!rulesContext.hasOwnProperty('getAbrController')||!rulesContext.hasOwnProperty('getScheduleController')){return switchRequest;}checkConfig();var mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var currentBufferState=dashMetrics.getCurrentBufferState(mediaType);var scheduleController=rulesContext.getScheduleController();var abrController=rulesContext.getAbrController();var streamInfo=rulesContext.getStreamInfo();var isDynamic=streamInfo&&streamInfo.manifestInfo?streamInfo.manifestInfo.isDynamic:null;var throughputHistory=abrController.getThroughputHistory();var throughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);var latency=throughputHistory.getAverageLatency(mediaType);var useBufferOccupancyABR=rulesContext.useBufferOccupancyABR();if(isNaN(throughput)||!currentBufferState||useBufferOccupancyABR){return switchRequest;}if(abrController.getAbandonmentStateFor(mediaType)!==_MetricsConstants2.default.ABANDON_LOAD){if(currentBufferState.state===_MetricsConstants2.default.BUFFER_LOADED||isDynamic){switchRequest.quality=abrController.getQualityForBitrate(mediaInfo,throughput,latency);scheduleController.setTimeToLoadDelay(0);logger.debug('['+mediaType+'] requesting switch to index: ',switchRequest.quality,'Average throughput',Math.round(throughput),'kbps');switchRequest.reason={throughput:throughput,latency:latency};}}return switchRequest;}function reset(){// no persistent information to reset\\n}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ThroughputRule.__dashjs_factory_name='ThroughputRule';exports.default=_FactoryMaker2.default.getClassFactory(ThroughputRule);\\n//# sourceMappingURL=ThroughputRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js\":\n/*!**********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js ***!\n  \\**********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */var WEIGHT_SELECTION_MODES={MANUAL:'manual_weight_selection',RANDOM:'random_weight_selection',DYNAMIC:'dynamic_weight_selection'};function LearningAbrController(){var context=this.context;var instance=void 0,logger=void 0,somBitrateNeurons=void 0,bitrateNormalizationFactor=void 0,latencyNormalizationFactor=void 0,minBitrate=void 0,minBitrateNeuron=void 0,weights=void 0,sortedCenters=void 0,weightSelectionMode=void 0;/**\\n     * Setup the class\\n     */function _setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);_resetInitialSettings();}/**\\n     * Reset all values\\n     */function reset(){_resetInitialSettings();}/**\\n     * Reset to initial settings\\n     * @private\\n     */function _resetInitialSettings(){somBitrateNeurons=null;bitrateNormalizationFactor=1;latencyNormalizationFactor=100;minBitrate=0;minBitrateNeuron=null;weights=null;sortedCenters=null;weightSelectionMode=WEIGHT_SELECTION_MODES.DYNAMIC;}/**\\n     * Returns the maximum throughput\\n     * @return {number}\\n     * @private\\n     */function _getMaxThroughput(){var maxThroughput=0;if(somBitrateNeurons){for(var i=0;i<somBitrateNeurons.length;i++){var neuron=somBitrateNeurons[i];if(neuron.state.throughput>maxThroughput){maxThroughput=neuron.state.throughput;}}}return maxThroughput;}/**\\n     *\\n     * @param {array} w\\n     * @return {number}\\n     * @private\\n     */function _getMagnitude(w){var magnitude=w.map(function(x){return Math.pow(x,2);}).reduce(function(sum,now){return sum+now;});return Math.sqrt(magnitude);}/**\\n     *\\n     * @param {array} a\\n     * @param {array} b\\n     * @param {array} w\\n     * @return {number}\\n     * @private\\n     */function _getDistance(a,b,w){var sum=a.map(function(x,i){return w[i]*Math.pow(x-b[i],2);})// square the difference*w\\n.reduce(function(sum,now){return sum+now;});// sum\\nvar sign=sum<0?-1:1;return sign*Math.sqrt(Math.abs(sum));}/**\\n     *\\n     * @param {object} a\\n     * @param {object} b\\n     * @return {number}\\n     * @private\\n     */function _getNeuronDistance(a,b){var aState=[a.state.throughput,a.state.latency,a.state.rebuffer,a.state.switch];var bState=[b.state.throughput,b.state.latency,b.state.rebuffer,b.state.switch];return _getDistance(aState,bState,[1,1,1,1]);}/**\\n     *\\n     * @param {object} winnerNeuron\\n     * @param {array} somElements\\n     * @param {array} x\\n     * @private\\n     */function _updateNeurons(winnerNeuron,somElements,x){for(var i=0;i<somElements.length;i++){var somNeuron=somElements[i];var sigma=0.1;var neuronDistance=_getNeuronDistance(somNeuron,winnerNeuron);var neighbourHood=Math.exp(-1*Math.pow(neuronDistance,2)/(2*Math.pow(sigma,2)));_updateNeuronState(somNeuron,x,neighbourHood);}}/**\\n     *\\n     * @param {object} neuron\\n     * @param {array} x\\n     * @param {object} neighbourHood\\n     * @private\\n     */function _updateNeuronState(neuron,x,neighbourHood){var state=neuron.state;var w=[0.01,0.01,0.01,0.01];// learning rate\\nstate.throughput=state.throughput+(x[0]-state.throughput)*w[0]*neighbourHood;state.latency=state.latency+(x[1]-state.latency)*w[1]*neighbourHood;state.rebuffer=state.rebuffer+(x[2]-state.rebuffer)*w[2]*neighbourHood;state.switch=state.switch+(x[3]-state.switch)*w[3]*neighbourHood;}/**\\n     *\\n     * @param {object} currentNeuron\\n     * @param {number} currentThroughput\\n     * @return {object}\\n     * @private\\n     */function _getDownShiftNeuron(currentNeuron,currentThroughput){var maxSuitableBitrate=0;var result=currentNeuron;if(somBitrateNeurons){for(var i=0;i<somBitrateNeurons.length;i++){var n=somBitrateNeurons[i];if(n.bitrate<currentNeuron.bitrate&&n.bitrate>maxSuitableBitrate&&currentThroughput>n.bitrate){// possible downshiftable neuron\\nmaxSuitableBitrate=n.bitrate;result=n;}}}return result;}/**\\n     *\\n     * @param {object} mediaInfo\\n     * @param {number} throughput\\n     * @param {number} latency\\n     * @param {number} bufferSize\\n     * @param {number} playbackRate\\n     * @param {number} currentQualityIndex\\n     * @param {object} dynamicWeightsSelector\\n     * @return {null|*}\\n     */function getNextQuality(mediaInfo,throughput,latency,bufferSize,playbackRate,currentQualityIndex,dynamicWeightsSelector){// For Dynamic Weights Selector\\nvar currentLatency=latency;var currentBuffer=bufferSize;var currentThroughput=throughput;var somElements=_getSomBitrateNeurons(mediaInfo);// normalize throughput\\nvar throughputNormalized=throughput/bitrateNormalizationFactor;// saturate values higher than 1\\nif(throughputNormalized>1){throughputNormalized=_getMaxThroughput();}// normalize latency\\nlatency=latency/latencyNormalizationFactor;var targetLatency=0;var targetRebufferLevel=0;var targetSwitch=0;// 10K + video encoding is the recommended throughput\\nvar throughputDelta=10000;logger.debug('getNextQuality called throughput:'+throughputNormalized+' latency:'+latency+' bufferSize:'+bufferSize+' currentQualityIndex:'+currentQualityIndex+' playbackRate:'+playbackRate);var currentNeuron=somElements[currentQualityIndex];var downloadTime=currentNeuron.bitrate*dynamicWeightsSelector.getSegmentDuration()/currentThroughput;var rebuffer=Math.max(0,downloadTime-currentBuffer);// check buffer for possible stall\\nif(currentBuffer-downloadTime<dynamicWeightsSelector.getMinBuffer()){logger.debug('Buffer is low for bitrate= '+currentNeuron.bitrate+' downloadTime='+downloadTime+' currentBuffer='+currentBuffer+' rebuffer='+rebuffer);return _getDownShiftNeuron(currentNeuron,currentThroughput).qualityIndex;}switch(weightSelectionMode){case WEIGHT_SELECTION_MODES.MANUAL:_manualWeightSelection();break;case WEIGHT_SELECTION_MODES.RANDOM:_randomWeightSelection(somElements);break;case WEIGHT_SELECTION_MODES.DYNAMIC:_dynamicWeightSelection(dynamicWeightsSelector,somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate);break;default:_dynamicWeightSelection(dynamicWeightsSelector,somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate);}var minDistance=null;var minIndex=null;var winnerNeuron=null;var winnerWeights=null;for(var i=0;i<somElements.length;i++){var somNeuron=somElements[i];var somNeuronState=somNeuron.state;var somData=[somNeuronState.throughput,somNeuronState.latency,somNeuronState.rebuffer,somNeuronState.switch];var distanceWeights=weights.slice();var nextBuffer=dynamicWeightsSelector.getNextBufferWithBitrate(somNeuron.bitrate,currentBuffer,currentThroughput);var isBufferLow=nextBuffer<dynamicWeightsSelector.getMinBuffer();if(isBufferLow){logger.debug('Buffer is low for bitrate='+somNeuron.bitrate+' downloadTime='+downloadTime+' currentBuffer='+currentBuffer+' nextBuffer='+nextBuffer);}// special condition downshift immediately\\nif(somNeuron.bitrate>throughput-throughputDelta||isBufferLow){if(somNeuron.bitrate!==minBitrate){// encourage to pick smaller bitrates throughputWeight=100\\ndistanceWeights[0]=100;}}// calculate the distance with the target\\nvar distance=_getDistance(somData,[throughputNormalized,targetLatency,targetRebufferLevel,targetSwitch],distanceWeights);if(minDistance===null||distance<minDistance){minDistance=distance;minIndex=somNeuron.qualityIndex;winnerNeuron=somNeuron;winnerWeights=distanceWeights;}}// update current neuron and the neighbourhood with the calculated QoE\\n// will punish current if it is not picked\\nvar bitrateSwitch=Math.abs(currentNeuron.bitrate-winnerNeuron.bitrate)/bitrateNormalizationFactor;_updateNeurons(currentNeuron,somElements,[throughputNormalized,latency,rebuffer,bitrateSwitch]);// update bmu and  neighbours with targetQoE=1, targetLatency=0\\n_updateNeurons(winnerNeuron,somElements,[throughputNormalized,targetLatency,targetRebufferLevel,bitrateSwitch]);return minIndex;}/**\\n     * Option 1: Manual weights\\n     * @private\\n     */function _manualWeightSelection(){var throughputWeight=0.4;var latencyWeight=0.4;var bufferWeight=0.4;var switchWeight=0.4;weights=[throughputWeight,latencyWeight,bufferWeight,switchWeight];// throughput, latency, buffer, switch\\n}/**\\n     * Option 2: Random (Xavier) weights\\n     * @param {array} somElements\\n     * @private\\n     */function _randomWeightSelection(somElements){weights=_getXavierWeights(somElements.length,4);}/**\\n     * Dynamic Weight Selector weights\\n     * @param {object} dynamicWeightsSelector\\n     * @param {array} somElements\\n     * @param {number} currentLatency\\n     * @param {number} currentBuffer\\n     * @param {number} rebuffer\\n     * @param {number} currentThroughput\\n     * @param {number} playbackRate\\n     * @private\\n     */function _dynamicWeightSelection(dynamicWeightsSelector,somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate){if(!weights){weights=sortedCenters[sortedCenters.length-1];}// Dynamic Weights Selector (step 2/2: find weights)\\nvar weightVector=dynamicWeightsSelector.findWeightVector(somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate);if(weightVector!==null&&weightVector!==-1){// null: something went wrong, -1: constraints not met\\nweights=weightVector;}}/**\\n     *\\n     * @param {number }neuronCount\\n     * @param {number }weightCount\\n     * @return {array}\\n     * @private\\n     */function _getXavierWeights(neuronCount,weightCount){var W=[];var upperBound=Math.sqrt(2/neuronCount);for(var i=0;i<weightCount;i++){W.push(Math.random()*upperBound);}weights=W;return weights;}/**\\n     *\\n     * @param {object} mediaInfo\\n     * @return {array}\\n     * @private\\n     */function _getSomBitrateNeurons(mediaInfo){if(!somBitrateNeurons){somBitrateNeurons=[];var bitrateList=mediaInfo.bitrateList;var bitrateVector=[];minBitrate=bitrateList[0].bandwidth;bitrateList.forEach(function(element){bitrateVector.push(element.bandwidth);if(element.bandwidth<minBitrate){minBitrate=element.bandwidth;}});bitrateNormalizationFactor=_getMagnitude(bitrateVector);for(var i=0;i<bitrateList.length;i++){var neuron={qualityIndex:i,bitrate:bitrateList[i].bandwidth,state:{// normalize throughputs\\nthroughput:bitrateList[i].bandwidth/bitrateNormalizationFactor,latency:0,rebuffer:0,switch:0}};somBitrateNeurons.push(neuron);if(neuron.bitrate===minBitrate){minBitrateNeuron=neuron;}}sortedCenters=_getInitialKmeansPlusPlusCenters(somBitrateNeurons);}return somBitrateNeurons;}/**\\n     *\\n     * @param {number} size\\n     * @return {array}\\n     * @private\\n     */function _getRandomData(size){var dataArray=[];for(var i=0;i<size;i++){var data=[Math.random()*_getMaxThroughput(),//throughput\\nMath.random(),//latency\\nMath.random(),//buffersize\\nMath.random()//switch\\n];dataArray.push(data);}return dataArray;}/**\\n     *\\n     * @param {array} somElements\\n     * @return {array}\\n     * @private\\n     */function _getInitialKmeansPlusPlusCenters(somElements){var centers=[];var randomDataSet=_getRandomData(Math.pow(somElements.length,2));centers.push(randomDataSet[0]);var distanceWeights=[1,1,1,1];for(var k=1;k<somElements.length;k++){var nextPoint=null;var _maxDistance=null;for(var i=0;i<randomDataSet.length;i++){var currentPoint=randomDataSet[i];var minDistance=null;for(var j=0;j<centers.length;j++){var distance=_getDistance(currentPoint,centers[j],distanceWeights);if(minDistance===null||distance<minDistance){minDistance=distance;}}if(_maxDistance===null||minDistance>_maxDistance){nextPoint=currentPoint;_maxDistance=minDistance;}}centers.push(nextPoint);}// find the least similar center\\nvar maxDistance=null;var leastSimilarIndex=null;for(var _i=0;_i<centers.length;_i++){var _distance=0;for(var _j=0;_j<centers.length;_j++){if(_i===_j)continue;_distance+=_getDistance(centers[_i],centers[_j],distanceWeights);}if(maxDistance===null||_distance>maxDistance){maxDistance=_distance;leastSimilarIndex=_i;}}// move centers to sortedCenters\\nvar sortedCenters=[];sortedCenters.push(centers[leastSimilarIndex]);centers.splice(leastSimilarIndex,1);while(centers.length>0){var _minDistance=null;var minIndex=null;for(var _i2=0;_i2<centers.length;_i2++){var _distance2=_getDistance(sortedCenters[0],centers[_i2],distanceWeights);if(_minDistance===null||_distance2<_minDistance){_minDistance=_distance2;minIndex=_i2;}}sortedCenters.push(centers[minIndex]);centers.splice(minIndex,1);}return sortedCenters;}instance={getNextQuality:getNextQuality,reset:reset};_setup();return instance;}LearningAbrController.__dashjs_factory_name='LearningAbrController';exports.default=_FactoryMaker2.default.getClassFactory(LearningAbrController);\\n//# sourceMappingURL=LearningAbrController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js\":\n/*!*****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js ***!\n  \\*****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _QoeInfo=__webpack_require__(/*! ./QoeInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js\\\");var _QoeInfo2=_interopRequireDefault(_QoeInfo);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */function LoLpQoeEvaluator(){var instance=void 0,voPerSegmentQoeInfo=void 0,segmentDuration=void 0,maxBitrateKbps=void 0,minBitrateKbps=void 0;function _setup(){_resetInitialSettings();}function _resetInitialSettings(){voPerSegmentQoeInfo=null;segmentDuration=null;maxBitrateKbps=null;minBitrateKbps=null;}function setupPerSegmentQoe(sDuration,maxBrKbps,minBrKbps){// Set up Per Segment QoeInfo\\nvoPerSegmentQoeInfo=_createQoeInfo('segment',sDuration,maxBrKbps,minBrKbps);segmentDuration=sDuration;maxBitrateKbps=maxBrKbps;minBitrateKbps=minBrKbps;}function _createQoeInfo(fragmentType,fragmentDuration,maxBitrateKbps,minBitrateKbps){/*\\n         * [Weights][Source: Abdelhak Bentaleb, 2020 (last updated: 30 Mar 2020)]\\n         * bitrateReward:           segment duration, e.g. 0.5s\\n         * bitrateSwitchPenalty:    0.02s or 1s if the bitrate switch is too important\\n         * rebufferPenalty:         max encoding bitrate, e.g. 1000kbps\\n         * latencyPenalty:          if L ≤ 1.1 seconds then = min encoding bitrate * 0.05, otherwise = max encoding bitrate * 0.1\\n         * playbackSpeedPenalty:    min encoding bitrate, e.g. 200kbps\\n         */// Create new QoeInfo object\\nvar qoeInfo=new _QoeInfo2.default();qoeInfo.type=fragmentType;// Set weight: bitrateReward\\n// set some safe value, else consider throwing error\\nif(!fragmentDuration){qoeInfo.weights.bitrateReward=1;}else{qoeInfo.weights.bitrateReward=fragmentDuration;}// Set weight: bitrateSwitchPenalty\\n// qoeInfo.weights.bitrateSwitchPenalty = 0.02;\\nqoeInfo.weights.bitrateSwitchPenalty=1;// Set weight: rebufferPenalty\\n// set some safe value, else consider throwing error\\nif(!maxBitrateKbps){qoeInfo.weights.rebufferPenalty=1000;}else{qoeInfo.weights.rebufferPenalty=maxBitrateKbps;}// Set weight: latencyPenalty\\nqoeInfo.weights.latencyPenalty=[];qoeInfo.weights.latencyPenalty.push({threshold:1.1,penalty:minBitrateKbps*0.05});qoeInfo.weights.latencyPenalty.push({threshold:100000000,penalty:maxBitrateKbps*0.1});// Set weight: playbackSpeedPenalty\\nif(!minBitrateKbps)qoeInfo.weights.playbackSpeedPenalty=200;// set some safe value, else consider throwing error\\nelse qoeInfo.weights.playbackSpeedPenalty=minBitrateKbps;return qoeInfo;}function logSegmentMetrics(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed){if(voPerSegmentQoeInfo){_logMetricsInQoeInfo(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed,voPerSegmentQoeInfo);}}function _logMetricsInQoeInfo(bitrate,rebufferTime,latency,playbackSpeed,qoeInfo){// Update: bitrate Weighted Sum value\\nqoeInfo.bitrateWSum+=qoeInfo.weights.bitrateReward*bitrate;// Update: bitrateSwitch Weighted Sum value\\nif(qoeInfo.lastBitrate){qoeInfo.bitrateSwitchWSum+=qoeInfo.weights.bitrateSwitchPenalty*Math.abs(bitrate-qoeInfo.lastBitrate);}qoeInfo.lastBitrate=bitrate;// Update: rebuffer Weighted Sum value\\nqoeInfo.rebufferWSum+=qoeInfo.weights.rebufferPenalty*rebufferTime;// Update: latency Weighted Sum value\\nfor(var i=0;i<qoeInfo.weights.latencyPenalty.length;i++){var latencyRange=qoeInfo.weights.latencyPenalty[i];if(latency<=latencyRange.threshold){qoeInfo.latencyWSum+=latencyRange.penalty*latency;break;}}// Update: playbackSpeed Weighted Sum value\\nqoeInfo.playbackSpeedWSum+=qoeInfo.weights.playbackSpeedPenalty*Math.abs(1-playbackSpeed);// Update: Total Qoe value\\nqoeInfo.totalQoe=qoeInfo.bitrateWSum-qoeInfo.bitrateSwitchWSum-qoeInfo.rebufferWSum-qoeInfo.latencyWSum-qoeInfo.playbackSpeedWSum;}// Returns current Per Segment QoeInfo\\nfunction getPerSegmentQoe(){return voPerSegmentQoeInfo;}// For one-time use only\\n// Returns totalQoe based on a single set of metrics.\\nfunction calculateSingleUseQoe(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed){var singleUseQoeInfo=null;if(segmentDuration&&maxBitrateKbps&&minBitrateKbps){singleUseQoeInfo=_createQoeInfo('segment',segmentDuration,maxBitrateKbps,minBitrateKbps);}if(singleUseQoeInfo){_logMetricsInQoeInfo(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed,singleUseQoeInfo);return singleUseQoeInfo.totalQoe;}else{// Something went wrong..\\nreturn 0;}}function reset(){_resetInitialSettings();}instance={setupPerSegmentQoe:setupPerSegmentQoe,logSegmentMetrics:logSegmentMetrics,getPerSegmentQoe:getPerSegmentQoe,calculateSingleUseQoe:calculateSingleUseQoe,reset:reset};_setup();return instance;}LoLpQoeEvaluator.__dashjs_factory_name='LoLpQoeEvaluator';exports.default=_FactoryMaker2.default.getClassFactory(LoLpQoeEvaluator);\\n//# sourceMappingURL=LoLpQoEEvaluator.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _LearningAbrController=__webpack_require__(/*! ./LearningAbrController */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js\\\");var _LearningAbrController2=_interopRequireDefault(_LearningAbrController);var _LoLpQoEEvaluator=__webpack_require__(/*! ./LoLpQoEEvaluator */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js\\\");var _LoLpQoEEvaluator2=_interopRequireDefault(_LoLpQoEEvaluator);var _SwitchRequest=__webpack_require__(/*! ../../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _MetricsConstants=__webpack_require__(/*! ../../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _LoLpWeightSelector=__webpack_require__(/*! ./LoLpWeightSelector */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js\\\");var _LoLpWeightSelector2=_interopRequireDefault(_LoLpWeightSelector);var _Constants=__webpack_require__(/*! ../../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */var DWS_TARGET_LATENCY=1.5;var DWS_BUFFER_MIN=0.3;function LoLPRule(config){config=config||{};var dashMetrics=config.dashMetrics;var context=this.context;var logger=void 0,instance=void 0,learningController=void 0,qoeEvaluator=void 0;function _setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);learningController=(0,_LearningAbrController2.default)(context).create();qoeEvaluator=(0,_LoLpQoEEvaluator2.default)(context).create();}function getMaxIndex(rulesContext){try{var switchRequest=(0,_SwitchRequest2.default)(context).create();var mediaType=rulesContext.getMediaInfo().type;var abrController=rulesContext.getAbrController();var streamInfo=rulesContext.getStreamInfo();var currentQuality=abrController.getQualityFor(mediaType,streamInfo);var mediaInfo=rulesContext.getMediaInfo();var bufferStateVO=dashMetrics.getCurrentBufferState(mediaType);var scheduleController=rulesContext.getScheduleController();var currentBufferLevel=dashMetrics.getCurrentBufferLevel(mediaType,true);var isDynamic=streamInfo&&streamInfo.manifestInfo?streamInfo.manifestInfo.isDynamic:null;var playbackController=scheduleController.getPlaybackController();var latency=playbackController.getCurrentLiveLatency();if(!rulesContext.useLoLPABR()||mediaType===_Constants2.default.AUDIO){return switchRequest;}if(!latency){latency=0;}var playbackRate=playbackController.getPlaybackRate();var throughputHistory=abrController.getThroughputHistory();var throughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);logger.debug('Throughput '+Math.round(throughput)+' kbps');if(isNaN(throughput)||!bufferStateVO){return switchRequest;}if(abrController.getAbandonmentStateFor(mediaType)===_MetricsConstants2.default.ABANDON_LOAD){return switchRequest;}// QoE parameters\\nvar bitrateList=mediaInfo.bitrateList;// [{bandwidth: 200000, width: 640, height: 360}, ...]\\nvar segmentDuration=rulesContext.getRepresentationInfo().fragmentDuration;var minBitrateKbps=bitrateList[0].bandwidth/1000.0;// min bitrate level\\nvar maxBitrateKbps=bitrateList[bitrateList.length-1].bandwidth/1000.0;// max bitrate level\\nfor(var i=0;i<bitrateList.length;i++){// in case bitrateList is not sorted as expected\\nvar b=bitrateList[i].bandwidth/1000.0;if(b>maxBitrateKbps)maxBitrateKbps=b;else if(b<minBitrateKbps){minBitrateKbps=b;}}// Learning rule pre-calculations\\nvar currentBitrate=bitrateList[currentQuality].bandwidth;var currentBitrateKbps=currentBitrate/1000.0;var httpRequest=dashMetrics.getCurrentHttpRequest(mediaType,true);var lastFragmentDownloadTime=(httpRequest.tresponse.getTime()-httpRequest.trequest.getTime())/1000;var segmentRebufferTime=lastFragmentDownloadTime>segmentDuration?lastFragmentDownloadTime-segmentDuration:0;qoeEvaluator.setupPerSegmentQoe(segmentDuration,maxBitrateKbps,minBitrateKbps);qoeEvaluator.logSegmentMetrics(currentBitrateKbps,segmentRebufferTime,latency,playbackRate);/*\\n            * Dynamic Weights Selector (step 1/2: initialization)\\n            */var dynamicWeightsSelector=(0,_LoLpWeightSelector2.default)(context).create({targetLatency:DWS_TARGET_LATENCY,bufferMin:DWS_BUFFER_MIN,segmentDuration:segmentDuration,qoeEvaluator:qoeEvaluator});/*\\n             * Select next quality\\n             */switchRequest.quality=learningController.getNextQuality(mediaInfo,throughput*1000,latency,currentBufferLevel,playbackRate,currentQuality,dynamicWeightsSelector);switchRequest.reason={throughput:throughput,latency:latency};switchRequest.priority=_SwitchRequest2.default.PRIORITY.STRONG;scheduleController.setTimeToLoadDelay(0);if(switchRequest.quality!==currentQuality){console.log('[TgcLearningRule]['+mediaType+'] requesting switch to index: ',switchRequest.quality,'Average throughput',Math.round(throughput),'kbps');}return switchRequest;}catch(e){throw e;}}/**\\n     * Reset objects to their initial state\\n     * @private\\n     */function _resetInitialSettings(){learningController.reset();qoeEvaluator.reset();}/**\\n     * Reset the rule\\n     */function reset(){_resetInitialSettings();}instance={getMaxIndex:getMaxIndex,reset:reset};_setup();return instance;}LoLPRule.__dashjs_factory_name='LoLPRule';exports.default=_FactoryMaker2.default.getClassFactory(LoLPRule);\\n//# sourceMappingURL=LoLpRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js\":\n/*!*******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js ***!\n  \\*******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function LoLpWeightSelector(config){var targetLatency=config.targetLatency;var bufferMin=config.bufferMin;var segmentDuration=config.segmentDuration;var qoeEvaluator=config.qoeEvaluator;var instance=void 0,valueList=void 0,weightTypeCount=void 0,weightOptions=void 0,previousLatency=void 0;/**\\n     *\\n     * @private\\n     */function _setup(){_resetInitialSettings();}/**\\n     *\\n     * @private\\n     */function _resetInitialSettings(){valueList=[0.2,0.4,0.6,0.8,1];weightTypeCount=4;weightOptions=_getPermutations(valueList,weightTypeCount);previousLatency=0;}/**\\n     * Next, at each segment boundary, ABR to input current neurons and target state (only used in Method II) to find the desired weight vector\\n     * @param {array} neurons\\n     * @param {number} currentLatency\\n     * @param {number} currentBuffer\\n     * @param {number} currentRebuffer\\n     * @param {number} currentThroughput\\n     * @param {number} playbackRate\\n     * @return {null}\\n     * @private\\n     */function findWeightVector(neurons,currentLatency,currentBuffer,currentRebuffer,currentThroughput,playbackRate){var maxQoE=null;var winnerWeights=null;var winnerBitrate=null;var deltaLatency=Math.abs(currentLatency-previousLatency);// For each neuron, m\\nneurons.forEach(function(neuron){// For each possible weight vector, z\\n// E.g. For [ throughput, latency, buffer, playbackRate, QoE ]\\n//      Possible weightVector = [ 0.2, 0.4, 0.2, 0, 0.2 ]\\nweightOptions.forEach(function(weightVector){// Apply weightVector to neuron, compute utility and determine winnerWeights\\n// Method I: Utility based on QoE given current state\\nvar weightsObj={throughput:weightVector[0],latency:weightVector[1],buffer:weightVector[2],switch:weightVector[3]};var downloadTime=neuron.bitrate*segmentDuration/currentThroughput;var nextBuffer=getNextBuffer(currentBuffer,downloadTime);var rebuffer=Math.max(0.00001,downloadTime-nextBuffer);var wt=void 0;if(weightsObj.buffer===0){wt=10;}else{wt=1/weightsObj.buffer;}var weightedRebuffer=wt*rebuffer;if(weightsObj.latency===0){wt=10;}else{wt=1/weightsObj.latency;// inverse the weight because wt and latency should have positive relationship, i.e., higher latency = higher wt\\n}var weightedLatency=wt*neuron.state.latency;var totalQoE=qoeEvaluator.calculateSingleUseQoe(neuron.bitrate,weightedRebuffer,weightedLatency,playbackRate);if((maxQoE===null||totalQoE>maxQoE)&&_checkConstraints(currentLatency,nextBuffer,deltaLatency)){maxQoE=totalQoE;winnerWeights=weightVector;winnerBitrate=neuron.bitrate;}});});// winnerWeights was found, check if constraints are satisfied\\nif(winnerWeights===null&&winnerBitrate===null){winnerWeights=-1;}previousLatency=currentLatency;return winnerWeights;}/**\\n     *\\n     * @param {number} nextLatency\\n     * @param {number} nextBuffer\\n     * @param {number} deltaLatency\\n     * @return {boolean}\\n     * @private\\n     */function _checkConstraints(nextLatency,nextBuffer,deltaLatency){// A1\\n// disabled till we find a better way of estimating latency\\n// fails for all with current value\\nif(nextLatency>targetLatency+deltaLatency){return false;}return nextBuffer>=bufferMin;}/**\\n     *\\n     * @param {array} list\\n     * @param {number} length\\n     * @return {*}\\n     * @private\\n     */function _getPermutations(list,length){// Copy initial values as arrays\\nvar perm=list.map(function(val){return[val];});// Our permutation generator\\nvar generate=function generate(perm,length,currLen){// Reached desired length\\nif(currLen===length){return perm;}// For each existing permutation\\nvar len=perm.length;for(var i=0;i<len;i++){var currPerm=perm.shift();// Create new permutation\\nfor(var k=0;k<list.length;k++){perm.push(currPerm.concat(list[k]));}}// Recurse\\nreturn generate(perm,length,currLen+1);};// Start with size 1 because of initial values\\nreturn generate(perm,length,1);}/**\\n     *\\n     * @return {number}\\n     */function getMinBuffer(){return bufferMin;}/**\\n     *\\n     * @return {number}\\n     */function getSegmentDuration(){return segmentDuration;}/**\\n     *\\n     * @param {number} bitrateToDownload\\n     * @param {number} currentBuffer\\n     * @param {number} currentThroughput\\n     * @return {number}\\n     */function getNextBufferWithBitrate(bitrateToDownload,currentBuffer,currentThroughput){var downloadTime=bitrateToDownload*segmentDuration/currentThroughput;return getNextBuffer(currentBuffer,downloadTime);}/**\\n     *\\n     * @param {number} currentBuffer\\n     * @param {number} downloadTime\\n     * @return {number}\\n     */function getNextBuffer(currentBuffer,downloadTime){var segmentDuration=getSegmentDuration();var nextBuffer=void 0;if(downloadTime>segmentDuration){nextBuffer=currentBuffer-segmentDuration;}else{nextBuffer=currentBuffer+segmentDuration-downloadTime;}return nextBuffer;}instance={getMinBuffer:getMinBuffer,getSegmentDuration:getSegmentDuration,getNextBufferWithBitrate:getNextBufferWithBitrate,getNextBuffer:getNextBuffer,findWeightVector:findWeightVector};_setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */LoLpWeightSelector.__dashjs_factory_name='LoLpWeightSelector';exports.default=_FactoryMaker2.default.getClassFactory(LoLpWeightSelector);\\n//# sourceMappingURL=LoLpWeightSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var QoeInfo=function QoeInfo(){_classCallCheck(this,QoeInfo);// Type e.g. 'segment'\\nthis.type=null;// Store lastBitrate for calculation of bitrateSwitchWSum\\nthis.lastBitrate=null;// Weights for each Qoe factor\\nthis.weights={};this.weights.bitrateReward=null;this.weights.bitrateSwitchPenalty=null;this.weights.rebufferPenalty=null;this.weights.latencyPenalty=null;this.weights.playbackSpeedPenalty=null;// Weighted Sum for each Qoe factor\\nthis.bitrateWSum=0;// kbps\\nthis.bitrateSwitchWSum=0;// kbps\\nthis.rebufferWSum=0;// seconds\\nthis.latencyWSum=0;// seconds\\nthis.playbackSpeedWSum=0;// e.g. 0.95, 1.0, 1.05\\n// Store total Qoe value based on current Weighted Sum values\\nthis.totalQoe=0;};exports.default=QoeInfo;\\n//# sourceMappingURL=QoeInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js\":\n/*!******************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js ***!\n  \\******************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BufferLevelRule(config){config=config||{};var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var textController=config.textController;var abrController=config.abrController;var settings=config.settings;function setup(){}function execute(type,representationInfo,hasVideoTrack){if(!type||!representationInfo){return true;}var bufferLevel=dashMetrics.getCurrentBufferLevel(type);return bufferLevel<getBufferTarget(type,representationInfo,hasVideoTrack);}function getBufferTarget(type,representationInfo,hasVideoTrack){var bufferTarget=NaN;if(!type||!representationInfo){return bufferTarget;}if(type===_Constants2.default.FRAGMENTED_TEXT){if(textController.isTextEnabled()){if(isNaN(representationInfo.fragmentDuration)){//fragmentDuration of representationInfo is not defined,\\n// call metrics function to have data in the latest scheduling info...\\n// if no metric, returns 0. In this case, rule will return false.\\nvar schedulingInfo=dashMetrics.getCurrentSchedulingInfo(_MetricsConstants2.default.SCHEDULING_INFO);bufferTarget=schedulingInfo?schedulingInfo.duration:0;}else{bufferTarget=representationInfo.fragmentDuration;}}else{// text is disabled, rule will return false\\nbufferTarget=0;}}else if(type===_Constants2.default.AUDIO&&hasVideoTrack){var videoBufferLevel=dashMetrics.getCurrentBufferLevel(_Constants2.default.VIDEO);if(isNaN(representationInfo.fragmentDuration)){bufferTarget=videoBufferLevel;}else{bufferTarget=Math.max(videoBufferLevel,representationInfo.fragmentDuration);}}else{var streamInfo=representationInfo.mediaInfo.streamInfo;if(abrController.isPlayingAtTopQuality(streamInfo)){var isLongFormContent=streamInfo.manifestInfo.duration>=settings.get().streaming.longFormContentDurationThreshold;bufferTarget=isLongFormContent?settings.get().streaming.bufferTimeAtTopQualityLongForm:settings.get().streaming.bufferTimeAtTopQuality;}else{bufferTarget=mediaPlayerModel.getStableBufferTime();}}return bufferTarget;}var instance={execute:execute,getBufferTarget:getBufferTarget};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BufferLevelRule.__dashjs_factory_name='BufferLevelRule';exports.default=_FactoryMaker2.default.getClassFactory(BufferLevelRule);\\n//# sourceMappingURL=BufferLevelRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function EmbeddedTextHtmlRender(){var captionId=0;var instance=void 0;/* HTML Rendering functions */function checkIndent(chars){var line='';for(var c=0;c<chars.length;++c){var uc=chars[c];line+=uc.uchar;}var l=line.length;var ll=line.replace(/^\\\\s+/,'').length;return l-ll;}function getRegionProperties(region){return'left: '+region.x*3.125+'%; top: '+region.y1*6.66+'%; width: '+(100-region.x*3.125)+'%; height: '+Math.max(region.y2-1-region.y1,1)*6.66+'%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;';}function createRGB(color){if(color==='red'){return'rgb(255, 0, 0)';}else if(color==='green'){return'rgb(0, 255, 0)';}else if(color==='blue'){return'rgb(0, 0, 255)';}else if(color==='cyan'){return'rgb(0, 255, 255)';}else if(color==='magenta'){return'rgb(255, 0, 255)';}else if(color==='yellow'){return'rgb(255, 255, 0)';}else if(color==='white'){return'rgb(255, 255, 255)';}else if(color==='black'){return'rgb(0, 0, 0)';}return color;}function getStyle(videoElement,style){var fontSize=videoElement.videoHeight/15.0;if(style){return'font-size: '+fontSize+'px; font-family: Menlo, Consolas, \\\\'Cutive Mono\\\\', monospace; color: '+(style.foreground?createRGB(style.foreground):'rgb(255, 255, 255)')+'; font-style: '+(style.italics?'italic':'normal')+'; text-decoration: '+(style.underline?'underline':'none')+'; white-space: pre; background-color: '+(style.background?createRGB(style.background):'transparent')+';';}else{return'font-size: '+fontSize+'px; font-family: Menlo, Consolas, \\\\'Cutive Mono\\\\', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;';}}function ltrim(s){return s.replace(/^\\\\s+/g,'');}function rtrim(s){return s.replace(/\\\\s+$/g,'');}function createHTMLCaptionsFromScreen(videoElement,startTime,endTime,captionScreen){var currRegion=null;var existingRegion=null;var lastRowHasText=false;var lastRowIndentL=-1;var currP={start:startTime,end:endTime,spans:[]};var currentStyle='style_cea608_white_black';var seenRegions={};var styleStates={};var regions=[];var r=void 0,s=void 0;for(r=0;r<15;++r){var row=captionScreen.rows[r];var line='';var prevPenState=null;if(false===row.isEmpty()){/* Row is not empty *//* Get indentation of this row */var rowIndent=checkIndent(row.chars);/* Create a new region is there is none */if(currRegion===null){currRegion={x:rowIndent,y1:r,y2:r+1,p:[]};}/* Check if indentation has changed and we had text of last row */if(rowIndent!==lastRowIndentL&&lastRowHasText){currRegion.p.push(currP);currP={start:startTime,end:endTime,spans:[]};currRegion.y2=r;currRegion.name='region_'+currRegion.x+'_'+currRegion.y1+'_'+currRegion.y2;if(false===seenRegions.hasOwnProperty(currRegion.name)){regions.push(currRegion);seenRegions[currRegion.name]=currRegion;}else{existingRegion=seenRegions[currRegion.name];existingRegion.p.contat(currRegion.p);}currRegion={x:rowIndent,y1:r,y2:r+1,p:[]};}for(var c=0;c<row.chars.length;++c){var uc=row.chars[c];var currPenState=uc.penState;if(prevPenState===null||!currPenState.equals(prevPenState)){if(line.trim().length>0){currP.spans.push({name:currentStyle,line:line,row:r});line='';}var currPenStateString='style_cea608_'+currPenState.foreground+'_'+currPenState.background;if(currPenState.underline){currPenStateString+='_underline';}if(currPenState.italics){currPenStateString+='_italics';}if(!styleStates.hasOwnProperty(currPenStateString)){styleStates[currPenStateString]=JSON.parse(JSON.stringify(currPenState));}prevPenState=currPenState;currentStyle=currPenStateString;}line+=uc.uchar;}if(line.trim().length>0){currP.spans.push({name:currentStyle,line:line,row:r});}lastRowHasText=true;lastRowIndentL=rowIndent;}else{/* Row is empty */lastRowHasText=false;lastRowIndentL=-1;if(currRegion){currRegion.p.push(currP);currP={start:startTime,end:endTime,spans:[]};currRegion.y2=r;currRegion.name='region_'+currRegion.x+'_'+currRegion.y1+'_'+currRegion.y2;if(false===seenRegions.hasOwnProperty(currRegion.name)){regions.push(currRegion);seenRegions[currRegion.name]=currRegion;}else{existingRegion=seenRegions[currRegion.name];existingRegion.p.contat(currRegion.p);}currRegion=null;}}}if(currRegion){currRegion.p.push(currP);currRegion.y2=r+1;currRegion.name='region_'+currRegion.x+'_'+currRegion.y1+'_'+currRegion.y2;if(false===seenRegions.hasOwnProperty(currRegion.name)){regions.push(currRegion);seenRegions[currRegion.name]=currRegion;}else{existingRegion=seenRegions[currRegion.name];existingRegion.p.contat(currRegion.p);}currRegion=null;}var captionsArray=[];/* Loop thru regions */for(r=0;r<regions.length;++r){var region=regions[r];var cueID='sub_cea608_'+captionId++;var finalDiv=document.createElement('div');finalDiv.id=cueID;var cueRegionProperties=getRegionProperties(region);finalDiv.style.cssText='position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;'+cueRegionProperties;var bodyDiv=document.createElement('div');bodyDiv.className='paragraph bodyStyle';bodyDiv.style.cssText=getStyle(videoElement);var cueUniWrapper=document.createElement('div');cueUniWrapper.className='cueUniWrapper';cueUniWrapper.style.cssText='unicode-bidi: normal; direction: ltr;';for(var p=0;p<region.p.length;++p){var ptag=region.p[p];var lastSpanRow=0;for(s=0;s<ptag.spans.length;++s){var span=ptag.spans[s];if(span.line.length>0){if(s!==0&&lastSpanRow!=span.row){var brElement=document.createElement('br');brElement.className='lineBreak';cueUniWrapper.appendChild(brElement);}var sameRow=false;if(lastSpanRow===span.row){sameRow=true;}lastSpanRow=span.row;var spanStyle=styleStates[span.name];var spanElement=document.createElement('span');spanElement.className='spanPadding '+span.name+' customSpanColor';spanElement.style.cssText=getStyle(videoElement,spanStyle);/* If this is not the first span, and it's on the same\\n                         * row as the last one */if(s!==0&&sameRow){/* and it's the last span on this row */if(s===ptag.spans.length-1){/* trim only the right side */spanElement.textContent=rtrim(span.line);}else{/* don't trim at all */spanElement.textContent=span.line;}}else{/* if there is more than 1 span and this isn't the last span */if(ptag.spans.length>1&&s<ptag.spans.length-1){/* Check if next text is on same row */if(span.row===ptag.spans[s+1].row){/* Next element on same row, trim start */spanElement.textContent=ltrim(span.line);}else{/* Different rows, trim both */spanElement.textContent=span.line.trim();}}else{spanElement.textContent=span.line.trim();}}cueUniWrapper.appendChild(spanElement);}}}bodyDiv.appendChild(cueUniWrapper);finalDiv.appendChild(bodyDiv);var fontSize={'bodyStyle':['%',90]};for(var _s in styleStates){if(styleStates.hasOwnProperty(_s)){fontSize[_s]=['%',90];}}captionsArray.push({type:'html',start:startTime,end:endTime,cueHTMLElement:finalDiv,cueID:cueID,cellResolution:[32,15],isFromCEA608:true,fontSize:fontSize,lineHeight:{},linePadding:{}});}return captionsArray;}instance={createHTMLCaptionsFromScreen:createHTMLCaptionsFromScreen};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */EmbeddedTextHtmlRender.__dashjs_factory_name='EmbeddedTextHtmlRender';exports.default=_FactoryMaker2.default.getSingletonFactory(EmbeddedTextHtmlRender);\\n//# sourceMappingURL=EmbeddedTextHtmlRender.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js\":\n/*!************************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js ***!\n  \\************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _InitCache=__webpack_require__(/*! ../utils/InitCache */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\\\");var _InitCache2=_interopRequireDefault(_InitCache);var _SourceBufferSink=__webpack_require__(/*! ../SourceBufferSink */ \\\"../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js\\\");var _SourceBufferSink2=_interopRequireDefault(_SourceBufferSink);var _TextController=__webpack_require__(/*! ../../streaming/text/TextController */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\\\");var _TextController2=_interopRequireDefault(_TextController);var _DashJSError=__webpack_require__(/*! ../../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var BUFFER_CONTROLLER_TYPE='NotFragmentedTextBufferController';/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function NotFragmentedTextBufferController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var textController=(0,_TextController2.default)(context).getInstance();var errHandler=config.errHandler;var streamInfo=config.streamInfo;var type=config.type;var mimeType=config.mimeType;var fragmentModel=config.fragmentModel;var instance=void 0,isBufferingCompleted=void 0,initialized=void 0,mediaSource=void 0,buffer=void 0,initCache=void 0;function setup(){initialized=false;mediaSource=null;isBufferingCompleted=false;eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.on(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,instance);}function getBufferControllerType(){return BUFFER_CONTROLLER_TYPE;}function initialize(source){setMediaSource(source);initCache=(0,_InitCache2.default)(context).getInstance();}function createBuffer(mediaInfoArr){var mediaInfo=mediaInfoArr[0];try{buffer=(0,_SourceBufferSink2.default)(context).create(mediaSource,mediaInfo);if(!initialized){var textBuffer=buffer.getBuffer();if(textBuffer.hasOwnProperty(_Constants2.default.INITIALIZE)){textBuffer.initialize(mimeType,streamInfo,mediaInfoArr,fragmentModel);}initialized=true;}return buffer;}catch(e){if(mediaInfo&&(mediaInfo.isText||mediaInfo.codec.indexOf('codecs=\\\"stpp')!==-1||mediaInfo.codec.indexOf('codecs=\\\"wvtt')!==-1)){try{buffer=textController.getTextSourceBuffer();}catch(e){errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+type+' : '+e.message));}}else{errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+type));}}}function getStreamId(){return streamInfo.id;}function getType(){return type;}function getBuffer(){return buffer;}function setMediaSource(value){mediaSource=value;}function getMediaSource(){return mediaSource;}function getIsPruningInProgress(){return false;}function dischargePreBuffer(){}function getBufferLevel(){return 0;}function getIsBufferingCompleted(){return isBufferingCompleted;}function reset(errored){eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.off(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,instance);if(!errored&&buffer){buffer.abort();buffer.reset();buffer=null;}}function onDataUpdateCompleted(e){if(initCache.extract(streamInfo.id,e.currentRepresentation.id)!==null){return;}// Representation has changed, clear buffer\\nisBufferingCompleted=false;// // Text data file is contained in initialization segment\\neventBus.trigger(_Events2.default.INIT_FRAGMENT_NEEDED,{representationId:e.currentRepresentation.id,sender:instance},{streamId:streamInfo.id,mediaType:type});}function appendInitSegment(representationId){// If text data file already in cache then no need to append it again\\nreturn initCache.extract(streamInfo.id,representationId)!==null;}function onInitFragmentLoaded(e){if(!e.chunk.bytes)return;initCache.save(e.chunk);buffer.append(e.chunk);isBufferingCompleted=true;eventBus.trigger(_Events2.default.STREAM_COMPLETED,{request:e.request},{streamId:streamInfo.id,mediaType:type});}function getRangeAt(){return null;}function updateTimestampOffset(MSETimeOffset){if(buffer.timestampOffset!==MSETimeOffset&&!isNaN(MSETimeOffset)){buffer.timestampOffset=MSETimeOffset;}}instance={getBufferControllerType:getBufferControllerType,initialize:initialize,createBuffer:createBuffer,getStreamId:getStreamId,getType:getType,getBuffer:getBuffer,getBufferLevel:getBufferLevel,setMediaSource:setMediaSource,getMediaSource:getMediaSource,getIsBufferingCompleted:getIsBufferingCompleted,getIsPruningInProgress:getIsPruningInProgress,dischargePreBuffer:dischargePreBuffer,appendInitSegment:appendInitSegment,getRangeAt:getRangeAt,reset:reset,updateTimestampOffset:updateTimestampOffset};setup();return instance;}NotFragmentedTextBufferController.__dashjs_factory_name=BUFFER_CONTROLLER_TYPE;exports.default=_FactoryMaker2.default.getClassFactory(NotFragmentedTextBufferController);\\n//# sourceMappingURL=NotFragmentedTextBufferController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _BufferController=__webpack_require__(/*! ./../controllers/BufferController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js\\\");var _BufferController2=_interopRequireDefault(_BufferController);var _NotFragmentedTextBufferController=__webpack_require__(/*! ./NotFragmentedTextBufferController */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js\\\");var _NotFragmentedTextBufferController2=_interopRequireDefault(_NotFragmentedTextBufferController);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function TextBufferController(config){config=config||{};var context=this.context;var _BufferControllerImpl=void 0,instance=void 0;function setup(){// according to text type, we create corresponding buffer controller\\nif(config.type===_Constants2.default.FRAGMENTED_TEXT){// in this case, internal buffer ocntroller is a classical BufferController object\\n_BufferControllerImpl=(0,_BufferController2.default)(context).create({streamInfo:config.streamInfo,type:config.type,mediaPlayerModel:config.mediaPlayerModel,manifestModel:config.manifestModel,fragmentModel:config.fragmentModel,errHandler:config.errHandler,mediaController:config.mediaController,representationController:config.representationController,adapter:config.adapter,textController:config.textController,abrController:config.abrController,playbackController:config.playbackController,settings:config.settings});}else{// in this case, internal buffer controller is a not fragmented text controller object\\n_BufferControllerImpl=(0,_NotFragmentedTextBufferController2.default)(context).create({streamInfo:config.streamInfo,type:config.type,mimeType:config.mimeType,fragmentModel:config.fragmentModel,errHandler:config.errHandler});}}function getBufferControllerType(){return _BufferControllerImpl.getBufferControllerType();}function initialize(source,StreamProcessor){return _BufferControllerImpl.initialize(source,StreamProcessor);}function createBuffer(mediaInfoArr,previousBuffers){return _BufferControllerImpl.createBuffer(mediaInfoArr,previousBuffers);}function getType(){return _BufferControllerImpl.getType();}function getBuffer(){return _BufferControllerImpl.getBuffer();}function setBuffer(value){_BufferControllerImpl.setBuffer(value);}function getMediaSource(){return _BufferControllerImpl.getMediaSource();}function setMediaSource(value){_BufferControllerImpl.setMediaSource(value);}function getBufferLevel(){return _BufferControllerImpl.getBufferLevel();}function reset(errored){_BufferControllerImpl.reset(errored);}function getIsBufferingCompleted(){return _BufferControllerImpl.getIsBufferingCompleted();}function appendInitSegment(representationId){_BufferControllerImpl.appendInitSegment(representationId);}function getIsPruningInProgress(){return _BufferControllerImpl.getIsPruningInProgress();}function dischargePreBuffer(){return _BufferControllerImpl.dischargePreBuffer();}function getRangeAt(time){return _BufferControllerImpl.getRangeAt(time);}function updateTimestampOffset(MSETimeOffset){var buffer=getBuffer();if(buffer.timestampOffset!==MSETimeOffset&&!isNaN(MSETimeOffset)){buffer.timestampOffset=MSETimeOffset;}}function updateAppendWindow(){_BufferControllerImpl.updateAppendWindow();}instance={getBufferControllerType:getBufferControllerType,initialize:initialize,createBuffer:createBuffer,getType:getType,getBuffer:getBuffer,setBuffer:setBuffer,getBufferLevel:getBufferLevel,setMediaSource:setMediaSource,getMediaSource:getMediaSource,getIsBufferingCompleted:getIsBufferingCompleted,getIsPruningInProgress:getIsPruningInProgress,dischargePreBuffer:dischargePreBuffer,appendInitSegment:appendInitSegment,getRangeAt:getRangeAt,reset:reset,updateTimestampOffset:updateTimestampOffset,updateAppendWindow:updateAppendWindow};setup();return instance;}TextBufferController.__dashjs_factory_name='TextBufferController';exports.default=_FactoryMaker2.default.getClassFactory(TextBufferController);\\n//# sourceMappingURL=TextBufferController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/text/TextController.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _TextSourceBuffer=__webpack_require__(/*! ./TextSourceBuffer */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js\\\");var _TextSourceBuffer2=_interopRequireDefault(_TextSourceBuffer);var _TextTracks=__webpack_require__(/*! ./TextTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\\\");var _TextTracks2=_interopRequireDefault(_TextTracks);var _VTTParser=__webpack_require__(/*! ../utils/VTTParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js\\\");var _VTTParser2=_interopRequireDefault(_VTTParser);var _TTMLParser=__webpack_require__(/*! ../utils/TTMLParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js\\\");var _TTMLParser2=_interopRequireDefault(_TTMLParser);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TextController(){var context=this.context;var instance=void 0,textSourceBuffer=void 0,errHandler=void 0,adapter=void 0,manifestModel=void 0,mediaController=void 0,videoModel=void 0,streamController=void 0,textTracks=void 0,vttParser=void 0,ttmlParser=void 0,eventBus=void 0,defaultSettings=void 0,initialSettingsSet=void 0,lastEnabledIndex=void 0,textDefaultEnabled=void 0,// this is used for default settings (each time a file is loaded, we check value of this settings )\\nallTracksAreDisabled=void 0,// this is used for one session (when a file has been loaded, we use this settings to enable/disable text)\\nforceTextStreaming=void 0,textTracksAdded=void 0,disableTextBeforeTextTracksAdded=void 0,previousPeriodSelectedTrack=void 0;function setup(){defaultSettings=null;lastEnabledIndex=-1;forceTextStreaming=false;textTracksAdded=false;initialSettingsSet=false;disableTextBeforeTextTracksAdded=false;textTracks=(0,_TextTracks2.default)(context).getInstance();vttParser=(0,_VTTParser2.default)(context).getInstance();ttmlParser=(0,_TTMLParser2.default)(context).getInstance();textSourceBuffer=(0,_TextSourceBuffer2.default)(context).getInstance();eventBus=(0,_EventBus2.default)(context).getInstance();textTracks.initialize();eventBus.on(_Events2.default.TEXT_TRACKS_QUEUE_INITIALIZED,onTextTracksAdded,instance);eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);/*\\n        * register those event callbacks in order to detect switch of periods and set\\n        * correctly the selected track index in the new period.\\n        * there is different cases :\\n        *   - switch occurs after a seek command from the user\\n        *   - switch occurs but codecs in streams are different\\n        *   - switch occurs and codecs in streams are not different\\n        */eventBus.on(_Events2.default.PERIOD_SWITCH_STARTED,onPeriodSwitchStarted,instance);eventBus.on(_Events2.default.STREAM_COMPLETED,onStreamCompleted,instance);eventBus.on(_Events2.default.PERIOD_SWITCH_COMPLETED,onPeriodSwitchCompleted,instance);resetInitialSettings();}function onPeriodSwitchStarted(e){if(previousPeriodSelectedTrack===undefined&&e.fromStreamInfo!==null/* test if this is the first period */){previousPeriodSelectedTrack=this.getCurrentTrackIdx();}}function onStreamCompleted(){if(previousPeriodSelectedTrack===undefined){previousPeriodSelectedTrack=this.getCurrentTrackIdx();}}function onPeriodSwitchCompleted(){if(previousPeriodSelectedTrack!==undefined){this.setTextTrack(previousPeriodSelectedTrack);previousPeriodSelectedTrack=undefined;}}function setConfig(config){if(!config){return;}if(config.errHandler){errHandler=config.errHandler;}if(config.adapter){adapter=config.adapter;}if(config.manifestModel){manifestModel=config.manifestModel;}if(config.mediaController){mediaController=config.mediaController;}if(config.videoModel){videoModel=config.videoModel;}if(config.streamController){streamController=config.streamController;}if(config.textTracks){textTracks=config.textTracks;}if(config.vttParser){vttParser=config.vttParser;}if(config.ttmlParser){ttmlParser=config.ttmlParser;}// create config for source buffer\\ntextSourceBuffer.setConfig({errHandler:errHandler,adapter:adapter,manifestModel:manifestModel,mediaController:mediaController,videoModel:videoModel,streamController:streamController,textTracks:textTracks,vttParser:vttParser,ttmlParser:ttmlParser});}function getTextSourceBuffer(){return textSourceBuffer;}function getAllTracksAreDisabled(){return allTracksAreDisabled;}function addEmbeddedTrack(mediaInfo){textSourceBuffer.addEmbeddedTrack(mediaInfo);}function setTextDefaultLanguage(lang){(0,_SupervisorTools.checkParameterType)(lang,'string');if(!defaultSettings){defaultSettings={};}defaultSettings.lang=lang;initialSettingsSet=true;}function setInitialSettings(settings){defaultSettings=settings;initialSettingsSet=true;}function getTextDefaultLanguage(){return defaultSettings&&defaultSettings.lang||'';}function onTextTracksAdded(e){var _this=this;var tracks=e.tracks;var index=e.index;if(defaultSettings){tracks.some(function(item,idx){// matchSettings is compatible with setTextDefaultLanguage and setInitialSettings\\nif(mediaController.matchSettings(defaultSettings,item)){_this.setTextTrack(idx);index=idx;return true;}});}if(textDefaultEnabled===false||textDefaultEnabled===undefined&&!defaultSettings||disableTextBeforeTextTracksAdded){// disable text at startup if explicitely configured with setTextDefaultEnabled(false) or if there is no defaultSettings (configuration or from domStorage)\\nthis.setTextTrack(-1);}lastEnabledIndex=index;eventBus.trigger(_Events2.default.TEXT_TRACKS_ADDED,{enabled:isTextEnabled(),index:index,tracks:tracks});textTracksAdded=true;}function onCurrentTrackChanged(event){if(!initialSettingsSet&&event&&event.newMediaInfo){var mediaInfo=event.newMediaInfo;if(mediaInfo.type===_Constants2.default.FRAGMENTED_TEXT){defaultSettings={lang:mediaInfo.lang,role:mediaInfo.roles[0],accessibility:mediaInfo.accessibility[0]};}}}function setTextDefaultEnabled(enable){(0,_SupervisorTools.checkParameterType)(enable,'boolean');textDefaultEnabled=enable;if(!textDefaultEnabled){// disable text at startup\\nthis.setTextTrack(-1);}else{allTracksAreDisabled=false;}}function getTextDefaultEnabled(){return textDefaultEnabled===undefined?false:textDefaultEnabled;}function enableText(enable){(0,_SupervisorTools.checkParameterType)(enable,'boolean');if(!textDefaultEnabled&&enable){textDefaultEnabled=true;}if(isTextEnabled()!==enable){// change track selection\\nif(enable){// apply last enabled track\\nthis.setTextTrack(lastEnabledIndex);}if(!enable){// keep last index and disable text track\\nlastEnabledIndex=this.getCurrentTrackIdx();if(!textTracksAdded){disableTextBeforeTextTracksAdded=true;}else{this.setTextTrack(-1);}}}}function isTextEnabled(){var enabled=true;if(allTracksAreDisabled&&!forceTextStreaming){enabled=false;}return enabled;}// when set to true ScheduleController will allow schedule of chunks even if tracks are all disabled. Allowing streaming to hidden track for external players to work with.\\nfunction enableForcedTextStreaming(enable){(0,_SupervisorTools.checkParameterType)(enable,'boolean');forceTextStreaming=enable;}function setTextTrack(idx){//For external time text file, the only action needed to change a track is marking the track mode to showing.\\n// Fragmented text tracks need the additional step of calling TextController.setTextTrack();\\nvar config=textSourceBuffer.getConfig();var fragmentModel=config.fragmentModel;var fragmentedTracks=config.fragmentedTracks;var videoModel=config.videoModel;var mediaInfosArr=void 0,streamProcessor=void 0;allTracksAreDisabled=idx===-1?true:false;var oldTrackIdx=textTracks.getCurrentTrackIdx();if(oldTrackIdx!==idx){if(allTracksAreDisabled&&mediaController){mediaController.saveTextSettingsDisabled();}textTracks.setModeForTrackIdx(oldTrackIdx,_Constants2.default.TEXT_HIDDEN);textTracks.setCurrentTrackIdx(idx);textTracks.setModeForTrackIdx(idx,_Constants2.default.TEXT_SHOWING);var currentTrackInfo=textTracks.getCurrentTrackInfo();if(currentTrackInfo&&currentTrackInfo.isFragmented&&!currentTrackInfo.isEmbedded){for(var i=0;i<fragmentedTracks.length;i++){var mediaInfo=fragmentedTracks[i];if(currentTrackInfo.lang===mediaInfo.lang&&currentTrackInfo.index===mediaInfo.index&&(mediaInfo.id?currentTrackInfo.id===mediaInfo.id:currentTrackInfo.id===mediaInfo.index)){var currentFragTrack=mediaController.getCurrentTrackFor(_Constants2.default.FRAGMENTED_TEXT,streamController.getActiveStreamInfo());if(mediaInfo!==currentFragTrack){fragmentModel.abortRequests();fragmentModel.removeExecutedRequestsBeforeTime();textSourceBuffer.remove();textTracks.deleteCuesFromTrackIdx(oldTrackIdx);mediaController.setTrack(mediaInfo);textSourceBuffer.setCurrentFragmentedTrackIdx(i);}else if(oldTrackIdx===-1){//in fragmented use case, if the user selects the older track (the one selected before disabled text track)\\n//no CURRENT_TRACK_CHANGED event will be trigger, so dashHandler current time has to be updated and the scheduleController\\n//has to be restarted.\\nvar streamProcessors=streamController.getActiveStreamProcessors();for(var _i=0;_i<streamProcessors.length;_i++){if(streamProcessors[_i].getType()===_Constants2.default.FRAGMENTED_TEXT){streamProcessor=streamProcessors[_i];break;}}streamProcessor.setBufferingTime(videoModel.getTime());streamProcessor.getScheduleController().start();}}}}else if(currentTrackInfo&&!currentTrackInfo.isFragmented){var _streamProcessors=streamController.getActiveStreamProcessors();for(var _i2=0;_i2<_streamProcessors.length;_i2++){if(_streamProcessors[_i2].getType()===_Constants2.default.TEXT){streamProcessor=_streamProcessors[_i2];mediaInfosArr=streamProcessor.getMediaInfoArr();break;}}if(streamProcessor&&mediaInfosArr){for(var _i3=0;_i3<mediaInfosArr.length;_i3++){if(mediaInfosArr[_i3].index===currentTrackInfo.index&&mediaInfosArr[_i3].lang===currentTrackInfo.lang){streamProcessor.selectMediaInfo(mediaInfosArr[_i3]);break;}}}}}}function getCurrentTrackIdx(){return textTracks.getCurrentTrackIdx();}function resetInitialSettings(){allTracksAreDisabled=true;textTracksAdded=false;disableTextBeforeTextTracksAdded=false;}function reset(){resetInitialSettings();textSourceBuffer.resetEmbedded();textSourceBuffer.reset();}instance={setConfig:setConfig,getTextSourceBuffer:getTextSourceBuffer,getAllTracksAreDisabled:getAllTracksAreDisabled,addEmbeddedTrack:addEmbeddedTrack,getTextDefaultLanguage:getTextDefaultLanguage,setTextDefaultLanguage:setTextDefaultLanguage,setTextDefaultEnabled:setTextDefaultEnabled,getTextDefaultEnabled:getTextDefaultEnabled,setInitialSettings:setInitialSettings,enableText:enableText,isTextEnabled:isTextEnabled,setTextTrack:setTextTrack,getCurrentTrackIdx:getCurrentTrackIdx,enableForcedTextStreaming:enableForcedTextStreaming,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TextController.__dashjs_factory_name='TextController';exports.default=_FactoryMaker2.default.getSingletonFactory(TextController);\\n//# sourceMappingURL=TextController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _TextTrackInfo=__webpack_require__(/*! ../vo/TextTrackInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js\\\");var _TextTrackInfo2=_interopRequireDefault(_TextTrackInfo);var _BoxParser=__webpack_require__(/*! ../utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _CustomTimeRanges=__webpack_require__(/*! ../utils/CustomTimeRanges */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js\\\");var _CustomTimeRanges2=_interopRequireDefault(_CustomTimeRanges);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _TextTracks=__webpack_require__(/*! ./TextTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\\\");var _TextTracks2=_interopRequireDefault(_TextTracks);var _EmbeddedTextHtmlRender=__webpack_require__(/*! ./EmbeddedTextHtmlRender */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js\\\");var _EmbeddedTextHtmlRender2=_interopRequireDefault(_EmbeddedTextHtmlRender);var _codemIsoboxer=__webpack_require__(/*! codem-isoboxer */ \\\"../node_modules/codem-isoboxer/dist/iso_boxer.js\\\");var _codemIsoboxer2=_interopRequireDefault(_codemIsoboxer);var _cea608Parser=__webpack_require__(/*! ../../../externals/cea608-parser */ \\\"../node_modules/dashjs/build/es5/externals/cea608-parser.js\\\");var _cea608Parser2=_interopRequireDefault(_cea608Parser);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TextSourceBuffer(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var embeddedInitialized=false;var instance=void 0,logger=void 0,boxParser=void 0,errHandler=void 0,adapter=void 0,manifestModel=void 0,mediaController=void 0,parser=void 0,vttParser=void 0,ttmlParser=void 0,mediaInfos=void 0,textTracks=void 0,fragmentedFragmentModel=void 0,initializationSegmentReceived=void 0,timescale=void 0,fragmentedTracks=void 0,videoModel=void 0,streamController=void 0,firstFragmentedSubtitleStart=void 0,currFragmentedTrackIdx=void 0,embeddedTracks=void 0,embeddedTimescale=void 0,embeddedLastSequenceNumber=void 0,embeddedCea608FieldParsers=void 0,embeddedTextHtmlRender=void 0,mseTimeOffset=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();}function resetFragmented(){fragmentedFragmentModel=null;timescale=NaN;fragmentedTracks=[];firstFragmentedSubtitleStart=null;initializationSegmentReceived=false;}function resetInitialSettings(){resetFragmented();mediaInfos=[];parser=null;}function initialize(mimeType,streamInfo,mediaInfoArr,fragmentModel){if(!embeddedInitialized){initEmbedded();}textTracks.setConfig({videoModel:videoModel});textTracks.initialize();if(!boxParser){boxParser=(0,_BoxParser2.default)(context).getInstance();}addMediaInfos(mimeType,streamInfo,mediaInfoArr,fragmentModel);}function addMediaInfos(mimeType,streamInfo,mediaInfoArr,fragmentModel){var isFragmented=!adapter.getIsTextTrack(mimeType);mediaInfos=mediaInfos.concat(mediaInfoArr);if(isFragmented){fragmentedFragmentModel=fragmentModel;instance.buffered=(0,_CustomTimeRanges2.default)(context).create();fragmentedTracks=mediaController.getTracksFor(_Constants2.default.FRAGMENTED_TEXT,streamInfo);var currFragTrack=mediaController.getCurrentTrackFor(_Constants2.default.FRAGMENTED_TEXT,streamInfo);for(var i=0;i<fragmentedTracks.length;i++){if(fragmentedTracks[i]===currFragTrack){setCurrentFragmentedTrackIdx(i);break;}}}for(var _i=0;_i<mediaInfos.length;_i++){createTextTrackFromMediaInfo(null,mediaInfos[_i]);}}function abort(){textTracks.deleteAllTextTracks();resetFragmented();boxParser=null;mediaInfos=[];}function reset(){resetInitialSettings();streamController=null;videoModel=null;textTracks=null;}function onVideoChunkReceived(e){var chunk=e.chunk;if(chunk.mediaInfo.embeddedCaptions){append(chunk.bytes,chunk);}}function initEmbedded(){embeddedTracks=[];textTracks=(0,_TextTracks2.default)(context).getInstance();textTracks.setConfig({videoModel:videoModel});textTracks.initialize();boxParser=(0,_BoxParser2.default)(context).getInstance();currFragmentedTrackIdx=null;embeddedTimescale=0;embeddedCea608FieldParsers=[];embeddedLastSequenceNumber=null;embeddedInitialized=true;embeddedTextHtmlRender=(0,_EmbeddedTextHtmlRender2.default)(context).getInstance();var streamProcessors=streamController.getActiveStreamProcessors();for(var i in streamProcessors){if(streamProcessors[i].getType()==='video'){mseTimeOffset=streamProcessors[i].getRepresentationInfo().MSETimeOffset;break;}}eventBus.on(_Events2.default.VIDEO_CHUNK_RECEIVED,onVideoChunkReceived,this);eventBus.on(_Events2.default.BUFFER_CLEARED,onVideoBufferCleared,this);}function resetEmbedded(){eventBus.off(_Events2.default.VIDEO_CHUNK_RECEIVED,onVideoChunkReceived,this);eventBus.off(_Events2.default.BUFFER_CLEARED,onVideoBufferCleared,this);if(textTracks){textTracks.deleteAllTextTracks();}embeddedInitialized=false;embeddedTracks=[];embeddedCea608FieldParsers=[null,null];embeddedLastSequenceNumber=null;}function addEmbeddedTrack(mediaInfo){if(!embeddedInitialized){initEmbedded();}if(mediaInfo){if(mediaInfo.id===_Constants2.default.CC1||mediaInfo.id===_Constants2.default.CC3){for(var i=0;i<embeddedTracks.length;i++){if(embeddedTracks[i].id===mediaInfo.id){return;}}embeddedTracks.push(mediaInfo);}else{logger.warn('Embedded track '+mediaInfo.id+' not supported!');}}}function setConfig(config){if(!config){return;}if(config.errHandler){errHandler=config.errHandler;}if(config.adapter){adapter=config.adapter;}if(config.manifestModel){manifestModel=config.manifestModel;}if(config.mediaController){mediaController=config.mediaController;}if(config.videoModel){videoModel=config.videoModel;}if(config.streamController){streamController=config.streamController;}if(config.textTracks){textTracks=config.textTracks;}if(config.vttParser){vttParser=config.vttParser;}if(config.ttmlParser){ttmlParser=config.ttmlParser;}}function getConfig(){var config={fragmentModel:fragmentedFragmentModel,fragmentedTracks:fragmentedTracks,videoModel:videoModel};return config;}function setCurrentFragmentedTrackIdx(idx){currFragmentedTrackIdx=idx;}function createTextTrackFromMediaInfo(captionData,mediaInfo){var textTrackInfo=new _TextTrackInfo2.default();var trackKindMap={subtitle:'subtitles',caption:'captions'};//Dash Spec has no \\\"s\\\" on end of KIND but HTML needs plural.\\nvar getKind=function getKind(){var kind=mediaInfo.roles.length>0?trackKindMap[mediaInfo.roles[0]]:trackKindMap.caption;kind=kind===trackKindMap.caption||kind===trackKindMap.subtitle?kind:trackKindMap.caption;return kind;};var checkTTML=function checkTTML(){var ttml=false;if(mediaInfo.codec&&mediaInfo.codec.search(_Constants2.default.STPP)>=0){ttml=true;}if(mediaInfo.mimeType&&mediaInfo.mimeType.search(_Constants2.default.TTML)>=0){ttml=true;}return ttml;};textTrackInfo.captionData=captionData;textTrackInfo.lang=mediaInfo.lang;textTrackInfo.labels=mediaInfo.labels;textTrackInfo.id=mediaInfo.id?mediaInfo.id:mediaInfo.index;// AdaptationSet id (an unsigned int) as it's optional parameter, use mediaInfo.index\\ntextTrackInfo.index=mediaInfo.index;// AdaptationSet index in manifest\\ntextTrackInfo.isTTML=checkTTML();textTrackInfo.defaultTrack=getIsDefault(mediaInfo);textTrackInfo.isFragmented=!adapter.getIsTextTrack(mediaInfo.mimeType);textTrackInfo.isEmbedded=mediaInfo.isEmbedded?true:false;textTrackInfo.kind=getKind();textTrackInfo.roles=mediaInfo.roles;textTrackInfo.accessibility=mediaInfo.accessibility;var totalNrTracks=(mediaInfos?mediaInfos.length:0)+embeddedTracks.length;textTracks.addTextTrack(textTrackInfo,totalNrTracks);}function append(bytes,chunk){var result=void 0,sampleList=void 0,i=void 0,j=void 0,k=void 0,samplesInfo=void 0,ccContent=void 0;var mediaInfo=chunk.mediaInfo;var mediaType=mediaInfo.type;var mimeType=mediaInfo.mimeType;var codecType=mediaInfo.codec||mimeType;if(!codecType){logger.error('No text type defined');return;}if(mediaType===_Constants2.default.FRAGMENTED_TEXT){if(!initializationSegmentReceived&&chunk.segmentType==='InitializationSegment'){initializationSegmentReceived=true;timescale=boxParser.getMediaTimescaleFromMoov(bytes);}else{if(!initializationSegmentReceived){return;}samplesInfo=boxParser.getSamplesInfo(bytes);sampleList=samplesInfo.sampleList;if(firstFragmentedSubtitleStart===null&&sampleList.length>0){firstFragmentedSubtitleStart=sampleList[0].cts-chunk.start*timescale;}if(codecType.search(_Constants2.default.STPP)>=0){parser=parser!==null?parser:getParser(codecType);for(i=0;i<sampleList.length;i++){var sample=sampleList[i];var sampleStart=sample.cts;var sampleRelStart=sampleStart-firstFragmentedSubtitleStart;this.buffered.add(sampleRelStart/timescale,(sampleRelStart+sample.duration)/timescale);var dataView=new DataView(bytes,sample.offset,sample.subSizes[0]);ccContent=_codemIsoboxer2.default.Utils.dataViewToString(dataView,_Constants2.default.UTF8);var images=[];var subOffset=sample.offset+sample.subSizes[0];for(j=1;j<sample.subSizes.length;j++){var inData=new Uint8Array(bytes,subOffset,sample.subSizes[j]);var raw=String.fromCharCode.apply(null,inData);images.push(raw);subOffset+=sample.subSizes[j];}try{// Only used for Miscrosoft Smooth Streaming support - caption time is relative to sample time. In this case, we apply an offset.\\nvar manifest=manifestModel.getValue();var offsetTime=manifest.ttmlTimeIsRelative?sampleStart/timescale:0;result=parser.parse(ccContent,offsetTime,sampleStart/timescale,(sampleStart+sample.duration)/timescale,images);textTracks.addCaptions(currFragmentedTrackIdx,firstFragmentedSubtitleStart/timescale,result);}catch(e){fragmentedFragmentModel.removeExecutedRequestsBeforeTime();this.remove();logger.error('TTML parser error: '+e.message);}}}else{// WebVTT case\\nvar captionArray=[];for(i=0;i<sampleList.length;i++){var _sample=sampleList[i];_sample.cts-=firstFragmentedSubtitleStart;this.buffered.add(_sample.cts/timescale,(_sample.cts+_sample.duration)/timescale);var sampleData=bytes.slice(_sample.offset,_sample.offset+_sample.size);// There are boxes inside the sampleData, so we need a ISOBoxer to get at it.\\nvar sampleBoxes=_codemIsoboxer2.default.parseBuffer(sampleData);for(j=0;j<sampleBoxes.boxes.length;j++){var box1=sampleBoxes.boxes[j];logger.debug('VTT box1: '+box1.type);if(box1.type==='vtte'){continue;//Empty box\\n}if(box1.type==='vttc'){logger.debug('VTT vttc boxes.length = '+box1.boxes.length);for(k=0;k<box1.boxes.length;k++){var box2=box1.boxes[k];logger.debug('VTT box2: '+box2.type);if(box2.type==='payl'){var cue_text=box2.cue_text;logger.debug('VTT cue_text = '+cue_text);var start_time=_sample.cts/timescale;var end_time=(_sample.cts+_sample.duration)/timescale;captionArray.push({start:start_time,end:end_time,data:cue_text,styles:{}});logger.debug('VTT '+start_time+'-'+end_time+' : '+cue_text);}}}}}if(captionArray.length>0){textTracks.addCaptions(currFragmentedTrackIdx,0,captionArray);}}}}else if(mediaType===_Constants2.default.TEXT){var _dataView=new DataView(bytes,0,bytes.byteLength);ccContent=_codemIsoboxer2.default.Utils.dataViewToString(_dataView,_Constants2.default.UTF8);try{result=getParser(codecType).parse(ccContent,0);textTracks.addCaptions(textTracks.getCurrentTrackIdx(),0,result);}catch(e){errHandler.error(new _DashJSError2.default(_Errors2.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,_Errors2.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,ccContent));}}else if(mediaType===_Constants2.default.VIDEO){//embedded text\\nif(chunk.segmentType===_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE){if(embeddedTimescale===0){embeddedTimescale=boxParser.getMediaTimescaleFromMoov(bytes);for(i=0;i<embeddedTracks.length;i++){createTextTrackFromMediaInfo(null,embeddedTracks[i]);}}}else{// MediaSegment\\nif(embeddedTimescale===0){logger.warn('CEA-608: No timescale for embeddedTextTrack yet');return;}var makeCueAdderForIndex=function makeCueAdderForIndex(self,trackIndex){function newCue(startTime,endTime,captionScreen){var captionsArray=null;if(videoModel.getTTMLRenderingDiv()){captionsArray=embeddedTextHtmlRender.createHTMLCaptionsFromScreen(videoModel.getElement(),startTime,endTime,captionScreen);}else{var text=captionScreen.getDisplayText();captionsArray=[{start:startTime,end:endTime,data:text,styles:{}}];}if(captionsArray){textTracks.addCaptions(trackIndex,0,captionsArray);}}return newCue;};samplesInfo=boxParser.getSamplesInfo(bytes);var sequenceNumber=samplesInfo.lastSequenceNumber;if(!embeddedCea608FieldParsers[0]&&!embeddedCea608FieldParsers[1]){// Time to setup the CEA-608 parsing\\nvar field=void 0,handler=void 0,trackIdx=void 0;for(i=0;i<embeddedTracks.length;i++){if(embeddedTracks[i].id===_Constants2.default.CC1){field=0;trackIdx=textTracks.getTrackIdxForId(_Constants2.default.CC1);}else if(embeddedTracks[i].id===_Constants2.default.CC3){field=1;trackIdx=textTracks.getTrackIdxForId(_Constants2.default.CC3);}if(trackIdx===-1){logger.warn('CEA-608: data before track is ready.');return;}handler=makeCueAdderForIndex(this,trackIdx);embeddedCea608FieldParsers[i]=new _cea608Parser2.default.Cea608Parser(i+1,{'newCue':handler},null);}}if(embeddedTimescale){if(embeddedLastSequenceNumber!==null&&sequenceNumber!==embeddedLastSequenceNumber+samplesInfo.numSequences){for(i=0;i<embeddedCea608FieldParsers.length;i++){if(embeddedCea608FieldParsers[i]){embeddedCea608FieldParsers[i].reset();}}}var allCcData=extractCea608Data(bytes,samplesInfo.sampleList);for(var fieldNr=0;fieldNr<embeddedCea608FieldParsers.length;fieldNr++){var ccData=allCcData.fields[fieldNr];var fieldParser=embeddedCea608FieldParsers[fieldNr];if(fieldParser){for(i=0;i<ccData.length;i++){fieldParser.addData(ccData[i][0]/embeddedTimescale,ccData[i][1]);}}}embeddedLastSequenceNumber=sequenceNumber;}}}}/**\\n     * Extract CEA-608 data from a buffer of data.\\n     * @param {ArrayBuffer} data\\n     * @param {Array} samples cue information\\n     * @returns {Object|null} ccData corresponding to one segment.\\n     */function extractCea608Data(data,samples){if(samples.length===0){return null;}var allCcData={splits:[],fields:[[],[]]};var raw=new DataView(data);for(var i=0;i<samples.length;i++){var sample=samples[i];var cea608Ranges=_cea608Parser2.default.findCea608Nalus(raw,sample.offset,sample.size);var lastSampleTime=null;var idx=0;for(var j=0;j<cea608Ranges.length;j++){var ccData=_cea608Parser2.default.extractCea608DataFromRange(raw,cea608Ranges[j]);for(var k=0;k<2;k++){if(ccData[k].length>0){if(sample.cts!==lastSampleTime){idx=0;}else{idx+=1;}allCcData.fields[k].push([sample.cts+mseTimeOffset*embeddedTimescale,ccData[k],idx]);lastSampleTime=sample.cts;}}}}// Sort by sampleTime ascending order\\n// If two packets have the same sampleTime, use them in the order\\n// they were received\\nallCcData.fields.forEach(function sortField(field){field.sort(function(a,b){if(a[0]===b[0]){return a[2]-b[2];}return a[0]-b[0];});});return allCcData;}function getIsDefault(mediaInfo){//TODO How to tag default. currently same order as listed in manifest.\\n// Is there a way to mark a text adaptation set as the default one? DASHIF meeting talk about using role which is being used for track KIND\\n// Eg subtitles etc. You can have multiple role tags per adaptation Not defined in the spec yet.\\nvar isDefault=false;if(embeddedTracks.length>1&&mediaInfo.isEmbedded){isDefault=mediaInfo.id&&mediaInfo.id===_Constants2.default.CC1;// CC1 if both CC1 and CC3 exist\\n}else if(embeddedTracks.length===1){if(mediaInfo.id&&typeof mediaInfo.id==='string'&&mediaInfo.id.substring(0,2)==='CC'){// Either CC1 or CC3\\nisDefault=true;}}else if(embeddedTracks.length===0){isDefault=mediaInfo.index===mediaInfos[0].index;}return isDefault;}function getParser(codecType){var parser=void 0;if(codecType.search(_Constants2.default.VTT)>=0){parser=vttParser;}else if(codecType.search(_Constants2.default.TTML)>=0||codecType.search(_Constants2.default.STPP)>=0){parser=ttmlParser;}return parser;}function remove(start,end){//if start and end are not defined, remove all\\nif(start===undefined&&start===end){start=this.buffered.start(0);end=this.buffered.end(this.buffered.length-1);}this.buffered.remove(start,end);}function onVideoBufferCleared(e){embeddedTracks.forEach(function(track){var trackIdx=textTracks.getTrackIdxForId(track.id);if(trackIdx>=0){textTracks.deleteCuesFromTrackIdx(trackIdx,e.from,e.to);}});}instance={initialize:initialize,append:append,abort:abort,addEmbeddedTrack:addEmbeddedTrack,resetEmbedded:resetEmbedded,setConfig:setConfig,getConfig:getConfig,setCurrentFragmentedTrackIdx:setCurrentFragmentedTrackIdx,remove:remove,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TextSourceBuffer.__dashjs_factory_name='TextSourceBuffer';exports.default=_FactoryMaker2.default.getSingletonFactory(TextSourceBuffer);\\n//# sourceMappingURL=TextSourceBuffer.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _imsc=__webpack_require__(/*! imsc */ \\\"../node_modules/imsc/src/main/js/main.js\\\");var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TextTracks(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,Cue=void 0,videoModel=void 0,textTrackQueue=void 0,trackElementArr=void 0,currentTrackIdx=void 0,actualVideoLeft=void 0,actualVideoTop=void 0,actualVideoWidth=void 0,actualVideoHeight=void 0,captionContainer=void 0,videoSizeCheckInterval=void 0,fullscreenAttribute=void 0,displayCCOnTop=void 0,previousISDState=void 0,topZIndex=void 0,resizeObserver=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function initialize(){if(typeof window==='undefined'||typeof navigator==='undefined'){return;}Cue=window.VTTCue||window.TextTrackCue;textTrackQueue=[];trackElementArr=[];currentTrackIdx=-1;actualVideoLeft=0;actualVideoTop=0;actualVideoWidth=0;actualVideoHeight=0;captionContainer=null;videoSizeCheckInterval=null;displayCCOnTop=false;topZIndex=2147483647;previousISDState=null;if(document.fullscreenElement!==undefined){fullscreenAttribute='fullscreenElement';// Standard and Edge\\n}else if(document.webkitIsFullScreen!==undefined){fullscreenAttribute='webkitIsFullScreen';// Chrome and Safari (and Edge)\\n}else if(document.msFullscreenElement){// IE11\\nfullscreenAttribute='msFullscreenElement';}else if(document.mozFullScreen){// Firefox\\nfullscreenAttribute='mozFullScreen';}}function createTrackForUserAgent(i){var kind=textTrackQueue[i].kind;var label=textTrackQueue[i].id!==undefined?textTrackQueue[i].id:textTrackQueue[i].lang;var lang=textTrackQueue[i].lang;var isTTML=textTrackQueue[i].isTTML;var isEmbedded=textTrackQueue[i].isEmbedded;var track=videoModel.addTextTrack(kind,label,lang,isTTML,isEmbedded);return track;}function setDisplayCConTop(value){(0,_SupervisorTools.checkParameterType)(value,'boolean');displayCCOnTop=value;if(!captionContainer||document[fullscreenAttribute]){return;}captionContainer.style.zIndex=value?topZIndex:null;}function addTextTrack(textTrackInfoVO,totalTextTracks){if(textTrackQueue.length===totalTextTracks){logger.error('Trying to add too many tracks.');return;}textTrackQueue.push(textTrackInfoVO);if(textTrackQueue.length===totalTextTracks){textTrackQueue.sort(function(a,b){//Sort in same order as in manifest\\nreturn a.index-b.index;});captionContainer=videoModel.getTTMLRenderingDiv();var defaultIndex=-1;for(var i=0;i<textTrackQueue.length;i++){var track=createTrackForUserAgent.call(this,i);trackElementArr.push(track);//used to remove tracks from video element when added manually\\nif(textTrackQueue[i].defaultTrack){// track.default is an object property identifier that is a reserved word\\n// The following jshint directive is used to suppressed the warning \\\"Expected an identifier and instead saw 'default' (a reserved word)\\\"\\n/*jshint -W024 */track.default=true;defaultIndex=i;}var textTrack=getTrackByIdx(i);if(textTrack){//each time a track is created, its mode should be showing by default\\n//sometime, it's not on Chrome\\ntextTrack.mode=_Constants2.default.TEXT_SHOWING;if(captionContainer&&(textTrackQueue[i].isTTML||textTrackQueue[i].isEmbedded)){textTrack.renderingType='html';}else{textTrack.renderingType='default';}}this.addCaptions(i,0,textTrackQueue[i].captionData);eventBus.trigger(_Events2.default.TEXT_TRACK_ADDED);}//set current track index in textTrackQueue array\\nsetCurrentTrackIdx.call(this,defaultIndex);if(defaultIndex>=0){var onMetadataLoaded=function onMetadataLoaded(){var track=getTrackByIdx(defaultIndex);if(track){checkVideoSize.call(this,track,true);}eventBus.off(_Events2.default.PLAYBACK_METADATA_LOADED,onMetadataLoaded,this);};eventBus.on(_Events2.default.PLAYBACK_METADATA_LOADED,onMetadataLoaded,this);for(var idx=0;idx<textTrackQueue.length;idx++){var videoTextTrack=getTrackByIdx(idx);if(videoTextTrack){videoTextTrack.mode=idx===defaultIndex?_Constants2.default.TEXT_SHOWING:_Constants2.default.TEXT_HIDDEN;}}}eventBus.trigger(_Events2.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:currentTrackIdx,tracks:textTrackQueue});//send default idx.\\n}}function getVideoVisibleVideoSize(viewWidth,viewHeight,videoWidth,videoHeight,aspectRatio,use80Percent){var viewAspectRatio=viewWidth/viewHeight;var videoAspectRatio=videoWidth/videoHeight;var videoPictureWidth=0;var videoPictureHeight=0;if(viewAspectRatio>videoAspectRatio){videoPictureHeight=viewHeight;videoPictureWidth=videoPictureHeight/videoHeight*videoWidth;}else{videoPictureWidth=viewWidth;videoPictureHeight=videoPictureWidth/videoWidth*videoHeight;}var videoPictureXAspect=0;var videoPictureYAspect=0;var videoPictureWidthAspect=0;var videoPictureHeightAspect=0;var videoPictureAspect=videoPictureWidth/videoPictureHeight;if(videoPictureAspect>aspectRatio){videoPictureHeightAspect=videoPictureHeight;videoPictureWidthAspect=videoPictureHeight*aspectRatio;}else{videoPictureWidthAspect=videoPictureWidth;videoPictureHeightAspect=videoPictureWidth/aspectRatio;}videoPictureXAspect=(viewWidth-videoPictureWidthAspect)/2;videoPictureYAspect=(viewHeight-videoPictureHeightAspect)/2;if(use80Percent){return{x:videoPictureXAspect+videoPictureWidthAspect*0.1,y:videoPictureYAspect+videoPictureHeightAspect*0.1,w:videoPictureWidthAspect*0.8,h:videoPictureHeightAspect*0.8};/* Maximal picture size in videos aspect ratio */}else{return{x:videoPictureXAspect,y:videoPictureYAspect,w:videoPictureWidthAspect,h:videoPictureHeightAspect};/* Maximal picture size in videos aspect ratio */}}function checkVideoSize(track,forceDrawing){var clientWidth=videoModel.getClientWidth();var clientHeight=videoModel.getClientHeight();var videoWidth=videoModel.getVideoWidth();var videoHeight=videoModel.getVideoHeight();var videoOffsetTop=videoModel.getVideoRelativeOffsetTop();var videoOffsetLeft=videoModel.getVideoRelativeOffsetLeft();if(videoWidth!==0&&videoHeight!==0){var aspectRatio=videoWidth/videoHeight;var use80Percent=false;if(track.isFromCEA608){// If this is CEA608 then use predefined aspect ratio\\naspectRatio=3.5/3.0;use80Percent=true;}var realVideoSize=getVideoVisibleVideoSize.call(this,clientWidth,clientHeight,videoWidth,videoHeight,aspectRatio,use80Percent);var newVideoWidth=realVideoSize.w;var newVideoHeight=realVideoSize.h;var newVideoLeft=realVideoSize.x;var newVideoTop=realVideoSize.y;if(newVideoWidth!=actualVideoWidth||newVideoHeight!=actualVideoHeight||newVideoLeft!=actualVideoLeft||newVideoTop!=actualVideoTop||forceDrawing){actualVideoLeft=newVideoLeft+videoOffsetLeft;actualVideoTop=newVideoTop+videoOffsetTop;actualVideoWidth=newVideoWidth;actualVideoHeight=newVideoHeight;if(captionContainer){var containerStyle=captionContainer.style;if(containerStyle){containerStyle.left=actualVideoLeft+'px';containerStyle.top=actualVideoTop+'px';containerStyle.width=actualVideoWidth+'px';containerStyle.height=actualVideoHeight+'px';containerStyle.zIndex=fullscreenAttribute&&document[fullscreenAttribute]||displayCCOnTop?topZIndex:null;eventBus.trigger(_Events2.default.CAPTION_CONTAINER_RESIZE);}}// Video view has changed size, so resize any active cues\\nvar activeCues=track.activeCues;if(activeCues){var len=activeCues.length;for(var i=0;i<len;++i){var cue=activeCues[i];cue.scaleCue(cue);}}}}}function scaleCue(activeCue){var videoWidth=actualVideoWidth;var videoHeight=actualVideoHeight;var key=void 0,replaceValue=void 0,valueFontSize=void 0,valueLineHeight=void 0,elements=void 0;if(activeCue.cellResolution){var cellUnit=[videoWidth/activeCue.cellResolution[0],videoHeight/activeCue.cellResolution[1]];if(activeCue.linePadding){for(key in activeCue.linePadding){if(activeCue.linePadding.hasOwnProperty(key)){var valueLinePadding=activeCue.linePadding[key];replaceValue=(valueLinePadding*cellUnit[0]).toString();// Compute the CellResolution unit in order to process properties using sizing (fontSize, linePadding, etc).\\nvar elementsSpan=document.getElementsByClassName('spanPadding');for(var i=0;i<elementsSpan.length;i++){elementsSpan[i].style.cssText=elementsSpan[i].style.cssText.replace(/(padding-left\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);elementsSpan[i].style.cssText=elementsSpan[i].style.cssText.replace(/(padding-right\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);}}}}if(activeCue.fontSize){for(key in activeCue.fontSize){if(activeCue.fontSize.hasOwnProperty(key)){if(activeCue.fontSize[key][0]==='%'){valueFontSize=activeCue.fontSize[key][1]/100;}else if(activeCue.fontSize[key][0]==='c'){valueFontSize=activeCue.fontSize[key][1];}replaceValue=(valueFontSize*cellUnit[1]).toString();if(key!=='defaultFontSize'){elements=document.getElementsByClassName(key);}else{elements=document.getElementsByClassName('paragraph');}for(var j=0;j<elements.length;j++){elements[j].style.cssText=elements[j].style.cssText.replace(/(font-size\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);}}}if(activeCue.lineHeight){for(key in activeCue.lineHeight){if(activeCue.lineHeight.hasOwnProperty(key)){if(activeCue.lineHeight[key][0]==='%'){valueLineHeight=activeCue.lineHeight[key][1]/100;}else if(activeCue.fontSize[key][0]==='c'){valueLineHeight=activeCue.lineHeight[key][1];}replaceValue=(valueLineHeight*cellUnit[1]).toString();elements=document.getElementsByClassName(key);for(var k=0;k<elements.length;k++){elements[k].style.cssText=elements[k].style.cssText.replace(/(line-height\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);}}}}}}if(activeCue.isd){var htmlCaptionDiv=document.getElementById(activeCue.cueID);if(htmlCaptionDiv){captionContainer.removeChild(htmlCaptionDiv);}renderCaption(activeCue);}}function renderCaption(cue){if(captionContainer){var finalCue=document.createElement('div');captionContainer.appendChild(finalCue);previousISDState=(0,_imsc.renderHTML)(cue.isd,finalCue,function(uri){var imsc1ImgUrnTester=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;var smpteImgUrnTester=/^#(.*)$/;if(imsc1ImgUrnTester.test(uri)){var match=imsc1ImgUrnTester.exec(uri);var imageId=parseInt(match[4],10)-1;var imageData=btoa(cue.images[imageId]);var dataUrl='data:image/png;base64,'+imageData;return dataUrl;}else if(smpteImgUrnTester.test(uri)){var _match=smpteImgUrnTester.exec(uri);var _imageId=_match[1];var _dataUrl='data:image/png;base64,'+cue.embeddedImages[_imageId];return _dataUrl;}else{return null;}},captionContainer.clientHeight,captionContainer.clientWidth,false/*displayForcedOnlyMode*/,function(err){logger.info('renderCaption :',err);//TODO add ErrorHandler management\\n},previousISDState,true/*enableRollUp*/);finalCue.id=cue.cueID;eventBus.trigger(_Events2.default.CAPTION_RENDERED,{captionDiv:finalCue,currentTrackIdx:currentTrackIdx});}}/*\\n     * Add captions to track, store for later adding, or add captions added before\\n     */function addCaptions(trackIdx,timeOffset,captionData){var track=getTrackByIdx(trackIdx);var self=this;if(!track){return;}if(!Array.isArray(captionData)||captionData.length===0){return;}for(var item=0;item<captionData.length;item++){var cue=void 0;var currentItem=captionData[item];track.cellResolution=currentItem.cellResolution;track.isFromCEA608=currentItem.isFromCEA608;if(currentItem.type==='html'&&captionContainer){cue=new Cue(currentItem.start-timeOffset,currentItem.end-timeOffset,'');cue.cueHTMLElement=currentItem.cueHTMLElement;cue.isd=currentItem.isd;cue.images=currentItem.images;cue.embeddedImages=currentItem.embeddedImages;cue.cueID=currentItem.cueID;cue.scaleCue=scaleCue.bind(self);//useful parameters for cea608 subtitles, not for TTML one.\\ncue.cellResolution=currentItem.cellResolution;cue.lineHeight=currentItem.lineHeight;cue.linePadding=currentItem.linePadding;cue.fontSize=currentItem.fontSize;captionContainer.style.left=actualVideoLeft+'px';captionContainer.style.top=actualVideoTop+'px';captionContainer.style.width=actualVideoWidth+'px';captionContainer.style.height=actualVideoHeight+'px';cue.onenter=function(){if(track.mode===_Constants2.default.TEXT_SHOWING){if(this.isd){renderCaption(this);logger.debug('Cue enter id:'+this.cueID);}else{captionContainer.appendChild(this.cueHTMLElement);scaleCue.call(self,this);eventBus.trigger(_Events2.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:currentTrackIdx});}}};cue.onexit=function(){if(captionContainer){var divs=captionContainer.childNodes;for(var i=0;i<divs.length;++i){if(divs[i].id===this.cueID){logger.debug('Cue exit id:'+divs[i].id);captionContainer.removeChild(divs[i]);--i;}}}};}else{if(currentItem.data){cue=new Cue(currentItem.start-timeOffset,currentItem.end-timeOffset,currentItem.data);if(currentItem.styles){if(currentItem.styles.align!==undefined&&'align'in cue){cue.align=currentItem.styles.align;}if(currentItem.styles.line!==undefined&&'line'in cue){cue.line=currentItem.styles.line;}if(currentItem.styles.position!==undefined&&'position'in cue){cue.position=currentItem.styles.position;}if(currentItem.styles.size!==undefined&&'size'in cue){cue.size=currentItem.styles.size;}}cue.onenter=function(){if(track.mode===_Constants2.default.TEXT_SHOWING){eventBus.trigger(_Events2.default.CAPTION_RENDERED,{currentTrackIdx:currentTrackIdx});}};}}try{if(cue){track.addCue(cue);}else{logger.error('impossible to display subtitles.');}}catch(e){// Edge crash, delete everything and start adding again\\n// @see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11979877/\\ndeleteTrackCues(track);track.addCue(cue);throw e;}}}function getTrackByIdx(idx){return idx>=0&&textTrackQueue[idx]?videoModel.getTextTrack(textTrackQueue[idx].kind,textTrackQueue[idx].id,textTrackQueue[idx].lang,textTrackQueue[idx].isTTML,textTrackQueue[idx].isEmbedded):null;}function getCurrentTrackIdx(){return currentTrackIdx;}function getTrackIdxForId(trackId){var idx=-1;for(var i=0;i<textTrackQueue.length;i++){if(textTrackQueue[i].id===trackId){idx=i;break;}}return idx;}function setCurrentTrackIdx(idx){var _this=this;if(idx===currentTrackIdx){return;}currentTrackIdx=idx;var track=getTrackByIdx(currentTrackIdx);setCueStyleOnTrack.call(this,track);if(videoSizeCheckInterval){clearInterval(videoSizeCheckInterval);videoSizeCheckInterval=null;}if(track&&track.renderingType==='html'){checkVideoSize.call(this,track,true);if(window.ResizeObserver){resizeObserver=new window.ResizeObserver(function(){checkVideoSize.call(_this,track,true);});resizeObserver.observe(videoModel.getElement());}else{videoSizeCheckInterval=setInterval(checkVideoSize.bind(this,track),500);}}}function setCueStyleOnTrack(track){clearCaptionContainer.call(this);if(track){if(track.renderingType==='html'){setNativeCueStyle.call(this);}else{removeNativeCueStyle.call(this);}}else{removeNativeCueStyle.call(this);}}function cueInRange(cue,start,end){return(isNaN(start)||cue.startTime>=start)&&(isNaN(end)||cue.endTime<=end);}function deleteTrackCues(track,start,end){if(track.cues){var cues=track.cues;var lastIdx=cues.length-1;for(var r=lastIdx;r>=0;r--){if(cueInRange(cues[r],start,end)){track.removeCue(cues[r]);}}}}function deleteCuesFromTrackIdx(trackIdx,start,end){var track=getTrackByIdx(trackIdx);if(track){deleteTrackCues(track,start,end);}}function deleteAllTextTracks(){var ln=trackElementArr?trackElementArr.length:0;for(var i=0;i<ln;i++){var track=getTrackByIdx(i);if(track){deleteTrackCues.call(this,track);track.mode='disabled';}}trackElementArr=[];textTrackQueue=[];if(videoSizeCheckInterval){clearInterval(videoSizeCheckInterval);videoSizeCheckInterval=null;}if(resizeObserver&&videoModel){resizeObserver.unobserve(videoModel.getElement());resizeObserver=null;}currentTrackIdx=-1;clearCaptionContainer.call(this);}function deleteTextTrack(idx){videoModel.removeChild(trackElementArr[idx]);trackElementArr.splice(idx,1);}/* Set native cue style to transparent background to avoid it being displayed. */function setNativeCueStyle(){var styleElement=document.getElementById('native-cue-style');if(styleElement){return;//Already set\\n}styleElement=document.createElement('style');styleElement.id='native-cue-style';document.head.appendChild(styleElement);var stylesheet=styleElement.sheet;var video=videoModel.getElement();try{if(video){if(video.id){stylesheet.insertRule('#'+video.id+'::cue {background: transparent}',0);}else if(video.classList.length!==0){stylesheet.insertRule('.'+video.className+'::cue {background: transparent}',0);}else{stylesheet.insertRule('video::cue {background: transparent}',0);}}}catch(e){logger.info(''+e.message);}}/* Remove the extra cue style with transparent background for native cues. */function removeNativeCueStyle(){var styleElement=document.getElementById('native-cue-style');if(styleElement){document.head.removeChild(styleElement);}}function clearCaptionContainer(){if(captionContainer){while(captionContainer.firstChild){captionContainer.removeChild(captionContainer.firstChild);}}}function setConfig(config){if(!config){return;}if(config.videoModel){videoModel=config.videoModel;}}function setModeForTrackIdx(idx,mode){var track=getTrackByIdx(idx);if(track&&track.mode!==mode){track.mode=mode;}}function getCurrentTrackInfo(){return textTrackQueue[currentTrackIdx];}instance={initialize:initialize,setDisplayCConTop:setDisplayCConTop,addTextTrack:addTextTrack,addCaptions:addCaptions,getCurrentTrackIdx:getCurrentTrackIdx,setCurrentTrackIdx:setCurrentTrackIdx,getTrackIdxForId:getTrackIdxForId,getCurrentTrackInfo:getCurrentTrackInfo,setModeForTrackIdx:setModeForTrackIdx,deleteCuesFromTrackIdx:deleteCuesFromTrackIdx,deleteAllTextTracks:deleteAllTextTracks,deleteTextTrack:deleteTextTrack,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TextTracks.__dashjs_factory_name='TextTracks';exports.default=_FactoryMaker2.default.getSingletonFactory(TextTracks);\\n//# sourceMappingURL=TextTracks.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _Thumbnail=__webpack_require__(/*! ../vo/Thumbnail */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js\\\");var _Thumbnail2=_interopRequireDefault(_Thumbnail);var _ThumbnailTracks=__webpack_require__(/*! ./ThumbnailTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\\\");var _ThumbnailTracks2=_interopRequireDefault(_ThumbnailTracks);var _BitrateInfo=__webpack_require__(/*! ../vo/BitrateInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js\\\");var _BitrateInfo2=_interopRequireDefault(_BitrateInfo);var _SegmentsUtils=__webpack_require__(/*! ../../dash/utils/SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ThumbnailController(config){var context=this.context;var streamInfo=config.streamInfo;var instance=void 0,thumbnailTracks=void 0;function setup(){reset();thumbnailTracks=(0,_ThumbnailTracks2.default)(context).create({streamInfo:streamInfo,adapter:config.adapter,baseURLController:config.baseURLController,timelineConverter:config.timelineConverter,debug:config.debug,eventBus:config.eventBus,events:config.events,dashConstants:config.dashConstants});}function getStreamId(){return streamInfo.id;}function provideThumbnail(time,callback){if(typeof callback!=='function'){return;}var track=thumbnailTracks.getCurrentTrack();var offset=void 0,request=void 0;if(!track||track.segmentDuration<=0||time===undefined||time===null){callback(null);return;}// Calculate index of the sprite given a time\\nif(isNaN(track.segmentDuration)){request=thumbnailTracks.getThumbnailRequestForTime(time);if(request){track.segmentDuration=request.duration;}}offset=time%track.segmentDuration;var thumbIndex=Math.floor(offset*track.tilesHor*track.tilesVert/track.segmentDuration);// Create and return the thumbnail\\nvar thumbnail=new _Thumbnail2.default();thumbnail.width=Math.floor(track.widthPerTile);thumbnail.height=Math.floor(track.heightPerTile);thumbnail.x=Math.floor(thumbIndex%track.tilesHor)*track.widthPerTile;thumbnail.y=Math.floor(thumbIndex/track.tilesHor)*track.heightPerTile;if('readThumbnail'in track){return track.readThumbnail(time,function(url){thumbnail.url=url;callback(thumbnail);});}else{if(!request){var seq=Math.floor(time/track.segmentDuration);thumbnail.url=buildUrlFromTemplate(track,seq);}else{thumbnail.url=request.url;track.segmentDuration=NaN;}callback(thumbnail);}}function buildUrlFromTemplate(track,seq){var seqIdx=seq+track.startNumber;var url=(0,_SegmentsUtils.replaceTokenForTemplate)(track.templateUrl,'Number',seqIdx);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Time',(seqIdx-1)*track.segmentDuration*track.timescale);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Bandwidth',track.bandwidth);return(0,_SegmentsUtils.unescapeDollarsInTemplate)(url);}function setTrackByIndex(index){thumbnailTracks.setTrackByIndex(index);}function getCurrentTrackIndex(){return thumbnailTracks.getCurrentTrackIndex();}function getBitrateList(){var tracks=thumbnailTracks.getTracks();var i=0;return tracks.map(function(t){var bitrateInfo=new _BitrateInfo2.default();bitrateInfo.mediaType=_Constants2.default.IMAGE;bitrateInfo.qualityIndex=i++;bitrateInfo.bitrate=t.bitrate;bitrateInfo.width=t.width;bitrateInfo.height=t.height;return bitrateInfo;});}function reset(){if(thumbnailTracks){thumbnailTracks.reset();}}instance={getStreamId:getStreamId,provide:provideThumbnail,setTrackByIndex:setTrackByIndex,getCurrentTrackIndex:getCurrentTrackIndex,getBitrateList:getBitrateList,reset:reset};setup();return instance;}ThumbnailController.__dashjs_factory_name='ThumbnailController';exports.default=_FactoryMaker2.default.getClassFactory(ThumbnailController);\\n//# sourceMappingURL=ThumbnailController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.THUMBNAILS_SCHEME_ID_URIS=undefined;var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _ThumbnailTrackInfo=__webpack_require__(/*! ../vo/ThumbnailTrackInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js\\\");var _ThumbnailTrackInfo2=_interopRequireDefault(_ThumbnailTrackInfo);var _URLUtils=__webpack_require__(/*! ../../streaming/utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _SegmentsUtils=__webpack_require__(/*! ../../dash/utils/SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _BoxParser=__webpack_require__(/*! ../../streaming/utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _XHRLoader=__webpack_require__(/*! ../../streaming/net/XHRLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\\\");var _XHRLoader2=_interopRequireDefault(_XHRLoader);var _DashHandler=__webpack_require__(/*! ../../dash/DashHandler */ \\\"../node_modules/dashjs/build/es5/src/dash/DashHandler.js\\\");var _DashHandler2=_interopRequireDefault(_DashHandler);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var THUMBNAILS_SCHEME_ID_URIS=exports.THUMBNAILS_SCHEME_ID_URIS=['http://dashif.org/thumbnail_tile','http://dashif.org/guidelines/thumbnail_tile'];function ThumbnailTracks(config){var context=this.context;var adapter=config.adapter;var baseURLController=config.baseURLController;var streamInfo=config.streamInfo;var timelineConverter=config.timelineConverter;var debug=config.debug;var eventBus=config.eventBus;var events=config.events;var dashConstants=config.dashConstants;var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,tracks=void 0,indexHandler=void 0,currentTrackIndex=void 0,mediaInfo=void 0,loader=void 0,boxParser=void 0;function initialize(){reset();loader=(0,_XHRLoader2.default)(context).create({});boxParser=(0,_BoxParser2.default)(context).getInstance();indexHandler=(0,_DashHandler2.default)(context).create({streamInfo:streamInfo,timelineConverter:timelineConverter,baseURLController:baseURLController,debug:debug,eventBus:eventBus,events:events,dashConstants:dashConstants,urlUtils:urlUtils});// initialize controllers\\nindexHandler.initialize(adapter?adapter.getIsDynamic():false);// parse representation and create tracks\\naddTracks();}function normalizeSegments(fragments,representation){var segments=[];var count=0;var i=void 0,len=void 0,s=void 0,seg=void 0;for(i=0,len=fragments.length;i<len;i++){s=fragments[i];seg=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,adapter.getIsDynamic(),representation,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,count);if(seg){segments.push(seg);seg=null;count++;}}return segments;}function addTracks(){if(!streamInfo||!adapter){return;}// Extract thumbnail tracks\\nmediaInfo=adapter.getMediaInfoForType(streamInfo,_Constants2.default.IMAGE);if(!mediaInfo){return;}var voReps=adapter.getVoRepresentations(mediaInfo);if(voReps&&voReps.length>0){voReps.forEach(function(rep){if(rep.segmentInfoType===_DashConstants2.default.SEGMENT_TEMPLATE&&rep.segmentDuration>0&&rep.media||rep.segmentInfoType===_DashConstants2.default.SEGMENT_TIMELINE){createTrack(rep);}if(rep.segmentInfoType===_DashConstants2.default.SEGMENT_BASE){createTrack(rep,true);}});}if(tracks.length>0){// Sort bitrates and select the lowest bitrate rendition\\ntracks.sort(function(a,b){return a.bitrate-b.bitrate;});currentTrackIndex=tracks.length-1;}}function createTrack(representation,useSegmentBase){var track=new _ThumbnailTrackInfo2.default();track.id=representation.id;track.bitrate=representation.bandwidth;track.width=representation.width;track.height=representation.height;track.tilesHor=1;track.tilesVert=1;if(representation.essentialProperties){representation.essentialProperties.forEach(function(p){if(THUMBNAILS_SCHEME_ID_URIS.indexOf(p.schemeIdUri)>=0&&p.value){var vars=p.value.split('x');if(vars.length===2&&!isNaN(vars[0])&&!isNaN(vars[1])){track.tilesHor=parseInt(vars[0],10);track.tilesVert=parseInt(vars[1],10);}}});}if(useSegmentBase){eventBus.trigger(_Events2.default.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:streamInfo.id,mediaType:_Constants2.default.IMAGE,mimeType:mediaInfo.mimeType,representation:representation,callback:function callback(streamId,mediaType,segments,representation){var cache=[];segments=normalizeSegments(segments,representation);track.segmentDuration=segments[0].duration;//assume all segments have the same duration\\ntrack.readThumbnail=function(time,callback){var cached=null;cache.some(function(el){if(el.start<=time&&el.end>time){cached=el.url;return true;}});if(cached){callback(cached);}else{segments.some(function(ss){if(ss.mediaStartTime<=time&&ss.mediaStartTime+ss.duration>time){var baseURL=baseURLController.resolve(representation.path);loader.load({method:'get',url:baseURL.url,request:{range:ss.mediaRange,responseType:'arraybuffer'},onload:function onload(e){var info=boxParser.getSamplesInfo(e.target.response);var blob=new Blob([e.target.response.slice(info.sampleList[0].offset,info.sampleList[0].offset+info.sampleList[0].size)],{type:'image/jpeg'});var imageUrl=window.URL.createObjectURL(blob);cache.push({start:ss.mediaStartTime,end:ss.mediaStartTime+ss.duration,url:imageUrl});if(callback)callback(imageUrl);}});return true;}});}};}});}else{track.startNumber=representation.startNumber;track.segmentDuration=representation.segmentDuration;track.timescale=representation.timescale;track.templateUrl=buildTemplateUrl(representation);}if(track.tilesHor>0&&track.tilesVert>0){// Precalculate width and heigth per tile for perf reasons\\ntrack.widthPerTile=track.width/track.tilesHor;track.heightPerTile=track.height/track.tilesVert;tracks.push(track);}}function buildTemplateUrl(representation){var templateUrl=urlUtils.isRelative(representation.media)?urlUtils.resolve(representation.media,baseURLController.resolve(representation.path).url):representation.media;if(!templateUrl){return'';}return(0,_SegmentsUtils.replaceIDForTemplate)(templateUrl,representation.id);}function getTracks(){return tracks;}function getCurrentTrackIndex(){return currentTrackIndex;}function getCurrentTrack(){if(currentTrackIndex<0){return null;}return tracks[currentTrackIndex];}function setTrackByIndex(index){if(!tracks||tracks.length===0){return;}// select highest bitrate in case selected index is higher than bitrate list length\\nif(index>=tracks.length){index=tracks.length-1;}currentTrackIndex=index;}function getThumbnailRequestForTime(time){var currentVoRep=void 0;var voReps=adapter.getVoRepresentations(mediaInfo);for(var i=0;i<voReps.length;i++){if(tracks[currentTrackIndex].id===voReps[i].id){currentVoRep=voReps[i];break;}}return indexHandler.getSegmentRequestForTime(mediaInfo,currentVoRep,time);}function reset(){tracks=[];currentTrackIndex=-1;mediaInfo=null;}instance={initialize:initialize,getTracks:getTracks,reset:reset,setTrackByIndex:setTrackByIndex,getCurrentTrack:getCurrentTrack,getCurrentTrackIndex:getCurrentTrackIndex,getThumbnailRequestForTime:getThumbnailRequestForTime};initialize();return instance;}ThumbnailTracks.__dashjs_factory_name='ThumbnailTracks';exports.default=_FactoryMaker2.default.getClassFactory(ThumbnailTracks);\\n//# sourceMappingURL=ThumbnailTracks.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _BlacklistController=__webpack_require__(/*! ../controllers/BlacklistController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js\\\");var _BlacklistController2=_interopRequireDefault(_BlacklistController);var _DVBSelector=__webpack_require__(/*! ./baseUrlResolution/DVBSelector */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js\\\");var _DVBSelector2=_interopRequireDefault(_DVBSelector);var _BasicSelector=__webpack_require__(/*! ./baseUrlResolution/BasicSelector */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js\\\");var _BasicSelector2=_interopRequireDefault(_BasicSelector);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BaseURLSelector(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,serviceLocationBlacklistController=void 0,basicSelector=void 0,dvbSelector=void 0,selector=void 0;function setup(){serviceLocationBlacklistController=(0,_BlacklistController2.default)(context).create({updateEventName:_Events2.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:_Events2.default.SERVICE_LOCATION_BLACKLIST_ADD});basicSelector=(0,_BasicSelector2.default)(context).create({blacklistController:serviceLocationBlacklistController});dvbSelector=(0,_DVBSelector2.default)(context).create({blacklistController:serviceLocationBlacklistController});selector=basicSelector;}function setConfig(config){if(config.selector){selector=config.selector;}}function chooseSelector(isDVB){(0,_SupervisorTools.checkParameterType)(isDVB,'boolean');selector=isDVB?dvbSelector:basicSelector;}function select(data){if(!data){return;}var baseUrls=data.baseUrls;var selectedIdx=data.selectedIdx;// Once a random selection has been carried out amongst a group of BaseURLs with the same\\n// @priority attribute value, then that choice should be re-used if the selection needs to be made again\\n// unless the blacklist has been modified or the available BaseURLs have changed.\\nif(!isNaN(selectedIdx)){return baseUrls[selectedIdx];}var selectedBaseUrl=selector.select(baseUrls);if(!selectedBaseUrl){eventBus.trigger(_Events2.default.URL_RESOLUTION_FAILED,{error:new _DashJSError2.default(_Errors2.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,_Errors2.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)});if(selector===basicSelector){reset();}return;}data.selectedIdx=baseUrls.indexOf(selectedBaseUrl);return selectedBaseUrl;}function reset(){serviceLocationBlacklistController.reset();}instance={chooseSelector:chooseSelector,select:select,reset:reset,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BaseURLSelector.__dashjs_factory_name='BaseURLSelector';exports.default=_FactoryMaker2.default.getClassFactory(BaseURLSelector);\\n//# sourceMappingURL=BaseURLSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _IsoFile=__webpack_require__(/*! ./IsoFile */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js\\\");var _IsoFile2=_interopRequireDefault(_IsoFile);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _codemIsoboxer=__webpack_require__(/*! codem-isoboxer */ \\\"../node_modules/codem-isoboxer/dist/iso_boxer.js\\\");var _codemIsoboxer2=_interopRequireDefault(_codemIsoboxer);var _IsoBoxSearchInfo=__webpack_require__(/*! ../vo/IsoBoxSearchInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js\\\");var _IsoBoxSearchInfo2=_interopRequireDefault(_IsoBoxSearchInfo);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BoxParser()/*config*/{var logger=void 0,instance=void 0;var context=this.context;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}/**\\n     * @param {ArrayBuffer} data\\n     * @returns {IsoFile|null}\\n     * @memberof BoxParser#\\n     */function parse(data){if(!data)return null;if(data.fileStart===undefined){data.fileStart=0;}var parsedFile=_codemIsoboxer2.default.parseBuffer(data);var dashIsoFile=(0,_IsoFile2.default)(context).create();dashIsoFile.setData(parsedFile);return dashIsoFile;}/**\\n     * From the list of type boxes to look for, returns the latest one that is fully completed (header + payload). This\\n     * method only looks into the list of top boxes and doesn't analyze nested boxes.\\n     * @param {string[]} types\\n     * @param {ArrayBuffer|uint8Array} buffer\\n     * @param {number} offset\\n     * @returns {IsoBoxSearchInfo}\\n     * @memberof BoxParser#\\n     */function findLastTopIsoBoxCompleted(types,buffer,offset){if(offset===undefined){offset=0;}// 8 = size (uint32) + type (4 characters)\\nif(!buffer||offset+8>=buffer.byteLength){return new _IsoBoxSearchInfo2.default(0,false);}var data=buffer instanceof ArrayBuffer?new Uint8Array(buffer):buffer;var boxInfo=void 0;var lastCompletedOffset=0;while(offset<data.byteLength){var boxSize=parseUint32(data,offset);var boxType=parseIsoBoxType(data,offset+4);if(boxSize===0){break;}if(offset+boxSize<=data.byteLength){if(types.indexOf(boxType)>=0){boxInfo=new _IsoBoxSearchInfo2.default(offset,true,boxSize);}else{lastCompletedOffset=offset+boxSize;}}offset+=boxSize;}if(!boxInfo){return new _IsoBoxSearchInfo2.default(lastCompletedOffset,false);}return boxInfo;}function getSamplesInfo(ab){if(!ab||ab.byteLength===0){return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};}var isoFile=parse(ab);// zero or more moofs\\nvar moofBoxes=isoFile.getBoxes('moof');// exactly one mfhd per moof\\nvar mfhdBoxes=isoFile.getBoxes('mfhd');var sampleDuration=void 0,sampleCompositionTimeOffset=void 0,sampleCount=void 0,sampleSize=void 0,sampleDts=void 0,sampleList=void 0,sample=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0,n=void 0,dataOffset=void 0,lastSequenceNumber=void 0,numSequences=void 0,totalDuration=void 0;numSequences=isoFile.getBoxes('moof').length;lastSequenceNumber=mfhdBoxes[mfhdBoxes.length-1].sequence_number;sampleCount=0;sampleList=[];var subsIndex=-1;var nextSubsSample=-1;for(l=0;l<moofBoxes.length;l++){var moofBox=moofBoxes[l];// zero or more trafs per moof\\nvar trafBoxes=moofBox.getChildBoxes('traf');for(j=0;j<trafBoxes.length;j++){var trafBox=trafBoxes[j];// exactly one tfhd per traf\\nvar tfhdBox=trafBox.getChildBox('tfhd');// zero or one tfdt per traf\\nvar tfdtBox=trafBox.getChildBox('tfdt');sampleDts=tfdtBox.baseMediaDecodeTime;// zero or more truns per traf\\nvar trunBoxes=trafBox.getChildBoxes('trun');// zero or more subs per traf\\nvar subsBoxes=trafBox.getChildBoxes('subs');for(k=0;k<trunBoxes.length;k++){var trunBox=trunBoxes[k];sampleCount=trunBox.sample_count;dataOffset=(tfhdBox.base_data_offset||0)+(trunBox.data_offset||0);for(i=0;i<sampleCount;i++){sample=trunBox.samples[i];sampleDuration=sample.sample_duration!==undefined?sample.sample_duration:tfhdBox.default_sample_duration;sampleSize=sample.sample_size!==undefined?sample.sample_size:tfhdBox.default_sample_size;sampleCompositionTimeOffset=sample.sample_composition_time_offset!==undefined?sample.sample_composition_time_offset:0;var sampleData={'dts':sampleDts,'cts':sampleDts+sampleCompositionTimeOffset,'duration':sampleDuration,'offset':moofBox.offset+dataOffset,'size':sampleSize,'subSizes':[sampleSize]};if(subsBoxes){for(m=0;m<subsBoxes.length;m++){var subsBox=subsBoxes[m];if(subsIndex<subsBox.entry_count-1&&i>nextSubsSample){subsIndex++;nextSubsSample+=subsBox.entries[subsIndex].sample_delta;}if(i==nextSubsSample){sampleData.subSizes=[];var entry=subsBox.entries[subsIndex];for(n=0;n<entry.subsample_count;n++){sampleData.subSizes.push(entry.subsamples[n].subsample_size);}}}}sampleList.push(sampleData);dataOffset+=sampleSize;sampleDts+=sampleDuration;}}totalDuration=sampleDts-tfdtBox.baseMediaDecodeTime;}}return{sampleList:sampleList,lastSequenceNumber:lastSequenceNumber,totalDuration:totalDuration,numSequences:numSequences};}function getMediaTimescaleFromMoov(ab){var isoFile=parse(ab);var mdhdBox=isoFile?isoFile.getBox('mdhd'):undefined;return mdhdBox?mdhdBox.timescale:NaN;}function parseUint32(data,offset){return data[offset+3]>>>0|data[offset+2]<<8>>>0|data[offset+1]<<16>>>0|data[offset]<<24>>>0;}function parseIsoBoxType(data,offset){return String.fromCharCode(data[offset++])+String.fromCharCode(data[offset++])+String.fromCharCode(data[offset++])+String.fromCharCode(data[offset]);}function findInitRange(data){var initRange=null;var start=void 0,end=void 0;var isoFile=parse(data);if(!isoFile){return initRange;}var ftyp=isoFile.getBox('ftyp');var moov=isoFile.getBox('moov');logger.debug('Searching for initialization.');if(moov&&moov.isComplete){start=ftyp?ftyp.offset:moov.offset;end=moov.offset+moov.size-1;initRange=start+'-'+end;logger.debug('Found the initialization.  Range: '+initRange);}return initRange;}/**\\n     * Real-time parsing (whenever data is loaded in the buffer payload) of the payload to capture the moof of a chunk\\n     * @param {array} types\\n     * @param {ArrayBuffer} buffer\\n     * @param {number} offset\\n     * @return {IsoBoxSearchInfo}\\n     */function parsePayload(types,buffer,offset){if(offset===undefined){offset=0;}if(!buffer||offset+8>=buffer.byteLength){return new _IsoBoxSearchInfo2.default(0,false);}var data=buffer instanceof ArrayBuffer?new Uint8Array(buffer):buffer;var boxInfo=void 0;var lastCompletedOffset=0;while(offset<data.byteLength){var boxSize=parseUint32(data,offset);var boxType=parseIsoBoxType(data,offset+4);if(boxSize===0){break;}if(offset+boxSize<=data.byteLength){if(types.indexOf(boxType)>=0){boxInfo=new _IsoBoxSearchInfo2.default(offset,true,boxSize,boxType);}else{lastCompletedOffset=offset+boxSize;}}offset+=boxSize;}if(!boxInfo){return new _IsoBoxSearchInfo2.default(lastCompletedOffset,false);}return boxInfo;}instance={parse:parse,findLastTopIsoBoxCompleted:findLastTopIsoBoxCompleted,getMediaTimescaleFromMoov:getMediaTimescaleFromMoov,getSamplesInfo:getSamplesInfo,findInitRange:findInitRange,parsePayload:parsePayload};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BoxParser.__dashjs_factory_name='BoxParser';exports.default=_FactoryMaker2.default.getSingletonFactory(BoxParser);\\n//# sourceMappingURL=BoxParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.supportsMediaSource=supportsMediaSource;var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _ThumbnailTracks=__webpack_require__(/*! ../thumbnail/ThumbnailTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var codecCompatibilityTable=[{'codec':'avc1','compatibleCodecs':['avc3']},{'codec':'avc3','compatibleCodecs':['avc1']}];function supportsMediaSource(){var hasWebKit='WebKitMediaSource'in window;var hasMediaSource='MediaSource'in window;return hasWebKit||hasMediaSource;}function Capabilities(){var instance=void 0,encryptedMediaSupported=void 0;function setup(){encryptedMediaSupported=false;}/**\\n     * Returns whether Encrypted Media Extensions are supported on this\\n     * user agent\\n     *\\n     * @return {boolean} true if EME is supported, false otherwise\\n     */function supportsEncryptedMedia(){return encryptedMediaSupported;}/**\\n     *\\n     * @param {boolean} value\\n     */function setEncryptedMediaSupported(value){encryptedMediaSupported=value;}/**\\n     * Check if a codec is supported by the MediaSource\\n     * @param {string} codec\\n     * @return {boolean}\\n     */function supportsCodec(codec){if('MediaSource'in window&&MediaSource.isTypeSupported(codec)){return true;}if('WebKitMediaSource'in window&&WebKitMediaSource.isTypeSupported(codec)){return true;}return false;}/**\\n     * Check if a specific EssentialProperty is supported\\n     * @param {object} ep\\n     * @return {boolean}\\n     */function supportsEssentialProperty(ep){try{return _ThumbnailTracks.THUMBNAILS_SCHEME_ID_URIS.indexOf(ep.schemeIdUri)!==-1;}catch(e){return true;}}/**\\n     * Check if the root of the old codec is the same as the new one, or if it's declared as compatible in the compat table\\n     * @param {string} codec1\\n     * @param {string} codec2\\n     * @return {boolean}\\n     */function codecRootCompatibleWithCodec(codec1,codec2){var codecRoot=codec1.split('.')[0];var rootCompatible=codec2.indexOf(codecRoot)===0;var compatTableCodec=void 0;for(var i=0;i<codecCompatibilityTable.length;i++){if(codecCompatibilityTable[i].codec===codecRoot){compatTableCodec=codecCompatibilityTable[i];break;}}if(compatTableCodec){return rootCompatible||compatTableCodec.compatibleCodecs.some(function(compatibleCodec){return codec2.indexOf(compatibleCodec)===0;});}return rootCompatible;}instance={supportsMediaSource:supportsMediaSource,supportsEncryptedMedia:supportsEncryptedMedia,supportsCodec:supportsCodec,setEncryptedMediaSupported:setEncryptedMediaSupported,supportsEssentialProperty:supportsEssentialProperty,codecRootCompatibleWithCodec:codecRootCompatibleWithCodec};setup();return instance;}Capabilities.__dashjs_factory_name='Capabilities';exports.default=_FactoryMaker2.default.getSingletonFactory(Capabilities);\\n//# sourceMappingURL=Capabilities.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function CapabilitiesFilter(){var context=this.context;var instance=void 0,adapter=void 0,capabilities=void 0,settings=void 0,logger=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function setConfig(config){if(!config){return;}if(config.adapter){adapter=config.adapter;}if(config.capabilities){capabilities=config.capabilities;}if(config.settings){settings=config.settings;}}function filterUnsupportedFeaturesOfPeriod(streamInfo){_filterUnsupportedCodecs(_Constants2.default.VIDEO,streamInfo);_filterUnsupportedCodecs(_Constants2.default.AUDIO,streamInfo);if(settings.get().streaming.filterUnsupportedEssentialProperties){_filterUnsupportedEssentialProperties(streamInfo);}}function _filterUnsupportedCodecs(type,streamInfo){var realPeriod=adapter.getRealPeriodByIndex(streamInfo?streamInfo.index:null);if(!realPeriod||!realPeriod.AdaptationSet_asArray||realPeriod.AdaptationSet_asArray.length===0){return;}realPeriod.AdaptationSet_asArray=realPeriod.AdaptationSet_asArray.filter(function(as){if(!as.Representation_asArray||as.Representation_asArray.length===0||!adapter.getIsTypeOf(as,type)){return true;}as.Representation_asArray=as.Representation_asArray.filter(function(_,i){var codec=adapter.getCodec(as,i,true);if(!capabilities.supportsCodec(codec)){logger.error('[Stream] codec not supported: '+codec);return false;}return true;});return as.Representation_asArray&&as.Representation_asArray.length>0;});}function _filterUnsupportedEssentialProperties(streamInfo){var realPeriod=adapter.getRealPeriodByIndex(streamInfo?streamInfo.index:null);if(!realPeriod||!realPeriod.AdaptationSet_asArray||realPeriod.AdaptationSet_asArray.length===0){return;}realPeriod.AdaptationSet_asArray=realPeriod.AdaptationSet_asArray.filter(function(as){if(!as.Representation_asArray||as.Representation_asArray.length===0){return true;}as.Representation_asArray=as.Representation_asArray.filter(function(rep){var essentialProperties=adapter.getEssentialPropertiesForRepresentation(rep);if(essentialProperties&&essentialProperties.length>0){var i=0;while(i<essentialProperties.length){if(!capabilities.supportsEssentialProperty(essentialProperties[i])){logger.debug('[Stream] EssentialProperty not supported: '+essentialProperties[i].schemeIdUri);return false;}i+=1;}}return true;});return as.Representation_asArray&&as.Representation_asArray.length>0;});}instance={setConfig:setConfig,filterUnsupportedFeaturesOfPeriod:filterUnsupportedFeaturesOfPeriod};setup();return instance;}CapabilitiesFilter.__dashjs_factory_name='CapabilitiesFilter';exports.default=_FactoryMaker2.default.getSingletonFactory(CapabilitiesFilter);\\n//# sourceMappingURL=CapabilitiesFilter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n* The copyright in this software is being made available under the BSD License,\\n* included below. This software may be subject to other third party and contributor\\n* rights, including patent rights, and no such rights are granted under this license.\\n*\\n* Copyright (c) 2013, Dash Industry Forum.\\n* All rights reserved.\\n*\\n* Redistribution and use in source and binary forms, with or without modification,\\n* are permitted provided that the following conditions are met:\\n*  * Redistributions of source code must retain the above copyright notice, this\\n*  list of conditions and the following disclaimer.\\n*  * Redistributions in binary form must reproduce the above copyright notice,\\n*  this list of conditions and the following disclaimer in the documentation and/or\\n*  other materials provided with the distribution.\\n*  * Neither the name of Dash Industry Forum nor the names of its\\n*  contributors may be used to endorse or promote products derived from this software\\n*  without specific prior written permission.\\n*\\n*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n*  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n*  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n*  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n*  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n*  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n*  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n*  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n*  POSSIBILITY OF SUCH DAMAGE.\\n*/function CustomTimeRanges()/*config*/{var customTimeRangeArray=[];var length=0;function add(start,end){var i=0;for(i=0;i<this.customTimeRangeArray.length&&start>this.customTimeRangeArray[i].start;i++){}this.customTimeRangeArray.splice(i,0,{start:start,end:end});for(i=0;i<this.customTimeRangeArray.length-1;i++){if(this.mergeRanges(i,i+1)){i--;}}this.length=this.customTimeRangeArray.length;}function clear(){this.customTimeRangeArray=[];this.length=0;}function remove(start,end){for(var i=0;i<this.customTimeRangeArray.length;i++){if(start<=this.customTimeRangeArray[i].start&&end>=this.customTimeRangeArray[i].end){//      |--------------Range i-------|\\n//|---------------Range to remove ---------------|\\n//    or\\n//|--------------Range i-------|\\n//|--------------Range to remove ---------------|\\n//    or\\n//                 |--------------Range i-------|\\n//|--------------Range to remove ---------------|\\nthis.customTimeRangeArray.splice(i,1);i--;}else if(start>this.customTimeRangeArray[i].start&&end<this.customTimeRangeArray[i].end){//|-----------------Range i----------------|\\n//        |-------Range to remove -----|\\nthis.customTimeRangeArray.splice(i+1,0,{start:end,end:this.customTimeRangeArray[i].end});this.customTimeRangeArray[i].end=start;break;}else if(start>this.customTimeRangeArray[i].start&&start<this.customTimeRangeArray[i].end){//|-----------Range i----------|\\n//                    |---------Range to remove --------|\\n//    or\\n//|-----------------Range i----------------|\\n//            |-------Range to remove -----|\\nthis.customTimeRangeArray[i].end=start;}else if(end>this.customTimeRangeArray[i].start&&end<this.customTimeRangeArray[i].end){//                     |-----------Range i----------|\\n//|---------Range to remove --------|\\n//            or\\n//|-----------------Range i----------------|\\n//|-------Range to remove -----|\\nthis.customTimeRangeArray[i].start=end;}}this.length=this.customTimeRangeArray.length;}function mergeRanges(rangeIndex1,rangeIndex2){var range1=this.customTimeRangeArray[rangeIndex1];var range2=this.customTimeRangeArray[rangeIndex2];if(range1.start<=range2.start&&range2.start<=range1.end&&range1.end<=range2.end){//|-----------Range1----------|\\n//                    |-----------Range2----------|\\nrange1.end=range2.end;this.customTimeRangeArray.splice(rangeIndex2,1);return true;}else if(range2.start<=range1.start&&range1.start<=range2.end&&range2.end<=range1.end){//                |-----------Range1----------|\\n//|-----------Range2----------|\\nrange1.start=range2.start;this.customTimeRangeArray.splice(rangeIndex2,1);return true;}else if(range2.start<=range1.start&&range1.start<=range2.end&&range1.end<=range2.end){//      |--------Range1-------|\\n//|---------------Range2--------------|\\nthis.customTimeRangeArray.splice(rangeIndex1,1);return true;}else if(range1.start<=range2.start&&range2.start<=range1.end&&range2.end<=range1.end){//|-----------------Range1--------------|\\n//        |-----------Range2----------|\\nthis.customTimeRangeArray.splice(rangeIndex2,1);return true;}return false;}function start(index){(0,_SupervisorTools.checkInteger)(index);if(index>=this.customTimeRangeArray.length||index<0){return NaN;}return this.customTimeRangeArray[index].start;}function end(index){(0,_SupervisorTools.checkInteger)(index);if(index>=this.customTimeRangeArray.length||index<0){return NaN;}return this.customTimeRangeArray[index].end;}return{customTimeRangeArray:customTimeRangeArray,length:length,add:add,clear:clear,remove:remove,mergeRanges:mergeRanges,start:start,end:end};}CustomTimeRanges.__dashjs_factory_name='CustomTimeRanges';exports.default=_FactoryMaker2.default.getClassFactory(CustomTimeRanges);\\n//# sourceMappingURL=CustomTimeRanges.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var legacyKeysAndReplacements=[{oldKey:'dashjs_vbitrate',newKey:'dashjs_video_bitrate'},{oldKey:'dashjs_abitrate',newKey:'dashjs_audio_bitrate'},{oldKey:'dashjs_vsettings',newKey:'dashjs_video_settings'},{oldKey:'dashjs_asettings',newKey:'dashjs_audio_settings'}];/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var LOCAL_STORAGE_BITRATE_KEY_TEMPLATE='dashjs_?_bitrate';var LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE='dashjs_?_settings';var STORAGE_TYPE_LOCAL='localStorage';var STORAGE_TYPE_SESSION='sessionStorage';var LAST_BITRATE='lastBitrate';var LAST_MEDIA_SETTINGS='lastMediaSettings';function DOMStorage(config){config=config||{};var context=this.context;var settings=config.settings;var instance=void 0,logger=void 0,supported=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);translateLegacyKeys();}//type can be local, session\\nfunction isSupported(type){if(supported!==undefined)return supported;supported=false;var testKey='1';var testValue='1';var storage=void 0;try{if(typeof window!=='undefined'){storage=window[type];}}catch(error){logger.warn('DOMStorage access denied: '+error.message);return supported;}if(!storage||type!==STORAGE_TYPE_LOCAL&&type!==STORAGE_TYPE_SESSION){return supported;}/* When Safari (OS X or iOS) is in private browsing mode, it appears as though localStorage is available, but trying to call setItem throws an exception.\\n         http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an\\n\\n         Check if the storage can be used\\n         */try{storage.setItem(testKey,testValue);storage.removeItem(testKey);supported=true;}catch(error){logger.warn('DOMStorage is supported, but cannot be used: '+error.message);}return supported;}function translateLegacyKeys(){if(isSupported(STORAGE_TYPE_LOCAL)){legacyKeysAndReplacements.forEach(function(entry){var value=localStorage.getItem(entry.oldKey);if(value){localStorage.removeItem(entry.oldKey);try{localStorage.setItem(entry.newKey,value);}catch(e){logger.error(e.message);}}});}}// Return current epoch time, ms, rounded to the nearest 10m to avoid fingerprinting user\\nfunction getTimestamp(){var ten_minutes_ms=60*1000*10;return Math.round(new Date().getTime()/ten_minutes_ms)*ten_minutes_ms;}function canStore(storageType,key){return isSupported(storageType)&&settings.get().streaming[key+'CachingInfo'].enabled;}function checkConfig(){if(!settings){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSavedMediaSettings(type){var mediaSettings=null;checkConfig();//Checks local storage to see if there is valid, non-expired media settings\\nif(canStore(STORAGE_TYPE_LOCAL,LAST_MEDIA_SETTINGS)){var key=LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE.replace(/\\\\?/,type);try{var obj=JSON.parse(localStorage.getItem(key))||{};var isExpired=new Date().getTime()-parseInt(obj.timestamp,10)>=settings.get().streaming.lastMediaSettingsCachingInfo.ttl||false;mediaSettings=obj.settings;if(isExpired){localStorage.removeItem(key);mediaSettings=null;}}catch(e){return null;}}return mediaSettings;}function getSavedBitrateSettings(type){var savedBitrate=NaN;checkConfig();//Checks local storage to see if there is valid, non-expired bit rate\\n//hinting from the last play session to use as a starting bit rate.\\nif(canStore(STORAGE_TYPE_LOCAL,LAST_BITRATE)){var key=LOCAL_STORAGE_BITRATE_KEY_TEMPLATE.replace(/\\\\?/,type);try{var obj=JSON.parse(localStorage.getItem(key))||{};var isExpired=new Date().getTime()-parseInt(obj.timestamp,10)>=settings.get().streaming.lastBitrateCachingInfo.ttl||false;var bitrate=parseFloat(obj.bitrate);if(!isNaN(bitrate)&&!isExpired){savedBitrate=bitrate;logger.debug('Last saved bitrate for '+type+' was '+bitrate);}else if(isExpired){localStorage.removeItem(key);}}catch(e){return null;}}return savedBitrate;}function setSavedMediaSettings(type,value){if(canStore(STORAGE_TYPE_LOCAL,LAST_MEDIA_SETTINGS)){var key=LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE.replace(/\\\\?/,type);try{localStorage.setItem(key,JSON.stringify({settings:value,timestamp:getTimestamp()}));}catch(e){logger.error(e.message);}}}function setSavedBitrateSettings(type,bitrate){if(canStore(STORAGE_TYPE_LOCAL,LAST_BITRATE)&&bitrate){var key=LOCAL_STORAGE_BITRATE_KEY_TEMPLATE.replace(/\\\\?/,type);try{localStorage.setItem(key,JSON.stringify({bitrate:bitrate.toFixed(3),timestamp:getTimestamp()}));}catch(e){logger.error(e.message);}}}instance={getSavedBitrateSettings:getSavedBitrateSettings,setSavedBitrateSettings:setSavedBitrateSettings,getSavedMediaSettings:getSavedMediaSettings,setSavedMediaSettings:setSavedMediaSettings};setup();return instance;}DOMStorage.__dashjs_factory_name='DOMStorage';var factory=_FactoryMaker2.default.getSingletonFactory(DOMStorage);exports.default=factory;\\n//# sourceMappingURL=DOMStorage.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module DefaultURLUtils\\n * @description Provides utility functions for operating on URLs.\\n * Initially this is simply a method to determine the Base URL of a URL, but\\n * should probably include other things provided all over the place such as\\n * determining whether a URL is relative/absolute, resolving two paths etc.\\n * @ignore\\n */function DefaultURLUtils(){var resolveFunction=void 0;var schemeRegex=/^[a-z][a-z0-9+\\\\-_.]*:/i;var httpUrlRegex=/^https?:\\\\/\\\\//i;var httpsUrlRegex=/^https:\\\\/\\\\//i;var originRegex=/^([a-z][a-z0-9+\\\\-_.]*:\\\\/\\\\/[^\\\\/]+)\\\\/?/i;/**\\n     * Resolves a url given an optional base url\\n     * Uses window.URL to do the resolution.\\n     *\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     * @private\\n     */var nativeURLResolver=function nativeURLResolver(url,baseUrl){try{return new window.URL(url,baseUrl).toString();}catch(e){return url;}};/**\\n     * Resolves a url given an optional base url\\n     * Does not resolve ./, ../ etc but will do enough to construct something\\n     * which will satisfy XHR etc when window.URL is not available ie\\n     * IE11/node etc.\\n     *\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     * @private\\n     */var dumbURLResolver=function dumbURLResolver(url,baseUrl){var baseUrlParseFunc=parseBaseUrl;if(!baseUrl){return url;}if(!isRelative(url)){return url;}if(isPathAbsolute(url)){baseUrlParseFunc=parseOrigin;}if(isSchemeRelative(url)){baseUrlParseFunc=parseScheme;}var base=baseUrlParseFunc(baseUrl);var joinChar=base.charAt(base.length-1)!=='/'&&url.charAt(0)!=='/'?'/':'';return[base,url].join(joinChar);};function setup(){try{var u=new window.URL('x','http://y');//jshint ignore:line\\nresolveFunction=nativeURLResolver;}catch(e){// must be IE11/Node etc\\n}finally{resolveFunction=resolveFunction||dumbURLResolver;}}/**\\n     * Returns a string that contains the Base URL of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function parseBaseUrl(url){var slashIndex=url.indexOf('/');var lastSlashIndex=url.lastIndexOf('/');if(slashIndex!==-1){// if there is only '//'\\nif(lastSlashIndex===slashIndex+1){return url;}if(url.indexOf('?')!==-1){url=url.substring(0,url.indexOf('?'));}return url.substring(0,lastSlashIndex+1);}return'';}/**\\n     * Returns a string that contains the scheme and origin of a URL,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function parseOrigin(url){var matches=url.match(originRegex);if(matches){return matches[1];}return'';}/**\\n     * Returns a string that contains the fragment of a URL without scheme,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function removeHostname(url){var urlParts=/^(?:\\\\w+\\\\:\\\\/\\\\/)?([^\\\\/]+)(.*)$/.exec(url);//[1] = host / [2] = path\\nreturn urlParts[2].substring(1);}/**\\n     * Returns a string that contains the scheme of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function parseScheme(url){var matches=url.match(schemeRegex);if(matches){return matches[0];}return'';}/**\\n     * Determines whether the url is relative.\\n     * @return {boolean}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isRelative(url){return!schemeRegex.test(url);}/**\\n     * Determines whether the url is path-absolute.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isPathAbsolute(url){return isRelative(url)&&url.charAt(0)==='/';}/**\\n     * Determines whether the url is scheme-relative.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isSchemeRelative(url){return url.indexOf('//')===0;}/**\\n     * Determines whether the url is an HTTP-URL as defined in ISO/IEC\\n     * 23009-1:2014 3.1.15. ie URL with a fixed scheme of http or https\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isHTTPURL(url){return httpUrlRegex.test(url);}/**\\n     * Determines whether the supplied url has https scheme\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isHTTPS(url){return httpsUrlRegex.test(url);}/**\\n     * Resolves a url given an optional base url\\n     * @return {string}\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function resolve(url,baseUrl){return resolveFunction(url,baseUrl);}setup();var instance={parseBaseUrl:parseBaseUrl,parseOrigin:parseOrigin,parseScheme:parseScheme,isRelative:isRelative,isPathAbsolute:isPathAbsolute,isSchemeRelative:isSchemeRelative,isHTTPURL:isHTTPURL,isHTTPS:isHTTPS,removeHostname:removeHostname,resolve:resolve};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DefaultURLUtils.__dashjs_factory_name='DefaultURLUtils';exports.default=_FactoryMaker2.default.getSingletonFactory(DefaultURLUtils);\\n//# sourceMappingURL=DefaultURLUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * Creates an instance of an EBMLParser class which implements a large subset\\n * of the functionality required to parse Matroska EBML\\n *\\n * @param {Object} config object with data member which is the buffer to parse\\n * @ignore\\n */function EBMLParser(config){config=config||{};var instance=void 0;var data=new DataView(config.data);var pos=0;function getPos(){return pos;}function setPos(value){pos=value;}/**\\n     * Consumes an EBML tag from the data stream.\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag and\\n     * {boolean} required flag.\\n     * @param {boolean} test whether or not the function should throw if a required\\n     * tag is not found\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found and test\\n     * param is false or undefined, or if the stream is malformed.\\n     * @memberof EBMLParser\\n     */function consumeTag(tag,test){var found=true;var bytesConsumed=0;var p1=void 0,p2=void 0;if(test===undefined){test=false;}if(tag.tag>0xFFFFFF){if(data.getUint32(pos)!==tag.tag){found=false;}bytesConsumed=4;}else if(tag.tag>0xFFFF){// 3 bytes\\np1=data.getUint16(pos);p2=data.getUint8(pos+2);// shift p1 over a byte and add p2\\nif(p1*256+p2!==tag.tag){found=false;}bytesConsumed=3;}else if(tag.tag>0xFF){if(data.getUint16(pos)!==tag.tag){found=false;}bytesConsumed=2;}else{if(data.getUint8(pos)!==tag.tag){found=false;}bytesConsumed=1;}if(!found&&tag.required&&!test){throw new Error('required tag not found');}if(found){pos+=bytesConsumed;}return found;}/**\\n     * Consumes an EBML tag from the data stream.   If the tag is found then this\\n     * function will also remove the size field which follows the tag from the\\n     * data stream.\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag and\\n     * {boolean} required flag.\\n     * @param {boolean} test whether or not the function should throw if a required\\n     * tag is not found\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found and test\\n     * param is false or undefined, or if the stream is malformedata.\\n     * @memberof EBMLParser\\n     */function consumeTagAndSize(tag,test){var found=consumeTag(tag,test);if(found){getMatroskaCodedNum();}return found;}/**\\n     * Consumes an EBML tag from the data stream.   If the tag is found then this\\n     * function will also remove the size field which follows the tag from the\\n     * data stream.  It will use the value of the size field to parse a binary\\n     * field, using a parser defined in the tag itself\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag,\\n     * {boolean} required flag, and a parse function which takes a size parameter\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found,\\n     * or if the stream is malformed\\n     * @memberof EBMLParser\\n     */function parseTag(tag){var size=void 0;consumeTag(tag);size=getMatroskaCodedNum();return instance[tag.parse](size);}/**\\n     * Consumes an EBML tag from the data stream.   If the tag is found then this\\n     * function will also remove the size field which follows the tag from the\\n     * data stream.  It will use the value of the size field to skip over the\\n     * entire section of EBML encapsulated by the tag.\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag, and\\n     * {boolean} required flag\\n     * @param {boolean} test a flag to indicate if an exception should be thrown\\n     * if a required tag is not found\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found and test is\\n     * false or undefined or if the stream is malformed\\n     * @memberof EBMLParser\\n     */function skipOverElement(tag,test){var found=consumeTag(tag,test);var headerSize=void 0;if(found){headerSize=getMatroskaCodedNum();pos+=headerSize;}return found;}/**\\n     * Returns and consumes a number encoded according to the Matroska EBML\\n     * specification from the bitstream.\\n     *\\n     * @param {boolean} retainMSB whether or not to retain the Most Significant Bit (the\\n     * first 1). this is usually true when reading Tag IDs.\\n     * @return {number} the decoded number\\n     * @throws will throw an exception if the bit stream is malformed or there is\\n     * not enough data\\n     * @memberof EBMLParser\\n     */function getMatroskaCodedNum(retainMSB){var bytesUsed=1;var mask=0x80;var maxBytes=8;var extraBytes=-1;var num=0;var ch=data.getUint8(pos);var i=0;for(i=0;i<maxBytes;i+=1){if((ch&mask)===mask){num=retainMSB===undefined?ch&~mask:ch;extraBytes=i;break;}mask>>=1;}for(i=0;i<extraBytes;i+=1,bytesUsed+=1){num=num<<8|0xff&data.getUint8(pos+bytesUsed);}pos+=bytesUsed;return num;}/**\\n     * Returns and consumes a float from the bitstream.\\n     *\\n     * @param {number} size 4 or 8 byte floats are supported\\n     * @return {number} the decoded number\\n     * @throws will throw an exception if the bit stream is malformed or there is\\n     * not enough data\\n     * @memberof EBMLParser\\n     */function getMatroskaFloat(size){var outFloat=void 0;switch(size){case 4:outFloat=data.getFloat32(pos);pos+=4;break;case 8:outFloat=data.getFloat64(pos);pos+=8;break;}return outFloat;}/**\\n     * Consumes and returns an unsigned int from the bitstream.\\n     *\\n     * @param {number} size 1 to 8 bytes\\n     * @return {number} the decoded number\\n     * @throws will throw an exception if the bit stream is malformed or there is\\n     * not enough data\\n     * @memberof EBMLParser\\n     */function getMatroskaUint(size){var val=0;for(var i=0;i<size;i+=1){val<<=8;val|=data.getUint8(pos+i)&0xff;}pos+=size;return val;}/**\\n     * Tests whether there is more data in the bitstream for parsing\\n     *\\n     * @return {boolean} whether there is more data to parse\\n     * @memberof EBMLParser\\n     */function moreData(){return pos<data.byteLength;}instance={getPos:getPos,setPos:setPos,consumeTag:consumeTag,consumeTagAndSize:consumeTagAndSize,parseTag:parseTag,skipOverElement:skipOverElement,getMatroskaCodedNum:getMatroskaCodedNum,getMatroskaFloat:getMatroskaFloat,getMatroskaUint:getMatroskaUint,moreData:moreData};return instance;}EBMLParser.__dashjs_factory_name='EBMLParser';exports.default=_FactoryMaker2.default.getClassFactory(EBMLParser);\\n//# sourceMappingURL=EBMLParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module ErrorHandler\\n * @ignore\\n */function ErrorHandler(){var instance=void 0;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();/**\\n     * @param {object} err DashJSError with code, message and data attributes\\n     * @memberof module:ErrorHandler\\n     */function error(err){eventBus.trigger(_Events2.default.ERROR,{error:err});}instance={error:error};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ErrorHandler.__dashjs_factory_name='ErrorHandler';exports.default=_FactoryMaker2.default.getSingletonFactory(ErrorHandler);\\n//# sourceMappingURL=ErrorHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function InitCache(){var data={};function save(chunk){var id=chunk.streamId;var representationId=chunk.representationId;data[id]=data[id]||{};data[id][representationId]=chunk;}function extract(streamId,representationId){if(data&&data[streamId]&&data[streamId][representationId]){return data[streamId][representationId];}else{return null;}}function reset(){data={};}var instance={save:save,extract:extract,reset:reset};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Represents data structure to keep and drive {DataChunk}\\n */InitCache.__dashjs_factory_name='InitCache';exports.default=_FactoryMaker2.default.getSingletonFactory(InitCache);\\n//# sourceMappingURL=InitCache.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js\":\n/*!***********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _IsoBox=__webpack_require__(/*! ../vo/IsoBox */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js\\\");var _IsoBox2=_interopRequireDefault(_IsoBox);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function IsoFile(){var instance=void 0,parsedIsoFile=void 0;/**\\n    * @param {string} type\\n    * @returns {IsoBox|null}\\n    * @memberof IsoFile#\\n    */function getBox(type){if(!type||!parsedIsoFile||!parsedIsoFile.boxes||parsedIsoFile.boxes.length===0||typeof parsedIsoFile.fetch!=='function')return null;return convertToDashIsoBox(parsedIsoFile.fetch(type));}/**\\n    * @param {string} type\\n    * @returns {Array|null} array of {@link IsoBox}\\n    * @memberof IsoFile#\\n    */function getBoxes(type){var boxes=[];if(!type||!parsedIsoFile||typeof parsedIsoFile.fetchAll!=='function'){return boxes;}var boxData=parsedIsoFile.fetchAll(type);var box=void 0;for(var i=0,ln=boxData.length;i<ln;i++){box=convertToDashIsoBox(boxData[i]);if(box){boxes.push(box);}}return boxes;}/**\\n    * @param {string} value\\n    * @memberof IsoFile#\\n    */function setData(value){parsedIsoFile=value;}/**\\n    * @returns {IsoBox|null}\\n    * @memberof IsoFile#\\n    */function getLastBox(){if(!parsedIsoFile||!parsedIsoFile.boxes||!parsedIsoFile.boxes.length)return null;var type=parsedIsoFile.boxes[parsedIsoFile.boxes.length-1].type;var boxes=getBoxes(type);return boxes.length>0?boxes[boxes.length-1]:null;}function convertToDashIsoBox(boxData){if(!boxData)return null;var box=new _IsoBox2.default(boxData);if(boxData.hasOwnProperty('_incomplete')){box.isComplete=!boxData._incomplete;}return box;}instance={getBox:getBox,getBoxes:getBoxes,setData:setData,getLastBox:getLastBox};return instance;}IsoFile.__dashjs_factory_name='IsoFile';exports.default=_FactoryMaker2.default.getClassFactory(IsoFile);\\n//# sourceMappingURL=IsoFile.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @param {Object} config\\n * @returns {{initialize: initialize, getLiveEdge: getLiveEdge, reset: reset}|*}\\n * @constructor\\n * @ignore\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function LiveEdgeFinder(config){config=config||{};var instance=void 0;var timelineConverter=config.timelineConverter;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('getExpectedLiveEdge')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getLiveEdge(representationInfo){checkConfig();return representationInfo.DVRWindow?representationInfo.DVRWindow.end:0;}function reset(){timelineConverter=null;}instance={getLiveEdge:getLiveEdge,reset:reset};return instance;}LiveEdgeFinder.__dashjs_factory_name='LiveEdgeFinder';exports.default=_FactoryMaker2.default.getClassFactory(LiveEdgeFinder);\\n//# sourceMappingURL=LiveEdgeFinder.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js\":\n/*!***************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _fastDeepEqual=__webpack_require__(/*! fast-deep-equal */ \\\"../node_modules/fast-deep-equal/index.js\\\");var _fastDeepEqual2=_interopRequireDefault(_fastDeepEqual);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module ObjectUtils\\n * @ignore\\n * @description Provides utility functions for objects\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ObjectUtils(){var instance=void 0;/**\\n     * Returns true if objects are equal\\n     * @return {boolean}\\n     * @param {object} obj1\\n     * @param {object} obj2\\n     * @memberof module:ObjectUtils\\n     * @instance\\n     */function areEqual(obj1,obj2){return(0,_fastDeepEqual2.default)(obj1,obj2);}instance={areEqual:areEqual};return instance;}ObjectUtils.__dashjs_factory_name='ObjectUtils';exports.default=_FactoryMaker2.default.getSingletonFactory(ObjectUtils);\\n//# sourceMappingURL=ObjectUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RequestModifier(){var instance=void 0;function modifyRequestURL(url){return url;}function modifyRequestHeader(request){return request;}instance={modifyRequestURL:modifyRequestURL,modifyRequestHeader:modifyRequestHeader};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RequestModifier.__dashjs_factory_name='RequestModifier';exports.default=_FactoryMaker2.default.getSingletonFactory(RequestModifier);\\n//# sourceMappingURL=RequestModifier.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */exports.checkParameterType=checkParameterType;exports.checkInteger=checkInteger;exports.checkRange=checkRange;exports.checkIsVideoOrAudioType=checkIsVideoOrAudioType;var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function checkParameterType(parameter,type){if((typeof parameter==='undefined'?'undefined':_typeof(parameter))!==type){throw _Constants2.default.BAD_ARGUMENT_ERROR;}}function checkInteger(parameter){var isInt=parameter!==null&&!isNaN(parameter)&&parameter%1===0;if(!isInt){throw _Constants2.default.BAD_ARGUMENT_ERROR+' : argument is not an integer';}}function checkRange(parameter,min,max){if(parameter<min||parameter>max){throw _Constants2.default.BAD_ARGUMENT_ERROR+' : argument out of range';}}function checkIsVideoOrAudioType(type){if(typeof type!=='string'||type!==_Constants2.default.AUDIO&&type!==_Constants2.default.VIDEO){throw _Constants2.default.BAD_ARGUMENT_ERROR;}}\\n//# sourceMappingURL=SupervisorTools.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _imsc=__webpack_require__(/*! imsc */ \\\"../node_modules/imsc/src/main/js/main.js\\\");var _MediaPlayerEvents=__webpack_require__(/*! ../MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _ConformanceViolationConstants=__webpack_require__(/*! ../constants/ConformanceViolationConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js\\\");var _ConformanceViolationConstants2=_interopRequireDefault(_ConformanceViolationConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TTMLParser(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();/*\\n     * This TTML parser follows \\\"EBU-TT-D SUBTITLING DISTRIBUTION FORMAT - tech3380\\\" spec - https://tech.ebu.ch/docs/tech/tech3380.pdf.\\n     * */var instance=void 0,logger=void 0;var cueCounter=0;// Used to give every cue a unique ID.\\nfunction setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getCueID(){var id='cue_TTML_'+cueCounter;cueCounter++;return id;}/**\\n     * Parse the raw data and process it to return the HTML element representing the cue.\\n     * Return the region to be processed and controlled (hide/show) by the caption controller.\\n     * @param {string} data - raw data received from the TextSourceBuffer\\n     * @param {number} offsetTime - offset time to apply to cue time\\n     * @param {integer} startTimeSegment - startTime for the current segment\\n     * @param {integer} endTimeSegment - endTime for the current segment\\n     * @param {Array} images - images array referenced by subs MP4 box\\n     */function parse(data,offsetTime,startTimeSegment,endTimeSegment,images){var errorMsg='';var captionArray=[];var startTime=void 0,endTime=void 0,i=void 0;var content={};var embeddedImages={};var currentImageId='';var accumulated_image_data='';var metadataHandler={onOpenTag:function onOpenTag(ns,name,attrs){// cope with existing non-compliant content\\nif(attrs[' imagetype']&&!attrs[' imageType']){eventBus.trigger(_MediaPlayerEvents2.default.CONFORMANCE_VIOLATION,{level:_ConformanceViolationConstants2.default.LEVELS.ERROR,event:_ConformanceViolationConstants2.default.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE});attrs[' imageType']=attrs[' imagetype'];}if(name==='image'&&(ns==='http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt'||ns==='http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt')){if(!attrs[' imageType']||attrs[' imageType'].value!=='PNG'){logger.warn('smpte-tt imageType != PNG. Discarded');return;}currentImageId=attrs['http://www.w3.org/XML/1998/namespace id'].value;}},onCloseTag:function onCloseTag(){if(currentImageId){embeddedImages[currentImageId]=accumulated_image_data.trim();}accumulated_image_data='';currentImageId='';},onText:function onText(contents){if(currentImageId){accumulated_image_data=accumulated_image_data+contents;}}};if(!data){errorMsg='no ttml data to parse';throw new Error(errorMsg);}content.data=data;eventBus.trigger(_Events2.default.TTML_TO_PARSE,content);var imsc1doc=(0,_imsc.fromXML)(content.data,function(msg){errorMsg=msg;},metadataHandler);eventBus.trigger(_Events2.default.TTML_PARSED,{ttmlString:content.data,ttmlDoc:imsc1doc});var mediaTimeEvents=imsc1doc.getMediaTimeEvents();for(i=0;i<mediaTimeEvents.length;i++){var isd=(0,_imsc.generateISD)(imsc1doc,mediaTimeEvents[i],function(error){errorMsg=error;});if(isd.contents.some(function(topLevelContents){return topLevelContents.contents.length;})){//be sure that mediaTimeEvents values are in the mp4 segment time ranges.\\nstartTime=mediaTimeEvents[i]+offsetTime<startTimeSegment?startTimeSegment:mediaTimeEvents[i]+offsetTime;endTime=mediaTimeEvents[i+1]+offsetTime>endTimeSegment?endTimeSegment:mediaTimeEvents[i+1]+offsetTime;if(startTime<endTime){captionArray.push({start:startTime,end:endTime,type:'html',cueID:getCueID(),isd:isd,images:images,embeddedImages:embeddedImages});}}}if(errorMsg!==''){logger.error(errorMsg);throw new Error(errorMsg);}return captionArray;}instance={parse:parse};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TTMLParser.__dashjs_factory_name='TTMLParser';exports.default=_FactoryMaker2.default.getSingletonFactory(TTMLParser);\\n//# sourceMappingURL=TTMLParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DefaultURLUtils=__webpack_require__(/*! ./DefaultURLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js\\\");var _DefaultURLUtils2=_interopRequireDefault(_DefaultURLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module URLUtils\\n * @ignore\\n * @description Provides utility functions for operating on URLs.\\n * Initially this is simply a method to determine the Base URL of a URL, but\\n * should probably include other things provided all over the place such as\\n * determining whether a URL is relative/absolute, resolving two paths etc.\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function URLUtils(){var instance=void 0;var defaultURLUtils=void 0;var regexUtils=[];var context=this.context;function getUtils(url){var i=void 0;for(i=0;i<regexUtils.length;i++){var regex=regexUtils[i].regex;if(regex.test(url)){return regexUtils[i].utils;}}return defaultURLUtils;}function setup(){defaultURLUtils=(0,_DefaultURLUtils2.default)(context).getInstance();}/**\\n     * Register a module to handle specific url.\\n     * @param {regex} regex - url regex\\n     * @param {object} utils - object that handles the regex\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function registerUrlRegex(regex,utils){regexUtils.push({regex:regex,utils:utils});}function internalCall(functionName,url,baseUrl){var utils=getUtils(baseUrl||url);return utils&&typeof utils[functionName]==='function'?utils[functionName](url,baseUrl):defaultURLUtils[functionName](url,baseUrl);}/**\\n     * Returns a string that contains the Base URL of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function parseBaseUrl(url){return internalCall('parseBaseUrl',url);}/**\\n     * Returns a string that contains the scheme and origin of a URL,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function parseOrigin(url){return internalCall('parseOrigin',url);}/**\\n     * Returns a string that contains the fragment of a URL without scheme,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function removeHostname(url){return internalCall('removeHostname',url);}/**\\n     * Returns a string that contains the scheme of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function parseScheme(url){return internalCall('parseScheme',url);}/**\\n     * Determines whether the url is relative.\\n     * @return {boolean}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isRelative(url){return internalCall('isRelative',url);}/**\\n     * Determines whether the url is path-absolute.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isPathAbsolute(url){return internalCall('isPathAbsolute',url);}/**\\n     * Determines whether the url is scheme-relative.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isSchemeRelative(url){return internalCall('isSchemeRelative',url);}/**\\n     * Determines whether the url is an HTTP-URL as defined in ISO/IEC\\n     * 23009-1:2014 3.1.15. ie URL with a fixed scheme of http or https\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isHTTPURL(url){return internalCall('isHTTPURL',url);}/**\\n     * Determines whether the supplied url has https scheme\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isHTTPS(url){return internalCall('isHTTPS',url);}/**\\n     * Resolves a url given an optional base url\\n     * @return {string}\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function resolve(url,baseUrl){return internalCall('resolve',url,baseUrl);}setup();instance={registerUrlRegex:registerUrlRegex,parseBaseUrl:parseBaseUrl,parseOrigin:parseOrigin,parseScheme:parseScheme,isRelative:isRelative,isPathAbsolute:isPathAbsolute,isSchemeRelative:isSchemeRelative,isHTTPURL:isHTTPURL,isHTTPS:isHTTPS,removeHostname:removeHostname,resolve:resolve};return instance;}URLUtils.__dashjs_factory_name='URLUtils';var factory=_FactoryMaker2.default.getSingletonFactory(URLUtils);exports.default=factory;\\n//# sourceMappingURL=URLUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var WEBVTT='WEBVTT';function VTTParser(){var context=this.context;var instance=void 0,logger=void 0,regExNewLine=void 0,regExToken=void 0,regExWhiteSpace=void 0,regExWhiteSpaceWordBoundary=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);regExNewLine=/(?:\\\\r\\\\n|\\\\r|\\\\n)/gm;regExToken=/-->/;regExWhiteSpace=/(^[\\\\s]+|[\\\\s]+$)/g;regExWhiteSpaceWordBoundary=/\\\\s\\\\b/g;}function parse(data){var captionArray=[];var len=void 0,lastStartTime=void 0;if(!data){return captionArray;}data=data.split(regExNewLine);len=data.length;lastStartTime=-1;for(var i=0;i<len;i++){var item=data[i];if(item.length>0&&item!==WEBVTT){if(item.match(regExToken)){var attributes=parseItemAttributes(item);var cuePoints=attributes.cuePoints;var styles=attributes.styles;var text=getSublines(data,i+1);var startTime=convertCuePointTimes(cuePoints[0].replace(regExWhiteSpace,''));var endTime=convertCuePointTimes(cuePoints[1].replace(regExWhiteSpace,''));if(!isNaN(startTime)&&!isNaN(endTime)&&startTime>=lastStartTime&&endTime>startTime){if(text!==''){lastStartTime=startTime;//TODO Make VO external so other parsers can use.\\ncaptionArray.push({start:startTime,end:endTime,data:text,styles:styles});}else{logger.error('Skipping cue due to empty/malformed cue text');}}else{logger.error('Skipping cue due to incorrect cue timing');}}}}return captionArray;}function convertCuePointTimes(time){var timeArray=time.split(':');var len=timeArray.length-1;time=parseInt(timeArray[len-1],10)*60+parseFloat(timeArray[len]);if(len===2){time+=parseInt(timeArray[0],10)*3600;}return time;}function parseItemAttributes(data){var vttCuePoints=data.split(regExToken);var arr=vttCuePoints[1].split(regExWhiteSpaceWordBoundary);arr.shift();//remove first array index it is empty...\\nvttCuePoints[1]=arr[0];arr.shift();return{cuePoints:vttCuePoints,styles:getCaptionStyles(arr)};}function getCaptionStyles(arr){var styleObject={};arr.forEach(function(element){if(element.split(/:/).length>1){var val=element.split(/:/)[1];if(val&&val.search(/%/)!=-1){val=parseInt(val.replace(/%/,''),10);}if(element.match(/align/)||element.match(/A/)){styleObject.align=val;}if(element.match(/line/)||element.match(/L/)){styleObject.line=val;}if(element.match(/position/)||element.match(/P/)){styleObject.position=val;}if(element.match(/size/)||element.match(/S/)){styleObject.size=val;}}});return styleObject;}/*\\n    * VTT can have multiple lines to display per cuepoint.\\n    */function getSublines(data,idx){var i=idx;var subline='';var lineData='';var lineCount=void 0;while(data[i]!==''&&i<data.length){i++;}lineCount=i-idx;if(lineCount>1){for(var j=0;j<lineCount;j++){lineData=data[idx+j];if(!lineData.match(regExToken)){subline+=lineData;if(j!==lineCount-1){subline+='\\\\n';}}else{// caption text should not have '-->' in it\\nsubline='';break;}}}else{lineData=data[idx];if(!lineData.match(regExToken))subline=lineData;}return subline;}instance={parse:parse};setup();return instance;}VTTParser.__dashjs_factory_name='VTTParser';exports.default=_FactoryMaker2.default.getSingletonFactory(VTTParser);\\n//# sourceMappingURL=VTTParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js\":\n/*!***********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js ***!\n  \\***********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BasicSelector(config){config=config||{};var instance=void 0;var blacklistController=config.blacklistController;function select(baseUrls){var index=0;var selectedBaseUrl=void 0;if(baseUrls&&baseUrls.some(function(baseUrl,idx){index=idx;return!blacklistController.contains(baseUrl.serviceLocation);})){selectedBaseUrl=baseUrls[index];}return selectedBaseUrl;}instance={select:select};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BasicSelector.__dashjs_factory_name='BasicSelector';exports.default=_FactoryMaker2.default.getClassFactory(BasicSelector);\\n//# sourceMappingURL=BasicSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js\":\n/*!*********************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js ***!\n  \\*********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DVBSelector(config){config=config||{};var instance=void 0;var blacklistController=config.blacklistController;function getNonBlacklistedBaseUrls(urls){var removedPriorities=[];var samePrioritiesFilter=function samePrioritiesFilter(el){if(removedPriorities.length){if(el.dvb_priority&&removedPriorities.indexOf(el.dvb_priority)!==-1){return false;}}return true;};var serviceLocationFilter=function serviceLocationFilter(baseUrl){if(blacklistController.contains(baseUrl.serviceLocation)){// whenever a BaseURL is removed from the available list of\\n// BaseURLs, any other BaseURL with the same @priority\\n// value as the BaseURL being removed shall also be removed\\nif(baseUrl.dvb_priority){removedPriorities.push(baseUrl.dvb_priority);}// all URLs in the list which have a @serviceLocation\\n// attribute matching an entry in the blacklist shall be\\n// removed from the available list of BaseURLs\\nreturn false;}return true;};return urls.filter(serviceLocationFilter).filter(samePrioritiesFilter);}function selectByWeight(availableUrls){var prioritySorter=function prioritySorter(a,b){var diff=a.dvb_priority-b.dvb_priority;return isNaN(diff)?0:diff;};var topPriorityFilter=function topPriorityFilter(baseUrl,idx,arr){return!idx||arr[0].dvb_priority&&baseUrl.dvb_priority&&arr[0].dvb_priority===baseUrl.dvb_priority;};var totalWeight=0;var cumulWeights=[];var idx=0;var rn=void 0,urls=void 0;// It shall begin by taking the set of resolved BaseURLs present or inherited at the current\\n// position in the MPD, resolved and filtered as described in 10.8.2.1, that have the lowest\\n// @priority attribute value.\\nurls=availableUrls.sort(prioritySorter).filter(topPriorityFilter);if(urls.length){if(urls.length>1){// If there is more than one BaseURL with this lowest @priority attribute value then the Player\\n// shall select one of them at random such that the probability of each BaseURL being chosen\\n// is proportional to the value of its @weight attribute. The method described in RFC 2782\\n// [26] or picking from a number of weighted entries is suitable for this, but there may be other\\n// algorithms which achieve the same effect.\\n// add all the weights together, storing the accumulated weight per entry\\nurls.forEach(function(baseUrl){totalWeight+=baseUrl.dvb_weight;cumulWeights.push(totalWeight);});// pick a random number between zero and totalWeight\\nrn=Math.floor(Math.random()*(totalWeight-1));// select the index for the range rn falls within\\ncumulWeights.every(function(limit,index){idx=index;if(rn<limit){return false;}return true;});}return urls[idx];}}function select(baseUrls){return baseUrls&&selectByWeight(getNonBlacklistedBaseUrls(baseUrls));}instance={select:select};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DVBSelector.__dashjs_factory_name='DVBSelector';exports.default=_FactoryMaker2.default.getClassFactory(DVBSelector);\\n//# sourceMappingURL=DVBSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var BitrateInfo=function BitrateInfo(){_classCallCheck(this,BitrateInfo);this.mediaType=null;this.bitrate=null;this.width=null;this.height=null;this.scanType=null;this.qualityIndex=NaN;};exports.default=BitrateInfo;\\n//# sourceMappingURL=BitrateInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DashJSError=function DashJSError(code,message,data){_classCallCheck(this,DashJSError);this.code=code||null;this.message=message||null;this.data=data||null;};exports.default=DashJSError;\\n//# sourceMappingURL=DashJSError.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DataChunk=//Represents a data structure that keep all the necessary info about a single init/media segment\\nfunction DataChunk(){_classCallCheck(this,DataChunk);this.streamId=null;this.mediaInfo=null;this.segmentType=null;this.quality=NaN;this.index=NaN;this.bytes=null;this.start=NaN;this.end=NaN;this.duration=NaN;this.representationId=null;this.endFragment=null;};exports.default=DataChunk;\\n//# sourceMappingURL=DataChunk.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * @class\\n * @ignore\\n */var FragmentRequest=function(){function FragmentRequest(url){_classCallCheck(this,FragmentRequest);this.action=FragmentRequest.ACTION_DOWNLOAD;this.startTime=NaN;this.mediaStartTime=NaN;this.mediaType=null;this.mediaInfo=null;this.type=null;this.duration=NaN;this.timescale=NaN;this.range=null;this.url=url||null;this.serviceLocation=null;this.requestStartDate=null;this.firstByteDate=null;this.requestEndDate=null;this.quality=NaN;this.index=NaN;this.availabilityStartTime=null;this.availabilityEndTime=null;this.wallStartTime=null;this.bytesLoaded=NaN;this.bytesTotal=NaN;this.delayLoadingTime=NaN;this.responseType='arraybuffer';this.representationId=null;}_createClass(FragmentRequest,[{key:'isInitializationRequest',value:function isInitializationRequest(){return this.type&&this.type===_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE;}},{key:'setInfo',value:function setInfo(info){this.type=info&&info.init?_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE:_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE;this.url=info&&info.url?info.url:null;this.range=info&&info.range?info.range.start+'-'+info.range.end:null;this.mediaType=info&&info.mediaType?info.mediaType:null;}}]);return FragmentRequest;}();FragmentRequest.ACTION_DOWNLOAD='download';FragmentRequest.ACTION_COMPLETE='complete';exports.default=FragmentRequest;\\n//# sourceMappingURL=FragmentRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FragmentRequest2=__webpack_require__(/*! ./FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest3=_interopRequireDefault(_FragmentRequest2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var HeadRequest=function(_FragmentRequest){_inherits(HeadRequest,_FragmentRequest);function HeadRequest(url){_classCallCheck(this,HeadRequest);var _this=_possibleConstructorReturn(this,(HeadRequest.__proto__||Object.getPrototypeOf(HeadRequest)).call(this,url));_this.checkForExistenceOnly=true;return _this;}return HeadRequest;}(_FragmentRequest3.default);exports.default=HeadRequest;\\n//# sourceMappingURL=HeadRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js\":\n/*!*******************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js ***!\n  \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var IsoBox=function(){function IsoBox(boxData){_classCallCheck(this,IsoBox);this.offset=boxData._offset;this.type=boxData.type;this.size=boxData.size;this.boxes=[];if(boxData.boxes){for(var i=0;i<boxData.boxes.length;i++){this.boxes.push(new IsoBox(boxData.boxes[i]));}}this.isComplete=true;switch(boxData.type){case'sidx':this.timescale=boxData.timescale;this.earliest_presentation_time=boxData.earliest_presentation_time;this.first_offset=boxData.first_offset;this.references=boxData.references;if(boxData.references){this.references=[];for(var _i=0;_i<boxData.references.length;_i++){var reference={reference_type:boxData.references[_i].reference_type,referenced_size:boxData.references[_i].referenced_size,subsegment_duration:boxData.references[_i].subsegment_duration};this.references.push(reference);}}break;case'emsg':this.id=boxData.id;this.version=boxData.version===1?1:0;this.value=boxData.value;this.timescale=boxData.timescale;this.scheme_id_uri=boxData.scheme_id_uri;this.presentation_time_delta=boxData.version===1?boxData.presentation_time:boxData.presentation_time_delta;this.event_duration=boxData.event_duration;this.message_data=boxData.message_data;break;case'mdhd':this.timescale=boxData.timescale;break;case'mfhd':this.sequence_number=boxData.sequence_number;break;case'subs':this.entry_count=boxData.entry_count;this.entries=boxData.entries;break;case'tfhd':this.base_data_offset=boxData.base_data_offset;this.sample_description_index=boxData.sample_description_index;this.default_sample_duration=boxData.default_sample_duration;this.default_sample_size=boxData.default_sample_size;this.default_sample_flags=boxData.default_sample_flags;this.flags=boxData.flags;break;case'tfdt':this.version=boxData.version;this.baseMediaDecodeTime=boxData.baseMediaDecodeTime;this.flags=boxData.flags;break;case'trun':this.sample_count=boxData.sample_count;this.first_sample_flags=boxData.first_sample_flags;this.data_offset=boxData.data_offset;this.flags=boxData.flags;this.samples=boxData.samples;if(boxData.samples){this.samples=[];for(var _i2=0,ln=boxData.samples.length;_i2<ln;_i2++){var sample={sample_size:boxData.samples[_i2].sample_size,sample_duration:boxData.samples[_i2].sample_duration,sample_composition_time_offset:boxData.samples[_i2].sample_composition_time_offset};this.samples.push(sample);}}break;}}_createClass(IsoBox,[{key:'getChildBox',value:function getChildBox(type){for(var i=0;i<this.boxes.length;i++){if(this.boxes[i].type===type){return this.boxes[i];}}}},{key:'getChildBoxes',value:function getChildBoxes(type){var boxes=[];for(var i=0;i<this.boxes.length;i++){if(this.boxes[i].type===type){boxes.push(this.boxes[i]);}}return boxes;}}]);return IsoBox;}();exports.default=IsoBox;\\n//# sourceMappingURL=IsoBox.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var IsoBoxSearchInfo=function IsoBoxSearchInfo(lastCompletedOffset,found,size){_classCallCheck(this,IsoBoxSearchInfo);this.lastCompletedOffset=lastCompletedOffset;this.found=found;this.size=size;};exports.default=IsoBoxSearchInfo;\\n//# sourceMappingURL=IsoBoxSearchInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var MetricsList=function MetricsList(){_classCallCheck(this,MetricsList);this.TcpList=[];this.HttpList=[];this.RepSwitchList=[];this.BufferLevel=[];this.BufferState=[];this.PlayList=[];this.DroppedFrames=[];this.SchedulingInfo=[];this.DVRInfo=[];this.ManifestUpdate=[];this.RequestsQueue=null;this.DVBErrors=[];};exports.default=MetricsList;\\n//# sourceMappingURL=MetricsList.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FragmentRequest2=__webpack_require__(/*! ./FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest3=_interopRequireDefault(_FragmentRequest2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var TextRequest=function(_FragmentRequest){_inherits(TextRequest,_FragmentRequest);function TextRequest(url,type){_classCallCheck(this,TextRequest);var _this=_possibleConstructorReturn(this,(TextRequest.__proto__||Object.getPrototypeOf(TextRequest)).call(this));_this.url=url||null;_this.type=type||null;_this.mediaType=_Constants2.default.STREAM;_this.responseType='';//'text' value returns a bad encoding response in Firefox\\nreturn _this;}return TextRequest;}(_FragmentRequest3.default);exports.default=TextRequest;\\n//# sourceMappingURL=TextRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var TextTrackInfo=function TextTrackInfo(){_classCallCheck(this,TextTrackInfo);this.captionData=null;this.label=null;this.lang=null;this.defaultTrack=false;this.kind=null;this.isFragmented=false;this.isEmbedded=false;};exports.default=TextTrackInfo;\\n//# sourceMappingURL=TextTrackInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Thumbnail=function Thumbnail(){_classCallCheck(this,Thumbnail);this.url=null;this.width=null;this.height=null;this.x=null;this.y=null;};exports.default=Thumbnail;\\n//# sourceMappingURL=Thumbnail.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var ThumbnailTrackInfo=function ThumbnailTrackInfo(){_classCallCheck(this,ThumbnailTrackInfo);this.bitrate=0;this.width=0;this.height=0;this.tilesHor=0;this.tilesVert=0;this.widthPerTile=0;this.heightPerTile=0;this.startNumber=0;this.segmentDuration=0;this.timescale=0;this.templateUrl='';this.id='';};exports.default=ThumbnailTrackInfo;\\n//# sourceMappingURL=ThumbnailTrackInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var URIFragmentData=function URIFragmentData(){_classCallCheck(this,URIFragmentData);this.t=null;this.xywh=null;this.track=null;this.id=null;this.s=null;this.r=null;};exports.default=URIFragmentData;/*\\n    From Spec http://www.w3.org/TR/media-frags/\\n\\n    temporal (t)     - This dimension denotes a specific time range in the original media, such as \\\"starting at second 10, continuing until second 20\\\";\\n    spatial  (xywh)  - this dimension denotes a specific range of pixels in the original media, such as \\\"a rectangle with size (100,100) with its top-left at coordinate (10,10)\\\";\\n                       Media fragments support also addressing the media along two additional dimensions (in the advanced version defined in Media Fragments 1.0 URI (advanced)):\\n    track    (track) - this dimension denotes one or more tracks in the original media, such as \\\"the english audio and the video track\\\";\\n    id       (id)    - this dimension denotes a named temporal fragment within the original media, such as \\\"chapter 2\\\", and can be seen as a convenient way of specifying a temporal fragment.\\n\\n\\n    ## Note\\n    Akamai is purposing to add #s=X to the ISO standard.\\n        - (X) Value would be a start time to seek to at startup instead of starting at 0 or live edge\\n        - Allows for seeking back before the start time unlike a temporal clipping.\\n*/\\n//# sourceMappingURL=URIFragmentData.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var BufferLevel=/**\\n     * @description This Object holds reference to the current buffer level and the time it was recorded.\\n     */function BufferLevel(){_classCallCheck(this,BufferLevel);/**\\n         * Real-Time | Time of the measurement of the buffer level.\\n         * @public\\n         */this.t=null;/**\\n         * Level of the buffer in milliseconds. Indicates the playout duration for which\\n         * media data of all active media components is available starting from the\\n         * current playout time.\\n         * @public\\n         */this.level=null;};exports.default=BufferLevel;\\n//# sourceMappingURL=BufferLevel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var BufferState=/**\\n     * @description This Object holds reference to the current buffer state of the video element.\\n     */function BufferState(){_classCallCheck(this,BufferState);/**\\n         * The Buffer Level Target determined by the BufferLevelRule.\\n         * @public\\n         */this.target=null;/**\\n         * Current buffer state. Will be MetricsConstants.BUFFER_EMPTY or MetricsConstants.BUFFER_LOADED.\\n         * @public\\n         */this.state=_MetricsConstants2.default.BUFFER_EMPTY;};exports.default=BufferState;\\n//# sourceMappingURL=BufferState.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js\":\n/*!****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DVRInfo=/**\\n     * @description This Object holds reference to DVR availability window information.\\n     */function DVRInfo(){_classCallCheck(this,DVRInfo);/**\\n         * The current time of the video element when this was created.\\n         * @public\\n         */this.time=null;/**\\n         * The current Segment Availability Range as an object with start and end properties.\\n         * It's delta defined by the timeShiftBufferDepth MPD attribute.\\n         * @public\\n         */this.range=null;/**\\n         * Reference to the internal ManifestInfo.js VO.\\n         * @public\\n         */this.manifestInfo=null;};exports.default=DVRInfo;\\n//# sourceMappingURL=DVRInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DroppedFrames=/**\\n     * @description This Object holds reference to DroppedFrames count and the time it was recorded.\\n     */function DroppedFrames(){_classCallCheck(this,DroppedFrames);/**\\n         * Real-Time | Time of the measurement of the dropped frames.\\n         * @public\\n         */this.time=null;/**\\n         * Number of dropped frames\\n         * @public\\n         */this.droppedFrames=null;};exports.default=DroppedFrames;\\n//# sourceMappingURL=DroppedFrames.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc This Object holds reference to the HTTPRequest for manifest, fragment and xlink loading.\\n * Members which are not defined in ISO23009-1 Annex D should be prefixed by a _ so that they are ignored\\n * by Metrics Reporting code.\\n * @ignore\\n */var HTTPRequest=/**\\n     * @class\\n     */function HTTPRequest(){_classCallCheck(this,HTTPRequest);/**\\n         * Identifier of the TCP connection on which the HTTP request was sent.\\n         * @public\\n         */this.tcpid=null;/**\\n         * This is an optional parameter and should not be included in HTTP request/response transactions for progressive download.\\n         * The type of the request:\\n         * - MPD\\n         * - XLink expansion\\n         * - Initialization Fragment\\n         * - Index Fragment\\n         * - Media Fragment\\n         * - Bitstream Switching Fragment\\n         * - other\\n         * @public\\n         */this.type=null;/**\\n         * The original URL (before any redirects or failures)\\n         * @public\\n         */this.url=null;/**\\n         * The actual URL requested, if different from above\\n         * @public\\n         */this.actualurl=null;/**\\n         * The contents of the byte-range-spec part of the HTTP Range header.\\n         * @public\\n         */this.range=null;/**\\n         * Real-Time | The real time at which the request was sent.\\n         * @public\\n         */this.trequest=null;/**\\n         * Real-Time | The real time at which the first byte of the response was received.\\n         * @public\\n         */this.tresponse=null;/**\\n         * The HTTP response code.\\n         * @public\\n         */this.responsecode=null;/**\\n         * The duration of the throughput trace intervals (ms), for successful requests only.\\n         * @public\\n         */this.interval=null;/**\\n         * Throughput traces, for successful requests only.\\n         * @public\\n         */this.trace=[];/**\\n         * Type of stream (\\\"audio\\\" | \\\"video\\\" etc..)\\n         * @public\\n         */this._stream=null;/**\\n         * Real-Time | The real time at which the request finished.\\n         * @public\\n         */this._tfinish=null;/**\\n         * The duration of the media requests, if available, in seconds.\\n         * @public\\n         */this._mediaduration=null;/**\\n         * The media segment quality\\n         * @public\\n         */this._quality=null;/**\\n         * all the response headers from request.\\n         * @public\\n         */this._responseHeaders=null;/**\\n         * The selected service location for the request. string.\\n         * @public\\n         */this._serviceLocation=null;};/**\\n * @classdesc This Object holds reference to the progress of the HTTPRequest.\\n * @ignore\\n */var HTTPRequestTrace=/**\\n    * @class\\n    */function HTTPRequestTrace(){_classCallCheck(this,HTTPRequestTrace);/**\\n         * Real-Time | Measurement stream start.\\n         * @public\\n         */this.s=null;/**\\n         * Measurement stream duration (ms).\\n         * @public\\n         */this.d=null;/**\\n         * List of integers counting the bytes received in each trace interval within the measurement stream.\\n         * @public\\n         */this.b=[];};HTTPRequest.GET='GET';HTTPRequest.HEAD='HEAD';HTTPRequest.MPD_TYPE='MPD';HTTPRequest.XLINK_EXPANSION_TYPE='XLinkExpansion';HTTPRequest.INIT_SEGMENT_TYPE='InitializationSegment';HTTPRequest.INDEX_SEGMENT_TYPE='IndexSegment';HTTPRequest.MEDIA_SEGMENT_TYPE='MediaSegment';HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE='BitstreamSwitchingSegment';HTTPRequest.LICENSE='license';HTTPRequest.OTHER_TYPE='other';exports.HTTPRequest=HTTPRequest;exports.HTTPRequestTrace=HTTPRequestTrace;\\n//# sourceMappingURL=HTTPRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc This Object holds reference to the manifest update information.\\n * @ignore\\n */var ManifestUpdate=/**\\n     * @class\\n     */function ManifestUpdate(){_classCallCheck(this,ManifestUpdate);/**\\n         * Media Type Video | Audio | FragmentedText\\n         * @public\\n         */this.mediaType=null;/**\\n         * MPD Type static | dynamic\\n         * @public\\n         */this.type=null;/**\\n         * When this manifest update was requested\\n         * @public\\n         */this.requestTime=null;/**\\n         * When this manifest update was received\\n         * @public\\n         */this.fetchTime=null;/**\\n         * Calculated Availability Start time of the stream.\\n         * @public\\n         */this.availabilityStartTime=null;/**\\n         * the seek point (liveEdge for dynamic, Stream[0].startTime for static)\\n         * @public\\n         */this.presentationStartTime=0;/**\\n         * The calculated difference between the server and client wall clock time\\n         * @public\\n         */this.clientTimeOffset=0;/**\\n         * Actual element.currentTime\\n         * @public\\n         */this.currentTime=null;/**\\n         * Actual element.ranges\\n         * @public\\n         */this.buffered=null;/**\\n         * Static is fixed value of zero. dynamic should be ((Now-@availabilityStartTime) - elementCurrentTime)\\n         * @public\\n         */this.latency=0;/**\\n         * Array holding list of StreamInfo VO Objects\\n         * @public\\n         */this.streamInfo=[];/**\\n         * Array holding list of RepresentationInfo VO Objects\\n         * @public\\n         */this.representationInfo=[];};/**\\n * @classdesc This Object holds reference to the current period's stream information when the manifest was updated.\\n * @ignore\\n */var ManifestUpdateStreamInfo=/**\\n     * @class\\n     */function ManifestUpdateStreamInfo(){_classCallCheck(this,ManifestUpdateStreamInfo);/**\\n         * Stream@id\\n         * @public\\n         */this.id=null;/**\\n         * Period Index\\n         * @public\\n         */this.index=null;/**\\n         * Stream@start\\n         * @public\\n         */this.start=null;/**\\n         * Stream@duration\\n         * @public\\n         */this.duration=null;};/**\\n * @classdesc This Object holds reference to the current representation's info when the manifest was updated.\\n * @ignore\\n */var ManifestUpdateRepresentationInfo=/**\\n     * @class\\n     */function ManifestUpdateRepresentationInfo(){_classCallCheck(this,ManifestUpdateRepresentationInfo);/**\\n         * Track@id\\n         * @public\\n         */this.id=null;/**\\n         * Representation Index\\n         * @public\\n         */this.index=null;/**\\n         * Media Type Video | Audio | FragmentedText\\n         * @public\\n         */this.mediaType=null;/**\\n         * Which representation\\n         * @public\\n         */this.streamIndex=null;/**\\n         * Holds reference to @presentationTimeOffset\\n         * @public\\n         */this.presentationTimeOffset=null;/**\\n         * Holds reference to @startNumber\\n         * @public\\n         */this.startNumber=null;/**\\n         * list|template|timeline\\n         * @public\\n         */this.fragmentInfoType=null;};exports.ManifestUpdate=ManifestUpdate;exports.ManifestUpdateStreamInfo=ManifestUpdateStreamInfo;exports.ManifestUpdateRepresentationInfo=ManifestUpdateRepresentationInfo;\\n//# sourceMappingURL=ManifestUpdate.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\":\n/*!*****************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a PlayList from ISO23009-1 Annex D, this Object holds reference to the playback session information\\n * @ignore\\n */var PlayList=/**\\n     * @class\\n     */function PlayList(){_classCallCheck(this,PlayList);/**\\n         * Timestamp of the user action that starts the playback stream...\\n         * @public\\n         */this.start=null;/**\\n         * Presentation time at which playout was requested by the user...\\n         * @public\\n         */this.mstart=null;/**\\n         * Type of user action which triggered playout\\n         * - New playout request (e.g. initial playout or seeking)\\n         * - Resume from pause\\n         * - Other user request (e.g. user-requested quality change)\\n         * - Start of a metrics collection stream (hence earlier entries in the play list not collected)\\n         * @public\\n         */this.starttype=null;/**\\n         * List of streams of continuous rendering of decoded samples.\\n         * @public\\n         */this.trace=[];};/* Public Static Constants */PlayList.INITIAL_PLAYOUT_START_REASON='initial_playout';PlayList.SEEK_START_REASON='seek';PlayList.RESUME_FROM_PAUSE_START_REASON='resume';PlayList.METRICS_COLLECTION_START_REASON='metrics_collection_start';/**\\n * @classdesc a PlayList.Trace from ISO23009-1 Annex D\\n * @ignore\\n */var PlayListTrace=/**\\n     * @class\\n     */function PlayListTrace(){_classCallCheck(this,PlayListTrace);/**\\n         * The value of the Representation@id of the Representation from which the samples were taken.\\n         * @type {string}\\n         * @public\\n         */this.representationid=null;/**\\n         * If not present, this metrics concerns the Representation as a whole.\\n         * If present, subreplevel indicates the greatest value of any\\n         * Subrepresentation@level being rendered.\\n         * @type {number}\\n         * @public\\n         */this.subreplevel=null;/**\\n         * The time at which the first sample was rendered\\n         * @type {number}\\n         * @public\\n         */this.start=null;/**\\n         * The presentation time of the first sample rendered.\\n         * @type {number}\\n         * @public\\n         */this.mstart=null;/**\\n         * The duration of the continuously presented samples (which is the same in real time and media time). \\\"Continuously presented\\\" means that the media clock continued to advance at the playout speed throughout the interval. NOTE: the spec does not call out the units, but all other durations etc are in ms, and we use ms too.\\n         * @type {number}\\n         * @public\\n         */this.duration=null;/**\\n         * The playback speed relative to normal playback speed (i.e.normal forward playback speed is 1.0).\\n         * @type {number}\\n         * @public\\n         */this.playbackspeed=null;/**\\n         * The reason why continuous presentation of this Representation was stopped.\\n         * representation switch\\n         * rebuffering\\n         * user request\\n         * end of Period\\n         * end of Stream\\n         * end of content\\n         * end of a metrics collection period\\n         *\\n         * @type {string}\\n         * @public\\n         */this.stopreason=null;};PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON='representation_switch';PlayListTrace.REBUFFERING_REASON='rebuffering';PlayListTrace.USER_REQUEST_STOP_REASON='user_request';PlayListTrace.END_OF_PERIOD_STOP_REASON='end_of_period';PlayListTrace.END_OF_CONTENT_STOP_REASON='end_of_content';PlayListTrace.METRICS_COLLECTION_STOP_REASON='metrics_collection_end';PlayListTrace.FAILURE_STOP_REASON='failure';exports.PlayList=PlayList;exports.PlayListTrace=PlayListTrace;\\n//# sourceMappingURL=PlayList.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js\":\n/*!*****************************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js ***!\n  \\*****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var RepresentationSwitch=/**\\n     * @description This Object holds reference to the info at quality switch between two representations.\\n     */function RepresentationSwitch(){_classCallCheck(this,RepresentationSwitch);/**\\n         * Time of the switch event.\\n         * @public\\n         */this.t=null;/**\\n         * The media presentation time of the earliest access unit\\n         * (out of all media content components) played out from\\n         * the Representation.\\n         *\\n         * @public\\n         */this.mt=null;/**\\n         * Value of Representation@id identifying the switch-to Representation.\\n         * @public\\n         */this.to=null;/**\\n         * If not present, this metrics concerns the Representation as a whole.\\n         * If present, lto indicates the value of SubRepresentation@level within\\n         * Representation identifying the switch-to level of the Representation.\\n         *\\n         * @public\\n         */this.lto=null;};exports.default=RepresentationSwitch;\\n//# sourceMappingURL=RepresentationSwitch.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js\":\n/*!**********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js ***!\n  \\**********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var RequestsQueue=/**\\n     * @description This Object holds reference to Fragment Model's request queues\\n     */function RequestsQueue(){_classCallCheck(this,RequestsQueue);/**\\n         * Array of all of the requests that have begun to load\\n         * This request may not make it into the executed queue if it is abandon due to ABR rules for example.\\n         * @public\\n         */this.loadingRequests=[];/**\\n         * Array of the The requests that have completed\\n         * @public\\n         */this.executedRequests=[];};exports.default=RequestsQueue;\\n//# sourceMappingURL=RequestsQueue.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js\":\n/*!***********************************************************************************!*\\\n  !*** ../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var SchedulingInfo=/**\\n     * @description This Object holds reference to the index handling of the current fragment being loaded or executed.\\n     */function SchedulingInfo(){_classCallCheck(this,SchedulingInfo);/**\\n         * Type of stream Audio | Video | FragmentedText\\n         * @public\\n         */this.mediaType=null;/**\\n         * Time of the scheduling event.\\n         * @public\\n         */this.t=null;/**\\n         * Type of fragment (initialization | media)\\n         * @public\\n         */this.type=null;/**\\n         * Presentation start time of fragment\\n         * @public\\n         */this.startTime=null;/**\\n         * Availability start time of fragment\\n         * @public\\n         */this.availabilityStartTime=null;/**\\n         * Duration of fragment\\n         * @public\\n         */this.duration=null;/**\\n         * Bit Rate Quality of fragment\\n         * @public\\n         */this.quality=null;/**\\n         * Range of fragment\\n         * @public\\n         */this.range=null;/**\\n         * Current state of fragment\\n         * @public\\n         */this.state=null;};exports.default=SchedulingInfo;\\n//# sourceMappingURL=SchedulingInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/events/events.js\":\n/*!****************************************!*\\\n  !*** ../node_modules/events/events.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\nvar R = typeof Reflect === 'object' ? Reflect : null\\nvar ReflectApply = R && typeof R.apply === 'function'\\n  ? R.apply\\n  : function ReflectApply(target, receiver, args) {\\n    return Function.prototype.apply.call(target, receiver, args);\\n  }\\n\\nvar ReflectOwnKeys\\nif (R && typeof R.ownKeys === 'function') {\\n  ReflectOwnKeys = R.ownKeys\\n} else if (Object.getOwnPropertySymbols) {\\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\\n    return Object.getOwnPropertyNames(target)\\n      .concat(Object.getOwnPropertySymbols(target));\\n  };\\n} else {\\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\\n    return Object.getOwnPropertyNames(target);\\n  };\\n}\\n\\nfunction ProcessEmitWarning(warning) {\\n  if (console && console.warn) console.warn(warning);\\n}\\n\\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\\n  return value !== value;\\n}\\n\\nfunction EventEmitter() {\\n  EventEmitter.init.call(this);\\n}\\nmodule.exports = EventEmitter;\\n\\n// Backwards-compat with node 0.10.x\\nEventEmitter.EventEmitter = EventEmitter;\\n\\nEventEmitter.prototype._events = undefined;\\nEventEmitter.prototype._eventsCount = 0;\\nEventEmitter.prototype._maxListeners = undefined;\\n\\n// By default EventEmitters will print a warning if more than 10 listeners are\\n// added to it. This is a useful default which helps finding memory leaks.\\nvar defaultMaxListeners = 10;\\n\\nfunction checkListener(listener) {\\n  if (typeof listener !== 'function') {\\n    throw new TypeError('The \\\"listener\\\" argument must be of type Function. Received type ' + typeof listener);\\n  }\\n}\\n\\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\\n  enumerable: true,\\n  get: function() {\\n    return defaultMaxListeners;\\n  },\\n  set: function(arg) {\\n    if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\\n      throw new RangeError('The value of \\\"defaultMaxListeners\\\" is out of range. It must be a non-negative number. Received ' + arg + '.');\\n    }\\n    defaultMaxListeners = arg;\\n  }\\n});\\n\\nEventEmitter.init = function() {\\n\\n  if (this._events === undefined ||\\n      this._events === Object.getPrototypeOf(this)._events) {\\n    this._events = Object.create(null);\\n    this._eventsCount = 0;\\n  }\\n\\n  this._maxListeners = this._maxListeners || undefined;\\n};\\n\\n// Obviously not all Emitters should be limited to 10. This function allows\\n// that to be increased. Set to zero for unlimited.\\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\\n  if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\\n    throw new RangeError('The value of \\\"n\\\" is out of range. It must be a non-negative number. Received ' + n + '.');\\n  }\\n  this._maxListeners = n;\\n  return this;\\n};\\n\\nfunction _getMaxListeners(that) {\\n  if (that._maxListeners === undefined)\\n    return EventEmitter.defaultMaxListeners;\\n  return that._maxListeners;\\n}\\n\\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\\n  return _getMaxListeners(this);\\n};\\n\\nEventEmitter.prototype.emit = function emit(type) {\\n  var args = [];\\n  for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\\n  var doError = (type === 'error');\\n\\n  var events = this._events;\\n  if (events !== undefined)\\n    doError = (doError && events.error === undefined);\\n  else if (!doError)\\n    return false;\\n\\n  // If there is no 'error' event listener then throw.\\n  if (doError) {\\n    var er;\\n    if (args.length > 0)\\n      er = args[0];\\n    if (er instanceof Error) {\\n      // Note: The comments on the `throw` lines are intentional, they show\\n      // up in Node's output if this results in an unhandled exception.\\n      throw er; // Unhandled 'error' event\\n    }\\n    // At least give some kind of context to the user\\n    var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\\n    err.context = er;\\n    throw err; // Unhandled 'error' event\\n  }\\n\\n  var handler = events[type];\\n\\n  if (handler === undefined)\\n    return false;\\n\\n  if (typeof handler === 'function') {\\n    ReflectApply(handler, this, args);\\n  } else {\\n    var len = handler.length;\\n    var listeners = arrayClone(handler, len);\\n    for (var i = 0; i < len; ++i)\\n      ReflectApply(listeners[i], this, args);\\n  }\\n\\n  return true;\\n};\\n\\nfunction _addListener(target, type, listener, prepend) {\\n  var m;\\n  var events;\\n  var existing;\\n\\n  checkListener(listener);\\n\\n  events = target._events;\\n  if (events === undefined) {\\n    events = target._events = Object.create(null);\\n    target._eventsCount = 0;\\n  } else {\\n    // To avoid recursion in the case that type === \\\"newListener\\\"! Before\\n    // adding it to the listeners, first emit \\\"newListener\\\".\\n    if (events.newListener !== undefined) {\\n      target.emit('newListener', type,\\n                  listener.listener ? listener.listener : listener);\\n\\n      // Re-assign `events` because a newListener handler could have caused the\\n      // this._events to be assigned to a new object\\n      events = target._events;\\n    }\\n    existing = events[type];\\n  }\\n\\n  if (existing === undefined) {\\n    // Optimize the case of one listener. Don't need the extra array object.\\n    existing = events[type] = listener;\\n    ++target._eventsCount;\\n  } else {\\n    if (typeof existing === 'function') {\\n      // Adding the second element, need to change to array.\\n      existing = events[type] =\\n        prepend ? [listener, existing] : [existing, listener];\\n      // If we've already got an array, just append.\\n    } else if (prepend) {\\n      existing.unshift(listener);\\n    } else {\\n      existing.push(listener);\\n    }\\n\\n    // Check for listener leak\\n    m = _getMaxListeners(target);\\n    if (m > 0 && existing.length > m && !existing.warned) {\\n      existing.warned = true;\\n      // No error code for this since it is a Warning\\n      // eslint-disable-next-line no-restricted-syntax\\n      var w = new Error('Possible EventEmitter memory leak detected. ' +\\n                          existing.length + ' ' + String(type) + ' listeners ' +\\n                          'added. Use emitter.setMaxListeners() to ' +\\n                          'increase limit');\\n      w.name = 'MaxListenersExceededWarning';\\n      w.emitter = target;\\n      w.type = type;\\n      w.count = existing.length;\\n      ProcessEmitWarning(w);\\n    }\\n  }\\n\\n  return target;\\n}\\n\\nEventEmitter.prototype.addListener = function addListener(type, listener) {\\n  return _addListener(this, type, listener, false);\\n};\\n\\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\\n\\nEventEmitter.prototype.prependListener =\\n    function prependListener(type, listener) {\\n      return _addListener(this, type, listener, true);\\n    };\\n\\nfunction onceWrapper() {\\n  if (!this.fired) {\\n    this.target.removeListener(this.type, this.wrapFn);\\n    this.fired = true;\\n    if (arguments.length === 0)\\n      return this.listener.call(this.target);\\n    return this.listener.apply(this.target, arguments);\\n  }\\n}\\n\\nfunction _onceWrap(target, type, listener) {\\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\\n  var wrapped = onceWrapper.bind(state);\\n  wrapped.listener = listener;\\n  state.wrapFn = wrapped;\\n  return wrapped;\\n}\\n\\nEventEmitter.prototype.once = function once(type, listener) {\\n  checkListener(listener);\\n  this.on(type, _onceWrap(this, type, listener));\\n  return this;\\n};\\n\\nEventEmitter.prototype.prependOnceListener =\\n    function prependOnceListener(type, listener) {\\n      checkListener(listener);\\n      this.prependListener(type, _onceWrap(this, type, listener));\\n      return this;\\n    };\\n\\n// Emits a 'removeListener' event if and only if the listener was removed.\\nEventEmitter.prototype.removeListener =\\n    function removeListener(type, listener) {\\n      var list, events, position, i, originalListener;\\n\\n      checkListener(listener);\\n\\n      events = this._events;\\n      if (events === undefined)\\n        return this;\\n\\n      list = events[type];\\n      if (list === undefined)\\n        return this;\\n\\n      if (list === listener || list.listener === listener) {\\n        if (--this._eventsCount === 0)\\n          this._events = Object.create(null);\\n        else {\\n          delete events[type];\\n          if (events.removeListener)\\n            this.emit('removeListener', type, list.listener || listener);\\n        }\\n      } else if (typeof list !== 'function') {\\n        position = -1;\\n\\n        for (i = list.length - 1; i >= 0; i--) {\\n          if (list[i] === listener || list[i].listener === listener) {\\n            originalListener = list[i].listener;\\n            position = i;\\n            break;\\n          }\\n        }\\n\\n        if (position < 0)\\n          return this;\\n\\n        if (position === 0)\\n          list.shift();\\n        else {\\n          spliceOne(list, position);\\n        }\\n\\n        if (list.length === 1)\\n          events[type] = list[0];\\n\\n        if (events.removeListener !== undefined)\\n          this.emit('removeListener', type, originalListener || listener);\\n      }\\n\\n      return this;\\n    };\\n\\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\\n\\nEventEmitter.prototype.removeAllListeners =\\n    function removeAllListeners(type) {\\n      var listeners, events, i;\\n\\n      events = this._events;\\n      if (events === undefined)\\n        return this;\\n\\n      // not listening for removeListener, no need to emit\\n      if (events.removeListener === undefined) {\\n        if (arguments.length === 0) {\\n          this._events = Object.create(null);\\n          this._eventsCount = 0;\\n        } else if (events[type] !== undefined) {\\n          if (--this._eventsCount === 0)\\n            this._events = Object.create(null);\\n          else\\n            delete events[type];\\n        }\\n        return this;\\n      }\\n\\n      // emit removeListener for all listeners on all events\\n      if (arguments.length === 0) {\\n        var keys = Object.keys(events);\\n        var key;\\n        for (i = 0; i < keys.length; ++i) {\\n          key = keys[i];\\n          if (key === 'removeListener') continue;\\n          this.removeAllListeners(key);\\n        }\\n        this.removeAllListeners('removeListener');\\n        this._events = Object.create(null);\\n        this._eventsCount = 0;\\n        return this;\\n      }\\n\\n      listeners = events[type];\\n\\n      if (typeof listeners === 'function') {\\n        this.removeListener(type, listeners);\\n      } else if (listeners !== undefined) {\\n        // LIFO order\\n        for (i = listeners.length - 1; i >= 0; i--) {\\n          this.removeListener(type, listeners[i]);\\n        }\\n      }\\n\\n      return this;\\n    };\\n\\nfunction _listeners(target, type, unwrap) {\\n  var events = target._events;\\n\\n  if (events === undefined)\\n    return [];\\n\\n  var evlistener = events[type];\\n  if (evlistener === undefined)\\n    return [];\\n\\n  if (typeof evlistener === 'function')\\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\\n\\n  return unwrap ?\\n    unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\\n}\\n\\nEventEmitter.prototype.listeners = function listeners(type) {\\n  return _listeners(this, type, true);\\n};\\n\\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\\n  return _listeners(this, type, false);\\n};\\n\\nEventEmitter.listenerCount = function(emitter, type) {\\n  if (typeof emitter.listenerCount === 'function') {\\n    return emitter.listenerCount(type);\\n  } else {\\n    return listenerCount.call(emitter, type);\\n  }\\n};\\n\\nEventEmitter.prototype.listenerCount = listenerCount;\\nfunction listenerCount(type) {\\n  var events = this._events;\\n\\n  if (events !== undefined) {\\n    var evlistener = events[type];\\n\\n    if (typeof evlistener === 'function') {\\n      return 1;\\n    } else if (evlistener !== undefined) {\\n      return evlistener.length;\\n    }\\n  }\\n\\n  return 0;\\n}\\n\\nEventEmitter.prototype.eventNames = function eventNames() {\\n  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\\n};\\n\\nfunction arrayClone(arr, n) {\\n  var copy = new Array(n);\\n  for (var i = 0; i < n; ++i)\\n    copy[i] = arr[i];\\n  return copy;\\n}\\n\\nfunction spliceOne(list, index) {\\n  for (; index + 1 < list.length; index++)\\n    list[index] = list[index + 1];\\n  list.pop();\\n}\\n\\nfunction unwrapListeners(arr) {\\n  var ret = new Array(arr.length);\\n  for (var i = 0; i < ret.length; ++i) {\\n    ret[i] = arr[i].listener || arr[i];\\n  }\\n  return ret;\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/events/events.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/fast-deep-equal/index.js\":\n/*!************************************************!*\\\n  !*** ../node_modules/fast-deep-equal/index.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nvar isArray = Array.isArray;\\nvar keyList = Object.keys;\\nvar hasProp = Object.prototype.hasOwnProperty;\\n\\nmodule.exports = function equal(a, b) {\\n  if (a === b) return true;\\n\\n  if (a && b && typeof a == 'object' && typeof b == 'object') {\\n    var arrA = isArray(a)\\n      , arrB = isArray(b)\\n      , i\\n      , length\\n      , key;\\n\\n    if (arrA && arrB) {\\n      length = a.length;\\n      if (length != b.length) return false;\\n      for (i = length; i-- !== 0;)\\n        if (!equal(a[i], b[i])) return false;\\n      return true;\\n    }\\n\\n    if (arrA != arrB) return false;\\n\\n    var dateA = a instanceof Date\\n      , dateB = b instanceof Date;\\n    if (dateA != dateB) return false;\\n    if (dateA && dateB) return a.getTime() == b.getTime();\\n\\n    var regexpA = a instanceof RegExp\\n      , regexpB = b instanceof RegExp;\\n    if (regexpA != regexpB) return false;\\n    if (regexpA && regexpB) return a.toString() == b.toString();\\n\\n    var keys = keyList(a);\\n    length = keys.length;\\n\\n    if (length !== keyList(b).length)\\n      return false;\\n\\n    for (i = length; i-- !== 0;)\\n      if (!hasProp.call(b, keys[i])) return false;\\n\\n    for (i = length; i-- !== 0;) {\\n      key = keys[i];\\n      if (!equal(a[key], b[key])) return false;\\n    }\\n\\n    return true;\\n  }\\n\\n  return a!==a && b!==b;\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/fast-deep-equal/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/fetch-ponyfill/build/fetch-browser.js\":\n/*!*************************************************************!*\\\n  !*** ../node_modules/fetch-ponyfill/build/fetch-browser.js ***!\n  \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_RESULT__;(function (self) {\\n  'use strict';\\n\\n  function fetchPonyfill(options) {\\n    var Promise = options && options.Promise || self.Promise;\\n    var XMLHttpRequest = options && options.XMLHttpRequest || self.XMLHttpRequest;\\n    var global = self;\\n\\n    return (function () {\\n      var self = Object.create(global, {\\n        fetch: {\\n          value: undefined,\\n          writable: true\\n        }\\n      });\\n\\n      (function(self) {\\n        'use strict';\\n\\n        if (self.fetch) {\\n          return\\n        }\\n\\n        var support = {\\n          searchParams: 'URLSearchParams' in self,\\n          iterable: 'Symbol' in self && 'iterator' in Symbol,\\n          blob: 'FileReader' in self && 'Blob' in self && (function() {\\n            try {\\n              new Blob()\\n              return true\\n            } catch(e) {\\n              return false\\n            }\\n          })(),\\n          formData: 'FormData' in self,\\n          arrayBuffer: 'ArrayBuffer' in self\\n        }\\n\\n        if (support.arrayBuffer) {\\n          var viewClasses = [\\n            '[object Int8Array]',\\n            '[object Uint8Array]',\\n            '[object Uint8ClampedArray]',\\n            '[object Int16Array]',\\n            '[object Uint16Array]',\\n            '[object Int32Array]',\\n            '[object Uint32Array]',\\n            '[object Float32Array]',\\n            '[object Float64Array]'\\n          ]\\n\\n          var isDataView = function(obj) {\\n            return obj && DataView.prototype.isPrototypeOf(obj)\\n          }\\n\\n          var isArrayBufferView = ArrayBuffer.isView || function(obj) {\\n            return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\\n          }\\n        }\\n\\n        function normalizeName(name) {\\n          if (typeof name !== 'string') {\\n            name = String(name)\\n          }\\n          if (/[^a-z0-9\\\\-#$%&'*+.\\\\^_`|~]/i.test(name)) {\\n            throw new TypeError('Invalid character in header field name')\\n          }\\n          return name.toLowerCase()\\n        }\\n\\n        function normalizeValue(value) {\\n          if (typeof value !== 'string') {\\n            value = String(value)\\n          }\\n          return value\\n        }\\n\\n        // Build a destructive iterator for the value list\\n        function iteratorFor(items) {\\n          var iterator = {\\n            next: function() {\\n              var value = items.shift()\\n              return {done: value === undefined, value: value}\\n            }\\n          }\\n\\n          if (support.iterable) {\\n            iterator[Symbol.iterator] = function() {\\n              return iterator\\n            }\\n          }\\n\\n          return iterator\\n        }\\n\\n        function Headers(headers) {\\n          this.map = {}\\n\\n          if (headers instanceof Headers) {\\n            headers.forEach(function(value, name) {\\n              this.append(name, value)\\n            }, this)\\n          } else if (Array.isArray(headers)) {\\n            headers.forEach(function(header) {\\n              this.append(header[0], header[1])\\n            }, this)\\n          } else if (headers) {\\n            Object.getOwnPropertyNames(headers).forEach(function(name) {\\n              this.append(name, headers[name])\\n            }, this)\\n          }\\n        }\\n\\n        Headers.prototype.append = function(name, value) {\\n          name = normalizeName(name)\\n          value = normalizeValue(value)\\n          var oldValue = this.map[name]\\n          this.map[name] = oldValue ? oldValue+','+value : value\\n        }\\n\\n        Headers.prototype['delete'] = function(name) {\\n          delete this.map[normalizeName(name)]\\n        }\\n\\n        Headers.prototype.get = function(name) {\\n          name = normalizeName(name)\\n          return this.has(name) ? this.map[name] : null\\n        }\\n\\n        Headers.prototype.has = function(name) {\\n          return this.map.hasOwnProperty(normalizeName(name))\\n        }\\n\\n        Headers.prototype.set = function(name, value) {\\n          this.map[normalizeName(name)] = normalizeValue(value)\\n        }\\n\\n        Headers.prototype.forEach = function(callback, thisArg) {\\n          for (var name in this.map) {\\n            if (this.map.hasOwnProperty(name)) {\\n              callback.call(thisArg, this.map[name], name, this)\\n            }\\n          }\\n        }\\n\\n        Headers.prototype.keys = function() {\\n          var items = []\\n          this.forEach(function(value, name) { items.push(name) })\\n          return iteratorFor(items)\\n        }\\n\\n        Headers.prototype.values = function() {\\n          var items = []\\n          this.forEach(function(value) { items.push(value) })\\n          return iteratorFor(items)\\n        }\\n\\n        Headers.prototype.entries = function() {\\n          var items = []\\n          this.forEach(function(value, name) { items.push([name, value]) })\\n          return iteratorFor(items)\\n        }\\n\\n        if (support.iterable) {\\n          Headers.prototype[Symbol.iterator] = Headers.prototype.entries\\n        }\\n\\n        function consumed(body) {\\n          if (body.bodyUsed) {\\n            return Promise.reject(new TypeError('Already read'))\\n          }\\n          body.bodyUsed = true\\n        }\\n\\n        function fileReaderReady(reader) {\\n          return new Promise(function(resolve, reject) {\\n            reader.onload = function() {\\n              resolve(reader.result)\\n            }\\n            reader.onerror = function() {\\n              reject(reader.error)\\n            }\\n          })\\n        }\\n\\n        function readBlobAsArrayBuffer(blob) {\\n          var reader = new FileReader()\\n          var promise = fileReaderReady(reader)\\n          reader.readAsArrayBuffer(blob)\\n          return promise\\n        }\\n\\n        function readBlobAsText(blob) {\\n          var reader = new FileReader()\\n          var promise = fileReaderReady(reader)\\n          reader.readAsText(blob)\\n          return promise\\n        }\\n\\n        function readArrayBufferAsText(buf) {\\n          var view = new Uint8Array(buf)\\n          var chars = new Array(view.length)\\n\\n          for (var i = 0; i < view.length; i++) {\\n            chars[i] = String.fromCharCode(view[i])\\n          }\\n          return chars.join('')\\n        }\\n\\n        function bufferClone(buf) {\\n          if (buf.slice) {\\n            return buf.slice(0)\\n          } else {\\n            var view = new Uint8Array(buf.byteLength)\\n            view.set(new Uint8Array(buf))\\n            return view.buffer\\n          }\\n        }\\n\\n        function Body() {\\n          this.bodyUsed = false\\n\\n          this._initBody = function(body) {\\n            this._bodyInit = body\\n            if (!body) {\\n              this._bodyText = ''\\n            } else if (typeof body === 'string') {\\n              this._bodyText = body\\n            } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\\n              this._bodyBlob = body\\n            } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\\n              this._bodyFormData = body\\n            } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\\n              this._bodyText = body.toString()\\n            } else if (support.arrayBuffer && support.blob && isDataView(body)) {\\n              this._bodyArrayBuffer = bufferClone(body.buffer)\\n              // IE 10-11 can't handle a DataView body.\\n              this._bodyInit = new Blob([this._bodyArrayBuffer])\\n            } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\\n              this._bodyArrayBuffer = bufferClone(body)\\n            } else {\\n              throw new Error('unsupported BodyInit type')\\n            }\\n\\n            if (!this.headers.get('content-type')) {\\n              if (typeof body === 'string') {\\n                this.headers.set('content-type', 'text/plain;charset=UTF-8')\\n              } else if (this._bodyBlob && this._bodyBlob.type) {\\n                this.headers.set('content-type', this._bodyBlob.type)\\n              } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\\n                this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\\n              }\\n            }\\n          }\\n\\n          if (support.blob) {\\n            this.blob = function() {\\n              var rejected = consumed(this)\\n              if (rejected) {\\n                return rejected\\n              }\\n\\n              if (this._bodyBlob) {\\n                return Promise.resolve(this._bodyBlob)\\n              } else if (this._bodyArrayBuffer) {\\n                return Promise.resolve(new Blob([this._bodyArrayBuffer]))\\n              } else if (this._bodyFormData) {\\n                throw new Error('could not read FormData body as blob')\\n              } else {\\n                return Promise.resolve(new Blob([this._bodyText]))\\n              }\\n            }\\n\\n            this.arrayBuffer = function() {\\n              if (this._bodyArrayBuffer) {\\n                return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\\n              } else {\\n                return this.blob().then(readBlobAsArrayBuffer)\\n              }\\n            }\\n          }\\n\\n          this.text = function() {\\n            var rejected = consumed(this)\\n            if (rejected) {\\n              return rejected\\n            }\\n\\n            if (this._bodyBlob) {\\n              return readBlobAsText(this._bodyBlob)\\n            } else if (this._bodyArrayBuffer) {\\n              return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\\n            } else if (this._bodyFormData) {\\n              throw new Error('could not read FormData body as text')\\n            } else {\\n              return Promise.resolve(this._bodyText)\\n            }\\n          }\\n\\n          if (support.formData) {\\n            this.formData = function() {\\n              return this.text().then(decode)\\n            }\\n          }\\n\\n          this.json = function() {\\n            return this.text().then(JSON.parse)\\n          }\\n\\n          return this\\n        }\\n\\n        // HTTP methods whose capitalization should be normalized\\n        var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\\n\\n        function normalizeMethod(method) {\\n          var upcased = method.toUpperCase()\\n          return (methods.indexOf(upcased) > -1) ? upcased : method\\n        }\\n\\n        function Request(input, options) {\\n          options = options || {}\\n          var body = options.body\\n\\n          if (input instanceof Request) {\\n            if (input.bodyUsed) {\\n              throw new TypeError('Already read')\\n            }\\n            this.url = input.url\\n            this.credentials = input.credentials\\n            if (!options.headers) {\\n              this.headers = new Headers(input.headers)\\n            }\\n            this.method = input.method\\n            this.mode = input.mode\\n            if (!body && input._bodyInit != null) {\\n              body = input._bodyInit\\n              input.bodyUsed = true\\n            }\\n          } else {\\n            this.url = String(input)\\n          }\\n\\n          this.credentials = options.credentials || this.credentials || 'omit'\\n          if (options.headers || !this.headers) {\\n            this.headers = new Headers(options.headers)\\n          }\\n          this.method = normalizeMethod(options.method || this.method || 'GET')\\n          this.mode = options.mode || this.mode || null\\n          this.referrer = null\\n\\n          if ((this.method === 'GET' || this.method === 'HEAD') && body) {\\n            throw new TypeError('Body not allowed for GET or HEAD requests')\\n          }\\n          this._initBody(body)\\n        }\\n\\n        Request.prototype.clone = function() {\\n          return new Request(this, { body: this._bodyInit })\\n        }\\n\\n        function decode(body) {\\n          var form = new FormData()\\n          body.trim().split('&').forEach(function(bytes) {\\n            if (bytes) {\\n              var split = bytes.split('=')\\n              var name = split.shift().replace(/\\\\+/g, ' ')\\n              var value = split.join('=').replace(/\\\\+/g, ' ')\\n              form.append(decodeURIComponent(name), decodeURIComponent(value))\\n            }\\n          })\\n          return form\\n        }\\n\\n        function parseHeaders(rawHeaders) {\\n          var headers = new Headers()\\n          // Replace instances of \\\\r\\\\n and \\\\n followed by at least one space or horizontal tab with a space\\n          // https://tools.ietf.org/html/rfc7230#section-3.2\\n          var preProcessedHeaders = rawHeaders.replace(/\\\\r?\\\\n[\\\\t ]+/g, ' ')\\n          preProcessedHeaders.split(/\\\\r?\\\\n/).forEach(function(line) {\\n            var parts = line.split(':')\\n            var key = parts.shift().trim()\\n            if (key) {\\n              var value = parts.join(':').trim()\\n              headers.append(key, value)\\n            }\\n          })\\n          return headers\\n        }\\n\\n        Body.call(Request.prototype)\\n\\n        function Response(bodyInit, options) {\\n          if (!options) {\\n            options = {}\\n          }\\n\\n          this.type = 'default'\\n          this.status = options.status === undefined ? 200 : options.status\\n          this.ok = this.status >= 200 && this.status < 300\\n          this.statusText = 'statusText' in options ? options.statusText : 'OK'\\n          this.headers = new Headers(options.headers)\\n          this.url = options.url || ''\\n          this._initBody(bodyInit)\\n        }\\n\\n        Body.call(Response.prototype)\\n\\n        Response.prototype.clone = function() {\\n          return new Response(this._bodyInit, {\\n            status: this.status,\\n            statusText: this.statusText,\\n            headers: new Headers(this.headers),\\n            url: this.url\\n          })\\n        }\\n\\n        Response.error = function() {\\n          var response = new Response(null, {status: 0, statusText: ''})\\n          response.type = 'error'\\n          return response\\n        }\\n\\n        var redirectStatuses = [301, 302, 303, 307, 308]\\n\\n        Response.redirect = function(url, status) {\\n          if (redirectStatuses.indexOf(status) === -1) {\\n            throw new RangeError('Invalid status code')\\n          }\\n\\n          return new Response(null, {status: status, headers: {location: url}})\\n        }\\n\\n        self.Headers = Headers\\n        self.Request = Request\\n        self.Response = Response\\n\\n        self.fetch = function(input, init) {\\n          return new Promise(function(resolve, reject) {\\n            var request = new Request(input, init)\\n            var xhr = new XMLHttpRequest()\\n\\n            xhr.onload = function() {\\n              var options = {\\n                status: xhr.status,\\n                statusText: xhr.statusText,\\n                headers: parseHeaders(xhr.getAllResponseHeaders() || '')\\n              }\\n              options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\\n              var body = 'response' in xhr ? xhr.response : xhr.responseText\\n              resolve(new Response(body, options))\\n            }\\n\\n            xhr.onerror = function() {\\n              reject(new TypeError('Network request failed'))\\n            }\\n\\n            xhr.ontimeout = function() {\\n              reject(new TypeError('Network request failed'))\\n            }\\n\\n            xhr.open(request.method, request.url, true)\\n\\n            if (request.credentials === 'include') {\\n              xhr.withCredentials = true\\n            } else if (request.credentials === 'omit') {\\n              xhr.withCredentials = false\\n            }\\n\\n            if ('responseType' in xhr && support.blob) {\\n              xhr.responseType = 'blob'\\n            }\\n\\n            request.headers.forEach(function(value, name) {\\n              xhr.setRequestHeader(name, value)\\n            })\\n\\n            xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\\n          })\\n        }\\n        self.fetch.polyfill = true\\n      })(typeof self !== 'undefined' ? self : this);\\n\\n\\n      return {\\n        fetch: self.fetch,\\n        Headers: self.Headers,\\n        Request: self.Request,\\n        Response: self.Response\\n      };\\n    }());\\n  }\\n\\n  if (true) {\\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\\n      return fetchPonyfill;\\n    }).call(exports, __webpack_require__, exports, module),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n  } else {}\\n}(typeof self !== 'undefined' ? self : typeof global !== 'undefined' ? global : this));\\n\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/fetch-ponyfill/build/fetch-browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/global/document.js\":\n/*!******************************************!*\\\n  !*** ../node_modules/global/document.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global :\\n    typeof window !== 'undefined' ? window : {}\\nvar minDoc = __webpack_require__(/*! min-document */ 1);\\n\\nvar doccy;\\n\\nif (typeof document !== 'undefined') {\\n    doccy = document;\\n} else {\\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\\n\\n    if (!doccy) {\\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\\n    }\\n}\\n\\nmodule.exports = doccy;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/global/document.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/global/window.js\":\n/*!****************************************!*\\\n  !*** ../node_modules/global/window.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {var win;\\n\\nif (typeof window !== \\\"undefined\\\") {\\n    win = window;\\n} else if (typeof global !== \\\"undefined\\\") {\\n    win = global;\\n} else if (typeof self !== \\\"undefined\\\"){\\n    win = self;\\n} else {\\n    win = {};\\n}\\n\\nmodule.exports = win;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/global/window.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/ieee754/index.js\":\n/*!****************************************!*\\\n  !*** ../node_modules/ieee754/index.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"exports.read = function (buffer, offset, isLE, mLen, nBytes) {\\n  var e, m\\n  var eLen = (nBytes * 8) - mLen - 1\\n  var eMax = (1 << eLen) - 1\\n  var eBias = eMax >> 1\\n  var nBits = -7\\n  var i = isLE ? (nBytes - 1) : 0\\n  var d = isLE ? -1 : 1\\n  var s = buffer[offset + i]\\n\\n  i += d\\n\\n  e = s & ((1 << (-nBits)) - 1)\\n  s >>= (-nBits)\\n  nBits += eLen\\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\\n\\n  m = e & ((1 << (-nBits)) - 1)\\n  e >>= (-nBits)\\n  nBits += mLen\\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\\n\\n  if (e === 0) {\\n    e = 1 - eBias\\n  } else if (e === eMax) {\\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\\n  } else {\\n    m = m + Math.pow(2, mLen)\\n    e = e - eBias\\n  }\\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\\n}\\n\\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\\n  var e, m, c\\n  var eLen = (nBytes * 8) - mLen - 1\\n  var eMax = (1 << eLen) - 1\\n  var eBias = eMax >> 1\\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\\n  var i = isLE ? 0 : (nBytes - 1)\\n  var d = isLE ? 1 : -1\\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\\n\\n  value = Math.abs(value)\\n\\n  if (isNaN(value) || value === Infinity) {\\n    m = isNaN(value) ? 1 : 0\\n    e = eMax\\n  } else {\\n    e = Math.floor(Math.log(value) / Math.LN2)\\n    if (value * (c = Math.pow(2, -e)) < 1) {\\n      e--\\n      c *= 2\\n    }\\n    if (e + eBias >= 1) {\\n      value += rt / c\\n    } else {\\n      value += rt * Math.pow(2, 1 - eBias)\\n    }\\n    if (value * c >= 2) {\\n      e++\\n      c /= 2\\n    }\\n\\n    if (e + eBias >= eMax) {\\n      m = 0\\n      e = eMax\\n    } else if (e + eBias >= 1) {\\n      m = ((value * c) - 1) * Math.pow(2, mLen)\\n      e = e + eBias\\n    } else {\\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\\n      e = 0\\n    }\\n  }\\n\\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\\n\\n  e = (e << mLen) | m\\n  eLen += mLen\\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\\n\\n  buffer[offset + i - d] |= s * 128\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/ieee754/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/node_modules/sax/lib/sax.js\":\n/*!********************************************************!*\\\n  !*** ../node_modules/imsc/node_modules/sax/lib/sax.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(Buffer) {;(function (sax) { // wrapper for non-node envs\\n  sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\\n  sax.SAXParser = SAXParser\\n  sax.SAXStream = SAXStream\\n  sax.createStream = createStream\\n\\n  // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\\n  // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\\n  // since that's the earliest that a buffer overrun could occur.  This way, checks are\\n  // as rare as required, but as often as necessary to ensure never crossing this bound.\\n  // Furthermore, buffers are only tested at most once per write(), so passing a very\\n  // large string into write() might have undesirable effects, but this is manageable by\\n  // the caller, so it is assumed to be safe.  Thus, a call to write() may, in the extreme\\n  // edge case, result in creating at most one complete copy of the string passed in.\\n  // Set to Infinity to have unlimited buffers.\\n  sax.MAX_BUFFER_LENGTH = 64 * 1024\\n\\n  var buffers = [\\n    'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\\n    'procInstName', 'procInstBody', 'entity', 'attribName',\\n    'attribValue', 'cdata', 'script'\\n  ]\\n\\n  sax.EVENTS = [\\n    'text',\\n    'processinginstruction',\\n    'sgmldeclaration',\\n    'doctype',\\n    'comment',\\n    'opentagstart',\\n    'attribute',\\n    'opentag',\\n    'closetag',\\n    'opencdata',\\n    'cdata',\\n    'closecdata',\\n    'error',\\n    'end',\\n    'ready',\\n    'script',\\n    'opennamespace',\\n    'closenamespace'\\n  ]\\n\\n  function SAXParser (strict, opt) {\\n    if (!(this instanceof SAXParser)) {\\n      return new SAXParser(strict, opt)\\n    }\\n\\n    var parser = this\\n    clearBuffers(parser)\\n    parser.q = parser.c = ''\\n    parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\\n    parser.opt = opt || {}\\n    parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\\n    parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\\n    parser.tags = []\\n    parser.closed = parser.closedRoot = parser.sawRoot = false\\n    parser.tag = parser.error = null\\n    parser.strict = !!strict\\n    parser.noscript = !!(strict || parser.opt.noscript)\\n    parser.state = S.BEGIN\\n    parser.strictEntities = parser.opt.strictEntities\\n    parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\\n    parser.attribList = []\\n\\n    // namespaces form a prototype chain.\\n    // it always points at the current tag,\\n    // which protos to its parent tag.\\n    if (parser.opt.xmlns) {\\n      parser.ns = Object.create(rootNS)\\n    }\\n\\n    // mostly just for error reporting\\n    parser.trackPosition = parser.opt.position !== false\\n    if (parser.trackPosition) {\\n      parser.position = parser.line = parser.column = 0\\n    }\\n    emit(parser, 'onready')\\n  }\\n\\n  if (!Object.create) {\\n    Object.create = function (o) {\\n      function F () {}\\n      F.prototype = o\\n      var newf = new F()\\n      return newf\\n    }\\n  }\\n\\n  if (!Object.keys) {\\n    Object.keys = function (o) {\\n      var a = []\\n      for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\\n      return a\\n    }\\n  }\\n\\n  function checkBufferLength (parser) {\\n    var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\\n    var maxActual = 0\\n    for (var i = 0, l = buffers.length; i < l; i++) {\\n      var len = parser[buffers[i]].length\\n      if (len > maxAllowed) {\\n        // Text/cdata nodes can get big, and since they're buffered,\\n        // we can get here under normal conditions.\\n        // Avoid issues by emitting the text node now,\\n        // so at least it won't get any bigger.\\n        switch (buffers[i]) {\\n          case 'textNode':\\n            closeText(parser)\\n            break\\n\\n          case 'cdata':\\n            emitNode(parser, 'oncdata', parser.cdata)\\n            parser.cdata = ''\\n            break\\n\\n          case 'script':\\n            emitNode(parser, 'onscript', parser.script)\\n            parser.script = ''\\n            break\\n\\n          default:\\n            error(parser, 'Max buffer length exceeded: ' + buffers[i])\\n        }\\n      }\\n      maxActual = Math.max(maxActual, len)\\n    }\\n    // schedule the next check for the earliest possible buffer overrun.\\n    var m = sax.MAX_BUFFER_LENGTH - maxActual\\n    parser.bufferCheckPosition = m + parser.position\\n  }\\n\\n  function clearBuffers (parser) {\\n    for (var i = 0, l = buffers.length; i < l; i++) {\\n      parser[buffers[i]] = ''\\n    }\\n  }\\n\\n  function flushBuffers (parser) {\\n    closeText(parser)\\n    if (parser.cdata !== '') {\\n      emitNode(parser, 'oncdata', parser.cdata)\\n      parser.cdata = ''\\n    }\\n    if (parser.script !== '') {\\n      emitNode(parser, 'onscript', parser.script)\\n      parser.script = ''\\n    }\\n  }\\n\\n  SAXParser.prototype = {\\n    end: function () { end(this) },\\n    write: write,\\n    resume: function () { this.error = null; return this },\\n    close: function () { return this.write(null) },\\n    flush: function () { flushBuffers(this) }\\n  }\\n\\n  var Stream\\n  try {\\n    Stream = __webpack_require__(/*! stream */ \\\"../node_modules/stream-browserify/index.js\\\").Stream\\n  } catch (ex) {\\n    Stream = function () {}\\n  }\\n\\n  var streamWraps = sax.EVENTS.filter(function (ev) {\\n    return ev !== 'error' && ev !== 'end'\\n  })\\n\\n  function createStream (strict, opt) {\\n    return new SAXStream(strict, opt)\\n  }\\n\\n  function SAXStream (strict, opt) {\\n    if (!(this instanceof SAXStream)) {\\n      return new SAXStream(strict, opt)\\n    }\\n\\n    Stream.apply(this)\\n\\n    this._parser = new SAXParser(strict, opt)\\n    this.writable = true\\n    this.readable = true\\n\\n    var me = this\\n\\n    this._parser.onend = function () {\\n      me.emit('end')\\n    }\\n\\n    this._parser.onerror = function (er) {\\n      me.emit('error', er)\\n\\n      // if didn't throw, then means error was handled.\\n      // go ahead and clear error, so we can write again.\\n      me._parser.error = null\\n    }\\n\\n    this._decoder = null\\n\\n    streamWraps.forEach(function (ev) {\\n      Object.defineProperty(me, 'on' + ev, {\\n        get: function () {\\n          return me._parser['on' + ev]\\n        },\\n        set: function (h) {\\n          if (!h) {\\n            me.removeAllListeners(ev)\\n            me._parser['on' + ev] = h\\n            return h\\n          }\\n          me.on(ev, h)\\n        },\\n        enumerable: true,\\n        configurable: false\\n      })\\n    })\\n  }\\n\\n  SAXStream.prototype = Object.create(Stream.prototype, {\\n    constructor: {\\n      value: SAXStream\\n    }\\n  })\\n\\n  SAXStream.prototype.write = function (data) {\\n    if (typeof Buffer === 'function' &&\\n      typeof Buffer.isBuffer === 'function' &&\\n      Buffer.isBuffer(data)) {\\n      if (!this._decoder) {\\n        var SD = __webpack_require__(/*! string_decoder */ \\\"../node_modules/string_decoder/lib/string_decoder.js\\\").StringDecoder\\n        this._decoder = new SD('utf8')\\n      }\\n      data = this._decoder.write(data)\\n    }\\n\\n    this._parser.write(data.toString())\\n    this.emit('data', data)\\n    return true\\n  }\\n\\n  SAXStream.prototype.end = function (chunk) {\\n    if (chunk && chunk.length) {\\n      this.write(chunk)\\n    }\\n    this._parser.end()\\n    return true\\n  }\\n\\n  SAXStream.prototype.on = function (ev, handler) {\\n    var me = this\\n    if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\\n      me._parser['on' + ev] = function () {\\n        var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\\n        args.splice(0, 0, ev)\\n        me.emit.apply(me, args)\\n      }\\n    }\\n\\n    return Stream.prototype.on.call(me, ev, handler)\\n  }\\n\\n  // character classes and tokens\\n  var whitespace = '\\\\r\\\\n\\\\t '\\n\\n  // this really needs to be replaced with character classes.\\n  // XML allows all manner of ridiculous numbers and digits.\\n  var number = '0124356789'\\n  var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\\n\\n  // (Letter | \\\"_\\\" | \\\":\\\")\\n  var quote = '\\\\'\\\"'\\n  var attribEnd = whitespace + '>'\\n  var CDATA = '[CDATA['\\n  var DOCTYPE = 'DOCTYPE'\\n  var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\\n  var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\\n  var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\\n\\n  // turn all the string character sets into character class objects.\\n  whitespace = charClass(whitespace)\\n  number = charClass(number)\\n  letter = charClass(letter)\\n\\n  // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\\n  // This implementation works on strings, a single character at a time\\n  // as such, it cannot ever support astral-plane characters (10000-EFFFF)\\n  // without a significant breaking change to either this  parser, or the\\n  // JavaScript language.  Implementation of an emoji-capable xml parser\\n  // is left as an exercise for the reader.\\n  var nameStart = /[:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/\\n\\n  var nameBody = /[:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\\\\.\\\\d-]/\\n\\n  var entityStart = /[#:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/\\n  var entityBody = /[#:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\\\\.\\\\d-]/\\n\\n  quote = charClass(quote)\\n  attribEnd = charClass(attribEnd)\\n\\n  function charClass (str) {\\n    return str.split('').reduce(function (s, c) {\\n      s[c] = true\\n      return s\\n    }, {})\\n  }\\n\\n  function isRegExp (c) {\\n    return Object.prototype.toString.call(c) === '[object RegExp]'\\n  }\\n\\n  function is (charclass, c) {\\n    return isRegExp(charclass) ? !!c.match(charclass) : charclass[c]\\n  }\\n\\n  function not (charclass, c) {\\n    return !is(charclass, c)\\n  }\\n\\n  var S = 0\\n  sax.STATE = {\\n    BEGIN: S++, // leading byte order mark or whitespace\\n    BEGIN_WHITESPACE: S++, // leading whitespace\\n    TEXT: S++, // general stuff\\n    TEXT_ENTITY: S++, // &amp and such.\\n    OPEN_WAKA: S++, // <\\n    SGML_DECL: S++, // <!BLARG\\n    SGML_DECL_QUOTED: S++, // <!BLARG foo \\\"bar\\n    DOCTYPE: S++, // <!DOCTYPE\\n    DOCTYPE_QUOTED: S++, // <!DOCTYPE \\\"//blah\\n    DOCTYPE_DTD: S++, // <!DOCTYPE \\\"//blah\\\" [ ...\\n    DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE \\\"//blah\\\" [ \\\"foo\\n    COMMENT_STARTING: S++, // <!-\\n    COMMENT: S++, // <!--\\n    COMMENT_ENDING: S++, // <!-- blah -\\n    COMMENT_ENDED: S++, // <!-- blah --\\n    CDATA: S++, // <![CDATA[ something\\n    CDATA_ENDING: S++, // ]\\n    CDATA_ENDING_2: S++, // ]]\\n    PROC_INST: S++, // <?hi\\n    PROC_INST_BODY: S++, // <?hi there\\n    PROC_INST_ENDING: S++, // <?hi \\\"there\\\" ?\\n    OPEN_TAG: S++, // <strong\\n    OPEN_TAG_SLASH: S++, // <strong /\\n    ATTRIB: S++, // <a\\n    ATTRIB_NAME: S++, // <a foo\\n    ATTRIB_NAME_SAW_WHITE: S++, // <a foo _\\n    ATTRIB_VALUE: S++, // <a foo=\\n    ATTRIB_VALUE_QUOTED: S++, // <a foo=\\\"bar\\n    ATTRIB_VALUE_CLOSED: S++, // <a foo=\\\"bar\\\"\\n    ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar\\n    ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar=\\\"&quot;\\\"\\n    ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot\\n    CLOSE_TAG: S++, // </a\\n    CLOSE_TAG_SAW_WHITE: S++, // </a   >\\n    SCRIPT: S++, // <script> ...\\n    SCRIPT_ENDING: S++ // <script> ... <\\n  }\\n\\n  sax.XML_ENTITIES = {\\n    'amp': '&',\\n    'gt': '>',\\n    'lt': '<',\\n    'quot': '\\\"',\\n    'apos': \\\"'\\\"\\n  }\\n\\n  sax.ENTITIES = {\\n    'amp': '&',\\n    'gt': '>',\\n    'lt': '<',\\n    'quot': '\\\"',\\n    'apos': \\\"'\\\",\\n    'AElig': 198,\\n    'Aacute': 193,\\n    'Acirc': 194,\\n    'Agrave': 192,\\n    'Aring': 197,\\n    'Atilde': 195,\\n    'Auml': 196,\\n    'Ccedil': 199,\\n    'ETH': 208,\\n    'Eacute': 201,\\n    'Ecirc': 202,\\n    'Egrave': 200,\\n    'Euml': 203,\\n    'Iacute': 205,\\n    'Icirc': 206,\\n    'Igrave': 204,\\n    'Iuml': 207,\\n    'Ntilde': 209,\\n    'Oacute': 211,\\n    'Ocirc': 212,\\n    'Ograve': 210,\\n    'Oslash': 216,\\n    'Otilde': 213,\\n    'Ouml': 214,\\n    'THORN': 222,\\n    'Uacute': 218,\\n    'Ucirc': 219,\\n    'Ugrave': 217,\\n    'Uuml': 220,\\n    'Yacute': 221,\\n    'aacute': 225,\\n    'acirc': 226,\\n    'aelig': 230,\\n    'agrave': 224,\\n    'aring': 229,\\n    'atilde': 227,\\n    'auml': 228,\\n    'ccedil': 231,\\n    'eacute': 233,\\n    'ecirc': 234,\\n    'egrave': 232,\\n    'eth': 240,\\n    'euml': 235,\\n    'iacute': 237,\\n    'icirc': 238,\\n    'igrave': 236,\\n    'iuml': 239,\\n    'ntilde': 241,\\n    'oacute': 243,\\n    'ocirc': 244,\\n    'ograve': 242,\\n    'oslash': 248,\\n    'otilde': 245,\\n    'ouml': 246,\\n    'szlig': 223,\\n    'thorn': 254,\\n    'uacute': 250,\\n    'ucirc': 251,\\n    'ugrave': 249,\\n    'uuml': 252,\\n    'yacute': 253,\\n    'yuml': 255,\\n    'copy': 169,\\n    'reg': 174,\\n    'nbsp': 160,\\n    'iexcl': 161,\\n    'cent': 162,\\n    'pound': 163,\\n    'curren': 164,\\n    'yen': 165,\\n    'brvbar': 166,\\n    'sect': 167,\\n    'uml': 168,\\n    'ordf': 170,\\n    'laquo': 171,\\n    'not': 172,\\n    'shy': 173,\\n    'macr': 175,\\n    'deg': 176,\\n    'plusmn': 177,\\n    'sup1': 185,\\n    'sup2': 178,\\n    'sup3': 179,\\n    'acute': 180,\\n    'micro': 181,\\n    'para': 182,\\n    'middot': 183,\\n    'cedil': 184,\\n    'ordm': 186,\\n    'raquo': 187,\\n    'frac14': 188,\\n    'frac12': 189,\\n    'frac34': 190,\\n    'iquest': 191,\\n    'times': 215,\\n    'divide': 247,\\n    'OElig': 338,\\n    'oelig': 339,\\n    'Scaron': 352,\\n    'scaron': 353,\\n    'Yuml': 376,\\n    'fnof': 402,\\n    'circ': 710,\\n    'tilde': 732,\\n    'Alpha': 913,\\n    'Beta': 914,\\n    'Gamma': 915,\\n    'Delta': 916,\\n    'Epsilon': 917,\\n    'Zeta': 918,\\n    'Eta': 919,\\n    'Theta': 920,\\n    'Iota': 921,\\n    'Kappa': 922,\\n    'Lambda': 923,\\n    'Mu': 924,\\n    'Nu': 925,\\n    'Xi': 926,\\n    'Omicron': 927,\\n    'Pi': 928,\\n    'Rho': 929,\\n    'Sigma': 931,\\n    'Tau': 932,\\n    'Upsilon': 933,\\n    'Phi': 934,\\n    'Chi': 935,\\n    'Psi': 936,\\n    'Omega': 937,\\n    'alpha': 945,\\n    'beta': 946,\\n    'gamma': 947,\\n    'delta': 948,\\n    'epsilon': 949,\\n    'zeta': 950,\\n    'eta': 951,\\n    'theta': 952,\\n    'iota': 953,\\n    'kappa': 954,\\n    'lambda': 955,\\n    'mu': 956,\\n    'nu': 957,\\n    'xi': 958,\\n    'omicron': 959,\\n    'pi': 960,\\n    'rho': 961,\\n    'sigmaf': 962,\\n    'sigma': 963,\\n    'tau': 964,\\n    'upsilon': 965,\\n    'phi': 966,\\n    'chi': 967,\\n    'psi': 968,\\n    'omega': 969,\\n    'thetasym': 977,\\n    'upsih': 978,\\n    'piv': 982,\\n    'ensp': 8194,\\n    'emsp': 8195,\\n    'thinsp': 8201,\\n    'zwnj': 8204,\\n    'zwj': 8205,\\n    'lrm': 8206,\\n    'rlm': 8207,\\n    'ndash': 8211,\\n    'mdash': 8212,\\n    'lsquo': 8216,\\n    'rsquo': 8217,\\n    'sbquo': 8218,\\n    'ldquo': 8220,\\n    'rdquo': 8221,\\n    'bdquo': 8222,\\n    'dagger': 8224,\\n    'Dagger': 8225,\\n    'bull': 8226,\\n    'hellip': 8230,\\n    'permil': 8240,\\n    'prime': 8242,\\n    'Prime': 8243,\\n    'lsaquo': 8249,\\n    'rsaquo': 8250,\\n    'oline': 8254,\\n    'frasl': 8260,\\n    'euro': 8364,\\n    'image': 8465,\\n    'weierp': 8472,\\n    'real': 8476,\\n    'trade': 8482,\\n    'alefsym': 8501,\\n    'larr': 8592,\\n    'uarr': 8593,\\n    'rarr': 8594,\\n    'darr': 8595,\\n    'harr': 8596,\\n    'crarr': 8629,\\n    'lArr': 8656,\\n    'uArr': 8657,\\n    'rArr': 8658,\\n    'dArr': 8659,\\n    'hArr': 8660,\\n    'forall': 8704,\\n    'part': 8706,\\n    'exist': 8707,\\n    'empty': 8709,\\n    'nabla': 8711,\\n    'isin': 8712,\\n    'notin': 8713,\\n    'ni': 8715,\\n    'prod': 8719,\\n    'sum': 8721,\\n    'minus': 8722,\\n    'lowast': 8727,\\n    'radic': 8730,\\n    'prop': 8733,\\n    'infin': 8734,\\n    'ang': 8736,\\n    'and': 8743,\\n    'or': 8744,\\n    'cap': 8745,\\n    'cup': 8746,\\n    'int': 8747,\\n    'there4': 8756,\\n    'sim': 8764,\\n    'cong': 8773,\\n    'asymp': 8776,\\n    'ne': 8800,\\n    'equiv': 8801,\\n    'le': 8804,\\n    'ge': 8805,\\n    'sub': 8834,\\n    'sup': 8835,\\n    'nsub': 8836,\\n    'sube': 8838,\\n    'supe': 8839,\\n    'oplus': 8853,\\n    'otimes': 8855,\\n    'perp': 8869,\\n    'sdot': 8901,\\n    'lceil': 8968,\\n    'rceil': 8969,\\n    'lfloor': 8970,\\n    'rfloor': 8971,\\n    'lang': 9001,\\n    'rang': 9002,\\n    'loz': 9674,\\n    'spades': 9824,\\n    'clubs': 9827,\\n    'hearts': 9829,\\n    'diams': 9830\\n  }\\n\\n  Object.keys(sax.ENTITIES).forEach(function (key) {\\n    var e = sax.ENTITIES[key]\\n    var s = typeof e === 'number' ? String.fromCharCode(e) : e\\n    sax.ENTITIES[key] = s\\n  })\\n\\n  for (var s in sax.STATE) {\\n    sax.STATE[sax.STATE[s]] = s\\n  }\\n\\n  // shorthand\\n  S = sax.STATE\\n\\n  function emit (parser, event, data) {\\n    parser[event] && parser[event](data)\\n  }\\n\\n  function emitNode (parser, nodeType, data) {\\n    if (parser.textNode) closeText(parser)\\n    emit(parser, nodeType, data)\\n  }\\n\\n  function closeText (parser) {\\n    parser.textNode = textopts(parser.opt, parser.textNode)\\n    if (parser.textNode) emit(parser, 'ontext', parser.textNode)\\n    parser.textNode = ''\\n  }\\n\\n  function textopts (opt, text) {\\n    if (opt.trim) text = text.trim()\\n    if (opt.normalize) text = text.replace(/\\\\s+/g, ' ')\\n    return text\\n  }\\n\\n  function error (parser, er) {\\n    closeText(parser)\\n    if (parser.trackPosition) {\\n      er += '\\\\nLine: ' + parser.line +\\n        '\\\\nColumn: ' + parser.column +\\n        '\\\\nChar: ' + parser.c\\n    }\\n    er = new Error(er)\\n    parser.error = er\\n    emit(parser, 'onerror', er)\\n    return parser\\n  }\\n\\n  function end (parser) {\\n    if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')\\n    if ((parser.state !== S.BEGIN) &&\\n      (parser.state !== S.BEGIN_WHITESPACE) &&\\n      (parser.state !== S.TEXT)) {\\n      error(parser, 'Unexpected end')\\n    }\\n    closeText(parser)\\n    parser.c = ''\\n    parser.closed = true\\n    emit(parser, 'onend')\\n    SAXParser.call(parser, parser.strict, parser.opt)\\n    return parser\\n  }\\n\\n  function strictFail (parser, message) {\\n    if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {\\n      throw new Error('bad call to strictFail')\\n    }\\n    if (parser.strict) {\\n      error(parser, message)\\n    }\\n  }\\n\\n  function newTag (parser) {\\n    if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()\\n    var parent = parser.tags[parser.tags.length - 1] || parser\\n    var tag = parser.tag = { name: parser.tagName, attributes: {} }\\n\\n    // will be overridden if tag contails an xmlns=\\\"foo\\\" or xmlns:foo=\\\"bar\\\"\\n    if (parser.opt.xmlns) {\\n      tag.ns = parent.ns\\n    }\\n    parser.attribList.length = 0\\n    emitNode(parser, 'onopentagstart', tag)\\n  }\\n\\n  function qname (name, attribute) {\\n    var i = name.indexOf(':')\\n    var qualName = i < 0 ? [ '', name ] : name.split(':')\\n    var prefix = qualName[0]\\n    var local = qualName[1]\\n\\n    // <x \\\"xmlns\\\"=\\\"http://foo\\\">\\n    if (attribute && name === 'xmlns') {\\n      prefix = 'xmlns'\\n      local = ''\\n    }\\n\\n    return { prefix: prefix, local: local }\\n  }\\n\\n  function attrib (parser) {\\n    if (!parser.strict) {\\n      parser.attribName = parser.attribName[parser.looseCase]()\\n    }\\n\\n    if (parser.attribList.indexOf(parser.attribName) !== -1 ||\\n      parser.tag.attributes.hasOwnProperty(parser.attribName)) {\\n      parser.attribName = parser.attribValue = ''\\n      return\\n    }\\n\\n    if (parser.opt.xmlns) {\\n      var qn = qname(parser.attribName, true)\\n      var prefix = qn.prefix\\n      var local = qn.local\\n\\n      if (prefix === 'xmlns') {\\n        // namespace binding attribute. push the binding into scope\\n        if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {\\n          strictFail(parser,\\n            'xml: prefix must be bound to ' + XML_NAMESPACE + '\\\\n' +\\n            'Actual: ' + parser.attribValue)\\n        } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {\\n          strictFail(parser,\\n            'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\\\\n' +\\n            'Actual: ' + parser.attribValue)\\n        } else {\\n          var tag = parser.tag\\n          var parent = parser.tags[parser.tags.length - 1] || parser\\n          if (tag.ns === parent.ns) {\\n            tag.ns = Object.create(parent.ns)\\n          }\\n          tag.ns[local] = parser.attribValue\\n        }\\n      }\\n\\n      // defer onattribute events until all attributes have been seen\\n      // so any new bindings can take effect. preserve attribute order\\n      // so deferred events can be emitted in document order\\n      parser.attribList.push([parser.attribName, parser.attribValue])\\n    } else {\\n      // in non-xmlns mode, we can emit the event right away\\n      parser.tag.attributes[parser.attribName] = parser.attribValue\\n      emitNode(parser, 'onattribute', {\\n        name: parser.attribName,\\n        value: parser.attribValue\\n      })\\n    }\\n\\n    parser.attribName = parser.attribValue = ''\\n  }\\n\\n  function openTag (parser, selfClosing) {\\n    if (parser.opt.xmlns) {\\n      // emit namespace binding events\\n      var tag = parser.tag\\n\\n      // add namespace info to tag\\n      var qn = qname(parser.tagName)\\n      tag.prefix = qn.prefix\\n      tag.local = qn.local\\n      tag.uri = tag.ns[qn.prefix] || ''\\n\\n      if (tag.prefix && !tag.uri) {\\n        strictFail(parser, 'Unbound namespace prefix: ' +\\n          JSON.stringify(parser.tagName))\\n        tag.uri = qn.prefix\\n      }\\n\\n      var parent = parser.tags[parser.tags.length - 1] || parser\\n      if (tag.ns && parent.ns !== tag.ns) {\\n        Object.keys(tag.ns).forEach(function (p) {\\n          emitNode(parser, 'onopennamespace', {\\n            prefix: p,\\n            uri: tag.ns[p]\\n          })\\n        })\\n      }\\n\\n      // handle deferred onattribute events\\n      // Note: do not apply default ns to attributes:\\n      //   http://www.w3.org/TR/REC-xml-names/#defaulting\\n      for (var i = 0, l = parser.attribList.length; i < l; i++) {\\n        var nv = parser.attribList[i]\\n        var name = nv[0]\\n        var value = nv[1]\\n        var qualName = qname(name, true)\\n        var prefix = qualName.prefix\\n        var local = qualName.local\\n        var uri = prefix === '' ? '' : (tag.ns[prefix] || '')\\n        var a = {\\n          name: name,\\n          value: value,\\n          prefix: prefix,\\n          local: local,\\n          uri: uri\\n        }\\n\\n        // if there's any attributes with an undefined namespace,\\n        // then fail on them now.\\n        if (prefix && prefix !== 'xmlns' && !uri) {\\n          strictFail(parser, 'Unbound namespace prefix: ' +\\n            JSON.stringify(prefix))\\n          a.uri = prefix\\n        }\\n        parser.tag.attributes[name] = a\\n        emitNode(parser, 'onattribute', a)\\n      }\\n      parser.attribList.length = 0\\n    }\\n\\n    parser.tag.isSelfClosing = !!selfClosing\\n\\n    // process the tag\\n    parser.sawRoot = true\\n    parser.tags.push(parser.tag)\\n    emitNode(parser, 'onopentag', parser.tag)\\n    if (!selfClosing) {\\n      // special case for <script> in non-strict mode.\\n      if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {\\n        parser.state = S.SCRIPT\\n      } else {\\n        parser.state = S.TEXT\\n      }\\n      parser.tag = null\\n      parser.tagName = ''\\n    }\\n    parser.attribName = parser.attribValue = ''\\n    parser.attribList.length = 0\\n  }\\n\\n  function closeTag (parser) {\\n    if (!parser.tagName) {\\n      strictFail(parser, 'Weird empty close tag.')\\n      parser.textNode += '</>'\\n      parser.state = S.TEXT\\n      return\\n    }\\n\\n    if (parser.script) {\\n      if (parser.tagName !== 'script') {\\n        parser.script += '</' + parser.tagName + '>'\\n        parser.tagName = ''\\n        parser.state = S.SCRIPT\\n        return\\n      }\\n      emitNode(parser, 'onscript', parser.script)\\n      parser.script = ''\\n    }\\n\\n    // first make sure that the closing tag actually exists.\\n    // <a><b></c></b></a> will close everything, otherwise.\\n    var t = parser.tags.length\\n    var tagName = parser.tagName\\n    if (!parser.strict) {\\n      tagName = tagName[parser.looseCase]()\\n    }\\n    var closeTo = tagName\\n    while (t--) {\\n      var close = parser.tags[t]\\n      if (close.name !== closeTo) {\\n        // fail the first time in strict mode\\n        strictFail(parser, 'Unexpected close tag')\\n      } else {\\n        break\\n      }\\n    }\\n\\n    // didn't find it.  we already failed for strict, so just abort.\\n    if (t < 0) {\\n      strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)\\n      parser.textNode += '</' + parser.tagName + '>'\\n      parser.state = S.TEXT\\n      return\\n    }\\n    parser.tagName = tagName\\n    var s = parser.tags.length\\n    while (s-- > t) {\\n      var tag = parser.tag = parser.tags.pop()\\n      parser.tagName = parser.tag.name\\n      emitNode(parser, 'onclosetag', parser.tagName)\\n\\n      var x = {}\\n      for (var i in tag.ns) {\\n        x[i] = tag.ns[i]\\n      }\\n\\n      var parent = parser.tags[parser.tags.length - 1] || parser\\n      if (parser.opt.xmlns && tag.ns !== parent.ns) {\\n        // remove namespace bindings introduced by tag\\n        Object.keys(tag.ns).forEach(function (p) {\\n          var n = tag.ns[p]\\n          emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })\\n        })\\n      }\\n    }\\n    if (t === 0) parser.closedRoot = true\\n    parser.tagName = parser.attribValue = parser.attribName = ''\\n    parser.attribList.length = 0\\n    parser.state = S.TEXT\\n  }\\n\\n  function parseEntity (parser) {\\n    var entity = parser.entity\\n    var entityLC = entity.toLowerCase()\\n    var num\\n    var numStr = ''\\n\\n    if (parser.ENTITIES[entity]) {\\n      return parser.ENTITIES[entity]\\n    }\\n    if (parser.ENTITIES[entityLC]) {\\n      return parser.ENTITIES[entityLC]\\n    }\\n    entity = entityLC\\n    if (entity.charAt(0) === '#') {\\n      if (entity.charAt(1) === 'x') {\\n        entity = entity.slice(2)\\n        num = parseInt(entity, 16)\\n        numStr = num.toString(16)\\n      } else {\\n        entity = entity.slice(1)\\n        num = parseInt(entity, 10)\\n        numStr = num.toString(10)\\n      }\\n    }\\n    entity = entity.replace(/^0+/, '')\\n    if (numStr.toLowerCase() !== entity) {\\n      strictFail(parser, 'Invalid character entity')\\n      return '&' + parser.entity + ';'\\n    }\\n\\n    return String.fromCodePoint(num)\\n  }\\n\\n  function beginWhiteSpace (parser, c) {\\n    if (c === '<') {\\n      parser.state = S.OPEN_WAKA\\n      parser.startTagPosition = parser.position\\n    } else if (not(whitespace, c)) {\\n      // have to process this as a text node.\\n      // weird, but happens.\\n      strictFail(parser, 'Non-whitespace before first tag.')\\n      parser.textNode = c\\n      parser.state = S.TEXT\\n    }\\n  }\\n\\n  function charAt (chunk, i) {\\n    var result = ''\\n    if (i < chunk.length) {\\n      result = chunk.charAt(i)\\n    }\\n    return result\\n  }\\n\\n  function write (chunk) {\\n    var parser = this\\n    if (this.error) {\\n      throw this.error\\n    }\\n    if (parser.closed) {\\n      return error(parser,\\n        'Cannot write after close. Assign an onready handler.')\\n    }\\n    if (chunk === null) {\\n      return end(parser)\\n    }\\n    if (typeof chunk === 'object') {\\n      chunk = chunk.toString()\\n    }\\n    var i = 0\\n    var c = ''\\n    while (true) {\\n      c = charAt(chunk, i++)\\n      parser.c = c\\n      if (!c) {\\n        break\\n      }\\n      if (parser.trackPosition) {\\n        parser.position++\\n        if (c === '\\\\n') {\\n          parser.line++\\n          parser.column = 0\\n        } else {\\n          parser.column++\\n        }\\n      }\\n      switch (parser.state) {\\n        case S.BEGIN:\\n          parser.state = S.BEGIN_WHITESPACE\\n          if (c === '\\\\uFEFF') {\\n            continue\\n          }\\n          beginWhiteSpace(parser, c)\\n          continue\\n\\n        case S.BEGIN_WHITESPACE:\\n          beginWhiteSpace(parser, c)\\n          continue\\n\\n        case S.TEXT:\\n          if (parser.sawRoot && !parser.closedRoot) {\\n            var starti = i - 1\\n            while (c && c !== '<' && c !== '&') {\\n              c = charAt(chunk, i++)\\n              if (c && parser.trackPosition) {\\n                parser.position++\\n                if (c === '\\\\n') {\\n                  parser.line++\\n                  parser.column = 0\\n                } else {\\n                  parser.column++\\n                }\\n              }\\n            }\\n            parser.textNode += chunk.substring(starti, i - 1)\\n          }\\n          if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {\\n            parser.state = S.OPEN_WAKA\\n            parser.startTagPosition = parser.position\\n          } else {\\n            if (not(whitespace, c) && (!parser.sawRoot || parser.closedRoot)) {\\n              strictFail(parser, 'Text data outside of root node.')\\n            }\\n            if (c === '&') {\\n              parser.state = S.TEXT_ENTITY\\n            } else {\\n              parser.textNode += c\\n            }\\n          }\\n          continue\\n\\n        case S.SCRIPT:\\n          // only non-strict\\n          if (c === '<') {\\n            parser.state = S.SCRIPT_ENDING\\n          } else {\\n            parser.script += c\\n          }\\n          continue\\n\\n        case S.SCRIPT_ENDING:\\n          if (c === '/') {\\n            parser.state = S.CLOSE_TAG\\n          } else {\\n            parser.script += '<' + c\\n            parser.state = S.SCRIPT\\n          }\\n          continue\\n\\n        case S.OPEN_WAKA:\\n          // either a /, ?, !, or text is coming next.\\n          if (c === '!') {\\n            parser.state = S.SGML_DECL\\n            parser.sgmlDecl = ''\\n          } else if (is(whitespace, c)) {\\n            // wait for it...\\n          } else if (is(nameStart, c)) {\\n            parser.state = S.OPEN_TAG\\n            parser.tagName = c\\n          } else if (c === '/') {\\n            parser.state = S.CLOSE_TAG\\n            parser.tagName = ''\\n          } else if (c === '?') {\\n            parser.state = S.PROC_INST\\n            parser.procInstName = parser.procInstBody = ''\\n          } else {\\n            strictFail(parser, 'Unencoded <')\\n            // if there was some whitespace, then add that in.\\n            if (parser.startTagPosition + 1 < parser.position) {\\n              var pad = parser.position - parser.startTagPosition\\n              c = new Array(pad).join(' ') + c\\n            }\\n            parser.textNode += '<' + c\\n            parser.state = S.TEXT\\n          }\\n          continue\\n\\n        case S.SGML_DECL:\\n          if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {\\n            emitNode(parser, 'onopencdata')\\n            parser.state = S.CDATA\\n            parser.sgmlDecl = ''\\n            parser.cdata = ''\\n          } else if (parser.sgmlDecl + c === '--') {\\n            parser.state = S.COMMENT\\n            parser.comment = ''\\n            parser.sgmlDecl = ''\\n          } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {\\n            parser.state = S.DOCTYPE\\n            if (parser.doctype || parser.sawRoot) {\\n              strictFail(parser,\\n                'Inappropriately located doctype declaration')\\n            }\\n            parser.doctype = ''\\n            parser.sgmlDecl = ''\\n          } else if (c === '>') {\\n            emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)\\n            parser.sgmlDecl = ''\\n            parser.state = S.TEXT\\n          } else if (is(quote, c)) {\\n            parser.state = S.SGML_DECL_QUOTED\\n            parser.sgmlDecl += c\\n          } else {\\n            parser.sgmlDecl += c\\n          }\\n          continue\\n\\n        case S.SGML_DECL_QUOTED:\\n          if (c === parser.q) {\\n            parser.state = S.SGML_DECL\\n            parser.q = ''\\n          }\\n          parser.sgmlDecl += c\\n          continue\\n\\n        case S.DOCTYPE:\\n          if (c === '>') {\\n            parser.state = S.TEXT\\n            emitNode(parser, 'ondoctype', parser.doctype)\\n            parser.doctype = true // just remember that we saw it.\\n          } else {\\n            parser.doctype += c\\n            if (c === '[') {\\n              parser.state = S.DOCTYPE_DTD\\n            } else if (is(quote, c)) {\\n              parser.state = S.DOCTYPE_QUOTED\\n              parser.q = c\\n            }\\n          }\\n          continue\\n\\n        case S.DOCTYPE_QUOTED:\\n          parser.doctype += c\\n          if (c === parser.q) {\\n            parser.q = ''\\n            parser.state = S.DOCTYPE\\n          }\\n          continue\\n\\n        case S.DOCTYPE_DTD:\\n          parser.doctype += c\\n          if (c === ']') {\\n            parser.state = S.DOCTYPE\\n          } else if (is(quote, c)) {\\n            parser.state = S.DOCTYPE_DTD_QUOTED\\n            parser.q = c\\n          }\\n          continue\\n\\n        case S.DOCTYPE_DTD_QUOTED:\\n          parser.doctype += c\\n          if (c === parser.q) {\\n            parser.state = S.DOCTYPE_DTD\\n            parser.q = ''\\n          }\\n          continue\\n\\n        case S.COMMENT:\\n          if (c === '-') {\\n            parser.state = S.COMMENT_ENDING\\n          } else {\\n            parser.comment += c\\n          }\\n          continue\\n\\n        case S.COMMENT_ENDING:\\n          if (c === '-') {\\n            parser.state = S.COMMENT_ENDED\\n            parser.comment = textopts(parser.opt, parser.comment)\\n            if (parser.comment) {\\n              emitNode(parser, 'oncomment', parser.comment)\\n            }\\n            parser.comment = ''\\n          } else {\\n            parser.comment += '-' + c\\n            parser.state = S.COMMENT\\n          }\\n          continue\\n\\n        case S.COMMENT_ENDED:\\n          if (c !== '>') {\\n            strictFail(parser, 'Malformed comment')\\n            // allow <!-- blah -- bloo --> in non-strict mode,\\n            // which is a comment of \\\" blah -- bloo \\\"\\n            parser.comment += '--' + c\\n            parser.state = S.COMMENT\\n          } else {\\n            parser.state = S.TEXT\\n          }\\n          continue\\n\\n        case S.CDATA:\\n          if (c === ']') {\\n            parser.state = S.CDATA_ENDING\\n          } else {\\n            parser.cdata += c\\n          }\\n          continue\\n\\n        case S.CDATA_ENDING:\\n          if (c === ']') {\\n            parser.state = S.CDATA_ENDING_2\\n          } else {\\n            parser.cdata += ']' + c\\n            parser.state = S.CDATA\\n          }\\n          continue\\n\\n        case S.CDATA_ENDING_2:\\n          if (c === '>') {\\n            if (parser.cdata) {\\n              emitNode(parser, 'oncdata', parser.cdata)\\n            }\\n            emitNode(parser, 'onclosecdata')\\n            parser.cdata = ''\\n            parser.state = S.TEXT\\n          } else if (c === ']') {\\n            parser.cdata += ']'\\n          } else {\\n            parser.cdata += ']]' + c\\n            parser.state = S.CDATA\\n          }\\n          continue\\n\\n        case S.PROC_INST:\\n          if (c === '?') {\\n            parser.state = S.PROC_INST_ENDING\\n          } else if (is(whitespace, c)) {\\n            parser.state = S.PROC_INST_BODY\\n          } else {\\n            parser.procInstName += c\\n          }\\n          continue\\n\\n        case S.PROC_INST_BODY:\\n          if (!parser.procInstBody && is(whitespace, c)) {\\n            continue\\n          } else if (c === '?') {\\n            parser.state = S.PROC_INST_ENDING\\n          } else {\\n            parser.procInstBody += c\\n          }\\n          continue\\n\\n        case S.PROC_INST_ENDING:\\n          if (c === '>') {\\n            emitNode(parser, 'onprocessinginstruction', {\\n              name: parser.procInstName,\\n              body: parser.procInstBody\\n            })\\n            parser.procInstName = parser.procInstBody = ''\\n            parser.state = S.TEXT\\n          } else {\\n            parser.procInstBody += '?' + c\\n            parser.state = S.PROC_INST_BODY\\n          }\\n          continue\\n\\n        case S.OPEN_TAG:\\n          if (is(nameBody, c)) {\\n            parser.tagName += c\\n          } else {\\n            newTag(parser)\\n            if (c === '>') {\\n              openTag(parser)\\n            } else if (c === '/') {\\n              parser.state = S.OPEN_TAG_SLASH\\n            } else {\\n              if (not(whitespace, c)) {\\n                strictFail(parser, 'Invalid character in tag name')\\n              }\\n              parser.state = S.ATTRIB\\n            }\\n          }\\n          continue\\n\\n        case S.OPEN_TAG_SLASH:\\n          if (c === '>') {\\n            openTag(parser, true)\\n            closeTag(parser)\\n          } else {\\n            strictFail(parser, 'Forward-slash in opening tag not followed by >')\\n            parser.state = S.ATTRIB\\n          }\\n          continue\\n\\n        case S.ATTRIB:\\n          // haven't read the attribute name yet.\\n          if (is(whitespace, c)) {\\n            continue\\n          } else if (c === '>') {\\n            openTag(parser)\\n          } else if (c === '/') {\\n            parser.state = S.OPEN_TAG_SLASH\\n          } else if (is(nameStart, c)) {\\n            parser.attribName = c\\n            parser.attribValue = ''\\n            parser.state = S.ATTRIB_NAME\\n          } else {\\n            strictFail(parser, 'Invalid attribute name')\\n          }\\n          continue\\n\\n        case S.ATTRIB_NAME:\\n          if (c === '=') {\\n            parser.state = S.ATTRIB_VALUE\\n          } else if (c === '>') {\\n            strictFail(parser, 'Attribute without value')\\n            parser.attribValue = parser.attribName\\n            attrib(parser)\\n            openTag(parser)\\n          } else if (is(whitespace, c)) {\\n            parser.state = S.ATTRIB_NAME_SAW_WHITE\\n          } else if (is(nameBody, c)) {\\n            parser.attribName += c\\n          } else {\\n            strictFail(parser, 'Invalid attribute name')\\n          }\\n          continue\\n\\n        case S.ATTRIB_NAME_SAW_WHITE:\\n          if (c === '=') {\\n            parser.state = S.ATTRIB_VALUE\\n          } else if (is(whitespace, c)) {\\n            continue\\n          } else {\\n            strictFail(parser, 'Attribute without value')\\n            parser.tag.attributes[parser.attribName] = ''\\n            parser.attribValue = ''\\n            emitNode(parser, 'onattribute', {\\n              name: parser.attribName,\\n              value: ''\\n            })\\n            parser.attribName = ''\\n            if (c === '>') {\\n              openTag(parser)\\n            } else if (is(nameStart, c)) {\\n              parser.attribName = c\\n              parser.state = S.ATTRIB_NAME\\n            } else {\\n              strictFail(parser, 'Invalid attribute name')\\n              parser.state = S.ATTRIB\\n            }\\n          }\\n          continue\\n\\n        case S.ATTRIB_VALUE:\\n          if (is(whitespace, c)) {\\n            continue\\n          } else if (is(quote, c)) {\\n            parser.q = c\\n            parser.state = S.ATTRIB_VALUE_QUOTED\\n          } else {\\n            strictFail(parser, 'Unquoted attribute value')\\n            parser.state = S.ATTRIB_VALUE_UNQUOTED\\n            parser.attribValue = c\\n          }\\n          continue\\n\\n        case S.ATTRIB_VALUE_QUOTED:\\n          if (c !== parser.q) {\\n            if (c === '&') {\\n              parser.state = S.ATTRIB_VALUE_ENTITY_Q\\n            } else {\\n              parser.attribValue += c\\n            }\\n            continue\\n          }\\n          attrib(parser)\\n          parser.q = ''\\n          parser.state = S.ATTRIB_VALUE_CLOSED\\n          continue\\n\\n        case S.ATTRIB_VALUE_CLOSED:\\n          if (is(whitespace, c)) {\\n            parser.state = S.ATTRIB\\n          } else if (c === '>') {\\n            openTag(parser)\\n          } else if (c === '/') {\\n            parser.state = S.OPEN_TAG_SLASH\\n          } else if (is(nameStart, c)) {\\n            strictFail(parser, 'No whitespace between attributes')\\n            parser.attribName = c\\n            parser.attribValue = ''\\n            parser.state = S.ATTRIB_NAME\\n          } else {\\n            strictFail(parser, 'Invalid attribute name')\\n          }\\n          continue\\n\\n        case S.ATTRIB_VALUE_UNQUOTED:\\n          if (not(attribEnd, c)) {\\n            if (c === '&') {\\n              parser.state = S.ATTRIB_VALUE_ENTITY_U\\n            } else {\\n              parser.attribValue += c\\n            }\\n            continue\\n          }\\n          attrib(parser)\\n          if (c === '>') {\\n            openTag(parser)\\n          } else {\\n            parser.state = S.ATTRIB\\n          }\\n          continue\\n\\n        case S.CLOSE_TAG:\\n          if (!parser.tagName) {\\n            if (is(whitespace, c)) {\\n              continue\\n            } else if (not(nameStart, c)) {\\n              if (parser.script) {\\n                parser.script += '</' + c\\n                parser.state = S.SCRIPT\\n              } else {\\n                strictFail(parser, 'Invalid tagname in closing tag.')\\n              }\\n            } else {\\n              parser.tagName = c\\n            }\\n          } else if (c === '>') {\\n            closeTag(parser)\\n          } else if (is(nameBody, c)) {\\n            parser.tagName += c\\n          } else if (parser.script) {\\n            parser.script += '</' + parser.tagName\\n            parser.tagName = ''\\n            parser.state = S.SCRIPT\\n          } else {\\n            if (not(whitespace, c)) {\\n              strictFail(parser, 'Invalid tagname in closing tag')\\n            }\\n            parser.state = S.CLOSE_TAG_SAW_WHITE\\n          }\\n          continue\\n\\n        case S.CLOSE_TAG_SAW_WHITE:\\n          if (is(whitespace, c)) {\\n            continue\\n          }\\n          if (c === '>') {\\n            closeTag(parser)\\n          } else {\\n            strictFail(parser, 'Invalid characters in closing tag')\\n          }\\n          continue\\n\\n        case S.TEXT_ENTITY:\\n        case S.ATTRIB_VALUE_ENTITY_Q:\\n        case S.ATTRIB_VALUE_ENTITY_U:\\n          var returnState\\n          var buffer\\n          switch (parser.state) {\\n            case S.TEXT_ENTITY:\\n              returnState = S.TEXT\\n              buffer = 'textNode'\\n              break\\n\\n            case S.ATTRIB_VALUE_ENTITY_Q:\\n              returnState = S.ATTRIB_VALUE_QUOTED\\n              buffer = 'attribValue'\\n              break\\n\\n            case S.ATTRIB_VALUE_ENTITY_U:\\n              returnState = S.ATTRIB_VALUE_UNQUOTED\\n              buffer = 'attribValue'\\n              break\\n          }\\n\\n          if (c === ';') {\\n            parser[buffer] += parseEntity(parser)\\n            parser.entity = ''\\n            parser.state = returnState\\n          } else if (is(parser.entity.length ? entityBody : entityStart, c)) {\\n            parser.entity += c\\n          } else {\\n            strictFail(parser, 'Invalid character in entity name')\\n            parser[buffer] += '&' + parser.entity + c\\n            parser.entity = ''\\n            parser.state = returnState\\n          }\\n\\n          continue\\n\\n        default:\\n          throw new Error(parser, 'Unknown state: ' + parser.state)\\n      }\\n    } // while\\n\\n    if (parser.position >= parser.bufferCheckPosition) {\\n      checkBufferLength(parser)\\n    }\\n    return parser\\n  }\\n\\n  /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */\\n  if (!String.fromCodePoint) {\\n    (function () {\\n      var stringFromCharCode = String.fromCharCode\\n      var floor = Math.floor\\n      var fromCodePoint = function () {\\n        var MAX_SIZE = 0x4000\\n        var codeUnits = []\\n        var highSurrogate\\n        var lowSurrogate\\n        var index = -1\\n        var length = arguments.length\\n        if (!length) {\\n          return ''\\n        }\\n        var result = ''\\n        while (++index < length) {\\n          var codePoint = Number(arguments[index])\\n          if (\\n            !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\\n            codePoint < 0 || // not a valid Unicode code point\\n            codePoint > 0x10FFFF || // not a valid Unicode code point\\n            floor(codePoint) !== codePoint // not an integer\\n          ) {\\n            throw RangeError('Invalid code point: ' + codePoint)\\n          }\\n          if (codePoint <= 0xFFFF) { // BMP code point\\n            codeUnits.push(codePoint)\\n          } else { // Astral code point; split in surrogate halves\\n            // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\\n            codePoint -= 0x10000\\n            highSurrogate = (codePoint >> 10) + 0xD800\\n            lowSurrogate = (codePoint % 0x400) + 0xDC00\\n            codeUnits.push(highSurrogate, lowSurrogate)\\n          }\\n          if (index + 1 === length || codeUnits.length > MAX_SIZE) {\\n            result += stringFromCharCode.apply(null, codeUnits)\\n            codeUnits.length = 0\\n          }\\n        }\\n        return result\\n      }\\n      if (Object.defineProperty) {\\n        Object.defineProperty(String, 'fromCodePoint', {\\n          value: fromCodePoint,\\n          configurable: true,\\n          writable: true\\n        })\\n      } else {\\n        String.fromCodePoint = fromCodePoint\\n      }\\n    }())\\n  }\\n})( false ? undefined : exports)\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node-libs-browser/node_modules/buffer/index.js */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/node_modules/sax/lib/sax.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/doc.js\":\n/*!***********************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/doc.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscDoc\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscDoc, sax, imscNames, imscStyles, imscUtils) {\\r\\n\\r\\n\\r\\n    /**\\r\\n     * Allows a client to provide callbacks to handle children of the <metadata> element\\r\\n     * @typedef {Object} MetadataHandler\\r\\n     * @property {?OpenTagCallBack} onOpenTag\\r\\n     * @property {?CloseTagCallBack} onCloseTag\\r\\n     * @property {?TextCallBack} onText\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Called when the opening tag of an element node is encountered.\\r\\n     * @callback OpenTagCallBack\\r\\n     * @param {string} ns Namespace URI of the element\\r\\n     * @param {string} name Local name of the element\\r\\n     * @param {Object[]} attributes List of attributes, each consisting of a\\r\\n     *                              `uri`, `name` and `value`\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Called when the closing tag of an element node is encountered.\\r\\n     * @callback CloseTagCallBack\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Called when a text node is encountered.\\r\\n     * @callback TextCallBack\\r\\n     * @param {string} contents Contents of the text node\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Parses an IMSC1 document into an opaque in-memory representation that exposes\\r\\n     * a single method <pre>getMediaTimeEvents()</pre> that returns a list of time\\r\\n     * offsets (in seconds) of the ISD, i.e. the points in time where the visual\\r\\n     * representation of the document change. `metadataHandler` allows the caller to\\r\\n     * be called back when nodes are present in <metadata> elements. \\r\\n     * \\r\\n     * @param {string} xmlstring XML document\\r\\n     * @param {?module:imscUtils.ErrorHandler} errorHandler Error callback\\r\\n     * @param {?MetadataHandler} metadataHandler Callback for <Metadata> elements\\r\\n     * @returns {Object} Opaque in-memory representation of an IMSC1 document\\r\\n     */\\r\\n\\r\\n    imscDoc.fromXML = function (xmlstring, errorHandler, metadataHandler) {\\r\\n        var p = sax.parser(true, {xmlns: true});\\r\\n        var estack = [];\\r\\n        var xmllangstack = [];\\r\\n        var xmlspacestack = [];\\r\\n        var metadata_depth = 0;\\r\\n        var doc = null;\\r\\n\\r\\n        p.onclosetag = function (node) {\\r\\n\\r\\n            if (estack[0] instanceof Styling) {\\r\\n\\r\\n                /* flatten chained referential styling */\\r\\n\\r\\n                for (var sid in estack[0].styles) {\\r\\n\\r\\n                    mergeChainedStyles(estack[0], estack[0].styles[sid], errorHandler);\\r\\n\\r\\n                }\\r\\n\\r\\n            } else if (estack[0] instanceof P || estack[0] instanceof Span) {\\r\\n\\r\\n                /* merge anonymous spans */\\r\\n\\r\\n                if (estack[0].contents.length > 1) {\\r\\n\\r\\n                    var cs = [estack[0].contents[0]];\\r\\n\\r\\n                    var c;\\r\\n\\r\\n                    for (c = 1; c < estack[0].contents.length; c++) {\\r\\n\\r\\n                        if (estack[0].contents[c] instanceof AnonymousSpan &&\\r\\n                                cs[cs.length - 1] instanceof AnonymousSpan) {\\r\\n\\r\\n                            cs[cs.length - 1].text += estack[0].contents[c].text;\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            cs.push(estack[0].contents[c]);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                    estack[0].contents = cs;\\r\\n\\r\\n                }\\r\\n\\r\\n                // remove redundant nested anonymous spans (9.3.3(1)(c))\\r\\n\\r\\n                if (estack[0] instanceof Span &&\\r\\n                        estack[0].contents.length === 1 &&\\r\\n                        estack[0].contents[0] instanceof AnonymousSpan) {\\r\\n\\r\\n                    estack[0].text = estack[0].contents[0].text;\\r\\n                    delete estack[0].contents;\\r\\n\\r\\n                }\\r\\n\\r\\n            } else if (estack[0] instanceof ForeignElement) {\\r\\n\\r\\n                if (estack[0].node.uri === imscNames.ns_tt &&\\r\\n                        estack[0].node.local === 'metadata') {\\r\\n\\r\\n                    /* leave the metadata element */\\r\\n\\r\\n                    metadata_depth--;\\r\\n\\r\\n                } else if (metadata_depth > 0 &&\\r\\n                        metadataHandler &&\\r\\n                        'onCloseTag' in metadataHandler) {\\r\\n\\r\\n                    /* end of child of metadata element */\\r\\n\\r\\n                    metadataHandler.onCloseTag();\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            // TODO: delete stylerefs?\\r\\n\\r\\n            // maintain the xml:space stack\\r\\n\\r\\n            xmlspacestack.shift();\\r\\n\\r\\n            // maintain the xml:lang stack\\r\\n\\r\\n            xmllangstack.shift();\\r\\n\\r\\n            // prepare for the next element\\r\\n\\r\\n            estack.shift();\\r\\n        };\\r\\n\\r\\n        p.ontext = function (str) {\\r\\n\\r\\n            if (estack[0] === undefined) {\\r\\n\\r\\n                /* ignoring text outside of elements */\\r\\n\\r\\n            } else if (estack[0] instanceof Span || estack[0] instanceof P) {\\r\\n\\r\\n                /* ignore children text nodes in ruby container spans */\\r\\n\\r\\n                if (estack[0] instanceof Span) {\\r\\n\\r\\n                    var ruby = estack[0].styleAttrs[imscStyles.byName.ruby.qname];\\r\\n\\r\\n                    if (ruby === 'container' || ruby === 'textContainer' || ruby === 'baseContainer') {\\r\\n\\r\\n                        return;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                /* create an anonymous span */\\r\\n\\r\\n                var s = new AnonymousSpan();\\r\\n\\r\\n                s.initFromText(doc, estack[0], str, xmlspacestack[0], errorHandler);\\r\\n\\r\\n                estack[0].contents.push(s);\\r\\n\\r\\n            } else if (estack[0] instanceof ForeignElement &&\\r\\n                    metadata_depth > 0 &&\\r\\n                    metadataHandler &&\\r\\n                    'onText' in metadataHandler) {\\r\\n\\r\\n                /* text node within a child of metadata element */\\r\\n\\r\\n                metadataHandler.onText(str);\\r\\n\\r\\n            }\\r\\n\\r\\n        };\\r\\n\\r\\n\\r\\n        p.onopentag = function (node) {\\r\\n\\r\\n            // maintain the xml:space stack\\r\\n\\r\\n            var xmlspace = node.attributes[\\\"xml:space\\\"];\\r\\n\\r\\n            if (xmlspace) {\\r\\n\\r\\n                xmlspacestack.unshift(xmlspace.value);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                if (xmlspacestack.length === 0) {\\r\\n\\r\\n                    xmlspacestack.unshift(\\\"default\\\");\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    xmlspacestack.unshift(xmlspacestack[0]);\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* maintain the xml:lang stack */\\r\\n\\r\\n\\r\\n            var xmllang = node.attributes[\\\"xml:lang\\\"];\\r\\n\\r\\n            if (xmllang) {\\r\\n\\r\\n                xmllangstack.unshift(xmllang.value);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                if (xmllangstack.length === 0) {\\r\\n\\r\\n                    xmllangstack.unshift(\\\"\\\");\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    xmllangstack.unshift(xmllangstack[0]);\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n\\r\\n            /* process the element */\\r\\n\\r\\n            if (node.uri === imscNames.ns_tt) {\\r\\n\\r\\n                if (node.local === 'tt') {\\r\\n\\r\\n                    if (doc !== null) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Two <tt> elements at (\\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    doc = new TT();\\r\\n\\r\\n                    doc.initFromNode(node, errorHandler);\\r\\n\\r\\n                    estack.unshift(doc);\\r\\n\\r\\n                } else if (node.local === 'head') {\\r\\n\\r\\n                    if (!(estack[0] instanceof TT)) {\\r\\n                        reportFatal(errorHandler, \\\"Parent of <head> element is not <tt> at (\\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(doc.head);\\r\\n\\r\\n                } else if (node.local === 'styling') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Head)) {\\r\\n                        reportFatal(errorHandler, \\\"Parent of <styling> element is not <head> at (\\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(doc.head.styling);\\r\\n\\r\\n                } else if (node.local === 'style') {\\r\\n\\r\\n                    var s;\\r\\n\\r\\n                    if (estack[0] instanceof Styling) {\\r\\n\\r\\n                        s = new Style();\\r\\n\\r\\n                        s.initFromNode(node, errorHandler);\\r\\n\\r\\n                        /* ignore <style> element missing @id */\\r\\n\\r\\n                        if (!s.id) {\\r\\n\\r\\n                            reportError(errorHandler, \\\"<style> element missing @id attribute\\\");\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            doc.head.styling.styles[s.id] = s;\\r\\n\\r\\n                        }\\r\\n\\r\\n                        estack.unshift(s);\\r\\n\\r\\n                    } else if (estack[0] instanceof Region) {\\r\\n\\r\\n                        /* nested styles can be merged with specified styles\\r\\n                         * immediately, with lower priority\\r\\n                         * (see 8.4.4.2(3) at TTML1 )\\r\\n                         */\\r\\n\\r\\n                        s = new Style();\\r\\n\\r\\n                        s.initFromNode(node, errorHandler);\\r\\n\\r\\n                        mergeStylesIfNotPresent(s.styleAttrs, estack[0].styleAttrs);\\r\\n\\r\\n                        estack.unshift(s);\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <style> element is not <styling> or <region> at (\\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                }  else if (node.local === 'initial') {\\r\\n\\r\\n                    var ini;\\r\\n\\r\\n                    if (estack[0] instanceof Styling) {\\r\\n\\r\\n                        ini = new Initial();\\r\\n\\r\\n                        ini.initFromNode(node, errorHandler);\\r\\n                        \\r\\n                        for (var qn in ini.styleAttrs) {\\r\\n                            \\r\\n                            doc.head.styling.initials[qn] = ini.styleAttrs[qn];\\r\\n                            \\r\\n                        }\\r\\n                        \\r\\n                        estack.unshift(ini);\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <initial> element is not <styling> at (\\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                } else if (node.local === 'layout') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Head)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <layout> element is not <head> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(doc.head.layout);\\r\\n\\r\\n                } else if (node.local === 'region') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Layout)) {\\r\\n                        reportFatal(errorHandler, \\\"Parent of <region> element is not <layout> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n                    }\\r\\n\\r\\n                    var r = new Region();\\r\\n\\r\\n                    r.initFromNode(doc, node, errorHandler);\\r\\n\\r\\n                    if (!r.id || r.id in doc.head.layout.regions) {\\r\\n\\r\\n                        reportError(errorHandler, \\\"Ignoring <region> with duplicate or missing @id at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        doc.head.layout.regions[r.id] = r;\\r\\n\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(r);\\r\\n\\r\\n                } else if (node.local === 'body') {\\r\\n\\r\\n                    if (!(estack[0] instanceof TT)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <body> element is not <tt> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    if (doc.body !== null) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Second <body> element at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var b = new Body();\\r\\n\\r\\n                    b.initFromNode(doc, node, errorHandler);\\r\\n\\r\\n                    doc.body = b;\\r\\n\\r\\n                    estack.unshift(b);\\r\\n\\r\\n                } else if (node.local === 'div') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Div || estack[0] instanceof Body)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <div> element is not <body> or <div> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var d = new Div();\\r\\n\\r\\n                    d.initFromNode(doc, estack[0], node, errorHandler);\\r\\n                    \\r\\n                    /* transform smpte:backgroundImage to TTML2 image element */\\r\\n                    \\r\\n                    var bi = d.styleAttrs[imscStyles.byName.backgroundImage.qname];\\r\\n                    \\r\\n                    if (bi) {\\r\\n                        d.contents.push(new Image(bi));\\r\\n                        delete d.styleAttrs[imscStyles.byName.backgroundImage.qname];                  \\r\\n                    }\\r\\n\\r\\n                    estack[0].contents.push(d);\\r\\n\\r\\n                    estack.unshift(d);\\r\\n\\r\\n                } else if (node.local === 'image') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Div)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <image> element is not <div> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var img = new Image();\\r\\n                    \\r\\n                    img.initFromNode(doc, estack[0], node, errorHandler);\\r\\n                    \\r\\n                    estack[0].contents.push(img);\\r\\n\\r\\n                    estack.unshift(img);\\r\\n\\r\\n                } else if (node.local === 'p') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Div)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <p> element is not <div> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var p = new P();\\r\\n\\r\\n                    p.initFromNode(doc, estack[0], node, errorHandler);\\r\\n\\r\\n                    estack[0].contents.push(p);\\r\\n\\r\\n                    estack.unshift(p);\\r\\n\\r\\n                } else if (node.local === 'span') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Span || estack[0] instanceof P)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <span> element is not <span> or <p> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var ns = new Span();\\r\\n\\r\\n                    ns.initFromNode(doc, estack[0], node, xmlspacestack[0], errorHandler);\\r\\n\\r\\n                    estack[0].contents.push(ns);\\r\\n\\r\\n                    estack.unshift(ns);\\r\\n\\r\\n                } else if (node.local === 'br') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Span || estack[0] instanceof P)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <br> element is not <span> or <p> at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var nb = new Br();\\r\\n\\r\\n                    nb.initFromNode(doc, estack[0], node, errorHandler);\\r\\n\\r\\n                    estack[0].contents.push(nb);\\r\\n\\r\\n                    estack.unshift(nb);\\r\\n\\r\\n                } else if (node.local === 'set') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Span ||\\r\\n                            estack[0] instanceof P ||\\r\\n                            estack[0] instanceof Div ||\\r\\n                            estack[0] instanceof Body ||\\r\\n                            estack[0] instanceof Region ||\\r\\n                            estack[0] instanceof Br)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \\\"Parent of <set> element is not a content element or a region at \\\" + this.line + \\\",\\\" + this.column + \\\")\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var st = new Set();\\r\\n\\r\\n                    st.initFromNode(doc, estack[0], node, errorHandler);\\r\\n\\r\\n                    estack[0].sets.push(st);\\r\\n\\r\\n                    estack.unshift(st);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    /* element in the TT namespace, but not a content element */\\r\\n\\r\\n                    estack.unshift(new ForeignElement(node));\\r\\n                }\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /* ignore elements not in the TTML namespace unless in metadata element */\\r\\n\\r\\n                estack.unshift(new ForeignElement(node));\\r\\n\\r\\n            }\\r\\n\\r\\n            /* handle metadata callbacks */\\r\\n\\r\\n            if (estack[0] instanceof ForeignElement) {\\r\\n\\r\\n                if (node.uri === imscNames.ns_tt &&\\r\\n                        node.local === 'metadata') {\\r\\n\\r\\n                    /* enter the metadata element */\\r\\n\\r\\n                    metadata_depth++;\\r\\n\\r\\n                } else if (\\r\\n                        metadata_depth > 0 &&\\r\\n                        metadataHandler &&\\r\\n                        'onOpenTag' in metadataHandler\\r\\n                        ) {\\r\\n\\r\\n                    /* start of child of metadata element */\\r\\n\\r\\n                    var attrs = [];\\r\\n\\r\\n                    for (var a in node.attributes) {\\r\\n                        attrs[node.attributes[a].uri + \\\" \\\" + node.attributes[a].local] =\\r\\n                                {\\r\\n                                    uri: node.attributes[a].uri,\\r\\n                                    local: node.attributes[a].local,\\r\\n                                    value: node.attributes[a].value\\r\\n                                };\\r\\n                    }\\r\\n\\r\\n                    metadataHandler.onOpenTag(node.uri, node.local, attrs);\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        };\\r\\n\\r\\n        // parse the document\\r\\n\\r\\n        p.write(xmlstring).close();\\r\\n\\r\\n        // all referential styling has been flatten, so delete styles\\r\\n\\r\\n        delete doc.head.styling.styles;\\r\\n       \\r\\n        // create default region if no regions specified\\r\\n\\r\\n        var hasRegions = false;\\r\\n\\r\\n        /* AFAIK the only way to determine whether an object has members */\\r\\n\\r\\n        for (var i in doc.head.layout.regions) {\\r\\n\\r\\n            hasRegions = true;\\r\\n\\r\\n            break;\\r\\n\\r\\n        }\\r\\n\\r\\n        if (!hasRegions) {\\r\\n\\r\\n            /* create default region */\\r\\n\\r\\n            var dr = Region.prototype.createDefaultRegion();\\r\\n\\r\\n            doc.head.layout.regions[dr.id] = dr;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* resolve desired timing for regions */\\r\\n\\r\\n        for (var region_i in doc.head.layout.regions) {\\r\\n\\r\\n            resolveTiming(doc, doc.head.layout.regions[region_i], null, null);\\r\\n\\r\\n        }\\r\\n\\r\\n        /* resolve desired timing for content elements */\\r\\n\\r\\n        if (doc.body) {\\r\\n            resolveTiming(doc, doc.body, null, null);\\r\\n        }\\r\\n\\r\\n        /* remove undefined spans in ruby containers */\\r\\n\\r\\n        if (doc.body) {\\r\\n            cleanRubyContainers(doc.body);\\r\\n        }\\r\\n\\r\\n        return doc;\\r\\n    };\\r\\n\\r\\n    function cleanRubyContainers(element) {\\r\\n        \\r\\n        if (! ('contents' in element)) return;\\r\\n\\r\\n        var rubyval = 'styleAttrs' in element ? element.styleAttrs[imscStyles.byName.ruby.qname] : null;\\r\\n\\r\\n        var isrubycontainer = (element.kind === 'span' && (rubyval === \\\"container\\\" || rubyval === \\\"textContainer\\\" || rubyval === \\\"baseContainer\\\"));\\r\\n\\r\\n        for (var i = element.contents.length - 1; i >= 0; i--) {\\r\\n\\r\\n            if (isrubycontainer && !('styleAttrs' in element.contents[i] && imscStyles.byName.ruby.qname in element.contents[i].styleAttrs)) {\\r\\n\\r\\n                /* prune undefined <span> in ruby containers */\\r\\n\\r\\n                delete element.contents[i];\\r\\n\\r\\n            } else {\\r\\n\\r\\n                cleanRubyContainers(element.contents[i]);\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function resolveTiming(doc, element, prev_sibling, parent) {\\r\\n\\r\\n        /* are we in a seq container? */\\r\\n\\r\\n        var isinseq = parent && parent.timeContainer === \\\"seq\\\";\\r\\n\\r\\n        /* determine implicit begin */\\r\\n\\r\\n        var implicit_begin = 0; /* default */\\r\\n\\r\\n        if (parent) {\\r\\n\\r\\n            if (isinseq && prev_sibling) {\\r\\n\\r\\n                /*\\r\\n                 * if seq time container, offset from the previous sibling end\\r\\n                 */\\r\\n\\r\\n                implicit_begin = prev_sibling.end;\\r\\n\\r\\n\\r\\n            } else {\\r\\n\\r\\n                implicit_begin = parent.begin;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* compute desired begin */\\r\\n\\r\\n        element.begin = element.explicit_begin ? element.explicit_begin + implicit_begin : implicit_begin;\\r\\n\\r\\n\\r\\n        /* determine implicit end */\\r\\n\\r\\n        var implicit_end = element.begin;\\r\\n\\r\\n        var s = null;\\r\\n\\r\\n        for (var set_i in element.sets) {\\r\\n\\r\\n            resolveTiming(doc, element.sets[set_i], s, element);\\r\\n\\r\\n            if (element.timeContainer === \\\"seq\\\") {\\r\\n\\r\\n                implicit_end = element.sets[set_i].end;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                implicit_end = Math.max(implicit_end, element.sets[set_i].end);\\r\\n\\r\\n            }\\r\\n\\r\\n            s = element.sets[set_i];\\r\\n\\r\\n        }\\r\\n\\r\\n        if (!('contents' in element)) {\\r\\n\\r\\n            /* anonymous spans and regions and <set> and <br>s and spans with only children text nodes */\\r\\n\\r\\n            if (isinseq) {\\r\\n\\r\\n                /* in seq container, implicit duration is zero */\\r\\n\\r\\n                implicit_end = element.begin;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /* in par container, implicit duration is indefinite */\\r\\n\\r\\n                implicit_end = Number.POSITIVE_INFINITY;\\r\\n\\r\\n            }\\r\\n\\r\\n        } else {\\r\\n\\r\\n            for (var content_i in element.contents) {\\r\\n\\r\\n                resolveTiming(doc, element.contents[content_i], s, element);\\r\\n\\r\\n                if (element.timeContainer === \\\"seq\\\") {\\r\\n\\r\\n                    implicit_end = element.contents[content_i].end;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    implicit_end = Math.max(implicit_end, element.contents[content_i].end);\\r\\n\\r\\n                }\\r\\n\\r\\n                s = element.contents[content_i];\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* determine desired end */\\r\\n        /* it is never made really clear in SMIL that the explicit end is offset by the implicit begin */\\r\\n\\r\\n        if (element.explicit_end !== null && element.explicit_dur !== null) {\\r\\n\\r\\n            element.end = Math.min(element.begin + element.explicit_dur, implicit_begin + element.explicit_end);\\r\\n\\r\\n        } else if (element.explicit_end === null && element.explicit_dur !== null) {\\r\\n\\r\\n            element.end = element.begin + element.explicit_dur;\\r\\n\\r\\n        } else if (element.explicit_end !== null && element.explicit_dur === null) {\\r\\n\\r\\n            element.end = implicit_begin + element.explicit_end;\\r\\n\\r\\n        } else {\\r\\n\\r\\n            element.end = implicit_end;\\r\\n        }\\r\\n\\r\\n        delete element.explicit_begin;\\r\\n        delete element.explicit_dur;\\r\\n        delete element.explicit_end;\\r\\n\\r\\n        doc._registerEvent(element);\\r\\n\\r\\n    }\\r\\n\\r\\n    function ForeignElement(node) {\\r\\n        this.node = node;\\r\\n    }\\r\\n\\r\\n    function TT() {\\r\\n        this.events = [];\\r\\n        this.head = new Head();\\r\\n        this.body = null;\\r\\n    }\\r\\n\\r\\n    TT.prototype.initFromNode = function (node, errorHandler) {\\r\\n\\r\\n        /* compute cell resolution */\\r\\n\\r\\n        var cr = extractCellResolution(node, errorHandler);\\r\\n        \\r\\n        this.cellLength = {\\r\\n                'h': new imscUtils.ComputedLength(0, 1/cr.h),\\r\\n                'w': new imscUtils.ComputedLength(1/cr.w, 0)\\r\\n            };\\r\\n\\r\\n        /* extract frame rate and tick rate */\\r\\n\\r\\n        var frtr = extractFrameAndTickRate(node, errorHandler);\\r\\n\\r\\n        this.effectiveFrameRate = frtr.effectiveFrameRate;\\r\\n\\r\\n        this.tickRate = frtr.tickRate;\\r\\n\\r\\n        /* extract aspect ratio */\\r\\n\\r\\n        this.aspectRatio = extractAspectRatio(node, errorHandler);\\r\\n\\r\\n        /* check timebase */\\r\\n\\r\\n        var attr = findAttribute(node, imscNames.ns_ttp, \\\"timeBase\\\");\\r\\n\\r\\n        if (attr !== null && attr !== \\\"media\\\") {\\r\\n\\r\\n            reportFatal(errorHandler, \\\"Unsupported time base\\\");\\r\\n\\r\\n        }\\r\\n\\r\\n        /* retrieve extent */\\r\\n\\r\\n        var e = extractExtent(node, errorHandler);\\r\\n\\r\\n        if (e === null) {\\r\\n\\r\\n            this.pxLength = {\\r\\n                'h': null,\\r\\n                'w': null\\r\\n            };\\r\\n\\r\\n        } else {\\r\\n\\r\\n            if (e.h.unit !== \\\"px\\\" || e.w.unit !== \\\"px\\\") {\\r\\n                reportFatal(errorHandler, \\\"Extent on TT must be in px or absent\\\");\\r\\n            }\\r\\n\\r\\n            this.pxLength = {\\r\\n                'h': new imscUtils.ComputedLength(0, 1 / e.h.value),\\r\\n                'w': new imscUtils.ComputedLength(1 / e.w.value, 0)\\r\\n            };\\r\\n        }\\r\\n        \\r\\n        /** set root container dimensions to (1, 1) arbitrarily\\r\\n          * the root container is mapped to actual dimensions at rendering\\r\\n        **/\\r\\n        \\r\\n        this.dimensions = {\\r\\n                'h': new imscUtils.ComputedLength(0, 1),\\r\\n                'w': new imscUtils.ComputedLength(1, 0)\\r\\n    };\\r\\n\\r\\n    };\\r\\n\\r\\n    /* register a temporal events */\\r\\n    TT.prototype._registerEvent = function (elem) {\\r\\n\\r\\n        /* skip if begin is not < then end */\\r\\n\\r\\n        if (elem.end <= elem.begin)\\r\\n            return;\\r\\n\\r\\n        /* index the begin time of the event */\\r\\n\\r\\n        var b_i = indexOf(this.events, elem.begin);\\r\\n\\r\\n        if (!b_i.found) {\\r\\n            this.events.splice(b_i.index, 0, elem.begin);\\r\\n        }\\r\\n\\r\\n        /* index the end time of the event */\\r\\n\\r\\n        if (elem.end !== Number.POSITIVE_INFINITY) {\\r\\n\\r\\n            var e_i = indexOf(this.events, elem.end);\\r\\n\\r\\n            if (!e_i.found) {\\r\\n                this.events.splice(e_i.index, 0, elem.end);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n\\r\\n    /*\\r\\n     * Retrieves the range of ISD times covered by the document\\r\\n     * \\r\\n     * @returns {Array} Array of two elements: min_begin_time and max_begin_time\\r\\n     * \\r\\n     */\\r\\n    TT.prototype.getMediaTimeRange = function () {\\r\\n\\r\\n        return [this.events[0], this.events[this.events.length - 1]];\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Returns list of ISD begin times  \\r\\n     * \\r\\n     * @returns {Array}\\r\\n     */\\r\\n    TT.prototype.getMediaTimeEvents = function () {\\r\\n\\r\\n        return this.events;\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Head element\\r\\n     */\\r\\n\\r\\n    function Head() {\\r\\n        this.styling = new Styling();\\r\\n        this.layout = new Layout();\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Styling element\\r\\n     */\\r\\n\\r\\n    function Styling() {\\r\\n        this.styles = {};\\r\\n        this.initials = {};\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Style element\\r\\n     */\\r\\n\\r\\n    function Style() {\\r\\n        this.id = null;\\r\\n        this.styleAttrs = null;\\r\\n        this.styleRefs = null;\\r\\n    }\\r\\n\\r\\n    Style.prototype.initFromNode = function (node, errorHandler) {\\r\\n        this.id = elementGetXMLID(node);\\r\\n        this.styleAttrs = elementGetStyles(node, errorHandler);\\r\\n        this.styleRefs = elementGetStyleRefs(node);\\r\\n    };\\r\\n    \\r\\n    /*\\r\\n     * Represents a TTML initial element\\r\\n     */\\r\\n\\r\\n    function Initial() {\\r\\n        this.styleAttrs = null;\\r\\n    }\\r\\n\\r\\n    Initial.prototype.initFromNode = function (node, errorHandler) {\\r\\n        \\r\\n        this.styleAttrs = {};\\r\\n        \\r\\n        for (var i in node.attributes) {\\r\\n\\r\\n            if (node.attributes[i].uri === imscNames.ns_itts ||\\r\\n                node.attributes[i].uri === imscNames.ns_ebutts ||\\r\\n                node.attributes[i].uri === imscNames.ns_tts) {\\r\\n                \\r\\n                var qname = node.attributes[i].uri + \\\" \\\" + node.attributes[i].local;\\r\\n                \\r\\n                this.styleAttrs[qname] = node.attributes[i].value;\\r\\n\\r\\n            }\\r\\n        }\\r\\n        \\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Layout element\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function Layout() {\\r\\n        this.regions = {};\\r\\n    }\\r\\n    \\r\\n    /*\\r\\n     * Represents a TTML image element\\r\\n     */\\r\\n\\r\\n    function Image(src, type) {\\r\\n        ContentElement.call(this, 'image');\\r\\n        this.src = src;\\r\\n        this.type = type;\\r\\n    }\\r\\n\\r\\n    Image.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.src = 'src' in node.attributes ? node.attributes.src.value : null;\\r\\n        \\r\\n        if (! this.src) {\\r\\n            reportError(errorHandler, \\\"Invalid image@src attribute\\\");\\r\\n        }\\r\\n        \\r\\n        this.type = 'type' in node.attributes ? node.attributes.type.value : null;\\r\\n        \\r\\n        if (! this.type) {\\r\\n            reportError(errorHandler, \\\"Invalid image@type attribute\\\");\\r\\n        }\\r\\n        \\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * TTML element utility functions\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function ContentElement(kind) {\\r\\n        this.kind = kind;\\r\\n    }\\r\\n\\r\\n    function IdentifiedElement(id) {\\r\\n        this.id = id;\\r\\n    }\\r\\n\\r\\n    IdentifiedElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.id = elementGetXMLID(node);\\r\\n    };\\r\\n\\r\\n    function LayoutElement(id) {\\r\\n        this.regionID = id;\\r\\n    }\\r\\n\\r\\n    LayoutElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.regionID = elementGetRegionID(node);\\r\\n    };\\r\\n\\r\\n    function StyledElement(styleAttrs) {\\r\\n        this.styleAttrs = styleAttrs;\\r\\n    }\\r\\n\\r\\n    StyledElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n\\r\\n        this.styleAttrs = elementGetStyles(node, errorHandler);\\r\\n\\r\\n        if (doc.head !== null && doc.head.styling !== null) {\\r\\n            mergeReferencedStyles(doc.head.styling, elementGetStyleRefs(node), this.styleAttrs, errorHandler);\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n    function AnimatedElement(sets) {\\r\\n        this.sets = sets;\\r\\n    }\\r\\n\\r\\n    AnimatedElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.sets = [];\\r\\n    };\\r\\n\\r\\n    function ContainerElement(contents) {\\r\\n        this.contents = contents;\\r\\n    }\\r\\n\\r\\n    ContainerElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.contents = [];\\r\\n    };\\r\\n\\r\\n    function TimedElement(explicit_begin, explicit_end, explicit_dur) {\\r\\n        this.explicit_begin = explicit_begin;\\r\\n        this.explicit_end = explicit_end;\\r\\n        this.explicit_dur = explicit_dur;\\r\\n    }\\r\\n\\r\\n    TimedElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        var t = processTiming(doc, parent, node, errorHandler);\\r\\n        this.explicit_begin = t.explicit_begin;\\r\\n        this.explicit_end = t.explicit_end;\\r\\n        this.explicit_dur = t.explicit_dur;\\r\\n\\r\\n        this.timeContainer = elementGetTimeContainer(node, errorHandler);\\r\\n    };\\r\\n\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML body element\\r\\n     */\\r\\n\\r\\n\\r\\n\\r\\n    function Body() {\\r\\n        ContentElement.call(this, 'body');\\r\\n    }\\r\\n\\r\\n\\r\\n    Body.prototype.initFromNode = function (doc, node, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML div element\\r\\n     */\\r\\n\\r\\n    function Div() {\\r\\n        ContentElement.call(this, 'div');\\r\\n    }\\r\\n\\r\\n    Div.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML p element\\r\\n     */\\r\\n\\r\\n    function P() {\\r\\n        ContentElement.call(this, 'p');\\r\\n    }\\r\\n\\r\\n    P.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML span element\\r\\n     */\\r\\n\\r\\n    function Span() {\\r\\n        ContentElement.call(this, 'span');\\r\\n    }\\r\\n\\r\\n    Span.prototype.initFromNode = function (doc, parent, node, xmlspace, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n\\r\\n        this.space = xmlspace;\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML anonymous span element\\r\\n     */\\r\\n\\r\\n    function AnonymousSpan() {\\r\\n        ContentElement.call(this, 'span');\\r\\n    }\\r\\n\\r\\n    AnonymousSpan.prototype.initFromText = function (doc, parent, text, xmlspace, errorHandler) {\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, null, errorHandler);\\r\\n\\r\\n        this.text = text;\\r\\n        this.space = xmlspace;\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML br element\\r\\n     */\\r\\n\\r\\n    function Br() {\\r\\n        ContentElement.call(this, 'br');\\r\\n    }\\r\\n\\r\\n    Br.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Region element\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function Region() {\\r\\n    }\\r\\n\\r\\n    Region.prototype.createDefaultRegion = function () {\\r\\n        var r = new Region();\\r\\n\\r\\n        IdentifiedElement.call(r, '');\\r\\n        StyledElement.call(r, {});\\r\\n        AnimatedElement.call(r, []);\\r\\n        TimedElement.call(r, 0, Number.POSITIVE_INFINITY, null);\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n    Region.prototype.initFromNode = function (doc, node, errorHandler) {\\r\\n        IdentifiedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n\\r\\n        /* immediately merge referenced styles */\\r\\n\\r\\n        if (doc.head !== null && doc.head.styling !== null) {\\r\\n            mergeReferencedStyles(doc.head.styling, elementGetStyleRefs(node), this.styleAttrs, errorHandler);\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Set element\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function Set() {\\r\\n    }\\r\\n\\r\\n    Set.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n\\r\\n        var styles = elementGetStyles(node, errorHandler);\\r\\n\\r\\n        this.qname = null;\\r\\n        this.value = null;\\r\\n\\r\\n        for (var qname in styles) {\\r\\n\\r\\n            if (this.qname) {\\r\\n\\r\\n                reportError(errorHandler, \\\"More than one style specified on set\\\");\\r\\n                break;\\r\\n\\r\\n            }\\r\\n\\r\\n            this.qname = qname;\\r\\n            this.value = styles[qname];\\r\\n\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Utility functions\\r\\n     * \\r\\n     */\\r\\n\\r\\n\\r\\n    function elementGetXMLID(node) {\\r\\n        return node && 'xml:id' in node.attributes ? node.attributes['xml:id'].value || null : null;\\r\\n    }\\r\\n\\r\\n    function elementGetRegionID(node) {\\r\\n        return node && 'region' in node.attributes ? node.attributes.region.value : '';\\r\\n    }\\r\\n\\r\\n    function elementGetTimeContainer(node, errorHandler) {\\r\\n\\r\\n        var tc = node && 'timeContainer' in node.attributes ? node.attributes.timeContainer.value : null;\\r\\n\\r\\n        if ((!tc) || tc === \\\"par\\\") {\\r\\n\\r\\n            return \\\"par\\\";\\r\\n\\r\\n        } else if (tc === \\\"seq\\\") {\\r\\n\\r\\n            return \\\"seq\\\";\\r\\n\\r\\n        } else {\\r\\n\\r\\n            reportError(errorHandler, \\\"Illegal value of timeContainer (assuming 'par')\\\");\\r\\n\\r\\n            return \\\"par\\\";\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function elementGetStyleRefs(node) {\\r\\n\\r\\n        return node && 'style' in node.attributes ? node.attributes.style.value.split(\\\" \\\") : [];\\r\\n\\r\\n    }\\r\\n\\r\\n    function elementGetStyles(node, errorHandler) {\\r\\n\\r\\n        var s = {};\\r\\n\\r\\n        if (node !== null) {\\r\\n\\r\\n            for (var i in node.attributes) {\\r\\n\\r\\n                var qname = node.attributes[i].uri + \\\" \\\" + node.attributes[i].local;\\r\\n\\r\\n                var sa = imscStyles.byQName[qname];\\r\\n\\r\\n                if (sa !== undefined) {\\r\\n\\r\\n                    var val = sa.parse(node.attributes[i].value);\\r\\n\\r\\n                    if (val !== null) {\\r\\n\\r\\n                        s[qname] = val;\\r\\n\\r\\n                        /* TODO: consider refactoring errorHandler into parse and compute routines */\\r\\n\\r\\n                        if (sa === imscStyles.byName.zIndex) {\\r\\n                            reportWarning(errorHandler, \\\"zIndex attribute present but not used by IMSC1 since regions do not overlap\\\");\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        reportError(errorHandler, \\\"Cannot parse styling attribute \\\" + qname + \\\" --> \\\" + node.attributes[i].value);\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return s;\\r\\n    }\\r\\n\\r\\n    function findAttribute(node, ns, name) {\\r\\n        for (var i in node.attributes) {\\r\\n\\r\\n            if (node.attributes[i].uri === ns &&\\r\\n                    node.attributes[i].local === name) {\\r\\n\\r\\n                return node.attributes[i].value;\\r\\n            }\\r\\n        }\\r\\n\\r\\n        return null;\\r\\n    }\\r\\n\\r\\n    function extractAspectRatio(node, errorHandler) {\\r\\n\\r\\n        var ar = findAttribute(node, imscNames.ns_ittp, \\\"aspectRatio\\\");\\r\\n\\r\\n        if (ar === null) {\\r\\n            \\r\\n            ar = findAttribute(node, imscNames.ns_ttp, \\\"displayAspectRatio\\\");\\r\\n            \\r\\n        }\\r\\n\\r\\n        var rslt = null;\\r\\n\\r\\n        if (ar !== null) {\\r\\n\\r\\n            var ASPECT_RATIO_RE = /(\\\\d+)\\\\s+(\\\\d+)/;\\r\\n\\r\\n            var m = ASPECT_RATIO_RE.exec(ar);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                var w = parseInt(m[1]);\\r\\n\\r\\n                var h = parseInt(m[2]);\\r\\n\\r\\n                if (w !== 0 && h !== 0) {\\r\\n\\r\\n                    rslt = w / h;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    reportError(errorHandler, \\\"Illegal aspectRatio values (ignoring)\\\");\\r\\n                }\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportError(errorHandler, \\\"Malformed aspectRatio attribute (ignoring)\\\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return rslt;\\r\\n\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Returns the cellResolution attribute from a node\\r\\n     * \\r\\n     */\\r\\n    function extractCellResolution(node, errorHandler) {\\r\\n\\r\\n        var cr = findAttribute(node, imscNames.ns_ttp, \\\"cellResolution\\\");\\r\\n\\r\\n        // initial value\\r\\n\\r\\n        var h = 15;\\r\\n        var w = 32;\\r\\n\\r\\n        if (cr !== null) {\\r\\n\\r\\n            var CELL_RESOLUTION_RE = /(\\\\d+) (\\\\d+)/;\\r\\n\\r\\n            var m = CELL_RESOLUTION_RE.exec(cr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                w = parseInt(m[1]);\\r\\n\\r\\n                h = parseInt(m[2]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed cellResolution value (using initial value instead)\\\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {'w': w, 'h': h};\\r\\n\\r\\n    }\\r\\n\\r\\n\\r\\n    function extractFrameAndTickRate(node, errorHandler) {\\r\\n\\r\\n        // subFrameRate is ignored per IMSC1 specification\\r\\n\\r\\n        // extract frame rate\\r\\n\\r\\n        var fps_attr = findAttribute(node, imscNames.ns_ttp, \\\"frameRate\\\");\\r\\n\\r\\n        // initial value\\r\\n\\r\\n        var fps = 30;\\r\\n\\r\\n        // match variable\\r\\n\\r\\n        var m;\\r\\n\\r\\n        if (fps_attr !== null) {\\r\\n\\r\\n            var FRAME_RATE_RE = /(\\\\d+)/;\\r\\n\\r\\n            m = FRAME_RATE_RE.exec(fps_attr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                fps = parseInt(m[1]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed frame rate attribute (using initial value instead)\\\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        // extract frame rate multiplier\\r\\n\\r\\n        var frm_attr = findAttribute(node, imscNames.ns_ttp, \\\"frameRateMultiplier\\\");\\r\\n\\r\\n        // initial value\\r\\n\\r\\n        var frm = 1;\\r\\n\\r\\n        if (frm_attr !== null) {\\r\\n\\r\\n            var FRAME_RATE_MULT_RE = /(\\\\d+) (\\\\d+)/;\\r\\n\\r\\n            m = FRAME_RATE_MULT_RE.exec(frm_attr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                frm = parseInt(m[1]) / parseInt(m[2]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed frame rate multiplier attribute (using initial value instead)\\\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        var efps = frm * fps;\\r\\n\\r\\n        // extract tick rate\\r\\n\\r\\n        var tr = 1;\\r\\n\\r\\n        var trattr = findAttribute(node, imscNames.ns_ttp, \\\"tickRate\\\");\\r\\n\\r\\n        if (trattr === null) {\\r\\n\\r\\n            if (fps_attr !== null)\\r\\n                tr = efps;\\r\\n\\r\\n        } else {\\r\\n\\r\\n            var TICK_RATE_RE = /(\\\\d+)/;\\r\\n\\r\\n            m = TICK_RATE_RE.exec(trattr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                tr = parseInt(m[1]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed tick rate attribute (using initial value instead)\\\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {effectiveFrameRate: efps, tickRate: tr};\\r\\n\\r\\n    }\\r\\n\\r\\n    function extractExtent(node, errorHandler) {\\r\\n\\r\\n        var attr = findAttribute(node, imscNames.ns_tts, \\\"extent\\\");\\r\\n\\r\\n        if (attr === null)\\r\\n            return null;\\r\\n\\r\\n        var s = attr.split(\\\" \\\");\\r\\n\\r\\n        if (s.length !== 2) {\\r\\n\\r\\n            reportWarning(errorHandler, \\\"Malformed extent (ignoring)\\\");\\r\\n\\r\\n            return null;\\r\\n        }\\r\\n\\r\\n        var w = imscUtils.parseLength(s[0]);\\r\\n\\r\\n        var h = imscUtils.parseLength(s[1]);\\r\\n\\r\\n        if (!h || !w) {\\r\\n\\r\\n            reportWarning(errorHandler, \\\"Malformed extent values (ignoring)\\\");\\r\\n\\r\\n            return null;\\r\\n        }\\r\\n\\r\\n        return {'h': h, 'w': w};\\r\\n\\r\\n    }\\r\\n\\r\\n    function parseTimeExpression(tickRate, effectiveFrameRate, str) {\\r\\n\\r\\n        var CLOCK_TIME_FRACTION_RE = /^(\\\\d{2,}):(\\\\d\\\\d):(\\\\d\\\\d(?:\\\\.\\\\d+)?)$/;\\r\\n        var CLOCK_TIME_FRAMES_RE = /^(\\\\d{2,}):(\\\\d\\\\d):(\\\\d\\\\d)\\\\:(\\\\d{2,})$/;\\r\\n        var OFFSET_FRAME_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)f$/;\\r\\n        var OFFSET_TICK_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)t$/;\\r\\n        var OFFSET_MS_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)ms$/;\\r\\n        var OFFSET_S_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)s$/;\\r\\n        var OFFSET_H_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)h$/;\\r\\n        var OFFSET_M_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)m$/;\\r\\n        var m;\\r\\n        var r = null;\\r\\n        if ((m = OFFSET_FRAME_RE.exec(str)) !== null) {\\r\\n\\r\\n            if (effectiveFrameRate !== null) {\\r\\n\\r\\n                r = parseFloat(m[1]) / effectiveFrameRate;\\r\\n            }\\r\\n\\r\\n        } else if ((m = OFFSET_TICK_RE.exec(str)) !== null) {\\r\\n\\r\\n            if (tickRate !== null) {\\r\\n\\r\\n                r = parseFloat(m[1]) / tickRate;\\r\\n            }\\r\\n\\r\\n        } else if ((m = OFFSET_MS_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]) / 1000.0;\\r\\n\\r\\n        } else if ((m = OFFSET_S_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]);\\r\\n\\r\\n        } else if ((m = OFFSET_H_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]) * 3600.0;\\r\\n\\r\\n        } else if ((m = OFFSET_M_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]) * 60.0;\\r\\n\\r\\n        } else if ((m = CLOCK_TIME_FRACTION_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseInt(m[1]) * 3600 +\\r\\n                    parseInt(m[2]) * 60 +\\r\\n                    parseFloat(m[3]);\\r\\n\\r\\n        } else if ((m = CLOCK_TIME_FRAMES_RE.exec(str)) !== null) {\\r\\n\\r\\n            /* this assumes that HH:MM:SS is a clock-time-with-fraction */\\r\\n\\r\\n            if (effectiveFrameRate !== null) {\\r\\n\\r\\n                r = parseInt(m[1]) * 3600 +\\r\\n                        parseInt(m[2]) * 60 +\\r\\n                        parseInt(m[3]) +\\r\\n                        (m[4] === null ? 0 : parseInt(m[4]) / effectiveFrameRate);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    }\\r\\n\\r\\n    function processTiming(doc, parent, node, errorHandler) {\\r\\n\\r\\n        /* determine explicit begin */\\r\\n\\r\\n        var explicit_begin = null;\\r\\n\\r\\n        if (node && 'begin' in node.attributes) {\\r\\n\\r\\n            explicit_begin = parseTimeExpression(doc.tickRate, doc.effectiveFrameRate, node.attributes.begin.value);\\r\\n\\r\\n            if (explicit_begin === null) {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed begin value \\\" + node.attributes.begin.value + \\\" (using 0)\\\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* determine explicit duration */\\r\\n\\r\\n        var explicit_dur = null;\\r\\n\\r\\n        if (node && 'dur' in node.attributes) {\\r\\n\\r\\n            explicit_dur = parseTimeExpression(doc.tickRate, doc.effectiveFrameRate, node.attributes.dur.value);\\r\\n\\r\\n            if (explicit_dur === null) {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed dur value \\\" + node.attributes.dur.value + \\\" (ignoring)\\\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* determine explicit end */\\r\\n\\r\\n        var explicit_end = null;\\r\\n\\r\\n        if (node && 'end' in node.attributes) {\\r\\n\\r\\n            explicit_end = parseTimeExpression(doc.tickRate, doc.effectiveFrameRate, node.attributes.end.value);\\r\\n\\r\\n            if (explicit_end === null) {\\r\\n\\r\\n                reportWarning(errorHandler, \\\"Malformed end value (ignoring)\\\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {explicit_begin: explicit_begin,\\r\\n            explicit_end: explicit_end,\\r\\n            explicit_dur: explicit_dur};\\r\\n\\r\\n    }\\r\\n\\r\\n\\r\\n\\r\\n    function mergeChainedStyles(styling, style, errorHandler) {\\r\\n\\r\\n        while (style.styleRefs.length > 0) {\\r\\n\\r\\n            var sref = style.styleRefs.pop();\\r\\n\\r\\n            if (!(sref in styling.styles)) {\\r\\n                reportError(errorHandler, \\\"Non-existant style id referenced\\\");\\r\\n                continue;\\r\\n            }\\r\\n\\r\\n            mergeChainedStyles(styling, styling.styles[sref], errorHandler);\\r\\n\\r\\n            mergeStylesIfNotPresent(styling.styles[sref].styleAttrs, style.styleAttrs);\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function mergeReferencedStyles(styling, stylerefs, styleattrs, errorHandler) {\\r\\n\\r\\n        for (var i = stylerefs.length - 1; i >= 0; i--) {\\r\\n\\r\\n            var sref = stylerefs[i];\\r\\n\\r\\n            if (!(sref in styling.styles)) {\\r\\n                reportError(errorHandler, \\\"Non-existant style id referenced\\\");\\r\\n                continue;\\r\\n            }\\r\\n\\r\\n            mergeStylesIfNotPresent(styling.styles[sref].styleAttrs, styleattrs);\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function mergeStylesIfNotPresent(from_styles, into_styles) {\\r\\n\\r\\n        for (var sname in from_styles) {\\r\\n\\r\\n            if (sname in into_styles)\\r\\n                continue;\\r\\n\\r\\n            into_styles[sname] = from_styles[sname];\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    /* TODO: validate style format at parsing */\\r\\n\\r\\n\\r\\n    /*\\r\\n     * ERROR HANDLING UTILITY FUNCTIONS\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function reportInfo(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.info && errorHandler.info(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportWarning(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.warn && errorHandler.warn(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportError(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.error && errorHandler.error(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportFatal(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.fatal)\\r\\n            errorHandler.fatal(msg);\\r\\n\\r\\n        throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Binary search utility function\\r\\n     * \\r\\n     * @typedef {Object} BinarySearchResult\\r\\n     * @property {boolean} found Was an exact match found?\\r\\n     * @property {number} index Position of the exact match or insert position\\r\\n     * \\r\\n     * @returns {BinarySearchResult}\\r\\n     */\\r\\n\\r\\n    function indexOf(arr, searchval) {\\r\\n\\r\\n        var min = 0;\\r\\n        var max = arr.length - 1;\\r\\n        var cur;\\r\\n\\r\\n        while (min <= max) {\\r\\n\\r\\n            cur = Math.floor((min + max) / 2);\\r\\n\\r\\n            var curval = arr[cur];\\r\\n\\r\\n            if (curval < searchval) {\\r\\n\\r\\n                min = cur + 1;\\r\\n\\r\\n            } else if (curval > searchval) {\\r\\n\\r\\n                max = cur - 1;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                return {found: true, index: cur};\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {found: false, index: min};\\r\\n    }\\r\\n\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n        typeof sax === 'undefined' ? __webpack_require__(/*! sax */ \\\"../node_modules/imsc/node_modules/sax/lib/sax.js\\\") : sax,\\r\\n        typeof imscNames === 'undefined' ? __webpack_require__(/*! ./names */ \\\"../node_modules/imsc/src/main/js/names.js\\\") : imscNames,\\r\\n        typeof imscStyles === 'undefined' ? __webpack_require__(/*! ./styles */ \\\"../node_modules/imsc/src/main/js/styles.js\\\") : imscStyles,\\r\\n        typeof imscUtils === 'undefined' ? __webpack_require__(/*! ./utils */ \\\"../node_modules/imsc/src/main/js/utils.js\\\") : imscUtils);\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/doc.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/html.js\":\n/*!************************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/html.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscHTML\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscHTML, imscNames, imscStyles) {\\r\\n\\r\\n    /**\\r\\n     * Function that maps <pre>smpte:background</pre> URIs to URLs resolving to image resource\\r\\n     * @callback IMGResolver\\r\\n     * @param {string} <pre>smpte:background</pre> URI\\r\\n     * @return {string} PNG resource URL\\r\\n     */\\r\\n\\r\\n\\r\\n    /**\\r\\n     * Renders an ISD object (returned by <pre>generateISD()</pre>) into a \\r\\n     * parent element, that must be attached to the DOM. The ISD will be rendered\\r\\n     * into a child <pre>div</pre>\\r\\n     * with heigh and width equal to the clientHeight and clientWidth of the element,\\r\\n     * unless explicitly specified otherwise by the caller. Images URIs specified \\r\\n     * by <pre>smpte:background</pre> attributes are mapped to image resource URLs\\r\\n     * by an <pre>imgResolver</pre> function. The latter takes the value of <code>smpte:background</code>\\r\\n     * attribute and an <code>img</code> DOM element as input, and is expected to\\r\\n     * set the <code>src</code> attribute of the <code>img</code> to the absolute URI of the image.\\r\\n     * <pre>displayForcedOnlyMode</pre> sets the (boolean)\\r\\n     * value of the IMSC1 displayForcedOnlyMode parameter. The function returns\\r\\n     * an opaque object that should passed in <code>previousISDState</code> when this function\\r\\n     * is called for the next ISD, otherwise <code>previousISDState</code> should be set to \\r\\n     * <code>null</code>.\\r\\n     * \\r\\n     * @param {Object} isd ISD to be rendered\\r\\n     * @param {Object} element Element into which the ISD is rendered\\r\\n     * @param {?IMGResolver} imgResolver Resolve <pre>smpte:background</pre> URIs into URLs.\\r\\n     * @param {?number} eheight Height (in pixel) of the child <div>div</div> or null \\r\\n     *                  to use clientHeight of the parent element\\r\\n     * @param {?number} ewidth Width (in pixel) of the child <div>div</div> or null\\r\\n     *                  to use clientWidth of the parent element\\r\\n     * @param {?boolean} displayForcedOnlyMode Value of the IMSC1 displayForcedOnlyMode parameter,\\r\\n     *                   or false if null         \\r\\n     * @param {?module:imscUtils.ErrorHandler} errorHandler Error callback\\r\\n     * @param {Object} previousISDState State saved during processing of the previous ISD, or null if initial call\\r\\n     * @param {?boolean} enableRollUp Enables roll-up animations (see CEA 708)\\r\\n     * @return {Object} ISD state to be provided when this funtion is called for the next ISD\\r\\n     */\\r\\n\\r\\n    imscHTML.render = function (isd,\\r\\n            element,\\r\\n            imgResolver,\\r\\n            eheight,\\r\\n            ewidth,\\r\\n            displayForcedOnlyMode,\\r\\n            errorHandler,\\r\\n            previousISDState,\\r\\n            enableRollUp\\r\\n            ) {\\r\\n\\r\\n        /* maintain aspect ratio if specified */\\r\\n\\r\\n        var height = eheight || element.clientHeight;\\r\\n        var width = ewidth || element.clientWidth;\\r\\n\\r\\n        if (isd.aspectRatio !== null) {\\r\\n\\r\\n            var twidth = height * isd.aspectRatio;\\r\\n\\r\\n            if (twidth > width) {\\r\\n\\r\\n                height = Math.round(width / isd.aspectRatio);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                width = twidth;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        var rootcontainer = document.createElement(\\\"div\\\");\\r\\n\\r\\n        rootcontainer.style.position = \\\"relative\\\";\\r\\n        rootcontainer.style.width = width + \\\"px\\\";\\r\\n        rootcontainer.style.height = height + \\\"px\\\";\\r\\n        rootcontainer.style.margin = \\\"auto\\\";\\r\\n        rootcontainer.style.top = 0;\\r\\n        rootcontainer.style.bottom = 0;\\r\\n        rootcontainer.style.left = 0;\\r\\n        rootcontainer.style.right = 0;\\r\\n        rootcontainer.style.zIndex = 0;\\r\\n\\r\\n        var context = {\\r\\n            h: height,\\r\\n            w: width,\\r\\n            regionH: null,\\r\\n            regionW: null,\\r\\n            imgResolver: imgResolver,\\r\\n            displayForcedOnlyMode: displayForcedOnlyMode || false,\\r\\n            isd: isd,\\r\\n            errorHandler: errorHandler,\\r\\n            previousISDState: previousISDState,\\r\\n            enableRollUp: enableRollUp || false,\\r\\n            currentISDState: {},\\r\\n            flg: null, /* current fillLineGap value if active, null otherwise */\\r\\n            lp: null, /* current linePadding value if active, null otherwise */\\r\\n            mra: null, /* current multiRowAlign value if active, null otherwise */\\r\\n            ipd: null, /* inline progression direction (lr, rl, tb) */\\r\\n            bpd: null, /* block progression direction (lr, rl, tb) */\\r\\n            ruby: null, /* is ruby present in a <p> */\\r\\n            textEmphasis: null, /* is textEmphasis present in a <p> */\\r\\n            rubyReserve: null /* is rubyReserve applicable to a <p> */\\r\\n        };\\r\\n\\r\\n        element.appendChild(rootcontainer);\\r\\n\\r\\n        for (var i in isd.contents) {\\r\\n\\r\\n            processElement(context, rootcontainer, isd.contents[i]);\\r\\n\\r\\n        }\\r\\n\\r\\n        return context.currentISDState;\\r\\n\\r\\n    };\\r\\n\\r\\n    function processElement(context, dom_parent, isd_element) {\\r\\n\\r\\n        var e;\\r\\n\\r\\n        if (isd_element.kind === 'region') {\\r\\n\\r\\n            e = document.createElement(\\\"div\\\");\\r\\n            e.style.position = \\\"absolute\\\";\\r\\n\\r\\n        } else if (isd_element.kind === 'body') {\\r\\n\\r\\n            e = document.createElement(\\\"div\\\");\\r\\n\\r\\n        } else if (isd_element.kind === 'div') {\\r\\n\\r\\n            e = document.createElement(\\\"div\\\");\\r\\n\\r\\n        } else if (isd_element.kind === 'image') {\\r\\n\\r\\n            e = document.createElement(\\\"img\\\");\\r\\n\\r\\n            if (context.imgResolver !== null && isd_element.src !== null) {\\r\\n\\r\\n                var uri = context.imgResolver(isd_element.src, e);\\r\\n\\r\\n                if (uri)\\r\\n                    e.src = uri;\\r\\n\\r\\n                e.height = context.regionH;\\r\\n                e.width = context.regionW;\\r\\n\\r\\n            }\\r\\n\\r\\n        } else if (isd_element.kind === 'p') {\\r\\n\\r\\n            e = document.createElement(\\\"p\\\");\\r\\n\\r\\n        } else if (isd_element.kind === 'span') {\\r\\n\\r\\n            if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"container\\\") {\\r\\n\\r\\n                e = document.createElement(\\\"ruby\\\");\\r\\n\\r\\n                context.ruby = true;\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"base\\\") {\\r\\n\\r\\n                e = document.createElement(\\\"rb\\\");\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"text\\\") {\\r\\n\\r\\n                e = document.createElement(\\\"rt\\\");\\r\\n\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"baseContainer\\\") {\\r\\n\\r\\n                e = document.createElement(\\\"rbc\\\");\\r\\n\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"textContainer\\\") {\\r\\n\\r\\n                e = document.createElement(\\\"rtc\\\");\\r\\n\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"delimiter\\\") {\\r\\n\\r\\n                /* ignore rp */\\r\\n\\r\\n                return;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                e = document.createElement(\\\"span\\\");\\r\\n\\r\\n            }\\r\\n\\r\\n            var te = isd_element.styleAttrs[imscStyles.byName.textEmphasis.qname];\\r\\n\\r\\n            if (te && te.style !== \\\"none\\\") {\\r\\n\\r\\n                context.textEmphasis = true;\\r\\n\\r\\n            }\\r\\n\\r\\n            //e.textContent = isd_element.text;\\r\\n\\r\\n        } else if (isd_element.kind === 'br') {\\r\\n\\r\\n            e = document.createElement(\\\"br\\\");\\r\\n\\r\\n        }\\r\\n\\r\\n        if (!e) {\\r\\n\\r\\n            reportError(context.errorHandler, \\\"Error processing ISD element kind: \\\" + isd_element.kind);\\r\\n\\r\\n            return;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* add to parent */\\r\\n\\r\\n        dom_parent.appendChild(e);\\r\\n\\r\\n        /* override UA default margin */\\r\\n        /* TODO: should apply to <p> only */\\r\\n\\r\\n        e.style.margin = \\\"0\\\";\\r\\n\\r\\n        /* tranform TTML styles to CSS styles */\\r\\n\\r\\n        for (var i in STYLING_MAP_DEFS) {\\r\\n\\r\\n            var sm = STYLING_MAP_DEFS[i];\\r\\n\\r\\n            var attr = isd_element.styleAttrs[sm.qname];\\r\\n\\r\\n            if (attr !== undefined && sm.map !== null) {\\r\\n\\r\\n                sm.map(context, e, isd_element, attr);\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        var proc_e = e;\\r\\n\\r\\n        /* remember writing direction */\\r\\n\\r\\n        if (isd_element.kind === \\\"region\\\") {\\r\\n\\r\\n            var wdir = isd_element.styleAttrs[imscStyles.byName.writingMode.qname];\\r\\n\\r\\n            if (wdir === \\\"lrtb\\\" || wdir === \\\"lr\\\") {\\r\\n\\r\\n                context.ipd = \\\"lr\\\";\\r\\n                context.bpd = \\\"tb\\\";\\r\\n\\r\\n            } else if (wdir === \\\"rltb\\\" || wdir === \\\"rl\\\") {\\r\\n\\r\\n                context.ipd = \\\"rl\\\";\\r\\n                context.bpd = \\\"tb\\\";\\r\\n\\r\\n            } else if (wdir === \\\"tblr\\\") {\\r\\n\\r\\n                context.ipd = \\\"tb\\\";\\r\\n                context.bpd = \\\"lr\\\";\\r\\n\\r\\n            } else if (wdir === \\\"tbrl\\\" || wdir === \\\"tb\\\") {\\r\\n\\r\\n                context.ipd = \\\"tb\\\";\\r\\n                context.bpd = \\\"rl\\\";\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* do we have linePadding ? */\\r\\n\\r\\n        var lp = isd_element.styleAttrs[imscStyles.byName.linePadding.qname];\\r\\n\\r\\n        if (lp && (! lp.isZero())) {\\r\\n\\r\\n            var plength = lp.toUsedLength(context.w, context.h);\\r\\n\\r\\n\\r\\n            if (plength > 0) {\\r\\n                \\r\\n                /* apply padding to the <p> so that line padding does not cause line wraps */\\r\\n\\r\\n                var padmeasure = Math.ceil(plength) + \\\"px\\\";\\r\\n\\r\\n                if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                    proc_e.style.paddingLeft = padmeasure;\\r\\n                    proc_e.style.paddingRight = padmeasure;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    proc_e.style.paddingTop = padmeasure;\\r\\n                    proc_e.style.paddingBottom = padmeasure;\\r\\n\\r\\n                }\\r\\n\\r\\n                context.lp = lp;\\r\\n            }\\r\\n        }\\r\\n\\r\\n        // do we have multiRowAlign?\\r\\n\\r\\n        var mra = isd_element.styleAttrs[imscStyles.byName.multiRowAlign.qname];\\r\\n\\r\\n        if (mra && mra !== \\\"auto\\\") {\\r\\n\\r\\n            /* create inline block to handle multirowAlign */\\r\\n\\r\\n            var s = document.createElement(\\\"span\\\");\\r\\n\\r\\n            s.style.display = \\\"inline-block\\\";\\r\\n\\r\\n            s.style.textAlign = mra;\\r\\n\\r\\n            e.appendChild(s);\\r\\n\\r\\n            proc_e = s;\\r\\n\\r\\n            context.mra = mra;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* do we have rubyReserve? */\\r\\n\\r\\n        var rr = isd_element.styleAttrs[imscStyles.byName.rubyReserve.qname];\\r\\n\\r\\n        if (rr && rr[0] !== \\\"none\\\") {\\r\\n            context.rubyReserve = rr;\\r\\n        }\\r\\n\\r\\n\\r\\n        /* remember we are filling line gaps */\\r\\n\\r\\n        if (isd_element.styleAttrs[imscStyles.byName.fillLineGap.qname]) {\\r\\n            context.flg = true;\\r\\n        }\\r\\n\\r\\n\\r\\n        if (isd_element.kind === \\\"span\\\" && isd_element.text) {\\r\\n\\r\\n            if (imscStyles.byName.textCombine.qname in isd_element.styleAttrs &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.textCombine.qname][0] === \\\"all\\\") {\\r\\n\\r\\n                /* ignore tate-chu-yoku since line break cannot happen within */\\r\\n                e.textContent = isd_element.text;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                // wrap characters in spans to find the line wrap locations\\r\\n\\r\\n                var cbuf = '';\\r\\n\\r\\n                for (var j = 0; j < isd_element.text.length; j++) {\\r\\n\\r\\n                    cbuf += isd_element.text.charAt(j);\\r\\n\\r\\n                    var cc = isd_element.text.charCodeAt(j);\\r\\n\\r\\n                    if (cc < 0xD800 || cc > 0xDBFF || j === isd_element.text.length) {\\r\\n\\r\\n                        /* wrap the character(s) in a span unless it is a high surrogate */\\r\\n\\r\\n                        var span = document.createElement(\\\"span\\\");\\r\\n\\r\\n                        span.textContent = cbuf;\\r\\n    \\r\\n                        e.appendChild(span);\\r\\n\\r\\n                        cbuf = '';\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n        }\\r\\n\\r\\n        /* process the children of the ISD element */\\r\\n\\r\\n        for (var k in isd_element.contents) {\\r\\n\\r\\n            processElement(context, proc_e, isd_element.contents[k]);\\r\\n\\r\\n        }\\r\\n\\r\\n        /* list of lines */\\r\\n\\r\\n        var linelist = [];\\r\\n\\r\\n\\r\\n        /* paragraph processing */\\r\\n        /* TODO: linePadding only supported for horizontal scripts */\\r\\n\\r\\n        if ((context.lp || context.mra || context.flg || context.ruby || context.textEmphasis || context.rubyReserve) &&\\r\\n                isd_element.kind === \\\"p\\\") {\\r\\n\\r\\n            constructLineList(context, proc_e, linelist, null);\\r\\n\\r\\n            /* apply rubyReserve */\\r\\n\\r\\n            if (context.rubyReserve) {\\r\\n\\r\\n                applyRubyReserve(linelist, context);\\r\\n\\r\\n                context.rubyReserve = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* apply tts:rubyPosition=\\\"outside\\\" */\\r\\n\\r\\n            if (context.ruby || context.rubyReserve) {\\r\\n\\r\\n                applyRubyPosition(linelist, context);\\r\\n\\r\\n                context.ruby = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* apply text emphasis \\\"outside\\\" position */\\r\\n\\r\\n            if (context.textEmphasis) {\\r\\n\\r\\n                applyTextEmphasis(linelist, context);\\r\\n\\r\\n                context.textEmphasis = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* insert line breaks for multirowalign */\\r\\n\\r\\n            if (context.mra) {\\r\\n\\r\\n                applyMultiRowAlign(linelist);\\r\\n\\r\\n                context.mra = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* add linepadding */\\r\\n\\r\\n            if (context.lp) {\\r\\n\\r\\n                applyLinePadding(linelist, context.lp.toUsedLength(context.w, context.h), context);\\r\\n\\r\\n                context.lp = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* fill line gaps linepadding */\\r\\n\\r\\n            if (context.flg) {\\r\\n\\r\\n                var par_edges = rect2edges(proc_e.getBoundingClientRect(), context);\\r\\n\\r\\n                applyFillLineGap(linelist, par_edges.before, par_edges.after, context);\\r\\n\\r\\n                context.flg = null;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n\\r\\n        /* region processing */\\r\\n\\r\\n        if (isd_element.kind === \\\"region\\\") {\\r\\n\\r\\n            /* build line list */\\r\\n\\r\\n            constructLineList(context, proc_e, linelist);\\r\\n\\r\\n            /* perform roll up if needed */\\r\\n\\r\\n            if ((context.bpd === \\\"tb\\\") &&\\r\\n                    context.enableRollUp &&\\r\\n                    isd_element.contents.length > 0 &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.displayAlign.qname] === 'after') {\\r\\n\\r\\n                /* horrible hack, perhaps default region id should be underscore everywhere? */\\r\\n\\r\\n                var rid = isd_element.id === '' ? '_' : isd_element.id;\\r\\n\\r\\n                var rb = new RegionPBuffer(rid, linelist);\\r\\n\\r\\n                context.currentISDState[rb.id] = rb;\\r\\n\\r\\n                if (context.previousISDState &&\\r\\n                        rb.id in context.previousISDState &&\\r\\n                        context.previousISDState[rb.id].plist.length > 0 &&\\r\\n                        rb.plist.length > 1 &&\\r\\n                        rb.plist[rb.plist.length - 2].text ===\\r\\n                        context.previousISDState[rb.id].plist[context.previousISDState[rb.id].plist.length - 1].text) {\\r\\n\\r\\n                    var body_elem = e.firstElementChild;\\r\\n\\r\\n                    var h = rb.plist[rb.plist.length - 1].after - rb.plist[rb.plist.length - 1].before;\\r\\n\\r\\n                    body_elem.style.bottom = \\\"-\\\" + h + \\\"px\\\";\\r\\n                    body_elem.style.transition = \\\"transform 0.4s\\\";\\r\\n                    body_elem.style.position = \\\"relative\\\";\\r\\n                    body_elem.style.transform = \\\"translateY(-\\\" + h + \\\"px)\\\";\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* TODO: clean-up the spans ? */\\r\\n\\r\\n        }\\r\\n    }\\r\\n\\r\\n    function applyLinePadding(lineList, lp, context) {\\r\\n\\r\\n        for (var i in lineList) {\\r\\n\\r\\n            var l = lineList[i].elements.length;\\r\\n\\r\\n            var se = lineList[i].elements[lineList[i].start_elem];\\r\\n\\r\\n            var ee = lineList[i].elements[lineList[i].end_elem];\\r\\n\\r\\n            var pospadpxlen = Math.ceil(lp) + \\\"px\\\";\\r\\n\\r\\n            var negpadpxlen = \\\"-\\\" + Math.ceil(lp) + \\\"px\\\";\\r\\n\\r\\n            if (l !== 0) {\\r\\n\\r\\n                if (context.ipd === \\\"lr\\\") {\\r\\n\\r\\n                    se.node.style.borderLeftColor = se.bgcolor || \\\"#00000000\\\";\\r\\n                    se.node.style.borderLeftStyle = \\\"solid\\\";\\r\\n                    se.node.style.borderLeftWidth = pospadpxlen;\\r\\n                    se.node.style.marginLeft = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \\\"rl\\\") {\\r\\n\\r\\n                    se.node.style.borderRightColor = se.bgcolor || \\\"#00000000\\\";\\r\\n                    se.node.style.borderRightStyle = \\\"solid\\\";\\r\\n                    se.node.style.borderRightWidth = pospadpxlen;\\r\\n                    se.node.style.marginRight = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \\\"tb\\\") {\\r\\n\\r\\n                    se.node.style.borderTopColor = se.bgcolor || \\\"#00000000\\\";\\r\\n                    se.node.style.borderTopStyle = \\\"solid\\\";\\r\\n                    se.node.style.borderTopWidth = pospadpxlen;\\r\\n                    se.node.style.marginTop = negpadpxlen;\\r\\n\\r\\n                }\\r\\n\\r\\n                if (context.ipd === \\\"lr\\\") {\\r\\n\\r\\n                    ee.node.style.borderRightColor = ee.bgcolor  || \\\"#00000000\\\";\\r\\n                    ee.node.style.borderRightStyle = \\\"solid\\\";\\r\\n                    ee.node.style.borderRightWidth = pospadpxlen;\\r\\n                    ee.node.style.marginRight = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \\\"rl\\\") {\\r\\n\\r\\n                    ee.node.style.borderLeftColor = ee.bgcolor || \\\"#00000000\\\";\\r\\n                    ee.node.style.borderLeftStyle = \\\"solid\\\";\\r\\n                    ee.node.style.borderLeftWidth = pospadpxlen;\\r\\n                    ee.node.style.marginLeft = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \\\"tb\\\") {\\r\\n\\r\\n                    ee.node.style.borderBottomColor = ee.bgcolor || \\\"#00000000\\\";\\r\\n                    ee.node.style.borderBottomStyle = \\\"solid\\\";\\r\\n                    ee.node.style.borderBottomWidth = pospadpxlen;\\r\\n                    ee.node.style.marginBottom = negpadpxlen;\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyMultiRowAlign(lineList) {\\r\\n\\r\\n        /* apply an explicit br to all but the last line */\\r\\n\\r\\n        for (var i = 0; i < lineList.length - 1; i++) {\\r\\n\\r\\n            var l = lineList[i].elements.length;\\r\\n\\r\\n            if (l !== 0 && lineList[i].br === false) {\\r\\n                var br = document.createElement(\\\"br\\\");\\r\\n\\r\\n                var lastnode = lineList[i].elements[l - 1].node;\\r\\n\\r\\n                lastnode.parentElement.insertBefore(br, lastnode.nextSibling);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyTextEmphasis(lineList, context) {\\r\\n\\r\\n        /* supports \\\"outside\\\" only */\\r\\n\\r\\n        for (var i = 0; i < lineList.length; i++) {\\r\\n\\r\\n            for (var j = 0; j < lineList[i].te.length; j++) {\\r\\n\\r\\n                /* skip if position already set */\\r\\n\\r\\n                if (lineList[i].te[j].style.textEmphasisPosition &&\\r\\n                    lineList[i].te[j].style.textEmphasisPosition !== \\\"none\\\")\\r\\n                    continue;\\r\\n\\r\\n                var pos;\\r\\n\\r\\n                if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                    pos = (i === 0) ? \\\"left over\\\" : \\\"left under\\\";\\r\\n\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n                        pos = (i === 0) ? \\\"right under\\\" : \\\"left under\\\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        pos = (i === 0) ? \\\"left under\\\" : \\\"right under\\\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                lineList[i].te[j].style.textEmphasisPosition = pos;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyRubyPosition(lineList, context) {\\r\\n\\r\\n        for (var i = 0; i < lineList.length; i++) {\\r\\n\\r\\n            for (var j = 0; j < lineList[i].rbc.length; j++) {\\r\\n\\r\\n                /* skip if ruby-position already set */\\r\\n\\r\\n                if (lineList[i].rbc[j].style.rubyPosition)\\r\\n                    continue;\\r\\n\\r\\n                var pos;\\r\\n\\r\\n                if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                    pos = (i === 0) ? \\\"over\\\" : \\\"under\\\";\\r\\n\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n                        pos = (i === 0) ? \\\"over\\\" : \\\"under\\\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        pos = (i === 0) ? \\\"under\\\" : \\\"over\\\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                lineList[i].rbc[j].style.rubyPosition = pos;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyRubyReserve(lineList, context) {\\r\\n\\r\\n        for (var i = 0; i < lineList.length; i++) {\\r\\n\\r\\n            var ruby = document.createElement(\\\"ruby\\\");\\r\\n\\r\\n            var rb = document.createElement(\\\"rb\\\");\\r\\n            rb.textContent = \\\"\\\\u200B\\\";\\r\\n\\r\\n            ruby.appendChild(rb);\\r\\n\\r\\n            var rt1;\\r\\n            var rt2;\\r\\n\\r\\n            var fs = context.rubyReserve[1].toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n\\r\\n            if (context.rubyReserve[0] === \\\"both\\\") {\\r\\n\\r\\n                rt1 = document.createElement(\\\"rtc\\\");\\r\\n                rt1.style.rubyPosition = \\\"under\\\";\\r\\n                rt1.textContent = \\\"\\\\u200B\\\";\\r\\n                rt1.style.fontSize = fs;\\r\\n\\r\\n                rt2 = document.createElement(\\\"rtc\\\");\\r\\n                rt2.style.rubyPosition = \\\"over\\\";\\r\\n                rt2.textContent = \\\"\\\\u200B\\\";\\r\\n                rt2.style.fontSize = fs;\\r\\n\\r\\n                ruby.appendChild(rt1);\\r\\n                ruby.appendChild(rt2);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                rt1 = document.createElement(\\\"rtc\\\");\\r\\n                rt1.textContent = \\\"\\\\u200B\\\";\\r\\n                rt1.style.fontSize = fs;\\r\\n\\r\\n                if (context.rubyReserve[0] === \\\"after\\\" || (context.rubyReserve[0] === \\\"outside\\\" && i > 0)) {\\r\\n\\r\\n                    rt1.style.rubyPosition = (context.bpd === \\\"tb\\\" || context.bpd === \\\"rl\\\") ? \\\"under\\\" : \\\"over\\\";\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rt1.style.rubyPosition = (context.bpd === \\\"tb\\\" || context.bpd === \\\"rl\\\") ? \\\"over\\\" : \\\"under\\\";\\r\\n\\r\\n                }\\r\\n\\r\\n                ruby.appendChild(rt1);\\r\\n\\r\\n            }\\r\\n\\r\\n            var e = lineList[i].elements[0].node.parentElement.insertBefore(\\r\\n                    ruby,\\r\\n                    lineList[i].elements[0].node\\r\\n                    );\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyFillLineGap(lineList, par_before, par_after, context) {\\r\\n\\r\\n        /* positive for BPD = lr and tb, negative for BPD = rl */\\r\\n        var s = Math.sign(par_after - par_before);\\r\\n\\r\\n        for (var i = 0; i <= lineList.length; i++) {\\r\\n\\r\\n            /* compute frontier between lines */\\r\\n\\r\\n            var frontier;\\r\\n\\r\\n            if (i === 0) {\\r\\n\\r\\n                frontier = par_before;\\r\\n\\r\\n            } else if (i === lineList.length) {\\r\\n\\r\\n                frontier = par_after;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                frontier = (lineList[i].before + lineList[i - 1].after) / 2;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* padding amount */\\r\\n\\r\\n            var pad;\\r\\n\\r\\n            /* current element */\\r\\n\\r\\n            var e;\\r\\n\\r\\n            /* before line */\\r\\n\\r\\n            if (i > 0) {\\r\\n\\r\\n                for (var j = 0; j < lineList[i - 1].elements.length; j++) {\\r\\n\\r\\n                    if (lineList[i - 1].elements[j].bgcolor === null)\\r\\n                        continue;\\r\\n\\r\\n                    e = lineList[i - 1].elements[j];\\r\\n\\r\\n                    if (s * (e.after - frontier) < 0) {\\r\\n\\r\\n                        pad = Math.ceil(Math.abs(frontier - e.after)) + \\\"px\\\";\\r\\n\\r\\n                        e.node.style.backgroundColor = e.bgcolor;\\r\\n\\r\\n                        if (context.bpd === \\\"lr\\\") {\\r\\n\\r\\n                            e.node.style.paddingRight = pad;\\r\\n\\r\\n\\r\\n                        } else if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n                            e.node.style.paddingLeft = pad;\\r\\n\\r\\n                        } else if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                            e.node.style.paddingBottom = pad;\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* after line */\\r\\n\\r\\n            if (i < lineList.length) {\\r\\n\\r\\n                for (var k = 0; k < lineList[i].elements.length; k++) {\\r\\n\\r\\n                    e = lineList[i].elements[k];\\r\\n\\r\\n                    if (e.bgcolor === null)\\r\\n                        continue;\\r\\n\\r\\n                    if (s * (e.before - frontier) > 0) {\\r\\n\\r\\n                        pad = Math.ceil(Math.abs(e.before - frontier)) + \\\"px\\\";\\r\\n\\r\\n                        e.node.style.backgroundColor = e.bgcolor;\\r\\n\\r\\n                        if (context.bpd === \\\"lr\\\") {\\r\\n\\r\\n                            e.node.style.paddingLeft = pad;\\r\\n\\r\\n\\r\\n                        } else if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n                            e.node.style.paddingRight = pad;\\r\\n\\r\\n\\r\\n                        } else if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                            e.node.style.paddingTop = pad;\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function RegionPBuffer(id, lineList) {\\r\\n\\r\\n        this.id = id;\\r\\n\\r\\n        this.plist = lineList;\\r\\n\\r\\n    }\\r\\n\\r\\n    function pruneEmptySpans(element) {\\r\\n\\r\\n        var child = element.firstChild;\\r\\n\\r\\n        while (child) {\\r\\n\\r\\n            var nchild = child.nextSibling;\\r\\n\\r\\n            if (child.nodeType === Node.ELEMENT_NODE &&\\r\\n                    child.localName === 'span') {\\r\\n\\r\\n                pruneEmptySpans(child);\\r\\n\\r\\n                if (child.childElementCount === 0 &&\\r\\n                        child.textContent.length === 0) {\\r\\n\\r\\n                    element.removeChild(child);\\r\\n\\r\\n                }\\r\\n            }\\r\\n\\r\\n            child = nchild;\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function rect2edges(rect, context) {\\r\\n\\r\\n        var edges = {before: null, after: null, start: null, end: null};\\r\\n\\r\\n        if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n            edges.before = rect.top;\\r\\n            edges.after = rect.bottom;\\r\\n\\r\\n            if (context.ipd === \\\"lr\\\") {\\r\\n\\r\\n                edges.start = rect.left;\\r\\n                edges.end = rect.right;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                edges.start = rect.right;\\r\\n                edges.end = rect.left;\\r\\n            }\\r\\n\\r\\n        } else if (context.bpd === \\\"lr\\\") {\\r\\n\\r\\n            edges.before = rect.left;\\r\\n            edges.after = rect.right;\\r\\n            edges.start = rect.top;\\r\\n            edges.end = rect.bottom;\\r\\n\\r\\n        } else if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n            edges.before = rect.right;\\r\\n            edges.after = rect.left;\\r\\n            edges.start = rect.top;\\r\\n            edges.end = rect.bottom;\\r\\n\\r\\n        }\\r\\n\\r\\n        return edges;\\r\\n\\r\\n    }\\r\\n\\r\\n    function constructLineList(context, element, llist, bgcolor) {\\r\\n\\r\\n        if (element.localName === \\\"rt\\\" || element.localName === \\\"rtc\\\") {\\r\\n\\r\\n            /* skip ruby annotations */\\r\\n\\r\\n            return;\\r\\n\\r\\n        }\\r\\n\\r\\n        var curbgcolor = element.style.backgroundColor || bgcolor;\\r\\n\\r\\n        if (element.childElementCount === 0) {\\r\\n\\r\\n            if (element.localName === 'span' || element.localName === 'rb') {\\r\\n\\r\\n                var r = element.getBoundingClientRect();\\r\\n\\r\\n                /* skip if span is not displayed */\\r\\n\\r\\n                if (r.height === 0 || r.width === 0)\\r\\n                    return;\\r\\n\\r\\n                var edges = rect2edges(r, context);\\r\\n\\r\\n                if (llist.length === 0 ||\\r\\n                        (!isSameLine(edges.before, edges.after, llist[llist.length - 1].before, llist[llist.length - 1].after))\\r\\n                        ) {\\r\\n\\r\\n                    llist.push({\\r\\n                        before: edges.before,\\r\\n                        after: edges.after,\\r\\n                        start: edges.start,\\r\\n                        end: edges.end,\\r\\n                        start_elem: 0,\\r\\n                        end_elem: 0,\\r\\n                        elements: [],\\r\\n                        rbc: [],\\r\\n                        te: [],\\r\\n                        text: \\\"\\\",\\r\\n                        br: false\\r\\n                    });\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    /* positive for BPD = lr and tb, negative for BPD = rl */\\r\\n                    var bpd_dir = Math.sign(edges.after - edges.before);\\r\\n\\r\\n                    /* positive for IPD = lr and tb, negative for IPD = rl */\\r\\n                    var ipd_dir = Math.sign(edges.end - edges.start);\\r\\n\\r\\n                    /* check if the line height has increased */\\r\\n\\r\\n                    if (bpd_dir * (edges.before - llist[llist.length - 1].before) < 0) {\\r\\n                        llist[llist.length - 1].before = edges.before;\\r\\n                    }\\r\\n\\r\\n                    if (bpd_dir * (edges.after - llist[llist.length - 1].after) > 0) {\\r\\n                        llist[llist.length - 1].after = edges.after;\\r\\n                    }\\r\\n\\r\\n                    if (ipd_dir * (edges.start - llist[llist.length - 1].start) < 0) {\\r\\n                        llist[llist.length - 1].start = edges.start;\\r\\n                        llist[llist.length - 1].start_elem = llist[llist.length - 1].elements.length;\\r\\n                    }\\r\\n\\r\\n                    if (ipd_dir * (edges.end - llist[llist.length - 1].end) > 0) {\\r\\n                        llist[llist.length - 1].end = edges.end;\\r\\n                        llist[llist.length - 1].end_elem = llist[llist.length - 1].elements.length;\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                llist[llist.length - 1].text += element.textContent;\\r\\n\\r\\n                llist[llist.length - 1].elements.push(\\r\\n                        {\\r\\n                            node: element,\\r\\n                            bgcolor: curbgcolor,\\r\\n                            before: edges.before,\\r\\n                            after: edges.after\\r\\n                        }\\r\\n                );\\r\\n\\r\\n            } else if (element.localName === 'br' && llist.length !== 0) {\\r\\n\\r\\n                llist[llist.length - 1].br = true;\\r\\n\\r\\n            }\\r\\n\\r\\n        } else {\\r\\n\\r\\n            var child = element.firstChild;\\r\\n\\r\\n            while (child) {\\r\\n\\r\\n                if (child.nodeType === Node.ELEMENT_NODE) {\\r\\n\\r\\n                    constructLineList(context, child, llist, curbgcolor);\\r\\n\\r\\n                    if (child.localName === 'ruby' || child.localName === 'rtc') {\\r\\n\\r\\n                        /* remember non-empty ruby and rtc elements so that tts:rubyPosition can be applied */\\r\\n\\r\\n                        if (llist.length > 0) {\\r\\n\\r\\n                            llist[llist.length - 1].rbc.push(child);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    } else if (child.localName === 'span' &&\\r\\n                            child.style.textEmphasisStyle &&\\r\\n                            child.style.textEmphasisStyle !== \\\"none\\\") {\\r\\n\\r\\n                        /* remember non-empty span elements with textEmphasis */\\r\\n\\r\\n                        if (llist.length > 0) {\\r\\n\\r\\n                            llist[llist.length - 1].te.push(child);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n                    \\r\\n\\r\\n                }\\r\\n\\r\\n                child = child.nextSibling;\\r\\n            }\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function isSameLine(before1, after1, before2, after2) {\\r\\n\\r\\n        return ((after1 < after2) && (before1 > before2)) || ((after2 <= after1) && (before2 >= before1));\\r\\n\\r\\n    }\\r\\n\\r\\n    function HTMLStylingMapDefintion(qName, mapFunc) {\\r\\n        this.qname = qName;\\r\\n        this.map = mapFunc;\\r\\n    }\\r\\n\\r\\n    var STYLING_MAP_DEFS = [\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling backgroundColor\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* skip if transparent */\\r\\n                    if (attr[3] === 0)\\r\\n                        return;\\r\\n\\r\\n                    dom_element.style.backgroundColor = \\\"rgba(\\\" +\\r\\n                            attr[0].toString() + \\\",\\\" +\\r\\n                            attr[1].toString() + \\\",\\\" +\\r\\n                            attr[2].toString() + \\\",\\\" +\\r\\n                            (attr[3] / 255).toString() +\\r\\n                            \\\")\\\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling color\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.color = \\\"rgba(\\\" +\\r\\n                            attr[0].toString() + \\\",\\\" +\\r\\n                            attr[1].toString() + \\\",\\\" +\\r\\n                            attr[2].toString() + \\\",\\\" +\\r\\n                            (attr[3] / 255).toString() +\\r\\n                            \\\")\\\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling direction\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.direction = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling display\\\",\\r\\n                function (context, dom_element, isd_element, attr) {}\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling displayAlign\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* see https://css-tricks.com/snippets/css/a-guide-to-flexbox/ */\\r\\n\\r\\n                    /* TODO: is this affected by writing direction? */\\r\\n\\r\\n                    dom_element.style.display = \\\"flex\\\";\\r\\n                    dom_element.style.flexDirection = \\\"column\\\";\\r\\n\\r\\n\\r\\n                    if (attr === \\\"before\\\") {\\r\\n\\r\\n                        dom_element.style.justifyContent = \\\"flex-start\\\";\\r\\n\\r\\n                    } else if (attr === \\\"center\\\") {\\r\\n\\r\\n                        dom_element.style.justifyContent = \\\"center\\\";\\r\\n\\r\\n                    } else if (attr === \\\"after\\\") {\\r\\n\\r\\n                        dom_element.style.justifyContent = \\\"flex-end\\\";\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling extent\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    /* TODO: this is super ugly */\\r\\n\\r\\n                    context.regionH = attr.h.toUsedLength(context.w, context.h);\\r\\n                    context.regionW = attr.w.toUsedLength(context.w, context.h);\\r\\n\\r\\n                    /* \\r\\n                     * CSS height/width are measured against the content rectangle,\\r\\n                     * whereas TTML height/width include padding\\r\\n                     */\\r\\n\\r\\n                    var hdelta = 0;\\r\\n                    var wdelta = 0;\\r\\n\\r\\n                    var p = isd_element.styleAttrs[\\\"http://www.w3.org/ns/ttml#styling padding\\\"];\\r\\n\\r\\n                    if (!p) {\\r\\n\\r\\n                        /* error */\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        hdelta = p[0].toUsedLength(context.w, context.h) + p[2].toUsedLength(context.w, context.h);\\r\\n                        wdelta = p[1].toUsedLength(context.w, context.h) + p[3].toUsedLength(context.w, context.h);\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.height = (context.regionH - hdelta) + \\\"px\\\";\\r\\n                    dom_element.style.width = (context.regionW - wdelta) + \\\"px\\\";\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling fontFamily\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var rslt = [];\\r\\n\\r\\n                    /* per IMSC1 */\\r\\n\\r\\n                    for (var i in attr) {\\r\\n\\r\\n                        if (attr[i] === \\\"monospaceSerif\\\") {\\r\\n\\r\\n                            rslt.push(\\\"Courier New\\\");\\r\\n                            rslt.push('\\\"Liberation Mono\\\"');\\r\\n                            rslt.push(\\\"Courier\\\");\\r\\n                            rslt.push(\\\"monospace\\\");\\r\\n\\r\\n                        } else if (attr[i] === \\\"proportionalSansSerif\\\") {\\r\\n\\r\\n                            rslt.push(\\\"Arial\\\");\\r\\n                            rslt.push(\\\"Helvetica\\\");\\r\\n                            rslt.push('\\\"Liberation Sans\\\"');\\r\\n                            rslt.push(\\\"sans-serif\\\");\\r\\n\\r\\n                        } else if (attr[i] === \\\"monospace\\\") {\\r\\n\\r\\n                            rslt.push(\\\"monospace\\\");\\r\\n\\r\\n                        } else if (attr[i] === \\\"sansSerif\\\") {\\r\\n\\r\\n                            rslt.push(\\\"sans-serif\\\");\\r\\n\\r\\n                        } else if (attr[i] === \\\"serif\\\") {\\r\\n\\r\\n                            rslt.push(\\\"serif\\\");\\r\\n\\r\\n                        } else if (attr[i] === \\\"monospaceSansSerif\\\") {\\r\\n\\r\\n                            rslt.push(\\\"Consolas\\\");\\r\\n                            rslt.push(\\\"monospace\\\");\\r\\n\\r\\n                        } else if (attr[i] === \\\"proportionalSerif\\\") {\\r\\n\\r\\n                            rslt.push(\\\"serif\\\");\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            rslt.push(attr[i]);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.fontFamily = rslt.join(\\\",\\\");\\r\\n                }\\r\\n        ),\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling shear\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* return immediately if tts:shear is 0% since CSS transforms are not inherited*/\\r\\n\\r\\n                    if (attr === 0)\\r\\n                        return;\\r\\n\\r\\n                    var angle = attr * -0.9;\\r\\n\\r\\n                    /* context.writingMode is needed since writing mode is not inherited and sets the inline progression */\\r\\n\\r\\n                    if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                        dom_element.style.transform = \\\"skewX(\\\" + angle + \\\"deg)\\\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        dom_element.style.transform = \\\"skewY(\\\" + angle + \\\"deg)\\\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        ),\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling fontSize\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.fontSize = attr.toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                }\\r\\n        ),\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling fontStyle\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.fontStyle = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling fontWeight\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.fontWeight = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling lineHeight\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    if (attr === \\\"normal\\\") {\\r\\n\\r\\n                        dom_element.style.lineHeight = \\\"normal\\\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        dom_element.style.lineHeight = attr.toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling opacity\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.opacity = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling origin\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.top = attr.h.toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                    dom_element.style.left = attr.w.toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling overflow\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.overflow = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling padding\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* attr: top,left,bottom,right*/\\r\\n\\r\\n                    /* style: top right bottom left*/\\r\\n\\r\\n                    var rslt = [];\\r\\n\\r\\n                    rslt[0] = attr[0].toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                    rslt[1] = attr[3].toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                    rslt[2] = attr[2].toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                    rslt[3] = attr[1].toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n\\r\\n                    dom_element.style.padding = rslt.join(\\\" \\\");\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling position\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.top = attr.h.toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                    dom_element.style.left = attr.w.toUsedLength(context.w, context.h) + \\\"px\\\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling rubyAlign\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.rubyAlign = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling rubyPosition\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* skip if \\\"outside\\\", which is handled by applyRubyPosition() */\\r\\n\\r\\n                    if (attr === \\\"before\\\" || attr === \\\"after\\\") {\\r\\n\\r\\n                        var pos;\\r\\n\\r\\n                        if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                            pos = (attr === \\\"before\\\") ? \\\"over\\\" : \\\"under\\\";\\r\\n\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n                                pos = (attr === \\\"before\\\") ? \\\"over\\\" : \\\"under\\\";\\r\\n\\r\\n                            } else {\\r\\n\\r\\n                                pos = (attr === \\\"before\\\") ? \\\"under\\\" : \\\"over\\\";\\r\\n\\r\\n                            }\\r\\n\\r\\n                        }\\r\\n\\r\\n                        /* apply position to the parent dom_element, i.e. ruby or rtc */\\r\\n\\r\\n                        dom_element.parentElement.style.rubyPosition = pos;\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling showBackground\\\",\\r\\n                null\\r\\n                ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling textAlign\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var ta;\\r\\n                    var dir = isd_element.styleAttrs[imscStyles.byName.direction.qname];\\r\\n\\r\\n                    /* handle UAs that do not understand start or end */\\r\\n\\r\\n                    if (attr === \\\"start\\\") {\\r\\n\\r\\n                        ta = (dir === \\\"rtl\\\") ? \\\"right\\\" : \\\"left\\\";\\r\\n\\r\\n                    } else if (attr === \\\"end\\\") {\\r\\n\\r\\n                        ta = (dir === \\\"rtl\\\") ? \\\"left\\\" : \\\"right\\\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        ta = attr;\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.textAlign = ta;\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling textDecoration\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.textDecoration = attr.join(\\\" \\\").replace(\\\"lineThrough\\\", \\\"line-through\\\");\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling textOutline\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* defer to tts:textShadow */\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling textShadow\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var txto = isd_element.styleAttrs[imscStyles.byName.textOutline.qname];\\r\\n\\r\\n                    if (attr === \\\"none\\\" && txto === \\\"none\\\") {\\r\\n\\r\\n                        dom_element.style.textShadow = \\\"\\\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        var s = [];\\r\\n\\r\\n                        if (txto !== \\\"none\\\") {\\r\\n\\r\\n                            /* emulate text outline */\\r\\n\\r\\n                            s.push(\\r\\n                                    \\\"rgba(\\\" +\\r\\n                                    txto.color[0].toString() + \\\",\\\" +\\r\\n                                    txto.color[1].toString() + \\\",\\\" +\\r\\n                                    txto.color[2].toString() + \\\",\\\" +\\r\\n                                    (txto.color[3] / 255).toString() +\\r\\n                                    \\\")\\\" + \\\" 0px 0px \\\" +\\r\\n                                    txto.thickness.toUsedLength(context.w, context.h) + \\\"px\\\"\\r\\n                                    );\\r\\n\\r\\n                        }\\r\\n\\r\\n                        /* add text shadow */\\r\\n\\r\\n                        if (attr !== \\\"none\\\") {\\r\\n\\r\\n                            for (var i in attr) {\\r\\n\\r\\n\\r\\n                                s.push(attr[i].x_off.toUsedLength(context.w, context.h) + \\\"px \\\" +\\r\\n                                        attr[i].y_off.toUsedLength(context.w, context.h) + \\\"px \\\" +\\r\\n                                        attr[i].b_radius.toUsedLength(context.w, context.h) + \\\"px \\\" +\\r\\n                                        \\\"rgba(\\\" +\\r\\n                                        attr[i].color[0].toString() + \\\",\\\" +\\r\\n                                        attr[i].color[1].toString() + \\\",\\\" +\\r\\n                                        attr[i].color[2].toString() + \\\",\\\" +\\r\\n                                        (attr[i].color[3] / 255).toString() +\\r\\n                                        \\\")\\\"\\r\\n                                        );\\r\\n\\r\\n                            }\\r\\n\\r\\n                        }\\r\\n\\r\\n                        dom_element.style.textShadow = s.join(\\\",\\\");\\r\\n\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling textCombine\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    dom_element.style.textCombineUpright = attr.join(\\\" \\\");\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling textEmphasis\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* ignore color (not used in IMSC 1.1) */\\r\\n\\r\\n                    if (attr.style === \\\"none\\\") {\\r\\n\\r\\n                        dom_element.style.textEmphasisStyle = \\\"none\\\";\\r\\n\\r\\n                        /* no need to set position, so return */\\r\\n                        \\r\\n                        return;\\r\\n                    \\r\\n                    } else if (attr.style === \\\"auto\\\") {\\r\\n\\r\\n                        dom_element.style.textEmphasisStyle = \\\"filled\\\";\\r\\n                    \\r\\n                    } else {\\r\\n\\r\\n                        dom_element.style.textEmphasisStyle =  attr.style + \\\" \\\" + attr.symbol;\\r\\n                    }\\r\\n\\r\\n                    /* ignore \\\"outside\\\" position (set in postprocessing) */\\r\\n\\r\\n                    if (attr.position === \\\"before\\\" || attr.position === \\\"after\\\") {\\r\\n\\r\\n                        var pos;\\r\\n\\r\\n                        if (context.bpd === \\\"tb\\\") {\\r\\n\\r\\n                            pos = (attr.position === \\\"before\\\") ? \\\"left over\\\" : \\\"left under\\\";\\r\\n\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            if (context.bpd === \\\"rl\\\") {\\r\\n\\r\\n                                pos = (attr.position === \\\"before\\\") ? \\\"right under\\\" : \\\"left under\\\";\\r\\n\\r\\n                            } else {\\r\\n\\r\\n                                pos = (attr.position === \\\"before\\\") ? \\\"left under\\\" : \\\"right under\\\";\\r\\n\\r\\n                            }\\r\\n\\r\\n                        }\\r\\n\\r\\n                        dom_element.style.textEmphasisPosition = pos;\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling unicodeBidi\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var ub;\\r\\n\\r\\n                    if (attr === 'bidiOverride') {\\r\\n                        ub = \\\"bidi-override\\\";\\r\\n                    } else {\\r\\n                        ub = attr;\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.unicodeBidi = ub;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling visibility\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.visibility = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling wrapOption\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    if (attr === \\\"wrap\\\") {\\r\\n\\r\\n                        if (isd_element.space === \\\"preserve\\\") {\\r\\n                            dom_element.style.whiteSpace = \\\"pre-wrap\\\";\\r\\n                        } else {\\r\\n                            dom_element.style.whiteSpace = \\\"normal\\\";\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        if (isd_element.space === \\\"preserve\\\") {\\r\\n\\r\\n                            dom_element.style.whiteSpace = \\\"pre\\\";\\r\\n\\r\\n                        } else {\\r\\n                            dom_element.style.whiteSpace = \\\"noWrap\\\";\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling writingMode\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    if (attr === \\\"lrtb\\\" || attr === \\\"lr\\\") {\\r\\n\\r\\n                        context.writingMode = \\\"horizontal-tb\\\";\\r\\n\\r\\n                    } else if (attr === \\\"rltb\\\" || attr === \\\"rl\\\") {\\r\\n\\r\\n                        context.writingMode = \\\"horizontal-tb\\\";\\r\\n\\r\\n                    } else if (attr === \\\"tblr\\\") {\\r\\n\\r\\n                        context.writingMode = \\\"vertical-lr\\\";\\r\\n\\r\\n                    } else if (attr === \\\"tbrl\\\" || attr === \\\"tb\\\") {\\r\\n\\r\\n                        context.writingMode = \\\"vertical-rl\\\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.writingMode = context.writingMode;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml#styling zIndex\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.zIndex = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \\\"http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay\\\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    if (context.displayForcedOnlyMode && attr === false) {\\r\\n                        dom_element.style.visibility = \\\"hidden\\\";\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        )\\r\\n    ];\\r\\n\\r\\n    var STYLMAP_BY_QNAME = {};\\r\\n\\r\\n    for (var i in STYLING_MAP_DEFS) {\\r\\n\\r\\n        STYLMAP_BY_QNAME[STYLING_MAP_DEFS[i].qname] = STYLING_MAP_DEFS[i];\\r\\n    }\\r\\n\\r\\n    function reportError(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.error && errorHandler.error(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n        typeof imscNames === 'undefined' ? __webpack_require__(/*! ./names */ \\\"../node_modules/imsc/src/main/js/names.js\\\") : imscNames,\\r\\n        typeof imscStyles === 'undefined' ? __webpack_require__(/*! ./styles */ \\\"../node_modules/imsc/src/main/js/styles.js\\\") : imscStyles,\\r\\n        typeof imscUtils === 'undefined' ? __webpack_require__(/*! ./utils */ \\\"../node_modules/imsc/src/main/js/utils.js\\\") : imscUtils);\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/html.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/isd.js\":\n/*!***********************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/isd.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscISD\\r\\n */\\r\\n\\r\\n\\r\\n;\\r\\n(function (imscISD, imscNames, imscStyles, imscUtils) { // wrapper for non-node envs\\r\\n\\r\\n    /** \\r\\n     * Creates a canonical representation of an IMSC1 document returned by <pre>imscDoc.fromXML()</pre>\\r\\n     * at a given absolute offset in seconds. This offset does not have to be one of the values returned\\r\\n     * by <pre>getMediaTimeEvents()</pre>.\\r\\n     * \\r\\n     * @param {Object} tt IMSC1 document\\r\\n     * @param {number} offset Absolute offset (in seconds)\\r\\n     * @param {?module:imscUtils.ErrorHandler} errorHandler Error callback\\r\\n     * @returns {Object} Opaque in-memory representation of an ISD\\r\\n     */\\r\\n\\r\\n    imscISD.generateISD = function (tt, offset, errorHandler) {\\r\\n\\r\\n        /* TODO check for tt and offset validity */\\r\\n\\r\\n        /* create the ISD object from the IMSC1 doc */\\r\\n\\r\\n        var isd = new ISD(tt);\\r\\n\\r\\n        /* context */\\r\\n\\r\\n        var context = {\\r\\n\\r\\n            /*rubyfs: []*/ /* font size of the nearest textContainer or container */\\r\\n\\r\\n        };\\r\\n\\r\\n        /* process regions */\\r\\n\\r\\n        for (var r in tt.head.layout.regions) {\\r\\n\\r\\n            /* post-order traversal of the body tree per [construct intermediate document] */\\r\\n\\r\\n            var c = isdProcessContentElement(tt, offset, tt.head.layout.regions[r], tt.body, null, '', tt.head.layout.regions[r], errorHandler, context);\\r\\n\\r\\n            if (c !== null) {\\r\\n\\r\\n                /* add the region to the ISD */\\r\\n\\r\\n                isd.contents.push(c.element);\\r\\n            }\\r\\n\\r\\n\\r\\n        }\\r\\n\\r\\n        return isd;\\r\\n    };\\r\\n\\r\\n    /* set of styles not applicable to ruby container spans */\\r\\n\\r\\n    var _rcs_na_styles = [\\r\\n        imscStyles.byName.color.qname,\\r\\n        imscStyles.byName.textCombine.qname,\\r\\n        imscStyles.byName.textDecoration.qname,\\r\\n        imscStyles.byName.textEmphasis.qname,\\r\\n        imscStyles.byName.textOutline.qname,\\r\\n        imscStyles.byName.textShadow.qname\\r\\n    ];\\r\\n\\r\\n    function isdProcessContentElement(doc, offset, region, body, parent, inherited_region_id, elem, errorHandler, context) {\\r\\n\\r\\n        /* prune if temporally inactive */\\r\\n\\r\\n        if (offset < elem.begin || offset >= elem.end) {\\r\\n            return null;\\r\\n        }\\r\\n\\r\\n        /* \\r\\n         * set the associated region as specified by the regionID attribute, or the \\r\\n         * inherited associated region otherwise\\r\\n         */\\r\\n\\r\\n        var associated_region_id = 'regionID' in elem && elem.regionID !== '' ? elem.regionID : inherited_region_id;\\r\\n\\r\\n        /* prune the element if either:\\r\\n         * - the element is not terminal and the associated region is neither the default\\r\\n         *   region nor the parent region (this allows children to be associated with a \\r\\n         *   region later on)\\r\\n         * - the element is terminal and the associated region is not the parent region\\r\\n         */\\r\\n\\r\\n        /* TODO: improve detection of terminal elements since <region> has no contents */\\r\\n\\r\\n        if (parent !== null /* are we in the region element */ &&\\r\\n            associated_region_id !== region.id &&\\r\\n            (\\r\\n                (!('contents' in elem)) ||\\r\\n                ('contents' in elem && elem.contents.length === 0) ||\\r\\n                associated_region_id !== ''\\r\\n                )\\r\\n            )\\r\\n            return null;\\r\\n\\r\\n        /* create an ISD element, including applying specified styles */\\r\\n\\r\\n        var isd_element = new ISDContentElement(elem);\\r\\n\\r\\n        /* apply set (animation) styling */\\r\\n\\r\\n        for (var i in elem.sets) {\\r\\n\\r\\n            if (offset < elem.sets[i].begin || offset >= elem.sets[i].end)\\r\\n                continue;\\r\\n\\r\\n            isd_element.styleAttrs[elem.sets[i].qname] = elem.sets[i].value;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* \\r\\n         * keep track of specified styling attributes so that we\\r\\n         * can compute them later\\r\\n         */\\r\\n\\r\\n        var spec_attr = {};\\r\\n\\r\\n        for (var qname in isd_element.styleAttrs) {\\r\\n\\r\\n            spec_attr[qname] = true;\\r\\n\\r\\n            /* special rule for tts:writingMode (section 7.29.1 of XSL)\\r\\n             * direction is set consistently with writingMode only\\r\\n             * if writingMode sets inline-direction to LTR or RTL  \\r\\n             */\\r\\n\\r\\n            if (qname === imscStyles.byName.writingMode.qname &&\\r\\n                !(imscStyles.byName.direction.qname in isd_element.styleAttrs)) {\\r\\n\\r\\n                var wm = isd_element.styleAttrs[qname];\\r\\n\\r\\n                if (wm === \\\"lrtb\\\" || wm === \\\"lr\\\") {\\r\\n\\r\\n                    isd_element.styleAttrs[imscStyles.byName.direction.qname] = \\\"ltr\\\";\\r\\n\\r\\n                } else if (wm === \\\"rltb\\\" || wm === \\\"rl\\\") {\\r\\n\\r\\n                    isd_element.styleAttrs[imscStyles.byName.direction.qname] = \\\"rtl\\\";\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n        }\\r\\n\\r\\n        /* inherited styling */\\r\\n\\r\\n        if (parent !== null) {\\r\\n\\r\\n            for (var j in imscStyles.all) {\\r\\n\\r\\n                var sa = imscStyles.all[j];\\r\\n\\r\\n                /* textDecoration has special inheritance rules */\\r\\n\\r\\n                if (sa.qname === imscStyles.byName.textDecoration.qname) {\\r\\n\\r\\n                    /* handle both textDecoration inheritance and specification */\\r\\n\\r\\n                    var ps = parent.styleAttrs[sa.qname];\\r\\n                    var es = isd_element.styleAttrs[sa.qname];\\r\\n                    var outs = [];\\r\\n\\r\\n                    if (es === undefined) {\\r\\n\\r\\n                        outs = ps;\\r\\n\\r\\n                    } else if (es.indexOf(\\\"none\\\") === -1) {\\r\\n\\r\\n                        if ((es.indexOf(\\\"noUnderline\\\") === -1 &&\\r\\n                            ps.indexOf(\\\"underline\\\") !== -1) ||\\r\\n                            es.indexOf(\\\"underline\\\") !== -1) {\\r\\n\\r\\n                            outs.push(\\\"underline\\\");\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if ((es.indexOf(\\\"noLineThrough\\\") === -1 &&\\r\\n                            ps.indexOf(\\\"lineThrough\\\") !== -1) ||\\r\\n                            es.indexOf(\\\"lineThrough\\\") !== -1) {\\r\\n\\r\\n                            outs.push(\\\"lineThrough\\\");\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if ((es.indexOf(\\\"noOverline\\\") === -1 &&\\r\\n                            ps.indexOf(\\\"overline\\\") !== -1) ||\\r\\n                            es.indexOf(\\\"overline\\\") !== -1) {\\r\\n\\r\\n                            outs.push(\\\"overline\\\");\\r\\n\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        outs.push(\\\"none\\\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    isd_element.styleAttrs[sa.qname] = outs;\\r\\n\\r\\n                } else if (sa.qname === imscStyles.byName.fontSize.qname &&\\r\\n                    !(sa.qname in isd_element.styleAttrs) &&\\r\\n                    isd_element.kind === 'span' &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"textContainer\\\") {\\r\\n                    \\r\\n                    /* special inheritance rule for ruby text container font size */\\r\\n                    \\r\\n                    var ruby_fs = parent.styleAttrs[imscStyles.byName.fontSize.qname];\\r\\n\\r\\n                    isd_element.styleAttrs[sa.qname] = new imscUtils.ComputedLength(\\r\\n                        0.5 * ruby_fs.rw,\\r\\n                        0.5 * ruby_fs.rh);\\r\\n\\r\\n                } else if (sa.qname === imscStyles.byName.fontSize.qname &&\\r\\n                    !(sa.qname in isd_element.styleAttrs) &&\\r\\n                    isd_element.kind === 'span' &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \\\"text\\\") {\\r\\n                    \\r\\n                    /* special inheritance rule for ruby text font size */\\r\\n                    \\r\\n                    var parent_fs = parent.styleAttrs[imscStyles.byName.fontSize.qname];\\r\\n                    \\r\\n                    if (parent.styleAttrs[imscStyles.byName.ruby.qname] === \\\"textContainer\\\") {\\r\\n                        \\r\\n                        isd_element.styleAttrs[sa.qname] = parent_fs;\\r\\n                        \\r\\n                    } else {\\r\\n                        \\r\\n                        isd_element.styleAttrs[sa.qname] = new imscUtils.ComputedLength(\\r\\n                            0.5 * parent_fs.rw,\\r\\n                            0.5 * parent_fs.rh);\\r\\n                    }\\r\\n                    \\r\\n                } else if (sa.inherit &&\\r\\n                    (sa.qname in parent.styleAttrs) &&\\r\\n                    !(sa.qname in isd_element.styleAttrs)) {\\r\\n\\r\\n                    isd_element.styleAttrs[sa.qname] = parent.styleAttrs[sa.qname];\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* initial value styling */\\r\\n\\r\\n        for (var k in imscStyles.all) {\\r\\n\\r\\n            var ivs = imscStyles.all[k];\\r\\n\\r\\n            /* skip if value is already specified */\\r\\n\\r\\n            if (ivs.qname in isd_element.styleAttrs) continue;\\r\\n\\r\\n            /* skip tts:position if tts:origin is specified */\\r\\n\\r\\n            if (ivs.qname === imscStyles.byName.position.qname &&\\r\\n                imscStyles.byName.origin.qname in isd_element.styleAttrs)\\r\\n                continue;\\r\\n\\r\\n            /* skip tts:origin if tts:position is specified */\\r\\n\\r\\n            if (ivs.qname === imscStyles.byName.origin.qname &&\\r\\n                imscStyles.byName.position.qname in isd_element.styleAttrs)\\r\\n                continue;\\r\\n            \\r\\n            /* determine initial value */\\r\\n            \\r\\n            var iv = doc.head.styling.initials[ivs.qname] || ivs.initial;\\r\\n\\r\\n            /* apply initial value to elements other than region only if non-inherited */\\r\\n\\r\\n            if (isd_element.kind === 'region' || (ivs.inherit === false && iv !== null)) {\\r\\n\\r\\n                isd_element.styleAttrs[ivs.qname] = ivs.parse(iv);\\r\\n\\r\\n                /* keep track of the style as specified */\\r\\n\\r\\n                spec_attr[ivs.qname] = true;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* compute styles (only for non-inherited styles) */\\r\\n        /* TODO: get rid of spec_attr */\\r\\n\\r\\n        for (var z in imscStyles.all) {\\r\\n\\r\\n            var cs = imscStyles.all[z];\\r\\n\\r\\n            if (!(cs.qname in spec_attr)) continue;\\r\\n\\r\\n            if (cs.compute !== null) {\\r\\n\\r\\n                var cstyle = cs.compute(\\r\\n                    /*doc, parent, element, attr, context*/\\r\\n                    doc,\\r\\n                    parent,\\r\\n                    isd_element,\\r\\n                    isd_element.styleAttrs[cs.qname],\\r\\n                    context\\r\\n                    );\\r\\n\\r\\n                if (cstyle !== null) {\\r\\n\\r\\n                    isd_element.styleAttrs[cs.qname] = cstyle;\\r\\n                    \\r\\n                } else {\\r\\n                    /* if the style cannot be computed, replace it by its initial value */\\r\\n\\r\\n                    isd_element.styleAttrs[cs.qname] = cs.compute(\\r\\n                        /*doc, parent, element, attr, context*/\\r\\n                        doc,\\r\\n                        parent,\\r\\n                        isd_element,\\r\\n                        cs.parse(cs.initial),\\r\\n                        context\\r\\n                    );\\r\\n\\r\\n                    reportError(errorHandler, \\\"Style '\\\" + cs.qname + \\\"' on element '\\\" + isd_element.kind + \\\"' cannot be computed\\\");\\r\\n                }\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* tts:fontSize special ineritance for ruby */\\r\\n\\r\\n/*        var isrubycontainer = false;\\r\\n\\r\\n        if (isd_element.kind === \\\"span\\\") {\\r\\n\\r\\n            var rtemp = isd_element.styleAttrs[imscStyles.byName.ruby.qname];\\r\\n\\r\\n            if (rtemp === \\\"container\\\" || rtemp === \\\"textContainer\\\") {\\r\\n\\r\\n                isrubycontainer = true;\\r\\n\\r\\n                context.rubyfs.unshift(isd_element.styleAttrs[imscStyles.byName.fontSize.qname]);\\r\\n\\r\\n            }\\r\\n\\r\\n        } */\\r\\n\\r\\n        /* prune if tts:display is none */\\r\\n\\r\\n        if (isd_element.styleAttrs[imscStyles.byName.display.qname] === \\\"none\\\")\\r\\n            return null;\\r\\n\\r\\n        /* process contents of the element */\\r\\n\\r\\n        var contents;\\r\\n\\r\\n        if (parent === null) {\\r\\n\\r\\n            /* we are processing the region */\\r\\n\\r\\n            if (body === null) {\\r\\n\\r\\n                /* if there is no body, still process the region but with empty content */\\r\\n\\r\\n                contents = [];\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /*use the body element as contents */\\r\\n\\r\\n                contents = [body];\\r\\n\\r\\n            }\\r\\n\\r\\n        } else if ('contents' in elem) {\\r\\n\\r\\n            contents = elem.contents;\\r\\n\\r\\n        }\\r\\n\\r\\n        for (var x in contents) {\\r\\n\\r\\n            var c = isdProcessContentElement(doc, offset, region, body, isd_element, associated_region_id, contents[x], errorHandler, context);\\r\\n\\r\\n            /* \\r\\n             * keep child element only if they are non-null and their region match \\r\\n             * the region of this element\\r\\n             */\\r\\n\\r\\n            if (c !== null) {\\r\\n\\r\\n                isd_element.contents.push(c.element);\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* compute used value of lineHeight=\\\"normal\\\" */\\r\\n\\r\\n        /*        if (isd_element.styleAttrs[imscStyles.byName.lineHeight.qname] === \\\"normal\\\"  ) {\\r\\n         \\r\\n         isd_element.styleAttrs[imscStyles.byName.lineHeight.qname] =\\r\\n         isd_element.styleAttrs[imscStyles.byName.fontSize.qname] * 1.2;\\r\\n         \\r\\n         }\\r\\n         */\\r\\n\\r\\n        /* tts:fontSize special ineritance for ruby */\\r\\n\\r\\n        /*if (isrubycontainer) {\\r\\n\\r\\n            context.rubyfs.shift();\\r\\n\\r\\n        }*/\\r\\n\\r\\n        /* remove styles that are not applicable */\\r\\n\\r\\n        for (var qnameb in isd_element.styleAttrs) {\\r\\n\\r\\n            /* true if not applicable */\\r\\n\\r\\n            var na = false;\\r\\n\\r\\n            /* special applicability of certain style properties to ruby container spans */\\r\\n            /* TODO: in the future ruby elements should be translated to elements instead of kept as spans */\\r\\n\\r\\n            if (isd_element.kind === 'span') {\\r\\n\\r\\n                var rsp = isd_element.styleAttrs[imscStyles.byName.ruby.qname];\\r\\n\\r\\n                na = ( rsp === 'container' || rsp === 'textContainer' || rsp === 'baseContainer' ) && \\r\\n                    _rcs_na_styles.indexOf(qnameb) !== -1;\\r\\n\\r\\n                if (! na) {\\r\\n\\r\\n                    na = rsp !== 'container' &&\\r\\n                        qnameb === imscStyles.byName.rubyAlign.qname;\\r\\n\\r\\n                }\\r\\n\\r\\n                if (! na) {\\r\\n\\r\\n                    na =  (! (rsp === 'textContainer' || rsp === 'text')) &&\\r\\n                        qnameb === imscStyles.byName.rubyPosition.qname;\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* normal applicability */\\r\\n            \\r\\n            if (! na) {\\r\\n\\r\\n                var da = imscStyles.byQName[qnameb];\\r\\n                na = da.applies.indexOf(isd_element.kind) === -1;\\r\\n\\r\\n            }\\r\\n\\r\\n\\r\\n            if (na) {\\r\\n                delete isd_element.styleAttrs[qnameb];\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* collapse white space if space is \\\"default\\\" */\\r\\n\\r\\n        if (isd_element.kind === 'span' && isd_element.text && isd_element.space === \\\"default\\\") {\\r\\n\\r\\n            var trimmedspan = isd_element.text.replace(/[\\\\t\\\\r\\\\n ]+/g, ' ');\\r\\n\\r\\n            isd_element.text = trimmedspan;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* trim whitespace around explicit line breaks */\\r\\n\\r\\n        if (isd_element.kind === 'p') {\\r\\n\\r\\n            var elist = [];\\r\\n\\r\\n            constructSpanList(isd_element, elist);\\r\\n\\r\\n            var l = 0;\\r\\n\\r\\n            var state = \\\"after_br\\\";\\r\\n            var br_pos = 0;\\r\\n\\r\\n            while (true) {\\r\\n\\r\\n                if (state === \\\"after_br\\\") {\\r\\n\\r\\n                    if (l >= elist.length || elist[l].kind === \\\"br\\\") {\\r\\n\\r\\n                        state = \\\"before_br\\\";\\r\\n                        br_pos = l;\\r\\n                        l--;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        if (elist[l].space !== \\\"preserve\\\") {\\r\\n\\r\\n                            elist[l].text = elist[l].text.replace(/^[\\\\t\\\\r\\\\n ]+/g, '');\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if (elist[l].text.length > 0) {\\r\\n\\r\\n                            state = \\\"looking_br\\\";\\r\\n                            l++;\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            elist.splice(l, 1);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                } else if (state === \\\"before_br\\\") {\\r\\n\\r\\n                    if (l < 0 || elist[l].kind === \\\"br\\\") {\\r\\n\\r\\n                        state = \\\"after_br\\\";\\r\\n                        l = br_pos + 1;\\r\\n\\r\\n                        if (l >= elist.length) break;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        if (elist[l].space !== \\\"preserve\\\") {\\r\\n\\r\\n                            elist[l].text = elist[l].text.replace(/[\\\\t\\\\r\\\\n ]+$/g, '');\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if (elist[l].text.length > 0) {\\r\\n\\r\\n                            state = \\\"after_br\\\";\\r\\n                            l = br_pos + 1;\\r\\n\\r\\n                            if (l >= elist.length) break;\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            elist.splice(l, 1);\\r\\n                            l--;\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    if (l >= elist.length || elist[l].kind === \\\"br\\\") {\\r\\n\\r\\n                        state = \\\"before_br\\\";\\r\\n                        br_pos = l;\\r\\n                        l--;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        l++;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            pruneEmptySpans(isd_element);\\r\\n\\r\\n        }\\r\\n\\r\\n        /* keep element if:\\r\\n         * * contains a background image\\r\\n         * * <br/>\\r\\n         * * if there are children\\r\\n         * * if it is an image\\r\\n         * * if <span> and has text\\r\\n         * * if region and showBackground = always\\r\\n         */\\r\\n\\r\\n        if ((isd_element.kind === 'div' && imscStyles.byName.backgroundImage.qname in isd_element.styleAttrs) ||\\r\\n            isd_element.kind === 'br' ||\\r\\n            isd_element.kind === 'image' ||\\r\\n            ('contents' in isd_element && isd_element.contents.length > 0) ||\\r\\n            (isd_element.kind === 'span' && isd_element.text !== null) ||\\r\\n            (isd_element.kind === 'region' &&\\r\\n                isd_element.styleAttrs[imscStyles.byName.showBackground.qname] === 'always')) {\\r\\n\\r\\n            return {\\r\\n                region_id: associated_region_id,\\r\\n                element: isd_element\\r\\n            };\\r\\n        }\\r\\n\\r\\n        return null;\\r\\n    }\\r\\n\\r\\n    function constructSpanList(element, elist) {\\r\\n\\r\\n        if ('contents' in element) {\\r\\n\\r\\n            for (var i in element.contents) {\\r\\n                constructSpanList(element.contents[i], elist);\\r\\n            }\\r\\n\\r\\n        } else if (element.kind === 'span' || element.kind === 'br') {\\r\\n\\r\\n            elist.push(element);\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function pruneEmptySpans(element) {\\r\\n\\r\\n        if (element.kind === 'br') {\\r\\n\\r\\n            return false;\\r\\n\\r\\n        } else if ('text' in element) {\\r\\n\\r\\n            return  element.text.length === 0;\\r\\n\\r\\n        } else if ('contents' in element) {\\r\\n\\r\\n            var i = element.contents.length;\\r\\n\\r\\n            while (i--) {\\r\\n\\r\\n                if (pruneEmptySpans(element.contents[i])) {\\r\\n                    element.contents.splice(i, 1);\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            return element.contents.length === 0;\\r\\n\\r\\n        }\\r\\n    }\\r\\n\\r\\n    function ISD(tt) {\\r\\n        this.contents = [];\\r\\n        this.aspectRatio = tt.aspectRatio;\\r\\n    }\\r\\n\\r\\n    function ISDContentElement(ttelem) {\\r\\n\\r\\n        /* assume the element is a region if it does not have a kind */\\r\\n\\r\\n        this.kind = ttelem.kind || 'region';\\r\\n\\r\\n        /* copy id */\\r\\n\\r\\n        if (ttelem.id) {\\r\\n            this.id = ttelem.id;\\r\\n        }\\r\\n\\r\\n        /* deep copy of style attributes */\\r\\n        this.styleAttrs = {};\\r\\n\\r\\n        for (var sname in ttelem.styleAttrs) {\\r\\n\\r\\n            this.styleAttrs[sname] =\\r\\n                ttelem.styleAttrs[sname];\\r\\n        }\\r\\n        \\r\\n        /* copy src and type if image */\\r\\n        \\r\\n        if ('src' in ttelem) {\\r\\n            \\r\\n            this.src = ttelem.src;\\r\\n            \\r\\n        }\\r\\n        \\r\\n         if ('type' in ttelem) {\\r\\n            \\r\\n            this.type = ttelem.type;\\r\\n            \\r\\n        }\\r\\n\\r\\n        /* TODO: clean this! \\r\\n         * TODO: ISDElement and document element should be better tied together */\\r\\n\\r\\n        if ('text' in ttelem) {\\r\\n\\r\\n            this.text = ttelem.text;\\r\\n\\r\\n        } else if (this.kind === 'region' || 'contents' in ttelem) {\\r\\n\\r\\n            this.contents = [];\\r\\n        }\\r\\n\\r\\n        if ('space' in ttelem) {\\r\\n\\r\\n            this.space = ttelem.space;\\r\\n        }\\r\\n    }\\r\\n\\r\\n\\r\\n    /*\\r\\n     * ERROR HANDLING UTILITY FUNCTIONS\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function reportInfo(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.info && errorHandler.info(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportWarning(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.warn && errorHandler.warn(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportError(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.error && errorHandler.error(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportFatal(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.fatal)\\r\\n            errorHandler.fatal(msg);\\r\\n\\r\\n        throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n    typeof imscNames === 'undefined' ? __webpack_require__(/*! ./names */ \\\"../node_modules/imsc/src/main/js/names.js\\\") : imscNames,\\r\\n    typeof imscStyles === 'undefined' ? __webpack_require__(/*! ./styles */ \\\"../node_modules/imsc/src/main/js/styles.js\\\") : imscStyles,\\r\\n    typeof imscUtils === 'undefined' ? __webpack_require__(/*! ./utils */ \\\"../node_modules/imsc/src/main/js/utils.js\\\") : imscUtils\\r\\n    );\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/isd.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/main.js\":\n/*!************************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/main.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\nexports.generateISD = __webpack_require__(/*! ./isd */ \\\"../node_modules/imsc/src/main/js/isd.js\\\").generateISD;\\r\\nexports.fromXML = __webpack_require__(/*! ./doc */ \\\"../node_modules/imsc/src/main/js/doc.js\\\").fromXML;\\r\\nexports.renderHTML = __webpack_require__(/*! ./html */ \\\"../node_modules/imsc/src/main/js/html.js\\\").render;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/main.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/names.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/names.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscNames\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscNames) { // wrapper for non-node envs\\r\\n\\r\\n    imscNames.ns_tt = \\\"http://www.w3.org/ns/ttml\\\";\\r\\n    imscNames.ns_tts = \\\"http://www.w3.org/ns/ttml#styling\\\";\\r\\n    imscNames.ns_ttp = \\\"http://www.w3.org/ns/ttml#parameter\\\";\\r\\n    imscNames.ns_xml = \\\"http://www.w3.org/XML/1998/namespace\\\";\\r\\n    imscNames.ns_itts = \\\"http://www.w3.org/ns/ttml/profile/imsc1#styling\\\";\\r\\n    imscNames.ns_ittp = \\\"http://www.w3.org/ns/ttml/profile/imsc1#parameter\\\";\\r\\n    imscNames.ns_smpte = \\\"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt\\\";\\r\\n    imscNames.ns_ebutts = \\\"urn:ebu:tt:style\\\";\\r\\n    \\r\\n})( false ? undefined : exports);\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/names.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/styles.js\":\n/*!**************************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/styles.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscStyles\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscStyles, imscNames, imscUtils) { // wrapper for non-node envs\\r\\n\\r\\n    function StylingAttributeDefinition(ns, name, initialValue, appliesTo, isInherit, isAnimatable, parseFunc, computeFunc) {\\r\\n        this.name = name;\\r\\n        this.ns = ns;\\r\\n        this.qname = ns + \\\" \\\" + name;\\r\\n        this.inherit = isInherit;\\r\\n        this.animatable = isAnimatable;\\r\\n        this.initial = initialValue;\\r\\n        this.applies = appliesTo;\\r\\n        this.parse = parseFunc;\\r\\n        this.compute = computeFunc;\\r\\n    }\\r\\n\\r\\n    imscStyles.all = [\\r\\n\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"backgroundColor\\\",\\r\\n            \\\"transparent\\\",\\r\\n            ['body', 'div', 'p', 'region', 'span'],\\r\\n            false,\\r\\n            true,\\r\\n            imscUtils.parseColor,\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"color\\\",\\r\\n            \\\"white\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseColor,\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"direction\\\",\\r\\n            \\\"ltr\\\",\\r\\n            ['p', 'span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"display\\\",\\r\\n            \\\"auto\\\",\\r\\n            ['body', 'div', 'p', 'region', 'span'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"displayAlign\\\",\\r\\n            \\\"before\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"extent\\\",\\r\\n            \\\"auto\\\",\\r\\n            ['tt', 'region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                if (str === \\\"auto\\\") {\\r\\n\\r\\n                    return str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    var s = str.split(\\\" \\\");\\r\\n                    if (s.length !== 2)\\r\\n                        return null;\\r\\n                    var w = imscUtils.parseLength(s[0]);\\r\\n                    var h = imscUtils.parseLength(s[1]);\\r\\n                    if (!h || !w)\\r\\n                        return null;\\r\\n                    return {'h': h, 'w': w};\\r\\n                }\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var h;\\r\\n                var w;\\r\\n\\r\\n                if (attr === \\\"auto\\\") {\\r\\n\\r\\n                    h = new imscUtils.ComputedLength(0, 1);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    h = imscUtils.toComputedLength(\\r\\n                        attr.h.value,\\r\\n                        attr.h.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.h,\\r\\n                        null,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n\\r\\n                    if (h === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n                }\\r\\n\\r\\n                if (attr === \\\"auto\\\") {\\r\\n\\r\\n                    w = new imscUtils.ComputedLength(1, 0);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    w = imscUtils.toComputedLength(\\r\\n                        attr.w.value,\\r\\n                        attr.w.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.w,\\r\\n                        null,\\r\\n                        doc.pxLength.w\\r\\n                        );\\r\\n\\r\\n                    if (w === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return {'h': h, 'w': w};\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"fontFamily\\\",\\r\\n            \\\"default\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var ffs = str.split(\\\",\\\");\\r\\n                var rslt = [];\\r\\n\\r\\n                for (var i in ffs) {\\r\\n\\r\\n                    if (ffs[i].charAt(0) !== \\\"'\\\" && ffs[i].charAt(0) !== '\\\"') {\\r\\n\\r\\n                        if (ffs[i] === \\\"default\\\") {\\r\\n\\r\\n                            /* per IMSC1 */\\r\\n\\r\\n                            rslt.push(\\\"monospaceSerif\\\");\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            rslt.push(ffs[i]);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        rslt.push(ffs[i]);\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return rslt;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"shear\\\",\\r\\n            \\\"0%\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseLength,\\r\\n            function (doc, parent, element, attr) {\\r\\n\\r\\n                var fs;\\r\\n\\r\\n                if (attr.unit === \\\"%\\\") {\\r\\n\\r\\n                    fs = Math.abs(attr.value) > 100 ? Math.sign(attr.value) * 100 : attr.value;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                return fs;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"fontSize\\\",\\r\\n            \\\"1c\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseLength,\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var fs;\\r\\n\\r\\n                fs = imscUtils.toComputedLength(\\r\\n                    attr.value,\\r\\n                    attr.unit,\\r\\n                    parent !== null ? parent.styleAttrs[imscStyles.byName.fontSize.qname] : doc.cellLength.h,\\r\\n                    parent !== null ? parent.styleAttrs[imscStyles.byName.fontSize.qname] : doc.cellLength.h,\\r\\n                    doc.cellLength.h,\\r\\n                    doc.pxLength.h\\r\\n                    );\\r\\n\\r\\n                return fs;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"fontStyle\\\",\\r\\n            \\\"normal\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                /* TODO: handle font style */\\r\\n\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"fontWeight\\\",\\r\\n            \\\"normal\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                /* TODO: handle font weight */\\r\\n\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"lineHeight\\\",\\r\\n            \\\"normal\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                if (str === \\\"normal\\\") {\\r\\n                    return str;\\r\\n                } else {\\r\\n                    return imscUtils.parseLength(str);\\r\\n                }\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var lh;\\r\\n\\r\\n                if (attr === \\\"normal\\\") {\\r\\n\\r\\n                    /* inherit normal per https://github.com/w3c/ttml1/issues/220 */\\r\\n\\r\\n                    lh = attr;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    lh = imscUtils.toComputedLength(\\r\\n                        attr.value,\\r\\n                        attr.unit,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        doc.cellLength.h,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n                    if (lh === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                /* TODO: create a Length constructor */\\r\\n\\r\\n                return lh;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"opacity\\\",\\r\\n            1.0,\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            parseFloat,\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"origin\\\",\\r\\n            \\\"auto\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                if (str === \\\"auto\\\") {\\r\\n\\r\\n                    return str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    var s = str.split(\\\" \\\");\\r\\n                    if (s.length !== 2)\\r\\n                        return null;\\r\\n                    var w = imscUtils.parseLength(s[0]);\\r\\n                    var h = imscUtils.parseLength(s[1]);\\r\\n                    if (!h || !w)\\r\\n                        return null;\\r\\n                    return {'h': h, 'w': w};\\r\\n                }\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var h;\\r\\n                var w;\\r\\n\\r\\n                if (attr === \\\"auto\\\") {\\r\\n\\r\\n                    h = new imscUtils.ComputedLength(0,0);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    h = imscUtils.toComputedLength(\\r\\n                        attr.h.value,\\r\\n                        attr.h.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.h,\\r\\n                        null,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n                    if (h === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                if (attr === \\\"auto\\\") {\\r\\n\\r\\n                    w = new imscUtils.ComputedLength(0,0);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    w = imscUtils.toComputedLength(\\r\\n                        attr.w.value,\\r\\n                        attr.w.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.w,\\r\\n                        null,\\r\\n                        doc.pxLength.w\\r\\n                        );\\r\\n\\r\\n                    if (w === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return {'h': h, 'w': w};\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"overflow\\\",\\r\\n            \\\"hidden\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"padding\\\",\\r\\n            \\\"0px\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                var s = str.split(\\\" \\\");\\r\\n                if (s.length > 4)\\r\\n                    return null;\\r\\n                var r = [];\\r\\n                for (var i in s) {\\r\\n\\r\\n                    var l = imscUtils.parseLength(s[i]);\\r\\n                    if (!l)\\r\\n                        return null;\\r\\n                    r.push(l);\\r\\n                }\\r\\n\\r\\n                return r;\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var padding;\\r\\n\\r\\n                /* TODO: make sure we are in region */\\r\\n\\r\\n                /*\\r\\n                 * expand padding shortcuts to \\r\\n                 * [before, end, after, start]\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (attr.length === 1) {\\r\\n\\r\\n                    padding = [attr[0], attr[0], attr[0], attr[0]];\\r\\n\\r\\n                } else if (attr.length === 2) {\\r\\n\\r\\n                    padding = [attr[0], attr[1], attr[0], attr[1]];\\r\\n\\r\\n                } else if (attr.length === 3) {\\r\\n\\r\\n                    padding = [attr[0], attr[1], attr[2], attr[1]];\\r\\n\\r\\n                } else if (attr.length === 4) {\\r\\n\\r\\n                    padding = [attr[0], attr[1], attr[2], attr[3]];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                /* TODO: take into account tts:direction */\\r\\n\\r\\n                /* \\r\\n                 * transform [before, end, after, start] according to writingMode to \\r\\n                 * [top,left,bottom,right]\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                var dir = element.styleAttrs[imscStyles.byName.writingMode.qname];\\r\\n\\r\\n                if (dir === \\\"lrtb\\\" || dir === \\\"lr\\\") {\\r\\n\\r\\n                    padding = [padding[0], padding[3], padding[2], padding[1]];\\r\\n\\r\\n                } else if (dir === \\\"rltb\\\" || dir === \\\"rl\\\") {\\r\\n\\r\\n                    padding = [padding[0], padding[1], padding[2], padding[3]];\\r\\n\\r\\n                } else if (dir === \\\"tblr\\\") {\\r\\n\\r\\n                    padding = [padding[3], padding[0], padding[1], padding[2]];\\r\\n\\r\\n                } else if (dir === \\\"tbrl\\\" || dir === \\\"tb\\\") {\\r\\n\\r\\n                    padding = [padding[3], padding[2], padding[1], padding[0]];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                var out = [];\\r\\n\\r\\n                for (var i in padding) {\\r\\n\\r\\n                    if (padding[i].value === 0) {\\r\\n\\r\\n                        out[i] = new imscUtils.ComputedLength(0,0);\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        out[i] = imscUtils.toComputedLength(\\r\\n                            padding[i].value,\\r\\n                            padding[i].unit,\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                            i === \\\"0\\\" || i === \\\"2\\\" ? element.styleAttrs[imscStyles.byName.extent.qname].h : element.styleAttrs[imscStyles.byName.extent.qname].w,\\r\\n                            i === \\\"0\\\" || i === \\\"2\\\" ? doc.cellLength.h : doc.cellLength.w,\\r\\n                            i === \\\"0\\\" || i === \\\"2\\\" ? doc.pxLength.h: doc.pxLength.w\\r\\n                            );\\r\\n\\r\\n                        if (out[i] === null) return null;\\r\\n\\r\\n                    }\\r\\n                }\\r\\n\\r\\n\\r\\n                return out;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"position\\\",\\r\\n            \\\"top left\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                return imscUtils.parsePosition(str);\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr) {\\r\\n                var h;\\r\\n                var w;\\r\\n                \\r\\n                h = imscUtils.toComputedLength(\\r\\n                    attr.v.offset.value,\\r\\n                    attr.v.offset.unit,\\r\\n                    null,\\r\\n                    new imscUtils.ComputedLength(\\r\\n                        - element.styleAttrs[imscStyles.byName.extent.qname].h.rw,\\r\\n                        doc.dimensions.h.rh - element.styleAttrs[imscStyles.byName.extent.qname].h.rh \\r\\n                    ),\\r\\n                    null,\\r\\n                    doc.pxLength.h\\r\\n                    );\\r\\n\\r\\n                if (h === null) return null;\\r\\n\\r\\n\\r\\n                if (attr.v.edge === \\\"bottom\\\") {\\r\\n\\r\\n                    h = new imscUtils.ComputedLength(\\r\\n                        - h.rw - element.styleAttrs[imscStyles.byName.extent.qname].h.rw,\\r\\n                        doc.dimensions.h.rh - h.rh - element.styleAttrs[imscStyles.byName.extent.qname].h.rh\\r\\n                    );\\r\\n            \\r\\n                }\\r\\n\\r\\n                w = imscUtils.toComputedLength(\\r\\n                    attr.h.offset.value,\\r\\n                    attr.h.offset.unit,\\r\\n                    null,\\r\\n                    new imscUtils.ComputedLength(\\r\\n                        doc.dimensions.w.rw - element.styleAttrs[imscStyles.byName.extent.qname].w.rw,\\r\\n                        - element.styleAttrs[imscStyles.byName.extent.qname].w.rh\\r\\n                    ),\\r\\n                    null,\\r\\n                    doc.pxLength.w\\r\\n                    );\\r\\n\\r\\n                if (h === null) return null;\\r\\n\\r\\n                if (attr.h.edge === \\\"right\\\") {\\r\\n                    \\r\\n                    w = new imscUtils.ComputedLength(\\r\\n                        doc.dimensions.w.rw - w.rw - element.styleAttrs[imscStyles.byName.extent.qname].w.rw,\\r\\n                        - w.rh - element.styleAttrs[imscStyles.byName.extent.qname].w.rh\\r\\n                    );\\r\\n\\r\\n                }\\r\\n\\r\\n                return {'h': h, 'w': w};\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"ruby\\\",\\r\\n            \\\"none\\\",\\r\\n            ['span'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"rubyAlign\\\",\\r\\n            \\\"center\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                \\r\\n                if (! (str === \\\"center\\\" || str === \\\"spaceAround\\\")) {\\r\\n                    return null;\\r\\n                }\\r\\n                \\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"rubyPosition\\\",\\r\\n            \\\"outside\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"rubyReserve\\\",\\r\\n            \\\"none\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var s = str.split(\\\" \\\");\\r\\n\\r\\n                var r = [null, null];\\r\\n\\r\\n                if (s.length === 0 || s.length > 2)\\r\\n                    return null;\\r\\n\\r\\n                if (s[0] === \\\"none\\\" ||\\r\\n                    s[0] === \\\"both\\\" ||\\r\\n                    s[0] === \\\"after\\\" ||\\r\\n                    s[0] === \\\"before\\\" ||\\r\\n                    s[0] === \\\"outside\\\") {\\r\\n\\r\\n                    r[0] = s[0];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                if (s.length === 2 && s[0] !== \\\"none\\\") {\\r\\n\\r\\n                    var l = imscUtils.parseLength(s[1]);\\r\\n\\r\\n                    if (l) {\\r\\n\\r\\n                        r[1] = l;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n\\r\\n                return r;\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                if (attr[0] === \\\"none\\\") {\\r\\n\\r\\n                    return attr;\\r\\n\\r\\n                }\\r\\n\\r\\n                var fs = null;\\r\\n\\r\\n                if (attr[1] === null) {\\r\\n\\r\\n                    fs = new imscUtils.ComputedLength(\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname].rw * 0.5,\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname].rh * 0.5\\r\\n                    );\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    fs = imscUtils.toComputedLength(attr[1].value,\\r\\n                        attr[1].unit,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        doc.cellLength.h,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n                \\r\\n                }\\r\\n\\r\\n                if (fs === null) return null;\\r\\n\\r\\n                return [attr[0], fs];\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"showBackground\\\",\\r\\n            \\\"always\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"textAlign\\\",\\r\\n            \\\"start\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n                /* Section 7.16.9 of XSL */\\r\\n\\r\\n                if (attr === \\\"left\\\") {\\r\\n\\r\\n                    return \\\"start\\\";\\r\\n\\r\\n                } else if (attr === \\\"right\\\") {\\r\\n\\r\\n                    return \\\"end\\\";\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return attr;\\r\\n\\r\\n                }\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"textCombine\\\",\\r\\n            \\\"none\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var s = str.split(\\\" \\\");\\r\\n\\r\\n                if (s.length === 1) {\\r\\n\\r\\n                    if (s[0] === \\\"none\\\" || s[0] === \\\"all\\\") {\\r\\n\\r\\n                        return [s[0]];\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return null;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"textDecoration\\\",\\r\\n            \\\"none\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str.split(\\\" \\\");\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"textEmphasis\\\",\\r\\n            \\\"none\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var e = str.split(\\\" \\\");\\r\\n\\r\\n                var rslt = {style: null, symbol: null, color: null, position: null};\\r\\n\\r\\n                for (var i in e) {\\r\\n\\r\\n                    if (e[i] === \\\"none\\\" || e[i] === \\\"auto\\\") {\\r\\n\\r\\n                        rslt.style = e[i];\\r\\n\\r\\n                    } else if (e[i] === \\\"filled\\\" ||\\r\\n                        e[i] === \\\"open\\\") {\\r\\n\\r\\n                        rslt.style = e[i];\\r\\n\\r\\n                    } else if (e[i] === \\\"circle\\\" ||\\r\\n                        e[i] === \\\"dot\\\" ||\\r\\n                        e[i] === \\\"sesame\\\") {\\r\\n\\r\\n                        rslt.symbol = e[i];\\r\\n\\r\\n                    } else if (e[i] === \\\"current\\\") {\\r\\n\\r\\n                        rslt.color = e[i];\\r\\n\\r\\n                    } else if (e[i] === \\\"outside\\\" || e[i] === \\\"before\\\" || e[i] === \\\"after\\\") {\\r\\n\\r\\n                        rslt.position = e[i];\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        rslt.color = imscUtils.parseColor(e[i]);\\r\\n\\r\\n                        if (rslt.color === null)\\r\\n                            return null;\\r\\n\\r\\n                    }\\r\\n                }\\r\\n\\r\\n                if (rslt.style == null && rslt.symbol == null) {\\r\\n\\r\\n                    rslt.style = \\\"auto\\\";\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rslt.symbol = rslt.symbol || \\\"circle\\\";\\r\\n                    rslt.style = rslt.style || \\\"filled\\\";\\r\\n\\r\\n                }\\r\\n\\r\\n                rslt.position = rslt.position || \\\"outside\\\";\\r\\n                rslt.color = rslt.color || \\\"current\\\";\\r\\n\\r\\n                return rslt;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"textOutline\\\",\\r\\n            \\\"none\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                /*\\r\\n                 * returns {c: <color>?, thichness: <length>} | \\\"none\\\"\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (str === \\\"none\\\") {\\r\\n\\r\\n                    return str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    var r = {};\\r\\n                    var s = str.split(\\\" \\\");\\r\\n                    if (s.length === 0 || s.length > 2)\\r\\n                        return null;\\r\\n                    var c = imscUtils.parseColor(s[0]);\\r\\n\\r\\n                    r.color = c;\\r\\n\\r\\n                    if (c !== null)\\r\\n                        s.shift();\\r\\n\\r\\n                    if (s.length !== 1)\\r\\n                        return null;\\r\\n\\r\\n                    var l = imscUtils.parseLength(s[0]);\\r\\n\\r\\n                    if (!l)\\r\\n                        return null;\\r\\n\\r\\n                    r.thickness = l;\\r\\n\\r\\n                    return r;\\r\\n                }\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                /*\\r\\n                 * returns {color: <color>, thickness: <norm length>}\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (attr === \\\"none\\\")\\r\\n                    return attr;\\r\\n\\r\\n                var rslt = {};\\r\\n\\r\\n                if (attr.color === null) {\\r\\n\\r\\n                    rslt.color = element.styleAttrs[imscStyles.byName.color.qname];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rslt.color = attr.color;\\r\\n\\r\\n                }\\r\\n\\r\\n                rslt.thickness = imscUtils.toComputedLength(\\r\\n                    attr.thickness.value,\\r\\n                    attr.thickness.unit,\\r\\n                    element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                    element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                    doc.cellLength.h,\\r\\n                    doc.pxLength.h\\r\\n                    );\\r\\n\\r\\n                if (rslt.thickness === null)\\r\\n                    return null;\\r\\n\\r\\n                return rslt;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"textShadow\\\",\\r\\n            \\\"none\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseTextShadow,\\r\\n            function (doc, parent, element, attr) {\\r\\n\\r\\n                /*\\r\\n                 * returns [{x_off: <length>, y_off: <length>, b_radius: <length>, color: <color>}*] or \\\"none\\\"\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (attr === \\\"none\\\")\\r\\n                    return attr;\\r\\n\\r\\n                var r = [];\\r\\n\\r\\n                for (var i in attr) {\\r\\n\\r\\n                    var shadow = {};\\r\\n\\r\\n                    shadow.x_off = imscUtils.toComputedLength(\\r\\n                        attr[i][0].value,\\r\\n                        attr[i][0].unit,\\r\\n                        null,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        null,\\r\\n                        doc.pxLength.w\\r\\n                        );\\r\\n\\r\\n                    if (shadow.x_off === null)\\r\\n                        return null;\\r\\n\\r\\n                    shadow.y_off = imscUtils.toComputedLength(\\r\\n                        attr[i][1].value,\\r\\n                        attr[i][1].unit,\\r\\n                        null,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        null,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n                    if (shadow.y_off === null)\\r\\n                        return null;\\r\\n\\r\\n                    if (attr[i][2] === null) {\\r\\n\\r\\n                        shadow.b_radius = 0;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        shadow.b_radius = imscUtils.toComputedLength(\\r\\n                            attr[i][2].value,\\r\\n                            attr[i][2].unit,\\r\\n                            null,\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                            null,\\r\\n                            doc.pxLength.h\\r\\n                            );\\r\\n\\r\\n                        if (shadow.b_radius === null)\\r\\n                            return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                    if (attr[i][3] === null) {\\r\\n\\r\\n                        shadow.color = element.styleAttrs[imscStyles.byName.color.qname];\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        shadow.color = attr[i][3];\\r\\n\\r\\n                    }\\r\\n\\r\\n                    r.push(shadow);\\r\\n\\r\\n                }\\r\\n\\r\\n                return r;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"unicodeBidi\\\",\\r\\n            \\\"normal\\\",\\r\\n            ['span', 'p'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"visibility\\\",\\r\\n            \\\"visible\\\",\\r\\n            ['body', 'div', 'p', 'region', 'span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"wrapOption\\\",\\r\\n            \\\"wrap\\\",\\r\\n            ['span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"writingMode\\\",\\r\\n            \\\"lrtb\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \\\"zIndex\\\",\\r\\n            \\\"auto\\\",\\r\\n            ['region'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                var rslt;\\r\\n\\r\\n                if (str === 'auto') {\\r\\n\\r\\n                    rslt = str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rslt = parseInt(str);\\r\\n\\r\\n                    if (isNaN(rslt)) {\\r\\n                        rslt = null;\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return rslt;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_ebutts,\\r\\n            \\\"linePadding\\\",\\r\\n            \\\"0c\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            false,\\r\\n            imscUtils.parseLength,\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                return imscUtils.toComputedLength(attr.value, attr.unit, null, null, doc.cellLength.w, null);\\r\\n\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_ebutts,\\r\\n            \\\"multiRowAlign\\\",\\r\\n            \\\"auto\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            false,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_smpte,\\r\\n            \\\"backgroundImage\\\",\\r\\n            null,\\r\\n            ['div'],\\r\\n            false,\\r\\n            false,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_itts,\\r\\n            \\\"forcedDisplay\\\",\\r\\n            \\\"false\\\",\\r\\n            ['body', 'div', 'p', 'region', 'span'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str === 'true' ? true : false;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_itts,\\r\\n            \\\"fillLineGap\\\",\\r\\n            \\\"false\\\",\\r\\n            ['p'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str === 'true' ? true : false;\\r\\n            },\\r\\n            null\\r\\n            )\\r\\n    ];\\r\\n\\r\\n    /* TODO: allow null parse function */\\r\\n\\r\\n    imscStyles.byQName = {};\\r\\n    for (var i in imscStyles.all) {\\r\\n\\r\\n        imscStyles.byQName[imscStyles.all[i].qname] = imscStyles.all[i];\\r\\n    }\\r\\n\\r\\n    imscStyles.byName = {};\\r\\n    for (var j in imscStyles.all) {\\r\\n\\r\\n        imscStyles.byName[imscStyles.all[j].name] = imscStyles.all[j];\\r\\n    }\\r\\n\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n    typeof imscNames === 'undefined' ? __webpack_require__(/*! ./names */ \\\"../node_modules/imsc/src/main/js/names.js\\\") : imscNames,\\r\\n    typeof imscUtils === 'undefined' ? __webpack_require__(/*! ./utils */ \\\"../node_modules/imsc/src/main/js/utils.js\\\") : imscUtils);\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/styles.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/imsc/src/main/js/utils.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/imsc/src/main/js/utils.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \\\"AS IS\\\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscUtils\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscUtils) { // wrapper for non-node envs\\r\\n\\r\\n    /* Documents the error handler interface */\\r\\n\\r\\n    /**\\r\\n     * @classdesc Generic interface for handling events. The interface exposes four\\r\\n     * methods:\\r\\n     * * <pre>info</pre>: unusual event that does not result in an inconsistent state\\r\\n     * * <pre>warn</pre>: unexpected event that should not result in an inconsistent state\\r\\n     * * <pre>error</pre>: unexpected event that may result in an inconsistent state\\r\\n     * * <pre>fatal</pre>: unexpected event that results in an inconsistent state\\r\\n     *   and termination of processing\\r\\n     * Each method takes a single <pre>string</pre> describing the event as argument,\\r\\n     * and returns a single <pre>boolean</pre>, which terminates processing if <pre>true</pre>.\\r\\n     *\\r\\n     * @name ErrorHandler\\r\\n     * @class\\r\\n     */\\r\\n\\r\\n\\r\\n    /*\\r\\n     * Parses a TTML color expression\\r\\n     * \\r\\n     */\\r\\n\\r\\n    var HEX_COLOR_RE = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/;\\r\\n    var DEC_COLOR_RE = /rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/;\\r\\n    var DEC_COLORA_RE = /rgba\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/;\\r\\n    var NAMED_COLOR = {\\r\\n        transparent: [0, 0, 0, 0],\\r\\n        black: [0, 0, 0, 255],\\r\\n        silver: [192, 192, 192, 255],\\r\\n        gray: [128, 128, 128, 255],\\r\\n        white: [255, 255, 255, 255],\\r\\n        maroon: [128, 0, 0, 255],\\r\\n        red: [255, 0, 0, 255],\\r\\n        purple: [128, 0, 128, 255],\\r\\n        fuchsia: [255, 0, 255, 255],\\r\\n        magenta: [255, 0, 255, 255],\\r\\n        green: [0, 128, 0, 255],\\r\\n        lime: [0, 255, 0, 255],\\r\\n        olive: [128, 128, 0, 255],\\r\\n        yellow: [255, 255, 0, 255],\\r\\n        navy: [0, 0, 128, 255],\\r\\n        blue: [0, 0, 255, 255],\\r\\n        teal: [0, 128, 128, 255],\\r\\n        aqua: [0, 255, 255, 255],\\r\\n        cyan: [0, 255, 255, 255]\\r\\n    };\\r\\n\\r\\n    imscUtils.parseColor = function (str) {\\r\\n\\r\\n        var m;\\r\\n        \\r\\n        var r = null;\\r\\n        \\r\\n        var nc = NAMED_COLOR[str.toLowerCase()];\\r\\n        \\r\\n        if (nc !== undefined) {\\r\\n\\r\\n            r = nc;\\r\\n\\r\\n        } else if ((m = HEX_COLOR_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = [parseInt(m[1], 16),\\r\\n                parseInt(m[2], 16),\\r\\n                parseInt(m[3], 16),\\r\\n                (m[4] !== undefined ? parseInt(m[4], 16) : 255)];\\r\\n            \\r\\n        } else if ((m = DEC_COLOR_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = [parseInt(m[1]),\\r\\n                parseInt(m[2]),\\r\\n                parseInt(m[3]),\\r\\n                255];\\r\\n            \\r\\n        } else if ((m = DEC_COLORA_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = [parseInt(m[1]),\\r\\n                parseInt(m[2]),\\r\\n                parseInt(m[3]),\\r\\n                parseInt(m[4])];\\r\\n            \\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n    var LENGTH_RE = /^((?:\\\\+|\\\\-)?\\\\d*(?:\\\\.\\\\d+)?)(px|em|c|%|rh|rw)$/;\\r\\n\\r\\n    imscUtils.parseLength = function (str) {\\r\\n\\r\\n        var m;\\r\\n\\r\\n        var r = null;\\r\\n\\r\\n        if ((m = LENGTH_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = {value: parseFloat(m[1]), unit: m[2]};\\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n    imscUtils.parseTextShadow = function (str) {\\r\\n\\r\\n        var shadows = str.split(\\\",\\\");\\r\\n\\r\\n        var r = [];\\r\\n\\r\\n        for (var i in shadows) {\\r\\n\\r\\n            var shadow = shadows[i].split(\\\" \\\");\\r\\n\\r\\n            if (shadow.length === 1 && shadow[0] === \\\"none\\\") {\\r\\n\\r\\n                return \\\"none\\\";\\r\\n\\r\\n            } else if (shadow.length > 1 && shadow.length < 5) {\\r\\n\\r\\n                var out_shadow = [null, null, null, null];\\r\\n\\r\\n                /* x offset */\\r\\n\\r\\n                var l = imscUtils.parseLength(shadow.shift());\\r\\n\\r\\n                if (l === null)\\r\\n                    return null;\\r\\n\\r\\n                out_shadow[0] = l;\\r\\n\\r\\n                /* y offset */\\r\\n\\r\\n                l = imscUtils.parseLength(shadow.shift());\\r\\n\\r\\n                if (l === null)\\r\\n                    return null;\\r\\n\\r\\n                out_shadow[1] = l;\\r\\n\\r\\n                /* is there a third component */\\r\\n\\r\\n                if (shadow.length === 0) {\\r\\n                    r.push(out_shadow);\\r\\n                    continue;\\r\\n                }\\r\\n\\r\\n                l = imscUtils.parseLength(shadow[0]);\\r\\n\\r\\n                if (l !== null) {\\r\\n\\r\\n                    out_shadow[2] = l;\\r\\n\\r\\n                    shadow.shift();\\r\\n\\r\\n                }\\r\\n\\r\\n                if (shadow.length === 0) {\\r\\n                    r.push(out_shadow);\\r\\n                    continue;\\r\\n                }\\r\\n\\r\\n                var c = imscUtils.parseColor(shadow[0]);\\r\\n\\r\\n                if (c === null)\\r\\n                    return null;\\r\\n\\r\\n                out_shadow[3] = c;\\r\\n\\r\\n                r.push(out_shadow);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n\\r\\n    imscUtils.parsePosition = function (str) {\\r\\n\\r\\n        /* see https://www.w3.org/TR/ttml2/#style-value-position */\\r\\n\\r\\n        var s = str.split(\\\" \\\");\\r\\n\\r\\n        var isKeyword = function (str) {\\r\\n\\r\\n            return str === \\\"center\\\" ||\\r\\n                    str === \\\"left\\\" ||\\r\\n                    str === \\\"top\\\" ||\\r\\n                    str === \\\"bottom\\\" ||\\r\\n                    str === \\\"right\\\";\\r\\n\\r\\n        };\\r\\n\\r\\n        if (s.length > 4) {\\r\\n\\r\\n            return null;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* initial clean-up pass */\\r\\n\\r\\n        for (var j in s) {\\r\\n\\r\\n            if (!isKeyword(s[j])) {\\r\\n\\r\\n                var l = imscUtils.parseLength(s[j]);\\r\\n\\r\\n                if (l === null)\\r\\n                    return null;\\r\\n\\r\\n                s[j] = l;\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* position default */\\r\\n\\r\\n        var pos = {\\r\\n            h: {edge: \\\"left\\\", offset: {value: 50, unit: \\\"%\\\"}},\\r\\n            v: {edge: \\\"top\\\", offset: {value: 50, unit: \\\"%\\\"}}\\r\\n        };\\r\\n\\r\\n        /* update position */\\r\\n\\r\\n        for (var i = 0; i < s.length; ) {\\r\\n\\r\\n            /* extract the current component */\\r\\n\\r\\n            var comp = s[i++];\\r\\n\\r\\n            if (isKeyword(comp)) {\\r\\n\\r\\n                /* we have a keyword */\\r\\n\\r\\n                var offset = {value: 0, unit: \\\"%\\\"};\\r\\n\\r\\n                /* peek at the next component */\\r\\n\\r\\n                if (s.length !== 2 && i < s.length && (!isKeyword(s[i]))) {\\r\\n\\r\\n                    /* followed by an offset */\\r\\n\\r\\n                    offset = s[i++];\\r\\n\\r\\n                }\\r\\n\\r\\n                /* skip if center */\\r\\n\\r\\n                if (comp === \\\"right\\\") {\\r\\n\\r\\n                    pos.h.edge = comp;\\r\\n\\r\\n                    pos.h.offset = offset;\\r\\n\\r\\n                } else if (comp === \\\"bottom\\\") {\\r\\n\\r\\n                    pos.v.edge = comp;\\r\\n\\r\\n\\r\\n                    pos.v.offset = offset;\\r\\n\\r\\n\\r\\n                } else if (comp === \\\"left\\\") {\\r\\n\\r\\n                    pos.h.offset = offset;\\r\\n\\r\\n\\r\\n                } else if (comp === \\\"top\\\") {\\r\\n\\r\\n                    pos.v.offset = offset;\\r\\n\\r\\n\\r\\n                }\\r\\n\\r\\n            } else if (s.length === 1 || s.length === 2) {\\r\\n\\r\\n                /* we have a bare value */\\r\\n\\r\\n                if (i === 1) {\\r\\n\\r\\n                    /* assign it to left edge if first bare value */\\r\\n\\r\\n                    pos.h.offset = comp;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    /* assign it to top edge if second bare value */\\r\\n\\r\\n                    pos.v.offset = comp;\\r\\n\\r\\n                }\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /* error condition */\\r\\n\\r\\n                return null;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return pos;\\r\\n    };\\r\\n\\r\\n\\r\\n    imscUtils.ComputedLength = function (rw, rh) {\\r\\n        this.rw = rw;\\r\\n        this.rh = rh;\\r\\n    };\\r\\n\\r\\n    imscUtils.ComputedLength.prototype.toUsedLength = function (width, height) {\\r\\n        return width * this.rw + height * this.rh;\\r\\n    };\\r\\n\\r\\n    imscUtils.ComputedLength.prototype.isZero = function () {\\r\\n        return this.rw === 0 && this.rh === 0;\\r\\n    };\\r\\n\\r\\n    /**\\r\\n     * Computes a specified length to a root container relative length\\r\\n     * \\r\\n     * @param {number} lengthVal Length value to be computed\\r\\n     * @param {string} lengthUnit Units of the length value\\r\\n     * @param {number} emScale length of 1em, or null if em is not allowed\\r\\n     * @param {number} percentScale length to which , or null if perecentage is not allowed\\r\\n     * @param {number} cellScale length of 1c, or null if c is not allowed\\r\\n     * @param {number} pxScale length of 1px, or null if px is not allowed\\r\\n     * @param {number} direction 0 if the length is computed in the horizontal direction, 1 if the length is computed in the vertical direction\\r\\n     * @return {number} Computed length\\r\\n     */\\r\\n    imscUtils.toComputedLength = function(lengthVal, lengthUnit, emLength, percentLength, cellLength, pxLength) {\\r\\n\\r\\n        if (lengthUnit === \\\"%\\\" && percentLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    percentLength.rw * lengthVal / 100,\\r\\n                    percentLength.rh * lengthVal / 100\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \\\"em\\\" && emLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    emLength.rw * lengthVal,\\r\\n                    emLength.rh * lengthVal\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \\\"c\\\" && cellLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    lengthVal * cellLength.rw,\\r\\n                    lengthVal * cellLength.rh\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \\\"px\\\" && pxLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    lengthVal * pxLength.rw,\\r\\n                    lengthVal * pxLength.rh\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \\\"rh\\\") {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    0,\\r\\n                    lengthVal / 100\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \\\"rw\\\") {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    lengthVal / 100,\\r\\n                    0                    \\r\\n                    );\\r\\n\\r\\n        } else {\\r\\n\\r\\n            return null;\\r\\n\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n\\r\\n\\r\\n})( false ? undefined : exports);\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/utils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/inherits/inherits_browser.js\":\n/*!****************************************************!*\\\n  !*** ../node_modules/inherits/inherits_browser.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"if (typeof Object.create === 'function') {\\n  // implementation from standard node.js 'util' module\\n  module.exports = function inherits(ctor, superCtor) {\\n    if (superCtor) {\\n      ctor.super_ = superCtor\\n      ctor.prototype = Object.create(superCtor.prototype, {\\n        constructor: {\\n          value: ctor,\\n          enumerable: false,\\n          writable: true,\\n          configurable: true\\n        }\\n      })\\n    }\\n  };\\n} else {\\n  // old school shim for old browsers\\n  module.exports = function inherits(ctor, superCtor) {\\n    if (superCtor) {\\n      ctor.super_ = superCtor\\n      var TempCtor = function () {}\\n      TempCtor.prototype = superCtor.prototype\\n      ctor.prototype = new TempCtor()\\n      ctor.prototype.constructor = ctor\\n    }\\n  }\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/inherits/inherits_browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/is-function/index.js\":\n/*!********************************************!*\\\n  !*** ../node_modules/is-function/index.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"module.exports = isFunction\\n\\nvar toString = Object.prototype.toString\\n\\nfunction isFunction (fn) {\\n  if (!fn) {\\n    return false\\n  }\\n  var string = toString.call(fn)\\n  return string === '[object Function]' ||\\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\\n    (typeof window !== 'undefined' &&\\n     // IE8 and below\\n     (fn === window.setTimeout ||\\n      fn === window.alert ||\\n      fn === window.confirm ||\\n      fn === window.prompt))\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/is-function/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/is-obj/index.js\":\n/*!***************************************!*\\\n  !*** ../node_modules/is-obj/index.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\nmodule.exports = function (x) {\\n\\tvar type = typeof x;\\n\\treturn x !== null && (type === 'object' || type === 'function');\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/is-obj/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/isarray/index.js\":\n/*!****************************************!*\\\n  !*** ../node_modules/isarray/index.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"var toString = {}.toString;\\n\\nmodule.exports = Array.isArray || function (arr) {\\n  return toString.call(arr) == '[object Array]';\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/isarray/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/keycode/index.js\":\n/*!****************************************!*\\\n  !*** ../node_modules/keycode/index.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"// Source: http://jsfiddle.net/vWx8V/\\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\\n\\n/**\\n * Conenience method returns corresponding value for given keyName or keyCode.\\n *\\n * @param {Mixed} keyCode {Number} or keyName {String}\\n * @return {Mixed}\\n * @api public\\n */\\n\\nfunction keyCode(searchInput) {\\n  // Keyboard Events\\n  if (searchInput && 'object' === typeof searchInput) {\\n    var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\\n    if (hasKeyCode) searchInput = hasKeyCode\\n  }\\n\\n  // Numbers\\n  if ('number' === typeof searchInput) return names[searchInput]\\n\\n  // Everything else (cast to string)\\n  var search = String(searchInput)\\n\\n  // check codes\\n  var foundNamedKey = codes[search.toLowerCase()]\\n  if (foundNamedKey) return foundNamedKey\\n\\n  // check aliases\\n  var foundNamedKey = aliases[search.toLowerCase()]\\n  if (foundNamedKey) return foundNamedKey\\n\\n  // weird character?\\n  if (search.length === 1) return search.charCodeAt(0)\\n\\n  return undefined\\n}\\n\\n/**\\n * Compares a keyboard event with a given keyCode or keyName.\\n *\\n * @param {Event} event Keyboard event that should be tested\\n * @param {Mixed} keyCode {Number} or keyName {String}\\n * @return {Boolean}\\n * @api public\\n */\\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\\n  if (event && 'object' === typeof event) {\\n    var keyCode = event.which || event.keyCode || event.charCode\\n    if (keyCode === null || keyCode === undefined) { return false; }\\n    if (typeof nameOrCode === 'string') {\\n      // check codes\\n      var foundNamedKey = codes[nameOrCode.toLowerCase()]\\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\\n    \\n      // check aliases\\n      var foundNamedKey = aliases[nameOrCode.toLowerCase()]\\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\\n    } else if (typeof nameOrCode === 'number') {\\n      return nameOrCode === keyCode;\\n    }\\n    return false;\\n  }\\n}\\n\\nexports = module.exports = keyCode;\\n\\n/**\\n * Get by name\\n *\\n *   exports.code['enter'] // => 13\\n */\\n\\nvar codes = exports.code = exports.codes = {\\n  'backspace': 8,\\n  'tab': 9,\\n  'enter': 13,\\n  'shift': 16,\\n  'ctrl': 17,\\n  'alt': 18,\\n  'pause/break': 19,\\n  'caps lock': 20,\\n  'esc': 27,\\n  'space': 32,\\n  'page up': 33,\\n  'page down': 34,\\n  'end': 35,\\n  'home': 36,\\n  'left': 37,\\n  'up': 38,\\n  'right': 39,\\n  'down': 40,\\n  'insert': 45,\\n  'delete': 46,\\n  'command': 91,\\n  'left command': 91,\\n  'right command': 93,\\n  'numpad *': 106,\\n  'numpad +': 107,\\n  'numpad -': 109,\\n  'numpad .': 110,\\n  'numpad /': 111,\\n  'num lock': 144,\\n  'scroll lock': 145,\\n  'my computer': 182,\\n  'my calculator': 183,\\n  ';': 186,\\n  '=': 187,\\n  ',': 188,\\n  '-': 189,\\n  '.': 190,\\n  '/': 191,\\n  '`': 192,\\n  '[': 219,\\n  '\\\\\\\\': 220,\\n  ']': 221,\\n  \\\"'\\\": 222\\n}\\n\\n// Helper aliases\\n\\nvar aliases = exports.aliases = {\\n  'windows': 91,\\n  '⇧': 16,\\n  '⌥': 18,\\n  '⌃': 17,\\n  '⌘': 91,\\n  'ctl': 17,\\n  'control': 17,\\n  'option': 18,\\n  'pause': 19,\\n  'break': 19,\\n  'caps': 20,\\n  'return': 13,\\n  'escape': 27,\\n  'spc': 32,\\n  'spacebar': 32,\\n  'pgup': 33,\\n  'pgdn': 34,\\n  'ins': 45,\\n  'del': 46,\\n  'cmd': 91\\n}\\n\\n/*!\\n * Programatically add the following\\n */\\n\\n// lower case chars\\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\\n\\n// numbers\\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\\n\\n// function keys\\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\\n\\n// numpad keys\\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\\n\\n/**\\n * Get by code\\n *\\n *   exports.name[13] // => 'Enter'\\n */\\n\\nvar names = exports.names = exports.title = {} // title for backward compat\\n\\n// Create reverse mapping\\nfor (i in codes) names[codes[i]] = i\\n\\n// Add aliases\\nfor (var alias in aliases) {\\n  codes[alias] = aliases[alias]\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/keycode/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/m3u8-parser/dist/m3u8-parser.es.js\":\n/*!**********************************************************!*\\\n  !*** ../node_modules/m3u8-parser/dist/m3u8-parser.es.js ***!\n  \\**********************************************************/\n/*! exports provided: LineStream, ParseStream, Parser */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"LineStream\\\", function() { return LineStream; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"ParseStream\\\", function() { return ParseStream; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Parser\\\", function() { return Parser; });\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\");\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\\n/*! @name m3u8-parser @version 4.4.0 @license Apache-2.0 */\\n\\n\\nfunction _extends() {\\n  _extends = Object.assign || function (target) {\\n    for (var i = 1; i < arguments.length; i++) {\\n      var source = arguments[i];\\n\\n      for (var key in source) {\\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\\n          target[key] = source[key];\\n        }\\n      }\\n    }\\n\\n    return target;\\n  };\\n\\n  return _extends.apply(this, arguments);\\n}\\n\\nfunction _inheritsLoose(subClass, superClass) {\\n  subClass.prototype = Object.create(superClass.prototype);\\n  subClass.prototype.constructor = subClass;\\n  subClass.__proto__ = superClass;\\n}\\n\\nfunction _assertThisInitialized(self) {\\n  if (self === void 0) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return self;\\n}\\n\\n/**\\n * @file stream.js\\n */\\n\\n/**\\n * A lightweight readable stream implementation that handles event dispatching.\\n *\\n * @class Stream\\n */\\nvar Stream =\\n/*#__PURE__*/\\nfunction () {\\n  function Stream() {\\n    this.listeners = {};\\n  }\\n  /**\\n   * Add a listener for a specified event type.\\n   *\\n   * @param {string} type the event name\\n   * @param {Function} listener the callback to be invoked when an event of\\n   * the specified type occurs\\n   */\\n\\n\\n  var _proto = Stream.prototype;\\n\\n  _proto.on = function on(type, listener) {\\n    if (!this.listeners[type]) {\\n      this.listeners[type] = [];\\n    }\\n\\n    this.listeners[type].push(listener);\\n  }\\n  /**\\n   * Remove a listener for a specified event type.\\n   *\\n   * @param {string} type the event name\\n   * @param {Function} listener  a function previously registered for this\\n   * type of event through `on`\\n   * @return {boolean} if we could turn it off or not\\n   */\\n  ;\\n\\n  _proto.off = function off(type, listener) {\\n    if (!this.listeners[type]) {\\n      return false;\\n    }\\n\\n    var index = this.listeners[type].indexOf(listener);\\n    this.listeners[type].splice(index, 1);\\n    return index > -1;\\n  }\\n  /**\\n   * Trigger an event of the specified type on this stream. Any additional\\n   * arguments to this function are passed as parameters to event listeners.\\n   *\\n   * @param {string} type the event name\\n   */\\n  ;\\n\\n  _proto.trigger = function trigger(type) {\\n    var callbacks = this.listeners[type];\\n    var i;\\n    var length;\\n    var args;\\n\\n    if (!callbacks) {\\n      return;\\n    } // Slicing the arguments on every invocation of this method\\n    // can add a significant amount of overhead. Avoid the\\n    // intermediate object creation for the common case of a\\n    // single callback argument\\n\\n\\n    if (arguments.length === 2) {\\n      length = callbacks.length;\\n\\n      for (i = 0; i < length; ++i) {\\n        callbacks[i].call(this, arguments[1]);\\n      }\\n    } else {\\n      args = Array.prototype.slice.call(arguments, 1);\\n      length = callbacks.length;\\n\\n      for (i = 0; i < length; ++i) {\\n        callbacks[i].apply(this, args);\\n      }\\n    }\\n  }\\n  /**\\n   * Destroys the stream and cleans up.\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.listeners = {};\\n  }\\n  /**\\n   * Forwards all `data` events on this stream to the destination stream. The\\n   * destination stream should provide a method `push` to receive the data\\n   * events as they arrive.\\n   *\\n   * @param {Stream} destination the stream that will receive all `data` events\\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n   */\\n  ;\\n\\n  _proto.pipe = function pipe(destination) {\\n    this.on('data', function (data) {\\n      destination.push(data);\\n    });\\n  };\\n\\n  return Stream;\\n}();\\n\\n/**\\n * A stream that buffers string input and generates a `data` event for each\\n * line.\\n *\\n * @class LineStream\\n * @extends Stream\\n */\\n\\nvar LineStream =\\n/*#__PURE__*/\\nfunction (_Stream) {\\n  _inheritsLoose(LineStream, _Stream);\\n\\n  function LineStream() {\\n    var _this;\\n\\n    _this = _Stream.call(this) || this;\\n    _this.buffer = '';\\n    return _this;\\n  }\\n  /**\\n   * Add new data to be parsed.\\n   *\\n   * @param {string} data the text to process\\n   */\\n\\n\\n  var _proto = LineStream.prototype;\\n\\n  _proto.push = function push(data) {\\n    var nextNewline;\\n    this.buffer += data;\\n    nextNewline = this.buffer.indexOf('\\\\n');\\n\\n    for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\\\n')) {\\n      this.trigger('data', this.buffer.substring(0, nextNewline));\\n      this.buffer = this.buffer.substring(nextNewline + 1);\\n    }\\n  };\\n\\n  return LineStream;\\n}(Stream);\\n\\n/**\\n * \\\"forgiving\\\" attribute list psuedo-grammar:\\n * attributes -> keyvalue (',' keyvalue)*\\n * keyvalue   -> key '=' value\\n * key        -> [^=]*\\n * value      -> '\\\"' [^\\\"]* '\\\"' | [^,]*\\n */\\n\\nvar attributeSeparator = function attributeSeparator() {\\n  var key = '[^=]*';\\n  var value = '\\\"[^\\\"]*\\\"|[^,]*';\\n  var keyvalue = '(?:' + key + ')=(?:' + value + ')';\\n  return new RegExp('(?:^|,)(' + keyvalue + ')');\\n};\\n/**\\n * Parse attributes from a line given the separator\\n *\\n * @param {string} attributes the attribute line to parse\\n */\\n\\n\\nvar parseAttributes = function parseAttributes(attributes) {\\n  // split the string using attributes as the separator\\n  var attrs = attributes.split(attributeSeparator());\\n  var result = {};\\n  var i = attrs.length;\\n  var attr;\\n\\n  while (i--) {\\n    // filter out unmatched portions of the string\\n    if (attrs[i] === '') {\\n      continue;\\n    } // split the key and value\\n\\n\\n    attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\\n\\n    attr[0] = attr[0].replace(/^\\\\s+|\\\\s+$/g, '');\\n    attr[1] = attr[1].replace(/^\\\\s+|\\\\s+$/g, '');\\n    attr[1] = attr[1].replace(/^['\\\"](.*)['\\\"]$/g, '$1');\\n    result[attr[0]] = attr[1];\\n  }\\n\\n  return result;\\n};\\n/**\\n * A line-level M3U8 parser event stream. It expects to receive input one\\n * line at a time and performs a context-free parse of its contents. A stream\\n * interpretation of a manifest can be useful if the manifest is expected to\\n * be too large to fit comfortably into memory or the entirety of the input\\n * is not immediately available. Otherwise, it's probably much easier to work\\n * with a regular `Parser` object.\\n *\\n * Produces `data` events with an object that captures the parser's\\n * interpretation of the input. That object has a property `tag` that is one\\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\\n * property, `line`, which captures the entirety of the input without\\n * interpretation. Comments similarly have a single additional property\\n * `text` which is the input without the leading `#`.\\n *\\n * Tags always have a property `tagType` which is the lower-cased version of\\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\\n * tags are given the tag type `unknown` and a single additional property\\n * `data` with the remainder of the input.\\n *\\n * @class ParseStream\\n * @extends Stream\\n */\\n\\n\\nvar ParseStream =\\n/*#__PURE__*/\\nfunction (_Stream) {\\n  _inheritsLoose(ParseStream, _Stream);\\n\\n  function ParseStream() {\\n    var _this;\\n\\n    _this = _Stream.call(this) || this;\\n    _this.customParsers = [];\\n    _this.tagMappers = [];\\n    return _this;\\n  }\\n  /**\\n   * Parses an additional line of input.\\n   *\\n   * @param {string} line a single line of an M3U8 file to parse\\n   */\\n\\n\\n  var _proto = ParseStream.prototype;\\n\\n  _proto.push = function push(line) {\\n    var _this2 = this;\\n\\n    var match;\\n    var event; // strip whitespace\\n\\n    line = line.trim();\\n\\n    if (line.length === 0) {\\n      // ignore empty lines\\n      return;\\n    } // URIs\\n\\n\\n    if (line[0] !== '#') {\\n      this.trigger('data', {\\n        type: 'uri',\\n        uri: line\\n      });\\n      return;\\n    } // map tags\\n\\n\\n    var newLines = this.tagMappers.reduce(function (acc, mapper) {\\n      var mappedLine = mapper(line); // skip if unchanged\\n\\n      if (mappedLine === line) {\\n        return acc;\\n      }\\n\\n      return acc.concat([mappedLine]);\\n    }, [line]);\\n    newLines.forEach(function (newLine) {\\n      for (var i = 0; i < _this2.customParsers.length; i++) {\\n        if (_this2.customParsers[i].call(_this2, newLine)) {\\n          return;\\n        }\\n      } // Comments\\n\\n\\n      if (newLine.indexOf('#EXT') !== 0) {\\n        _this2.trigger('data', {\\n          type: 'comment',\\n          text: newLine.slice(1)\\n        });\\n\\n        return;\\n      } // strip off any carriage returns here so the regex matching\\n      // doesn't have to account for them.\\n\\n\\n      newLine = newLine.replace('\\\\r', ''); // Tags\\n\\n      match = /^#EXTM3U/.exec(newLine);\\n\\n      if (match) {\\n        _this2.trigger('data', {\\n          type: 'tag',\\n          tagType: 'm3u'\\n        });\\n\\n        return;\\n      }\\n\\n      match = /^#EXTINF:?([0-9\\\\.]*)?,?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'inf'\\n        };\\n\\n        if (match[1]) {\\n          event.duration = parseFloat(match[1]);\\n        }\\n\\n        if (match[2]) {\\n          event.title = match[2];\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'targetduration'\\n        };\\n\\n        if (match[1]) {\\n          event.duration = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'totalduration'\\n        };\\n\\n        if (match[1]) {\\n          event.duration = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-VERSION:?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'version'\\n        };\\n\\n        if (match[1]) {\\n          event.version = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-MEDIA-SEQUENCE:?(\\\\-?[0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'media-sequence'\\n        };\\n\\n        if (match[1]) {\\n          event.number = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:?(\\\\-?[0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'discontinuity-sequence'\\n        };\\n\\n        if (match[1]) {\\n          event.number = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'playlist-type'\\n        };\\n\\n        if (match[1]) {\\n          event.playlistType = match[1];\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'byterange'\\n        };\\n\\n        if (match[1]) {\\n          event.length = parseInt(match[1], 10);\\n        }\\n\\n        if (match[2]) {\\n          event.offset = parseInt(match[2], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'allow-cache'\\n        };\\n\\n        if (match[1]) {\\n          event.allowed = !/NO/.test(match[1]);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-MAP:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'map'\\n        };\\n\\n        if (match[1]) {\\n          var attributes = parseAttributes(match[1]);\\n\\n          if (attributes.URI) {\\n            event.uri = attributes.URI;\\n          }\\n\\n          if (attributes.BYTERANGE) {\\n            var _attributes$BYTERANGE = attributes.BYTERANGE.split('@'),\\n                length = _attributes$BYTERANGE[0],\\n                offset = _attributes$BYTERANGE[1];\\n\\n            event.byterange = {};\\n\\n            if (length) {\\n              event.byterange.length = parseInt(length, 10);\\n            }\\n\\n            if (offset) {\\n              event.byterange.offset = parseInt(offset, 10);\\n            }\\n          }\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-STREAM-INF:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'stream-inf'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]);\\n\\n          if (event.attributes.RESOLUTION) {\\n            var split = event.attributes.RESOLUTION.split('x');\\n            var resolution = {};\\n\\n            if (split[0]) {\\n              resolution.width = parseInt(split[0], 10);\\n            }\\n\\n            if (split[1]) {\\n              resolution.height = parseInt(split[1], 10);\\n            }\\n\\n            event.attributes.RESOLUTION = resolution;\\n          }\\n\\n          if (event.attributes.BANDWIDTH) {\\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\\n          }\\n\\n          if (event.attributes['PROGRAM-ID']) {\\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\\n          }\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-MEDIA:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'media'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\\n\\n      if (match) {\\n        _this2.trigger('data', {\\n          type: 'tag',\\n          tagType: 'endlist'\\n        });\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\\n\\n      if (match) {\\n        _this2.trigger('data', {\\n          type: 'tag',\\n          tagType: 'discontinuity'\\n        });\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'program-date-time'\\n        };\\n\\n        if (match[1]) {\\n          event.dateTimeString = match[1];\\n          event.dateTimeObject = new Date(match[1]);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-KEY:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'key'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\\n\\n          if (event.attributes.IV) {\\n            if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\\n              event.attributes.IV = event.attributes.IV.substring(2);\\n            }\\n\\n            event.attributes.IV = event.attributes.IV.match(/.{8}/g);\\n            event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\\n            event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\\n            event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\\n            event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\\n            event.attributes.IV = new Uint32Array(event.attributes.IV);\\n          }\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-START:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'start'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]);\\n          event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\\n          event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'cue-out-cont'\\n        };\\n\\n        if (match[1]) {\\n          event.data = match[1];\\n        } else {\\n          event.data = '';\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-CUE-OUT:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'cue-out'\\n        };\\n\\n        if (match[1]) {\\n          event.data = match[1];\\n        } else {\\n          event.data = '';\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'cue-in'\\n        };\\n\\n        if (match[1]) {\\n          event.data = match[1];\\n        } else {\\n          event.data = '';\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      } // unknown tag type\\n\\n\\n      _this2.trigger('data', {\\n        type: 'tag',\\n        data: newLine.slice(4)\\n      });\\n    });\\n  }\\n  /**\\n   * Add a parser for custom headers\\n   *\\n   * @param {Object}   options              a map of options for the added parser\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {string}   options.customType   the custom type to register to the output\\n   * @param {Function} [options.dataParser] function to parse the line into an object\\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\\n   */\\n  ;\\n\\n  _proto.addParser = function addParser(_ref) {\\n    var _this3 = this;\\n\\n    var expression = _ref.expression,\\n        customType = _ref.customType,\\n        dataParser = _ref.dataParser,\\n        segment = _ref.segment;\\n\\n    if (typeof dataParser !== 'function') {\\n      dataParser = function dataParser(line) {\\n        return line;\\n      };\\n    }\\n\\n    this.customParsers.push(function (line) {\\n      var match = expression.exec(line);\\n\\n      if (match) {\\n        _this3.trigger('data', {\\n          type: 'custom',\\n          data: dataParser(line),\\n          customType: customType,\\n          segment: segment\\n        });\\n\\n        return true;\\n      }\\n    });\\n  }\\n  /**\\n   * Add a custom header mapper\\n   *\\n   * @param {Object}   options\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {Function} options.map          function to translate tag into a different tag\\n   */\\n  ;\\n\\n  _proto.addTagMapper = function addTagMapper(_ref2) {\\n    var expression = _ref2.expression,\\n        map = _ref2.map;\\n\\n    var mapFn = function mapFn(line) {\\n      if (expression.test(line)) {\\n        return map(line);\\n      }\\n\\n      return line;\\n    };\\n\\n    this.tagMappers.push(mapFn);\\n  };\\n\\n  return ParseStream;\\n}(Stream);\\n\\nfunction decodeB64ToUint8Array(b64Text) {\\n  var decodedString = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.atob(b64Text || '');\\n  var array = new Uint8Array(decodedString.length);\\n\\n  for (var i = 0; i < decodedString.length; i++) {\\n    array[i] = decodedString.charCodeAt(i);\\n  }\\n\\n  return array;\\n}\\n\\n/**\\n * A parser for M3U8 files. The current interpretation of the input is\\n * exposed as a property `manifest` on parser objects. It's just two lines to\\n * create and parse a manifest once you have the contents available as a string:\\n *\\n * ```js\\n * var parser = new m3u8.Parser();\\n * parser.push(xhr.responseText);\\n * ```\\n *\\n * New input can later be applied to update the manifest object by calling\\n * `push` again.\\n *\\n * The parser attempts to create a usable manifest object even if the\\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\\n * events during the parse if it encounters input that seems invalid or\\n * requires some property of the manifest object to be defaulted.\\n *\\n * @class Parser\\n * @extends Stream\\n */\\n\\nvar Parser =\\n/*#__PURE__*/\\nfunction (_Stream) {\\n  _inheritsLoose(Parser, _Stream);\\n\\n  function Parser() {\\n    var _this;\\n\\n    _this = _Stream.call(this) || this;\\n    _this.lineStream = new LineStream();\\n    _this.parseStream = new ParseStream();\\n\\n    _this.lineStream.pipe(_this.parseStream);\\n    /* eslint-disable consistent-this */\\n\\n\\n    var self = _assertThisInitialized(_this);\\n    /* eslint-enable consistent-this */\\n\\n\\n    var uris = [];\\n    var currentUri = {}; // if specified, the active EXT-X-MAP definition\\n\\n    var currentMap; // if specified, the active decryption key\\n\\n    var _key;\\n\\n    var noop = function noop() {};\\n\\n    var defaultMediaGroups = {\\n      'AUDIO': {},\\n      'VIDEO': {},\\n      'CLOSED-CAPTIONS': {},\\n      'SUBTITLES': {}\\n    }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\\n    // used in MPDs with Widevine encrypted streams.\\n\\n    var widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\\n\\n    var currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\\n\\n    _this.manifest = {\\n      allowCache: true,\\n      discontinuityStarts: [],\\n      segments: []\\n    }; // update the manifest with the m3u8 entry from the parse stream\\n\\n    _this.parseStream.on('data', function (entry) {\\n      var mediaGroup;\\n      var rendition;\\n      ({\\n        tag: function tag() {\\n          // switch based on the tag type\\n          (({\\n            'allow-cache': function allowCache() {\\n              this.manifest.allowCache = entry.allowed;\\n\\n              if (!('allowed' in entry)) {\\n                this.trigger('info', {\\n                  message: 'defaulting allowCache to YES'\\n                });\\n                this.manifest.allowCache = true;\\n              }\\n            },\\n            byterange: function byterange() {\\n              var byterange = {};\\n\\n              if ('length' in entry) {\\n                currentUri.byterange = byterange;\\n                byterange.length = entry.length;\\n\\n                if (!('offset' in entry)) {\\n                  this.trigger('info', {\\n                    message: 'defaulting offset to zero'\\n                  });\\n                  entry.offset = 0;\\n                }\\n              }\\n\\n              if ('offset' in entry) {\\n                currentUri.byterange = byterange;\\n                byterange.offset = entry.offset;\\n              }\\n            },\\n            endlist: function endlist() {\\n              this.manifest.endList = true;\\n            },\\n            inf: function inf() {\\n              if (!('mediaSequence' in this.manifest)) {\\n                this.manifest.mediaSequence = 0;\\n                this.trigger('info', {\\n                  message: 'defaulting media sequence to zero'\\n                });\\n              }\\n\\n              if (!('discontinuitySequence' in this.manifest)) {\\n                this.manifest.discontinuitySequence = 0;\\n                this.trigger('info', {\\n                  message: 'defaulting discontinuity sequence to zero'\\n                });\\n              }\\n\\n              if (entry.duration > 0) {\\n                currentUri.duration = entry.duration;\\n              }\\n\\n              if (entry.duration === 0) {\\n                currentUri.duration = 0.01;\\n                this.trigger('info', {\\n                  message: 'updating zero segment duration to a small value'\\n                });\\n              }\\n\\n              this.manifest.segments = uris;\\n            },\\n            key: function key() {\\n              if (!entry.attributes) {\\n                this.trigger('warn', {\\n                  message: 'ignoring key declaration without attribute list'\\n                });\\n                return;\\n              } // clear the active encryption key\\n\\n\\n              if (entry.attributes.METHOD === 'NONE') {\\n                _key = null;\\n                return;\\n              }\\n\\n              if (!entry.attributes.URI) {\\n                this.trigger('warn', {\\n                  message: 'ignoring key declaration without URI'\\n                });\\n                return;\\n              } // check if the content is encrypted for Widevine\\n              // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\\n\\n\\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\\n                var VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\\n\\n                if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\\n                  this.trigger('warn', {\\n                    message: 'invalid key method provided for Widevine'\\n                  });\\n                  return;\\n                }\\n\\n                if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\\n                  this.trigger('warn', {\\n                    message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\\n                  });\\n                }\\n\\n                if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\\n                  this.trigger('warn', {\\n                    message: 'invalid key URI provided for Widevine'\\n                  });\\n                  return;\\n                }\\n\\n                if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\\n                  this.trigger('warn', {\\n                    message: 'invalid key ID provided for Widevine'\\n                  });\\n                  return;\\n                } // if Widevine key attributes are valid, store them as `contentProtection`\\n                // on the manifest to emulate Widevine tag structure in a DASH mpd\\n\\n\\n                this.manifest.contentProtection = {\\n                  'com.widevine.alpha': {\\n                    attributes: {\\n                      schemeIdUri: entry.attributes.KEYFORMAT,\\n                      // remove '0x' from the key id string\\n                      keyId: entry.attributes.KEYID.substring(2)\\n                    },\\n                    // decode the base64-encoded PSSH box\\n                    pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\\n                  }\\n                };\\n                return;\\n              }\\n\\n              if (!entry.attributes.METHOD) {\\n                this.trigger('warn', {\\n                  message: 'defaulting key method to AES-128'\\n                });\\n              } // setup an encryption key for upcoming segments\\n\\n\\n              _key = {\\n                method: entry.attributes.METHOD || 'AES-128',\\n                uri: entry.attributes.URI\\n              };\\n\\n              if (typeof entry.attributes.IV !== 'undefined') {\\n                _key.iv = entry.attributes.IV;\\n              }\\n            },\\n            'media-sequence': function mediaSequence() {\\n              if (!isFinite(entry.number)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid media sequence: ' + entry.number\\n                });\\n                return;\\n              }\\n\\n              this.manifest.mediaSequence = entry.number;\\n            },\\n            'discontinuity-sequence': function discontinuitySequence() {\\n              if (!isFinite(entry.number)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\\n                });\\n                return;\\n              }\\n\\n              this.manifest.discontinuitySequence = entry.number;\\n              currentTimeline = entry.number;\\n            },\\n            'playlist-type': function playlistType() {\\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\\n                });\\n                return;\\n              }\\n\\n              this.manifest.playlistType = entry.playlistType;\\n            },\\n            map: function map() {\\n              currentMap = {};\\n\\n              if (entry.uri) {\\n                currentMap.uri = entry.uri;\\n              }\\n\\n              if (entry.byterange) {\\n                currentMap.byterange = entry.byterange;\\n              }\\n            },\\n            'stream-inf': function streamInf() {\\n              this.manifest.playlists = uris;\\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\\n\\n              if (!entry.attributes) {\\n                this.trigger('warn', {\\n                  message: 'ignoring empty stream-inf attributes'\\n                });\\n                return;\\n              }\\n\\n              if (!currentUri.attributes) {\\n                currentUri.attributes = {};\\n              }\\n\\n              _extends(currentUri.attributes, entry.attributes);\\n            },\\n            media: function media() {\\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\\n\\n              if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring incomplete or missing media group'\\n                });\\n                return;\\n              } // find the media group, creating defaults as necessary\\n\\n\\n              var mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\\n              mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\\n              mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\\n\\n              rendition = {\\n                default: /yes/i.test(entry.attributes.DEFAULT)\\n              };\\n\\n              if (rendition.default) {\\n                rendition.autoselect = true;\\n              } else {\\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\\n              }\\n\\n              if (entry.attributes.LANGUAGE) {\\n                rendition.language = entry.attributes.LANGUAGE;\\n              }\\n\\n              if (entry.attributes.URI) {\\n                rendition.uri = entry.attributes.URI;\\n              }\\n\\n              if (entry.attributes['INSTREAM-ID']) {\\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\\n              }\\n\\n              if (entry.attributes.CHARACTERISTICS) {\\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\\n              }\\n\\n              if (entry.attributes.FORCED) {\\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\\n              } // insert the new rendition\\n\\n\\n              mediaGroup[entry.attributes.NAME] = rendition;\\n            },\\n            discontinuity: function discontinuity() {\\n              currentTimeline += 1;\\n              currentUri.discontinuity = true;\\n              this.manifest.discontinuityStarts.push(uris.length);\\n            },\\n            'program-date-time': function programDateTime() {\\n              if (typeof this.manifest.dateTimeString === 'undefined') {\\n                // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\\n                // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\\n                // to the manifest object\\n                // TODO: Consider removing this in future major version\\n                this.manifest.dateTimeString = entry.dateTimeString;\\n                this.manifest.dateTimeObject = entry.dateTimeObject;\\n              }\\n\\n              currentUri.dateTimeString = entry.dateTimeString;\\n              currentUri.dateTimeObject = entry.dateTimeObject;\\n            },\\n            targetduration: function targetduration() {\\n              if (!isFinite(entry.duration) || entry.duration < 0) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid target duration: ' + entry.duration\\n                });\\n                return;\\n              }\\n\\n              this.manifest.targetDuration = entry.duration;\\n            },\\n            totalduration: function totalduration() {\\n              if (!isFinite(entry.duration) || entry.duration < 0) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid total duration: ' + entry.duration\\n                });\\n                return;\\n              }\\n\\n              this.manifest.totalDuration = entry.duration;\\n            },\\n            start: function start() {\\n              if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\\n                this.trigger('warn', {\\n                  message: 'ignoring start declaration without appropriate attribute list'\\n                });\\n                return;\\n              }\\n\\n              this.manifest.start = {\\n                timeOffset: entry.attributes['TIME-OFFSET'],\\n                precise: entry.attributes.PRECISE\\n              };\\n            },\\n            'cue-out': function cueOut() {\\n              currentUri.cueOut = entry.data;\\n            },\\n            'cue-out-cont': function cueOutCont() {\\n              currentUri.cueOutCont = entry.data;\\n            },\\n            'cue-in': function cueIn() {\\n              currentUri.cueIn = entry.data;\\n            }\\n          })[entry.tagType] || noop).call(self);\\n        },\\n        uri: function uri() {\\n          currentUri.uri = entry.uri;\\n          uris.push(currentUri); // if no explicit duration was declared, use the target duration\\n\\n          if (this.manifest.targetDuration && !('duration' in currentUri)) {\\n            this.trigger('warn', {\\n              message: 'defaulting segment duration to the target duration'\\n            });\\n            currentUri.duration = this.manifest.targetDuration;\\n          } // annotate with encryption information, if necessary\\n\\n\\n          if (_key) {\\n            currentUri.key = _key;\\n          }\\n\\n          currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\\n\\n          if (currentMap) {\\n            currentUri.map = currentMap;\\n          } // prepare for the next URI\\n\\n\\n          currentUri = {};\\n        },\\n        comment: function comment() {// comments are not important for playback\\n        },\\n        custom: function custom() {\\n          // if this is segment-level data attach the output to the segment\\n          if (entry.segment) {\\n            currentUri.custom = currentUri.custom || {};\\n            currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\\n          } else {\\n            this.manifest.custom = this.manifest.custom || {};\\n            this.manifest.custom[entry.customType] = entry.data;\\n          }\\n        }\\n      })[entry.type].call(self);\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Parse the input string and update the manifest object.\\n   *\\n   * @param {string} chunk a potentially incomplete portion of the manifest\\n   */\\n\\n\\n  var _proto = Parser.prototype;\\n\\n  _proto.push = function push(chunk) {\\n    this.lineStream.push(chunk);\\n  }\\n  /**\\n   * Flush any remaining input. This can be handy if the last line of an M3U8\\n   * manifest did not contain a trailing newline but the file has been\\n   * completely received.\\n   */\\n  ;\\n\\n  _proto.end = function end() {\\n    // flush any buffered input\\n    this.lineStream.push('\\\\n');\\n  }\\n  /**\\n   * Add an additional parser for non-standard tags\\n   *\\n   * @param {Object}   options              a map of options for the added parser\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {string}   options.type         the type to register to the output\\n   * @param {Function} [options.dataParser] function to parse the line into an object\\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\\n   */\\n  ;\\n\\n  _proto.addParser = function addParser(options) {\\n    this.parseStream.addParser(options);\\n  }\\n  /**\\n   * Add a custom header mapper\\n   *\\n   * @param {Object}   options\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {Function} options.map          function to translate tag into a different tag\\n   */\\n  ;\\n\\n  _proto.addTagMapper = function addTagMapper(options) {\\n    this.parseStream.addTagMapper(options);\\n  };\\n\\n  return Parser;\\n}(Stream);\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/m3u8-parser/dist/m3u8-parser.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mpd-parser/dist/mpd-parser.es.js\":\n/*!********************************************************!*\\\n  !*** ../node_modules/mpd-parser/dist/mpd-parser.es.js ***!\n  \\********************************************************/\n/*! exports provided: VERSION, inheritAttributes, parse, parseUTCTiming, stringToMpdXml, toM3u8, toPlaylists */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"VERSION\\\", function() { return VERSION; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"inheritAttributes\\\", function() { return inheritAttributes; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"parse\\\", function() { return parse; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"parseUTCTiming\\\", function() { return parseUTCTiming; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"stringToMpdXml\\\", function() { return stringToMpdXml; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"toM3u8\\\", function() { return toM3u8; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"toPlaylists\\\", function() { return toPlaylists; });\\n/* harmony import */ var _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/dist/resolve-url */ \\\"../node_modules/@videojs/vhs-utils/dist/resolve-url.js\\\");\\n/* harmony import */ var _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\");\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/dist/decode-b64-to-uint8-array */ \\\"../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js\\\");\\n/* harmony import */ var _videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var xmldom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! xmldom */ \\\"../node_modules/xmldom/dom-parser.js\\\");\\n/* harmony import */ var xmldom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(xmldom__WEBPACK_IMPORTED_MODULE_3__);\\n/*! @name mpd-parser @version 0.10.0 @license Apache-2.0 */\\n\\n\\n\\n\\n\\nvar version = \\\"0.10.0\\\";\\n\\nvar isObject = function isObject(obj) {\\n  return !!obj && typeof obj === 'object';\\n};\\n\\nvar merge = function merge() {\\n  for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {\\n    objects[_key] = arguments[_key];\\n  }\\n\\n  return objects.reduce(function (result, source) {\\n    Object.keys(source).forEach(function (key) {\\n      if (Array.isArray(result[key]) && Array.isArray(source[key])) {\\n        result[key] = result[key].concat(source[key]);\\n      } else if (isObject(result[key]) && isObject(source[key])) {\\n        result[key] = merge(result[key], source[key]);\\n      } else {\\n        result[key] = source[key];\\n      }\\n    });\\n    return result;\\n  }, {});\\n};\\nvar values = function values(o) {\\n  return Object.keys(o).map(function (k) {\\n    return o[k];\\n  });\\n};\\n\\nvar range = function range(start, end) {\\n  var result = [];\\n\\n  for (var i = start; i < end; i++) {\\n    result.push(i);\\n  }\\n\\n  return result;\\n};\\nvar flatten = function flatten(lists) {\\n  return lists.reduce(function (x, y) {\\n    return x.concat(y);\\n  }, []);\\n};\\nvar from = function from(list) {\\n  if (!list.length) {\\n    return [];\\n  }\\n\\n  var result = [];\\n\\n  for (var i = 0; i < list.length; i++) {\\n    result.push(list[i]);\\n  }\\n\\n  return result;\\n};\\nvar findIndexes = function findIndexes(l, key) {\\n  return l.reduce(function (a, e, i) {\\n    if (e[key]) {\\n      a.push(i);\\n    }\\n\\n    return a;\\n  }, []);\\n};\\n\\nvar errors = {\\n  INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\\n  DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\\n  DASH_INVALID_XML: 'DASH_INVALID_XML',\\n  NO_BASE_URL: 'NO_BASE_URL',\\n  MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\\n  SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\\n  UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\\n};\\n\\n/**\\n * @typedef {Object} SingleUri\\n * @property {string} uri - relative location of segment\\n * @property {string} resolvedUri - resolved location of segment\\n * @property {Object} byterange - Object containing information on how to make byte range\\n *   requests following byte-range-spec per RFC2616.\\n * @property {String} byterange.length - length of range request\\n * @property {String} byterange.offset - byte offset of range request\\n *\\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\\n */\\n\\n/**\\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\\n * that conforms to how m3u8-parser is structured\\n *\\n * @see https://github.com/videojs/m3u8-parser\\n *\\n * @param {string} baseUrl - baseUrl provided by <BaseUrl> nodes\\n * @param {string} source - source url for segment\\n * @param {string} range - optional range used for range calls,\\n *   follows  RFC 2616, Clause 14.35.1\\n * @return {SingleUri} full segment information transformed into a format similar\\n *   to m3u8-parser\\n */\\n\\nvar urlTypeToSegment = function urlTypeToSegment(_ref) {\\n  var _ref$baseUrl = _ref.baseUrl,\\n      baseUrl = _ref$baseUrl === void 0 ? '' : _ref$baseUrl,\\n      _ref$source = _ref.source,\\n      source = _ref$source === void 0 ? '' : _ref$source,\\n      _ref$range = _ref.range,\\n      range = _ref$range === void 0 ? '' : _ref$range,\\n      _ref$indexRange = _ref.indexRange,\\n      indexRange = _ref$indexRange === void 0 ? '' : _ref$indexRange;\\n  var segment = {\\n    uri: source,\\n    resolvedUri: _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default()(baseUrl || '', source)\\n  };\\n\\n  if (range || indexRange) {\\n    var rangeStr = range ? range : indexRange;\\n    var ranges = rangeStr.split('-');\\n    var startRange = parseInt(ranges[0], 10);\\n    var endRange = parseInt(ranges[1], 10); // byterange should be inclusive according to\\n    // RFC 2616, Clause 14.35.1\\n\\n    segment.byterange = {\\n      length: endRange - startRange + 1,\\n      offset: startRange\\n    };\\n  }\\n\\n  return segment;\\n};\\nvar byteRangeToString = function byteRangeToString(byterange) {\\n  // `endRange` is one less than `offset + length` because the HTTP range\\n  // header uses inclusive ranges\\n  var endRange = byterange.offset + byterange.length - 1;\\n  return byterange.offset + \\\"-\\\" + endRange;\\n};\\n\\n/**\\n * Functions for calculating the range of available segments in static and dynamic\\n * manifests.\\n */\\n\\nvar segmentRange = {\\n  /**\\n   * Returns the entire range of available segments for a static MPD\\n   *\\n   * @param {Object} attributes\\n   *        Inheritied MPD attributes\\n   * @return {{ start: number, end: number }}\\n   *         The start and end numbers for available segments\\n   */\\n  static: function _static(attributes) {\\n    var duration = attributes.duration,\\n        _attributes$timescale = attributes.timescale,\\n        timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\\n        sourceDuration = attributes.sourceDuration;\\n    return {\\n      start: 0,\\n      end: Math.ceil(sourceDuration / (duration / timescale))\\n    };\\n  },\\n\\n  /**\\n   * Returns the current live window range of available segments for a dynamic MPD\\n   *\\n   * @param {Object} attributes\\n   *        Inheritied MPD attributes\\n   * @return {{ start: number, end: number }}\\n   *         The start and end numbers for available segments\\n   */\\n  dynamic: function dynamic(attributes) {\\n    var NOW = attributes.NOW,\\n        clientOffset = attributes.clientOffset,\\n        availabilityStartTime = attributes.availabilityStartTime,\\n        _attributes$timescale2 = attributes.timescale,\\n        timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\\n        duration = attributes.duration,\\n        _attributes$start = attributes.start,\\n        start = _attributes$start === void 0 ? 0 : _attributes$start,\\n        _attributes$minimumUp = attributes.minimumUpdatePeriod,\\n        minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp,\\n        _attributes$timeShift = attributes.timeShiftBufferDepth,\\n        timeShiftBufferDepth = _attributes$timeShift === void 0 ? Infinity : _attributes$timeShift;\\n    var now = (NOW + clientOffset) / 1000;\\n    var periodStartWC = availabilityStartTime + start;\\n    var periodEndWC = now + minimumUpdatePeriod;\\n    var periodDuration = periodEndWC - periodStartWC;\\n    var segmentCount = Math.ceil(periodDuration * timescale / duration);\\n    var availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\\n    var availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\\n    return {\\n      start: Math.max(0, availableStart),\\n      end: Math.min(segmentCount, availableEnd)\\n    };\\n  }\\n};\\n/**\\n * Maps a range of numbers to objects with information needed to build the corresponding\\n * segment list\\n *\\n * @name toSegmentsCallback\\n * @function\\n * @param {number} number\\n *        Number of the segment\\n * @param {number} index\\n *        Index of the number in the range list\\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\\n *         Object with segment timing and duration info\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\\n * information needed to build the segment list.\\n *\\n * @param {Object} attributes\\n *        Inherited MPD attributes\\n * @return {toSegmentsCallback}\\n *         Callback map function\\n */\\n\\nvar toSegments = function toSegments(attributes) {\\n  return function (number, index) {\\n    var duration = attributes.duration,\\n        _attributes$timescale3 = attributes.timescale,\\n        timescale = _attributes$timescale3 === void 0 ? 1 : _attributes$timescale3,\\n        periodIndex = attributes.periodIndex,\\n        _attributes$startNumb = attributes.startNumber,\\n        startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb;\\n    return {\\n      number: startNumber + number,\\n      duration: duration / timescale,\\n      timeline: periodIndex,\\n      time: index * duration\\n    };\\n  };\\n};\\n/**\\n * Returns a list of objects containing segment timing and duration info used for\\n * building the list of segments. This uses the @duration attribute specified\\n * in the MPD manifest to derive the range of segments.\\n *\\n * @param {Object} attributes\\n *        Inherited MPD attributes\\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\\n *         List of Objects with segment timing and duration info\\n */\\n\\nvar parseByDuration = function parseByDuration(attributes) {\\n  var _attributes$type = attributes.type,\\n      type = _attributes$type === void 0 ? 'static' : _attributes$type,\\n      duration = attributes.duration,\\n      _attributes$timescale4 = attributes.timescale,\\n      timescale = _attributes$timescale4 === void 0 ? 1 : _attributes$timescale4,\\n      sourceDuration = attributes.sourceDuration;\\n\\n  var _segmentRange$type = segmentRange[type](attributes),\\n      start = _segmentRange$type.start,\\n      end = _segmentRange$type.end;\\n\\n  var segments = range(start, end).map(toSegments(attributes));\\n\\n  if (type === 'static') {\\n    var index = segments.length - 1; // final segment may be less than full segment duration\\n\\n    segments[index].duration = sourceDuration - duration / timescale * index;\\n  }\\n\\n  return segments;\\n};\\n\\n/**\\n * Translates SegmentBase into a set of segments.\\n * (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\\n * node should be translated into segment.\\n *\\n * @param {Object} attributes\\n *   Object containing all inherited attributes from parent elements with attribute\\n *   names as keys\\n * @return {Object.<Array>} list of segments\\n */\\n\\nvar segmentsFromBase = function segmentsFromBase(attributes) {\\n  var baseUrl = attributes.baseUrl,\\n      _attributes$initializ = attributes.initialization,\\n      initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ,\\n      sourceDuration = attributes.sourceDuration,\\n      _attributes$timescale = attributes.timescale,\\n      timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\\n      _attributes$indexRang = attributes.indexRange,\\n      indexRange = _attributes$indexRang === void 0 ? '' : _attributes$indexRang,\\n      duration = attributes.duration; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\\n\\n  if (!baseUrl) {\\n    throw new Error(errors.NO_BASE_URL);\\n  }\\n\\n  var initSegment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: initialization.sourceURL,\\n    range: initialization.range\\n  });\\n  var segment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: baseUrl,\\n    indexRange: indexRange\\n  });\\n  segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\\n  // (since SegmentBase is only for one total segment)\\n\\n  if (duration) {\\n    var segmentTimeInfo = parseByDuration(attributes);\\n\\n    if (segmentTimeInfo.length) {\\n      segment.duration = segmentTimeInfo[0].duration;\\n      segment.timeline = segmentTimeInfo[0].timeline;\\n    }\\n  } else if (sourceDuration) {\\n    segment.duration = sourceDuration / timescale;\\n    segment.timeline = 0;\\n  } // This is used for mediaSequence\\n\\n\\n  segment.number = 0;\\n  return [segment];\\n};\\n/**\\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\\n * according to the sidx information given.\\n *\\n * playlist.sidx has metadadata about the sidx where-as the sidx param\\n * is the parsed sidx box itself.\\n *\\n * @param {Object} playlist the playlist to update the sidx information for\\n * @param {Object} sidx the parsed sidx box\\n * @return {Object} the playlist object with the updated sidx information\\n */\\n\\nvar addSegmentsToPlaylist = function addSegmentsToPlaylist(playlist, sidx, baseUrl) {\\n  // Retain init segment information\\n  var initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial master manifest parsing\\n\\n  var sourceDuration = playlist.sidx.duration; // Retain source timeline\\n\\n  var timeline = playlist.timeline || 0;\\n  var sidxByteRange = playlist.sidx.byterange;\\n  var sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\\n\\n  var timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\\n\\n  var mediaReferences = sidx.references.filter(function (r) {\\n    return r.referenceType !== 1;\\n  });\\n  var segments = []; // firstOffset is the offset from the end of the sidx box\\n\\n  var startIndex = sidxEnd + sidx.firstOffset;\\n\\n  for (var i = 0; i < mediaReferences.length; i++) {\\n    var reference = sidx.references[i]; // size of the referenced (sub)segment\\n\\n    var size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\\n    // this will be converted to seconds when generating segments\\n\\n    var duration = reference.subsegmentDuration; // should be an inclusive range\\n\\n    var endIndex = startIndex + size - 1;\\n    var indexRange = startIndex + \\\"-\\\" + endIndex;\\n    var attributes = {\\n      baseUrl: baseUrl,\\n      timescale: timescale,\\n      timeline: timeline,\\n      // this is used in parseByDuration\\n      periodIndex: timeline,\\n      duration: duration,\\n      sourceDuration: sourceDuration,\\n      indexRange: indexRange\\n    };\\n    var segment = segmentsFromBase(attributes)[0];\\n\\n    if (initSegment) {\\n      segment.map = initSegment;\\n    }\\n\\n    segments.push(segment);\\n    startIndex += size;\\n  }\\n\\n  playlist.segments = segments;\\n  return playlist;\\n};\\n\\nvar mergeDiscontiguousPlaylists = function mergeDiscontiguousPlaylists(playlists) {\\n  var mergedPlaylists = values(playlists.reduce(function (acc, playlist) {\\n    // assuming playlist IDs are the same across periods\\n    // TODO: handle multiperiod where representation sets are not the same\\n    // across periods\\n    var name = playlist.attributes.id + (playlist.attributes.lang || ''); // Periods after first\\n\\n    if (acc[name]) {\\n      var _acc$name$segments;\\n\\n      // first segment of subsequent periods signal a discontinuity\\n      if (playlist.segments[0]) {\\n        playlist.segments[0].discontinuity = true;\\n      }\\n\\n      (_acc$name$segments = acc[name].segments).push.apply(_acc$name$segments, playlist.segments); // bubble up contentProtection, this assumes all DRM content\\n      // has the same contentProtection\\n\\n\\n      if (playlist.attributes.contentProtection) {\\n        acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\\n      }\\n    } else {\\n      // first Period\\n      acc[name] = playlist;\\n    }\\n\\n    return acc;\\n  }, {}));\\n  return mergedPlaylists.map(function (playlist) {\\n    playlist.discontinuityStarts = findIndexes(playlist.segments, 'discontinuity');\\n    return playlist;\\n  });\\n};\\n\\nvar addSegmentInfoFromSidx = function addSegmentInfoFromSidx(playlists, sidxMapping) {\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  if (!Object.keys(sidxMapping).length) {\\n    return playlists;\\n  }\\n\\n  for (var i in playlists) {\\n    var playlist = playlists[i];\\n\\n    if (!playlist.sidx) {\\n      continue;\\n    }\\n\\n    var sidxKey = playlist.sidx.uri + '-' + byteRangeToString(playlist.sidx.byterange);\\n    var sidxMatch = sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\\n\\n    if (playlist.sidx && sidxMatch) {\\n      addSegmentsToPlaylist(playlist, sidxMatch, playlist.sidx.resolvedUri);\\n    }\\n  }\\n\\n  return playlists;\\n};\\n\\nvar formatAudioPlaylist = function formatAudioPlaylist(_ref) {\\n  var _attributes;\\n\\n  var attributes = _ref.attributes,\\n      segments = _ref.segments,\\n      sidx = _ref.sidx;\\n  var playlist = {\\n    attributes: (_attributes = {\\n      NAME: attributes.id,\\n      BANDWIDTH: attributes.bandwidth,\\n      CODECS: attributes.codecs\\n    }, _attributes['PROGRAM-ID'] = 1, _attributes),\\n    uri: '',\\n    endList: (attributes.type || 'static') === 'static',\\n    timeline: attributes.periodIndex,\\n    resolvedUri: '',\\n    targetDuration: attributes.duration,\\n    segments: segments,\\n    mediaSequence: segments.length ? segments[0].number : 1\\n  };\\n\\n  if (attributes.contentProtection) {\\n    playlist.contentProtection = attributes.contentProtection;\\n  }\\n\\n  if (sidx) {\\n    playlist.sidx = sidx;\\n  }\\n\\n  return playlist;\\n};\\nvar formatVttPlaylist = function formatVttPlaylist(_ref2) {\\n  var _attributes2;\\n\\n  var attributes = _ref2.attributes,\\n      segments = _ref2.segments;\\n\\n  if (typeof segments === 'undefined') {\\n    // vtt tracks may use single file in BaseURL\\n    segments = [{\\n      uri: attributes.baseUrl,\\n      timeline: attributes.periodIndex,\\n      resolvedUri: attributes.baseUrl || '',\\n      duration: attributes.sourceDuration,\\n      number: 0\\n    }]; // targetDuration should be the same duration as the only segment\\n\\n    attributes.duration = attributes.sourceDuration;\\n  }\\n\\n  return {\\n    attributes: (_attributes2 = {\\n      NAME: attributes.id,\\n      BANDWIDTH: attributes.bandwidth\\n    }, _attributes2['PROGRAM-ID'] = 1, _attributes2),\\n    uri: '',\\n    endList: (attributes.type || 'static') === 'static',\\n    timeline: attributes.periodIndex,\\n    resolvedUri: attributes.baseUrl || '',\\n    targetDuration: attributes.duration,\\n    segments: segments,\\n    mediaSequence: segments.length ? segments[0].number : 1\\n  };\\n};\\nvar organizeAudioPlaylists = function organizeAudioPlaylists(playlists, sidxMapping) {\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  var mainPlaylist;\\n  var formattedPlaylists = playlists.reduce(function (a, playlist) {\\n    var role = playlist.attributes.role && playlist.attributes.role.value || '';\\n    var language = playlist.attributes.lang || '';\\n    var label = 'main';\\n\\n    if (language) {\\n      var roleLabel = role ? \\\" (\\\" + role + \\\")\\\" : '';\\n      label = \\\"\\\" + playlist.attributes.lang + roleLabel;\\n    } // skip if we already have the highest quality audio for a language\\n\\n\\n    if (a[label] && a[label].playlists[0].attributes.BANDWIDTH > playlist.attributes.bandwidth) {\\n      return a;\\n    }\\n\\n    a[label] = {\\n      language: language,\\n      autoselect: true,\\n      default: role === 'main',\\n      playlists: addSegmentInfoFromSidx([formatAudioPlaylist(playlist)], sidxMapping),\\n      uri: ''\\n    };\\n\\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\\n      mainPlaylist = playlist;\\n      mainPlaylist.default = true;\\n    }\\n\\n    return a;\\n  }, {}); // if no playlists have role \\\"main\\\", mark the first as main\\n\\n  if (!mainPlaylist) {\\n    var firstLabel = Object.keys(formattedPlaylists)[0];\\n    formattedPlaylists[firstLabel].default = true;\\n  }\\n\\n  return formattedPlaylists;\\n};\\nvar organizeVttPlaylists = function organizeVttPlaylists(playlists, sidxMapping) {\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  return playlists.reduce(function (a, playlist) {\\n    var label = playlist.attributes.lang || 'text'; // skip if we already have subtitles\\n\\n    if (a[label]) {\\n      return a;\\n    }\\n\\n    a[label] = {\\n      language: label,\\n      default: false,\\n      autoselect: false,\\n      playlists: addSegmentInfoFromSidx([formatVttPlaylist(playlist)], sidxMapping),\\n      uri: ''\\n    };\\n    return a;\\n  }, {});\\n};\\nvar formatVideoPlaylist = function formatVideoPlaylist(_ref3) {\\n  var _attributes3;\\n\\n  var attributes = _ref3.attributes,\\n      segments = _ref3.segments,\\n      sidx = _ref3.sidx;\\n  var playlist = {\\n    attributes: (_attributes3 = {\\n      NAME: attributes.id,\\n      AUDIO: 'audio',\\n      SUBTITLES: 'subs',\\n      RESOLUTION: {\\n        width: attributes.width,\\n        height: attributes.height\\n      },\\n      CODECS: attributes.codecs,\\n      BANDWIDTH: attributes.bandwidth\\n    }, _attributes3['PROGRAM-ID'] = 1, _attributes3),\\n    uri: '',\\n    endList: (attributes.type || 'static') === 'static',\\n    timeline: attributes.periodIndex,\\n    resolvedUri: '',\\n    targetDuration: attributes.duration,\\n    segments: segments,\\n    mediaSequence: segments.length ? segments[0].number : 1\\n  };\\n\\n  if (attributes.contentProtection) {\\n    playlist.contentProtection = attributes.contentProtection;\\n  }\\n\\n  if (sidx) {\\n    playlist.sidx = sidx;\\n  }\\n\\n  return playlist;\\n};\\nvar toM3u8 = function toM3u8(dashPlaylists, sidxMapping) {\\n  var _mediaGroups;\\n\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  if (!dashPlaylists.length) {\\n    return {};\\n  } // grab all master attributes\\n\\n\\n  var _dashPlaylists$0$attr = dashPlaylists[0].attributes,\\n      duration = _dashPlaylists$0$attr.sourceDuration,\\n      _dashPlaylists$0$attr2 = _dashPlaylists$0$attr.type,\\n      type = _dashPlaylists$0$attr2 === void 0 ? 'static' : _dashPlaylists$0$attr2,\\n      suggestedPresentationDelay = _dashPlaylists$0$attr.suggestedPresentationDelay,\\n      _dashPlaylists$0$attr3 = _dashPlaylists$0$attr.minimumUpdatePeriod,\\n      minimumUpdatePeriod = _dashPlaylists$0$attr3 === void 0 ? 0 : _dashPlaylists$0$attr3;\\n\\n  var videoOnly = function videoOnly(_ref4) {\\n    var attributes = _ref4.attributes;\\n    return attributes.mimeType === 'video/mp4' || attributes.contentType === 'video';\\n  };\\n\\n  var audioOnly = function audioOnly(_ref5) {\\n    var attributes = _ref5.attributes;\\n    return attributes.mimeType === 'audio/mp4' || attributes.contentType === 'audio';\\n  };\\n\\n  var vttOnly = function vttOnly(_ref6) {\\n    var attributes = _ref6.attributes;\\n    return attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\\n  };\\n\\n  var videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\\n  var audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\\n  var vttPlaylists = dashPlaylists.filter(vttOnly);\\n  var master = {\\n    allowCache: true,\\n    discontinuityStarts: [],\\n    segments: [],\\n    endList: true,\\n    mediaGroups: (_mediaGroups = {\\n      AUDIO: {},\\n      VIDEO: {}\\n    }, _mediaGroups['CLOSED-CAPTIONS'] = {}, _mediaGroups.SUBTITLES = {}, _mediaGroups),\\n    uri: '',\\n    duration: duration,\\n    playlists: addSegmentInfoFromSidx(videoPlaylists, sidxMapping),\\n    minimumUpdatePeriod: minimumUpdatePeriod * 1000\\n  };\\n\\n  if (type === 'dynamic') {\\n    master.suggestedPresentationDelay = suggestedPresentationDelay;\\n  }\\n\\n  if (audioPlaylists.length) {\\n    master.mediaGroups.AUDIO.audio = organizeAudioPlaylists(audioPlaylists, sidxMapping);\\n  }\\n\\n  if (vttPlaylists.length) {\\n    master.mediaGroups.SUBTITLES.subs = organizeVttPlaylists(vttPlaylists, sidxMapping);\\n  }\\n\\n  return master;\\n};\\n\\n/**\\n * Calculates the R (repetition) value for a live stream (for the final segment\\n * in a manifest where the r value is negative 1)\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {number} time\\n *        current time (typically the total time up until the final segment)\\n * @param {number} duration\\n *        duration property for the given <S />\\n *\\n * @return {number}\\n *        R value to reach the end of the given period\\n */\\nvar getLiveRValue = function getLiveRValue(attributes, time, duration) {\\n  var NOW = attributes.NOW,\\n      clientOffset = attributes.clientOffset,\\n      availabilityStartTime = attributes.availabilityStartTime,\\n      _attributes$timescale = attributes.timescale,\\n      timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\\n      _attributes$start = attributes.start,\\n      start = _attributes$start === void 0 ? 0 : _attributes$start,\\n      _attributes$minimumUp = attributes.minimumUpdatePeriod,\\n      minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp;\\n  var now = (NOW + clientOffset) / 1000;\\n  var periodStartWC = availabilityStartTime + start;\\n  var periodEndWC = now + minimumUpdatePeriod;\\n  var periodDuration = periodEndWC - periodStartWC;\\n  return Math.ceil((periodDuration * timescale - time) / duration);\\n};\\n/**\\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\\n * timing and duration\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {Object[]} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *\\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\\n *         List of Objects with segment timing and duration info\\n */\\n\\n\\nvar parseByTimeline = function parseByTimeline(attributes, segmentTimeline) {\\n  var _attributes$type = attributes.type,\\n      type = _attributes$type === void 0 ? 'static' : _attributes$type,\\n      _attributes$minimumUp2 = attributes.minimumUpdatePeriod,\\n      minimumUpdatePeriod = _attributes$minimumUp2 === void 0 ? 0 : _attributes$minimumUp2,\\n      _attributes$media = attributes.media,\\n      media = _attributes$media === void 0 ? '' : _attributes$media,\\n      sourceDuration = attributes.sourceDuration,\\n      _attributes$timescale2 = attributes.timescale,\\n      timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\\n      _attributes$startNumb = attributes.startNumber,\\n      startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb,\\n      timeline = attributes.periodIndex;\\n  var segments = [];\\n  var time = -1;\\n\\n  for (var sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\\n    var S = segmentTimeline[sIndex];\\n    var duration = S.d;\\n    var repeat = S.r || 0;\\n    var segmentTime = S.t || 0;\\n\\n    if (time < 0) {\\n      // first segment\\n      time = segmentTime;\\n    }\\n\\n    if (segmentTime && segmentTime > time) {\\n      // discontinuity\\n      // TODO: How to handle this type of discontinuity\\n      // timeline++ here would treat it like HLS discontuity and content would\\n      // get appended without gap\\n      // E.G.\\n      //  <S t=\\\"0\\\" d=\\\"1\\\" />\\n      //  <S d=\\\"1\\\" />\\n      //  <S d=\\\"1\\\" />\\n      //  <S t=\\\"5\\\" d=\\\"1\\\" />\\n      // would have $Time$ values of [0, 1, 2, 5]\\n      // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\\n      // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\\n      // does the value of sourceDuration consider this when calculating arbitrary\\n      // negative @r repeat value?\\n      // E.G. Same elements as above with this added at the end\\n      //  <S d=\\\"1\\\" r=\\\"-1\\\" />\\n      //  with a sourceDuration of 10\\n      // Would the 2 gaps be included in the time duration calculations resulting in\\n      // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\\n      // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\\n      time = segmentTime;\\n    }\\n\\n    var count = void 0;\\n\\n    if (repeat < 0) {\\n      var nextS = sIndex + 1;\\n\\n      if (nextS === segmentTimeline.length) {\\n        // last segment\\n        if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\\n          count = getLiveRValue(attributes, time, duration);\\n        } else {\\n          // TODO: This may be incorrect depending on conclusion of TODO above\\n          count = (sourceDuration * timescale - time) / duration;\\n        }\\n      } else {\\n        count = (segmentTimeline[nextS].t - time) / duration;\\n      }\\n    } else {\\n      count = repeat + 1;\\n    }\\n\\n    var end = startNumber + segments.length + count;\\n    var number = startNumber + segments.length;\\n\\n    while (number < end) {\\n      segments.push({\\n        number: number,\\n        duration: duration / timescale,\\n        time: time,\\n        timeline: timeline\\n      });\\n      time += duration;\\n      number++;\\n    }\\n  }\\n\\n  return segments;\\n};\\n\\nvar identifierPattern = /\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g;\\n/**\\n * Replaces template identifiers with corresponding values. To be used as the callback\\n * for String.prototype.replace\\n *\\n * @name replaceCallback\\n * @function\\n * @param {string} match\\n *        Entire match of identifier\\n * @param {string} identifier\\n *        Name of matched identifier\\n * @param {string} format\\n *        Format tag string. Its presence indicates that padding is expected\\n * @param {string} width\\n *        Desired length of the replaced value. Values less than this width shall be left\\n *        zero padded\\n * @return {string}\\n *         Replacement for the matched identifier\\n */\\n\\n/**\\n * Returns a function to be used as a callback for String.prototype.replace to replace\\n * template identifiers\\n *\\n * @param {Obect} values\\n *        Object containing values that shall be used to replace known identifiers\\n * @param {number} values.RepresentationID\\n *        Value of the Representation@id attribute\\n * @param {number} values.Number\\n *        Number of the corresponding segment\\n * @param {number} values.Bandwidth\\n *        Value of the Representation@bandwidth attribute.\\n * @param {number} values.Time\\n *        Timestamp value of the corresponding segment\\n * @return {replaceCallback}\\n *         Callback to be used with String.prototype.replace to replace identifiers\\n */\\n\\nvar identifierReplacement = function identifierReplacement(values) {\\n  return function (match, identifier, format, width) {\\n    if (match === '$$') {\\n      // escape sequence\\n      return '$';\\n    }\\n\\n    if (typeof values[identifier] === 'undefined') {\\n      return match;\\n    }\\n\\n    var value = '' + values[identifier];\\n\\n    if (identifier === 'RepresentationID') {\\n      // Format tag shall not be present with RepresentationID\\n      return value;\\n    }\\n\\n    if (!format) {\\n      width = 1;\\n    } else {\\n      width = parseInt(width, 10);\\n    }\\n\\n    if (value.length >= width) {\\n      return value;\\n    }\\n\\n    return \\\"\\\" + new Array(width - value.length + 1).join('0') + value;\\n  };\\n};\\n/**\\n * Constructs a segment url from a template string\\n *\\n * @param {string} url\\n *        Template string to construct url from\\n * @param {Obect} values\\n *        Object containing values that shall be used to replace known identifiers\\n * @param {number} values.RepresentationID\\n *        Value of the Representation@id attribute\\n * @param {number} values.Number\\n *        Number of the corresponding segment\\n * @param {number} values.Bandwidth\\n *        Value of the Representation@bandwidth attribute.\\n * @param {number} values.Time\\n *        Timestamp value of the corresponding segment\\n * @return {string}\\n *         Segment url with identifiers replaced\\n */\\n\\nvar constructTemplateUrl = function constructTemplateUrl(url, values) {\\n  return url.replace(identifierPattern, identifierReplacement(values));\\n};\\n/**\\n * Generates a list of objects containing timing and duration information about each\\n * segment needed to generate segment uris and the complete segment object\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {Object[]|undefined} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *        the SegmentTimeline element\\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\\n *         List of Objects with segment timing and duration info\\n */\\n\\nvar parseTemplateInfo = function parseTemplateInfo(attributes, segmentTimeline) {\\n  if (!attributes.duration && !segmentTimeline) {\\n    // if neither @duration or SegmentTimeline are present, then there shall be exactly\\n    // one media segment\\n    return [{\\n      number: attributes.startNumber || 1,\\n      duration: attributes.sourceDuration,\\n      time: 0,\\n      timeline: attributes.periodIndex\\n    }];\\n  }\\n\\n  if (attributes.duration) {\\n    return parseByDuration(attributes);\\n  }\\n\\n  return parseByTimeline(attributes, segmentTimeline);\\n};\\n/**\\n * Generates a list of segments using information provided by the SegmentTemplate element\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {Object[]|undefined} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *        the SegmentTimeline element\\n * @return {Object[]}\\n *         List of segment objects\\n */\\n\\nvar segmentsFromTemplate = function segmentsFromTemplate(attributes, segmentTimeline) {\\n  var templateValues = {\\n    RepresentationID: attributes.id,\\n    Bandwidth: attributes.bandwidth || 0\\n  };\\n  var _attributes$initializ = attributes.initialization,\\n      initialization = _attributes$initializ === void 0 ? {\\n    sourceURL: '',\\n    range: ''\\n  } : _attributes$initializ;\\n  var mapSegment = urlTypeToSegment({\\n    baseUrl: attributes.baseUrl,\\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\\n    range: initialization.range\\n  });\\n  var segments = parseTemplateInfo(attributes, segmentTimeline);\\n  return segments.map(function (segment) {\\n    templateValues.Number = segment.number;\\n    templateValues.Time = segment.time;\\n    var uri = constructTemplateUrl(attributes.media || '', templateValues);\\n    return {\\n      uri: uri,\\n      timeline: segment.timeline,\\n      duration: segment.duration,\\n      resolvedUri: _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default()(attributes.baseUrl || '', uri),\\n      map: mapSegment,\\n      number: segment.number\\n    };\\n  });\\n};\\n\\n/**\\n * Converts a <SegmentUrl> (of type URLType from the DASH spec 5.3.9.2 Table 14)\\n * to an object that matches the output of a segment in videojs/mpd-parser\\n *\\n * @param {Object} attributes\\n *   Object containing all inherited attributes from parent elements with attribute\\n *   names as keys\\n * @param {Object} segmentUrl\\n *   <SegmentURL> node to translate into a segment object\\n * @return {Object} translated segment object\\n */\\n\\nvar SegmentURLToSegmentObject = function SegmentURLToSegmentObject(attributes, segmentUrl) {\\n  var baseUrl = attributes.baseUrl,\\n      _attributes$initializ = attributes.initialization,\\n      initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ;\\n  var initSegment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: initialization.sourceURL,\\n    range: initialization.range\\n  });\\n  var segment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: segmentUrl.media,\\n    range: segmentUrl.mediaRange\\n  });\\n  segment.map = initSegment;\\n  return segment;\\n};\\n/**\\n * Generates a list of segments using information provided by the SegmentList element\\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\\n * node should be translated into segment.\\n *\\n * @param {Object} attributes\\n *   Object containing all inherited attributes from parent elements with attribute\\n *   names as keys\\n * @param {Object[]|undefined} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *        the SegmentTimeline element\\n * @return {Object.<Array>} list of segments\\n */\\n\\n\\nvar segmentsFromList = function segmentsFromList(attributes, segmentTimeline) {\\n  var duration = attributes.duration,\\n      _attributes$segmentUr = attributes.segmentUrls,\\n      segmentUrls = _attributes$segmentUr === void 0 ? [] : _attributes$segmentUr; // Per spec (5.3.9.2.1) no way to determine segment duration OR\\n  // if both SegmentTimeline and @duration are defined, it is outside of spec.\\n\\n  if (!duration && !segmentTimeline || duration && segmentTimeline) {\\n    throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\\n  }\\n\\n  var segmentUrlMap = segmentUrls.map(function (segmentUrlObject) {\\n    return SegmentURLToSegmentObject(attributes, segmentUrlObject);\\n  });\\n  var segmentTimeInfo;\\n\\n  if (duration) {\\n    segmentTimeInfo = parseByDuration(attributes);\\n  }\\n\\n  if (segmentTimeline) {\\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\\n  }\\n\\n  var segments = segmentTimeInfo.map(function (segmentTime, index) {\\n    if (segmentUrlMap[index]) {\\n      var segment = segmentUrlMap[index];\\n      segment.timeline = segmentTime.timeline;\\n      segment.duration = segmentTime.duration;\\n      segment.number = segmentTime.number;\\n      return segment;\\n    } // Since we're mapping we should get rid of any blank segments (in case\\n    // the given SegmentTimeline is handling for more elements than we have\\n    // SegmentURLs for).\\n\\n  }).filter(function (segment) {\\n    return segment;\\n  });\\n  return segments;\\n};\\n\\nvar generateSegments = function generateSegments(_ref) {\\n  var attributes = _ref.attributes,\\n      segmentInfo = _ref.segmentInfo;\\n  var segmentAttributes;\\n  var segmentsFn;\\n\\n  if (segmentInfo.template) {\\n    segmentsFn = segmentsFromTemplate;\\n    segmentAttributes = merge(attributes, segmentInfo.template);\\n  } else if (segmentInfo.base) {\\n    segmentsFn = segmentsFromBase;\\n    segmentAttributes = merge(attributes, segmentInfo.base);\\n  } else if (segmentInfo.list) {\\n    segmentsFn = segmentsFromList;\\n    segmentAttributes = merge(attributes, segmentInfo.list);\\n  }\\n\\n  var segmentsInfo = {\\n    attributes: attributes\\n  };\\n\\n  if (!segmentsFn) {\\n    return segmentsInfo;\\n  }\\n\\n  var segments = segmentsFn(segmentAttributes, segmentInfo.timeline); // The @duration attribute will be used to determin the playlist's targetDuration which\\n  // must be in seconds. Since we've generated the segment list, we no longer need\\n  // @duration to be in @timescale units, so we can convert it here.\\n\\n  if (segmentAttributes.duration) {\\n    var _segmentAttributes = segmentAttributes,\\n        duration = _segmentAttributes.duration,\\n        _segmentAttributes$ti = _segmentAttributes.timescale,\\n        timescale = _segmentAttributes$ti === void 0 ? 1 : _segmentAttributes$ti;\\n    segmentAttributes.duration = duration / timescale;\\n  } else if (segments.length) {\\n    // if there is no @duration attribute, use the largest segment duration as\\n    // as target duration\\n    segmentAttributes.duration = segments.reduce(function (max, segment) {\\n      return Math.max(max, Math.ceil(segment.duration));\\n    }, 0);\\n  } else {\\n    segmentAttributes.duration = 0;\\n  }\\n\\n  segmentsInfo.attributes = segmentAttributes;\\n  segmentsInfo.segments = segments; // This is a sidx box without actual segment information\\n\\n  if (segmentInfo.base && segmentAttributes.indexRange) {\\n    segmentsInfo.sidx = segments[0];\\n    segmentsInfo.segments = [];\\n  }\\n\\n  return segmentsInfo;\\n};\\nvar toPlaylists = function toPlaylists(representations) {\\n  return representations.map(generateSegments);\\n};\\n\\nvar findChildren = function findChildren(element, name) {\\n  return from(element.childNodes).filter(function (_ref) {\\n    var tagName = _ref.tagName;\\n    return tagName === name;\\n  });\\n};\\nvar getContent = function getContent(element) {\\n  return element.textContent.trim();\\n};\\n\\nvar parseDuration = function parseDuration(str) {\\n  var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\\n  var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\\n  var SECONDS_IN_DAY = 24 * 60 * 60;\\n  var SECONDS_IN_HOUR = 60 * 60;\\n  var SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\\n\\n  var durationRegex = /P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/;\\n  var match = durationRegex.exec(str);\\n\\n  if (!match) {\\n    return 0;\\n  }\\n\\n  var _match$slice = match.slice(1),\\n      year = _match$slice[0],\\n      month = _match$slice[1],\\n      day = _match$slice[2],\\n      hour = _match$slice[3],\\n      minute = _match$slice[4],\\n      second = _match$slice[5];\\n\\n  return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\\n};\\nvar parseDate = function parseDate(str) {\\n  // Date format without timezone according to ISO 8601\\n  // YYY-MM-DDThh:mm:ss.ssssss\\n  var dateRegex = /^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\\n  // expressed by ending with 'Z'\\n\\n  if (dateRegex.test(str)) {\\n    str += 'Z';\\n  }\\n\\n  return Date.parse(str);\\n};\\n\\nvar parsers = {\\n  /**\\n   * Specifies the duration of the entire Media Presentation. Format is a duration string\\n   * as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  mediaPresentationDuration: function mediaPresentationDuration(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the Segment availability start time for all Segments referred to in this\\n   * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\\n   * time. Format is a date string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The date as seconds from unix epoch\\n   */\\n  availabilityStartTime: function availabilityStartTime(value) {\\n    return parseDate(value) / 1000;\\n  },\\n\\n  /**\\n   * Specifies the smallest period between potential changes to the MPD. Format is a\\n   * duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  minimumUpdatePeriod: function minimumUpdatePeriod(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the suggested presentation delay. Format is a\\n   * duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  suggestedPresentationDelay: function suggestedPresentationDelay(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * specifices the type of mpd. Can be either \\\"static\\\" or \\\"dynamic\\\"\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   *\\n   * @return {string}\\n   *         The type as a string\\n   */\\n  type: function type(value) {\\n    return value;\\n  },\\n\\n  /**\\n   * Specifies the duration of the smallest time shifting buffer for any Representation\\n   * in the MPD. Format is a duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  timeShiftBufferDepth: function timeShiftBufferDepth(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\\n   * Format is a duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  start: function start(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the width of the visual presentation\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed width\\n   */\\n  width: function width(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the height of the visual presentation\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed height\\n   */\\n  height: function height(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the bitrate of the representation\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed bandwidth\\n   */\\n  bandwidth: function bandwidth(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the number of the first Media Segment in this Representation in the Period\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed number\\n   */\\n  startNumber: function startNumber(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the timescale in units per seconds\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The aprsed timescale\\n   */\\n  timescale: function timescale(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the constant approximate Segment duration\\n   * NOTE: The <Period> element also contains an @duration attribute. This duration\\n   *       specifies the duration of the Period. This attribute is currently not\\n   *       supported by the rest of the parser, however we still check for it to prevent\\n   *       errors.\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed duration\\n   */\\n  duration: function duration(value) {\\n    var parsedValue = parseInt(value, 10);\\n\\n    if (isNaN(parsedValue)) {\\n      return parseDuration(value);\\n    }\\n\\n    return parsedValue;\\n  },\\n\\n  /**\\n   * Specifies the Segment duration, in units of the value of the @timescale.\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed duration\\n   */\\n  d: function d(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the MPD start time, in @timescale units, the first Segment in the series\\n   * starts relative to the beginning of the Period\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed time\\n   */\\n  t: function t(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the repeat count of the number of following contiguous Segments with the\\n   * same duration expressed by the value of @d\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed number\\n   */\\n  r: function r(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Default parser for all other attributes. Acts as a no-op and just returns the value\\n   * as a string\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {string}\\n   *         Unparsed value\\n   */\\n  DEFAULT: function DEFAULT(value) {\\n    return value;\\n  }\\n};\\n/**\\n * Gets all the attributes and values of the provided node, parses attributes with known\\n * types, and returns an object with attribute names mapped to values.\\n *\\n * @param {Node} el\\n *        The node to parse attributes from\\n * @return {Object}\\n *         Object with all attributes of el parsed\\n */\\n\\nvar parseAttributes = function parseAttributes(el) {\\n  if (!(el && el.attributes)) {\\n    return {};\\n  }\\n\\n  return from(el.attributes).reduce(function (a, e) {\\n    var parseFn = parsers[e.name] || parsers.DEFAULT;\\n    a[e.name] = parseFn(e.value);\\n    return a;\\n  }, {});\\n};\\n\\nvar keySystemsMap = {\\n  'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\\n  'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\\n  'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\\n  'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\\n};\\n/**\\n * Builds a list of urls that is the product of the reference urls and BaseURL values\\n *\\n * @param {string[]} referenceUrls\\n *        List of reference urls to resolve to\\n * @param {Node[]} baseUrlElements\\n *        List of BaseURL nodes from the mpd\\n * @return {string[]}\\n *         List of resolved urls\\n */\\n\\nvar buildBaseUrls = function buildBaseUrls(referenceUrls, baseUrlElements) {\\n  if (!baseUrlElements.length) {\\n    return referenceUrls;\\n  }\\n\\n  return flatten(referenceUrls.map(function (reference) {\\n    return baseUrlElements.map(function (baseUrlElement) {\\n      return _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default()(reference, getContent(baseUrlElement));\\n    });\\n  }));\\n};\\n/**\\n * Contains all Segment information for its containing AdaptationSet\\n *\\n * @typedef {Object} SegmentInformation\\n * @property {Object|undefined} template\\n *           Contains the attributes for the SegmentTemplate node\\n * @property {Object[]|undefined} timeline\\n *           Contains a list of atrributes for each S node within the SegmentTimeline node\\n * @property {Object|undefined} list\\n *           Contains the attributes for the SegmentList node\\n * @property {Object|undefined} base\\n *           Contains the attributes for the SegmentBase node\\n */\\n\\n/**\\n * Returns all available Segment information contained within the AdaptationSet node\\n *\\n * @param {Node} adaptationSet\\n *        The AdaptationSet node to get Segment information from\\n * @return {SegmentInformation}\\n *         The Segment information contained within the provided AdaptationSet\\n */\\n\\nvar getSegmentInformation = function getSegmentInformation(adaptationSet) {\\n  var segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\\n  var segmentList = findChildren(adaptationSet, 'SegmentList')[0];\\n  var segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(function (s) {\\n    return merge({\\n      tag: 'SegmentURL'\\n    }, parseAttributes(s));\\n  });\\n  var segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\\n  var segmentTimelineParentNode = segmentList || segmentTemplate;\\n  var segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\\n  var segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\\n  var segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\\n  // @initialization and an <Initialization> node.  @initialization can be templated,\\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\\n  // both @initialization and an <Initialization> subelement we opt to override with\\n  // the node, as this interaction is not defined in the spec.\\n\\n  var template = segmentTemplate && parseAttributes(segmentTemplate);\\n\\n  if (template && segmentInitialization) {\\n    template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\\n  } else if (template && template.initialization) {\\n    // If it is @initialization we convert it to an object since this is the format that\\n    // later functions will rely on for the initialization segment.  This is only valid\\n    // for <SegmentTemplate>\\n    template.initialization = {\\n      sourceURL: template.initialization\\n    };\\n  }\\n\\n  var segmentInfo = {\\n    template: template,\\n    timeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(function (s) {\\n      return parseAttributes(s);\\n    }),\\n    list: segmentList && merge(parseAttributes(segmentList), {\\n      segmentUrls: segmentUrls,\\n      initialization: parseAttributes(segmentInitialization)\\n    }),\\n    base: segmentBase && merge(parseAttributes(segmentBase), {\\n      initialization: parseAttributes(segmentInitialization)\\n    })\\n  };\\n  Object.keys(segmentInfo).forEach(function (key) {\\n    if (!segmentInfo[key]) {\\n      delete segmentInfo[key];\\n    }\\n  });\\n  return segmentInfo;\\n};\\n/**\\n * Contains Segment information and attributes needed to construct a Playlist object\\n * from a Representation\\n *\\n * @typedef {Object} RepresentationInformation\\n * @property {SegmentInformation} segmentInfo\\n *           Segment information for this Representation\\n * @property {Object} attributes\\n *           Inherited attributes for this Representation\\n */\\n\\n/**\\n * Maps a Representation node to an object containing Segment information and attributes\\n *\\n * @name inheritBaseUrlsCallback\\n * @function\\n * @param {Node} representation\\n *        Representation node from the mpd\\n * @return {RepresentationInformation}\\n *         Representation information needed to construct a Playlist object\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\\n * Segment information and attributes using inherited BaseURL nodes.\\n *\\n * @param {Object} adaptationSetAttributes\\n *        Contains attributes inherited by the AdaptationSet\\n * @param {string[]} adaptationSetBaseUrls\\n *        Contains list of resolved base urls inherited by the AdaptationSet\\n * @param {SegmentInformation} adaptationSetSegmentInfo\\n *        Contains Segment information for the AdaptationSet\\n * @return {inheritBaseUrlsCallback}\\n *         Callback map function\\n */\\n\\nvar inheritBaseUrls = function inheritBaseUrls(adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) {\\n  return function (representation) {\\n    var repBaseUrlElements = findChildren(representation, 'BaseURL');\\n    var repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\\n    var attributes = merge(adaptationSetAttributes, parseAttributes(representation));\\n    var representationSegmentInfo = getSegmentInformation(representation);\\n    return repBaseUrls.map(function (baseUrl) {\\n      return {\\n        segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\\n        attributes: merge(attributes, {\\n          baseUrl: baseUrl\\n        })\\n      };\\n    });\\n  };\\n};\\n/**\\n * Tranforms a series of content protection nodes to\\n * an object containing pssh data by key system\\n *\\n * @param {Node[]} contentProtectionNodes\\n *        Content protection nodes\\n * @return {Object}\\n *        Object containing pssh data by key system\\n */\\n\\nvar generateKeySystemInformation = function generateKeySystemInformation(contentProtectionNodes) {\\n  return contentProtectionNodes.reduce(function (acc, node) {\\n    var attributes = parseAttributes(node);\\n    var keySystem = keySystemsMap[attributes.schemeIdUri];\\n\\n    if (keySystem) {\\n      acc[keySystem] = {\\n        attributes: attributes\\n      };\\n      var psshNode = findChildren(node, 'cenc:pssh')[0];\\n\\n      if (psshNode) {\\n        var pssh = getContent(psshNode);\\n        var psshBuffer = pssh && _videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2___default()(pssh);\\n        acc[keySystem].pssh = psshBuffer;\\n      }\\n    }\\n\\n    return acc;\\n  }, {});\\n};\\n/**\\n * Maps an AdaptationSet node to a list of Representation information objects\\n *\\n * @name toRepresentationsCallback\\n * @function\\n * @param {Node} adaptationSet\\n *        AdaptationSet node from the mpd\\n * @return {RepresentationInformation[]}\\n *         List of objects containing Representaion information\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\\n * Representation information objects\\n *\\n * @param {Object} periodAttributes\\n *        Contains attributes inherited by the Period\\n * @param {string[]} periodBaseUrls\\n *        Contains list of resolved base urls inherited by the Period\\n * @param {string[]} periodSegmentInfo\\n *        Contains Segment Information at the period level\\n * @return {toRepresentationsCallback}\\n *         Callback map function\\n */\\n\\n\\nvar toRepresentations = function toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo) {\\n  return function (adaptationSet) {\\n    var adaptationSetAttributes = parseAttributes(adaptationSet);\\n    var adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\\n    var role = findChildren(adaptationSet, 'Role')[0];\\n    var roleAttributes = {\\n      role: parseAttributes(role)\\n    };\\n    var attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\\n    var contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\\n\\n    if (Object.keys(contentProtection).length) {\\n      attrs = merge(attrs, {\\n        contentProtection: contentProtection\\n      });\\n    }\\n\\n    var segmentInfo = getSegmentInformation(adaptationSet);\\n    var representations = findChildren(adaptationSet, 'Representation');\\n    var adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\\n    return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\\n  };\\n};\\n/**\\n * Maps an Period node to a list of Representation inforamtion objects for all\\n * AdaptationSet nodes contained within the Period\\n *\\n * @name toAdaptationSetsCallback\\n * @function\\n * @param {Node} period\\n *        Period node from the mpd\\n * @param {number} periodIndex\\n *        Index of the Period within the mpd\\n * @return {RepresentationInformation[]}\\n *         List of objects containing Representaion information\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\\n * Representation information objects\\n *\\n * @param {Object} mpdAttributes\\n *        Contains attributes inherited by the mpd\\n * @param {string[]} mpdBaseUrls\\n *        Contains list of resolved base urls inherited by the mpd\\n * @return {toAdaptationSetsCallback}\\n *         Callback map function\\n */\\n\\nvar toAdaptationSets = function toAdaptationSets(mpdAttributes, mpdBaseUrls) {\\n  return function (period, index) {\\n    var periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period, 'BaseURL'));\\n    var periodAtt = parseAttributes(period);\\n    var parsedPeriodId = parseInt(periodAtt.id, 10); // fallback to mapping index if Period@id is not a number\\n\\n    var periodIndex = global_window__WEBPACK_IMPORTED_MODULE_1___default.a.isNaN(parsedPeriodId) ? index : parsedPeriodId;\\n    var periodAttributes = merge(mpdAttributes, {\\n      periodIndex: periodIndex\\n    });\\n    var adaptationSets = findChildren(period, 'AdaptationSet');\\n    var periodSegmentInfo = getSegmentInformation(period);\\n    return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\\n  };\\n};\\n/**\\n * Traverses the mpd xml tree to generate a list of Representation information objects\\n * that have inherited attributes from parent nodes\\n *\\n * @param {Node} mpd\\n *        The root node of the mpd\\n * @param {Object} options\\n *        Available options for inheritAttributes\\n * @param {string} options.manifestUri\\n *        The uri source of the mpd\\n * @param {number} options.NOW\\n *        Current time per DASH IOP.  Default is current time in ms since epoch\\n * @param {number} options.clientOffset\\n *        Client time difference from NOW (in milliseconds)\\n * @return {RepresentationInformation[]}\\n *         List of objects containing Representation information\\n */\\n\\nvar inheritAttributes = function inheritAttributes(mpd, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  var _options = options,\\n      _options$manifestUri = _options.manifestUri,\\n      manifestUri = _options$manifestUri === void 0 ? '' : _options$manifestUri,\\n      _options$NOW = _options.NOW,\\n      NOW = _options$NOW === void 0 ? Date.now() : _options$NOW,\\n      _options$clientOffset = _options.clientOffset,\\n      clientOffset = _options$clientOffset === void 0 ? 0 : _options$clientOffset;\\n  var periods = findChildren(mpd, 'Period');\\n\\n  if (!periods.length) {\\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\\n  }\\n\\n  var mpdAttributes = parseAttributes(mpd);\\n  var mpdBaseUrls = buildBaseUrls([manifestUri], findChildren(mpd, 'BaseURL'));\\n  mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\\n  mpdAttributes.NOW = NOW;\\n  mpdAttributes.clientOffset = clientOffset;\\n  return flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls)));\\n};\\n\\nvar stringToMpdXml = function stringToMpdXml(manifestString) {\\n  if (manifestString === '') {\\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\\n  }\\n\\n  var parser = new xmldom__WEBPACK_IMPORTED_MODULE_3__[\\\"DOMParser\\\"]();\\n  var xml = parser.parseFromString(manifestString, 'application/xml');\\n  var mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\\n\\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\\n    throw new Error(errors.DASH_INVALID_XML);\\n  }\\n\\n  return mpd;\\n};\\n\\n/**\\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\\n *\\n * @param {string} mpd\\n *        XML string of the MPD manifest\\n * @return {Object|null}\\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\\n */\\n\\nvar parseUTCTimingScheme = function parseUTCTimingScheme(mpd) {\\n  var UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\\n\\n  if (!UTCTimingNode) {\\n    return null;\\n  }\\n\\n  var attributes = parseAttributes(UTCTimingNode);\\n\\n  switch (attributes.schemeIdUri) {\\n    case 'urn:mpeg:dash:utc:http-head:2014':\\n    case 'urn:mpeg:dash:utc:http-head:2012':\\n      attributes.method = 'HEAD';\\n      break;\\n\\n    case 'urn:mpeg:dash:utc:http-xsdate:2014':\\n    case 'urn:mpeg:dash:utc:http-iso:2014':\\n    case 'urn:mpeg:dash:utc:http-xsdate:2012':\\n    case 'urn:mpeg:dash:utc:http-iso:2012':\\n      attributes.method = 'GET';\\n      break;\\n\\n    case 'urn:mpeg:dash:utc:direct:2014':\\n    case 'urn:mpeg:dash:utc:direct:2012':\\n      attributes.method = 'DIRECT';\\n      attributes.value = Date.parse(attributes.value);\\n      break;\\n\\n    case 'urn:mpeg:dash:utc:http-ntp:2014':\\n    case 'urn:mpeg:dash:utc:ntp:2014':\\n    case 'urn:mpeg:dash:utc:sntp:2014':\\n    default:\\n      throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\\n  }\\n\\n  return attributes;\\n};\\n\\nvar VERSION = version;\\n\\nvar parse = function parse(manifestString, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  return toM3u8(toPlaylists(inheritAttributes(stringToMpdXml(manifestString), options)), options.sidxMapping);\\n};\\n/**\\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\\n *\\n * @param {string} manifestString\\n *        XML string of the MPD manifest\\n * @return {Object|null}\\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\\n */\\n\\n\\nvar parseUTCTiming = function parseUTCTiming(manifestString) {\\n  return parseUTCTimingScheme(stringToMpdXml(manifestString));\\n};\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mpd-parser/dist/mpd-parser.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/aac/utils.js\":\n/*!***********************************************!*\\\n  !*** ../node_modules/mux.js/lib/aac/utils.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Utilities to detect basic properties and metadata about Aac data.\\n */\\n\\n\\nvar ADTS_SAMPLING_FREQUENCIES = [\\n  96000,\\n  88200,\\n  64000,\\n  48000,\\n  44100,\\n  32000,\\n  24000,\\n  22050,\\n  16000,\\n  12000,\\n  11025,\\n  8000,\\n  7350\\n];\\n\\nvar isLikelyAacData = function(data) {\\n  if ((data[0] === 'I'.charCodeAt(0)) &&\\n      (data[1] === 'D'.charCodeAt(0)) &&\\n      (data[2] === '3'.charCodeAt(0))) {\\n    return true;\\n  }\\n  return false;\\n};\\n\\nvar parseSyncSafeInteger = function(data) {\\n  return (data[0] << 21) |\\n          (data[1] << 14) |\\n          (data[2] << 7) |\\n          (data[3]);\\n};\\n\\n// return a percent-encoded representation of the specified byte range\\n// @see http://en.wikipedia.org/wiki/Percent-encoding\\nvar percentEncode = function(bytes, start, end) {\\n  var i, result = '';\\n  for (i = start; i < end; i++) {\\n    result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\\n  }\\n  return result;\\n};\\n\\n// return the string representation of the specified byte range,\\n// interpreted as ISO-8859-1.\\nvar parseIso88591 = function(bytes, start, end) {\\n  return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\\n};\\n\\nvar parseId3TagSize = function(header, byteIndex) {\\n  var\\n    returnSize = (header[byteIndex + 6] << 21) |\\n                 (header[byteIndex + 7] << 14) |\\n                 (header[byteIndex + 8] << 7) |\\n                 (header[byteIndex + 9]),\\n    flags = header[byteIndex + 5],\\n    footerPresent = (flags & 16) >> 4;\\n\\n  if (footerPresent) {\\n    return returnSize + 20;\\n  }\\n  return returnSize + 10;\\n};\\n\\nvar parseAdtsSize = function(header, byteIndex) {\\n  var\\n    lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\\n    middle = header[byteIndex + 4] << 3,\\n    highTwo = header[byteIndex + 3] & 0x3 << 11;\\n\\n  return (highTwo | middle) | lowThree;\\n};\\n\\nvar parseType = function(header, byteIndex) {\\n  if ((header[byteIndex] === 'I'.charCodeAt(0)) &&\\n      (header[byteIndex + 1] === 'D'.charCodeAt(0)) &&\\n      (header[byteIndex + 2] === '3'.charCodeAt(0))) {\\n    return 'timed-metadata';\\n  } else if ((header[byteIndex] & 0xff === 0xff) &&\\n             ((header[byteIndex + 1] & 0xf0) === 0xf0)) {\\n    return 'audio';\\n  }\\n  return null;\\n};\\n\\nvar parseSampleRate = function(packet) {\\n  var i = 0;\\n\\n  while (i + 5 < packet.length) {\\n    if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\\n      // If a valid header was not found,  jump one forward and attempt to\\n      // find a valid ADTS header starting at the next byte\\n      i++;\\n      continue;\\n    }\\n    return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\\n  }\\n\\n  return null;\\n};\\n\\nvar parseAacTimestamp = function(packet) {\\n  var frameStart, frameSize, frame, frameHeader;\\n\\n  // find the start of the first frame and the end of the tag\\n  frameStart = 10;\\n  if (packet[5] & 0x40) {\\n    // advance the frame start past the extended header\\n    frameStart += 4; // header size field\\n    frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\\n  }\\n\\n  // parse one or more ID3 frames\\n  // http://id3.org/id3v2.3.0#ID3v2_frame_overview\\n  do {\\n    // determine the number of bytes in this frame\\n    frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\\n    if (frameSize < 1) {\\n      return null;\\n    }\\n    frameHeader = String.fromCharCode(packet[frameStart],\\n                                      packet[frameStart + 1],\\n                                      packet[frameStart + 2],\\n                                      packet[frameStart + 3]);\\n\\n    if (frameHeader === 'PRIV') {\\n      frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\\n\\n      for (var i = 0; i < frame.byteLength; i++) {\\n        if (frame[i] === 0) {\\n          var owner = parseIso88591(frame, 0, i);\\n          if (owner === 'com.apple.streaming.transportStreamTimestamp') {\\n            var d = frame.subarray(i + 1);\\n            var size = ((d[3] & 0x01)  << 30) |\\n                       (d[4]  << 22) |\\n                       (d[5] << 14) |\\n                       (d[6] << 6) |\\n                       (d[7] >>> 2);\\n            size *= 4;\\n            size += d[7] & 0x03;\\n\\n            return size;\\n          }\\n          break;\\n        }\\n      }\\n    }\\n\\n    frameStart += 10; // advance past the frame header\\n    frameStart += frameSize; // advance past the frame body\\n  } while (frameStart < packet.byteLength);\\n  return null;\\n};\\n\\nmodule.exports = {\\n  isLikelyAacData: isLikelyAacData,\\n  parseId3TagSize: parseId3TagSize,\\n  parseAdtsSize: parseAdtsSize,\\n  parseType: parseType,\\n  parseSampleRate: parseSampleRate,\\n  parseAacTimestamp: parseAacTimestamp\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/aac/utils.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/m2ts/caption-stream.js\":\n/*!*********************************************************!*\\\n  !*** ../node_modules/mux.js/lib/m2ts/caption-stream.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Reads in-band caption information from a video elementary\\n * stream. Captions must follow the CEA-708 standard for injection\\n * into an MPEG-2 transport streams.\\n * @see https://en.wikipedia.org/wiki/CEA-708\\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\\n */\\n\\n\\n\\n// -----------------\\n// Link To Transport\\n// -----------------\\n\\nvar Stream = __webpack_require__(/*! ../utils/stream */ \\\"../node_modules/mux.js/lib/utils/stream.js\\\");\\nvar cea708Parser = __webpack_require__(/*! ../tools/caption-packet-parser */ \\\"../node_modules/mux.js/lib/tools/caption-packet-parser.js\\\");\\n\\nvar CaptionStream = function() {\\n\\n  CaptionStream.prototype.init.call(this);\\n\\n  this.captionPackets_ = [];\\n\\n  this.ccStreams_ = [\\n    new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\\n    new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\\n    new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\\n    new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\\n  ];\\n\\n  this.reset();\\n\\n  // forward data and done events from CCs to this CaptionStream\\n  this.ccStreams_.forEach(function(cc) {\\n    cc.on('data', this.trigger.bind(this, 'data'));\\n    cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\\n    cc.on('done', this.trigger.bind(this, 'done'));\\n  }, this);\\n\\n};\\n\\nCaptionStream.prototype = new Stream();\\nCaptionStream.prototype.push = function(event) {\\n  var sei, userData, newCaptionPackets;\\n\\n  // only examine SEI NALs\\n  if (event.nalUnitType !== 'sei_rbsp') {\\n    return;\\n  }\\n\\n  // parse the sei\\n  sei = cea708Parser.parseSei(event.escapedRBSP);\\n\\n  // ignore everything but user_data_registered_itu_t_t35\\n  if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\\n    return;\\n  }\\n\\n  // parse out the user data payload\\n  userData = cea708Parser.parseUserData(sei);\\n\\n  // ignore unrecognized userData\\n  if (!userData) {\\n    return;\\n  }\\n\\n  // Sometimes, the same segment # will be downloaded twice. To stop the\\n  // caption data from being processed twice, we track the latest dts we've\\n  // received and ignore everything with a dts before that. However, since\\n  // data for a specific dts can be split across packets on either side of\\n  // a segment boundary, we need to make sure we *don't* ignore the packets\\n  // from the *next* segment that have dts === this.latestDts_. By constantly\\n  // tracking the number of packets received with dts === this.latestDts_, we\\n  // know how many should be ignored once we start receiving duplicates.\\n  if (event.dts < this.latestDts_) {\\n    // We've started getting older data, so set the flag.\\n    this.ignoreNextEqualDts_ = true;\\n    return;\\n  } else if ((event.dts === this.latestDts_) && (this.ignoreNextEqualDts_)) {\\n    this.numSameDts_--;\\n    if (!this.numSameDts_) {\\n      // We've received the last duplicate packet, time to start processing again\\n      this.ignoreNextEqualDts_ = false;\\n    }\\n    return;\\n  }\\n\\n  // parse out CC data packets and save them for later\\n  newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\\n  this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\\n  if (this.latestDts_ !== event.dts) {\\n    this.numSameDts_ = 0;\\n  }\\n  this.numSameDts_++;\\n  this.latestDts_ = event.dts;\\n};\\n\\nCaptionStream.prototype.flushCCStreams = function(flushType) {\\n  this.ccStreams_.forEach(function(cc) {\\n    return flushType === 'flush' ? cc.flush() : cc.partialFlush();\\n  }, this);\\n};\\n\\nCaptionStream.prototype.flushStream = function(flushType) {\\n  // make sure we actually parsed captions before proceeding\\n  if (!this.captionPackets_.length) {\\n    this.flushCCStreams(flushType);\\n    return;\\n  }\\n\\n  // In Chrome, the Array#sort function is not stable so add a\\n  // presortIndex that we can use to ensure we get a stable-sort\\n  this.captionPackets_.forEach(function(elem, idx) {\\n    elem.presortIndex = idx;\\n  });\\n\\n  // sort caption byte-pairs based on their PTS values\\n  this.captionPackets_.sort(function(a, b) {\\n    if (a.pts === b.pts) {\\n      return a.presortIndex - b.presortIndex;\\n    }\\n    return a.pts - b.pts;\\n  });\\n\\n  this.captionPackets_.forEach(function(packet) {\\n    if (packet.type < 2) {\\n      // Dispatch packet to the right Cea608Stream\\n      this.dispatchCea608Packet(packet);\\n    }\\n    // this is where an 'else' would go for a dispatching packets\\n    // to a theoretical Cea708Stream that handles SERVICEn data\\n  }, this);\\n\\n  this.captionPackets_.length = 0;\\n  this.flushCCStreams(flushType);\\n};\\n\\nCaptionStream.prototype.flush = function() {\\n  return this.flushStream('flush');\\n};\\n\\n// Only called if handling partial data\\nCaptionStream.prototype.partialFlush = function() {\\n  return this.flushStream('partialFlush');\\n};\\n\\nCaptionStream.prototype.reset = function() {\\n  this.latestDts_ = null;\\n  this.ignoreNextEqualDts_ = false;\\n  this.numSameDts_ = 0;\\n  this.activeCea608Channel_ = [null, null];\\n  this.ccStreams_.forEach(function(ccStream) {\\n    ccStream.reset();\\n  });\\n};\\n\\n// From the CEA-608 spec:\\n/*\\n * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\\n * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\\n * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\\n * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\\n * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\\n * to switch to captioning or Text.\\n*/\\n// With that in mind, we ignore any data between an XDS control code and a\\n// subsequent closed-captioning control code.\\nCaptionStream.prototype.dispatchCea608Packet = function(packet) {\\n  // NOTE: packet.type is the CEA608 field\\n  if (this.setsTextOrXDSActive(packet)) {\\n    this.activeCea608Channel_[packet.type] = null;\\n  } else if (this.setsChannel1Active(packet)) {\\n    this.activeCea608Channel_[packet.type] = 0;\\n  } else if (this.setsChannel2Active(packet)) {\\n    this.activeCea608Channel_[packet.type] = 1;\\n  }\\n  if (this.activeCea608Channel_[packet.type] === null) {\\n    // If we haven't received anything to set the active channel, or the\\n    // packets are Text/XDS data, discard the data; we don't want jumbled\\n    // captions\\n    return;\\n  }\\n  this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\\n};\\n\\nCaptionStream.prototype.setsChannel1Active = function(packet) {\\n  return ((packet.ccData & 0x7800) === 0x1000);\\n};\\nCaptionStream.prototype.setsChannel2Active = function(packet) {\\n  return ((packet.ccData & 0x7800) === 0x1800);\\n};\\nCaptionStream.prototype.setsTextOrXDSActive = function(packet) {\\n  return ((packet.ccData & 0x7100) === 0x0100) ||\\n    ((packet.ccData & 0x78fe) === 0x102a) ||\\n    ((packet.ccData & 0x78fe) === 0x182a);\\n};\\n\\n// ----------------------\\n// Session to Application\\n// ----------------------\\n\\n// This hash maps non-ASCII, special, and extended character codes to their\\n// proper Unicode equivalent. The first keys that are only a single byte\\n// are the non-standard ASCII characters, which simply map the CEA608 byte\\n// to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\\n// character codes, but have their MSB bitmasked with 0x03 so that a lookup\\n// can be performed regardless of the field and data channel on which the\\n// character code was received.\\nvar CHARACTER_TRANSLATION = {\\n  0x2a: 0xe1,     // á\\n  0x5c: 0xe9,     // é\\n  0x5e: 0xed,     // í\\n  0x5f: 0xf3,     // ó\\n  0x60: 0xfa,     // ú\\n  0x7b: 0xe7,     // ç\\n  0x7c: 0xf7,     // ÷\\n  0x7d: 0xd1,     // Ñ\\n  0x7e: 0xf1,     // ñ\\n  0x7f: 0x2588,   // █\\n  0x0130: 0xae,   // ®\\n  0x0131: 0xb0,   // °\\n  0x0132: 0xbd,   // ½\\n  0x0133: 0xbf,   // ¿\\n  0x0134: 0x2122, // ™\\n  0x0135: 0xa2,   // ¢\\n  0x0136: 0xa3,   // £\\n  0x0137: 0x266a, // ♪\\n  0x0138: 0xe0,   // à\\n  0x0139: 0xa0,   //\\n  0x013a: 0xe8,   // è\\n  0x013b: 0xe2,   // â\\n  0x013c: 0xea,   // ê\\n  0x013d: 0xee,   // î\\n  0x013e: 0xf4,   // ô\\n  0x013f: 0xfb,   // û\\n  0x0220: 0xc1,   // Á\\n  0x0221: 0xc9,   // É\\n  0x0222: 0xd3,   // Ó\\n  0x0223: 0xda,   // Ú\\n  0x0224: 0xdc,   // Ü\\n  0x0225: 0xfc,   // ü\\n  0x0226: 0x2018, // ‘\\n  0x0227: 0xa1,   // ¡\\n  0x0228: 0x2a,   // *\\n  0x0229: 0x27,   // '\\n  0x022a: 0x2014, // —\\n  0x022b: 0xa9,   // ©\\n  0x022c: 0x2120, // ℠\\n  0x022d: 0x2022, // •\\n  0x022e: 0x201c, // “\\n  0x022f: 0x201d, // ”\\n  0x0230: 0xc0,   // À\\n  0x0231: 0xc2,   // Â\\n  0x0232: 0xc7,   // Ç\\n  0x0233: 0xc8,   // È\\n  0x0234: 0xca,   // Ê\\n  0x0235: 0xcb,   // Ë\\n  0x0236: 0xeb,   // ë\\n  0x0237: 0xce,   // Î\\n  0x0238: 0xcf,   // Ï\\n  0x0239: 0xef,   // ï\\n  0x023a: 0xd4,   // Ô\\n  0x023b: 0xd9,   // Ù\\n  0x023c: 0xf9,   // ù\\n  0x023d: 0xdb,   // Û\\n  0x023e: 0xab,   // «\\n  0x023f: 0xbb,   // »\\n  0x0320: 0xc3,   // Ã\\n  0x0321: 0xe3,   // ã\\n  0x0322: 0xcd,   // Í\\n  0x0323: 0xcc,   // Ì\\n  0x0324: 0xec,   // ì\\n  0x0325: 0xd2,   // Ò\\n  0x0326: 0xf2,   // ò\\n  0x0327: 0xd5,   // Õ\\n  0x0328: 0xf5,   // õ\\n  0x0329: 0x7b,   // {\\n  0x032a: 0x7d,   // }\\n  0x032b: 0x5c,   // \\\\\\n  0x032c: 0x5e,   // ^\\n  0x032d: 0x5f,   // _\\n  0x032e: 0x7c,   // |\\n  0x032f: 0x7e,   // ~\\n  0x0330: 0xc4,   // Ä\\n  0x0331: 0xe4,   // ä\\n  0x0332: 0xd6,   // Ö\\n  0x0333: 0xf6,   // ö\\n  0x0334: 0xdf,   // ß\\n  0x0335: 0xa5,   // ¥\\n  0x0336: 0xa4,   // ¤\\n  0x0337: 0x2502, // │\\n  0x0338: 0xc5,   // Å\\n  0x0339: 0xe5,   // å\\n  0x033a: 0xd8,   // Ø\\n  0x033b: 0xf8,   // ø\\n  0x033c: 0x250c, // ┌\\n  0x033d: 0x2510, // ┐\\n  0x033e: 0x2514, // └\\n  0x033f: 0x2518  // ┘\\n};\\n\\nvar getCharFromCode = function(code) {\\n  if (code === null) {\\n    return '';\\n  }\\n  code = CHARACTER_TRANSLATION[code] || code;\\n  return String.fromCharCode(code);\\n};\\n\\n// the index of the last row in a CEA-608 display buffer\\nvar BOTTOM_ROW = 14;\\n\\n// This array is used for mapping PACs -> row #, since there's no way of\\n// getting it through bit logic.\\nvar ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620,\\n            0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420];\\n\\n// CEA-608 captions are rendered onto a 34x15 matrix of character\\n// cells. The \\\"bottom\\\" row is the last element in the outer array.\\nvar createDisplayBuffer = function() {\\n  var result = [], i = BOTTOM_ROW + 1;\\n  while (i--) {\\n    result.push('');\\n  }\\n  return result;\\n};\\n\\nvar Cea608Stream = function(field, dataChannel) {\\n  Cea608Stream.prototype.init.call(this);\\n\\n  this.field_ = field || 0;\\n  this.dataChannel_ = dataChannel || 0;\\n\\n  this.name_ = 'CC' + (((this.field_ << 1) | this.dataChannel_) + 1);\\n\\n  this.setConstants();\\n  this.reset();\\n\\n  this.push = function(packet) {\\n    var data, swap, char0, char1, text;\\n    // remove the parity bits\\n    data = packet.ccData & 0x7f7f;\\n\\n    // ignore duplicate control codes; the spec demands they're sent twice\\n    if (data === this.lastControlCode_) {\\n      this.lastControlCode_ = null;\\n      return;\\n    }\\n\\n    // Store control codes\\n    if ((data & 0xf000) === 0x1000) {\\n      this.lastControlCode_ = data;\\n    } else if (data !== this.PADDING_) {\\n      this.lastControlCode_ = null;\\n    }\\n\\n    char0 = data >>> 8;\\n    char1 = data & 0xff;\\n\\n    if (data === this.PADDING_) {\\n      return;\\n\\n    } else if (data === this.RESUME_CAPTION_LOADING_) {\\n      this.mode_ = 'popOn';\\n\\n    } else if (data === this.END_OF_CAPTION_) {\\n      // If an EOC is received while in paint-on mode, the displayed caption\\n      // text should be swapped to non-displayed memory as if it was a pop-on\\n      // caption. Because of that, we should explicitly switch back to pop-on\\n      // mode\\n      this.mode_ = 'popOn';\\n      this.clearFormatting(packet.pts);\\n      // if a caption was being displayed, it's gone now\\n      this.flushDisplayed(packet.pts);\\n\\n      // flip memory\\n      swap = this.displayed_;\\n      this.displayed_ = this.nonDisplayed_;\\n      this.nonDisplayed_ = swap;\\n\\n      // start measuring the time to display the caption\\n      this.startPts_ = packet.pts;\\n\\n    } else if (data === this.ROLL_UP_2_ROWS_) {\\n      this.rollUpRows_ = 2;\\n      this.setRollUp(packet.pts);\\n    } else if (data === this.ROLL_UP_3_ROWS_) {\\n      this.rollUpRows_ = 3;\\n      this.setRollUp(packet.pts);\\n    } else if (data === this.ROLL_UP_4_ROWS_) {\\n      this.rollUpRows_ = 4;\\n      this.setRollUp(packet.pts);\\n    } else if (data === this.CARRIAGE_RETURN_) {\\n      this.clearFormatting(packet.pts);\\n      this.flushDisplayed(packet.pts);\\n      this.shiftRowsUp_();\\n      this.startPts_ = packet.pts;\\n\\n    } else if (data === this.BACKSPACE_) {\\n      if (this.mode_ === 'popOn') {\\n        this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n      } else {\\n        this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n      }\\n    } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\\n      this.flushDisplayed(packet.pts);\\n      this.displayed_ = createDisplayBuffer();\\n    } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\\n      this.nonDisplayed_ = createDisplayBuffer();\\n\\n    } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\\n      if (this.mode_ !== 'paintOn') {\\n        // NOTE: This should be removed when proper caption positioning is\\n        // implemented\\n        this.flushDisplayed(packet.pts);\\n        this.displayed_ = createDisplayBuffer();\\n      }\\n      this.mode_ = 'paintOn';\\n      this.startPts_ = packet.pts;\\n\\n    // Append special characters to caption text\\n    } else if (this.isSpecialCharacter(char0, char1)) {\\n      // Bitmask char0 so that we can apply character transformations\\n      // regardless of field and data channel.\\n      // Then byte-shift to the left and OR with char1 so we can pass the\\n      // entire character code to `getCharFromCode`.\\n      char0 = (char0 & 0x03) << 8;\\n      text = getCharFromCode(char0 | char1);\\n      this[this.mode_](packet.pts, text);\\n      this.column_++;\\n\\n    // Append extended characters to caption text\\n    } else if (this.isExtCharacter(char0, char1)) {\\n      // Extended characters always follow their \\\"non-extended\\\" equivalents.\\n      // IE if a \\\"è\\\" is desired, you'll always receive \\\"eè\\\"; non-compliant\\n      // decoders are supposed to drop the \\\"è\\\", while compliant decoders\\n      // backspace the \\\"e\\\" and insert \\\"è\\\".\\n\\n      // Delete the previous character\\n      if (this.mode_ === 'popOn') {\\n        this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n      } else {\\n        this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n      }\\n\\n      // Bitmask char0 so that we can apply character transformations\\n      // regardless of field and data channel.\\n      // Then byte-shift to the left and OR with char1 so we can pass the\\n      // entire character code to `getCharFromCode`.\\n      char0 = (char0 & 0x03) << 8;\\n      text = getCharFromCode(char0 | char1);\\n      this[this.mode_](packet.pts, text);\\n      this.column_++;\\n\\n    // Process mid-row codes\\n    } else if (this.isMidRowCode(char0, char1)) {\\n      // Attributes are not additive, so clear all formatting\\n      this.clearFormatting(packet.pts);\\n\\n      // According to the standard, mid-row codes\\n      // should be replaced with spaces, so add one now\\n      this[this.mode_](packet.pts, ' ');\\n      this.column_++;\\n\\n      if ((char1 & 0xe) === 0xe) {\\n        this.addFormatting(packet.pts, ['i']);\\n      }\\n\\n      if ((char1 & 0x1) === 0x1) {\\n        this.addFormatting(packet.pts, ['u']);\\n      }\\n\\n    // Detect offset control codes and adjust cursor\\n    } else if (this.isOffsetControlCode(char0, char1)) {\\n      // Cursor position is set by indent PAC (see below) in 4-column\\n      // increments, with an additional offset code of 1-3 to reach any\\n      // of the 32 columns specified by CEA-608. So all we need to do\\n      // here is increment the column cursor by the given offset.\\n      this.column_ += (char1 & 0x03);\\n\\n    // Detect PACs (Preamble Address Codes)\\n    } else if (this.isPAC(char0, char1)) {\\n\\n      // There's no logic for PAC -> row mapping, so we have to just\\n      // find the row code in an array and use its index :(\\n      var row = ROWS.indexOf(data & 0x1f20);\\n\\n      // Configure the caption window if we're in roll-up mode\\n      if (this.mode_ === 'rollUp') {\\n        // This implies that the base row is incorrectly set.\\n        // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\\n        // of roll-up rows set.\\n        if (row - this.rollUpRows_ + 1 < 0) {\\n          row = this.rollUpRows_ - 1;\\n        }\\n\\n        this.setRollUp(packet.pts, row);\\n      }\\n\\n      if (row !== this.row_) {\\n        // formatting is only persistent for current row\\n        this.clearFormatting(packet.pts);\\n        this.row_ = row;\\n      }\\n      // All PACs can apply underline, so detect and apply\\n      // (All odd-numbered second bytes set underline)\\n      if ((char1 & 0x1) && (this.formatting_.indexOf('u') === -1)) {\\n          this.addFormatting(packet.pts, ['u']);\\n      }\\n\\n      if ((data & 0x10) === 0x10) {\\n        // We've got an indent level code. Each successive even number\\n        // increments the column cursor by 4, so we can get the desired\\n        // column position by bit-shifting to the right (to get n/2)\\n        // and multiplying by 4.\\n        this.column_ = ((data & 0xe) >> 1) * 4;\\n      }\\n\\n      if (this.isColorPAC(char1)) {\\n        // it's a color code, though we only support white, which\\n        // can be either normal or italicized. white italics can be\\n        // either 0x4e or 0x6e depending on the row, so we just\\n        // bitwise-and with 0xe to see if italics should be turned on\\n        if ((char1 & 0xe) === 0xe) {\\n          this.addFormatting(packet.pts, ['i']);\\n        }\\n      }\\n\\n    // We have a normal character in char0, and possibly one in char1\\n    } else if (this.isNormalChar(char0)) {\\n      if (char1 === 0x00) {\\n        char1 = null;\\n      }\\n      text = getCharFromCode(char0);\\n      text += getCharFromCode(char1);\\n      this[this.mode_](packet.pts, text);\\n      this.column_ += text.length;\\n\\n    } // finish data processing\\n\\n  };\\n};\\nCea608Stream.prototype = new Stream();\\n// Trigger a cue point that captures the current state of the\\n// display buffer\\nCea608Stream.prototype.flushDisplayed = function(pts) {\\n  var content = this.displayed_\\n    // remove spaces from the start and end of the string\\n    .map(function(row) {\\n      try {\\n        return row.trim();\\n      } catch (e) {\\n        // Ordinarily, this shouldn't happen. However, caption\\n        // parsing errors should not throw exceptions and\\n        // break playback.\\n        // eslint-disable-next-line no-console\\n        console.error('Skipping malformed caption.');\\n        return '';\\n      }\\n    })\\n    // combine all text rows to display in one cue\\n    .join('\\\\n')\\n    // and remove blank rows from the start and end, but not the middle\\n    .replace(/^\\\\n+|\\\\n+$/g, '');\\n\\n  if (content.length) {\\n    this.trigger('data', {\\n      startPts: this.startPts_,\\n      endPts: pts,\\n      text: content,\\n      stream: this.name_\\n    });\\n  }\\n};\\n\\n/**\\n * Zero out the data, used for startup and on seek\\n */\\nCea608Stream.prototype.reset = function() {\\n  this.mode_ = 'popOn';\\n  // When in roll-up mode, the index of the last row that will\\n  // actually display captions. If a caption is shifted to a row\\n  // with a lower index than this, it is cleared from the display\\n  // buffer\\n  this.topRow_ = 0;\\n  this.startPts_ = 0;\\n  this.displayed_ = createDisplayBuffer();\\n  this.nonDisplayed_ = createDisplayBuffer();\\n  this.lastControlCode_ = null;\\n\\n  // Track row and column for proper line-breaking and spacing\\n  this.column_ = 0;\\n  this.row_ = BOTTOM_ROW;\\n  this.rollUpRows_ = 2;\\n\\n  // This variable holds currently-applied formatting\\n  this.formatting_ = [];\\n};\\n\\n/**\\n * Sets up control code and related constants for this instance\\n */\\nCea608Stream.prototype.setConstants = function() {\\n  // The following attributes have these uses:\\n  // ext_ :    char0 for mid-row codes, and the base for extended\\n  //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\\n  //           extended codes)\\n  // control_: char0 for control codes, except byte-shifted to the\\n  //           left so that we can do this.control_ | CONTROL_CODE\\n  // offset_:  char0 for tab offset codes\\n  //\\n  // It's also worth noting that control codes, and _only_ control codes,\\n  // differ between field 1 and field2. Field 2 control codes are always\\n  // their field 1 value plus 1. That's why there's the \\\"| field\\\" on the\\n  // control value.\\n  if (this.dataChannel_ === 0) {\\n    this.BASE_     = 0x10;\\n    this.EXT_      = 0x11;\\n    this.CONTROL_  = (0x14 | this.field_) << 8;\\n    this.OFFSET_   = 0x17;\\n  } else if (this.dataChannel_ === 1) {\\n    this.BASE_     = 0x18;\\n    this.EXT_      = 0x19;\\n    this.CONTROL_  = (0x1c | this.field_) << 8;\\n    this.OFFSET_   = 0x1f;\\n  }\\n\\n  // Constants for the LSByte command codes recognized by Cea608Stream. This\\n  // list is not exhaustive. For a more comprehensive listing and semantics see\\n  // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\\n  // Padding\\n  this.PADDING_                    = 0x0000;\\n  // Pop-on Mode\\n  this.RESUME_CAPTION_LOADING_     = this.CONTROL_ | 0x20;\\n  this.END_OF_CAPTION_             = this.CONTROL_ | 0x2f;\\n  // Roll-up Mode\\n  this.ROLL_UP_2_ROWS_             = this.CONTROL_ | 0x25;\\n  this.ROLL_UP_3_ROWS_             = this.CONTROL_ | 0x26;\\n  this.ROLL_UP_4_ROWS_             = this.CONTROL_ | 0x27;\\n  this.CARRIAGE_RETURN_            = this.CONTROL_ | 0x2d;\\n  // paint-on mode\\n  this.RESUME_DIRECT_CAPTIONING_   = this.CONTROL_ | 0x29;\\n  // Erasure\\n  this.BACKSPACE_                  = this.CONTROL_ | 0x21;\\n  this.ERASE_DISPLAYED_MEMORY_     = this.CONTROL_ | 0x2c;\\n  this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\\n};\\n\\n/**\\n * Detects if the 2-byte packet data is a special character\\n *\\n * Special characters have a second byte in the range 0x30 to 0x3f,\\n * with the first byte being 0x11 (for data channel 1) or 0x19 (for\\n * data channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are an special character\\n */\\nCea608Stream.prototype.isSpecialCharacter = function(char0, char1) {\\n  return (char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f);\\n};\\n\\n/**\\n * Detects if the 2-byte packet data is an extended character\\n *\\n * Extended characters have a second byte in the range 0x20 to 0x3f,\\n * with the first byte being 0x12 or 0x13 (for data channel 1) or\\n * 0x1a or 0x1b (for data channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are an extended character\\n */\\nCea608Stream.prototype.isExtCharacter = function(char0, char1) {\\n  return ((char0 === (this.EXT_ + 1) || char0 === (this.EXT_ + 2)) &&\\n    (char1 >= 0x20 && char1 <= 0x3f));\\n};\\n\\n/**\\n * Detects if the 2-byte packet is a mid-row code\\n *\\n * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\\n * the first byte being 0x11 (for data channel 1) or 0x19 (for data\\n * channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are a mid-row code\\n */\\nCea608Stream.prototype.isMidRowCode = function(char0, char1) {\\n  return (char0 === this.EXT_ && (char1 >= 0x20 && char1 <= 0x2f));\\n};\\n\\n/**\\n * Detects if the 2-byte packet is an offset control code\\n *\\n * Offset control codes have a second byte in the range 0x21 to 0x23,\\n * with the first byte being 0x17 (for data channel 1) or 0x1f (for\\n * data channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are an offset control code\\n */\\nCea608Stream.prototype.isOffsetControlCode = function(char0, char1) {\\n  return (char0 === this.OFFSET_ && (char1 >= 0x21 && char1 <= 0x23));\\n};\\n\\n/**\\n * Detects if the 2-byte packet is a Preamble Address Code\\n *\\n * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\\n * or 0x18 to 0x1f (for data channel 2), with the second byte in the\\n * range 0x40 to 0x7f.\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are a PAC\\n */\\nCea608Stream.prototype.isPAC = function(char0, char1) {\\n  return (char0 >= this.BASE_ && char0 < (this.BASE_ + 8) &&\\n    (char1 >= 0x40 && char1 <= 0x7f));\\n};\\n\\n/**\\n * Detects if a packet's second byte is in the range of a PAC color code\\n *\\n * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\\n * 0x60 to 0x6f.\\n *\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the byte is a color PAC\\n */\\nCea608Stream.prototype.isColorPAC = function(char1) {\\n  return ((char1 >= 0x40 && char1 <= 0x4f) || (char1 >= 0x60 && char1 <= 0x7f));\\n};\\n\\n/**\\n * Detects if a single byte is in the range of a normal character\\n *\\n * Normal text bytes are in the range 0x20 to 0x7f.\\n *\\n * @param  {Integer} char  The byte\\n * @return {Boolean}       Whether the byte is a normal character\\n */\\nCea608Stream.prototype.isNormalChar = function(char) {\\n  return (char >= 0x20 && char <= 0x7f);\\n};\\n\\n/**\\n * Configures roll-up\\n *\\n * @param  {Integer} pts         Current PTS\\n * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\\n *                               a new position\\n */\\nCea608Stream.prototype.setRollUp = function(pts, newBaseRow) {\\n  // Reset the base row to the bottom row when switching modes\\n  if (this.mode_ !== 'rollUp') {\\n    this.row_ = BOTTOM_ROW;\\n    this.mode_ = 'rollUp';\\n    // Spec says to wipe memories when switching to roll-up\\n    this.flushDisplayed(pts);\\n    this.nonDisplayed_ = createDisplayBuffer();\\n    this.displayed_ = createDisplayBuffer();\\n  }\\n\\n  if (newBaseRow !== undefined && newBaseRow !== this.row_) {\\n    // move currently displayed captions (up or down) to the new base row\\n    for (var i = 0; i < this.rollUpRows_; i++) {\\n      this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\\n      this.displayed_[this.row_ - i] = '';\\n    }\\n  }\\n\\n  if (newBaseRow === undefined) {\\n    newBaseRow = this.row_;\\n  }\\n\\n  this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\\n};\\n\\n// Adds the opening HTML tag for the passed character to the caption text,\\n// and keeps track of it for later closing\\nCea608Stream.prototype.addFormatting = function(pts, format) {\\n  this.formatting_ = this.formatting_.concat(format);\\n  var text = format.reduce(function(text, format) {\\n    return text + '<' + format + '>';\\n  }, '');\\n  this[this.mode_](pts, text);\\n};\\n\\n// Adds HTML closing tags for current formatting to caption text and\\n// clears remembered formatting\\nCea608Stream.prototype.clearFormatting = function(pts) {\\n  if (!this.formatting_.length) {\\n    return;\\n  }\\n  var text = this.formatting_.reverse().reduce(function(text, format) {\\n    return text + '</' + format + '>';\\n  }, '');\\n  this.formatting_ = [];\\n  this[this.mode_](pts, text);\\n};\\n\\n// Mode Implementations\\nCea608Stream.prototype.popOn = function(pts, text) {\\n  var baseRow = this.nonDisplayed_[this.row_];\\n\\n  // buffer characters\\n  baseRow += text;\\n  this.nonDisplayed_[this.row_] = baseRow;\\n};\\n\\nCea608Stream.prototype.rollUp = function(pts, text) {\\n  var baseRow = this.displayed_[this.row_];\\n\\n  baseRow += text;\\n  this.displayed_[this.row_] = baseRow;\\n\\n};\\n\\nCea608Stream.prototype.shiftRowsUp_ = function() {\\n  var i;\\n  // clear out inactive rows\\n  for (i = 0; i < this.topRow_; i++) {\\n    this.displayed_[i] = '';\\n  }\\n  for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\\n    this.displayed_[i] = '';\\n  }\\n  // shift displayed rows up\\n  for (i = this.topRow_; i < this.row_; i++) {\\n    this.displayed_[i] = this.displayed_[i + 1];\\n  }\\n  // clear out the bottom row\\n  this.displayed_[this.row_] = '';\\n};\\n\\nCea608Stream.prototype.paintOn = function(pts, text) {\\n  var baseRow = this.displayed_[this.row_];\\n\\n  baseRow += text;\\n  this.displayed_[this.row_] = baseRow;\\n};\\n\\n// exports\\nmodule.exports = {\\n  CaptionStream: CaptionStream,\\n  Cea608Stream: Cea608Stream\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/caption-stream.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/m2ts/probe.js\":\n/*!************************************************!*\\\n  !*** ../node_modules/mux.js/lib/m2ts/probe.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Utilities to detect basic properties and metadata about TS Segments.\\n */\\n\\n\\nvar StreamTypes = __webpack_require__(/*! ./stream-types.js */ \\\"../node_modules/mux.js/lib/m2ts/stream-types.js\\\");\\n\\nvar parsePid = function(packet) {\\n  var pid = packet[1] & 0x1f;\\n  pid <<= 8;\\n  pid |= packet[2];\\n  return pid;\\n};\\n\\nvar parsePayloadUnitStartIndicator = function(packet) {\\n  return !!(packet[1] & 0x40);\\n};\\n\\nvar parseAdaptionField = function(packet) {\\n  var offset = 0;\\n  // if an adaption field is present, its length is specified by the\\n  // fifth byte of the TS packet header. The adaptation field is\\n  // used to add stuffing to PES packets that don't fill a complete\\n  // TS packet, and to specify some forms of timing and control data\\n  // that we do not currently use.\\n  if (((packet[3] & 0x30) >>> 4) > 0x01) {\\n    offset += packet[4] + 1;\\n  }\\n  return offset;\\n};\\n\\nvar parseType = function(packet, pmtPid) {\\n  var pid = parsePid(packet);\\n  if (pid === 0) {\\n    return 'pat';\\n  } else if (pid === pmtPid) {\\n    return 'pmt';\\n  } else if (pmtPid) {\\n    return 'pes';\\n  }\\n  return null;\\n};\\n\\nvar parsePat = function(packet) {\\n  var pusi = parsePayloadUnitStartIndicator(packet);\\n  var offset = 4 + parseAdaptionField(packet);\\n\\n  if (pusi) {\\n    offset += packet[offset] + 1;\\n  }\\n\\n  return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\\n};\\n\\nvar parsePmt = function(packet) {\\n  var programMapTable = {};\\n  var pusi = parsePayloadUnitStartIndicator(packet);\\n  var payloadOffset = 4 + parseAdaptionField(packet);\\n\\n  if (pusi) {\\n    payloadOffset += packet[payloadOffset] + 1;\\n  }\\n\\n  // PMTs can be sent ahead of the time when they should actually\\n  // take effect. We don't believe this should ever be the case\\n  // for HLS but we'll ignore \\\"forward\\\" PMT declarations if we see\\n  // them. Future PMT declarations have the current_next_indicator\\n  // set to zero.\\n  if (!(packet[payloadOffset + 5] & 0x01)) {\\n    return;\\n  }\\n\\n  var sectionLength, tableEnd, programInfoLength;\\n  // the mapping table ends at the end of the current section\\n  sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\\n  tableEnd = 3 + sectionLength - 4;\\n\\n  // to determine where the table is, we have to figure out how\\n  // long the program info descriptors are\\n  programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11];\\n\\n  // advance the offset to the first entry in the mapping table\\n  var offset = 12 + programInfoLength;\\n  while (offset < tableEnd) {\\n    var i = payloadOffset + offset;\\n    // add an entry that maps the elementary_pid to the stream_type\\n    programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i];\\n\\n    // move to the next table entry\\n    // skip past the elementary stream descriptors, if present\\n    offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\\n  }\\n  return programMapTable;\\n};\\n\\nvar parsePesType = function(packet, programMapTable) {\\n  var pid = parsePid(packet);\\n  var type = programMapTable[pid];\\n  switch (type) {\\n    case StreamTypes.H264_STREAM_TYPE:\\n      return 'video';\\n    case StreamTypes.ADTS_STREAM_TYPE:\\n      return 'audio';\\n    case StreamTypes.METADATA_STREAM_TYPE:\\n      return 'timed-metadata';\\n    default:\\n      return null;\\n  }\\n};\\n\\nvar parsePesTime = function(packet) {\\n  var pusi = parsePayloadUnitStartIndicator(packet);\\n  if (!pusi) {\\n    return null;\\n  }\\n\\n  var offset = 4 + parseAdaptionField(packet);\\n\\n  if (offset >= packet.byteLength) {\\n    // From the H 222.0 MPEG-TS spec\\n    // \\\"For transport stream packets carrying PES packets, stuffing is needed when there\\n    //  is insufficient PES packet data to completely fill the transport stream packet\\n    //  payload bytes. Stuffing is accomplished by defining an adaptation field longer than\\n    //  the sum of the lengths of the data elements in it, so that the payload bytes\\n    //  remaining after the adaptation field exactly accommodates the available PES packet\\n    //  data.\\\"\\n    //\\n    // If the offset is >= the length of the packet, then the packet contains no data\\n    // and instead is just adaption field stuffing bytes\\n    return null;\\n  }\\n\\n  var pes = null;\\n  var ptsDtsFlags;\\n\\n  // PES packets may be annotated with a PTS value, or a PTS value\\n  // and a DTS value. Determine what combination of values is\\n  // available to work with.\\n  ptsDtsFlags = packet[offset + 7];\\n\\n  // PTS and DTS are normally stored as a 33-bit number.  Javascript\\n  // performs all bitwise operations on 32-bit integers but javascript\\n  // supports a much greater range (52-bits) of integer using standard\\n  // mathematical operations.\\n  // We construct a 31-bit value using bitwise operators over the 31\\n  // most significant bits and then multiply by 4 (equal to a left-shift\\n  // of 2) before we add the final 2 least significant bits of the\\n  // timestamp (equal to an OR.)\\n  if (ptsDtsFlags & 0xC0) {\\n    pes = {};\\n    // the PTS and DTS are not written out directly. For information\\n    // on how they are encoded, see\\n    // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\\n    pes.pts = (packet[offset + 9] & 0x0E) << 27 |\\n      (packet[offset + 10] & 0xFF) << 20 |\\n      (packet[offset + 11] & 0xFE) << 12 |\\n      (packet[offset + 12] & 0xFF) <<  5 |\\n      (packet[offset + 13] & 0xFE) >>>  3;\\n    pes.pts *= 4; // Left shift by 2\\n    pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\\n    pes.dts = pes.pts;\\n    if (ptsDtsFlags & 0x40) {\\n      pes.dts = (packet[offset + 14] & 0x0E) << 27 |\\n        (packet[offset + 15] & 0xFF) << 20 |\\n        (packet[offset + 16] & 0xFE) << 12 |\\n        (packet[offset + 17] & 0xFF) << 5 |\\n        (packet[offset + 18] & 0xFE) >>> 3;\\n      pes.dts *= 4; // Left shift by 2\\n      pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\\n    }\\n  }\\n  return pes;\\n};\\n\\nvar parseNalUnitType = function(type) {\\n  switch (type) {\\n    case 0x05:\\n      return 'slice_layer_without_partitioning_rbsp_idr';\\n    case 0x06:\\n      return 'sei_rbsp';\\n    case 0x07:\\n      return 'seq_parameter_set_rbsp';\\n    case 0x08:\\n      return 'pic_parameter_set_rbsp';\\n    case 0x09:\\n      return 'access_unit_delimiter_rbsp';\\n    default:\\n      return null;\\n  }\\n};\\n\\nvar videoPacketContainsKeyFrame = function(packet) {\\n  var offset = 4 + parseAdaptionField(packet);\\n  var frameBuffer = packet.subarray(offset);\\n  var frameI = 0;\\n  var frameSyncPoint = 0;\\n  var foundKeyFrame = false;\\n  var nalType;\\n\\n  // advance the sync point to a NAL start, if necessary\\n  for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\\n    if (frameBuffer[frameSyncPoint + 2] === 1) {\\n      // the sync point is properly aligned\\n      frameI = frameSyncPoint + 5;\\n      break;\\n    }\\n  }\\n\\n  while (frameI < frameBuffer.byteLength) {\\n    // look at the current byte to determine if we've hit the end of\\n    // a NAL unit boundary\\n    switch (frameBuffer[frameI]) {\\n    case 0:\\n      // skip past non-sync sequences\\n      if (frameBuffer[frameI - 1] !== 0) {\\n        frameI += 2;\\n        break;\\n      } else if (frameBuffer[frameI - 2] !== 0) {\\n        frameI++;\\n        break;\\n      }\\n\\n      if (frameSyncPoint + 3 !== frameI - 2) {\\n        nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\\n        if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\\n          foundKeyFrame = true;\\n        }\\n      }\\n\\n      // drop trailing zeroes\\n      do {\\n        frameI++;\\n      } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\\n      frameSyncPoint = frameI - 2;\\n      frameI += 3;\\n      break;\\n    case 1:\\n      // skip past non-sync sequences\\n      if (frameBuffer[frameI - 1] !== 0 ||\\n          frameBuffer[frameI - 2] !== 0) {\\n        frameI += 3;\\n        break;\\n      }\\n\\n      nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\\n      if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\\n        foundKeyFrame = true;\\n      }\\n      frameSyncPoint = frameI - 2;\\n      frameI += 3;\\n      break;\\n    default:\\n      // the current byte isn't a one or zero, so it cannot be part\\n      // of a sync sequence\\n      frameI += 3;\\n      break;\\n    }\\n  }\\n  frameBuffer = frameBuffer.subarray(frameSyncPoint);\\n  frameI -= frameSyncPoint;\\n  frameSyncPoint = 0;\\n  // parse the final nal\\n  if (frameBuffer && frameBuffer.byteLength > 3) {\\n    nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\\n    if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\\n      foundKeyFrame = true;\\n    }\\n  }\\n\\n  return foundKeyFrame;\\n};\\n\\n\\nmodule.exports = {\\n  parseType: parseType,\\n  parsePat: parsePat,\\n  parsePmt: parsePmt,\\n  parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\\n  parsePesType: parsePesType,\\n  parsePesTime: parsePesTime,\\n  videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/probe.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/m2ts/stream-types.js\":\n/*!*******************************************************!*\\\n  !*** ../node_modules/mux.js/lib/m2ts/stream-types.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n */\\n\\n\\nmodule.exports = {\\n  H264_STREAM_TYPE: 0x1B,\\n  ADTS_STREAM_TYPE: 0x0F,\\n  METADATA_STREAM_TYPE: 0x15\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/stream-types.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js\":\n/*!********************************************************************!*\\\n  !*** ../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js ***!\n  \\********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Accepts program elementary stream (PES) data events and corrects\\n * decode and presentation time stamps to account for a rollover\\n * of the 33 bit value.\\n */\\n\\n\\n\\nvar Stream = __webpack_require__(/*! ../utils/stream */ \\\"../node_modules/mux.js/lib/utils/stream.js\\\");\\n\\nvar MAX_TS = 8589934592;\\n\\nvar RO_THRESH = 4294967296;\\n\\nvar TYPE_SHARED = 'shared';\\n\\nvar handleRollover = function(value, reference) {\\n  var direction = 1;\\n\\n  if (value > reference) {\\n    // If the current timestamp value is greater than our reference timestamp and we detect a\\n    // timestamp rollover, this means the roll over is happening in the opposite direction.\\n    // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\\n    // point will be set to a small number, e.g. 1. The user then seeks backwards over the\\n    // rollover point. In loading this segment, the timestamp values will be very large,\\n    // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\\n    // the time stamp to be `value - 2^33`.\\n    direction = -1;\\n  }\\n\\n  // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\\n  // cause an incorrect adjustment.\\n  while (Math.abs(reference - value) > RO_THRESH) {\\n    value += (direction * MAX_TS);\\n  }\\n\\n  return value;\\n};\\n\\nvar TimestampRolloverStream = function(type) {\\n  var lastDTS, referenceDTS;\\n\\n  TimestampRolloverStream.prototype.init.call(this);\\n\\n  // The \\\"shared\\\" type is used in cases where a stream will contain muxed\\n  // video and audio. We could use `undefined` here, but having a string\\n  // makes debugging a little clearer.\\n  this.type_ = type || TYPE_SHARED;\\n\\n  this.push = function(data) {\\n\\n    // Any \\\"shared\\\" rollover streams will accept _all_ data. Otherwise,\\n    // streams will only accept data that matches their type.\\n    if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\\n      return;\\n    }\\n\\n    if (referenceDTS === undefined) {\\n      referenceDTS = data.dts;\\n    }\\n\\n    data.dts = handleRollover(data.dts, referenceDTS);\\n    data.pts = handleRollover(data.pts, referenceDTS);\\n\\n    lastDTS = data.dts;\\n\\n    this.trigger('data', data);\\n  };\\n\\n  this.flush = function() {\\n    referenceDTS = lastDTS;\\n    this.trigger('done');\\n  };\\n\\n  this.endTimeline = function() {\\n    this.flush();\\n    this.trigger('endedtimeline');\\n  };\\n\\n  this.discontinuity = function() {\\n    referenceDTS = void 0;\\n    lastDTS = void 0;\\n  };\\n\\n  this.reset = function() {\\n    this.discontinuity();\\n    this.trigger('reset');\\n  };\\n};\\n\\nTimestampRolloverStream.prototype = new Stream();\\n\\nmodule.exports = {\\n  TimestampRolloverStream: TimestampRolloverStream,\\n  handleRollover: handleRollover\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/mp4/caption-parser.js\":\n/*!********************************************************!*\\\n  !*** ../node_modules/mux.js/lib/mp4/caption-parser.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Reads in-band CEA-708 captions out of FMP4 segments.\\n * @see https://en.wikipedia.org/wiki/CEA-708\\n */\\n\\n\\nvar discardEmulationPreventionBytes = __webpack_require__(/*! ../tools/caption-packet-parser */ \\\"../node_modules/mux.js/lib/tools/caption-packet-parser.js\\\").discardEmulationPreventionBytes;\\nvar CaptionStream = __webpack_require__(/*! ../m2ts/caption-stream */ \\\"../node_modules/mux.js/lib/m2ts/caption-stream.js\\\").CaptionStream;\\nvar probe = __webpack_require__(/*! ./probe */ \\\"../node_modules/mux.js/lib/mp4/probe.js\\\");\\nvar inspect = __webpack_require__(/*! ../tools/mp4-inspector */ \\\"../node_modules/mux.js/lib/tools/mp4-inspector.js\\\");\\n\\n/**\\n  * Maps an offset in the mdat to a sample based on the the size of the samples.\\n  * Assumes that `parseSamples` has been called first.\\n  *\\n  * @param {Number} offset - The offset into the mdat\\n  * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\\n  * @return {?Object} The matching sample, or null if no match was found.\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.8.8\\n **/\\nvar mapToSample = function(offset, samples) {\\n  var approximateOffset = offset;\\n\\n  for (var i = 0; i < samples.length; i++) {\\n    var sample = samples[i];\\n\\n    if (approximateOffset < sample.size) {\\n      return sample;\\n    }\\n\\n    approximateOffset -= sample.size;\\n  }\\n\\n  return null;\\n};\\n\\n/**\\n  * Finds SEI nal units contained in a Media Data Box.\\n  * Assumes that `parseSamples` has been called first.\\n  *\\n  * @param {Uint8Array} avcStream - The bytes of the mdat\\n  * @param {Object[]} samples - The samples parsed out by `parseSamples`\\n  * @param {Number} trackId - The trackId of this video track\\n  * @return {Object[]} seiNals - the parsed SEI NALUs found.\\n  *   The contents of the seiNal should match what is expected by\\n  *   CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.1.1\\n  * @see Rec. ITU-T H.264, 7.3.2.3.1\\n **/\\nvar findSeiNals = function(avcStream, samples, trackId) {\\n  var\\n    avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\\n    result = [],\\n    seiNal,\\n    i,\\n    length,\\n    lastMatchedSample;\\n\\n  for (i = 0; i + 4 < avcStream.length; i += length) {\\n    length = avcView.getUint32(i);\\n    i += 4;\\n\\n    // Bail if this doesn't appear to be an H264 stream\\n    if (length <= 0) {\\n      continue;\\n    }\\n\\n    switch (avcStream[i] & 0x1F) {\\n    case 0x06:\\n      var data = avcStream.subarray(i + 1, i + 1 + length);\\n      var matchingSample = mapToSample(i, samples);\\n\\n      seiNal = {\\n        nalUnitType: 'sei_rbsp',\\n        size: length,\\n        data: data,\\n        escapedRBSP: discardEmulationPreventionBytes(data),\\n        trackId: trackId\\n      };\\n\\n      if (matchingSample) {\\n        seiNal.pts = matchingSample.pts;\\n        seiNal.dts = matchingSample.dts;\\n        lastMatchedSample = matchingSample;\\n      } else {\\n        // If a matching sample cannot be found, use the last\\n        // sample's values as they should be as close as possible\\n        seiNal.pts = lastMatchedSample.pts;\\n        seiNal.dts = lastMatchedSample.dts;\\n      }\\n\\n      result.push(seiNal);\\n      break;\\n    default:\\n      break;\\n    }\\n  }\\n\\n  return result;\\n};\\n\\n/**\\n  * Parses sample information out of Track Run Boxes and calculates\\n  * the absolute presentation and decode timestamps of each sample.\\n  *\\n  * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\\n  * @param {Number} baseMediaDecodeTime - base media decode time from tfdt\\n      @see ISO-BMFF-12/2015, Section 8.8.12\\n  * @param {Object} tfhd - The parsed Track Fragment Header\\n  *   @see inspect.parseTfhd\\n  * @return {Object[]} the parsed samples\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.8.8\\n **/\\nvar parseSamples = function(truns, baseMediaDecodeTime, tfhd) {\\n  var currentDts = baseMediaDecodeTime;\\n  var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\\n  var defaultSampleSize = tfhd.defaultSampleSize || 0;\\n  var trackId = tfhd.trackId;\\n  var allSamples = [];\\n\\n  truns.forEach(function(trun) {\\n    // Note: We currently do not parse the sample table as well\\n    // as the trun. It's possible some sources will require this.\\n    // moov > trak > mdia > minf > stbl\\n    var trackRun = inspect.parseTrun(trun);\\n    var samples = trackRun.samples;\\n\\n    samples.forEach(function(sample) {\\n      if (sample.duration === undefined) {\\n        sample.duration = defaultSampleDuration;\\n      }\\n      if (sample.size === undefined) {\\n        sample.size = defaultSampleSize;\\n      }\\n      sample.trackId = trackId;\\n      sample.dts = currentDts;\\n      if (sample.compositionTimeOffset === undefined) {\\n        sample.compositionTimeOffset = 0;\\n      }\\n      sample.pts = currentDts + sample.compositionTimeOffset;\\n\\n      currentDts += sample.duration;\\n    });\\n\\n    allSamples = allSamples.concat(samples);\\n  });\\n\\n  return allSamples;\\n};\\n\\n/**\\n  * Parses out caption nals from an FMP4 segment's video tracks.\\n  *\\n  * @param {Uint8Array} segment - The bytes of a single segment\\n  * @param {Number} videoTrackId - The trackId of a video track in the segment\\n  * @return {Object.<Number, Object[]>} A mapping of video trackId to\\n  *   a list of seiNals found in that track\\n **/\\nvar parseCaptionNals = function(segment, videoTrackId) {\\n  // To get the samples\\n  var trafs = probe.findBox(segment, ['moof', 'traf']);\\n  // To get SEI NAL units\\n  var mdats = probe.findBox(segment, ['mdat']);\\n  var captionNals = {};\\n  var mdatTrafPairs = [];\\n\\n  // Pair up each traf with a mdat as moofs and mdats are in pairs\\n  mdats.forEach(function(mdat, index) {\\n    var matchingTraf = trafs[index];\\n    mdatTrafPairs.push({\\n      mdat: mdat,\\n      traf: matchingTraf\\n    });\\n  });\\n\\n  mdatTrafPairs.forEach(function(pair) {\\n    var mdat = pair.mdat;\\n    var traf = pair.traf;\\n    var tfhd = probe.findBox(traf, ['tfhd']);\\n    // Exactly 1 tfhd per traf\\n    var headerInfo = inspect.parseTfhd(tfhd[0]);\\n    var trackId = headerInfo.trackId;\\n    var tfdt = probe.findBox(traf, ['tfdt']);\\n    // Either 0 or 1 tfdt per traf\\n    var baseMediaDecodeTime = (tfdt.length > 0) ? inspect.parseTfdt(tfdt[0]).baseMediaDecodeTime : 0;\\n    var truns = probe.findBox(traf, ['trun']);\\n    var samples;\\n    var seiNals;\\n\\n    // Only parse video data for the chosen video track\\n    if (videoTrackId === trackId && truns.length > 0) {\\n      samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\\n\\n      seiNals = findSeiNals(mdat, samples, trackId);\\n\\n      if (!captionNals[trackId]) {\\n        captionNals[trackId] = [];\\n      }\\n\\n      captionNals[trackId] = captionNals[trackId].concat(seiNals);\\n    }\\n  });\\n\\n  return captionNals;\\n};\\n\\n/**\\n  * Parses out inband captions from an MP4 container and returns\\n  * caption objects that can be used by WebVTT and the TextTrack API.\\n  * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\\n  * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\\n  * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\\n  *\\n  * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\\n  * @param {Number} trackId - The id of the video track to parse\\n  * @param {Number} timescale - The timescale for the video track from the init segment\\n  *\\n  * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\\n  * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\\n  * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\\n  * @return {String} parsedCaptions[].text - The visible content of the caption\\n **/\\nvar parseEmbeddedCaptions = function(segment, trackId, timescale) {\\n  var seiNals;\\n\\n  // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\\n  if (trackId === null) {\\n    return null;\\n  }\\n\\n  seiNals = parseCaptionNals(segment, trackId);\\n\\n  return {\\n    seiNals: seiNals[trackId],\\n    timescale: timescale\\n  };\\n};\\n\\n/**\\n  * Converts SEI NALUs into captions that can be used by video.js\\n **/\\nvar CaptionParser = function() {\\n  var isInitialized = false;\\n  var captionStream;\\n\\n  // Stores segments seen before trackId and timescale are set\\n  var segmentCache;\\n  // Stores video track ID of the track being parsed\\n  var trackId;\\n  // Stores the timescale of the track being parsed\\n  var timescale;\\n  // Stores captions parsed so far\\n  var parsedCaptions;\\n  // Stores whether we are receiving partial data or not\\n  var parsingPartial;\\n\\n  /**\\n    * A method to indicate whether a CaptionParser has been initalized\\n    * @returns {Boolean}\\n   **/\\n  this.isInitialized = function() {\\n    return isInitialized;\\n  };\\n\\n  /**\\n    * Initializes the underlying CaptionStream, SEI NAL parsing\\n    * and management, and caption collection\\n   **/\\n  this.init = function(options) {\\n    captionStream = new CaptionStream();\\n    isInitialized = true;\\n    parsingPartial = options ? options.isPartial : false;\\n\\n    // Collect dispatched captions\\n    captionStream.on('data', function(event) {\\n      // Convert to seconds in the source's timescale\\n      event.startTime = event.startPts / timescale;\\n      event.endTime = event.endPts / timescale;\\n\\n      parsedCaptions.captions.push(event);\\n      parsedCaptions.captionStreams[event.stream] = true;\\n    });\\n  };\\n\\n  /**\\n    * Determines if a new video track will be selected\\n    * or if the timescale changed\\n    * @return {Boolean}\\n   **/\\n  this.isNewInit = function(videoTrackIds, timescales) {\\n    if ((videoTrackIds && videoTrackIds.length === 0) ||\\n        (timescales && typeof timescales === 'object' &&\\n          Object.keys(timescales).length === 0)) {\\n      return false;\\n    }\\n\\n    return trackId !== videoTrackIds[0] ||\\n      timescale !== timescales[trackId];\\n  };\\n\\n  /**\\n    * Parses out SEI captions and interacts with underlying\\n    * CaptionStream to return dispatched captions\\n    *\\n    * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\\n    * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\\n    * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\\n    * @see parseEmbeddedCaptions\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.parse = function(segment, videoTrackIds, timescales) {\\n    var parsedData;\\n\\n    if (!this.isInitialized()) {\\n      return null;\\n\\n    // This is not likely to be a video segment\\n    } else if (!videoTrackIds || !timescales) {\\n      return null;\\n\\n    } else if (this.isNewInit(videoTrackIds, timescales)) {\\n      // Use the first video track only as there is no\\n      // mechanism to switch to other video tracks\\n      trackId = videoTrackIds[0];\\n      timescale = timescales[trackId];\\n\\n    // If an init segment has not been seen yet, hold onto segment\\n    // data until we have one.\\n    // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\\n    } else if (trackId === null || !timescale) {\\n      segmentCache.push(segment);\\n      return null;\\n    }\\n\\n    // Now that a timescale and trackId is set, parse cached segments\\n    while (segmentCache.length > 0) {\\n      var cachedSegment = segmentCache.shift();\\n\\n      this.parse(cachedSegment, videoTrackIds, timescales);\\n    }\\n\\n    parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\\n\\n    if (parsedData === null || !parsedData.seiNals) {\\n      return null;\\n    }\\n\\n    this.pushNals(parsedData.seiNals);\\n    // Force the parsed captions to be dispatched\\n    this.flushStream();\\n\\n    return parsedCaptions;\\n  };\\n\\n  /**\\n    * Pushes SEI NALUs onto CaptionStream\\n    * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\\n    * Assumes that `parseCaptionNals` has been called first\\n    * @see m2ts/caption-stream.js\\n    **/\\n  this.pushNals = function(nals) {\\n    if (!this.isInitialized() || !nals || nals.length === 0) {\\n      return null;\\n    }\\n\\n    nals.forEach(function(nal) {\\n      captionStream.push(nal);\\n    });\\n  };\\n\\n  /**\\n    * Flushes underlying CaptionStream to dispatch processed, displayable captions\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.flushStream = function() {\\n    if (!this.isInitialized()) {\\n      return null;\\n    }\\n\\n    if (!parsingPartial) {\\n      captionStream.flush();\\n    } else {\\n      captionStream.partialFlush();\\n    }\\n  };\\n\\n  /**\\n    * Reset caption buckets for new data\\n   **/\\n  this.clearParsedCaptions = function() {\\n    parsedCaptions.captions = [];\\n    parsedCaptions.captionStreams = {};\\n  };\\n\\n  /**\\n    * Resets underlying CaptionStream\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.resetCaptionStream = function() {\\n    if (!this.isInitialized()) {\\n      return null;\\n    }\\n\\n    captionStream.reset();\\n  };\\n\\n  /**\\n    * Convenience method to clear all captions flushed from the\\n    * CaptionStream and still being parsed\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.clearAllCaptions = function() {\\n    this.clearParsedCaptions();\\n    this.resetCaptionStream();\\n  };\\n\\n  /**\\n    * Reset caption parser\\n   **/\\n  this.reset = function() {\\n    segmentCache = [];\\n    trackId = null;\\n    timescale = null;\\n\\n    if (!parsedCaptions) {\\n      parsedCaptions = {\\n        captions: [],\\n        // CC1, CC2, CC3, CC4\\n        captionStreams: {}\\n      };\\n    } else {\\n      this.clearParsedCaptions();\\n    }\\n\\n    this.resetCaptionStream();\\n  };\\n\\n  this.reset();\\n};\\n\\nmodule.exports = CaptionParser;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/mp4/caption-parser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/mp4/probe.js\":\n/*!***********************************************!*\\\n  !*** ../node_modules/mux.js/lib/mp4/probe.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Utilities to detect basic properties and metadata about MP4s.\\n */\\n\\n\\nvar toUnsigned = __webpack_require__(/*! ../utils/bin */ \\\"../node_modules/mux.js/lib/utils/bin.js\\\").toUnsigned;\\nvar toHexString = __webpack_require__(/*! ../utils/bin */ \\\"../node_modules/mux.js/lib/utils/bin.js\\\").toHexString;\\nvar mp4Inspector = __webpack_require__(/*! ../tools/mp4-inspector.js */ \\\"../node_modules/mux.js/lib/tools/mp4-inspector.js\\\");\\nvar timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks;\\n\\n/**\\n * Parses an MP4 initialization segment and extracts the timescale\\n * values for any declared tracks. Timescale values indicate the\\n * number of clock ticks per second to assume for time-based values\\n * elsewhere in the MP4.\\n *\\n * To determine the start time of an MP4, you need two pieces of\\n * information: the timescale unit and the earliest base media decode\\n * time. Multiple timescales can be specified within an MP4 but the\\n * base media decode time is always expressed in the timescale from\\n * the media header box for the track:\\n * ```\\n * moov > trak > mdia > mdhd.timescale\\n * ```\\n * @param init {Uint8Array} the bytes of the init segment\\n * @return {object} a hash of track ids to timescale values or null if\\n * the init segment is malformed.\\n */\\ntimescale = function(init) {\\n  var\\n    result = {},\\n    traks = mp4Inspector.findBox(init, ['moov', 'trak']);\\n\\n  // mdhd timescale\\n  return traks.reduce(function(result, trak) {\\n    var tkhd, version, index, id, mdhd;\\n\\n    tkhd = mp4Inspector.findBox(trak, ['tkhd'])[0];\\n    if (!tkhd) {\\n      return null;\\n    }\\n    version = tkhd[0];\\n    index = version === 0 ? 12 : 20;\\n    id = toUnsigned(tkhd[index]     << 24 |\\n                    tkhd[index + 1] << 16 |\\n                    tkhd[index + 2] <<  8 |\\n                    tkhd[index + 3]);\\n\\n    mdhd = mp4Inspector.findBox(trak, ['mdia', 'mdhd'])[0];\\n    if (!mdhd) {\\n      return null;\\n    }\\n    version = mdhd[0];\\n    index = version === 0 ? 12 : 20;\\n    result[id] = toUnsigned(mdhd[index]     << 24 |\\n                            mdhd[index + 1] << 16 |\\n                            mdhd[index + 2] <<  8 |\\n                            mdhd[index + 3]);\\n    return result;\\n  }, result);\\n};\\n\\n/**\\n * Determine the base media decode start time, in seconds, for an MP4\\n * fragment. If multiple fragments are specified, the earliest time is\\n * returned.\\n *\\n * The base media decode time can be parsed from track fragment\\n * metadata:\\n * ```\\n * moof > traf > tfdt.baseMediaDecodeTime\\n * ```\\n * It requires the timescale value from the mdhd to interpret.\\n *\\n * @param timescale {object} a hash of track ids to timescale values.\\n * @return {number} the earliest base media decode start time for the\\n * fragment, in seconds\\n */\\nstartTime = function(timescale, fragment) {\\n  var trafs, baseTimes, result;\\n\\n  // we need info from two childrend of each track fragment box\\n  trafs = mp4Inspector.findBox(fragment, ['moof', 'traf']);\\n\\n  // determine the start times for each track\\n  baseTimes = [].concat.apply([], trafs.map(function(traf) {\\n    return mp4Inspector.findBox(traf, ['tfhd']).map(function(tfhd) {\\n      var id, scale, baseTime;\\n\\n      // get the track id from the tfhd\\n      id = toUnsigned(tfhd[4] << 24 |\\n                      tfhd[5] << 16 |\\n                      tfhd[6] <<  8 |\\n                      tfhd[7]);\\n      // assume a 90kHz clock if no timescale was specified\\n      scale = timescale[id] || 90e3;\\n\\n      // get the base media decode time from the tfdt\\n      baseTime = mp4Inspector.findBox(traf, ['tfdt']).map(function(tfdt) {\\n        var version, result;\\n\\n        version = tfdt[0];\\n        result = toUnsigned(tfdt[4] << 24 |\\n                            tfdt[5] << 16 |\\n                            tfdt[6] <<  8 |\\n                            tfdt[7]);\\n        if (version ===  1) {\\n          result *= Math.pow(2, 32);\\n          result += toUnsigned(tfdt[8]  << 24 |\\n                               tfdt[9]  << 16 |\\n                               tfdt[10] <<  8 |\\n                               tfdt[11]);\\n        }\\n        return result;\\n      })[0];\\n      baseTime = baseTime || Infinity;\\n\\n      // convert base time to seconds\\n      return baseTime / scale;\\n    });\\n  }));\\n\\n  // return the minimum\\n  result = Math.min.apply(null, baseTimes);\\n  return isFinite(result) ? result : 0;\\n};\\n\\n/**\\n * Determine the composition start, in seconds, for an MP4\\n * fragment.\\n *\\n * The composition start time of a fragment can be calculated using the base\\n * media decode time, composition time offset, and timescale, as follows:\\n *\\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\\n *\\n * All of the aforementioned information is contained within a media fragment's\\n * `traf` box, except for timescale info, which comes from the initialization\\n * segment, so a track id (also contained within a `traf`) is also necessary to\\n * associate it with a timescale\\n *\\n *\\n * @param timescales {object} - a hash of track ids to timescale values.\\n * @param fragment {Unit8Array} - the bytes of a media segment\\n * @return {number} the composition start time for the fragment, in seconds\\n **/\\ncompositionStartTime = function(timescales, fragment) {\\n  var trafBoxes = mp4Inspector.findBox(fragment, ['moof', 'traf']);\\n  var baseMediaDecodeTime = 0;\\n  var compositionTimeOffset = 0;\\n  var trackId;\\n\\n  if (trafBoxes && trafBoxes.length) {\\n    // The spec states that track run samples contained within a `traf` box are contiguous, but\\n    // it does not explicitly state whether the `traf` boxes themselves are contiguous.\\n    // We will assume that they are, so we only need the first to calculate start time.\\n    var parsedTraf = mp4Inspector.parseTraf(trafBoxes[0]);\\n\\n    for (var i = 0; i < parsedTraf.boxes.length; i++) {\\n      if (parsedTraf.boxes[i].type === 'tfhd') {\\n        trackId = parsedTraf.boxes[i].trackId;\\n      } else if (parsedTraf.boxes[i].type === 'tfdt') {\\n        baseMediaDecodeTime = parsedTraf.boxes[i].baseMediaDecodeTime;\\n      } else if (parsedTraf.boxes[i].type === 'trun' && parsedTraf.boxes[i].samples.length) {\\n        compositionTimeOffset = parsedTraf.boxes[i].samples[0].compositionTimeOffset || 0;\\n      }\\n    }\\n  }\\n\\n  // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\\n  // specified.\\n  var timescale = timescales[trackId] || 90e3;\\n\\n  // return the composition start time, in seconds\\n  return (baseMediaDecodeTime + compositionTimeOffset) / timescale;\\n};\\n\\n/**\\n  * Find the trackIds of the video tracks in this source.\\n  * Found by parsing the Handler Reference and Track Header Boxes:\\n  *   moov > trak > mdia > hdlr\\n  *   moov > trak > tkhd\\n  *\\n  * @param {Uint8Array} init - The bytes of the init segment for this source\\n  * @return {Number[]} A list of trackIds\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.4.3\\n **/\\ngetVideoTrackIds = function(init) {\\n  var traks = mp4Inspector.findBox(init, ['moov', 'trak']);\\n  var videoTrackIds = [];\\n\\n  traks.forEach(function(trak) {\\n    var hdlrs = mp4Inspector.findBox(trak, ['mdia', 'hdlr']);\\n    var tkhds = mp4Inspector.findBox(trak, ['tkhd']);\\n\\n    hdlrs.forEach(function(hdlr, index) {\\n      var handlerType = mp4Inspector.parseType(hdlr.subarray(8, 12));\\n      var tkhd = tkhds[index];\\n      var view;\\n      var version;\\n      var trackId;\\n\\n      if (handlerType === 'vide') {\\n        view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\\n        version = view.getUint8(0);\\n        trackId = (version === 0) ? view.getUint32(12) : view.getUint32(20);\\n\\n        videoTrackIds.push(trackId);\\n      }\\n    });\\n  });\\n\\n  return videoTrackIds;\\n};\\n\\n/**\\n * Get all the video, audio, and hint tracks from a non fragmented\\n * mp4 segment\\n */\\ngetTracks = function(init) {\\n  var traks = mp4Inspector.findBox(init, ['moov', 'trak']);\\n  var tracks = [];\\n\\n  traks.forEach(function(trak) {\\n    var track = {};\\n    var tkhd = mp4Inspector.findBox(trak, ['tkhd'])[0];\\n    var view, version;\\n\\n    // id\\n    if (tkhd) {\\n      view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\\n      version = view.getUint8(0);\\n\\n      track.id = (version === 0) ? view.getUint32(12) : view.getUint32(20);\\n    }\\n\\n    var hdlr = mp4Inspector.findBox(trak, ['mdia', 'hdlr'])[0];\\n\\n    // type\\n    if (hdlr) {\\n      var type = mp4Inspector.parseType(hdlr.subarray(8, 12));\\n\\n      if (type === 'vide') {\\n        track.type = 'video';\\n      } else if (type === 'soun') {\\n        track.type = 'audio';\\n      } else {\\n        track.type = type;\\n      }\\n    }\\n\\n\\n    // codec\\n    var stsd = mp4Inspector.findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\\n\\n    if (stsd) {\\n      var sampleDescriptions = stsd.subarray(8);\\n      // gives the codec type string\\n      track.codec = mp4Inspector.parseType(sampleDescriptions.subarray(4, 8));\\n\\n      var codecBox = mp4Inspector.findBox(sampleDescriptions, [track.codec])[0];\\n      var codecConfig, codecConfigType;\\n\\n      if (codecBox) {\\n        // https://tools.ietf.org/html/rfc6381#section-3.3\\n        if ((/^[a-z]vc[1-9]$/i).test(track.codec)) {\\n          // we don't need anything but the \\\"config\\\" parameter of the\\n          // avc1 codecBox\\n          codecConfig = codecBox.subarray(78);\\n          codecConfigType = mp4Inspector.parseType(codecConfig.subarray(4, 8));\\n\\n          if (codecConfigType === 'avcC' && codecConfig.length > 11) {\\n            track.codec += '.';\\n\\n            // left padded with zeroes for single digit hex\\n            // profile idc\\n            track.codec +=  toHexString(codecConfig[9]);\\n            // the byte containing the constraint_set flags\\n            track.codec += toHexString(codecConfig[10]);\\n            // level idc\\n            track.codec += toHexString(codecConfig[11]);\\n          } else {\\n            // TODO: show a warning that we couldn't parse the codec\\n            // and are using the default\\n            track.codec = 'avc1.4d400d';\\n          }\\n        } else if ((/^mp4[a,v]$/i).test(track.codec)) {\\n          // we do not need anything but the streamDescriptor of the mp4a codecBox\\n          codecConfig = codecBox.subarray(28);\\n          codecConfigType = mp4Inspector.parseType(codecConfig.subarray(4, 8));\\n\\n          if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\\n            track.codec += '.' + toHexString(codecConfig[19]);\\n            // this value is only a single digit\\n            track.codec += '.' + toHexString((codecConfig[20] >>> 2) & 0x3f).replace(/^0/, '');\\n          } else {\\n            // TODO: show a warning that we couldn't parse the codec\\n            // and are using the default\\n            track.codec = 'mp4a.40.2';\\n          }\\n        } else {\\n          // TODO: show a warning? for unknown codec type\\n        }\\n      }\\n    }\\n\\n    var mdhd = mp4Inspector.findBox(trak, ['mdia', 'mdhd'])[0];\\n\\n    if (mdhd && tkhd) {\\n      var index = version === 0 ? 12 : 20;\\n\\n      track.timescale = toUnsigned(mdhd[index]     << 24 |\\n                                   mdhd[index + 1] << 16 |\\n                                   mdhd[index + 2] <<  8 |\\n                                   mdhd[index + 3]);\\n    }\\n\\n    tracks.push(track);\\n  });\\n\\n  return tracks;\\n};\\n\\nmodule.exports = {\\n  // export mp4 inspector's findBox and parseType for backwards compatibility\\n  findBox: mp4Inspector.findBox,\\n  parseType: mp4Inspector.parseType,\\n  timescale: timescale,\\n  startTime: startTime,\\n  compositionStartTime: compositionStartTime,\\n  videoTrackIds: getVideoTrackIds,\\n  tracks: getTracks\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/mp4/probe.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/tools/caption-packet-parser.js\":\n/*!*****************************************************************!*\\\n  !*** ../node_modules/mux.js/lib/tools/caption-packet-parser.js ***!\n  \\*****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Reads in-band caption information from a video elementary\\n * stream. Captions must follow the CEA-708 standard for injection\\n * into an MPEG-2 transport streams.\\n * @see https://en.wikipedia.org/wiki/CEA-708\\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\\n */\\n\\n\\n\\n// Supplemental enhancement information (SEI) NAL units have a\\n// payload type field to indicate how they are to be\\n// interpreted. CEAS-708 caption content is always transmitted with\\n// payload type 0x04.\\nvar USER_DATA_REGISTERED_ITU_T_T35 = 4,\\n    RBSP_TRAILING_BITS = 128;\\n\\n/**\\n  * Parse a supplemental enhancement information (SEI) NAL unit.\\n  * Stops parsing once a message of type ITU T T35 has been found.\\n  *\\n  * @param bytes {Uint8Array} the bytes of a SEI NAL unit\\n  * @return {object} the parsed SEI payload\\n  * @see Rec. ITU-T H.264, 7.3.2.3.1\\n  */\\nvar parseSei = function(bytes) {\\n  var\\n    i = 0,\\n    result = {\\n      payloadType: -1,\\n      payloadSize: 0\\n    },\\n    payloadType = 0,\\n    payloadSize = 0;\\n\\n  // go through the sei_rbsp parsing each each individual sei_message\\n  while (i < bytes.byteLength) {\\n    // stop once we have hit the end of the sei_rbsp\\n    if (bytes[i] === RBSP_TRAILING_BITS) {\\n      break;\\n    }\\n\\n    // Parse payload type\\n    while (bytes[i] === 0xFF) {\\n      payloadType += 255;\\n      i++;\\n    }\\n    payloadType += bytes[i++];\\n\\n    // Parse payload size\\n    while (bytes[i] === 0xFF) {\\n      payloadSize += 255;\\n      i++;\\n    }\\n    payloadSize += bytes[i++];\\n\\n    // this sei_message is a 608/708 caption so save it and break\\n    // there can only ever be one caption message in a frame's sei\\n    if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\\n      result.payloadType = payloadType;\\n      result.payloadSize = payloadSize;\\n      result.payload = bytes.subarray(i, i + payloadSize);\\n      break;\\n    }\\n\\n    // skip the payload and parse the next message\\n    i += payloadSize;\\n    payloadType = 0;\\n    payloadSize = 0;\\n  }\\n\\n  return result;\\n};\\n\\n// see ANSI/SCTE 128-1 (2013), section 8.1\\nvar parseUserData = function(sei) {\\n  // itu_t_t35_contry_code must be 181 (United States) for\\n  // captions\\n  if (sei.payload[0] !== 181) {\\n    return null;\\n  }\\n\\n  // itu_t_t35_provider_code should be 49 (ATSC) for captions\\n  if (((sei.payload[1] << 8) | sei.payload[2]) !== 49) {\\n    return null;\\n  }\\n\\n  // the user_identifier should be \\\"GA94\\\" to indicate ATSC1 data\\n  if (String.fromCharCode(sei.payload[3],\\n                          sei.payload[4],\\n                          sei.payload[5],\\n                          sei.payload[6]) !== 'GA94') {\\n    return null;\\n  }\\n\\n  // finally, user_data_type_code should be 0x03 for caption data\\n  if (sei.payload[7] !== 0x03) {\\n    return null;\\n  }\\n\\n  // return the user_data_type_structure and strip the trailing\\n  // marker bits\\n  return sei.payload.subarray(8, sei.payload.length - 1);\\n};\\n\\n// see CEA-708-D, section 4.4\\nvar parseCaptionPackets = function(pts, userData) {\\n  var results = [], i, count, offset, data;\\n\\n  // if this is just filler, return immediately\\n  if (!(userData[0] & 0x40)) {\\n    return results;\\n  }\\n\\n  // parse out the cc_data_1 and cc_data_2 fields\\n  count = userData[0] & 0x1f;\\n  for (i = 0; i < count; i++) {\\n    offset = i * 3;\\n    data = {\\n      type: userData[offset + 2] & 0x03,\\n      pts: pts\\n    };\\n\\n    // capture cc data when cc_valid is 1\\n    if (userData[offset + 2] & 0x04) {\\n      data.ccData = (userData[offset + 3] << 8) | userData[offset + 4];\\n      results.push(data);\\n    }\\n  }\\n  return results;\\n};\\n\\nvar discardEmulationPreventionBytes = function(data) {\\n    var\\n      length = data.byteLength,\\n      emulationPreventionBytesPositions = [],\\n      i = 1,\\n      newLength, newData;\\n\\n    // Find all `Emulation Prevention Bytes`\\n    while (i < length - 2) {\\n      if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\\n        emulationPreventionBytesPositions.push(i + 2);\\n        i += 2;\\n      } else {\\n        i++;\\n      }\\n    }\\n\\n    // If no Emulation Prevention Bytes were found just return the original\\n    // array\\n    if (emulationPreventionBytesPositions.length === 0) {\\n      return data;\\n    }\\n\\n    // Create a new array to hold the NAL unit data\\n    newLength = length - emulationPreventionBytesPositions.length;\\n    newData = new Uint8Array(newLength);\\n    var sourceIndex = 0;\\n\\n    for (i = 0; i < newLength; sourceIndex++, i++) {\\n      if (sourceIndex === emulationPreventionBytesPositions[0]) {\\n        // Skip this byte\\n        sourceIndex++;\\n        // Remove this position index\\n        emulationPreventionBytesPositions.shift();\\n      }\\n      newData[i] = data[sourceIndex];\\n    }\\n\\n    return newData;\\n};\\n\\n// exports\\nmodule.exports = {\\n  parseSei: parseSei,\\n  parseUserData: parseUserData,\\n  parseCaptionPackets: parseCaptionPackets,\\n  discardEmulationPreventionBytes: discardEmulationPreventionBytes,\\n  USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/tools/caption-packet-parser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/tools/mp4-inspector.js\":\n/*!*********************************************************!*\\\n  !*** ../node_modules/mux.js/lib/tools/mp4-inspector.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Parse the internal MP4 structure into an equivalent javascript\\n * object.\\n */\\n\\n\\nvar\\n  inspectMp4,\\n  textifyMp4,\\n  toUnsigned = __webpack_require__(/*! ../utils/bin */ \\\"../node_modules/mux.js/lib/utils/bin.js\\\").toUnsigned,\\n  parseMp4Date = function(seconds) {\\n    return new Date(seconds * 1000 - 2082844800000);\\n  },\\n  parseSampleFlags = function(flags) {\\n    return {\\n      isLeading: (flags[0] & 0x0c) >>> 2,\\n      dependsOn: flags[0] & 0x03,\\n      isDependedOn: (flags[1] & 0xc0) >>> 6,\\n      hasRedundancy: (flags[1] & 0x30) >>> 4,\\n      paddingValue: (flags[1] & 0x0e) >>> 1,\\n      isNonSyncSample: flags[1] & 0x01,\\n      degradationPriority: (flags[2] << 8) | flags[3]\\n    };\\n  },\\n  /**\\n   * Returns the string representation of an ASCII encoded four byte buffer.\\n   * @param buffer {Uint8Array} a four-byte buffer to translate\\n   * @return {string} the corresponding string\\n   */\\n  parseType = function(buffer) {\\n    var result = '';\\n    result += String.fromCharCode(buffer[0]);\\n    result += String.fromCharCode(buffer[1]);\\n    result += String.fromCharCode(buffer[2]);\\n    result += String.fromCharCode(buffer[3]);\\n    return result;\\n  },\\n  // Find the data for a box specified by its path\\n  findBox = function(data, path) {\\n    var results = [],\\n        i, size, type, end, subresults;\\n\\n    if (!path.length) {\\n      // short-circuit the search for empty paths\\n      return null;\\n    }\\n\\n    for (i = 0; i < data.byteLength;) {\\n      size  = toUnsigned(data[i]     << 24 |\\n                         data[i + 1] << 16 |\\n                         data[i + 2] <<  8 |\\n                         data[i + 3]);\\n\\n      type = parseType(data.subarray(i + 4, i + 8));\\n\\n      end = size > 1 ? i + size : data.byteLength;\\n\\n      if (type === path[0]) {\\n        if (path.length === 1) {\\n          // this is the end of the path and we've found the box we were\\n          // looking for\\n          results.push(data.subarray(i + 8, end));\\n        } else {\\n          // recursively search for the next box along the path\\n          subresults = findBox(data.subarray(i + 8, end), path.slice(1));\\n          if (subresults.length) {\\n            results = results.concat(subresults);\\n          }\\n        }\\n      }\\n      i = end;\\n    }\\n\\n    // we've finished searching all of data\\n    return results;\\n  },\\n  nalParse = function(avcStream) {\\n    var\\n      avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\\n      result = [],\\n      i,\\n      length;\\n    for (i = 0; i + 4 < avcStream.length; i += length) {\\n      length = avcView.getUint32(i);\\n      i += 4;\\n\\n      // bail if this doesn't appear to be an H264 stream\\n      if (length <= 0) {\\n        result.push('<span style=\\\\'color:red;\\\\'>MALFORMED DATA</span>');\\n        continue;\\n      }\\n\\n      switch (avcStream[i] & 0x1F) {\\n      case 0x01:\\n        result.push('slice_layer_without_partitioning_rbsp');\\n        break;\\n      case 0x05:\\n        result.push('slice_layer_without_partitioning_rbsp_idr');\\n        break;\\n      case 0x06:\\n        result.push('sei_rbsp');\\n        break;\\n      case 0x07:\\n        result.push('seq_parameter_set_rbsp');\\n        break;\\n      case 0x08:\\n        result.push('pic_parameter_set_rbsp');\\n        break;\\n      case 0x09:\\n        result.push('access_unit_delimiter_rbsp');\\n        break;\\n      default:\\n        result.push('UNKNOWN NAL - ' + avcStream[i] & 0x1F);\\n        break;\\n      }\\n    }\\n    return result;\\n  },\\n\\n  // registry of handlers for individual mp4 box types\\n  parse = {\\n    // codingname, not a first-class box type. stsd entries share the\\n    // same format as real boxes so the parsing infrastructure can be\\n    // shared\\n    avc1: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        dataReferenceIndex: view.getUint16(6),\\n        width: view.getUint16(24),\\n        height: view.getUint16(26),\\n        horizresolution: view.getUint16(28) + (view.getUint16(30) / 16),\\n        vertresolution: view.getUint16(32) + (view.getUint16(34) / 16),\\n        frameCount: view.getUint16(40),\\n        depth: view.getUint16(74),\\n        config: inspectMp4(data.subarray(78, data.byteLength))\\n      };\\n    },\\n    avcC: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          configurationVersion: data[0],\\n          avcProfileIndication: data[1],\\n          profileCompatibility: data[2],\\n          avcLevelIndication: data[3],\\n          lengthSizeMinusOne: data[4] & 0x03,\\n          sps: [],\\n          pps: []\\n        },\\n        numOfSequenceParameterSets = data[5] & 0x1f,\\n        numOfPictureParameterSets,\\n        nalSize,\\n        offset,\\n        i;\\n\\n      // iterate past any SPSs\\n      offset = 6;\\n      for (i = 0; i < numOfSequenceParameterSets; i++) {\\n        nalSize = view.getUint16(offset);\\n        offset += 2;\\n        result.sps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\\n        offset += nalSize;\\n      }\\n      // iterate past any PPSs\\n      numOfPictureParameterSets = data[offset];\\n      offset++;\\n      for (i = 0; i < numOfPictureParameterSets; i++) {\\n        nalSize = view.getUint16(offset);\\n        offset += 2;\\n        result.pps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\\n        offset += nalSize;\\n      }\\n      return result;\\n    },\\n    btrt: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        bufferSizeDB: view.getUint32(0),\\n        maxBitrate: view.getUint32(4),\\n        avgBitrate: view.getUint32(8)\\n      };\\n    },\\n    esds: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        esId: (data[6] << 8) | data[7],\\n        streamPriority: data[8] & 0x1f,\\n        decoderConfig: {\\n          objectProfileIndication: data[11],\\n          streamType: (data[12] >>> 2) & 0x3f,\\n          bufferSize: (data[13] << 16) | (data[14] << 8) | data[15],\\n          maxBitrate: (data[16] << 24) |\\n            (data[17] << 16) |\\n            (data[18] <<  8) |\\n            data[19],\\n          avgBitrate: (data[20] << 24) |\\n            (data[21] << 16) |\\n            (data[22] <<  8) |\\n            data[23],\\n          decoderConfigDescriptor: {\\n            tag: data[24],\\n            length: data[25],\\n            audioObjectType: (data[26] >>> 3) & 0x1f,\\n            samplingFrequencyIndex: ((data[26] & 0x07) << 1) |\\n              ((data[27] >>> 7) & 0x01),\\n            channelConfiguration: (data[27] >>> 3) & 0x0f\\n          }\\n        }\\n      };\\n    },\\n    ftyp: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          majorBrand: parseType(data.subarray(0, 4)),\\n          minorVersion: view.getUint32(4),\\n          compatibleBrands: []\\n        },\\n        i = 8;\\n      while (i < data.byteLength) {\\n        result.compatibleBrands.push(parseType(data.subarray(i, i + 4)));\\n        i += 4;\\n      }\\n      return result;\\n    },\\n    dinf: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    dref: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        dataReferences: inspectMp4(data.subarray(8))\\n      };\\n    },\\n    hdlr: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          handlerType: parseType(data.subarray(8, 12)),\\n          name: ''\\n        },\\n        i = 8;\\n\\n      // parse out the name field\\n      for (i = 24; i < data.byteLength; i++) {\\n        if (data[i] === 0x00) {\\n          // the name field is null-terminated\\n          i++;\\n          break;\\n        }\\n        result.name += String.fromCharCode(data[i]);\\n      }\\n      // decode UTF-8 to javascript's internal representation\\n      // see http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\\n      result.name = decodeURIComponent(escape(result.name));\\n\\n      return result;\\n    },\\n    mdat: function(data) {\\n      return {\\n        byteLength: data.byteLength,\\n        nals: nalParse(data)\\n      };\\n    },\\n    mdhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        i = 4,\\n        language,\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          language: ''\\n        };\\n      if (result.version === 1) {\\n        i += 4;\\n        result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 8;\\n        result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 8;\\n        result.duration = view.getUint32(i); // truncating top 4 bytes\\n      } else {\\n        result.creationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.modificationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 4;\\n        result.duration = view.getUint32(i);\\n      }\\n      i += 4;\\n      // language is stored as an ISO-639-2/T code in an array of three 5-bit fields\\n      // each field is the packed difference between its ASCII value and 0x60\\n      language = view.getUint16(i);\\n      result.language += String.fromCharCode((language >> 10) + 0x60);\\n      result.language += String.fromCharCode(((language & 0x03e0) >> 5) + 0x60);\\n      result.language += String.fromCharCode((language & 0x1f) + 0x60);\\n\\n      return result;\\n    },\\n    mdia: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    mfhd: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        sequenceNumber: (data[4] << 24) |\\n          (data[5] << 16) |\\n          (data[6] << 8) |\\n          (data[7])\\n      };\\n    },\\n    minf: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    // codingname, not a first-class box type. stsd entries share the\\n    // same format as real boxes so the parsing infrastructure can be\\n    // shared\\n    mp4a: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          // 6 bytes reserved\\n          dataReferenceIndex: view.getUint16(6),\\n          // 4 + 4 bytes reserved\\n          channelcount: view.getUint16(16),\\n          samplesize: view.getUint16(18),\\n          // 2 bytes pre_defined\\n          // 2 bytes reserved\\n          samplerate: view.getUint16(24) + (view.getUint16(26) / 65536)\\n        };\\n\\n      // if there are more bytes to process, assume this is an ISO/IEC\\n      // 14496-14 MP4AudioSampleEntry and parse the ESDBox\\n      if (data.byteLength > 28) {\\n        result.streamDescriptor = inspectMp4(data.subarray(28))[0];\\n      }\\n      return result;\\n    },\\n    moof: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    moov: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    mvex: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    mvhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        i = 4,\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4))\\n        };\\n\\n      if (result.version === 1) {\\n        i += 4;\\n        result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 8;\\n        result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 8;\\n        result.duration = view.getUint32(i); // truncating top 4 bytes\\n      } else {\\n        result.creationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.modificationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 4;\\n        result.duration = view.getUint32(i);\\n      }\\n      i += 4;\\n\\n      // convert fixed-point, base 16 back to a number\\n      result.rate = view.getUint16(i) + (view.getUint16(i + 2) / 16);\\n      i += 4;\\n      result.volume = view.getUint8(i) + (view.getUint8(i + 1) / 8);\\n      i += 2;\\n      i += 2;\\n      i += 2 * 4;\\n      result.matrix = new Uint32Array(data.subarray(i, i + (9 * 4)));\\n      i += 9 * 4;\\n      i += 6 * 4;\\n      result.nextTrackId = view.getUint32(i);\\n      return result;\\n    },\\n    pdin: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        version: view.getUint8(0),\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        rate: view.getUint32(4),\\n        initialDelay: view.getUint32(8)\\n      };\\n    },\\n    sdtp: function(data) {\\n      var\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          samples: []\\n        }, i;\\n\\n      for (i = 4; i < data.byteLength; i++) {\\n        result.samples.push({\\n          dependsOn: (data[i] & 0x30) >> 4,\\n          isDependedOn: (data[i] & 0x0c) >> 2,\\n          hasRedundancy: data[i] & 0x03\\n        });\\n      }\\n      return result;\\n    },\\n    sidx: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n          result = {\\n            version: data[0],\\n            flags: new Uint8Array(data.subarray(1, 4)),\\n            references: [],\\n            referenceId: view.getUint32(4),\\n            timescale: view.getUint32(8),\\n            earliestPresentationTime: view.getUint32(12),\\n            firstOffset: view.getUint32(16)\\n          },\\n          referenceCount = view.getUint16(22),\\n          i;\\n\\n      for (i = 24; referenceCount; i += 12, referenceCount--) {\\n        result.references.push({\\n          referenceType: (data[i] & 0x80) >>> 7,\\n          referencedSize: view.getUint32(i) & 0x7FFFFFFF,\\n          subsegmentDuration: view.getUint32(i + 4),\\n          startsWithSap: !!(data[i + 8] & 0x80),\\n          sapType: (data[i + 8] & 0x70) >>> 4,\\n          sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\\n        });\\n      }\\n\\n      return result;\\n    },\\n    smhd: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        balance: data[4] + (data[5] / 256)\\n      };\\n    },\\n    stbl: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    stco: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          chunkOffsets: []\\n        },\\n        entryCount = view.getUint32(4),\\n        i;\\n      for (i = 8; entryCount; i += 4, entryCount--) {\\n        result.chunkOffsets.push(view.getUint32(i));\\n      }\\n      return result;\\n    },\\n    stsc: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        entryCount = view.getUint32(4),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          sampleToChunks: []\\n        },\\n        i;\\n      for (i = 8; entryCount; i += 12, entryCount--) {\\n        result.sampleToChunks.push({\\n          firstChunk: view.getUint32(i),\\n          samplesPerChunk: view.getUint32(i + 4),\\n          sampleDescriptionIndex: view.getUint32(i + 8)\\n        });\\n      }\\n      return result;\\n    },\\n    stsd: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        sampleDescriptions: inspectMp4(data.subarray(8))\\n      };\\n    },\\n    stsz: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          sampleSize: view.getUint32(4),\\n          entries: []\\n        },\\n        i;\\n      for (i = 12; i < data.byteLength; i += 4) {\\n        result.entries.push(view.getUint32(i));\\n      }\\n      return result;\\n    },\\n    stts: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          timeToSamples: []\\n        },\\n        entryCount = view.getUint32(4),\\n        i;\\n\\n      for (i = 8; entryCount; i += 8, entryCount--) {\\n        result.timeToSamples.push({\\n          sampleCount: view.getUint32(i),\\n          sampleDelta: view.getUint32(i + 4)\\n        });\\n      }\\n      return result;\\n    },\\n    styp: function(data) {\\n      return parse.ftyp(data);\\n    },\\n    tfdt: function(data) {\\n      var result = {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        baseMediaDecodeTime: toUnsigned(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7])\\n      };\\n      if (result.version === 1) {\\n        result.baseMediaDecodeTime *= Math.pow(2, 32);\\n        result.baseMediaDecodeTime += toUnsigned(data[8] << 24 | data[9] << 16 | data[10] << 8 | data[11]);\\n      }\\n      return result;\\n    },\\n    tfhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          trackId: view.getUint32(4)\\n        },\\n        baseDataOffsetPresent = result.flags[2] & 0x01,\\n        sampleDescriptionIndexPresent = result.flags[2] & 0x02,\\n        defaultSampleDurationPresent = result.flags[2] & 0x08,\\n        defaultSampleSizePresent = result.flags[2] & 0x10,\\n        defaultSampleFlagsPresent = result.flags[2] & 0x20,\\n        durationIsEmpty = result.flags[0] & 0x010000,\\n        defaultBaseIsMoof =  result.flags[0] & 0x020000,\\n        i;\\n\\n      i = 8;\\n      if (baseDataOffsetPresent) {\\n        i += 4; // truncate top 4 bytes\\n        // FIXME: should we read the full 64 bits?\\n        result.baseDataOffset = view.getUint32(12);\\n        i += 4;\\n      }\\n      if (sampleDescriptionIndexPresent) {\\n        result.sampleDescriptionIndex = view.getUint32(i);\\n        i += 4;\\n      }\\n      if (defaultSampleDurationPresent) {\\n        result.defaultSampleDuration = view.getUint32(i);\\n        i += 4;\\n      }\\n      if (defaultSampleSizePresent) {\\n        result.defaultSampleSize = view.getUint32(i);\\n        i += 4;\\n      }\\n      if (defaultSampleFlagsPresent) {\\n        result.defaultSampleFlags = view.getUint32(i);\\n      }\\n      if (durationIsEmpty) {\\n        result.durationIsEmpty = true;\\n      }\\n      if (!baseDataOffsetPresent && defaultBaseIsMoof) {\\n        result.baseDataOffsetIsMoof = true;\\n      }\\n      return result;\\n    },\\n    tkhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        i = 4,\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4))\\n        };\\n      if (result.version === 1) {\\n        i += 4;\\n        result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 8;\\n        result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 4;\\n        result.trackId = view.getUint32(i);\\n        i += 4;\\n        i += 8;\\n        result.duration = view.getUint32(i); // truncating top 4 bytes\\n      } else {\\n        result.creationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.modificationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.trackId = view.getUint32(i);\\n        i += 4;\\n        i += 4;\\n        result.duration = view.getUint32(i);\\n      }\\n      i += 4;\\n      i += 2 * 4;\\n      result.layer = view.getUint16(i);\\n      i += 2;\\n      result.alternateGroup = view.getUint16(i);\\n      i += 2;\\n      // convert fixed-point, base 16 back to a number\\n      result.volume = view.getUint8(i) + (view.getUint8(i + 1) / 8);\\n      i += 2;\\n      i += 2;\\n      result.matrix = new Uint32Array(data.subarray(i, i + (9 * 4)));\\n      i += 9 * 4;\\n      result.width = view.getUint16(i) + (view.getUint16(i + 2) / 16);\\n      i += 4;\\n      result.height = view.getUint16(i) + (view.getUint16(i + 2) / 16);\\n      return result;\\n    },\\n    traf: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    trak: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    trex: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        trackId: view.getUint32(4),\\n        defaultSampleDescriptionIndex: view.getUint32(8),\\n        defaultSampleDuration: view.getUint32(12),\\n        defaultSampleSize: view.getUint32(16),\\n        sampleDependsOn: data[20] & 0x03,\\n        sampleIsDependedOn: (data[21] & 0xc0) >> 6,\\n        sampleHasRedundancy: (data[21] & 0x30) >> 4,\\n        samplePaddingValue: (data[21] & 0x0e) >> 1,\\n        sampleIsDifferenceSample: !!(data[21] & 0x01),\\n        sampleDegradationPriority: view.getUint16(22)\\n      };\\n    },\\n    trun: function(data) {\\n      var\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          samples: []\\n        },\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        // Flag interpretation\\n        dataOffsetPresent = result.flags[2] & 0x01, // compare with 2nd byte of 0x1\\n        firstSampleFlagsPresent = result.flags[2] & 0x04, // compare with 2nd byte of 0x4\\n        sampleDurationPresent = result.flags[1] & 0x01, // compare with 2nd byte of 0x100\\n        sampleSizePresent = result.flags[1] & 0x02, // compare with 2nd byte of 0x200\\n        sampleFlagsPresent = result.flags[1] & 0x04, // compare with 2nd byte of 0x400\\n        sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08, // compare with 2nd byte of 0x800\\n        sampleCount = view.getUint32(4),\\n        offset = 8,\\n        sample;\\n\\n      if (dataOffsetPresent) {\\n        // 32 bit signed integer\\n        result.dataOffset = view.getInt32(offset);\\n        offset += 4;\\n      }\\n\\n      // Overrides the flags for the first sample only. The order of\\n      // optional values will be: duration, size, compositionTimeOffset\\n      if (firstSampleFlagsPresent && sampleCount) {\\n        sample = {\\n          flags: parseSampleFlags(data.subarray(offset, offset + 4))\\n        };\\n        offset += 4;\\n        if (sampleDurationPresent) {\\n          sample.duration = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleSizePresent) {\\n          sample.size = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleCompositionTimeOffsetPresent) {\\n          // Note: this should be a signed int if version is 1\\n          sample.compositionTimeOffset = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        result.samples.push(sample);\\n        sampleCount--;\\n      }\\n\\n      while (sampleCount--) {\\n        sample = {};\\n        if (sampleDurationPresent) {\\n          sample.duration = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleSizePresent) {\\n          sample.size = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleFlagsPresent) {\\n          sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\\n          offset += 4;\\n        }\\n        if (sampleCompositionTimeOffsetPresent) {\\n          // Note: this should be a signed int if version is 1\\n          sample.compositionTimeOffset = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        result.samples.push(sample);\\n      }\\n      return result;\\n    },\\n    'url ': function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4))\\n      };\\n    },\\n    vmhd: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        graphicsmode: view.getUint16(4),\\n        opcolor: new Uint16Array([view.getUint16(6),\\n                                  view.getUint16(8),\\n                                  view.getUint16(10)])\\n      };\\n    }\\n  };\\n\\n\\n/**\\n * Return a javascript array of box objects parsed from an ISO base\\n * media file.\\n * @param data {Uint8Array} the binary data of the media to be inspected\\n * @return {array} a javascript array of potentially nested box objects\\n */\\ninspectMp4 = function(data) {\\n  var\\n    i = 0,\\n    result = [],\\n    view,\\n    size,\\n    type,\\n    end,\\n    box;\\n\\n  // Convert data from Uint8Array to ArrayBuffer, to follow Dataview API\\n  var ab = new ArrayBuffer(data.length);\\n  var v = new Uint8Array(ab);\\n  for (var z = 0; z < data.length; ++z) {\\n      v[z] = data[z];\\n  }\\n  view = new DataView(ab);\\n\\n  while (i < data.byteLength) {\\n    // parse box data\\n    size = view.getUint32(i);\\n    type =  parseType(data.subarray(i + 4, i + 8));\\n    end = size > 1 ? i + size : data.byteLength;\\n\\n    // parse type-specific data\\n    box = (parse[type] || function(data) {\\n      return {\\n        data: data\\n      };\\n    })(data.subarray(i + 8, end));\\n    box.size = size;\\n    box.type = type;\\n\\n    // store this box and move to the next\\n    result.push(box);\\n    i = end;\\n  }\\n  return result;\\n};\\n\\n/**\\n * Returns a textual representation of the javascript represtentation\\n * of an MP4 file. You can use it as an alternative to\\n * JSON.stringify() to compare inspected MP4s.\\n * @param inspectedMp4 {array} the parsed array of boxes in an MP4\\n * file\\n * @param depth {number} (optional) the number of ancestor boxes of\\n * the elements of inspectedMp4. Assumed to be zero if unspecified.\\n * @return {string} a text representation of the parsed MP4\\n */\\ntextifyMp4 = function(inspectedMp4, depth) {\\n  var indent;\\n  depth = depth || 0;\\n  indent = new Array(depth * 2 + 1).join(' ');\\n\\n  // iterate over all the boxes\\n  return inspectedMp4.map(function(box, index) {\\n\\n    // list the box type first at the current indentation level\\n    return indent + box.type + '\\\\n' +\\n\\n      // the type is already included and handle child boxes separately\\n      Object.keys(box).filter(function(key) {\\n        return key !== 'type' && key !== 'boxes';\\n\\n      // output all the box properties\\n      }).map(function(key) {\\n        var prefix = indent + '  ' + key + ': ',\\n            value = box[key];\\n\\n        // print out raw bytes as hexademical\\n        if (value instanceof Uint8Array || value instanceof Uint32Array) {\\n          var bytes = Array.prototype.slice.call(new Uint8Array(value.buffer, value.byteOffset, value.byteLength))\\n              .map(function(byte) {\\n                return ' ' + ('00' + byte.toString(16)).slice(-2);\\n              }).join('').match(/.{1,24}/g);\\n          if (!bytes) {\\n            return prefix + '<>';\\n          }\\n          if (bytes.length === 1) {\\n            return prefix + '<' + bytes.join('').slice(1) + '>';\\n          }\\n          return prefix + '<\\\\n' + bytes.map(function(line) {\\n            return indent + '  ' + line;\\n          }).join('\\\\n') + '\\\\n' + indent + '  >';\\n        }\\n\\n        // stringify generic objects\\n        return prefix +\\n            JSON.stringify(value, null, 2)\\n              .split('\\\\n').map(function(line, index) {\\n                if (index === 0) {\\n                  return line;\\n                }\\n                return indent + '  ' + line;\\n              }).join('\\\\n');\\n      }).join('\\\\n') +\\n\\n    // recursively textify the child boxes\\n    (box.boxes ? '\\\\n' + textifyMp4(box.boxes, depth + 1) : '');\\n  }).join('\\\\n');\\n};\\n\\nmodule.exports = {\\n  inspect: inspectMp4,\\n  textify: textifyMp4,\\n  parseType: parseType,\\n  findBox: findBox,\\n  parseTraf: parse.traf,\\n  parseTfdt: parse.tfdt,\\n  parseHdlr: parse.hdlr,\\n  parseTfhd: parse.tfhd,\\n  parseTrun: parse.trun,\\n  parseSidx: parse.sidx\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/tools/mp4-inspector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/tools/ts-inspector.js\":\n/*!********************************************************!*\\\n  !*** ../node_modules/mux.js/lib/tools/ts-inspector.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Parse mpeg2 transport stream packets to extract basic timing information\\n */\\n\\n\\nvar StreamTypes = __webpack_require__(/*! ../m2ts/stream-types.js */ \\\"../node_modules/mux.js/lib/m2ts/stream-types.js\\\");\\nvar handleRollover = __webpack_require__(/*! ../m2ts/timestamp-rollover-stream.js */ \\\"../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js\\\").handleRollover;\\nvar probe = {};\\nprobe.ts = __webpack_require__(/*! ../m2ts/probe.js */ \\\"../node_modules/mux.js/lib/m2ts/probe.js\\\");\\nprobe.aac = __webpack_require__(/*! ../aac/utils.js */ \\\"../node_modules/mux.js/lib/aac/utils.js\\\");\\nvar ONE_SECOND_IN_TS = __webpack_require__(/*! ../utils/clock */ \\\"../node_modules/mux.js/lib/utils/clock.js\\\").ONE_SECOND_IN_TS;\\n\\nvar\\n  MP2T_PACKET_LENGTH = 188, // bytes\\n  SYNC_BYTE = 0x47;\\n\\n/**\\n * walks through segment data looking for pat and pmt packets to parse out\\n * program map table information\\n */\\nvar parsePsi_ = function(bytes, pmt) {\\n  var\\n    startIndex = 0,\\n    endIndex = MP2T_PACKET_LENGTH,\\n    packet, type;\\n\\n  while (endIndex < bytes.byteLength) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pat':\\n          if (!pmt.pid) {\\n            pmt.pid = probe.ts.parsePat(packet);\\n          }\\n          break;\\n        case 'pmt':\\n          if (!pmt.table) {\\n            pmt.table = probe.ts.parsePmt(packet);\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      // Found the pat and pmt, we can stop walking the segment\\n      if (pmt.pid && pmt.table) {\\n        return;\\n      }\\n\\n      startIndex += MP2T_PACKET_LENGTH;\\n      endIndex += MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex++;\\n    endIndex++;\\n  }\\n};\\n\\n/**\\n * walks through the segment data from the start and end to get timing information\\n * for the first and last audio pes packets\\n */\\nvar parseAudioPes_ = function(bytes, pmt, result) {\\n  var\\n    startIndex = 0,\\n    endIndex = MP2T_PACKET_LENGTH,\\n    packet, type, pesType, pusi, parsed;\\n\\n  var endLoop = false;\\n\\n  // Start walking from start of segment to get first audio packet\\n  while (endIndex <= bytes.byteLength) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE &&\\n        (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'audio' && pusi) {\\n            parsed = probe.ts.parsePesTime(packet);\\n            if (parsed) {\\n              parsed.type = 'audio';\\n              result.audio.push(parsed);\\n              endLoop = true;\\n            }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop) {\\n        break;\\n      }\\n\\n      startIndex += MP2T_PACKET_LENGTH;\\n      endIndex += MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex++;\\n    endIndex++;\\n  }\\n\\n  // Start walking from end of segment to get last audio packet\\n  endIndex = bytes.byteLength;\\n  startIndex = endIndex - MP2T_PACKET_LENGTH;\\n  endLoop = false;\\n  while (startIndex >= 0) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE &&\\n        (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'audio' && pusi) {\\n            parsed = probe.ts.parsePesTime(packet);\\n            if (parsed) {\\n              parsed.type = 'audio';\\n              result.audio.push(parsed);\\n              endLoop = true;\\n            }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop) {\\n        break;\\n      }\\n\\n      startIndex -= MP2T_PACKET_LENGTH;\\n      endIndex -= MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex--;\\n    endIndex--;\\n  }\\n};\\n\\n/**\\n * walks through the segment data from the start and end to get timing information\\n * for the first and last video pes packets as well as timing information for the first\\n * key frame.\\n */\\nvar parseVideoPes_ = function(bytes, pmt, result) {\\n  var\\n    startIndex = 0,\\n    endIndex = MP2T_PACKET_LENGTH,\\n    packet, type, pesType, pusi, parsed, frame, i, pes;\\n\\n  var endLoop = false;\\n\\n  var currentFrame = {\\n    data: [],\\n    size: 0\\n  };\\n\\n  // Start walking from start of segment to get first video packet\\n  while (endIndex < bytes.byteLength) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'video') {\\n            if (pusi && !endLoop) {\\n              parsed = probe.ts.parsePesTime(packet);\\n              if (parsed) {\\n                parsed.type = 'video';\\n                result.video.push(parsed);\\n                endLoop = true;\\n              }\\n            }\\n            if (!result.firstKeyFrame) {\\n              if (pusi) {\\n                if (currentFrame.size !== 0) {\\n                  frame = new Uint8Array(currentFrame.size);\\n                  i = 0;\\n                  while (currentFrame.data.length) {\\n                    pes = currentFrame.data.shift();\\n                    frame.set(pes, i);\\n                    i += pes.byteLength;\\n                  }\\n                  if (probe.ts.videoPacketContainsKeyFrame(frame)) {\\n                    var firstKeyFrame = probe.ts.parsePesTime(frame);\\n\\n                    // PTS/DTS may not be available. Simply *not* setting\\n                    // the keyframe seems to work fine with HLS playback\\n                    // and definitely preferable to a crash with TypeError...\\n                    if (firstKeyFrame) {\\n                      result.firstKeyFrame = firstKeyFrame;\\n                      result.firstKeyFrame.type = 'video';\\n                    } else {\\n                      // eslint-disable-next-line\\n                      console.warn(\\n                        'Failed to extract PTS/DTS from PES at first keyframe. ' +\\n                        'This could be an unusual TS segment, or else mux.js did not ' +\\n                        'parse your TS segment correctly. If you know your TS ' +\\n                        'segments do contain PTS/DTS on keyframes please file a bug ' +\\n                        'report! You can try ffprobe to double check for yourself.'\\n                      );\\n                    }\\n                  }\\n                  currentFrame.size = 0;\\n                }\\n              }\\n              currentFrame.data.push(packet);\\n              currentFrame.size += packet.byteLength;\\n            }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop && result.firstKeyFrame) {\\n        break;\\n      }\\n\\n      startIndex += MP2T_PACKET_LENGTH;\\n      endIndex += MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex++;\\n    endIndex++;\\n  }\\n\\n  // Start walking from end of segment to get last video packet\\n  endIndex = bytes.byteLength;\\n  startIndex = endIndex - MP2T_PACKET_LENGTH;\\n  endLoop = false;\\n  while (startIndex >= 0) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'video' && pusi) {\\n              parsed = probe.ts.parsePesTime(packet);\\n              if (parsed) {\\n                parsed.type = 'video';\\n                result.video.push(parsed);\\n                endLoop = true;\\n              }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop) {\\n        break;\\n      }\\n\\n      startIndex -= MP2T_PACKET_LENGTH;\\n      endIndex -= MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex--;\\n    endIndex--;\\n  }\\n};\\n\\n/**\\n * Adjusts the timestamp information for the segment to account for\\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\\n */\\nvar adjustTimestamp_ = function(segmentInfo, baseTimestamp) {\\n  if (segmentInfo.audio && segmentInfo.audio.length) {\\n    var audioBaseTimestamp = baseTimestamp;\\n    if (typeof audioBaseTimestamp === 'undefined') {\\n      audioBaseTimestamp = segmentInfo.audio[0].dts;\\n    }\\n    segmentInfo.audio.forEach(function(info) {\\n      info.dts = handleRollover(info.dts, audioBaseTimestamp);\\n      info.pts = handleRollover(info.pts, audioBaseTimestamp);\\n      // time in seconds\\n      info.dtsTime = info.dts / ONE_SECOND_IN_TS;\\n      info.ptsTime = info.pts / ONE_SECOND_IN_TS;\\n    });\\n  }\\n\\n  if (segmentInfo.video && segmentInfo.video.length) {\\n    var videoBaseTimestamp = baseTimestamp;\\n    if (typeof videoBaseTimestamp === 'undefined') {\\n      videoBaseTimestamp = segmentInfo.video[0].dts;\\n    }\\n    segmentInfo.video.forEach(function(info) {\\n      info.dts = handleRollover(info.dts, videoBaseTimestamp);\\n      info.pts = handleRollover(info.pts, videoBaseTimestamp);\\n      // time in seconds\\n      info.dtsTime = info.dts / ONE_SECOND_IN_TS;\\n      info.ptsTime = info.pts / ONE_SECOND_IN_TS;\\n    });\\n    if (segmentInfo.firstKeyFrame) {\\n      var frame = segmentInfo.firstKeyFrame;\\n      frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\\n      frame.pts = handleRollover(frame.pts, videoBaseTimestamp);\\n      // time in seconds\\n      frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\\n      frame.ptsTime = frame.dts / ONE_SECOND_IN_TS;\\n    }\\n  }\\n};\\n\\n/**\\n * inspects the aac data stream for start and end time information\\n */\\nvar inspectAac_ = function(bytes) {\\n  var\\n    endLoop = false,\\n    audioCount = 0,\\n    sampleRate = null,\\n    timestamp = null,\\n    frameSize = 0,\\n    byteIndex = 0,\\n    packet;\\n\\n  while (bytes.length - byteIndex >= 3) {\\n    var type = probe.aac.parseType(bytes, byteIndex);\\n    switch (type) {\\n      case 'timed-metadata':\\n        // Exit early because we don't have enough to parse\\n        // the ID3 tag header\\n        if (bytes.length - byteIndex < 10) {\\n          endLoop = true;\\n          break;\\n        }\\n\\n        frameSize = probe.aac.parseId3TagSize(bytes, byteIndex);\\n\\n        // Exit early if we don't have enough in the buffer\\n        // to emit a full packet\\n        if (frameSize > bytes.length) {\\n          endLoop = true;\\n          break;\\n        }\\n        if (timestamp === null) {\\n          packet = bytes.subarray(byteIndex, byteIndex + frameSize);\\n          timestamp = probe.aac.parseAacTimestamp(packet);\\n        }\\n        byteIndex += frameSize;\\n        break;\\n      case 'audio':\\n        // Exit early because we don't have enough to parse\\n        // the ADTS frame header\\n        if (bytes.length - byteIndex < 7) {\\n          endLoop = true;\\n          break;\\n        }\\n\\n        frameSize = probe.aac.parseAdtsSize(bytes, byteIndex);\\n\\n        // Exit early if we don't have enough in the buffer\\n        // to emit a full packet\\n        if (frameSize > bytes.length) {\\n          endLoop = true;\\n          break;\\n        }\\n        if (sampleRate === null) {\\n          packet = bytes.subarray(byteIndex, byteIndex + frameSize);\\n          sampleRate = probe.aac.parseSampleRate(packet);\\n        }\\n        audioCount++;\\n        byteIndex += frameSize;\\n        break;\\n      default:\\n        byteIndex++;\\n        break;\\n    }\\n    if (endLoop) {\\n      return null;\\n    }\\n  }\\n  if (sampleRate === null || timestamp === null) {\\n    return null;\\n  }\\n\\n  var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\\n\\n  var result = {\\n    audio: [\\n      {\\n        type: 'audio',\\n        dts: timestamp,\\n        pts: timestamp\\n      },\\n      {\\n        type: 'audio',\\n        dts: timestamp + (audioCount * 1024 * audioTimescale),\\n        pts: timestamp + (audioCount * 1024 * audioTimescale)\\n      }\\n    ]\\n  };\\n\\n  return result;\\n};\\n\\n/**\\n * inspects the transport stream segment data for start and end time information\\n * of the audio and video tracks (when present) as well as the first key frame's\\n * start time.\\n */\\nvar inspectTs_ = function(bytes) {\\n  var pmt = {\\n    pid: null,\\n    table: null\\n  };\\n\\n  var result = {};\\n\\n  parsePsi_(bytes, pmt);\\n\\n  for (var pid in pmt.table) {\\n    if (pmt.table.hasOwnProperty(pid)) {\\n      var type = pmt.table[pid];\\n      switch (type) {\\n        case StreamTypes.H264_STREAM_TYPE:\\n          result.video = [];\\n          parseVideoPes_(bytes, pmt, result);\\n          if (result.video.length === 0) {\\n            delete result.video;\\n          }\\n          break;\\n        case StreamTypes.ADTS_STREAM_TYPE:\\n          result.audio = [];\\n          parseAudioPes_(bytes, pmt, result);\\n          if (result.audio.length === 0) {\\n            delete result.audio;\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n    }\\n  }\\n  return result;\\n};\\n\\n/**\\n * Inspects segment byte data and returns an object with start and end timing information\\n *\\n * @param {Uint8Array} bytes The segment byte data\\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\\n *  timestamps for rollover. This value must be in 90khz clock.\\n * @return {Object} Object containing start and end frame timing info of segment.\\n */\\nvar inspect = function(bytes, baseTimestamp) {\\n  var isAacData = probe.aac.isLikelyAacData(bytes);\\n\\n  var result;\\n\\n  if (isAacData) {\\n    result = inspectAac_(bytes);\\n  } else {\\n    result = inspectTs_(bytes);\\n  }\\n\\n  if (!result || (!result.audio && !result.video)) {\\n    return null;\\n  }\\n\\n  adjustTimestamp_(result, baseTimestamp);\\n\\n  return result;\\n};\\n\\nmodule.exports = {\\n  inspect: inspect,\\n  parseAudioPes_: parseAudioPes_\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/tools/ts-inspector.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/utils/bin.js\":\n/*!***********************************************!*\\\n  !*** ../node_modules/mux.js/lib/utils/bin.js ***!\n  \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n */\\nvar toUnsigned = function(value) {\\n  return value >>> 0;\\n};\\n\\nvar toHexString = function(value) {\\n  return ('00' + value.toString(16)).slice(-2);\\n};\\n\\nmodule.exports = {\\n  toUnsigned: toUnsigned,\\n  toHexString: toHexString\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/utils/bin.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/utils/clock.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/mux.js/lib/utils/clock.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n */\\nvar\\n  ONE_SECOND_IN_TS = 90000, // 90kHz clock\\n  secondsToVideoTs,\\n  secondsToAudioTs,\\n  videoTsToSeconds,\\n  audioTsToSeconds,\\n  audioTsToVideoTs,\\n  videoTsToAudioTs,\\n  metadataTsToSeconds;\\n\\nsecondsToVideoTs = function(seconds) {\\n  return seconds * ONE_SECOND_IN_TS;\\n};\\n\\nsecondsToAudioTs = function(seconds, sampleRate) {\\n  return seconds * sampleRate;\\n};\\n\\nvideoTsToSeconds = function(timestamp) {\\n  return timestamp / ONE_SECOND_IN_TS;\\n};\\n\\naudioTsToSeconds = function(timestamp, sampleRate) {\\n  return timestamp / sampleRate;\\n};\\n\\naudioTsToVideoTs = function(timestamp, sampleRate) {\\n  return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\\n};\\n\\nvideoTsToAudioTs = function(timestamp, sampleRate) {\\n  return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\\n};\\n\\n/**\\n * Adjust ID3 tag or caption timing information by the timeline pts values\\n * (if keepOriginalTimestamps is false) and convert to seconds\\n */\\nmetadataTsToSeconds = function(timestamp, timelineStartPts, keepOriginalTimestamps) {\\n  return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\\n};\\n\\nmodule.exports = {\\n  ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\\n  secondsToVideoTs: secondsToVideoTs,\\n  secondsToAudioTs: secondsToAudioTs,\\n  videoTsToSeconds: videoTsToSeconds,\\n  audioTsToSeconds: audioTsToSeconds,\\n  audioTsToVideoTs: audioTsToVideoTs,\\n  videoTsToAudioTs: videoTsToAudioTs,\\n  metadataTsToSeconds: metadataTsToSeconds\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/utils/clock.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/mux.js/lib/utils/stream.js\":\n/*!**************************************************!*\\\n  !*** ../node_modules/mux.js/lib/utils/stream.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * A lightweight readable stream implemention that handles event dispatching.\\n * Objects that inherit from streams should call init in their constructors.\\n */\\n\\n\\nvar Stream = function() {\\n  this.init = function() {\\n    var listeners = {};\\n    /**\\n     * Add a listener for a specified event type.\\n     * @param type {string} the event name\\n     * @param listener {function} the callback to be invoked when an event of\\n     * the specified type occurs\\n     */\\n    this.on = function(type, listener) {\\n      if (!listeners[type]) {\\n        listeners[type] = [];\\n      }\\n      listeners[type] = listeners[type].concat(listener);\\n    };\\n    /**\\n     * Remove a listener for a specified event type.\\n     * @param type {string} the event name\\n     * @param listener {function} a function previously registered for this\\n     * type of event through `on`\\n     */\\n    this.off = function(type, listener) {\\n      var index;\\n      if (!listeners[type]) {\\n        return false;\\n      }\\n      index = listeners[type].indexOf(listener);\\n      listeners[type] = listeners[type].slice();\\n      listeners[type].splice(index, 1);\\n      return index > -1;\\n    };\\n    /**\\n     * Trigger an event of the specified type on this stream. Any additional\\n     * arguments to this function are passed as parameters to event listeners.\\n     * @param type {string} the event name\\n     */\\n    this.trigger = function(type) {\\n      var callbacks, i, length, args;\\n      callbacks = listeners[type];\\n      if (!callbacks) {\\n        return;\\n      }\\n      // Slicing the arguments on every invocation of this method\\n      // can add a significant amount of overhead. Avoid the\\n      // intermediate object creation for the common case of a\\n      // single callback argument\\n      if (arguments.length === 2) {\\n        length = callbacks.length;\\n        for (i = 0; i < length; ++i) {\\n          callbacks[i].call(this, arguments[1]);\\n        }\\n      } else {\\n        args = [];\\n        i = arguments.length;\\n        for (i = 1; i < arguments.length; ++i) {\\n          args.push(arguments[i]);\\n        }\\n        length = callbacks.length;\\n        for (i = 0; i < length; ++i) {\\n          callbacks[i].apply(this, args);\\n        }\\n      }\\n    };\\n    /**\\n     * Destroys the stream and cleans up.\\n     */\\n    this.dispose = function() {\\n      listeners = {};\\n    };\\n  };\\n};\\n\\n/**\\n * Forwards all `data` events on this stream to the destination stream. The\\n * destination stream should provide a method `push` to receive the data\\n * events as they arrive.\\n * @param destination {stream} the stream that will receive all `data` events\\n * @param autoFlush {boolean} if false, we will not call `flush` on the destination\\n *                            when the current stream emits a 'done' event\\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n */\\nStream.prototype.pipe = function(destination) {\\n  this.on('data', function(data) {\\n    destination.push(data);\\n  });\\n\\n  this.on('done', function(flushSource) {\\n    destination.flush(flushSource);\\n  });\\n\\n  this.on('partialdone', function(flushSource) {\\n    destination.partialFlush(flushSource);\\n  });\\n\\n  this.on('endedtimeline', function(flushSource) {\\n    destination.endTimeline(flushSource);\\n  });\\n\\n  this.on('reset', function(flushSource) {\\n    destination.reset(flushSource);\\n  });\\n\\n  return destination;\\n};\\n\\n// Default stream functions that are expected to be overridden to perform\\n// actual work. These are provided by the prototype as a sort of no-op\\n// implementation so that we don't have to check for their existence in the\\n// `pipe` function above.\\nStream.prototype.push = function(data) {\\n  this.trigger('data', data);\\n};\\n\\nStream.prototype.flush = function(flushSource) {\\n  this.trigger('done', flushSource);\\n};\\n\\nStream.prototype.partialFlush = function(flushSource) {\\n  this.trigger('partialdone', flushSource);\\n};\\n\\nStream.prototype.endTimeline = function(flushSource) {\\n  this.trigger('endedtimeline', flushSource);\\n};\\n\\nStream.prototype.reset = function(flushSource) {\\n  this.trigger('reset', flushSource);\\n};\\n\\nmodule.exports = Stream;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/utils/stream.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/node-libs-browser/node_modules/buffer/index.js\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/node-libs-browser/node_modules/buffer/index.js ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(global) {/*!\\n * The buffer module from node.js, for the browser.\\n *\\n * @author   Feross Aboukhadijeh <http://feross.org>\\n * @license  MIT\\n */\\n/* eslint-disable no-proto */\\n\\n\\n\\nvar base64 = __webpack_require__(/*! base64-js */ \\\"../node_modules/base64-js/index.js\\\")\\nvar ieee754 = __webpack_require__(/*! ieee754 */ \\\"../node_modules/ieee754/index.js\\\")\\nvar isArray = __webpack_require__(/*! isarray */ \\\"../node_modules/isarray/index.js\\\")\\n\\nexports.Buffer = Buffer\\nexports.SlowBuffer = SlowBuffer\\nexports.INSPECT_MAX_BYTES = 50\\n\\n/**\\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\\n *   === true    Use Uint8Array implementation (fastest)\\n *   === false   Use Object implementation (most compatible, even IE6)\\n *\\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\\n * Opera 11.6+, iOS 4.2+.\\n *\\n * Due to various browser bugs, sometimes the Object implementation will be used even\\n * when the browser supports typed arrays.\\n *\\n * Note:\\n *\\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\\n *\\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\\n *\\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\\n *     incorrect length in some situations.\\n\\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\\n * get the Object implementation, which is slower but behaves correctly.\\n */\\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\\n  ? global.TYPED_ARRAY_SUPPORT\\n  : typedArraySupport()\\n\\n/*\\n * Export kMaxLength after typed array support is determined.\\n */\\nexports.kMaxLength = kMaxLength()\\n\\nfunction typedArraySupport () {\\n  try {\\n    var arr = new Uint8Array(1)\\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\\n    return arr.foo() === 42 && // typed array instances can be augmented\\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\\n  } catch (e) {\\n    return false\\n  }\\n}\\n\\nfunction kMaxLength () {\\n  return Buffer.TYPED_ARRAY_SUPPORT\\n    ? 0x7fffffff\\n    : 0x3fffffff\\n}\\n\\nfunction createBuffer (that, length) {\\n  if (kMaxLength() < length) {\\n    throw new RangeError('Invalid typed array length')\\n  }\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    // Return an augmented `Uint8Array` instance, for best performance\\n    that = new Uint8Array(length)\\n    that.__proto__ = Buffer.prototype\\n  } else {\\n    // Fallback: Return an object instance of the Buffer class\\n    if (that === null) {\\n      that = new Buffer(length)\\n    }\\n    that.length = length\\n  }\\n\\n  return that\\n}\\n\\n/**\\n * The Buffer constructor returns instances of `Uint8Array` that have their\\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\\n * returns a single octet.\\n *\\n * The `Uint8Array` prototype remains unmodified.\\n */\\n\\nfunction Buffer (arg, encodingOrOffset, length) {\\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\\n    return new Buffer(arg, encodingOrOffset, length)\\n  }\\n\\n  // Common case.\\n  if (typeof arg === 'number') {\\n    if (typeof encodingOrOffset === 'string') {\\n      throw new Error(\\n        'If encoding is specified then the first argument must be a string'\\n      )\\n    }\\n    return allocUnsafe(this, arg)\\n  }\\n  return from(this, arg, encodingOrOffset, length)\\n}\\n\\nBuffer.poolSize = 8192 // not used by this implementation\\n\\n// TODO: Legacy, not needed anymore. Remove in next major version.\\nBuffer._augment = function (arr) {\\n  arr.__proto__ = Buffer.prototype\\n  return arr\\n}\\n\\nfunction from (that, value, encodingOrOffset, length) {\\n  if (typeof value === 'number') {\\n    throw new TypeError('\\\"value\\\" argument must not be a number')\\n  }\\n\\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\\n  }\\n\\n  if (typeof value === 'string') {\\n    return fromString(that, value, encodingOrOffset)\\n  }\\n\\n  return fromObject(that, value)\\n}\\n\\n/**\\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\\n * if value is a number.\\n * Buffer.from(str[, encoding])\\n * Buffer.from(array)\\n * Buffer.from(buffer)\\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\\n **/\\nBuffer.from = function (value, encodingOrOffset, length) {\\n  return from(null, value, encodingOrOffset, length)\\n}\\n\\nif (Buffer.TYPED_ARRAY_SUPPORT) {\\n  Buffer.prototype.__proto__ = Uint8Array.prototype\\n  Buffer.__proto__ = Uint8Array\\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\\n      Buffer[Symbol.species] === Buffer) {\\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\\n    Object.defineProperty(Buffer, Symbol.species, {\\n      value: null,\\n      configurable: true\\n    })\\n  }\\n}\\n\\nfunction assertSize (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('\\\"size\\\" argument must be a number')\\n  } else if (size < 0) {\\n    throw new RangeError('\\\"size\\\" argument must not be negative')\\n  }\\n}\\n\\nfunction alloc (that, size, fill, encoding) {\\n  assertSize(size)\\n  if (size <= 0) {\\n    return createBuffer(that, size)\\n  }\\n  if (fill !== undefined) {\\n    // Only pay attention to encoding if it's a string. This\\n    // prevents accidentally sending in a number that would\\n    // be interpretted as a start offset.\\n    return typeof encoding === 'string'\\n      ? createBuffer(that, size).fill(fill, encoding)\\n      : createBuffer(that, size).fill(fill)\\n  }\\n  return createBuffer(that, size)\\n}\\n\\n/**\\n * Creates a new filled Buffer instance.\\n * alloc(size[, fill[, encoding]])\\n **/\\nBuffer.alloc = function (size, fill, encoding) {\\n  return alloc(null, size, fill, encoding)\\n}\\n\\nfunction allocUnsafe (that, size) {\\n  assertSize(size)\\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\\n    for (var i = 0; i < size; ++i) {\\n      that[i] = 0\\n    }\\n  }\\n  return that\\n}\\n\\n/**\\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\\n * */\\nBuffer.allocUnsafe = function (size) {\\n  return allocUnsafe(null, size)\\n}\\n/**\\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\\n */\\nBuffer.allocUnsafeSlow = function (size) {\\n  return allocUnsafe(null, size)\\n}\\n\\nfunction fromString (that, string, encoding) {\\n  if (typeof encoding !== 'string' || encoding === '') {\\n    encoding = 'utf8'\\n  }\\n\\n  if (!Buffer.isEncoding(encoding)) {\\n    throw new TypeError('\\\"encoding\\\" must be a valid string encoding')\\n  }\\n\\n  var length = byteLength(string, encoding) | 0\\n  that = createBuffer(that, length)\\n\\n  var actual = that.write(string, encoding)\\n\\n  if (actual !== length) {\\n    // Writing a hex string, for example, that contains invalid characters will\\n    // cause everything after the first invalid character to be ignored. (e.g.\\n    // 'abxxcd' will be treated as 'ab')\\n    that = that.slice(0, actual)\\n  }\\n\\n  return that\\n}\\n\\nfunction fromArrayLike (that, array) {\\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\\n  that = createBuffer(that, length)\\n  for (var i = 0; i < length; i += 1) {\\n    that[i] = array[i] & 255\\n  }\\n  return that\\n}\\n\\nfunction fromArrayBuffer (that, array, byteOffset, length) {\\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\\n\\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\\n    throw new RangeError('\\\\'offset\\\\' is out of bounds')\\n  }\\n\\n  if (array.byteLength < byteOffset + (length || 0)) {\\n    throw new RangeError('\\\\'length\\\\' is out of bounds')\\n  }\\n\\n  if (byteOffset === undefined && length === undefined) {\\n    array = new Uint8Array(array)\\n  } else if (length === undefined) {\\n    array = new Uint8Array(array, byteOffset)\\n  } else {\\n    array = new Uint8Array(array, byteOffset, length)\\n  }\\n\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    // Return an augmented `Uint8Array` instance, for best performance\\n    that = array\\n    that.__proto__ = Buffer.prototype\\n  } else {\\n    // Fallback: Return an object instance of the Buffer class\\n    that = fromArrayLike(that, array)\\n  }\\n  return that\\n}\\n\\nfunction fromObject (that, obj) {\\n  if (Buffer.isBuffer(obj)) {\\n    var len = checked(obj.length) | 0\\n    that = createBuffer(that, len)\\n\\n    if (that.length === 0) {\\n      return that\\n    }\\n\\n    obj.copy(that, 0, 0, len)\\n    return that\\n  }\\n\\n  if (obj) {\\n    if ((typeof ArrayBuffer !== 'undefined' &&\\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\\n        return createBuffer(that, 0)\\n      }\\n      return fromArrayLike(that, obj)\\n    }\\n\\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\\n      return fromArrayLike(that, obj.data)\\n    }\\n  }\\n\\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\\n}\\n\\nfunction checked (length) {\\n  // Note: cannot use `length < kMaxLength()` here because that fails when\\n  // length is NaN (which is otherwise coerced to zero.)\\n  if (length >= kMaxLength()) {\\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\\n  }\\n  return length | 0\\n}\\n\\nfunction SlowBuffer (length) {\\n  if (+length != length) { // eslint-disable-line eqeqeq\\n    length = 0\\n  }\\n  return Buffer.alloc(+length)\\n}\\n\\nBuffer.isBuffer = function isBuffer (b) {\\n  return !!(b != null && b._isBuffer)\\n}\\n\\nBuffer.compare = function compare (a, b) {\\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\\n    throw new TypeError('Arguments must be Buffers')\\n  }\\n\\n  if (a === b) return 0\\n\\n  var x = a.length\\n  var y = b.length\\n\\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\\n    if (a[i] !== b[i]) {\\n      x = a[i]\\n      y = b[i]\\n      break\\n    }\\n  }\\n\\n  if (x < y) return -1\\n  if (y < x) return 1\\n  return 0\\n}\\n\\nBuffer.isEncoding = function isEncoding (encoding) {\\n  switch (String(encoding).toLowerCase()) {\\n    case 'hex':\\n    case 'utf8':\\n    case 'utf-8':\\n    case 'ascii':\\n    case 'latin1':\\n    case 'binary':\\n    case 'base64':\\n    case 'ucs2':\\n    case 'ucs-2':\\n    case 'utf16le':\\n    case 'utf-16le':\\n      return true\\n    default:\\n      return false\\n  }\\n}\\n\\nBuffer.concat = function concat (list, length) {\\n  if (!isArray(list)) {\\n    throw new TypeError('\\\"list\\\" argument must be an Array of Buffers')\\n  }\\n\\n  if (list.length === 0) {\\n    return Buffer.alloc(0)\\n  }\\n\\n  var i\\n  if (length === undefined) {\\n    length = 0\\n    for (i = 0; i < list.length; ++i) {\\n      length += list[i].length\\n    }\\n  }\\n\\n  var buffer = Buffer.allocUnsafe(length)\\n  var pos = 0\\n  for (i = 0; i < list.length; ++i) {\\n    var buf = list[i]\\n    if (!Buffer.isBuffer(buf)) {\\n      throw new TypeError('\\\"list\\\" argument must be an Array of Buffers')\\n    }\\n    buf.copy(buffer, pos)\\n    pos += buf.length\\n  }\\n  return buffer\\n}\\n\\nfunction byteLength (string, encoding) {\\n  if (Buffer.isBuffer(string)) {\\n    return string.length\\n  }\\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\\n    return string.byteLength\\n  }\\n  if (typeof string !== 'string') {\\n    string = '' + string\\n  }\\n\\n  var len = string.length\\n  if (len === 0) return 0\\n\\n  // Use a for loop to avoid recursion\\n  var loweredCase = false\\n  for (;;) {\\n    switch (encoding) {\\n      case 'ascii':\\n      case 'latin1':\\n      case 'binary':\\n        return len\\n      case 'utf8':\\n      case 'utf-8':\\n      case undefined:\\n        return utf8ToBytes(string).length\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return len * 2\\n      case 'hex':\\n        return len >>> 1\\n      case 'base64':\\n        return base64ToBytes(string).length\\n      default:\\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\\n        encoding = ('' + encoding).toLowerCase()\\n        loweredCase = true\\n    }\\n  }\\n}\\nBuffer.byteLength = byteLength\\n\\nfunction slowToString (encoding, start, end) {\\n  var loweredCase = false\\n\\n  // No need to verify that \\\"this.length <= MAX_UINT32\\\" since it's a read-only\\n  // property of a typed array.\\n\\n  // This behaves neither like String nor Uint8Array in that we set start/end\\n  // to their upper/lower bounds if the value passed is out of range.\\n  // undefined is handled specially as per ECMA-262 6th Edition,\\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\\n  if (start === undefined || start < 0) {\\n    start = 0\\n  }\\n  // Return early if start > this.length. Done here to prevent potential uint32\\n  // coercion fail below.\\n  if (start > this.length) {\\n    return ''\\n  }\\n\\n  if (end === undefined || end > this.length) {\\n    end = this.length\\n  }\\n\\n  if (end <= 0) {\\n    return ''\\n  }\\n\\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\\n  end >>>= 0\\n  start >>>= 0\\n\\n  if (end <= start) {\\n    return ''\\n  }\\n\\n  if (!encoding) encoding = 'utf8'\\n\\n  while (true) {\\n    switch (encoding) {\\n      case 'hex':\\n        return hexSlice(this, start, end)\\n\\n      case 'utf8':\\n      case 'utf-8':\\n        return utf8Slice(this, start, end)\\n\\n      case 'ascii':\\n        return asciiSlice(this, start, end)\\n\\n      case 'latin1':\\n      case 'binary':\\n        return latin1Slice(this, start, end)\\n\\n      case 'base64':\\n        return base64Slice(this, start, end)\\n\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return utf16leSlice(this, start, end)\\n\\n      default:\\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\\n        encoding = (encoding + '').toLowerCase()\\n        loweredCase = true\\n    }\\n  }\\n}\\n\\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\\n// Buffer instances.\\nBuffer.prototype._isBuffer = true\\n\\nfunction swap (b, n, m) {\\n  var i = b[n]\\n  b[n] = b[m]\\n  b[m] = i\\n}\\n\\nBuffer.prototype.swap16 = function swap16 () {\\n  var len = this.length\\n  if (len % 2 !== 0) {\\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\\n  }\\n  for (var i = 0; i < len; i += 2) {\\n    swap(this, i, i + 1)\\n  }\\n  return this\\n}\\n\\nBuffer.prototype.swap32 = function swap32 () {\\n  var len = this.length\\n  if (len % 4 !== 0) {\\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\\n  }\\n  for (var i = 0; i < len; i += 4) {\\n    swap(this, i, i + 3)\\n    swap(this, i + 1, i + 2)\\n  }\\n  return this\\n}\\n\\nBuffer.prototype.swap64 = function swap64 () {\\n  var len = this.length\\n  if (len % 8 !== 0) {\\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\\n  }\\n  for (var i = 0; i < len; i += 8) {\\n    swap(this, i, i + 7)\\n    swap(this, i + 1, i + 6)\\n    swap(this, i + 2, i + 5)\\n    swap(this, i + 3, i + 4)\\n  }\\n  return this\\n}\\n\\nBuffer.prototype.toString = function toString () {\\n  var length = this.length | 0\\n  if (length === 0) return ''\\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\\n  return slowToString.apply(this, arguments)\\n}\\n\\nBuffer.prototype.equals = function equals (b) {\\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\\n  if (this === b) return true\\n  return Buffer.compare(this, b) === 0\\n}\\n\\nBuffer.prototype.inspect = function inspect () {\\n  var str = ''\\n  var max = exports.INSPECT_MAX_BYTES\\n  if (this.length > 0) {\\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\\n    if (this.length > max) str += ' ... '\\n  }\\n  return '<Buffer ' + str + '>'\\n}\\n\\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\\n  if (!Buffer.isBuffer(target)) {\\n    throw new TypeError('Argument must be a Buffer')\\n  }\\n\\n  if (start === undefined) {\\n    start = 0\\n  }\\n  if (end === undefined) {\\n    end = target ? target.length : 0\\n  }\\n  if (thisStart === undefined) {\\n    thisStart = 0\\n  }\\n  if (thisEnd === undefined) {\\n    thisEnd = this.length\\n  }\\n\\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\\n    throw new RangeError('out of range index')\\n  }\\n\\n  if (thisStart >= thisEnd && start >= end) {\\n    return 0\\n  }\\n  if (thisStart >= thisEnd) {\\n    return -1\\n  }\\n  if (start >= end) {\\n    return 1\\n  }\\n\\n  start >>>= 0\\n  end >>>= 0\\n  thisStart >>>= 0\\n  thisEnd >>>= 0\\n\\n  if (this === target) return 0\\n\\n  var x = thisEnd - thisStart\\n  var y = end - start\\n  var len = Math.min(x, y)\\n\\n  var thisCopy = this.slice(thisStart, thisEnd)\\n  var targetCopy = target.slice(start, end)\\n\\n  for (var i = 0; i < len; ++i) {\\n    if (thisCopy[i] !== targetCopy[i]) {\\n      x = thisCopy[i]\\n      y = targetCopy[i]\\n      break\\n    }\\n  }\\n\\n  if (x < y) return -1\\n  if (y < x) return 1\\n  return 0\\n}\\n\\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\\n//\\n// Arguments:\\n// - buffer - a Buffer to search\\n// - val - a string, Buffer, or number\\n// - byteOffset - an index into `buffer`; will be clamped to an int32\\n// - encoding - an optional encoding, relevant is val is a string\\n// - dir - true for indexOf, false for lastIndexOf\\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\\n  // Empty buffer means no match\\n  if (buffer.length === 0) return -1\\n\\n  // Normalize byteOffset\\n  if (typeof byteOffset === 'string') {\\n    encoding = byteOffset\\n    byteOffset = 0\\n  } else if (byteOffset > 0x7fffffff) {\\n    byteOffset = 0x7fffffff\\n  } else if (byteOffset < -0x80000000) {\\n    byteOffset = -0x80000000\\n  }\\n  byteOffset = +byteOffset  // Coerce to Number.\\n  if (isNaN(byteOffset)) {\\n    // byteOffset: it it's undefined, null, NaN, \\\"foo\\\", etc, search whole buffer\\n    byteOffset = dir ? 0 : (buffer.length - 1)\\n  }\\n\\n  // Normalize byteOffset: negative offsets start from the end of the buffer\\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\\n  if (byteOffset >= buffer.length) {\\n    if (dir) return -1\\n    else byteOffset = buffer.length - 1\\n  } else if (byteOffset < 0) {\\n    if (dir) byteOffset = 0\\n    else return -1\\n  }\\n\\n  // Normalize val\\n  if (typeof val === 'string') {\\n    val = Buffer.from(val, encoding)\\n  }\\n\\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\\n  if (Buffer.isBuffer(val)) {\\n    // Special case: looking for empty string/buffer always fails\\n    if (val.length === 0) {\\n      return -1\\n    }\\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\\n  } else if (typeof val === 'number') {\\n    val = val & 0xFF // Search for a byte value [0-255]\\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\\n        typeof Uint8Array.prototype.indexOf === 'function') {\\n      if (dir) {\\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\\n      } else {\\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\\n      }\\n    }\\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\\n  }\\n\\n  throw new TypeError('val must be string, number or Buffer')\\n}\\n\\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\\n  var indexSize = 1\\n  var arrLength = arr.length\\n  var valLength = val.length\\n\\n  if (encoding !== undefined) {\\n    encoding = String(encoding).toLowerCase()\\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\\n        encoding === 'utf16le' || encoding === 'utf-16le') {\\n      if (arr.length < 2 || val.length < 2) {\\n        return -1\\n      }\\n      indexSize = 2\\n      arrLength /= 2\\n      valLength /= 2\\n      byteOffset /= 2\\n    }\\n  }\\n\\n  function read (buf, i) {\\n    if (indexSize === 1) {\\n      return buf[i]\\n    } else {\\n      return buf.readUInt16BE(i * indexSize)\\n    }\\n  }\\n\\n  var i\\n  if (dir) {\\n    var foundIndex = -1\\n    for (i = byteOffset; i < arrLength; i++) {\\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\\n        if (foundIndex === -1) foundIndex = i\\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\\n      } else {\\n        if (foundIndex !== -1) i -= i - foundIndex\\n        foundIndex = -1\\n      }\\n    }\\n  } else {\\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\\n    for (i = byteOffset; i >= 0; i--) {\\n      var found = true\\n      for (var j = 0; j < valLength; j++) {\\n        if (read(arr, i + j) !== read(val, j)) {\\n          found = false\\n          break\\n        }\\n      }\\n      if (found) return i\\n    }\\n  }\\n\\n  return -1\\n}\\n\\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\\n  return this.indexOf(val, byteOffset, encoding) !== -1\\n}\\n\\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\\n}\\n\\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\\n}\\n\\nfunction hexWrite (buf, string, offset, length) {\\n  offset = Number(offset) || 0\\n  var remaining = buf.length - offset\\n  if (!length) {\\n    length = remaining\\n  } else {\\n    length = Number(length)\\n    if (length > remaining) {\\n      length = remaining\\n    }\\n  }\\n\\n  // must be an even number of digits\\n  var strLen = string.length\\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\\n\\n  if (length > strLen / 2) {\\n    length = strLen / 2\\n  }\\n  for (var i = 0; i < length; ++i) {\\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\\n    if (isNaN(parsed)) return i\\n    buf[offset + i] = parsed\\n  }\\n  return i\\n}\\n\\nfunction utf8Write (buf, string, offset, length) {\\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\\n}\\n\\nfunction asciiWrite (buf, string, offset, length) {\\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\\n}\\n\\nfunction latin1Write (buf, string, offset, length) {\\n  return asciiWrite(buf, string, offset, length)\\n}\\n\\nfunction base64Write (buf, string, offset, length) {\\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\\n}\\n\\nfunction ucs2Write (buf, string, offset, length) {\\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\\n}\\n\\nBuffer.prototype.write = function write (string, offset, length, encoding) {\\n  // Buffer#write(string)\\n  if (offset === undefined) {\\n    encoding = 'utf8'\\n    length = this.length\\n    offset = 0\\n  // Buffer#write(string, encoding)\\n  } else if (length === undefined && typeof offset === 'string') {\\n    encoding = offset\\n    length = this.length\\n    offset = 0\\n  // Buffer#write(string, offset[, length][, encoding])\\n  } else if (isFinite(offset)) {\\n    offset = offset | 0\\n    if (isFinite(length)) {\\n      length = length | 0\\n      if (encoding === undefined) encoding = 'utf8'\\n    } else {\\n      encoding = length\\n      length = undefined\\n    }\\n  // legacy write(string, encoding, offset, length) - remove in v0.13\\n  } else {\\n    throw new Error(\\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\\n    )\\n  }\\n\\n  var remaining = this.length - offset\\n  if (length === undefined || length > remaining) length = remaining\\n\\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\\n    throw new RangeError('Attempt to write outside buffer bounds')\\n  }\\n\\n  if (!encoding) encoding = 'utf8'\\n\\n  var loweredCase = false\\n  for (;;) {\\n    switch (encoding) {\\n      case 'hex':\\n        return hexWrite(this, string, offset, length)\\n\\n      case 'utf8':\\n      case 'utf-8':\\n        return utf8Write(this, string, offset, length)\\n\\n      case 'ascii':\\n        return asciiWrite(this, string, offset, length)\\n\\n      case 'latin1':\\n      case 'binary':\\n        return latin1Write(this, string, offset, length)\\n\\n      case 'base64':\\n        // Warning: maxLength not taken into account in base64Write\\n        return base64Write(this, string, offset, length)\\n\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return ucs2Write(this, string, offset, length)\\n\\n      default:\\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\\n        encoding = ('' + encoding).toLowerCase()\\n        loweredCase = true\\n    }\\n  }\\n}\\n\\nBuffer.prototype.toJSON = function toJSON () {\\n  return {\\n    type: 'Buffer',\\n    data: Array.prototype.slice.call(this._arr || this, 0)\\n  }\\n}\\n\\nfunction base64Slice (buf, start, end) {\\n  if (start === 0 && end === buf.length) {\\n    return base64.fromByteArray(buf)\\n  } else {\\n    return base64.fromByteArray(buf.slice(start, end))\\n  }\\n}\\n\\nfunction utf8Slice (buf, start, end) {\\n  end = Math.min(buf.length, end)\\n  var res = []\\n\\n  var i = start\\n  while (i < end) {\\n    var firstByte = buf[i]\\n    var codePoint = null\\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\\n      : (firstByte > 0xDF) ? 3\\n      : (firstByte > 0xBF) ? 2\\n      : 1\\n\\n    if (i + bytesPerSequence <= end) {\\n      var secondByte, thirdByte, fourthByte, tempCodePoint\\n\\n      switch (bytesPerSequence) {\\n        case 1:\\n          if (firstByte < 0x80) {\\n            codePoint = firstByte\\n          }\\n          break\\n        case 2:\\n          secondByte = buf[i + 1]\\n          if ((secondByte & 0xC0) === 0x80) {\\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\\n            if (tempCodePoint > 0x7F) {\\n              codePoint = tempCodePoint\\n            }\\n          }\\n          break\\n        case 3:\\n          secondByte = buf[i + 1]\\n          thirdByte = buf[i + 2]\\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\\n              codePoint = tempCodePoint\\n            }\\n          }\\n          break\\n        case 4:\\n          secondByte = buf[i + 1]\\n          thirdByte = buf[i + 2]\\n          fourthByte = buf[i + 3]\\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\\n              codePoint = tempCodePoint\\n            }\\n          }\\n      }\\n    }\\n\\n    if (codePoint === null) {\\n      // we did not generate a valid codePoint so insert a\\n      // replacement char (U+FFFD) and advance only 1 byte\\n      codePoint = 0xFFFD\\n      bytesPerSequence = 1\\n    } else if (codePoint > 0xFFFF) {\\n      // encode to utf16 (surrogate pair dance)\\n      codePoint -= 0x10000\\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\\n      codePoint = 0xDC00 | codePoint & 0x3FF\\n    }\\n\\n    res.push(codePoint)\\n    i += bytesPerSequence\\n  }\\n\\n  return decodeCodePointsArray(res)\\n}\\n\\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\\n// the lowest limit is Chrome, with 0x10000 args.\\n// We go 1 magnitude less, for safety\\nvar MAX_ARGUMENTS_LENGTH = 0x1000\\n\\nfunction decodeCodePointsArray (codePoints) {\\n  var len = codePoints.length\\n  if (len <= MAX_ARGUMENTS_LENGTH) {\\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\\n  }\\n\\n  // Decode in chunks to avoid \\\"call stack size exceeded\\\".\\n  var res = ''\\n  var i = 0\\n  while (i < len) {\\n    res += String.fromCharCode.apply(\\n      String,\\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\\n    )\\n  }\\n  return res\\n}\\n\\nfunction asciiSlice (buf, start, end) {\\n  var ret = ''\\n  end = Math.min(buf.length, end)\\n\\n  for (var i = start; i < end; ++i) {\\n    ret += String.fromCharCode(buf[i] & 0x7F)\\n  }\\n  return ret\\n}\\n\\nfunction latin1Slice (buf, start, end) {\\n  var ret = ''\\n  end = Math.min(buf.length, end)\\n\\n  for (var i = start; i < end; ++i) {\\n    ret += String.fromCharCode(buf[i])\\n  }\\n  return ret\\n}\\n\\nfunction hexSlice (buf, start, end) {\\n  var len = buf.length\\n\\n  if (!start || start < 0) start = 0\\n  if (!end || end < 0 || end > len) end = len\\n\\n  var out = ''\\n  for (var i = start; i < end; ++i) {\\n    out += toHex(buf[i])\\n  }\\n  return out\\n}\\n\\nfunction utf16leSlice (buf, start, end) {\\n  var bytes = buf.slice(start, end)\\n  var res = ''\\n  for (var i = 0; i < bytes.length; i += 2) {\\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\\n  }\\n  return res\\n}\\n\\nBuffer.prototype.slice = function slice (start, end) {\\n  var len = this.length\\n  start = ~~start\\n  end = end === undefined ? len : ~~end\\n\\n  if (start < 0) {\\n    start += len\\n    if (start < 0) start = 0\\n  } else if (start > len) {\\n    start = len\\n  }\\n\\n  if (end < 0) {\\n    end += len\\n    if (end < 0) end = 0\\n  } else if (end > len) {\\n    end = len\\n  }\\n\\n  if (end < start) end = start\\n\\n  var newBuf\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    newBuf = this.subarray(start, end)\\n    newBuf.__proto__ = Buffer.prototype\\n  } else {\\n    var sliceLen = end - start\\n    newBuf = new Buffer(sliceLen, undefined)\\n    for (var i = 0; i < sliceLen; ++i) {\\n      newBuf[i] = this[i + start]\\n    }\\n  }\\n\\n  return newBuf\\n}\\n\\n/*\\n * Need to make sure that buffer isn't trying to write out of bounds.\\n */\\nfunction checkOffset (offset, ext, length) {\\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\\n}\\n\\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n  var val = this[offset]\\n  var mul = 1\\n  var i = 0\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    val += this[offset + i] * mul\\n  }\\n\\n  return val\\n}\\n\\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) {\\n    checkOffset(offset, byteLength, this.length)\\n  }\\n\\n  var val = this[offset + --byteLength]\\n  var mul = 1\\n  while (byteLength > 0 && (mul *= 0x100)) {\\n    val += this[offset + --byteLength] * mul\\n  }\\n\\n  return val\\n}\\n\\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 1, this.length)\\n  return this[offset]\\n}\\n\\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  return this[offset] | (this[offset + 1] << 8)\\n}\\n\\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  return (this[offset] << 8) | this[offset + 1]\\n}\\n\\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return ((this[offset]) |\\n      (this[offset + 1] << 8) |\\n      (this[offset + 2] << 16)) +\\n      (this[offset + 3] * 0x1000000)\\n}\\n\\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return (this[offset] * 0x1000000) +\\n    ((this[offset + 1] << 16) |\\n    (this[offset + 2] << 8) |\\n    this[offset + 3])\\n}\\n\\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n  var val = this[offset]\\n  var mul = 1\\n  var i = 0\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    val += this[offset + i] * mul\\n  }\\n  mul *= 0x80\\n\\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\\n\\n  return val\\n}\\n\\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n  var i = byteLength\\n  var mul = 1\\n  var val = this[offset + --i]\\n  while (i > 0 && (mul *= 0x100)) {\\n    val += this[offset + --i] * mul\\n  }\\n  mul *= 0x80\\n\\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\\n\\n  return val\\n}\\n\\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 1, this.length)\\n  if (!(this[offset] & 0x80)) return (this[offset])\\n  return ((0xff - this[offset] + 1) * -1)\\n}\\n\\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  var val = this[offset] | (this[offset + 1] << 8)\\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\\n}\\n\\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  var val = this[offset + 1] | (this[offset] << 8)\\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\\n}\\n\\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return (this[offset]) |\\n    (this[offset + 1] << 8) |\\n    (this[offset + 2] << 16) |\\n    (this[offset + 3] << 24)\\n}\\n\\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return (this[offset] << 24) |\\n    (this[offset + 1] << 16) |\\n    (this[offset + 2] << 8) |\\n    (this[offset + 3])\\n}\\n\\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n  return ieee754.read(this, offset, true, 23, 4)\\n}\\n\\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n  return ieee754.read(this, offset, false, 23, 4)\\n}\\n\\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 8, this.length)\\n  return ieee754.read(this, offset, true, 52, 8)\\n}\\n\\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 8, this.length)\\n  return ieee754.read(this, offset, false, 52, 8)\\n}\\n\\nfunction checkInt (buf, value, offset, ext, max, min) {\\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\\\"buffer\\\" argument must be a Buffer instance')\\n  if (value > max || value < min) throw new RangeError('\\\"value\\\" argument is out of bounds')\\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\\n}\\n\\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) {\\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\\n  }\\n\\n  var mul = 1\\n  var i = 0\\n  this[offset] = value & 0xFF\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    this[offset + i] = (value / mul) & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) {\\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\\n  }\\n\\n  var i = byteLength - 1\\n  var mul = 1\\n  this[offset + i] = value & 0xFF\\n  while (--i >= 0 && (mul *= 0x100)) {\\n    this[offset + i] = (value / mul) & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\\n  this[offset] = (value & 0xff)\\n  return offset + 1\\n}\\n\\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\\n  if (value < 0) value = 0xffff + value + 1\\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\\n      (littleEndian ? i : 1 - i) * 8\\n  }\\n}\\n\\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value & 0xff)\\n    this[offset + 1] = (value >>> 8)\\n  } else {\\n    objectWriteUInt16(this, value, offset, true)\\n  }\\n  return offset + 2\\n}\\n\\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 8)\\n    this[offset + 1] = (value & 0xff)\\n  } else {\\n    objectWriteUInt16(this, value, offset, false)\\n  }\\n  return offset + 2\\n}\\n\\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\\n  if (value < 0) value = 0xffffffff + value + 1\\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\\n  }\\n}\\n\\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset + 3] = (value >>> 24)\\n    this[offset + 2] = (value >>> 16)\\n    this[offset + 1] = (value >>> 8)\\n    this[offset] = (value & 0xff)\\n  } else {\\n    objectWriteUInt32(this, value, offset, true)\\n  }\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 24)\\n    this[offset + 1] = (value >>> 16)\\n    this[offset + 2] = (value >>> 8)\\n    this[offset + 3] = (value & 0xff)\\n  } else {\\n    objectWriteUInt32(this, value, offset, false)\\n  }\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) {\\n    var limit = Math.pow(2, 8 * byteLength - 1)\\n\\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\\n  }\\n\\n  var i = 0\\n  var mul = 1\\n  var sub = 0\\n  this[offset] = value & 0xFF\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\\n      sub = 1\\n    }\\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) {\\n    var limit = Math.pow(2, 8 * byteLength - 1)\\n\\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\\n  }\\n\\n  var i = byteLength - 1\\n  var mul = 1\\n  var sub = 0\\n  this[offset + i] = value & 0xFF\\n  while (--i >= 0 && (mul *= 0x100)) {\\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\\n      sub = 1\\n    }\\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\\n  if (value < 0) value = 0xff + value + 1\\n  this[offset] = (value & 0xff)\\n  return offset + 1\\n}\\n\\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value & 0xff)\\n    this[offset + 1] = (value >>> 8)\\n  } else {\\n    objectWriteUInt16(this, value, offset, true)\\n  }\\n  return offset + 2\\n}\\n\\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 8)\\n    this[offset + 1] = (value & 0xff)\\n  } else {\\n    objectWriteUInt16(this, value, offset, false)\\n  }\\n  return offset + 2\\n}\\n\\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value & 0xff)\\n    this[offset + 1] = (value >>> 8)\\n    this[offset + 2] = (value >>> 16)\\n    this[offset + 3] = (value >>> 24)\\n  } else {\\n    objectWriteUInt32(this, value, offset, true)\\n  }\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\\n  if (value < 0) value = 0xffffffff + value + 1\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 24)\\n    this[offset + 1] = (value >>> 16)\\n    this[offset + 2] = (value >>> 8)\\n    this[offset + 3] = (value & 0xff)\\n  } else {\\n    objectWriteUInt32(this, value, offset, false)\\n  }\\n  return offset + 4\\n}\\n\\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\\n  if (offset < 0) throw new RangeError('Index out of range')\\n}\\n\\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\\n  if (!noAssert) {\\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\\n  }\\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\\n  return writeFloat(this, value, offset, true, noAssert)\\n}\\n\\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\\n  return writeFloat(this, value, offset, false, noAssert)\\n}\\n\\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\\n  if (!noAssert) {\\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\\n  }\\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\\n  return offset + 8\\n}\\n\\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\\n  return writeDouble(this, value, offset, true, noAssert)\\n}\\n\\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\\n  return writeDouble(this, value, offset, false, noAssert)\\n}\\n\\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\\n  if (!start) start = 0\\n  if (!end && end !== 0) end = this.length\\n  if (targetStart >= target.length) targetStart = target.length\\n  if (!targetStart) targetStart = 0\\n  if (end > 0 && end < start) end = start\\n\\n  // Copy 0 bytes; we're done\\n  if (end === start) return 0\\n  if (target.length === 0 || this.length === 0) return 0\\n\\n  // Fatal error conditions\\n  if (targetStart < 0) {\\n    throw new RangeError('targetStart out of bounds')\\n  }\\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\\n\\n  // Are we oob?\\n  if (end > this.length) end = this.length\\n  if (target.length - targetStart < end - start) {\\n    end = target.length - targetStart + start\\n  }\\n\\n  var len = end - start\\n  var i\\n\\n  if (this === target && start < targetStart && targetStart < end) {\\n    // descending copy from end\\n    for (i = len - 1; i >= 0; --i) {\\n      target[i + targetStart] = this[i + start]\\n    }\\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\\n    // ascending copy from start\\n    for (i = 0; i < len; ++i) {\\n      target[i + targetStart] = this[i + start]\\n    }\\n  } else {\\n    Uint8Array.prototype.set.call(\\n      target,\\n      this.subarray(start, start + len),\\n      targetStart\\n    )\\n  }\\n\\n  return len\\n}\\n\\n// Usage:\\n//    buffer.fill(number[, offset[, end]])\\n//    buffer.fill(buffer[, offset[, end]])\\n//    buffer.fill(string[, offset[, end]][, encoding])\\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\\n  // Handle string cases:\\n  if (typeof val === 'string') {\\n    if (typeof start === 'string') {\\n      encoding = start\\n      start = 0\\n      end = this.length\\n    } else if (typeof end === 'string') {\\n      encoding = end\\n      end = this.length\\n    }\\n    if (val.length === 1) {\\n      var code = val.charCodeAt(0)\\n      if (code < 256) {\\n        val = code\\n      }\\n    }\\n    if (encoding !== undefined && typeof encoding !== 'string') {\\n      throw new TypeError('encoding must be a string')\\n    }\\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\\n      throw new TypeError('Unknown encoding: ' + encoding)\\n    }\\n  } else if (typeof val === 'number') {\\n    val = val & 255\\n  }\\n\\n  // Invalid ranges are not set to a default, so can range check early.\\n  if (start < 0 || this.length < start || this.length < end) {\\n    throw new RangeError('Out of range index')\\n  }\\n\\n  if (end <= start) {\\n    return this\\n  }\\n\\n  start = start >>> 0\\n  end = end === undefined ? this.length : end >>> 0\\n\\n  if (!val) val = 0\\n\\n  var i\\n  if (typeof val === 'number') {\\n    for (i = start; i < end; ++i) {\\n      this[i] = val\\n    }\\n  } else {\\n    var bytes = Buffer.isBuffer(val)\\n      ? val\\n      : utf8ToBytes(new Buffer(val, encoding).toString())\\n    var len = bytes.length\\n    for (i = 0; i < end - start; ++i) {\\n      this[i + start] = bytes[i % len]\\n    }\\n  }\\n\\n  return this\\n}\\n\\n// HELPER FUNCTIONS\\n// ================\\n\\nvar INVALID_BASE64_RE = /[^+\\\\/0-9A-Za-z-_]/g\\n\\nfunction base64clean (str) {\\n  // Node strips out invalid characters like \\\\n and \\\\t from the string, base64-js does not\\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\\n  // Node converts strings with length < 2 to ''\\n  if (str.length < 2) return ''\\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\\n  while (str.length % 4 !== 0) {\\n    str = str + '='\\n  }\\n  return str\\n}\\n\\nfunction stringtrim (str) {\\n  if (str.trim) return str.trim()\\n  return str.replace(/^\\\\s+|\\\\s+$/g, '')\\n}\\n\\nfunction toHex (n) {\\n  if (n < 16) return '0' + n.toString(16)\\n  return n.toString(16)\\n}\\n\\nfunction utf8ToBytes (string, units) {\\n  units = units || Infinity\\n  var codePoint\\n  var length = string.length\\n  var leadSurrogate = null\\n  var bytes = []\\n\\n  for (var i = 0; i < length; ++i) {\\n    codePoint = string.charCodeAt(i)\\n\\n    // is surrogate component\\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\\n      // last char was a lead\\n      if (!leadSurrogate) {\\n        // no lead yet\\n        if (codePoint > 0xDBFF) {\\n          // unexpected trail\\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n          continue\\n        } else if (i + 1 === length) {\\n          // unpaired lead\\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n          continue\\n        }\\n\\n        // valid lead\\n        leadSurrogate = codePoint\\n\\n        continue\\n      }\\n\\n      // 2 leads in a row\\n      if (codePoint < 0xDC00) {\\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n        leadSurrogate = codePoint\\n        continue\\n      }\\n\\n      // valid surrogate pair\\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\\n    } else if (leadSurrogate) {\\n      // valid bmp char, but last char was a lead\\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n    }\\n\\n    leadSurrogate = null\\n\\n    // encode utf8\\n    if (codePoint < 0x80) {\\n      if ((units -= 1) < 0) break\\n      bytes.push(codePoint)\\n    } else if (codePoint < 0x800) {\\n      if ((units -= 2) < 0) break\\n      bytes.push(\\n        codePoint >> 0x6 | 0xC0,\\n        codePoint & 0x3F | 0x80\\n      )\\n    } else if (codePoint < 0x10000) {\\n      if ((units -= 3) < 0) break\\n      bytes.push(\\n        codePoint >> 0xC | 0xE0,\\n        codePoint >> 0x6 & 0x3F | 0x80,\\n        codePoint & 0x3F | 0x80\\n      )\\n    } else if (codePoint < 0x110000) {\\n      if ((units -= 4) < 0) break\\n      bytes.push(\\n        codePoint >> 0x12 | 0xF0,\\n        codePoint >> 0xC & 0x3F | 0x80,\\n        codePoint >> 0x6 & 0x3F | 0x80,\\n        codePoint & 0x3F | 0x80\\n      )\\n    } else {\\n      throw new Error('Invalid code point')\\n    }\\n  }\\n\\n  return bytes\\n}\\n\\nfunction asciiToBytes (str) {\\n  var byteArray = []\\n  for (var i = 0; i < str.length; ++i) {\\n    // Node's code seems to be doing this and not & 0x7F..\\n    byteArray.push(str.charCodeAt(i) & 0xFF)\\n  }\\n  return byteArray\\n}\\n\\nfunction utf16leToBytes (str, units) {\\n  var c, hi, lo\\n  var byteArray = []\\n  for (var i = 0; i < str.length; ++i) {\\n    if ((units -= 2) < 0) break\\n\\n    c = str.charCodeAt(i)\\n    hi = c >> 8\\n    lo = c % 256\\n    byteArray.push(lo)\\n    byteArray.push(hi)\\n  }\\n\\n  return byteArray\\n}\\n\\nfunction base64ToBytes (str) {\\n  return base64.toByteArray(base64clean(str))\\n}\\n\\nfunction blitBuffer (src, dst, offset, length) {\\n  for (var i = 0; i < length; ++i) {\\n    if ((i + offset >= dst.length) || (i >= src.length)) break\\n    dst[i + offset] = src[i]\\n  }\\n  return i\\n}\\n\\nfunction isnan (val) {\\n  return val !== val // eslint-disable-line no-self-compare\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/node-libs-browser/node_modules/buffer/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/pkcs7/dist/pkcs7.es.js\":\n/*!**********************************************!*\\\n  !*** ../node_modules/pkcs7/dist/pkcs7.es.js ***!\n  \\**********************************************/\n/*! exports provided: pad, unpad, VERSION */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"pad\\\", function() { return pad; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"unpad\\\", function() { return unpad; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"VERSION\\\", function() { return version; });\\n/*\\n * pkcs7.pad\\n * https://github.com/brightcove/pkcs7\\n *\\n * Copyright (c) 2014 Brightcove\\n * Licensed under the apache2 license.\\n */\\n\\nvar PADDING = void 0;\\n\\n/**\\n * Returns a new Uint8Array that is padded with PKCS#7 padding.\\n * @param plaintext {Uint8Array} the input bytes before encryption\\n * @return {Uint8Array} the padded bytes\\n * @see http://tools.ietf.org/html/rfc5652\\n */\\nfunction pad(plaintext) {\\n  var padding = PADDING[plaintext.byteLength % 16 || 0];\\n  var result = new Uint8Array(plaintext.byteLength + padding.length);\\n\\n  result.set(plaintext);\\n  result.set(padding, plaintext.byteLength);\\n\\n  return result;\\n}\\n\\n// pre-define the padding values\\nPADDING = [[16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16], [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15], [14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14], [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13], [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [9, 9, 9, 9, 9, 9, 9, 9, 9], [8, 8, 8, 8, 8, 8, 8, 8], [7, 7, 7, 7, 7, 7, 7], [6, 6, 6, 6, 6, 6], [5, 5, 5, 5, 5], [4, 4, 4, 4], [3, 3, 3], [2, 2], [1]];\\n\\n/**\\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\\n * @param padded {Uint8Array} unencrypted bytes that have been padded\\n * @return {Uint8Array} the unpadded bytes\\n * @see http://tools.ietf.org/html/rfc5652\\n */\\nfunction unpad(padded) {\\n  return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\\n}\\n\\nvar version = \\\"1.0.2\\\";\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/pkcs7/dist/pkcs7.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/process-nextick-args/index.js\":\n/*!*****************************************************!*\\\n  !*** ../node_modules/process-nextick-args/index.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(process) {\\n\\nif (typeof process === 'undefined' ||\\n    !process.version ||\\n    process.version.indexOf('v0.') === 0 ||\\n    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\\n  module.exports = { nextTick: nextTick };\\n} else {\\n  module.exports = process\\n}\\n\\nfunction nextTick(fn, arg1, arg2, arg3) {\\n  if (typeof fn !== 'function') {\\n    throw new TypeError('\\\"callback\\\" argument must be a function');\\n  }\\n  var len = arguments.length;\\n  var args, i;\\n  switch (len) {\\n  case 0:\\n  case 1:\\n    return process.nextTick(fn);\\n  case 2:\\n    return process.nextTick(function afterTickOne() {\\n      fn.call(null, arg1);\\n    });\\n  case 3:\\n    return process.nextTick(function afterTickTwo() {\\n      fn.call(null, arg1, arg2);\\n    });\\n  case 4:\\n    return process.nextTick(function afterTickThree() {\\n      fn.call(null, arg1, arg2, arg3);\\n    });\\n  default:\\n    args = new Array(len - 1);\\n    i = 0;\\n    while (i < args.length) {\\n      args[i++] = arguments[i];\\n    }\\n    return process.nextTick(function afterTick() {\\n      fn.apply(null, args);\\n    });\\n  }\\n}\\n\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \\\"../node_modules/process/browser.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/process-nextick-args/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/process/browser.js\":\n/*!******************************************!*\\\n  !*** ../node_modules/process/browser.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"// shim for using process in browser\\nvar process = module.exports = {};\\n\\n// cached from whatever global is present so that test runners that stub it\\n// don't break things.  But we need to wrap it in a try catch in case it is\\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\\n// function because try/catches deoptimize in certain engines.\\n\\nvar cachedSetTimeout;\\nvar cachedClearTimeout;\\n\\nfunction defaultSetTimout() {\\n    throw new Error('setTimeout has not been defined');\\n}\\nfunction defaultClearTimeout () {\\n    throw new Error('clearTimeout has not been defined');\\n}\\n(function () {\\n    try {\\n        if (typeof setTimeout === 'function') {\\n            cachedSetTimeout = setTimeout;\\n        } else {\\n            cachedSetTimeout = defaultSetTimout;\\n        }\\n    } catch (e) {\\n        cachedSetTimeout = defaultSetTimout;\\n    }\\n    try {\\n        if (typeof clearTimeout === 'function') {\\n            cachedClearTimeout = clearTimeout;\\n        } else {\\n            cachedClearTimeout = defaultClearTimeout;\\n        }\\n    } catch (e) {\\n        cachedClearTimeout = defaultClearTimeout;\\n    }\\n} ())\\nfunction runTimeout(fun) {\\n    if (cachedSetTimeout === setTimeout) {\\n        //normal enviroments in sane situations\\n        return setTimeout(fun, 0);\\n    }\\n    // if setTimeout wasn't available but was latter defined\\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\\n        cachedSetTimeout = setTimeout;\\n        return setTimeout(fun, 0);\\n    }\\n    try {\\n        // when when somebody has screwed with setTimeout but no I.E. maddness\\n        return cachedSetTimeout(fun, 0);\\n    } catch(e){\\n        try {\\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n            return cachedSetTimeout.call(null, fun, 0);\\n        } catch(e){\\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\\n            return cachedSetTimeout.call(this, fun, 0);\\n        }\\n    }\\n\\n\\n}\\nfunction runClearTimeout(marker) {\\n    if (cachedClearTimeout === clearTimeout) {\\n        //normal enviroments in sane situations\\n        return clearTimeout(marker);\\n    }\\n    // if clearTimeout wasn't available but was latter defined\\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\\n        cachedClearTimeout = clearTimeout;\\n        return clearTimeout(marker);\\n    }\\n    try {\\n        // when when somebody has screwed with setTimeout but no I.E. maddness\\n        return cachedClearTimeout(marker);\\n    } catch (e){\\n        try {\\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\\n            return cachedClearTimeout.call(null, marker);\\n        } catch (e){\\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\\n            return cachedClearTimeout.call(this, marker);\\n        }\\n    }\\n\\n\\n\\n}\\nvar queue = [];\\nvar draining = false;\\nvar currentQueue;\\nvar queueIndex = -1;\\n\\nfunction cleanUpNextTick() {\\n    if (!draining || !currentQueue) {\\n        return;\\n    }\\n    draining = false;\\n    if (currentQueue.length) {\\n        queue = currentQueue.concat(queue);\\n    } else {\\n        queueIndex = -1;\\n    }\\n    if (queue.length) {\\n        drainQueue();\\n    }\\n}\\n\\nfunction drainQueue() {\\n    if (draining) {\\n        return;\\n    }\\n    var timeout = runTimeout(cleanUpNextTick);\\n    draining = true;\\n\\n    var len = queue.length;\\n    while(len) {\\n        currentQueue = queue;\\n        queue = [];\\n        while (++queueIndex < len) {\\n            if (currentQueue) {\\n                currentQueue[queueIndex].run();\\n            }\\n        }\\n        queueIndex = -1;\\n        len = queue.length;\\n    }\\n    currentQueue = null;\\n    draining = false;\\n    runClearTimeout(timeout);\\n}\\n\\nprocess.nextTick = function (fun) {\\n    var args = new Array(arguments.length - 1);\\n    if (arguments.length > 1) {\\n        for (var i = 1; i < arguments.length; i++) {\\n            args[i - 1] = arguments[i];\\n        }\\n    }\\n    queue.push(new Item(fun, args));\\n    if (queue.length === 1 && !draining) {\\n        runTimeout(drainQueue);\\n    }\\n};\\n\\n// v8 likes predictible objects\\nfunction Item(fun, array) {\\n    this.fun = fun;\\n    this.array = array;\\n}\\nItem.prototype.run = function () {\\n    this.fun.apply(null, this.array);\\n};\\nprocess.title = 'browser';\\nprocess.browser = true;\\nprocess.env = {};\\nprocess.argv = [];\\nprocess.version = ''; // empty string to avoid regexp issues\\nprocess.versions = {};\\n\\nfunction noop() {}\\n\\nprocess.on = noop;\\nprocess.addListener = noop;\\nprocess.once = noop;\\nprocess.off = noop;\\nprocess.removeListener = noop;\\nprocess.removeAllListeners = noop;\\nprocess.emit = noop;\\nprocess.prependListener = noop;\\nprocess.prependOnceListener = noop;\\n\\nprocess.listeners = function (name) { return [] }\\n\\nprocess.binding = function (name) {\\n    throw new Error('process.binding is not supported');\\n};\\n\\nprocess.cwd = function () { return '/' };\\nprocess.chdir = function (dir) {\\n    throw new Error('process.chdir is not supported');\\n};\\nprocess.umask = function() { return 0; };\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/process/browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/promise-polyfill/promise.js\":\n/*!***************************************************!*\\\n  !*** ../node_modules/promise-polyfill/promise.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(setImmediate) {(function (root) {\\n\\n  // Store setTimeout reference so promise-polyfill will be unaffected by\\n  // other code modifying setTimeout (like sinon.useFakeTimers())\\n  var setTimeoutFunc = setTimeout;\\n\\n  function noop() {}\\n  \\n  // Polyfill for Function.prototype.bind\\n  function bind(fn, thisArg) {\\n    return function () {\\n      fn.apply(thisArg, arguments);\\n    };\\n  }\\n\\n  function Promise(fn) {\\n    if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');\\n    if (typeof fn !== 'function') throw new TypeError('not a function');\\n    this._state = 0;\\n    this._handled = false;\\n    this._value = undefined;\\n    this._deferreds = [];\\n\\n    doResolve(fn, this);\\n  }\\n\\n  function handle(self, deferred) {\\n    while (self._state === 3) {\\n      self = self._value;\\n    }\\n    if (self._state === 0) {\\n      self._deferreds.push(deferred);\\n      return;\\n    }\\n    self._handled = true;\\n    Promise._immediateFn(function () {\\n      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\\n      if (cb === null) {\\n        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\\n        return;\\n      }\\n      var ret;\\n      try {\\n        ret = cb(self._value);\\n      } catch (e) {\\n        reject(deferred.promise, e);\\n        return;\\n      }\\n      resolve(deferred.promise, ret);\\n    });\\n  }\\n\\n  function resolve(self, newValue) {\\n    try {\\n      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\\n      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\\n      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\\n        var then = newValue.then;\\n        if (newValue instanceof Promise) {\\n          self._state = 3;\\n          self._value = newValue;\\n          finale(self);\\n          return;\\n        } else if (typeof then === 'function') {\\n          doResolve(bind(then, newValue), self);\\n          return;\\n        }\\n      }\\n      self._state = 1;\\n      self._value = newValue;\\n      finale(self);\\n    } catch (e) {\\n      reject(self, e);\\n    }\\n  }\\n\\n  function reject(self, newValue) {\\n    self._state = 2;\\n    self._value = newValue;\\n    finale(self);\\n  }\\n\\n  function finale(self) {\\n    if (self._state === 2 && self._deferreds.length === 0) {\\n      Promise._immediateFn(function() {\\n        if (!self._handled) {\\n          Promise._unhandledRejectionFn(self._value);\\n        }\\n      });\\n    }\\n\\n    for (var i = 0, len = self._deferreds.length; i < len; i++) {\\n      handle(self, self._deferreds[i]);\\n    }\\n    self._deferreds = null;\\n  }\\n\\n  function Handler(onFulfilled, onRejected, promise) {\\n    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\\n    this.onRejected = typeof onRejected === 'function' ? onRejected : null;\\n    this.promise = promise;\\n  }\\n\\n  /**\\n   * Take a potentially misbehaving resolver function and make sure\\n   * onFulfilled and onRejected are only called once.\\n   *\\n   * Makes no guarantees about asynchrony.\\n   */\\n  function doResolve(fn, self) {\\n    var done = false;\\n    try {\\n      fn(function (value) {\\n        if (done) return;\\n        done = true;\\n        resolve(self, value);\\n      }, function (reason) {\\n        if (done) return;\\n        done = true;\\n        reject(self, reason);\\n      });\\n    } catch (ex) {\\n      if (done) return;\\n      done = true;\\n      reject(self, ex);\\n    }\\n  }\\n\\n  Promise.prototype['catch'] = function (onRejected) {\\n    return this.then(null, onRejected);\\n  };\\n\\n  Promise.prototype.then = function (onFulfilled, onRejected) {\\n    var prom = new (this.constructor)(noop);\\n\\n    handle(this, new Handler(onFulfilled, onRejected, prom));\\n    return prom;\\n  };\\n\\n  Promise.all = function (arr) {\\n    return new Promise(function (resolve, reject) {\\n      if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');\\n      var args = Array.prototype.slice.call(arr);\\n      if (args.length === 0) return resolve([]);\\n      var remaining = args.length;\\n\\n      function res(i, val) {\\n        try {\\n          if (val && (typeof val === 'object' || typeof val === 'function')) {\\n            var then = val.then;\\n            if (typeof then === 'function') {\\n              then.call(val, function (val) {\\n                res(i, val);\\n              }, reject);\\n              return;\\n            }\\n          }\\n          args[i] = val;\\n          if (--remaining === 0) {\\n            resolve(args);\\n          }\\n        } catch (ex) {\\n          reject(ex);\\n        }\\n      }\\n\\n      for (var i = 0; i < args.length; i++) {\\n        res(i, args[i]);\\n      }\\n    });\\n  };\\n\\n  Promise.resolve = function (value) {\\n    if (value && typeof value === 'object' && value.constructor === Promise) {\\n      return value;\\n    }\\n\\n    return new Promise(function (resolve) {\\n      resolve(value);\\n    });\\n  };\\n\\n  Promise.reject = function (value) {\\n    return new Promise(function (resolve, reject) {\\n      reject(value);\\n    });\\n  };\\n\\n  Promise.race = function (values) {\\n    return new Promise(function (resolve, reject) {\\n      for (var i = 0, len = values.length; i < len; i++) {\\n        values[i].then(resolve, reject);\\n      }\\n    });\\n  };\\n\\n  // Use polyfill for setImmediate for performance gains\\n  Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\\n    function (fn) {\\n      setTimeoutFunc(fn, 0);\\n    };\\n\\n  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\\n    if (typeof console !== 'undefined' && console) {\\n      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\\n    }\\n  };\\n\\n  /**\\n   * Set the immediate function to execute callbacks\\n   * @param fn {function} Function to execute\\n   * @deprecated\\n   */\\n  Promise._setImmediateFn = function _setImmediateFn(fn) {\\n    Promise._immediateFn = fn;\\n  };\\n\\n  /**\\n   * Change the function to execute on unhandled rejection\\n   * @param {function} fn Function to execute on unhandled rejection\\n   * @deprecated\\n   */\\n  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\\n    Promise._unhandledRejectionFn = fn;\\n  };\\n  \\n  if ( true && module.exports) {\\n    module.exports = Promise;\\n  } else if (!root.Promise) {\\n    root.Promise = Promise;\\n  }\\n\\n})(this);\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../timers-browserify/main.js */ \\\"../node_modules/timers-browserify/main.js\\\").setImmediate))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/promise-polyfill/promise.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/duplex-browser.js\":\n/*!*********************************************************!*\\\n  !*** ../node_modules/readable-stream/duplex-browser.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/duplex-browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/_stream_duplex.js\":\n/*!*************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/_stream_duplex.js ***!\n  \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// a duplex stream is just a stream that is both readable and writable.\\n// Since JS doesn't have multiple prototypal inheritance, this class\\n// prototypally inherits from Readable, and then parasitically from\\n// Writable.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar objectKeys = Object.keys || function (obj) {\\n  var keys = [];\\n  for (var key in obj) {\\n    keys.push(key);\\n  }return keys;\\n};\\n/*</replacement>*/\\n\\nmodule.exports = Duplex;\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\nvar Readable = __webpack_require__(/*! ./_stream_readable */ \\\"../node_modules/readable-stream/lib/_stream_readable.js\\\");\\nvar Writable = __webpack_require__(/*! ./_stream_writable */ \\\"../node_modules/readable-stream/lib/_stream_writable.js\\\");\\n\\nutil.inherits(Duplex, Readable);\\n\\n{\\n  // avoid scope creep, the keys array can then be collected\\n  var keys = objectKeys(Writable.prototype);\\n  for (var v = 0; v < keys.length; v++) {\\n    var method = keys[v];\\n    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\\n  }\\n}\\n\\nfunction Duplex(options) {\\n  if (!(this instanceof Duplex)) return new Duplex(options);\\n\\n  Readable.call(this, options);\\n  Writable.call(this, options);\\n\\n  if (options && options.readable === false) this.readable = false;\\n\\n  if (options && options.writable === false) this.writable = false;\\n\\n  this.allowHalfOpen = true;\\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\\n\\n  this.once('end', onend);\\n}\\n\\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\\n  // making it explicit this property is not enumerable\\n  // because otherwise some prototype manipulation in\\n  // userland will fail\\n  enumerable: false,\\n  get: function () {\\n    return this._writableState.highWaterMark;\\n  }\\n});\\n\\n// the no-half-open enforcer\\nfunction onend() {\\n  // if we allow half-open state, or if the writable side ended,\\n  // then we're ok.\\n  if (this.allowHalfOpen || this._writableState.ended) return;\\n\\n  // no more data can be written.\\n  // But allow more writes to happen in this tick.\\n  pna.nextTick(onEndNT, this);\\n}\\n\\nfunction onEndNT(self) {\\n  self.end();\\n}\\n\\nObject.defineProperty(Duplex.prototype, 'destroyed', {\\n  get: function () {\\n    if (this._readableState === undefined || this._writableState === undefined) {\\n      return false;\\n    }\\n    return this._readableState.destroyed && this._writableState.destroyed;\\n  },\\n  set: function (value) {\\n    // we ignore the value if the stream\\n    // has not been initialized yet\\n    if (this._readableState === undefined || this._writableState === undefined) {\\n      return;\\n    }\\n\\n    // backward compatibility, the user is explicitly\\n    // managing destroyed\\n    this._readableState.destroyed = value;\\n    this._writableState.destroyed = value;\\n  }\\n});\\n\\nDuplex.prototype._destroy = function (err, cb) {\\n  this.push(null);\\n  this.end();\\n\\n  pna.nextTick(cb, err);\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_duplex.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/_stream_passthrough.js\":\n/*!******************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/_stream_passthrough.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// a passthrough stream.\\n// basically just the most minimal sort of Transform stream.\\n// Every written chunk gets output as-is.\\n\\n\\n\\nmodule.exports = PassThrough;\\n\\nvar Transform = __webpack_require__(/*! ./_stream_transform */ \\\"../node_modules/readable-stream/lib/_stream_transform.js\\\");\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\nutil.inherits(PassThrough, Transform);\\n\\nfunction PassThrough(options) {\\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\\n\\n  Transform.call(this, options);\\n}\\n\\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\\n  cb(null, chunk);\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_passthrough.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/_stream_readable.js\":\n/*!***************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/_stream_readable.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\nmodule.exports = Readable;\\n\\n/*<replacement>*/\\nvar isArray = __webpack_require__(/*! isarray */ \\\"../node_modules/isarray/index.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Duplex;\\n/*</replacement>*/\\n\\nReadable.ReadableState = ReadableState;\\n\\n/*<replacement>*/\\nvar EE = __webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\").EventEmitter;\\n\\nvar EElistenerCount = function (emitter, type) {\\n  return emitter.listeners(type).length;\\n};\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \\\"../node_modules/readable-stream/lib/internal/streams/stream-browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\\\").Buffer;\\nvar OurUint8Array = global.Uint8Array || function () {};\\nfunction _uint8ArrayToBuffer(chunk) {\\n  return Buffer.from(chunk);\\n}\\nfunction _isUint8Array(obj) {\\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\\n}\\n\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar debugUtil = __webpack_require__(/*! util */ 2);\\nvar debug = void 0;\\nif (debugUtil && debugUtil.debuglog) {\\n  debug = debugUtil.debuglog('stream');\\n} else {\\n  debug = function () {};\\n}\\n/*</replacement>*/\\n\\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \\\"../node_modules/readable-stream/lib/internal/streams/BufferList.js\\\");\\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \\\"../node_modules/readable-stream/lib/internal/streams/destroy.js\\\");\\nvar StringDecoder;\\n\\nutil.inherits(Readable, Stream);\\n\\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\\n\\nfunction prependListener(emitter, event, fn) {\\n  // Sadly this is not cacheable as some libraries bundle their own\\n  // event emitter implementation with them.\\n  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\\n\\n  // This is a hack to make sure that our error handler is attached before any\\n  // userland ones.  NEVER DO THIS. This is here only because this code needs\\n  // to continue to work with older versions of Node.js that do not include\\n  // the prependListener() method. The goal is to eventually remove this hack.\\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\\n}\\n\\nfunction ReadableState(options, stream) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  options = options || {};\\n\\n  // Duplex streams are both readable and writable, but share\\n  // the same options object.\\n  // However, some cases require setting options to different\\n  // values for the readable and the writable sides of the duplex stream.\\n  // These options can be provided separately as readableXXX and writableXXX.\\n  var isDuplex = stream instanceof Duplex;\\n\\n  // object stream flag. Used to make read(n) ignore n and to\\n  // make all the buffer merging and length checks go away\\n  this.objectMode = !!options.objectMode;\\n\\n  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\\n\\n  // the point at which it stops calling _read() to fill the buffer\\n  // Note: 0 is a valid value, means \\\"don't call _read preemptively ever\\\"\\n  var hwm = options.highWaterMark;\\n  var readableHwm = options.readableHighWaterMark;\\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\\n\\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\\n\\n  // cast to ints.\\n  this.highWaterMark = Math.floor(this.highWaterMark);\\n\\n  // A linked list is used to store data chunks instead of an array because the\\n  // linked list can remove elements from the beginning faster than\\n  // array.shift()\\n  this.buffer = new BufferList();\\n  this.length = 0;\\n  this.pipes = null;\\n  this.pipesCount = 0;\\n  this.flowing = null;\\n  this.ended = false;\\n  this.endEmitted = false;\\n  this.reading = false;\\n\\n  // a flag to be able to tell if the event 'readable'/'data' is emitted\\n  // immediately, or on a later tick.  We set this to true at first, because\\n  // any actions that shouldn't happen until \\\"later\\\" should generally also\\n  // not happen before the first read call.\\n  this.sync = true;\\n\\n  // whenever we return null, then we set a flag to say\\n  // that we're awaiting a 'readable' event emission.\\n  this.needReadable = false;\\n  this.emittedReadable = false;\\n  this.readableListening = false;\\n  this.resumeScheduled = false;\\n\\n  // has it been destroyed\\n  this.destroyed = false;\\n\\n  // Crypto is kind of old and crusty.  Historically, its default string\\n  // encoding is 'binary' so we have to make this configurable.\\n  // Everything else in the universe uses 'utf8', though.\\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\\n\\n  // the number of writers that are awaiting a drain event in .pipe()s\\n  this.awaitDrain = 0;\\n\\n  // if true, a maybeReadMore has been scheduled\\n  this.readingMore = false;\\n\\n  this.decoder = null;\\n  this.encoding = null;\\n  if (options.encoding) {\\n    if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \\\"../node_modules/string_decoder/lib/string_decoder.js\\\").StringDecoder;\\n    this.decoder = new StringDecoder(options.encoding);\\n    this.encoding = options.encoding;\\n  }\\n}\\n\\nfunction Readable(options) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  if (!(this instanceof Readable)) return new Readable(options);\\n\\n  this._readableState = new ReadableState(options, this);\\n\\n  // legacy\\n  this.readable = true;\\n\\n  if (options) {\\n    if (typeof options.read === 'function') this._read = options.read;\\n\\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\\n  }\\n\\n  Stream.call(this);\\n}\\n\\nObject.defineProperty(Readable.prototype, 'destroyed', {\\n  get: function () {\\n    if (this._readableState === undefined) {\\n      return false;\\n    }\\n    return this._readableState.destroyed;\\n  },\\n  set: function (value) {\\n    // we ignore the value if the stream\\n    // has not been initialized yet\\n    if (!this._readableState) {\\n      return;\\n    }\\n\\n    // backward compatibility, the user is explicitly\\n    // managing destroyed\\n    this._readableState.destroyed = value;\\n  }\\n});\\n\\nReadable.prototype.destroy = destroyImpl.destroy;\\nReadable.prototype._undestroy = destroyImpl.undestroy;\\nReadable.prototype._destroy = function (err, cb) {\\n  this.push(null);\\n  cb(err);\\n};\\n\\n// Manually shove something into the read() buffer.\\n// This returns true if the highWaterMark has not been hit yet,\\n// similar to how Writable.write() returns true if you should\\n// write() some more.\\nReadable.prototype.push = function (chunk, encoding) {\\n  var state = this._readableState;\\n  var skipChunkCheck;\\n\\n  if (!state.objectMode) {\\n    if (typeof chunk === 'string') {\\n      encoding = encoding || state.defaultEncoding;\\n      if (encoding !== state.encoding) {\\n        chunk = Buffer.from(chunk, encoding);\\n        encoding = '';\\n      }\\n      skipChunkCheck = true;\\n    }\\n  } else {\\n    skipChunkCheck = true;\\n  }\\n\\n  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\\n};\\n\\n// Unshift should *always* be something directly out of read()\\nReadable.prototype.unshift = function (chunk) {\\n  return readableAddChunk(this, chunk, null, true, false);\\n};\\n\\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\\n  var state = stream._readableState;\\n  if (chunk === null) {\\n    state.reading = false;\\n    onEofChunk(stream, state);\\n  } else {\\n    var er;\\n    if (!skipChunkCheck) er = chunkInvalid(state, chunk);\\n    if (er) {\\n      stream.emit('error', er);\\n    } else if (state.objectMode || chunk && chunk.length > 0) {\\n      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\\n        chunk = _uint8ArrayToBuffer(chunk);\\n      }\\n\\n      if (addToFront) {\\n        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\\n      } else if (state.ended) {\\n        stream.emit('error', new Error('stream.push() after EOF'));\\n      } else {\\n        state.reading = false;\\n        if (state.decoder && !encoding) {\\n          chunk = state.decoder.write(chunk);\\n          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\\n        } else {\\n          addChunk(stream, state, chunk, false);\\n        }\\n      }\\n    } else if (!addToFront) {\\n      state.reading = false;\\n    }\\n  }\\n\\n  return needMoreData(state);\\n}\\n\\nfunction addChunk(stream, state, chunk, addToFront) {\\n  if (state.flowing && state.length === 0 && !state.sync) {\\n    stream.emit('data', chunk);\\n    stream.read(0);\\n  } else {\\n    // update the buffer info.\\n    state.length += state.objectMode ? 1 : chunk.length;\\n    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\\n\\n    if (state.needReadable) emitReadable(stream);\\n  }\\n  maybeReadMore(stream, state);\\n}\\n\\nfunction chunkInvalid(state, chunk) {\\n  var er;\\n  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\\n    er = new TypeError('Invalid non-string/buffer chunk');\\n  }\\n  return er;\\n}\\n\\n// if it's past the high water mark, we can push in some more.\\n// Also, if we have no data yet, we can stand some\\n// more bytes.  This is to work around cases where hwm=0,\\n// such as the repl.  Also, if the push() triggered a\\n// readable event, and the user called read(largeNumber) such that\\n// needReadable was set, then we ought to push more, so that another\\n// 'readable' event will be triggered.\\nfunction needMoreData(state) {\\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\\n}\\n\\nReadable.prototype.isPaused = function () {\\n  return this._readableState.flowing === false;\\n};\\n\\n// backwards compatibility.\\nReadable.prototype.setEncoding = function (enc) {\\n  if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \\\"../node_modules/string_decoder/lib/string_decoder.js\\\").StringDecoder;\\n  this._readableState.decoder = new StringDecoder(enc);\\n  this._readableState.encoding = enc;\\n  return this;\\n};\\n\\n// Don't raise the hwm > 8MB\\nvar MAX_HWM = 0x800000;\\nfunction computeNewHighWaterMark(n) {\\n  if (n >= MAX_HWM) {\\n    n = MAX_HWM;\\n  } else {\\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\\n    // tiny amounts\\n    n--;\\n    n |= n >>> 1;\\n    n |= n >>> 2;\\n    n |= n >>> 4;\\n    n |= n >>> 8;\\n    n |= n >>> 16;\\n    n++;\\n  }\\n  return n;\\n}\\n\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction howMuchToRead(n, state) {\\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\\n  if (state.objectMode) return 1;\\n  if (n !== n) {\\n    // Only flow one buffer at a time\\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\\n  }\\n  // If we're asking for more than the current hwm, then raise the hwm.\\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\\n  if (n <= state.length) return n;\\n  // Don't have enough\\n  if (!state.ended) {\\n    state.needReadable = true;\\n    return 0;\\n  }\\n  return state.length;\\n}\\n\\n// you can override either this method, or the async _read(n) below.\\nReadable.prototype.read = function (n) {\\n  debug('read', n);\\n  n = parseInt(n, 10);\\n  var state = this._readableState;\\n  var nOrig = n;\\n\\n  if (n !== 0) state.emittedReadable = false;\\n\\n  // if we're doing read(0) to trigger a readable event, but we\\n  // already have a bunch of data in the buffer, then just trigger\\n  // the 'readable' event and move on.\\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\\n    debug('read: emitReadable', state.length, state.ended);\\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\\n    return null;\\n  }\\n\\n  n = howMuchToRead(n, state);\\n\\n  // if we've ended, and we're now clear, then finish it up.\\n  if (n === 0 && state.ended) {\\n    if (state.length === 0) endReadable(this);\\n    return null;\\n  }\\n\\n  // All the actual chunk generation logic needs to be\\n  // *below* the call to _read.  The reason is that in certain\\n  // synthetic stream cases, such as passthrough streams, _read\\n  // may be a completely synchronous operation which may change\\n  // the state of the read buffer, providing enough data when\\n  // before there was *not* enough.\\n  //\\n  // So, the steps are:\\n  // 1. Figure out what the state of things will be after we do\\n  // a read from the buffer.\\n  //\\n  // 2. If that resulting state will trigger a _read, then call _read.\\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\\n  // deeply ugly to write APIs this way, but that still doesn't mean\\n  // that the Readable class should behave improperly, as streams are\\n  // designed to be sync/async agnostic.\\n  // Take note if the _read call is sync or async (ie, if the read call\\n  // has returned yet), so that we know whether or not it's safe to emit\\n  // 'readable' etc.\\n  //\\n  // 3. Actually pull the requested chunks out of the buffer and return.\\n\\n  // if we need a readable event, then we need to do some reading.\\n  var doRead = state.needReadable;\\n  debug('need readable', doRead);\\n\\n  // if we currently have less than the highWaterMark, then also read some\\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\\n    doRead = true;\\n    debug('length less than watermark', doRead);\\n  }\\n\\n  // however, if we've ended, then there's no point, and if we're already\\n  // reading, then it's unnecessary.\\n  if (state.ended || state.reading) {\\n    doRead = false;\\n    debug('reading or ended', doRead);\\n  } else if (doRead) {\\n    debug('do read');\\n    state.reading = true;\\n    state.sync = true;\\n    // if the length is currently zero, then we *need* a readable event.\\n    if (state.length === 0) state.needReadable = true;\\n    // call internal read method\\n    this._read(state.highWaterMark);\\n    state.sync = false;\\n    // If _read pushed data synchronously, then `reading` will be false,\\n    // and we need to re-evaluate how much data we can return to the user.\\n    if (!state.reading) n = howMuchToRead(nOrig, state);\\n  }\\n\\n  var ret;\\n  if (n > 0) ret = fromList(n, state);else ret = null;\\n\\n  if (ret === null) {\\n    state.needReadable = true;\\n    n = 0;\\n  } else {\\n    state.length -= n;\\n  }\\n\\n  if (state.length === 0) {\\n    // If we have nothing in the buffer, then we want to know\\n    // as soon as we *do* get something into the buffer.\\n    if (!state.ended) state.needReadable = true;\\n\\n    // If we tried to read() past the EOF, then emit end on the next tick.\\n    if (nOrig !== n && state.ended) endReadable(this);\\n  }\\n\\n  if (ret !== null) this.emit('data', ret);\\n\\n  return ret;\\n};\\n\\nfunction onEofChunk(stream, state) {\\n  if (state.ended) return;\\n  if (state.decoder) {\\n    var chunk = state.decoder.end();\\n    if (chunk && chunk.length) {\\n      state.buffer.push(chunk);\\n      state.length += state.objectMode ? 1 : chunk.length;\\n    }\\n  }\\n  state.ended = true;\\n\\n  // emit 'readable' now to make sure it gets picked up.\\n  emitReadable(stream);\\n}\\n\\n// Don't emit readable right away in sync mode, because this can trigger\\n// another read() call => stack overflow.  This way, it might trigger\\n// a nextTick recursion warning, but that's not so bad.\\nfunction emitReadable(stream) {\\n  var state = stream._readableState;\\n  state.needReadable = false;\\n  if (!state.emittedReadable) {\\n    debug('emitReadable', state.flowing);\\n    state.emittedReadable = true;\\n    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\\n  }\\n}\\n\\nfunction emitReadable_(stream) {\\n  debug('emit readable');\\n  stream.emit('readable');\\n  flow(stream);\\n}\\n\\n// at this point, the user has presumably seen the 'readable' event,\\n// and called read() to consume some data.  that may have triggered\\n// in turn another _read(n) call, in which case reading = true if\\n// it's in progress.\\n// However, if we're not ended, or reading, and the length < hwm,\\n// then go ahead and try to read some more preemptively.\\nfunction maybeReadMore(stream, state) {\\n  if (!state.readingMore) {\\n    state.readingMore = true;\\n    pna.nextTick(maybeReadMore_, stream, state);\\n  }\\n}\\n\\nfunction maybeReadMore_(stream, state) {\\n  var len = state.length;\\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\\n    debug('maybeReadMore read 0');\\n    stream.read(0);\\n    if (len === state.length)\\n      // didn't get any data, stop spinning.\\n      break;else len = state.length;\\n  }\\n  state.readingMore = false;\\n}\\n\\n// abstract method.  to be overridden in specific implementation classes.\\n// call cb(er, data) where data is <= n in length.\\n// for virtual (non-string, non-buffer) streams, \\\"length\\\" is somewhat\\n// arbitrary, and perhaps not very meaningful.\\nReadable.prototype._read = function (n) {\\n  this.emit('error', new Error('_read() is not implemented'));\\n};\\n\\nReadable.prototype.pipe = function (dest, pipeOpts) {\\n  var src = this;\\n  var state = this._readableState;\\n\\n  switch (state.pipesCount) {\\n    case 0:\\n      state.pipes = dest;\\n      break;\\n    case 1:\\n      state.pipes = [state.pipes, dest];\\n      break;\\n    default:\\n      state.pipes.push(dest);\\n      break;\\n  }\\n  state.pipesCount += 1;\\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\\n\\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\\n\\n  var endFn = doEnd ? onend : unpipe;\\n  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\\n\\n  dest.on('unpipe', onunpipe);\\n  function onunpipe(readable, unpipeInfo) {\\n    debug('onunpipe');\\n    if (readable === src) {\\n      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\\n        unpipeInfo.hasUnpiped = true;\\n        cleanup();\\n      }\\n    }\\n  }\\n\\n  function onend() {\\n    debug('onend');\\n    dest.end();\\n  }\\n\\n  // when the dest drains, it reduces the awaitDrain counter\\n  // on the source.  This would be more elegant with a .once()\\n  // handler in flow(), but adding and removing repeatedly is\\n  // too slow.\\n  var ondrain = pipeOnDrain(src);\\n  dest.on('drain', ondrain);\\n\\n  var cleanedUp = false;\\n  function cleanup() {\\n    debug('cleanup');\\n    // cleanup event handlers once the pipe is broken\\n    dest.removeListener('close', onclose);\\n    dest.removeListener('finish', onfinish);\\n    dest.removeListener('drain', ondrain);\\n    dest.removeListener('error', onerror);\\n    dest.removeListener('unpipe', onunpipe);\\n    src.removeListener('end', onend);\\n    src.removeListener('end', unpipe);\\n    src.removeListener('data', ondata);\\n\\n    cleanedUp = true;\\n\\n    // if the reader is waiting for a drain event from this\\n    // specific writer, then it would cause it to never start\\n    // flowing again.\\n    // So, if this is awaiting a drain, then we just call it now.\\n    // If we don't know, then assume that we are waiting for one.\\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\\n  }\\n\\n  // If the user pushes more data while we're writing to dest then we'll end up\\n  // in ondata again. However, we only want to increase awaitDrain once because\\n  // dest will only emit one 'drain' event for the multiple writes.\\n  // => Introduce a guard on increasing awaitDrain.\\n  var increasedAwaitDrain = false;\\n  src.on('data', ondata);\\n  function ondata(chunk) {\\n    debug('ondata');\\n    increasedAwaitDrain = false;\\n    var ret = dest.write(chunk);\\n    if (false === ret && !increasedAwaitDrain) {\\n      // If the user unpiped during `dest.write()`, it is possible\\n      // to get stuck in a permanently paused state if that write\\n      // also returned false.\\n      // => Check whether `dest` is still a piping destination.\\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\\n        debug('false write response, pause', src._readableState.awaitDrain);\\n        src._readableState.awaitDrain++;\\n        increasedAwaitDrain = true;\\n      }\\n      src.pause();\\n    }\\n  }\\n\\n  // if the dest has an error, then stop piping into it.\\n  // however, don't suppress the throwing behavior for this.\\n  function onerror(er) {\\n    debug('onerror', er);\\n    unpipe();\\n    dest.removeListener('error', onerror);\\n    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\\n  }\\n\\n  // Make sure our error handler is attached before userland ones.\\n  prependListener(dest, 'error', onerror);\\n\\n  // Both close and finish should trigger unpipe, but only once.\\n  function onclose() {\\n    dest.removeListener('finish', onfinish);\\n    unpipe();\\n  }\\n  dest.once('close', onclose);\\n  function onfinish() {\\n    debug('onfinish');\\n    dest.removeListener('close', onclose);\\n    unpipe();\\n  }\\n  dest.once('finish', onfinish);\\n\\n  function unpipe() {\\n    debug('unpipe');\\n    src.unpipe(dest);\\n  }\\n\\n  // tell the dest that it's being piped to\\n  dest.emit('pipe', src);\\n\\n  // start the flow if it hasn't been started already.\\n  if (!state.flowing) {\\n    debug('pipe resume');\\n    src.resume();\\n  }\\n\\n  return dest;\\n};\\n\\nfunction pipeOnDrain(src) {\\n  return function () {\\n    var state = src._readableState;\\n    debug('pipeOnDrain', state.awaitDrain);\\n    if (state.awaitDrain) state.awaitDrain--;\\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\\n      state.flowing = true;\\n      flow(src);\\n    }\\n  };\\n}\\n\\nReadable.prototype.unpipe = function (dest) {\\n  var state = this._readableState;\\n  var unpipeInfo = { hasUnpiped: false };\\n\\n  // if we're not piping anywhere, then do nothing.\\n  if (state.pipesCount === 0) return this;\\n\\n  // just one destination.  most common case.\\n  if (state.pipesCount === 1) {\\n    // passed in one, but it's not the right one.\\n    if (dest && dest !== state.pipes) return this;\\n\\n    if (!dest) dest = state.pipes;\\n\\n    // got a match.\\n    state.pipes = null;\\n    state.pipesCount = 0;\\n    state.flowing = false;\\n    if (dest) dest.emit('unpipe', this, unpipeInfo);\\n    return this;\\n  }\\n\\n  // slow case. multiple pipe destinations.\\n\\n  if (!dest) {\\n    // remove all.\\n    var dests = state.pipes;\\n    var len = state.pipesCount;\\n    state.pipes = null;\\n    state.pipesCount = 0;\\n    state.flowing = false;\\n\\n    for (var i = 0; i < len; i++) {\\n      dests[i].emit('unpipe', this, unpipeInfo);\\n    }return this;\\n  }\\n\\n  // try to find the right one.\\n  var index = indexOf(state.pipes, dest);\\n  if (index === -1) return this;\\n\\n  state.pipes.splice(index, 1);\\n  state.pipesCount -= 1;\\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\\n\\n  dest.emit('unpipe', this, unpipeInfo);\\n\\n  return this;\\n};\\n\\n// set up data events if they are asked for\\n// Ensure readable listeners eventually get something\\nReadable.prototype.on = function (ev, fn) {\\n  var res = Stream.prototype.on.call(this, ev, fn);\\n\\n  if (ev === 'data') {\\n    // Start flowing on next tick if stream isn't explicitly paused\\n    if (this._readableState.flowing !== false) this.resume();\\n  } else if (ev === 'readable') {\\n    var state = this._readableState;\\n    if (!state.endEmitted && !state.readableListening) {\\n      state.readableListening = state.needReadable = true;\\n      state.emittedReadable = false;\\n      if (!state.reading) {\\n        pna.nextTick(nReadingNextTick, this);\\n      } else if (state.length) {\\n        emitReadable(this);\\n      }\\n    }\\n  }\\n\\n  return res;\\n};\\nReadable.prototype.addListener = Readable.prototype.on;\\n\\nfunction nReadingNextTick(self) {\\n  debug('readable nexttick read 0');\\n  self.read(0);\\n}\\n\\n// pause() and resume() are remnants of the legacy readable stream API\\n// If the user uses them, then switch into old mode.\\nReadable.prototype.resume = function () {\\n  var state = this._readableState;\\n  if (!state.flowing) {\\n    debug('resume');\\n    state.flowing = true;\\n    resume(this, state);\\n  }\\n  return this;\\n};\\n\\nfunction resume(stream, state) {\\n  if (!state.resumeScheduled) {\\n    state.resumeScheduled = true;\\n    pna.nextTick(resume_, stream, state);\\n  }\\n}\\n\\nfunction resume_(stream, state) {\\n  if (!state.reading) {\\n    debug('resume read 0');\\n    stream.read(0);\\n  }\\n\\n  state.resumeScheduled = false;\\n  state.awaitDrain = 0;\\n  stream.emit('resume');\\n  flow(stream);\\n  if (state.flowing && !state.reading) stream.read(0);\\n}\\n\\nReadable.prototype.pause = function () {\\n  debug('call pause flowing=%j', this._readableState.flowing);\\n  if (false !== this._readableState.flowing) {\\n    debug('pause');\\n    this._readableState.flowing = false;\\n    this.emit('pause');\\n  }\\n  return this;\\n};\\n\\nfunction flow(stream) {\\n  var state = stream._readableState;\\n  debug('flow', state.flowing);\\n  while (state.flowing && stream.read() !== null) {}\\n}\\n\\n// wrap an old-style stream as the async data source.\\n// This is *not* part of the readable stream interface.\\n// It is an ugly unfortunate mess of history.\\nReadable.prototype.wrap = function (stream) {\\n  var _this = this;\\n\\n  var state = this._readableState;\\n  var paused = false;\\n\\n  stream.on('end', function () {\\n    debug('wrapped end');\\n    if (state.decoder && !state.ended) {\\n      var chunk = state.decoder.end();\\n      if (chunk && chunk.length) _this.push(chunk);\\n    }\\n\\n    _this.push(null);\\n  });\\n\\n  stream.on('data', function (chunk) {\\n    debug('wrapped data');\\n    if (state.decoder) chunk = state.decoder.write(chunk);\\n\\n    // don't skip over falsy values in objectMode\\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\\n\\n    var ret = _this.push(chunk);\\n    if (!ret) {\\n      paused = true;\\n      stream.pause();\\n    }\\n  });\\n\\n  // proxy all the other methods.\\n  // important when wrapping filters and duplexes.\\n  for (var i in stream) {\\n    if (this[i] === undefined && typeof stream[i] === 'function') {\\n      this[i] = function (method) {\\n        return function () {\\n          return stream[method].apply(stream, arguments);\\n        };\\n      }(i);\\n    }\\n  }\\n\\n  // proxy certain important events.\\n  for (var n = 0; n < kProxyEvents.length; n++) {\\n    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\\n  }\\n\\n  // when we try to consume some more bytes, simply unpause the\\n  // underlying stream.\\n  this._read = function (n) {\\n    debug('wrapped _read', n);\\n    if (paused) {\\n      paused = false;\\n      stream.resume();\\n    }\\n  };\\n\\n  return this;\\n};\\n\\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\\n  // making it explicit this property is not enumerable\\n  // because otherwise some prototype manipulation in\\n  // userland will fail\\n  enumerable: false,\\n  get: function () {\\n    return this._readableState.highWaterMark;\\n  }\\n});\\n\\n// exposed for testing purposes only.\\nReadable._fromList = fromList;\\n\\n// Pluck off n bytes from an array of buffers.\\n// Length is the combined lengths of all the buffers in the list.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction fromList(n, state) {\\n  // nothing buffered\\n  if (state.length === 0) return null;\\n\\n  var ret;\\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\\n    // read it all, truncate the list\\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\\n    state.buffer.clear();\\n  } else {\\n    // read part of list\\n    ret = fromListPartial(n, state.buffer, state.decoder);\\n  }\\n\\n  return ret;\\n}\\n\\n// Extracts only enough buffered data to satisfy the amount requested.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction fromListPartial(n, list, hasStrings) {\\n  var ret;\\n  if (n < list.head.data.length) {\\n    // slice is the same for buffers and strings\\n    ret = list.head.data.slice(0, n);\\n    list.head.data = list.head.data.slice(n);\\n  } else if (n === list.head.data.length) {\\n    // first chunk is a perfect match\\n    ret = list.shift();\\n  } else {\\n    // result spans more than one buffer\\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\\n  }\\n  return ret;\\n}\\n\\n// Copies a specified amount of characters from the list of buffered data\\n// chunks.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction copyFromBufferString(n, list) {\\n  var p = list.head;\\n  var c = 1;\\n  var ret = p.data;\\n  n -= ret.length;\\n  while (p = p.next) {\\n    var str = p.data;\\n    var nb = n > str.length ? str.length : n;\\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\\n    n -= nb;\\n    if (n === 0) {\\n      if (nb === str.length) {\\n        ++c;\\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\\n      } else {\\n        list.head = p;\\n        p.data = str.slice(nb);\\n      }\\n      break;\\n    }\\n    ++c;\\n  }\\n  list.length -= c;\\n  return ret;\\n}\\n\\n// Copies a specified amount of bytes from the list of buffered data chunks.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction copyFromBuffer(n, list) {\\n  var ret = Buffer.allocUnsafe(n);\\n  var p = list.head;\\n  var c = 1;\\n  p.data.copy(ret);\\n  n -= p.data.length;\\n  while (p = p.next) {\\n    var buf = p.data;\\n    var nb = n > buf.length ? buf.length : n;\\n    buf.copy(ret, ret.length - n, 0, nb);\\n    n -= nb;\\n    if (n === 0) {\\n      if (nb === buf.length) {\\n        ++c;\\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\\n      } else {\\n        list.head = p;\\n        p.data = buf.slice(nb);\\n      }\\n      break;\\n    }\\n    ++c;\\n  }\\n  list.length -= c;\\n  return ret;\\n}\\n\\nfunction endReadable(stream) {\\n  var state = stream._readableState;\\n\\n  // If we get here before consuming all the bytes, then that is a\\n  // bug in node.  Should never happen.\\n  if (state.length > 0) throw new Error('\\\"endReadable()\\\" called on non-empty stream');\\n\\n  if (!state.endEmitted) {\\n    state.ended = true;\\n    pna.nextTick(endReadableNT, state, stream);\\n  }\\n}\\n\\nfunction endReadableNT(state, stream) {\\n  // Check that we didn't get one last unshift.\\n  if (!state.endEmitted && state.length === 0) {\\n    state.endEmitted = true;\\n    stream.readable = false;\\n    stream.emit('end');\\n  }\\n}\\n\\nfunction indexOf(xs, x) {\\n  for (var i = 0, l = xs.length; i < l; i++) {\\n    if (xs[i] === x) return i;\\n  }\\n  return -1;\\n}\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\"), __webpack_require__(/*! ./../../process/browser.js */ \\\"../node_modules/process/browser.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_readable.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/_stream_transform.js\":\n/*!****************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/_stream_transform.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// a transform stream is a readable/writable stream where you do\\n// something with the data.  Sometimes it's called a \\\"filter\\\",\\n// but that's not a great name for it, since that implies a thing where\\n// some bits pass through, and others are simply ignored.  (That would\\n// be a valid example of a transform, of course.)\\n//\\n// While the output is causally related to the input, it's not a\\n// necessarily symmetric or synchronous transformation.  For example,\\n// a zlib stream might take multiple plain-text writes(), and then\\n// emit a single compressed chunk some time in the future.\\n//\\n// Here's how this works:\\n//\\n// The Transform stream has all the aspects of the readable and writable\\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\\n// internally, and returns false if there's a lot of pending writes\\n// buffered up.  When you call read(), that calls _read(n) until\\n// there's enough pending readable data buffered up.\\n//\\n// In a transform stream, the written data is placed in a buffer.  When\\n// _read(n) is called, it transforms the queued up data, calling the\\n// buffered _write cb's as it consumes chunks.  If consuming a single\\n// written chunk would result in multiple output chunks, then the first\\n// outputted bit calls the readcb, and subsequent chunks just go into\\n// the read buffer, and will cause it to emit 'readable' if necessary.\\n//\\n// This way, back-pressure is actually determined by the reading side,\\n// since _read has to be called to start processing a new chunk.  However,\\n// a pathological inflate type of transform can cause excessive buffering\\n// here.  For example, imagine a stream where every byte of input is\\n// interpreted as an integer from 0-255, and then results in that many\\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\\n// 1kb of data being output.  In this case, you could write a very small\\n// amount of input, and end up with a very large amount of output.  In\\n// such a pathological inflating mechanism, there'd be no way to tell\\n// the system to stop doing the transform.  A single 4MB write could\\n// cause the system to run out of memory.\\n//\\n// However, even in such a pathological case, only a single written chunk\\n// would be consumed, and then the rest would wait (un-transformed) until\\n// the results of the previous transformed chunk were consumed.\\n\\n\\n\\nmodule.exports = Transform;\\n\\nvar Duplex = __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\nutil.inherits(Transform, Duplex);\\n\\nfunction afterTransform(er, data) {\\n  var ts = this._transformState;\\n  ts.transforming = false;\\n\\n  var cb = ts.writecb;\\n\\n  if (!cb) {\\n    return this.emit('error', new Error('write callback called multiple times'));\\n  }\\n\\n  ts.writechunk = null;\\n  ts.writecb = null;\\n\\n  if (data != null) // single equals check for both `null` and `undefined`\\n    this.push(data);\\n\\n  cb(er);\\n\\n  var rs = this._readableState;\\n  rs.reading = false;\\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\\n    this._read(rs.highWaterMark);\\n  }\\n}\\n\\nfunction Transform(options) {\\n  if (!(this instanceof Transform)) return new Transform(options);\\n\\n  Duplex.call(this, options);\\n\\n  this._transformState = {\\n    afterTransform: afterTransform.bind(this),\\n    needTransform: false,\\n    transforming: false,\\n    writecb: null,\\n    writechunk: null,\\n    writeencoding: null\\n  };\\n\\n  // start out asking for a readable event once data is transformed.\\n  this._readableState.needReadable = true;\\n\\n  // we have implemented the _read method, and done the other things\\n  // that Readable wants before the first _read call, so unset the\\n  // sync guard flag.\\n  this._readableState.sync = false;\\n\\n  if (options) {\\n    if (typeof options.transform === 'function') this._transform = options.transform;\\n\\n    if (typeof options.flush === 'function') this._flush = options.flush;\\n  }\\n\\n  // When the writable side finishes, then flush out anything remaining.\\n  this.on('prefinish', prefinish);\\n}\\n\\nfunction prefinish() {\\n  var _this = this;\\n\\n  if (typeof this._flush === 'function') {\\n    this._flush(function (er, data) {\\n      done(_this, er, data);\\n    });\\n  } else {\\n    done(this, null, null);\\n  }\\n}\\n\\nTransform.prototype.push = function (chunk, encoding) {\\n  this._transformState.needTransform = false;\\n  return Duplex.prototype.push.call(this, chunk, encoding);\\n};\\n\\n// This is the part where you do stuff!\\n// override this function in implementation classes.\\n// 'chunk' is an input chunk.\\n//\\n// Call `push(newChunk)` to pass along transformed output\\n// to the readable side.  You may call 'push' zero or more times.\\n//\\n// Call `cb(err)` when you are done with this chunk.  If you pass\\n// an error, then that'll put the hurt on the whole operation.  If you\\n// never call cb(), then you'll never get another chunk.\\nTransform.prototype._transform = function (chunk, encoding, cb) {\\n  throw new Error('_transform() is not implemented');\\n};\\n\\nTransform.prototype._write = function (chunk, encoding, cb) {\\n  var ts = this._transformState;\\n  ts.writecb = cb;\\n  ts.writechunk = chunk;\\n  ts.writeencoding = encoding;\\n  if (!ts.transforming) {\\n    var rs = this._readableState;\\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\\n  }\\n};\\n\\n// Doesn't matter what the args are here.\\n// _transform does all the work.\\n// That we got here means that the readable side wants more data.\\nTransform.prototype._read = function (n) {\\n  var ts = this._transformState;\\n\\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\\n    ts.transforming = true;\\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\\n  } else {\\n    // mark that we need a transform, so that any data that comes in\\n    // will get processed, now that we've asked for it.\\n    ts.needTransform = true;\\n  }\\n};\\n\\nTransform.prototype._destroy = function (err, cb) {\\n  var _this2 = this;\\n\\n  Duplex.prototype._destroy.call(this, err, function (err2) {\\n    cb(err2);\\n    _this2.emit('close');\\n  });\\n};\\n\\nfunction done(stream, er, data) {\\n  if (er) return stream.emit('error', er);\\n\\n  if (data != null) // single equals check for both `null` and `undefined`\\n    stream.push(data);\\n\\n  // if there's nothing in the write buffer, then that means\\n  // that nothing more will ever be provided\\n  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\\n\\n  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\\n\\n  return stream.push(null);\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_transform.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/_stream_writable.js\":\n/*!***************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/_stream_writable.js ***!\n  \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// A bit simpler than readable streams.\\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\\n// the drain event emission and buffering.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\nmodule.exports = Writable;\\n\\n/* <replacement> */\\nfunction WriteReq(chunk, encoding, cb) {\\n  this.chunk = chunk;\\n  this.encoding = encoding;\\n  this.callback = cb;\\n  this.next = null;\\n}\\n\\n// It seems a linked list but it is not\\n// there will be only 2 of these for each stream\\nfunction CorkedRequest(state) {\\n  var _this = this;\\n\\n  this.next = null;\\n  this.entry = null;\\n  this.finish = function () {\\n    onCorkedFinish(_this, state);\\n  };\\n}\\n/* </replacement> */\\n\\n/*<replacement>*/\\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Duplex;\\n/*</replacement>*/\\n\\nWritable.WritableState = WritableState;\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar internalUtil = {\\n  deprecate: __webpack_require__(/*! util-deprecate */ \\\"../node_modules/util-deprecate/browser.js\\\")\\n};\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \\\"../node_modules/readable-stream/lib/internal/streams/stream-browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\\\").Buffer;\\nvar OurUint8Array = global.Uint8Array || function () {};\\nfunction _uint8ArrayToBuffer(chunk) {\\n  return Buffer.from(chunk);\\n}\\nfunction _isUint8Array(obj) {\\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\\n}\\n\\n/*</replacement>*/\\n\\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \\\"../node_modules/readable-stream/lib/internal/streams/destroy.js\\\");\\n\\nutil.inherits(Writable, Stream);\\n\\nfunction nop() {}\\n\\nfunction WritableState(options, stream) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  options = options || {};\\n\\n  // Duplex streams are both readable and writable, but share\\n  // the same options object.\\n  // However, some cases require setting options to different\\n  // values for the readable and the writable sides of the duplex stream.\\n  // These options can be provided separately as readableXXX and writableXXX.\\n  var isDuplex = stream instanceof Duplex;\\n\\n  // object stream flag to indicate whether or not this stream\\n  // contains buffers or objects.\\n  this.objectMode = !!options.objectMode;\\n\\n  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\\n\\n  // the point at which write() starts returning false\\n  // Note: 0 is a valid value, means that we always return false if\\n  // the entire buffer is not flushed immediately on write()\\n  var hwm = options.highWaterMark;\\n  var writableHwm = options.writableHighWaterMark;\\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\\n\\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\\n\\n  // cast to ints.\\n  this.highWaterMark = Math.floor(this.highWaterMark);\\n\\n  // if _final has been called\\n  this.finalCalled = false;\\n\\n  // drain event flag.\\n  this.needDrain = false;\\n  // at the start of calling end()\\n  this.ending = false;\\n  // when end() has been called, and returned\\n  this.ended = false;\\n  // when 'finish' is emitted\\n  this.finished = false;\\n\\n  // has it been destroyed\\n  this.destroyed = false;\\n\\n  // should we decode strings into buffers before passing to _write?\\n  // this is here so that some node-core streams can optimize string\\n  // handling at a lower level.\\n  var noDecode = options.decodeStrings === false;\\n  this.decodeStrings = !noDecode;\\n\\n  // Crypto is kind of old and crusty.  Historically, its default string\\n  // encoding is 'binary' so we have to make this configurable.\\n  // Everything else in the universe uses 'utf8', though.\\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\\n\\n  // not an actual buffer we keep track of, but a measurement\\n  // of how much we're waiting to get pushed to some underlying\\n  // socket or file.\\n  this.length = 0;\\n\\n  // a flag to see when we're in the middle of a write.\\n  this.writing = false;\\n\\n  // when true all writes will be buffered until .uncork() call\\n  this.corked = 0;\\n\\n  // a flag to be able to tell if the onwrite cb is called immediately,\\n  // or on a later tick.  We set this to true at first, because any\\n  // actions that shouldn't happen until \\\"later\\\" should generally also\\n  // not happen before the first write call.\\n  this.sync = true;\\n\\n  // a flag to know if we're processing previously buffered items, which\\n  // may call the _write() callback in the same tick, so that we don't\\n  // end up in an overlapped onwrite situation.\\n  this.bufferProcessing = false;\\n\\n  // the callback that's passed to _write(chunk,cb)\\n  this.onwrite = function (er) {\\n    onwrite(stream, er);\\n  };\\n\\n  // the callback that the user supplies to write(chunk,encoding,cb)\\n  this.writecb = null;\\n\\n  // the amount that is being written when _write is called.\\n  this.writelen = 0;\\n\\n  this.bufferedRequest = null;\\n  this.lastBufferedRequest = null;\\n\\n  // number of pending user-supplied write callbacks\\n  // this must be 0 before 'finish' can be emitted\\n  this.pendingcb = 0;\\n\\n  // emit prefinish if the only thing we're waiting for is _write cbs\\n  // This is relevant for synchronous Transform streams\\n  this.prefinished = false;\\n\\n  // True if the error was already emitted and should not be thrown again\\n  this.errorEmitted = false;\\n\\n  // count buffered requests\\n  this.bufferedRequestCount = 0;\\n\\n  // allocate the first CorkedRequest, there is always\\n  // one allocated and free to use, and we maintain at most two\\n  this.corkedRequestsFree = new CorkedRequest(this);\\n}\\n\\nWritableState.prototype.getBuffer = function getBuffer() {\\n  var current = this.bufferedRequest;\\n  var out = [];\\n  while (current) {\\n    out.push(current);\\n    current = current.next;\\n  }\\n  return out;\\n};\\n\\n(function () {\\n  try {\\n    Object.defineProperty(WritableState.prototype, 'buffer', {\\n      get: internalUtil.deprecate(function () {\\n        return this.getBuffer();\\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\\n    });\\n  } catch (_) {}\\n})();\\n\\n// Test _writableState for inheritance to account for Duplex streams,\\n// whose prototype chain only points to Readable.\\nvar realHasInstance;\\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\\n  realHasInstance = Function.prototype[Symbol.hasInstance];\\n  Object.defineProperty(Writable, Symbol.hasInstance, {\\n    value: function (object) {\\n      if (realHasInstance.call(this, object)) return true;\\n      if (this !== Writable) return false;\\n\\n      return object && object._writableState instanceof WritableState;\\n    }\\n  });\\n} else {\\n  realHasInstance = function (object) {\\n    return object instanceof this;\\n  };\\n}\\n\\nfunction Writable(options) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  // Writable ctor is applied to Duplexes, too.\\n  // `realHasInstance` is necessary because using plain `instanceof`\\n  // would return false, as no `_writableState` property is attached.\\n\\n  // Trying to use the custom `instanceof` for Writable here will also break the\\n  // Node.js LazyTransform implementation, which has a non-trivial getter for\\n  // `_writableState` that would lead to infinite recursion.\\n  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\\n    return new Writable(options);\\n  }\\n\\n  this._writableState = new WritableState(options, this);\\n\\n  // legacy.\\n  this.writable = true;\\n\\n  if (options) {\\n    if (typeof options.write === 'function') this._write = options.write;\\n\\n    if (typeof options.writev === 'function') this._writev = options.writev;\\n\\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\\n\\n    if (typeof options.final === 'function') this._final = options.final;\\n  }\\n\\n  Stream.call(this);\\n}\\n\\n// Otherwise people can pipe Writable streams, which is just wrong.\\nWritable.prototype.pipe = function () {\\n  this.emit('error', new Error('Cannot pipe, not readable'));\\n};\\n\\nfunction writeAfterEnd(stream, cb) {\\n  var er = new Error('write after end');\\n  // TODO: defer error events consistently everywhere, not just the cb\\n  stream.emit('error', er);\\n  pna.nextTick(cb, er);\\n}\\n\\n// Checks that a user-supplied chunk is valid, especially for the particular\\n// mode the stream is in. Currently this means that `null` is never accepted\\n// and undefined/non-string values are only allowed in object mode.\\nfunction validChunk(stream, state, chunk, cb) {\\n  var valid = true;\\n  var er = false;\\n\\n  if (chunk === null) {\\n    er = new TypeError('May not write null values to stream');\\n  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\\n    er = new TypeError('Invalid non-string/buffer chunk');\\n  }\\n  if (er) {\\n    stream.emit('error', er);\\n    pna.nextTick(cb, er);\\n    valid = false;\\n  }\\n  return valid;\\n}\\n\\nWritable.prototype.write = function (chunk, encoding, cb) {\\n  var state = this._writableState;\\n  var ret = false;\\n  var isBuf = !state.objectMode && _isUint8Array(chunk);\\n\\n  if (isBuf && !Buffer.isBuffer(chunk)) {\\n    chunk = _uint8ArrayToBuffer(chunk);\\n  }\\n\\n  if (typeof encoding === 'function') {\\n    cb = encoding;\\n    encoding = null;\\n  }\\n\\n  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\\n\\n  if (typeof cb !== 'function') cb = nop;\\n\\n  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\\n    state.pendingcb++;\\n    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\\n  }\\n\\n  return ret;\\n};\\n\\nWritable.prototype.cork = function () {\\n  var state = this._writableState;\\n\\n  state.corked++;\\n};\\n\\nWritable.prototype.uncork = function () {\\n  var state = this._writableState;\\n\\n  if (state.corked) {\\n    state.corked--;\\n\\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\\n  }\\n};\\n\\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\\n  // node::ParseEncoding() requires lower case.\\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\\n  this._writableState.defaultEncoding = encoding;\\n  return this;\\n};\\n\\nfunction decodeChunk(state, chunk, encoding) {\\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\\n    chunk = Buffer.from(chunk, encoding);\\n  }\\n  return chunk;\\n}\\n\\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\\n  // making it explicit this property is not enumerable\\n  // because otherwise some prototype manipulation in\\n  // userland will fail\\n  enumerable: false,\\n  get: function () {\\n    return this._writableState.highWaterMark;\\n  }\\n});\\n\\n// if we're already writing something, then just put this\\n// in the queue, and wait our turn.  Otherwise, call _write\\n// If we return false, then we need a drain event, so set that flag.\\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\\n  if (!isBuf) {\\n    var newChunk = decodeChunk(state, chunk, encoding);\\n    if (chunk !== newChunk) {\\n      isBuf = true;\\n      encoding = 'buffer';\\n      chunk = newChunk;\\n    }\\n  }\\n  var len = state.objectMode ? 1 : chunk.length;\\n\\n  state.length += len;\\n\\n  var ret = state.length < state.highWaterMark;\\n  // we must ensure that previous needDrain will not be reset to false.\\n  if (!ret) state.needDrain = true;\\n\\n  if (state.writing || state.corked) {\\n    var last = state.lastBufferedRequest;\\n    state.lastBufferedRequest = {\\n      chunk: chunk,\\n      encoding: encoding,\\n      isBuf: isBuf,\\n      callback: cb,\\n      next: null\\n    };\\n    if (last) {\\n      last.next = state.lastBufferedRequest;\\n    } else {\\n      state.bufferedRequest = state.lastBufferedRequest;\\n    }\\n    state.bufferedRequestCount += 1;\\n  } else {\\n    doWrite(stream, state, false, len, chunk, encoding, cb);\\n  }\\n\\n  return ret;\\n}\\n\\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\\n  state.writelen = len;\\n  state.writecb = cb;\\n  state.writing = true;\\n  state.sync = true;\\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\\n  state.sync = false;\\n}\\n\\nfunction onwriteError(stream, state, sync, er, cb) {\\n  --state.pendingcb;\\n\\n  if (sync) {\\n    // defer the callback if we are being called synchronously\\n    // to avoid piling up things on the stack\\n    pna.nextTick(cb, er);\\n    // this can emit finish, and it will always happen\\n    // after error\\n    pna.nextTick(finishMaybe, stream, state);\\n    stream._writableState.errorEmitted = true;\\n    stream.emit('error', er);\\n  } else {\\n    // the caller expect this to happen before if\\n    // it is async\\n    cb(er);\\n    stream._writableState.errorEmitted = true;\\n    stream.emit('error', er);\\n    // this can emit finish, but finish must\\n    // always follow error\\n    finishMaybe(stream, state);\\n  }\\n}\\n\\nfunction onwriteStateUpdate(state) {\\n  state.writing = false;\\n  state.writecb = null;\\n  state.length -= state.writelen;\\n  state.writelen = 0;\\n}\\n\\nfunction onwrite(stream, er) {\\n  var state = stream._writableState;\\n  var sync = state.sync;\\n  var cb = state.writecb;\\n\\n  onwriteStateUpdate(state);\\n\\n  if (er) onwriteError(stream, state, sync, er, cb);else {\\n    // Check if we're actually ready to finish, but don't emit yet\\n    var finished = needFinish(state);\\n\\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\\n      clearBuffer(stream, state);\\n    }\\n\\n    if (sync) {\\n      /*<replacement>*/\\n      asyncWrite(afterWrite, stream, state, finished, cb);\\n      /*</replacement>*/\\n    } else {\\n      afterWrite(stream, state, finished, cb);\\n    }\\n  }\\n}\\n\\nfunction afterWrite(stream, state, finished, cb) {\\n  if (!finished) onwriteDrain(stream, state);\\n  state.pendingcb--;\\n  cb();\\n  finishMaybe(stream, state);\\n}\\n\\n// Must force callback to be called on nextTick, so that we don't\\n// emit 'drain' before the write() consumer gets the 'false' return\\n// value, and has a chance to attach a 'drain' listener.\\nfunction onwriteDrain(stream, state) {\\n  if (state.length === 0 && state.needDrain) {\\n    state.needDrain = false;\\n    stream.emit('drain');\\n  }\\n}\\n\\n// if there's something in the buffer waiting, then process it\\nfunction clearBuffer(stream, state) {\\n  state.bufferProcessing = true;\\n  var entry = state.bufferedRequest;\\n\\n  if (stream._writev && entry && entry.next) {\\n    // Fast case, write everything using _writev()\\n    var l = state.bufferedRequestCount;\\n    var buffer = new Array(l);\\n    var holder = state.corkedRequestsFree;\\n    holder.entry = entry;\\n\\n    var count = 0;\\n    var allBuffers = true;\\n    while (entry) {\\n      buffer[count] = entry;\\n      if (!entry.isBuf) allBuffers = false;\\n      entry = entry.next;\\n      count += 1;\\n    }\\n    buffer.allBuffers = allBuffers;\\n\\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\\n\\n    // doWrite is almost always async, defer these to save a bit of time\\n    // as the hot path ends with doWrite\\n    state.pendingcb++;\\n    state.lastBufferedRequest = null;\\n    if (holder.next) {\\n      state.corkedRequestsFree = holder.next;\\n      holder.next = null;\\n    } else {\\n      state.corkedRequestsFree = new CorkedRequest(state);\\n    }\\n    state.bufferedRequestCount = 0;\\n  } else {\\n    // Slow case, write chunks one-by-one\\n    while (entry) {\\n      var chunk = entry.chunk;\\n      var encoding = entry.encoding;\\n      var cb = entry.callback;\\n      var len = state.objectMode ? 1 : chunk.length;\\n\\n      doWrite(stream, state, false, len, chunk, encoding, cb);\\n      entry = entry.next;\\n      state.bufferedRequestCount--;\\n      // if we didn't call the onwrite immediately, then\\n      // it means that we need to wait until it does.\\n      // also, that means that the chunk and cb are currently\\n      // being processed, so move the buffer counter past them.\\n      if (state.writing) {\\n        break;\\n      }\\n    }\\n\\n    if (entry === null) state.lastBufferedRequest = null;\\n  }\\n\\n  state.bufferedRequest = entry;\\n  state.bufferProcessing = false;\\n}\\n\\nWritable.prototype._write = function (chunk, encoding, cb) {\\n  cb(new Error('_write() is not implemented'));\\n};\\n\\nWritable.prototype._writev = null;\\n\\nWritable.prototype.end = function (chunk, encoding, cb) {\\n  var state = this._writableState;\\n\\n  if (typeof chunk === 'function') {\\n    cb = chunk;\\n    chunk = null;\\n    encoding = null;\\n  } else if (typeof encoding === 'function') {\\n    cb = encoding;\\n    encoding = null;\\n  }\\n\\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\\n\\n  // .end() fully uncorks\\n  if (state.corked) {\\n    state.corked = 1;\\n    this.uncork();\\n  }\\n\\n  // ignore unnecessary end() calls.\\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\\n};\\n\\nfunction needFinish(state) {\\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\\n}\\nfunction callFinal(stream, state) {\\n  stream._final(function (err) {\\n    state.pendingcb--;\\n    if (err) {\\n      stream.emit('error', err);\\n    }\\n    state.prefinished = true;\\n    stream.emit('prefinish');\\n    finishMaybe(stream, state);\\n  });\\n}\\nfunction prefinish(stream, state) {\\n  if (!state.prefinished && !state.finalCalled) {\\n    if (typeof stream._final === 'function') {\\n      state.pendingcb++;\\n      state.finalCalled = true;\\n      pna.nextTick(callFinal, stream, state);\\n    } else {\\n      state.prefinished = true;\\n      stream.emit('prefinish');\\n    }\\n  }\\n}\\n\\nfunction finishMaybe(stream, state) {\\n  var need = needFinish(state);\\n  if (need) {\\n    prefinish(stream, state);\\n    if (state.pendingcb === 0) {\\n      state.finished = true;\\n      stream.emit('finish');\\n    }\\n  }\\n  return need;\\n}\\n\\nfunction endWritable(stream, state, cb) {\\n  state.ending = true;\\n  finishMaybe(stream, state);\\n  if (cb) {\\n    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\\n  }\\n  state.ended = true;\\n  stream.writable = false;\\n}\\n\\nfunction onCorkedFinish(corkReq, state, err) {\\n  var entry = corkReq.entry;\\n  corkReq.entry = null;\\n  while (entry) {\\n    var cb = entry.callback;\\n    state.pendingcb--;\\n    cb(err);\\n    entry = entry.next;\\n  }\\n  if (state.corkedRequestsFree) {\\n    state.corkedRequestsFree.next = corkReq;\\n  } else {\\n    state.corkedRequestsFree = corkReq;\\n  }\\n}\\n\\nObject.defineProperty(Writable.prototype, 'destroyed', {\\n  get: function () {\\n    if (this._writableState === undefined) {\\n      return false;\\n    }\\n    return this._writableState.destroyed;\\n  },\\n  set: function (value) {\\n    // we ignore the value if the stream\\n    // has not been initialized yet\\n    if (!this._writableState) {\\n      return;\\n    }\\n\\n    // backward compatibility, the user is explicitly\\n    // managing destroyed\\n    this._writableState.destroyed = value;\\n  }\\n});\\n\\nWritable.prototype.destroy = destroyImpl.destroy;\\nWritable.prototype._undestroy = destroyImpl.undestroy;\\nWritable.prototype._destroy = function (err, cb) {\\n  this.end();\\n  cb(err);\\n};\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \\\"../node_modules/process/browser.js\\\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \\\"../node_modules/timers-browserify/main.js\\\").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_writable.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/internal/streams/BufferList.js\":\n/*!**************************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/internal/streams/BufferList.js ***!\n  \\**************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\\\").Buffer;\\nvar util = __webpack_require__(/*! util */ 3);\\n\\nfunction copyBuffer(src, target, offset) {\\n  src.copy(target, offset);\\n}\\n\\nmodule.exports = function () {\\n  function BufferList() {\\n    _classCallCheck(this, BufferList);\\n\\n    this.head = null;\\n    this.tail = null;\\n    this.length = 0;\\n  }\\n\\n  BufferList.prototype.push = function push(v) {\\n    var entry = { data: v, next: null };\\n    if (this.length > 0) this.tail.next = entry;else this.head = entry;\\n    this.tail = entry;\\n    ++this.length;\\n  };\\n\\n  BufferList.prototype.unshift = function unshift(v) {\\n    var entry = { data: v, next: this.head };\\n    if (this.length === 0) this.tail = entry;\\n    this.head = entry;\\n    ++this.length;\\n  };\\n\\n  BufferList.prototype.shift = function shift() {\\n    if (this.length === 0) return;\\n    var ret = this.head.data;\\n    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\\n    --this.length;\\n    return ret;\\n  };\\n\\n  BufferList.prototype.clear = function clear() {\\n    this.head = this.tail = null;\\n    this.length = 0;\\n  };\\n\\n  BufferList.prototype.join = function join(s) {\\n    if (this.length === 0) return '';\\n    var p = this.head;\\n    var ret = '' + p.data;\\n    while (p = p.next) {\\n      ret += s + p.data;\\n    }return ret;\\n  };\\n\\n  BufferList.prototype.concat = function concat(n) {\\n    if (this.length === 0) return Buffer.alloc(0);\\n    if (this.length === 1) return this.head.data;\\n    var ret = Buffer.allocUnsafe(n >>> 0);\\n    var p = this.head;\\n    var i = 0;\\n    while (p) {\\n      copyBuffer(p.data, ret, i);\\n      i += p.data.length;\\n      p = p.next;\\n    }\\n    return ret;\\n  };\\n\\n  return BufferList;\\n}();\\n\\nif (util && util.inspect && util.inspect.custom) {\\n  module.exports.prototype[util.inspect.custom] = function () {\\n    var obj = util.inspect({ length: this.length });\\n    return this.constructor.name + ' ' + obj;\\n  };\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/internal/streams/BufferList.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/internal/streams/destroy.js\":\n/*!***********************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/internal/streams/destroy.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\n// undocumented cb() API, needed for core, not for public API\\nfunction destroy(err, cb) {\\n  var _this = this;\\n\\n  var readableDestroyed = this._readableState && this._readableState.destroyed;\\n  var writableDestroyed = this._writableState && this._writableState.destroyed;\\n\\n  if (readableDestroyed || writableDestroyed) {\\n    if (cb) {\\n      cb(err);\\n    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\\n      pna.nextTick(emitErrorNT, this, err);\\n    }\\n    return this;\\n  }\\n\\n  // we set destroyed to true before firing error callbacks in order\\n  // to make it re-entrance safe in case destroy() is called within callbacks\\n\\n  if (this._readableState) {\\n    this._readableState.destroyed = true;\\n  }\\n\\n  // if this is a duplex stream mark the writable part as destroyed as well\\n  if (this._writableState) {\\n    this._writableState.destroyed = true;\\n  }\\n\\n  this._destroy(err || null, function (err) {\\n    if (!cb && err) {\\n      pna.nextTick(emitErrorNT, _this, err);\\n      if (_this._writableState) {\\n        _this._writableState.errorEmitted = true;\\n      }\\n    } else if (cb) {\\n      cb(err);\\n    }\\n  });\\n\\n  return this;\\n}\\n\\nfunction undestroy() {\\n  if (this._readableState) {\\n    this._readableState.destroyed = false;\\n    this._readableState.reading = false;\\n    this._readableState.ended = false;\\n    this._readableState.endEmitted = false;\\n  }\\n\\n  if (this._writableState) {\\n    this._writableState.destroyed = false;\\n    this._writableState.ended = false;\\n    this._writableState.ending = false;\\n    this._writableState.finished = false;\\n    this._writableState.errorEmitted = false;\\n  }\\n}\\n\\nfunction emitErrorNT(self, err) {\\n  self.emit('error', err);\\n}\\n\\nmodule.exports = {\\n  destroy: destroy,\\n  undestroy: undestroy\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/internal/streams/destroy.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/lib/internal/streams/stream-browser.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"module.exports = __webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\").EventEmitter;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/internal/streams/stream-browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/node_modules/safe-buffer/index.js\":\n/*!*************************************************************************!*\\\n  !*** ../node_modules/readable-stream/node_modules/safe-buffer/index.js ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* eslint-disable node/no-deprecated-api */\\nvar buffer = __webpack_require__(/*! buffer */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\")\\nvar Buffer = buffer.Buffer\\n\\n// alternative to using Object.keys for old browsers\\nfunction copyProps (src, dst) {\\n  for (var key in src) {\\n    dst[key] = src[key]\\n  }\\n}\\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\\n  module.exports = buffer\\n} else {\\n  // Copy properties from require('buffer')\\n  copyProps(buffer, exports)\\n  exports.Buffer = SafeBuffer\\n}\\n\\nfunction SafeBuffer (arg, encodingOrOffset, length) {\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\n// Copy static methods from Buffer\\ncopyProps(Buffer, SafeBuffer)\\n\\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\\n  if (typeof arg === 'number') {\\n    throw new TypeError('Argument must not be a number')\\n  }\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\nSafeBuffer.alloc = function (size, fill, encoding) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  var buf = Buffer(size)\\n  if (fill !== undefined) {\\n    if (typeof encoding === 'string') {\\n      buf.fill(fill, encoding)\\n    } else {\\n      buf.fill(fill)\\n    }\\n  } else {\\n    buf.fill(0)\\n  }\\n  return buf\\n}\\n\\nSafeBuffer.allocUnsafe = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return Buffer(size)\\n}\\n\\nSafeBuffer.allocUnsafeSlow = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return buffer.SlowBuffer(size)\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/node_modules/safe-buffer/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/passthrough.js\":\n/*!******************************************************!*\\\n  !*** ../node_modules/readable-stream/passthrough.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"module.exports = __webpack_require__(/*! ./readable */ \\\"../node_modules/readable-stream/readable-browser.js\\\").PassThrough\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/passthrough.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/readable-browser.js\":\n/*!***********************************************************!*\\\n  !*** ../node_modules/readable-stream/readable-browser.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ \\\"../node_modules/readable-stream/lib/_stream_readable.js\\\");\\nexports.Stream = exports;\\nexports.Readable = exports;\\nexports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ \\\"../node_modules/readable-stream/lib/_stream_writable.js\\\");\\nexports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\nexports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ \\\"../node_modules/readable-stream/lib/_stream_transform.js\\\");\\nexports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ \\\"../node_modules/readable-stream/lib/_stream_passthrough.js\\\");\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/readable-browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/transform.js\":\n/*!****************************************************!*\\\n  !*** ../node_modules/readable-stream/transform.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"module.exports = __webpack_require__(/*! ./readable */ \\\"../node_modules/readable-stream/readable-browser.js\\\").Transform\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/transform.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/readable-stream/writable-browser.js\":\n/*!***********************************************************!*\\\n  !*** ../node_modules/readable-stream/writable-browser.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ \\\"../node_modules/readable-stream/lib/_stream_writable.js\\\");\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/writable-browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/safe-buffer/index.js\":\n/*!********************************************!*\\\n  !*** ../node_modules/safe-buffer/index.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\\n/* eslint-disable node/no-deprecated-api */\\nvar buffer = __webpack_require__(/*! buffer */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\")\\nvar Buffer = buffer.Buffer\\n\\n// alternative to using Object.keys for old browsers\\nfunction copyProps (src, dst) {\\n  for (var key in src) {\\n    dst[key] = src[key]\\n  }\\n}\\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\\n  module.exports = buffer\\n} else {\\n  // Copy properties from require('buffer')\\n  copyProps(buffer, exports)\\n  exports.Buffer = SafeBuffer\\n}\\n\\nfunction SafeBuffer (arg, encodingOrOffset, length) {\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\nSafeBuffer.prototype = Object.create(Buffer.prototype)\\n\\n// Copy static methods from Buffer\\ncopyProps(Buffer, SafeBuffer)\\n\\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\\n  if (typeof arg === 'number') {\\n    throw new TypeError('Argument must not be a number')\\n  }\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\nSafeBuffer.alloc = function (size, fill, encoding) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  var buf = Buffer(size)\\n  if (fill !== undefined) {\\n    if (typeof encoding === 'string') {\\n      buf.fill(fill, encoding)\\n    } else {\\n      buf.fill(fill)\\n    }\\n  } else {\\n    buf.fill(0)\\n  }\\n  return buf\\n}\\n\\nSafeBuffer.allocUnsafe = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return Buffer(size)\\n}\\n\\nSafeBuffer.allocUnsafeSlow = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return buffer.SlowBuffer(size)\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/safe-buffer/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/safe-json-parse/tuple.js\":\n/*!************************************************!*\\\n  !*** ../node_modules/safe-json-parse/tuple.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"module.exports = SafeParseTuple\\n\\nfunction SafeParseTuple(obj, reviver) {\\n    var json\\n    var error = null\\n\\n    try {\\n        json = JSON.parse(obj, reviver)\\n    } catch (err) {\\n        error = err\\n    }\\n\\n    return [error, json]\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/safe-json-parse/tuple.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/setimmediate/setImmediate.js\":\n/*!****************************************************!*\\\n  !*** ../node_modules/setimmediate/setImmediate.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\\n    \\\"use strict\\\";\\n\\n    if (global.setImmediate) {\\n        return;\\n    }\\n\\n    var nextHandle = 1; // Spec says greater than zero\\n    var tasksByHandle = {};\\n    var currentlyRunningATask = false;\\n    var doc = global.document;\\n    var registerImmediate;\\n\\n    function setImmediate(callback) {\\n      // Callback can either be a function or a string\\n      if (typeof callback !== \\\"function\\\") {\\n        callback = new Function(\\\"\\\" + callback);\\n      }\\n      // Copy function arguments\\n      var args = new Array(arguments.length - 1);\\n      for (var i = 0; i < args.length; i++) {\\n          args[i] = arguments[i + 1];\\n      }\\n      // Store and register the task\\n      var task = { callback: callback, args: args };\\n      tasksByHandle[nextHandle] = task;\\n      registerImmediate(nextHandle);\\n      return nextHandle++;\\n    }\\n\\n    function clearImmediate(handle) {\\n        delete tasksByHandle[handle];\\n    }\\n\\n    function run(task) {\\n        var callback = task.callback;\\n        var args = task.args;\\n        switch (args.length) {\\n        case 0:\\n            callback();\\n            break;\\n        case 1:\\n            callback(args[0]);\\n            break;\\n        case 2:\\n            callback(args[0], args[1]);\\n            break;\\n        case 3:\\n            callback(args[0], args[1], args[2]);\\n            break;\\n        default:\\n            callback.apply(undefined, args);\\n            break;\\n        }\\n    }\\n\\n    function runIfPresent(handle) {\\n        // From the spec: \\\"Wait until any invocations of this algorithm started before this one have completed.\\\"\\n        // So if we're currently running a task, we'll need to delay this invocation.\\n        if (currentlyRunningATask) {\\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\\n            // \\\"too much recursion\\\" error.\\n            setTimeout(runIfPresent, 0, handle);\\n        } else {\\n            var task = tasksByHandle[handle];\\n            if (task) {\\n                currentlyRunningATask = true;\\n                try {\\n                    run(task);\\n                } finally {\\n                    clearImmediate(handle);\\n                    currentlyRunningATask = false;\\n                }\\n            }\\n        }\\n    }\\n\\n    function installNextTickImplementation() {\\n        registerImmediate = function(handle) {\\n            process.nextTick(function () { runIfPresent(handle); });\\n        };\\n    }\\n\\n    function canUsePostMessage() {\\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\\n        if (global.postMessage && !global.importScripts) {\\n            var postMessageIsAsynchronous = true;\\n            var oldOnMessage = global.onmessage;\\n            global.onmessage = function() {\\n                postMessageIsAsynchronous = false;\\n            };\\n            global.postMessage(\\\"\\\", \\\"*\\\");\\n            global.onmessage = oldOnMessage;\\n            return postMessageIsAsynchronous;\\n        }\\n    }\\n\\n    function installPostMessageImplementation() {\\n        // Installs an event handler on `global` for the `message` event: see\\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\\n\\n        var messagePrefix = \\\"setImmediate$\\\" + Math.random() + \\\"$\\\";\\n        var onGlobalMessage = function(event) {\\n            if (event.source === global &&\\n                typeof event.data === \\\"string\\\" &&\\n                event.data.indexOf(messagePrefix) === 0) {\\n                runIfPresent(+event.data.slice(messagePrefix.length));\\n            }\\n        };\\n\\n        if (global.addEventListener) {\\n            global.addEventListener(\\\"message\\\", onGlobalMessage, false);\\n        } else {\\n            global.attachEvent(\\\"onmessage\\\", onGlobalMessage);\\n        }\\n\\n        registerImmediate = function(handle) {\\n            global.postMessage(messagePrefix + handle, \\\"*\\\");\\n        };\\n    }\\n\\n    function installMessageChannelImplementation() {\\n        var channel = new MessageChannel();\\n        channel.port1.onmessage = function(event) {\\n            var handle = event.data;\\n            runIfPresent(handle);\\n        };\\n\\n        registerImmediate = function(handle) {\\n            channel.port2.postMessage(handle);\\n        };\\n    }\\n\\n    function installReadyStateChangeImplementation() {\\n        var html = doc.documentElement;\\n        registerImmediate = function(handle) {\\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\\n            var script = doc.createElement(\\\"script\\\");\\n            script.onreadystatechange = function () {\\n                runIfPresent(handle);\\n                script.onreadystatechange = null;\\n                html.removeChild(script);\\n                script = null;\\n            };\\n            html.appendChild(script);\\n        };\\n    }\\n\\n    function installSetTimeoutImplementation() {\\n        registerImmediate = function(handle) {\\n            setTimeout(runIfPresent, 0, handle);\\n        };\\n    }\\n\\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\\n\\n    // Don't get fooled by e.g. browserify environments.\\n    if ({}.toString.call(global.process) === \\\"[object process]\\\") {\\n        // For Node.js before 0.9\\n        installNextTickImplementation();\\n\\n    } else if (canUsePostMessage()) {\\n        // For non-IE10 modern browsers\\n        installPostMessageImplementation();\\n\\n    } else if (global.MessageChannel) {\\n        // For web workers, where supported\\n        installMessageChannelImplementation();\\n\\n    } else if (doc && \\\"onreadystatechange\\\" in doc.createElement(\\\"script\\\")) {\\n        // For IE 6–8\\n        installReadyStateChangeImplementation();\\n\\n    } else {\\n        // For older browsers\\n        installSetTimeoutImplementation();\\n    }\\n\\n    attachTo.setImmediate = setImmediate;\\n    attachTo.clearImmediate = clearImmediate;\\n}(typeof self === \\\"undefined\\\" ? typeof global === \\\"undefined\\\" ? this : global : self));\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\"), __webpack_require__(/*! ./../process/browser.js */ \\\"../node_modules/process/browser.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/setimmediate/setImmediate.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/stream-browserify/index.js\":\n/*!**************************************************!*\\\n  !*** ../node_modules/stream-browserify/index.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\nmodule.exports = Stream;\\n\\nvar EE = __webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\").EventEmitter;\\nvar inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n\\ninherits(Stream, EE);\\nStream.Readable = __webpack_require__(/*! readable-stream/readable.js */ \\\"../node_modules/readable-stream/readable-browser.js\\\");\\nStream.Writable = __webpack_require__(/*! readable-stream/writable.js */ \\\"../node_modules/readable-stream/writable-browser.js\\\");\\nStream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ \\\"../node_modules/readable-stream/duplex-browser.js\\\");\\nStream.Transform = __webpack_require__(/*! readable-stream/transform.js */ \\\"../node_modules/readable-stream/transform.js\\\");\\nStream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ \\\"../node_modules/readable-stream/passthrough.js\\\");\\n\\n// Backwards-compat with node 0.4.x\\nStream.Stream = Stream;\\n\\n\\n\\n// old-style streams.  Note that the pipe method (the only relevant\\n// part of this class) is overridden in the Readable class.\\n\\nfunction Stream() {\\n  EE.call(this);\\n}\\n\\nStream.prototype.pipe = function(dest, options) {\\n  var source = this;\\n\\n  function ondata(chunk) {\\n    if (dest.writable) {\\n      if (false === dest.write(chunk) && source.pause) {\\n        source.pause();\\n      }\\n    }\\n  }\\n\\n  source.on('data', ondata);\\n\\n  function ondrain() {\\n    if (source.readable && source.resume) {\\n      source.resume();\\n    }\\n  }\\n\\n  dest.on('drain', ondrain);\\n\\n  // If the 'end' option is not supplied, dest.end() will be called when\\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\\n  if (!dest._isStdio && (!options || options.end !== false)) {\\n    source.on('end', onend);\\n    source.on('close', onclose);\\n  }\\n\\n  var didOnEnd = false;\\n  function onend() {\\n    if (didOnEnd) return;\\n    didOnEnd = true;\\n\\n    dest.end();\\n  }\\n\\n\\n  function onclose() {\\n    if (didOnEnd) return;\\n    didOnEnd = true;\\n\\n    if (typeof dest.destroy === 'function') dest.destroy();\\n  }\\n\\n  // don't leave dangling pipes when there are errors.\\n  function onerror(er) {\\n    cleanup();\\n    if (EE.listenerCount(this, 'error') === 0) {\\n      throw er; // Unhandled stream error in pipe.\\n    }\\n  }\\n\\n  source.on('error', onerror);\\n  dest.on('error', onerror);\\n\\n  // remove all the event listeners that were added.\\n  function cleanup() {\\n    source.removeListener('data', ondata);\\n    dest.removeListener('drain', ondrain);\\n\\n    source.removeListener('end', onend);\\n    source.removeListener('close', onclose);\\n\\n    source.removeListener('error', onerror);\\n    dest.removeListener('error', onerror);\\n\\n    source.removeListener('end', cleanup);\\n    source.removeListener('close', cleanup);\\n\\n    dest.removeListener('close', cleanup);\\n  }\\n\\n  source.on('end', cleanup);\\n  source.on('close', cleanup);\\n\\n  dest.on('close', cleanup);\\n\\n  dest.emit('pipe', source);\\n\\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\\n  return dest;\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/stream-browserify/index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/string_decoder/lib/string_decoder.js\":\n/*!************************************************************!*\\\n  !*** ../node_modules/string_decoder/lib/string_decoder.js ***!\n  \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/safe-buffer/index.js\\\").Buffer;\\n/*</replacement>*/\\n\\nvar isEncoding = Buffer.isEncoding || function (encoding) {\\n  encoding = '' + encoding;\\n  switch (encoding && encoding.toLowerCase()) {\\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\\n      return true;\\n    default:\\n      return false;\\n  }\\n};\\n\\nfunction _normalizeEncoding(enc) {\\n  if (!enc) return 'utf8';\\n  var retried;\\n  while (true) {\\n    switch (enc) {\\n      case 'utf8':\\n      case 'utf-8':\\n        return 'utf8';\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return 'utf16le';\\n      case 'latin1':\\n      case 'binary':\\n        return 'latin1';\\n      case 'base64':\\n      case 'ascii':\\n      case 'hex':\\n        return enc;\\n      default:\\n        if (retried) return; // undefined\\n        enc = ('' + enc).toLowerCase();\\n        retried = true;\\n    }\\n  }\\n};\\n\\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\\n// modules monkey-patch it to support additional encodings\\nfunction normalizeEncoding(enc) {\\n  var nenc = _normalizeEncoding(enc);\\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\\n  return nenc || enc;\\n}\\n\\n// StringDecoder provides an interface for efficiently splitting a series of\\n// buffers into a series of JS strings without breaking apart multi-byte\\n// characters.\\nexports.StringDecoder = StringDecoder;\\nfunction StringDecoder(encoding) {\\n  this.encoding = normalizeEncoding(encoding);\\n  var nb;\\n  switch (this.encoding) {\\n    case 'utf16le':\\n      this.text = utf16Text;\\n      this.end = utf16End;\\n      nb = 4;\\n      break;\\n    case 'utf8':\\n      this.fillLast = utf8FillLast;\\n      nb = 4;\\n      break;\\n    case 'base64':\\n      this.text = base64Text;\\n      this.end = base64End;\\n      nb = 3;\\n      break;\\n    default:\\n      this.write = simpleWrite;\\n      this.end = simpleEnd;\\n      return;\\n  }\\n  this.lastNeed = 0;\\n  this.lastTotal = 0;\\n  this.lastChar = Buffer.allocUnsafe(nb);\\n}\\n\\nStringDecoder.prototype.write = function (buf) {\\n  if (buf.length === 0) return '';\\n  var r;\\n  var i;\\n  if (this.lastNeed) {\\n    r = this.fillLast(buf);\\n    if (r === undefined) return '';\\n    i = this.lastNeed;\\n    this.lastNeed = 0;\\n  } else {\\n    i = 0;\\n  }\\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\\n  return r || '';\\n};\\n\\nStringDecoder.prototype.end = utf8End;\\n\\n// Returns only complete characters in a Buffer\\nStringDecoder.prototype.text = utf8Text;\\n\\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\\nStringDecoder.prototype.fillLast = function (buf) {\\n  if (this.lastNeed <= buf.length) {\\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\\n  }\\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\\n  this.lastNeed -= buf.length;\\n};\\n\\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\\n// continuation byte. If an invalid byte is detected, -2 is returned.\\nfunction utf8CheckByte(byte) {\\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\\n  return byte >> 6 === 0x02 ? -1 : -2;\\n}\\n\\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\\n// needed to complete the UTF-8 character (if applicable) are returned.\\nfunction utf8CheckIncomplete(self, buf, i) {\\n  var j = buf.length - 1;\\n  if (j < i) return 0;\\n  var nb = utf8CheckByte(buf[j]);\\n  if (nb >= 0) {\\n    if (nb > 0) self.lastNeed = nb - 1;\\n    return nb;\\n  }\\n  if (--j < i || nb === -2) return 0;\\n  nb = utf8CheckByte(buf[j]);\\n  if (nb >= 0) {\\n    if (nb > 0) self.lastNeed = nb - 2;\\n    return nb;\\n  }\\n  if (--j < i || nb === -2) return 0;\\n  nb = utf8CheckByte(buf[j]);\\n  if (nb >= 0) {\\n    if (nb > 0) {\\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\\n    }\\n    return nb;\\n  }\\n  return 0;\\n}\\n\\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\\n// needed or are available. If we see a non-continuation byte where we expect\\n// one, we \\\"replace\\\" the validated continuation bytes we've seen so far with\\n// a single UTF-8 replacement character ('\\\\ufffd'), to match v8's UTF-8 decoding\\n// behavior. The continuation byte check is included three times in the case\\n// where all of the continuation bytes for a character exist in the same buffer.\\n// It is also done this way as a slight performance increase instead of using a\\n// loop.\\nfunction utf8CheckExtraBytes(self, buf, p) {\\n  if ((buf[0] & 0xC0) !== 0x80) {\\n    self.lastNeed = 0;\\n    return '\\\\ufffd';\\n  }\\n  if (self.lastNeed > 1 && buf.length > 1) {\\n    if ((buf[1] & 0xC0) !== 0x80) {\\n      self.lastNeed = 1;\\n      return '\\\\ufffd';\\n    }\\n    if (self.lastNeed > 2 && buf.length > 2) {\\n      if ((buf[2] & 0xC0) !== 0x80) {\\n        self.lastNeed = 2;\\n        return '\\\\ufffd';\\n      }\\n    }\\n  }\\n}\\n\\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\\nfunction utf8FillLast(buf) {\\n  var p = this.lastTotal - this.lastNeed;\\n  var r = utf8CheckExtraBytes(this, buf, p);\\n  if (r !== undefined) return r;\\n  if (this.lastNeed <= buf.length) {\\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\\n  }\\n  buf.copy(this.lastChar, p, 0, buf.length);\\n  this.lastNeed -= buf.length;\\n}\\n\\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\\n// partial character, the character's bytes are buffered until the required\\n// number of bytes are available.\\nfunction utf8Text(buf, i) {\\n  var total = utf8CheckIncomplete(this, buf, i);\\n  if (!this.lastNeed) return buf.toString('utf8', i);\\n  this.lastTotal = total;\\n  var end = buf.length - (total - this.lastNeed);\\n  buf.copy(this.lastChar, 0, end);\\n  return buf.toString('utf8', i, end);\\n}\\n\\n// For UTF-8, a replacement character is added when ending on a partial\\n// character.\\nfunction utf8End(buf) {\\n  var r = buf && buf.length ? this.write(buf) : '';\\n  if (this.lastNeed) return r + '\\\\ufffd';\\n  return r;\\n}\\n\\n// UTF-16LE typically needs two bytes per character, but even if we have an even\\n// number of bytes available, we need to check if we end on a leading/high\\n// surrogate. In that case, we need to wait for the next two bytes in order to\\n// decode the last character properly.\\nfunction utf16Text(buf, i) {\\n  if ((buf.length - i) % 2 === 0) {\\n    var r = buf.toString('utf16le', i);\\n    if (r) {\\n      var c = r.charCodeAt(r.length - 1);\\n      if (c >= 0xD800 && c <= 0xDBFF) {\\n        this.lastNeed = 2;\\n        this.lastTotal = 4;\\n        this.lastChar[0] = buf[buf.length - 2];\\n        this.lastChar[1] = buf[buf.length - 1];\\n        return r.slice(0, -1);\\n      }\\n    }\\n    return r;\\n  }\\n  this.lastNeed = 1;\\n  this.lastTotal = 2;\\n  this.lastChar[0] = buf[buf.length - 1];\\n  return buf.toString('utf16le', i, buf.length - 1);\\n}\\n\\n// For UTF-16LE we do not explicitly append special replacement characters if we\\n// end on a partial character, we simply let v8 handle that.\\nfunction utf16End(buf) {\\n  var r = buf && buf.length ? this.write(buf) : '';\\n  if (this.lastNeed) {\\n    var end = this.lastTotal - this.lastNeed;\\n    return r + this.lastChar.toString('utf16le', 0, end);\\n  }\\n  return r;\\n}\\n\\nfunction base64Text(buf, i) {\\n  var n = (buf.length - i) % 3;\\n  if (n === 0) return buf.toString('base64', i);\\n  this.lastNeed = 3 - n;\\n  this.lastTotal = 3;\\n  if (n === 1) {\\n    this.lastChar[0] = buf[buf.length - 1];\\n  } else {\\n    this.lastChar[0] = buf[buf.length - 2];\\n    this.lastChar[1] = buf[buf.length - 1];\\n  }\\n  return buf.toString('base64', i, buf.length - n);\\n}\\n\\nfunction base64End(buf) {\\n  var r = buf && buf.length ? this.write(buf) : '';\\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\\n  return r;\\n}\\n\\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\\nfunction simpleWrite(buf) {\\n  return buf.toString(this.encoding);\\n}\\n\\nfunction simpleEnd(buf) {\\n  return buf && buf.length ? this.write(buf) : '';\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/string_decoder/lib/string_decoder.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/timers-browserify/main.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/timers-browserify/main.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \\\"undefined\\\" && global) ||\\n            (typeof self !== \\\"undefined\\\" && self) ||\\n            window;\\nvar apply = Function.prototype.apply;\\n\\n// DOM APIs, for completeness\\n\\nexports.setTimeout = function() {\\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\\n};\\nexports.setInterval = function() {\\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\\n};\\nexports.clearTimeout =\\nexports.clearInterval = function(timeout) {\\n  if (timeout) {\\n    timeout.close();\\n  }\\n};\\n\\nfunction Timeout(id, clearFn) {\\n  this._id = id;\\n  this._clearFn = clearFn;\\n}\\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\\nTimeout.prototype.close = function() {\\n  this._clearFn.call(scope, this._id);\\n};\\n\\n// Does not start the time, just sets up the members needed.\\nexports.enroll = function(item, msecs) {\\n  clearTimeout(item._idleTimeoutId);\\n  item._idleTimeout = msecs;\\n};\\n\\nexports.unenroll = function(item) {\\n  clearTimeout(item._idleTimeoutId);\\n  item._idleTimeout = -1;\\n};\\n\\nexports._unrefActive = exports.active = function(item) {\\n  clearTimeout(item._idleTimeoutId);\\n\\n  var msecs = item._idleTimeout;\\n  if (msecs >= 0) {\\n    item._idleTimeoutId = setTimeout(function onTimeout() {\\n      if (item._onTimeout)\\n        item._onTimeout();\\n    }, msecs);\\n  }\\n};\\n\\n// setimmediate attaches itself to the global object\\n__webpack_require__(/*! setimmediate */ \\\"../node_modules/setimmediate/setImmediate.js\\\");\\n// On some exotic environments, it's not clear which object `setimmediate` was\\n// able to install onto.  Search each possibility in the same order as the\\n// `setimmediate` library.\\nexports.setImmediate = (typeof self !== \\\"undefined\\\" && self.setImmediate) ||\\n                       (typeof global !== \\\"undefined\\\" && global.setImmediate) ||\\n                       (this && this.setImmediate);\\nexports.clearImmediate = (typeof self !== \\\"undefined\\\" && self.clearImmediate) ||\\n                         (typeof global !== \\\"undefined\\\" && global.clearImmediate) ||\\n                         (this && this.clearImmediate);\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/timers-browserify/main.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/url-toolkit/src/url-toolkit.js\":\n/*!******************************************************!*\\\n  !*** ../node_modules/url-toolkit/src/url-toolkit.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// see https://tools.ietf.org/html/rfc1808\\n\\n(function (root) {\\n  var URL_REGEX = /^((?:[a-zA-Z0-9+\\\\-.]+:)?)(\\\\/\\\\/[^\\\\/?#]*)?((?:[^\\\\/?#]*\\\\/)*[^;?#]*)?(;[^?#]*)?(\\\\?[^#]*)?(#.*)?$/;\\n  var FIRST_SEGMENT_REGEX = /^([^\\\\/?#]*)(.*)$/;\\n  var SLASH_DOT_REGEX = /(?:\\\\/|^)\\\\.(?=\\\\/)/g;\\n  var SLASH_DOT_DOT_REGEX = /(?:\\\\/|^)\\\\.\\\\.\\\\/(?!\\\\.\\\\.\\\\/)[^\\\\/]*(?=\\\\/)/g;\\n\\n  var URLToolkit = {\\n    // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\\n    // E.g\\n    // With opts.alwaysNormalize = false (default, spec compliant)\\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\\n    // With opts.alwaysNormalize = true (not spec compliant)\\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\\n    buildAbsoluteURL: function (baseURL, relativeURL, opts) {\\n      opts = opts || {};\\n      // remove any remaining space and CRLF\\n      baseURL = baseURL.trim();\\n      relativeURL = relativeURL.trim();\\n      if (!relativeURL) {\\n        // 2a) If the embedded URL is entirely empty, it inherits the\\n        // entire base URL (i.e., is set equal to the base URL)\\n        // and we are done.\\n        if (!opts.alwaysNormalize) {\\n          return baseURL;\\n        }\\n        var basePartsForNormalise = URLToolkit.parseURL(baseURL);\\n        if (!basePartsForNormalise) {\\n          throw new Error('Error trying to parse base URL.');\\n        }\\n        basePartsForNormalise.path = URLToolkit.normalizePath(\\n          basePartsForNormalise.path\\n        );\\n        return URLToolkit.buildURLFromParts(basePartsForNormalise);\\n      }\\n      var relativeParts = URLToolkit.parseURL(relativeURL);\\n      if (!relativeParts) {\\n        throw new Error('Error trying to parse relative URL.');\\n      }\\n      if (relativeParts.scheme) {\\n        // 2b) If the embedded URL starts with a scheme name, it is\\n        // interpreted as an absolute URL and we are done.\\n        if (!opts.alwaysNormalize) {\\n          return relativeURL;\\n        }\\n        relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\\n        return URLToolkit.buildURLFromParts(relativeParts);\\n      }\\n      var baseParts = URLToolkit.parseURL(baseURL);\\n      if (!baseParts) {\\n        throw new Error('Error trying to parse base URL.');\\n      }\\n      if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\\n        // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\\n        // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\\n        var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\\n        baseParts.netLoc = pathParts[1];\\n        baseParts.path = pathParts[2];\\n      }\\n      if (baseParts.netLoc && !baseParts.path) {\\n        baseParts.path = '/';\\n      }\\n      var builtParts = {\\n        // 2c) Otherwise, the embedded URL inherits the scheme of\\n        // the base URL.\\n        scheme: baseParts.scheme,\\n        netLoc: relativeParts.netLoc,\\n        path: null,\\n        params: relativeParts.params,\\n        query: relativeParts.query,\\n        fragment: relativeParts.fragment,\\n      };\\n      if (!relativeParts.netLoc) {\\n        // 3) If the embedded URL's <net_loc> is non-empty, we skip to\\n        // Step 7.  Otherwise, the embedded URL inherits the <net_loc>\\n        // (if any) of the base URL.\\n        builtParts.netLoc = baseParts.netLoc;\\n        // 4) If the embedded URL path is preceded by a slash \\\"/\\\", the\\n        // path is not relative and we skip to Step 7.\\n        if (relativeParts.path[0] !== '/') {\\n          if (!relativeParts.path) {\\n            // 5) If the embedded URL path is empty (and not preceded by a\\n            // slash), then the embedded URL inherits the base URL path\\n            builtParts.path = baseParts.path;\\n            // 5a) if the embedded URL's <params> is non-empty, we skip to\\n            // step 7; otherwise, it inherits the <params> of the base\\n            // URL (if any) and\\n            if (!relativeParts.params) {\\n              builtParts.params = baseParts.params;\\n              // 5b) if the embedded URL's <query> is non-empty, we skip to\\n              // step 7; otherwise, it inherits the <query> of the base\\n              // URL (if any) and we skip to step 7.\\n              if (!relativeParts.query) {\\n                builtParts.query = baseParts.query;\\n              }\\n            }\\n          } else {\\n            // 6) The last segment of the base URL's path (anything\\n            // following the rightmost slash \\\"/\\\", or the entire path if no\\n            // slash is present) is removed and the embedded URL's path is\\n            // appended in its place.\\n            var baseURLPath = baseParts.path;\\n            var newPath =\\n              baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) +\\n              relativeParts.path;\\n            builtParts.path = URLToolkit.normalizePath(newPath);\\n          }\\n        }\\n      }\\n      if (builtParts.path === null) {\\n        builtParts.path = opts.alwaysNormalize\\n          ? URLToolkit.normalizePath(relativeParts.path)\\n          : relativeParts.path;\\n      }\\n      return URLToolkit.buildURLFromParts(builtParts);\\n    },\\n    parseURL: function (url) {\\n      var parts = URL_REGEX.exec(url);\\n      if (!parts) {\\n        return null;\\n      }\\n      return {\\n        scheme: parts[1] || '',\\n        netLoc: parts[2] || '',\\n        path: parts[3] || '',\\n        params: parts[4] || '',\\n        query: parts[5] || '',\\n        fragment: parts[6] || '',\\n      };\\n    },\\n    normalizePath: function (path) {\\n      // The following operations are\\n      // then applied, in order, to the new path:\\n      // 6a) All occurrences of \\\"./\\\", where \\\".\\\" is a complete path\\n      // segment, are removed.\\n      // 6b) If the path ends with \\\".\\\" as a complete path segment,\\n      // that \\\".\\\" is removed.\\n      path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\\n      // 6c) All occurrences of \\\"<segment>/../\\\", where <segment> is a\\n      // complete path segment not equal to \\\"..\\\", are removed.\\n      // Removal of these path segments is performed iteratively,\\n      // removing the leftmost matching pattern on each iteration,\\n      // until no matching pattern remains.\\n      // 6d) If the path ends with \\\"<segment>/..\\\", where <segment> is a\\n      // complete path segment not equal to \\\"..\\\", that\\n      // \\\"<segment>/..\\\" is removed.\\n      while (\\n        path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length\\n      ) {}\\n      return path.split('').reverse().join('');\\n    },\\n    buildURLFromParts: function (parts) {\\n      return (\\n        parts.scheme +\\n        parts.netLoc +\\n        parts.path +\\n        parts.params +\\n        parts.query +\\n        parts.fragment\\n      );\\n    },\\n  };\\n\\n  if (true)\\n    module.exports = URLToolkit;\\n  else {}\\n})(this);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/url-toolkit/src/url-toolkit.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/util-deprecate/browser.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/util-deprecate/browser.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {\\n/**\\n * Module exports.\\n */\\n\\nmodule.exports = deprecate;\\n\\n/**\\n * Mark that a method should not be used.\\n * Returns a modified function which warns once by default.\\n *\\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\\n *\\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\\n * will throw an Error when invoked.\\n *\\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\\n * will invoke `console.trace()` instead of `console.error()`.\\n *\\n * @param {Function} fn - the function to deprecate\\n * @param {String} msg - the string to print to the console when `fn` is invoked\\n * @returns {Function} a new \\\"deprecated\\\" version of `fn`\\n * @api public\\n */\\n\\nfunction deprecate (fn, msg) {\\n  if (config('noDeprecation')) {\\n    return fn;\\n  }\\n\\n  var warned = false;\\n  function deprecated() {\\n    if (!warned) {\\n      if (config('throwDeprecation')) {\\n        throw new Error(msg);\\n      } else if (config('traceDeprecation')) {\\n        console.trace(msg);\\n      } else {\\n        console.warn(msg);\\n      }\\n      warned = true;\\n    }\\n    return fn.apply(this, arguments);\\n  }\\n\\n  return deprecated;\\n}\\n\\n/**\\n * Checks `localStorage` for boolean values for the given `name`.\\n *\\n * @param {String} name\\n * @returns {Boolean}\\n * @api private\\n */\\n\\nfunction config (name) {\\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\\n  try {\\n    if (!global.localStorage) return false;\\n  } catch (_) {\\n    return false;\\n  }\\n  var val = global.localStorage[name];\\n  if (null == val) return false;\\n  return String(val).toLowerCase() === 'true';\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/util-deprecate/browser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/dist/video.es.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/video.js/dist/video.es.js ***!\n  \\*************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \\\"../node_modules/video.js/node_modules/global/window.js-exposed\\\");\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/document */ \\\"../node_modules/video.js/node_modules/global/document.js-exposed\\\");\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__);\\n/* harmony import */ var safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! safe-json-parse/tuple */ \\\"../node_modules/safe-json-parse/tuple.js\\\");\\n/* harmony import */ var safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7__);\\n/* harmony import */ var keycode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! keycode */ \\\"../node_modules/keycode/index.js\\\");\\n/* harmony import */ var keycode__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(keycode__WEBPACK_IMPORTED_MODULE_8__);\\n/* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @videojs/xhr */ \\\"../node_modules/@videojs/xhr/index.js\\\");\\n/* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_9__);\\n/* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! videojs-vtt.js */ \\\"../node_modules/videojs-vtt.js/lib/browser-index.js\\\");\\n/* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10__);\\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime/helpers/construct */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11__);\\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12__);\\n/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! url-toolkit */ \\\"../node_modules/url-toolkit/src/url-toolkit.js\\\");\\n/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_13__);\\n/* harmony import */ var m3u8_parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! m3u8-parser */ \\\"../node_modules/m3u8-parser/dist/m3u8-parser.es.js\\\");\\n/* harmony import */ var mpd_parser__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! mpd-parser */ \\\"../node_modules/mpd-parser/dist/mpd-parser.es.js\\\");\\n/* harmony import */ var mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! mux.js/lib/tools/mp4-inspector */ \\\"../node_modules/mux.js/lib/tools/mp4-inspector.js\\\");\\n/* harmony import */ var mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16__);\\n/* harmony import */ var mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! mux.js/lib/mp4/probe */ \\\"../node_modules/mux.js/lib/mp4/probe.js\\\");\\n/* harmony import */ var mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17__);\\n/* harmony import */ var mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! mux.js/lib/mp4/caption-parser */ \\\"../node_modules/mux.js/lib/mp4/caption-parser.js\\\");\\n/* harmony import */ var mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18__);\\n/* harmony import */ var mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! mux.js/lib/tools/ts-inspector.js */ \\\"../node_modules/mux.js/lib/tools/ts-inspector.js\\\");\\n/* harmony import */ var mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19__);\\n/* harmony import */ var aes_decrypter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! aes-decrypter */ \\\"../node_modules/aes-decrypter/dist/aes-decrypter.es.js\\\");\\n/**\\n * @license\\n * Video.js 7.8.4 <http://videojs.com/>\\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\\n * Available under Apache License Version 2.0\\n * <https://github.com/videojs/video.js/blob/master/LICENSE>\\n *\\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\\n * Available under Apache License Version 2.0\\n * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>\\n */\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar version = \\\"7.8.4\\\";\\n\\n/**\\n * @file create-logger.js\\n * @module create-logger\\n */\\n\\nvar history = [];\\n/**\\n * Log messages to the console and history based on the type of message\\n *\\n * @private\\n * @param  {string} type\\n *         The name of the console method to use.\\n *\\n * @param  {Array} args\\n *         The arguments to be passed to the matching console method.\\n */\\n\\nvar LogByTypeFactory = function LogByTypeFactory(name, log) {\\n  return function (type, level, args) {\\n    var lvl = log.levels[level];\\n    var lvlRegExp = new RegExp(\\\"^(\\\" + lvl + \\\")$\\\");\\n\\n    if (type !== 'log') {\\n      // Add the type to the front of the message when it's not \\\"log\\\".\\n      args.unshift(type.toUpperCase() + ':');\\n    } // Add console prefix after adding to history.\\n\\n\\n    args.unshift(name + ':'); // Add a clone of the args at this point to history.\\n\\n    if (history) {\\n      history.push([].concat(args)); // only store 1000 history entries\\n\\n      var splice = history.length - 1000;\\n      history.splice(0, splice > 0 ? splice : 0);\\n    } // If there's no console then don't try to output messages, but they will\\n    // still be stored in history.\\n\\n\\n    if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console) {\\n      return;\\n    } // Was setting these once outside of this function, but containing them\\n    // in the function makes it easier to test cases where console doesn't exist\\n    // when the module is executed.\\n\\n\\n    var fn = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console[type];\\n\\n    if (!fn && type === 'debug') {\\n      // Certain browsers don't have support for console.debug. For those, we\\n      // should default to the closest comparable log.\\n      fn = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.info || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.log;\\n    } // Bail out if there's no console or if this type is not allowed by the\\n    // current logging level.\\n\\n\\n    if (!fn || !lvl || !lvlRegExp.test(type)) {\\n      return;\\n    }\\n\\n    fn[Array.isArray(args) ? 'apply' : 'call'](global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console, args);\\n  };\\n};\\n\\nfunction createLogger(name) {\\n  // This is the private tracking variable for logging level.\\n  var level = 'info'; // the curried logByType bound to the specific log and history\\n\\n  var logByType;\\n  /**\\n   * Logs plain debug messages. Similar to `console.log`.\\n   *\\n   * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\\n   * of our JSDoc template, we cannot properly document this as both a function\\n   * and a namespace, so its function signature is documented here.\\n   *\\n   * #### Arguments\\n   * ##### *args\\n   * Mixed[]\\n   *\\n   * Any combination of values that could be passed to `console.log()`.\\n   *\\n   * #### Return Value\\n   *\\n   * `undefined`\\n   *\\n   * @namespace\\n   * @param    {Mixed[]} args\\n   *           One or more messages or objects that should be logged.\\n   */\\n\\n  var log = function log() {\\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n      args[_key] = arguments[_key];\\n    }\\n\\n    logByType('log', level, args);\\n  }; // This is the logByType helper that the logging methods below use\\n\\n\\n  logByType = LogByTypeFactory(name, log);\\n  /**\\n   * Create a new sublogger which chains the old name to the new name.\\n   *\\n   * For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:\\n   * ```js\\n   *  mylogger('foo');\\n   *  // > VIDEOJS: player: foo\\n   * ```\\n   *\\n   * @param {string} name\\n   *        The name to add call the new logger\\n   * @return {Object}\\n   */\\n\\n  log.createLogger = function (subname) {\\n    return createLogger(name + ': ' + subname);\\n  };\\n  /**\\n   * Enumeration of available logging levels, where the keys are the level names\\n   * and the values are `|`-separated strings containing logging methods allowed\\n   * in that logging level. These strings are used to create a regular expression\\n   * matching the function name being called.\\n   *\\n   * Levels provided by Video.js are:\\n   *\\n   * - `off`: Matches no calls. Any value that can be cast to `false` will have\\n   *   this effect. The most restrictive.\\n   * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\\n   *   `log.warn`, and `log.error`).\\n   * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\\n   * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\\n   * - `warn`: Matches `log.warn` and `log.error` calls.\\n   * - `error`: Matches only `log.error` calls.\\n   *\\n   * @type {Object}\\n   */\\n\\n\\n  log.levels = {\\n    all: 'debug|log|warn|error',\\n    off: '',\\n    debug: 'debug|log|warn|error',\\n    info: 'log|warn|error',\\n    warn: 'warn|error',\\n    error: 'error',\\n    DEFAULT: level\\n  };\\n  /**\\n   * Get or set the current logging level.\\n   *\\n   * If a string matching a key from {@link module:log.levels} is provided, acts\\n   * as a setter.\\n   *\\n   * @param  {string} [lvl]\\n   *         Pass a valid level to set a new logging level.\\n   *\\n   * @return {string}\\n   *         The current logging level.\\n   */\\n\\n  log.level = function (lvl) {\\n    if (typeof lvl === 'string') {\\n      if (!log.levels.hasOwnProperty(lvl)) {\\n        throw new Error(\\\"\\\\\\\"\\\" + lvl + \\\"\\\\\\\" in not a valid log level\\\");\\n      }\\n\\n      level = lvl;\\n    }\\n\\n    return level;\\n  };\\n  /**\\n   * Returns an array containing everything that has been logged to the history.\\n   *\\n   * This array is a shallow clone of the internal history record. However, its\\n   * contents are _not_ cloned; so, mutating objects inside this array will\\n   * mutate them in history.\\n   *\\n   * @return {Array}\\n   */\\n\\n\\n  log.history = function () {\\n    return history ? [].concat(history) : [];\\n  };\\n  /**\\n   * Allows you to filter the history by the given logger name\\n   *\\n   * @param {string} fname\\n   *        The name to filter by\\n   *\\n   * @return {Array}\\n   *         The filtered list to return\\n   */\\n\\n\\n  log.history.filter = function (fname) {\\n    return (history || []).filter(function (historyItem) {\\n      // if the first item in each historyItem includes `fname`, then it's a match\\n      return new RegExp(\\\".*\\\" + fname + \\\".*\\\").test(historyItem[0]);\\n    });\\n  };\\n  /**\\n   * Clears the internal history tracking, but does not prevent further history\\n   * tracking.\\n   */\\n\\n\\n  log.history.clear = function () {\\n    if (history) {\\n      history.length = 0;\\n    }\\n  };\\n  /**\\n   * Disable history tracking if it is currently enabled.\\n   */\\n\\n\\n  log.history.disable = function () {\\n    if (history !== null) {\\n      history.length = 0;\\n      history = null;\\n    }\\n  };\\n  /**\\n   * Enable history tracking if it is currently disabled.\\n   */\\n\\n\\n  log.history.enable = function () {\\n    if (history === null) {\\n      history = [];\\n    }\\n  };\\n  /**\\n   * Logs error messages. Similar to `console.error`.\\n   *\\n   * @param {Mixed[]} args\\n   *        One or more messages or objects that should be logged as an error\\n   */\\n\\n\\n  log.error = function () {\\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n      args[_key2] = arguments[_key2];\\n    }\\n\\n    return logByType('error', level, args);\\n  };\\n  /**\\n   * Logs warning messages. Similar to `console.warn`.\\n   *\\n   * @param {Mixed[]} args\\n   *        One or more messages or objects that should be logged as a warning.\\n   */\\n\\n\\n  log.warn = function () {\\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n      args[_key3] = arguments[_key3];\\n    }\\n\\n    return logByType('warn', level, args);\\n  };\\n  /**\\n   * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\\n   * log if `console.debug` is not available\\n   *\\n   * @param {Mixed[]} args\\n   *        One or more messages or objects that should be logged as debug.\\n   */\\n\\n\\n  log.debug = function () {\\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\\n      args[_key4] = arguments[_key4];\\n    }\\n\\n    return logByType('debug', level, args);\\n  };\\n\\n  return log;\\n}\\n\\n/**\\n * @file log.js\\n * @module log\\n */\\nvar log = createLogger('VIDEOJS');\\nvar createLogger$1 = log.createLogger;\\n\\n/**\\n * @file obj.js\\n * @module obj\\n */\\n\\n/**\\n * @callback obj:EachCallback\\n *\\n * @param {Mixed} value\\n *        The current key for the object that is being iterated over.\\n *\\n * @param {string} key\\n *        The current key-value for object that is being iterated over\\n */\\n\\n/**\\n * @callback obj:ReduceCallback\\n *\\n * @param {Mixed} accum\\n *        The value that is accumulating over the reduce loop.\\n *\\n * @param {Mixed} value\\n *        The current key for the object that is being iterated over.\\n *\\n * @param {string} key\\n *        The current key-value for object that is being iterated over\\n *\\n * @return {Mixed}\\n *         The new accumulated value.\\n */\\nvar toString = Object.prototype.toString;\\n/**\\n * Get the keys of an Object\\n *\\n * @param {Object}\\n *        The Object to get the keys from\\n *\\n * @return {string[]}\\n *         An array of the keys from the object. Returns an empty array if the\\n *         object passed in was invalid or had no keys.\\n *\\n * @private\\n */\\n\\nvar keys = function keys(object) {\\n  return isObject(object) ? Object.keys(object) : [];\\n};\\n/**\\n * Array-like iteration for objects.\\n *\\n * @param {Object} object\\n *        The object to iterate over\\n *\\n * @param {obj:EachCallback} fn\\n *        The callback function which is called for each key in the object.\\n */\\n\\n\\nfunction each(object, fn) {\\n  keys(object).forEach(function (key) {\\n    return fn(object[key], key);\\n  });\\n}\\n/**\\n * Array-like reduce for objects.\\n *\\n * @param {Object} object\\n *        The Object that you want to reduce.\\n *\\n * @param {Function} fn\\n *         A callback function which is called for each key in the object. It\\n *         receives the accumulated value and the per-iteration value and key\\n *         as arguments.\\n *\\n * @param {Mixed} [initial = 0]\\n *        Starting value\\n *\\n * @return {Mixed}\\n *         The final accumulated value.\\n */\\n\\nfunction reduce(object, fn, initial) {\\n  if (initial === void 0) {\\n    initial = 0;\\n  }\\n\\n  return keys(object).reduce(function (accum, key) {\\n    return fn(accum, object[key], key);\\n  }, initial);\\n}\\n/**\\n * Object.assign-style object shallow merge/extend.\\n *\\n * @param  {Object} target\\n * @param  {Object} ...sources\\n * @return {Object}\\n */\\n\\nfunction assign(target) {\\n  for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n    sources[_key - 1] = arguments[_key];\\n  }\\n\\n  if (Object.assign) {\\n    return _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default.a.apply(void 0, [target].concat(sources));\\n  }\\n\\n  sources.forEach(function (source) {\\n    if (!source) {\\n      return;\\n    }\\n\\n    each(source, function (value, key) {\\n      target[key] = value;\\n    });\\n  });\\n  return target;\\n}\\n/**\\n * Returns whether a value is an object of any kind - including DOM nodes,\\n * arrays, regular expressions, etc. Not functions, though.\\n *\\n * This avoids the gotcha where using `typeof` on a `null` value\\n * results in `'object'`.\\n *\\n * @param  {Object} value\\n * @return {boolean}\\n */\\n\\nfunction isObject(value) {\\n  return !!value && typeof value === 'object';\\n}\\n/**\\n * Returns whether an object appears to be a \\\"plain\\\" object - that is, a\\n * direct instance of `Object`.\\n *\\n * @param  {Object} value\\n * @return {boolean}\\n */\\n\\nfunction isPlain(value) {\\n  return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object;\\n}\\n\\n/**\\n * @file computed-style.js\\n * @module computed-style\\n */\\n/**\\n * A safe getComputedStyle.\\n *\\n * This is needed because in Firefox, if the player is loaded in an iframe with\\n * `display:none`, then `getComputedStyle` returns `null`, so, we do a\\n * null-check to make sure that the player doesn't break in these cases.\\n *\\n * @function\\n * @param    {Element} el\\n *           The element you want the computed style of\\n *\\n * @param    {string} prop\\n *           The property name you want\\n *\\n * @see      https://bugzilla.mozilla.org/show_bug.cgi?id=548397\\n */\\n\\nfunction computedStyle(el, prop) {\\n  if (!el || !prop) {\\n    return '';\\n  }\\n\\n  if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle === 'function') {\\n    var computedStyleValue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle(el);\\n    return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\\n  }\\n\\n  return '';\\n}\\n\\n/**\\n * @file dom.js\\n * @module dom\\n */\\n/**\\n * Detect if a value is a string with any non-whitespace characters.\\n *\\n * @private\\n * @param  {string} str\\n *         The string to check\\n *\\n * @return {boolean}\\n *         Will be `true` if the string is non-blank, `false` otherwise.\\n *\\n */\\n\\nfunction isNonBlankString(str) {\\n  // we use str.trim as it will trim any whitespace characters\\n  // from the front or back of non-whitespace characters. aka\\n  // Any string that contains non-whitespace characters will\\n  // still contain them after `trim` but whitespace only strings\\n  // will have a length of 0, failing this check.\\n  return typeof str === 'string' && Boolean(str.trim());\\n}\\n/**\\n * Throws an error if the passed string has whitespace. This is used by\\n * class methods to be relatively consistent with the classList API.\\n *\\n * @private\\n * @param  {string} str\\n *         The string to check for whitespace.\\n *\\n * @throws {Error}\\n *         Throws an error if there is whitespace in the string.\\n */\\n\\n\\nfunction throwIfWhitespace(str) {\\n  // str.indexOf instead of regex because str.indexOf is faster performance wise.\\n  if (str.indexOf(' ') >= 0) {\\n    throw new Error('class has illegal whitespace characters');\\n  }\\n}\\n/**\\n * Produce a regular expression for matching a className within an elements className.\\n *\\n * @private\\n * @param  {string} className\\n *         The className to generate the RegExp for.\\n *\\n * @return {RegExp}\\n *         The RegExp that will check for a specific `className` in an elements\\n *         className.\\n */\\n\\n\\nfunction classRegExp(className) {\\n  return new RegExp('(^|\\\\\\\\s)' + className + '($|\\\\\\\\s)');\\n}\\n/**\\n * Whether the current DOM interface appears to be real (i.e. not simulated).\\n *\\n * @return {boolean}\\n *         Will be `true` if the DOM appears to be real, `false` otherwise.\\n */\\n\\n\\nfunction isReal() {\\n  // Both document and window will never be undefined thanks to `global`.\\n  return global_document__WEBPACK_IMPORTED_MODULE_1___default.a === global_window__WEBPACK_IMPORTED_MODULE_0___default.a.document;\\n}\\n/**\\n * Determines, via duck typing, whether or not a value is a DOM element.\\n *\\n * @param  {Mixed} value\\n *         The value to check.\\n *\\n * @return {boolean}\\n *         Will be `true` if the value is a DOM element, `false` otherwise.\\n */\\n\\nfunction isEl(value) {\\n  return isObject(value) && value.nodeType === 1;\\n}\\n/**\\n * Determines if the current DOM is embedded in an iframe.\\n *\\n * @return {boolean}\\n *         Will be `true` if the DOM is embedded in an iframe, `false`\\n *         otherwise.\\n */\\n\\nfunction isInFrame() {\\n  // We need a try/catch here because Safari will throw errors when attempting\\n  // to get either `parent` or `self`\\n  try {\\n    return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.parent !== global_window__WEBPACK_IMPORTED_MODULE_0___default.a.self;\\n  } catch (x) {\\n    return true;\\n  }\\n}\\n/**\\n * Creates functions to query the DOM using a given method.\\n *\\n * @private\\n * @param   {string} method\\n *          The method to create the query with.\\n *\\n * @return  {Function}\\n *          The query method\\n */\\n\\nfunction createQuerier(method) {\\n  return function (selector, context) {\\n    if (!isNonBlankString(selector)) {\\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a[method](null);\\n    }\\n\\n    if (isNonBlankString(context)) {\\n      context = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.querySelector(context);\\n    }\\n\\n    var ctx = isEl(context) ? context : global_document__WEBPACK_IMPORTED_MODULE_1___default.a;\\n    return ctx[method] && ctx[method](selector);\\n  };\\n}\\n/**\\n * Creates an element and applies properties, attributes, and inserts content.\\n *\\n * @param  {string} [tagName='div']\\n *         Name of tag to be created.\\n *\\n * @param  {Object} [properties={}]\\n *         Element properties to be applied.\\n *\\n * @param  {Object} [attributes={}]\\n *         Element attributes to be applied.\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor object.\\n *\\n * @return {Element}\\n *         The element that was created.\\n */\\n\\n\\nfunction createEl(tagName, properties, attributes, content) {\\n  if (tagName === void 0) {\\n    tagName = 'div';\\n  }\\n\\n  if (properties === void 0) {\\n    properties = {};\\n  }\\n\\n  if (attributes === void 0) {\\n    attributes = {};\\n  }\\n\\n  var el = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(tagName);\\n  Object.getOwnPropertyNames(properties).forEach(function (propName) {\\n    var val = properties[propName]; // See #2176\\n    // We originally were accepting both properties and attributes in the\\n    // same object, but that doesn't work so well.\\n\\n    if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\\n      log.warn('Setting attributes in the second argument of createEl()\\\\n' + 'has been deprecated. Use the third argument instead.\\\\n' + (\\\"createEl(type, properties, attributes). Attempting to set \\\" + propName + \\\" to \\\" + val + \\\".\\\"));\\n      el.setAttribute(propName, val); // Handle textContent since it's not supported everywhere and we have a\\n      // method for it.\\n    } else if (propName === 'textContent') {\\n      textContent(el, val);\\n    } else if (el[propName] !== val) {\\n      el[propName] = val;\\n    }\\n  });\\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\\n    el.setAttribute(attrName, attributes[attrName]);\\n  });\\n\\n  if (content) {\\n    appendContent(el, content);\\n  }\\n\\n  return el;\\n}\\n/**\\n * Injects text into an element, replacing any existing contents entirely.\\n *\\n * @param  {Element} el\\n *         The element to add text content into\\n *\\n * @param  {string} text\\n *         The text content to add.\\n *\\n * @return {Element}\\n *         The element with added text content.\\n */\\n\\nfunction textContent(el, text) {\\n  if (typeof el.textContent === 'undefined') {\\n    el.innerText = text;\\n  } else {\\n    el.textContent = text;\\n  }\\n\\n  return el;\\n}\\n/**\\n * Insert an element as the first child node of another\\n *\\n * @param {Element} child\\n *        Element to insert\\n *\\n * @param {Element} parent\\n *        Element to insert child into\\n */\\n\\nfunction prependTo(child, parent) {\\n  if (parent.firstChild) {\\n    parent.insertBefore(child, parent.firstChild);\\n  } else {\\n    parent.appendChild(child);\\n  }\\n}\\n/**\\n * Check if an element has a class name.\\n *\\n * @param  {Element} element\\n *         Element to check\\n *\\n * @param  {string} classToCheck\\n *         Class name to check for\\n *\\n * @return {boolean}\\n *         Will be `true` if the element has a class, `false` otherwise.\\n *\\n * @throws {Error}\\n *         Throws an error if `classToCheck` has white space.\\n */\\n\\nfunction hasClass(element, classToCheck) {\\n  throwIfWhitespace(classToCheck);\\n\\n  if (element.classList) {\\n    return element.classList.contains(classToCheck);\\n  }\\n\\n  return classRegExp(classToCheck).test(element.className);\\n}\\n/**\\n * Add a class name to an element.\\n *\\n * @param  {Element} element\\n *         Element to add class name to.\\n *\\n * @param  {string} classToAdd\\n *         Class name to add.\\n *\\n * @return {Element}\\n *         The DOM element with the added class name.\\n */\\n\\nfunction addClass(element, classToAdd) {\\n  if (element.classList) {\\n    element.classList.add(classToAdd); // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\\n    // in the case of classList not being supported.\\n  } else if (!hasClass(element, classToAdd)) {\\n    element.className = (element.className + ' ' + classToAdd).trim();\\n  }\\n\\n  return element;\\n}\\n/**\\n * Remove a class name from an element.\\n *\\n * @param  {Element} element\\n *         Element to remove a class name from.\\n *\\n * @param  {string} classToRemove\\n *         Class name to remove\\n *\\n * @return {Element}\\n *         The DOM element with class name removed.\\n */\\n\\nfunction removeClass(element, classToRemove) {\\n  if (element.classList) {\\n    element.classList.remove(classToRemove);\\n  } else {\\n    throwIfWhitespace(classToRemove);\\n    element.className = element.className.split(/\\\\s+/).filter(function (c) {\\n      return c !== classToRemove;\\n    }).join(' ');\\n  }\\n\\n  return element;\\n}\\n/**\\n * The callback definition for toggleClass.\\n *\\n * @callback module:dom~PredicateCallback\\n * @param    {Element} element\\n *           The DOM element of the Component.\\n *\\n * @param    {string} classToToggle\\n *           The `className` that wants to be toggled\\n *\\n * @return   {boolean|undefined}\\n *           If `true` is returned, the `classToToggle` will be added to the\\n *           `element`. If `false`, the `classToToggle` will be removed from\\n *           the `element`. If `undefined`, the callback will be ignored.\\n */\\n\\n/**\\n * Adds or removes a class name to/from an element depending on an optional\\n * condition or the presence/absence of the class name.\\n *\\n * @param  {Element} element\\n *         The element to toggle a class name on.\\n *\\n * @param  {string} classToToggle\\n *         The class that should be toggled.\\n *\\n * @param  {boolean|module:dom~PredicateCallback} [predicate]\\n *         See the return value for {@link module:dom~PredicateCallback}\\n *\\n * @return {Element}\\n *         The element with a class that has been toggled.\\n */\\n\\nfunction toggleClass(element, classToToggle, predicate) {\\n  // This CANNOT use `classList` internally because IE11 does not support the\\n  // second parameter to the `classList.toggle()` method! Which is fine because\\n  // `classList` will be used by the add/remove functions.\\n  var has = hasClass(element, classToToggle);\\n\\n  if (typeof predicate === 'function') {\\n    predicate = predicate(element, classToToggle);\\n  }\\n\\n  if (typeof predicate !== 'boolean') {\\n    predicate = !has;\\n  } // If the necessary class operation matches the current state of the\\n  // element, no action is required.\\n\\n\\n  if (predicate === has) {\\n    return;\\n  }\\n\\n  if (predicate) {\\n    addClass(element, classToToggle);\\n  } else {\\n    removeClass(element, classToToggle);\\n  }\\n\\n  return element;\\n}\\n/**\\n * Apply attributes to an HTML element.\\n *\\n * @param {Element} el\\n *        Element to add attributes to.\\n *\\n * @param {Object} [attributes]\\n *        Attributes to be applied.\\n */\\n\\nfunction setAttributes(el, attributes) {\\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\\n    var attrValue = attributes[attrName];\\n\\n    if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\\n      el.removeAttribute(attrName);\\n    } else {\\n      el.setAttribute(attrName, attrValue === true ? '' : attrValue);\\n    }\\n  });\\n}\\n/**\\n * Get an element's attribute values, as defined on the HTML tag.\\n *\\n * Attributes are not the same as properties. They're defined on the tag\\n * or with setAttribute.\\n *\\n * @param  {Element} tag\\n *         Element from which to get tag attributes.\\n *\\n * @return {Object}\\n *         All attributes of the element. Boolean attributes will be `true` or\\n *         `false`, others will be strings.\\n */\\n\\nfunction getAttributes(tag) {\\n  var obj = {}; // known boolean attributes\\n  // we can check for matching boolean properties, but not all browsers\\n  // and not all tags know about these attributes, so, we still want to check them manually\\n\\n  var knownBooleans = ',' + 'autoplay,controls,playsinline,loop,muted,default,defaultMuted' + ',';\\n\\n  if (tag && tag.attributes && tag.attributes.length > 0) {\\n    var attrs = tag.attributes;\\n\\n    for (var i = attrs.length - 1; i >= 0; i--) {\\n      var attrName = attrs[i].name;\\n      var attrVal = attrs[i].value; // check for known booleans\\n      // the matching element property will return a value for typeof\\n\\n      if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {\\n        // the value of an included boolean attribute is typically an empty\\n        // string ('') which would equal false if we just check for a false value.\\n        // we also don't want support bad code like autoplay='false'\\n        attrVal = attrVal !== null ? true : false;\\n      }\\n\\n      obj[attrName] = attrVal;\\n    }\\n  }\\n\\n  return obj;\\n}\\n/**\\n * Get the value of an element's attribute.\\n *\\n * @param {Element} el\\n *        A DOM element.\\n *\\n * @param {string} attribute\\n *        Attribute to get the value of.\\n *\\n * @return {string}\\n *         The value of the attribute.\\n */\\n\\nfunction getAttribute(el, attribute) {\\n  return el.getAttribute(attribute);\\n}\\n/**\\n * Set the value of an element's attribute.\\n *\\n * @param {Element} el\\n *        A DOM element.\\n *\\n * @param {string} attribute\\n *        Attribute to set.\\n *\\n * @param {string} value\\n *        Value to set the attribute to.\\n */\\n\\nfunction setAttribute(el, attribute, value) {\\n  el.setAttribute(attribute, value);\\n}\\n/**\\n * Remove an element's attribute.\\n *\\n * @param {Element} el\\n *        A DOM element.\\n *\\n * @param {string} attribute\\n *        Attribute to remove.\\n */\\n\\nfunction removeAttribute(el, attribute) {\\n  el.removeAttribute(attribute);\\n}\\n/**\\n * Attempt to block the ability to select text.\\n */\\n\\nfunction blockTextSelection() {\\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.focus();\\n\\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.onselectstart = function () {\\n    return false;\\n  };\\n}\\n/**\\n * Turn off text selection blocking.\\n */\\n\\nfunction unblockTextSelection() {\\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.onselectstart = function () {\\n    return true;\\n  };\\n}\\n/**\\n * Identical to the native `getBoundingClientRect` function, but ensures that\\n * the method is supported at all (it is in all browsers we claim to support)\\n * and that the element is in the DOM before continuing.\\n *\\n * This wrapper function also shims properties which are not provided by some\\n * older browsers (namely, IE8).\\n *\\n * Additionally, some browsers do not support adding properties to a\\n * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\\n * properties (except `x` and `y` which are not widely supported). This helps\\n * avoid implementations where keys are non-enumerable.\\n *\\n * @param  {Element} el\\n *         Element whose `ClientRect` we want to calculate.\\n *\\n * @return {Object|undefined}\\n *         Always returns a plain object - or `undefined` if it cannot.\\n */\\n\\nfunction getBoundingClientRect(el) {\\n  if (el && el.getBoundingClientRect && el.parentNode) {\\n    var rect = el.getBoundingClientRect();\\n    var result = {};\\n    ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (k) {\\n      if (rect[k] !== undefined) {\\n        result[k] = rect[k];\\n      }\\n    });\\n\\n    if (!result.height) {\\n      result.height = parseFloat(computedStyle(el, 'height'));\\n    }\\n\\n    if (!result.width) {\\n      result.width = parseFloat(computedStyle(el, 'width'));\\n    }\\n\\n    return result;\\n  }\\n}\\n/**\\n * Represents the position of a DOM element on the page.\\n *\\n * @typedef  {Object} module:dom~Position\\n *\\n * @property {number} left\\n *           Pixels to the left.\\n *\\n * @property {number} top\\n *           Pixels from the top.\\n */\\n\\n/**\\n * Get the position of an element in the DOM.\\n *\\n * Uses `getBoundingClientRect` technique from John Resig.\\n *\\n * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\\n *\\n * @param  {Element} el\\n *         Element from which to get offset.\\n *\\n * @return {module:dom~Position}\\n *         The position of the element that was passed in.\\n */\\n\\nfunction findPosition(el) {\\n  var box;\\n\\n  if (el.getBoundingClientRect && el.parentNode) {\\n    box = el.getBoundingClientRect();\\n  }\\n\\n  if (!box) {\\n    return {\\n      left: 0,\\n      top: 0\\n    };\\n  }\\n\\n  var docEl = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement;\\n  var body = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body;\\n  var clientLeft = docEl.clientLeft || body.clientLeft || 0;\\n  var scrollLeft = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.pageXOffset || body.scrollLeft;\\n  var left = box.left + scrollLeft - clientLeft;\\n  var clientTop = docEl.clientTop || body.clientTop || 0;\\n  var scrollTop = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.pageYOffset || body.scrollTop;\\n  var top = box.top + scrollTop - clientTop; // Android sometimes returns slightly off decimal values, so need to round\\n\\n  return {\\n    left: Math.round(left),\\n    top: Math.round(top)\\n  };\\n}\\n/**\\n * Represents x and y coordinates for a DOM element or mouse pointer.\\n *\\n * @typedef  {Object} module:dom~Coordinates\\n *\\n * @property {number} x\\n *           x coordinate in pixels\\n *\\n * @property {number} y\\n *           y coordinate in pixels\\n */\\n\\n/**\\n * Get the pointer position within an element.\\n *\\n * The base on the coordinates are the bottom left of the element.\\n *\\n * @param  {Element} el\\n *         Element on which to get the pointer position on.\\n *\\n * @param  {EventTarget~Event} event\\n *         Event object.\\n *\\n * @return {module:dom~Coordinates}\\n *         A coordinates object corresponding to the mouse position.\\n *\\n */\\n\\nfunction getPointerPosition(el, event) {\\n  var position = {};\\n  var box = findPosition(el);\\n  var boxW = el.offsetWidth;\\n  var boxH = el.offsetHeight;\\n  var boxY = box.top;\\n  var boxX = box.left;\\n  var pageY = event.pageY;\\n  var pageX = event.pageX;\\n\\n  if (event.changedTouches) {\\n    pageX = event.changedTouches[0].pageX;\\n    pageY = event.changedTouches[0].pageY;\\n  }\\n\\n  position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));\\n  position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\\n  return position;\\n}\\n/**\\n * Determines, via duck typing, whether or not a value is a text node.\\n *\\n * @param  {Mixed} value\\n *         Check if this value is a text node.\\n *\\n * @return {boolean}\\n *         Will be `true` if the value is a text node, `false` otherwise.\\n */\\n\\nfunction isTextNode(value) {\\n  return isObject(value) && value.nodeType === 3;\\n}\\n/**\\n * Empties the contents of an element.\\n *\\n * @param  {Element} el\\n *         The element to empty children from\\n *\\n * @return {Element}\\n *         The element with no children\\n */\\n\\nfunction emptyEl(el) {\\n  while (el.firstChild) {\\n    el.removeChild(el.firstChild);\\n  }\\n\\n  return el;\\n}\\n/**\\n * This is a mixed value that describes content to be injected into the DOM\\n * via some method. It can be of the following types:\\n *\\n * Type       | Description\\n * -----------|-------------\\n * `string`   | The value will be normalized into a text node.\\n * `Element`  | The value will be accepted as-is.\\n * `TextNode` | The value will be accepted as-is.\\n * `Array`    | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\\n * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\\n *\\n * @typedef {string|Element|TextNode|Array|Function} module:dom~ContentDescriptor\\n */\\n\\n/**\\n * Normalizes content for eventual insertion into the DOM.\\n *\\n * This allows a wide range of content definition methods, but helps protect\\n * from falling into the trap of simply writing to `innerHTML`, which could\\n * be an XSS concern.\\n *\\n * The content for an element can be passed in multiple types and\\n * combinations, whose behavior is as follows:\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor value.\\n *\\n * @return {Array}\\n *         All of the content that was passed in, normalized to an array of\\n *         elements or text nodes.\\n */\\n\\nfunction normalizeContent(content) {\\n  // First, invoke content if it is a function. If it produces an array,\\n  // that needs to happen before normalization.\\n  if (typeof content === 'function') {\\n    content = content();\\n  } // Next up, normalize to an array, so one or many items can be normalized,\\n  // filtered, and returned.\\n\\n\\n  return (Array.isArray(content) ? content : [content]).map(function (value) {\\n    // First, invoke value if it is a function to produce a new value,\\n    // which will be subsequently normalized to a Node of some kind.\\n    if (typeof value === 'function') {\\n      value = value();\\n    }\\n\\n    if (isEl(value) || isTextNode(value)) {\\n      return value;\\n    }\\n\\n    if (typeof value === 'string' && /\\\\S/.test(value)) {\\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(value);\\n    }\\n  }).filter(function (value) {\\n    return value;\\n  });\\n}\\n/**\\n * Normalizes and appends content to an element.\\n *\\n * @param  {Element} el\\n *         Element to append normalized content to.\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor value.\\n *\\n * @return {Element}\\n *         The element with appended normalized content.\\n */\\n\\nfunction appendContent(el, content) {\\n  normalizeContent(content).forEach(function (node) {\\n    return el.appendChild(node);\\n  });\\n  return el;\\n}\\n/**\\n * Normalizes and inserts content into an element; this is identical to\\n * `appendContent()`, except it empties the element first.\\n *\\n * @param {Element} el\\n *        Element to insert normalized content into.\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor value.\\n *\\n * @return {Element}\\n *         The element with inserted normalized content.\\n */\\n\\nfunction insertContent(el, content) {\\n  return appendContent(emptyEl(el), content);\\n}\\n/**\\n * Check if an event was a single left click.\\n *\\n * @param  {EventTarget~Event} event\\n *         Event object.\\n *\\n * @return {boolean}\\n *         Will be `true` if a single left click, `false` otherwise.\\n */\\n\\nfunction isSingleLeftClick(event) {\\n  // Note: if you create something draggable, be sure to\\n  // call it on both `mousedown` and `mousemove` event,\\n  // otherwise `mousedown` should be enough for a button\\n  if (event.button === undefined && event.buttons === undefined) {\\n    // Why do we need `buttons` ?\\n    // Because, middle mouse sometimes have this:\\n    // e.button === 0 and e.buttons === 4\\n    // Furthermore, we want to prevent combination click, something like\\n    // HOLD middlemouse then left click, that would be\\n    // e.button === 0, e.buttons === 5\\n    // just `button` is not gonna work\\n    // Alright, then what this block does ?\\n    // this is for chrome `simulate mobile devices`\\n    // I want to support this as well\\n    return true;\\n  }\\n\\n  if (event.button === 0 && event.buttons === undefined) {\\n    // Touch screen, sometimes on some specific device, `buttons`\\n    // doesn't have anything (safari on ios, blackberry...)\\n    return true;\\n  } // `mouseup` event on a single left click has\\n  // `button` and `buttons` equal to 0\\n\\n\\n  if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\\n    return true;\\n  }\\n\\n  if (event.button !== 0 || event.buttons !== 1) {\\n    // This is the reason we have those if else block above\\n    // if any special case we can catch and let it slide\\n    // we do it above, when get to here, this definitely\\n    // is-not-left-click\\n    return false;\\n  }\\n\\n  return true;\\n}\\n/**\\n * Finds a single DOM element matching `selector` within the optional\\n * `context` of another DOM element (defaulting to `document`).\\n *\\n * @param  {string} selector\\n *         A valid CSS selector, which will be passed to `querySelector`.\\n *\\n * @param  {Element|String} [context=document]\\n *         A DOM element within which to query. Can also be a selector\\n *         string in which case the first matching element will be used\\n *         as context. If missing (or no element matches selector), falls\\n *         back to `document`.\\n *\\n * @return {Element|null}\\n *         The element that was found or null.\\n */\\n\\nvar $ = createQuerier('querySelector');\\n/**\\n * Finds a all DOM elements matching `selector` within the optional\\n * `context` of another DOM element (defaulting to `document`).\\n *\\n * @param  {string} selector\\n *         A valid CSS selector, which will be passed to `querySelectorAll`.\\n *\\n * @param  {Element|String} [context=document]\\n *         A DOM element within which to query. Can also be a selector\\n *         string in which case the first matching element will be used\\n *         as context. If missing (or no element matches selector), falls\\n *         back to `document`.\\n *\\n * @return {NodeList}\\n *         A element list of elements that were found. Will be empty if none\\n *         were found.\\n *\\n */\\n\\nvar $$ = createQuerier('querySelectorAll');\\n\\nvar Dom = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  isReal: isReal,\\n  isEl: isEl,\\n  isInFrame: isInFrame,\\n  createEl: createEl,\\n  textContent: textContent,\\n  prependTo: prependTo,\\n  hasClass: hasClass,\\n  addClass: addClass,\\n  removeClass: removeClass,\\n  toggleClass: toggleClass,\\n  setAttributes: setAttributes,\\n  getAttributes: getAttributes,\\n  getAttribute: getAttribute,\\n  setAttribute: setAttribute,\\n  removeAttribute: removeAttribute,\\n  blockTextSelection: blockTextSelection,\\n  unblockTextSelection: unblockTextSelection,\\n  getBoundingClientRect: getBoundingClientRect,\\n  findPosition: findPosition,\\n  getPointerPosition: getPointerPosition,\\n  isTextNode: isTextNode,\\n  emptyEl: emptyEl,\\n  normalizeContent: normalizeContent,\\n  appendContent: appendContent,\\n  insertContent: insertContent,\\n  isSingleLeftClick: isSingleLeftClick,\\n  $: $,\\n  $$: $$\\n});\\n\\n/**\\n * @file setup.js - Functions for setting up a player without\\n * user interaction based on the data-setup `attribute` of the video tag.\\n *\\n * @module setup\\n */\\nvar _windowLoaded = false;\\nvar videojs;\\n/**\\n * Set up any tags that have a data-setup `attribute` when the player is started.\\n */\\n\\nvar autoSetup = function autoSetup() {\\n  // Protect against breakage in non-browser environments and check global autoSetup option.\\n  if (!isReal() || videojs.options.autoSetup === false) {\\n    return;\\n  }\\n\\n  var vids = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('video'));\\n  var audios = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('audio'));\\n  var divs = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('video-js'));\\n  var mediaEls = vids.concat(audios, divs); // Check if any media elements exist\\n\\n  if (mediaEls && mediaEls.length > 0) {\\n    for (var i = 0, e = mediaEls.length; i < e; i++) {\\n      var mediaEl = mediaEls[i]; // Check if element exists, has getAttribute func.\\n\\n      if (mediaEl && mediaEl.getAttribute) {\\n        // Make sure this player hasn't already been set up.\\n        if (mediaEl.player === undefined) {\\n          var options = mediaEl.getAttribute('data-setup'); // Check if data-setup attr exists.\\n          // We only auto-setup if they've added the data-setup attr.\\n\\n          if (options !== null) {\\n            // Create new video.js instance.\\n            videojs(mediaEl);\\n          }\\n        } // If getAttribute isn't defined, we need to wait for the DOM.\\n\\n      } else {\\n        autoSetupTimeout(1);\\n        break;\\n      }\\n    } // No videos were found, so keep looping unless page is finished loading.\\n\\n  } else if (!_windowLoaded) {\\n    autoSetupTimeout(1);\\n  }\\n};\\n/**\\n * Wait until the page is loaded before running autoSetup. This will be called in\\n * autoSetup if `hasLoaded` returns false.\\n *\\n * @param {number} wait\\n *        How long to wait in ms\\n *\\n * @param {module:videojs} [vjs]\\n *        The videojs library function\\n */\\n\\n\\nfunction autoSetupTimeout(wait, vjs) {\\n  if (vjs) {\\n    videojs = vjs;\\n  }\\n\\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(autoSetup, wait);\\n}\\n/**\\n * Used to set the internal tracking of window loaded state to true.\\n *\\n * @private\\n */\\n\\n\\nfunction setWindowLoaded() {\\n  _windowLoaded = true;\\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('load', setWindowLoaded);\\n}\\n\\nif (isReal()) {\\n  if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.readyState === 'complete') {\\n    setWindowLoaded();\\n  } else {\\n    /**\\n     * Listen for the load event on window, and set _windowLoaded to true.\\n     *\\n     * We use a standard event listener here to avoid incrementing the GUID\\n     * before any players are created.\\n     *\\n     * @listens load\\n     */\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('load', setWindowLoaded);\\n  }\\n}\\n\\n/**\\n * @file stylesheet.js\\n * @module stylesheet\\n */\\n/**\\n * Create a DOM syle element given a className for it.\\n *\\n * @param {string} className\\n *        The className to add to the created style element.\\n *\\n * @return {Element}\\n *         The element that was created.\\n */\\n\\nvar createStyleElement = function createStyleElement(className) {\\n  var style = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('style');\\n  style.className = className;\\n  return style;\\n};\\n/**\\n * Add text to a DOM element.\\n *\\n * @param {Element} el\\n *        The Element to add text content to.\\n *\\n * @param {string} content\\n *        The text to add to the element.\\n */\\n\\nvar setTextContent = function setTextContent(el, content) {\\n  if (el.styleSheet) {\\n    el.styleSheet.cssText = content;\\n  } else {\\n    el.textContent = content;\\n  }\\n};\\n\\n/**\\n * @file guid.js\\n * @module guid\\n */\\n// Default value for GUIDs. This allows us to reset the GUID counter in tests.\\n//\\n// The initial GUID is 3 because some users have come to rely on the first\\n// default player ID ending up as `vjs_video_3`.\\n//\\n// See: https://github.com/videojs/video.js/pull/6216\\nvar _initialGuid = 3;\\n/**\\n * Unique ID for an element or function\\n *\\n * @type {Number}\\n */\\n\\nvar _guid = _initialGuid;\\n/**\\n * Get a unique auto-incrementing ID by number that has not been returned before.\\n *\\n * @return {number}\\n *         A new unique ID.\\n */\\n\\nfunction newGUID() {\\n  return _guid++;\\n}\\n\\n/**\\n * @file dom-data.js\\n * @module dom-data\\n */\\nvar FakeWeakMap;\\n\\nif (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WeakMap) {\\n  FakeWeakMap = /*#__PURE__*/function () {\\n    function FakeWeakMap() {\\n      this.vdata = 'vdata' + Math.floor(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now() || Date.now());\\n      this.data = {};\\n    }\\n\\n    var _proto = FakeWeakMap.prototype;\\n\\n    _proto.set = function set(key, value) {\\n      var access = key[this.vdata] || newGUID();\\n\\n      if (!key[this.vdata]) {\\n        key[this.vdata] = access;\\n      }\\n\\n      this.data[access] = value;\\n      return this;\\n    };\\n\\n    _proto.get = function get(key) {\\n      var access = key[this.vdata]; // we have data, return it\\n\\n      if (access) {\\n        return this.data[access];\\n      } // we don't have data, return nothing.\\n      // return undefined explicitly as that's the contract for this method\\n\\n\\n      log('We have no data for this element', key);\\n      return undefined;\\n    };\\n\\n    _proto.has = function has(key) {\\n      var access = key[this.vdata];\\n      return access in this.data;\\n    };\\n\\n    _proto[\\\"delete\\\"] = function _delete(key) {\\n      var access = key[this.vdata];\\n\\n      if (access) {\\n        delete this.data[access];\\n        delete key[this.vdata];\\n      }\\n    };\\n\\n    return FakeWeakMap;\\n  }();\\n}\\n/**\\n * Element Data Store.\\n *\\n * Allows for binding data to an element without putting it directly on the\\n * element. Ex. Event listeners are stored here.\\n * (also from jsninja.com, slightly modified and updated for closure compiler)\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nvar DomData = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WeakMap ? new WeakMap() : new FakeWeakMap();\\n\\n/**\\n * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\\n * robust as jquery's, so there's probably some differences.\\n *\\n * @file events.js\\n * @module events\\n */\\n/**\\n * Clean up the listener cache and dispatchers\\n *\\n * @param {Element|Object} elem\\n *        Element to clean up\\n *\\n * @param {string} type\\n *        Type of event to clean up\\n */\\n\\nfunction _cleanUpEvents(elem, type) {\\n  if (!DomData.has(elem)) {\\n    return;\\n  }\\n\\n  var data = DomData.get(elem); // Remove the events of a particular type if there are none left\\n\\n  if (data.handlers[type].length === 0) {\\n    delete data.handlers[type]; // data.handlers[type] = null;\\n    // Setting to null was causing an error with data.handlers\\n    // Remove the meta-handler from the element\\n\\n    if (elem.removeEventListener) {\\n      elem.removeEventListener(type, data.dispatcher, false);\\n    } else if (elem.detachEvent) {\\n      elem.detachEvent('on' + type, data.dispatcher);\\n    }\\n  } // Remove the events object if there are no types left\\n\\n\\n  if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\\n    delete data.handlers;\\n    delete data.dispatcher;\\n    delete data.disabled;\\n  } // Finally remove the element data if there is no data left\\n\\n\\n  if (Object.getOwnPropertyNames(data).length === 0) {\\n    DomData[\\\"delete\\\"](elem);\\n  }\\n}\\n/**\\n * Loops through an array of event types and calls the requested method for each type.\\n *\\n * @param {Function} fn\\n *        The event method we want to use.\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind listeners to\\n *\\n * @param {string} type\\n *        Type of event to bind to.\\n *\\n * @param {EventTarget~EventListener} callback\\n *        Event listener.\\n */\\n\\n\\nfunction _handleMultipleEvents(fn, elem, types, callback) {\\n  types.forEach(function (type) {\\n    // Call the event method for each one of the types\\n    fn(elem, type, callback);\\n  });\\n}\\n/**\\n * Fix a native event to have standard property values\\n *\\n * @param {Object} event\\n *        Event object to fix.\\n *\\n * @return {Object}\\n *         Fixed event object.\\n */\\n\\n\\nfunction fixEvent(event) {\\n  if (event.fixed_) {\\n    return event;\\n  }\\n\\n  function returnTrue() {\\n    return true;\\n  }\\n\\n  function returnFalse() {\\n    return false;\\n  } // Test if fixing up is needed\\n  // Used to check if !event.stopPropagation instead of isPropagationStopped\\n  // But native events return true for stopPropagation, but don't have\\n  // other expected methods like isPropagationStopped. Seems to be a problem\\n  // with the Javascript Ninja code. So we're just overriding all events now.\\n\\n\\n  if (!event || !event.isPropagationStopped) {\\n    var old = event || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.event;\\n    event = {}; // Clone the old object so that we can modify the values event = {};\\n    // IE8 Doesn't like when you mess with native event properties\\n    // Firefox returns false for event.hasOwnProperty('type') and other props\\n    //  which makes copying more difficult.\\n    // TODO: Probably best to create a whitelist of event props\\n\\n    for (var key in old) {\\n      // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\\n      // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\\n      // and webkitMovementX/Y\\n      if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY') {\\n        // Chrome 32+ warns if you try to copy deprecated returnValue, but\\n        // we still want to if preventDefault isn't supported (IE8).\\n        if (!(key === 'returnValue' && old.preventDefault)) {\\n          event[key] = old[key];\\n        }\\n      }\\n    } // The event occurred on this element\\n\\n\\n    if (!event.target) {\\n      event.target = event.srcElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a;\\n    } // Handle which other element the event is related to\\n\\n\\n    if (!event.relatedTarget) {\\n      event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\\n    } // Stop the default browser action\\n\\n\\n    event.preventDefault = function () {\\n      if (old.preventDefault) {\\n        old.preventDefault();\\n      }\\n\\n      event.returnValue = false;\\n      old.returnValue = false;\\n      event.defaultPrevented = true;\\n    };\\n\\n    event.defaultPrevented = false; // Stop the event from bubbling\\n\\n    event.stopPropagation = function () {\\n      if (old.stopPropagation) {\\n        old.stopPropagation();\\n      }\\n\\n      event.cancelBubble = true;\\n      old.cancelBubble = true;\\n      event.isPropagationStopped = returnTrue;\\n    };\\n\\n    event.isPropagationStopped = returnFalse; // Stop the event from bubbling and executing other handlers\\n\\n    event.stopImmediatePropagation = function () {\\n      if (old.stopImmediatePropagation) {\\n        old.stopImmediatePropagation();\\n      }\\n\\n      event.isImmediatePropagationStopped = returnTrue;\\n      event.stopPropagation();\\n    };\\n\\n    event.isImmediatePropagationStopped = returnFalse; // Handle mouse position\\n\\n    if (event.clientX !== null && event.clientX !== undefined) {\\n      var doc = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement;\\n      var body = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body;\\n      event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\\n      event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\\n    } // Handle key presses\\n\\n\\n    event.which = event.charCode || event.keyCode; // Fix button for mouse clicks:\\n    // 0 == left; 1 == middle; 2 == right\\n\\n    if (event.button !== null && event.button !== undefined) {\\n      // The following is disabled because it does not pass videojs-standard\\n      // and... yikes.\\n\\n      /* eslint-disable */\\n      event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\\n      /* eslint-enable */\\n    }\\n  }\\n\\n  event.fixed_ = true; // Returns fixed-up instance\\n\\n  return event;\\n}\\n/**\\n * Whether passive event listeners are supported\\n */\\n\\nvar _supportsPassive;\\n\\nvar supportsPassive = function supportsPassive() {\\n  if (typeof _supportsPassive !== 'boolean') {\\n    _supportsPassive = false;\\n\\n    try {\\n      var opts = Object.defineProperty({}, 'passive', {\\n        get: function get() {\\n          _supportsPassive = true;\\n        }\\n      });\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('test', null, opts);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('test', null, opts);\\n    } catch (e) {// disregard\\n    }\\n  }\\n\\n  return _supportsPassive;\\n};\\n/**\\n * Touch events Chrome expects to be passive\\n */\\n\\n\\nvar passiveEvents = ['touchstart', 'touchmove'];\\n/**\\n * Add an event listener to element\\n * It stores the handler function in a separate cache object\\n * and adds a generic handler to the element's event,\\n * along with a unique id (guid) to the element.\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind listeners to\\n *\\n * @param {string|string[]} type\\n *        Type of event to bind to.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        Event listener.\\n */\\n\\nfunction on(elem, type, fn) {\\n  if (Array.isArray(type)) {\\n    return _handleMultipleEvents(on, elem, type, fn);\\n  }\\n\\n  if (!DomData.has(elem)) {\\n    DomData.set(elem, {});\\n  }\\n\\n  var data = DomData.get(elem); // We need a place to store all our handler data\\n\\n  if (!data.handlers) {\\n    data.handlers = {};\\n  }\\n\\n  if (!data.handlers[type]) {\\n    data.handlers[type] = [];\\n  }\\n\\n  if (!fn.guid) {\\n    fn.guid = newGUID();\\n  }\\n\\n  data.handlers[type].push(fn);\\n\\n  if (!data.dispatcher) {\\n    data.disabled = false;\\n\\n    data.dispatcher = function (event, hash) {\\n      if (data.disabled) {\\n        return;\\n      }\\n\\n      event = fixEvent(event);\\n      var handlers = data.handlers[event.type];\\n\\n      if (handlers) {\\n        // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\\n        var handlersCopy = handlers.slice(0);\\n\\n        for (var m = 0, n = handlersCopy.length; m < n; m++) {\\n          if (event.isImmediatePropagationStopped()) {\\n            break;\\n          } else {\\n            try {\\n              handlersCopy[m].call(elem, event, hash);\\n            } catch (e) {\\n              log.error(e);\\n            }\\n          }\\n        }\\n      }\\n    };\\n  }\\n\\n  if (data.handlers[type].length === 1) {\\n    if (elem.addEventListener) {\\n      var options = false;\\n\\n      if (supportsPassive() && passiveEvents.indexOf(type) > -1) {\\n        options = {\\n          passive: true\\n        };\\n      }\\n\\n      elem.addEventListener(type, data.dispatcher, options);\\n    } else if (elem.attachEvent) {\\n      elem.attachEvent('on' + type, data.dispatcher);\\n    }\\n  }\\n}\\n/**\\n * Removes event listeners from an element\\n *\\n * @param {Element|Object} elem\\n *        Object to remove listeners from.\\n *\\n * @param {string|string[]} [type]\\n *        Type of listener to remove. Don't include to remove all events from element.\\n *\\n * @param {EventTarget~EventListener} [fn]\\n *        Specific listener to remove. Don't include to remove listeners for an event\\n *        type.\\n */\\n\\nfunction off(elem, type, fn) {\\n  // Don't want to add a cache object through getElData if not needed\\n  if (!DomData.has(elem)) {\\n    return;\\n  }\\n\\n  var data = DomData.get(elem); // If no events exist, nothing to unbind\\n\\n  if (!data.handlers) {\\n    return;\\n  }\\n\\n  if (Array.isArray(type)) {\\n    return _handleMultipleEvents(off, elem, type, fn);\\n  } // Utility function\\n\\n\\n  var removeType = function removeType(el, t) {\\n    data.handlers[t] = [];\\n\\n    _cleanUpEvents(el, t);\\n  }; // Are we removing all bound events?\\n\\n\\n  if (type === undefined) {\\n    for (var t in data.handlers) {\\n      if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\\n        removeType(elem, t);\\n      }\\n    }\\n\\n    return;\\n  }\\n\\n  var handlers = data.handlers[type]; // If no handlers exist, nothing to unbind\\n\\n  if (!handlers) {\\n    return;\\n  } // If no listener was provided, remove all listeners for type\\n\\n\\n  if (!fn) {\\n    removeType(elem, type);\\n    return;\\n  } // We're only removing a single handler\\n\\n\\n  if (fn.guid) {\\n    for (var n = 0; n < handlers.length; n++) {\\n      if (handlers[n].guid === fn.guid) {\\n        handlers.splice(n--, 1);\\n      }\\n    }\\n  }\\n\\n  _cleanUpEvents(elem, type);\\n}\\n/**\\n * Trigger an event for an element\\n *\\n * @param {Element|Object} elem\\n *        Element to trigger an event on\\n *\\n * @param {EventTarget~Event|string} event\\n *        A string (the type) or an event object with a type attribute\\n *\\n * @param {Object} [hash]\\n *        data hash to pass along with the event\\n *\\n * @return {boolean|undefined}\\n *         Returns the opposite of `defaultPrevented` if default was\\n *         prevented. Otherwise, returns `undefined`\\n */\\n\\nfunction trigger(elem, event, hash) {\\n  // Fetches element data and a reference to the parent (for bubbling).\\n  // Don't want to add a data object to cache for every parent,\\n  // so checking hasElData first.\\n  var elemData = DomData.has(elem) ? DomData.get(elem) : {};\\n  var parent = elem.parentNode || elem.ownerDocument; // type = event.type || event,\\n  // handler;\\n  // If an event name was passed as a string, creates an event out of it\\n\\n  if (typeof event === 'string') {\\n    event = {\\n      type: event,\\n      target: elem\\n    };\\n  } else if (!event.target) {\\n    event.target = elem;\\n  } // Normalizes the event properties.\\n\\n\\n  event = fixEvent(event); // If the passed element has a dispatcher, executes the established handlers.\\n\\n  if (elemData.dispatcher) {\\n    elemData.dispatcher.call(elem, event, hash);\\n  } // Unless explicitly stopped or the event does not bubble (e.g. media events)\\n  // recursively calls this function to bubble the event up the DOM.\\n\\n\\n  if (parent && !event.isPropagationStopped() && event.bubbles === true) {\\n    trigger.call(null, parent, event, hash); // If at the top of the DOM, triggers the default action unless disabled.\\n  } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\\n    if (!DomData.has(event.target)) {\\n      DomData.set(event.target, {});\\n    }\\n\\n    var targetData = DomData.get(event.target); // Checks if the target has a default action for this event.\\n\\n    if (event.target[event.type]) {\\n      // Temporarily disables event dispatching on the target as we have already executed the handler.\\n      targetData.disabled = true; // Executes the default action.\\n\\n      if (typeof event.target[event.type] === 'function') {\\n        event.target[event.type]();\\n      } // Re-enables event dispatching.\\n\\n\\n      targetData.disabled = false;\\n    }\\n  } // Inform the triggerer if the default was prevented by returning false\\n\\n\\n  return !event.defaultPrevented;\\n}\\n/**\\n * Trigger a listener only once for an event.\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind to.\\n *\\n * @param {string|string[]} type\\n *        Name/type of event\\n *\\n * @param {Event~EventListener} fn\\n *        Event listener function\\n */\\n\\nfunction one(elem, type, fn) {\\n  if (Array.isArray(type)) {\\n    return _handleMultipleEvents(one, elem, type, fn);\\n  }\\n\\n  var func = function func() {\\n    off(elem, type, func);\\n    fn.apply(this, arguments);\\n  }; // copy the guid to the new function so it can removed using the original function's ID\\n\\n\\n  func.guid = fn.guid = fn.guid || newGUID();\\n  on(elem, type, func);\\n}\\n/**\\n * Trigger a listener only once and then turn if off for all\\n * configured events\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind to.\\n *\\n * @param {string|string[]} type\\n *        Name/type of event\\n *\\n * @param {Event~EventListener} fn\\n *        Event listener function\\n */\\n\\nfunction any(elem, type, fn) {\\n  var func = function func() {\\n    off(elem, type, func);\\n    fn.apply(this, arguments);\\n  }; // copy the guid to the new function so it can removed using the original function's ID\\n\\n\\n  func.guid = fn.guid = fn.guid || newGUID(); // multiple ons, but one off for everything\\n\\n  on(elem, type, func);\\n}\\n\\nvar Events = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  fixEvent: fixEvent,\\n  on: on,\\n  off: off,\\n  trigger: trigger,\\n  one: one,\\n  any: any\\n});\\n\\n/**\\n * @file fn.js\\n * @module fn\\n */\\nvar UPDATE_REFRESH_INTERVAL = 30;\\n/**\\n * Bind (a.k.a proxy or context). A simple method for changing the context of\\n * a function.\\n *\\n * It also stores a unique id on the function so it can be easily removed from\\n * events.\\n *\\n * @function\\n * @param    {Mixed} context\\n *           The object to bind as scope.\\n *\\n * @param    {Function} fn\\n *           The function to be bound to a scope.\\n *\\n * @param    {number} [uid]\\n *           An optional unique ID for the function to be set\\n *\\n * @return   {Function}\\n *           The new function that will be bound into the context given\\n */\\n\\nvar bind = function bind(context, fn, uid) {\\n  // Make sure the function has a unique ID\\n  if (!fn.guid) {\\n    fn.guid = newGUID();\\n  } // Create the new function that changes the context\\n\\n\\n  var bound = fn.bind(context); // Allow for the ability to individualize this function\\n  // Needed in the case where multiple objects might share the same prototype\\n  // IF both items add an event listener with the same function, then you try to remove just one\\n  // it will remove both because they both have the same guid.\\n  // when using this, you need to use the bind method when you remove the listener as well.\\n  // currently used in text tracks\\n\\n  bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\\n  return bound;\\n};\\n/**\\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\\n * at most once per every `wait` milliseconds.\\n *\\n * @function\\n * @param    {Function} fn\\n *           The function to be throttled.\\n *\\n * @param    {number}   wait\\n *           The number of milliseconds by which to throttle.\\n *\\n * @return   {Function}\\n */\\n\\nvar throttle = function throttle(fn, wait) {\\n  var last = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\\n\\n  var throttled = function throttled() {\\n    var now = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\\n\\n    if (now - last >= wait) {\\n      fn.apply(void 0, arguments);\\n      last = now;\\n    }\\n  };\\n\\n  return throttled;\\n};\\n/**\\n * Creates a debounced function that delays invoking `func` until after `wait`\\n * milliseconds have elapsed since the last time the debounced function was\\n * invoked.\\n *\\n * Inspired by lodash and underscore implementations.\\n *\\n * @function\\n * @param    {Function} func\\n *           The function to wrap with debounce behavior.\\n *\\n * @param    {number} wait\\n *           The number of milliseconds to wait after the last invocation.\\n *\\n * @param    {boolean} [immediate]\\n *           Whether or not to invoke the function immediately upon creation.\\n *\\n * @param    {Object} [context=window]\\n *           The \\\"context\\\" in which the debounced function should debounce. For\\n *           example, if this function should be tied to a Video.js player,\\n *           the player can be passed here. Alternatively, defaults to the\\n *           global `window` object.\\n *\\n * @return   {Function}\\n *           A debounced function.\\n */\\n\\nvar debounce = function debounce(func, wait, immediate, context) {\\n  if (context === void 0) {\\n    context = global_window__WEBPACK_IMPORTED_MODULE_0___default.a;\\n  }\\n\\n  var timeout;\\n\\n  var cancel = function cancel() {\\n    context.clearTimeout(timeout);\\n    timeout = null;\\n  };\\n  /* eslint-disable consistent-this */\\n\\n\\n  var debounced = function debounced() {\\n    var self = this;\\n    var args = arguments;\\n\\n    var _later = function later() {\\n      timeout = null;\\n      _later = null;\\n\\n      if (!immediate) {\\n        func.apply(self, args);\\n      }\\n    };\\n\\n    if (!timeout && immediate) {\\n      func.apply(self, args);\\n    }\\n\\n    context.clearTimeout(timeout);\\n    timeout = context.setTimeout(_later, wait);\\n  };\\n  /* eslint-enable consistent-this */\\n\\n\\n  debounced.cancel = cancel;\\n  return debounced;\\n};\\n\\n/**\\n * @file src/js/event-target.js\\n */\\n/**\\n * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\\n * adds shorthand functions that wrap around lengthy functions. For example:\\n * the `on` function is a wrapper around `addEventListener`.\\n *\\n * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\\n * @class EventTarget\\n */\\n\\nvar EventTarget = function EventTarget() {};\\n/**\\n * A Custom DOM event.\\n *\\n * @typedef {Object} EventTarget~Event\\n * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\\n */\\n\\n/**\\n * All event listeners should follow the following format.\\n *\\n * @callback EventTarget~EventListener\\n * @this {EventTarget}\\n *\\n * @param {EventTarget~Event} event\\n *        the event that triggered this function\\n *\\n * @param {Object} [hash]\\n *        hash of data sent during the event\\n */\\n\\n/**\\n * An object containing event names as keys and booleans as values.\\n *\\n * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\\n *         will have extra functionality. See that function for more information.\\n *\\n * @property EventTarget.prototype.allowedEvents_\\n * @private\\n */\\n\\n\\nEventTarget.prototype.allowedEvents_ = {};\\n/**\\n * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\\n * function that will get called when an event with a certain name gets triggered.\\n *\\n * @param {string|string[]} type\\n *        An event name or an array of event names.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        The function to call with `EventTarget`s\\n */\\n\\nEventTarget.prototype.on = function (type, fn) {\\n  // Remove the addEventListener alias before calling Events.on\\n  // so we don't get into an infinite type loop\\n  var ael = this.addEventListener;\\n\\n  this.addEventListener = function () {};\\n\\n  on(this, type, fn);\\n  this.addEventListener = ael;\\n};\\n/**\\n * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\\n * the standard DOM API.\\n *\\n * @function\\n * @see {@link EventTarget#on}\\n */\\n\\n\\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\\n/**\\n * Removes an `event listener` for a specific event from an instance of `EventTarget`.\\n * This makes it so that the `event listener` will no longer get called when the\\n * named event happens.\\n *\\n * @param {string|string[]} type\\n *        An event name or an array of event names.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        The function to remove.\\n */\\n\\nEventTarget.prototype.off = function (type, fn) {\\n  off(this, type, fn);\\n};\\n/**\\n * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\\n * the standard DOM API.\\n *\\n * @function\\n * @see {@link EventTarget#off}\\n */\\n\\n\\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\\n/**\\n * This function will add an `event listener` that gets triggered only once. After the\\n * first trigger it will get removed. This is like adding an `event listener`\\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\\n *\\n * @param {string|string[]} type\\n *        An event name or an array of event names.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        The function to be called once for each event name.\\n */\\n\\nEventTarget.prototype.one = function (type, fn) {\\n  // Remove the addEventListener aliasing Events.on\\n  // so we don't get into an infinite type loop\\n  var ael = this.addEventListener;\\n\\n  this.addEventListener = function () {};\\n\\n  one(this, type, fn);\\n  this.addEventListener = ael;\\n};\\n\\nEventTarget.prototype.any = function (type, fn) {\\n  // Remove the addEventListener aliasing Events.on\\n  // so we don't get into an infinite type loop\\n  var ael = this.addEventListener;\\n\\n  this.addEventListener = function () {};\\n\\n  any(this, type, fn);\\n  this.addEventListener = ael;\\n};\\n/**\\n * This function causes an event to happen. This will then cause any `event listeners`\\n * that are waiting for that event, to get called. If there are no `event listeners`\\n * for an event then nothing will happen.\\n *\\n * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\\n * Trigger will also call the `on` + `uppercaseEventName` function.\\n *\\n * Example:\\n * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\\n * `onClick` if it exists.\\n *\\n * @param {string|EventTarget~Event|Object} event\\n *        The name of the event, an `Event`, or an object with a key of type set to\\n *        an event name.\\n */\\n\\n\\nEventTarget.prototype.trigger = function (event) {\\n  var type = event.type || event; // deprecation\\n  // In a future version we should default target to `this`\\n  // similar to how we default the target to `elem` in\\n  // `Events.trigger`. Right now the default `target` will be\\n  // `document` due to the `Event.fixEvent` call.\\n\\n  if (typeof event === 'string') {\\n    event = {\\n      type: type\\n    };\\n  }\\n\\n  event = fixEvent(event);\\n\\n  if (this.allowedEvents_[type] && this['on' + type]) {\\n    this['on' + type](event);\\n  }\\n\\n  trigger(this, event);\\n};\\n/**\\n * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\\n * the standard DOM API.\\n *\\n * @function\\n * @see {@link EventTarget#trigger}\\n */\\n\\n\\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\\nvar EVENT_MAP;\\n\\nEventTarget.prototype.queueTrigger = function (event) {\\n  var _this = this;\\n\\n  // only set up EVENT_MAP if it'll be used\\n  if (!EVENT_MAP) {\\n    EVENT_MAP = new Map();\\n  }\\n\\n  var type = event.type || event;\\n  var map = EVENT_MAP.get(this);\\n\\n  if (!map) {\\n    map = new Map();\\n    EVENT_MAP.set(this, map);\\n  }\\n\\n  var oldTimeout = map.get(type);\\n  map[\\\"delete\\\"](type);\\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(oldTimeout);\\n  var timeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n    // if we cleared out all timeouts for the current target, delete its map\\n    if (map.size === 0) {\\n      map = null;\\n      EVENT_MAP[\\\"delete\\\"](_this);\\n    }\\n\\n    _this.trigger(event);\\n  }, 0);\\n  map.set(type, timeout);\\n};\\n\\n/**\\n * @file mixins/evented.js\\n * @module evented\\n */\\n/**\\n * Returns whether or not an object has had the evented mixin applied.\\n *\\n * @param  {Object} object\\n *         An object to test.\\n *\\n * @return {boolean}\\n *         Whether or not the object appears to be evented.\\n */\\n\\nvar isEvented = function isEvented(object) {\\n  return object instanceof EventTarget || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(function (k) {\\n    return typeof object[k] === 'function';\\n  });\\n};\\n/**\\n * Adds a callback to run after the evented mixin applied.\\n *\\n * @param  {Object} object\\n *         An object to Add\\n * @param  {Function} callback\\n *         The callback to run.\\n */\\n\\n\\nvar addEventedCallback = function addEventedCallback(target, callback) {\\n  if (isEvented(target)) {\\n    callback();\\n  } else {\\n    if (!target.eventedCallbacks) {\\n      target.eventedCallbacks = [];\\n    }\\n\\n    target.eventedCallbacks.push(callback);\\n  }\\n};\\n/**\\n * Whether a value is a valid event type - non-empty string or array.\\n *\\n * @private\\n * @param  {string|Array} type\\n *         The type value to test.\\n *\\n * @return {boolean}\\n *         Whether or not the type is a valid event type.\\n */\\n\\n\\nvar isValidEventType = function isValidEventType(type) {\\n  return (// The regex here verifies that the `type` contains at least one non-\\n    // whitespace character.\\n    typeof type === 'string' && /\\\\S/.test(type) || Array.isArray(type) && !!type.length\\n  );\\n};\\n/**\\n * Validates a value to determine if it is a valid event target. Throws if not.\\n *\\n * @private\\n * @throws {Error}\\n *         If the target does not appear to be a valid event target.\\n *\\n * @param  {Object} target\\n *         The object to test.\\n */\\n\\n\\nvar validateTarget = function validateTarget(target) {\\n  if (!target.nodeName && !isEvented(target)) {\\n    throw new Error('Invalid target; must be a DOM node or evented object.');\\n  }\\n};\\n/**\\n * Validates a value to determine if it is a valid event target. Throws if not.\\n *\\n * @private\\n * @throws {Error}\\n *         If the type does not appear to be a valid event type.\\n *\\n * @param  {string|Array} type\\n *         The type to test.\\n */\\n\\n\\nvar validateEventType = function validateEventType(type) {\\n  if (!isValidEventType(type)) {\\n    throw new Error('Invalid event type; must be a non-empty string or array.');\\n  }\\n};\\n/**\\n * Validates a value to determine if it is a valid listener. Throws if not.\\n *\\n * @private\\n * @throws {Error}\\n *         If the listener is not a function.\\n *\\n * @param  {Function} listener\\n *         The listener to test.\\n */\\n\\n\\nvar validateListener = function validateListener(listener) {\\n  if (typeof listener !== 'function') {\\n    throw new Error('Invalid listener; must be a function.');\\n  }\\n};\\n/**\\n * Takes an array of arguments given to `on()` or `one()`, validates them, and\\n * normalizes them into an object.\\n *\\n * @private\\n * @param  {Object} self\\n *         The evented object on which `on()` or `one()` was called. This\\n *         object will be bound as the `this` value for the listener.\\n *\\n * @param  {Array} args\\n *         An array of arguments passed to `on()` or `one()`.\\n *\\n * @return {Object}\\n *         An object containing useful values for `on()` or `one()` calls.\\n */\\n\\n\\nvar normalizeListenArgs = function normalizeListenArgs(self, args) {\\n  // If the number of arguments is less than 3, the target is always the\\n  // evented object itself.\\n  var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\\n  var target;\\n  var type;\\n  var listener;\\n\\n  if (isTargetingSelf) {\\n    target = self.eventBusEl_; // Deal with cases where we got 3 arguments, but we are still listening to\\n    // the evented object itself.\\n\\n    if (args.length >= 3) {\\n      args.shift();\\n    }\\n\\n    type = args[0];\\n    listener = args[1];\\n  } else {\\n    target = args[0];\\n    type = args[1];\\n    listener = args[2];\\n  }\\n\\n  validateTarget(target);\\n  validateEventType(type);\\n  validateListener(listener);\\n  listener = bind(self, listener);\\n  return {\\n    isTargetingSelf: isTargetingSelf,\\n    target: target,\\n    type: type,\\n    listener: listener\\n  };\\n};\\n/**\\n * Adds the listener to the event type(s) on the target, normalizing for\\n * the type of target.\\n *\\n * @private\\n * @param  {Element|Object} target\\n *         A DOM node or evented object.\\n *\\n * @param  {string} method\\n *         The event binding method to use (\\\"on\\\" or \\\"one\\\").\\n *\\n * @param  {string|Array} type\\n *         One or more event type(s).\\n *\\n * @param  {Function} listener\\n *         A listener function.\\n */\\n\\n\\nvar listen = function listen(target, method, type, listener) {\\n  validateTarget(target);\\n\\n  if (target.nodeName) {\\n    Events[method](target, type, listener);\\n  } else {\\n    target[method](type, listener);\\n  }\\n};\\n/**\\n * Contains methods that provide event capabilities to an object which is passed\\n * to {@link module:evented|evented}.\\n *\\n * @mixin EventedMixin\\n */\\n\\n\\nvar EventedMixin = {\\n  /**\\n   * Add a listener to an event (or events) on this object or another evented\\n   * object.\\n   *\\n   * @param  {string|Array|Element|Object} targetOrType\\n   *         If this is a string or array, it represents the event type(s)\\n   *         that will trigger the listener.\\n   *\\n   *         Another evented object can be passed here instead, which will\\n   *         cause the listener to listen for events on _that_ object.\\n   *\\n   *         In either case, the listener's `this` value will be bound to\\n   *         this object.\\n   *\\n   * @param  {string|Array|Function} typeOrListener\\n   *         If the first argument was a string or array, this should be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function.\\n   */\\n  on: function on() {\\n    var _this = this;\\n\\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n      args[_key] = arguments[_key];\\n    }\\n\\n    var _normalizeListenArgs = normalizeListenArgs(this, args),\\n        isTargetingSelf = _normalizeListenArgs.isTargetingSelf,\\n        target = _normalizeListenArgs.target,\\n        type = _normalizeListenArgs.type,\\n        listener = _normalizeListenArgs.listener;\\n\\n    listen(target, 'on', type, listener); // If this object is listening to another evented object.\\n\\n    if (!isTargetingSelf) {\\n      // If this object is disposed, remove the listener.\\n      var removeListenerOnDispose = function removeListenerOnDispose() {\\n        return _this.off(target, type, listener);\\n      }; // Use the same function ID as the listener so we can remove it later it\\n      // using the ID of the original listener.\\n\\n\\n      removeListenerOnDispose.guid = listener.guid; // Add a listener to the target's dispose event as well. This ensures\\n      // that if the target is disposed BEFORE this object, we remove the\\n      // removal listener that was just added. Otherwise, we create a memory leak.\\n\\n      var removeRemoverOnTargetDispose = function removeRemoverOnTargetDispose() {\\n        return _this.off('dispose', removeListenerOnDispose);\\n      }; // Use the same function ID as the listener so we can remove it later\\n      // it using the ID of the original listener.\\n\\n\\n      removeRemoverOnTargetDispose.guid = listener.guid;\\n      listen(this, 'on', 'dispose', removeListenerOnDispose);\\n      listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\\n    }\\n  },\\n\\n  /**\\n   * Add a listener to an event (or events) on this object or another evented\\n   * object. The listener will be called once per event and then removed.\\n   *\\n   * @param  {string|Array|Element|Object} targetOrType\\n   *         If this is a string or array, it represents the event type(s)\\n   *         that will trigger the listener.\\n   *\\n   *         Another evented object can be passed here instead, which will\\n   *         cause the listener to listen for events on _that_ object.\\n   *\\n   *         In either case, the listener's `this` value will be bound to\\n   *         this object.\\n   *\\n   * @param  {string|Array|Function} typeOrListener\\n   *         If the first argument was a string or array, this should be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function.\\n   */\\n  one: function one() {\\n    var _this2 = this;\\n\\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n      args[_key2] = arguments[_key2];\\n    }\\n\\n    var _normalizeListenArgs2 = normalizeListenArgs(this, args),\\n        isTargetingSelf = _normalizeListenArgs2.isTargetingSelf,\\n        target = _normalizeListenArgs2.target,\\n        type = _normalizeListenArgs2.type,\\n        listener = _normalizeListenArgs2.listener; // Targeting this evented object.\\n\\n\\n    if (isTargetingSelf) {\\n      listen(target, 'one', type, listener); // Targeting another evented object.\\n    } else {\\n      // TODO: This wrapper is incorrect! It should only\\n      //       remove the wrapper for the event type that called it.\\n      //       Instead all listners are removed on the first trigger!\\n      //       see https://github.com/videojs/video.js/issues/5962\\n      var wrapper = function wrapper() {\\n        _this2.off(target, type, wrapper);\\n\\n        for (var _len3 = arguments.length, largs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n          largs[_key3] = arguments[_key3];\\n        }\\n\\n        listener.apply(null, largs);\\n      }; // Use the same function ID as the listener so we can remove it later\\n      // it using the ID of the original listener.\\n\\n\\n      wrapper.guid = listener.guid;\\n      listen(target, 'one', type, wrapper);\\n    }\\n  },\\n\\n  /**\\n   * Add a listener to an event (or events) on this object or another evented\\n   * object. The listener will only be called once for the first event that is triggered\\n   * then removed.\\n   *\\n   * @param  {string|Array|Element|Object} targetOrType\\n   *         If this is a string or array, it represents the event type(s)\\n   *         that will trigger the listener.\\n   *\\n   *         Another evented object can be passed here instead, which will\\n   *         cause the listener to listen for events on _that_ object.\\n   *\\n   *         In either case, the listener's `this` value will be bound to\\n   *         this object.\\n   *\\n   * @param  {string|Array|Function} typeOrListener\\n   *         If the first argument was a string or array, this should be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function.\\n   */\\n  any: function any() {\\n    var _this3 = this;\\n\\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\\n      args[_key4] = arguments[_key4];\\n    }\\n\\n    var _normalizeListenArgs3 = normalizeListenArgs(this, args),\\n        isTargetingSelf = _normalizeListenArgs3.isTargetingSelf,\\n        target = _normalizeListenArgs3.target,\\n        type = _normalizeListenArgs3.type,\\n        listener = _normalizeListenArgs3.listener; // Targeting this evented object.\\n\\n\\n    if (isTargetingSelf) {\\n      listen(target, 'any', type, listener); // Targeting another evented object.\\n    } else {\\n      var wrapper = function wrapper() {\\n        _this3.off(target, type, wrapper);\\n\\n        for (var _len5 = arguments.length, largs = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\\n          largs[_key5] = arguments[_key5];\\n        }\\n\\n        listener.apply(null, largs);\\n      }; // Use the same function ID as the listener so we can remove it later\\n      // it using the ID of the original listener.\\n\\n\\n      wrapper.guid = listener.guid;\\n      listen(target, 'any', type, wrapper);\\n    }\\n  },\\n\\n  /**\\n   * Removes listener(s) from event(s) on an evented object.\\n   *\\n   * @param  {string|Array|Element|Object} [targetOrType]\\n   *         If this is a string or array, it represents the event type(s).\\n   *\\n   *         Another evented object can be passed here instead, in which case\\n   *         ALL 3 arguments are _required_.\\n   *\\n   * @param  {string|Array|Function} [typeOrListener]\\n   *         If the first argument was a string or array, this may be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function; otherwise, _all_ listeners bound to the\\n   *         event type(s) will be removed.\\n   */\\n  off: function off$1(targetOrType, typeOrListener, listener) {\\n    // Targeting this evented object.\\n    if (!targetOrType || isValidEventType(targetOrType)) {\\n      off(this.eventBusEl_, targetOrType, typeOrListener); // Targeting another evented object.\\n    } else {\\n      var target = targetOrType;\\n      var type = typeOrListener; // Fail fast and in a meaningful way!\\n\\n      validateTarget(target);\\n      validateEventType(type);\\n      validateListener(listener); // Ensure there's at least a guid, even if the function hasn't been used\\n\\n      listener = bind(this, listener); // Remove the dispose listener on this evented object, which was given\\n      // the same guid as the event listener in on().\\n\\n      this.off('dispose', listener);\\n\\n      if (target.nodeName) {\\n        off(target, type, listener);\\n        off(target, 'dispose', listener);\\n      } else if (isEvented(target)) {\\n        target.off(type, listener);\\n        target.off('dispose', listener);\\n      }\\n    }\\n  },\\n\\n  /**\\n   * Fire an event on this evented object, causing its listeners to be called.\\n   *\\n   * @param   {string|Object} event\\n   *          An event type or an object with a type property.\\n   *\\n   * @param   {Object} [hash]\\n   *          An additional object to pass along to listeners.\\n   *\\n   * @return {boolean}\\n   *          Whether or not the default behavior was prevented.\\n   */\\n  trigger: function trigger$1(event, hash) {\\n    return trigger(this.eventBusEl_, event, hash);\\n  }\\n};\\n/**\\n * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\\n *\\n * @param  {Object} target\\n *         The object to which to add event methods.\\n *\\n * @param  {Object} [options={}]\\n *         Options for customizing the mixin behavior.\\n *\\n * @param  {string} [options.eventBusKey]\\n *         By default, adds a `eventBusEl_` DOM element to the target object,\\n *         which is used as an event bus. If the target object already has a\\n *         DOM element that should be used, pass its key here.\\n *\\n * @return {Object}\\n *         The target object.\\n */\\n\\nfunction evented(target, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  var _options = options,\\n      eventBusKey = _options.eventBusKey; // Set or create the eventBusEl_.\\n\\n  if (eventBusKey) {\\n    if (!target[eventBusKey].nodeName) {\\n      throw new Error(\\\"The eventBusKey \\\\\\\"\\\" + eventBusKey + \\\"\\\\\\\" does not refer to an element.\\\");\\n    }\\n\\n    target.eventBusEl_ = target[eventBusKey];\\n  } else {\\n    target.eventBusEl_ = createEl('span', {\\n      className: 'vjs-event-bus'\\n    });\\n  }\\n\\n  assign(target, EventedMixin);\\n\\n  if (target.eventedCallbacks) {\\n    target.eventedCallbacks.forEach(function (callback) {\\n      callback();\\n    });\\n  } // When any evented object is disposed, it removes all its listeners.\\n\\n\\n  target.on('dispose', function () {\\n    target.off();\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n      target.eventBusEl_ = null;\\n    }, 0);\\n  });\\n  return target;\\n}\\n\\n/**\\n * @file mixins/stateful.js\\n * @module stateful\\n */\\n/**\\n * Contains methods that provide statefulness to an object which is passed\\n * to {@link module:stateful}.\\n *\\n * @mixin StatefulMixin\\n */\\n\\nvar StatefulMixin = {\\n  /**\\n   * A hash containing arbitrary keys and values representing the state of\\n   * the object.\\n   *\\n   * @type {Object}\\n   */\\n  state: {},\\n\\n  /**\\n   * Set the state of an object by mutating its\\n   * {@link module:stateful~StatefulMixin.state|state} object in place.\\n   *\\n   * @fires   module:stateful~StatefulMixin#statechanged\\n   * @param   {Object|Function} stateUpdates\\n   *          A new set of properties to shallow-merge into the plugin state.\\n   *          Can be a plain object or a function returning a plain object.\\n   *\\n   * @return {Object|undefined}\\n   *          An object containing changes that occurred. If no changes\\n   *          occurred, returns `undefined`.\\n   */\\n  setState: function setState(stateUpdates) {\\n    var _this = this;\\n\\n    // Support providing the `stateUpdates` state as a function.\\n    if (typeof stateUpdates === 'function') {\\n      stateUpdates = stateUpdates();\\n    }\\n\\n    var changes;\\n    each(stateUpdates, function (value, key) {\\n      // Record the change if the value is different from what's in the\\n      // current state.\\n      if (_this.state[key] !== value) {\\n        changes = changes || {};\\n        changes[key] = {\\n          from: _this.state[key],\\n          to: value\\n        };\\n      }\\n\\n      _this.state[key] = value;\\n    }); // Only trigger \\\"statechange\\\" if there were changes AND we have a trigger\\n    // function. This allows us to not require that the target object be an\\n    // evented object.\\n\\n    if (changes && isEvented(this)) {\\n      /**\\n       * An event triggered on an object that is both\\n       * {@link module:stateful|stateful} and {@link module:evented|evented}\\n       * indicating that its state has changed.\\n       *\\n       * @event    module:stateful~StatefulMixin#statechanged\\n       * @type     {Object}\\n       * @property {Object} changes\\n       *           A hash containing the properties that were changed and\\n       *           the values they were changed `from` and `to`.\\n       */\\n      this.trigger({\\n        changes: changes,\\n        type: 'statechanged'\\n      });\\n    }\\n\\n    return changes;\\n  }\\n};\\n/**\\n * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\\n * object.\\n *\\n * If the target object is {@link module:evented|evented} and has a\\n * `handleStateChanged` method, that method will be automatically bound to the\\n * `statechanged` event on itself.\\n *\\n * @param   {Object} target\\n *          The object to be made stateful.\\n *\\n * @param   {Object} [defaultState]\\n *          A default set of properties to populate the newly-stateful object's\\n *          `state` property.\\n *\\n * @return {Object}\\n *          Returns the `target`.\\n */\\n\\nfunction stateful(target, defaultState) {\\n  assign(target, StatefulMixin); // This happens after the mixing-in because we need to replace the `state`\\n  // added in that step.\\n\\n  target.state = assign({}, target.state, defaultState); // Auto-bind the `handleStateChanged` method of the target object if it exists.\\n\\n  if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\\n    target.on('statechanged', target.handleStateChanged);\\n  }\\n\\n  return target;\\n}\\n\\n/**\\n * @file string-cases.js\\n * @module to-lower-case\\n */\\n\\n/**\\n * Lowercase the first letter of a string.\\n *\\n * @param {string} string\\n *        String to be lowercased\\n *\\n * @return {string}\\n *         The string with a lowercased first letter\\n */\\nvar toLowerCase = function toLowerCase(string) {\\n  if (typeof string !== 'string') {\\n    return string;\\n  }\\n\\n  return string.replace(/./, function (w) {\\n    return w.toLowerCase();\\n  });\\n};\\n/**\\n * Uppercase the first letter of a string.\\n *\\n * @param {string} string\\n *        String to be uppercased\\n *\\n * @return {string}\\n *         The string with an uppercased first letter\\n */\\n\\nvar toTitleCase = function toTitleCase(string) {\\n  if (typeof string !== 'string') {\\n    return string;\\n  }\\n\\n  return string.replace(/./, function (w) {\\n    return w.toUpperCase();\\n  });\\n};\\n/**\\n * Compares the TitleCase versions of the two strings for equality.\\n *\\n * @param {string} str1\\n *        The first string to compare\\n *\\n * @param {string} str2\\n *        The second string to compare\\n *\\n * @return {boolean}\\n *         Whether the TitleCase versions of the strings are equal\\n */\\n\\nvar titleCaseEquals = function titleCaseEquals(str1, str2) {\\n  return toTitleCase(str1) === toTitleCase(str2);\\n};\\n\\n/**\\n * @file merge-options.js\\n * @module merge-options\\n */\\n/**\\n * Merge two objects recursively.\\n *\\n * Performs a deep merge like\\n * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\\n * plain objects (not arrays, elements, or anything else).\\n *\\n * Non-plain object values will be copied directly from the right-most\\n * argument.\\n *\\n * @static\\n * @param   {Object[]} sources\\n *          One or more objects to merge into a new object.\\n *\\n * @return {Object}\\n *          A new object that is the merged result of all sources.\\n */\\n\\nfunction mergeOptions() {\\n  var result = {};\\n\\n  for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\\n    sources[_key] = arguments[_key];\\n  }\\n\\n  sources.forEach(function (source) {\\n    if (!source) {\\n      return;\\n    }\\n\\n    each(source, function (value, key) {\\n      if (!isPlain(value)) {\\n        result[key] = value;\\n        return;\\n      }\\n\\n      if (!isPlain(result[key])) {\\n        result[key] = {};\\n      }\\n\\n      result[key] = mergeOptions(result[key], value);\\n    });\\n  });\\n  return result;\\n}\\n\\n/**\\n * Player Component - Base class for all UI objects\\n *\\n * @file component.js\\n */\\n/**\\n * Base class for all UI Components.\\n * Components are UI objects which represent both a javascript object and an element\\n * in the DOM. They can be children of other components, and can have\\n * children themselves.\\n *\\n * Components can also use methods from {@link EventTarget}\\n */\\n\\nvar Component = /*#__PURE__*/function () {\\n  /**\\n   * A callback that is called when a component is ready. Does not have any\\n   * paramters and any callback value will be ignored.\\n   *\\n   * @callback Component~ReadyCallback\\n   * @this Component\\n   */\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Object[]} [options.children]\\n   *        An array of children objects to intialize this component with. Children objects have\\n   *        a name property that will be used if more than one component of the same type needs to be\\n   *        added.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        Function that gets called when the `Component` is ready.\\n   */\\n  function Component(player, options, ready) {\\n    // The component might be the player itself and we can't pass `this` to super\\n    if (!player && this.play) {\\n      this.player_ = player = this; // eslint-disable-line\\n    } else {\\n      this.player_ = player;\\n    }\\n\\n    this.isDisposed_ = false; // Hold the reference to the parent component via `addChild` method\\n\\n    this.parentComponent_ = null; // Make a copy of prototype.options_ to protect against overriding defaults\\n\\n    this.options_ = mergeOptions({}, this.options_); // Updated options with supplied options\\n\\n    options = this.options_ = mergeOptions(this.options_, options); // Get ID from options or options element if one is supplied\\n\\n    this.id_ = options.id || options.el && options.el.id; // If there was no ID from the options, generate one\\n\\n    if (!this.id_) {\\n      // Don't require the player ID function in the case of mock players\\n      var id = player && player.id && player.id() || 'no_player';\\n      this.id_ = id + \\\"_component_\\\" + newGUID();\\n    }\\n\\n    this.name_ = options.name || null; // Create element if one wasn't provided in options\\n\\n    if (options.el) {\\n      this.el_ = options.el;\\n    } else if (options.createEl !== false) {\\n      this.el_ = this.createEl();\\n    } // if evented is anything except false, we want to mixin in evented\\n\\n\\n    if (options.evented !== false) {\\n      // Make this an evented object and use `el_`, if available, as its event bus\\n      evented(this, {\\n        eventBusKey: this.el_ ? 'el_' : null\\n      });\\n    }\\n\\n    stateful(this, this.constructor.defaultState);\\n    this.children_ = [];\\n    this.childIndex_ = {};\\n    this.childNameIndex_ = {};\\n    var SetSham;\\n\\n    if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set) {\\n      SetSham = /*#__PURE__*/function () {\\n        function SetSham() {\\n          this.set_ = {};\\n        }\\n\\n        var _proto2 = SetSham.prototype;\\n\\n        _proto2.has = function has(key) {\\n          return key in this.set_;\\n        };\\n\\n        _proto2[\\\"delete\\\"] = function _delete(key) {\\n          var has = this.has(key);\\n          delete this.set_[key];\\n          return has;\\n        };\\n\\n        _proto2.add = function add(key) {\\n          this.set_[key] = 1;\\n          return this;\\n        };\\n\\n        _proto2.forEach = function forEach(callback, thisArg) {\\n          for (var key in this.set_) {\\n            callback.call(thisArg, key, key, this);\\n          }\\n        };\\n\\n        return SetSham;\\n      }();\\n    }\\n\\n    this.setTimeoutIds_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? new Set() : new SetSham();\\n    this.setIntervalIds_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? new Set() : new SetSham();\\n    this.rafIds_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? new Set() : new SetSham();\\n    this.clearingTimersOnDispose_ = false; // Add any child components in options\\n\\n    if (options.initChildren !== false) {\\n      this.initChildren();\\n    }\\n\\n    this.ready(ready); // Don't want to trigger ready here or it will before init is actually\\n    // finished for all children that run this constructor\\n\\n    if (options.reportTouchActivity !== false) {\\n      this.enableTouchActivity();\\n    }\\n  }\\n  /**\\n   * Dispose of the `Component` and all child components.\\n   *\\n   * @fires Component#dispose\\n   */\\n\\n\\n  var _proto = Component.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    // Bail out if the component has already been disposed.\\n    if (this.isDisposed_) {\\n      return;\\n    }\\n    /**\\n     * Triggered when a `Component` is disposed.\\n     *\\n     * @event Component#dispose\\n     * @type {EventTarget~Event}\\n     *\\n     * @property {boolean} [bubbles=false]\\n     *           set to false so that the dispose event does not\\n     *           bubble up\\n     */\\n\\n\\n    this.trigger({\\n      type: 'dispose',\\n      bubbles: false\\n    });\\n    this.isDisposed_ = true; // Dispose all children.\\n\\n    if (this.children_) {\\n      for (var i = this.children_.length - 1; i >= 0; i--) {\\n        if (this.children_[i].dispose) {\\n          this.children_[i].dispose();\\n        }\\n      }\\n    } // Delete child references\\n\\n\\n    this.children_ = null;\\n    this.childIndex_ = null;\\n    this.childNameIndex_ = null;\\n    this.parentComponent_ = null;\\n\\n    if (this.el_) {\\n      // Remove element from DOM\\n      if (this.el_.parentNode) {\\n        this.el_.parentNode.removeChild(this.el_);\\n      }\\n\\n      if (DomData.has(this.el_)) {\\n        DomData[\\\"delete\\\"](this.el_);\\n      }\\n\\n      this.el_ = null;\\n    } // remove reference to the player after disposing of the element\\n\\n\\n    this.player_ = null;\\n  }\\n  /**\\n   * Determine whether or not this component has been disposed.\\n   *\\n   * @return {boolean}\\n   *         If the component has been disposed, will be `true`. Otherwise, `false`.\\n   */\\n  ;\\n\\n  _proto.isDisposed = function isDisposed() {\\n    return Boolean(this.isDisposed_);\\n  }\\n  /**\\n   * Return the {@link Player} that the `Component` has attached to.\\n   *\\n   * @return {Player}\\n   *         The player that this `Component` has attached to.\\n   */\\n  ;\\n\\n  _proto.player = function player() {\\n    return this.player_;\\n  }\\n  /**\\n   * Deep merge of options objects with new options.\\n   * > Note: When both `obj` and `options` contain properties whose values are objects.\\n   *         The two properties get merged using {@link module:mergeOptions}\\n   *\\n   * @param {Object} obj\\n   *        The object that contains new options.\\n   *\\n   * @return {Object}\\n   *         A new object of `this.options_` and `obj` merged together.\\n   */\\n  ;\\n\\n  _proto.options = function options(obj) {\\n    if (!obj) {\\n      return this.options_;\\n    }\\n\\n    this.options_ = mergeOptions(this.options_, obj);\\n    return this.options_;\\n  }\\n  /**\\n   * Get the `Component`s DOM element\\n   *\\n   * @return {Element}\\n   *         The DOM element for this `Component`.\\n   */\\n  ;\\n\\n  _proto.el = function el() {\\n    return this.el_;\\n  }\\n  /**\\n   * Create the `Component`s DOM element.\\n   *\\n   * @param {string} [tagName]\\n   *        Element's DOM node type. e.g. 'div'\\n   *\\n   * @param {Object} [properties]\\n   *        An object of properties that should be set.\\n   *\\n   * @param {Object} [attributes]\\n   *        An object of attributes that should be set.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1(tagName, properties, attributes) {\\n    return createEl(tagName, properties, attributes);\\n  }\\n  /**\\n   * Localize a string given the string in english.\\n   *\\n   * If tokens are provided, it'll try and run a simple token replacement on the provided string.\\n   * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\\n   *\\n   * If a `defaultValue` is provided, it'll use that over `string`,\\n   * if a value isn't found in provided language files.\\n   * This is useful if you want to have a descriptive key for token replacement\\n   * but have a succinct localized string and not require `en.json` to be included.\\n   *\\n   * Currently, it is used for the progress bar timing.\\n   * ```js\\n   * {\\n   *   \\\"progress bar timing: currentTime={1} duration={2}\\\": \\\"{1} of {2}\\\"\\n   * }\\n   * ```\\n   * It is then used like so:\\n   * ```js\\n   * this.localize('progress bar timing: currentTime={1} duration{2}',\\n   *               [this.player_.currentTime(), this.player_.duration()],\\n   *               '{1} of {2}');\\n   * ```\\n   *\\n   * Which outputs something like: `01:23 of 24:56`.\\n   *\\n   *\\n   * @param {string} string\\n   *        The string to localize and the key to lookup in the language files.\\n   * @param {string[]} [tokens]\\n   *        If the current item has token replacements, provide the tokens here.\\n   * @param {string} [defaultValue]\\n   *        Defaults to `string`. Can be a default value to use for token replacement\\n   *        if the lookup key is needed to be separate.\\n   *\\n   * @return {string}\\n   *         The localized string or if no localization exists the english string.\\n   */\\n  ;\\n\\n  _proto.localize = function localize(string, tokens, defaultValue) {\\n    if (defaultValue === void 0) {\\n      defaultValue = string;\\n    }\\n\\n    var code = this.player_.language && this.player_.language();\\n    var languages = this.player_.languages && this.player_.languages();\\n    var language = languages && languages[code];\\n    var primaryCode = code && code.split('-')[0];\\n    var primaryLang = languages && languages[primaryCode];\\n    var localizedString = defaultValue;\\n\\n    if (language && language[string]) {\\n      localizedString = language[string];\\n    } else if (primaryLang && primaryLang[string]) {\\n      localizedString = primaryLang[string];\\n    }\\n\\n    if (tokens) {\\n      localizedString = localizedString.replace(/\\\\{(\\\\d+)\\\\}/g, function (match, index) {\\n        var value = tokens[index - 1];\\n        var ret = value;\\n\\n        if (typeof value === 'undefined') {\\n          ret = match;\\n        }\\n\\n        return ret;\\n      });\\n    }\\n\\n    return localizedString;\\n  }\\n  /**\\n   * Return the `Component`s DOM element. This is where children get inserted.\\n   * This will usually be the the same as the element returned in {@link Component#el}.\\n   *\\n   * @return {Element}\\n   *         The content element for this `Component`.\\n   */\\n  ;\\n\\n  _proto.contentEl = function contentEl() {\\n    return this.contentEl_ || this.el_;\\n  }\\n  /**\\n   * Get this `Component`s ID\\n   *\\n   * @return {string}\\n   *         The id of this `Component`\\n   */\\n  ;\\n\\n  _proto.id = function id() {\\n    return this.id_;\\n  }\\n  /**\\n   * Get the `Component`s name. The name gets used to reference the `Component`\\n   * and is set during registration.\\n   *\\n   * @return {string}\\n   *         The name of this `Component`.\\n   */\\n  ;\\n\\n  _proto.name = function name() {\\n    return this.name_;\\n  }\\n  /**\\n   * Get an array of all child components\\n   *\\n   * @return {Array}\\n   *         The children\\n   */\\n  ;\\n\\n  _proto.children = function children() {\\n    return this.children_;\\n  }\\n  /**\\n   * Returns the child `Component` with the given `id`.\\n   *\\n   * @param {string} id\\n   *        The id of the child `Component` to get.\\n   *\\n   * @return {Component|undefined}\\n   *         The child `Component` with the given `id` or undefined.\\n   */\\n  ;\\n\\n  _proto.getChildById = function getChildById(id) {\\n    return this.childIndex_[id];\\n  }\\n  /**\\n   * Returns the child `Component` with the given `name`.\\n   *\\n   * @param {string} name\\n   *        The name of the child `Component` to get.\\n   *\\n   * @return {Component|undefined}\\n   *         The child `Component` with the given `name` or undefined.\\n   */\\n  ;\\n\\n  _proto.getChild = function getChild(name) {\\n    if (!name) {\\n      return;\\n    }\\n\\n    return this.childNameIndex_[name];\\n  }\\n  /**\\n   * Returns the descendant `Component` following the givent\\n   * descendant `names`. For instance ['foo', 'bar', 'baz'] would\\n   * try to get 'foo' on the current component, 'bar' on the 'foo'\\n   * component and 'baz' on the 'bar' component and return undefined\\n   * if any of those don't exist.\\n   *\\n   * @param {...string[]|...string} names\\n   *        The name of the child `Component` to get.\\n   *\\n   * @return {Component|undefined}\\n   *         The descendant `Component` following the given descendant\\n   *         `names` or undefined.\\n   */\\n  ;\\n\\n  _proto.getDescendant = function getDescendant() {\\n    for (var _len = arguments.length, names = new Array(_len), _key = 0; _key < _len; _key++) {\\n      names[_key] = arguments[_key];\\n    }\\n\\n    // flatten array argument into the main array\\n    names = names.reduce(function (acc, n) {\\n      return acc.concat(n);\\n    }, []);\\n    var currentChild = this;\\n\\n    for (var i = 0; i < names.length; i++) {\\n      currentChild = currentChild.getChild(names[i]);\\n\\n      if (!currentChild || !currentChild.getChild) {\\n        return;\\n      }\\n    }\\n\\n    return currentChild;\\n  }\\n  /**\\n   * Add a child `Component` inside the current `Component`.\\n   *\\n   *\\n   * @param {string|Component} child\\n   *        The name or instance of a child to add.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of options that will get passed to children of\\n   *        the child.\\n   *\\n   * @param {number} [index=this.children_.length]\\n   *        The index to attempt to add a child into.\\n   *\\n   * @return {Component}\\n   *         The `Component` that gets added as a child. When using a string the\\n   *         `Component` will get created by this process.\\n   */\\n  ;\\n\\n  _proto.addChild = function addChild(child, options, index) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (index === void 0) {\\n      index = this.children_.length;\\n    }\\n\\n    var component;\\n    var componentName; // If child is a string, create component with options\\n\\n    if (typeof child === 'string') {\\n      componentName = toTitleCase(child);\\n      var componentClassName = options.componentClass || componentName; // Set name through options\\n\\n      options.name = componentName; // Create a new object & element for this controls set\\n      // If there's no .player_, this is a player\\n\\n      var ComponentClass = Component.getComponent(componentClassName);\\n\\n      if (!ComponentClass) {\\n        throw new Error(\\\"Component \\\" + componentClassName + \\\" does not exist\\\");\\n      } // data stored directly on the videojs object may be\\n      // misidentified as a component to retain\\n      // backwards-compatibility with 4.x. check to make sure the\\n      // component class can be instantiated.\\n\\n\\n      if (typeof ComponentClass !== 'function') {\\n        return null;\\n      }\\n\\n      component = new ComponentClass(this.player_ || this, options); // child is a component instance\\n    } else {\\n      component = child;\\n    }\\n\\n    if (component.parentComponent_) {\\n      component.parentComponent_.removeChild(component);\\n    }\\n\\n    this.children_.splice(index, 0, component);\\n    component.parentComponent_ = this;\\n\\n    if (typeof component.id === 'function') {\\n      this.childIndex_[component.id()] = component;\\n    } // If a name wasn't used to create the component, check if we can use the\\n    // name function of the component\\n\\n\\n    componentName = componentName || component.name && toTitleCase(component.name());\\n\\n    if (componentName) {\\n      this.childNameIndex_[componentName] = component;\\n      this.childNameIndex_[toLowerCase(componentName)] = component;\\n    } // Add the UI object's element to the container div (box)\\n    // Having an element is not required\\n\\n\\n    if (typeof component.el === 'function' && component.el()) {\\n      // If inserting before a component, insert before that component's element\\n      var refNode = null;\\n\\n      if (this.children_[index + 1]) {\\n        // Most children are components, but the video tech is an HTML element\\n        if (this.children_[index + 1].el_) {\\n          refNode = this.children_[index + 1].el_;\\n        } else if (isEl(this.children_[index + 1])) {\\n          refNode = this.children_[index + 1];\\n        }\\n      }\\n\\n      this.contentEl().insertBefore(component.el(), refNode);\\n    } // Return so it can stored on parent object if desired.\\n\\n\\n    return component;\\n  }\\n  /**\\n   * Remove a child `Component` from this `Component`s list of children. Also removes\\n   * the child `Component`s element from this `Component`s element.\\n   *\\n   * @param {Component} component\\n   *        The child `Component` to remove.\\n   */\\n  ;\\n\\n  _proto.removeChild = function removeChild(component) {\\n    if (typeof component === 'string') {\\n      component = this.getChild(component);\\n    }\\n\\n    if (!component || !this.children_) {\\n      return;\\n    }\\n\\n    var childFound = false;\\n\\n    for (var i = this.children_.length - 1; i >= 0; i--) {\\n      if (this.children_[i] === component) {\\n        childFound = true;\\n        this.children_.splice(i, 1);\\n        break;\\n      }\\n    }\\n\\n    if (!childFound) {\\n      return;\\n    }\\n\\n    component.parentComponent_ = null;\\n    this.childIndex_[component.id()] = null;\\n    this.childNameIndex_[toTitleCase(component.name())] = null;\\n    this.childNameIndex_[toLowerCase(component.name())] = null;\\n    var compEl = component.el();\\n\\n    if (compEl && compEl.parentNode === this.contentEl()) {\\n      this.contentEl().removeChild(component.el());\\n    }\\n  }\\n  /**\\n   * Add and initialize default child `Component`s based upon options.\\n   */\\n  ;\\n\\n  _proto.initChildren = function initChildren() {\\n    var _this = this;\\n\\n    var children = this.options_.children;\\n\\n    if (children) {\\n      // `this` is `parent`\\n      var parentOptions = this.options_;\\n\\n      var handleAdd = function handleAdd(child) {\\n        var name = child.name;\\n        var opts = child.opts; // Allow options for children to be set at the parent options\\n        // e.g. videojs(id, { controlBar: false });\\n        // instead of videojs(id, { children: { controlBar: false });\\n\\n        if (parentOptions[name] !== undefined) {\\n          opts = parentOptions[name];\\n        } // Allow for disabling default components\\n        // e.g. options['children']['posterImage'] = false\\n\\n\\n        if (opts === false) {\\n          return;\\n        } // Allow options to be passed as a simple boolean if no configuration\\n        // is necessary.\\n\\n\\n        if (opts === true) {\\n          opts = {};\\n        } // We also want to pass the original player options\\n        // to each component as well so they don't need to\\n        // reach back into the player for options later.\\n\\n\\n        opts.playerOptions = _this.options_.playerOptions; // Create and add the child component.\\n        // Add a direct reference to the child by name on the parent instance.\\n        // If two of the same component are used, different names should be supplied\\n        // for each\\n\\n        var newChild = _this.addChild(name, opts);\\n\\n        if (newChild) {\\n          _this[name] = newChild;\\n        }\\n      }; // Allow for an array of children details to passed in the options\\n\\n\\n      var workingChildren;\\n      var Tech = Component.getComponent('Tech');\\n\\n      if (Array.isArray(children)) {\\n        workingChildren = children;\\n      } else {\\n        workingChildren = Object.keys(children);\\n      }\\n\\n      workingChildren // children that are in this.options_ but also in workingChildren  would\\n      // give us extra children we do not want. So, we want to filter them out.\\n      .concat(Object.keys(this.options_).filter(function (child) {\\n        return !workingChildren.some(function (wchild) {\\n          if (typeof wchild === 'string') {\\n            return child === wchild;\\n          }\\n\\n          return child === wchild.name;\\n        });\\n      })).map(function (child) {\\n        var name;\\n        var opts;\\n\\n        if (typeof child === 'string') {\\n          name = child;\\n          opts = children[name] || _this.options_[name] || {};\\n        } else {\\n          name = child.name;\\n          opts = child;\\n        }\\n\\n        return {\\n          name: name,\\n          opts: opts\\n        };\\n      }).filter(function (child) {\\n        // we have to make sure that child.name isn't in the techOrder since\\n        // techs are registerd as Components but can't aren't compatible\\n        // See https://github.com/videojs/video.js/issues/2772\\n        var c = Component.getComponent(child.opts.componentClass || toTitleCase(child.name));\\n        return c && !Tech.isTech(c);\\n      }).forEach(handleAdd);\\n    }\\n  }\\n  /**\\n   * Builds the default DOM class name. Should be overriden by sub-components.\\n   *\\n   * @return {string}\\n   *         The DOM class name for this object.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    // Child classes can include a function that does:\\n    // return 'CLASS NAME' + this._super();\\n    return '';\\n  }\\n  /**\\n   * Bind a listener to the component's ready state.\\n   * Different from event listeners in that if the ready event has already happened\\n   * it will trigger the function immediately.\\n   *\\n   * @return {Component}\\n   *         Returns itself; method can be chained.\\n   */\\n  ;\\n\\n  _proto.ready = function ready(fn, sync) {\\n    if (sync === void 0) {\\n      sync = false;\\n    }\\n\\n    if (!fn) {\\n      return;\\n    }\\n\\n    if (!this.isReady_) {\\n      this.readyQueue_ = this.readyQueue_ || [];\\n      this.readyQueue_.push(fn);\\n      return;\\n    }\\n\\n    if (sync) {\\n      fn.call(this);\\n    } else {\\n      // Call the function asynchronously by default for consistency\\n      this.setTimeout(fn, 1);\\n    }\\n  }\\n  /**\\n   * Trigger all the ready listeners for this `Component`.\\n   *\\n   * @fires Component#ready\\n   */\\n  ;\\n\\n  _proto.triggerReady = function triggerReady() {\\n    this.isReady_ = true; // Ensure ready is triggered asynchronously\\n\\n    this.setTimeout(function () {\\n      var readyQueue = this.readyQueue_; // Reset Ready Queue\\n\\n      this.readyQueue_ = [];\\n\\n      if (readyQueue && readyQueue.length > 0) {\\n        readyQueue.forEach(function (fn) {\\n          fn.call(this);\\n        }, this);\\n      } // Allow for using event listeners also\\n\\n      /**\\n       * Triggered when a `Component` is ready.\\n       *\\n       * @event Component#ready\\n       * @type {EventTarget~Event}\\n       */\\n\\n\\n      this.trigger('ready');\\n    }, 1);\\n  }\\n  /**\\n   * Find a single DOM element matching a `selector`. This can be within the `Component`s\\n   * `contentEl()` or another custom context.\\n   *\\n   * @param {string} selector\\n   *        A valid CSS selector, which will be passed to `querySelector`.\\n   *\\n   * @param {Element|string} [context=this.contentEl()]\\n   *        A DOM element within which to query. Can also be a selector string in\\n   *        which case the first matching element will get used as context. If\\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\\n   *        nothing it falls back to `document`.\\n   *\\n   * @return {Element|null}\\n   *         the dom element that was found, or null\\n   *\\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\\n   */\\n  ;\\n\\n  _proto.$ = function $$1(selector, context) {\\n    return $(selector, context || this.contentEl());\\n  }\\n  /**\\n   * Finds all DOM element matching a `selector`. This can be within the `Component`s\\n   * `contentEl()` or another custom context.\\n   *\\n   * @param {string} selector\\n   *        A valid CSS selector, which will be passed to `querySelectorAll`.\\n   *\\n   * @param {Element|string} [context=this.contentEl()]\\n   *        A DOM element within which to query. Can also be a selector string in\\n   *        which case the first matching element will get used as context. If\\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\\n   *        nothing it falls back to `document`.\\n   *\\n   * @return {NodeList}\\n   *         a list of dom elements that were found\\n   *\\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\\n   */\\n  ;\\n\\n  _proto.$$ = function $$$1(selector, context) {\\n    return $$(selector, context || this.contentEl());\\n  }\\n  /**\\n   * Check if a component's element has a CSS class name.\\n   *\\n   * @param {string} classToCheck\\n   *        CSS class name to check.\\n   *\\n   * @return {boolean}\\n   *         - True if the `Component` has the class.\\n   *         - False if the `Component` does not have the class`\\n   */\\n  ;\\n\\n  _proto.hasClass = function hasClass$1(classToCheck) {\\n    return hasClass(this.el_, classToCheck);\\n  }\\n  /**\\n   * Add a CSS class name to the `Component`s element.\\n   *\\n   * @param {string} classToAdd\\n   *        CSS class name to add\\n   */\\n  ;\\n\\n  _proto.addClass = function addClass$1(classToAdd) {\\n    addClass(this.el_, classToAdd);\\n  }\\n  /**\\n   * Remove a CSS class name from the `Component`s element.\\n   *\\n   * @param {string} classToRemove\\n   *        CSS class name to remove\\n   */\\n  ;\\n\\n  _proto.removeClass = function removeClass$1(classToRemove) {\\n    removeClass(this.el_, classToRemove);\\n  }\\n  /**\\n   * Add or remove a CSS class name from the component's element.\\n   * - `classToToggle` gets added when {@link Component#hasClass} would return false.\\n   * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\\n   *\\n   * @param  {string} classToToggle\\n   *         The class to add or remove based on (@link Component#hasClass}\\n   *\\n   * @param  {boolean|Dom~predicate} [predicate]\\n   *         An {@link Dom~predicate} function or a boolean\\n   */\\n  ;\\n\\n  _proto.toggleClass = function toggleClass$1(classToToggle, predicate) {\\n    toggleClass(this.el_, classToToggle, predicate);\\n  }\\n  /**\\n   * Show the `Component`s element if it is hidden by removing the\\n   * 'vjs-hidden' class name from it.\\n   */\\n  ;\\n\\n  _proto.show = function show() {\\n    this.removeClass('vjs-hidden');\\n  }\\n  /**\\n   * Hide the `Component`s element if it is currently showing by adding the\\n   * 'vjs-hidden` class name to it.\\n   */\\n  ;\\n\\n  _proto.hide = function hide() {\\n    this.addClass('vjs-hidden');\\n  }\\n  /**\\n   * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\\n   * class name to it. Used during fadeIn/fadeOut.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.lockShowing = function lockShowing() {\\n    this.addClass('vjs-lock-showing');\\n  }\\n  /**\\n   * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\\n   * class name from it. Used during fadeIn/fadeOut.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.unlockShowing = function unlockShowing() {\\n    this.removeClass('vjs-lock-showing');\\n  }\\n  /**\\n   * Get the value of an attribute on the `Component`s element.\\n   *\\n   * @param {string} attribute\\n   *        Name of the attribute to get the value from.\\n   *\\n   * @return {string|null}\\n   *         - The value of the attribute that was asked for.\\n   *         - Can be an empty string on some browsers if the attribute does not exist\\n   *           or has no value\\n   *         - Most browsers will return null if the attibute does not exist or has\\n   *           no value.\\n   *\\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\\n   */\\n  ;\\n\\n  _proto.getAttribute = function getAttribute$1(attribute) {\\n    return getAttribute(this.el_, attribute);\\n  }\\n  /**\\n   * Set the value of an attribute on the `Component`'s element\\n   *\\n   * @param {string} attribute\\n   *        Name of the attribute to set.\\n   *\\n   * @param {string} value\\n   *        Value to set the attribute to.\\n   *\\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\\n   */\\n  ;\\n\\n  _proto.setAttribute = function setAttribute$1(attribute, value) {\\n    setAttribute(this.el_, attribute, value);\\n  }\\n  /**\\n   * Remove an attribute from the `Component`s element.\\n   *\\n   * @param {string} attribute\\n   *        Name of the attribute to remove.\\n   *\\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\\n   */\\n  ;\\n\\n  _proto.removeAttribute = function removeAttribute$1(attribute) {\\n    removeAttribute(this.el_, attribute);\\n  }\\n  /**\\n   * Get or set the width of the component based upon the CSS styles.\\n   * See {@link Component#dimension} for more detailed information.\\n   *\\n   * @param {number|string} [num]\\n   *        The width that you want to set postfixed with '%', 'px' or nothing.\\n   *\\n   * @param {boolean} [skipListeners]\\n   *        Skip the componentresize event trigger\\n   *\\n   * @return {number|string}\\n   *         The width when getting, zero if there is no width. Can be a string\\n   *           postpixed with '%' or 'px'.\\n   */\\n  ;\\n\\n  _proto.width = function width(num, skipListeners) {\\n    return this.dimension('width', num, skipListeners);\\n  }\\n  /**\\n   * Get or set the height of the component based upon the CSS styles.\\n   * See {@link Component#dimension} for more detailed information.\\n   *\\n   * @param {number|string} [num]\\n   *        The height that you want to set postfixed with '%', 'px' or nothing.\\n   *\\n   * @param {boolean} [skipListeners]\\n   *        Skip the componentresize event trigger\\n   *\\n   * @return {number|string}\\n   *         The width when getting, zero if there is no width. Can be a string\\n   *         postpixed with '%' or 'px'.\\n   */\\n  ;\\n\\n  _proto.height = function height(num, skipListeners) {\\n    return this.dimension('height', num, skipListeners);\\n  }\\n  /**\\n   * Set both the width and height of the `Component` element at the same time.\\n   *\\n   * @param  {number|string} width\\n   *         Width to set the `Component`s element to.\\n   *\\n   * @param  {number|string} height\\n   *         Height to set the `Component`s element to.\\n   */\\n  ;\\n\\n  _proto.dimensions = function dimensions(width, height) {\\n    // Skip componentresize listeners on width for optimization\\n    this.width(width, true);\\n    this.height(height);\\n  }\\n  /**\\n   * Get or set width or height of the `Component` element. This is the shared code\\n   * for the {@link Component#width} and {@link Component#height}.\\n   *\\n   * Things to know:\\n   * - If the width or height in an number this will return the number postfixed with 'px'.\\n   * - If the width/height is a percent this will return the percent postfixed with '%'\\n   * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\\n   *   defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\\n   *   See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\\n   *   for more information\\n   * - If you want the computed style of the component, use {@link Component#currentWidth}\\n   *   and {@link {Component#currentHeight}\\n   *\\n   * @fires Component#componentresize\\n   *\\n   * @param {string} widthOrHeight\\n   8        'width' or 'height'\\n   *\\n   * @param  {number|string} [num]\\n   8         New dimension\\n   *\\n   * @param  {boolean} [skipListeners]\\n   *         Skip componentresize event trigger\\n   *\\n   * @return {number}\\n   *         The dimension when getting or 0 if unset\\n   */\\n  ;\\n\\n  _proto.dimension = function dimension(widthOrHeight, num, skipListeners) {\\n    if (num !== undefined) {\\n      // Set to zero if null or literally NaN (NaN !== NaN)\\n      if (num === null || num !== num) {\\n        num = 0;\\n      } // Check if using css width/height (% or px) and adjust\\n\\n\\n      if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\\n        this.el_.style[widthOrHeight] = num;\\n      } else if (num === 'auto') {\\n        this.el_.style[widthOrHeight] = '';\\n      } else {\\n        this.el_.style[widthOrHeight] = num + 'px';\\n      } // skipListeners allows us to avoid triggering the resize event when setting both width and height\\n\\n\\n      if (!skipListeners) {\\n        /**\\n         * Triggered when a component is resized.\\n         *\\n         * @event Component#componentresize\\n         * @type {EventTarget~Event}\\n         */\\n        this.trigger('componentresize');\\n      }\\n\\n      return;\\n    } // Not setting a value, so getting it\\n    // Make sure element exists\\n\\n\\n    if (!this.el_) {\\n      return 0;\\n    } // Get dimension value from style\\n\\n\\n    var val = this.el_.style[widthOrHeight];\\n    var pxIndex = val.indexOf('px');\\n\\n    if (pxIndex !== -1) {\\n      // Return the pixel value with no 'px'\\n      return parseInt(val.slice(0, pxIndex), 10);\\n    } // No px so using % or no style was set, so falling back to offsetWidth/height\\n    // If component has display:none, offset will return 0\\n    // TODO: handle display:none and no dimension style using px\\n\\n\\n    return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\\n  }\\n  /**\\n   * Get the computed width or the height of the component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @param {string} widthOrHeight\\n   *        A string containing 'width' or 'height'. Whichever one you want to get.\\n   *\\n   * @return {number}\\n   *         The dimension that gets asked for or 0 if nothing was set\\n   *         for that dimension.\\n   */\\n  ;\\n\\n  _proto.currentDimension = function currentDimension(widthOrHeight) {\\n    var computedWidthOrHeight = 0;\\n\\n    if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\\n      throw new Error('currentDimension only accepts width or height value');\\n    }\\n\\n    computedWidthOrHeight = computedStyle(this.el_, widthOrHeight); // remove 'px' from variable and parse as integer\\n\\n    computedWidthOrHeight = parseFloat(computedWidthOrHeight); // if the computed value is still 0, it's possible that the browser is lying\\n    // and we want to check the offset values.\\n    // This code also runs wherever getComputedStyle doesn't exist.\\n\\n    if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\\n      var rule = \\\"offset\\\" + toTitleCase(widthOrHeight);\\n      computedWidthOrHeight = this.el_[rule];\\n    }\\n\\n    return computedWidthOrHeight;\\n  }\\n  /**\\n   * An object that contains width and height values of the `Component`s\\n   * computed style. Uses `window.getComputedStyle`.\\n   *\\n   * @typedef {Object} Component~DimensionObject\\n   *\\n   * @property {number} width\\n   *           The width of the `Component`s computed style.\\n   *\\n   * @property {number} height\\n   *           The height of the `Component`s computed style.\\n   */\\n\\n  /**\\n   * Get an object that contains computed width and height values of the\\n   * component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @return {Component~DimensionObject}\\n   *         The computed dimensions of the component's element.\\n   */\\n  ;\\n\\n  _proto.currentDimensions = function currentDimensions() {\\n    return {\\n      width: this.currentDimension('width'),\\n      height: this.currentDimension('height')\\n    };\\n  }\\n  /**\\n   * Get the computed width of the component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @return {number}\\n   *         The computed width of the component's element.\\n   */\\n  ;\\n\\n  _proto.currentWidth = function currentWidth() {\\n    return this.currentDimension('width');\\n  }\\n  /**\\n   * Get the computed height of the component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @return {number}\\n   *         The computed height of the component's element.\\n   */\\n  ;\\n\\n  _proto.currentHeight = function currentHeight() {\\n    return this.currentDimension('height');\\n  }\\n  /**\\n   * Set the focus to this component\\n   */\\n  ;\\n\\n  _proto.focus = function focus() {\\n    this.el_.focus();\\n  }\\n  /**\\n   * Remove the focus from this component\\n   */\\n  ;\\n\\n  _proto.blur = function blur() {\\n    this.el_.blur();\\n  }\\n  /**\\n   * When this Component receives a `keydown` event which it does not process,\\n   *  it passes the event to the Player for handling.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    if (this.player_) {\\n      // We only stop propagation here because we want unhandled events to fall\\n      // back to the browser.\\n      event.stopPropagation();\\n      this.player_.handleKeyDown(event);\\n    }\\n  }\\n  /**\\n   * Many components used to have a `handleKeyPress` method, which was poorly\\n   * named because it listened to a `keydown` event. This method name now\\n   * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\\n   * will not see their method calls stop working.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleKeyPress = function handleKeyPress(event) {\\n    this.handleKeyDown(event);\\n  }\\n  /**\\n   * Emit a 'tap' events when touch event support gets detected. This gets used to\\n   * support toggling the controls through a tap on the video. They get enabled\\n   * because every sub-component would have extra overhead otherwise.\\n   *\\n   * @private\\n   * @fires Component#tap\\n   * @listens Component#touchstart\\n   * @listens Component#touchmove\\n   * @listens Component#touchleave\\n   * @listens Component#touchcancel\\n   * @listens Component#touchend\\n    */\\n  ;\\n\\n  _proto.emitTapEvents = function emitTapEvents() {\\n    // Track the start time so we can determine how long the touch lasted\\n    var touchStart = 0;\\n    var firstTouch = null; // Maximum movement allowed during a touch event to still be considered a tap\\n    // Other popular libs use anywhere from 2 (hammer.js) to 15,\\n    // so 10 seems like a nice, round number.\\n\\n    var tapMovementThreshold = 10; // The maximum length a touch can be while still being considered a tap\\n\\n    var touchTimeThreshold = 200;\\n    var couldBeTap;\\n    this.on('touchstart', function (event) {\\n      // If more than one finger, don't consider treating this as a click\\n      if (event.touches.length === 1) {\\n        // Copy pageX/pageY from the object\\n        firstTouch = {\\n          pageX: event.touches[0].pageX,\\n          pageY: event.touches[0].pageY\\n        }; // Record start time so we can detect a tap vs. \\\"touch and hold\\\"\\n\\n        touchStart = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now(); // Reset couldBeTap tracking\\n\\n        couldBeTap = true;\\n      }\\n    });\\n    this.on('touchmove', function (event) {\\n      // If more than one finger, don't consider treating this as a click\\n      if (event.touches.length > 1) {\\n        couldBeTap = false;\\n      } else if (firstTouch) {\\n        // Some devices will throw touchmoves for all but the slightest of taps.\\n        // So, if we moved only a small distance, this could still be a tap\\n        var xdiff = event.touches[0].pageX - firstTouch.pageX;\\n        var ydiff = event.touches[0].pageY - firstTouch.pageY;\\n        var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\\n\\n        if (touchDistance > tapMovementThreshold) {\\n          couldBeTap = false;\\n        }\\n      }\\n    });\\n\\n    var noTap = function noTap() {\\n      couldBeTap = false;\\n    }; // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\\n\\n\\n    this.on('touchleave', noTap);\\n    this.on('touchcancel', noTap); // When the touch ends, measure how long it took and trigger the appropriate\\n    // event\\n\\n    this.on('touchend', function (event) {\\n      firstTouch = null; // Proceed only if the touchmove/leave/cancel event didn't happen\\n\\n      if (couldBeTap === true) {\\n        // Measure how long the touch lasted\\n        var touchTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now() - touchStart; // Make sure the touch was less than the threshold to be considered a tap\\n\\n        if (touchTime < touchTimeThreshold) {\\n          // Don't let browser turn this into a click\\n          event.preventDefault();\\n          /**\\n           * Triggered when a `Component` is tapped.\\n           *\\n           * @event Component#tap\\n           * @type {EventTarget~Event}\\n           */\\n\\n          this.trigger('tap'); // It may be good to copy the touchend event object and change the\\n          // type to tap, if the other event properties aren't exact after\\n          // Events.fixEvent runs (e.g. event.target)\\n        }\\n      }\\n    });\\n  }\\n  /**\\n   * This function reports user activity whenever touch events happen. This can get\\n   * turned off by any sub-components that wants touch events to act another way.\\n   *\\n   * Report user touch activity when touch events occur. User activity gets used to\\n   * determine when controls should show/hide. It is simple when it comes to mouse\\n   * events, because any mouse event should show the controls. So we capture mouse\\n   * events that bubble up to the player and report activity when that happens.\\n   * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\\n   * controls. So touch events can't help us at the player level either.\\n   *\\n   * User activity gets checked asynchronously. So what could happen is a tap event\\n   * on the video turns the controls off. Then the `touchend` event bubbles up to\\n   * the player. Which, if it reported user activity, would turn the controls right\\n   * back on. We also don't want to completely block touch events from bubbling up.\\n   * Furthermore a `touchmove` event and anything other than a tap, should not turn\\n   * controls back on.\\n   *\\n   * @listens Component#touchstart\\n   * @listens Component#touchmove\\n   * @listens Component#touchend\\n   * @listens Component#touchcancel\\n   */\\n  ;\\n\\n  _proto.enableTouchActivity = function enableTouchActivity() {\\n    // Don't continue if the root player doesn't support reporting user activity\\n    if (!this.player() || !this.player().reportUserActivity) {\\n      return;\\n    } // listener for reporting that the user is active\\n\\n\\n    var report = bind(this.player(), this.player().reportUserActivity);\\n    var touchHolding;\\n    this.on('touchstart', function () {\\n      report(); // For as long as the they are touching the device or have their mouse down,\\n      // we consider them active even if they're not moving their finger or mouse.\\n      // So we want to continue to update that they are active\\n\\n      this.clearInterval(touchHolding); // report at the same interval as activityCheck\\n\\n      touchHolding = this.setInterval(report, 250);\\n    });\\n\\n    var touchEnd = function touchEnd(event) {\\n      report(); // stop the interval that maintains activity if the touch is holding\\n\\n      this.clearInterval(touchHolding);\\n    };\\n\\n    this.on('touchmove', report);\\n    this.on('touchend', touchEnd);\\n    this.on('touchcancel', touchEnd);\\n  }\\n  /**\\n   * A callback that has no parameters and is bound into `Component`s context.\\n   *\\n   * @callback Component~GenericCallback\\n   * @this Component\\n   */\\n\\n  /**\\n   * Creates a function that runs after an `x` millisecond timeout. This function is a\\n   * wrapper around `window.setTimeout`. There are a few reasons to use this one\\n   * instead though:\\n   * 1. It gets cleared via  {@link Component#clearTimeout} when\\n   *    {@link Component#dispose} gets called.\\n   * 2. The function callback will gets turned into a {@link Component~GenericCallback}\\n   *\\n   * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\\n   *         will cause its dispose listener not to get cleaned up! Please use\\n   *         {@link Component#clearTimeout} or {@link Component#dispose} instead.\\n   *\\n   * @param {Component~GenericCallback} fn\\n   *        The function that will be run after `timeout`.\\n   *\\n   * @param {number} timeout\\n   *        Timeout in milliseconds to delay before executing the specified function.\\n   *\\n   * @return {number}\\n   *         Returns a timeout ID that gets used to identify the timeout. It can also\\n   *         get used in {@link Component#clearTimeout} to clear the timeout that\\n   *         was set.\\n   *\\n   * @listens Component#dispose\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\\n   */\\n  ;\\n\\n  _proto.setTimeout = function setTimeout(fn, timeout) {\\n    var _this2 = this;\\n\\n    // declare as variables so they are properly available in timeout function\\n    // eslint-disable-next-line\\n    var timeoutId;\\n    fn = bind(this, fn);\\n    this.clearTimersOnDispose_();\\n    timeoutId = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n      if (_this2.setTimeoutIds_.has(timeoutId)) {\\n        _this2.setTimeoutIds_[\\\"delete\\\"](timeoutId);\\n      }\\n\\n      fn();\\n    }, timeout);\\n    this.setTimeoutIds_.add(timeoutId);\\n    return timeoutId;\\n  }\\n  /**\\n   * Clears a timeout that gets created via `window.setTimeout` or\\n   * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\\n   * use this function instead of `window.clearTimout`. If you don't your dispose\\n   * listener will not get cleaned up until {@link Component#dispose}!\\n   *\\n   * @param {number} timeoutId\\n   *        The id of the timeout to clear. The return value of\\n   *        {@link Component#setTimeout} or `window.setTimeout`.\\n   *\\n   * @return {number}\\n   *         Returns the timeout id that was cleared.\\n   *\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\\n   */\\n  ;\\n\\n  _proto.clearTimeout = function clearTimeout(timeoutId) {\\n    if (this.setTimeoutIds_.has(timeoutId)) {\\n      this.setTimeoutIds_[\\\"delete\\\"](timeoutId);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(timeoutId);\\n    }\\n\\n    return timeoutId;\\n  }\\n  /**\\n   * Creates a function that gets run every `x` milliseconds. This function is a wrapper\\n   * around `window.setInterval`. There are a few reasons to use this one instead though.\\n   * 1. It gets cleared via  {@link Component#clearInterval} when\\n   *    {@link Component#dispose} gets called.\\n   * 2. The function callback will be a {@link Component~GenericCallback}\\n   *\\n   * @param {Component~GenericCallback} fn\\n   *        The function to run every `x` seconds.\\n   *\\n   * @param {number} interval\\n   *        Execute the specified function every `x` milliseconds.\\n   *\\n   * @return {number}\\n   *         Returns an id that can be used to identify the interval. It can also be be used in\\n   *         {@link Component#clearInterval} to clear the interval.\\n   *\\n   * @listens Component#dispose\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\\n   */\\n  ;\\n\\n  _proto.setInterval = function setInterval(fn, interval) {\\n    fn = bind(this, fn);\\n    this.clearTimersOnDispose_();\\n    var intervalId = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setInterval(fn, interval);\\n    this.setIntervalIds_.add(intervalId);\\n    return intervalId;\\n  }\\n  /**\\n   * Clears an interval that gets created via `window.setInterval` or\\n   * {@link Component#setInterval}. If you set an inteval via {@link Component#setInterval}\\n   * use this function instead of `window.clearInterval`. If you don't your dispose\\n   * listener will not get cleaned up until {@link Component#dispose}!\\n   *\\n   * @param {number} intervalId\\n   *        The id of the interval to clear. The return value of\\n   *        {@link Component#setInterval} or `window.setInterval`.\\n   *\\n   * @return {number}\\n   *         Returns the interval id that was cleared.\\n   *\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\\n   */\\n  ;\\n\\n  _proto.clearInterval = function clearInterval(intervalId) {\\n    if (this.setIntervalIds_.has(intervalId)) {\\n      this.setIntervalIds_[\\\"delete\\\"](intervalId);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearInterval(intervalId);\\n    }\\n\\n    return intervalId;\\n  }\\n  /**\\n   * Queues up a callback to be passed to requestAnimationFrame (rAF), but\\n   * with a few extra bonuses:\\n   *\\n   * - Supports browsers that do not support rAF by falling back to\\n   *   {@link Component#setTimeout}.\\n   *\\n   * - The callback is turned into a {@link Component~GenericCallback} (i.e.\\n   *   bound to the component).\\n   *\\n   * - Automatic cancellation of the rAF callback is handled if the component\\n   *   is disposed before it is called.\\n   *\\n   * @param  {Component~GenericCallback} fn\\n   *         A function that will be bound to this component and executed just\\n   *         before the browser's next repaint.\\n   *\\n   * @return {number}\\n   *         Returns an rAF ID that gets used to identify the timeout. It can\\n   *         also be used in {@link Component#cancelAnimationFrame} to cancel\\n   *         the animation frame callback.\\n   *\\n   * @listens Component#dispose\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\\n   */\\n  ;\\n\\n  _proto.requestAnimationFrame = function requestAnimationFrame(fn) {\\n    var _this3 = this;\\n\\n    // Fall back to using a timer.\\n    if (!this.supportsRaf_) {\\n      return this.setTimeout(fn, 1000 / 60);\\n    }\\n\\n    this.clearTimersOnDispose_(); // declare as variables so they are properly available in rAF function\\n    // eslint-disable-next-line\\n\\n    var id;\\n    fn = bind(this, fn);\\n    id = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.requestAnimationFrame(function () {\\n      if (_this3.rafIds_.has(id)) {\\n        _this3.rafIds_[\\\"delete\\\"](id);\\n      }\\n\\n      fn();\\n    });\\n    this.rafIds_.add(id);\\n    return id;\\n  }\\n  /**\\n   * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\\n   * (rAF).\\n   *\\n   * If you queue an rAF callback via {@link Component#requestAnimationFrame},\\n   * use this function instead of `window.cancelAnimationFrame`. If you don't,\\n   * your dispose listener will not get cleaned up until {@link Component#dispose}!\\n   *\\n   * @param {number} id\\n   *        The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\\n   *\\n   * @return {number}\\n   *         Returns the rAF ID that was cleared.\\n   *\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\\n   */\\n  ;\\n\\n  _proto.cancelAnimationFrame = function cancelAnimationFrame(id) {\\n    // Fall back to using a timer.\\n    if (!this.supportsRaf_) {\\n      return this.clearTimeout(id);\\n    }\\n\\n    if (this.rafIds_.has(id)) {\\n      this.rafIds_[\\\"delete\\\"](id);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.cancelAnimationFrame(id);\\n    }\\n\\n    return id;\\n  }\\n  /**\\n   * A function to setup `requestAnimationFrame`, `setTimeout`,\\n   * and `setInterval`, clearing on dispose.\\n   *\\n   * > Previously each timer added and removed dispose listeners on it's own.\\n   * For better performance it was decided to batch them all, and use `Set`s\\n   * to track outstanding timer ids.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.clearTimersOnDispose_ = function clearTimersOnDispose_() {\\n    var _this4 = this;\\n\\n    if (this.clearingTimersOnDispose_) {\\n      return;\\n    }\\n\\n    this.clearingTimersOnDispose_ = true;\\n    this.one('dispose', function () {\\n      [['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(function (_ref) {\\n        var idName = _ref[0],\\n            cancelName = _ref[1];\\n\\n        _this4[idName].forEach(_this4[cancelName], _this4);\\n      });\\n      _this4.clearingTimersOnDispose_ = false;\\n    });\\n  }\\n  /**\\n   * Register a `Component` with `videojs` given the name and the component.\\n   *\\n   * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\\n   *         should be registered using {@link Tech.registerTech} or\\n   *         {@link videojs:videojs.registerTech}.\\n   *\\n   * > NOTE: This function can also be seen on videojs as\\n   *         {@link videojs:videojs.registerComponent}.\\n   *\\n   * @param {string} name\\n   *        The name of the `Component` to register.\\n   *\\n   * @param {Component} ComponentToRegister\\n   *        The `Component` class to register.\\n   *\\n   * @return {Component}\\n   *         The `Component` that was registered.\\n   */\\n  ;\\n\\n  Component.registerComponent = function registerComponent(name, ComponentToRegister) {\\n    if (typeof name !== 'string' || !name) {\\n      throw new Error(\\\"Illegal component name, \\\\\\\"\\\" + name + \\\"\\\\\\\"; must be a non-empty string.\\\");\\n    }\\n\\n    var Tech = Component.getComponent('Tech'); // We need to make sure this check is only done if Tech has been registered.\\n\\n    var isTech = Tech && Tech.isTech(ComponentToRegister);\\n    var isComp = Component === ComponentToRegister || Component.prototype.isPrototypeOf(ComponentToRegister.prototype);\\n\\n    if (isTech || !isComp) {\\n      var reason;\\n\\n      if (isTech) {\\n        reason = 'techs must be registered using Tech.registerTech()';\\n      } else {\\n        reason = 'must be a Component subclass';\\n      }\\n\\n      throw new Error(\\\"Illegal component, \\\\\\\"\\\" + name + \\\"\\\\\\\"; \\\" + reason + \\\".\\\");\\n    }\\n\\n    name = toTitleCase(name);\\n\\n    if (!Component.components_) {\\n      Component.components_ = {};\\n    }\\n\\n    var Player = Component.getComponent('Player');\\n\\n    if (name === 'Player' && Player && Player.players) {\\n      var players = Player.players;\\n      var playerNames = Object.keys(players); // If we have players that were disposed, then their name will still be\\n      // in Players.players. So, we must loop through and verify that the value\\n      // for each item is not null. This allows registration of the Player component\\n      // after all players have been disposed or before any were created.\\n\\n      if (players && playerNames.length > 0 && playerNames.map(function (pname) {\\n        return players[pname];\\n      }).every(Boolean)) {\\n        throw new Error('Can not register Player component after player has been created.');\\n      }\\n    }\\n\\n    Component.components_[name] = ComponentToRegister;\\n    Component.components_[toLowerCase(name)] = ComponentToRegister;\\n    return ComponentToRegister;\\n  }\\n  /**\\n   * Get a `Component` based on the name it was registered with.\\n   *\\n   * @param {string} name\\n   *        The Name of the component to get.\\n   *\\n   * @return {Component}\\n   *         The `Component` that got registered under the given name.\\n   *\\n   * @deprecated In `videojs` 6 this will not return `Component`s that were not\\n   *             registered using {@link Component.registerComponent}. Currently we\\n   *             check the global `videojs` object for a `Component` name and\\n   *             return that if it exists.\\n   */\\n  ;\\n\\n  Component.getComponent = function getComponent(name) {\\n    if (!name || !Component.components_) {\\n      return;\\n    }\\n\\n    return Component.components_[name];\\n  };\\n\\n  return Component;\\n}();\\n/**\\n * Whether or not this component supports `requestAnimationFrame`.\\n *\\n * This is exposed primarily for testing purposes.\\n *\\n * @private\\n * @type {Boolean}\\n */\\n\\n\\nComponent.prototype.supportsRaf_ = typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.requestAnimationFrame === 'function' && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.cancelAnimationFrame === 'function';\\nComponent.registerComponent('Component', Component);\\n\\n/**\\n * @file browser.js\\n * @module browser\\n */\\nvar USER_AGENT = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.userAgent || '';\\nvar webkitVersionMap = /AppleWebKit\\\\/([\\\\d.]+)/i.exec(USER_AGENT);\\nvar appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\\n/**\\n * Whether or not this device is an iPod.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_IPOD = /iPod/i.test(USER_AGENT);\\n/**\\n * The detected iOS version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {string|null}\\n */\\n\\nvar IOS_VERSION = function () {\\n  var match = USER_AGENT.match(/OS (\\\\d+)_/i);\\n\\n  if (match && match[1]) {\\n    return match[1];\\n  }\\n\\n  return null;\\n}();\\n/**\\n * Whether or not this is an Android device.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_ANDROID = /Android/i.test(USER_AGENT);\\n/**\\n * The detected Android version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {number|string|null}\\n */\\n\\nvar ANDROID_VERSION = function () {\\n  // This matches Android Major.Minor.Patch versions\\n  // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\\n  var match = USER_AGENT.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);\\n\\n  if (!match) {\\n    return null;\\n  }\\n\\n  var major = match[1] && parseFloat(match[1]);\\n  var minor = match[2] && parseFloat(match[2]);\\n\\n  if (major && minor) {\\n    return parseFloat(match[1] + '.' + match[2]);\\n  } else if (major) {\\n    return major;\\n  }\\n\\n  return null;\\n}();\\n/**\\n * Whether or not this is a native Android browser.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\\n/**\\n * Whether or not this is Mozilla Firefox.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_FIREFOX = /Firefox/i.test(USER_AGENT);\\n/**\\n * Whether or not this is Microsoft Edge.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_EDGE = /Edg/i.test(USER_AGENT);\\n/**\\n * Whether or not this is Google Chrome.\\n *\\n * This will also be `true` for Chrome on iOS, which will have different support\\n * as it is actually Safari under the hood.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_CHROME = !IS_EDGE && (/Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT));\\n/**\\n * The detected Google Chrome version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {number|null}\\n */\\n\\nvar CHROME_VERSION = function () {\\n  var match = USER_AGENT.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);\\n\\n  if (match && match[2]) {\\n    return parseFloat(match[2]);\\n  }\\n\\n  return null;\\n}();\\n/**\\n * The detected Internet Explorer version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {number|null}\\n */\\n\\nvar IE_VERSION = function () {\\n  var result = /MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(USER_AGENT);\\n  var version = result && parseFloat(result[1]);\\n\\n  if (!version && /Trident\\\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\\n    // IE 11 has a different user agent string than other IE versions\\n    version = 11.0;\\n  }\\n\\n  return version;\\n}();\\n/**\\n * Whether or not this is desktop Safari.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;\\n/**\\n * Whether or not this is a Windows machine.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_WINDOWS = /Windows/i.test(USER_AGENT);\\n/**\\n * Whether or not this device is touch-enabled.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar TOUCH_ENABLED = isReal() && ('ontouchstart' in global_window__WEBPACK_IMPORTED_MODULE_0___default.a || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.maxTouchPoints || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.DocumentTouch && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.document instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.DocumentTouch);\\n/**\\n * Whether or not this device is an iPad.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT);\\n/**\\n * Whether or not this device is an iPhone.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\\n// to identify iPhones, we need to exclude iPads.\\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\\n\\nvar IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\\n/**\\n * Whether or not this is an iOS device.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\\n/**\\n * Whether or not this is any flavor of Safari - including iOS.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\\n\\nvar browser = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  IS_IPOD: IS_IPOD,\\n  IOS_VERSION: IOS_VERSION,\\n  IS_ANDROID: IS_ANDROID,\\n  ANDROID_VERSION: ANDROID_VERSION,\\n  IS_NATIVE_ANDROID: IS_NATIVE_ANDROID,\\n  IS_FIREFOX: IS_FIREFOX,\\n  IS_EDGE: IS_EDGE,\\n  IS_CHROME: IS_CHROME,\\n  CHROME_VERSION: CHROME_VERSION,\\n  IE_VERSION: IE_VERSION,\\n  IS_SAFARI: IS_SAFARI,\\n  IS_WINDOWS: IS_WINDOWS,\\n  TOUCH_ENABLED: TOUCH_ENABLED,\\n  IS_IPAD: IS_IPAD,\\n  IS_IPHONE: IS_IPHONE,\\n  IS_IOS: IS_IOS,\\n  IS_ANY_SAFARI: IS_ANY_SAFARI\\n});\\n\\n/**\\n * @file time-ranges.js\\n * @module time-ranges\\n */\\n\\n/**\\n * Returns the time for the specified index at the start or end\\n * of a TimeRange object.\\n *\\n * @typedef    {Function} TimeRangeIndex\\n *\\n * @param      {number} [index=0]\\n *             The range number to return the time for.\\n *\\n * @return     {number}\\n *             The time offset at the specified index.\\n *\\n * @deprecated The index argument must be provided.\\n *             In the future, leaving it out will throw an error.\\n */\\n\\n/**\\n * An object that contains ranges of time.\\n *\\n * @typedef  {Object} TimeRange\\n *\\n * @property {number} length\\n *           The number of time ranges represented by this object.\\n *\\n * @property {module:time-ranges~TimeRangeIndex} start\\n *           Returns the time offset at which a specified time range begins.\\n *\\n * @property {module:time-ranges~TimeRangeIndex} end\\n *           Returns the time offset at which a specified time range ends.\\n *\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\\n */\\n\\n/**\\n * Check if any of the time ranges are over the maximum index.\\n *\\n * @private\\n * @param   {string} fnName\\n *          The function name to use for logging\\n *\\n * @param   {number} index\\n *          The index to check\\n *\\n * @param   {number} maxIndex\\n *          The maximum possible index\\n *\\n * @throws  {Error} if the timeRanges provided are over the maxIndex\\n */\\nfunction rangeCheck(fnName, index, maxIndex) {\\n  if (typeof index !== 'number' || index < 0 || index > maxIndex) {\\n    throw new Error(\\\"Failed to execute '\\\" + fnName + \\\"' on 'TimeRanges': The index provided (\\\" + index + \\\") is non-numeric or out of bounds (0-\\\" + maxIndex + \\\").\\\");\\n  }\\n}\\n/**\\n * Get the time for the specified index at the start or end\\n * of a TimeRange object.\\n *\\n * @private\\n * @param      {string} fnName\\n *             The function name to use for logging\\n *\\n * @param      {string} valueIndex\\n *             The property that should be used to get the time. should be\\n *             'start' or 'end'\\n *\\n * @param      {Array} ranges\\n *             An array of time ranges\\n *\\n * @param      {Array} [rangeIndex=0]\\n *             The index to start the search at\\n *\\n * @return     {number}\\n *             The time that offset at the specified index.\\n *\\n * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\\n * @throws     {Error} if rangeIndex is more than the length of ranges\\n */\\n\\n\\nfunction getRange(fnName, valueIndex, ranges, rangeIndex) {\\n  rangeCheck(fnName, rangeIndex, ranges.length - 1);\\n  return ranges[rangeIndex][valueIndex];\\n}\\n/**\\n * Create a time range object given ranges of time.\\n *\\n * @private\\n * @param   {Array} [ranges]\\n *          An array of time ranges.\\n */\\n\\n\\nfunction createTimeRangesObj(ranges) {\\n  if (ranges === undefined || ranges.length === 0) {\\n    return {\\n      length: 0,\\n      start: function start() {\\n        throw new Error('This TimeRanges object is empty');\\n      },\\n      end: function end() {\\n        throw new Error('This TimeRanges object is empty');\\n      }\\n    };\\n  }\\n\\n  return {\\n    length: ranges.length,\\n    start: getRange.bind(null, 'start', 0, ranges),\\n    end: getRange.bind(null, 'end', 1, ranges)\\n  };\\n}\\n/**\\n * Create a `TimeRange` object which mimics an\\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\\n *\\n * @param {number|Array[]} start\\n *        The start of a single range (a number) or an array of ranges (an\\n *        array of arrays of two numbers each).\\n *\\n * @param {number} end\\n *        The end of a single range. Cannot be used with the array form of\\n *        the `start` argument.\\n */\\n\\n\\nfunction createTimeRanges(start, end) {\\n  if (Array.isArray(start)) {\\n    return createTimeRangesObj(start);\\n  } else if (start === undefined || end === undefined) {\\n    return createTimeRangesObj();\\n  }\\n\\n  return createTimeRangesObj([[start, end]]);\\n}\\n\\n/**\\n * @file buffer.js\\n * @module buffer\\n */\\n/**\\n * Compute the percentage of the media that has been buffered.\\n *\\n * @param {TimeRange} buffered\\n *        The current `TimeRange` object representing buffered time ranges\\n *\\n * @param {number} duration\\n *        Total duration of the media\\n *\\n * @return {number}\\n *         Percent buffered of the total duration in decimal form.\\n */\\n\\nfunction bufferedPercent(buffered, duration) {\\n  var bufferedDuration = 0;\\n  var start;\\n  var end;\\n\\n  if (!duration) {\\n    return 0;\\n  }\\n\\n  if (!buffered || !buffered.length) {\\n    buffered = createTimeRanges(0, 0);\\n  }\\n\\n  for (var i = 0; i < buffered.length; i++) {\\n    start = buffered.start(i);\\n    end = buffered.end(i); // buffered end can be bigger than duration by a very small fraction\\n\\n    if (end > duration) {\\n      end = duration;\\n    }\\n\\n    bufferedDuration += end - start;\\n  }\\n\\n  return bufferedDuration / duration;\\n}\\n\\n/**\\n * @file fullscreen-api.js\\n * @module fullscreen-api\\n * @private\\n */\\n/**\\n * Store the browser-specific methods for the fullscreen API.\\n *\\n * @type {Object}\\n * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\\n * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\\n */\\n\\nvar FullscreenApi = {\\n  prefixed: true\\n}; // browser API methods\\n\\nvar apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'], // WebKit\\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen'], // Mozilla\\n['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror', '-moz-full-screen'], // Microsoft\\n['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError', '-ms-fullscreen']];\\nvar specApi = apiMap[0];\\nvar browserApi; // determine the supported set of functions\\n\\nfor (var i = 0; i < apiMap.length; i++) {\\n  // check for exitFullscreen function\\n  if (apiMap[i][1] in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n    browserApi = apiMap[i];\\n    break;\\n  }\\n} // map the browser API names to the spec API names\\n\\n\\nif (browserApi) {\\n  for (var _i = 0; _i < browserApi.length; _i++) {\\n    FullscreenApi[specApi[_i]] = browserApi[_i];\\n  }\\n\\n  FullscreenApi.prefixed = browserApi[0] !== specApi[0];\\n}\\n\\n/**\\n * @file media-error.js\\n */\\n/**\\n * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\\n *\\n * @param {number|string|Object|MediaError} value\\n *        This can be of multiple types:\\n *        - number: should be a standard error code\\n *        - string: an error message (the code will be 0)\\n *        - Object: arbitrary properties\\n *        - `MediaError` (native): used to populate a video.js `MediaError` object\\n *        - `MediaError` (video.js): will return itself if it's already a\\n *          video.js `MediaError` object.\\n *\\n * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\\n * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\\n *\\n * @class MediaError\\n */\\n\\nfunction MediaError(value) {\\n  // Allow redundant calls to this constructor to avoid having `instanceof`\\n  // checks peppered around the code.\\n  if (value instanceof MediaError) {\\n    return value;\\n  }\\n\\n  if (typeof value === 'number') {\\n    this.code = value;\\n  } else if (typeof value === 'string') {\\n    // default code is zero, so this is a custom error\\n    this.message = value;\\n  } else if (isObject(value)) {\\n    // We assign the `code` property manually because native `MediaError` objects\\n    // do not expose it as an own/enumerable property of the object.\\n    if (typeof value.code === 'number') {\\n      this.code = value.code;\\n    }\\n\\n    assign(this, value);\\n  }\\n\\n  if (!this.message) {\\n    this.message = MediaError.defaultMessages[this.code] || '';\\n  }\\n}\\n/**\\n * The error code that refers two one of the defined `MediaError` types\\n *\\n * @type {Number}\\n */\\n\\n\\nMediaError.prototype.code = 0;\\n/**\\n * An optional message that to show with the error. Message is not part of the HTML5\\n * video spec but allows for more informative custom errors.\\n *\\n * @type {String}\\n */\\n\\nMediaError.prototype.message = '';\\n/**\\n * An optional status code that can be set by plugins to allow even more detail about\\n * the error. For example a plugin might provide a specific HTTP status code and an\\n * error message for that code. Then when the plugin gets that error this class will\\n * know how to display an error message for it. This allows a custom message to show\\n * up on the `Player` error overlay.\\n *\\n * @type {Array}\\n */\\n\\nMediaError.prototype.status = null;\\n/**\\n * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\\n * specification listed under {@link MediaError} for more information.\\n *\\n * @enum {array}\\n * @readonly\\n * @property {string} 0 - MEDIA_ERR_CUSTOM\\n * @property {string} 1 - MEDIA_ERR_ABORTED\\n * @property {string} 2 - MEDIA_ERR_NETWORK\\n * @property {string} 3 - MEDIA_ERR_DECODE\\n * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\\n * @property {string} 5 - MEDIA_ERR_ENCRYPTED\\n */\\n\\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\\n/**\\n * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\\n *\\n * @type {Array}\\n * @constant\\n */\\n\\nMediaError.defaultMessages = {\\n  1: 'You aborted the media playback',\\n  2: 'A network error caused the media download to fail part-way.',\\n  3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\\n  4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\\n  5: 'The media is encrypted and we do not have the keys to decrypt it.'\\n}; // Add types as properties on MediaError\\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\\n\\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\\n  MediaError[MediaError.errorTypes[errNum]] = errNum; // values should be accessible on both the class and instance\\n\\n  MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\\n} // jsdocs for instance/static members added above\\n\\n/**\\n * Returns whether an object is `Promise`-like (i.e. has a `then` method).\\n *\\n * @param  {Object}  value\\n *         An object that may or may not be `Promise`-like.\\n *\\n * @return {boolean}\\n *         Whether or not the object is `Promise`-like.\\n */\\nfunction isPromise(value) {\\n  return value !== undefined && value !== null && typeof value.then === 'function';\\n}\\n/**\\n * Silence a Promise-like object.\\n *\\n * This is useful for avoiding non-harmful, but potentially confusing \\\"uncaught\\n * play promise\\\" rejection error messages.\\n *\\n * @param  {Object} value\\n *         An object that may or may not be `Promise`-like.\\n */\\n\\nfunction silencePromise(value) {\\n  if (isPromise(value)) {\\n    value.then(null, function (e) {});\\n  }\\n}\\n\\n/**\\n * @file text-track-list-converter.js Utilities for capturing text track state and\\n * re-creating tracks based on a capture.\\n *\\n * @module text-track-list-converter\\n */\\n\\n/**\\n * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\\n * represents the {@link TextTrack}'s state.\\n *\\n * @param {TextTrack} track\\n *        The text track to query.\\n *\\n * @return {Object}\\n *         A serializable javascript representation of the TextTrack.\\n * @private\\n */\\nvar trackToJson_ = function trackToJson_(track) {\\n  var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) {\\n    if (track[prop]) {\\n      acc[prop] = track[prop];\\n    }\\n\\n    return acc;\\n  }, {\\n    cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\\n      return {\\n        startTime: cue.startTime,\\n        endTime: cue.endTime,\\n        text: cue.text,\\n        id: cue.id\\n      };\\n    })\\n  });\\n  return ret;\\n};\\n/**\\n * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\\n * state of all {@link TextTrack}s currently configured. The return array is compatible with\\n * {@link text-track-list-converter:jsonToTextTracks}.\\n *\\n * @param {Tech} tech\\n *        The tech object to query\\n *\\n * @return {Array}\\n *         A serializable javascript representation of the {@link Tech}s\\n *         {@link TextTrackList}.\\n */\\n\\n\\nvar textTracksToJson = function textTracksToJson(tech) {\\n  var trackEls = tech.$$('track');\\n  var trackObjs = Array.prototype.map.call(trackEls, function (t) {\\n    return t.track;\\n  });\\n  var tracks = Array.prototype.map.call(trackEls, function (trackEl) {\\n    var json = trackToJson_(trackEl.track);\\n\\n    if (trackEl.src) {\\n      json.src = trackEl.src;\\n    }\\n\\n    return json;\\n  });\\n  return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\\n    return trackObjs.indexOf(track) === -1;\\n  }).map(trackToJson_));\\n};\\n/**\\n * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\\n * object {@link TextTrack} representations.\\n *\\n * @param {Array} json\\n *        An array of `TextTrack` representation objects, like those that would be\\n *        produced by `textTracksToJson`.\\n *\\n * @param {Tech} tech\\n *        The `Tech` to create the `TextTrack`s on.\\n */\\n\\n\\nvar jsonToTextTracks = function jsonToTextTracks(json, tech) {\\n  json.forEach(function (track) {\\n    var addedTrack = tech.addRemoteTextTrack(track).track;\\n\\n    if (!track.src && track.cues) {\\n      track.cues.forEach(function (cue) {\\n        return addedTrack.addCue(cue);\\n      });\\n    }\\n  });\\n  return tech.textTracks();\\n};\\n\\nvar textTrackConverter = {\\n  textTracksToJson: textTracksToJson,\\n  jsonToTextTracks: jsonToTextTracks,\\n  trackToJson_: trackToJson_\\n};\\n\\nvar MODAL_CLASS_NAME = 'vjs-modal-dialog';\\n/**\\n * The `ModalDialog` displays over the video and its controls, which blocks\\n * interaction with the player until it is closed.\\n *\\n * Modal dialogs include a \\\"Close\\\" button and will close when that button\\n * is activated - or when ESC is pressed anywhere.\\n *\\n * @extends Component\\n */\\n\\nvar ModalDialog = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ModalDialog, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Mixed} [options.content=undefined]\\n   *        Provide customized content for this modal.\\n   *\\n   * @param {string} [options.description]\\n   *        A text description for the modal, primarily for accessibility.\\n   *\\n   * @param {boolean} [options.fillAlways=false]\\n   *        Normally, modals are automatically filled only the first time\\n   *        they open. This tells the modal to refresh its content\\n   *        every time it opens.\\n   *\\n   * @param {string} [options.label]\\n   *        A text label for the modal, primarily for accessibility.\\n   *\\n   * @param {boolean} [options.pauseOnOpen=true]\\n   *        If `true`, playback will will be paused if playing when\\n   *        the modal opens, and resumed when it closes.\\n   *\\n   * @param {boolean} [options.temporary=true]\\n   *        If `true`, the modal can only be opened once; it will be\\n   *        disposed as soon as it's closed.\\n   *\\n   * @param {boolean} [options.uncloseable=false]\\n   *        If `true`, the user will not be able to close the modal\\n   *        through the UI in the normal ways. Programmatic closing is\\n   *        still possible.\\n   */\\n  function ModalDialog(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.opened_ = _this.hasBeenOpened_ = _this.hasBeenFilled_ = false;\\n\\n    _this.closeable(!_this.options_.uncloseable);\\n\\n    _this.content(_this.options_.content); // Make sure the contentEl is defined AFTER any children are initialized\\n    // because we only want the contents of the modal in the contentEl\\n    // (not the UI elements like the close button).\\n\\n\\n    _this.contentEl_ = createEl('div', {\\n      className: MODAL_CLASS_NAME + \\\"-content\\\"\\n    }, {\\n      role: 'document'\\n    });\\n    _this.descEl_ = createEl('p', {\\n      className: MODAL_CLASS_NAME + \\\"-description vjs-control-text\\\",\\n      id: _this.el().getAttribute('aria-describedby')\\n    });\\n    textContent(_this.descEl_, _this.description());\\n\\n    _this.el_.appendChild(_this.descEl_);\\n\\n    _this.el_.appendChild(_this.contentEl_);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `ModalDialog`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The DOM element that gets created.\\n   */\\n\\n\\n  var _proto = ModalDialog.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: this.buildCSSClass(),\\n      tabIndex: -1\\n    }, {\\n      'aria-describedby': this.id() + \\\"_description\\\",\\n      'aria-hidden': 'true',\\n      'aria-label': this.label(),\\n      'role': 'dialog'\\n    });\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n    this.descEl_ = null;\\n    this.previouslyActiveEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return MODAL_CLASS_NAME + \\\" vjs-hidden \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Returns the label string for this modal. Primarily used for accessibility.\\n   *\\n   * @return {string}\\n   *         the localized or raw label of this modal.\\n   */\\n  ;\\n\\n  _proto.label = function label() {\\n    return this.localize(this.options_.label || 'Modal Window');\\n  }\\n  /**\\n   * Returns the description string for this modal. Primarily used for\\n   * accessibility.\\n   *\\n   * @return {string}\\n   *         The localized or raw description of this modal.\\n   */\\n  ;\\n\\n  _proto.description = function description() {\\n    var desc = this.options_.description || this.localize('This is a modal window.'); // Append a universal closeability message if the modal is closeable.\\n\\n    if (this.closeable()) {\\n      desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\\n    }\\n\\n    return desc;\\n  }\\n  /**\\n   * Opens the modal.\\n   *\\n   * @fires ModalDialog#beforemodalopen\\n   * @fires ModalDialog#modalopen\\n   */\\n  ;\\n\\n  _proto.open = function open() {\\n    if (!this.opened_) {\\n      var player = this.player();\\n      /**\\n        * Fired just before a `ModalDialog` is opened.\\n        *\\n        * @event ModalDialog#beforemodalopen\\n        * @type {EventTarget~Event}\\n        */\\n\\n      this.trigger('beforemodalopen');\\n      this.opened_ = true; // Fill content if the modal has never opened before and\\n      // never been filled.\\n\\n      if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\\n        this.fill();\\n      } // If the player was playing, pause it and take note of its previously\\n      // playing state.\\n\\n\\n      this.wasPlaying_ = !player.paused();\\n\\n      if (this.options_.pauseOnOpen && this.wasPlaying_) {\\n        player.pause();\\n      }\\n\\n      this.on('keydown', this.handleKeyDown); // Hide controls and note if they were enabled.\\n\\n      this.hadControls_ = player.controls();\\n      player.controls(false);\\n      this.show();\\n      this.conditionalFocus_();\\n      this.el().setAttribute('aria-hidden', 'false');\\n      /**\\n        * Fired just after a `ModalDialog` is opened.\\n        *\\n        * @event ModalDialog#modalopen\\n        * @type {EventTarget~Event}\\n        */\\n\\n      this.trigger('modalopen');\\n      this.hasBeenOpened_ = true;\\n    }\\n  }\\n  /**\\n   * If the `ModalDialog` is currently open or closed.\\n   *\\n   * @param  {boolean} [value]\\n   *         If given, it will open (`true`) or close (`false`) the modal.\\n   *\\n   * @return {boolean}\\n   *         the current open state of the modaldialog\\n   */\\n  ;\\n\\n  _proto.opened = function opened(value) {\\n    if (typeof value === 'boolean') {\\n      this[value ? 'open' : 'close']();\\n    }\\n\\n    return this.opened_;\\n  }\\n  /**\\n   * Closes the modal, does nothing if the `ModalDialog` is\\n   * not open.\\n   *\\n   * @fires ModalDialog#beforemodalclose\\n   * @fires ModalDialog#modalclose\\n   */\\n  ;\\n\\n  _proto.close = function close() {\\n    if (!this.opened_) {\\n      return;\\n    }\\n\\n    var player = this.player();\\n    /**\\n      * Fired just before a `ModalDialog` is closed.\\n      *\\n      * @event ModalDialog#beforemodalclose\\n      * @type {EventTarget~Event}\\n      */\\n\\n    this.trigger('beforemodalclose');\\n    this.opened_ = false;\\n\\n    if (this.wasPlaying_ && this.options_.pauseOnOpen) {\\n      player.play();\\n    }\\n\\n    this.off('keydown', this.handleKeyDown);\\n\\n    if (this.hadControls_) {\\n      player.controls(true);\\n    }\\n\\n    this.hide();\\n    this.el().setAttribute('aria-hidden', 'true');\\n    /**\\n      * Fired just after a `ModalDialog` is closed.\\n      *\\n      * @event ModalDialog#modalclose\\n      * @type {EventTarget~Event}\\n      */\\n\\n    this.trigger('modalclose');\\n    this.conditionalBlur_();\\n\\n    if (this.options_.temporary) {\\n      this.dispose();\\n    }\\n  }\\n  /**\\n   * Check to see if the `ModalDialog` is closeable via the UI.\\n   *\\n   * @param  {boolean} [value]\\n   *         If given as a boolean, it will set the `closeable` option.\\n   *\\n   * @return {boolean}\\n   *         Returns the final value of the closable option.\\n   */\\n  ;\\n\\n  _proto.closeable = function closeable(value) {\\n    if (typeof value === 'boolean') {\\n      var closeable = this.closeable_ = !!value;\\n      var close = this.getChild('closeButton'); // If this is being made closeable and has no close button, add one.\\n\\n      if (closeable && !close) {\\n        // The close button should be a child of the modal - not its\\n        // content element, so temporarily change the content element.\\n        var temp = this.contentEl_;\\n        this.contentEl_ = this.el_;\\n        close = this.addChild('closeButton', {\\n          controlText: 'Close Modal Dialog'\\n        });\\n        this.contentEl_ = temp;\\n        this.on(close, 'close', this.close);\\n      } // If this is being made uncloseable and has a close button, remove it.\\n\\n\\n      if (!closeable && close) {\\n        this.off(close, 'close', this.close);\\n        this.removeChild(close);\\n        close.dispose();\\n      }\\n    }\\n\\n    return this.closeable_;\\n  }\\n  /**\\n   * Fill the modal's content element with the modal's \\\"content\\\" option.\\n   * The content element will be emptied before this change takes place.\\n   */\\n  ;\\n\\n  _proto.fill = function fill() {\\n    this.fillWith(this.content());\\n  }\\n  /**\\n   * Fill the modal's content element with arbitrary content.\\n   * The content element will be emptied before this change takes place.\\n   *\\n   * @fires ModalDialog#beforemodalfill\\n   * @fires ModalDialog#modalfill\\n   *\\n   * @param {Mixed} [content]\\n   *        The same rules apply to this as apply to the `content` option.\\n   */\\n  ;\\n\\n  _proto.fillWith = function fillWith(content) {\\n    var contentEl = this.contentEl();\\n    var parentEl = contentEl.parentNode;\\n    var nextSiblingEl = contentEl.nextSibling;\\n    /**\\n      * Fired just before a `ModalDialog` is filled with content.\\n      *\\n      * @event ModalDialog#beforemodalfill\\n      * @type {EventTarget~Event}\\n      */\\n\\n    this.trigger('beforemodalfill');\\n    this.hasBeenFilled_ = true; // Detach the content element from the DOM before performing\\n    // manipulation to avoid modifying the live DOM multiple times.\\n\\n    parentEl.removeChild(contentEl);\\n    this.empty();\\n    insertContent(contentEl, content);\\n    /**\\n     * Fired just after a `ModalDialog` is filled with content.\\n     *\\n     * @event ModalDialog#modalfill\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('modalfill'); // Re-inject the re-filled content element.\\n\\n    if (nextSiblingEl) {\\n      parentEl.insertBefore(contentEl, nextSiblingEl);\\n    } else {\\n      parentEl.appendChild(contentEl);\\n    } // make sure that the close button is last in the dialog DOM\\n\\n\\n    var closeButton = this.getChild('closeButton');\\n\\n    if (closeButton) {\\n      parentEl.appendChild(closeButton.el_);\\n    }\\n  }\\n  /**\\n   * Empties the content element. This happens anytime the modal is filled.\\n   *\\n   * @fires ModalDialog#beforemodalempty\\n   * @fires ModalDialog#modalempty\\n   */\\n  ;\\n\\n  _proto.empty = function empty() {\\n    /**\\n    * Fired just before a `ModalDialog` is emptied.\\n    *\\n    * @event ModalDialog#beforemodalempty\\n    * @type {EventTarget~Event}\\n    */\\n    this.trigger('beforemodalempty');\\n    emptyEl(this.contentEl());\\n    /**\\n    * Fired just after a `ModalDialog` is emptied.\\n    *\\n    * @event ModalDialog#modalempty\\n    * @type {EventTarget~Event}\\n    */\\n\\n    this.trigger('modalempty');\\n  }\\n  /**\\n   * Gets or sets the modal content, which gets normalized before being\\n   * rendered into the DOM.\\n   *\\n   * This does not update the DOM or fill the modal, but it is called during\\n   * that process.\\n   *\\n   * @param  {Mixed} [value]\\n   *         If defined, sets the internal content value to be used on the\\n   *         next call(s) to `fill`. This value is normalized before being\\n   *         inserted. To \\\"clear\\\" the internal content value, pass `null`.\\n   *\\n   * @return {Mixed}\\n   *         The current content of the modal dialog\\n   */\\n  ;\\n\\n  _proto.content = function content(value) {\\n    if (typeof value !== 'undefined') {\\n      this.content_ = value;\\n    }\\n\\n    return this.content_;\\n  }\\n  /**\\n   * conditionally focus the modal dialog if focus was previously on the player.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.conditionalFocus_ = function conditionalFocus_() {\\n    var activeEl = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement;\\n    var playerEl = this.player_.el_;\\n    this.previouslyActiveEl_ = null;\\n\\n    if (playerEl.contains(activeEl) || playerEl === activeEl) {\\n      this.previouslyActiveEl_ = activeEl;\\n      this.focus();\\n    }\\n  }\\n  /**\\n   * conditionally blur the element and refocus the last focused element\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.conditionalBlur_ = function conditionalBlur_() {\\n    if (this.previouslyActiveEl_) {\\n      this.previouslyActiveEl_.focus();\\n      this.previouslyActiveEl_ = null;\\n    }\\n  }\\n  /**\\n   * Keydown handler. Attached when modal is focused.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Do not allow keydowns to reach out of the modal dialog.\\n    event.stopPropagation();\\n\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Escape') && this.closeable()) {\\n      event.preventDefault();\\n      this.close();\\n      return;\\n    } // exit early if it isn't a tab key\\n\\n\\n    if (!keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      return;\\n    }\\n\\n    var focusableEls = this.focusableEls_();\\n    var activeEl = this.el_.querySelector(':focus');\\n    var focusIndex;\\n\\n    for (var i = 0; i < focusableEls.length; i++) {\\n      if (activeEl === focusableEls[i]) {\\n        focusIndex = i;\\n        break;\\n      }\\n    }\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement === this.el_) {\\n      focusIndex = 0;\\n    }\\n\\n    if (event.shiftKey && focusIndex === 0) {\\n      focusableEls[focusableEls.length - 1].focus();\\n      event.preventDefault();\\n    } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\\n      focusableEls[0].focus();\\n      event.preventDefault();\\n    }\\n  }\\n  /**\\n   * get all focusable elements\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.focusableEls_ = function focusableEls_() {\\n    var allChildren = this.el_.querySelectorAll('*');\\n    return Array.prototype.filter.call(allChildren, function (child) {\\n      return (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLAnchorElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLInputElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLSelectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLTextAreaElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLIFrameElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLObjectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\\n    });\\n  };\\n\\n  return ModalDialog;\\n}(Component);\\n/**\\n * Default options for `ModalDialog` default options.\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nModalDialog.prototype.options_ = {\\n  pauseOnOpen: true,\\n  temporary: true\\n};\\nComponent.registerComponent('ModalDialog', ModalDialog);\\n\\n/**\\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\\n * {@link VideoTrackList}\\n *\\n * @extends EventTarget\\n */\\n\\nvar TrackList = /*#__PURE__*/function (_EventTarget) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TrackList, _EventTarget);\\n\\n  /**\\n   * Create an instance of this class\\n   *\\n   * @param {Track[]} tracks\\n   *        A list of tracks to initialize the list with.\\n   *\\n   * @abstract\\n   */\\n  function TrackList(tracks) {\\n    var _this;\\n\\n    if (tracks === void 0) {\\n      tracks = [];\\n    }\\n\\n    _this = _EventTarget.call(this) || this;\\n    _this.tracks_ = [];\\n    /**\\n     * @memberof TrackList\\n     * @member {number} length\\n     *         The current number of `Track`s in the this Trackist.\\n     * @instance\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'length', {\\n      get: function get() {\\n        return this.tracks_.length;\\n      }\\n    });\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      _this.addTrack(tracks[i]);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Add a {@link Track} to the `TrackList`\\n   *\\n   * @param {Track} track\\n   *        The audio, video, or text track to add to the list.\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n\\n\\n  var _proto = TrackList.prototype;\\n\\n  _proto.addTrack = function addTrack(track) {\\n    var index = this.tracks_.length;\\n\\n    if (!('' + index in this)) {\\n      Object.defineProperty(this, index, {\\n        get: function get() {\\n          return this.tracks_[index];\\n        }\\n      });\\n    } // Do not add duplicate tracks\\n\\n\\n    if (this.tracks_.indexOf(track) === -1) {\\n      this.tracks_.push(track);\\n      /**\\n       * Triggered when a track is added to a track list.\\n       *\\n       * @event TrackList#addtrack\\n       * @type {EventTarget~Event}\\n       * @property {Track} track\\n       *           A reference to track that was added.\\n       */\\n\\n      this.trigger({\\n        track: track,\\n        type: 'addtrack',\\n        target: this\\n      });\\n    }\\n  }\\n  /**\\n   * Remove a {@link Track} from the `TrackList`\\n   *\\n   * @param {Track} rtrack\\n   *        The audio, video, or text track to remove from the list.\\n   *\\n   * @fires TrackList#removetrack\\n   */\\n  ;\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    var track;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      if (this[i] === rtrack) {\\n        track = this[i];\\n\\n        if (track.off) {\\n          track.off();\\n        }\\n\\n        this.tracks_.splice(i, 1);\\n        break;\\n      }\\n    }\\n\\n    if (!track) {\\n      return;\\n    }\\n    /**\\n     * Triggered when a track is removed from track list.\\n     *\\n     * @event TrackList#removetrack\\n     * @type {EventTarget~Event}\\n     * @property {Track} track\\n     *           A reference to track that was removed.\\n     */\\n\\n\\n    this.trigger({\\n      track: track,\\n      type: 'removetrack',\\n      target: this\\n    });\\n  }\\n  /**\\n   * Get a Track from the TrackList by a tracks id\\n   *\\n   * @param {string} id - the id of the track to get\\n   * @method getTrackById\\n   * @return {Track}\\n   * @private\\n   */\\n  ;\\n\\n  _proto.getTrackById = function getTrackById(id) {\\n    var result = null;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      var track = this[i];\\n\\n      if (track.id === id) {\\n        result = track;\\n        break;\\n      }\\n    }\\n\\n    return result;\\n  };\\n\\n  return TrackList;\\n}(EventTarget);\\n/**\\n * Triggered when a different track is selected/enabled.\\n *\\n * @event TrackList#change\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Events that can be called with on + eventName. See {@link EventHandler}.\\n *\\n * @property {Object} TrackList#allowedEvents_\\n * @private\\n */\\n\\n\\nTrackList.prototype.allowedEvents_ = {\\n  change: 'change',\\n  addtrack: 'addtrack',\\n  removetrack: 'removetrack'\\n}; // emulate attribute EventHandler support to allow for feature detection\\n\\nfor (var event in TrackList.prototype.allowedEvents_) {\\n  TrackList.prototype['on' + event] = null;\\n}\\n\\n/**\\n * Anywhere we call this function we diverge from the spec\\n * as we only support one enabled audiotrack at a time\\n *\\n * @param {AudioTrackList} list\\n *        list to work on\\n *\\n * @param {AudioTrack} track\\n *        The track to skip\\n *\\n * @private\\n */\\n\\nvar disableOthers = function disableOthers(list, track) {\\n  for (var i = 0; i < list.length; i++) {\\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\\n      continue;\\n    } // another audio track is enabled, disable it\\n\\n\\n    list[i].enabled = false;\\n  }\\n};\\n/**\\n * The current list of {@link AudioTrack} for a media file.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\\n * @extends TrackList\\n */\\n\\n\\nvar AudioTrackList = /*#__PURE__*/function (_TrackList) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrackList, _TrackList);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {AudioTrack[]} [tracks=[]]\\n   *        A list of `AudioTrack` to instantiate the list with.\\n   */\\n  function AudioTrackList(tracks) {\\n    var _this;\\n\\n    if (tracks === void 0) {\\n      tracks = [];\\n    }\\n\\n    // make sure only 1 track is enabled\\n    // sorted from last index to first index\\n    for (var i = tracks.length - 1; i >= 0; i--) {\\n      if (tracks[i].enabled) {\\n        disableOthers(tracks, tracks[i]);\\n        break;\\n      }\\n    }\\n\\n    _this = _TrackList.call(this, tracks) || this;\\n    _this.changing_ = false;\\n    return _this;\\n  }\\n  /**\\n   * Add an {@link AudioTrack} to the `AudioTrackList`.\\n   *\\n   * @param {AudioTrack} track\\n   *        The AudioTrack to add to the list\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n\\n\\n  var _proto = AudioTrackList.prototype;\\n\\n  _proto.addTrack = function addTrack(track) {\\n    var _this2 = this;\\n\\n    if (track.enabled) {\\n      disableOthers(this, track);\\n    }\\n\\n    _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\\n\\n\\n    if (!track.addEventListener) {\\n      return;\\n    }\\n\\n    track.enabledChange_ = function () {\\n      // when we are disabling other tracks (since we don't support\\n      // more than one track at a time) we will set changing_\\n      // to true so that we don't trigger additional change events\\n      if (_this2.changing_) {\\n        return;\\n      }\\n\\n      _this2.changing_ = true;\\n      disableOthers(_this2, track);\\n      _this2.changing_ = false;\\n\\n      _this2.trigger('change');\\n    };\\n    /**\\n     * @listens AudioTrack#enabledchange\\n     * @fires TrackList#change\\n     */\\n\\n\\n    track.addEventListener('enabledchange', track.enabledChange_);\\n  };\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    _TrackList.prototype.removeTrack.call(this, rtrack);\\n\\n    if (rtrack.removeEventListener && rtrack.enabledChange_) {\\n      rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\\n      rtrack.enabledChange_ = null;\\n    }\\n  };\\n\\n  return AudioTrackList;\\n}(TrackList);\\n\\n/**\\n * Un-select all other {@link VideoTrack}s that are selected.\\n *\\n * @param {VideoTrackList} list\\n *        list to work on\\n *\\n * @param {VideoTrack} track\\n *        The track to skip\\n *\\n * @private\\n */\\n\\nvar disableOthers$1 = function disableOthers(list, track) {\\n  for (var i = 0; i < list.length; i++) {\\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\\n      continue;\\n    } // another video track is enabled, disable it\\n\\n\\n    list[i].selected = false;\\n  }\\n};\\n/**\\n * The current list of {@link VideoTrack} for a video.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\\n * @extends TrackList\\n */\\n\\n\\nvar VideoTrackList = /*#__PURE__*/function (_TrackList) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VideoTrackList, _TrackList);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {VideoTrack[]} [tracks=[]]\\n   *        A list of `VideoTrack` to instantiate the list with.\\n   */\\n  function VideoTrackList(tracks) {\\n    var _this;\\n\\n    if (tracks === void 0) {\\n      tracks = [];\\n    }\\n\\n    // make sure only 1 track is enabled\\n    // sorted from last index to first index\\n    for (var i = tracks.length - 1; i >= 0; i--) {\\n      if (tracks[i].selected) {\\n        disableOthers$1(tracks, tracks[i]);\\n        break;\\n      }\\n    }\\n\\n    _this = _TrackList.call(this, tracks) || this;\\n    _this.changing_ = false;\\n    /**\\n     * @member {number} VideoTrackList#selectedIndex\\n     *         The current index of the selected {@link VideoTrack`}.\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'selectedIndex', {\\n      get: function get() {\\n        for (var _i = 0; _i < this.length; _i++) {\\n          if (this[_i].selected) {\\n            return _i;\\n          }\\n        }\\n\\n        return -1;\\n      },\\n      set: function set() {}\\n    });\\n    return _this;\\n  }\\n  /**\\n   * Add a {@link VideoTrack} to the `VideoTrackList`.\\n   *\\n   * @param {VideoTrack} track\\n   *        The VideoTrack to add to the list\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n\\n\\n  var _proto = VideoTrackList.prototype;\\n\\n  _proto.addTrack = function addTrack(track) {\\n    var _this2 = this;\\n\\n    if (track.selected) {\\n      disableOthers$1(this, track);\\n    }\\n\\n    _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\\n\\n\\n    if (!track.addEventListener) {\\n      return;\\n    }\\n\\n    track.selectedChange_ = function () {\\n      if (_this2.changing_) {\\n        return;\\n      }\\n\\n      _this2.changing_ = true;\\n      disableOthers$1(_this2, track);\\n      _this2.changing_ = false;\\n\\n      _this2.trigger('change');\\n    };\\n    /**\\n     * @listens VideoTrack#selectedchange\\n     * @fires TrackList#change\\n     */\\n\\n\\n    track.addEventListener('selectedchange', track.selectedChange_);\\n  };\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    _TrackList.prototype.removeTrack.call(this, rtrack);\\n\\n    if (rtrack.removeEventListener && rtrack.selectedChange_) {\\n      rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\\n      rtrack.selectedChange_ = null;\\n    }\\n  };\\n\\n  return VideoTrackList;\\n}(TrackList);\\n\\n/**\\n * The current list of {@link TextTrack} for a media file.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\\n * @extends TrackList\\n */\\n\\nvar TextTrackList = /*#__PURE__*/function (_TrackList) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackList, _TrackList);\\n\\n  function TextTrackList() {\\n    return _TrackList.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = TextTrackList.prototype;\\n\\n  /**\\n   * Add a {@link TextTrack} to the `TextTrackList`\\n   *\\n   * @param {TextTrack} track\\n   *        The text track to add to the list.\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n  _proto.addTrack = function addTrack(track) {\\n    var _this = this;\\n\\n    _TrackList.prototype.addTrack.call(this, track);\\n\\n    if (!this.queueChange_) {\\n      this.queueChange_ = function () {\\n        return _this.queueTrigger('change');\\n      };\\n    }\\n\\n    if (!this.triggerSelectedlanguagechange) {\\n      this.triggerSelectedlanguagechange_ = function () {\\n        return _this.trigger('selectedlanguagechange');\\n      };\\n    }\\n    /**\\n     * @listens TextTrack#modechange\\n     * @fires TrackList#change\\n     */\\n\\n\\n    track.addEventListener('modechange', this.queueChange_);\\n    var nonLanguageTextTrackKind = ['metadata', 'chapters'];\\n\\n    if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\\n      track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\\n    }\\n  };\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    _TrackList.prototype.removeTrack.call(this, rtrack); // manually remove the event handlers we added\\n\\n\\n    if (rtrack.removeEventListener) {\\n      if (this.queueChange_) {\\n        rtrack.removeEventListener('modechange', this.queueChange_);\\n      }\\n\\n      if (this.selectedlanguagechange_) {\\n        rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\\n      }\\n    }\\n  };\\n\\n  return TextTrackList;\\n}(TrackList);\\n\\n/**\\n * @file html-track-element-list.js\\n */\\n\\n/**\\n * The current list of {@link HtmlTrackElement}s.\\n */\\nvar HtmlTrackElementList = /*#__PURE__*/function () {\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {HtmlTrackElement[]} [tracks=[]]\\n   *        A list of `HtmlTrackElement` to instantiate the list with.\\n   */\\n  function HtmlTrackElementList(trackElements) {\\n    if (trackElements === void 0) {\\n      trackElements = [];\\n    }\\n\\n    this.trackElements_ = [];\\n    /**\\n     * @memberof HtmlTrackElementList\\n     * @member {number} length\\n     *         The current number of `Track`s in the this Trackist.\\n     * @instance\\n     */\\n\\n    Object.defineProperty(this, 'length', {\\n      get: function get() {\\n        return this.trackElements_.length;\\n      }\\n    });\\n\\n    for (var i = 0, length = trackElements.length; i < length; i++) {\\n      this.addTrackElement_(trackElements[i]);\\n    }\\n  }\\n  /**\\n   * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\\n   *\\n   * @param {HtmlTrackElement} trackElement\\n   *        The track element to add to the list.\\n   *\\n   * @private\\n   */\\n\\n\\n  var _proto = HtmlTrackElementList.prototype;\\n\\n  _proto.addTrackElement_ = function addTrackElement_(trackElement) {\\n    var index = this.trackElements_.length;\\n\\n    if (!('' + index in this)) {\\n      Object.defineProperty(this, index, {\\n        get: function get() {\\n          return this.trackElements_[index];\\n        }\\n      });\\n    } // Do not add duplicate elements\\n\\n\\n    if (this.trackElements_.indexOf(trackElement) === -1) {\\n      this.trackElements_.push(trackElement);\\n    }\\n  }\\n  /**\\n   * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\\n   * {@link TextTrack}.\\n   *\\n   * @param {TextTrack} track\\n   *        The track associated with a track element.\\n   *\\n   * @return {HtmlTrackElement|undefined}\\n   *         The track element that was found or undefined.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.getTrackElementByTrack_ = function getTrackElementByTrack_(track) {\\n    var trackElement_;\\n\\n    for (var i = 0, length = this.trackElements_.length; i < length; i++) {\\n      if (track === this.trackElements_[i].track) {\\n        trackElement_ = this.trackElements_[i];\\n        break;\\n      }\\n    }\\n\\n    return trackElement_;\\n  }\\n  /**\\n   * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\\n   *\\n   * @param {HtmlTrackElement} trackElement\\n   *        The track element to remove from the list.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.removeTrackElement_ = function removeTrackElement_(trackElement) {\\n    for (var i = 0, length = this.trackElements_.length; i < length; i++) {\\n      if (trackElement === this.trackElements_[i]) {\\n        if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\\n          this.trackElements_[i].track.off();\\n        }\\n\\n        if (typeof this.trackElements_[i].off === 'function') {\\n          this.trackElements_[i].off();\\n        }\\n\\n        this.trackElements_.splice(i, 1);\\n        break;\\n      }\\n    }\\n  };\\n\\n  return HtmlTrackElementList;\\n}();\\n\\n/**\\n * @file text-track-cue-list.js\\n */\\n\\n/**\\n * @typedef {Object} TextTrackCueList~TextTrackCue\\n *\\n * @property {string} id\\n *           The unique id for this text track cue\\n *\\n * @property {number} startTime\\n *           The start time for this text track cue\\n *\\n * @property {number} endTime\\n *           The end time for this text track cue\\n *\\n * @property {boolean} pauseOnExit\\n *           Pause when the end time is reached if true.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\\n */\\n\\n/**\\n * A List of TextTrackCues.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\\n */\\nvar TextTrackCueList = /*#__PURE__*/function () {\\n  /**\\n   * Create an instance of this class..\\n   *\\n   * @param {Array} cues\\n   *        A list of cues to be initialized with\\n   */\\n  function TextTrackCueList(cues) {\\n    TextTrackCueList.prototype.setCues_.call(this, cues);\\n    /**\\n     * @memberof TextTrackCueList\\n     * @member {number} length\\n     *         The current number of `TextTrackCue`s in the TextTrackCueList.\\n     * @instance\\n     */\\n\\n    Object.defineProperty(this, 'length', {\\n      get: function get() {\\n        return this.length_;\\n      }\\n    });\\n  }\\n  /**\\n   * A setter for cues in this list. Creates getters\\n   * an an index for the cues.\\n   *\\n   * @param {Array} cues\\n   *        An array of cues to set\\n   *\\n   * @private\\n   */\\n\\n\\n  var _proto = TextTrackCueList.prototype;\\n\\n  _proto.setCues_ = function setCues_(cues) {\\n    var oldLength = this.length || 0;\\n    var i = 0;\\n    var l = cues.length;\\n    this.cues_ = cues;\\n    this.length_ = cues.length;\\n\\n    var defineProp = function defineProp(index) {\\n      if (!('' + index in this)) {\\n        Object.defineProperty(this, '' + index, {\\n          get: function get() {\\n            return this.cues_[index];\\n          }\\n        });\\n      }\\n    };\\n\\n    if (oldLength < l) {\\n      i = oldLength;\\n\\n      for (; i < l; i++) {\\n        defineProp.call(this, i);\\n      }\\n    }\\n  }\\n  /**\\n   * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\\n   *\\n   * @param {string} id\\n   *        The id of the cue that should be searched for.\\n   *\\n   * @return {TextTrackCueList~TextTrackCue|null}\\n   *         A single cue or null if none was found.\\n   */\\n  ;\\n\\n  _proto.getCueById = function getCueById(id) {\\n    var result = null;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      var cue = this[i];\\n\\n      if (cue.id === id) {\\n        result = cue;\\n        break;\\n      }\\n    }\\n\\n    return result;\\n  };\\n\\n  return TextTrackCueList;\\n}();\\n\\n/**\\n * @file track-kinds.js\\n */\\n\\n/**\\n * All possible `VideoTrackKind`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\\n * @typedef VideoTrack~Kind\\n * @enum\\n */\\nvar VideoTrackKind = {\\n  alternative: 'alternative',\\n  captions: 'captions',\\n  main: 'main',\\n  sign: 'sign',\\n  subtitles: 'subtitles',\\n  commentary: 'commentary'\\n};\\n/**\\n * All possible `AudioTrackKind`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\\n * @typedef AudioTrack~Kind\\n * @enum\\n */\\n\\nvar AudioTrackKind = {\\n  'alternative': 'alternative',\\n  'descriptions': 'descriptions',\\n  'main': 'main',\\n  'main-desc': 'main-desc',\\n  'translation': 'translation',\\n  'commentary': 'commentary'\\n};\\n/**\\n * All possible `TextTrackKind`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\\n * @typedef TextTrack~Kind\\n * @enum\\n */\\n\\nvar TextTrackKind = {\\n  subtitles: 'subtitles',\\n  captions: 'captions',\\n  descriptions: 'descriptions',\\n  chapters: 'chapters',\\n  metadata: 'metadata'\\n};\\n/**\\n * All possible `TextTrackMode`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\\n * @typedef TextTrack~Mode\\n * @enum\\n */\\n\\nvar TextTrackMode = {\\n  disabled: 'disabled',\\n  hidden: 'hidden',\\n  showing: 'showing'\\n};\\n\\n/**\\n * A Track class that contains all of the common functionality for {@link AudioTrack},\\n * {@link VideoTrack}, and {@link TextTrack}.\\n *\\n * > Note: This class should not be used directly\\n *\\n * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\\n * @extends EventTarget\\n * @abstract\\n */\\n\\nvar Track = /*#__PURE__*/function (_EventTarget) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Track, _EventTarget);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} [options={}]\\n   *        Object of option names and values\\n   *\\n   * @param {string} [options.kind='']\\n   *        A valid kind for the track type you are creating.\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this AudioTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @abstract\\n   */\\n  function Track(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _EventTarget.call(this) || this;\\n    var trackProps = {\\n      id: options.id || 'vjs_track_' + newGUID(),\\n      kind: options.kind || '',\\n      label: options.label || '',\\n      language: options.language || ''\\n    };\\n    /**\\n     * @memberof Track\\n     * @member {string} id\\n     *         The id of this track. Cannot be changed after creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    /**\\n     * @memberof Track\\n     * @member {string} kind\\n     *         The kind of track that this is. Cannot be changed after creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    /**\\n     * @memberof Track\\n     * @member {string} label\\n     *         The label of this track. Cannot be changed after creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    /**\\n     * @memberof Track\\n     * @member {string} language\\n     *         The two letter language code for this track. Cannot be changed after\\n     *         creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    var _loop = function _loop(key) {\\n      Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), key, {\\n        get: function get() {\\n          return trackProps[key];\\n        },\\n        set: function set() {}\\n      });\\n    };\\n\\n    for (var key in trackProps) {\\n      _loop(key);\\n    }\\n\\n    return _this;\\n  }\\n\\n  return Track;\\n}(EventTarget);\\n\\n/**\\n * @file url.js\\n * @module url\\n */\\n/**\\n * @typedef {Object} url:URLObject\\n *\\n * @property {string} protocol\\n *           The protocol of the url that was parsed.\\n *\\n * @property {string} hostname\\n *           The hostname of the url that was parsed.\\n *\\n * @property {string} port\\n *           The port of the url that was parsed.\\n *\\n * @property {string} pathname\\n *           The pathname of the url that was parsed.\\n *\\n * @property {string} search\\n *           The search query of the url that was parsed.\\n *\\n * @property {string} hash\\n *           The hash of the url that was parsed.\\n *\\n * @property {string} host\\n *           The host of the url that was parsed.\\n */\\n\\n/**\\n * Resolve and parse the elements of a URL.\\n *\\n * @function\\n * @param    {String} url\\n *           The url to parse\\n *\\n * @return   {url:URLObject}\\n *           An object of url details\\n */\\n\\nvar parseUrl = function parseUrl(url) {\\n  var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; // add the url to an anchor and let the browser parse the URL\\n\\n  var a = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('a');\\n  a.href = url; // IE8 (and 9?) Fix\\n  // ie8 doesn't parse the URL correctly until the anchor is actually\\n  // added to the body, and an innerHTML is needed to trigger the parsing\\n\\n  var addToBody = a.host === '' && a.protocol !== 'file:';\\n  var div;\\n\\n  if (addToBody) {\\n    div = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('div');\\n    div.innerHTML = \\\"<a href=\\\\\\\"\\\" + url + \\\"\\\\\\\"></a>\\\";\\n    a = div.firstChild; // prevent the div from affecting layout\\n\\n    div.setAttribute('style', 'display:none; position:absolute;');\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.appendChild(div);\\n  } // Copy the specific URL properties to a new object\\n  // This is also needed for IE8 because the anchor loses its\\n  // properties when it's removed from the dom\\n\\n\\n  var details = {};\\n\\n  for (var i = 0; i < props.length; i++) {\\n    details[props[i]] = a[props[i]];\\n  } // IE9 adds the port to the host property unlike everyone else. If\\n  // a port identifier is added for standard ports, strip it.\\n\\n\\n  if (details.protocol === 'http:') {\\n    details.host = details.host.replace(/:80$/, '');\\n  }\\n\\n  if (details.protocol === 'https:') {\\n    details.host = details.host.replace(/:443$/, '');\\n  }\\n\\n  if (!details.protocol) {\\n    details.protocol = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.protocol;\\n  }\\n\\n  if (addToBody) {\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.removeChild(div);\\n  }\\n\\n  return details;\\n};\\n/**\\n * Get absolute version of relative URL. Used to tell Flash the correct URL.\\n *\\n * @function\\n * @param    {string} url\\n *           URL to make absolute\\n *\\n * @return   {string}\\n *           Absolute URL\\n *\\n * @see      http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\\n */\\n\\nvar getAbsoluteURL = function getAbsoluteURL(url) {\\n  // Check if absolute URL\\n  if (!url.match(/^https?:\\\\/\\\\//)) {\\n    // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\\n    var div = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('div');\\n    div.innerHTML = \\\"<a href=\\\\\\\"\\\" + url + \\\"\\\\\\\">x</a>\\\";\\n    url = div.firstChild.href;\\n  }\\n\\n  return url;\\n};\\n/**\\n * Returns the extension of the passed file name. It will return an empty string\\n * if passed an invalid path.\\n *\\n * @function\\n * @param    {string} path\\n *           The fileName path like '/path/to/file.mp4'\\n *\\n * @return  {string}\\n *           The extension in lower case or an empty string if no\\n *           extension could be found.\\n */\\n\\nvar getFileExtension = function getFileExtension(path) {\\n  if (typeof path === 'string') {\\n    var splitPathRe = /^(\\\\/?)([\\\\s\\\\S]*?)((?:\\\\.{1,2}|[^\\\\/]+?)(\\\\.([^\\\\.\\\\/\\\\?]+)))(?:[\\\\/]*|[\\\\?].*)$/;\\n    var pathParts = splitPathRe.exec(path);\\n\\n    if (pathParts) {\\n      return pathParts.pop().toLowerCase();\\n    }\\n  }\\n\\n  return '';\\n};\\n/**\\n * Returns whether the url passed is a cross domain request or not.\\n *\\n * @function\\n * @param    {string} url\\n *           The url to check.\\n *\\n * @param    {Object} [winLoc]\\n *           the domain to check the url against, defaults to window.location\\n *\\n * @param    {string} [winLoc.protocol]\\n *           The window location protocol defaults to window.location.protocol\\n *\\n * @param    {string} [winLoc.host]\\n *           The window location host defaults to window.location.host\\n *\\n * @return   {boolean}\\n *           Whether it is a cross domain request or not.\\n */\\n\\nvar isCrossOrigin = function isCrossOrigin(url, winLoc) {\\n  if (winLoc === void 0) {\\n    winLoc = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location;\\n  }\\n\\n  var urlInfo = parseUrl(url); // IE8 protocol relative urls will return ':' for protocol\\n\\n  var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; // Check if url is for another domain/origin\\n  // IE8 doesn't know location.origin, so we won't rely on it here\\n\\n  var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;\\n  return crossOrigin;\\n};\\n\\nvar Url = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  parseUrl: parseUrl,\\n  getAbsoluteURL: getAbsoluteURL,\\n  getFileExtension: getFileExtension,\\n  isCrossOrigin: isCrossOrigin\\n});\\n\\n/**\\n * Takes a webvtt file contents and parses it into cues\\n *\\n * @param {string} srcContent\\n *        webVTT file contents\\n *\\n * @param {TextTrack} track\\n *        TextTrack to add cues to. Cues come from the srcContent.\\n *\\n * @private\\n */\\n\\nvar parseCues = function parseCues(srcContent, track) {\\n  var parser = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.StringDecoder());\\n  var errors = [];\\n\\n  parser.oncue = function (cue) {\\n    track.addCue(cue);\\n  };\\n\\n  parser.onparsingerror = function (error) {\\n    errors.push(error);\\n  };\\n\\n  parser.onflush = function () {\\n    track.trigger({\\n      type: 'loadeddata',\\n      target: track\\n    });\\n  };\\n\\n  parser.parse(srcContent);\\n\\n  if (errors.length > 0) {\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupCollapsed) {\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupCollapsed(\\\"Text Track parsing errors for \\\" + track.src);\\n    }\\n\\n    errors.forEach(function (error) {\\n      return log.error(error);\\n    });\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupEnd) {\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupEnd();\\n    }\\n  }\\n\\n  parser.flush();\\n};\\n/**\\n * Load a `TextTrack` from a specified url.\\n *\\n * @param {string} src\\n *        Url to load track from.\\n *\\n * @param {TextTrack} track\\n *        Track to add cues to. Comes from the content at the end of `url`.\\n *\\n * @private\\n */\\n\\n\\nvar loadTrack = function loadTrack(src, track) {\\n  var opts = {\\n    uri: src\\n  };\\n  var crossOrigin = isCrossOrigin(src);\\n\\n  if (crossOrigin) {\\n    opts.cors = crossOrigin;\\n  }\\n\\n  _videojs_xhr__WEBPACK_IMPORTED_MODULE_9___default()(opts, bind(this, function (err, response, responseBody) {\\n    if (err) {\\n      return log.error(err, response);\\n    }\\n\\n    track.loaded_ = true; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\\n    // NOTE: this is only used for the alt/video.novtt.js build\\n\\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function') {\\n      if (track.tech_) {\\n        // to prevent use before define eslint error, we define loadHandler\\n        // as a let here\\n        track.tech_.any(['vttjsloaded', 'vttjserror'], function (event) {\\n          if (event.type === 'vttjserror') {\\n            log.error(\\\"vttjs failed to load, stopping trying to process \\\" + track.src);\\n            return;\\n          }\\n\\n          return parseCues(responseBody, track);\\n        });\\n      }\\n    } else {\\n      parseCues(responseBody, track);\\n    }\\n  }));\\n};\\n/**\\n * A representation of a single `TextTrack`.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\\n * @extends Track\\n */\\n\\n\\nvar TextTrack = /*#__PURE__*/function (_Track) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrack, _Track);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} options={}\\n   *        Object of option names and values\\n   *\\n   * @param {Tech} options.tech\\n   *        A reference to the tech that owns this TextTrack.\\n   *\\n   * @param {TextTrack~Kind} [options.kind='subtitles']\\n   *        A valid text track kind.\\n   *\\n   * @param {TextTrack~Mode} [options.mode='disabled']\\n   *        A valid text track mode.\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this TextTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {string} [options.srclang='']\\n   *        A valid two character language code. An alternative, but deprioritized\\n   *        version of `options.language`\\n   *\\n   * @param {string} [options.src]\\n   *        A url to TextTrack cues.\\n   *\\n   * @param {boolean} [options.default]\\n   *        If this track should default to on or off.\\n   */\\n  function TextTrack(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (!options.tech) {\\n      throw new Error('A tech was not provided.');\\n    }\\n\\n    var settings = mergeOptions(options, {\\n      kind: TextTrackKind[options.kind] || 'subtitles',\\n      language: options.language || options.srclang || ''\\n    });\\n    var mode = TextTrackMode[settings.mode] || 'disabled';\\n    var default_ = settings[\\\"default\\\"];\\n\\n    if (settings.kind === 'metadata' || settings.kind === 'chapters') {\\n      mode = 'hidden';\\n    }\\n\\n    _this = _Track.call(this, settings) || this;\\n    _this.tech_ = settings.tech;\\n    _this.cues_ = [];\\n    _this.activeCues_ = [];\\n    _this.preload_ = _this.tech_.preloadTextTracks !== false;\\n    var cues = new TextTrackCueList(_this.cues_);\\n    var activeCues = new TextTrackCueList(_this.activeCues_);\\n    var changed = false;\\n    var timeupdateHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), function () {\\n      // Accessing this.activeCues for the side-effects of updating itself\\n      // due to its nature as a getter function. Do not remove or cues will\\n      // stop updating!\\n      // Use the setter to prevent deletion from uglify (pure_getters rule)\\n      this.activeCues = this.activeCues;\\n\\n      if (changed) {\\n        this.trigger('cuechange');\\n        changed = false;\\n      }\\n    });\\n\\n    if (mode !== 'disabled') {\\n      _this.tech_.ready(function () {\\n        _this.tech_.on('timeupdate', timeupdateHandler);\\n      }, true);\\n    }\\n\\n    Object.defineProperties(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), {\\n      /**\\n       * @memberof TextTrack\\n       * @member {boolean} default\\n       *         If this track was set to be on or off by default. Cannot be changed after\\n       *         creation.\\n       * @instance\\n       *\\n       * @readonly\\n       */\\n      \\\"default\\\": {\\n        get: function get() {\\n          return default_;\\n        },\\n        set: function set() {}\\n      },\\n\\n      /**\\n       * @memberof TextTrack\\n       * @member {string} mode\\n       *         Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\\n       *         not be set if setting to an invalid mode.\\n       * @instance\\n       *\\n       * @fires TextTrack#modechange\\n       */\\n      mode: {\\n        get: function get() {\\n          return mode;\\n        },\\n        set: function set(newMode) {\\n          var _this2 = this;\\n\\n          if (!TextTrackMode[newMode]) {\\n            return;\\n          }\\n\\n          mode = newMode;\\n\\n          if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) {\\n            // On-demand load.\\n            loadTrack(this.src, this);\\n          }\\n\\n          if (mode !== 'disabled') {\\n            this.tech_.ready(function () {\\n              _this2.tech_.on('timeupdate', timeupdateHandler);\\n            }, true);\\n          } else {\\n            this.tech_.off('timeupdate', timeupdateHandler);\\n          }\\n          /**\\n           * An event that fires when mode changes on this track. This allows\\n           * the TextTrackList that holds this track to act accordingly.\\n           *\\n           * > Note: This is not part of the spec!\\n           *\\n           * @event TextTrack#modechange\\n           * @type {EventTarget~Event}\\n           */\\n\\n\\n          this.trigger('modechange');\\n        }\\n      },\\n\\n      /**\\n       * @memberof TextTrack\\n       * @member {TextTrackCueList} cues\\n       *         The text track cue list for this TextTrack.\\n       * @instance\\n       */\\n      cues: {\\n        get: function get() {\\n          if (!this.loaded_) {\\n            return null;\\n          }\\n\\n          return cues;\\n        },\\n        set: function set() {}\\n      },\\n\\n      /**\\n       * @memberof TextTrack\\n       * @member {TextTrackCueList} activeCues\\n       *         The list text track cues that are currently active for this TextTrack.\\n       * @instance\\n       */\\n      activeCues: {\\n        get: function get() {\\n          if (!this.loaded_) {\\n            return null;\\n          } // nothing to do\\n\\n\\n          if (this.cues.length === 0) {\\n            return activeCues;\\n          }\\n\\n          var ct = this.tech_.currentTime();\\n          var active = [];\\n\\n          for (var i = 0, l = this.cues.length; i < l; i++) {\\n            var cue = this.cues[i];\\n\\n            if (cue.startTime <= ct && cue.endTime >= ct) {\\n              active.push(cue);\\n            } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) {\\n              active.push(cue);\\n            }\\n          }\\n\\n          changed = false;\\n\\n          if (active.length !== this.activeCues_.length) {\\n            changed = true;\\n          } else {\\n            for (var _i = 0; _i < active.length; _i++) {\\n              if (this.activeCues_.indexOf(active[_i]) === -1) {\\n                changed = true;\\n              }\\n            }\\n          }\\n\\n          this.activeCues_ = active;\\n          activeCues.setCues_(this.activeCues_);\\n          return activeCues;\\n        },\\n        // /!\\\\ Keep this setter empty (see the timeupdate handler above)\\n        set: function set() {}\\n      }\\n    });\\n\\n    if (settings.src) {\\n      _this.src = settings.src;\\n\\n      if (!_this.preload_) {\\n        // Tracks will load on-demand.\\n        // Act like we're loaded for other purposes.\\n        _this.loaded_ = true;\\n      }\\n\\n      if (_this.preload_ || default_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\\n        loadTrack(_this.src, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\\n      }\\n    } else {\\n      _this.loaded_ = true;\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Add a cue to the internal list of cues.\\n   *\\n   * @param {TextTrack~Cue} cue\\n   *        The cue to add to our internal list\\n   */\\n\\n\\n  var _proto = TextTrack.prototype;\\n\\n  _proto.addCue = function addCue(originalCue) {\\n    var cue = originalCue;\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs && !(originalCue instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs.VTTCue)) {\\n      cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\\n\\n      for (var prop in originalCue) {\\n        if (!(prop in cue)) {\\n          cue[prop] = originalCue[prop];\\n        }\\n      } // make sure that `id` is copied over\\n\\n\\n      cue.id = originalCue.id;\\n      cue.originalCue_ = originalCue;\\n    }\\n\\n    var tracks = this.tech_.textTracks();\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      if (tracks[i] !== this) {\\n        tracks[i].removeCue(cue);\\n      }\\n    }\\n\\n    this.cues_.push(cue);\\n    this.cues.setCues_(this.cues_);\\n  }\\n  /**\\n   * Remove a cue from our internal list\\n   *\\n   * @param {TextTrack~Cue} removeCue\\n   *        The cue to remove from our internal list\\n   */\\n  ;\\n\\n  _proto.removeCue = function removeCue(_removeCue) {\\n    var i = this.cues_.length;\\n\\n    while (i--) {\\n      var cue = this.cues_[i];\\n\\n      if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) {\\n        this.cues_.splice(i, 1);\\n        this.cues.setCues_(this.cues_);\\n        break;\\n      }\\n    }\\n  };\\n\\n  return TextTrack;\\n}(Track);\\n/**\\n * cuechange - One or more cues in the track have become active or stopped being active.\\n */\\n\\n\\nTextTrack.prototype.allowedEvents_ = {\\n  cuechange: 'cuechange'\\n};\\n\\n/**\\n * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\\n * only one `AudioTrack` in the list will be enabled at a time.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\\n * @extends Track\\n */\\n\\nvar AudioTrack = /*#__PURE__*/function (_Track) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrack, _Track);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} [options={}]\\n   *        Object of option names and values\\n   *\\n   * @param {AudioTrack~Kind} [options.kind='']\\n   *        A valid audio track kind\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this AudioTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {boolean} [options.enabled]\\n   *        If this track is the one that is currently playing. If this track is part of\\n   *        an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\\n   */\\n  function AudioTrack(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var settings = mergeOptions(options, {\\n      kind: AudioTrackKind[options.kind] || ''\\n    });\\n    _this = _Track.call(this, settings) || this;\\n    var enabled = false;\\n    /**\\n     * @memberof AudioTrack\\n     * @member {boolean} enabled\\n     *         If this `AudioTrack` is enabled or not. When setting this will\\n     *         fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\\n     * @instance\\n     *\\n     * @fires VideoTrack#selectedchange\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'enabled', {\\n      get: function get() {\\n        return enabled;\\n      },\\n      set: function set(newEnabled) {\\n        // an invalid or unchanged value\\n        if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\\n          return;\\n        }\\n\\n        enabled = newEnabled;\\n        /**\\n         * An event that fires when enabled changes on this track. This allows\\n         * the AudioTrackList that holds this track to act accordingly.\\n         *\\n         * > Note: This is not part of the spec! Native tracks will do\\n         *         this internally without an event.\\n         *\\n         * @event AudioTrack#enabledchange\\n         * @type {EventTarget~Event}\\n         */\\n\\n        this.trigger('enabledchange');\\n      }\\n    }); // if the user sets this track to selected then\\n    // set selected to that true value otherwise\\n    // we keep it false\\n\\n    if (settings.enabled) {\\n      _this.enabled = settings.enabled;\\n    }\\n\\n    _this.loaded_ = true;\\n    return _this;\\n  }\\n\\n  return AudioTrack;\\n}(Track);\\n\\n/**\\n * A representation of a single `VideoTrack`.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\\n * @extends Track\\n */\\n\\nvar VideoTrack = /*#__PURE__*/function (_Track) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VideoTrack, _Track);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} [options={}]\\n   *        Object of option names and values\\n   *\\n   * @param {string} [options.kind='']\\n   *        A valid {@link VideoTrack~Kind}\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this AudioTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {boolean} [options.selected]\\n   *        If this track is the one that is currently playing.\\n   */\\n  function VideoTrack(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var settings = mergeOptions(options, {\\n      kind: VideoTrackKind[options.kind] || ''\\n    });\\n    _this = _Track.call(this, settings) || this;\\n    var selected = false;\\n    /**\\n     * @memberof VideoTrack\\n     * @member {boolean} selected\\n     *         If this `VideoTrack` is selected or not. When setting this will\\n     *         fire {@link VideoTrack#selectedchange} if the state of selected changed.\\n     * @instance\\n     *\\n     * @fires VideoTrack#selectedchange\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'selected', {\\n      get: function get() {\\n        return selected;\\n      },\\n      set: function set(newSelected) {\\n        // an invalid or unchanged value\\n        if (typeof newSelected !== 'boolean' || newSelected === selected) {\\n          return;\\n        }\\n\\n        selected = newSelected;\\n        /**\\n         * An event that fires when selected changes on this track. This allows\\n         * the VideoTrackList that holds this track to act accordingly.\\n         *\\n         * > Note: This is not part of the spec! Native tracks will do\\n         *         this internally without an event.\\n         *\\n         * @event VideoTrack#selectedchange\\n         * @type {EventTarget~Event}\\n         */\\n\\n        this.trigger('selectedchange');\\n      }\\n    }); // if the user sets this track to selected then\\n    // set selected to that true value otherwise\\n    // we keep it false\\n\\n    if (settings.selected) {\\n      _this.selected = settings.selected;\\n    }\\n\\n    return _this;\\n  }\\n\\n  return VideoTrack;\\n}(Track);\\n\\n/**\\n * @memberof HTMLTrackElement\\n * @typedef {HTMLTrackElement~ReadyState}\\n * @enum {number}\\n */\\n\\nvar NONE = 0;\\nvar LOADING = 1;\\nvar LOADED = 2;\\nvar ERROR = 3;\\n/**\\n * A single track represented in the DOM.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\\n * @extends EventTarget\\n */\\n\\nvar HTMLTrackElement = /*#__PURE__*/function (_EventTarget) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(HTMLTrackElement, _EventTarget);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} options={}\\n   *        Object of option names and values\\n   *\\n   * @param {Tech} options.tech\\n   *        A reference to the tech that owns this HTMLTrackElement.\\n   *\\n   * @param {TextTrack~Kind} [options.kind='subtitles']\\n   *        A valid text track kind.\\n   *\\n   * @param {TextTrack~Mode} [options.mode='disabled']\\n   *        A valid text track mode.\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this TextTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {string} [options.srclang='']\\n   *        A valid two character language code. An alternative, but deprioritized\\n   *        vesion of `options.language`\\n   *\\n   * @param {string} [options.src]\\n   *        A url to TextTrack cues.\\n   *\\n   * @param {boolean} [options.default]\\n   *        If this track should default to on or off.\\n   */\\n  function HTMLTrackElement(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _EventTarget.call(this) || this;\\n    var readyState;\\n    var track = new TextTrack(options);\\n    _this.kind = track.kind;\\n    _this.src = track.src;\\n    _this.srclang = track.language;\\n    _this.label = track.label;\\n    _this[\\\"default\\\"] = track[\\\"default\\\"];\\n    Object.defineProperties(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), {\\n      /**\\n       * @memberof HTMLTrackElement\\n       * @member {HTMLTrackElement~ReadyState} readyState\\n       *         The current ready state of the track element.\\n       * @instance\\n       */\\n      readyState: {\\n        get: function get() {\\n          return readyState;\\n        }\\n      },\\n\\n      /**\\n       * @memberof HTMLTrackElement\\n       * @member {TextTrack} track\\n       *         The underlying TextTrack object.\\n       * @instance\\n       *\\n       */\\n      track: {\\n        get: function get() {\\n          return track;\\n        }\\n      }\\n    });\\n    readyState = NONE;\\n    /**\\n     * @listens TextTrack#loadeddata\\n     * @fires HTMLTrackElement#load\\n     */\\n\\n    track.addEventListener('loadeddata', function () {\\n      readyState = LOADED;\\n\\n      _this.trigger({\\n        type: 'load',\\n        target: _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)\\n      });\\n    });\\n    return _this;\\n  }\\n\\n  return HTMLTrackElement;\\n}(EventTarget);\\n\\nHTMLTrackElement.prototype.allowedEvents_ = {\\n  load: 'load'\\n};\\nHTMLTrackElement.NONE = NONE;\\nHTMLTrackElement.LOADING = LOADING;\\nHTMLTrackElement.LOADED = LOADED;\\nHTMLTrackElement.ERROR = ERROR;\\n\\n/*\\n * This file contains all track properties that are used in\\n * player.js, tech.js, html5.js and possibly other techs in the future.\\n */\\n\\nvar NORMAL = {\\n  audio: {\\n    ListClass: AudioTrackList,\\n    TrackClass: AudioTrack,\\n    capitalName: 'Audio'\\n  },\\n  video: {\\n    ListClass: VideoTrackList,\\n    TrackClass: VideoTrack,\\n    capitalName: 'Video'\\n  },\\n  text: {\\n    ListClass: TextTrackList,\\n    TrackClass: TextTrack,\\n    capitalName: 'Text'\\n  }\\n};\\nObject.keys(NORMAL).forEach(function (type) {\\n  NORMAL[type].getterName = type + \\\"Tracks\\\";\\n  NORMAL[type].privateName = type + \\\"Tracks_\\\";\\n});\\nvar REMOTE = {\\n  remoteText: {\\n    ListClass: TextTrackList,\\n    TrackClass: TextTrack,\\n    capitalName: 'RemoteText',\\n    getterName: 'remoteTextTracks',\\n    privateName: 'remoteTextTracks_'\\n  },\\n  remoteTextEl: {\\n    ListClass: HtmlTrackElementList,\\n    TrackClass: HTMLTrackElement,\\n    capitalName: 'RemoteTextTrackEls',\\n    getterName: 'remoteTextTrackEls',\\n    privateName: 'remoteTextTrackEls_'\\n  }\\n};\\n\\nvar ALL = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, NORMAL, REMOTE);\\n\\nREMOTE.names = Object.keys(REMOTE);\\nNORMAL.names = Object.keys(NORMAL);\\nALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\\n\\n/**\\n * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\\n * that just contains the src url alone.\\n * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\\n   * `var SourceString = 'http://example.com/some-video.mp4';`\\n *\\n * @typedef {Object|string} Tech~SourceObject\\n *\\n * @property {string} src\\n *           The url to the source\\n *\\n * @property {string} type\\n *           The mime type of the source\\n */\\n\\n/**\\n * A function used by {@link Tech} to create a new {@link TextTrack}.\\n *\\n * @private\\n *\\n * @param {Tech} self\\n *        An instance of the Tech class.\\n *\\n * @param {string} kind\\n *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\\n *\\n * @param {string} [label]\\n *        Label to identify the text track\\n *\\n * @param {string} [language]\\n *        Two letter language abbreviation\\n *\\n * @param {Object} [options={}]\\n *        An object with additional text track options\\n *\\n * @return {TextTrack}\\n *          The text track that was created.\\n */\\n\\nfunction createTrackHelper(self, kind, label, language, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  var tracks = self.textTracks();\\n  options.kind = kind;\\n\\n  if (label) {\\n    options.label = label;\\n  }\\n\\n  if (language) {\\n    options.language = language;\\n  }\\n\\n  options.tech = self;\\n  var track = new ALL.text.TrackClass(options);\\n  tracks.addTrack(track);\\n  return track;\\n}\\n/**\\n * This is the base class for media playback technology controllers, such as\\n * {@link Flash} and {@link HTML5}\\n *\\n * @extends Component\\n */\\n\\n\\nvar Tech = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Tech, _Component);\\n\\n  /**\\n  * Create an instance of this Tech.\\n  *\\n  * @param {Object} [options]\\n  *        The key/value store of player options.\\n  *\\n  * @param {Component~ReadyCallback} ready\\n  *        Callback function to call when the `HTML5` Tech is ready.\\n  */\\n  function Tech(options, ready) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (ready === void 0) {\\n      ready = function ready() {};\\n    }\\n\\n    // we don't want the tech to report user activity automatically.\\n    // This is done manually in addControlsListeners\\n    options.reportTouchActivity = false;\\n    _this = _Component.call(this, null, options, ready) || this; // keep track of whether the current source has played at all to\\n    // implement a very limited played()\\n\\n    _this.hasStarted_ = false;\\n\\n    _this.on('playing', function () {\\n      this.hasStarted_ = true;\\n    });\\n\\n    _this.on('loadstart', function () {\\n      this.hasStarted_ = false;\\n    });\\n\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n\\n      if (options && options[props.getterName]) {\\n        _this[props.privateName] = options[props.getterName];\\n      }\\n    }); // Manually track progress in cases where the browser/flash player doesn't report it.\\n\\n    if (!_this.featuresProgressEvents) {\\n      _this.manualProgressOn();\\n    } // Manually track timeupdates in cases where the browser/flash player doesn't report it.\\n\\n\\n    if (!_this.featuresTimeupdateEvents) {\\n      _this.manualTimeUpdatesOn();\\n    }\\n\\n    ['Text', 'Audio', 'Video'].forEach(function (track) {\\n      if (options[\\\"native\\\" + track + \\\"Tracks\\\"] === false) {\\n        _this[\\\"featuresNative\\\" + track + \\\"Tracks\\\"] = false;\\n      }\\n    });\\n\\n    if (options.nativeCaptions === false || options.nativeTextTracks === false) {\\n      _this.featuresNativeTextTracks = false;\\n    } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\\n      _this.featuresNativeTextTracks = true;\\n    }\\n\\n    if (!_this.featuresNativeTextTracks) {\\n      _this.emulateTextTracks();\\n    }\\n\\n    _this.preloadTextTracks = options.preloadTextTracks !== false;\\n    _this.autoRemoteTextTracks_ = new ALL.text.ListClass();\\n\\n    _this.initTrackListeners(); // Turn on component tap events only if not using native controls\\n\\n\\n    if (!options.nativeControlsForTouch) {\\n      _this.emitTapEvents();\\n    }\\n\\n    if (_this.constructor) {\\n      _this.name_ = _this.constructor.name || 'Unknown Tech';\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * A special function to trigger source set in a way that will allow player\\n   * to re-trigger if the player or tech are not ready yet.\\n   *\\n   * @fires Tech#sourceset\\n   * @param {string} src The source string at the time of the source changing.\\n   */\\n\\n\\n  var _proto = Tech.prototype;\\n\\n  _proto.triggerSourceset = function triggerSourceset(src) {\\n    var _this2 = this;\\n\\n    if (!this.isReady_) {\\n      // on initial ready we have to trigger source set\\n      // 1ms after ready so that player can watch for it.\\n      this.one('ready', function () {\\n        return _this2.setTimeout(function () {\\n          return _this2.triggerSourceset(src);\\n        }, 1);\\n      });\\n    }\\n    /**\\n     * Fired when the source is set on the tech causing the media element\\n     * to reload.\\n     *\\n     * @see {@link Player#event:sourceset}\\n     * @event Tech#sourceset\\n     * @type {EventTarget~Event}\\n     */\\n\\n\\n    this.trigger({\\n      src: src,\\n      type: 'sourceset'\\n    });\\n  }\\n  /* Fallbacks for unsupported event types\\n  ================================================================================ */\\n\\n  /**\\n   * Polyfill the `progress` event for browsers that don't support it natively.\\n   *\\n   * @see {@link Tech#trackProgress}\\n   */\\n  ;\\n\\n  _proto.manualProgressOn = function manualProgressOn() {\\n    this.on('durationchange', this.onDurationChange);\\n    this.manualProgress = true; // Trigger progress watching when a source begins loading\\n\\n    this.one('ready', this.trackProgress);\\n  }\\n  /**\\n   * Turn off the polyfill for `progress` events that was created in\\n   * {@link Tech#manualProgressOn}\\n   */\\n  ;\\n\\n  _proto.manualProgressOff = function manualProgressOff() {\\n    this.manualProgress = false;\\n    this.stopTrackingProgress();\\n    this.off('durationchange', this.onDurationChange);\\n  }\\n  /**\\n   * This is used to trigger a `progress` event when the buffered percent changes. It\\n   * sets an interval function that will be called every 500 milliseconds to check if the\\n   * buffer end percent has changed.\\n   *\\n   * > This function is called by {@link Tech#manualProgressOn}\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `ready` event that caused this to run.\\n   *\\n   * @listens Tech#ready\\n   * @fires Tech#progress\\n   */\\n  ;\\n\\n  _proto.trackProgress = function trackProgress(event) {\\n    this.stopTrackingProgress();\\n    this.progressInterval = this.setInterval(bind(this, function () {\\n      // Don't trigger unless buffered amount is greater than last time\\n      var numBufferedPercent = this.bufferedPercent();\\n\\n      if (this.bufferedPercent_ !== numBufferedPercent) {\\n        /**\\n         * See {@link Player#progress}\\n         *\\n         * @event Tech#progress\\n         * @type {EventTarget~Event}\\n         */\\n        this.trigger('progress');\\n      }\\n\\n      this.bufferedPercent_ = numBufferedPercent;\\n\\n      if (numBufferedPercent === 1) {\\n        this.stopTrackingProgress();\\n      }\\n    }), 500);\\n  }\\n  /**\\n   * Update our internal duration on a `durationchange` event by calling\\n   * {@link Tech#duration}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `durationchange` event that caused this to run.\\n   *\\n   * @listens Tech#durationchange\\n   */\\n  ;\\n\\n  _proto.onDurationChange = function onDurationChange(event) {\\n    this.duration_ = this.duration();\\n  }\\n  /**\\n   * Get and create a `TimeRange` object for buffering.\\n   *\\n   * @return {TimeRange}\\n   *         The time range object that was created.\\n   */\\n  ;\\n\\n  _proto.buffered = function buffered() {\\n    return createTimeRanges(0, 0);\\n  }\\n  /**\\n   * Get the percentage of the current video that is currently buffered.\\n   *\\n   * @return {number}\\n   *         A number from 0 to 1 that represents the decimal percentage of the\\n   *         video that is buffered.\\n   *\\n   */\\n  ;\\n\\n  _proto.bufferedPercent = function bufferedPercent$1() {\\n    return bufferedPercent(this.buffered(), this.duration_);\\n  }\\n  /**\\n   * Turn off the polyfill for `progress` events that was created in\\n   * {@link Tech#manualProgressOn}\\n   * Stop manually tracking progress events by clearing the interval that was set in\\n   * {@link Tech#trackProgress}.\\n   */\\n  ;\\n\\n  _proto.stopTrackingProgress = function stopTrackingProgress() {\\n    this.clearInterval(this.progressInterval);\\n  }\\n  /**\\n   * Polyfill the `timeupdate` event for browsers that don't support it.\\n   *\\n   * @see {@link Tech#trackCurrentTime}\\n   */\\n  ;\\n\\n  _proto.manualTimeUpdatesOn = function manualTimeUpdatesOn() {\\n    this.manualTimeUpdates = true;\\n    this.on('play', this.trackCurrentTime);\\n    this.on('pause', this.stopTrackingCurrentTime);\\n  }\\n  /**\\n   * Turn off the polyfill for `timeupdate` events that was created in\\n   * {@link Tech#manualTimeUpdatesOn}\\n   */\\n  ;\\n\\n  _proto.manualTimeUpdatesOff = function manualTimeUpdatesOff() {\\n    this.manualTimeUpdates = false;\\n    this.stopTrackingCurrentTime();\\n    this.off('play', this.trackCurrentTime);\\n    this.off('pause', this.stopTrackingCurrentTime);\\n  }\\n  /**\\n   * Sets up an interval function to track current time and trigger `timeupdate` every\\n   * 250 milliseconds.\\n   *\\n   * @listens Tech#play\\n   * @triggers Tech#timeupdate\\n   */\\n  ;\\n\\n  _proto.trackCurrentTime = function trackCurrentTime() {\\n    if (this.currentTimeInterval) {\\n      this.stopTrackingCurrentTime();\\n    }\\n\\n    this.currentTimeInterval = this.setInterval(function () {\\n      /**\\n       * Triggered at an interval of 250ms to indicated that time is passing in the video.\\n       *\\n       * @event Tech#timeupdate\\n       * @type {EventTarget~Event}\\n       */\\n      this.trigger({\\n        type: 'timeupdate',\\n        target: this,\\n        manuallyTriggered: true\\n      }); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\\n    }, 250);\\n  }\\n  /**\\n   * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\\n   * `timeupdate` event is no longer triggered.\\n   *\\n   * @listens {Tech#pause}\\n   */\\n  ;\\n\\n  _proto.stopTrackingCurrentTime = function stopTrackingCurrentTime() {\\n    this.clearInterval(this.currentTimeInterval); // #1002 - if the video ends right before the next timeupdate would happen,\\n    // the progress bar won't make it all the way to the end\\n\\n    this.trigger({\\n      type: 'timeupdate',\\n      target: this,\\n      manuallyTriggered: true\\n    });\\n  }\\n  /**\\n   * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\\n   * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\\n   *\\n   * @fires Component#dispose\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    // clear out all tracks because we can't reuse them between techs\\n    this.clearTracks(NORMAL.names); // Turn off any manual progress or timeupdate tracking\\n\\n    if (this.manualProgress) {\\n      this.manualProgressOff();\\n    }\\n\\n    if (this.manualTimeUpdates) {\\n      this.manualTimeUpdatesOff();\\n    }\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Clear out a single `TrackList` or an array of `TrackLists` given their names.\\n   *\\n   * > Note: Techs without source handlers should call this between sources for `video`\\n   *         & `audio` tracks. You don't want to use them between tracks!\\n   *\\n   * @param {string[]|string} types\\n   *        TrackList names to clear, valid names are `video`, `audio`, and\\n   *        `text`.\\n   */\\n  ;\\n\\n  _proto.clearTracks = function clearTracks(types) {\\n    var _this3 = this;\\n\\n    types = [].concat(types); // clear out all tracks because we can't reuse them between techs\\n\\n    types.forEach(function (type) {\\n      var list = _this3[type + \\\"Tracks\\\"]() || [];\\n      var i = list.length;\\n\\n      while (i--) {\\n        var track = list[i];\\n\\n        if (type === 'text') {\\n          _this3.removeRemoteTextTrack(track);\\n        }\\n\\n        list.removeTrack(track);\\n      }\\n    });\\n  }\\n  /**\\n   * Remove any TextTracks added via addRemoteTextTrack that are\\n   * flagged for automatic garbage collection\\n   */\\n  ;\\n\\n  _proto.cleanupAutoTextTracks = function cleanupAutoTextTracks() {\\n    var list = this.autoRemoteTextTracks_ || [];\\n    var i = list.length;\\n\\n    while (i--) {\\n      var track = list[i];\\n      this.removeRemoteTextTrack(track);\\n    }\\n  }\\n  /**\\n   * Reset the tech, which will removes all sources and reset the internal readyState.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.reset = function reset() {}\\n  /**\\n   * Get or set an error on the Tech.\\n   *\\n   * @param {MediaError} [err]\\n   *        Error to set on the Tech\\n   *\\n   * @return {MediaError|null}\\n   *         The current error object on the tech, or null if there isn't one.\\n   */\\n  ;\\n\\n  _proto.error = function error(err) {\\n    if (err !== undefined) {\\n      this.error_ = new MediaError(err);\\n      this.trigger('error');\\n    }\\n\\n    return this.error_;\\n  }\\n  /**\\n   * Returns the `TimeRange`s that have been played through for the current source.\\n   *\\n   * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\\n   *         It only checks whether the source has played at all or not.\\n   *\\n   * @return {TimeRange}\\n   *         - A single time range if this video has played\\n   *         - An empty set of ranges if not.\\n   */\\n  ;\\n\\n  _proto.played = function played() {\\n    if (this.hasStarted_) {\\n      return createTimeRanges(0, 0);\\n    }\\n\\n    return createTimeRanges();\\n  }\\n  /**\\n   * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\\n   * previously called.\\n   *\\n   * @fires Tech#timeupdate\\n   */\\n  ;\\n\\n  _proto.setCurrentTime = function setCurrentTime() {\\n    // improve the accuracy of manual timeupdates\\n    if (this.manualTimeUpdates) {\\n      /**\\n       * A manual `timeupdate` event.\\n       *\\n       * @event Tech#timeupdate\\n       * @type {EventTarget~Event}\\n       */\\n      this.trigger({\\n        type: 'timeupdate',\\n        target: this,\\n        manuallyTriggered: true\\n      });\\n    }\\n  }\\n  /**\\n   * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\\n   * {@link TextTrackList} events.\\n   *\\n   * This adds {@link EventTarget~EventListeners} for `addtrack`, and  `removetrack`.\\n   *\\n   * @fires Tech#audiotrackchange\\n   * @fires Tech#videotrackchange\\n   * @fires Tech#texttrackchange\\n   */\\n  ;\\n\\n  _proto.initTrackListeners = function initTrackListeners() {\\n    var _this4 = this;\\n\\n    /**\\n      * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\\n      *\\n      * @event Tech#audiotrackchange\\n      * @type {EventTarget~Event}\\n      */\\n\\n    /**\\n      * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\\n      *\\n      * @event Tech#videotrackchange\\n      * @type {EventTarget~Event}\\n      */\\n\\n    /**\\n      * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\\n      *\\n      * @event Tech#texttrackchange\\n      * @type {EventTarget~Event}\\n      */\\n    NORMAL.names.forEach(function (name) {\\n      var props = NORMAL[name];\\n\\n      var trackListChanges = function trackListChanges() {\\n        _this4.trigger(name + \\\"trackchange\\\");\\n      };\\n\\n      var tracks = _this4[props.getterName]();\\n\\n      tracks.addEventListener('removetrack', trackListChanges);\\n      tracks.addEventListener('addtrack', trackListChanges);\\n\\n      _this4.on('dispose', function () {\\n        tracks.removeEventListener('removetrack', trackListChanges);\\n        tracks.removeEventListener('addtrack', trackListChanges);\\n      });\\n    });\\n  }\\n  /**\\n   * Emulate TextTracks using vtt.js if necessary\\n   *\\n   * @fires Tech#vttjsloaded\\n   * @fires Tech#vttjserror\\n   */\\n  ;\\n\\n  _proto.addWebVttScript_ = function addWebVttScript_() {\\n    var _this5 = this;\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT) {\\n      return;\\n    } // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\\n    // signals that the Tech is ready at which point Tech.el_ is part of the DOM\\n    // before inserting the WebVTT script\\n\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.contains(this.el())) {\\n      // load via require if available and vtt.js script location was not passed in\\n      // as an option. novtt builds will turn the above require call into an empty object\\n      // which will cause this if check to always fail.\\n      if (!this.options_['vtt.js'] && isPlain(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10___default.a) && Object.keys(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10___default.a).length > 0) {\\n        this.trigger('vttjsloaded');\\n        return;\\n      } // load vtt.js via the script location option or the cdn of no location was\\n      // passed in\\n\\n\\n      var script = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('script');\\n      script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\\n\\n      script.onload = function () {\\n        /**\\n         * Fired when vtt.js is loaded.\\n         *\\n         * @event Tech#vttjsloaded\\n         * @type {EventTarget~Event}\\n         */\\n        _this5.trigger('vttjsloaded');\\n      };\\n\\n      script.onerror = function () {\\n        /**\\n         * Fired when vtt.js was not loaded due to an error\\n         *\\n         * @event Tech#vttjsloaded\\n         * @type {EventTarget~Event}\\n         */\\n        _this5.trigger('vttjserror');\\n      };\\n\\n      this.on('dispose', function () {\\n        script.onload = null;\\n        script.onerror = null;\\n      }); // but have not loaded yet and we set it to true before the inject so that\\n      // we don't overwrite the injected window.WebVTT if it loads right away\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT = true;\\n      this.el().parentNode.appendChild(script);\\n    } else {\\n      this.ready(this.addWebVttScript_);\\n    }\\n  }\\n  /**\\n   * Emulate texttracks\\n   *\\n   */\\n  ;\\n\\n  _proto.emulateTextTracks = function emulateTextTracks() {\\n    var _this6 = this;\\n\\n    var tracks = this.textTracks();\\n    var remoteTracks = this.remoteTextTracks();\\n\\n    var handleAddTrack = function handleAddTrack(e) {\\n      return tracks.addTrack(e.track);\\n    };\\n\\n    var handleRemoveTrack = function handleRemoveTrack(e) {\\n      return tracks.removeTrack(e.track);\\n    };\\n\\n    remoteTracks.on('addtrack', handleAddTrack);\\n    remoteTracks.on('removetrack', handleRemoveTrack);\\n    this.addWebVttScript_();\\n\\n    var updateDisplay = function updateDisplay() {\\n      return _this6.trigger('texttrackchange');\\n    };\\n\\n    var textTracksChanges = function textTracksChanges() {\\n      updateDisplay();\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        var track = tracks[i];\\n        track.removeEventListener('cuechange', updateDisplay);\\n\\n        if (track.mode === 'showing') {\\n          track.addEventListener('cuechange', updateDisplay);\\n        }\\n      }\\n    };\\n\\n    textTracksChanges();\\n    tracks.addEventListener('change', textTracksChanges);\\n    tracks.addEventListener('addtrack', textTracksChanges);\\n    tracks.addEventListener('removetrack', textTracksChanges);\\n    this.on('dispose', function () {\\n      remoteTracks.off('addtrack', handleAddTrack);\\n      remoteTracks.off('removetrack', handleRemoveTrack);\\n      tracks.removeEventListener('change', textTracksChanges);\\n      tracks.removeEventListener('addtrack', textTracksChanges);\\n      tracks.removeEventListener('removetrack', textTracksChanges);\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        var track = tracks[i];\\n        track.removeEventListener('cuechange', updateDisplay);\\n      }\\n    });\\n  }\\n  /**\\n   * Create and returns a remote {@link TextTrack} object.\\n   *\\n   * @param {string} kind\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\\n   *\\n   * @param {string} [label]\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [language]\\n   *        Two letter language abbreviation\\n   *\\n   * @return {TextTrack}\\n   *         The TextTrack that gets created.\\n   */\\n  ;\\n\\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\\n    if (!kind) {\\n      throw new Error('TextTrack kind is required but was not provided');\\n    }\\n\\n    return createTrackHelper(this, kind, label, language);\\n  }\\n  /**\\n   * Create an emulated TextTrack for use by addRemoteTextTrack\\n   *\\n   * This is intended to be overridden by classes that inherit from\\n   * Tech in order to create native or custom TextTracks.\\n   *\\n   * @param {Object} options\\n   *        The object should contain the options to initialize the TextTrack with.\\n   *\\n   * @param {string} [options.kind]\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\\n   *\\n   * @param {string} [options.label].\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [options.language]\\n   *        Two letter language abbreviation.\\n   *\\n   * @return {HTMLTrackElement}\\n   *         The track element that gets created.\\n   */\\n  ;\\n\\n  _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\\n    var track = mergeOptions(options, {\\n      tech: this\\n    });\\n    return new REMOTE.remoteTextEl.TrackClass(track);\\n  }\\n  /**\\n   * Creates a remote text track object and returns an html track element.\\n   *\\n   * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\\n   *\\n   * @param {Object} options\\n   *        See {@link Tech#createRemoteTextTrack} for more detailed properties.\\n   *\\n   * @param {boolean} [manualCleanup=true]\\n   *        - When false: the TextTrack will be automatically removed from the video\\n   *          element whenever the source changes\\n   *        - When True: The TextTrack will have to be cleaned up manually\\n   *\\n   * @return {HTMLTrackElement}\\n   *         An Html Track Element.\\n   *\\n   * @deprecated The default functionality for this function will be equivalent\\n   *             to \\\"manualCleanup=false\\\" in the future. The manualCleanup parameter will\\n   *             also be removed.\\n   */\\n  ;\\n\\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\\n    var _this7 = this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var htmlTrackElement = this.createRemoteTextTrack(options);\\n\\n    if (manualCleanup !== true && manualCleanup !== false) {\\n      // deprecation warning\\n      log.warn('Calling addRemoteTextTrack without explicitly setting the \\\"manualCleanup\\\" parameter to `true` is deprecated and default to `false` in future version of video.js');\\n      manualCleanup = true;\\n    } // store HTMLTrackElement and TextTrack to remote list\\n\\n\\n    this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\\n    this.remoteTextTracks().addTrack(htmlTrackElement.track);\\n\\n    if (manualCleanup !== true) {\\n      // create the TextTrackList if it doesn't exist\\n      this.ready(function () {\\n        return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track);\\n      });\\n    }\\n\\n    return htmlTrackElement;\\n  }\\n  /**\\n   * Remove a remote text track from the remote `TextTrackList`.\\n   *\\n   * @param {TextTrack} track\\n   *        `TextTrack` to remove from the `TextTrackList`\\n   */\\n  ;\\n\\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\\n    var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); // remove HTMLTrackElement and TextTrack from remote list\\n\\n    this.remoteTextTrackEls().removeTrackElement_(trackElement);\\n    this.remoteTextTracks().removeTrack(track);\\n    this.autoRemoteTextTracks_.removeTrack(track);\\n  }\\n  /**\\n   * Gets available media playback quality metrics as specified by the W3C's Media\\n   * Playback Quality API.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\\n   *\\n   * @return {Object}\\n   *         An object with supported media playback quality metrics\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\\n    return {};\\n  }\\n  /**\\n   * Attempt to create a floating video window always on top of other windows\\n   * so that users may continue consuming media while they interact with other\\n   * content sites, or applications on their device.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @return {Promise|undefined}\\n   *         A promise with a Picture-in-Picture window if the browser supports\\n   *         Promises (or one was passed in as an option). It returns undefined\\n   *         otherwise.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      return PromiseClass.reject();\\n    }\\n  }\\n  /**\\n   * A method to set a poster from a `Tech`.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.setPoster = function setPoster() {}\\n  /**\\n   * A method to check for the presence of the 'playsinline' <video> attribute.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.playsinline = function playsinline() {}\\n  /**\\n   * A method to set or unset the 'playsinline' <video> attribute.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.setPlaysinline = function setPlaysinline() {}\\n  /**\\n   * Attempt to force override of native audio tracks.\\n   *\\n   * @param {boolean} override - If set to true native audio will be overridden,\\n   * otherwise native audio will potentially be used.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks() {}\\n  /**\\n   * Attempt to force override of native video tracks.\\n   *\\n   * @param {boolean} override - If set to true native video will be overridden,\\n   * otherwise native video will potentially be used.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks() {}\\n  /*\\n   * Check if the tech can support the given mime-type.\\n   *\\n   * The base tech does not support any type, but source handlers might\\n   * overwrite this.\\n   *\\n   * @param  {string} type\\n   *         The mimetype to check for support\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or empty string\\n   *\\n   * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.canPlayType = function canPlayType() {\\n    return '';\\n  }\\n  /**\\n   * Check if the type is supported by this tech.\\n   *\\n   * The base tech does not support any type, but source handlers might\\n   * overwrite this.\\n   *\\n   * @param {string} type\\n   *        The media type to check\\n   * @return {string} Returns the native video element's response\\n   */\\n  ;\\n\\n  Tech.canPlayType = function canPlayType() {\\n    return '';\\n  }\\n  /**\\n   * Check if the tech can support the given source\\n   *\\n   * @param {Object} srcObj\\n   *        The source object\\n   * @param {Object} options\\n   *        The options passed to the tech\\n   * @return {string} 'probably', 'maybe', or '' (empty string)\\n   */\\n  ;\\n\\n  Tech.canPlaySource = function canPlaySource(srcObj, options) {\\n    return Tech.canPlayType(srcObj.type);\\n  }\\n  /*\\n   * Return whether the argument is a Tech or not.\\n   * Can be passed either a Class like `Html5` or a instance like `player.tech_`\\n   *\\n   * @param {Object} component\\n   *        The item to check\\n   *\\n   * @return {boolean}\\n   *         Whether it is a tech or not\\n   *         - True if it is a tech\\n   *         - False if it is not\\n   */\\n  ;\\n\\n  Tech.isTech = function isTech(component) {\\n    return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\\n  }\\n  /**\\n   * Registers a `Tech` into a shared list for videojs.\\n   *\\n   * @param {string} name\\n   *        Name of the `Tech` to register.\\n   *\\n   * @param {Object} tech\\n   *        The `Tech` class to register.\\n   */\\n  ;\\n\\n  Tech.registerTech = function registerTech(name, tech) {\\n    if (!Tech.techs_) {\\n      Tech.techs_ = {};\\n    }\\n\\n    if (!Tech.isTech(tech)) {\\n      throw new Error(\\\"Tech \\\" + name + \\\" must be a Tech\\\");\\n    }\\n\\n    if (!Tech.canPlayType) {\\n      throw new Error('Techs must have a static canPlayType method on them');\\n    }\\n\\n    if (!Tech.canPlaySource) {\\n      throw new Error('Techs must have a static canPlaySource method on them');\\n    }\\n\\n    name = toTitleCase(name);\\n    Tech.techs_[name] = tech;\\n    Tech.techs_[toLowerCase(name)] = tech;\\n\\n    if (name !== 'Tech') {\\n      // camel case the techName for use in techOrder\\n      Tech.defaultTechOrder_.push(name);\\n    }\\n\\n    return tech;\\n  }\\n  /**\\n   * Get a `Tech` from the shared list by name.\\n   *\\n   * @param {string} name\\n   *        `camelCase` or `TitleCase` name of the Tech to get\\n   *\\n   * @return {Tech|undefined}\\n   *         The `Tech` or undefined if there was no tech with the name requested.\\n   */\\n  ;\\n\\n  Tech.getTech = function getTech(name) {\\n    if (!name) {\\n      return;\\n    }\\n\\n    if (Tech.techs_ && Tech.techs_[name]) {\\n      return Tech.techs_[name];\\n    }\\n\\n    name = toTitleCase(name);\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs[name]) {\\n      log.warn(\\\"The \\\" + name + \\\" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)\\\");\\n      return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs[name];\\n    }\\n  };\\n\\n  return Tech;\\n}(Component);\\n/**\\n * Get the {@link VideoTrackList}\\n *\\n * @returns {VideoTrackList}\\n * @method Tech.prototype.videoTracks\\n */\\n\\n/**\\n * Get the {@link AudioTrackList}\\n *\\n * @returns {AudioTrackList}\\n * @method Tech.prototype.audioTracks\\n */\\n\\n/**\\n * Get the {@link TextTrackList}\\n *\\n * @returns {TextTrackList}\\n * @method Tech.prototype.textTracks\\n */\\n\\n/**\\n * Get the remote element {@link TextTrackList}\\n *\\n * @returns {TextTrackList}\\n * @method Tech.prototype.remoteTextTracks\\n */\\n\\n/**\\n * Get the remote element {@link HtmlTrackElementList}\\n *\\n * @returns {HtmlTrackElementList}\\n * @method Tech.prototype.remoteTextTrackEls\\n */\\n\\n\\nALL.names.forEach(function (name) {\\n  var props = ALL[name];\\n\\n  Tech.prototype[props.getterName] = function () {\\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\\n    return this[props.privateName];\\n  };\\n});\\n/**\\n * List of associated text tracks\\n *\\n * @type {TextTrackList}\\n * @private\\n * @property Tech#textTracks_\\n */\\n\\n/**\\n * List of associated audio tracks.\\n *\\n * @type {AudioTrackList}\\n * @private\\n * @property Tech#audioTracks_\\n */\\n\\n/**\\n * List of associated video tracks.\\n *\\n * @type {VideoTrackList}\\n * @private\\n * @property Tech#videoTracks_\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports volume control.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresVolumeControl = true;\\n/**\\n * Boolean indicating whether the `Tech` supports muting volume.\\n *\\n * @type {bolean}\\n * @default\\n */\\n\\nTech.prototype.featuresMuteControl = true;\\n/**\\n * Boolean indicating whether the `Tech` supports fullscreen resize control.\\n * Resizing plugins using request fullscreen reloads the plugin\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresFullscreenResize = false;\\n/**\\n * Boolean indicating whether the `Tech` supports changing the speed at which the video\\n * plays. Examples:\\n *   - Set player to play 2x (twice) as fast\\n *   - Set player to play 0.5x (half) as fast\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresPlaybackRate = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the `progress` event. This is currently\\n * not triggered by video-js-swf. This will be used to determine if\\n * {@link Tech#manualProgressOn} should be called.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresProgressEvents = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\\n *\\n * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\\n * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\\n * a new source.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresSourceset = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the `timeupdate` event. This is currently\\n * not triggered by video-js-swf. This will be used to determine if\\n * {@link Tech#manualTimeUpdates} should be called.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresTimeupdateEvents = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\\n * This will help us integrate with native `TextTrack`s if the browser supports them.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresNativeTextTracks = false;\\n/**\\n * A functional mixin for techs that want to use the Source Handler pattern.\\n * Source handlers are scripts for handling specific formats.\\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\\n * Example: `Tech.withSourceHandlers.call(MyTech);`\\n *\\n * @param {Tech} _Tech\\n *        The tech to add source handler functions to.\\n *\\n * @mixes Tech~SourceHandlerAdditions\\n */\\n\\nTech.withSourceHandlers = function (_Tech) {\\n  /**\\n   * Register a source handler\\n   *\\n   * @param {Function} handler\\n   *        The source handler class\\n   *\\n   * @param {number} [index]\\n   *        Register it at the following index\\n   */\\n  _Tech.registerSourceHandler = function (handler, index) {\\n    var handlers = _Tech.sourceHandlers;\\n\\n    if (!handlers) {\\n      handlers = _Tech.sourceHandlers = [];\\n    }\\n\\n    if (index === undefined) {\\n      // add to the end of the list\\n      index = handlers.length;\\n    }\\n\\n    handlers.splice(index, 0, handler);\\n  };\\n  /**\\n   * Check if the tech can support the given type. Also checks the\\n   * Techs sourceHandlers.\\n   *\\n   * @param {string} type\\n   *         The mimetype to check.\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or '' (empty string)\\n   */\\n\\n\\n  _Tech.canPlayType = function (type) {\\n    var handlers = _Tech.sourceHandlers || [];\\n    var can;\\n\\n    for (var i = 0; i < handlers.length; i++) {\\n      can = handlers[i].canPlayType(type);\\n\\n      if (can) {\\n        return can;\\n      }\\n    }\\n\\n    return '';\\n  };\\n  /**\\n   * Returns the first source handler that supports the source.\\n   *\\n   * TODO: Answer question: should 'probably' be prioritized over 'maybe'\\n   *\\n   * @param {Tech~SourceObject} source\\n   *        The source object\\n   *\\n   * @param {Object} options\\n   *        The options passed to the tech\\n   *\\n   * @return {SourceHandler|null}\\n   *          The first source handler that supports the source or null if\\n   *          no SourceHandler supports the source\\n   */\\n\\n\\n  _Tech.selectSourceHandler = function (source, options) {\\n    var handlers = _Tech.sourceHandlers || [];\\n    var can;\\n\\n    for (var i = 0; i < handlers.length; i++) {\\n      can = handlers[i].canHandleSource(source, options);\\n\\n      if (can) {\\n        return handlers[i];\\n      }\\n    }\\n\\n    return null;\\n  };\\n  /**\\n   * Check if the tech can support the given source.\\n   *\\n   * @param {Tech~SourceObject} srcObj\\n   *        The source object\\n   *\\n   * @param {Object} options\\n   *        The options passed to the tech\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or '' (empty string)\\n   */\\n\\n\\n  _Tech.canPlaySource = function (srcObj, options) {\\n    var sh = _Tech.selectSourceHandler(srcObj, options);\\n\\n    if (sh) {\\n      return sh.canHandleSource(srcObj, options);\\n    }\\n\\n    return '';\\n  };\\n  /**\\n   * When using a source handler, prefer its implementation of\\n   * any function normally provided by the tech.\\n   */\\n\\n\\n  var deferrable = ['seekable', 'seeking', 'duration'];\\n  /**\\n   * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\\n   * function if it exists, with a fallback to the Techs seekable function.\\n   *\\n   * @method _Tech.seekable\\n   */\\n\\n  /**\\n   * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\\n   * function if it exists, otherwise it will fallback to the techs duration function.\\n   *\\n   * @method _Tech.duration\\n   */\\n\\n  deferrable.forEach(function (fnName) {\\n    var originalFn = this[fnName];\\n\\n    if (typeof originalFn !== 'function') {\\n      return;\\n    }\\n\\n    this[fnName] = function () {\\n      if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\\n        return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\\n      }\\n\\n      return originalFn.apply(this, arguments);\\n    };\\n  }, _Tech.prototype);\\n  /**\\n   * Create a function for setting the source using a source object\\n   * and source handlers.\\n   * Should never be called unless a source handler was found.\\n   *\\n   * @param {Tech~SourceObject} source\\n   *        A source object with src and type keys\\n   */\\n\\n  _Tech.prototype.setSource = function (source) {\\n    var sh = _Tech.selectSourceHandler(source, this.options_);\\n\\n    if (!sh) {\\n      // Fall back to a native source hander when unsupported sources are\\n      // deliberately set\\n      if (_Tech.nativeSourceHandler) {\\n        sh = _Tech.nativeSourceHandler;\\n      } else {\\n        log.error('No source handler found for the current source.');\\n      }\\n    } // Dispose any existing source handler\\n\\n\\n    this.disposeSourceHandler();\\n    this.off('dispose', this.disposeSourceHandler);\\n\\n    if (sh !== _Tech.nativeSourceHandler) {\\n      this.currentSource_ = source;\\n    }\\n\\n    this.sourceHandler_ = sh.handleSource(source, this, this.options_);\\n    this.one('dispose', this.disposeSourceHandler);\\n  };\\n  /**\\n   * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\\n   *\\n   * @listens Tech#dispose\\n   */\\n\\n\\n  _Tech.prototype.disposeSourceHandler = function () {\\n    // if we have a source and get another one\\n    // then we are loading something new\\n    // than clear all of our current tracks\\n    if (this.currentSource_) {\\n      this.clearTracks(['audio', 'video']);\\n      this.currentSource_ = null;\\n    } // always clean up auto-text tracks\\n\\n\\n    this.cleanupAutoTextTracks();\\n\\n    if (this.sourceHandler_) {\\n      if (this.sourceHandler_.dispose) {\\n        this.sourceHandler_.dispose();\\n      }\\n\\n      this.sourceHandler_ = null;\\n    }\\n  };\\n}; // The base Tech class needs to be registered as a Component. It is the only\\n// Tech that can be registered as a Component.\\n\\n\\nComponent.registerComponent('Tech', Tech);\\nTech.registerTech('Tech', Tech);\\n/**\\n * A list of techs that should be added to techOrder on Players\\n *\\n * @private\\n */\\n\\nTech.defaultTechOrder_ = [];\\n\\n/**\\n * @file middleware.js\\n * @module middleware\\n */\\nvar middlewares = {};\\nvar middlewareInstances = {};\\nvar TERMINATOR = {};\\n/**\\n * A middleware object is a plain JavaScript object that has methods that\\n * match the {@link Tech} methods found in the lists of allowed\\n * {@link module:middleware.allowedGetters|getters},\\n * {@link module:middleware.allowedSetters|setters}, and\\n * {@link module:middleware.allowedMediators|mediators}.\\n *\\n * @typedef {Object} MiddlewareObject\\n */\\n\\n/**\\n * A middleware factory function that should return a\\n * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\\n *\\n * This factory will be called for each player when needed, with the player\\n * passed in as an argument.\\n *\\n * @callback MiddlewareFactory\\n * @param {Player} player\\n *        A Video.js player.\\n */\\n\\n/**\\n * Define a middleware that the player should use by way of a factory function\\n * that returns a middleware object.\\n *\\n * @param  {string} type\\n *         The MIME type to match or `\\\"*\\\"` for all MIME types.\\n *\\n * @param  {MiddlewareFactory} middleware\\n *         A middleware factory function that will be executed for\\n *         matching types.\\n */\\n\\nfunction use(type, middleware) {\\n  middlewares[type] = middlewares[type] || [];\\n  middlewares[type].push(middleware);\\n}\\n/**\\n * Asynchronously sets a source using middleware by recursing through any\\n * matching middlewares and calling `setSource` on each, passing along the\\n * previous returned value each time.\\n *\\n * @param  {Player} player\\n *         A {@link Player} instance.\\n *\\n * @param  {Tech~SourceObject} src\\n *         A source object.\\n *\\n * @param  {Function}\\n *         The next middleware to run.\\n */\\n\\nfunction setSource(player, src, next) {\\n  player.setTimeout(function () {\\n    return setSourceHelper(src, middlewares[src.type], next, player);\\n  }, 1);\\n}\\n/**\\n * When the tech is set, passes the tech to each middleware's `setTech` method.\\n *\\n * @param {Object[]} middleware\\n *        An array of middleware instances.\\n *\\n * @param {Tech} tech\\n *        A Video.js tech.\\n */\\n\\nfunction setTech(middleware, tech) {\\n  middleware.forEach(function (mw) {\\n    return mw.setTech && mw.setTech(tech);\\n  });\\n}\\n/**\\n * Calls a getter on the tech first, through each middleware\\n * from right to left to the player.\\n *\\n * @param  {Object[]} middleware\\n *         An array of middleware instances.\\n *\\n * @param  {Tech} tech\\n *         The current tech.\\n *\\n * @param  {string} method\\n *         A method name.\\n *\\n * @return {Mixed}\\n *         The final value from the tech after middleware has intercepted it.\\n */\\n\\nfunction get(middleware, tech, method) {\\n  return middleware.reduceRight(middlewareIterator(method), tech[method]());\\n}\\n/**\\n * Takes the argument given to the player and calls the setter method on each\\n * middleware from left to right to the tech.\\n *\\n * @param  {Object[]} middleware\\n *         An array of middleware instances.\\n *\\n * @param  {Tech} tech\\n *         The current tech.\\n *\\n * @param  {string} method\\n *         A method name.\\n *\\n * @param  {Mixed} arg\\n *         The value to set on the tech.\\n *\\n * @return {Mixed}\\n *         The return value of the `method` of the `tech`.\\n */\\n\\nfunction set(middleware, tech, method, arg) {\\n  return tech[method](middleware.reduce(middlewareIterator(method), arg));\\n}\\n/**\\n * Takes the argument given to the player and calls the `call` version of the\\n * method on each middleware from left to right.\\n *\\n * Then, call the passed in method on the tech and return the result unchanged\\n * back to the player, through middleware, this time from right to left.\\n *\\n * @param  {Object[]} middleware\\n *         An array of middleware instances.\\n *\\n * @param  {Tech} tech\\n *         The current tech.\\n *\\n * @param  {string} method\\n *         A method name.\\n *\\n * @param  {Mixed} arg\\n *         The value to set on the tech.\\n *\\n * @return {Mixed}\\n *         The return value of the `method` of the `tech`, regardless of the\\n *         return values of middlewares.\\n */\\n\\nfunction mediate(middleware, tech, method, arg) {\\n  if (arg === void 0) {\\n    arg = null;\\n  }\\n\\n  var callMethod = 'call' + toTitleCase(method);\\n  var middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\\n  var terminated = middlewareValue === TERMINATOR; // deprecated. The `null` return value should instead return TERMINATOR to\\n  // prevent confusion if a techs method actually returns null.\\n\\n  var returnValue = terminated ? null : tech[method](middlewareValue);\\n  executeRight(middleware, method, returnValue, terminated);\\n  return returnValue;\\n}\\n/**\\n * Enumeration of allowed getters where the keys are method names.\\n *\\n * @type {Object}\\n */\\n\\nvar allowedGetters = {\\n  buffered: 1,\\n  currentTime: 1,\\n  duration: 1,\\n  muted: 1,\\n  played: 1,\\n  paused: 1,\\n  seekable: 1,\\n  volume: 1\\n};\\n/**\\n * Enumeration of allowed setters where the keys are method names.\\n *\\n * @type {Object}\\n */\\n\\nvar allowedSetters = {\\n  setCurrentTime: 1,\\n  setMuted: 1,\\n  setVolume: 1\\n};\\n/**\\n * Enumeration of allowed mediators where the keys are method names.\\n *\\n * @type {Object}\\n */\\n\\nvar allowedMediators = {\\n  play: 1,\\n  pause: 1\\n};\\n\\nfunction middlewareIterator(method) {\\n  return function (value, mw) {\\n    // if the previous middleware terminated, pass along the termination\\n    if (value === TERMINATOR) {\\n      return TERMINATOR;\\n    }\\n\\n    if (mw[method]) {\\n      return mw[method](value);\\n    }\\n\\n    return value;\\n  };\\n}\\n\\nfunction executeRight(mws, method, value, terminated) {\\n  for (var i = mws.length - 1; i >= 0; i--) {\\n    var mw = mws[i];\\n\\n    if (mw[method]) {\\n      mw[method](terminated, value);\\n    }\\n  }\\n}\\n/**\\n * Clear the middleware cache for a player.\\n *\\n * @param  {Player} player\\n *         A {@link Player} instance.\\n */\\n\\n\\nfunction clearCacheForPlayer(player) {\\n  middlewareInstances[player.id()] = null;\\n}\\n/**\\n * {\\n *  [playerId]: [[mwFactory, mwInstance], ...]\\n * }\\n *\\n * @private\\n */\\n\\nfunction getOrCreateFactory(player, mwFactory) {\\n  var mws = middlewareInstances[player.id()];\\n  var mw = null;\\n\\n  if (mws === undefined || mws === null) {\\n    mw = mwFactory(player);\\n    middlewareInstances[player.id()] = [[mwFactory, mw]];\\n    return mw;\\n  }\\n\\n  for (var i = 0; i < mws.length; i++) {\\n    var _mws$i = mws[i],\\n        mwf = _mws$i[0],\\n        mwi = _mws$i[1];\\n\\n    if (mwf !== mwFactory) {\\n      continue;\\n    }\\n\\n    mw = mwi;\\n  }\\n\\n  if (mw === null) {\\n    mw = mwFactory(player);\\n    mws.push([mwFactory, mw]);\\n  }\\n\\n  return mw;\\n}\\n\\nfunction setSourceHelper(src, middleware, next, player, acc, lastRun) {\\n  if (src === void 0) {\\n    src = {};\\n  }\\n\\n  if (middleware === void 0) {\\n    middleware = [];\\n  }\\n\\n  if (acc === void 0) {\\n    acc = [];\\n  }\\n\\n  if (lastRun === void 0) {\\n    lastRun = false;\\n  }\\n\\n  var _middleware = middleware,\\n      mwFactory = _middleware[0],\\n      mwrest = _middleware.slice(1); // if mwFactory is a string, then we're at a fork in the road\\n\\n\\n  if (typeof mwFactory === 'string') {\\n    setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun); // if we have an mwFactory, call it with the player to get the mw,\\n    // then call the mw's setSource method\\n  } else if (mwFactory) {\\n    var mw = getOrCreateFactory(player, mwFactory); // if setSource isn't present, implicitly select this middleware\\n\\n    if (!mw.setSource) {\\n      acc.push(mw);\\n      return setSourceHelper(src, mwrest, next, player, acc, lastRun);\\n    }\\n\\n    mw.setSource(assign({}, src), function (err, _src) {\\n      // something happened, try the next middleware on the current level\\n      // make sure to use the old src\\n      if (err) {\\n        return setSourceHelper(src, mwrest, next, player, acc, lastRun);\\n      } // we've succeeded, now we need to go deeper\\n\\n\\n      acc.push(mw); // if it's the same type, continue down the current chain\\n      // otherwise, we want to go down the new chain\\n\\n      setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\\n    });\\n  } else if (mwrest.length) {\\n    setSourceHelper(src, mwrest, next, player, acc, lastRun);\\n  } else if (lastRun) {\\n    next(src, acc);\\n  } else {\\n    setSourceHelper(src, middlewares['*'], next, player, acc, true);\\n  }\\n}\\n\\n/**\\n * Mimetypes\\n *\\n * @see http://hul.harvard.edu/ois/////systems/wax/wax-public-help/mimetypes.htm\\n * @typedef Mimetypes~Kind\\n * @enum\\n */\\n\\nvar MimetypesKind = {\\n  opus: 'video/ogg',\\n  ogv: 'video/ogg',\\n  mp4: 'video/mp4',\\n  mov: 'video/mp4',\\n  m4v: 'video/mp4',\\n  mkv: 'video/x-matroska',\\n  m4a: 'audio/mp4',\\n  mp3: 'audio/mpeg',\\n  aac: 'audio/aac',\\n  oga: 'audio/ogg',\\n  m3u8: 'application/x-mpegURL',\\n  jpg: 'image/jpeg',\\n  jpeg: 'image/jpeg',\\n  gif: 'image/gif',\\n  png: 'image/png',\\n  svg: 'image/svg+xml',\\n  webp: 'image/webp'\\n};\\n/**\\n * Get the mimetype of a given src url if possible\\n *\\n * @param {string} src\\n *        The url to the src\\n *\\n * @return {string}\\n *         return the mimetype if it was known or empty string otherwise\\n */\\n\\nvar getMimetype = function getMimetype(src) {\\n  if (src === void 0) {\\n    src = '';\\n  }\\n\\n  var ext = getFileExtension(src);\\n  var mimetype = MimetypesKind[ext.toLowerCase()];\\n  return mimetype || '';\\n};\\n/**\\n * Find the mime type of a given source string if possible. Uses the player\\n * source cache.\\n *\\n * @param {Player} player\\n *        The player object\\n *\\n * @param {string} src\\n *        The source string\\n *\\n * @return {string}\\n *         The type that was found\\n */\\n\\nvar findMimetype = function findMimetype(player, src) {\\n  if (!src) {\\n    return '';\\n  } // 1. check for the type in the `source` cache\\n\\n\\n  if (player.cache_.source.src === src && player.cache_.source.type) {\\n    return player.cache_.source.type;\\n  } // 2. see if we have this source in our `currentSources` cache\\n\\n\\n  var matchingSources = player.cache_.sources.filter(function (s) {\\n    return s.src === src;\\n  });\\n\\n  if (matchingSources.length) {\\n    return matchingSources[0].type;\\n  } // 3. look for the src url in source elements and use the type there\\n\\n\\n  var sources = player.$$('source');\\n\\n  for (var i = 0; i < sources.length; i++) {\\n    var s = sources[i];\\n\\n    if (s.type && s.src && s.src === src) {\\n      return s.type;\\n    }\\n  } // 4. finally fallback to our list of mime types based on src url extension\\n\\n\\n  return getMimetype(src);\\n};\\n\\n/**\\n * @module filter-source\\n */\\n/**\\n * Filter out single bad source objects or multiple source objects in an\\n * array. Also flattens nested source object arrays into a 1 dimensional\\n * array of source objects.\\n *\\n * @param {Tech~SourceObject|Tech~SourceObject[]} src\\n *        The src object to filter\\n *\\n * @return {Tech~SourceObject[]}\\n *         An array of sourceobjects containing only valid sources\\n *\\n * @private\\n */\\n\\nvar filterSource = function filterSource(src) {\\n  // traverse array\\n  if (Array.isArray(src)) {\\n    var newsrc = [];\\n    src.forEach(function (srcobj) {\\n      srcobj = filterSource(srcobj);\\n\\n      if (Array.isArray(srcobj)) {\\n        newsrc = newsrc.concat(srcobj);\\n      } else if (isObject(srcobj)) {\\n        newsrc.push(srcobj);\\n      }\\n    });\\n    src = newsrc;\\n  } else if (typeof src === 'string' && src.trim()) {\\n    // convert string into object\\n    src = [fixSource({\\n      src: src\\n    })];\\n  } else if (isObject(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\\n    // src is already valid\\n    src = [fixSource(src)];\\n  } else {\\n    // invalid source, turn it into an empty array\\n    src = [];\\n  }\\n\\n  return src;\\n};\\n/**\\n * Checks src mimetype, adding it when possible\\n *\\n * @param {Tech~SourceObject} src\\n *        The src object to check\\n * @return {Tech~SourceObject}\\n *        src Object with known type\\n */\\n\\n\\nfunction fixSource(src) {\\n  if (!src.type) {\\n    var mimetype = getMimetype(src.src);\\n\\n    if (mimetype) {\\n      src.type = mimetype;\\n    }\\n  }\\n\\n  return src;\\n}\\n\\n/**\\n * The `MediaLoader` is the `Component` that decides which playback technology to load\\n * when a player is initialized.\\n *\\n * @extends Component\\n */\\n\\nvar MediaLoader = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MediaLoader, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should attach to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function that is run when this component is ready.\\n   */\\n  function MediaLoader(player, options, ready) {\\n    var _this;\\n\\n    // MediaLoader has no element\\n    var options_ = mergeOptions({\\n      createEl: false\\n    }, options);\\n    _this = _Component.call(this, player, options_, ready) || this; // If there are no sources when the player is initialized,\\n    // load the first supported playback technology.\\n\\n    if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\\n      for (var i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\\n        var techName = toTitleCase(j[i]);\\n        var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\\n        // Remove once that deprecated behavior is removed.\\n\\n        if (!techName) {\\n          tech = Component.getComponent(techName);\\n        } // Check if the browser supports this technology\\n\\n\\n        if (tech && tech.isSupported()) {\\n          player.loadTech_(techName);\\n          break;\\n        }\\n      }\\n    } else {\\n      // Loop through playback technologies (HTML5, Flash) and check for support.\\n      // Then load the best source.\\n      // A few assumptions here:\\n      //   All playback technologies respect preload false.\\n      player.src(options.playerOptions.sources);\\n    }\\n\\n    return _this;\\n  }\\n\\n  return MediaLoader;\\n}(Component);\\n\\nComponent.registerComponent('MediaLoader', MediaLoader);\\n\\n/**\\n * Component which is clickable or keyboard actionable, but is not a\\n * native HTML button.\\n *\\n * @extends Component\\n */\\n\\nvar ClickableComponent = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ClickableComponent, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param  {Player} player\\n   *         The `Player` that this class should be attached to.\\n   *\\n   * @param  {Object} [options]\\n   *         The key/value store of player options.\\n   *\\n   * @param  {function} [options.clickHandler]\\n   *         The function to call when the button is clicked / activated\\n   */\\n  function ClickableComponent(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.emitTapEvents();\\n\\n    _this.enable();\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `ClickableComponent`s DOM element.\\n   *\\n   * @param {string} [tag=div]\\n   *        The element's node type.\\n   *\\n   * @param {Object} [props={}]\\n   *        An object of properties that should be set on the element.\\n   *\\n   * @param {Object} [attributes={}]\\n   *        An object of attributes that should be set on the element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n\\n\\n  var _proto = ClickableComponent.prototype;\\n\\n  _proto.createEl = function createEl(tag, props, attributes) {\\n    if (tag === void 0) {\\n      tag = 'div';\\n    }\\n\\n    if (props === void 0) {\\n      props = {};\\n    }\\n\\n    if (attributes === void 0) {\\n      attributes = {};\\n    }\\n\\n    props = assign({\\n      innerHTML: '<span aria-hidden=\\\"true\\\" class=\\\"vjs-icon-placeholder\\\"></span>',\\n      className: this.buildCSSClass(),\\n      tabIndex: 0\\n    }, props);\\n\\n    if (tag === 'button') {\\n      log.error(\\\"Creating a ClickableComponent with an HTML element of \\\" + tag + \\\" is not supported; use a Button instead.\\\");\\n    } // Add ARIA attributes for clickable element which is not a native HTML button\\n\\n\\n    attributes = assign({\\n      role: 'button'\\n    }, attributes);\\n    this.tabIndex_ = props.tabIndex;\\n\\n    var el = _Component.prototype.createEl.call(this, tag, props, attributes);\\n\\n    this.createControlTextEl(el);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    // remove controlTextEl_ on dispose\\n    this.controlTextEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create a control text element on this `ClickableComponent`\\n   *\\n   * @param {Element} [el]\\n   *        Parent element for the control text.\\n   *\\n   * @return {Element}\\n   *         The control text element that gets created.\\n   */\\n  ;\\n\\n  _proto.createControlTextEl = function createControlTextEl(el) {\\n    this.controlTextEl_ = createEl('span', {\\n      className: 'vjs-control-text'\\n    }, {\\n      // let the screen reader user know that the text of the element may change\\n      'aria-live': 'polite'\\n    });\\n\\n    if (el) {\\n      el.appendChild(this.controlTextEl_);\\n    }\\n\\n    this.controlText(this.controlText_, el);\\n    return this.controlTextEl_;\\n  }\\n  /**\\n   * Get or set the localize text to use for the controls on the `ClickableComponent`.\\n   *\\n   * @param {string} [text]\\n   *        Control text for element.\\n   *\\n   * @param {Element} [el=this.el()]\\n   *        Element to set the title on.\\n   *\\n   * @return {string}\\n   *         - The control text when getting\\n   */\\n  ;\\n\\n  _proto.controlText = function controlText(text, el) {\\n    if (el === void 0) {\\n      el = this.el();\\n    }\\n\\n    if (text === undefined) {\\n      return this.controlText_ || 'Need Text';\\n    }\\n\\n    var localizedText = this.localize(text);\\n    this.controlText_ = text;\\n    textContent(this.controlTextEl_, localizedText);\\n\\n    if (!this.nonIconControl) {\\n      // Set title attribute if only an icon is shown\\n      el.setAttribute('title', localizedText);\\n    }\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-control vjs-button \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Enable this `ClickableComponent`\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    if (!this.enabled_) {\\n      this.enabled_ = true;\\n      this.removeClass('vjs-disabled');\\n      this.el_.setAttribute('aria-disabled', 'false');\\n\\n      if (typeof this.tabIndex_ !== 'undefined') {\\n        this.el_.setAttribute('tabIndex', this.tabIndex_);\\n      }\\n\\n      this.on(['tap', 'click'], this.handleClick);\\n      this.on('keydown', this.handleKeyDown);\\n    }\\n  }\\n  /**\\n   * Disable this `ClickableComponent`\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    this.enabled_ = false;\\n    this.addClass('vjs-disabled');\\n    this.el_.setAttribute('aria-disabled', 'true');\\n\\n    if (typeof this.tabIndex_ !== 'undefined') {\\n      this.el_.removeAttribute('tabIndex');\\n    }\\n\\n    this.off('mouseover', this.handleMouseOver);\\n    this.off('mouseout', this.handleMouseOut);\\n    this.off(['tap', 'click'], this.handleClick);\\n    this.off('keydown', this.handleKeyDown);\\n  }\\n  /**\\n   * Event handler that is called when a `ClickableComponent` receives a\\n   * `click` or `tap` event.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `tap` or `click` event that caused this function to be called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (this.options_.clickHandler) {\\n      this.options_.clickHandler.call(this, arguments);\\n    }\\n  }\\n  /**\\n   * Event handler that is called when a `ClickableComponent` receives a\\n   * `keydown` event.\\n   *\\n   * By default, if the key is Space or Enter, it will trigger a `click` event.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Support Space or Enter key operation to fire a click event. Also,\\n    // prevent the event from propagating through the DOM and triggering\\n    // Player hotkeys.\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Enter')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.trigger('click');\\n    } else {\\n      // Pass keypress handling up for unsupported keys\\n      _Component.prototype.handleKeyDown.call(this, event);\\n    }\\n  };\\n\\n  return ClickableComponent;\\n}(Component);\\n\\nComponent.registerComponent('ClickableComponent', ClickableComponent);\\n\\n/**\\n * A `ClickableComponent` that handles showing the poster image for the player.\\n *\\n * @extends ClickableComponent\\n */\\n\\nvar PosterImage = /*#__PURE__*/function (_ClickableComponent) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PosterImage, _ClickableComponent);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should attach to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PosterImage(player, options) {\\n    var _this;\\n\\n    _this = _ClickableComponent.call(this, player, options) || this;\\n\\n    _this.update();\\n\\n    player.on('posterchange', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update));\\n    return _this;\\n  }\\n  /**\\n   * Clean up and dispose of the `PosterImage`.\\n   */\\n\\n\\n  var _proto = PosterImage.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    this.player().off('posterchange', this.update);\\n\\n    _ClickableComponent.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create the `PosterImage`s DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = createEl('div', {\\n      className: 'vjs-poster',\\n      // Don't want poster to be tabbable.\\n      tabIndex: -1\\n    });\\n    return el;\\n  }\\n  /**\\n   * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\\n   *\\n   * @listens Player#posterchange\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `Player#posterchange` event that triggered this function.\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var url = this.player().poster();\\n    this.setSrc(url); // If there's no poster source we should display:none on this component\\n    // so it's not still clickable or right-clickable\\n\\n    if (url) {\\n      this.show();\\n    } else {\\n      this.hide();\\n    }\\n  }\\n  /**\\n   * Set the source of the `PosterImage` depending on the display method.\\n   *\\n   * @param {string} url\\n   *        The URL to the source for the `PosterImage`.\\n   */\\n  ;\\n\\n  _proto.setSrc = function setSrc(url) {\\n    var backgroundImage = ''; // Any falsy value should stay as an empty string, otherwise\\n    // this will throw an extra error\\n\\n    if (url) {\\n      backgroundImage = \\\"url(\\\\\\\"\\\" + url + \\\"\\\\\\\")\\\";\\n    }\\n\\n    this.el_.style.backgroundImage = backgroundImage;\\n  }\\n  /**\\n   * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\\n   * {@link ClickableComponent#handleClick} for instances where this will be triggered.\\n   *\\n   * @listens tap\\n   * @listens click\\n   * @listens keydown\\n   *\\n   * @param {EventTarget~Event} event\\n   +        The `click`, `tap` or `keydown` event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    // We don't want a click to trigger playback when controls are disabled\\n    if (!this.player_.controls()) {\\n      return;\\n    }\\n\\n    var sourceIsEncrypted = this.player_.usingPlugin('eme') && this.player_.eme.sessions && this.player_.eme.sessions.length > 0;\\n\\n    if (this.player_.tech(true) && // We've observed a bug in IE and Edge when playing back DRM content where\\n    // calling .focus() on the video element causes the video to go black,\\n    // so we avoid it in that specific case\\n    !((IE_VERSION || IS_EDGE) && sourceIsEncrypted)) {\\n      this.player_.tech(true).focus();\\n    }\\n\\n    if (this.player_.paused()) {\\n      silencePromise(this.player_.play());\\n    } else {\\n      this.player_.pause();\\n    }\\n  };\\n\\n  return PosterImage;\\n}(ClickableComponent);\\n\\nComponent.registerComponent('PosterImage', PosterImage);\\n\\nvar darkGray = '#222';\\nvar lightGray = '#ccc';\\nvar fontMap = {\\n  monospace: 'monospace',\\n  sansSerif: 'sans-serif',\\n  serif: 'serif',\\n  monospaceSansSerif: '\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',\\n  monospaceSerif: '\\\"Courier New\\\", monospace',\\n  proportionalSansSerif: 'sans-serif',\\n  proportionalSerif: 'serif',\\n  casual: '\\\"Comic Sans MS\\\", Impact, fantasy',\\n  script: '\\\"Monotype Corsiva\\\", cursive',\\n  smallcaps: '\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'\\n};\\n/**\\n * Construct an rgba color from a given hex color code.\\n *\\n * @param {number} color\\n *        Hex number for color, like #f0e or #f604e2.\\n *\\n * @param {number} opacity\\n *        Value for opacity, 0.0 - 1.0.\\n *\\n * @return {string}\\n *         The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\\n */\\n\\nfunction constructColor(color, opacity) {\\n  var hex;\\n\\n  if (color.length === 4) {\\n    // color looks like \\\"#f0e\\\"\\n    hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\\n  } else if (color.length === 7) {\\n    // color looks like \\\"#f604e2\\\"\\n    hex = color.slice(1);\\n  } else {\\n    throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\\n  }\\n\\n  return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\\n}\\n/**\\n * Try to update the style of a DOM element. Some style changes will throw an error,\\n * particularly in IE8. Those should be noops.\\n *\\n * @param {Element} el\\n *        The DOM element to be styled.\\n *\\n * @param {string} style\\n *        The CSS property on the element that should be styled.\\n *\\n * @param {string} rule\\n *        The style rule that should be applied to the property.\\n *\\n * @private\\n */\\n\\nfunction tryUpdateStyle(el, style, rule) {\\n  try {\\n    el.style[style] = rule;\\n  } catch (e) {\\n    // Satisfies linter.\\n    return;\\n  }\\n}\\n/**\\n * The component for displaying text track cues.\\n *\\n * @extends Component\\n */\\n\\n\\nvar TextTrackDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when `TextTrackDisplay` is ready.\\n   */\\n  function TextTrackDisplay(player, options, ready) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options, ready) || this;\\n    var updateDisplayHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.updateDisplay);\\n    player.on('loadstart', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.toggleDisplay));\\n    player.on('texttrackchange', updateDisplayHandler);\\n    player.on('loadedmetadata', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.preselectTrack)); // This used to be called during player init, but was causing an error\\n    // if a track should show by default and the display hadn't loaded yet.\\n    // Should probably be moved to an external track loader when we support\\n    // tracks that don't need a display.\\n\\n    player.ready(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), function () {\\n      if (player.tech_ && player.tech_.featuresNativeTextTracks) {\\n        this.hide();\\n        return;\\n      }\\n\\n      player.on('fullscreenchange', updateDisplayHandler);\\n      player.on('playerresize', updateDisplayHandler);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('orientationchange', updateDisplayHandler);\\n      player.on('dispose', function () {\\n        return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('orientationchange', updateDisplayHandler);\\n      });\\n      var tracks = this.options_.playerOptions.tracks || [];\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        this.player_.addRemoteTextTrack(tracks[i], true);\\n      }\\n\\n      this.preselectTrack();\\n    }));\\n    return _this;\\n  }\\n  /**\\n  * Preselect a track following this precedence:\\n  * - matches the previously selected {@link TextTrack}'s language and kind\\n  * - matches the previously selected {@link TextTrack}'s language only\\n  * - is the first default captions track\\n  * - is the first default descriptions track\\n  *\\n  * @listens Player#loadstart\\n  */\\n\\n\\n  var _proto = TextTrackDisplay.prototype;\\n\\n  _proto.preselectTrack = function preselectTrack() {\\n    var modes = {\\n      captions: 1,\\n      subtitles: 1\\n    };\\n    var trackList = this.player_.textTracks();\\n    var userPref = this.player_.cache_.selectedLanguage;\\n    var firstDesc;\\n    var firstCaptions;\\n    var preferredTrack;\\n\\n    for (var i = 0; i < trackList.length; i++) {\\n      var track = trackList[i];\\n\\n      if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\\n        // Always choose the track that matches both language and kind\\n        if (track.kind === userPref.kind) {\\n          preferredTrack = track; // or choose the first track that matches language\\n        } else if (!preferredTrack) {\\n          preferredTrack = track;\\n        } // clear everything if offTextTrackMenuItem was clicked\\n\\n      } else if (userPref && !userPref.enabled) {\\n        preferredTrack = null;\\n        firstDesc = null;\\n        firstCaptions = null;\\n      } else if (track[\\\"default\\\"]) {\\n        if (track.kind === 'descriptions' && !firstDesc) {\\n          firstDesc = track;\\n        } else if (track.kind in modes && !firstCaptions) {\\n          firstCaptions = track;\\n        }\\n      }\\n    } // The preferredTrack matches the user preference and takes\\n    // precedence over all the other tracks.\\n    // So, display the preferredTrack before the first default track\\n    // and the subtitles/captions track before the descriptions track\\n\\n\\n    if (preferredTrack) {\\n      preferredTrack.mode = 'showing';\\n    } else if (firstCaptions) {\\n      firstCaptions.mode = 'showing';\\n    } else if (firstDesc) {\\n      firstDesc.mode = 'showing';\\n    }\\n  }\\n  /**\\n   * Turn display of {@link TextTrack}'s from the current state into the other state.\\n   * There are only two states:\\n   * - 'shown'\\n   * - 'hidden'\\n   *\\n   * @listens Player#loadstart\\n   */\\n  ;\\n\\n  _proto.toggleDisplay = function toggleDisplay() {\\n    if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\\n      this.hide();\\n    } else {\\n      this.show();\\n    }\\n  }\\n  /**\\n   * Create the {@link Component}'s DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-text-track-display'\\n    }, {\\n      'aria-live': 'off',\\n      'aria-atomic': 'true'\\n    });\\n  }\\n  /**\\n   * Clear all displayed {@link TextTrack}s.\\n   */\\n  ;\\n\\n  _proto.clearDisplay = function clearDisplay() {\\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT === 'function') {\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, [], this.el_);\\n    }\\n  }\\n  /**\\n   * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\\n   * a {@link Player#fullscreenchange} is fired.\\n   *\\n   * @listens Player#texttrackchange\\n   * @listens Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.updateDisplay = function updateDisplay() {\\n    var tracks = this.player_.textTracks();\\n    var allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\\n    this.clearDisplay();\\n\\n    if (allowMultipleShowingTracks) {\\n      var showingTracks = [];\\n\\n      for (var _i = 0; _i < tracks.length; ++_i) {\\n        var track = tracks[_i];\\n\\n        if (track.mode !== 'showing') {\\n          continue;\\n        }\\n\\n        showingTracks.push(track);\\n      }\\n\\n      this.updateForTrack(showingTracks);\\n      return;\\n    } //  Track display prioritization model: if multiple tracks are 'showing',\\n    //  display the first 'subtitles' or 'captions' track which is 'showing',\\n    //  otherwise display the first 'descriptions' track which is 'showing'\\n\\n\\n    var descriptionsTrack = null;\\n    var captionsSubtitlesTrack = null;\\n    var i = tracks.length;\\n\\n    while (i--) {\\n      var _track = tracks[i];\\n\\n      if (_track.mode === 'showing') {\\n        if (_track.kind === 'descriptions') {\\n          descriptionsTrack = _track;\\n        } else {\\n          captionsSubtitlesTrack = _track;\\n        }\\n      }\\n    }\\n\\n    if (captionsSubtitlesTrack) {\\n      if (this.getAttribute('aria-live') !== 'off') {\\n        this.setAttribute('aria-live', 'off');\\n      }\\n\\n      this.updateForTrack(captionsSubtitlesTrack);\\n    } else if (descriptionsTrack) {\\n      if (this.getAttribute('aria-live') !== 'assertive') {\\n        this.setAttribute('aria-live', 'assertive');\\n      }\\n\\n      this.updateForTrack(descriptionsTrack);\\n    }\\n  }\\n  /**\\n   * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\\n   *\\n   * @param {TextTrack} track\\n   *        Text track object containing active cues to style.\\n   */\\n  ;\\n\\n  _proto.updateDisplayState = function updateDisplayState(track) {\\n    var overrides = this.player_.textTrackSettings.getValues();\\n    var cues = track.activeCues;\\n    var i = cues.length;\\n\\n    while (i--) {\\n      var cue = cues[i];\\n\\n      if (!cue) {\\n        continue;\\n      }\\n\\n      var cueDiv = cue.displayState;\\n\\n      if (overrides.color) {\\n        cueDiv.firstChild.style.color = overrides.color;\\n      }\\n\\n      if (overrides.textOpacity) {\\n        tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\\n      }\\n\\n      if (overrides.backgroundColor) {\\n        cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\\n      }\\n\\n      if (overrides.backgroundOpacity) {\\n        tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\\n      }\\n\\n      if (overrides.windowColor) {\\n        if (overrides.windowOpacity) {\\n          tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\\n        } else {\\n          cueDiv.style.backgroundColor = overrides.windowColor;\\n        }\\n      }\\n\\n      if (overrides.edgeStyle) {\\n        if (overrides.edgeStyle === 'dropshadow') {\\n          cueDiv.firstChild.style.textShadow = \\\"2px 2px 3px \\\" + darkGray + \\\", 2px 2px 4px \\\" + darkGray + \\\", 2px 2px 5px \\\" + darkGray;\\n        } else if (overrides.edgeStyle === 'raised') {\\n          cueDiv.firstChild.style.textShadow = \\\"1px 1px \\\" + darkGray + \\\", 2px 2px \\\" + darkGray + \\\", 3px 3px \\\" + darkGray;\\n        } else if (overrides.edgeStyle === 'depressed') {\\n          cueDiv.firstChild.style.textShadow = \\\"1px 1px \\\" + lightGray + \\\", 0 1px \\\" + lightGray + \\\", -1px -1px \\\" + darkGray + \\\", 0 -1px \\\" + darkGray;\\n        } else if (overrides.edgeStyle === 'uniform') {\\n          cueDiv.firstChild.style.textShadow = \\\"0 0 4px \\\" + darkGray + \\\", 0 0 4px \\\" + darkGray + \\\", 0 0 4px \\\" + darkGray + \\\", 0 0 4px \\\" + darkGray;\\n        }\\n      }\\n\\n      if (overrides.fontPercent && overrides.fontPercent !== 1) {\\n        var fontSize = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.parseFloat(cueDiv.style.fontSize);\\n        cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\\n        cueDiv.style.height = 'auto';\\n        cueDiv.style.top = 'auto';\\n        cueDiv.style.bottom = '2px';\\n      }\\n\\n      if (overrides.fontFamily && overrides.fontFamily !== 'default') {\\n        if (overrides.fontFamily === 'small-caps') {\\n          cueDiv.firstChild.style.fontVariant = 'small-caps';\\n        } else {\\n          cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\\n        }\\n      }\\n    }\\n  }\\n  /**\\n   * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\\n   *\\n   * @param {TextTrack|TextTrack[]} tracks\\n   *        Text track object or text track array to be added to the list.\\n   */\\n  ;\\n\\n  _proto.updateForTrack = function updateForTrack(tracks) {\\n    if (!Array.isArray(tracks)) {\\n      tracks = [tracks];\\n    }\\n\\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function' || tracks.every(function (track) {\\n      return !track.activeCues;\\n    })) {\\n      return;\\n    }\\n\\n    var cues = []; // push all active track cues\\n\\n    for (var i = 0; i < tracks.length; ++i) {\\n      var track = tracks[i];\\n\\n      for (var j = 0; j < track.activeCues.length; ++j) {\\n        cues.push(track.activeCues[j]);\\n      }\\n    } // removes all cues before it processes new ones\\n\\n\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, cues, this.el_); // add unique class to each language text track & add settings styling if necessary\\n\\n    for (var _i2 = 0; _i2 < tracks.length; ++_i2) {\\n      var _track2 = tracks[_i2];\\n\\n      for (var _j = 0; _j < _track2.activeCues.length; ++_j) {\\n        var cueEl = _track2.activeCues[_j].displayState;\\n        addClass(cueEl, 'vjs-text-track-cue');\\n        addClass(cueEl, 'vjs-text-track-cue-' + (_track2.language ? _track2.language : _i2));\\n      }\\n\\n      if (this.player_.textTrackSettings) {\\n        this.updateDisplayState(_track2);\\n      }\\n    }\\n  };\\n\\n  return TextTrackDisplay;\\n}(Component);\\n\\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\\n\\n/**\\n * A loading spinner for use during waiting/loading events.\\n *\\n * @extends Component\\n */\\n\\nvar LoadingSpinner = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LoadingSpinner, _Component);\\n\\n  function LoadingSpinner() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = LoadingSpinner.prototype;\\n\\n  /**\\n   * Create the `LoadingSpinner`s DOM element.\\n   *\\n   * @return {Element}\\n   *         The dom element that gets created.\\n   */\\n  _proto.createEl = function createEl$1() {\\n    var isAudio = this.player_.isAudio();\\n    var playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\\n    var controlText = createEl('span', {\\n      className: 'vjs-control-text',\\n      innerHTML: this.localize('{1} is loading.', [playerType])\\n    });\\n\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-loading-spinner',\\n      dir: 'ltr'\\n    });\\n\\n    el.appendChild(controlText);\\n    return el;\\n  };\\n\\n  return LoadingSpinner;\\n}(Component);\\n\\nComponent.registerComponent('LoadingSpinner', LoadingSpinner);\\n\\n/**\\n * Base class for all buttons.\\n *\\n * @extends ClickableComponent\\n */\\n\\nvar Button = /*#__PURE__*/function (_ClickableComponent) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Button, _ClickableComponent);\\n\\n  function Button() {\\n    return _ClickableComponent.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = Button.prototype;\\n\\n  /**\\n   * Create the `Button`s DOM element.\\n   *\\n   * @param {string} [tag=\\\"button\\\"]\\n   *        The element's node type. This argument is IGNORED: no matter what\\n   *        is passed, it will always create a `button` element.\\n   *\\n   * @param {Object} [props={}]\\n   *        An object of properties that should be set on the element.\\n   *\\n   * @param {Object} [attributes={}]\\n   *        An object of attributes that should be set on the element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  _proto.createEl = function createEl(tag, props, attributes) {\\n    if (props === void 0) {\\n      props = {};\\n    }\\n\\n    if (attributes === void 0) {\\n      attributes = {};\\n    }\\n\\n    tag = 'button';\\n    props = assign({\\n      innerHTML: '<span aria-hidden=\\\"true\\\" class=\\\"vjs-icon-placeholder\\\"></span>',\\n      className: this.buildCSSClass()\\n    }, props); // Add attributes for button element\\n\\n    attributes = assign({\\n      // Necessary since the default button type is \\\"submit\\\"\\n      type: 'button'\\n    }, attributes);\\n    var el = Component.prototype.createEl.call(this, tag, props, attributes);\\n    this.createControlTextEl(el);\\n    return el;\\n  }\\n  /**\\n   * Add a child `Component` inside of this `Button`.\\n   *\\n   * @param {string|Component} child\\n   *        The name or instance of a child to add.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of options that will get passed to children of\\n   *        the child.\\n   *\\n   * @return {Component}\\n   *         The `Component` that gets added as a child. When using a string the\\n   *         `Component` will get created by this process.\\n   *\\n   * @deprecated since version 5\\n   */\\n  ;\\n\\n  _proto.addChild = function addChild(child, options) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var className = this.constructor.name;\\n    log.warn(\\\"Adding an actionable (user controllable) child to a Button (\\\" + className + \\\") is not supported; use a ClickableComponent instead.\\\"); // Avoid the error message generated by ClickableComponent's addChild method\\n\\n    return Component.prototype.addChild.call(this, child, options);\\n  }\\n  /**\\n   * Enable the `Button` element so that it can be activated or clicked. Use this with\\n   * {@link Button#disable}.\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    _ClickableComponent.prototype.enable.call(this);\\n\\n    this.el_.removeAttribute('disabled');\\n  }\\n  /**\\n   * Disable the `Button` element so that it cannot be activated or clicked. Use this with\\n   * {@link Button#enable}.\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    _ClickableComponent.prototype.disable.call(this);\\n\\n    this.el_.setAttribute('disabled', 'disabled');\\n  }\\n  /**\\n   * This gets called when a `Button` has focus and `keydown` is triggered via a key\\n   * press.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to get called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Ignore Space or Enter key operation, which is handled by the browser for\\n    // a button - though not for its super class, ClickableComponent. Also,\\n    // prevent the event from propagating through the DOM and triggering Player\\n    // hotkeys. We do not preventDefault here because we _want_ the browser to\\n    // handle it.\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Enter')) {\\n      event.stopPropagation();\\n      return;\\n    } // Pass keypress handling up for unsupported keys\\n\\n\\n    _ClickableComponent.prototype.handleKeyDown.call(this, event);\\n  };\\n\\n  return Button;\\n}(ClickableComponent);\\n\\nComponent.registerComponent('Button', Button);\\n\\n/**\\n * The initial play button that shows before the video has played. The hiding of the\\n * `BigPlayButton` get done via CSS and `Player` states.\\n *\\n * @extends Button\\n */\\n\\nvar BigPlayButton = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(BigPlayButton, _Button);\\n\\n  function BigPlayButton(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n    _this.mouseused_ = false;\\n\\n    _this.on('mousedown', _this.handleMouseDown);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object. Always returns 'vjs-big-play-button'.\\n   */\\n\\n\\n  var _proto = BigPlayButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-big-play-button';\\n  }\\n  /**\\n   * This gets called when a `BigPlayButton` \\\"clicked\\\". See {@link ClickableComponent}\\n   * for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var playPromise = this.player_.play(); // exit early if clicked via the mouse\\n\\n    if (this.mouseused_ && event.clientX && event.clientY) {\\n      var sourceIsEncrypted = this.player_.usingPlugin('eme') && this.player_.eme.sessions && this.player_.eme.sessions.length > 0;\\n      silencePromise(playPromise);\\n\\n      if (this.player_.tech(true) && // We've observed a bug in IE and Edge when playing back DRM content where\\n      // calling .focus() on the video element causes the video to go black,\\n      // so we avoid it in that specific case\\n      !((IE_VERSION || IS_EDGE) && sourceIsEncrypted)) {\\n        this.player_.tech(true).focus();\\n      }\\n\\n      return;\\n    }\\n\\n    var cb = this.player_.getChild('controlBar');\\n    var playToggle = cb && cb.getChild('playToggle');\\n\\n    if (!playToggle) {\\n      this.player_.tech(true).focus();\\n      return;\\n    }\\n\\n    var playFocus = function playFocus() {\\n      return playToggle.focus();\\n    };\\n\\n    if (isPromise(playPromise)) {\\n      playPromise.then(playFocus, function () {});\\n    } else {\\n      this.setTimeout(playFocus, 1);\\n    }\\n  };\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    this.mouseused_ = false;\\n\\n    _Button.prototype.handleKeyDown.call(this, event);\\n  };\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    this.mouseused_ = true;\\n  };\\n\\n  return BigPlayButton;\\n}(Button);\\n/**\\n * The text that should display over the `BigPlayButton`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nBigPlayButton.prototype.controlText_ = 'Play Video';\\nComponent.registerComponent('BigPlayButton', BigPlayButton);\\n\\n/**\\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\\n * it gets clicked.\\n *\\n * @extends Button\\n */\\n\\nvar CloseButton = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CloseButton, _Button);\\n\\n  /**\\n  * Creates an instance of the this class.\\n  *\\n  * @param  {Player} player\\n  *         The `Player` that this class should be attached to.\\n  *\\n  * @param  {Object} [options]\\n  *         The key/value store of player options.\\n  */\\n  function CloseButton(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.controlText(options && options.controlText || _this.localize('Close'));\\n\\n    return _this;\\n  }\\n  /**\\n  * Builds the default DOM `className`.\\n  *\\n  * @return {string}\\n  *         The DOM `className` for this object.\\n  */\\n\\n\\n  var _proto = CloseButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-close-button \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * This gets called when a `CloseButton` gets clicked. See\\n   * {@link ClickableComponent#handleClick} for more information on when\\n   * this will be triggered\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   * @fires CloseButton#close\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    /**\\n     * Triggered when the a `CloseButton` is clicked.\\n     *\\n     * @event CloseButton#close\\n     * @type {EventTarget~Event}\\n     *\\n     * @property {boolean} [bubbles=false]\\n     *           set to false so that the close event does not\\n     *           bubble up to parents if there is no listener\\n     */\\n    this.trigger({\\n      type: 'close',\\n      bubbles: false\\n    });\\n  }\\n  /**\\n   * Event handler that is called when a `CloseButton` receives a\\n   * `keydown` event.\\n   *\\n   * By default, if the key is Esc, it will trigger a `click` event.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Esc button will trigger `click` event\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.trigger('click');\\n    } else {\\n      // Pass keypress handling up for unsupported keys\\n      _Button.prototype.handleKeyDown.call(this, event);\\n    }\\n  };\\n\\n  return CloseButton;\\n}(Button);\\n\\nComponent.registerComponent('CloseButton', CloseButton);\\n\\n/**\\n * Button to toggle between play and pause.\\n *\\n * @extends Button\\n */\\n\\nvar PlayToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlayToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function PlayToggle(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _Button.call(this, player, options) || this; // show or hide replay icon\\n\\n    options.replay = options.replay === undefined || options.replay;\\n\\n    _this.on(player, 'play', _this.handlePlay);\\n\\n    _this.on(player, 'pause', _this.handlePause);\\n\\n    if (options.replay) {\\n      _this.on(player, 'ended', _this.handleEnded);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = PlayToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-play-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * This gets called when an `PlayToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (this.player_.paused()) {\\n      this.player_.play();\\n    } else {\\n      this.player_.pause();\\n    }\\n  }\\n  /**\\n   * This gets called once after the video has ended and the user seeks so that\\n   * we can change the replay button back to a play button.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#seeked\\n   */\\n  ;\\n\\n  _proto.handleSeeked = function handleSeeked(event) {\\n    this.removeClass('vjs-ended');\\n\\n    if (this.player_.paused()) {\\n      this.handlePause(event);\\n    } else {\\n      this.handlePlay(event);\\n    }\\n  }\\n  /**\\n   * Add the vjs-playing class to the element so it can change appearance.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#play\\n   */\\n  ;\\n\\n  _proto.handlePlay = function handlePlay(event) {\\n    this.removeClass('vjs-ended');\\n    this.removeClass('vjs-paused');\\n    this.addClass('vjs-playing'); // change the button text to \\\"Pause\\\"\\n\\n    this.controlText('Pause');\\n  }\\n  /**\\n   * Add the vjs-paused class to the element so it can change appearance.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#pause\\n   */\\n  ;\\n\\n  _proto.handlePause = function handlePause(event) {\\n    this.removeClass('vjs-playing');\\n    this.addClass('vjs-paused'); // change the button text to \\\"Play\\\"\\n\\n    this.controlText('Play');\\n  }\\n  /**\\n   * Add the vjs-ended class to the element so it can change appearance\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#ended\\n   */\\n  ;\\n\\n  _proto.handleEnded = function handleEnded(event) {\\n    this.removeClass('vjs-playing');\\n    this.addClass('vjs-ended'); // change the button text to \\\"Replay\\\"\\n\\n    this.controlText('Replay'); // on the next seek remove the replay button\\n\\n    this.one(this.player_, 'seeked', this.handleSeeked);\\n  };\\n\\n  return PlayToggle;\\n}(Button);\\n/**\\n * The text that should display over the `PlayToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPlayToggle.prototype.controlText_ = 'Play';\\nComponent.registerComponent('PlayToggle', PlayToggle);\\n\\n/**\\n * @file format-time.js\\n * @module format-time\\n */\\n\\n/**\\n * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\\n * seconds) will force a number of leading zeros to cover the length of the\\n * guide.\\n *\\n * @private\\n * @param  {number} seconds\\n *         Number of seconds to be turned into a string\\n *\\n * @param  {number} guide\\n *         Number (in seconds) to model the string after\\n *\\n * @return {string}\\n *         Time formatted as H:MM:SS or M:SS\\n */\\nvar defaultImplementation = function defaultImplementation(seconds, guide) {\\n  seconds = seconds < 0 ? 0 : seconds;\\n  var s = Math.floor(seconds % 60);\\n  var m = Math.floor(seconds / 60 % 60);\\n  var h = Math.floor(seconds / 3600);\\n  var gm = Math.floor(guide / 60 % 60);\\n  var gh = Math.floor(guide / 3600); // handle invalid times\\n\\n  if (isNaN(seconds) || seconds === Infinity) {\\n    // '-' is false for all relational operators (e.g. <, >=) so this setting\\n    // will add the minimum number of fields specified by the guide\\n    h = m = s = '-';\\n  } // Check if we need to show hours\\n\\n\\n  h = h > 0 || gh > 0 ? h + ':' : ''; // If hours are showing, we may need to add a leading zero.\\n  // Always show at least one digit of minutes.\\n\\n  m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; // Check if leading zero is need for seconds\\n\\n  s = s < 10 ? '0' + s : s;\\n  return h + m + s;\\n}; // Internal pointer to the current implementation.\\n\\n\\nvar implementation = defaultImplementation;\\n/**\\n * Replaces the default formatTime implementation with a custom implementation.\\n *\\n * @param {Function} customImplementation\\n *        A function which will be used in place of the default formatTime\\n *        implementation. Will receive the current time in seconds and the\\n *        guide (in seconds) as arguments.\\n */\\n\\nfunction setFormatTime(customImplementation) {\\n  implementation = customImplementation;\\n}\\n/**\\n * Resets formatTime to the default implementation.\\n */\\n\\nfunction resetFormatTime() {\\n  implementation = defaultImplementation;\\n}\\n/**\\n * Delegates to either the default time formatting function or a custom\\n * function supplied via `setFormatTime`.\\n *\\n * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\\n * guide (in seconds) will force a number of leading zeros to cover the\\n * length of the guide.\\n *\\n * @static\\n * @example  formatTime(125, 600) === \\\"02:05\\\"\\n * @param    {number} seconds\\n *           Number of seconds to be turned into a string\\n *\\n * @param    {number} guide\\n *           Number (in seconds) to model the string after\\n *\\n * @return   {string}\\n *           Time formatted as H:MM:SS or M:SS\\n */\\n\\nfunction formatTime(seconds, guide) {\\n  if (guide === void 0) {\\n    guide = seconds;\\n  }\\n\\n  return implementation(seconds, guide);\\n}\\n\\n/**\\n * Displays time information about the video\\n *\\n * @extends Component\\n */\\n\\nvar TimeDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TimeDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TimeDisplay(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.on(player, ['timeupdate', 'ended'], _this.updateContent);\\n\\n    _this.updateTextNode_();\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = TimeDisplay.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var className = this.buildCSSClass();\\n\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: className + \\\" vjs-time-control vjs-control\\\",\\n      innerHTML: \\\"<span class=\\\\\\\"vjs-control-text\\\\\\\" role=\\\\\\\"presentation\\\\\\\">\\\" + this.localize(this.labelText_) + \\\"\\\\xA0</span>\\\"\\n    });\\n\\n    this.contentEl_ = createEl('span', {\\n      className: className + \\\"-display\\\"\\n    }, {\\n      // tell screen readers not to automatically read the time as it changes\\n      'aria-live': 'off',\\n      // span elements have no implicit role, but some screen readers (notably VoiceOver)\\n      // treat them as a break between items in the DOM when using arrow keys\\n      // (or left-to-right swipes on iOS) to read contents of a page. Using\\n      // role='presentation' causes VoiceOver to NOT treat this span as a break.\\n      'role': 'presentation'\\n    });\\n    el.appendChild(this.contentEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n    this.textNode_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Updates the time display text node with a new time\\n   *\\n   * @param {number} [time=0] the time to update to\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateTextNode_ = function updateTextNode_(time) {\\n    var _this2 = this;\\n\\n    if (time === void 0) {\\n      time = 0;\\n    }\\n\\n    time = formatTime(time);\\n\\n    if (this.formattedTime_ === time) {\\n      return;\\n    }\\n\\n    this.formattedTime_ = time;\\n    this.requestAnimationFrame(function () {\\n      if (!_this2.contentEl_) {\\n        return;\\n      }\\n\\n      var oldNode = _this2.textNode_;\\n      _this2.textNode_ = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(_this2.formattedTime_);\\n\\n      if (!_this2.textNode_) {\\n        return;\\n      }\\n\\n      if (oldNode) {\\n        _this2.contentEl_.replaceChild(_this2.textNode_, oldNode);\\n      } else {\\n        _this2.contentEl_.appendChild(_this2.textNode_);\\n      }\\n    });\\n  }\\n  /**\\n   * To be filled out in the child class, should update the displayed time\\n   * in accordance with the fact that the current time has changed.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate`  event that caused this to run.\\n   *\\n   * @listens Player#timeupdate\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {};\\n\\n  return TimeDisplay;\\n}(Component);\\n/**\\n * The text that is added to the `TimeDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nTimeDisplay.prototype.labelText_ = 'Time';\\n/**\\n * The text that should display over the `TimeDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nTimeDisplay.prototype.controlText_ = 'Time';\\nComponent.registerComponent('TimeDisplay', TimeDisplay);\\n\\n/**\\n * Displays the current time\\n *\\n * @extends Component\\n */\\n\\nvar CurrentTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CurrentTimeDisplay, _TimeDisplay);\\n\\n  function CurrentTimeDisplay() {\\n    return _TimeDisplay.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = CurrentTimeDisplay.prototype;\\n\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-current-time';\\n  }\\n  /**\\n   * Update current time display\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate` event that caused this function to run.\\n   *\\n   * @listens Player#timeupdate\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {\\n    // Allows for smooth scrubbing, when player can't keep up.\\n    var time;\\n\\n    if (this.player_.ended()) {\\n      time = this.player_.duration();\\n    } else {\\n      time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\\n    }\\n\\n    this.updateTextNode_(time);\\n  };\\n\\n  return CurrentTimeDisplay;\\n}(TimeDisplay);\\n/**\\n * The text that is added to the `CurrentTimeDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nCurrentTimeDisplay.prototype.labelText_ = 'Current Time';\\n/**\\n * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nCurrentTimeDisplay.prototype.controlText_ = 'Current Time';\\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\\n\\n/**\\n * Displays the duration\\n *\\n * @extends Component\\n */\\n\\nvar DurationDisplay = /*#__PURE__*/function (_TimeDisplay) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(DurationDisplay, _TimeDisplay);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function DurationDisplay(player, options) {\\n    var _this;\\n\\n    _this = _TimeDisplay.call(this, player, options) || this; // we do not want to/need to throttle duration changes,\\n    // as they should always display the changed duration as\\n    // it has changed\\n\\n    _this.on(player, 'durationchange', _this.updateContent); // Listen to loadstart because the player duration is reset when a new media element is loaded,\\n    // but the durationchange on the user agent will not fire.\\n    // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\\n\\n\\n    _this.on(player, 'loadstart', _this.updateContent); // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\\n    // listeners could have broken dependent applications/libraries. These\\n    // can likely be removed for 7.0.\\n\\n\\n    _this.on(player, 'loadedmetadata', _this.updateContent);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = DurationDisplay.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-duration';\\n  }\\n  /**\\n   * Update duration time display.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\\n   *        this function to be called.\\n   *\\n   * @listens Player#durationchange\\n   * @listens Player#timeupdate\\n   * @listens Player#loadedmetadata\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {\\n    var duration = this.player_.duration();\\n    this.updateTextNode_(duration);\\n  };\\n\\n  return DurationDisplay;\\n}(TimeDisplay);\\n/**\\n * The text that is added to the `DurationDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nDurationDisplay.prototype.labelText_ = 'Duration';\\n/**\\n * The text that should display over the `DurationDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nDurationDisplay.prototype.controlText_ = 'Duration';\\nComponent.registerComponent('DurationDisplay', DurationDisplay);\\n\\n/**\\n * The separator between the current time and duration.\\n * Can be hidden if it's not needed in the design.\\n *\\n * @extends Component\\n */\\n\\nvar TimeDivider = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TimeDivider, _Component);\\n\\n  function TimeDivider() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = TimeDivider.prototype;\\n\\n  /**\\n   * Create the component's DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-time-control vjs-time-divider',\\n      innerHTML: '<div><span>/</span></div>'\\n    }, {\\n      // this element and its contents can be hidden from assistive techs since\\n      // it is made extraneous by the announcement of the control text\\n      // for the current time and duration displays\\n      'aria-hidden': true\\n    });\\n  };\\n\\n  return TimeDivider;\\n}(Component);\\n\\nComponent.registerComponent('TimeDivider', TimeDivider);\\n\\n/**\\n * Displays the time left in the video\\n *\\n * @extends Component\\n */\\n\\nvar RemainingTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(RemainingTimeDisplay, _TimeDisplay);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function RemainingTimeDisplay(player, options) {\\n    var _this;\\n\\n    _this = _TimeDisplay.call(this, player, options) || this;\\n\\n    _this.on(player, 'durationchange', _this.updateContent);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = RemainingTimeDisplay.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-remaining-time';\\n  }\\n  /**\\n   * Create the `Component`'s DOM element with the \\\"minus\\\" characted prepend to the time\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _TimeDisplay.prototype.createEl.call(this);\\n\\n    el.insertBefore(createEl('span', {}, {\\n      'aria-hidden': true\\n    }, '-'), this.contentEl_);\\n    return el;\\n  }\\n  /**\\n   * Update remaining time display.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate` or `durationchange` event that caused this to run.\\n   *\\n   * @listens Player#timeupdate\\n   * @listens Player#durationchange\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {\\n    if (typeof this.player_.duration() !== 'number') {\\n      return;\\n    }\\n\\n    var time; // @deprecated We should only use remainingTimeDisplay\\n    // as of video.js 7\\n\\n    if (this.player_.ended()) {\\n      time = 0;\\n    } else if (this.player_.remainingTimeDisplay) {\\n      time = this.player_.remainingTimeDisplay();\\n    } else {\\n      time = this.player_.remainingTime();\\n    }\\n\\n    this.updateTextNode_(time);\\n  };\\n\\n  return RemainingTimeDisplay;\\n}(TimeDisplay);\\n/**\\n * The text that is added to the `RemainingTimeDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nRemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\\n/**\\n * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nRemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\\n\\n/**\\n * Displays the live indicator when duration is Infinity.\\n *\\n * @extends Component\\n */\\n\\nvar LiveDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LiveDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function LiveDisplay(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.updateShowing();\\n\\n    _this.on(_this.player(), 'durationchange', _this.updateShowing);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = LiveDisplay.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-live-control vjs-control'\\n    });\\n\\n    this.contentEl_ = createEl('div', {\\n      className: 'vjs-live-display',\\n      innerHTML: \\\"<span class=\\\\\\\"vjs-control-text\\\\\\\">\\\" + this.localize('Stream Type') + \\\"\\\\xA0</span>\\\" + this.localize('LIVE')\\n    }, {\\n      'aria-live': 'off'\\n    });\\n    el.appendChild(this.contentEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\\n   * it accordingly\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#durationchange} event that caused this function to run.\\n   *\\n   * @listens Player#durationchange\\n   */\\n  ;\\n\\n  _proto.updateShowing = function updateShowing(event) {\\n    if (this.player().duration() === Infinity) {\\n      this.show();\\n    } else {\\n      this.hide();\\n    }\\n  };\\n\\n  return LiveDisplay;\\n}(Component);\\n\\nComponent.registerComponent('LiveDisplay', LiveDisplay);\\n\\n/**\\n * Displays the live indicator when duration is Infinity.\\n *\\n * @extends Component\\n */\\n\\nvar SeekToLive = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SeekToLive, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function SeekToLive(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.updateLiveEdgeStatus();\\n\\n    if (_this.player_.liveTracker) {\\n      _this.on(_this.player_.liveTracker, 'liveedgechange', _this.updateLiveEdgeStatus);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = SeekToLive.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _Button.prototype.createEl.call(this, 'button', {\\n      className: 'vjs-seek-to-live-control vjs-control'\\n    });\\n\\n    this.textEl_ = createEl('span', {\\n      className: 'vjs-seek-to-live-text',\\n      innerHTML: this.localize('LIVE')\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n    el.appendChild(this.textEl_);\\n    return el;\\n  }\\n  /**\\n   * Update the state of this button if we are at the live edge\\n   * or not\\n   */\\n  ;\\n\\n  _proto.updateLiveEdgeStatus = function updateLiveEdgeStatus() {\\n    // default to live edge\\n    if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\\n      this.setAttribute('aria-disabled', true);\\n      this.addClass('vjs-at-live-edge');\\n      this.controlText('Seek to live, currently playing live');\\n    } else {\\n      this.setAttribute('aria-disabled', false);\\n      this.removeClass('vjs-at-live-edge');\\n      this.controlText('Seek to live, currently behind live');\\n    }\\n  }\\n  /**\\n   * On click bring us as near to the live point as possible.\\n   * This requires that we wait for the next `live-seekable-change`\\n   * event which will happen every segment length seconds.\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick() {\\n    this.player_.liveTracker.seekToLiveEdge();\\n  }\\n  /**\\n   * Dispose of the element and stop tracking\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    if (this.player_.liveTracker) {\\n      this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatus);\\n    }\\n\\n    this.textEl_ = null;\\n\\n    _Button.prototype.dispose.call(this);\\n  };\\n\\n  return SeekToLive;\\n}(Button);\\n\\nSeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\\nComponent.registerComponent('SeekToLive', SeekToLive);\\n\\n/**\\n * Keep a number between a min and a max value\\n *\\n * @param {number} number\\n *        The number to clamp\\n *\\n * @param {number} min\\n *        The minimum value\\n * @param {number} max\\n *        The maximum value\\n *\\n * @return {number}\\n *         the clamped number\\n */\\nvar clamp = function clamp(number, min, max) {\\n  number = Number(number);\\n  return Math.min(max, Math.max(min, isNaN(number) ? min : number));\\n};\\n\\n/**\\n * The base functionality for a slider. Can be vertical or horizontal.\\n * For instance the volume bar or the seek bar on a video is a slider.\\n *\\n * @extends Component\\n */\\n\\nvar Slider = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Slider, _Component);\\n\\n  /**\\n  * Create an instance of this class\\n  *\\n  * @param {Player} player\\n  *        The `Player` that this class should be attached to.\\n  *\\n  * @param {Object} [options]\\n  *        The key/value store of player options.\\n  */\\n  function Slider(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this; // Set property names to bar to match with the child Slider class is looking for\\n\\n    _this.bar = _this.getChild(_this.options_.barName); // Set a horizontal or vertical class on the slider depending on the slider type\\n\\n    _this.vertical(!!_this.options_.vertical);\\n\\n    _this.enable();\\n\\n    return _this;\\n  }\\n  /**\\n   * Are controls are currently enabled for this slider or not.\\n   *\\n   * @return {boolean}\\n   *         true if controls are enabled, false otherwise\\n   */\\n\\n\\n  var _proto = Slider.prototype;\\n\\n  _proto.enabled = function enabled() {\\n    return this.enabled_;\\n  }\\n  /**\\n   * Enable controls for this slider if they are disabled\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    if (this.enabled()) {\\n      return;\\n    }\\n\\n    this.on('mousedown', this.handleMouseDown);\\n    this.on('touchstart', this.handleMouseDown);\\n    this.on('keydown', this.handleKeyDown);\\n    this.on('click', this.handleClick); // TODO: deprecated, controlsvisible does not seem to be fired\\n\\n    this.on(this.player_, 'controlsvisible', this.update);\\n\\n    if (this.playerEvent) {\\n      this.on(this.player_, this.playerEvent, this.update);\\n    }\\n\\n    this.removeClass('disabled');\\n    this.setAttribute('tabindex', 0);\\n    this.enabled_ = true;\\n  }\\n  /**\\n   * Disable controls for this slider if they are enabled\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    if (!this.enabled()) {\\n      return;\\n    }\\n\\n    var doc = this.bar.el_.ownerDocument;\\n    this.off('mousedown', this.handleMouseDown);\\n    this.off('touchstart', this.handleMouseDown);\\n    this.off('keydown', this.handleKeyDown);\\n    this.off('click', this.handleClick);\\n    this.off(this.player_, 'controlsvisible', this.update);\\n    this.off(doc, 'mousemove', this.handleMouseMove);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchmove', this.handleMouseMove);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n    this.removeAttribute('tabindex');\\n    this.addClass('disabled');\\n\\n    if (this.playerEvent) {\\n      this.off(this.player_, this.playerEvent, this.update);\\n    }\\n\\n    this.enabled_ = false;\\n  }\\n  /**\\n   * Create the `Slider`s DOM element.\\n   *\\n   * @param {string} type\\n   *        Type of element to create.\\n   *\\n   * @param {Object} [props={}]\\n   *        List of properties in Object form.\\n   *\\n   * @param {Object} [attributes={}]\\n   *        list of attributes in Object form.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl(type, props, attributes) {\\n    if (props === void 0) {\\n      props = {};\\n    }\\n\\n    if (attributes === void 0) {\\n      attributes = {};\\n    }\\n\\n    // Add the slider element class to all sub classes\\n    props.className = props.className + ' vjs-slider';\\n    props = assign({\\n      tabIndex: 0\\n    }, props);\\n    attributes = assign({\\n      'role': 'slider',\\n      'aria-valuenow': 0,\\n      'aria-valuemin': 0,\\n      'aria-valuemax': 100,\\n      'tabIndex': 0\\n    }, attributes);\\n    return _Component.prototype.createEl.call(this, type, props, attributes);\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `Slider`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   * @fires Slider#slideractive\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    var doc = this.bar.el_.ownerDocument;\\n\\n    if (event.type === 'mousedown') {\\n      event.preventDefault();\\n    } // Do not call preventDefault() on touchstart in Chrome\\n    // to avoid console warnings. Use a 'touch-action: none' style\\n    // instead to prevent unintented scrolling.\\n    // https://developers.google.com/web/updates/2017/01/scrolling-intervention\\n\\n\\n    if (event.type === 'touchstart' && !IS_CHROME) {\\n      event.preventDefault();\\n    }\\n\\n    blockTextSelection();\\n    this.addClass('vjs-sliding');\\n    /**\\n     * Triggered when the slider is in an active state\\n     *\\n     * @event Slider#slideractive\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('slideractive');\\n    this.on(doc, 'mousemove', this.handleMouseMove);\\n    this.on(doc, 'mouseup', this.handleMouseUp);\\n    this.on(doc, 'touchmove', this.handleMouseMove);\\n    this.on(doc, 'touchend', this.handleMouseUp);\\n    this.handleMouseMove(event);\\n  }\\n  /**\\n   * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\\n   * The `mousemove` and `touchmove` events will only only trigger this function during\\n   * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\\n   * {@link Slider#handleMouseUp}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\\n   *        this function\\n   *\\n   * @listens mousemove\\n   * @listens touchmove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {}\\n  /**\\n   * Handle `mouseup` or `touchend` events on the `Slider`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mouseup` or `touchend` event that triggered this function.\\n   *\\n   * @listens touchend\\n   * @listens mouseup\\n   * @fires Slider#sliderinactive\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp() {\\n    var doc = this.bar.el_.ownerDocument;\\n    unblockTextSelection();\\n    this.removeClass('vjs-sliding');\\n    /**\\n     * Triggered when the slider is no longer in an active state.\\n     *\\n     * @event Slider#sliderinactive\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('sliderinactive');\\n    this.off(doc, 'mousemove', this.handleMouseMove);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchmove', this.handleMouseMove);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n    this.update();\\n  }\\n  /**\\n   * Update the progress bar of the `Slider`.\\n   *\\n   * @return {number}\\n   *          The percentage of progress the progress bar represents as a\\n   *          number from 0 to 1.\\n   */\\n  ;\\n\\n  _proto.update = function update() {\\n    var _this2 = this;\\n\\n    // In VolumeBar init we have a setTimeout for update that pops and update\\n    // to the end of the execution stack. The player is destroyed before then\\n    // update will cause an error\\n    // If there's no bar...\\n    if (!this.el_ || !this.bar) {\\n      return;\\n    } // clamp progress between 0 and 1\\n    // and only round to four decimal places, as we round to two below\\n\\n\\n    var progress = this.getProgress();\\n\\n    if (progress === this.progress_) {\\n      return progress;\\n    }\\n\\n    this.progress_ = progress;\\n    this.requestAnimationFrame(function () {\\n      // Set the new bar width or height\\n      var sizeKey = _this2.vertical() ? 'height' : 'width'; // Convert to a percentage for css value\\n\\n      _this2.bar.el().style[sizeKey] = (progress * 100).toFixed(2) + '%';\\n    });\\n    return progress;\\n  }\\n  /**\\n   * Get the percentage of the bar that should be filled\\n   * but clamped and rounded.\\n   *\\n   * @return {number}\\n   *         percentage filled that the slider is\\n   */\\n  ;\\n\\n  _proto.getProgress = function getProgress() {\\n    return Number(clamp(this.getPercent(), 0, 1).toFixed(4));\\n  }\\n  /**\\n   * Calculate distance for slider\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run.\\n   *\\n   * @return {number}\\n   *         The current position of the Slider.\\n   *         - position.x for vertical `Slider`s\\n   *         - position.y for horizontal `Slider`s\\n   */\\n  ;\\n\\n  _proto.calculateDistance = function calculateDistance(event) {\\n    var position = getPointerPosition(this.el_, event);\\n\\n    if (this.vertical()) {\\n      return position.y;\\n    }\\n\\n    return position.x;\\n  }\\n  /**\\n   * Handle a `keydown` event on the `Slider`. Watches for left, rigth, up, and down\\n   * arrow keys. This function will only be called when the slider has focus. See\\n   * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the `keydown` event that caused this function to run.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Left and Down Arrows\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Left') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Down')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepBack(); // Up and Right Arrows\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Right') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Up')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepForward();\\n    } else {\\n      // Pass keydown handling up for unsupported keys\\n      _Component.prototype.handleKeyDown.call(this, event);\\n    }\\n  }\\n  /**\\n   * Listener for click events on slider, used to prevent clicks\\n   *   from bubbling up to parent elements like button menus.\\n   *\\n   * @param {Object} event\\n   *        Event that caused this object to run\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    event.stopPropagation();\\n    event.preventDefault();\\n  }\\n  /**\\n   * Get/set if slider is horizontal for vertical\\n   *\\n   * @param {boolean} [bool]\\n   *        - true if slider is vertical,\\n   *        - false is horizontal\\n   *\\n   * @return {boolean}\\n   *         - true if slider is vertical, and getting\\n   *         - false if the slider is horizontal, and getting\\n   */\\n  ;\\n\\n  _proto.vertical = function vertical(bool) {\\n    if (bool === undefined) {\\n      return this.vertical_ || false;\\n    }\\n\\n    this.vertical_ = !!bool;\\n\\n    if (this.vertical_) {\\n      this.addClass('vjs-slider-vertical');\\n    } else {\\n      this.addClass('vjs-slider-horizontal');\\n    }\\n  };\\n\\n  return Slider;\\n}(Component);\\n\\nComponent.registerComponent('Slider', Slider);\\n\\nvar percentify = function percentify(time, end) {\\n  return clamp(time / end * 100, 0, 100).toFixed(2) + '%';\\n};\\n/**\\n * Shows loading progress\\n *\\n * @extends Component\\n */\\n\\n\\nvar LoadProgressBar = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LoadProgressBar, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function LoadProgressBar(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.partEls_ = [];\\n\\n    _this.on(player, 'progress', _this.update);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = LoadProgressBar.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-load-progress'\\n    });\\n\\n    var wrapper = createEl('span', {\\n      className: 'vjs-control-text'\\n    });\\n    var loadedText = createEl('span', {\\n      textContent: this.localize('Loaded')\\n    });\\n    var separator = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(': ');\\n    this.percentageEl_ = createEl('span', {\\n      className: 'vjs-control-text-loaded-percentage',\\n      textContent: '0%'\\n    });\\n    el.appendChild(wrapper);\\n    wrapper.appendChild(loadedText);\\n    wrapper.appendChild(separator);\\n    wrapper.appendChild(this.percentageEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.partEls_ = null;\\n    this.percentageEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Update progress bar\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `progress` event that caused this function to run.\\n   *\\n   * @listens Player#progress\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var _this2 = this;\\n\\n    this.requestAnimationFrame(function () {\\n      var liveTracker = _this2.player_.liveTracker;\\n\\n      var buffered = _this2.player_.buffered();\\n\\n      var duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : _this2.player_.duration();\\n\\n      var bufferedEnd = _this2.player_.bufferedEnd();\\n\\n      var children = _this2.partEls_;\\n      var percent = percentify(bufferedEnd, duration);\\n\\n      if (_this2.percent_ !== percent) {\\n        // update the width of the progress bar\\n        _this2.el_.style.width = percent; // update the control-text\\n\\n        textContent(_this2.percentageEl_, percent);\\n        _this2.percent_ = percent;\\n      } // add child elements to represent the individual buffered time ranges\\n\\n\\n      for (var i = 0; i < buffered.length; i++) {\\n        var start = buffered.start(i);\\n        var end = buffered.end(i);\\n        var part = children[i];\\n\\n        if (!part) {\\n          part = _this2.el_.appendChild(createEl());\\n          children[i] = part;\\n        } //  only update if changed\\n\\n\\n        if (part.dataset.start === start && part.dataset.end === end) {\\n          continue;\\n        }\\n\\n        part.dataset.start = start;\\n        part.dataset.end = end; // set the percent based on the width of the progress bar (bufferedEnd)\\n\\n        part.style.left = percentify(start, bufferedEnd);\\n        part.style.width = percentify(end - start, bufferedEnd);\\n      } // remove unused buffered range elements\\n\\n\\n      for (var _i = children.length; _i > buffered.length; _i--) {\\n        _this2.el_.removeChild(children[_i - 1]);\\n      }\\n\\n      children.length = buffered.length;\\n    });\\n  };\\n\\n  return LoadProgressBar;\\n}(Component);\\n\\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\\n\\n/**\\n * Time tooltips display a time above the progress bar.\\n *\\n * @extends Component\\n */\\n\\nvar TimeTooltip = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TimeTooltip, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The {@link Player} that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TimeTooltip(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\\n    return _this;\\n  }\\n  /**\\n   * Create the time tooltip DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = TimeTooltip.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-time-tooltip'\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n  }\\n  /**\\n   * Updates the position of the time tooltip relative to the `SeekBar`.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   */\\n  ;\\n\\n  _proto.update = function update(seekBarRect, seekBarPoint, content) {\\n    var tooltipRect = getBoundingClientRect(this.el_);\\n    var playerRect = getBoundingClientRect(this.player_.el());\\n    var seekBarPointPx = seekBarRect.width * seekBarPoint; // do nothing if either rect isn't available\\n    // for example, if the player isn't in the DOM for testing\\n\\n    if (!playerRect || !tooltipRect) {\\n      return;\\n    } // This is the space left of the `seekBarPoint` available within the bounds\\n    // of the player. We calculate any gap between the left edge of the player\\n    // and the left edge of the `SeekBar` and add the number of pixels in the\\n    // `SeekBar` before hitting the `seekBarPoint`\\n\\n\\n    var spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx; // This is the space right of the `seekBarPoint` available within the bounds\\n    // of the player. We calculate the number of pixels from the `seekBarPoint`\\n    // to the right edge of the `SeekBar` and add to that any gap between the\\n    // right edge of the `SeekBar` and the player.\\n\\n    var spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right); // This is the number of pixels by which the tooltip will need to be pulled\\n    // further to the right to center it over the `seekBarPoint`.\\n\\n    var pullTooltipBy = tooltipRect.width / 2; // Adjust the `pullTooltipBy` distance to the left or right depending on\\n    // the results of the space calculations above.\\n\\n    if (spaceLeftOfPoint < pullTooltipBy) {\\n      pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\\n    } else if (spaceRightOfPoint < pullTooltipBy) {\\n      pullTooltipBy = spaceRightOfPoint;\\n    } // Due to the imprecision of decimal/ratio based calculations and varying\\n    // rounding behaviors, there are cases where the spacing adjustment is off\\n    // by a pixel or two. This adds insurance to these calculations.\\n\\n\\n    if (pullTooltipBy < 0) {\\n      pullTooltipBy = 0;\\n    } else if (pullTooltipBy > tooltipRect.width) {\\n      pullTooltipBy = tooltipRect.width;\\n    }\\n\\n    this.el_.style.right = \\\"-\\\" + pullTooltipBy + \\\"px\\\";\\n    this.write(content);\\n  }\\n  /**\\n   * Write the time to the tooltip DOM element.\\n   *\\n   * @param {string} content\\n   *        The formatted time for the tooltip.\\n   */\\n  ;\\n\\n  _proto.write = function write(content) {\\n    textContent(this.el_, content);\\n  }\\n  /**\\n   * Updates the position of the time tooltip relative to the `SeekBar`.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   *\\n   * @param {number} time\\n   *        The time to update the tooltip to, not used during live playback\\n   *\\n   * @param {Function} cb\\n   *        A function that will be called during the request animation frame\\n   *        for tooltips that need to do additional animations from the default\\n   */\\n  ;\\n\\n  _proto.updateTime = function updateTime(seekBarRect, seekBarPoint, time, cb) {\\n    var _this2 = this;\\n\\n    // If there is an existing rAF ID, cancel it so we don't over-queue.\\n    if (this.rafId_) {\\n      this.cancelAnimationFrame(this.rafId_);\\n    }\\n\\n    this.rafId_ = this.requestAnimationFrame(function () {\\n      var content;\\n\\n      var duration = _this2.player_.duration();\\n\\n      if (_this2.player_.liveTracker && _this2.player_.liveTracker.isLive()) {\\n        var liveWindow = _this2.player_.liveTracker.liveWindow();\\n\\n        var secondsBehind = liveWindow - seekBarPoint * liveWindow;\\n        content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\\n      } else {\\n        content = formatTime(time, duration);\\n      }\\n\\n      _this2.update(seekBarRect, seekBarPoint, content);\\n\\n      if (cb) {\\n        cb();\\n      }\\n    });\\n  };\\n\\n  return TimeTooltip;\\n}(Component);\\n\\nComponent.registerComponent('TimeTooltip', TimeTooltip);\\n\\n/**\\n * Used by {@link SeekBar} to display media playback progress as part of the\\n * {@link ProgressControl}.\\n *\\n * @extends Component\\n */\\n\\nvar PlayProgressBar = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlayProgressBar, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The {@link Player} that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PlayProgressBar(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\\n    return _this;\\n  }\\n  /**\\n   * Create the the DOM element for this class.\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = PlayProgressBar.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-play-progress vjs-slider-bar'\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n  }\\n  /**\\n   * Enqueues updates to its own DOM as well as the DOM of its\\n   * {@link TimeTooltip} child.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   */\\n  ;\\n\\n  _proto.update = function update(seekBarRect, seekBarPoint) {\\n    var timeTooltip = this.getChild('timeTooltip');\\n\\n    if (!timeTooltip) {\\n      return;\\n    }\\n\\n    var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\\n    timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\\n  };\\n\\n  return PlayProgressBar;\\n}(Component);\\n/**\\n * Default options for {@link PlayProgressBar}.\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nPlayProgressBar.prototype.options_ = {\\n  children: []\\n}; // Time tooltips should not be added to a player on mobile devices\\n\\nif (!IS_IOS && !IS_ANDROID) {\\n  PlayProgressBar.prototype.options_.children.push('timeTooltip');\\n}\\n\\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\\n\\n/**\\n * The {@link MouseTimeDisplay} component tracks mouse movement over the\\n * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\\n * indicating the time which is represented by a given point in the\\n * {@link ProgressControl}.\\n *\\n * @extends Component\\n */\\n\\nvar MouseTimeDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MouseTimeDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The {@link Player} that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function MouseTimeDisplay(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\\n    return _this;\\n  }\\n  /**\\n   * Create the DOM element for this class.\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = MouseTimeDisplay.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-mouse-display'\\n    });\\n  }\\n  /**\\n   * Enqueues updates to its own DOM as well as the DOM of its\\n   * {@link TimeTooltip} child.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   */\\n  ;\\n\\n  _proto.update = function update(seekBarRect, seekBarPoint) {\\n    var _this2 = this;\\n\\n    var time = seekBarPoint * this.player_.duration();\\n    this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, function () {\\n      _this2.el_.style.left = seekBarRect.width * seekBarPoint + \\\"px\\\";\\n    });\\n  };\\n\\n  return MouseTimeDisplay;\\n}(Component);\\n/**\\n * Default options for `MouseTimeDisplay`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nMouseTimeDisplay.prototype.options_ = {\\n  children: ['timeTooltip']\\n};\\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\\n\\nvar STEP_SECONDS = 5; // The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\\n\\nvar PAGE_KEY_MULTIPLIER = 12;\\n/**\\n * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\\n * as its `bar`.\\n *\\n * @extends Slider\\n */\\n\\nvar SeekBar = /*#__PURE__*/function (_Slider) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SeekBar, _Slider);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function SeekBar(player, options) {\\n    var _this;\\n\\n    _this = _Slider.call(this, player, options) || this;\\n\\n    _this.setEventHandlers_();\\n\\n    return _this;\\n  }\\n  /**\\n   * Sets the event handlers\\n   *\\n   * @private\\n   */\\n\\n\\n  var _proto = SeekBar.prototype;\\n\\n  _proto.setEventHandlers_ = function setEventHandlers_() {\\n    this.update_ = bind(this, this.update);\\n    this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\\n    this.on(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\\n\\n    if (this.player_.liveTracker) {\\n      this.on(this.player_.liveTracker, 'liveedgechange', this.update);\\n    } // when playing, let's ensure we smoothly update the play progress bar\\n    // via an interval\\n\\n\\n    this.updateInterval = null;\\n    this.on(this.player_, ['playing'], this.enableInterval_);\\n    this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableInterval_); // we don't need to update the play progress if the document is hidden,\\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\\n\\n    if ('hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.toggleVisibility_);\\n    }\\n  };\\n\\n  _proto.toggleVisibility_ = function toggleVisibility_(e) {\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.hidden) {\\n      this.disableInterval_(e);\\n    } else {\\n      this.enableInterval_(); // we just switched back to the page and someone may be looking, so, update ASAP\\n\\n      this.update();\\n    }\\n  };\\n\\n  _proto.enableInterval_ = function enableInterval_() {\\n    if (this.updateInterval) {\\n      return;\\n    }\\n\\n    this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\\n  };\\n\\n  _proto.disableInterval_ = function disableInterval_(e) {\\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e && e.type !== 'ended') {\\n      return;\\n    }\\n\\n    if (!this.updateInterval) {\\n      return;\\n    }\\n\\n    this.clearInterval(this.updateInterval);\\n    this.updateInterval = null;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Slider.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-progress-holder'\\n    }, {\\n      'aria-label': this.localize('Progress Bar')\\n    });\\n  }\\n  /**\\n   * This function updates the play progress bar and accessibility\\n   * attributes to whatever is passed in.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate` or `ended` event that caused this to run.\\n   *\\n   * @listens Player#timeupdate\\n   *\\n   * @return {number}\\n   *          The current percent at a number from 0-1\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var _this2 = this;\\n\\n    var percent = _Slider.prototype.update.call(this);\\n\\n    this.requestAnimationFrame(function () {\\n      var currentTime = _this2.player_.ended() ? _this2.player_.duration() : _this2.getCurrentTime_();\\n      var liveTracker = _this2.player_.liveTracker;\\n\\n      var duration = _this2.player_.duration();\\n\\n      if (liveTracker && liveTracker.isLive()) {\\n        duration = _this2.player_.liveTracker.liveCurrentTime();\\n      }\\n\\n      if (_this2.percent_ !== percent) {\\n        // machine readable value of progress bar (percentage complete)\\n        _this2.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\\n\\n        _this2.percent_ = percent;\\n      }\\n\\n      if (_this2.currentTime_ !== currentTime || _this2.duration_ !== duration) {\\n        // human readable value of progress bar (time complete)\\n        _this2.el_.setAttribute('aria-valuetext', _this2.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\\n\\n        _this2.currentTime_ = currentTime;\\n        _this2.duration_ = duration;\\n      } // update the progress bar time tooltip with the current time\\n\\n\\n      if (_this2.bar) {\\n        _this2.bar.update(getBoundingClientRect(_this2.el()), _this2.getProgress());\\n      }\\n    });\\n    return percent;\\n  }\\n  /**\\n   * Get the value of current time but allows for smooth scrubbing,\\n   * when player can't keep up.\\n   *\\n   * @return {number}\\n   *         The current time value to display\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.getCurrentTime_ = function getCurrentTime_() {\\n    return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\\n  }\\n  /**\\n   * Get the percentage of media played so far.\\n   *\\n   * @return {number}\\n   *         The percentage of media played so far (0 to 1).\\n   */\\n  ;\\n\\n  _proto.getPercent = function getPercent() {\\n    var currentTime = this.getCurrentTime_();\\n    var percent;\\n    var liveTracker = this.player_.liveTracker;\\n\\n    if (liveTracker && liveTracker.isLive()) {\\n      percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow(); // prevent the percent from changing at the live edge\\n\\n      if (liveTracker.atLiveEdge()) {\\n        percent = 1;\\n      }\\n    } else {\\n      percent = currentTime / this.player_.duration();\\n    }\\n\\n    return percent;\\n  }\\n  /**\\n   * Handle mouse down on seek bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousedown` event that caused this to run.\\n   *\\n   * @listens mousedown\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    } // Stop event propagation to prevent double fire in progress-control.js\\n\\n\\n    event.stopPropagation();\\n    this.player_.scrubbing(true);\\n    this.videoWasPlaying = !this.player_.paused();\\n    this.player_.pause();\\n\\n    _Slider.prototype.handleMouseDown.call(this, event);\\n  }\\n  /**\\n   * Handle mouse move on seek bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousemove` event that caused this to run.\\n   *\\n   * @listens mousemove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    }\\n\\n    var newTime;\\n    var distance = this.calculateDistance(event);\\n    var liveTracker = this.player_.liveTracker;\\n\\n    if (!liveTracker || !liveTracker.isLive()) {\\n      newTime = distance * this.player_.duration(); // Don't let video end while scrubbing.\\n\\n      if (newTime === this.player_.duration()) {\\n        newTime = newTime - 0.1;\\n      }\\n    } else {\\n      if (distance >= 0.99) {\\n        liveTracker.seekToLiveEdge();\\n        return;\\n      }\\n\\n      var seekableStart = liveTracker.seekableStart();\\n      var seekableEnd = liveTracker.liveCurrentTime();\\n      newTime = seekableStart + distance * liveTracker.liveWindow(); // Don't let video end while scrubbing.\\n\\n      if (newTime >= seekableEnd) {\\n        newTime = seekableEnd;\\n      } // Compensate for precision differences so that currentTime is not less\\n      // than seekable start\\n\\n\\n      if (newTime <= seekableStart) {\\n        newTime = seekableStart + 0.1;\\n      } // On android seekableEnd can be Infinity sometimes,\\n      // this will cause newTime to be Infinity, which is\\n      // not a valid currentTime.\\n\\n\\n      if (newTime === Infinity) {\\n        return;\\n      }\\n    } // Set new time (tell player to seek to new time)\\n\\n\\n    this.player_.currentTime(newTime);\\n  };\\n\\n  _proto.enable = function enable() {\\n    _Slider.prototype.enable.call(this);\\n\\n    var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\\n\\n    if (!mouseTimeDisplay) {\\n      return;\\n    }\\n\\n    mouseTimeDisplay.show();\\n  };\\n\\n  _proto.disable = function disable() {\\n    _Slider.prototype.disable.call(this);\\n\\n    var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\\n\\n    if (!mouseTimeDisplay) {\\n      return;\\n    }\\n\\n    mouseTimeDisplay.hide();\\n  }\\n  /**\\n   * Handle mouse up on seek bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseup` event that caused this to run.\\n   *\\n   * @listens mouseup\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp(event) {\\n    _Slider.prototype.handleMouseUp.call(this, event); // Stop event propagation to prevent double fire in progress-control.js\\n\\n\\n    if (event) {\\n      event.stopPropagation();\\n    }\\n\\n    this.player_.scrubbing(false);\\n    /**\\n     * Trigger timeupdate because we're done seeking and the time has changed.\\n     * This is particularly useful for if the player is paused to time the time displays.\\n     *\\n     * @event Tech#timeupdate\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.player_.trigger({\\n      type: 'timeupdate',\\n      target: this,\\n      manuallyTriggered: true\\n    });\\n\\n    if (this.videoWasPlaying) {\\n      silencePromise(this.player_.play());\\n    } else {\\n      // We're done seeking and the time has changed.\\n      // If the player is paused, make sure we display the correct time on the seek bar.\\n      this.update_();\\n    }\\n  }\\n  /**\\n   * Move more quickly fast forward for keyboard-only users\\n   */\\n  ;\\n\\n  _proto.stepForward = function stepForward() {\\n    this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS);\\n  }\\n  /**\\n   * Move more quickly rewind for keyboard-only users\\n   */\\n  ;\\n\\n  _proto.stepBack = function stepBack() {\\n    this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS);\\n  }\\n  /**\\n   * Toggles the playback state of the player\\n   * This gets called when enter or space is used on the seekbar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called\\n   *\\n   */\\n  ;\\n\\n  _proto.handleAction = function handleAction(event) {\\n    if (this.player_.paused()) {\\n      this.player_.play();\\n    } else {\\n      this.player_.pause();\\n    }\\n  }\\n  /**\\n   * Called when this SeekBar has focus and a key gets pressed down.\\n   * Supports the following keys:\\n   *\\n   *   Space or Enter key fire a click event\\n   *   Home key moves to start of the timeline\\n   *   End key moves to end of the timeline\\n   *   Digit \\\"0\\\" through \\\"9\\\" keys move to 0%, 10% ... 80%, 90% of the timeline\\n   *   PageDown key moves back a larger step than ArrowDown\\n   *   PageUp key moves forward a large step\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Enter')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.handleAction(event);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Home')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(0);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'End')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(this.player_.duration());\\n    } else if (/^[0-9]$/.test(keycode__WEBPACK_IMPORTED_MODULE_8___default()(event))) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var gotoFraction = (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.codes[keycode__WEBPACK_IMPORTED_MODULE_8___default()(event)] - keycode__WEBPACK_IMPORTED_MODULE_8___default.a.codes['0']) * 10.0 / 100.0;\\n      this.player_.currentTime(this.player_.duration() * gotoFraction);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'PgDn')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'PgUp')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS * PAGE_KEY_MULTIPLIER);\\n    } else {\\n      // Pass keydown handling up for unsupported keys\\n      _Slider.prototype.handleKeyDown.call(this, event);\\n    }\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.disableInterval_();\\n    this.off(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\\n\\n    if (this.player_.liveTracker) {\\n      this.on(this.player_.liveTracker, 'liveedgechange', this.update);\\n    }\\n\\n    this.off(this.player_, ['playing'], this.enableInterval_);\\n    this.off(this.player_, ['ended', 'pause', 'waiting'], this.disableInterval_); // we don't need to update the play progress if the document is hidden,\\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\\n\\n    if ('hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.toggleVisibility_);\\n    }\\n\\n    _Slider.prototype.dispose.call(this);\\n  };\\n\\n  return SeekBar;\\n}(Slider);\\n/**\\n * Default options for the `SeekBar`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nSeekBar.prototype.options_ = {\\n  children: ['loadProgressBar', 'playProgressBar'],\\n  barName: 'playProgressBar'\\n}; // MouseTimeDisplay tooltips should not be added to a player on mobile devices\\n\\nif (!IS_IOS && !IS_ANDROID) {\\n  SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');\\n}\\n\\nComponent.registerComponent('SeekBar', SeekBar);\\n\\n/**\\n * The Progress Control component contains the seek bar, load progress,\\n * and play progress.\\n *\\n * @extends Component\\n */\\n\\nvar ProgressControl = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ProgressControl, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function ProgressControl(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.handleMouseMove = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\\n    _this.throttledHandleMouseSeek = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\\n\\n    _this.enable();\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = ProgressControl.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-progress-control vjs-control'\\n    });\\n  }\\n  /**\\n   * When the mouse moves over the `ProgressControl`, the pointer position\\n   * gets passed down to the `MouseTimeDisplay` component.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousemove` event that caused this function to run.\\n   *\\n   * @listen mousemove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (!seekBar) {\\n      return;\\n    }\\n\\n    var playProgressBar = seekBar.getChild('playProgressBar');\\n    var mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\\n\\n    if (!playProgressBar && !mouseTimeDisplay) {\\n      return;\\n    }\\n\\n    var seekBarEl = seekBar.el();\\n    var seekBarRect = getBoundingClientRect(seekBarEl);\\n    var seekBarPoint = getPointerPosition(seekBarEl, event).x; // The default skin has a gap on either side of the `SeekBar`. This means\\n    // that it's possible to trigger this behavior outside the boundaries of\\n    // the `SeekBar`. This ensures we stay within it at all times.\\n\\n    seekBarPoint = clamp(0, 1, seekBarPoint);\\n\\n    if (mouseTimeDisplay) {\\n      mouseTimeDisplay.update(seekBarRect, seekBarPoint);\\n    }\\n\\n    if (playProgressBar) {\\n      playProgressBar.update(seekBarRect, seekBar.getProgress());\\n    }\\n  }\\n  /**\\n   * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\\n   *\\n   * @method ProgressControl#throttledHandleMouseSeek\\n   * @param {EventTarget~Event} event\\n   *        The `mousemove` event that caused this function to run.\\n   *\\n   * @listen mousemove\\n   * @listen touchmove\\n   */\\n\\n  /**\\n   * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousemove\\n   * @listens touchmove\\n   */\\n  ;\\n\\n  _proto.handleMouseSeek = function handleMouseSeek(event) {\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (seekBar) {\\n      seekBar.handleMouseMove(event);\\n    }\\n  }\\n  /**\\n   * Are controls are currently enabled for this progress control.\\n   *\\n   * @return {boolean}\\n   *         true if controls are enabled, false otherwise\\n   */\\n  ;\\n\\n  _proto.enabled = function enabled() {\\n    return this.enabled_;\\n  }\\n  /**\\n   * Disable all controls on the progress control and its children\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    this.children().forEach(function (child) {\\n      return child.disable && child.disable();\\n    });\\n\\n    if (!this.enabled()) {\\n      return;\\n    }\\n\\n    this.off(['mousedown', 'touchstart'], this.handleMouseDown);\\n    this.off(this.el_, 'mousemove', this.handleMouseMove);\\n    this.handleMouseUp();\\n    this.addClass('disabled');\\n    this.enabled_ = false;\\n  }\\n  /**\\n   * Enable all controls on the progress control and its children\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    this.children().forEach(function (child) {\\n      return child.enable && child.enable();\\n    });\\n\\n    if (this.enabled()) {\\n      return;\\n    }\\n\\n    this.on(['mousedown', 'touchstart'], this.handleMouseDown);\\n    this.on(this.el_, 'mousemove', this.handleMouseMove);\\n    this.removeClass('disabled');\\n    this.enabled_ = true;\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    var doc = this.el_.ownerDocument;\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (seekBar) {\\n      seekBar.handleMouseDown(event);\\n    }\\n\\n    this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\\n    this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\\n    this.on(doc, 'mouseup', this.handleMouseUp);\\n    this.on(doc, 'touchend', this.handleMouseUp);\\n  }\\n  /**\\n   * Handle `mouseup` or `touchend` events on the `ProgressControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mouseup` or `touchend` event that triggered this function.\\n   *\\n   * @listens touchend\\n   * @listens mouseup\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp(event) {\\n    var doc = this.el_.ownerDocument;\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (seekBar) {\\n      seekBar.handleMouseUp(event);\\n    }\\n\\n    this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\\n    this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n  };\\n\\n  return ProgressControl;\\n}(Component);\\n/**\\n * Default options for `ProgressControl`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nProgressControl.prototype.options_ = {\\n  children: ['seekBar']\\n};\\nComponent.registerComponent('ProgressControl', ProgressControl);\\n\\n/**\\n * Toggle Picture-in-Picture mode\\n *\\n * @extends Button\\n */\\n\\nvar PictureInPictureToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PictureInPictureToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @listens Player#enterpictureinpicture\\n   * @listens Player#leavepictureinpicture\\n   */\\n  function PictureInPictureToggle(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], _this.handlePictureInPictureChange); // TODO: Activate button on player loadedmetadata event.\\n    // TODO: Deactivate button on player emptied event.\\n    // TODO: Deactivate button if disablepictureinpicture attribute is present.\\n\\n\\n    if (!global_document__WEBPACK_IMPORTED_MODULE_1___default.a.pictureInPictureEnabled) {\\n      _this.disable();\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = PictureInPictureToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-picture-in-picture-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\\n   *        called.\\n   *\\n   * @listens Player#enterpictureinpicture\\n   * @listens Player#leavepictureinpicture\\n   */\\n  ;\\n\\n  _proto.handlePictureInPictureChange = function handlePictureInPictureChange(event) {\\n    if (this.player_.isInPictureInPicture()) {\\n      this.controlText('Exit Picture-in-Picture');\\n    } else {\\n      this.controlText('Picture-in-Picture');\\n    }\\n  }\\n  /**\\n   * This gets called when an `PictureInPictureToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (!this.player_.isInPictureInPicture()) {\\n      this.player_.requestPictureInPicture();\\n    } else {\\n      this.player_.exitPictureInPicture();\\n    }\\n  };\\n\\n  return PictureInPictureToggle;\\n}(Button);\\n/**\\n * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\\nComponent.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\\n\\n/**\\n * Toggle fullscreen video\\n *\\n * @extends Button\\n */\\n\\nvar FullscreenToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(FullscreenToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function FullscreenToggle(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.on(player, 'fullscreenchange', _this.handleFullscreenChange);\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a[player.fsApi_.fullscreenEnabled] === false) {\\n      _this.disable();\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = FullscreenToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-fullscreen-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Handles fullscreenchange on the player and change control text accordingly.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#fullscreenchange} event that caused this function to be\\n   *        called.\\n   *\\n   * @listens Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.handleFullscreenChange = function handleFullscreenChange(event) {\\n    if (this.player_.isFullscreen()) {\\n      this.controlText('Non-Fullscreen');\\n    } else {\\n      this.controlText('Fullscreen');\\n    }\\n  }\\n  /**\\n   * This gets called when an `FullscreenToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (!this.player_.isFullscreen()) {\\n      this.player_.requestFullscreen();\\n    } else {\\n      this.player_.exitFullscreen();\\n    }\\n  };\\n\\n  return FullscreenToggle;\\n}(Button);\\n/**\\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\\n\\n/**\\n * Check if volume control is supported and if it isn't hide the\\n * `Component` that was passed  using the `vjs-hidden` class.\\n *\\n * @param {Component} self\\n *        The component that should be hidden if volume is unsupported\\n *\\n * @param {Player} player\\n *        A reference to the player\\n *\\n * @private\\n */\\nvar checkVolumeSupport = function checkVolumeSupport(self, player) {\\n  // hide volume controls when they're not supported by the current tech\\n  if (player.tech_ && !player.tech_.featuresVolumeControl) {\\n    self.addClass('vjs-hidden');\\n  }\\n\\n  self.on(player, 'loadstart', function () {\\n    if (!player.tech_.featuresVolumeControl) {\\n      self.addClass('vjs-hidden');\\n    } else {\\n      self.removeClass('vjs-hidden');\\n    }\\n  });\\n};\\n\\n/**\\n * Shows volume level\\n *\\n * @extends Component\\n */\\n\\nvar VolumeLevel = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumeLevel, _Component);\\n\\n  function VolumeLevel() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = VolumeLevel.prototype;\\n\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-volume-level',\\n      innerHTML: '<span class=\\\"vjs-control-text\\\"></span>'\\n    });\\n  };\\n\\n  return VolumeLevel;\\n}(Component);\\n\\nComponent.registerComponent('VolumeLevel', VolumeLevel);\\n\\n/**\\n * The bar that contains the volume level and can be clicked on to adjust the level\\n *\\n * @extends Slider\\n */\\n\\nvar VolumeBar = /*#__PURE__*/function (_Slider) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumeBar, _Slider);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function VolumeBar(player, options) {\\n    var _this;\\n\\n    _this = _Slider.call(this, player, options) || this;\\n\\n    _this.on('slideractive', _this.updateLastVolume_);\\n\\n    _this.on(player, 'volumechange', _this.updateARIAAttributes);\\n\\n    player.ready(function () {\\n      return _this.updateARIAAttributes();\\n    });\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = VolumeBar.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Slider.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-volume-bar vjs-slider-bar'\\n    }, {\\n      'aria-label': this.localize('Volume Level'),\\n      'aria-live': 'polite'\\n    });\\n  }\\n  /**\\n   * Handle mouse down on volume bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousedown` event that caused this to run.\\n   *\\n   * @listens mousedown\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    }\\n\\n    _Slider.prototype.handleMouseDown.call(this, event);\\n  }\\n  /**\\n   * Handle movement events on the {@link VolumeMenuButton}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run.\\n   *\\n   * @listens mousemove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    }\\n\\n    this.checkMuted();\\n    this.player_.volume(this.calculateDistance(event));\\n  }\\n  /**\\n   * If the player is muted unmute it.\\n   */\\n  ;\\n\\n  _proto.checkMuted = function checkMuted() {\\n    if (this.player_.muted()) {\\n      this.player_.muted(false);\\n    }\\n  }\\n  /**\\n   * Get percent of volume level\\n   *\\n   * @return {number}\\n   *         Volume level percent as a decimal number.\\n   */\\n  ;\\n\\n  _proto.getPercent = function getPercent() {\\n    if (this.player_.muted()) {\\n      return 0;\\n    }\\n\\n    return this.player_.volume();\\n  }\\n  /**\\n   * Increase volume level for keyboard users\\n   */\\n  ;\\n\\n  _proto.stepForward = function stepForward() {\\n    this.checkMuted();\\n    this.player_.volume(this.player_.volume() + 0.1);\\n  }\\n  /**\\n   * Decrease volume level for keyboard users\\n   */\\n  ;\\n\\n  _proto.stepBack = function stepBack() {\\n    this.checkMuted();\\n    this.player_.volume(this.player_.volume() - 0.1);\\n  }\\n  /**\\n   * Update ARIA accessibility attributes\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `volumechange` event that caused this function to run.\\n   *\\n   * @listens Player#volumechange\\n   */\\n  ;\\n\\n  _proto.updateARIAAttributes = function updateARIAAttributes(event) {\\n    var ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\\n    this.el_.setAttribute('aria-valuenow', ariaValue);\\n    this.el_.setAttribute('aria-valuetext', ariaValue + '%');\\n  }\\n  /**\\n   * Returns the current value of the player volume as a percentage\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.volumeAsPercentage_ = function volumeAsPercentage_() {\\n    return Math.round(this.player_.volume() * 100);\\n  }\\n  /**\\n   * When user starts dragging the VolumeBar, store the volume and listen for\\n   * the end of the drag. When the drag ends, if the volume was set to zero,\\n   * set lastVolume to the stored volume.\\n   *\\n   * @listens slideractive\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateLastVolume_ = function updateLastVolume_() {\\n    var _this2 = this;\\n\\n    var volumeBeforeDrag = this.player_.volume();\\n    this.one('sliderinactive', function () {\\n      if (_this2.player_.volume() === 0) {\\n        _this2.player_.lastVolume_(volumeBeforeDrag);\\n      }\\n    });\\n  };\\n\\n  return VolumeBar;\\n}(Slider);\\n/**\\n * Default options for the `VolumeBar`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nVolumeBar.prototype.options_ = {\\n  children: ['volumeLevel'],\\n  barName: 'volumeLevel'\\n};\\n/**\\n * Call the update event for this Slider when this event happens on the player.\\n *\\n * @type {string}\\n */\\n\\nVolumeBar.prototype.playerEvent = 'volumechange';\\nComponent.registerComponent('VolumeBar', VolumeBar);\\n\\n/**\\n * The component for controlling the volume level\\n *\\n * @extends Component\\n */\\n\\nvar VolumeControl = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumeControl, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function VolumeControl(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    options.vertical = options.vertical || false; // Pass the vertical option down to the VolumeBar if\\n    // the VolumeBar is turned on.\\n\\n    if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\\n      options.volumeBar = options.volumeBar || {};\\n      options.volumeBar.vertical = options.vertical;\\n    }\\n\\n    _this = _Component.call(this, player, options) || this; // hide this control if volume support is missing\\n\\n    checkVolumeSupport(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), player);\\n    _this.throttledHandleMouseMove = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\\n\\n    _this.on('mousedown', _this.handleMouseDown);\\n\\n    _this.on('touchstart', _this.handleMouseDown); // while the slider is active (the mouse has been pressed down and\\n    // is dragging) or in focus we do not want to hide the VolumeBar\\n\\n\\n    _this.on(_this.volumeBar, ['focus', 'slideractive'], function () {\\n      _this.volumeBar.addClass('vjs-slider-active');\\n\\n      _this.addClass('vjs-slider-active');\\n\\n      _this.trigger('slideractive');\\n    });\\n\\n    _this.on(_this.volumeBar, ['blur', 'sliderinactive'], function () {\\n      _this.volumeBar.removeClass('vjs-slider-active');\\n\\n      _this.removeClass('vjs-slider-active');\\n\\n      _this.trigger('sliderinactive');\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = VolumeControl.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    var orientationClass = 'vjs-volume-horizontal';\\n\\n    if (this.options_.vertical) {\\n      orientationClass = 'vjs-volume-vertical';\\n    }\\n\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: \\\"vjs-volume-control vjs-control \\\" + orientationClass\\n    });\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    var doc = this.el_.ownerDocument;\\n    this.on(doc, 'mousemove', this.throttledHandleMouseMove);\\n    this.on(doc, 'touchmove', this.throttledHandleMouseMove);\\n    this.on(doc, 'mouseup', this.handleMouseUp);\\n    this.on(doc, 'touchend', this.handleMouseUp);\\n  }\\n  /**\\n   * Handle `mouseup` or `touchend` events on the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mouseup` or `touchend` event that triggered this function.\\n   *\\n   * @listens touchend\\n   * @listens mouseup\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp(event) {\\n    var doc = this.el_.ownerDocument;\\n    this.off(doc, 'mousemove', this.throttledHandleMouseMove);\\n    this.off(doc, 'touchmove', this.throttledHandleMouseMove);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    this.volumeBar.handleMouseMove(event);\\n  };\\n\\n  return VolumeControl;\\n}(Component);\\n/**\\n * Default options for the `VolumeControl`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nVolumeControl.prototype.options_ = {\\n  children: ['volumeBar']\\n};\\nComponent.registerComponent('VolumeControl', VolumeControl);\\n\\n/**\\n * Check if muting volume is supported and if it isn't hide the mute toggle\\n * button.\\n *\\n * @param {Component} self\\n *        A reference to the mute toggle button\\n *\\n * @param {Player} player\\n *        A reference to the player\\n *\\n * @private\\n */\\nvar checkMuteSupport = function checkMuteSupport(self, player) {\\n  // hide mute toggle button if it's not supported by the current tech\\n  if (player.tech_ && !player.tech_.featuresMuteControl) {\\n    self.addClass('vjs-hidden');\\n  }\\n\\n  self.on(player, 'loadstart', function () {\\n    if (!player.tech_.featuresMuteControl) {\\n      self.addClass('vjs-hidden');\\n    } else {\\n      self.removeClass('vjs-hidden');\\n    }\\n  });\\n};\\n\\n/**\\n * A button component for muting the audio.\\n *\\n * @extends Button\\n */\\n\\nvar MuteToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MuteToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function MuteToggle(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this; // hide this control if volume support is missing\\n\\n    checkMuteSupport(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), player);\\n\\n    _this.on(player, ['loadstart', 'volumechange'], _this.update);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = MuteToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-mute-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * This gets called when an `MuteToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var vol = this.player_.volume();\\n    var lastVolume = this.player_.lastVolume_();\\n\\n    if (vol === 0) {\\n      var volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\\n      this.player_.volume(volumeToSet);\\n      this.player_.muted(false);\\n    } else {\\n      this.player_.muted(this.player_.muted() ? false : true);\\n    }\\n  }\\n  /**\\n   * Update the `MuteToggle` button based on the state of `volume` and `muted`\\n   * on the player.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#loadstart} event if this function was called\\n   *        through an event.\\n   *\\n   * @listens Player#loadstart\\n   * @listens Player#volumechange\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    this.updateIcon_();\\n    this.updateControlText_();\\n  }\\n  /**\\n   * Update the appearance of the `MuteToggle` icon.\\n   *\\n   * Possible states (given `level` variable below):\\n   * - 0: crossed out\\n   * - 1: zero bars of volume\\n   * - 2: one bar of volume\\n   * - 3: two bars of volume\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateIcon_ = function updateIcon_() {\\n    var vol = this.player_.volume();\\n    var level = 3; // in iOS when a player is loaded with muted attribute\\n    // and volume is changed with a native mute button\\n    // we want to make sure muted state is updated\\n\\n    if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\\n      this.player_.muted(this.player_.tech_.el_.muted);\\n    }\\n\\n    if (vol === 0 || this.player_.muted()) {\\n      level = 0;\\n    } else if (vol < 0.33) {\\n      level = 1;\\n    } else if (vol < 0.67) {\\n      level = 2;\\n    } // TODO improve muted icon classes\\n\\n\\n    for (var i = 0; i < 4; i++) {\\n      removeClass(this.el_, \\\"vjs-vol-\\\" + i);\\n    }\\n\\n    addClass(this.el_, \\\"vjs-vol-\\\" + level);\\n  }\\n  /**\\n   * If `muted` has changed on the player, update the control text\\n   * (`title` attribute on `vjs-mute-control` element and content of\\n   * `vjs-control-text` element).\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateControlText_ = function updateControlText_() {\\n    var soundOff = this.player_.muted() || this.player_.volume() === 0;\\n    var text = soundOff ? 'Unmute' : 'Mute';\\n\\n    if (this.controlText() !== text) {\\n      this.controlText(text);\\n    }\\n  };\\n\\n  return MuteToggle;\\n}(Button);\\n/**\\n * The text that should display over the `MuteToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nMuteToggle.prototype.controlText_ = 'Mute';\\nComponent.registerComponent('MuteToggle', MuteToggle);\\n\\n/**\\n * A Component to contain the MuteToggle and VolumeControl so that\\n * they can work together.\\n *\\n * @extends Component\\n */\\n\\nvar VolumePanel = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumePanel, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function VolumePanel(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (typeof options.inline !== 'undefined') {\\n      options.inline = options.inline;\\n    } else {\\n      options.inline = true;\\n    } // pass the inline option down to the VolumeControl as vertical if\\n    // the VolumeControl is on.\\n\\n\\n    if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\\n      options.volumeControl = options.volumeControl || {};\\n      options.volumeControl.vertical = !options.inline;\\n    }\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.on(player, ['loadstart'], _this.volumePanelState_);\\n\\n    _this.on(_this.muteToggle, 'keyup', _this.handleKeyPress);\\n\\n    _this.on(_this.volumeControl, 'keyup', _this.handleVolumeControlKeyUp);\\n\\n    _this.on('keydown', _this.handleKeyPress);\\n\\n    _this.on('mouseover', _this.handleMouseOver);\\n\\n    _this.on('mouseout', _this.handleMouseOut); // while the slider is active (the mouse has been pressed down and\\n    // is dragging) we do not want to hide the VolumeBar\\n\\n\\n    _this.on(_this.volumeControl, ['slideractive'], _this.sliderActive_);\\n\\n    _this.on(_this.volumeControl, ['sliderinactive'], _this.sliderInactive_);\\n\\n    return _this;\\n  }\\n  /**\\n   * Add vjs-slider-active class to the VolumePanel\\n   *\\n   * @listens VolumeControl#slideractive\\n   * @private\\n   */\\n\\n\\n  var _proto = VolumePanel.prototype;\\n\\n  _proto.sliderActive_ = function sliderActive_() {\\n    this.addClass('vjs-slider-active');\\n  }\\n  /**\\n   * Removes vjs-slider-active class to the VolumePanel\\n   *\\n   * @listens VolumeControl#sliderinactive\\n   * @private\\n   */\\n  ;\\n\\n  _proto.sliderInactive_ = function sliderInactive_() {\\n    this.removeClass('vjs-slider-active');\\n  }\\n  /**\\n   * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\\n   * depending on MuteToggle and VolumeControl state\\n   *\\n   * @listens Player#loadstart\\n   * @private\\n   */\\n  ;\\n\\n  _proto.volumePanelState_ = function volumePanelState_() {\\n    // hide volume panel if neither volume control or mute toggle\\n    // are displayed\\n    if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\\n      this.addClass('vjs-hidden');\\n    } // if only mute toggle is visible we don't want\\n    // volume panel expanding when hovered or active\\n\\n\\n    if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\\n      this.addClass('vjs-mute-toggle-only');\\n    }\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var orientationClass = 'vjs-volume-panel-horizontal';\\n\\n    if (!this.options_.inline) {\\n      orientationClass = 'vjs-volume-panel-vertical';\\n    }\\n\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: \\\"vjs-volume-panel vjs-control \\\" + orientationClass\\n    });\\n  }\\n  /**\\n   * Dispose of the `volume-panel` and all child components.\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.handleMouseOut();\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\\n   * the volume panel and sets focus on `MuteToggle`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keyup` event that caused this function to be called.\\n   *\\n   * @listens keyup\\n   */\\n  ;\\n\\n  _proto.handleVolumeControlKeyUp = function handleVolumeControlKeyUp(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      this.muteToggle.focus();\\n    }\\n  }\\n  /**\\n   * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\\n   * Turns on listening for `mouseover` event. When they happen it\\n   * calls `this.handleMouseOver`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseover` event that caused this function to be called.\\n   *\\n   * @listens mouseover\\n   */\\n  ;\\n\\n  _proto.handleMouseOver = function handleMouseOver(event) {\\n    this.addClass('vjs-hover');\\n    on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(this, this.handleKeyPress));\\n  }\\n  /**\\n   * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\\n   * Turns on listening for `mouseout` event. When they happen it\\n   * calls `this.handleMouseOut`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseout` event that caused this function to be called.\\n   *\\n   * @listens mouseout\\n   */\\n  ;\\n\\n  _proto.handleMouseOut = function handleMouseOut(event) {\\n    this.removeClass('vjs-hover');\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(this, this.handleKeyPress));\\n  }\\n  /**\\n   * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\\n   * looking for ESC, which hides the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The keypress that triggered this event.\\n   *\\n   * @listens keydown | keyup\\n   */\\n  ;\\n\\n  _proto.handleKeyPress = function handleKeyPress(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      this.handleMouseOut();\\n    }\\n  };\\n\\n  return VolumePanel;\\n}(Component);\\n/**\\n * Default options for the `VolumeControl`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nVolumePanel.prototype.options_ = {\\n  children: ['muteToggle', 'volumeControl']\\n};\\nComponent.registerComponent('VolumePanel', VolumePanel);\\n\\n/**\\n * The Menu component is used to build popup menus, including subtitle and\\n * captions selection menus.\\n *\\n * @extends Component\\n */\\n\\nvar Menu = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Menu, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        the player that this component should attach to\\n   *\\n   * @param {Object} [options]\\n   *        Object of option names and values\\n   *\\n   */\\n  function Menu(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    if (options) {\\n      _this.menuButton_ = options.menuButton;\\n    }\\n\\n    _this.focusedChild_ = -1;\\n\\n    _this.on('keydown', _this.handleKeyDown); // All the menu item instances share the same blur handler provided by the menu container.\\n\\n\\n    _this.boundHandleBlur_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleBlur);\\n    _this.boundHandleTapClick_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleTapClick);\\n    return _this;\\n  }\\n  /**\\n   * Add event listeners to the {@link MenuItem}.\\n   *\\n   * @param {Object} component\\n   *        The instance of the `MenuItem` to add listeners to.\\n   *\\n   */\\n\\n\\n  var _proto = Menu.prototype;\\n\\n  _proto.addEventListenerForItem = function addEventListenerForItem(component) {\\n    if (!(component instanceof Component)) {\\n      return;\\n    }\\n\\n    this.on(component, 'blur', this.boundHandleBlur_);\\n    this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\\n  }\\n  /**\\n   * Remove event listeners from the {@link MenuItem}.\\n   *\\n   * @param {Object} component\\n   *        The instance of the `MenuItem` to remove listeners.\\n   *\\n   */\\n  ;\\n\\n  _proto.removeEventListenerForItem = function removeEventListenerForItem(component) {\\n    if (!(component instanceof Component)) {\\n      return;\\n    }\\n\\n    this.off(component, 'blur', this.boundHandleBlur_);\\n    this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\\n  }\\n  /**\\n   * This method will be called indirectly when the component has been added\\n   * before the component adds to the new menu instance by `addItem`.\\n   * In this case, the original menu instance will remove the component\\n   * by calling `removeChild`.\\n   *\\n   * @param {Object} component\\n   *        The instance of the `MenuItem`\\n   */\\n  ;\\n\\n  _proto.removeChild = function removeChild(component) {\\n    if (typeof component === 'string') {\\n      component = this.getChild(component);\\n    }\\n\\n    this.removeEventListenerForItem(component);\\n\\n    _Component.prototype.removeChild.call(this, component);\\n  }\\n  /**\\n   * Add a {@link MenuItem} to the menu.\\n   *\\n   * @param {Object|string} component\\n   *        The name or instance of the `MenuItem` to add.\\n   *\\n   */\\n  ;\\n\\n  _proto.addItem = function addItem(component) {\\n    var childComponent = this.addChild(component);\\n\\n    if (childComponent) {\\n      this.addEventListenerForItem(childComponent);\\n    }\\n  }\\n  /**\\n   * Create the `Menu`s DOM element.\\n   *\\n   * @return {Element}\\n   *         the element that was created\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1() {\\n    var contentElType = this.options_.contentElType || 'ul';\\n    this.contentEl_ = createEl(contentElType, {\\n      className: 'vjs-menu-content'\\n    });\\n    this.contentEl_.setAttribute('role', 'menu');\\n\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      append: this.contentEl_,\\n      className: 'vjs-menu'\\n    });\\n\\n    el.appendChild(this.contentEl_); // Prevent clicks from bubbling up. Needed for Menu Buttons,\\n    // where a click on the parent is significant\\n\\n    on(el, 'click', function (event) {\\n      event.preventDefault();\\n      event.stopImmediatePropagation();\\n    });\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n    this.boundHandleBlur_ = null;\\n    this.boundHandleTapClick_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Called when a `MenuItem` loses focus.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `blur` event that caused this function to be called.\\n   *\\n   * @listens blur\\n   */\\n  ;\\n\\n  _proto.handleBlur = function handleBlur(event) {\\n    var relatedTarget = event.relatedTarget || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement; // Close menu popup when a user clicks outside the menu\\n\\n    if (!this.children().some(function (element) {\\n      return element.el() === relatedTarget;\\n    })) {\\n      var btn = this.menuButton_;\\n\\n      if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\\n        btn.unpressButton();\\n      }\\n    }\\n  }\\n  /**\\n   * Called when a `MenuItem` gets clicked or tapped.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `click` or `tap` event that caused this function to be called.\\n   *\\n   * @listens click,tap\\n   */\\n  ;\\n\\n  _proto.handleTapClick = function handleTapClick(event) {\\n    // Unpress the associated MenuButton, and move focus back to it\\n    if (this.menuButton_) {\\n      this.menuButton_.unpressButton();\\n      var childComponents = this.children();\\n\\n      if (!Array.isArray(childComponents)) {\\n        return;\\n      }\\n\\n      var foundComponent = childComponents.filter(function (component) {\\n        return component.el() === event.target;\\n      })[0];\\n\\n      if (!foundComponent) {\\n        return;\\n      } // don't focus menu button if item is a caption settings item\\n      // because focus will move elsewhere\\n\\n\\n      if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\\n        this.menuButton_.focus();\\n      }\\n    }\\n  }\\n  /**\\n   * Handle a `keydown` event on this menu. This listener is added in the constructor.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        A `keydown` event that happened on the menu.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Left and Down Arrows\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Left') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Down')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepForward(); // Up and Right Arrows\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Right') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Up')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepBack();\\n    }\\n  }\\n  /**\\n   * Move to next (lower) menu item for keyboard users.\\n   */\\n  ;\\n\\n  _proto.stepForward = function stepForward() {\\n    var stepChild = 0;\\n\\n    if (this.focusedChild_ !== undefined) {\\n      stepChild = this.focusedChild_ + 1;\\n    }\\n\\n    this.focus(stepChild);\\n  }\\n  /**\\n   * Move to previous (higher) menu item for keyboard users.\\n   */\\n  ;\\n\\n  _proto.stepBack = function stepBack() {\\n    var stepChild = 0;\\n\\n    if (this.focusedChild_ !== undefined) {\\n      stepChild = this.focusedChild_ - 1;\\n    }\\n\\n    this.focus(stepChild);\\n  }\\n  /**\\n   * Set focus on a {@link MenuItem} in the `Menu`.\\n   *\\n   * @param {Object|string} [item=0]\\n   *        Index of child item set focus on.\\n   */\\n  ;\\n\\n  _proto.focus = function focus(item) {\\n    if (item === void 0) {\\n      item = 0;\\n    }\\n\\n    var children = this.children().slice();\\n    var haveTitle = children.length && children[0].className && /vjs-menu-title/.test(children[0].className);\\n\\n    if (haveTitle) {\\n      children.shift();\\n    }\\n\\n    if (children.length > 0) {\\n      if (item < 0) {\\n        item = 0;\\n      } else if (item >= children.length) {\\n        item = children.length - 1;\\n      }\\n\\n      this.focusedChild_ = item;\\n      children[item].el_.focus();\\n    }\\n  };\\n\\n  return Menu;\\n}(Component);\\n\\nComponent.registerComponent('Menu', Menu);\\n\\n/**\\n * A `MenuButton` class for any popup {@link Menu}.\\n *\\n * @extends Component\\n */\\n\\nvar MenuButton = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MenuButton, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function MenuButton(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.menuButton_ = new Button(player, options);\\n\\n    _this.menuButton_.controlText(_this.controlText_);\\n\\n    _this.menuButton_.el_.setAttribute('aria-haspopup', 'true'); // Add buildCSSClass values to the button, not the wrapper\\n\\n\\n    var buttonClass = Button.prototype.buildCSSClass();\\n    _this.menuButton_.el_.className = _this.buildCSSClass() + ' ' + buttonClass;\\n\\n    _this.menuButton_.removeClass('vjs-control');\\n\\n    _this.addChild(_this.menuButton_);\\n\\n    _this.update();\\n\\n    _this.enabled_ = true;\\n\\n    _this.on(_this.menuButton_, 'tap', _this.handleClick);\\n\\n    _this.on(_this.menuButton_, 'click', _this.handleClick);\\n\\n    _this.on(_this.menuButton_, 'keydown', _this.handleKeyDown);\\n\\n    _this.on(_this.menuButton_, 'mouseenter', function () {\\n      _this.addClass('vjs-hover');\\n\\n      _this.menu.show();\\n\\n      on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMenuKeyUp));\\n    });\\n\\n    _this.on('mouseleave', _this.handleMouseLeave);\\n\\n    _this.on('keydown', _this.handleSubmenuKeyDown);\\n\\n    return _this;\\n  }\\n  /**\\n   * Update the menu based on the current state of its items.\\n   */\\n\\n\\n  var _proto = MenuButton.prototype;\\n\\n  _proto.update = function update() {\\n    var menu = this.createMenu();\\n\\n    if (this.menu) {\\n      this.menu.dispose();\\n      this.removeChild(this.menu);\\n    }\\n\\n    this.menu = menu;\\n    this.addChild(menu);\\n    /**\\n     * Track the state of the menu button\\n     *\\n     * @type {Boolean}\\n     * @private\\n     */\\n\\n    this.buttonPressed_ = false;\\n    this.menuButton_.el_.setAttribute('aria-expanded', 'false');\\n\\n    if (this.items && this.items.length <= this.hideThreshold_) {\\n      this.hide();\\n    } else {\\n      this.show();\\n    }\\n  }\\n  /**\\n   * Create the menu and add all items to it.\\n   *\\n   * @return {Menu}\\n   *         The constructed menu\\n   */\\n  ;\\n\\n  _proto.createMenu = function createMenu() {\\n    var menu = new Menu(this.player_, {\\n      menuButton: this\\n    });\\n    /**\\n     * Hide the menu if the number of items is less than or equal to this threshold. This defaults\\n     * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\\n     * it here because every time we run `createMenu` we need to reset the value.\\n     *\\n     * @protected\\n     * @type {Number}\\n     */\\n\\n    this.hideThreshold_ = 0; // Add a title list item to the top\\n\\n    if (this.options_.title) {\\n      var titleEl = createEl('li', {\\n        className: 'vjs-menu-title',\\n        innerHTML: toTitleCase(this.options_.title),\\n        tabIndex: -1\\n      });\\n      this.hideThreshold_ += 1;\\n      var titleComponent = new Component(this.player_, {\\n        el: titleEl\\n      });\\n      menu.addItem(titleComponent);\\n    }\\n\\n    this.items = this.createItems();\\n\\n    if (this.items) {\\n      // Add menu items to the menu\\n      for (var i = 0; i < this.items.length; i++) {\\n        menu.addItem(this.items[i]);\\n      }\\n    }\\n\\n    return menu;\\n  }\\n  /**\\n   * Create the list of menu items. Specific to each subclass.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {}\\n  /**\\n   * Create the `MenuButtons`s DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: this.buildWrapperCSSClass()\\n    }, {});\\n  }\\n  /**\\n   * Allow sub components to stack CSS class names for the wrapper element\\n   *\\n   * @return {string}\\n   *         The constructed wrapper DOM `className`\\n   */\\n  ;\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\\n\\n    if (this.options_.inline === true) {\\n      menuButtonClass += '-inline';\\n    } else {\\n      menuButtonClass += '-popup';\\n    } // TODO: Fix the CSS so that this isn't necessary\\n\\n\\n    var buttonClass = Button.prototype.buildCSSClass();\\n    return \\\"vjs-menu-button \\\" + menuButtonClass + \\\" \\\" + buttonClass + \\\" \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\\n\\n    if (this.options_.inline === true) {\\n      menuButtonClass += '-inline';\\n    } else {\\n      menuButtonClass += '-popup';\\n    }\\n\\n    return \\\"vjs-menu-button \\\" + menuButtonClass + \\\" \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Get or set the localized control text that will be used for accessibility.\\n   *\\n   * > NOTE: This will come from the internal `menuButton_` element.\\n   *\\n   * @param {string} [text]\\n   *        Control text for element.\\n   *\\n   * @param {Element} [el=this.menuButton_.el()]\\n   *        Element to set the title on.\\n   *\\n   * @return {string}\\n   *         - The control text when getting\\n   */\\n  ;\\n\\n  _proto.controlText = function controlText(text, el) {\\n    if (el === void 0) {\\n      el = this.menuButton_.el();\\n    }\\n\\n    return this.menuButton_.controlText(text, el);\\n  }\\n  /**\\n   * Dispose of the `menu-button` and all child components.\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.handleMouseLeave();\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Handle a click on a `MenuButton`.\\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (this.buttonPressed_) {\\n      this.unpressButton();\\n    } else {\\n      this.pressButton();\\n    }\\n  }\\n  /**\\n   * Handle `mouseleave` for `MenuButton`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseleave` event that caused this function to be called.\\n   *\\n   * @listens mouseleave\\n   */\\n  ;\\n\\n  _proto.handleMouseLeave = function handleMouseLeave(event) {\\n    this.removeClass('vjs-hover');\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(this, this.handleMenuKeyUp));\\n  }\\n  /**\\n   * Set the focus to the actual button, not to this element\\n   */\\n  ;\\n\\n  _proto.focus = function focus() {\\n    this.menuButton_.focus();\\n  }\\n  /**\\n   * Remove the focus from the actual button, not this element\\n   */\\n  ;\\n\\n  _proto.blur = function blur() {\\n    this.menuButton_.blur();\\n  }\\n  /**\\n   * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Escape or Tab unpress the 'button'\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      if (this.buttonPressed_) {\\n        this.unpressButton();\\n      } // Don't preventDefault for Tab key - we still want to lose focus\\n\\n\\n      if (!keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n        event.preventDefault(); // Set focus back to the menu button's button\\n\\n        this.menuButton_.focus();\\n      } // Up Arrow or Down Arrow also 'press' the button to open the menu\\n\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Up') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Down')) {\\n      if (!this.buttonPressed_) {\\n        event.preventDefault();\\n        this.pressButton();\\n      }\\n    }\\n  }\\n  /**\\n   * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\\n   * the constructor.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        Key press event\\n   *\\n   * @listens keyup\\n   */\\n  ;\\n\\n  _proto.handleMenuKeyUp = function handleMenuKeyUp(event) {\\n    // Escape hides popup menu\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      this.removeClass('vjs-hover');\\n    }\\n  }\\n  /**\\n   * This method name now delegates to `handleSubmenuKeyDown`. This means\\n   * anyone calling `handleSubmenuKeyPress` will not see their method calls\\n   * stop working.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) {\\n    this.handleSubmenuKeyDown(event);\\n  }\\n  /**\\n   * Handle a `keydown` event on a sub-menu. The listener for this is added in\\n   * the constructor.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        Key press event\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleSubmenuKeyDown = function handleSubmenuKeyDown(event) {\\n    // Escape or Tab unpress the 'button'\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      if (this.buttonPressed_) {\\n        this.unpressButton();\\n      } // Don't preventDefault for Tab key - we still want to lose focus\\n\\n\\n      if (!keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n        event.preventDefault(); // Set focus back to the menu button's button\\n\\n        this.menuButton_.focus();\\n      }\\n    }\\n  }\\n  /**\\n   * Put the current `MenuButton` into a pressed state.\\n   */\\n  ;\\n\\n  _proto.pressButton = function pressButton() {\\n    if (this.enabled_) {\\n      this.buttonPressed_ = true;\\n      this.menu.show();\\n      this.menu.lockShowing();\\n      this.menuButton_.el_.setAttribute('aria-expanded', 'true'); // set the focus into the submenu, except on iOS where it is resulting in\\n      // undesired scrolling behavior when the player is in an iframe\\n\\n      if (IS_IOS && isInFrame()) {\\n        // Return early so that the menu isn't focused\\n        return;\\n      }\\n\\n      this.menu.focus();\\n    }\\n  }\\n  /**\\n   * Take the current `MenuButton` out of a pressed state.\\n   */\\n  ;\\n\\n  _proto.unpressButton = function unpressButton() {\\n    if (this.enabled_) {\\n      this.buttonPressed_ = false;\\n      this.menu.unlockShowing();\\n      this.menu.hide();\\n      this.menuButton_.el_.setAttribute('aria-expanded', 'false');\\n    }\\n  }\\n  /**\\n   * Disable the `MenuButton`. Don't allow it to be clicked.\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    this.unpressButton();\\n    this.enabled_ = false;\\n    this.addClass('vjs-disabled');\\n    this.menuButton_.disable();\\n  }\\n  /**\\n   * Enable the `MenuButton`. Allow it to be clicked.\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    this.enabled_ = true;\\n    this.removeClass('vjs-disabled');\\n    this.menuButton_.enable();\\n  };\\n\\n  return MenuButton;\\n}(Component);\\n\\nComponent.registerComponent('MenuButton', MenuButton);\\n\\n/**\\n * The base class for buttons that toggle specific  track types (e.g. subtitles).\\n *\\n * @extends MenuButton\\n */\\n\\nvar TrackButton = /*#__PURE__*/function (_MenuButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TrackButton, _MenuButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TrackButton(player, options) {\\n    var _this;\\n\\n    var tracks = options.tracks;\\n    _this = _MenuButton.call(this, player, options) || this;\\n\\n    if (_this.items.length <= 1) {\\n      _this.hide();\\n    }\\n\\n    if (!tracks) {\\n      return _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this);\\n    }\\n\\n    var updateHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update);\\n    tracks.addEventListener('removetrack', updateHandler);\\n    tracks.addEventListener('addtrack', updateHandler);\\n\\n    _this.player_.on('ready', updateHandler);\\n\\n    _this.player_.on('dispose', function () {\\n      tracks.removeEventListener('removetrack', updateHandler);\\n      tracks.removeEventListener('addtrack', updateHandler);\\n    });\\n\\n    return _this;\\n  }\\n\\n  return TrackButton;\\n}(MenuButton);\\n\\nComponent.registerComponent('TrackButton', TrackButton);\\n\\n/**\\n * @file menu-keys.js\\n */\\n\\n/**\\n  * All keys used for operation of a menu (`MenuButton`, `Menu`, and `MenuItem`)\\n  * Note that 'Enter' and 'Space' are not included here (otherwise they would\\n  * prevent the `MenuButton` and `MenuItem` from being keyboard-clickable)\\n  * @typedef MenuKeys\\n  * @array\\n  */\\nvar MenuKeys = ['Tab', 'Esc', 'Up', 'Down', 'Right', 'Left'];\\n\\n/**\\n * The component for a menu item. `<li>`\\n *\\n * @extends ClickableComponent\\n */\\n\\nvar MenuItem = /*#__PURE__*/function (_ClickableComponent) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MenuItem, _ClickableComponent);\\n\\n  /**\\n   * Creates an instance of the this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   *\\n   */\\n  function MenuItem(player, options) {\\n    var _this;\\n\\n    _this = _ClickableComponent.call(this, player, options) || this;\\n    _this.selectable = options.selectable;\\n    _this.isSelected_ = options.selected || false;\\n    _this.multiSelectable = options.multiSelectable;\\n\\n    _this.selected(_this.isSelected_);\\n\\n    if (_this.selectable) {\\n      if (_this.multiSelectable) {\\n        _this.el_.setAttribute('role', 'menuitemcheckbox');\\n      } else {\\n        _this.el_.setAttribute('role', 'menuitemradio');\\n      }\\n    } else {\\n      _this.el_.setAttribute('role', 'menuitem');\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `MenuItem's DOM element\\n   *\\n   * @param {string} [type=li]\\n   *        Element's node type, not actually used, always set to `li`.\\n   *\\n   * @param {Object} [props={}]\\n   *        An object of properties that should be set on the element\\n   *\\n   * @param {Object} [attrs={}]\\n   *        An object of attributes that should be set on the element\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n\\n\\n  var _proto = MenuItem.prototype;\\n\\n  _proto.createEl = function createEl(type, props, attrs) {\\n    // The control is textual, not just an icon\\n    this.nonIconControl = true;\\n    return _ClickableComponent.prototype.createEl.call(this, 'li', assign({\\n      className: 'vjs-menu-item',\\n      innerHTML: \\\"<span class=\\\\\\\"vjs-menu-item-text\\\\\\\">\\\" + this.localize(this.options_.label) + \\\"</span>\\\",\\n      tabIndex: -1\\n    }, props), attrs);\\n  }\\n  /**\\n   * Ignore keys which are used by the menu, but pass any other ones up. See\\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    if (!MenuKeys.some(function (key) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, key);\\n    })) {\\n      // Pass keydown handling up for unused keys\\n      _ClickableComponent.prototype.handleKeyDown.call(this, event);\\n    }\\n  }\\n  /**\\n   * Any click on a `MenuItem` puts it into the selected state.\\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    this.selected(true);\\n  }\\n  /**\\n   * Set the state for this menu item as selected or not.\\n   *\\n   * @param {boolean} selected\\n   *        if the menu item is selected or not\\n   */\\n  ;\\n\\n  _proto.selected = function selected(_selected) {\\n    if (this.selectable) {\\n      if (_selected) {\\n        this.addClass('vjs-selected');\\n        this.el_.setAttribute('aria-checked', 'true'); // aria-checked isn't fully supported by browsers/screen readers,\\n        // so indicate selected state to screen reader in the control text.\\n\\n        this.controlText(', selected');\\n        this.isSelected_ = true;\\n      } else {\\n        this.removeClass('vjs-selected');\\n        this.el_.setAttribute('aria-checked', 'false'); // Indicate un-selected state to screen reader\\n\\n        this.controlText('');\\n        this.isSelected_ = false;\\n      }\\n    }\\n  };\\n\\n  return MenuItem;\\n}(ClickableComponent);\\n\\nComponent.registerComponent('MenuItem', MenuItem);\\n\\n/**\\n * The specific menu item type for selecting a language within a text track kind\\n *\\n * @extends MenuItem\\n */\\n\\nvar TextTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TextTrackMenuItem(player, options) {\\n    var _this;\\n\\n    var track = options.track;\\n    var tracks = player.textTracks(); // Modify options for parent MenuItem class's init.\\n\\n    options.label = track.label || track.language || 'Unknown';\\n    options.selected = track.mode === 'showing';\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.track = track; // Determine the relevant kind(s) of tracks for this component and filter\\n    // out empty kinds.\\n\\n    _this.kinds = (options.kinds || [options.kind || _this.track.kind]).filter(Boolean);\\n\\n    var changeHandler = function changeHandler() {\\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n        args[_key] = arguments[_key];\\n      }\\n\\n      _this.handleTracksChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), args);\\n    };\\n\\n    var selectedLanguageChangeHandler = function selectedLanguageChangeHandler() {\\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n        args[_key2] = arguments[_key2];\\n      }\\n\\n      _this.handleSelectedLanguageChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), args);\\n    };\\n\\n    player.on(['loadstart', 'texttrackchange'], changeHandler);\\n    tracks.addEventListener('change', changeHandler);\\n    tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\\n\\n    _this.on('dispose', function () {\\n      player.off(['loadstart', 'texttrackchange'], changeHandler);\\n      tracks.removeEventListener('change', changeHandler);\\n      tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\\n    }); // iOS7 doesn't dispatch change events to TextTrackLists when an\\n    // associated track's mode changes. Without something like\\n    // Object.observe() (also not present on iOS7), it's not\\n    // possible to detect changes to the mode attribute and polyfill\\n    // the change event. As a poor substitute, we manually dispatch\\n    // change events whenever the controls modify the mode.\\n\\n\\n    if (tracks.onchange === undefined) {\\n      var event;\\n\\n      _this.on(['tap', 'click'], function () {\\n        if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Event !== 'object') {\\n          // Android 2.3 throws an Illegal Constructor error for window.Event\\n          try {\\n            event = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Event('change');\\n          } catch (err) {// continue regardless of error\\n          }\\n        }\\n\\n        if (!event) {\\n          event = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createEvent('Event');\\n          event.initEvent('change', true, true);\\n        }\\n\\n        tracks.dispatchEvent(event);\\n      });\\n    } // set the default state based on current tracks\\n\\n\\n    _this.handleTracksChange();\\n\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `TextTrackMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = TextTrackMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var referenceTrack = this.track;\\n    var tracks = this.player_.textTracks();\\n\\n    _MenuItem.prototype.handleClick.call(this, event);\\n\\n    if (!tracks) {\\n      return;\\n    }\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i]; // If the track from the text tracks list is not of the right kind,\\n      // skip it. We do not want to affect tracks of incompatible kind(s).\\n\\n      if (this.kinds.indexOf(track.kind) === -1) {\\n        continue;\\n      } // If this text track is the component's track and it is not showing,\\n      // set it to showing.\\n\\n\\n      if (track === referenceTrack) {\\n        if (track.mode !== 'showing') {\\n          track.mode = 'showing';\\n        } // If this text track is not the component's track and it is not\\n        // disabled, set it to disabled.\\n\\n      } else if (track.mode !== 'disabled') {\\n        track.mode = 'disabled';\\n      }\\n    }\\n  }\\n  /**\\n   * Handle text track list change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `change` event that caused this function to be called.\\n   *\\n   * @listens TextTrackList#change\\n   */\\n  ;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    var shouldBeSelected = this.track.mode === 'showing'; // Prevent redundant selected() calls because they may cause\\n    // screen readers to read the appended control text unnecessarily\\n\\n    if (shouldBeSelected !== this.isSelected_) {\\n      this.selected(shouldBeSelected);\\n    }\\n  };\\n\\n  _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\\n    if (this.track.mode === 'showing') {\\n      var selectedLanguage = this.player_.cache_.selectedLanguage; // Don't replace the kind of track across the same language\\n\\n      if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\\n        return;\\n      }\\n\\n      this.player_.cache_.selectedLanguage = {\\n        enabled: true,\\n        language: this.track.language,\\n        kind: this.track.kind\\n      };\\n    }\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    // remove reference to track object on dispose\\n    this.track = null;\\n\\n    _MenuItem.prototype.dispose.call(this);\\n  };\\n\\n  return TextTrackMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\\n\\n/**\\n * A special menu item for turning of a specific type of text track\\n *\\n * @extends TextTrackMenuItem\\n */\\n\\nvar OffTextTrackMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(OffTextTrackMenuItem, _TextTrackMenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function OffTextTrackMenuItem(player, options) {\\n    // Create pseudo track info\\n    // Requires options['kind']\\n    options.track = {\\n      player: player,\\n      // it is no longer necessary to store `kind` or `kinds` on the track itself\\n      // since they are now stored in the `kinds` property of all instances of\\n      // TextTrackMenuItem, but this will remain for backwards compatibility\\n      kind: options.kind,\\n      kinds: options.kinds,\\n      \\\"default\\\": false,\\n      mode: 'disabled'\\n    };\\n\\n    if (!options.kinds) {\\n      options.kinds = [options.kind];\\n    }\\n\\n    if (options.label) {\\n      options.track.label = options.label;\\n    } else {\\n      options.track.label = options.kinds.join(' and ') + ' off';\\n    } // MenuItem is selectable\\n\\n\\n    options.selectable = true; // MenuItem is NOT multiSelectable (i.e. only one can be marked \\\"selected\\\" at a time)\\n\\n    options.multiSelectable = false;\\n    return _TextTrackMenuItem.call(this, player, options) || this;\\n  }\\n  /**\\n   * Handle text track change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run\\n   */\\n\\n\\n  var _proto = OffTextTrackMenuItem.prototype;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    var tracks = this.player().textTracks();\\n    var shouldBeSelected = true;\\n\\n    for (var i = 0, l = tracks.length; i < l; i++) {\\n      var track = tracks[i];\\n\\n      if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\\n        shouldBeSelected = false;\\n        break;\\n      }\\n    } // Prevent redundant selected() calls because they may cause\\n    // screen readers to read the appended control text unnecessarily\\n\\n\\n    if (shouldBeSelected !== this.isSelected_) {\\n      this.selected(shouldBeSelected);\\n    }\\n  };\\n\\n  _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\\n    var tracks = this.player().textTracks();\\n    var allHidden = true;\\n\\n    for (var i = 0, l = tracks.length; i < l; i++) {\\n      var track = tracks[i];\\n\\n      if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\\n        allHidden = false;\\n        break;\\n      }\\n    }\\n\\n    if (allHidden) {\\n      this.player_.cache_.selectedLanguage = {\\n        enabled: false\\n      };\\n    }\\n  };\\n\\n  return OffTextTrackMenuItem;\\n}(TextTrackMenuItem);\\n\\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\\n\\n/**\\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\\n *\\n * @extends MenuButton\\n */\\n\\nvar TextTrackButton = /*#__PURE__*/function (_TrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackButton, _TrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function TextTrackButton(player, options) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    options.tracks = player.textTracks();\\n    return _TrackButton.call(this, player, options) || this;\\n  }\\n  /**\\n   * Create a menu item for each text track\\n   *\\n   * @param {TextTrackMenuItem[]} [items=[]]\\n   *        Existing array of items to use during creation\\n   *\\n   * @return {TextTrackMenuItem[]}\\n   *         Array of menu items that were created\\n   */\\n\\n\\n  var _proto = TextTrackButton.prototype;\\n\\n  _proto.createItems = function createItems(items, TrackMenuItem) {\\n    if (items === void 0) {\\n      items = [];\\n    }\\n\\n    if (TrackMenuItem === void 0) {\\n      TrackMenuItem = TextTrackMenuItem;\\n    }\\n\\n    // Label is an override for the [track] off label\\n    // USed to localise captions/subtitles\\n    var label;\\n\\n    if (this.label_) {\\n      label = this.label_ + \\\" off\\\";\\n    } // Add an OFF menu item to turn all tracks off\\n\\n\\n    items.push(new OffTextTrackMenuItem(this.player_, {\\n      kinds: this.kinds_,\\n      kind: this.kind_,\\n      label: label\\n    }));\\n    this.hideThreshold_ += 1;\\n    var tracks = this.player_.textTracks();\\n\\n    if (!Array.isArray(this.kinds_)) {\\n      this.kinds_ = [this.kind_];\\n    }\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i]; // only add tracks that are of an appropriate kind and have a label\\n\\n      if (this.kinds_.indexOf(track.kind) > -1) {\\n        var item = new TrackMenuItem(this.player_, {\\n          track: track,\\n          kinds: this.kinds_,\\n          kind: this.kind_,\\n          // MenuItem is selectable\\n          selectable: true,\\n          // MenuItem is NOT multiSelectable (i.e. only one can be marked \\\"selected\\\" at a time)\\n          multiSelectable: false\\n        });\\n        item.addClass(\\\"vjs-\\\" + track.kind + \\\"-menu-item\\\");\\n        items.push(item);\\n      }\\n    }\\n\\n    return items;\\n  };\\n\\n  return TextTrackButton;\\n}(TrackButton);\\n\\nComponent.registerComponent('TextTrackButton', TextTrackButton);\\n\\n/**\\n * The chapter track menu item\\n *\\n * @extends MenuItem\\n */\\n\\nvar ChaptersTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ChaptersTrackMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function ChaptersTrackMenuItem(player, options) {\\n    var _this;\\n\\n    var track = options.track;\\n    var cue = options.cue;\\n    var currentTime = player.currentTime(); // Modify options for parent MenuItem class's init.\\n\\n    options.selectable = true;\\n    options.multiSelectable = false;\\n    options.label = cue.text;\\n    options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.track = track;\\n    _this.cue = cue;\\n    track.addEventListener('cuechange', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update));\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `ChaptersTrackMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = ChaptersTrackMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    _MenuItem.prototype.handleClick.call(this);\\n\\n    this.player_.currentTime(this.cue.startTime);\\n    this.update(this.cue.startTime);\\n  }\\n  /**\\n   * Update chapter menu item\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `cuechange` event that caused this function to run.\\n   *\\n   * @listens TextTrack#cuechange\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var cue = this.cue;\\n    var currentTime = this.player_.currentTime(); // vjs.log(currentTime, cue.startTime);\\n\\n    this.selected(cue.startTime <= currentTime && currentTime < cue.endTime);\\n  };\\n\\n  return ChaptersTrackMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\\n\\n/**\\n * The button component for toggling and selecting chapters\\n * Chapters act much differently than other text tracks\\n * Cues are navigation vs. other tracks of alternative languages\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar ChaptersButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ChaptersButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this function is ready.\\n   */\\n  function ChaptersButton(player, options, ready) {\\n    return _TextTrackButton.call(this, player, options, ready) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = ChaptersButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-chapters-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-chapters-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Update the menu based on the current state of its items.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        An event that triggered this function to run.\\n   *\\n   * @listens TextTrackList#addtrack\\n   * @listens TextTrackList#removetrack\\n   * @listens TextTrackList#change\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    if (!this.track_ || event && (event.type === 'addtrack' || event.type === 'removetrack')) {\\n      this.setTrack(this.findChaptersTrack());\\n    }\\n\\n    _TextTrackButton.prototype.update.call(this);\\n  }\\n  /**\\n   * Set the currently selected track for the chapters button.\\n   *\\n   * @param {TextTrack} track\\n   *        The new track to select. Nothing will change if this is the currently selected\\n   *        track.\\n   */\\n  ;\\n\\n  _proto.setTrack = function setTrack(track) {\\n    if (this.track_ === track) {\\n      return;\\n    }\\n\\n    if (!this.updateHandler_) {\\n      this.updateHandler_ = this.update.bind(this);\\n    } // here this.track_ refers to the old track instance\\n\\n\\n    if (this.track_) {\\n      var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\\n\\n      if (remoteTextTrackEl) {\\n        remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\\n      }\\n\\n      this.track_ = null;\\n    }\\n\\n    this.track_ = track; // here this.track_ refers to the new track instance\\n\\n    if (this.track_) {\\n      this.track_.mode = 'hidden';\\n\\n      var _remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\\n\\n      if (_remoteTextTrackEl) {\\n        _remoteTextTrackEl.addEventListener('load', this.updateHandler_);\\n      }\\n    }\\n  }\\n  /**\\n   * Find the track object that is currently in use by this ChaptersButton\\n   *\\n   * @return {TextTrack|undefined}\\n   *         The current track or undefined if none was found.\\n   */\\n  ;\\n\\n  _proto.findChaptersTrack = function findChaptersTrack() {\\n    var tracks = this.player_.textTracks() || [];\\n\\n    for (var i = tracks.length - 1; i >= 0; i--) {\\n      // We will always choose the last track as our chaptersTrack\\n      var track = tracks[i];\\n\\n      if (track.kind === this.kind_) {\\n        return track;\\n      }\\n    }\\n  }\\n  /**\\n   * Get the caption for the ChaptersButton based on the track label. This will also\\n   * use the current tracks localized kind as a fallback if a label does not exist.\\n   *\\n   * @return {string}\\n   *         The tracks current label or the localized track kind.\\n   */\\n  ;\\n\\n  _proto.getMenuCaption = function getMenuCaption() {\\n    if (this.track_ && this.track_.label) {\\n      return this.track_.label;\\n    }\\n\\n    return this.localize(toTitleCase(this.kind_));\\n  }\\n  /**\\n   * Create menu from chapter track\\n   *\\n   * @return {Menu}\\n   *         New menu for the chapter buttons\\n   */\\n  ;\\n\\n  _proto.createMenu = function createMenu() {\\n    this.options_.title = this.getMenuCaption();\\n    return _TextTrackButton.prototype.createMenu.call(this);\\n  }\\n  /**\\n   * Create a menu item for each text track\\n   *\\n   * @return {TextTrackMenuItem[]}\\n   *         Array of menu items\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {\\n    var items = [];\\n\\n    if (!this.track_) {\\n      return items;\\n    }\\n\\n    var cues = this.track_.cues;\\n\\n    if (!cues) {\\n      return items;\\n    }\\n\\n    for (var i = 0, l = cues.length; i < l; i++) {\\n      var cue = cues[i];\\n      var mi = new ChaptersTrackMenuItem(this.player_, {\\n        track: this.track_,\\n        cue: cue\\n      });\\n      items.push(mi);\\n    }\\n\\n    return items;\\n  };\\n\\n  return ChaptersButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nChaptersButton.prototype.kind_ = 'chapters';\\n/**\\n * The text that should display over the `ChaptersButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nChaptersButton.prototype.controlText_ = 'Chapters';\\nComponent.registerComponent('ChaptersButton', ChaptersButton);\\n\\n/**\\n * The button component for toggling and selecting descriptions\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar DescriptionsButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(DescriptionsButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this component is ready.\\n   */\\n  function DescriptionsButton(player, options, ready) {\\n    var _this;\\n\\n    _this = _TextTrackButton.call(this, player, options, ready) || this;\\n    var tracks = player.textTracks();\\n    var changeHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleTracksChange);\\n    tracks.addEventListener('change', changeHandler);\\n\\n    _this.on('dispose', function () {\\n      tracks.removeEventListener('change', changeHandler);\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Handle text track change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run\\n   *\\n   * @listens TextTrackList#change\\n   */\\n\\n\\n  var _proto = DescriptionsButton.prototype;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    var tracks = this.player().textTracks();\\n    var disabled = false; // Check whether a track of a different kind is showing\\n\\n    for (var i = 0, l = tracks.length; i < l; i++) {\\n      var track = tracks[i];\\n\\n      if (track.kind !== this.kind_ && track.mode === 'showing') {\\n        disabled = true;\\n        break;\\n      }\\n    } // If another track is showing, disable this menu button\\n\\n\\n    if (disabled) {\\n      this.disable();\\n    } else {\\n      this.enable();\\n    }\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-descriptions-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-descriptions-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  };\\n\\n  return DescriptionsButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nDescriptionsButton.prototype.kind_ = 'descriptions';\\n/**\\n * The text that should display over the `DescriptionsButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\\n\\n/**\\n * The button component for toggling and selecting subtitles\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar SubtitlesButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SubtitlesButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this component is ready.\\n   */\\n  function SubtitlesButton(player, options, ready) {\\n    return _TextTrackButton.call(this, player, options, ready) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = SubtitlesButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-subtitles-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-subtitles-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  };\\n\\n  return SubtitlesButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nSubtitlesButton.prototype.kind_ = 'subtitles';\\n/**\\n * The text that should display over the `SubtitlesButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\\n\\n/**\\n * The menu item for caption track settings menu\\n *\\n * @extends TextTrackMenuItem\\n */\\n\\nvar CaptionSettingsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CaptionSettingsMenuItem, _TextTrackMenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function CaptionSettingsMenuItem(player, options) {\\n    var _this;\\n\\n    options.track = {\\n      player: player,\\n      kind: options.kind,\\n      label: options.kind + ' settings',\\n      selectable: false,\\n      \\\"default\\\": false,\\n      mode: 'disabled'\\n    }; // CaptionSettingsMenuItem has no concept of 'selected'\\n\\n    options.selectable = false;\\n    options.name = 'CaptionSettingsMenuItem';\\n    _this = _TextTrackMenuItem.call(this, player, options) || this;\\n\\n    _this.addClass('vjs-texttrack-settings');\\n\\n    _this.controlText(', opens ' + options.kind + ' settings dialog');\\n\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `CaptionSettingsMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = CaptionSettingsMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    this.player().getChild('textTrackSettings').open();\\n  };\\n\\n  return CaptionSettingsMenuItem;\\n}(TextTrackMenuItem);\\n\\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\\n\\n/**\\n * The button component for toggling and selecting captions\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar CaptionsButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CaptionsButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this component is ready.\\n   */\\n  function CaptionsButton(player, options, ready) {\\n    return _TextTrackButton.call(this, player, options, ready) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = CaptionsButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-captions-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-captions-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create caption menu items\\n   *\\n   * @return {CaptionSettingsMenuItem[]}\\n   *         The array of current menu items.\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {\\n    var items = [];\\n\\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\\n      items.push(new CaptionSettingsMenuItem(this.player_, {\\n        kind: this.kind_\\n      }));\\n      this.hideThreshold_ += 1;\\n    }\\n\\n    return _TextTrackButton.prototype.createItems.call(this, items);\\n  };\\n\\n  return CaptionsButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nCaptionsButton.prototype.kind_ = 'captions';\\n/**\\n * The text that should display over the `CaptionsButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nCaptionsButton.prototype.controlText_ = 'Captions';\\nComponent.registerComponent('CaptionsButton', CaptionsButton);\\n\\n/**\\n * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\\n * in the SubsCapsMenu.\\n *\\n * @extends TextTrackMenuItem\\n */\\n\\nvar SubsCapsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SubsCapsMenuItem, _TextTrackMenuItem);\\n\\n  function SubsCapsMenuItem() {\\n    return _TextTrackMenuItem.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = SubsCapsMenuItem.prototype;\\n\\n  _proto.createEl = function createEl(type, props, attrs) {\\n    var innerHTML = \\\"<span class=\\\\\\\"vjs-menu-item-text\\\\\\\">\\\" + this.localize(this.options_.label);\\n\\n    if (this.options_.track.kind === 'captions') {\\n      innerHTML += \\\"\\\\n        <span aria-hidden=\\\\\\\"true\\\\\\\" class=\\\\\\\"vjs-icon-placeholder\\\\\\\"></span>\\\\n        <span class=\\\\\\\"vjs-control-text\\\\\\\"> \\\" + this.localize('Captions') + \\\"</span>\\\\n      \\\";\\n    }\\n\\n    innerHTML += '</span>';\\n\\n    var el = _TextTrackMenuItem.prototype.createEl.call(this, type, assign({\\n      innerHTML: innerHTML\\n    }, props), attrs);\\n\\n    return el;\\n  };\\n\\n  return SubsCapsMenuItem;\\n}(TextTrackMenuItem);\\n\\nComponent.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\\n\\n/**\\n * The button component for toggling and selecting captions and/or subtitles\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar SubsCapsButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SubsCapsButton, _TextTrackButton);\\n\\n  function SubsCapsButton(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _TextTrackButton.call(this, player, options) || this; // Although North America uses \\\"captions\\\" in most cases for\\n    // \\\"captions and subtitles\\\" other locales use \\\"subtitles\\\"\\n\\n    _this.label_ = 'subtitles';\\n\\n    if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(_this.player_.language_) > -1) {\\n      _this.label_ = 'captions';\\n    }\\n\\n    _this.menuButton_.controlText(toTitleCase(_this.label_));\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = SubsCapsButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-subs-caps-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-subs-caps-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create caption/subtitles menu items\\n   *\\n   * @return {CaptionSettingsMenuItem[]}\\n   *         The array of current menu items.\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {\\n    var items = [];\\n\\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\\n      items.push(new CaptionSettingsMenuItem(this.player_, {\\n        kind: this.label_\\n      }));\\n      this.hideThreshold_ += 1;\\n    }\\n\\n    items = _TextTrackButton.prototype.createItems.call(this, items, SubsCapsMenuItem);\\n    return items;\\n  };\\n\\n  return SubsCapsButton;\\n}(TextTrackButton);\\n/**\\n * `kind`s of TextTrack to look for to associate it with this menu.\\n *\\n * @type {array}\\n * @private\\n */\\n\\n\\nSubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\\n/**\\n * The text that should display over the `SubsCapsButton`s controls.\\n *\\n *\\n * @type {string}\\n * @private\\n */\\n\\nSubsCapsButton.prototype.controlText_ = 'Subtitles';\\nComponent.registerComponent('SubsCapsButton', SubsCapsButton);\\n\\n/**\\n * An {@link AudioTrack} {@link MenuItem}\\n *\\n * @extends MenuItem\\n */\\n\\nvar AudioTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrackMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function AudioTrackMenuItem(player, options) {\\n    var _this;\\n\\n    var track = options.track;\\n    var tracks = player.audioTracks(); // Modify options for parent MenuItem class's init.\\n\\n    options.label = track.label || track.language || 'Unknown';\\n    options.selected = track.enabled;\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.track = track;\\n\\n    _this.addClass(\\\"vjs-\\\" + track.kind + \\\"-menu-item\\\");\\n\\n    var changeHandler = function changeHandler() {\\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n        args[_key] = arguments[_key];\\n      }\\n\\n      _this.handleTracksChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), args);\\n    };\\n\\n    tracks.addEventListener('change', changeHandler);\\n\\n    _this.on('dispose', function () {\\n      tracks.removeEventListener('change', changeHandler);\\n    });\\n\\n    return _this;\\n  }\\n\\n  var _proto = AudioTrackMenuItem.prototype;\\n\\n  _proto.createEl = function createEl(type, props, attrs) {\\n    var innerHTML = \\\"<span class=\\\\\\\"vjs-menu-item-text\\\\\\\">\\\" + this.localize(this.options_.label);\\n\\n    if (this.options_.track.kind === 'main-desc') {\\n      innerHTML += \\\"\\\\n        <span aria-hidden=\\\\\\\"true\\\\\\\" class=\\\\\\\"vjs-icon-placeholder\\\\\\\"></span>\\\\n        <span class=\\\\\\\"vjs-control-text\\\\\\\"> \\\" + this.localize('Descriptions') + \\\"</span>\\\\n      \\\";\\n    }\\n\\n    innerHTML += '</span>';\\n\\n    var el = _MenuItem.prototype.createEl.call(this, type, assign({\\n      innerHTML: innerHTML\\n    }, props), attrs);\\n\\n    return el;\\n  }\\n  /**\\n   * This gets called when an `AudioTrackMenuItem is \\\"clicked\\\". See {@link ClickableComponent}\\n   * for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var tracks = this.player_.audioTracks();\\n\\n    _MenuItem.prototype.handleClick.call(this, event);\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i];\\n      track.enabled = track === this.track;\\n    }\\n  }\\n  /**\\n   * Handle any {@link AudioTrack} change.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link AudioTrackList#change} event that caused this to run.\\n   *\\n   * @listens AudioTrackList#change\\n   */\\n  ;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    this.selected(this.track.enabled);\\n  };\\n\\n  return AudioTrackMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\\n\\n/**\\n * The base class for buttons that toggle specific {@link AudioTrack} types.\\n *\\n * @extends TrackButton\\n */\\n\\nvar AudioTrackButton = /*#__PURE__*/function (_TrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrackButton, _TrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function AudioTrackButton(player, options) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    options.tracks = player.audioTracks();\\n    return _TrackButton.call(this, player, options) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = AudioTrackButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-audio-button \\\" + _TrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-audio-button \\\" + _TrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create a menu item for each audio track\\n   *\\n   * @param {AudioTrackMenuItem[]} [items=[]]\\n   *        An array of existing menu items to use.\\n   *\\n   * @return {AudioTrackMenuItem[]}\\n   *         An array of menu items\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems(items) {\\n    if (items === void 0) {\\n      items = [];\\n    }\\n\\n    // if there's only one audio track, there no point in showing it\\n    this.hideThreshold_ = 1;\\n    var tracks = this.player_.audioTracks();\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i];\\n      items.push(new AudioTrackMenuItem(this.player_, {\\n        track: track,\\n        // MenuItem is selectable\\n        selectable: true,\\n        // MenuItem is NOT multiSelectable (i.e. only one can be marked \\\"selected\\\" at a time)\\n        multiSelectable: false\\n      }));\\n    }\\n\\n    return items;\\n  };\\n\\n  return AudioTrackButton;\\n}(TrackButton);\\n/**\\n * The text that should display over the `AudioTrackButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nAudioTrackButton.prototype.controlText_ = 'Audio Track';\\nComponent.registerComponent('AudioTrackButton', AudioTrackButton);\\n\\n/**\\n * The specific menu item type for selecting a playback rate.\\n *\\n * @extends MenuItem\\n */\\n\\nvar PlaybackRateMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlaybackRateMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PlaybackRateMenuItem(player, options) {\\n    var _this;\\n\\n    var label = options.rate;\\n    var rate = parseFloat(label, 10); // Modify options for parent MenuItem class's init.\\n\\n    options.label = label;\\n    options.selected = rate === 1;\\n    options.selectable = true;\\n    options.multiSelectable = false;\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.label = label;\\n    _this.rate = rate;\\n\\n    _this.on(player, 'ratechange', _this.update);\\n\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `PlaybackRateMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = PlaybackRateMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    _MenuItem.prototype.handleClick.call(this);\\n\\n    this.player().playbackRate(this.rate);\\n  }\\n  /**\\n   * Update the PlaybackRateMenuItem when the playbackrate changes.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `ratechange` event that caused this function to run.\\n   *\\n   * @listens Player#ratechange\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    this.selected(this.player().playbackRate() === this.rate);\\n  };\\n\\n  return PlaybackRateMenuItem;\\n}(MenuItem);\\n/**\\n * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPlaybackRateMenuItem.prototype.contentElType = 'button';\\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\\n\\n/**\\n * The component for controlling the playback rate.\\n *\\n * @extends MenuButton\\n */\\n\\nvar PlaybackRateMenuButton = /*#__PURE__*/function (_MenuButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlaybackRateMenuButton, _MenuButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PlaybackRateMenuButton(player, options) {\\n    var _this;\\n\\n    _this = _MenuButton.call(this, player, options) || this;\\n\\n    _this.updateVisibility();\\n\\n    _this.updateLabel();\\n\\n    _this.on(player, 'loadstart', _this.updateVisibility);\\n\\n    _this.on(player, 'ratechange', _this.updateLabel);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = PlaybackRateMenuButton.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _MenuButton.prototype.createEl.call(this);\\n\\n    this.labelEl_ = createEl('div', {\\n      className: 'vjs-playback-rate-value',\\n      innerHTML: '1x'\\n    });\\n    el.appendChild(this.labelEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.labelEl_ = null;\\n\\n    _MenuButton.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-playback-rate \\\" + _MenuButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-playback-rate \\\" + _MenuButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create the playback rate menu\\n   *\\n   * @return {Menu}\\n   *         Menu object populated with {@link PlaybackRateMenuItem}s\\n   */\\n  ;\\n\\n  _proto.createMenu = function createMenu() {\\n    var menu = new Menu(this.player());\\n    var rates = this.playbackRates();\\n\\n    if (rates) {\\n      for (var i = rates.length - 1; i >= 0; i--) {\\n        menu.addChild(new PlaybackRateMenuItem(this.player(), {\\n          rate: rates[i] + 'x'\\n        }));\\n      }\\n    }\\n\\n    return menu;\\n  }\\n  /**\\n   * Updates ARIA accessibility attributes\\n   */\\n  ;\\n\\n  _proto.updateARIAAttributes = function updateARIAAttributes() {\\n    // Current playback rate\\n    this.el().setAttribute('aria-valuenow', this.player().playbackRate());\\n  }\\n  /**\\n   * This gets called when an `PlaybackRateMenuButton` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    // select next rate option\\n    var currentRate = this.player().playbackRate();\\n    var rates = this.playbackRates(); // this will select first one if the last one currently selected\\n\\n    var newRate = rates[0];\\n\\n    for (var i = 0; i < rates.length; i++) {\\n      if (rates[i] > currentRate) {\\n        newRate = rates[i];\\n        break;\\n      }\\n    }\\n\\n    this.player().playbackRate(newRate);\\n  }\\n  /**\\n   * Get possible playback rates\\n   *\\n   * @return {Array}\\n   *         All possible playback rates\\n   */\\n  ;\\n\\n  _proto.playbackRates = function playbackRates() {\\n    return this.options_.playbackRates || this.options_.playerOptions && this.options_.playerOptions.playbackRates;\\n  }\\n  /**\\n   * Get whether playback rates is supported by the tech\\n   * and an array of playback rates exists\\n   *\\n   * @return {boolean}\\n   *         Whether changing playback rate is supported\\n   */\\n  ;\\n\\n  _proto.playbackRateSupported = function playbackRateSupported() {\\n    return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\\n  }\\n  /**\\n   * Hide playback rate controls when they're no playback rate options to select\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#loadstart\\n   */\\n  ;\\n\\n  _proto.updateVisibility = function updateVisibility(event) {\\n    if (this.playbackRateSupported()) {\\n      this.removeClass('vjs-hidden');\\n    } else {\\n      this.addClass('vjs-hidden');\\n    }\\n  }\\n  /**\\n   * Update button label when rate changed\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#ratechange\\n   */\\n  ;\\n\\n  _proto.updateLabel = function updateLabel(event) {\\n    if (this.playbackRateSupported()) {\\n      this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\\n    }\\n  };\\n\\n  return PlaybackRateMenuButton;\\n}(MenuButton);\\n/**\\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\\n\\n/**\\n * Just an empty spacer element that can be used as an append point for plugins, etc.\\n * Also can be used to create space between elements when necessary.\\n *\\n * @extends Component\\n */\\n\\nvar Spacer = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Spacer, _Component);\\n\\n  function Spacer() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = Spacer.prototype;\\n\\n  /**\\n  * Builds the default DOM `className`.\\n  *\\n  * @return {string}\\n  *         The DOM `className` for this object.\\n  */\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-spacer \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: this.buildCSSClass()\\n    });\\n  };\\n\\n  return Spacer;\\n}(Component);\\n\\nComponent.registerComponent('Spacer', Spacer);\\n\\n/**\\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\\n *\\n * @extends Spacer\\n */\\n\\nvar CustomControlSpacer = /*#__PURE__*/function (_Spacer) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CustomControlSpacer, _Spacer);\\n\\n  function CustomControlSpacer() {\\n    return _Spacer.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = CustomControlSpacer.prototype;\\n\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-custom-control-spacer \\\" + _Spacer.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var el = _Spacer.prototype.createEl.call(this, {\\n      className: this.buildCSSClass()\\n    }); // No-flex/table-cell mode requires there be some content\\n    // in the cell to fill the remaining space of the table.\\n\\n\\n    el.innerHTML = \\\"\\\\xA0\\\";\\n    return el;\\n  };\\n\\n  return CustomControlSpacer;\\n}(Spacer);\\n\\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\\n\\n/**\\n * Container of main controls.\\n *\\n * @extends Component\\n */\\n\\nvar ControlBar = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ControlBar, _Component);\\n\\n  function ControlBar() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = ControlBar.prototype;\\n\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-control-bar',\\n      dir: 'ltr'\\n    });\\n  };\\n\\n  return ControlBar;\\n}(Component);\\n/**\\n * Default options for `ControlBar`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nControlBar.prototype.options_ = {\\n  children: ['playToggle', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'fullscreenToggle']\\n};\\n\\nif ('exitPictureInPicture' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n  ControlBar.prototype.options_.children.splice(ControlBar.prototype.options_.children.length - 1, 0, 'pictureInPictureToggle');\\n}\\n\\nComponent.registerComponent('ControlBar', ControlBar);\\n\\n/**\\n * A display that indicates an error has occurred. This means that the video\\n * is unplayable.\\n *\\n * @extends ModalDialog\\n */\\n\\nvar ErrorDisplay = /*#__PURE__*/function (_ModalDialog) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ErrorDisplay, _ModalDialog);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param  {Player} player\\n   *         The `Player` that this class should be attached to.\\n   *\\n   * @param  {Object} [options]\\n   *         The key/value store of player options.\\n   */\\n  function ErrorDisplay(player, options) {\\n    var _this;\\n\\n    _this = _ModalDialog.call(this, player, options) || this;\\n\\n    _this.on(player, 'error', _this.open);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   *\\n   * @deprecated Since version 5.\\n   */\\n\\n\\n  var _proto = ErrorDisplay.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-error-display \\\" + _ModalDialog.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Gets the localized error message based on the `Player`s error.\\n   *\\n   * @return {string}\\n   *         The `Player`s error message localized or an empty string.\\n   */\\n  ;\\n\\n  _proto.content = function content() {\\n    var error = this.player().error();\\n    return error ? this.localize(error.message) : '';\\n  };\\n\\n  return ErrorDisplay;\\n}(ModalDialog);\\n/**\\n * The default options for an `ErrorDisplay`.\\n *\\n * @private\\n */\\n\\n\\nErrorDisplay.prototype.options_ = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, ModalDialog.prototype.options_, {\\n  pauseOnOpen: false,\\n  fillAlways: true,\\n  temporary: false,\\n  uncloseable: true\\n});\\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\\n\\nvar LOCAL_STORAGE_KEY = 'vjs-text-track-settings';\\nvar COLOR_BLACK = ['#000', 'Black'];\\nvar COLOR_BLUE = ['#00F', 'Blue'];\\nvar COLOR_CYAN = ['#0FF', 'Cyan'];\\nvar COLOR_GREEN = ['#0F0', 'Green'];\\nvar COLOR_MAGENTA = ['#F0F', 'Magenta'];\\nvar COLOR_RED = ['#F00', 'Red'];\\nvar COLOR_WHITE = ['#FFF', 'White'];\\nvar COLOR_YELLOW = ['#FF0', 'Yellow'];\\nvar OPACITY_OPAQUE = ['1', 'Opaque'];\\nvar OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\\nvar OPACITY_TRANS = ['0', 'Transparent']; // Configuration for the various <select> elements in the DOM of this component.\\n//\\n// Possible keys include:\\n//\\n// `default`:\\n//   The default option index. Only needs to be provided if not zero.\\n// `parser`:\\n//   A function which is used to parse the value from the selected option in\\n//   a customized way.\\n// `selector`:\\n//   The selector used to find the associated <select> element.\\n\\nvar selectConfigs = {\\n  backgroundColor: {\\n    selector: '.vjs-bg-color > select',\\n    id: 'captions-background-color-%s',\\n    label: 'Color',\\n    options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\\n  },\\n  backgroundOpacity: {\\n    selector: '.vjs-bg-opacity > select',\\n    id: 'captions-background-opacity-%s',\\n    label: 'Transparency',\\n    options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS]\\n  },\\n  color: {\\n    selector: '.vjs-fg-color > select',\\n    id: 'captions-foreground-color-%s',\\n    label: 'Color',\\n    options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\\n  },\\n  edgeStyle: {\\n    selector: '.vjs-edge-style > select',\\n    id: '%s',\\n    label: 'Text Edge Style',\\n    options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Dropshadow']]\\n  },\\n  fontFamily: {\\n    selector: '.vjs-font-family > select',\\n    id: 'captions-font-family-%s',\\n    label: 'Font Family',\\n    options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\\n  },\\n  fontPercent: {\\n    selector: '.vjs-font-percent > select',\\n    id: 'captions-font-size-%s',\\n    label: 'Font Size',\\n    options: [['0.50', '50%'], ['0.75', '75%'], ['1.00', '100%'], ['1.25', '125%'], ['1.50', '150%'], ['1.75', '175%'], ['2.00', '200%'], ['3.00', '300%'], ['4.00', '400%']],\\n    \\\"default\\\": 2,\\n    parser: function parser(v) {\\n      return v === '1.00' ? null : Number(v);\\n    }\\n  },\\n  textOpacity: {\\n    selector: '.vjs-text-opacity > select',\\n    id: 'captions-foreground-opacity-%s',\\n    label: 'Transparency',\\n    options: [OPACITY_OPAQUE, OPACITY_SEMI]\\n  },\\n  // Options for this object are defined below.\\n  windowColor: {\\n    selector: '.vjs-window-color > select',\\n    id: 'captions-window-color-%s',\\n    label: 'Color'\\n  },\\n  // Options for this object are defined below.\\n  windowOpacity: {\\n    selector: '.vjs-window-opacity > select',\\n    id: 'captions-window-opacity-%s',\\n    label: 'Transparency',\\n    options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE]\\n  }\\n};\\nselectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\\n/**\\n * Get the actual value of an option.\\n *\\n * @param  {string} value\\n *         The value to get\\n *\\n * @param  {Function} [parser]\\n *         Optional function to adjust the value.\\n *\\n * @return {Mixed}\\n *         - Will be `undefined` if no value exists\\n *         - Will be `undefined` if the given value is \\\"none\\\".\\n *         - Will be the actual value otherwise.\\n *\\n * @private\\n */\\n\\nfunction parseOptionValue(value, parser) {\\n  if (parser) {\\n    value = parser(value);\\n  }\\n\\n  if (value && value !== 'none') {\\n    return value;\\n  }\\n}\\n/**\\n * Gets the value of the selected <option> element within a <select> element.\\n *\\n * @param  {Element} el\\n *         the element to look in\\n *\\n * @param  {Function} [parser]\\n *         Optional function to adjust the value.\\n *\\n * @return {Mixed}\\n *         - Will be `undefined` if no value exists\\n *         - Will be `undefined` if the given value is \\\"none\\\".\\n *         - Will be the actual value otherwise.\\n *\\n * @private\\n */\\n\\n\\nfunction getSelectedOptionValue(el, parser) {\\n  var value = el.options[el.options.selectedIndex].value;\\n  return parseOptionValue(value, parser);\\n}\\n/**\\n * Sets the selected <option> element within a <select> element based on a\\n * given value.\\n *\\n * @param {Element} el\\n *        The element to look in.\\n *\\n * @param {string} value\\n *        the property to look on.\\n *\\n * @param {Function} [parser]\\n *        Optional function to adjust the value before comparing.\\n *\\n * @private\\n */\\n\\n\\nfunction setSelectedOption(el, value, parser) {\\n  if (!value) {\\n    return;\\n  }\\n\\n  for (var i = 0; i < el.options.length; i++) {\\n    if (parseOptionValue(el.options[i].value, parser) === value) {\\n      el.selectedIndex = i;\\n      break;\\n    }\\n  }\\n}\\n/**\\n * Manipulate Text Tracks settings.\\n *\\n * @extends ModalDialog\\n */\\n\\n\\nvar TextTrackSettings = /*#__PURE__*/function (_ModalDialog) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackSettings, _ModalDialog);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *         The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *         The key/value store of player options.\\n   */\\n  function TextTrackSettings(player, options) {\\n    var _this;\\n\\n    options.temporary = false;\\n    _this = _ModalDialog.call(this, player, options) || this;\\n    _this.updateDisplay = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.updateDisplay); // fill the modal and pretend we have opened it\\n\\n    _this.fill();\\n\\n    _this.hasBeenOpened_ = _this.hasBeenFilled_ = true;\\n    _this.endDialog = createEl('p', {\\n      className: 'vjs-control-text',\\n      textContent: _this.localize('End of dialog window.')\\n    });\\n\\n    _this.el().appendChild(_this.endDialog);\\n\\n    _this.setDefaults(); // Grab `persistTextTrackSettings` from the player options if not passed in child options\\n\\n\\n    if (options.persistTextTrackSettings === undefined) {\\n      _this.options_.persistTextTrackSettings = _this.options_.playerOptions.persistTextTrackSettings;\\n    }\\n\\n    _this.on(_this.$('.vjs-done-button'), 'click', function () {\\n      _this.saveSettings();\\n\\n      _this.close();\\n    });\\n\\n    _this.on(_this.$('.vjs-default-button'), 'click', function () {\\n      _this.setDefaults();\\n\\n      _this.updateDisplay();\\n    });\\n\\n    each(selectConfigs, function (config) {\\n      _this.on(_this.$(config.selector), 'change', _this.updateDisplay);\\n    });\\n\\n    if (_this.options_.persistTextTrackSettings) {\\n      _this.restoreSettings();\\n    }\\n\\n    return _this;\\n  }\\n\\n  var _proto = TextTrackSettings.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    this.endDialog = null;\\n\\n    _ModalDialog.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create a <select> element with configured options.\\n   *\\n   * @param {string} key\\n   *        Configuration key to use during creation.\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElSelect_ = function createElSelect_(key, legendId, type) {\\n    var _this2 = this;\\n\\n    if (legendId === void 0) {\\n      legendId = '';\\n    }\\n\\n    if (type === void 0) {\\n      type = 'label';\\n    }\\n\\n    var config = selectConfigs[key];\\n    var id = config.id.replace('%s', this.id_);\\n    var selectLabelledbyIds = [legendId, id].join(' ').trim();\\n    return [\\\"<\\\" + type + \\\" id=\\\\\\\"\\\" + id + \\\"\\\\\\\" class=\\\\\\\"\\\" + (type === 'label' ? 'vjs-label' : '') + \\\"\\\\\\\">\\\", this.localize(config.label), \\\"</\\\" + type + \\\">\\\", \\\"<select aria-labelledby=\\\\\\\"\\\" + selectLabelledbyIds + \\\"\\\\\\\">\\\"].concat(config.options.map(function (o) {\\n      var optionId = id + '-' + o[1].replace(/\\\\W+/g, '');\\n      return [\\\"<option id=\\\\\\\"\\\" + optionId + \\\"\\\\\\\" value=\\\\\\\"\\\" + o[0] + \\\"\\\\\\\" \\\", \\\"aria-labelledby=\\\\\\\"\\\" + selectLabelledbyIds + \\\" \\\" + optionId + \\\"\\\\\\\">\\\", _this2.localize(o[1]), '</option>'].join('');\\n    })).concat('</select>').join('');\\n  }\\n  /**\\n   * Create foreground color element for the component\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElFgColor_ = function createElFgColor_() {\\n    var legendId = \\\"captions-text-legend-\\\" + this.id_;\\n    return ['<fieldset class=\\\"vjs-fg-color vjs-track-setting\\\">', \\\"<legend id=\\\\\\\"\\\" + legendId + \\\"\\\\\\\">\\\", this.localize('Text'), '</legend>', this.createElSelect_('color', legendId), '<span class=\\\"vjs-text-opacity vjs-opacity\\\">', this.createElSelect_('textOpacity', legendId), '</span>', '</fieldset>'].join('');\\n  }\\n  /**\\n   * Create background color element for the component\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElBgColor_ = function createElBgColor_() {\\n    var legendId = \\\"captions-background-\\\" + this.id_;\\n    return ['<fieldset class=\\\"vjs-bg-color vjs-track-setting\\\">', \\\"<legend id=\\\\\\\"\\\" + legendId + \\\"\\\\\\\">\\\", this.localize('Background'), '</legend>', this.createElSelect_('backgroundColor', legendId), '<span class=\\\"vjs-bg-opacity vjs-opacity\\\">', this.createElSelect_('backgroundOpacity', legendId), '</span>', '</fieldset>'].join('');\\n  }\\n  /**\\n   * Create window color element for the component\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElWinColor_ = function createElWinColor_() {\\n    var legendId = \\\"captions-window-\\\" + this.id_;\\n    return ['<fieldset class=\\\"vjs-window-color vjs-track-setting\\\">', \\\"<legend id=\\\\\\\"\\\" + legendId + \\\"\\\\\\\">\\\", this.localize('Window'), '</legend>', this.createElSelect_('windowColor', legendId), '<span class=\\\"vjs-window-opacity vjs-opacity\\\">', this.createElSelect_('windowOpacity', legendId), '</span>', '</fieldset>'].join('');\\n  }\\n  /**\\n   * Create color elements for the component\\n   *\\n   * @return {Element}\\n   *         The element that was created\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElColors_ = function createElColors_() {\\n    return createEl('div', {\\n      className: 'vjs-track-settings-colors',\\n      innerHTML: [this.createElFgColor_(), this.createElBgColor_(), this.createElWinColor_()].join('')\\n    });\\n  }\\n  /**\\n   * Create font elements for the component\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElFont_ = function createElFont_() {\\n    return createEl('div', {\\n      className: 'vjs-track-settings-font',\\n      innerHTML: ['<fieldset class=\\\"vjs-font-percent vjs-track-setting\\\">', this.createElSelect_('fontPercent', '', 'legend'), '</fieldset>', '<fieldset class=\\\"vjs-edge-style vjs-track-setting\\\">', this.createElSelect_('edgeStyle', '', 'legend'), '</fieldset>', '<fieldset class=\\\"vjs-font-family vjs-track-setting\\\">', this.createElSelect_('fontFamily', '', 'legend'), '</fieldset>'].join('')\\n    });\\n  }\\n  /**\\n   * Create controls for the component\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElControls_ = function createElControls_() {\\n    var defaultsDescription = this.localize('restore all settings to the default values');\\n    return createEl('div', {\\n      className: 'vjs-track-settings-controls',\\n      innerHTML: [\\\"<button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"vjs-default-button\\\\\\\" title=\\\\\\\"\\\" + defaultsDescription + \\\"\\\\\\\">\\\", this.localize('Reset'), \\\"<span class=\\\\\\\"vjs-control-text\\\\\\\"> \\\" + defaultsDescription + \\\"</span>\\\", '</button>', \\\"<button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"vjs-done-button\\\\\\\">\\\" + this.localize('Done') + \\\"</button>\\\"].join('')\\n    });\\n  };\\n\\n  _proto.content = function content() {\\n    return [this.createElColors_(), this.createElFont_(), this.createElControls_()];\\n  };\\n\\n  _proto.label = function label() {\\n    return this.localize('Caption Settings Dialog');\\n  };\\n\\n  _proto.description = function description() {\\n    return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\\n  };\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return _ModalDialog.prototype.buildCSSClass.call(this) + ' vjs-text-track-settings';\\n  }\\n  /**\\n   * Gets an object of text track settings (or null).\\n   *\\n   * @return {Object}\\n   *         An object with config values parsed from the DOM or localStorage.\\n   */\\n  ;\\n\\n  _proto.getValues = function getValues() {\\n    var _this3 = this;\\n\\n    return reduce(selectConfigs, function (accum, config, key) {\\n      var value = getSelectedOptionValue(_this3.$(config.selector), config.parser);\\n\\n      if (value !== undefined) {\\n        accum[key] = value;\\n      }\\n\\n      return accum;\\n    }, {});\\n  }\\n  /**\\n   * Sets text track settings from an object of values.\\n   *\\n   * @param {Object} values\\n   *        An object with config values parsed from the DOM or localStorage.\\n   */\\n  ;\\n\\n  _proto.setValues = function setValues(values) {\\n    var _this4 = this;\\n\\n    each(selectConfigs, function (config, key) {\\n      setSelectedOption(_this4.$(config.selector), values[key], config.parser);\\n    });\\n  }\\n  /**\\n   * Sets all `<select>` elements to their default values.\\n   */\\n  ;\\n\\n  _proto.setDefaults = function setDefaults() {\\n    var _this5 = this;\\n\\n    each(selectConfigs, function (config) {\\n      var index = config.hasOwnProperty('default') ? config[\\\"default\\\"] : 0;\\n      _this5.$(config.selector).selectedIndex = index;\\n    });\\n  }\\n  /**\\n   * Restore texttrack settings from localStorage\\n   */\\n  ;\\n\\n  _proto.restoreSettings = function restoreSettings() {\\n    var values;\\n\\n    try {\\n      values = JSON.parse(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.getItem(LOCAL_STORAGE_KEY));\\n    } catch (err) {\\n      log.warn(err);\\n    }\\n\\n    if (values) {\\n      this.setValues(values);\\n    }\\n  }\\n  /**\\n   * Save text track settings to localStorage\\n   */\\n  ;\\n\\n  _proto.saveSettings = function saveSettings() {\\n    if (!this.options_.persistTextTrackSettings) {\\n      return;\\n    }\\n\\n    var values = this.getValues();\\n\\n    try {\\n      if (Object.keys(values).length) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(values));\\n      } else {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.removeItem(LOCAL_STORAGE_KEY);\\n      }\\n    } catch (err) {\\n      log.warn(err);\\n    }\\n  }\\n  /**\\n   * Update display of text track settings\\n   */\\n  ;\\n\\n  _proto.updateDisplay = function updateDisplay() {\\n    var ttDisplay = this.player_.getChild('textTrackDisplay');\\n\\n    if (ttDisplay) {\\n      ttDisplay.updateDisplay();\\n    }\\n  }\\n  /**\\n   * conditionally blur the element and refocus the captions button\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.conditionalBlur_ = function conditionalBlur_() {\\n    this.previouslyActiveEl_ = null;\\n    var cb = this.player_.controlBar;\\n    var subsCapsBtn = cb && cb.subsCapsButton;\\n    var ccBtn = cb && cb.captionsButton;\\n\\n    if (subsCapsBtn) {\\n      subsCapsBtn.focus();\\n    } else if (ccBtn) {\\n      ccBtn.focus();\\n    }\\n  };\\n\\n  return TextTrackSettings;\\n}(ModalDialog);\\n\\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\\n\\n/**\\n * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\\n *\\n * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\\n *\\n * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\\n * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\\n * @example <caption>How to disable the resize manager</caption>\\n * const player = videojs('#vid', {\\n *   resizeManager: false\\n * });\\n *\\n * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\\n *\\n * @extends Component\\n */\\n\\nvar ResizeManager = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ResizeManager, _Component);\\n\\n  /**\\n   * Create the ResizeManager.\\n   *\\n   * @param {Object} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of ResizeManager options.\\n   *\\n   * @param {Object} [options.ResizeObserver]\\n   *        A polyfill for ResizeObserver can be passed in here.\\n   *        If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\\n   */\\n  function ResizeManager(player, options) {\\n    var _this;\\n\\n    var RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.ResizeObserver; // if `null` was passed, we want to disable the ResizeObserver\\n\\n    if (options.ResizeObserver === null) {\\n      RESIZE_OBSERVER_AVAILABLE = false;\\n    } // Only create an element when ResizeObserver isn't available\\n\\n\\n    var options_ = mergeOptions({\\n      createEl: !RESIZE_OBSERVER_AVAILABLE,\\n      reportTouchActivity: false\\n    }, options);\\n    _this = _Component.call(this, player, options_) || this;\\n    _this.ResizeObserver = options.ResizeObserver || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.ResizeObserver;\\n    _this.loadListener_ = null;\\n    _this.resizeObserver_ = null;\\n    _this.debouncedHandler_ = debounce(function () {\\n      _this.resizeHandler();\\n    }, 100, false, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\\n\\n    if (RESIZE_OBSERVER_AVAILABLE) {\\n      _this.resizeObserver_ = new _this.ResizeObserver(_this.debouncedHandler_);\\n\\n      _this.resizeObserver_.observe(player.el());\\n    } else {\\n      _this.loadListener_ = function () {\\n        if (!_this.el_ || !_this.el_.contentWindow) {\\n          return;\\n        }\\n\\n        var debouncedHandler_ = _this.debouncedHandler_;\\n\\n        var unloadListener_ = _this.unloadListener_ = function () {\\n          off(this, 'resize', debouncedHandler_);\\n          off(this, 'unload', unloadListener_);\\n          unloadListener_ = null;\\n        }; // safari and edge can unload the iframe before resizemanager dispose\\n        // we have to dispose of event handlers correctly before that happens\\n\\n\\n        on(_this.el_.contentWindow, 'unload', unloadListener_);\\n        on(_this.el_.contentWindow, 'resize', debouncedHandler_);\\n      };\\n\\n      _this.one('load', _this.loadListener_);\\n    }\\n\\n    return _this;\\n  }\\n\\n  var _proto = ResizeManager.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'iframe', {\\n      className: 'vjs-resize-manager',\\n      tabIndex: -1\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n  }\\n  /**\\n   * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\\n   *\\n   * @fires Player#playerresize\\n   */\\n  ;\\n\\n  _proto.resizeHandler = function resizeHandler() {\\n    /**\\n     * Called when the player size has changed\\n     *\\n     * @event Player#playerresize\\n     * @type {EventTarget~Event}\\n     */\\n    // make sure player is still around to trigger\\n    // prevents this from causing an error after dispose\\n    if (!this.player_ || !this.player_.trigger) {\\n      return;\\n    }\\n\\n    this.player_.trigger('playerresize');\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    if (this.debouncedHandler_) {\\n      this.debouncedHandler_.cancel();\\n    }\\n\\n    if (this.resizeObserver_) {\\n      if (this.player_.el()) {\\n        this.resizeObserver_.unobserve(this.player_.el());\\n      }\\n\\n      this.resizeObserver_.disconnect();\\n    }\\n\\n    if (this.loadListener_) {\\n      this.off('load', this.loadListener_);\\n    }\\n\\n    if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\\n      this.unloadListener_.call(this.el_.contentWindow);\\n    }\\n\\n    this.ResizeObserver = null;\\n    this.resizeObserver = null;\\n    this.debouncedHandler_ = null;\\n    this.loadListener_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  };\\n\\n  return ResizeManager;\\n}(Component);\\n\\nComponent.registerComponent('ResizeManager', ResizeManager);\\n\\nvar defaults = {\\n  trackingThreshold: 30,\\n  liveTolerance: 15\\n};\\n/*\\n  track when we are at the live edge, and other helpers for live playback */\\n\\n/**\\n * A class for checking live current time and determining when the player\\n * is at or behind the live edge.\\n */\\n\\nvar LiveTracker = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LiveTracker, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {number} [options.trackingThreshold=30]\\n   *        Number of seconds of live window (seekableEnd - seekableStart) that\\n   *        media needs to have before the liveui will be shown.\\n   *\\n   * @param {number} [options.liveTolerance=15]\\n   *        Number of seconds behind live that we have to be\\n   *        before we will be considered non-live. Note that this will only\\n   *        be used when playing at the live edge. This allows large seekable end\\n   *        changes to not effect wether we are live or not.\\n   */\\n  function LiveTracker(player, options) {\\n    var _this;\\n\\n    // LiveTracker does not need an element\\n    var options_ = mergeOptions(defaults, options, {\\n      createEl: false\\n    });\\n    _this = _Component.call(this, player, options_) || this;\\n\\n    _this.reset_();\\n\\n    _this.on(_this.player_, 'durationchange', _this.handleDurationchange); // we don't need to track live playback if the document is hidden,\\n    // also, tracking when the document is hidden can\\n    // cause the CPU to spike and eventually crash the page on IE11.\\n\\n\\n    if (IE_VERSION && 'hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      _this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', _this.handleVisibilityChange);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * toggle tracking based on document visiblility\\n   */\\n\\n\\n  var _proto = LiveTracker.prototype;\\n\\n  _proto.handleVisibilityChange = function handleVisibilityChange() {\\n    if (this.player_.duration() !== Infinity) {\\n      return;\\n    }\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.hidden) {\\n      this.stopTracking();\\n    } else {\\n      this.startTracking();\\n    }\\n  }\\n  /**\\n   * all the functionality for tracking when seek end changes\\n   * and for tracking how far past seek end we should be\\n   */\\n  ;\\n\\n  _proto.trackLive_ = function trackLive_() {\\n    var seekable = this.player_.seekable(); // skip undefined seekable\\n\\n    if (!seekable || !seekable.length) {\\n      return;\\n    }\\n\\n    var newTime = Number(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now().toFixed(4));\\n    var deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\\n    this.lastTime_ = newTime;\\n    this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\\n    var liveCurrentTime = this.liveCurrentTime();\\n    var currentTime = this.player_.currentTime(); // we are behind live if any are true\\n    // 1. the player is paused\\n    // 2. the user seeked to a location 2 seconds away from live\\n    // 3. the difference between live and current time is greater\\n    //    liveTolerance which defaults to 15s\\n\\n    var isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance; // we cannot be behind if\\n    // 1. until we have not seen a timeupdate yet\\n    // 2. liveCurrentTime is Infinity, which happens on Android\\n\\n    if (!this.timeupdateSeen_ || liveCurrentTime === Infinity) {\\n      isBehind = false;\\n    }\\n\\n    if (isBehind !== this.behindLiveEdge_) {\\n      this.behindLiveEdge_ = isBehind;\\n      this.trigger('liveedgechange');\\n    }\\n  }\\n  /**\\n   * handle a durationchange event on the player\\n   * and start/stop tracking accordingly.\\n   */\\n  ;\\n\\n  _proto.handleDurationchange = function handleDurationchange() {\\n    if (this.player_.duration() === Infinity && this.liveWindow() >= this.options_.trackingThreshold) {\\n      if (this.player_.options_.liveui) {\\n        this.player_.addClass('vjs-liveui');\\n      }\\n\\n      this.startTracking();\\n    } else {\\n      this.player_.removeClass('vjs-liveui');\\n      this.stopTracking();\\n    }\\n  }\\n  /**\\n   * start tracking live playback\\n   */\\n  ;\\n\\n  _proto.startTracking = function startTracking() {\\n    if (this.isTracking()) {\\n      return;\\n    } // If we haven't seen a timeupdate, we need to check whether playback\\n    // began before this component started tracking. This can happen commonly\\n    // when using autoplay.\\n\\n\\n    if (!this.timeupdateSeen_) {\\n      this.timeupdateSeen_ = this.player_.hasStarted();\\n    }\\n\\n    this.trackingInterval_ = this.setInterval(this.trackLive_, UPDATE_REFRESH_INTERVAL);\\n    this.trackLive_();\\n    this.on(this.player_, ['play', 'pause'], this.trackLive_);\\n\\n    if (!this.timeupdateSeen_) {\\n      this.one(this.player_, 'play', this.handlePlay);\\n      this.one(this.player_, 'timeupdate', this.handleFirstTimeupdate);\\n    } else {\\n      this.on(this.player_, 'seeked', this.handleSeeked);\\n    }\\n  }\\n  /**\\n   * handle the first timeupdate on the player if it wasn't already playing\\n   * when live tracker started tracking.\\n   */\\n  ;\\n\\n  _proto.handleFirstTimeupdate = function handleFirstTimeupdate() {\\n    this.timeupdateSeen_ = true;\\n    this.on(this.player_, 'seeked', this.handleSeeked);\\n  }\\n  /**\\n   * Keep track of what time a seek starts, and listen for seeked\\n   * to find where a seek ends.\\n   */\\n  ;\\n\\n  _proto.handleSeeked = function handleSeeked() {\\n    var timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime());\\n    this.seekedBehindLive_ = this.skipNextSeeked_ ? false : timeDiff > 2;\\n    this.skipNextSeeked_ = false;\\n    this.trackLive_();\\n  }\\n  /**\\n   * handle the first play on the player, and make sure that we seek\\n   * right to the live edge.\\n   */\\n  ;\\n\\n  _proto.handlePlay = function handlePlay() {\\n    this.one(this.player_, 'timeupdate', this.seekToLiveEdge);\\n  }\\n  /**\\n   * Stop tracking, and set all internal variables to\\n   * their initial value.\\n   */\\n  ;\\n\\n  _proto.reset_ = function reset_() {\\n    this.lastTime_ = -1;\\n    this.pastSeekEnd_ = 0;\\n    this.lastSeekEnd_ = -1;\\n    this.behindLiveEdge_ = true;\\n    this.timeupdateSeen_ = false;\\n    this.seekedBehindLive_ = false;\\n    this.skipNextSeeked_ = false;\\n    this.clearInterval(this.trackingInterval_);\\n    this.trackingInterval_ = null;\\n    this.off(this.player_, ['play', 'pause'], this.trackLive_);\\n    this.off(this.player_, 'seeked', this.handleSeeked);\\n    this.off(this.player_, 'play', this.handlePlay);\\n    this.off(this.player_, 'timeupdate', this.handleFirstTimeupdate);\\n    this.off(this.player_, 'timeupdate', this.seekToLiveEdge);\\n  }\\n  /**\\n   * stop tracking live playback\\n   */\\n  ;\\n\\n  _proto.stopTracking = function stopTracking() {\\n    if (!this.isTracking()) {\\n      return;\\n    }\\n\\n    this.reset_();\\n    this.trigger('liveedgechange');\\n  }\\n  /**\\n   * A helper to get the player seekable end\\n   * so that we don't have to null check everywhere\\n   *\\n   * @return {number}\\n   *         The furthest seekable end or Infinity.\\n   */\\n  ;\\n\\n  _proto.seekableEnd = function seekableEnd() {\\n    var seekable = this.player_.seekable();\\n    var seekableEnds = [];\\n    var i = seekable ? seekable.length : 0;\\n\\n    while (i--) {\\n      seekableEnds.push(seekable.end(i));\\n    } // grab the furthest seekable end after sorting, or if there are none\\n    // default to Infinity\\n\\n\\n    return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\\n  }\\n  /**\\n   * A helper to get the player seekable start\\n   * so that we don't have to null check everywhere\\n   *\\n   * @return {number}\\n   *         The earliest seekable start or 0.\\n   */\\n  ;\\n\\n  _proto.seekableStart = function seekableStart() {\\n    var seekable = this.player_.seekable();\\n    var seekableStarts = [];\\n    var i = seekable ? seekable.length : 0;\\n\\n    while (i--) {\\n      seekableStarts.push(seekable.start(i));\\n    } // grab the first seekable start after sorting, or if there are none\\n    // default to 0\\n\\n\\n    return seekableStarts.length ? seekableStarts.sort()[0] : 0;\\n  }\\n  /**\\n   * Get the live time window aka\\n   * the amount of time between seekable start and\\n   * live current time.\\n   *\\n   * @return {number}\\n   *         The amount of seconds that are seekable in\\n   *         the live video.\\n   */\\n  ;\\n\\n  _proto.liveWindow = function liveWindow() {\\n    var liveCurrentTime = this.liveCurrentTime();\\n\\n    if (liveCurrentTime === Infinity) {\\n      return Infinity;\\n    }\\n\\n    return liveCurrentTime - this.seekableStart();\\n  }\\n  /**\\n   * Determines if the player is live, only checks if this component\\n   * is tracking live playback or not\\n   *\\n   * @return {boolean}\\n   *         Wether liveTracker is tracking\\n   */\\n  ;\\n\\n  _proto.isLive = function isLive() {\\n    return this.isTracking();\\n  }\\n  /**\\n   * Determines if currentTime is at the live edge and won't fall behind\\n   * on each seekableendchange\\n   *\\n   * @return {boolean}\\n   *         Wether playback is at the live edge\\n   */\\n  ;\\n\\n  _proto.atLiveEdge = function atLiveEdge() {\\n    return !this.behindLiveEdge();\\n  }\\n  /**\\n   * get what we expect the live current time to be\\n   *\\n   * @return {number}\\n   *         The expected live current time\\n   */\\n  ;\\n\\n  _proto.liveCurrentTime = function liveCurrentTime() {\\n    return this.pastSeekEnd() + this.seekableEnd();\\n  }\\n  /**\\n   * The number of seconds that have occured after seekable end\\n   * changed. This will be reset to 0 once seekable end changes.\\n   *\\n   * @return {number}\\n   *         Seconds past the current seekable end\\n   */\\n  ;\\n\\n  _proto.pastSeekEnd = function pastSeekEnd() {\\n    var seekableEnd = this.seekableEnd();\\n\\n    if (this.lastSeekEnd_ !== -1 && seekableEnd !== this.lastSeekEnd_) {\\n      this.pastSeekEnd_ = 0;\\n    }\\n\\n    this.lastSeekEnd_ = seekableEnd;\\n    return this.pastSeekEnd_;\\n  }\\n  /**\\n   * If we are currently behind the live edge, aka currentTime will be\\n   * behind on a seekableendchange\\n   *\\n   * @return {boolean}\\n   *         If we are behind the live edge\\n   */\\n  ;\\n\\n  _proto.behindLiveEdge = function behindLiveEdge() {\\n    return this.behindLiveEdge_;\\n  }\\n  /**\\n   * Wether live tracker is currently tracking or not.\\n   */\\n  ;\\n\\n  _proto.isTracking = function isTracking() {\\n    return typeof this.trackingInterval_ === 'number';\\n  }\\n  /**\\n   * Seek to the live edge if we are behind the live edge\\n   */\\n  ;\\n\\n  _proto.seekToLiveEdge = function seekToLiveEdge() {\\n    this.seekedBehindLive_ = false;\\n\\n    if (this.atLiveEdge()) {\\n      return;\\n    } // skipNextSeeked_\\n\\n\\n    this.skipNextSeeked_ = true;\\n    this.player_.currentTime(this.liveCurrentTime());\\n  }\\n  /**\\n   * Dispose of liveTracker\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.handleVisibilityChange);\\n    this.stopTracking();\\n\\n    _Component.prototype.dispose.call(this);\\n  };\\n\\n  return LiveTracker;\\n}(Component);\\n\\nComponent.registerComponent('LiveTracker', LiveTracker);\\n\\n/**\\n * This function is used to fire a sourceset when there is something\\n * similar to `mediaEl.load()` being called. It will try to find the source via\\n * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\\n * with the source that was found or empty string if we cannot know. If it cannot\\n * find a source then `sourceset` will not be fired.\\n *\\n * @param {Html5} tech\\n *        The tech object that sourceset was setup on\\n *\\n * @return {boolean}\\n *         returns false if the sourceset was not fired and true otherwise.\\n */\\n\\nvar sourcesetLoad = function sourcesetLoad(tech) {\\n  var el = tech.el(); // if `el.src` is set, that source will be loaded.\\n\\n  if (el.hasAttribute('src')) {\\n    tech.triggerSourceset(el.src);\\n    return true;\\n  }\\n  /**\\n   * Since there isn't a src property on the media element, source elements will be used for\\n   * implementing the source selection algorithm. This happens asynchronously and\\n   * for most cases were there is more than one source we cannot tell what source will\\n   * be loaded, without re-implementing the source selection algorithm. At this time we are not\\n   * going to do that. There are three special cases that we do handle here though:\\n   *\\n   * 1. If there are no sources, do not fire `sourceset`.\\n   * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\\n   * 3. If there is more than one `<source>` but all of them have the same `src` url.\\n   *    That will be our src.\\n   */\\n\\n\\n  var sources = tech.$$('source');\\n  var srcUrls = [];\\n  var src = ''; // if there are no sources, do not fire sourceset\\n\\n  if (!sources.length) {\\n    return false;\\n  } // only count valid/non-duplicate source elements\\n\\n\\n  for (var i = 0; i < sources.length; i++) {\\n    var url = sources[i].src;\\n\\n    if (url && srcUrls.indexOf(url) === -1) {\\n      srcUrls.push(url);\\n    }\\n  } // there were no valid sources\\n\\n\\n  if (!srcUrls.length) {\\n    return false;\\n  } // there is only one valid source element url\\n  // use that\\n\\n\\n  if (srcUrls.length === 1) {\\n    src = srcUrls[0];\\n  }\\n\\n  tech.triggerSourceset(src);\\n  return true;\\n};\\n/**\\n * our implementation of an `innerHTML` descriptor for browsers\\n * that do not have one.\\n */\\n\\n\\nvar innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\\n  get: function get() {\\n    return this.cloneNode(true).innerHTML;\\n  },\\n  set: function set(v) {\\n    // make a dummy node to use innerHTML on\\n    var dummy = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(this.nodeName.toLowerCase()); // set innerHTML to the value provided\\n\\n    dummy.innerHTML = v; // make a document fragment to hold the nodes from dummy\\n\\n    var docFrag = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createDocumentFragment(); // copy all of the nodes created by the innerHTML on dummy\\n    // to the document fragment\\n\\n    while (dummy.childNodes.length) {\\n      docFrag.appendChild(dummy.childNodes[0]);\\n    } // remove content\\n\\n\\n    this.innerText = ''; // now we add all of that html in one by appending the\\n    // document fragment. This is how innerHTML does it.\\n\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.appendChild.call(this, docFrag); // then return the result that innerHTML's setter would\\n\\n    return this.innerHTML;\\n  }\\n});\\n/**\\n * Get a property descriptor given a list of priorities and the\\n * property to get.\\n */\\n\\nvar getDescriptor = function getDescriptor(priority, prop) {\\n  var descriptor = {};\\n\\n  for (var i = 0; i < priority.length; i++) {\\n    descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\\n\\n    if (descriptor && descriptor.set && descriptor.get) {\\n      break;\\n    }\\n  }\\n\\n  descriptor.enumerable = true;\\n  descriptor.configurable = true;\\n  return descriptor;\\n};\\n\\nvar getInnerHTMLDescriptor = function getInnerHTMLDescriptor(tech) {\\n  return getDescriptor([tech.el(), global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLMediaElement.prototype, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\\n};\\n/**\\n * Patches browser internal functions so that we can tell synchronously\\n * if a `<source>` was appended to the media element. For some reason this\\n * causes a `sourceset` if the the media element is ready and has no source.\\n * This happens when:\\n * - The page has just loaded and the media element does not have a source.\\n * - The media element was emptied of all sources, then `load()` was called.\\n *\\n * It does this by patching the following functions/properties when they are supported:\\n *\\n * - `append()` - can be used to add a `<source>` element to the media element\\n * - `appendChild()` - can be used to add a `<source>` element to the media element\\n * - `insertAdjacentHTML()` -  can be used to add a `<source>` element to the media element\\n * - `innerHTML` -  can be used to add a `<source>` element to the media element\\n *\\n * @param {Html5} tech\\n *        The tech object that sourceset is being setup on.\\n */\\n\\n\\nvar firstSourceWatch = function firstSourceWatch(tech) {\\n  var el = tech.el(); // make sure firstSourceWatch isn't setup twice.\\n\\n  if (el.resetSourceWatch_) {\\n    return;\\n  }\\n\\n  var old = {};\\n  var innerDescriptor = getInnerHTMLDescriptor(tech);\\n\\n  var appendWrapper = function appendWrapper(appendFn) {\\n    return function () {\\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n        args[_key] = arguments[_key];\\n      }\\n\\n      var retval = appendFn.apply(el, args);\\n      sourcesetLoad(tech);\\n      return retval;\\n    };\\n  };\\n\\n  ['append', 'appendChild', 'insertAdjacentHTML'].forEach(function (k) {\\n    if (!el[k]) {\\n      return;\\n    } // store the old function\\n\\n\\n    old[k] = el[k]; // call the old function with a sourceset if a source\\n    // was loaded\\n\\n    el[k] = appendWrapper(old[k]);\\n  });\\n  Object.defineProperty(el, 'innerHTML', mergeOptions(innerDescriptor, {\\n    set: appendWrapper(innerDescriptor.set)\\n  }));\\n\\n  el.resetSourceWatch_ = function () {\\n    el.resetSourceWatch_ = null;\\n    Object.keys(old).forEach(function (k) {\\n      el[k] = old[k];\\n    });\\n    Object.defineProperty(el, 'innerHTML', innerDescriptor);\\n  }; // on the first sourceset, we need to revert our changes\\n\\n\\n  tech.one('sourceset', el.resetSourceWatch_);\\n};\\n/**\\n * our implementation of a `src` descriptor for browsers\\n * that do not have one.\\n */\\n\\n\\nvar srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\\n  get: function get() {\\n    if (this.hasAttribute('src')) {\\n      return getAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.getAttribute.call(this, 'src'));\\n    }\\n\\n    return '';\\n  },\\n  set: function set(v) {\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.setAttribute.call(this, 'src', v);\\n    return v;\\n  }\\n});\\n\\nvar getSrcDescriptor = function getSrcDescriptor(tech) {\\n  return getDescriptor([tech.el(), global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\\n};\\n/**\\n * setup `sourceset` handling on the `Html5` tech. This function\\n * patches the following element properties/functions:\\n *\\n * - `src` - to determine when `src` is set\\n * - `setAttribute()` - to determine when `src` is set\\n * - `load()` - this re-triggers the source selection algorithm, and can\\n *              cause a sourceset.\\n *\\n * If there is no source when we are adding `sourceset` support or during a `load()`\\n * we also patch the functions listed in `firstSourceWatch`.\\n *\\n * @param {Html5} tech\\n *        The tech to patch\\n */\\n\\n\\nvar setupSourceset = function setupSourceset(tech) {\\n  if (!tech.featuresSourceset) {\\n    return;\\n  }\\n\\n  var el = tech.el(); // make sure sourceset isn't setup twice.\\n\\n  if (el.resetSourceset_) {\\n    return;\\n  }\\n\\n  var srcDescriptor = getSrcDescriptor(tech);\\n  var oldSetAttribute = el.setAttribute;\\n  var oldLoad = el.load;\\n  Object.defineProperty(el, 'src', mergeOptions(srcDescriptor, {\\n    set: function set(v) {\\n      var retval = srcDescriptor.set.call(el, v); // we use the getter here to get the actual value set on src\\n\\n      tech.triggerSourceset(el.src);\\n      return retval;\\n    }\\n  }));\\n\\n  el.setAttribute = function (n, v) {\\n    var retval = oldSetAttribute.call(el, n, v);\\n\\n    if (/src/i.test(n)) {\\n      tech.triggerSourceset(el.src);\\n    }\\n\\n    return retval;\\n  };\\n\\n  el.load = function () {\\n    var retval = oldLoad.call(el); // if load was called, but there was no source to fire\\n    // sourceset on. We have to watch for a source append\\n    // as that can trigger a `sourceset` when the media element\\n    // has no source\\n\\n    if (!sourcesetLoad(tech)) {\\n      tech.triggerSourceset('');\\n      firstSourceWatch(tech);\\n    }\\n\\n    return retval;\\n  };\\n\\n  if (el.currentSrc) {\\n    tech.triggerSourceset(el.currentSrc);\\n  } else if (!sourcesetLoad(tech)) {\\n    firstSourceWatch(tech);\\n  }\\n\\n  el.resetSourceset_ = function () {\\n    el.resetSourceset_ = null;\\n    el.load = oldLoad;\\n    el.setAttribute = oldSetAttribute;\\n    Object.defineProperty(el, 'src', srcDescriptor);\\n\\n    if (el.resetSourceWatch_) {\\n      el.resetSourceWatch_();\\n    }\\n  };\\n};\\n\\n/**\\n * Object.defineProperty but \\\"lazy\\\", which means that the value is only set after\\n * it retrieved the first time, rather than being set right away.\\n *\\n * @param {Object} obj the object to set the property on\\n * @param {string} key the key for the property to set\\n * @param {Function} getValue the function used to get the value when it is needed.\\n * @param {boolean} setter wether a setter shoould be allowed or not\\n */\\nvar defineLazyProperty = function defineLazyProperty(obj, key, getValue, setter) {\\n  if (setter === void 0) {\\n    setter = true;\\n  }\\n\\n  var set = function set(value) {\\n    return Object.defineProperty(obj, key, {\\n      value: value,\\n      enumerable: true,\\n      writable: true\\n    });\\n  };\\n\\n  var options = {\\n    configurable: true,\\n    enumerable: true,\\n    get: function get() {\\n      var value = getValue();\\n      set(value);\\n      return value;\\n    }\\n  };\\n\\n  if (setter) {\\n    options.set = set;\\n  }\\n\\n  return Object.defineProperty(obj, key, options);\\n};\\n\\n/**\\n * HTML5 Media Controller - Wrapper for HTML5 Media API\\n *\\n * @mixes Tech~SourceHandlerAdditions\\n * @extends Tech\\n */\\n\\nvar Html5 = /*#__PURE__*/function (_Tech) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Html5, _Tech);\\n\\n  /**\\n  * Create an instance of this Tech.\\n  *\\n  * @param {Object} [options]\\n  *        The key/value store of player options.\\n  *\\n  * @param {Component~ReadyCallback} ready\\n  *        Callback function to call when the `HTML5` Tech is ready.\\n  */\\n  function Html5(options, ready) {\\n    var _this;\\n\\n    _this = _Tech.call(this, options, ready) || this;\\n    var source = options.source;\\n    var crossoriginTracks = false; // Set the source if one is provided\\n    // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\\n    // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\\n    // anyway so the error gets fired.\\n\\n    if (source && (_this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\\n      _this.setSource(source);\\n    } else {\\n      _this.handleLateInit_(_this.el_);\\n    } // setup sourceset after late sourceset/init\\n\\n\\n    if (options.enableSourceset) {\\n      _this.setupSourcesetHandling_();\\n    }\\n\\n    if (_this.el_.hasChildNodes()) {\\n      var nodes = _this.el_.childNodes;\\n      var nodesLength = nodes.length;\\n      var removeNodes = [];\\n\\n      while (nodesLength--) {\\n        var node = nodes[nodesLength];\\n        var nodeName = node.nodeName.toLowerCase();\\n\\n        if (nodeName === 'track') {\\n          if (!_this.featuresNativeTextTracks) {\\n            // Empty video tag tracks so the built-in player doesn't use them also.\\n            // This may not be fast enough to stop HTML5 browsers from reading the tags\\n            // so we'll need to turn off any default tracks if we're manually doing\\n            // captions and subtitles. videoElement.textTracks\\n            removeNodes.push(node);\\n          } else {\\n            // store HTMLTrackElement and TextTrack to remote list\\n            _this.remoteTextTrackEls().addTrackElement_(node);\\n\\n            _this.remoteTextTracks().addTrack(node.track);\\n\\n            _this.textTracks().addTrack(node.track);\\n\\n            if (!crossoriginTracks && !_this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\\n              crossoriginTracks = true;\\n            }\\n          }\\n        }\\n      }\\n\\n      for (var i = 0; i < removeNodes.length; i++) {\\n        _this.el_.removeChild(removeNodes[i]);\\n      }\\n    }\\n\\n    _this.proxyNativeTracks_();\\n\\n    if (_this.featuresNativeTextTracks && crossoriginTracks) {\\n      log.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\\\'t used.\\\\n' + 'This may prevent text tracks from loading.');\\n    } // prevent iOS Safari from disabling metadata text tracks during native playback\\n\\n\\n    _this.restoreMetadataTracksInIOSNativePlayer_(); // Determine if native controls should be used\\n    // Our goal should be to get the custom controls on mobile solid everywhere\\n    // so we can remove this all together. Right now this will block custom\\n    // controls on touch enabled laptops like the Chrome Pixel\\n\\n\\n    if ((TOUCH_ENABLED || IS_IPHONE || IS_NATIVE_ANDROID) && options.nativeControlsForTouch === true) {\\n      _this.setControls(true);\\n    } // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\\n    // into a `fullscreenchange` event\\n\\n\\n    _this.proxyWebkitFullscreen_();\\n\\n    _this.triggerReady();\\n\\n    return _this;\\n  }\\n  /**\\n   * Dispose of `HTML5` media element and remove all tracks.\\n   */\\n\\n\\n  var _proto = Html5.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    if (this.el_ && this.el_.resetSourceset_) {\\n      this.el_.resetSourceset_();\\n    }\\n\\n    Html5.disposeMediaElement(this.el_);\\n    this.options_ = null; // tech will handle clearing of the emulated track list\\n\\n    _Tech.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Modify the media element so that we can detect when\\n   * the source is changed. Fires `sourceset` just after the source has changed\\n   */\\n  ;\\n\\n  _proto.setupSourcesetHandling_ = function setupSourcesetHandling_() {\\n    setupSourceset(this);\\n  }\\n  /**\\n   * When a captions track is enabled in the iOS Safari native player, all other\\n   * tracks are disabled (including metadata tracks), which nulls all of their\\n   * associated cue points. This will restore metadata tracks to their pre-fullscreen\\n   * state in those cases so that cue points are not needlessly lost.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.restoreMetadataTracksInIOSNativePlayer_ = function restoreMetadataTracksInIOSNativePlayer_() {\\n    var textTracks = this.textTracks();\\n    var metadataTracksPreFullscreenState; // captures a snapshot of every metadata track's current state\\n\\n    var takeMetadataTrackSnapshot = function takeMetadataTrackSnapshot() {\\n      metadataTracksPreFullscreenState = [];\\n\\n      for (var i = 0; i < textTracks.length; i++) {\\n        var track = textTracks[i];\\n\\n        if (track.kind === 'metadata') {\\n          metadataTracksPreFullscreenState.push({\\n            track: track,\\n            storedMode: track.mode\\n          });\\n        }\\n      }\\n    }; // snapshot each metadata track's initial state, and update the snapshot\\n    // each time there is a track 'change' event\\n\\n\\n    takeMetadataTrackSnapshot();\\n    textTracks.addEventListener('change', takeMetadataTrackSnapshot);\\n    this.on('dispose', function () {\\n      return textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\\n    });\\n\\n    var restoreTrackMode = function restoreTrackMode() {\\n      for (var i = 0; i < metadataTracksPreFullscreenState.length; i++) {\\n        var storedTrack = metadataTracksPreFullscreenState[i];\\n\\n        if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\\n          storedTrack.track.mode = storedTrack.storedMode;\\n        }\\n      } // we only want this handler to be executed on the first 'change' event\\n\\n\\n      textTracks.removeEventListener('change', restoreTrackMode);\\n    }; // when we enter fullscreen playback, stop updating the snapshot and\\n    // restore all track modes to their pre-fullscreen state\\n\\n\\n    this.on('webkitbeginfullscreen', function () {\\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot); // remove the listener before adding it just in case it wasn't previously removed\\n\\n      textTracks.removeEventListener('change', restoreTrackMode);\\n      textTracks.addEventListener('change', restoreTrackMode);\\n    }); // start updating the snapshot again after leaving fullscreen\\n\\n    this.on('webkitendfullscreen', function () {\\n      // remove the listener before adding it just in case it wasn't previously removed\\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\\n      textTracks.addEventListener('change', takeMetadataTrackSnapshot); // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\\n\\n      textTracks.removeEventListener('change', restoreTrackMode);\\n    });\\n  }\\n  /**\\n   * Attempt to force override of tracks for the given type\\n   *\\n   * @param {string} type - Track type to override, possible values include 'Audio',\\n   * 'Video', and 'Text'.\\n   * @param {boolean} override - If set to true native audio/video will be overridden,\\n   * otherwise native audio/video will potentially be used.\\n   * @private\\n   */\\n  ;\\n\\n  _proto.overrideNative_ = function overrideNative_(type, override) {\\n    var _this2 = this;\\n\\n    // If there is no behavioral change don't add/remove listeners\\n    if (override !== this[\\\"featuresNative\\\" + type + \\\"Tracks\\\"]) {\\n      return;\\n    }\\n\\n    var lowerCaseType = type.toLowerCase();\\n\\n    if (this[lowerCaseType + \\\"TracksListeners_\\\"]) {\\n      Object.keys(this[lowerCaseType + \\\"TracksListeners_\\\"]).forEach(function (eventName) {\\n        var elTracks = _this2.el()[lowerCaseType + \\\"Tracks\\\"];\\n\\n        elTracks.removeEventListener(eventName, _this2[lowerCaseType + \\\"TracksListeners_\\\"][eventName]);\\n      });\\n    }\\n\\n    this[\\\"featuresNative\\\" + type + \\\"Tracks\\\"] = !override;\\n    this[lowerCaseType + \\\"TracksListeners_\\\"] = null;\\n    this.proxyNativeTracksForType_(lowerCaseType);\\n  }\\n  /**\\n   * Attempt to force override of native audio tracks.\\n   *\\n   * @param {boolean} override - If set to true native audio will be overridden,\\n   * otherwise native audio will potentially be used.\\n   */\\n  ;\\n\\n  _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks(override) {\\n    this.overrideNative_('Audio', override);\\n  }\\n  /**\\n   * Attempt to force override of native video tracks.\\n   *\\n   * @param {boolean} override - If set to true native video will be overridden,\\n   * otherwise native video will potentially be used.\\n   */\\n  ;\\n\\n  _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks(override) {\\n    this.overrideNative_('Video', override);\\n  }\\n  /**\\n   * Proxy native track list events for the given type to our track\\n   * lists if the browser we are playing in supports that type of track list.\\n   *\\n   * @param {string} name - Track type; values include 'audio', 'video', and 'text'\\n   * @private\\n   */\\n  ;\\n\\n  _proto.proxyNativeTracksForType_ = function proxyNativeTracksForType_(name) {\\n    var _this3 = this;\\n\\n    var props = NORMAL[name];\\n    var elTracks = this.el()[props.getterName];\\n    var techTracks = this[props.getterName]();\\n\\n    if (!this[\\\"featuresNative\\\" + props.capitalName + \\\"Tracks\\\"] || !elTracks || !elTracks.addEventListener) {\\n      return;\\n    }\\n\\n    var listeners = {\\n      change: function change(e) {\\n        var event = {\\n          type: 'change',\\n          target: techTracks,\\n          currentTarget: techTracks,\\n          srcElement: techTracks\\n        };\\n        techTracks.trigger(event); // if we are a text track change event, we should also notify the\\n        // remote text track list. This can potentially cause a false positive\\n        // if we were to get a change event on a non-remote track and\\n        // we triggered the event on the remote text track list which doesn't\\n        // contain that track. However, best practices mean looping through the\\n        // list of tracks and searching for the appropriate mode value, so,\\n        // this shouldn't pose an issue\\n\\n        if (name === 'text') {\\n          _this3[REMOTE.remoteText.getterName]().trigger(event);\\n        }\\n      },\\n      addtrack: function addtrack(e) {\\n        techTracks.addTrack(e.track);\\n      },\\n      removetrack: function removetrack(e) {\\n        techTracks.removeTrack(e.track);\\n      }\\n    };\\n\\n    var removeOldTracks = function removeOldTracks() {\\n      var removeTracks = [];\\n\\n      for (var i = 0; i < techTracks.length; i++) {\\n        var found = false;\\n\\n        for (var j = 0; j < elTracks.length; j++) {\\n          if (elTracks[j] === techTracks[i]) {\\n            found = true;\\n            break;\\n          }\\n        }\\n\\n        if (!found) {\\n          removeTracks.push(techTracks[i]);\\n        }\\n      }\\n\\n      while (removeTracks.length) {\\n        techTracks.removeTrack(removeTracks.shift());\\n      }\\n    };\\n\\n    this[props.getterName + 'Listeners_'] = listeners;\\n    Object.keys(listeners).forEach(function (eventName) {\\n      var listener = listeners[eventName];\\n      elTracks.addEventListener(eventName, listener);\\n\\n      _this3.on('dispose', function (e) {\\n        return elTracks.removeEventListener(eventName, listener);\\n      });\\n    }); // Remove (native) tracks that are not used anymore\\n\\n    this.on('loadstart', removeOldTracks);\\n    this.on('dispose', function (e) {\\n      return _this3.off('loadstart', removeOldTracks);\\n    });\\n  }\\n  /**\\n   * Proxy all native track list events to our track lists if the browser we are playing\\n   * in supports that type of track list.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.proxyNativeTracks_ = function proxyNativeTracks_() {\\n    var _this4 = this;\\n\\n    NORMAL.names.forEach(function (name) {\\n      _this4.proxyNativeTracksForType_(name);\\n    });\\n  }\\n  /**\\n   * Create the `Html5` Tech's DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var el = this.options_.tag; // Check if this browser supports moving the element into the box.\\n    // On the iPhone video will break if you move the element,\\n    // So we have to create a brand new element.\\n    // If we ingested the player div, we do not need to move the media element.\\n\\n    if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\\n      // If the original tag is still there, clone and remove it.\\n      if (el) {\\n        var clone = el.cloneNode(true);\\n\\n        if (el.parentNode) {\\n          el.parentNode.insertBefore(clone, el);\\n        }\\n\\n        Html5.disposeMediaElement(el);\\n        el = clone;\\n      } else {\\n        el = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'); // determine if native controls should be used\\n\\n        var tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\\n        var attributes = mergeOptions({}, tagAttributes);\\n\\n        if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\\n          delete attributes.controls;\\n        }\\n\\n        setAttributes(el, assign(attributes, {\\n          id: this.options_.techId,\\n          \\\"class\\\": 'vjs-tech'\\n        }));\\n      }\\n\\n      el.playerId = this.options_.playerId;\\n    }\\n\\n    if (typeof this.options_.preload !== 'undefined') {\\n      setAttribute(el, 'preload', this.options_.preload);\\n    } // Update specific tag settings, in case they were overridden\\n    // `autoplay` has to be *last* so that `muted` and `playsinline` are present\\n    // when iOS/Safari or other browsers attempt to autoplay.\\n\\n\\n    var settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\\n\\n    for (var i = 0; i < settingsAttrs.length; i++) {\\n      var attr = settingsAttrs[i];\\n      var value = this.options_[attr];\\n\\n      if (typeof value !== 'undefined') {\\n        if (value) {\\n          setAttribute(el, attr, attr);\\n        } else {\\n          removeAttribute(el, attr);\\n        }\\n\\n        el[attr] = value;\\n      }\\n    }\\n\\n    return el;\\n  }\\n  /**\\n   * This will be triggered if the loadstart event has already fired, before videojs was\\n   * ready. Two known examples of when this can happen are:\\n   * 1. If we're loading the playback object after it has started loading\\n   * 2. The media is already playing the (often with autoplay on) then\\n   *\\n   * This function will fire another loadstart so that videojs can catchup.\\n   *\\n   * @fires Tech#loadstart\\n   *\\n   * @return {undefined}\\n   *         returns nothing.\\n   */\\n  ;\\n\\n  _proto.handleLateInit_ = function handleLateInit_(el) {\\n    if (el.networkState === 0 || el.networkState === 3) {\\n      // The video element hasn't started loading the source yet\\n      // or didn't find a source\\n      return;\\n    }\\n\\n    if (el.readyState === 0) {\\n      // NetworkState is set synchronously BUT loadstart is fired at the\\n      // end of the current stack, usually before setInterval(fn, 0).\\n      // So at this point we know loadstart may have already fired or is\\n      // about to fire, and either way the player hasn't seen it yet.\\n      // We don't want to fire loadstart prematurely here and cause a\\n      // double loadstart so we'll wait and see if it happens between now\\n      // and the next loop, and fire it if not.\\n      // HOWEVER, we also want to make sure it fires before loadedmetadata\\n      // which could also happen between now and the next loop, so we'll\\n      // watch for that also.\\n      var loadstartFired = false;\\n\\n      var setLoadstartFired = function setLoadstartFired() {\\n        loadstartFired = true;\\n      };\\n\\n      this.on('loadstart', setLoadstartFired);\\n\\n      var triggerLoadstart = function triggerLoadstart() {\\n        // We did miss the original loadstart. Make sure the player\\n        // sees loadstart before loadedmetadata\\n        if (!loadstartFired) {\\n          this.trigger('loadstart');\\n        }\\n      };\\n\\n      this.on('loadedmetadata', triggerLoadstart);\\n      this.ready(function () {\\n        this.off('loadstart', setLoadstartFired);\\n        this.off('loadedmetadata', triggerLoadstart);\\n\\n        if (!loadstartFired) {\\n          // We did miss the original native loadstart. Fire it now.\\n          this.trigger('loadstart');\\n        }\\n      });\\n      return;\\n    } // From here on we know that loadstart already fired and we missed it.\\n    // The other readyState events aren't as much of a problem if we double\\n    // them, so not going to go to as much trouble as loadstart to prevent\\n    // that unless we find reason to.\\n\\n\\n    var eventsToTrigger = ['loadstart']; // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\\n\\n    eventsToTrigger.push('loadedmetadata'); // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\\n\\n    if (el.readyState >= 2) {\\n      eventsToTrigger.push('loadeddata');\\n    } // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\\n\\n\\n    if (el.readyState >= 3) {\\n      eventsToTrigger.push('canplay');\\n    } // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\\n\\n\\n    if (el.readyState >= 4) {\\n      eventsToTrigger.push('canplaythrough');\\n    } // We still need to give the player time to add event listeners\\n\\n\\n    this.ready(function () {\\n      eventsToTrigger.forEach(function (type) {\\n        this.trigger(type);\\n      }, this);\\n    });\\n  }\\n  /**\\n   * Set current time for the `HTML5` tech.\\n   *\\n   * @param {number} seconds\\n   *        Set the current time of the media to this.\\n   */\\n  ;\\n\\n  _proto.setCurrentTime = function setCurrentTime(seconds) {\\n    try {\\n      this.el_.currentTime = seconds;\\n    } catch (e) {\\n      log(e, 'Video is not ready. (Video.js)'); // this.warning(VideoJS.warnings.videoNotReady);\\n    }\\n  }\\n  /**\\n   * Get the current duration of the HTML5 media element.\\n   *\\n   * @return {number}\\n   *         The duration of the media or 0 if there is no duration.\\n   */\\n  ;\\n\\n  _proto.duration = function duration() {\\n    var _this5 = this;\\n\\n    // Android Chrome will report duration as Infinity for VOD HLS until after\\n    // playback has started, which triggers the live display erroneously.\\n    // Return NaN if playback has not started and trigger a durationupdate once\\n    // the duration can be reliably known.\\n    if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\\n      // Wait for the first `timeupdate` with currentTime > 0 - there may be\\n      // several with 0\\n      var checkProgress = function checkProgress() {\\n        if (_this5.el_.currentTime > 0) {\\n          // Trigger durationchange for genuinely live video\\n          if (_this5.el_.duration === Infinity) {\\n            _this5.trigger('durationchange');\\n          }\\n\\n          _this5.off('timeupdate', checkProgress);\\n        }\\n      };\\n\\n      this.on('timeupdate', checkProgress);\\n      return NaN;\\n    }\\n\\n    return this.el_.duration || NaN;\\n  }\\n  /**\\n   * Get the current width of the HTML5 media element.\\n   *\\n   * @return {number}\\n   *         The width of the HTML5 media element.\\n   */\\n  ;\\n\\n  _proto.width = function width() {\\n    return this.el_.offsetWidth;\\n  }\\n  /**\\n   * Get the current height of the HTML5 media element.\\n   *\\n   * @return {number}\\n   *         The height of the HTML5 media element.\\n   */\\n  ;\\n\\n  _proto.height = function height() {\\n    return this.el_.offsetHeight;\\n  }\\n  /**\\n   * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\\n   * `fullscreenchange` event.\\n   *\\n   * @private\\n   * @fires fullscreenchange\\n   * @listens webkitendfullscreen\\n   * @listens webkitbeginfullscreen\\n   * @listens webkitbeginfullscreen\\n   */\\n  ;\\n\\n  _proto.proxyWebkitFullscreen_ = function proxyWebkitFullscreen_() {\\n    var _this6 = this;\\n\\n    if (!('webkitDisplayingFullscreen' in this.el_)) {\\n      return;\\n    }\\n\\n    var endFn = function endFn() {\\n      this.trigger('fullscreenchange', {\\n        isFullscreen: false\\n      });\\n    };\\n\\n    var beginFn = function beginFn() {\\n      if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\\n        this.one('webkitendfullscreen', endFn);\\n        this.trigger('fullscreenchange', {\\n          isFullscreen: true,\\n          // set a flag in case another tech triggers fullscreenchange\\n          nativeIOSFullscreen: true\\n        });\\n      }\\n    };\\n\\n    this.on('webkitbeginfullscreen', beginFn);\\n    this.on('dispose', function () {\\n      _this6.off('webkitbeginfullscreen', beginFn);\\n\\n      _this6.off('webkitendfullscreen', endFn);\\n    });\\n  }\\n  /**\\n   * Check if fullscreen is supported on the current playback device.\\n   *\\n   * @return {boolean}\\n   *         - True if fullscreen is supported.\\n   *         - False if fullscreen is not supported.\\n   */\\n  ;\\n\\n  _proto.supportsFullScreen = function supportsFullScreen() {\\n    if (typeof this.el_.webkitEnterFullScreen === 'function') {\\n      var userAgent = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.userAgent || ''; // Seems to be broken in Chromium/Chrome && Safari in Leopard\\n\\n      if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\\n        return true;\\n      }\\n    }\\n\\n    return false;\\n  }\\n  /**\\n   * Request that the `HTML5` Tech enter fullscreen.\\n   */\\n  ;\\n\\n  _proto.enterFullScreen = function enterFullScreen() {\\n    var video = this.el_;\\n\\n    if (video.paused && video.networkState <= video.HAVE_METADATA) {\\n      // attempt to prime the video element for programmatic access\\n      // this isn't necessary on the desktop but shouldn't hurt\\n      silencePromise(this.el_.play()); // playing and pausing synchronously during the transition to fullscreen\\n      // can get iOS ~6.1 devices into a play/pause loop\\n\\n      this.setTimeout(function () {\\n        video.pause();\\n\\n        try {\\n          video.webkitEnterFullScreen();\\n        } catch (e) {\\n          this.trigger('fullscreenerror', e);\\n        }\\n      }, 0);\\n    } else {\\n      try {\\n        video.webkitEnterFullScreen();\\n      } catch (e) {\\n        this.trigger('fullscreenerror', e);\\n      }\\n    }\\n  }\\n  /**\\n   * Request that the `HTML5` Tech exit fullscreen.\\n   */\\n  ;\\n\\n  _proto.exitFullScreen = function exitFullScreen() {\\n    if (!this.el_.webkitDisplayingFullscreen) {\\n      this.trigger('fullscreenerror', new Error('The video is not fullscreen'));\\n      return;\\n    }\\n\\n    this.el_.webkitExitFullScreen();\\n  }\\n  /**\\n   * Create a floating video window always on top of other windows so that users may\\n   * continue consuming media while they interact with other content sites, or\\n   * applications on their device.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @return {Promise}\\n   *         A promise with a Picture-in-Picture window.\\n   */\\n  ;\\n\\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\\n    return this.el_.requestPictureInPicture();\\n  }\\n  /**\\n   * A getter/setter for the `Html5` Tech's source object.\\n   * > Note: Please use {@link Html5#setSource}\\n   *\\n   * @param {Tech~SourceObject} [src]\\n   *        The source object you want to set on the `HTML5` techs element.\\n   *\\n   * @return {Tech~SourceObject|undefined}\\n   *         - The current source object when a source is not passed in.\\n   *         - undefined when setting\\n   *\\n   * @deprecated Since version 5.\\n   */\\n  ;\\n\\n  _proto.src = function src(_src) {\\n    if (_src === undefined) {\\n      return this.el_.src;\\n    } // Setting src through `src` instead of `setSrc` will be deprecated\\n\\n\\n    this.setSrc(_src);\\n  }\\n  /**\\n   * Reset the tech by removing all sources and then calling\\n   * {@link Html5.resetMediaElement}.\\n   */\\n  ;\\n\\n  _proto.reset = function reset() {\\n    Html5.resetMediaElement(this.el_);\\n  }\\n  /**\\n   * Get the current source on the `HTML5` Tech. Falls back to returning the source from\\n   * the HTML5 media element.\\n   *\\n   * @return {Tech~SourceObject}\\n   *         The current source object from the HTML5 tech. With a fallback to the\\n   *         elements source.\\n   */\\n  ;\\n\\n  _proto.currentSrc = function currentSrc() {\\n    if (this.currentSource_) {\\n      return this.currentSource_.src;\\n    }\\n\\n    return this.el_.currentSrc;\\n  }\\n  /**\\n   * Set controls attribute for the HTML5 media Element.\\n   *\\n   * @param {string} val\\n   *        Value to set the controls attribute to\\n   */\\n  ;\\n\\n  _proto.setControls = function setControls(val) {\\n    this.el_.controls = !!val;\\n  }\\n  /**\\n   * Create and returns a remote {@link TextTrack} object.\\n   *\\n   * @param {string} kind\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\\n   *\\n   * @param {string} [label]\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [language]\\n   *        Two letter language abbreviation\\n   *\\n   * @return {TextTrack}\\n   *         The TextTrack that gets created.\\n   */\\n  ;\\n\\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\\n    if (!this.featuresNativeTextTracks) {\\n      return _Tech.prototype.addTextTrack.call(this, kind, label, language);\\n    }\\n\\n    return this.el_.addTextTrack(kind, label, language);\\n  }\\n  /**\\n   * Creates either native TextTrack or an emulated TextTrack depending\\n   * on the value of `featuresNativeTextTracks`\\n   *\\n   * @param {Object} options\\n   *        The object should contain the options to initialize the TextTrack with.\\n   *\\n   * @param {string} [options.kind]\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\\n   *\\n   * @param {string} [options.label]\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [options.language]\\n   *        Two letter language abbreviation.\\n   *\\n   * @param {boolean} [options.default]\\n   *        Default this track to on.\\n   *\\n   * @param {string} [options.id]\\n   *        The internal id to assign this track.\\n   *\\n   * @param {string} [options.src]\\n   *        A source url for the track.\\n   *\\n   * @return {HTMLTrackElement}\\n   *         The track element that gets created.\\n   */\\n  ;\\n\\n  _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\\n    if (!this.featuresNativeTextTracks) {\\n      return _Tech.prototype.createRemoteTextTrack.call(this, options);\\n    }\\n\\n    var htmlTrackElement = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('track');\\n\\n    if (options.kind) {\\n      htmlTrackElement.kind = options.kind;\\n    }\\n\\n    if (options.label) {\\n      htmlTrackElement.label = options.label;\\n    }\\n\\n    if (options.language || options.srclang) {\\n      htmlTrackElement.srclang = options.language || options.srclang;\\n    }\\n\\n    if (options[\\\"default\\\"]) {\\n      htmlTrackElement[\\\"default\\\"] = options[\\\"default\\\"];\\n    }\\n\\n    if (options.id) {\\n      htmlTrackElement.id = options.id;\\n    }\\n\\n    if (options.src) {\\n      htmlTrackElement.src = options.src;\\n    }\\n\\n    return htmlTrackElement;\\n  }\\n  /**\\n   * Creates a remote text track object and returns an html track element.\\n   *\\n   * @param {Object} options The object should contain values for\\n   * kind, language, label, and src (location of the WebVTT file)\\n   * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\\n   * automatically removed from the video element whenever the source changes\\n   * @return {HTMLTrackElement} An Html Track Element.\\n   * This can be an emulated {@link HTMLTrackElement} or a native one.\\n   * @deprecated The default value of the \\\"manualCleanup\\\" parameter will default\\n   * to \\\"false\\\" in upcoming versions of Video.js\\n   */\\n  ;\\n\\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\\n    var htmlTrackElement = _Tech.prototype.addRemoteTextTrack.call(this, options, manualCleanup);\\n\\n    if (this.featuresNativeTextTracks) {\\n      this.el().appendChild(htmlTrackElement);\\n    }\\n\\n    return htmlTrackElement;\\n  }\\n  /**\\n   * Remove remote `TextTrack` from `TextTrackList` object\\n   *\\n   * @param {TextTrack} track\\n   *        `TextTrack` object to remove\\n   */\\n  ;\\n\\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\\n    _Tech.prototype.removeRemoteTextTrack.call(this, track);\\n\\n    if (this.featuresNativeTextTracks) {\\n      var tracks = this.$$('track');\\n      var i = tracks.length;\\n\\n      while (i--) {\\n        if (track === tracks[i] || track === tracks[i].track) {\\n          this.el().removeChild(tracks[i]);\\n        }\\n      }\\n    }\\n  }\\n  /**\\n   * Gets available media playback quality metrics as specified by the W3C's Media\\n   * Playback Quality API.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\\n   *\\n   * @return {Object}\\n   *         An object with supported media playback quality metrics\\n   */\\n  ;\\n\\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\\n    if (typeof this.el().getVideoPlaybackQuality === 'function') {\\n      return this.el().getVideoPlaybackQuality();\\n    }\\n\\n    var videoPlaybackQuality = {};\\n\\n    if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\\n      videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\\n      videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\\n    }\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now === 'function') {\\n      videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\\n    } else if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing.navigationStart === 'number') {\\n      videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Date.now() - global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing.navigationStart;\\n    }\\n\\n    return videoPlaybackQuality;\\n  };\\n\\n  return Html5;\\n}(Tech);\\n/* HTML5 Support Testing ---------------------------------------------------- */\\n\\n/**\\n * Element for testing browser HTML5 media capabilities\\n *\\n * @type {Element}\\n * @constant\\n * @private\\n */\\n\\n\\ndefineLazyProperty(Html5, 'TEST_VID', function () {\\n  if (!isReal()) {\\n    return;\\n  }\\n\\n  var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video');\\n  var track = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('track');\\n  track.kind = 'captions';\\n  track.srclang = 'en';\\n  track.label = 'English';\\n  video.appendChild(track);\\n  return video;\\n});\\n/**\\n * Check if HTML5 media is supported by this browser/device.\\n *\\n * @return {boolean}\\n *         - True if HTML5 media is supported.\\n *         - False if HTML5 media is not supported.\\n */\\n\\nHtml5.isSupported = function () {\\n  // IE with no Media Player is a LIAR! (#984)\\n  try {\\n    Html5.TEST_VID.volume = 0.5;\\n  } catch (e) {\\n    return false;\\n  }\\n\\n  return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\\n};\\n/**\\n * Check if the tech can support the given type\\n *\\n * @param {string} type\\n *        The mimetype to check\\n * @return {string} 'probably', 'maybe', or '' (empty string)\\n */\\n\\n\\nHtml5.canPlayType = function (type) {\\n  return Html5.TEST_VID.canPlayType(type);\\n};\\n/**\\n * Check if the tech can support the given source\\n *\\n * @param {Object} srcObj\\n *        The source object\\n * @param {Object} options\\n *        The options passed to the tech\\n * @return {string} 'probably', 'maybe', or '' (empty string)\\n */\\n\\n\\nHtml5.canPlaySource = function (srcObj, options) {\\n  return Html5.canPlayType(srcObj.type);\\n};\\n/**\\n * Check if the volume can be changed in this browser/device.\\n * Volume cannot be changed in a lot of mobile devices.\\n * Specifically, it can't be changed from 1 on iOS.\\n *\\n * @return {boolean}\\n *         - True if volume can be controlled\\n *         - False otherwise\\n */\\n\\n\\nHtml5.canControlVolume = function () {\\n  // IE will error if Windows Media Player not installed #3315\\n  try {\\n    var volume = Html5.TEST_VID.volume;\\n    Html5.TEST_VID.volume = volume / 2 + 0.1;\\n    return volume !== Html5.TEST_VID.volume;\\n  } catch (e) {\\n    return false;\\n  }\\n};\\n/**\\n * Check if the volume can be muted in this browser/device.\\n * Some devices, e.g. iOS, don't allow changing volume\\n * but permits muting/unmuting.\\n *\\n * @return {bolean}\\n *      - True if volume can be muted\\n *      - False otherwise\\n */\\n\\n\\nHtml5.canMuteVolume = function () {\\n  try {\\n    var muted = Html5.TEST_VID.muted; // in some versions of iOS muted property doesn't always\\n    // work, so we want to set both property and attribute\\n\\n    Html5.TEST_VID.muted = !muted;\\n\\n    if (Html5.TEST_VID.muted) {\\n      setAttribute(Html5.TEST_VID, 'muted', 'muted');\\n    } else {\\n      removeAttribute(Html5.TEST_VID, 'muted', 'muted');\\n    }\\n\\n    return muted !== Html5.TEST_VID.muted;\\n  } catch (e) {\\n    return false;\\n  }\\n};\\n/**\\n * Check if the playback rate can be changed in this browser/device.\\n *\\n * @return {boolean}\\n *         - True if playback rate can be controlled\\n *         - False otherwise\\n */\\n\\n\\nHtml5.canControlPlaybackRate = function () {\\n  // Playback rate API is implemented in Android Chrome, but doesn't do anything\\n  // https://github.com/videojs/video.js/issues/3180\\n  if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\\n    return false;\\n  } // IE will error if Windows Media Player not installed #3315\\n\\n\\n  try {\\n    var playbackRate = Html5.TEST_VID.playbackRate;\\n    Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\\n    return playbackRate !== Html5.TEST_VID.playbackRate;\\n  } catch (e) {\\n    return false;\\n  }\\n};\\n/**\\n * Check if we can override a video/audio elements attributes, with\\n * Object.defineProperty.\\n *\\n * @return {boolean}\\n *         - True if builtin attributes can be overridden\\n *         - False otherwise\\n */\\n\\n\\nHtml5.canOverrideAttributes = function () {\\n  // if we cannot overwrite the src/innerHTML property, there is no support\\n  // iOS 7 safari for instance cannot do this.\\n  try {\\n    var noop = function noop() {};\\n\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'), 'src', {\\n      get: noop,\\n      set: noop\\n    });\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('audio'), 'src', {\\n      get: noop,\\n      set: noop\\n    });\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'), 'innerHTML', {\\n      get: noop,\\n      set: noop\\n    });\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('audio'), 'innerHTML', {\\n      get: noop,\\n      set: noop\\n    });\\n  } catch (e) {\\n    return false;\\n  }\\n\\n  return true;\\n};\\n/**\\n * Check to see if native `TextTrack`s are supported by this browser/device.\\n *\\n * @return {boolean}\\n *         - True if native `TextTrack`s are supported.\\n *         - False otherwise\\n */\\n\\n\\nHtml5.supportsNativeTextTracks = function () {\\n  return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\\n};\\n/**\\n * Check to see if native `VideoTrack`s are supported by this browser/device\\n *\\n * @return {boolean}\\n *        - True if native `VideoTrack`s are supported.\\n *        - False otherwise\\n */\\n\\n\\nHtml5.supportsNativeVideoTracks = function () {\\n  return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\\n};\\n/**\\n * Check to see if native `AudioTrack`s are supported by this browser/device\\n *\\n * @return {boolean}\\n *        - True if native `AudioTrack`s are supported.\\n *        - False otherwise\\n */\\n\\n\\nHtml5.supportsNativeAudioTracks = function () {\\n  return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\\n};\\n/**\\n * An array of events available on the Html5 tech.\\n *\\n * @private\\n * @type {Array}\\n */\\n\\n\\nHtml5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\\n/**\\n * Boolean indicating whether the `Tech` supports volume control.\\n *\\n * @type {boolean}\\n * @default {@link Html5.canControlVolume}\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports muting volume.\\n *\\n * @type {bolean}\\n * @default {@link Html5.canMuteVolume}\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports changing the speed at which the media\\n * plays. Examples:\\n *   - Set player to play 2x (twice) as fast\\n *   - Set player to play 0.5x (half) as fast\\n *\\n * @type {boolean}\\n * @default {@link Html5.canControlPlaybackRate}\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\\n *\\n * @type {boolean}\\n * @default {@link Html5.supportsNativeTextTracks}\\n */\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\\n *\\n * @type {boolean}\\n * @default {@link Html5.supportsNativeVideoTracks}\\n */\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\\n *\\n * @type {boolean}\\n * @default {@link Html5.supportsNativeAudioTracks}\\n */\\n\\n[['featuresVolumeControl', 'canControlVolume'], ['featuresMuteControl', 'canMuteVolume'], ['featuresPlaybackRate', 'canControlPlaybackRate'], ['featuresSourceset', 'canOverrideAttributes'], ['featuresNativeTextTracks', 'supportsNativeTextTracks'], ['featuresNativeVideoTracks', 'supportsNativeVideoTracks'], ['featuresNativeAudioTracks', 'supportsNativeAudioTracks']].forEach(function (_ref) {\\n  var key = _ref[0],\\n      fn = _ref[1];\\n  defineLazyProperty(Html5.prototype, key, function () {\\n    return Html5[fn]();\\n  }, true);\\n});\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports the media element\\n * moving in the DOM. iOS breaks if you move the media element, so this is set this to\\n * false there. Everywhere else this should be true.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nHtml5.prototype.movingMediaElementInDOM = !IS_IOS; // TODO: Previous comment: No longer appears to be used. Can probably be removed.\\n//       Is this true?\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\\n * when going into fullscreen.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nHtml5.prototype.featuresFullscreenResize = true;\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports the progress event.\\n * If this is false, manual `progress` events will be triggered instead.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nHtml5.prototype.featuresProgressEvents = true;\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\\n * If this is false, manual `timeupdate` events will be triggered instead.\\n *\\n * @default\\n */\\n\\nHtml5.prototype.featuresTimeupdateEvents = true; // HTML5 Feature detection and Device Fixes --------------------------------- //\\n\\nvar canPlayType;\\n\\nHtml5.patchCanPlayType = function () {\\n  // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\\n  // Firefox and Chrome report correctly\\n  if (ANDROID_VERSION >= 4.0 && !IS_FIREFOX && !IS_CHROME) {\\n    canPlayType = Html5.TEST_VID && Html5.TEST_VID.constructor.prototype.canPlayType;\\n\\n    Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {\\n      var mpegurlRE = /^application\\\\/(?:x-|vnd\\\\.apple\\\\.)mpegurl/i;\\n\\n      if (type && mpegurlRE.test(type)) {\\n        return 'maybe';\\n      }\\n\\n      return canPlayType.call(this, type);\\n    };\\n  }\\n};\\n\\nHtml5.unpatchCanPlayType = function () {\\n  var r = Html5.TEST_VID.constructor.prototype.canPlayType;\\n\\n  if (canPlayType) {\\n    Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\\n  }\\n\\n  return r;\\n}; // by default, patch the media element\\n\\n\\nHtml5.patchCanPlayType();\\n\\nHtml5.disposeMediaElement = function (el) {\\n  if (!el) {\\n    return;\\n  }\\n\\n  if (el.parentNode) {\\n    el.parentNode.removeChild(el);\\n  } // remove any child track or source nodes to prevent their loading\\n\\n\\n  while (el.hasChildNodes()) {\\n    el.removeChild(el.firstChild);\\n  } // remove any src reference. not setting `src=''` because that causes a warning\\n  // in firefox\\n\\n\\n  el.removeAttribute('src'); // force the media element to update its loading state by calling load()\\n  // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\\n\\n  if (typeof el.load === 'function') {\\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\\n    (function () {\\n      try {\\n        el.load();\\n      } catch (e) {// not supported\\n      }\\n    })();\\n  }\\n};\\n\\nHtml5.resetMediaElement = function (el) {\\n  if (!el) {\\n    return;\\n  }\\n\\n  var sources = el.querySelectorAll('source');\\n  var i = sources.length;\\n\\n  while (i--) {\\n    el.removeChild(sources[i]);\\n  } // remove any src reference.\\n  // not setting `src=''` because that throws an error\\n\\n\\n  el.removeAttribute('src');\\n\\n  if (typeof el.load === 'function') {\\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\\n    (function () {\\n      try {\\n        el.load();\\n      } catch (e) {// satisfy linter\\n      }\\n    })();\\n  }\\n};\\n/* Native HTML5 element property wrapping ----------------------------------- */\\n// Wrap native boolean attributes with getters that check both property and attribute\\n// The list is as followed:\\n// muted, defaultMuted, autoplay, controls, loop, playsinline\\n\\n\\n[\\n/**\\n * Get the value of `muted` from the media element. `muted` indicates\\n * that the volume for the media should be set to silent. This does not actually change\\n * the `volume` attribute.\\n *\\n * @method Html5#muted\\n * @return {boolean}\\n *         - True if the value of `volume` should be ignored and the audio set to silent.\\n *         - False if the value of `volume` should be used.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\\n */\\n'muted',\\n/**\\n * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\\n * whether the media should start muted or not. Only changes the default state of the\\n * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\\n * current state.\\n *\\n * @method Html5#defaultMuted\\n * @return {boolean}\\n *         - The value of `defaultMuted` from the media element.\\n *         - True indicates that the media should start muted.\\n *         - False indicates that the media should not start muted\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\\n */\\n'defaultMuted',\\n/**\\n * Get the value of `autoplay` from the media element. `autoplay` indicates\\n * that the media should start to play as soon as the page is ready.\\n *\\n * @method Html5#autoplay\\n * @return {boolean}\\n *         - The value of `autoplay` from the media element.\\n *         - True indicates that the media should start as soon as the page loads.\\n *         - False indicates that the media should not start as soon as the page loads.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\\n */\\n'autoplay',\\n/**\\n * Get the value of `controls` from the media element. `controls` indicates\\n * whether the native media controls should be shown or hidden.\\n *\\n * @method Html5#controls\\n * @return {boolean}\\n *         - The value of `controls` from the media element.\\n *         - True indicates that native controls should be showing.\\n *         - False indicates that native controls should be hidden.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\\n */\\n'controls',\\n/**\\n * Get the value of `loop` from the media element. `loop` indicates\\n * that the media should return to the start of the media and continue playing once\\n * it reaches the end.\\n *\\n * @method Html5#loop\\n * @return {boolean}\\n *         - The value of `loop` from the media element.\\n *         - True indicates that playback should seek back to start once\\n *           the end of a media is reached.\\n *         - False indicates that playback should not loop back to the start when the\\n *           end of the media is reached.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\\n */\\n'loop',\\n/**\\n * Get the value of `playsinline` from the media element. `playsinline` indicates\\n * to the browser that non-fullscreen playback is preferred when fullscreen\\n * playback is the native default, such as in iOS Safari.\\n *\\n * @method Html5#playsinline\\n * @return {boolean}\\n *         - The value of `playsinline` from the media element.\\n *         - True indicates that the media should play inline.\\n *         - False indicates that the media should not play inline.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\\n */\\n'playsinline'].forEach(function (prop) {\\n  Html5.prototype[prop] = function () {\\n    return this.el_[prop] || this.el_.hasAttribute(prop);\\n  };\\n}); // Wrap native boolean attributes with setters that set both property and attribute\\n// The list is as followed:\\n// setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\\n// setControls is special-cased above\\n\\n[\\n/**\\n * Set the value of `muted` on the media element. `muted` indicates that the current\\n * audio level should be silent.\\n *\\n * @method Html5#setMuted\\n * @param {boolean} muted\\n *        - True if the audio should be set to silent\\n *        - False otherwise\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\\n */\\n'muted',\\n/**\\n * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\\n * audio level should be silent, but will only effect the muted level on intial playback..\\n *\\n * @method Html5.prototype.setDefaultMuted\\n * @param {boolean} defaultMuted\\n *        - True if the audio should be set to silent\\n *        - False otherwise\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\\n */\\n'defaultMuted',\\n/**\\n * Set the value of `autoplay` on the media element. `autoplay` indicates\\n * that the media should start to play as soon as the page is ready.\\n *\\n * @method Html5#setAutoplay\\n * @param {boolean} autoplay\\n *         - True indicates that the media should start as soon as the page loads.\\n *         - False indicates that the media should not start as soon as the page loads.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\\n */\\n'autoplay',\\n/**\\n * Set the value of `loop` on the media element. `loop` indicates\\n * that the media should return to the start of the media and continue playing once\\n * it reaches the end.\\n *\\n * @method Html5#setLoop\\n * @param {boolean} loop\\n *         - True indicates that playback should seek back to start once\\n *           the end of a media is reached.\\n *         - False indicates that playback should not loop back to the start when the\\n *           end of the media is reached.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\\n */\\n'loop',\\n/**\\n * Set the value of `playsinline` from the media element. `playsinline` indicates\\n * to the browser that non-fullscreen playback is preferred when fullscreen\\n * playback is the native default, such as in iOS Safari.\\n *\\n * @method Html5#setPlaysinline\\n * @param {boolean} playsinline\\n *         - True indicates that the media should play inline.\\n *         - False indicates that the media should not play inline.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\\n */\\n'playsinline'].forEach(function (prop) {\\n  Html5.prototype['set' + toTitleCase(prop)] = function (v) {\\n    this.el_[prop] = v;\\n\\n    if (v) {\\n      this.el_.setAttribute(prop, prop);\\n    } else {\\n      this.el_.removeAttribute(prop);\\n    }\\n  };\\n}); // Wrap native properties with a getter\\n// The list is as followed\\n// paused, currentTime, buffered, volume, poster, preload, error, seeking\\n// seekable, ended, playbackRate, defaultPlaybackRate, played, networkState\\n// readyState, videoWidth, videoHeight, crossOrigin\\n\\n[\\n/**\\n * Get the value of `paused` from the media element. `paused` indicates whether the media element\\n * is currently paused or not.\\n *\\n * @method Html5#paused\\n * @return {boolean}\\n *         The value of `paused` from the media element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\\n */\\n'paused',\\n/**\\n * Get the value of `currentTime` from the media element. `currentTime` indicates\\n * the current second that the media is at in playback.\\n *\\n * @method Html5#currentTime\\n * @return {number}\\n *         The value of `currentTime` from the media element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\\n */\\n'currentTime',\\n/**\\n * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\\n * object that represents the parts of the media that are already downloaded and\\n * available for playback.\\n *\\n * @method Html5#buffered\\n * @return {TimeRange}\\n *         The value of `buffered` from the media element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\\n */\\n'buffered',\\n/**\\n * Get the value of `volume` from the media element. `volume` indicates\\n * the current playback volume of audio for a media. `volume` will be a value from 0\\n * (silent) to 1 (loudest and default).\\n *\\n * @method Html5#volume\\n * @return {number}\\n *         The value of `volume` from the media element. Value will be between 0-1.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\\n */\\n'volume',\\n/**\\n * Get the value of `poster` from the media element. `poster` indicates\\n * that the url of an image file that can/will be shown when no media data is available.\\n *\\n * @method Html5#poster\\n * @return {string}\\n *         The value of `poster` from the media element. Value will be a url to an\\n *         image.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\\n */\\n'poster',\\n/**\\n * Get the value of `preload` from the media element. `preload` indicates\\n * what should download before the media is interacted with. It can have the following\\n * values:\\n * - none: nothing should be downloaded\\n * - metadata: poster and the first few frames of the media may be downloaded to get\\n *   media dimensions and other metadata\\n * - auto: allow the media and metadata for the media to be downloaded before\\n *    interaction\\n *\\n * @method Html5#preload\\n * @return {string}\\n *         The value of `preload` from the media element. Will be 'none', 'metadata',\\n *         or 'auto'.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\\n */\\n'preload',\\n/**\\n * Get the value of the `error` from the media element. `error` indicates any\\n * MediaError that may have occurred during playback. If error returns null there is no\\n * current error.\\n *\\n * @method Html5#error\\n * @return {MediaError|null}\\n *         The value of `error` from the media element. Will be `MediaError` if there\\n *         is a current error and null otherwise.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\\n */\\n'error',\\n/**\\n * Get the value of `seeking` from the media element. `seeking` indicates whether the\\n * media is currently seeking to a new position or not.\\n *\\n * @method Html5#seeking\\n * @return {boolean}\\n *         - The value of `seeking` from the media element.\\n *         - True indicates that the media is currently seeking to a new position.\\n *         - False indicates that the media is not seeking to a new position at this time.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\\n */\\n'seeking',\\n/**\\n * Get the value of `seekable` from the media element. `seekable` returns a\\n * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\\n *\\n * @method Html5#seekable\\n * @return {TimeRange}\\n *         The value of `seekable` from the media element. A `TimeRange` object\\n *         indicating the current ranges of time that can be seeked to.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\\n */\\n'seekable',\\n/**\\n * Get the value of `ended` from the media element. `ended` indicates whether\\n * the media has reached the end or not.\\n *\\n * @method Html5#ended\\n * @return {boolean}\\n *         - The value of `ended` from the media element.\\n *         - True indicates that the media has ended.\\n *         - False indicates that the media has not ended.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\\n */\\n'ended',\\n/**\\n * Get the value of `playbackRate` from the media element. `playbackRate` indicates\\n * the rate at which the media is currently playing back. Examples:\\n *   - if playbackRate is set to 2, media will play twice as fast.\\n *   - if playbackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5#playbackRate\\n * @return {number}\\n *         The value of `playbackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\\n */\\n'playbackRate',\\n/**\\n * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\\n * the rate at which the media is currently playing back. This value will not indicate the current\\n * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\\n *\\n * Examples:\\n *   - if defaultPlaybackRate is set to 2, media will play twice as fast.\\n *   - if defaultPlaybackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5.prototype.defaultPlaybackRate\\n * @return {number}\\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\\n */\\n'defaultPlaybackRate',\\n/**\\n * Get the value of `played` from the media element. `played` returns a `TimeRange`\\n * object representing points in the media timeline that have been played.\\n *\\n * @method Html5#played\\n * @return {TimeRange}\\n *         The value of `played` from the media element. A `TimeRange` object indicating\\n *         the ranges of time that have been played.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\\n */\\n'played',\\n/**\\n * Get the value of `networkState` from the media element. `networkState` indicates\\n * the current network state. It returns an enumeration from the following list:\\n * - 0: NETWORK_EMPTY\\n * - 1: NETWORK_IDLE\\n * - 2: NETWORK_LOADING\\n * - 3: NETWORK_NO_SOURCE\\n *\\n * @method Html5#networkState\\n * @return {number}\\n *         The value of `networkState` from the media element. This will be a number\\n *         from the list in the description.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\\n */\\n'networkState',\\n/**\\n * Get the value of `readyState` from the media element. `readyState` indicates\\n * the current state of the media element. It returns an enumeration from the\\n * following list:\\n * - 0: HAVE_NOTHING\\n * - 1: HAVE_METADATA\\n * - 2: HAVE_CURRENT_DATA\\n * - 3: HAVE_FUTURE_DATA\\n * - 4: HAVE_ENOUGH_DATA\\n *\\n * @method Html5#readyState\\n * @return {number}\\n *         The value of `readyState` from the media element. This will be a number\\n *         from the list in the description.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\\n */\\n'readyState',\\n/**\\n * Get the value of `videoWidth` from the video element. `videoWidth` indicates\\n * the current width of the video in css pixels.\\n *\\n * @method Html5#videoWidth\\n * @return {number}\\n *         The value of `videoWidth` from the video element. This will be a number\\n *         in css pixels.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\\n */\\n'videoWidth',\\n/**\\n * Get the value of `videoHeight` from the video element. `videoHeight` indicates\\n * the current height of the video in css pixels.\\n *\\n * @method Html5#videoHeight\\n * @return {number}\\n *         The value of `videoHeight` from the video element. This will be a number\\n *         in css pixels.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\\n */\\n'videoHeight',\\n/**\\n * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates\\n * to the browser that should sent the cookies along with the requests for the\\n * different assets/playlists\\n *\\n * @method Html5#crossOrigin\\n * @return {string}\\n *         - anonymous indicates that the media should not sent cookies.\\n *         - use-credentials indicates that the media should sent cookies along the requests.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\\n */\\n'crossOrigin'].forEach(function (prop) {\\n  Html5.prototype[prop] = function () {\\n    return this.el_[prop];\\n  };\\n}); // Wrap native properties with a setter in this format:\\n// set + toTitleCase(name)\\n// The list is as follows:\\n// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate, setCrossOrigin\\n\\n[\\n/**\\n * Set the value of `volume` on the media element. `volume` indicates the current\\n * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\\n * so on.\\n *\\n * @method Html5#setVolume\\n * @param {number} percentAsDecimal\\n *        The volume percent as a decimal. Valid range is from 0-1.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\\n */\\n'volume',\\n/**\\n * Set the value of `src` on the media element. `src` indicates the current\\n * {@link Tech~SourceObject} for the media.\\n *\\n * @method Html5#setSrc\\n * @param {Tech~SourceObject} src\\n *        The source object to set as the current source.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\\n */\\n'src',\\n/**\\n * Set the value of `poster` on the media element. `poster` is the url to\\n * an image file that can/will be shown when no media data is available.\\n *\\n * @method Html5#setPoster\\n * @param {string} poster\\n *        The url to an image that should be used as the `poster` for the media\\n *        element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\\n */\\n'poster',\\n/**\\n * Set the value of `preload` on the media element. `preload` indicates\\n * what should download before the media is interacted with. It can have the following\\n * values:\\n * - none: nothing should be downloaded\\n * - metadata: poster and the first few frames of the media may be downloaded to get\\n *   media dimensions and other metadata\\n * - auto: allow the media and metadata for the media to be downloaded before\\n *    interaction\\n *\\n * @method Html5#setPreload\\n * @param {string} preload\\n *         The value of `preload` to set on the media element. Must be 'none', 'metadata',\\n *         or 'auto'.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\\n */\\n'preload',\\n/**\\n * Set the value of `playbackRate` on the media element. `playbackRate` indicates\\n * the rate at which the media should play back. Examples:\\n *   - if playbackRate is set to 2, media will play twice as fast.\\n *   - if playbackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5#setPlaybackRate\\n * @return {number}\\n *         The value of `playbackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\\n */\\n'playbackRate',\\n/**\\n * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\\n * the rate at which the media should play back upon initial startup. Changing this value\\n * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\\n *\\n * Example Values:\\n *   - if playbackRate is set to 2, media will play twice as fast.\\n *   - if playbackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5.prototype.setDefaultPlaybackRate\\n * @return {number}\\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\\n */\\n'defaultPlaybackRate',\\n/**\\n * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates\\n * to the browser that should sent the cookies along with the requests for the\\n * different assets/playlists\\n *\\n * @method Html5#setCrossOrigin\\n * @param {string} crossOrigin\\n *         - anonymous indicates that the media should not sent cookies.\\n *         - use-credentials indicates that the media should sent cookies along the requests.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\\n */\\n'crossOrigin'].forEach(function (prop) {\\n  Html5.prototype['set' + toTitleCase(prop)] = function (v) {\\n    this.el_[prop] = v;\\n  };\\n}); // wrap native functions with a function\\n// The list is as follows:\\n// pause, load, play\\n\\n[\\n/**\\n * A wrapper around the media elements `pause` function. This will call the `HTML5`\\n * media elements `pause` function.\\n *\\n * @method Html5#pause\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\\n */\\n'pause',\\n/**\\n * A wrapper around the media elements `load` function. This will call the `HTML5`s\\n * media element `load` function.\\n *\\n * @method Html5#load\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\\n */\\n'load',\\n/**\\n * A wrapper around the media elements `play` function. This will call the `HTML5`s\\n * media element `play` function.\\n *\\n * @method Html5#play\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\\n */\\n'play'].forEach(function (prop) {\\n  Html5.prototype[prop] = function () {\\n    return this.el_[prop]();\\n  };\\n});\\nTech.withSourceHandlers(Html5);\\n/**\\n * Native source handler for Html5, simply passes the source to the media element.\\n *\\n * @property {Tech~SourceObject} source\\n *        The source object\\n *\\n * @property {Html5} tech\\n *        The instance of the HTML5 tech.\\n */\\n\\nHtml5.nativeSourceHandler = {};\\n/**\\n * Check if the media element can play the given mime type.\\n *\\n * @param {string} type\\n *        The mimetype to check\\n *\\n * @return {string}\\n *         'probably', 'maybe', or '' (empty string)\\n */\\n\\nHtml5.nativeSourceHandler.canPlayType = function (type) {\\n  // IE without MediaPlayer throws an error (#519)\\n  try {\\n    return Html5.TEST_VID.canPlayType(type);\\n  } catch (e) {\\n    return '';\\n  }\\n};\\n/**\\n * Check if the media element can handle a source natively.\\n *\\n * @param {Tech~SourceObject} source\\n *         The source object\\n *\\n * @param {Object} [options]\\n *         Options to be passed to the tech.\\n *\\n * @return {string}\\n *         'probably', 'maybe', or '' (empty string).\\n */\\n\\n\\nHtml5.nativeSourceHandler.canHandleSource = function (source, options) {\\n  // If a type was provided we should rely on that\\n  if (source.type) {\\n    return Html5.nativeSourceHandler.canPlayType(source.type); // If no type, fall back to checking 'video/[EXTENSION]'\\n  } else if (source.src) {\\n    var ext = getFileExtension(source.src);\\n    return Html5.nativeSourceHandler.canPlayType(\\\"video/\\\" + ext);\\n  }\\n\\n  return '';\\n};\\n/**\\n * Pass the source to the native media element.\\n *\\n * @param {Tech~SourceObject} source\\n *        The source object\\n *\\n * @param {Html5} tech\\n *        The instance of the Html5 tech\\n *\\n * @param {Object} [options]\\n *        The options to pass to the source\\n */\\n\\n\\nHtml5.nativeSourceHandler.handleSource = function (source, tech, options) {\\n  tech.setSrc(source.src);\\n};\\n/**\\n * A noop for the native dispose function, as cleanup is not needed.\\n */\\n\\n\\nHtml5.nativeSourceHandler.dispose = function () {}; // Register the native source handler\\n\\n\\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\\nTech.registerTech('Html5', Html5);\\n\\n// on the player when they happen\\n\\nvar TECH_EVENTS_RETRIGGER = [\\n/**\\n * Fired while the user agent is downloading media data.\\n *\\n * @event Player#progress\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `progress` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechProgress_\\n * @fires Player#progress\\n * @listens Tech#progress\\n */\\n'progress',\\n/**\\n * Fires when the loading of an audio/video is aborted.\\n *\\n * @event Player#abort\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `abort` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechAbort_\\n * @fires Player#abort\\n * @listens Tech#abort\\n */\\n'abort',\\n/**\\n * Fires when the browser is intentionally not getting media data.\\n *\\n * @event Player#suspend\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `suspend` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechSuspend_\\n * @fires Player#suspend\\n * @listens Tech#suspend\\n */\\n'suspend',\\n/**\\n * Fires when the current playlist is empty.\\n *\\n * @event Player#emptied\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `emptied` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechEmptied_\\n * @fires Player#emptied\\n * @listens Tech#emptied\\n */\\n'emptied',\\n/**\\n * Fires when the browser is trying to get media data, but data is not available.\\n *\\n * @event Player#stalled\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechStalled_\\n * @fires Player#stalled\\n * @listens Tech#stalled\\n */\\n'stalled',\\n/**\\n * Fires when the browser has loaded meta data for the audio/video.\\n *\\n * @event Player#loadedmetadata\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechLoadedmetadata_\\n * @fires Player#loadedmetadata\\n * @listens Tech#loadedmetadata\\n */\\n'loadedmetadata',\\n/**\\n * Fires when the browser has loaded the current frame of the audio/video.\\n *\\n * @event Player#loadeddata\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechLoaddeddata_\\n * @fires Player#loadeddata\\n * @listens Tech#loadeddata\\n */\\n'loadeddata',\\n/**\\n * Fires when the current playback position has changed.\\n *\\n * @event Player#timeupdate\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechTimeUpdate_\\n * @fires Player#timeupdate\\n * @listens Tech#timeupdate\\n */\\n'timeupdate',\\n/**\\n * Fires when the video's intrinsic dimensions change\\n *\\n * @event Player#resize\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `resize` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechResize_\\n * @fires Player#resize\\n * @listens Tech#resize\\n */\\n'resize',\\n/**\\n * Fires when the volume has been changed\\n *\\n * @event Player#volumechange\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechVolumechange_\\n * @fires Player#volumechange\\n * @listens Tech#volumechange\\n */\\n'volumechange',\\n/**\\n * Fires when the text track has been changed\\n *\\n * @event Player#texttrackchange\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechTexttrackchange_\\n * @fires Player#texttrackchange\\n * @listens Tech#texttrackchange\\n */\\n'texttrackchange']; // events to queue when playback rate is zero\\n// this is a hash for the sole purpose of mapping non-camel-cased event names\\n// to camel-cased function names\\n\\nvar TECH_EVENTS_QUEUE = {\\n  canplay: 'CanPlay',\\n  canplaythrough: 'CanPlayThrough',\\n  playing: 'Playing',\\n  seeked: 'Seeked'\\n};\\nvar BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\\nvar BREAKPOINT_CLASSES = {}; // grep: vjs-layout-tiny\\n// grep: vjs-layout-x-small\\n// grep: vjs-layout-small\\n// grep: vjs-layout-medium\\n// grep: vjs-layout-large\\n// grep: vjs-layout-x-large\\n// grep: vjs-layout-huge\\n\\nBREAKPOINT_ORDER.forEach(function (k) {\\n  var v = k.charAt(0) === 'x' ? \\\"x-\\\" + k.substring(1) : k;\\n  BREAKPOINT_CLASSES[k] = \\\"vjs-layout-\\\" + v;\\n});\\nvar DEFAULT_BREAKPOINTS = {\\n  tiny: 210,\\n  xsmall: 320,\\n  small: 425,\\n  medium: 768,\\n  large: 1440,\\n  xlarge: 2560,\\n  huge: Infinity\\n};\\n/**\\n * An instance of the `Player` class is created when any of the Video.js setup methods\\n * are used to initialize a video.\\n *\\n * After an instance has been created it can be accessed globally in two ways:\\n * 1. By calling `videojs('example_video_1');`\\n * 2. By using it directly via  `videojs.players.example_video_1;`\\n *\\n * @extends Component\\n */\\n\\nvar Player = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Player, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Element} tag\\n   *        The original video DOM element used for configuring options.\\n   *\\n   * @param {Object} [options]\\n   *        Object of option names and values.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        Ready callback function.\\n   */\\n  function Player(tag, options, ready) {\\n    var _this;\\n\\n    // Make sure tag ID exists\\n    tag.id = tag.id || options.id || \\\"vjs_video_\\\" + newGUID(); // Set Options\\n    // The options argument overrides options set in the video tag\\n    // which overrides globally set options.\\n    // This latter part coincides with the load order\\n    // (tag must exist before Player)\\n\\n    options = assign(Player.getTagSettings(tag), options); // Delay the initialization of children because we need to set up\\n    // player properties first, and can't use `this` before `super()`\\n\\n    options.initChildren = false; // Same with creating the element\\n\\n    options.createEl = false; // don't auto mixin the evented mixin\\n\\n    options.evented = false; // we don't want the player to report touch activity on itself\\n    // see enableTouchActivity in Component\\n\\n    options.reportTouchActivity = false; // If language is not set, get the closest lang attribute\\n\\n    if (!options.language) {\\n      if (typeof tag.closest === 'function') {\\n        var closest = tag.closest('[lang]');\\n\\n        if (closest && closest.getAttribute) {\\n          options.language = closest.getAttribute('lang');\\n        }\\n      } else {\\n        var element = tag;\\n\\n        while (element && element.nodeType === 1) {\\n          if (getAttributes(element).hasOwnProperty('lang')) {\\n            options.language = element.getAttribute('lang');\\n            break;\\n          }\\n\\n          element = element.parentNode;\\n        }\\n      }\\n    } // Run base component initializing with new options\\n\\n\\n    _this = _Component.call(this, null, options, ready) || this; // Create bound methods for document listeners.\\n\\n    _this.boundDocumentFullscreenChange_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.documentFullscreenChange_);\\n    _this.boundFullWindowOnEscKey_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.fullWindowOnEscKey); // default isFullscreen_ to false\\n\\n    _this.isFullscreen_ = false; // create logger\\n\\n    _this.log = createLogger$1(_this.id_); // Hold our own reference to fullscreen api so it can be mocked in tests\\n\\n    _this.fsApi_ = FullscreenApi; // Tracks when a tech changes the poster\\n\\n    _this.isPosterFromTech_ = false; // Holds callback info that gets queued when playback rate is zero\\n    // and a seek is happening\\n\\n    _this.queuedCallbacks_ = []; // Turn off API access because we're loading a new tech that might load asynchronously\\n\\n    _this.isReady_ = false; // Init state hasStarted_\\n\\n    _this.hasStarted_ = false; // Init state userActive_\\n\\n    _this.userActive_ = false; // if the global option object was accidentally blown away by\\n    // someone, bail early with an informative error\\n\\n    if (!_this.options_ || !_this.options_.techOrder || !_this.options_.techOrder.length) {\\n      throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\\n    } // Store the original tag used to set options\\n\\n\\n    _this.tag = tag; // Store the tag attributes used to restore html5 element\\n\\n    _this.tagAttributes = tag && getAttributes(tag); // Update current language\\n\\n    _this.language(_this.options_.language); // Update Supported Languages\\n\\n\\n    if (options.languages) {\\n      // Normalise player option languages to lowercase\\n      var languagesToLower = {};\\n      Object.getOwnPropertyNames(options.languages).forEach(function (name) {\\n        languagesToLower[name.toLowerCase()] = options.languages[name];\\n      });\\n      _this.languages_ = languagesToLower;\\n    } else {\\n      _this.languages_ = Player.prototype.options_.languages;\\n    }\\n\\n    _this.resetCache_(); // Set poster\\n\\n\\n    _this.poster_ = options.poster || ''; // Set controls\\n\\n    _this.controls_ = !!options.controls; // Original tag settings stored in options\\n    // now remove immediately so native controls don't flash.\\n    // May be turned back on by HTML5 tech if nativeControlsForTouch is true\\n\\n    tag.controls = false;\\n    tag.removeAttribute('controls');\\n    _this.changingSrc_ = false;\\n    _this.playCallbacks_ = [];\\n    _this.playTerminatedQueue_ = []; // the attribute overrides the option\\n\\n    if (tag.hasAttribute('autoplay')) {\\n      _this.autoplay(true);\\n    } else {\\n      // otherwise use the setter to validate and\\n      // set the correct value.\\n      _this.autoplay(_this.options_.autoplay);\\n    } // check plugins\\n\\n\\n    if (options.plugins) {\\n      Object.keys(options.plugins).forEach(function (name) {\\n        if (typeof _this[name] !== 'function') {\\n          throw new Error(\\\"plugin \\\\\\\"\\\" + name + \\\"\\\\\\\" does not exist\\\");\\n        }\\n      });\\n    }\\n    /*\\n     * Store the internal state of scrubbing\\n     *\\n     * @private\\n     * @return {Boolean} True if the user is scrubbing\\n     */\\n\\n\\n    _this.scrubbing_ = false;\\n    _this.el_ = _this.createEl(); // Make this an evented object and use `el_` as its event bus.\\n\\n    evented(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), {\\n      eventBusKey: 'el_'\\n    }); // listen to document and player fullscreenchange handlers so we receive those events\\n    // before a user can receive them so we can update isFullscreen appropriately.\\n    // make sure that we listen to fullscreenchange events before everything else to make sure that\\n    // our isFullscreen method is updated properly for internal components as well as external.\\n\\n    if (_this.fsApi_.requestFullscreen) {\\n      on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, _this.fsApi_.fullscreenchange, _this.boundDocumentFullscreenChange_);\\n\\n      _this.on(_this.fsApi_.fullscreenchange, _this.boundDocumentFullscreenChange_);\\n    }\\n\\n    if (_this.fluid_) {\\n      _this.on('playerreset', _this.updateStyleEl_);\\n    } // We also want to pass the original player options to each component and plugin\\n    // as well so they don't need to reach back into the player for options later.\\n    // We also need to do another copy of this.options_ so we don't end up with\\n    // an infinite loop.\\n\\n\\n    var playerOptionsCopy = mergeOptions(_this.options_); // Load plugins\\n\\n    if (options.plugins) {\\n      Object.keys(options.plugins).forEach(function (name) {\\n        _this[name](options.plugins[name]);\\n      });\\n    }\\n\\n    _this.options_.playerOptions = playerOptionsCopy;\\n    _this.middleware_ = [];\\n\\n    _this.initChildren(); // Set isAudio based on whether or not an audio tag was used\\n\\n\\n    _this.isAudio(tag.nodeName.toLowerCase() === 'audio'); // Update controls className. Can't do this when the controls are initially\\n    // set because the element doesn't exist yet.\\n\\n\\n    if (_this.controls()) {\\n      _this.addClass('vjs-controls-enabled');\\n    } else {\\n      _this.addClass('vjs-controls-disabled');\\n    } // Set ARIA label and region role depending on player type\\n\\n\\n    _this.el_.setAttribute('role', 'region');\\n\\n    if (_this.isAudio()) {\\n      _this.el_.setAttribute('aria-label', _this.localize('Audio Player'));\\n    } else {\\n      _this.el_.setAttribute('aria-label', _this.localize('Video Player'));\\n    }\\n\\n    if (_this.isAudio()) {\\n      _this.addClass('vjs-audio');\\n    }\\n\\n    if (_this.flexNotSupported_()) {\\n      _this.addClass('vjs-no-flex');\\n    } // TODO: Make this smarter. Toggle user state between touching/mousing\\n    // using events, since devices can have both touch and mouse events.\\n    // TODO: Make this check be performed again when the window switches between monitors\\n    // (See https://github.com/videojs/video.js/issues/5683)\\n\\n\\n    if (TOUCH_ENABLED) {\\n      _this.addClass('vjs-touch-enabled');\\n    } // iOS Safari has broken hover handling\\n\\n\\n    if (!IS_IOS) {\\n      _this.addClass('vjs-workinghover');\\n    } // Make player easily findable by ID\\n\\n\\n    Player.players[_this.id_] = _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this); // Add a major version class to aid css in plugins\\n\\n    var majorVersion = version.split('.')[0];\\n\\n    _this.addClass(\\\"vjs-v\\\" + majorVersion); // When the player is first initialized, trigger activity so components\\n    // like the control bar show themselves if needed\\n\\n\\n    _this.userActive(true);\\n\\n    _this.reportUserActivity();\\n\\n    _this.one('play', _this.listenForUserActivity_);\\n\\n    _this.on('stageclick', _this.handleStageClick_);\\n\\n    _this.on('keydown', _this.handleKeyDown);\\n\\n    _this.breakpoints(_this.options_.breakpoints);\\n\\n    _this.responsive(_this.options_.responsive);\\n\\n    return _this;\\n  }\\n  /**\\n   * Destroys the video player and does any necessary cleanup.\\n   *\\n   * This is especially helpful if you are dynamically adding and removing videos\\n   * to/from the DOM.\\n   *\\n   * @fires Player#dispose\\n   */\\n\\n\\n  var _proto = Player.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    var _this2 = this;\\n\\n    /**\\n     * Called when the player is being disposed of.\\n     *\\n     * @event Player#dispose\\n     * @type {EventTarget~Event}\\n     */\\n    this.trigger('dispose'); // prevent dispose from being called twice\\n\\n    this.off('dispose'); // Make sure all player-specific document listeners are unbound. This is\\n\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_);\\n\\n    if (this.styleEl_ && this.styleEl_.parentNode) {\\n      this.styleEl_.parentNode.removeChild(this.styleEl_);\\n      this.styleEl_ = null;\\n    } // Kill reference to this player\\n\\n\\n    Player.players[this.id_] = null;\\n\\n    if (this.tag && this.tag.player) {\\n      this.tag.player = null;\\n    }\\n\\n    if (this.el_ && this.el_.player) {\\n      this.el_.player = null;\\n    }\\n\\n    if (this.tech_) {\\n      this.tech_.dispose();\\n      this.isPosterFromTech_ = false;\\n      this.poster_ = '';\\n    }\\n\\n    if (this.playerElIngest_) {\\n      this.playerElIngest_ = null;\\n    }\\n\\n    if (this.tag) {\\n      this.tag = null;\\n    }\\n\\n    clearCacheForPlayer(this); // remove all event handlers for track lists\\n    // all tracks and track listeners are removed on\\n    // tech dispose\\n\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n\\n      var list = _this2[props.getterName](); // if it is not a native list\\n      // we have to manually remove event listeners\\n\\n\\n      if (list && list.off) {\\n        list.off();\\n      }\\n    }); // the actual .el_ is removed here\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create the `Player`'s DOM element.\\n   *\\n   * @return {Element}\\n   *         The DOM element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var tag = this.tag;\\n    var el;\\n    var playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\\n    var divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\\n\\n    if (playerElIngest) {\\n      el = this.el_ = tag.parentNode;\\n    } else if (!divEmbed) {\\n      el = this.el_ = _Component.prototype.createEl.call(this, 'div');\\n    } // Copy over all the attributes from the tag, including ID and class\\n    // ID will now reference player box, not the video tag\\n\\n\\n    var attrs = getAttributes(tag);\\n\\n    if (divEmbed) {\\n      el = this.el_ = tag;\\n      tag = this.tag = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video');\\n\\n      while (el.children.length) {\\n        tag.appendChild(el.firstChild);\\n      }\\n\\n      if (!hasClass(el, 'video-js')) {\\n        addClass(el, 'video-js');\\n      }\\n\\n      el.appendChild(tag);\\n      playerElIngest = this.playerElIngest_ = el; // move properties over from our custom `video-js` element\\n      // to our new `video` element. This will move things like\\n      // `src` or `controls` that were set via js before the player\\n      // was initialized.\\n\\n      Object.keys(el).forEach(function (k) {\\n        try {\\n          tag[k] = el[k];\\n        } catch (e) {// we got a a property like outerHTML which we can't actually copy, ignore it\\n        }\\n      });\\n    } // set tabindex to -1 to remove the video element from the focus order\\n\\n\\n    tag.setAttribute('tabindex', '-1');\\n    attrs.tabindex = '-1'; // Workaround for #4583 (JAWS+IE doesn't announce BPB or play button), and\\n    // for the same issue with Chrome (on Windows) with JAWS.\\n    // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\\n    // Note that we can't detect if JAWS is being used, but this ARIA attribute\\n    //  doesn't change behavior of IE11 or Chrome if JAWS is not being used\\n\\n    if (IE_VERSION || IS_CHROME && IS_WINDOWS) {\\n      tag.setAttribute('role', 'application');\\n      attrs.role = 'application';\\n    } // Remove width/height attrs from tag so CSS can make it 100% width/height\\n\\n\\n    tag.removeAttribute('width');\\n    tag.removeAttribute('height');\\n\\n    if ('width' in attrs) {\\n      delete attrs.width;\\n    }\\n\\n    if ('height' in attrs) {\\n      delete attrs.height;\\n    }\\n\\n    Object.getOwnPropertyNames(attrs).forEach(function (attr) {\\n      // don't copy over the class attribute to the player element when we're in a div embed\\n      // the class is already set up properly in the divEmbed case\\n      // and we want to make sure that the `video-js` class doesn't get lost\\n      if (!(divEmbed && attr === 'class')) {\\n        el.setAttribute(attr, attrs[attr]);\\n      }\\n\\n      if (divEmbed) {\\n        tag.setAttribute(attr, attrs[attr]);\\n      }\\n    }); // Update tag id/class for use as HTML5 playback tech\\n    // Might think we should do this after embedding in container so .vjs-tech class\\n    // doesn't flash 100% width/height, but class only applies with .video-js parent\\n\\n    tag.playerId = tag.id;\\n    tag.id += '_html5_api';\\n    tag.className = 'vjs-tech'; // Make player findable on elements\\n\\n    tag.player = el.player = this; // Default state of video is paused\\n\\n    this.addClass('vjs-paused'); // Add a style element in the player that we'll use to set the width/height\\n    // of the player in a way that's still overrideable by CSS, just like the\\n    // video element\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\\n      this.styleEl_ = createStyleElement('vjs-styles-dimensions');\\n      var defaultsStyleEl = $('.vjs-styles-defaults');\\n      var head = $('head');\\n      head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\\n    }\\n\\n    this.fill_ = false;\\n    this.fluid_ = false; // Pass in the width/height/aspectRatio options which will update the style el\\n\\n    this.width(this.options_.width);\\n    this.height(this.options_.height);\\n    this.fill(this.options_.fill);\\n    this.fluid(this.options_.fluid);\\n    this.aspectRatio(this.options_.aspectRatio); // support both crossOrigin and crossorigin to reduce confusion and issues around the name\\n\\n    this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin); // Hide any links within the video/audio tag,\\n    // because IE doesn't hide them completely from screen readers.\\n\\n    var links = tag.getElementsByTagName('a');\\n\\n    for (var i = 0; i < links.length; i++) {\\n      var linkEl = links.item(i);\\n      addClass(linkEl, 'vjs-hidden');\\n      linkEl.setAttribute('hidden', 'hidden');\\n    } // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\\n    // keep track of the original for later so we can know if the source originally failed\\n\\n\\n    tag.initNetworkState_ = tag.networkState; // Wrap video tag in div (el/box) container\\n\\n    if (tag.parentNode && !playerElIngest) {\\n      tag.parentNode.insertBefore(el, tag);\\n    } // insert the tag as the first child of the player element\\n    // then manually add it to the children array so that this.addChild\\n    // will work properly for other components\\n    //\\n    // Breaks iPhone, fixed in HTML5 setup.\\n\\n\\n    prependTo(tag, el);\\n    this.children_.unshift(tag); // Set lang attr on player to ensure CSS :lang() in consistent with player\\n    // if it's been set to something different to the doc\\n\\n    this.el_.setAttribute('lang', this.language_);\\n    this.el_ = el;\\n    return el;\\n  }\\n  /**\\n   * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this\\n   * sets the `crossOrigin` property on the `<video>` tag to control the CORS\\n   * behavior.\\n   *\\n   * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\\n   *\\n   * @param {string} [value]\\n   *        The value to set the `Player`'s crossOrigin to. If an argument is\\n   *        given, must be one of `anonymous` or `use-credentials`.\\n   *\\n   * @return {string|undefined}\\n   *         - The current crossOrigin value of the `Player` when getting.\\n   *         - undefined when setting\\n   */\\n  ;\\n\\n  _proto.crossOrigin = function crossOrigin(value) {\\n    if (!value) {\\n      return this.techGet_('crossOrigin');\\n    }\\n\\n    if (value !== 'anonymous' && value !== 'use-credentials') {\\n      log.warn(\\\"crossOrigin must be \\\\\\\"anonymous\\\\\\\" or \\\\\\\"use-credentials\\\\\\\", given \\\\\\\"\\\" + value + \\\"\\\\\\\"\\\");\\n      return;\\n    }\\n\\n    this.techCall_('setCrossOrigin', value);\\n    return;\\n  }\\n  /**\\n   * A getter/setter for the `Player`'s width. Returns the player's configured value.\\n   * To get the current width use `currentWidth()`.\\n   *\\n   * @param {number} [value]\\n   *        The value to set the `Player`'s width to.\\n   *\\n   * @return {number}\\n   *         The current width of the `Player` when getting.\\n   */\\n  ;\\n\\n  _proto.width = function width(value) {\\n    return this.dimension('width', value);\\n  }\\n  /**\\n   * A getter/setter for the `Player`'s height. Returns the player's configured value.\\n   * To get the current height use `currentheight()`.\\n   *\\n   * @param {number} [value]\\n   *        The value to set the `Player`'s heigth to.\\n   *\\n   * @return {number}\\n   *         The current height of the `Player` when getting.\\n   */\\n  ;\\n\\n  _proto.height = function height(value) {\\n    return this.dimension('height', value);\\n  }\\n  /**\\n   * A getter/setter for the `Player`'s width & height.\\n   *\\n   * @param {string} dimension\\n   *        This string can be:\\n   *        - 'width'\\n   *        - 'height'\\n   *\\n   * @param {number} [value]\\n   *        Value for dimension specified in the first argument.\\n   *\\n   * @return {number}\\n   *         The dimension arguments value when getting (width/height).\\n   */\\n  ;\\n\\n  _proto.dimension = function dimension(_dimension, value) {\\n    var privDimension = _dimension + '_';\\n\\n    if (value === undefined) {\\n      return this[privDimension] || 0;\\n    }\\n\\n    if (value === '' || value === 'auto') {\\n      // If an empty string is given, reset the dimension to be automatic\\n      this[privDimension] = undefined;\\n      this.updateStyleEl_();\\n      return;\\n    }\\n\\n    var parsedVal = parseFloat(value);\\n\\n    if (isNaN(parsedVal)) {\\n      log.error(\\\"Improper value \\\\\\\"\\\" + value + \\\"\\\\\\\" supplied for for \\\" + _dimension);\\n      return;\\n    }\\n\\n    this[privDimension] = parsedVal;\\n    this.updateStyleEl_();\\n  }\\n  /**\\n   * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\\n   *\\n   * Turning this on will turn off fill mode.\\n   *\\n   * @param {boolean} [bool]\\n   *        - A value of true adds the class.\\n   *        - A value of false removes the class.\\n   *        - No value will be a getter.\\n   *\\n   * @return {boolean|undefined}\\n   *         - The value of fluid when getting.\\n   *         - `undefined` when setting.\\n   */\\n  ;\\n\\n  _proto.fluid = function fluid(bool) {\\n    if (bool === undefined) {\\n      return !!this.fluid_;\\n    }\\n\\n    this.fluid_ = !!bool;\\n\\n    if (isEvented(this)) {\\n      this.off('playerreset', this.updateStyleEl_);\\n    }\\n\\n    if (bool) {\\n      this.addClass('vjs-fluid');\\n      this.fill(false);\\n      addEventedCallback(function () {\\n        this.on('playerreset', this.updateStyleEl_);\\n      });\\n    } else {\\n      this.removeClass('vjs-fluid');\\n    }\\n\\n    this.updateStyleEl_();\\n  }\\n  /**\\n   * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\\n   *\\n   * Turning this on will turn off fluid mode.\\n   *\\n   * @param {boolean} [bool]\\n   *        - A value of true adds the class.\\n   *        - A value of false removes the class.\\n   *        - No value will be a getter.\\n   *\\n   * @return {boolean|undefined}\\n   *         - The value of fluid when getting.\\n   *         - `undefined` when setting.\\n   */\\n  ;\\n\\n  _proto.fill = function fill(bool) {\\n    if (bool === undefined) {\\n      return !!this.fill_;\\n    }\\n\\n    this.fill_ = !!bool;\\n\\n    if (bool) {\\n      this.addClass('vjs-fill');\\n      this.fluid(false);\\n    } else {\\n      this.removeClass('vjs-fill');\\n    }\\n  }\\n  /**\\n   * Get/Set the aspect ratio\\n   *\\n   * @param {string} [ratio]\\n   *        Aspect ratio for player\\n   *\\n   * @return {string|undefined}\\n   *         returns the current aspect ratio when getting\\n   */\\n\\n  /**\\n   * A getter/setter for the `Player`'s aspect ratio.\\n   *\\n   * @param {string} [ratio]\\n   *        The value to set the `Player`'s aspect ratio to.\\n   *\\n   * @return {string|undefined}\\n   *         - The current aspect ratio of the `Player` when getting.\\n   *         - undefined when setting\\n   */\\n  ;\\n\\n  _proto.aspectRatio = function aspectRatio(ratio) {\\n    if (ratio === undefined) {\\n      return this.aspectRatio_;\\n    } // Check for width:height format\\n\\n\\n    if (!/^\\\\d+\\\\:\\\\d+$/.test(ratio)) {\\n      throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\\n    }\\n\\n    this.aspectRatio_ = ratio; // We're assuming if you set an aspect ratio you want fluid mode,\\n    // because in fixed mode you could calculate width and height yourself.\\n\\n    this.fluid(true);\\n    this.updateStyleEl_();\\n  }\\n  /**\\n   * Update styles of the `Player` element (height, width and aspect ratio).\\n   *\\n   * @private\\n   * @listens Tech#loadedmetadata\\n   */\\n  ;\\n\\n  _proto.updateStyleEl_ = function updateStyleEl_() {\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE === true) {\\n      var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\\n\\n      var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\\n\\n      var techEl = this.tech_ && this.tech_.el();\\n\\n      if (techEl) {\\n        if (_width >= 0) {\\n          techEl.width = _width;\\n        }\\n\\n        if (_height >= 0) {\\n          techEl.height = _height;\\n        }\\n      }\\n\\n      return;\\n    }\\n\\n    var width;\\n    var height;\\n    var aspectRatio;\\n    var idClass; // The aspect ratio is either used directly or to calculate width and height.\\n\\n    if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\\n      // Use any aspectRatio that's been specifically set\\n      aspectRatio = this.aspectRatio_;\\n    } else if (this.videoWidth() > 0) {\\n      // Otherwise try to get the aspect ratio from the video metadata\\n      aspectRatio = this.videoWidth() + ':' + this.videoHeight();\\n    } else {\\n      // Or use a default. The video element's is 2:1, but 16:9 is more common.\\n      aspectRatio = '16:9';\\n    } // Get the ratio as a decimal we can use to calculate dimensions\\n\\n\\n    var ratioParts = aspectRatio.split(':');\\n    var ratioMultiplier = ratioParts[1] / ratioParts[0];\\n\\n    if (this.width_ !== undefined) {\\n      // Use any width that's been specifically set\\n      width = this.width_;\\n    } else if (this.height_ !== undefined) {\\n      // Or calulate the width from the aspect ratio if a height has been set\\n      width = this.height_ / ratioMultiplier;\\n    } else {\\n      // Or use the video's metadata, or use the video el's default of 300\\n      width = this.videoWidth() || 300;\\n    }\\n\\n    if (this.height_ !== undefined) {\\n      // Use any height that's been specifically set\\n      height = this.height_;\\n    } else {\\n      // Otherwise calculate the height from the ratio and the width\\n      height = width * ratioMultiplier;\\n    } // Ensure the CSS class is valid by starting with an alpha character\\n\\n\\n    if (/^[^a-zA-Z]/.test(this.id())) {\\n      idClass = 'dimensions-' + this.id();\\n    } else {\\n      idClass = this.id() + '-dimensions';\\n    } // Ensure the right class is still on the player for the style element\\n\\n\\n    this.addClass(idClass);\\n    setTextContent(this.styleEl_, \\\"\\\\n      .\\\" + idClass + \\\" {\\\\n        width: \\\" + width + \\\"px;\\\\n        height: \\\" + height + \\\"px;\\\\n      }\\\\n\\\\n      .\\\" + idClass + \\\".vjs-fluid {\\\\n        padding-top: \\\" + ratioMultiplier * 100 + \\\"%;\\\\n      }\\\\n    \\\");\\n  }\\n  /**\\n   * Load/Create an instance of playback {@link Tech} including element\\n   * and API methods. Then append the `Tech` element in `Player` as a child.\\n   *\\n   * @param {string} techName\\n   *        name of the playback technology\\n   *\\n   * @param {string} source\\n   *        video source\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.loadTech_ = function loadTech_(techName, source) {\\n    var _this3 = this;\\n\\n    // Pause and remove current playback technology\\n    if (this.tech_) {\\n      this.unloadTech_();\\n    }\\n\\n    var titleTechName = toTitleCase(techName);\\n    var camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1); // get rid of the HTML5 video tag as soon as we are using another tech\\n\\n    if (titleTechName !== 'Html5' && this.tag) {\\n      Tech.getTech('Html5').disposeMediaElement(this.tag);\\n      this.tag.player = null;\\n      this.tag = null;\\n    }\\n\\n    this.techName_ = titleTechName; // Turn off API access because we're loading a new tech that might load asynchronously\\n\\n    this.isReady_ = false; // if autoplay is a string we pass false to the tech\\n    // because the player is going to handle autoplay on `loadstart`\\n\\n    var autoplay = typeof this.autoplay() === 'string' ? false : this.autoplay(); // Grab tech-specific options from player options and add source and parent element to use.\\n\\n    var techOptions = {\\n      source: source,\\n      autoplay: autoplay,\\n      'nativeControlsForTouch': this.options_.nativeControlsForTouch,\\n      'playerId': this.id(),\\n      'techId': this.id() + \\\"_\\\" + camelTechName + \\\"_api\\\",\\n      'playsinline': this.options_.playsinline,\\n      'preload': this.options_.preload,\\n      'loop': this.options_.loop,\\n      'muted': this.options_.muted,\\n      'poster': this.poster(),\\n      'language': this.language(),\\n      'playerElIngest': this.playerElIngest_ || false,\\n      'vtt.js': this.options_['vtt.js'],\\n      'canOverridePoster': !!this.options_.techCanOverridePoster,\\n      'enableSourceset': this.options_.enableSourceset,\\n      'Promise': this.options_.Promise\\n    };\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n      techOptions[props.getterName] = _this3[props.privateName];\\n    });\\n    assign(techOptions, this.options_[titleTechName]);\\n    assign(techOptions, this.options_[camelTechName]);\\n    assign(techOptions, this.options_[techName.toLowerCase()]);\\n\\n    if (this.tag) {\\n      techOptions.tag = this.tag;\\n    }\\n\\n    if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\\n      techOptions.startTime = this.cache_.currentTime;\\n    } // Initialize tech instance\\n\\n\\n    var TechClass = Tech.getTech(techName);\\n\\n    if (!TechClass) {\\n      throw new Error(\\\"No Tech named '\\\" + titleTechName + \\\"' exists! '\\\" + titleTechName + \\\"' should be registered using videojs.registerTech()'\\\");\\n    }\\n\\n    this.tech_ = new TechClass(techOptions); // player.triggerReady is always async, so don't need this to be async\\n\\n    this.tech_.ready(bind(this, this.handleTechReady_), true);\\n    textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_); // Listen to all HTML5-defined events and trigger them on the player\\n\\n    TECH_EVENTS_RETRIGGER.forEach(function (event) {\\n      _this3.on(_this3.tech_, event, _this3[\\\"handleTech\\\" + toTitleCase(event) + \\\"_\\\"]);\\n    });\\n    Object.keys(TECH_EVENTS_QUEUE).forEach(function (event) {\\n      _this3.on(_this3.tech_, event, function (eventObj) {\\n        if (_this3.tech_.playbackRate() === 0 && _this3.tech_.seeking()) {\\n          _this3.queuedCallbacks_.push({\\n            callback: _this3[\\\"handleTech\\\" + TECH_EVENTS_QUEUE[event] + \\\"_\\\"].bind(_this3),\\n            event: eventObj\\n          });\\n\\n          return;\\n        }\\n\\n        _this3[\\\"handleTech\\\" + TECH_EVENTS_QUEUE[event] + \\\"_\\\"](eventObj);\\n      });\\n    });\\n    this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\\n    this.on(this.tech_, 'sourceset', this.handleTechSourceset_);\\n    this.on(this.tech_, 'waiting', this.handleTechWaiting_);\\n    this.on(this.tech_, 'ended', this.handleTechEnded_);\\n    this.on(this.tech_, 'seeking', this.handleTechSeeking_);\\n    this.on(this.tech_, 'play', this.handleTechPlay_);\\n    this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\\n    this.on(this.tech_, 'pause', this.handleTechPause_);\\n    this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\\n    this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\\n    this.on(this.tech_, 'fullscreenerror', this.handleTechFullscreenError_);\\n    this.on(this.tech_, 'enterpictureinpicture', this.handleTechEnterPictureInPicture_);\\n    this.on(this.tech_, 'leavepictureinpicture', this.handleTechLeavePictureInPicture_);\\n    this.on(this.tech_, 'error', this.handleTechError_);\\n    this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\\n    this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\\n    this.on(this.tech_, 'textdata', this.handleTechTextData_);\\n    this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\\n    this.usingNativeControls(this.techGet_('controls'));\\n\\n    if (this.controls() && !this.usingNativeControls()) {\\n      this.addTechControlsListeners_();\\n    } // Add the tech element in the DOM if it was not already there\\n    // Make sure to not insert the original video element if using Html5\\n\\n\\n    if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\\n      prependTo(this.tech_.el(), this.el());\\n    } // Get rid of the original video tag reference after the first tech is loaded\\n\\n\\n    if (this.tag) {\\n      this.tag.player = null;\\n      this.tag = null;\\n    }\\n  }\\n  /**\\n   * Unload and dispose of the current playback {@link Tech}.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.unloadTech_ = function unloadTech_() {\\n    var _this4 = this;\\n\\n    // Save the current text tracks so that we can reuse the same text tracks with the next tech\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n      _this4[props.privateName] = _this4[props.getterName]();\\n    });\\n    this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\\n    this.isReady_ = false;\\n    this.tech_.dispose();\\n    this.tech_ = false;\\n\\n    if (this.isPosterFromTech_) {\\n      this.poster_ = '';\\n      this.trigger('posterchange');\\n    }\\n\\n    this.isPosterFromTech_ = false;\\n  }\\n  /**\\n   * Return a reference to the current {@link Tech}.\\n   * It will print a warning by default about the danger of using the tech directly\\n   * but any argument that is passed in will silence the warning.\\n   *\\n   * @param {*} [safety]\\n   *        Anything passed in to silence the warning\\n   *\\n   * @return {Tech}\\n   *         The Tech\\n   */\\n  ;\\n\\n  _proto.tech = function tech(safety) {\\n    if (safety === undefined) {\\n      log.warn('Using the tech directly can be dangerous. I hope you know what you\\\\'re doing.\\\\n' + 'See https://github.com/videojs/video.js/issues/2617 for more info.\\\\n');\\n    }\\n\\n    return this.tech_;\\n  }\\n  /**\\n   * Set up click and touch listeners for the playback element\\n   *\\n   * - On desktops: a click on the video itself will toggle playback\\n   * - On mobile devices: a click on the video toggles controls\\n   *   which is done by toggling the user state between active and\\n   *   inactive\\n   * - A tap can signal that a user has become active or has become inactive\\n   *   e.g. a quick tap on an iPhone movie should reveal the controls. Another\\n   *   quick tap should hide them again (signaling the user is in an inactive\\n   *   viewing state)\\n   * - In addition to this, we still want the user to be considered inactive after\\n   *   a few seconds of inactivity.\\n   *\\n   * > Note: the only part of iOS interaction we can't mimic with this setup\\n   * is a touch and hold on the video element counting as activity in order to\\n   * keep the controls showing, but that shouldn't be an issue. A touch and hold\\n   * on any controls will still keep the user active\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.addTechControlsListeners_ = function addTechControlsListeners_() {\\n    // Make sure to remove all the previous listeners in case we are called multiple times.\\n    this.removeTechControlsListeners_(); // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\\n    // trigger mousedown/up.\\n    // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\\n    // Any touch events are set to block the mousedown event from happening\\n\\n    this.on(this.tech_, 'mouseup', this.handleTechClick_);\\n    this.on(this.tech_, 'dblclick', this.handleTechDoubleClick_); // If the controls were hidden we don't want that to change without a tap event\\n    // so we'll check if the controls were already showing before reporting user\\n    // activity\\n\\n    this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\\n    this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\\n    this.on(this.tech_, 'touchend', this.handleTechTouchEnd_); // The tap listener needs to come after the touchend listener because the tap\\n    // listener cancels out any reportedUserActivity when setting userActive(false)\\n\\n    this.on(this.tech_, 'tap', this.handleTechTap_);\\n  }\\n  /**\\n   * Remove the listeners used for click and tap controls. This is needed for\\n   * toggling to controls disabled, where a tap/touch should do nothing.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.removeTechControlsListeners_ = function removeTechControlsListeners_() {\\n    // We don't want to just use `this.off()` because there might be other needed\\n    // listeners added by techs that extend this.\\n    this.off(this.tech_, 'tap', this.handleTechTap_);\\n    this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\\n    this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\\n    this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\\n    this.off(this.tech_, 'mouseup', this.handleTechClick_);\\n    this.off(this.tech_, 'dblclick', this.handleTechDoubleClick_);\\n  }\\n  /**\\n   * Player waits for the tech to be ready\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechReady_ = function handleTechReady_() {\\n    this.triggerReady(); // Keep the same volume as before\\n\\n    if (this.cache_.volume) {\\n      this.techCall_('setVolume', this.cache_.volume);\\n    } // Look if the tech found a higher resolution poster while loading\\n\\n\\n    this.handleTechPosterChange_(); // Update the duration if available\\n\\n    this.handleTechDurationChange_();\\n  }\\n  /**\\n   * Retrigger the `loadstart` event that was triggered by the {@link Tech}. This\\n   * function will also trigger {@link Player#firstplay} if it is the first loadstart\\n   * for a video.\\n   *\\n   * @fires Player#loadstart\\n   * @fires Player#firstplay\\n   * @listens Tech#loadstart\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechLoadStart_ = function handleTechLoadStart_() {\\n    // TODO: Update to use `emptied` event instead. See #1277.\\n    this.removeClass('vjs-ended');\\n    this.removeClass('vjs-seeking'); // reset the error state\\n\\n    this.error(null); // Update the duration\\n\\n    this.handleTechDurationChange_(); // If it's already playing we want to trigger a firstplay event now.\\n    // The firstplay event relies on both the play and loadstart events\\n    // which can happen in any order for a new source\\n\\n    if (!this.paused()) {\\n      /**\\n       * Fired when the user agent begins looking for media data\\n       *\\n       * @event Player#loadstart\\n       * @type {EventTarget~Event}\\n       */\\n      this.trigger('loadstart');\\n      this.trigger('firstplay');\\n    } else {\\n      // reset the hasStarted state\\n      this.hasStarted(false);\\n      this.trigger('loadstart');\\n    } // autoplay happens after loadstart for the browser,\\n    // so we mimic that behavior\\n\\n\\n    this.manualAutoplay_(this.autoplay());\\n  }\\n  /**\\n   * Handle autoplay string values, rather than the typical boolean\\n   * values that should be handled by the tech. Note that this is not\\n   * part of any specification. Valid values and what they do can be\\n   * found on the autoplay getter at Player#autoplay()\\n   */\\n  ;\\n\\n  _proto.manualAutoplay_ = function manualAutoplay_(type) {\\n    var _this5 = this;\\n\\n    if (!this.tech_ || typeof type !== 'string') {\\n      return;\\n    }\\n\\n    var muted = function muted() {\\n      var previouslyMuted = _this5.muted();\\n\\n      _this5.muted(true);\\n\\n      var restoreMuted = function restoreMuted() {\\n        _this5.muted(previouslyMuted);\\n      }; // restore muted on play terminatation\\n\\n\\n      _this5.playTerminatedQueue_.push(restoreMuted);\\n\\n      var mutedPromise = _this5.play();\\n\\n      if (!isPromise(mutedPromise)) {\\n        return;\\n      }\\n\\n      return mutedPromise[\\\"catch\\\"](restoreMuted);\\n    };\\n\\n    var promise; // if muted defaults to true\\n    // the only thing we can do is call play\\n\\n    if (type === 'any' && this.muted() !== true) {\\n      promise = this.play();\\n\\n      if (isPromise(promise)) {\\n        promise = promise[\\\"catch\\\"](muted);\\n      }\\n    } else if (type === 'muted' && this.muted() !== true) {\\n      promise = muted();\\n    } else {\\n      promise = this.play();\\n    }\\n\\n    if (!isPromise(promise)) {\\n      return;\\n    }\\n\\n    return promise.then(function () {\\n      _this5.trigger({\\n        type: 'autoplay-success',\\n        autoplay: type\\n      });\\n    })[\\\"catch\\\"](function (e) {\\n      _this5.trigger({\\n        type: 'autoplay-failure',\\n        autoplay: type\\n      });\\n    });\\n  }\\n  /**\\n   * Update the internal source caches so that we return the correct source from\\n   * `src()`, `currentSource()`, and `currentSources()`.\\n   *\\n   * > Note: `currentSources` will not be updated if the source that is passed in exists\\n   *         in the current `currentSources` cache.\\n   *\\n   *\\n   * @param {Tech~SourceObject} srcObj\\n   *        A string or object source to update our caches to.\\n   */\\n  ;\\n\\n  _proto.updateSourceCaches_ = function updateSourceCaches_(srcObj) {\\n    if (srcObj === void 0) {\\n      srcObj = '';\\n    }\\n\\n    var src = srcObj;\\n    var type = '';\\n\\n    if (typeof src !== 'string') {\\n      src = srcObj.src;\\n      type = srcObj.type;\\n    } // make sure all the caches are set to default values\\n    // to prevent null checking\\n\\n\\n    this.cache_.source = this.cache_.source || {};\\n    this.cache_.sources = this.cache_.sources || []; // try to get the type of the src that was passed in\\n\\n    if (src && !type) {\\n      type = findMimetype(this, src);\\n    } // update `currentSource` cache always\\n\\n\\n    this.cache_.source = mergeOptions({}, srcObj, {\\n      src: src,\\n      type: type\\n    });\\n    var matchingSources = this.cache_.sources.filter(function (s) {\\n      return s.src && s.src === src;\\n    });\\n    var sourceElSources = [];\\n    var sourceEls = this.$$('source');\\n    var matchingSourceEls = [];\\n\\n    for (var i = 0; i < sourceEls.length; i++) {\\n      var sourceObj = getAttributes(sourceEls[i]);\\n      sourceElSources.push(sourceObj);\\n\\n      if (sourceObj.src && sourceObj.src === src) {\\n        matchingSourceEls.push(sourceObj.src);\\n      }\\n    } // if we have matching source els but not matching sources\\n    // the current source cache is not up to date\\n\\n\\n    if (matchingSourceEls.length && !matchingSources.length) {\\n      this.cache_.sources = sourceElSources; // if we don't have matching source or source els set the\\n      // sources cache to the `currentSource` cache\\n    } else if (!matchingSources.length) {\\n      this.cache_.sources = [this.cache_.source];\\n    } // update the tech `src` cache\\n\\n\\n    this.cache_.src = src;\\n  }\\n  /**\\n   * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\\n   * causing the media element to reload.\\n   *\\n   * It will fire for the initial source and each subsequent source.\\n   * This event is a custom event from Video.js and is triggered by the {@link Tech}.\\n   *\\n   * The event object for this event contains a `src` property that will contain the source\\n   * that was available when the event was triggered. This is generally only necessary if Video.js\\n   * is switching techs while the source was being changed.\\n   *\\n   * It is also fired when `load` is called on the player (or media element)\\n   * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\\n   * says that the resource selection algorithm needs to be aborted and restarted.\\n   * In this case, it is very likely that the `src` property will be set to the\\n   * empty string `\\\"\\\"` to indicate we do not know what the source will be but\\n   * that it is changing.\\n   *\\n   * *This event is currently still experimental and may change in minor releases.*\\n   * __To use this, pass `enableSourceset` option to the player.__\\n   *\\n   * @event Player#sourceset\\n   * @type {EventTarget~Event}\\n   * @prop {string} src\\n   *                The source url available when the `sourceset` was triggered.\\n   *                It will be an empty string if we cannot know what the source is\\n   *                but know that the source will change.\\n   */\\n\\n  /**\\n   * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#sourceset\\n   * @listens Tech#sourceset\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechSourceset_ = function handleTechSourceset_(event) {\\n    var _this6 = this;\\n\\n    // only update the source cache when the source\\n    // was not updated using the player api\\n    if (!this.changingSrc_) {\\n      var updateSourceCaches = function updateSourceCaches(src) {\\n        return _this6.updateSourceCaches_(src);\\n      };\\n\\n      var playerSrc = this.currentSource().src;\\n      var eventSrc = event.src; // if we have a playerSrc that is not a blob, and a tech src that is a blob\\n\\n      if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\\n        // if both the tech source and the player source were updated we assume\\n        // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\\n        if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\\n          updateSourceCaches = function updateSourceCaches() {};\\n        }\\n      } // update the source to the intial source right away\\n      // in some cases this will be empty string\\n\\n\\n      updateSourceCaches(eventSrc); // if the `sourceset` `src` was an empty string\\n      // wait for a `loadstart` to update the cache to `currentSrc`.\\n      // If a sourceset happens before a `loadstart`, we reset the state\\n\\n      if (!event.src) {\\n        this.tech_.any(['sourceset', 'loadstart'], function (e) {\\n          // if a sourceset happens before a `loadstart` there\\n          // is nothing to do as this `handleTechSourceset_`\\n          // will be called again and this will be handled there.\\n          if (e.type === 'sourceset') {\\n            return;\\n          }\\n\\n          var techSrc = _this6.techGet('currentSrc');\\n\\n          _this6.lastSource_.tech = techSrc;\\n\\n          _this6.updateSourceCaches_(techSrc);\\n        });\\n      }\\n    }\\n\\n    this.lastSource_ = {\\n      player: this.currentSource().src,\\n      tech: event.src\\n    };\\n    this.trigger({\\n      src: event.src,\\n      type: 'sourceset'\\n    });\\n  }\\n  /**\\n   * Add/remove the vjs-has-started class\\n   *\\n   * @fires Player#firstplay\\n   *\\n   * @param {boolean} request\\n   *        - true: adds the class\\n   *        - false: remove the class\\n   *\\n   * @return {boolean}\\n   *         the boolean value of hasStarted_\\n   */\\n  ;\\n\\n  _proto.hasStarted = function hasStarted(request) {\\n    if (request === undefined) {\\n      // act as getter, if we have no request to change\\n      return this.hasStarted_;\\n    }\\n\\n    if (request === this.hasStarted_) {\\n      return;\\n    }\\n\\n    this.hasStarted_ = request;\\n\\n    if (this.hasStarted_) {\\n      this.addClass('vjs-has-started');\\n      this.trigger('firstplay');\\n    } else {\\n      this.removeClass('vjs-has-started');\\n    }\\n  }\\n  /**\\n   * Fired whenever the media begins or resumes playback\\n   *\\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\\n   * @fires Player#play\\n   * @listens Tech#play\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPlay_ = function handleTechPlay_() {\\n    this.removeClass('vjs-ended');\\n    this.removeClass('vjs-paused');\\n    this.addClass('vjs-playing'); // hide the poster when the user hits play\\n\\n    this.hasStarted(true);\\n    /**\\n     * Triggered whenever an {@link Tech#play} event happens. Indicates that\\n     * playback has started or resumed.\\n     *\\n     * @event Player#play\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('play');\\n  }\\n  /**\\n   * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\\n   *\\n   * If there were any events queued while the playback rate was zero, fire\\n   * those events now.\\n   *\\n   * @private\\n   * @method Player#handleTechRateChange_\\n   * @fires Player#ratechange\\n   * @listens Tech#ratechange\\n   */\\n  ;\\n\\n  _proto.handleTechRateChange_ = function handleTechRateChange_() {\\n    if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\\n      this.queuedCallbacks_.forEach(function (queued) {\\n        return queued.callback(queued.event);\\n      });\\n      this.queuedCallbacks_ = [];\\n    }\\n\\n    this.cache_.lastPlaybackRate = this.tech_.playbackRate();\\n    /**\\n     * Fires when the playing speed of the audio/video is changed\\n     *\\n     * @event Player#ratechange\\n     * @type {event}\\n     */\\n\\n    this.trigger('ratechange');\\n  }\\n  /**\\n   * Retrigger the `waiting` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#waiting\\n   * @listens Tech#waiting\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechWaiting_ = function handleTechWaiting_() {\\n    var _this7 = this;\\n\\n    this.addClass('vjs-waiting');\\n    /**\\n     * A readyState change on the DOM element has caused playback to stop.\\n     *\\n     * @event Player#waiting\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('waiting'); // Browsers may emit a timeupdate event after a waiting event. In order to prevent\\n    // premature removal of the waiting class, wait for the time to change.\\n\\n    var timeWhenWaiting = this.currentTime();\\n\\n    var timeUpdateListener = function timeUpdateListener() {\\n      if (timeWhenWaiting !== _this7.currentTime()) {\\n        _this7.removeClass('vjs-waiting');\\n\\n        _this7.off('timeupdate', timeUpdateListener);\\n      }\\n    };\\n\\n    this.on('timeupdate', timeUpdateListener);\\n  }\\n  /**\\n   * Retrigger the `canplay` event that was triggered by the {@link Tech}.\\n   * > Note: This is not consistent between browsers. See #1351\\n   *\\n   * @fires Player#canplay\\n   * @listens Tech#canplay\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechCanPlay_ = function handleTechCanPlay_() {\\n    this.removeClass('vjs-waiting');\\n    /**\\n     * The media has a readyState of HAVE_FUTURE_DATA or greater.\\n     *\\n     * @event Player#canplay\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('canplay');\\n  }\\n  /**\\n   * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#canplaythrough\\n   * @listens Tech#canplaythrough\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() {\\n    this.removeClass('vjs-waiting');\\n    /**\\n     * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\\n     * entire media file can be played without buffering.\\n     *\\n     * @event Player#canplaythrough\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('canplaythrough');\\n  }\\n  /**\\n   * Retrigger the `playing` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#playing\\n   * @listens Tech#playing\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPlaying_ = function handleTechPlaying_() {\\n    this.removeClass('vjs-waiting');\\n    /**\\n     * The media is no longer blocked from playback, and has started playing.\\n     *\\n     * @event Player#playing\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('playing');\\n  }\\n  /**\\n   * Retrigger the `seeking` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#seeking\\n   * @listens Tech#seeking\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechSeeking_ = function handleTechSeeking_() {\\n    this.addClass('vjs-seeking');\\n    /**\\n     * Fired whenever the player is jumping to a new time\\n     *\\n     * @event Player#seeking\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('seeking');\\n  }\\n  /**\\n   * Retrigger the `seeked` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#seeked\\n   * @listens Tech#seeked\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechSeeked_ = function handleTechSeeked_() {\\n    this.removeClass('vjs-seeking');\\n    this.removeClass('vjs-ended');\\n    /**\\n     * Fired when the player has finished jumping to a new time\\n     *\\n     * @event Player#seeked\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('seeked');\\n  }\\n  /**\\n   * Retrigger the `firstplay` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#firstplay\\n   * @listens Tech#firstplay\\n   * @deprecated As of 6.0 firstplay event is deprecated.\\n   *             As of 6.0 passing the `starttime` option to the player and the firstplay event are deprecated.\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechFirstPlay_ = function handleTechFirstPlay_() {\\n    // If the first starttime attribute is specified\\n    // then we will start at the given offset in seconds\\n    if (this.options_.starttime) {\\n      log.warn('Passing the `starttime` option to the player will be deprecated in 6.0');\\n      this.currentTime(this.options_.starttime);\\n    }\\n\\n    this.addClass('vjs-has-started');\\n    /**\\n     * Fired the first time a video is played. Not part of the HLS spec, and this is\\n     * probably not the best implementation yet, so use sparingly. If you don't have a\\n     * reason to prevent playback, use `myPlayer.one('play');` instead.\\n     *\\n     * @event Player#firstplay\\n     * @deprecated As of 6.0 firstplay event is deprecated.\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('firstplay');\\n  }\\n  /**\\n   * Retrigger the `pause` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#pause\\n   * @listens Tech#pause\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPause_ = function handleTechPause_() {\\n    this.removeClass('vjs-playing');\\n    this.addClass('vjs-paused');\\n    /**\\n     * Fired whenever the media has been paused\\n     *\\n     * @event Player#pause\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('pause');\\n  }\\n  /**\\n   * Retrigger the `ended` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#ended\\n   * @listens Tech#ended\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechEnded_ = function handleTechEnded_() {\\n    this.addClass('vjs-ended');\\n\\n    if (this.options_.loop) {\\n      this.currentTime(0);\\n      this.play();\\n    } else if (!this.paused()) {\\n      this.pause();\\n    }\\n    /**\\n     * Fired when the end of the media resource is reached (currentTime == duration)\\n     *\\n     * @event Player#ended\\n     * @type {EventTarget~Event}\\n     */\\n\\n\\n    this.trigger('ended');\\n  }\\n  /**\\n   * Fired when the duration of the media resource is first known or changed\\n   *\\n   * @listens Tech#durationchange\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechDurationChange_ = function handleTechDurationChange_() {\\n    this.duration(this.techGet_('duration'));\\n  }\\n  /**\\n   * Handle a click on the media element to play/pause\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the event that caused this function to trigger\\n   *\\n   * @listens Tech#mouseup\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechClick_ = function handleTechClick_(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    } // When controls are disabled a click should not toggle playback because\\n    // the click is considered a control\\n\\n\\n    if (!this.controls_) {\\n      return;\\n    }\\n\\n    if (this.paused()) {\\n      silencePromise(this.play());\\n    } else {\\n      this.pause();\\n    }\\n  }\\n  /**\\n   * Handle a double-click on the media element to enter/exit fullscreen\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the event that caused this function to trigger\\n   *\\n   * @listens Tech#dblclick\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechDoubleClick_ = function handleTechDoubleClick_(event) {\\n    if (!this.controls_) {\\n      return;\\n    } // we do not want to toggle fullscreen state\\n    // when double-clicking inside a control bar or a modal\\n\\n\\n    var inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), function (el) {\\n      return el.contains(event.target);\\n    });\\n\\n    if (!inAllowedEls) {\\n      /*\\n       * options.userActions.doubleClick\\n       *\\n       * If `undefined` or `true`, double-click toggles fullscreen if controls are present\\n       * Set to `false` to disable double-click handling\\n       * Set to a function to substitute an external double-click handler\\n       */\\n      if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\\n        if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\\n          this.options_.userActions.doubleClick.call(this, event);\\n        } else if (this.isFullscreen()) {\\n          this.exitFullscreen();\\n        } else {\\n          this.requestFullscreen();\\n        }\\n      }\\n    }\\n  }\\n  /**\\n   * Handle a tap on the media element. It will toggle the user\\n   * activity state, which hides and shows the controls.\\n   *\\n   * @listens Tech#tap\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTap_ = function handleTechTap_() {\\n    this.userActive(!this.userActive());\\n  }\\n  /**\\n   * Handle touch to start\\n   *\\n   * @listens Tech#touchstart\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTouchStart_ = function handleTechTouchStart_() {\\n    this.userWasActive = this.userActive();\\n  }\\n  /**\\n   * Handle touch to move\\n   *\\n   * @listens Tech#touchmove\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTouchMove_ = function handleTechTouchMove_() {\\n    if (this.userWasActive) {\\n      this.reportUserActivity();\\n    }\\n  }\\n  /**\\n   * Handle touch to end\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the touchend event that triggered\\n   *        this function\\n   *\\n   * @listens Tech#touchend\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTouchEnd_ = function handleTechTouchEnd_(event) {\\n    // Stop the mouse events from also happening\\n    event.preventDefault();\\n  }\\n  /**\\n   * native click events on the SWF aren't triggered on IE11, Win8.1RT\\n   * use stageclick events triggered from inside the SWF instead\\n   *\\n   * @private\\n   * @listens stageclick\\n   */\\n  ;\\n\\n  _proto.handleStageClick_ = function handleStageClick_() {\\n    this.reportUserActivity();\\n  }\\n  /**\\n   * @private\\n   */\\n  ;\\n\\n  _proto.toggleFullscreenClass_ = function toggleFullscreenClass_() {\\n    if (this.isFullscreen()) {\\n      this.addClass('vjs-fullscreen');\\n    } else {\\n      this.removeClass('vjs-fullscreen');\\n    }\\n  }\\n  /**\\n   * when the document fschange event triggers it calls this\\n   */\\n  ;\\n\\n  _proto.documentFullscreenChange_ = function documentFullscreenChange_(e) {\\n    var targetPlayer = e.target.player; // if another player was fullscreen\\n    // do a null check for targetPlayer because older firefox's would put document as e.target\\n\\n    if (targetPlayer && targetPlayer !== this) {\\n      return;\\n    }\\n\\n    var el = this.el();\\n    var isFs = global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.fullscreenElement] === el;\\n\\n    if (!isFs && el.matches) {\\n      isFs = el.matches(':' + this.fsApi_.fullscreen);\\n    } else if (!isFs && el.msMatchesSelector) {\\n      isFs = el.msMatchesSelector(':' + this.fsApi_.fullscreen);\\n    }\\n\\n    this.isFullscreen(isFs);\\n  }\\n  /**\\n   * Handle Tech Fullscreen Change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the fullscreenchange event that triggered this function\\n   *\\n   * @param {Object} data\\n   *        the data that was sent with the event\\n   *\\n   * @private\\n   * @listens Tech#fullscreenchange\\n   * @fires Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) {\\n    if (data) {\\n      if (data.nativeIOSFullscreen) {\\n        this.toggleClass('vjs-ios-native-fs');\\n      }\\n\\n      this.isFullscreen(data.isFullscreen);\\n    }\\n  };\\n\\n  _proto.handleTechFullscreenError_ = function handleTechFullscreenError_(event, err) {\\n    this.trigger('fullscreenerror', err);\\n  }\\n  /**\\n   * @private\\n   */\\n  ;\\n\\n  _proto.togglePictureInPictureClass_ = function togglePictureInPictureClass_() {\\n    if (this.isInPictureInPicture()) {\\n      this.addClass('vjs-picture-in-picture');\\n    } else {\\n      this.removeClass('vjs-picture-in-picture');\\n    }\\n  }\\n  /**\\n   * Handle Tech Enter Picture-in-Picture.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the enterpictureinpicture event that triggered this function\\n   *\\n   * @private\\n   * @listens Tech#enterpictureinpicture\\n   */\\n  ;\\n\\n  _proto.handleTechEnterPictureInPicture_ = function handleTechEnterPictureInPicture_(event) {\\n    this.isInPictureInPicture(true);\\n  }\\n  /**\\n   * Handle Tech Leave Picture-in-Picture.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the leavepictureinpicture event that triggered this function\\n   *\\n   * @private\\n   * @listens Tech#leavepictureinpicture\\n   */\\n  ;\\n\\n  _proto.handleTechLeavePictureInPicture_ = function handleTechLeavePictureInPicture_(event) {\\n    this.isInPictureInPicture(false);\\n  }\\n  /**\\n   * Fires when an error occurred during the loading of an audio/video.\\n   *\\n   * @private\\n   * @listens Tech#error\\n   */\\n  ;\\n\\n  _proto.handleTechError_ = function handleTechError_() {\\n    var error = this.tech_.error();\\n    this.error(error);\\n  }\\n  /**\\n   * Retrigger the `textdata` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#textdata\\n   * @listens Tech#textdata\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTextData_ = function handleTechTextData_() {\\n    var data = null;\\n\\n    if (arguments.length > 1) {\\n      data = arguments[1];\\n    }\\n    /**\\n     * Fires when we get a textdata event from tech\\n     *\\n     * @event Player#textdata\\n     * @type {EventTarget~Event}\\n     */\\n\\n\\n    this.trigger('textdata', data);\\n  }\\n  /**\\n   * Get object for cached values.\\n   *\\n   * @return {Object}\\n   *         get the current object cache\\n   */\\n  ;\\n\\n  _proto.getCache = function getCache() {\\n    return this.cache_;\\n  }\\n  /**\\n   * Resets the internal cache object.\\n   *\\n   * Using this function outside the player constructor or reset method may\\n   * have unintended side-effects.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.resetCache_ = function resetCache_() {\\n    this.cache_ = {\\n      // Right now, the currentTime is not _really_ cached because it is always\\n      // retrieved from the tech (see: currentTime). However, for completeness,\\n      // we set it to zero here to ensure that if we do start actually caching\\n      // it, we reset it along with everything else.\\n      currentTime: 0,\\n      initTime: 0,\\n      inactivityTimeout: this.options_.inactivityTimeout,\\n      duration: NaN,\\n      lastVolume: 1,\\n      lastPlaybackRate: this.defaultPlaybackRate(),\\n      media: null,\\n      src: '',\\n      source: {},\\n      sources: [],\\n      volume: 1\\n    };\\n  }\\n  /**\\n   * Pass values to the playback tech\\n   *\\n   * @param {string} [method]\\n   *        the method to call\\n   *\\n   * @param {Object} arg\\n   *        the argument to pass\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.techCall_ = function techCall_(method, arg) {\\n    // If it's not ready yet, call method when it is\\n    this.ready(function () {\\n      if (method in allowedSetters) {\\n        return set(this.middleware_, this.tech_, method, arg);\\n      } else if (method in allowedMediators) {\\n        return mediate(this.middleware_, this.tech_, method, arg);\\n      }\\n\\n      try {\\n        if (this.tech_) {\\n          this.tech_[method](arg);\\n        }\\n      } catch (e) {\\n        log(e);\\n        throw e;\\n      }\\n    }, true);\\n  }\\n  /**\\n   * Get calls can't wait for the tech, and sometimes don't need to.\\n   *\\n   * @param {string} method\\n   *        Tech method\\n   *\\n   * @return {Function|undefined}\\n   *         the method or undefined\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.techGet_ = function techGet_(method) {\\n    if (!this.tech_ || !this.tech_.isReady_) {\\n      return;\\n    }\\n\\n    if (method in allowedGetters) {\\n      return get(this.middleware_, this.tech_, method);\\n    } else if (method in allowedMediators) {\\n      return mediate(this.middleware_, this.tech_, method);\\n    } // Flash likes to die and reload when you hide or reposition it.\\n    // In these cases the object methods go away and we get errors.\\n    // When that happens we'll catch the errors and inform tech that it's not ready any more.\\n\\n\\n    try {\\n      return this.tech_[method]();\\n    } catch (e) {\\n      // When building additional tech libs, an expected method may not be defined yet\\n      if (this.tech_[method] === undefined) {\\n        log(\\\"Video.js: \\\" + method + \\\" method not defined for \\\" + this.techName_ + \\\" playback technology.\\\", e);\\n        throw e;\\n      } // When a method isn't available on the object it throws a TypeError\\n\\n\\n      if (e.name === 'TypeError') {\\n        log(\\\"Video.js: \\\" + method + \\\" unavailable on \\\" + this.techName_ + \\\" playback technology element.\\\", e);\\n        this.tech_.isReady_ = false;\\n        throw e;\\n      } // If error unknown, just log and throw\\n\\n\\n      log(e);\\n      throw e;\\n    }\\n  }\\n  /**\\n   * Attempt to begin playback at the first opportunity.\\n   *\\n   * @return {Promise|undefined}\\n   *         Returns a promise if the browser supports Promises (or one\\n   *         was passed in as an option). This promise will be resolved on\\n   *         the return value of play. If this is undefined it will fulfill the\\n   *         promise chain otherwise the promise chain will be fulfilled when\\n   *         the promise from play is fulfilled.\\n   */\\n  ;\\n\\n  _proto.play = function play() {\\n    var _this8 = this;\\n\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      return new PromiseClass(function (resolve) {\\n        _this8.play_(resolve);\\n      });\\n    }\\n\\n    return this.play_();\\n  }\\n  /**\\n   * The actual logic for play, takes a callback that will be resolved on the\\n   * return value of play. This allows us to resolve to the play promise if there\\n   * is one on modern browsers.\\n   *\\n   * @private\\n   * @param {Function} [callback]\\n   *        The callback that should be called when the techs play is actually called\\n   */\\n  ;\\n\\n  _proto.play_ = function play_(callback) {\\n    var _this9 = this;\\n\\n    if (callback === void 0) {\\n      callback = silencePromise;\\n    }\\n\\n    this.playCallbacks_.push(callback);\\n    var isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc())); // treat calls to play_ somewhat like the `one` event function\\n\\n    if (this.waitToPlay_) {\\n      this.off(['ready', 'loadstart'], this.waitToPlay_);\\n      this.waitToPlay_ = null;\\n    } // if the player/tech is not ready or the src itself is not ready\\n    // queue up a call to play on `ready` or `loadstart`\\n\\n\\n    if (!this.isReady_ || !isSrcReady) {\\n      this.waitToPlay_ = function (e) {\\n        _this9.play_();\\n      };\\n\\n      this.one(['ready', 'loadstart'], this.waitToPlay_); // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\\n      // in that case, we need to prime the video element by calling load so it'll be ready in time\\n\\n      if (!isSrcReady && (IS_ANY_SAFARI || IS_IOS)) {\\n        this.load();\\n      }\\n\\n      return;\\n    } // If the player/tech is ready and we have a source, we can attempt playback.\\n\\n\\n    var val = this.techGet_('play'); // play was terminated if the returned value is null\\n\\n    if (val === null) {\\n      this.runPlayTerminatedQueue_();\\n    } else {\\n      this.runPlayCallbacks_(val);\\n    }\\n  }\\n  /**\\n   * These functions will be run when if play is terminated. If play\\n   * runPlayCallbacks_ is run these function will not be run. This allows us\\n   * to differenciate between a terminated play and an actual call to play.\\n   */\\n  ;\\n\\n  _proto.runPlayTerminatedQueue_ = function runPlayTerminatedQueue_() {\\n    var queue = this.playTerminatedQueue_.slice(0);\\n    this.playTerminatedQueue_ = [];\\n    queue.forEach(function (q) {\\n      q();\\n    });\\n  }\\n  /**\\n   * When a callback to play is delayed we have to run these\\n   * callbacks when play is actually called on the tech. This function\\n   * runs the callbacks that were delayed and accepts the return value\\n   * from the tech.\\n   *\\n   * @param {undefined|Promise} val\\n   *        The return value from the tech.\\n   */\\n  ;\\n\\n  _proto.runPlayCallbacks_ = function runPlayCallbacks_(val) {\\n    var callbacks = this.playCallbacks_.slice(0);\\n    this.playCallbacks_ = []; // clear play terminatedQueue since we finished a real play\\n\\n    this.playTerminatedQueue_ = [];\\n    callbacks.forEach(function (cb) {\\n      cb(val);\\n    });\\n  }\\n  /**\\n   * Pause the video playback\\n   *\\n   * @return {Player}\\n   *         A reference to the player object this function was called on\\n   */\\n  ;\\n\\n  _proto.pause = function pause() {\\n    this.techCall_('pause');\\n  }\\n  /**\\n   * Check if the player is paused or has yet to play\\n   *\\n   * @return {boolean}\\n   *         - false: if the media is currently playing\\n   *         - true: if media is not currently playing\\n   */\\n  ;\\n\\n  _proto.paused = function paused() {\\n    // The initial state of paused should be true (in Safari it's actually false)\\n    return this.techGet_('paused') === false ? false : true;\\n  }\\n  /**\\n   * Get a TimeRange object representing the current ranges of time that the user\\n   * has played.\\n   *\\n   * @return {TimeRange}\\n   *         A time range object that represents all the increments of time that have\\n   *         been played.\\n   */\\n  ;\\n\\n  _proto.played = function played() {\\n    return this.techGet_('played') || createTimeRanges(0, 0);\\n  }\\n  /**\\n   * Returns whether or not the user is \\\"scrubbing\\\". Scrubbing is\\n   * when the user has clicked the progress bar handle and is\\n   * dragging it along the progress bar.\\n   *\\n   * @param {boolean} [isScrubbing]\\n   *        whether the user is or is not scrubbing\\n   *\\n   * @return {boolean}\\n   *         The value of scrubbing when getting\\n   */\\n  ;\\n\\n  _proto.scrubbing = function scrubbing(isScrubbing) {\\n    if (typeof isScrubbing === 'undefined') {\\n      return this.scrubbing_;\\n    }\\n\\n    this.scrubbing_ = !!isScrubbing;\\n\\n    if (isScrubbing) {\\n      this.addClass('vjs-scrubbing');\\n    } else {\\n      this.removeClass('vjs-scrubbing');\\n    }\\n  }\\n  /**\\n   * Get or set the current time (in seconds)\\n   *\\n   * @param {number|string} [seconds]\\n   *        The time to seek to in seconds\\n   *\\n   * @return {number}\\n   *         - the current time in seconds when getting\\n   */\\n  ;\\n\\n  _proto.currentTime = function currentTime(seconds) {\\n    if (typeof seconds !== 'undefined') {\\n      if (seconds < 0) {\\n        seconds = 0;\\n      }\\n\\n      if (!this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) {\\n        this.cache_.initTime = seconds;\\n        this.off('canplay', this.applyInitTime_);\\n        this.one('canplay', this.applyInitTime_);\\n        return;\\n      }\\n\\n      this.techCall_('setCurrentTime', seconds);\\n      this.cache_.initTime = 0;\\n      return;\\n    } // cache last currentTime and return. default to 0 seconds\\n    //\\n    // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\\n    // currentTime when scrubbing, but may not provide much performance benefit afterall.\\n    // Should be tested. Also something has to read the actual current time or the cache will\\n    // never get updated.\\n\\n\\n    this.cache_.currentTime = this.techGet_('currentTime') || 0;\\n    return this.cache_.currentTime;\\n  }\\n  /**\\n   * Apply the value of initTime stored in cache as currentTime.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.applyInitTime_ = function applyInitTime_() {\\n    this.currentTime(this.cache_.initTime);\\n  }\\n  /**\\n   * Normally gets the length in time of the video in seconds;\\n   * in all but the rarest use cases an argument will NOT be passed to the method\\n   *\\n   * > **NOTE**: The video must have started loading before the duration can be\\n   * known, and in the case of Flash, may not be known until the video starts\\n   * playing.\\n   *\\n   * @fires Player#durationchange\\n   *\\n   * @param {number} [seconds]\\n   *        The duration of the video to set in seconds\\n   *\\n   * @return {number}\\n   *         - The duration of the video in seconds when getting\\n   */\\n  ;\\n\\n  _proto.duration = function duration(seconds) {\\n    if (seconds === undefined) {\\n      // return NaN if the duration is not known\\n      return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\\n    }\\n\\n    seconds = parseFloat(seconds); // Standardize on Infinity for signaling video is live\\n\\n    if (seconds < 0) {\\n      seconds = Infinity;\\n    }\\n\\n    if (seconds !== this.cache_.duration) {\\n      // Cache the last set value for optimized scrubbing (esp. Flash)\\n      this.cache_.duration = seconds;\\n\\n      if (seconds === Infinity) {\\n        this.addClass('vjs-live');\\n      } else {\\n        this.removeClass('vjs-live');\\n      }\\n\\n      if (!isNaN(seconds)) {\\n        // Do not fire durationchange unless the duration value is known.\\n        // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\\n\\n        /**\\n         * @event Player#durationchange\\n         * @type {EventTarget~Event}\\n         */\\n        this.trigger('durationchange');\\n      }\\n    }\\n  }\\n  /**\\n   * Calculates how much time is left in the video. Not part\\n   * of the native video API.\\n   *\\n   * @return {number}\\n   *         The time remaining in seconds\\n   */\\n  ;\\n\\n  _proto.remainingTime = function remainingTime() {\\n    return this.duration() - this.currentTime();\\n  }\\n  /**\\n   * A remaining time function that is intented to be used when\\n   * the time is to be displayed directly to the user.\\n   *\\n   * @return {number}\\n   *         The rounded time remaining in seconds\\n   */\\n  ;\\n\\n  _proto.remainingTimeDisplay = function remainingTimeDisplay() {\\n    return Math.floor(this.duration()) - Math.floor(this.currentTime());\\n  } //\\n  // Kind of like an array of portions of the video that have been downloaded.\\n\\n  /**\\n   * Get a TimeRange object with an array of the times of the video\\n   * that have been downloaded. If you just want the percent of the\\n   * video that's been downloaded, use bufferedPercent.\\n   *\\n   * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\\n   *\\n   * @return {TimeRange}\\n   *         A mock TimeRange object (following HTML spec)\\n   */\\n  ;\\n\\n  _proto.buffered = function buffered() {\\n    var buffered = this.techGet_('buffered');\\n\\n    if (!buffered || !buffered.length) {\\n      buffered = createTimeRanges(0, 0);\\n    }\\n\\n    return buffered;\\n  }\\n  /**\\n   * Get the percent (as a decimal) of the video that's been downloaded.\\n   * This method is not a part of the native HTML video API.\\n   *\\n   * @return {number}\\n   *         A decimal between 0 and 1 representing the percent\\n   *         that is buffered 0 being 0% and 1 being 100%\\n   */\\n  ;\\n\\n  _proto.bufferedPercent = function bufferedPercent$1() {\\n    return bufferedPercent(this.buffered(), this.duration());\\n  }\\n  /**\\n   * Get the ending time of the last buffered time range\\n   * This is used in the progress bar to encapsulate all time ranges.\\n   *\\n   * @return {number}\\n   *         The end of the last buffered time range\\n   */\\n  ;\\n\\n  _proto.bufferedEnd = function bufferedEnd() {\\n    var buffered = this.buffered();\\n    var duration = this.duration();\\n    var end = buffered.end(buffered.length - 1);\\n\\n    if (end > duration) {\\n      end = duration;\\n    }\\n\\n    return end;\\n  }\\n  /**\\n   * Get or set the current volume of the media\\n   *\\n   * @param  {number} [percentAsDecimal]\\n   *         The new volume as a decimal percent:\\n   *         - 0 is muted/0%/off\\n   *         - 1.0 is 100%/full\\n   *         - 0.5 is half volume or 50%\\n   *\\n   * @return {number}\\n   *         The current volume as a percent when getting\\n   */\\n  ;\\n\\n  _proto.volume = function volume(percentAsDecimal) {\\n    var vol;\\n\\n    if (percentAsDecimal !== undefined) {\\n      // Force value to between 0 and 1\\n      vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal)));\\n      this.cache_.volume = vol;\\n      this.techCall_('setVolume', vol);\\n\\n      if (vol > 0) {\\n        this.lastVolume_(vol);\\n      }\\n\\n      return;\\n    } // Default to 1 when returning current volume.\\n\\n\\n    vol = parseFloat(this.techGet_('volume'));\\n    return isNaN(vol) ? 1 : vol;\\n  }\\n  /**\\n   * Get the current muted state, or turn mute on or off\\n   *\\n   * @param {boolean} [muted]\\n   *        - true to mute\\n   *        - false to unmute\\n   *\\n   * @return {boolean}\\n   *         - true if mute is on and getting\\n   *         - false if mute is off and getting\\n   */\\n  ;\\n\\n  _proto.muted = function muted(_muted) {\\n    if (_muted !== undefined) {\\n      this.techCall_('setMuted', _muted);\\n      return;\\n    }\\n\\n    return this.techGet_('muted') || false;\\n  }\\n  /**\\n   * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\\n   * indicates the state of muted on initial playback.\\n   *\\n   * ```js\\n   *   var myPlayer = videojs('some-player-id');\\n   *\\n   *   myPlayer.src(\\\"http://www.example.com/path/to/video.mp4\\\");\\n   *\\n   *   // get, should be false\\n   *   console.log(myPlayer.defaultMuted());\\n   *   // set to true\\n   *   myPlayer.defaultMuted(true);\\n   *   // get should be true\\n   *   console.log(myPlayer.defaultMuted());\\n   * ```\\n   *\\n   * @param {boolean} [defaultMuted]\\n   *        - true to mute\\n   *        - false to unmute\\n   *\\n   * @return {boolean|Player}\\n   *         - true if defaultMuted is on and getting\\n   *         - false if defaultMuted is off and getting\\n   *         - A reference to the current player when setting\\n   */\\n  ;\\n\\n  _proto.defaultMuted = function defaultMuted(_defaultMuted) {\\n    if (_defaultMuted !== undefined) {\\n      return this.techCall_('setDefaultMuted', _defaultMuted);\\n    }\\n\\n    return this.techGet_('defaultMuted') || false;\\n  }\\n  /**\\n   * Get the last volume, or set it\\n   *\\n   * @param  {number} [percentAsDecimal]\\n   *         The new last volume as a decimal percent:\\n   *         - 0 is muted/0%/off\\n   *         - 1.0 is 100%/full\\n   *         - 0.5 is half volume or 50%\\n   *\\n   * @return {number}\\n   *         the current value of lastVolume as a percent when getting\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.lastVolume_ = function lastVolume_(percentAsDecimal) {\\n    if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\\n      this.cache_.lastVolume = percentAsDecimal;\\n      return;\\n    }\\n\\n    return this.cache_.lastVolume;\\n  }\\n  /**\\n   * Check if current tech can support native fullscreen\\n   * (e.g. with built in controls like iOS, so not our flash swf)\\n   *\\n   * @return {boolean}\\n   *         if native fullscreen is supported\\n   */\\n  ;\\n\\n  _proto.supportsFullScreen = function supportsFullScreen() {\\n    return this.techGet_('supportsFullScreen') || false;\\n  }\\n  /**\\n   * Check if the player is in fullscreen mode or tell the player that it\\n   * is or is not in fullscreen mode.\\n   *\\n   * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\\n   * property and instead document.fullscreenElement is used. But isFullscreen is\\n   * still a valuable property for internal player workings.\\n   *\\n   * @param  {boolean} [isFS]\\n   *         Set the players current fullscreen state\\n   *\\n   * @return {boolean}\\n   *         - true if fullscreen is on and getting\\n   *         - false if fullscreen is off and getting\\n   */\\n  ;\\n\\n  _proto.isFullscreen = function isFullscreen(isFS) {\\n    if (isFS !== undefined) {\\n      var oldValue = this.isFullscreen_;\\n      this.isFullscreen_ = Boolean(isFS); // if we changed fullscreen state and we're in prefixed mode, trigger fullscreenchange\\n      // this is the only place where we trigger fullscreenchange events for older browsers\\n      // fullWindow mode is treated as a prefixed event and will get a fullscreenchange event as well\\n\\n      if (this.isFullscreen_ !== oldValue && this.fsApi_.prefixed) {\\n        /**\\n           * @event Player#fullscreenchange\\n           * @type {EventTarget~Event}\\n           */\\n        this.trigger('fullscreenchange');\\n      }\\n\\n      this.toggleFullscreenClass_();\\n      return;\\n    }\\n\\n    return this.isFullscreen_;\\n  }\\n  /**\\n   * Increase the size of the video to full screen\\n   * In some browsers, full screen is not supported natively, so it enters\\n   * \\\"full window mode\\\", where the video fills the browser window.\\n   * In browsers and devices that support native full screen, sometimes the\\n   * browser's default controls will be shown, and not the Video.js custom skin.\\n   * This includes most mobile devices (iOS, Android) and older versions of\\n   * Safari.\\n   *\\n   * @param  {Object} [fullscreenOptions]\\n   *         Override the player fullscreen options\\n   *\\n   * @fires Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.requestFullscreen = function requestFullscreen(fullscreenOptions) {\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      var self = this;\\n      return new PromiseClass(function (resolve, reject) {\\n        function offHandler() {\\n          self.off('fullscreenerror', errorHandler);\\n          self.off('fullscreenchange', changeHandler);\\n        }\\n\\n        function changeHandler() {\\n          offHandler();\\n          resolve();\\n        }\\n\\n        function errorHandler(e, err) {\\n          offHandler();\\n          reject(err);\\n        }\\n\\n        self.one('fullscreenchange', changeHandler);\\n        self.one('fullscreenerror', errorHandler);\\n        var promise = self.requestFullscreenHelper_(fullscreenOptions);\\n\\n        if (promise) {\\n          promise.then(offHandler, offHandler);\\n          return promise;\\n        }\\n      });\\n    }\\n\\n    return this.requestFullscreenHelper_();\\n  };\\n\\n  _proto.requestFullscreenHelper_ = function requestFullscreenHelper_(fullscreenOptions) {\\n    var _this10 = this;\\n\\n    var fsOptions; // Only pass fullscreen options to requestFullscreen in spec-compliant browsers.\\n    // Use defaults or player configured option unless passed directly to this method.\\n\\n    if (!this.fsApi_.prefixed) {\\n      fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\\n\\n      if (fullscreenOptions !== undefined) {\\n        fsOptions = fullscreenOptions;\\n      }\\n    } // This method works as follows:\\n    // 1. if a fullscreen api is available, use it\\n    //   1. call requestFullscreen with potential options\\n    //   2. if we got a promise from above, use it to update isFullscreen()\\n    // 2. otherwise, if the tech supports fullscreen, call `enterFullScreen` on it.\\n    //   This is particularly used for iPhone, older iPads, and non-safari browser on iOS.\\n    // 3. otherwise, use \\\"fullWindow\\\" mode\\n\\n\\n    if (this.fsApi_.requestFullscreen) {\\n      var promise = this.el_[this.fsApi_.requestFullscreen](fsOptions);\\n\\n      if (promise) {\\n        promise.then(function () {\\n          return _this10.isFullscreen(true);\\n        }, function () {\\n          return _this10.isFullscreen(false);\\n        });\\n      }\\n\\n      return promise;\\n    } else if (this.tech_.supportsFullScreen()) {\\n      // we can't take the video.js controls fullscreen but we can go fullscreen\\n      // with native controls\\n      this.techCall_('enterFullScreen');\\n    } else {\\n      // fullscreen isn't supported so we'll just stretch the video element to\\n      // fill the viewport\\n      this.enterFullWindow();\\n    }\\n  }\\n  /**\\n   * Return the video to its normal size after having been in full screen mode\\n   *\\n   * @fires Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.exitFullscreen = function exitFullscreen() {\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      var self = this;\\n      return new PromiseClass(function (resolve, reject) {\\n        function offHandler() {\\n          self.off('fullscreenerror', errorHandler);\\n          self.off('fullscreenchange', changeHandler);\\n        }\\n\\n        function changeHandler() {\\n          offHandler();\\n          resolve();\\n        }\\n\\n        function errorHandler(e, err) {\\n          offHandler();\\n          reject(err);\\n        }\\n\\n        self.one('fullscreenchange', changeHandler);\\n        self.one('fullscreenerror', errorHandler);\\n        var promise = self.exitFullscreenHelper_();\\n\\n        if (promise) {\\n          promise.then(offHandler, offHandler);\\n          return promise;\\n        }\\n      });\\n    }\\n\\n    return this.exitFullscreenHelper_();\\n  };\\n\\n  _proto.exitFullscreenHelper_ = function exitFullscreenHelper_() {\\n    var _this11 = this;\\n\\n    if (this.fsApi_.requestFullscreen) {\\n      var promise = global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.exitFullscreen]();\\n\\n      if (promise) {\\n        promise.then(function () {\\n          return _this11.isFullscreen(false);\\n        });\\n      }\\n\\n      return promise;\\n    } else if (this.tech_.supportsFullScreen()) {\\n      this.techCall_('exitFullScreen');\\n    } else {\\n      this.exitFullWindow();\\n    }\\n  }\\n  /**\\n   * When fullscreen isn't supported we can stretch the\\n   * video container to as wide as the browser will let us.\\n   *\\n   * @fires Player#enterFullWindow\\n   */\\n  ;\\n\\n  _proto.enterFullWindow = function enterFullWindow() {\\n    this.isFullscreen(true);\\n    this.isFullWindow = true; // Storing original doc overflow value to return to when fullscreen is off\\n\\n    this.docOrigOverflow = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow; // Add listener for esc key to exit fullscreen\\n\\n    on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_); // Hide any scroll bars\\n\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow = 'hidden'; // Apply fullscreen styles\\n\\n    addClass(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body, 'vjs-full-window');\\n    /**\\n     * @event Player#enterFullWindow\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('enterFullWindow');\\n  }\\n  /**\\n   * Check for call to either exit full window or\\n   * full screen on ESC key\\n   *\\n   * @param {string} event\\n   *        Event to check for key press\\n   */\\n  ;\\n\\n  _proto.fullWindowOnEscKey = function fullWindowOnEscKey(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      if (this.isFullscreen() === true) {\\n        this.exitFullscreen();\\n      } else {\\n        this.exitFullWindow();\\n      }\\n    }\\n  }\\n  /**\\n   * Exit full window\\n   *\\n   * @fires Player#exitFullWindow\\n   */\\n  ;\\n\\n  _proto.exitFullWindow = function exitFullWindow() {\\n    this.isFullscreen(false);\\n    this.isFullWindow = false;\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_); // Unhide scroll bars.\\n\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow = this.docOrigOverflow; // Remove fullscreen styles\\n\\n    removeClass(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body, 'vjs-full-window'); // Resize the box, controller, and poster to original sizes\\n    // this.positionAll();\\n\\n    /**\\n     * @event Player#exitFullWindow\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('exitFullWindow');\\n  }\\n  /**\\n   * Check if the player is in Picture-in-Picture mode or tell the player that it\\n   * is or is not in Picture-in-Picture mode.\\n   *\\n   * @param  {boolean} [isPiP]\\n   *         Set the players current Picture-in-Picture state\\n   *\\n   * @return {boolean}\\n   *         - true if Picture-in-Picture is on and getting\\n   *         - false if Picture-in-Picture is off and getting\\n   */\\n  ;\\n\\n  _proto.isInPictureInPicture = function isInPictureInPicture(isPiP) {\\n    if (isPiP !== undefined) {\\n      this.isInPictureInPicture_ = !!isPiP;\\n      this.togglePictureInPictureClass_();\\n      return;\\n    }\\n\\n    return !!this.isInPictureInPicture_;\\n  }\\n  /**\\n   * Create a floating video window always on top of other windows so that users may\\n   * continue consuming media while they interact with other content sites, or\\n   * applications on their device.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @fires Player#enterpictureinpicture\\n   *\\n   * @return {Promise}\\n   *         A promise with a Picture-in-Picture window.\\n   */\\n  ;\\n\\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\\n    if ('pictureInPictureEnabled' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      /**\\n       * This event fires when the player enters picture in picture mode\\n       *\\n       * @event Player#enterpictureinpicture\\n       * @type {EventTarget~Event}\\n       */\\n      return this.techGet_('requestPictureInPicture');\\n    }\\n  }\\n  /**\\n   * Exit Picture-in-Picture mode.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @fires Player#leavepictureinpicture\\n   *\\n   * @return {Promise}\\n   *         A promise.\\n   */\\n  ;\\n\\n  _proto.exitPictureInPicture = function exitPictureInPicture() {\\n    if ('pictureInPictureEnabled' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      /**\\n       * This event fires when the player leaves picture in picture mode\\n       *\\n       * @event Player#leavepictureinpicture\\n       * @type {EventTarget~Event}\\n       */\\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a.exitPictureInPicture();\\n    }\\n  }\\n  /**\\n   * Called when this Player has focus and a key gets pressed down, or when\\n   * any Component of this player receives a key press that it doesn't handle.\\n   * This allows player-wide hotkeys (either as defined below, or optionally\\n   * by an external function).\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    var userActions = this.options_.userActions; // Bail out if hotkeys are not configured.\\n\\n    if (!userActions || !userActions.hotkeys) {\\n      return;\\n    } // Function that determines whether or not to exclude an element from\\n    // hotkeys handling.\\n\\n\\n    var excludeElement = function excludeElement(el) {\\n      var tagName = el.tagName.toLowerCase(); // The first and easiest test is for `contenteditable` elements.\\n\\n      if (el.isContentEditable) {\\n        return true;\\n      } // Inputs matching these types will still trigger hotkey handling as\\n      // they are not text inputs.\\n\\n\\n      var allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\\n\\n      if (tagName === 'input') {\\n        return allowedInputTypes.indexOf(el.type) === -1;\\n      } // The final test is by tag name. These tags will be excluded entirely.\\n\\n\\n      var excludedTags = ['textarea'];\\n      return excludedTags.indexOf(tagName) !== -1;\\n    }; // Bail out if the user is focused on an interactive form element.\\n\\n\\n    if (excludeElement(this.el_.ownerDocument.activeElement)) {\\n      return;\\n    }\\n\\n    if (typeof userActions.hotkeys === 'function') {\\n      userActions.hotkeys.call(this, event);\\n    } else {\\n      this.handleHotkeys(event);\\n    }\\n  }\\n  /**\\n   * Called when this Player receives a hotkey keydown event.\\n   * Supported player-wide hotkeys are:\\n   *\\n   *   f          - toggle fullscreen\\n   *   m          - toggle mute\\n   *   k or Space - toggle play/pause\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleHotkeys = function handleHotkeys(event) {\\n    var hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {}; // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\\n\\n    var _hotkeys$fullscreenKe = hotkeys.fullscreenKey,\\n        fullscreenKey = _hotkeys$fullscreenKe === void 0 ? function (keydownEvent) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'f');\\n    } : _hotkeys$fullscreenKe,\\n        _hotkeys$muteKey = hotkeys.muteKey,\\n        muteKey = _hotkeys$muteKey === void 0 ? function (keydownEvent) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'm');\\n    } : _hotkeys$muteKey,\\n        _hotkeys$playPauseKey = hotkeys.playPauseKey,\\n        playPauseKey = _hotkeys$playPauseKey === void 0 ? function (keydownEvent) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'k') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'Space');\\n    } : _hotkeys$playPauseKey;\\n\\n    if (fullscreenKey.call(this, event)) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var FSToggle = Component.getComponent('FullscreenToggle');\\n\\n      if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.fullscreenEnabled] !== false) {\\n        FSToggle.prototype.handleClick.call(this, event);\\n      }\\n    } else if (muteKey.call(this, event)) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var MuteToggle = Component.getComponent('MuteToggle');\\n      MuteToggle.prototype.handleClick.call(this, event);\\n    } else if (playPauseKey.call(this, event)) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var PlayToggle = Component.getComponent('PlayToggle');\\n      PlayToggle.prototype.handleClick.call(this, event);\\n    }\\n  }\\n  /**\\n   * Check whether the player can play a given mimetype\\n   *\\n   * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\\n   *\\n   * @param {string} type\\n   *        The mimetype to check\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or '' (empty string)\\n   */\\n  ;\\n\\n  _proto.canPlayType = function canPlayType(type) {\\n    var can; // Loop through each playback technology in the options order\\n\\n    for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {\\n      var techName = j[i];\\n      var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\\n      // Remove once that deprecated behavior is removed.\\n\\n      if (!tech) {\\n        tech = Component.getComponent(techName);\\n      } // Check if the current tech is defined before continuing\\n\\n\\n      if (!tech) {\\n        log.error(\\\"The \\\\\\\"\\\" + techName + \\\"\\\\\\\" tech is undefined. Skipped browser support check for that tech.\\\");\\n        continue;\\n      } // Check if the browser supports this technology\\n\\n\\n      if (tech.isSupported()) {\\n        can = tech.canPlayType(type);\\n\\n        if (can) {\\n          return can;\\n        }\\n      }\\n    }\\n\\n    return '';\\n  }\\n  /**\\n   * Select source based on tech-order or source-order\\n   * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\\n   * defaults to tech-order selection\\n   *\\n   * @param {Array} sources\\n   *        The sources for a media asset\\n   *\\n   * @return {Object|boolean}\\n   *         Object of source and tech order or false\\n   */\\n  ;\\n\\n  _proto.selectSource = function selectSource(sources) {\\n    var _this12 = this;\\n\\n    // Get only the techs specified in `techOrder` that exist and are supported by the\\n    // current platform\\n    var techs = this.options_.techOrder.map(function (techName) {\\n      return [techName, Tech.getTech(techName)];\\n    }).filter(function (_ref) {\\n      var techName = _ref[0],\\n          tech = _ref[1];\\n\\n      // Check if the current tech is defined before continuing\\n      if (tech) {\\n        // Check if the browser supports this technology\\n        return tech.isSupported();\\n      }\\n\\n      log.error(\\\"The \\\\\\\"\\\" + techName + \\\"\\\\\\\" tech is undefined. Skipped browser support check for that tech.\\\");\\n      return false;\\n    }); // Iterate over each `innerArray` element once per `outerArray` element and execute\\n    // `tester` with both. If `tester` returns a non-falsy value, exit early and return\\n    // that value.\\n\\n    var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {\\n      var found;\\n      outerArray.some(function (outerChoice) {\\n        return innerArray.some(function (innerChoice) {\\n          found = tester(outerChoice, innerChoice);\\n\\n          if (found) {\\n            return true;\\n          }\\n        });\\n      });\\n      return found;\\n    };\\n\\n    var foundSourceAndTech;\\n\\n    var flip = function flip(fn) {\\n      return function (a, b) {\\n        return fn(b, a);\\n      };\\n    };\\n\\n    var finder = function finder(_ref2, source) {\\n      var techName = _ref2[0],\\n          tech = _ref2[1];\\n\\n      if (tech.canPlaySource(source, _this12.options_[techName.toLowerCase()])) {\\n        return {\\n          source: source,\\n          tech: techName\\n        };\\n      }\\n    }; // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\\n    // to select from them based on their priority.\\n\\n\\n    if (this.options_.sourceOrder) {\\n      // Source-first ordering\\n      foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\\n    } else {\\n      // Tech-first ordering\\n      foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\\n    }\\n\\n    return foundSourceAndTech || false;\\n  }\\n  /**\\n   * Get or set the video source.\\n   *\\n   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\\n   *        A SourceObject, an array of SourceObjects, or a string referencing\\n   *        a URL to a media source. It is _highly recommended_ that an object\\n   *        or array of objects is used here, so that source selection\\n   *        algorithms can take the `type` into account.\\n   *\\n   *        If not provided, this method acts as a getter.\\n   *\\n   * @return {string|undefined}\\n   *         If the `source` argument is missing, returns the current source\\n   *         URL. Otherwise, returns nothing/undefined.\\n   */\\n  ;\\n\\n  _proto.src = function src(source) {\\n    var _this13 = this;\\n\\n    // getter usage\\n    if (typeof source === 'undefined') {\\n      return this.cache_.src || '';\\n    } // filter out invalid sources and turn our source into\\n    // an array of source objects\\n\\n\\n    var sources = filterSource(source); // if a source was passed in then it is invalid because\\n    // it was filtered to a zero length Array. So we have to\\n    // show an error\\n\\n    if (!sources.length) {\\n      this.setTimeout(function () {\\n        this.error({\\n          code: 4,\\n          message: this.localize(this.options_.notSupportedMessage)\\n        });\\n      }, 0);\\n      return;\\n    } // intial sources\\n\\n\\n    this.changingSrc_ = true;\\n    this.cache_.sources = sources;\\n    this.updateSourceCaches_(sources[0]); // middlewareSource is the source after it has been changed by middleware\\n\\n    setSource(this, sources[0], function (middlewareSource, mws) {\\n      _this13.middleware_ = mws; // since sourceSet is async we have to update the cache again after we select a source since\\n      // the source that is selected could be out of order from the cache update above this callback.\\n\\n      _this13.cache_.sources = sources;\\n\\n      _this13.updateSourceCaches_(middlewareSource);\\n\\n      var err = _this13.src_(middlewareSource);\\n\\n      if (err) {\\n        if (sources.length > 1) {\\n          return _this13.src(sources.slice(1));\\n        }\\n\\n        _this13.changingSrc_ = false; // We need to wrap this in a timeout to give folks a chance to add error event handlers\\n\\n        _this13.setTimeout(function () {\\n          this.error({\\n            code: 4,\\n            message: this.localize(this.options_.notSupportedMessage)\\n          });\\n        }, 0); // we could not find an appropriate tech, but let's still notify the delegate that this is it\\n        // this needs a better comment about why this is needed\\n\\n\\n        _this13.triggerReady();\\n\\n        return;\\n      }\\n\\n      setTech(mws, _this13.tech_);\\n    });\\n  }\\n  /**\\n   * Set the source object on the tech, returns a boolean that indicates whether\\n   * there is a tech that can play the source or not\\n   *\\n   * @param {Tech~SourceObject} source\\n   *        The source object to set on the Tech\\n   *\\n   * @return {boolean}\\n   *         - True if there is no Tech to playback this source\\n   *         - False otherwise\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.src_ = function src_(source) {\\n    var _this14 = this;\\n\\n    var sourceTech = this.selectSource([source]);\\n\\n    if (!sourceTech) {\\n      return true;\\n    }\\n\\n    if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\\n      this.changingSrc_ = true; // load this technology with the chosen source\\n\\n      this.loadTech_(sourceTech.tech, sourceTech.source);\\n      this.tech_.ready(function () {\\n        _this14.changingSrc_ = false;\\n      });\\n      return false;\\n    } // wait until the tech is ready to set the source\\n    // and set it synchronously if possible (#2326)\\n\\n\\n    this.ready(function () {\\n      // The setSource tech method was added with source handlers\\n      // so older techs won't support it\\n      // We need to check the direct prototype for the case where subclasses\\n      // of the tech do not support source handlers\\n      if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\\n        this.techCall_('setSource', source);\\n      } else {\\n        this.techCall_('src', source.src);\\n      }\\n\\n      this.changingSrc_ = false;\\n    }, true);\\n    return false;\\n  }\\n  /**\\n   * Begin loading the src data.\\n   */\\n  ;\\n\\n  _proto.load = function load() {\\n    this.techCall_('load');\\n  }\\n  /**\\n   * Reset the player. Loads the first tech in the techOrder,\\n   * removes all the text tracks in the existing `tech`,\\n   * and calls `reset` on the `tech`.\\n   */\\n  ;\\n\\n  _proto.reset = function reset() {\\n    var _this15 = this;\\n\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (this.paused() || !PromiseClass) {\\n      this.doReset_();\\n    } else {\\n      var playPromise = this.play();\\n      silencePromise(playPromise.then(function () {\\n        return _this15.doReset_();\\n      }));\\n    }\\n  };\\n\\n  _proto.doReset_ = function doReset_() {\\n    if (this.tech_) {\\n      this.tech_.clearTracks('text');\\n    }\\n\\n    this.resetCache_();\\n    this.poster('');\\n    this.loadTech_(this.options_.techOrder[0], null);\\n    this.techCall_('reset');\\n    this.resetControlBarUI_();\\n\\n    if (isEvented(this)) {\\n      this.trigger('playerreset');\\n    }\\n  }\\n  /**\\n   * Reset Control Bar's UI by calling sub-methods that reset\\n   * all of Control Bar's components\\n   */\\n  ;\\n\\n  _proto.resetControlBarUI_ = function resetControlBarUI_() {\\n    this.resetProgressBar_();\\n    this.resetPlaybackRate_();\\n    this.resetVolumeBar_();\\n  }\\n  /**\\n   * Reset tech's progress so progress bar is reset in the UI\\n   */\\n  ;\\n\\n  _proto.resetProgressBar_ = function resetProgressBar_() {\\n    this.currentTime(0);\\n    var _this$controlBar = this.controlBar,\\n        durationDisplay = _this$controlBar.durationDisplay,\\n        remainingTimeDisplay = _this$controlBar.remainingTimeDisplay;\\n\\n    if (durationDisplay) {\\n      durationDisplay.updateContent();\\n    }\\n\\n    if (remainingTimeDisplay) {\\n      remainingTimeDisplay.updateContent();\\n    }\\n  }\\n  /**\\n   * Reset Playback ratio\\n   */\\n  ;\\n\\n  _proto.resetPlaybackRate_ = function resetPlaybackRate_() {\\n    this.playbackRate(this.defaultPlaybackRate());\\n    this.handleTechRateChange_();\\n  }\\n  /**\\n   * Reset Volume bar\\n   */\\n  ;\\n\\n  _proto.resetVolumeBar_ = function resetVolumeBar_() {\\n    this.volume(1.0);\\n    this.trigger('volumechange');\\n  }\\n  /**\\n   * Returns all of the current source objects.\\n   *\\n   * @return {Tech~SourceObject[]}\\n   *         The current source objects\\n   */\\n  ;\\n\\n  _proto.currentSources = function currentSources() {\\n    var source = this.currentSource();\\n    var sources = []; // assume `{}` or `{ src }`\\n\\n    if (Object.keys(source).length !== 0) {\\n      sources.push(source);\\n    }\\n\\n    return this.cache_.sources || sources;\\n  }\\n  /**\\n   * Returns the current source object.\\n   *\\n   * @return {Tech~SourceObject}\\n   *         The current source object\\n   */\\n  ;\\n\\n  _proto.currentSource = function currentSource() {\\n    return this.cache_.source || {};\\n  }\\n  /**\\n   * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\\n   * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\\n   *\\n   * @return {string}\\n   *         The current source\\n   */\\n  ;\\n\\n  _proto.currentSrc = function currentSrc() {\\n    return this.currentSource() && this.currentSource().src || '';\\n  }\\n  /**\\n   * Get the current source type e.g. video/mp4\\n   * This can allow you rebuild the current source object so that you could load the same\\n   * source and tech later\\n   *\\n   * @return {string}\\n   *         The source MIME type\\n   */\\n  ;\\n\\n  _proto.currentType = function currentType() {\\n    return this.currentSource() && this.currentSource().type || '';\\n  }\\n  /**\\n   * Get or set the preload attribute\\n   *\\n   * @param {boolean} [value]\\n   *        - true means that we should preload\\n   *        - false means that we should not preload\\n   *\\n   * @return {string}\\n   *         The preload attribute value when getting\\n   */\\n  ;\\n\\n  _proto.preload = function preload(value) {\\n    if (value !== undefined) {\\n      this.techCall_('setPreload', value);\\n      this.options_.preload = value;\\n      return;\\n    }\\n\\n    return this.techGet_('preload');\\n  }\\n  /**\\n   * Get or set the autoplay option. When this is a boolean it will\\n   * modify the attribute on the tech. When this is a string the attribute on\\n   * the tech will be removed and `Player` will handle autoplay on loadstarts.\\n   *\\n   * @param {boolean|string} [value]\\n   *        - true: autoplay using the browser behavior\\n   *        - false: do not autoplay\\n   *        - 'play': call play() on every loadstart\\n   *        - 'muted': call muted() then play() on every loadstart\\n   *        - 'any': call play() on every loadstart. if that fails call muted() then play().\\n   *        - *: values other than those listed here will be set `autoplay` to true\\n   *\\n   * @return {boolean|string}\\n   *         The current value of autoplay when getting\\n   */\\n  ;\\n\\n  _proto.autoplay = function autoplay(value) {\\n    // getter usage\\n    if (value === undefined) {\\n      return this.options_.autoplay || false;\\n    }\\n\\n    var techAutoplay; // if the value is a valid string set it to that\\n\\n    if (typeof value === 'string' && /(any|play|muted)/.test(value)) {\\n      this.options_.autoplay = value;\\n      this.manualAutoplay_(value);\\n      techAutoplay = false; // any falsy value sets autoplay to false in the browser,\\n      // lets do the same\\n    } else if (!value) {\\n      this.options_.autoplay = false; // any other value (ie truthy) sets autoplay to true\\n    } else {\\n      this.options_.autoplay = true;\\n    }\\n\\n    techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay; // if we don't have a tech then we do not queue up\\n    // a setAutoplay call on tech ready. We do this because the\\n    // autoplay option will be passed in the constructor and we\\n    // do not need to set it twice\\n\\n    if (this.tech_) {\\n      this.techCall_('setAutoplay', techAutoplay);\\n    }\\n  }\\n  /**\\n   * Set or unset the playsinline attribute.\\n   * Playsinline tells the browser that non-fullscreen playback is preferred.\\n   *\\n   * @param {boolean} [value]\\n   *        - true means that we should try to play inline by default\\n   *        - false means that we should use the browser's default playback mode,\\n   *          which in most cases is inline. iOS Safari is a notable exception\\n   *          and plays fullscreen by default.\\n   *\\n   * @return {string|Player}\\n   *         - the current value of playsinline\\n   *         - the player when setting\\n   *\\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\\n   */\\n  ;\\n\\n  _proto.playsinline = function playsinline(value) {\\n    if (value !== undefined) {\\n      this.techCall_('setPlaysinline', value);\\n      this.options_.playsinline = value;\\n      return this;\\n    }\\n\\n    return this.techGet_('playsinline');\\n  }\\n  /**\\n   * Get or set the loop attribute on the video element.\\n   *\\n   * @param {boolean} [value]\\n   *        - true means that we should loop the video\\n   *        - false means that we should not loop the video\\n   *\\n   * @return {boolean}\\n   *         The current value of loop when getting\\n   */\\n  ;\\n\\n  _proto.loop = function loop(value) {\\n    if (value !== undefined) {\\n      this.techCall_('setLoop', value);\\n      this.options_.loop = value;\\n      return;\\n    }\\n\\n    return this.techGet_('loop');\\n  }\\n  /**\\n   * Get or set the poster image source url\\n   *\\n   * @fires Player#posterchange\\n   *\\n   * @param {string} [src]\\n   *        Poster image source URL\\n   *\\n   * @return {string}\\n   *         The current value of poster when getting\\n   */\\n  ;\\n\\n  _proto.poster = function poster(src) {\\n    if (src === undefined) {\\n      return this.poster_;\\n    } // The correct way to remove a poster is to set as an empty string\\n    // other falsey values will throw errors\\n\\n\\n    if (!src) {\\n      src = '';\\n    }\\n\\n    if (src === this.poster_) {\\n      return;\\n    } // update the internal poster variable\\n\\n\\n    this.poster_ = src; // update the tech's poster\\n\\n    this.techCall_('setPoster', src);\\n    this.isPosterFromTech_ = false; // alert components that the poster has been set\\n\\n    /**\\n     * This event fires when the poster image is changed on the player.\\n     *\\n     * @event Player#posterchange\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('posterchange');\\n  }\\n  /**\\n   * Some techs (e.g. YouTube) can provide a poster source in an\\n   * asynchronous way. We want the poster component to use this\\n   * poster source so that it covers up the tech's controls.\\n   * (YouTube's play button). However we only want to use this\\n   * source if the player user hasn't set a poster through\\n   * the normal APIs.\\n   *\\n   * @fires Player#posterchange\\n   * @listens Tech#posterchange\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPosterChange_ = function handleTechPosterChange_() {\\n    if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\\n      var newPoster = this.tech_.poster() || '';\\n\\n      if (newPoster !== this.poster_) {\\n        this.poster_ = newPoster;\\n        this.isPosterFromTech_ = true; // Let components know the poster has changed\\n\\n        this.trigger('posterchange');\\n      }\\n    }\\n  }\\n  /**\\n   * Get or set whether or not the controls are showing.\\n   *\\n   * @fires Player#controlsenabled\\n   *\\n   * @param {boolean} [bool]\\n   *        - true to turn controls on\\n   *        - false to turn controls off\\n   *\\n   * @return {boolean}\\n   *         The current value of controls when getting\\n   */\\n  ;\\n\\n  _proto.controls = function controls(bool) {\\n    if (bool === undefined) {\\n      return !!this.controls_;\\n    }\\n\\n    bool = !!bool; // Don't trigger a change event unless it actually changed\\n\\n    if (this.controls_ === bool) {\\n      return;\\n    }\\n\\n    this.controls_ = bool;\\n\\n    if (this.usingNativeControls()) {\\n      this.techCall_('setControls', bool);\\n    }\\n\\n    if (this.controls_) {\\n      this.removeClass('vjs-controls-disabled');\\n      this.addClass('vjs-controls-enabled');\\n      /**\\n       * @event Player#controlsenabled\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('controlsenabled');\\n\\n      if (!this.usingNativeControls()) {\\n        this.addTechControlsListeners_();\\n      }\\n    } else {\\n      this.removeClass('vjs-controls-enabled');\\n      this.addClass('vjs-controls-disabled');\\n      /**\\n       * @event Player#controlsdisabled\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('controlsdisabled');\\n\\n      if (!this.usingNativeControls()) {\\n        this.removeTechControlsListeners_();\\n      }\\n    }\\n  }\\n  /**\\n   * Toggle native controls on/off. Native controls are the controls built into\\n   * devices (e.g. default iPhone controls), Flash, or other techs\\n   * (e.g. Vimeo Controls)\\n   * **This should only be set by the current tech, because only the tech knows\\n   * if it can support native controls**\\n   *\\n   * @fires Player#usingnativecontrols\\n   * @fires Player#usingcustomcontrols\\n   *\\n   * @param {boolean} [bool]\\n   *        - true to turn native controls on\\n   *        - false to turn native controls off\\n   *\\n   * @return {boolean}\\n   *         The current value of native controls when getting\\n   */\\n  ;\\n\\n  _proto.usingNativeControls = function usingNativeControls(bool) {\\n    if (bool === undefined) {\\n      return !!this.usingNativeControls_;\\n    }\\n\\n    bool = !!bool; // Don't trigger a change event unless it actually changed\\n\\n    if (this.usingNativeControls_ === bool) {\\n      return;\\n    }\\n\\n    this.usingNativeControls_ = bool;\\n\\n    if (this.usingNativeControls_) {\\n      this.addClass('vjs-using-native-controls');\\n      /**\\n       * player is using the native device controls\\n       *\\n       * @event Player#usingnativecontrols\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('usingnativecontrols');\\n    } else {\\n      this.removeClass('vjs-using-native-controls');\\n      /**\\n       * player is using the custom HTML controls\\n       *\\n       * @event Player#usingcustomcontrols\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('usingcustomcontrols');\\n    }\\n  }\\n  /**\\n   * Set or get the current MediaError\\n   *\\n   * @fires Player#error\\n   *\\n   * @param  {MediaError|string|number} [err]\\n   *         A MediaError or a string/number to be turned\\n   *         into a MediaError\\n   *\\n   * @return {MediaError|null}\\n   *         The current MediaError when getting (or null)\\n   */\\n  ;\\n\\n  _proto.error = function error(err) {\\n    if (err === undefined) {\\n      return this.error_ || null;\\n    } // Suppress the first error message for no compatible source until\\n    // user interaction\\n\\n\\n    if (this.options_.suppressNotSupportedError && err && err.code === 4) {\\n      var triggerSuppressedError = function triggerSuppressedError() {\\n        this.error(err);\\n      };\\n\\n      this.options_.suppressNotSupportedError = false;\\n      this.any(['click', 'touchstart'], triggerSuppressedError);\\n      this.one('loadstart', function () {\\n        this.off(['click', 'touchstart'], triggerSuppressedError);\\n      });\\n      return;\\n    } // restoring to default\\n\\n\\n    if (err === null) {\\n      this.error_ = err;\\n      this.removeClass('vjs-error');\\n\\n      if (this.errorDisplay) {\\n        this.errorDisplay.close();\\n      }\\n\\n      return;\\n    }\\n\\n    this.error_ = new MediaError(err); // add the vjs-error classname to the player\\n\\n    this.addClass('vjs-error'); // log the name of the error type and any message\\n    // IE11 logs \\\"[object object]\\\" and required you to expand message to see error object\\n\\n    log.error(\\\"(CODE:\\\" + this.error_.code + \\\" \\\" + MediaError.errorTypes[this.error_.code] + \\\")\\\", this.error_.message, this.error_);\\n    /**\\n     * @event Player#error\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('error');\\n    return;\\n  }\\n  /**\\n   * Report user activity\\n   *\\n   * @param {Object} event\\n   *        Event object\\n   */\\n  ;\\n\\n  _proto.reportUserActivity = function reportUserActivity(event) {\\n    this.userActivity_ = true;\\n  }\\n  /**\\n   * Get/set if user is active\\n   *\\n   * @fires Player#useractive\\n   * @fires Player#userinactive\\n   *\\n   * @param {boolean} [bool]\\n   *        - true if the user is active\\n   *        - false if the user is inactive\\n   *\\n   * @return {boolean}\\n   *         The current value of userActive when getting\\n   */\\n  ;\\n\\n  _proto.userActive = function userActive(bool) {\\n    if (bool === undefined) {\\n      return this.userActive_;\\n    }\\n\\n    bool = !!bool;\\n\\n    if (bool === this.userActive_) {\\n      return;\\n    }\\n\\n    this.userActive_ = bool;\\n\\n    if (this.userActive_) {\\n      this.userActivity_ = true;\\n      this.removeClass('vjs-user-inactive');\\n      this.addClass('vjs-user-active');\\n      /**\\n       * @event Player#useractive\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('useractive');\\n      return;\\n    } // Chrome/Safari/IE have bugs where when you change the cursor it can\\n    // trigger a mousemove event. This causes an issue when you're hiding\\n    // the cursor when the user is inactive, and a mousemove signals user\\n    // activity. Making it impossible to go into inactive mode. Specifically\\n    // this happens in fullscreen when we really need to hide the cursor.\\n    //\\n    // When this gets resolved in ALL browsers it can be removed\\n    // https://code.google.com/p/chromium/issues/detail?id=103041\\n\\n\\n    if (this.tech_) {\\n      this.tech_.one('mousemove', function (e) {\\n        e.stopPropagation();\\n        e.preventDefault();\\n      });\\n    }\\n\\n    this.userActivity_ = false;\\n    this.removeClass('vjs-user-active');\\n    this.addClass('vjs-user-inactive');\\n    /**\\n     * @event Player#userinactive\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('userinactive');\\n  }\\n  /**\\n   * Listen for user activity based on timeout value\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.listenForUserActivity_ = function listenForUserActivity_() {\\n    var mouseInProgress;\\n    var lastMoveX;\\n    var lastMoveY;\\n    var handleActivity = bind(this, this.reportUserActivity);\\n\\n    var handleMouseMove = function handleMouseMove(e) {\\n      // #1068 - Prevent mousemove spamming\\n      // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\\n      if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\\n        lastMoveX = e.screenX;\\n        lastMoveY = e.screenY;\\n        handleActivity();\\n      }\\n    };\\n\\n    var handleMouseDown = function handleMouseDown() {\\n      handleActivity(); // For as long as the they are touching the device or have their mouse down,\\n      // we consider them active even if they're not moving their finger or mouse.\\n      // So we want to continue to update that they are active\\n\\n      this.clearInterval(mouseInProgress); // Setting userActivity=true now and setting the interval to the same time\\n      // as the activityCheck interval (250) should ensure we never miss the\\n      // next activityCheck\\n\\n      mouseInProgress = this.setInterval(handleActivity, 250);\\n    };\\n\\n    var handleMouseUpAndMouseLeave = function handleMouseUpAndMouseLeave(event) {\\n      handleActivity(); // Stop the interval that maintains activity if the mouse/touch is down\\n\\n      this.clearInterval(mouseInProgress);\\n    }; // Any mouse movement will be considered user activity\\n\\n\\n    this.on('mousedown', handleMouseDown);\\n    this.on('mousemove', handleMouseMove);\\n    this.on('mouseup', handleMouseUpAndMouseLeave);\\n    this.on('mouseleave', handleMouseUpAndMouseLeave);\\n    var controlBar = this.getChild('controlBar'); // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\\n    // controlBar would no longer be hidden by default timeout.\\n\\n    if (controlBar && !IS_IOS && !IS_ANDROID) {\\n      controlBar.on('mouseenter', function (event) {\\n        this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\\n        this.player().options_.inactivityTimeout = 0;\\n      });\\n      controlBar.on('mouseleave', function (event) {\\n        this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\\n      });\\n    } // Listen for keyboard navigation\\n    // Shouldn't need to use inProgress interval because of key repeat\\n\\n\\n    this.on('keydown', handleActivity);\\n    this.on('keyup', handleActivity); // Run an interval every 250 milliseconds instead of stuffing everything into\\n    // the mousemove/touchmove function itself, to prevent performance degradation.\\n    // `this.reportUserActivity` simply sets this.userActivity_ to true, which\\n    // then gets picked up by this loop\\n    // http://ejohn.org/blog/learning-from-twitter/\\n\\n    var inactivityTimeout;\\n    this.setInterval(function () {\\n      // Check to see if mouse/touch activity has happened\\n      if (!this.userActivity_) {\\n        return;\\n      } // Reset the activity tracker\\n\\n\\n      this.userActivity_ = false; // If the user state was inactive, set the state to active\\n\\n      this.userActive(true); // Clear any existing inactivity timeout to start the timer over\\n\\n      this.clearTimeout(inactivityTimeout);\\n      var timeout = this.options_.inactivityTimeout;\\n\\n      if (timeout <= 0) {\\n        return;\\n      } // In <timeout> milliseconds, if no more activity has occurred the\\n      // user will be considered inactive\\n\\n\\n      inactivityTimeout = this.setTimeout(function () {\\n        // Protect against the case where the inactivityTimeout can trigger just\\n        // before the next user activity is picked up by the activity check loop\\n        // causing a flicker\\n        if (!this.userActivity_) {\\n          this.userActive(false);\\n        }\\n      }, timeout);\\n    }, 250);\\n  }\\n  /**\\n   * Gets or sets the current playback rate. A playback rate of\\n   * 1.0 represents normal speed and 0.5 would indicate half-speed\\n   * playback, for instance.\\n   *\\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\\n   *\\n   * @param {number} [rate]\\n   *       New playback rate to set.\\n   *\\n   * @return {number}\\n   *         The current playback rate when getting or 1.0\\n   */\\n  ;\\n\\n  _proto.playbackRate = function playbackRate(rate) {\\n    if (rate !== undefined) {\\n      // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\\n      // that is registered above\\n      this.techCall_('setPlaybackRate', rate);\\n      return;\\n    }\\n\\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\\n      return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\\n    }\\n\\n    return 1.0;\\n  }\\n  /**\\n   * Gets or sets the current default playback rate. A default playback rate of\\n   * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\\n   * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\\n   * not the current playbackRate.\\n   *\\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\\n   *\\n   * @param {number} [rate]\\n   *       New default playback rate to set.\\n   *\\n   * @return {number|Player}\\n   *         - The default playback rate when getting or 1.0\\n   *         - the player when setting\\n   */\\n  ;\\n\\n  _proto.defaultPlaybackRate = function defaultPlaybackRate(rate) {\\n    if (rate !== undefined) {\\n      return this.techCall_('setDefaultPlaybackRate', rate);\\n    }\\n\\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\\n      return this.techGet_('defaultPlaybackRate');\\n    }\\n\\n    return 1.0;\\n  }\\n  /**\\n   * Gets or sets the audio flag\\n   *\\n   * @param {boolean} bool\\n   *        - true signals that this is an audio player\\n   *        - false signals that this is not an audio player\\n   *\\n   * @return {boolean}\\n   *         The current value of isAudio when getting\\n   */\\n  ;\\n\\n  _proto.isAudio = function isAudio(bool) {\\n    if (bool !== undefined) {\\n      this.isAudio_ = !!bool;\\n      return;\\n    }\\n\\n    return !!this.isAudio_;\\n  }\\n  /**\\n   * A helper method for adding a {@link TextTrack} to our\\n   * {@link TextTrackList}.\\n   *\\n   * In addition to the W3C settings we allow adding additional info through options.\\n   *\\n   * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\\n   *\\n   * @param {string} [kind]\\n   *        the kind of TextTrack you are adding\\n   *\\n   * @param {string} [label]\\n   *        the label to give the TextTrack label\\n   *\\n   * @param {string} [language]\\n   *        the language to set on the TextTrack\\n   *\\n   * @return {TextTrack|undefined}\\n   *         the TextTrack that was added or undefined\\n   *         if there is no tech\\n   */\\n  ;\\n\\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\\n    if (this.tech_) {\\n      return this.tech_.addTextTrack(kind, label, language);\\n    }\\n  }\\n  /**\\n   * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.\\n   * When manualCleanup is set to false, the track will be automatically removed\\n   * on source changes.\\n   *\\n   * @param {Object} options\\n   *        Options to pass to {@link HTMLTrackElement} during creation. See\\n   *        {@link HTMLTrackElement} for object properties that you should use.\\n   *\\n   * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\\n   *                                       removed on a source change\\n   *\\n   * @return {HtmlTrackElement}\\n   *         the HTMLTrackElement that was created and added\\n   *         to the HtmlTrackElementList and the remote\\n   *         TextTrackList\\n   *\\n   * @deprecated The default value of the \\\"manualCleanup\\\" parameter will default\\n   *             to \\\"false\\\" in upcoming versions of Video.js\\n   */\\n  ;\\n\\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\\n    if (this.tech_) {\\n      return this.tech_.addRemoteTextTrack(options, manualCleanup);\\n    }\\n  }\\n  /**\\n   * Remove a remote {@link TextTrack} from the respective\\n   * {@link TextTrackList} and {@link HtmlTrackElementList}.\\n   *\\n   * @param {Object} track\\n   *        Remote {@link TextTrack} to remove\\n   *\\n   * @return {undefined}\\n   *         does not return anything\\n   */\\n  ;\\n\\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(obj) {\\n    if (obj === void 0) {\\n      obj = {};\\n    }\\n\\n    var _obj = obj,\\n        track = _obj.track;\\n\\n    if (!track) {\\n      track = obj;\\n    } // destructure the input into an object with a track argument, defaulting to arguments[0]\\n    // default the whole argument to an empty object if nothing was passed in\\n\\n\\n    if (this.tech_) {\\n      return this.tech_.removeRemoteTextTrack(track);\\n    }\\n  }\\n  /**\\n   * Gets available media playback quality metrics as specified by the W3C's Media\\n   * Playback Quality API.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\\n   *\\n   * @return {Object|undefined}\\n   *         An object with supported media playback quality metrics or undefined if there\\n   *         is no tech or the tech does not support it.\\n   */\\n  ;\\n\\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\\n    return this.techGet_('getVideoPlaybackQuality');\\n  }\\n  /**\\n   * Get video width\\n   *\\n   * @return {number}\\n   *         current video width\\n   */\\n  ;\\n\\n  _proto.videoWidth = function videoWidth() {\\n    return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\\n  }\\n  /**\\n   * Get video height\\n   *\\n   * @return {number}\\n   *         current video height\\n   */\\n  ;\\n\\n  _proto.videoHeight = function videoHeight() {\\n    return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\\n  }\\n  /**\\n   * The player's language code\\n   * NOTE: The language should be set in the player options if you want the\\n   * the controls to be built with a specific language. Changing the language\\n   * later will not update controls text.\\n   *\\n   * @param {string} [code]\\n   *        the language code to set the player to\\n   *\\n   * @return {string}\\n   *         The current language code when getting\\n   */\\n  ;\\n\\n  _proto.language = function language(code) {\\n    if (code === undefined) {\\n      return this.language_;\\n    }\\n\\n    this.language_ = String(code).toLowerCase();\\n  }\\n  /**\\n   * Get the player's language dictionary\\n   * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\\n   * Languages specified directly in the player options have precedence\\n   *\\n   * @return {Array}\\n   *         An array of of supported languages\\n   */\\n  ;\\n\\n  _proto.languages = function languages() {\\n    return mergeOptions(Player.prototype.options_.languages, this.languages_);\\n  }\\n  /**\\n   * returns a JavaScript object reperesenting the current track\\n   * information. **DOES not return it as JSON**\\n   *\\n   * @return {Object}\\n   *         Object representing the current of track info\\n   */\\n  ;\\n\\n  _proto.toJSON = function toJSON() {\\n    var options = mergeOptions(this.options_);\\n    var tracks = options.tracks;\\n    options.tracks = [];\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i]; // deep merge tracks and null out player so no circular references\\n\\n      track = mergeOptions(track);\\n      track.player = undefined;\\n      options.tracks[i] = track;\\n    }\\n\\n    return options;\\n  }\\n  /**\\n   * Creates a simple modal dialog (an instance of the {@link ModalDialog}\\n   * component) that immediately overlays the player with arbitrary\\n   * content and removes itself when closed.\\n   *\\n   * @param {string|Function|Element|Array|null} content\\n   *        Same as {@link ModalDialog#content}'s param of the same name.\\n   *        The most straight-forward usage is to provide a string or DOM\\n   *        element.\\n   *\\n   * @param {Object} [options]\\n   *        Extra options which will be passed on to the {@link ModalDialog}.\\n   *\\n   * @return {ModalDialog}\\n   *         the {@link ModalDialog} that was created\\n   */\\n  ;\\n\\n  _proto.createModal = function createModal(content, options) {\\n    var _this16 = this;\\n\\n    options = options || {};\\n    options.content = content || '';\\n    var modal = new ModalDialog(this, options);\\n    this.addChild(modal);\\n    modal.on('dispose', function () {\\n      _this16.removeChild(modal);\\n    });\\n    modal.open();\\n    return modal;\\n  }\\n  /**\\n   * Change breakpoint classes when the player resizes.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateCurrentBreakpoint_ = function updateCurrentBreakpoint_() {\\n    if (!this.responsive()) {\\n      return;\\n    }\\n\\n    var currentBreakpoint = this.currentBreakpoint();\\n    var currentWidth = this.currentWidth();\\n\\n    for (var i = 0; i < BREAKPOINT_ORDER.length; i++) {\\n      var candidateBreakpoint = BREAKPOINT_ORDER[i];\\n      var maxWidth = this.breakpoints_[candidateBreakpoint];\\n\\n      if (currentWidth <= maxWidth) {\\n        // The current breakpoint did not change, nothing to do.\\n        if (currentBreakpoint === candidateBreakpoint) {\\n          return;\\n        } // Only remove a class if there is a current breakpoint.\\n\\n\\n        if (currentBreakpoint) {\\n          this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\\n        }\\n\\n        this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\\n        this.breakpoint_ = candidateBreakpoint;\\n        break;\\n      }\\n    }\\n  }\\n  /**\\n   * Removes the current breakpoint.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.removeCurrentBreakpoint_ = function removeCurrentBreakpoint_() {\\n    var className = this.currentBreakpointClass();\\n    this.breakpoint_ = '';\\n\\n    if (className) {\\n      this.removeClass(className);\\n    }\\n  }\\n  /**\\n   * Get or set breakpoints on the player.\\n   *\\n   * Calling this method with an object or `true` will remove any previous\\n   * custom breakpoints and start from the defaults again.\\n   *\\n   * @param  {Object|boolean} [breakpoints]\\n   *         If an object is given, it can be used to provide custom\\n   *         breakpoints. If `true` is given, will set default breakpoints.\\n   *         If this argument is not given, will simply return the current\\n   *         breakpoints.\\n   *\\n   * @param  {number} [breakpoints.tiny]\\n   *         The maximum width for the \\\"vjs-layout-tiny\\\" class.\\n   *\\n   * @param  {number} [breakpoints.xsmall]\\n   *         The maximum width for the \\\"vjs-layout-x-small\\\" class.\\n   *\\n   * @param  {number} [breakpoints.small]\\n   *         The maximum width for the \\\"vjs-layout-small\\\" class.\\n   *\\n   * @param  {number} [breakpoints.medium]\\n   *         The maximum width for the \\\"vjs-layout-medium\\\" class.\\n   *\\n   * @param  {number} [breakpoints.large]\\n   *         The maximum width for the \\\"vjs-layout-large\\\" class.\\n   *\\n   * @param  {number} [breakpoints.xlarge]\\n   *         The maximum width for the \\\"vjs-layout-x-large\\\" class.\\n   *\\n   * @param  {number} [breakpoints.huge]\\n   *         The maximum width for the \\\"vjs-layout-huge\\\" class.\\n   *\\n   * @return {Object}\\n   *         An object mapping breakpoint names to maximum width values.\\n   */\\n  ;\\n\\n  _proto.breakpoints = function breakpoints(_breakpoints) {\\n    // Used as a getter.\\n    if (_breakpoints === undefined) {\\n      return assign(this.breakpoints_);\\n    }\\n\\n    this.breakpoint_ = '';\\n    this.breakpoints_ = assign({}, DEFAULT_BREAKPOINTS, _breakpoints); // When breakpoint definitions change, we need to update the currently\\n    // selected breakpoint.\\n\\n    this.updateCurrentBreakpoint_(); // Clone the breakpoints before returning.\\n\\n    return assign(this.breakpoints_);\\n  }\\n  /**\\n   * Get or set a flag indicating whether or not this player should adjust\\n   * its UI based on its dimensions.\\n   *\\n   * @param  {boolean} value\\n   *         Should be `true` if the player should adjust its UI based on its\\n   *         dimensions; otherwise, should be `false`.\\n   *\\n   * @return {boolean}\\n   *         Will be `true` if this player should adjust its UI based on its\\n   *         dimensions; otherwise, will be `false`.\\n   */\\n  ;\\n\\n  _proto.responsive = function responsive(value) {\\n    // Used as a getter.\\n    if (value === undefined) {\\n      return this.responsive_;\\n    }\\n\\n    value = Boolean(value);\\n    var current = this.responsive_; // Nothing changed.\\n\\n    if (value === current) {\\n      return;\\n    } // The value actually changed, set it.\\n\\n\\n    this.responsive_ = value; // Start listening for breakpoints and set the initial breakpoint if the\\n    // player is now responsive.\\n\\n    if (value) {\\n      this.on('playerresize', this.updateCurrentBreakpoint_);\\n      this.updateCurrentBreakpoint_(); // Stop listening for breakpoints if the player is no longer responsive.\\n    } else {\\n      this.off('playerresize', this.updateCurrentBreakpoint_);\\n      this.removeCurrentBreakpoint_();\\n    }\\n\\n    return value;\\n  }\\n  /**\\n   * Get current breakpoint name, if any.\\n   *\\n   * @return {string}\\n   *         If there is currently a breakpoint set, returns a the key from the\\n   *         breakpoints object matching it. Otherwise, returns an empty string.\\n   */\\n  ;\\n\\n  _proto.currentBreakpoint = function currentBreakpoint() {\\n    return this.breakpoint_;\\n  }\\n  /**\\n   * Get the current breakpoint class name.\\n   *\\n   * @return {string}\\n   *         The matching class name (e.g. `\\\"vjs-layout-tiny\\\"` or\\n   *         `\\\"vjs-layout-large\\\"`) for the current breakpoint. Empty string if\\n   *         there is no current breakpoint.\\n   */\\n  ;\\n\\n  _proto.currentBreakpointClass = function currentBreakpointClass() {\\n    return BREAKPOINT_CLASSES[this.breakpoint_] || '';\\n  }\\n  /**\\n   * An object that describes a single piece of media.\\n   *\\n   * Properties that are not part of this type description will be retained; so,\\n   * this can be viewed as a generic metadata storage mechanism as well.\\n   *\\n   * @see      {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\\n   * @typedef  {Object} Player~MediaObject\\n   *\\n   * @property {string} [album]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API.\\n   *\\n   * @property {string} [artist]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API.\\n   *\\n   * @property {Object[]} [artwork]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API. If not specified, will be populated via the `poster`, if\\n   *           available.\\n   *\\n   * @property {string} [poster]\\n   *           URL to an image that will display before playback.\\n   *\\n   * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\\n   *           A single source object, an array of source objects, or a string\\n   *           referencing a URL to a media source. It is _highly recommended_\\n   *           that an object or array of objects is used here, so that source\\n   *           selection algorithms can take the `type` into account.\\n   *\\n   * @property {string} [title]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API.\\n   *\\n   * @property {Object[]} [textTracks]\\n   *           An array of objects to be used to create text tracks, following\\n   *           the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\\n   *           For ease of removal, these will be created as \\\"remote\\\" text\\n   *           tracks and set to automatically clean up on source changes.\\n   *\\n   *           These objects may have properties like `src`, `kind`, `label`,\\n   *           and `language`, see {@link Tech#createRemoteTextTrack}.\\n   */\\n\\n  /**\\n   * Populate the player using a {@link Player~MediaObject|MediaObject}.\\n   *\\n   * @param  {Player~MediaObject} media\\n   *         A media object.\\n   *\\n   * @param  {Function} ready\\n   *         A callback to be called when the player is ready.\\n   */\\n  ;\\n\\n  _proto.loadMedia = function loadMedia(media, ready) {\\n    var _this17 = this;\\n\\n    if (!media || typeof media !== 'object') {\\n      return;\\n    }\\n\\n    this.reset(); // Clone the media object so it cannot be mutated from outside.\\n\\n    this.cache_.media = mergeOptions(media);\\n    var _this$cache_$media = this.cache_.media,\\n        artwork = _this$cache_$media.artwork,\\n        poster = _this$cache_$media.poster,\\n        src = _this$cache_$media.src,\\n        textTracks = _this$cache_$media.textTracks; // If `artwork` is not given, create it using `poster`.\\n\\n    if (!artwork && poster) {\\n      this.cache_.media.artwork = [{\\n        src: poster,\\n        type: getMimetype(poster)\\n      }];\\n    }\\n\\n    if (src) {\\n      this.src(src);\\n    }\\n\\n    if (poster) {\\n      this.poster(poster);\\n    }\\n\\n    if (Array.isArray(textTracks)) {\\n      textTracks.forEach(function (tt) {\\n        return _this17.addRemoteTextTrack(tt, false);\\n      });\\n    }\\n\\n    this.ready(ready);\\n  }\\n  /**\\n   * Get a clone of the current {@link Player~MediaObject} for this player.\\n   *\\n   * If the `loadMedia` method has not been used, will attempt to return a\\n   * {@link Player~MediaObject} based on the current state of the player.\\n   *\\n   * @return {Player~MediaObject}\\n   */\\n  ;\\n\\n  _proto.getMedia = function getMedia() {\\n    if (!this.cache_.media) {\\n      var poster = this.poster();\\n      var src = this.currentSources();\\n      var textTracks = Array.prototype.map.call(this.remoteTextTracks(), function (tt) {\\n        return {\\n          kind: tt.kind,\\n          label: tt.label,\\n          language: tt.language,\\n          src: tt.src\\n        };\\n      });\\n      var media = {\\n        src: src,\\n        textTracks: textTracks\\n      };\\n\\n      if (poster) {\\n        media.poster = poster;\\n        media.artwork = [{\\n          src: media.poster,\\n          type: getMimetype(media.poster)\\n        }];\\n      }\\n\\n      return media;\\n    }\\n\\n    return mergeOptions(this.cache_.media);\\n  }\\n  /**\\n   * Gets tag settings\\n   *\\n   * @param {Element} tag\\n   *        The player tag\\n   *\\n   * @return {Object}\\n   *         An object containing all of the settings\\n   *         for a player tag\\n   */\\n  ;\\n\\n  Player.getTagSettings = function getTagSettings(tag) {\\n    var baseOptions = {\\n      sources: [],\\n      tracks: []\\n    };\\n    var tagOptions = getAttributes(tag);\\n    var dataSetup = tagOptions['data-setup'];\\n\\n    if (hasClass(tag, 'vjs-fill')) {\\n      tagOptions.fill = true;\\n    }\\n\\n    if (hasClass(tag, 'vjs-fluid')) {\\n      tagOptions.fluid = true;\\n    } // Check if data-setup attr exists.\\n\\n\\n    if (dataSetup !== null) {\\n      // Parse options JSON\\n      // If empty string, make it a parsable json object.\\n      var _safeParseTuple = safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7___default()(dataSetup || '{}'),\\n          err = _safeParseTuple[0],\\n          data = _safeParseTuple[1];\\n\\n      if (err) {\\n        log.error(err);\\n      }\\n\\n      assign(tagOptions, data);\\n    }\\n\\n    assign(baseOptions, tagOptions); // Get tag children settings\\n\\n    if (tag.hasChildNodes()) {\\n      var children = tag.childNodes;\\n\\n      for (var i = 0, j = children.length; i < j; i++) {\\n        var child = children[i]; // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\\n\\n        var childName = child.nodeName.toLowerCase();\\n\\n        if (childName === 'source') {\\n          baseOptions.sources.push(getAttributes(child));\\n        } else if (childName === 'track') {\\n          baseOptions.tracks.push(getAttributes(child));\\n        }\\n      }\\n    }\\n\\n    return baseOptions;\\n  }\\n  /**\\n   * Determine whether or not flexbox is supported\\n   *\\n   * @return {boolean}\\n   *         - true if flexbox is supported\\n   *         - false if flexbox is not supported\\n   */\\n  ;\\n\\n  _proto.flexNotSupported_ = function flexNotSupported_() {\\n    var elem = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('i'); // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more\\n    // common flex features that we can rely on when checking for flex support.\\n\\n    return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || // IE10-specific (2012 flex spec), available for completeness\\n    'msFlexOrder' in elem.style);\\n  };\\n\\n  return Player;\\n}(Component);\\n/**\\n * Get the {@link VideoTrackList}\\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\\n *\\n * @return {VideoTrackList}\\n *         the current video track list\\n *\\n * @method Player.prototype.videoTracks\\n */\\n\\n/**\\n * Get the {@link AudioTrackList}\\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\\n *\\n * @return {AudioTrackList}\\n *         the current audio track list\\n *\\n * @method Player.prototype.audioTracks\\n */\\n\\n/**\\n * Get the {@link TextTrackList}\\n *\\n * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\\n *\\n * @return {TextTrackList}\\n *         the current text track list\\n *\\n * @method Player.prototype.textTracks\\n */\\n\\n/**\\n * Get the remote {@link TextTrackList}\\n *\\n * @return {TextTrackList}\\n *         The current remote text track list\\n *\\n * @method Player.prototype.remoteTextTracks\\n */\\n\\n/**\\n * Get the remote {@link HtmlTrackElementList} tracks.\\n *\\n * @return {HtmlTrackElementList}\\n *         The current remote text track element list\\n *\\n * @method Player.prototype.remoteTextTrackEls\\n */\\n\\n\\nALL.names.forEach(function (name) {\\n  var props = ALL[name];\\n\\n  Player.prototype[props.getterName] = function () {\\n    if (this.tech_) {\\n      return this.tech_[props.getterName]();\\n    } // if we have not yet loadTech_, we create {video,audio,text}Tracks_\\n    // these will be passed to the tech during loading\\n\\n\\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\\n    return this[props.privateName];\\n  };\\n});\\n/**\\n * Get or set the `Player`'s crossorigin option. For the HTML5 player, this\\n * sets the `crossOrigin` property on the `<video>` tag to control the CORS\\n * behavior.\\n *\\n * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\\n *\\n * @param {string} [value]\\n *        The value to set the `Player`'s crossorigin to. If an argument is\\n *        given, must be one of `anonymous` or `use-credentials`.\\n *\\n * @return {string|undefined}\\n *         - The current crossorigin value of the `Player` when getting.\\n *         - undefined when setting\\n */\\n\\nPlayer.prototype.crossorigin = Player.prototype.crossOrigin;\\n/**\\n * Global enumeration of players.\\n *\\n * The keys are the player IDs and the values are either the {@link Player}\\n * instance or `null` for disposed players.\\n *\\n * @type {Object}\\n */\\n\\nPlayer.players = {};\\nvar navigator = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator;\\n/*\\n * Player instance options, surfaced using options\\n * options = Player.prototype.options_\\n * Make changes in options, not here.\\n *\\n * @type {Object}\\n * @private\\n */\\n\\nPlayer.prototype.options_ = {\\n  // Default order of fallback technology\\n  techOrder: Tech.defaultTechOrder_,\\n  html5: {},\\n  flash: {},\\n  // default inactivity timeout\\n  inactivityTimeout: 2000,\\n  // default playback rates\\n  playbackRates: [],\\n  // Add playback rate selection by adding rates\\n  // 'playbackRates': [0.5, 1, 1.5, 2],\\n  liveui: false,\\n  // Included control sets\\n  children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\\n  language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\\n  // locales and their language translations\\n  languages: {},\\n  // Default message to show when a video cannot be played.\\n  notSupportedMessage: 'No compatible source was found for this media.',\\n  fullscreen: {\\n    options: {\\n      navigationUI: 'hide'\\n    }\\n  },\\n  breakpoints: {},\\n  responsive: false\\n};\\n[\\n/**\\n * Returns whether or not the player is in the \\\"ended\\\" state.\\n *\\n * @return {Boolean} True if the player is in the ended state, false if not.\\n * @method Player#ended\\n */\\n'ended',\\n/**\\n * Returns whether or not the player is in the \\\"seeking\\\" state.\\n *\\n * @return {Boolean} True if the player is in the seeking state, false if not.\\n * @method Player#seeking\\n */\\n'seeking',\\n/**\\n * Returns the TimeRanges of the media that are currently available\\n * for seeking to.\\n *\\n * @return {TimeRanges} the seekable intervals of the media timeline\\n * @method Player#seekable\\n */\\n'seekable',\\n/**\\n * Returns the current state of network activity for the element, from\\n * the codes in the list below.\\n * - NETWORK_EMPTY (numeric value 0)\\n *   The element has not yet been initialised. All attributes are in\\n *   their initial states.\\n * - NETWORK_IDLE (numeric value 1)\\n *   The element's resource selection algorithm is active and has\\n *   selected a resource, but it is not actually using the network at\\n *   this time.\\n * - NETWORK_LOADING (numeric value 2)\\n *   The user agent is actively trying to download data.\\n * - NETWORK_NO_SOURCE (numeric value 3)\\n *   The element's resource selection algorithm is active, but it has\\n *   not yet found a resource to use.\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\\n * @return {number} the current network activity state\\n * @method Player#networkState\\n */\\n'networkState',\\n/**\\n * Returns a value that expresses the current state of the element\\n * with respect to rendering the current playback position, from the\\n * codes in the list below.\\n * - HAVE_NOTHING (numeric value 0)\\n *   No information regarding the media resource is available.\\n * - HAVE_METADATA (numeric value 1)\\n *   Enough of the resource has been obtained that the duration of the\\n *   resource is available.\\n * - HAVE_CURRENT_DATA (numeric value 2)\\n *   Data for the immediate current playback position is available.\\n * - HAVE_FUTURE_DATA (numeric value 3)\\n *   Data for the immediate current playback position is available, as\\n *   well as enough data for the user agent to advance the current\\n *   playback position in the direction of playback.\\n * - HAVE_ENOUGH_DATA (numeric value 4)\\n *   The user agent estimates that enough data is available for\\n *   playback to proceed uninterrupted.\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\\n * @return {number} the current playback rendering state\\n * @method Player#readyState\\n */\\n'readyState'].forEach(function (fn) {\\n  Player.prototype[fn] = function () {\\n    return this.techGet_(fn);\\n  };\\n});\\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\\n  Player.prototype[\\\"handleTech\\\" + toTitleCase(event) + \\\"_\\\"] = function () {\\n    return this.trigger(event);\\n  };\\n});\\n/**\\n * Fired when the player has initial duration and dimension information\\n *\\n * @event Player#loadedmetadata\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Fired when the player has downloaded data at the current playback position\\n *\\n * @event Player#loadeddata\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Fired when the current playback position has changed *\\n * During playback this is fired every 15-250 milliseconds, depending on the\\n * playback technology in use.\\n *\\n * @event Player#timeupdate\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Fired when the volume changes\\n *\\n * @event Player#volumechange\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Reports whether or not a player has a plugin available.\\n *\\n * This does not report whether or not the plugin has ever been initialized\\n * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\\n *\\n * @method Player#hasPlugin\\n * @param  {string}  name\\n *         The name of a plugin.\\n *\\n * @return {boolean}\\n *         Whether or not this player has the requested plugin available.\\n */\\n\\n/**\\n * Reports whether or not a player is using a plugin by name.\\n *\\n * For basic plugins, this only reports whether the plugin has _ever_ been\\n * initialized on this player.\\n *\\n * @method Player#usingPlugin\\n * @param  {string} name\\n *         The name of a plugin.\\n *\\n * @return {boolean}\\n *         Whether or not this player is using the requested plugin.\\n */\\n\\nComponent.registerComponent('Player', Player);\\n\\n/**\\n * The base plugin name.\\n *\\n * @private\\n * @constant\\n * @type {string}\\n */\\n\\nvar BASE_PLUGIN_NAME = 'plugin';\\n/**\\n * The key on which a player's active plugins cache is stored.\\n *\\n * @private\\n * @constant\\n * @type     {string}\\n */\\n\\nvar PLUGIN_CACHE_KEY = 'activePlugins_';\\n/**\\n * Stores registered plugins in a private space.\\n *\\n * @private\\n * @type    {Object}\\n */\\n\\nvar pluginStorage = {};\\n/**\\n * Reports whether or not a plugin has been registered.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of a plugin.\\n *\\n * @return {boolean}\\n *          Whether or not the plugin has been registered.\\n */\\n\\nvar pluginExists = function pluginExists(name) {\\n  return pluginStorage.hasOwnProperty(name);\\n};\\n/**\\n * Get a single registered plugin by name.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of a plugin.\\n *\\n * @return {Function|undefined}\\n *          The plugin (or undefined).\\n */\\n\\n\\nvar getPlugin = function getPlugin(name) {\\n  return pluginExists(name) ? pluginStorage[name] : undefined;\\n};\\n/**\\n * Marks a plugin as \\\"active\\\" on a player.\\n *\\n * Also, ensures that the player has an object for tracking active plugins.\\n *\\n * @private\\n * @param   {Player} player\\n *          A Video.js player instance.\\n *\\n * @param   {string} name\\n *          The name of a plugin.\\n */\\n\\n\\nvar markPluginAsActive = function markPluginAsActive(player, name) {\\n  player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\\n  player[PLUGIN_CACHE_KEY][name] = true;\\n};\\n/**\\n * Triggers a pair of plugin setup events.\\n *\\n * @private\\n * @param  {Player} player\\n *         A Video.js player instance.\\n *\\n * @param  {Plugin~PluginEventHash} hash\\n *         A plugin event hash.\\n *\\n * @param  {boolean} [before]\\n *         If true, prefixes the event name with \\\"before\\\". In other words,\\n *         use this to trigger \\\"beforepluginsetup\\\" instead of \\\"pluginsetup\\\".\\n */\\n\\n\\nvar triggerSetupEvent = function triggerSetupEvent(player, hash, before) {\\n  var eventName = (before ? 'before' : '') + 'pluginsetup';\\n  player.trigger(eventName, hash);\\n  player.trigger(eventName + ':' + hash.name, hash);\\n};\\n/**\\n * Takes a basic plugin function and returns a wrapper function which marks\\n * on the player that the plugin has been activated.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of the plugin.\\n *\\n * @param   {Function} plugin\\n *          The basic plugin.\\n *\\n * @return {Function}\\n *          A wrapper function for the given plugin.\\n */\\n\\n\\nvar createBasicPlugin = function createBasicPlugin(name, plugin) {\\n  var basicPluginWrapper = function basicPluginWrapper() {\\n    // We trigger the \\\"beforepluginsetup\\\" and \\\"pluginsetup\\\" events on the player\\n    // regardless, but we want the hash to be consistent with the hash provided\\n    // for advanced plugins.\\n    //\\n    // The only potentially counter-intuitive thing here is the `instance` in\\n    // the \\\"pluginsetup\\\" event is the value returned by the `plugin` function.\\n    triggerSetupEvent(this, {\\n      name: name,\\n      plugin: plugin,\\n      instance: null\\n    }, true);\\n    var instance = plugin.apply(this, arguments);\\n    markPluginAsActive(this, name);\\n    triggerSetupEvent(this, {\\n      name: name,\\n      plugin: plugin,\\n      instance: instance\\n    });\\n    return instance;\\n  };\\n\\n  Object.keys(plugin).forEach(function (prop) {\\n    basicPluginWrapper[prop] = plugin[prop];\\n  });\\n  return basicPluginWrapper;\\n};\\n/**\\n * Takes a plugin sub-class and returns a factory function for generating\\n * instances of it.\\n *\\n * This factory function will replace itself with an instance of the requested\\n * sub-class of Plugin.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of the plugin.\\n *\\n * @param   {Plugin} PluginSubClass\\n *          The advanced plugin.\\n *\\n * @return {Function}\\n */\\n\\n\\nvar createPluginFactory = function createPluginFactory(name, PluginSubClass) {\\n  // Add a `name` property to the plugin prototype so that each plugin can\\n  // refer to itself by name.\\n  PluginSubClass.prototype.name = name;\\n  return function () {\\n    triggerSetupEvent(this, {\\n      name: name,\\n      plugin: PluginSubClass,\\n      instance: null\\n    }, true);\\n\\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n      args[_key] = arguments[_key];\\n    }\\n\\n    var instance = _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11___default()(PluginSubClass, [this].concat(args)); // The plugin is replaced by a function that returns the current instance.\\n\\n\\n    this[name] = function () {\\n      return instance;\\n    };\\n\\n    triggerSetupEvent(this, instance.getEventHash());\\n    return instance;\\n  };\\n};\\n/**\\n * Parent class for all advanced plugins.\\n *\\n * @mixes   module:evented~EventedMixin\\n * @mixes   module:stateful~StatefulMixin\\n * @fires   Player#beforepluginsetup\\n * @fires   Player#beforepluginsetup:$name\\n * @fires   Player#pluginsetup\\n * @fires   Player#pluginsetup:$name\\n * @listens Player#dispose\\n * @throws  {Error}\\n *          If attempting to instantiate the base {@link Plugin} class\\n *          directly instead of via a sub-class.\\n */\\n\\n\\nvar Plugin = /*#__PURE__*/function () {\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * Sub-classes should call `super` to ensure plugins are properly initialized.\\n   *\\n   * @param {Player} player\\n   *        A Video.js player instance.\\n   */\\n  function Plugin(player) {\\n    if (this.constructor === Plugin) {\\n      throw new Error('Plugin must be sub-classed; not directly instantiated.');\\n    }\\n\\n    this.player = player; // Make this object evented, but remove the added `trigger` method so we\\n    // use the prototype version instead.\\n\\n    evented(this);\\n    delete this.trigger;\\n    stateful(this, this.constructor.defaultState);\\n    markPluginAsActive(player, this.name); // Auto-bind the dispose method so we can use it as a listener and unbind\\n    // it later easily.\\n\\n    this.dispose = bind(this, this.dispose); // If the player is disposed, dispose the plugin.\\n\\n    player.on('dispose', this.dispose);\\n  }\\n  /**\\n   * Get the version of the plugin that was set on <pluginName>.VERSION\\n   */\\n\\n\\n  var _proto = Plugin.prototype;\\n\\n  _proto.version = function version() {\\n    return this.constructor.VERSION;\\n  }\\n  /**\\n   * Each event triggered by plugins includes a hash of additional data with\\n   * conventional properties.\\n   *\\n   * This returns that object or mutates an existing hash.\\n   *\\n   * @param   {Object} [hash={}]\\n   *          An object to be used as event an event hash.\\n   *\\n   * @return {Plugin~PluginEventHash}\\n   *          An event hash object with provided properties mixed-in.\\n   */\\n  ;\\n\\n  _proto.getEventHash = function getEventHash(hash) {\\n    if (hash === void 0) {\\n      hash = {};\\n    }\\n\\n    hash.name = this.name;\\n    hash.plugin = this.constructor;\\n    hash.instance = this;\\n    return hash;\\n  }\\n  /**\\n   * Triggers an event on the plugin object and overrides\\n   * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\\n   *\\n   * @param   {string|Object} event\\n   *          An event type or an object with a type property.\\n   *\\n   * @param   {Object} [hash={}]\\n   *          Additional data hash to merge with a\\n   *          {@link Plugin~PluginEventHash|PluginEventHash}.\\n   *\\n   * @return {boolean}\\n   *          Whether or not default was prevented.\\n   */\\n  ;\\n\\n  _proto.trigger = function trigger$1(event, hash) {\\n    if (hash === void 0) {\\n      hash = {};\\n    }\\n\\n    return trigger(this.eventBusEl_, event, this.getEventHash(hash));\\n  }\\n  /**\\n   * Handles \\\"statechanged\\\" events on the plugin. No-op by default, override by\\n   * subclassing.\\n   *\\n   * @abstract\\n   * @param    {Event} e\\n   *           An event object provided by a \\\"statechanged\\\" event.\\n   *\\n   * @param    {Object} e.changes\\n   *           An object describing changes that occurred with the \\\"statechanged\\\"\\n   *           event.\\n   */\\n  ;\\n\\n  _proto.handleStateChanged = function handleStateChanged(e) {}\\n  /**\\n   * Disposes a plugin.\\n   *\\n   * Subclasses can override this if they want, but for the sake of safety,\\n   * it's probably best to subscribe the \\\"dispose\\\" event.\\n   *\\n   * @fires Plugin#dispose\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    var name = this.name,\\n        player = this.player;\\n    /**\\n     * Signals that a advanced plugin is about to be disposed.\\n     *\\n     * @event Plugin#dispose\\n     * @type  {EventTarget~Event}\\n     */\\n\\n    this.trigger('dispose');\\n    this.off();\\n    player.off('dispose', this.dispose); // Eliminate any possible sources of leaking memory by clearing up\\n    // references between the player and the plugin instance and nulling out\\n    // the plugin's state and replacing methods with a function that throws.\\n\\n    player[PLUGIN_CACHE_KEY][name] = false;\\n    this.player = this.state = null; // Finally, replace the plugin name on the player with a new factory\\n    // function, so that the plugin is ready to be set up again.\\n\\n    player[name] = createPluginFactory(name, pluginStorage[name]);\\n  }\\n  /**\\n   * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\\n   *\\n   * @param   {string|Function} plugin\\n   *          If a string, matches the name of a plugin. If a function, will be\\n   *          tested directly.\\n   *\\n   * @return {boolean}\\n   *          Whether or not a plugin is a basic plugin.\\n   */\\n  ;\\n\\n  Plugin.isBasic = function isBasic(plugin) {\\n    var p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\\n    return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\\n  }\\n  /**\\n   * Register a Video.js plugin.\\n   *\\n   * @param   {string} name\\n   *          The name of the plugin to be registered. Must be a string and\\n   *          must not match an existing plugin or a method on the `Player`\\n   *          prototype.\\n   *\\n   * @param   {Function} plugin\\n   *          A sub-class of `Plugin` or a function for basic plugins.\\n   *\\n   * @return {Function}\\n   *          For advanced plugins, a factory function for that plugin. For\\n   *          basic plugins, a wrapper function that initializes the plugin.\\n   */\\n  ;\\n\\n  Plugin.registerPlugin = function registerPlugin(name, plugin) {\\n    if (typeof name !== 'string') {\\n      throw new Error(\\\"Illegal plugin name, \\\\\\\"\\\" + name + \\\"\\\\\\\", must be a string, was \\\" + typeof name + \\\".\\\");\\n    }\\n\\n    if (pluginExists(name)) {\\n      log.warn(\\\"A plugin named \\\\\\\"\\\" + name + \\\"\\\\\\\" already exists. You may want to avoid re-registering plugins!\\\");\\n    } else if (Player.prototype.hasOwnProperty(name)) {\\n      throw new Error(\\\"Illegal plugin name, \\\\\\\"\\\" + name + \\\"\\\\\\\", cannot share a name with an existing player method!\\\");\\n    }\\n\\n    if (typeof plugin !== 'function') {\\n      throw new Error(\\\"Illegal plugin for \\\\\\\"\\\" + name + \\\"\\\\\\\", must be a function, was \\\" + typeof plugin + \\\".\\\");\\n    }\\n\\n    pluginStorage[name] = plugin; // Add a player prototype method for all sub-classed plugins (but not for\\n    // the base Plugin class).\\n\\n    if (name !== BASE_PLUGIN_NAME) {\\n      if (Plugin.isBasic(plugin)) {\\n        Player.prototype[name] = createBasicPlugin(name, plugin);\\n      } else {\\n        Player.prototype[name] = createPluginFactory(name, plugin);\\n      }\\n    }\\n\\n    return plugin;\\n  }\\n  /**\\n   * De-register a Video.js plugin.\\n   *\\n   * @param  {string} name\\n   *         The name of the plugin to be de-registered. Must be a string that\\n   *         matches an existing plugin.\\n   *\\n   * @throws {Error}\\n   *         If an attempt is made to de-register the base plugin.\\n   */\\n  ;\\n\\n  Plugin.deregisterPlugin = function deregisterPlugin(name) {\\n    if (name === BASE_PLUGIN_NAME) {\\n      throw new Error('Cannot de-register base plugin.');\\n    }\\n\\n    if (pluginExists(name)) {\\n      delete pluginStorage[name];\\n      delete Player.prototype[name];\\n    }\\n  }\\n  /**\\n   * Gets an object containing multiple Video.js plugins.\\n   *\\n   * @param   {Array} [names]\\n   *          If provided, should be an array of plugin names. Defaults to _all_\\n   *          plugin names.\\n   *\\n   * @return {Object|undefined}\\n   *          An object containing plugin(s) associated with their name(s) or\\n   *          `undefined` if no matching plugins exist).\\n   */\\n  ;\\n\\n  Plugin.getPlugins = function getPlugins(names) {\\n    if (names === void 0) {\\n      names = Object.keys(pluginStorage);\\n    }\\n\\n    var result;\\n    names.forEach(function (name) {\\n      var plugin = getPlugin(name);\\n\\n      if (plugin) {\\n        result = result || {};\\n        result[name] = plugin;\\n      }\\n    });\\n    return result;\\n  }\\n  /**\\n   * Gets a plugin's version, if available\\n   *\\n   * @param   {string} name\\n   *          The name of a plugin.\\n   *\\n   * @return {string}\\n   *          The plugin's version or an empty string.\\n   */\\n  ;\\n\\n  Plugin.getPluginVersion = function getPluginVersion(name) {\\n    var plugin = getPlugin(name);\\n    return plugin && plugin.VERSION || '';\\n  };\\n\\n  return Plugin;\\n}();\\n/**\\n * Gets a plugin by name if it exists.\\n *\\n * @static\\n * @method   getPlugin\\n * @memberOf Plugin\\n * @param    {string} name\\n *           The name of a plugin.\\n *\\n * @returns  {Function|undefined}\\n *           The plugin (or `undefined`).\\n */\\n\\n\\nPlugin.getPlugin = getPlugin;\\n/**\\n * The name of the base plugin class as it is registered.\\n *\\n * @type {string}\\n */\\n\\nPlugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\\nPlugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\\n/**\\n * Documented in player.js\\n *\\n * @ignore\\n */\\n\\nPlayer.prototype.usingPlugin = function (name) {\\n  return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\\n};\\n/**\\n * Documented in player.js\\n *\\n * @ignore\\n */\\n\\n\\nPlayer.prototype.hasPlugin = function (name) {\\n  return !!pluginExists(name);\\n};\\n/**\\n * Signals that a plugin is about to be set up on a player.\\n *\\n * @event    Player#beforepluginsetup\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * Signals that a plugin is about to be set up on a player - by name. The name\\n * is the name of the plugin.\\n *\\n * @event    Player#beforepluginsetup:$name\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * Signals that a plugin has just been set up on a player.\\n *\\n * @event    Player#pluginsetup\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * Signals that a plugin has just been set up on a player - by name. The name\\n * is the name of the plugin.\\n *\\n * @event    Player#pluginsetup:$name\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * @typedef  {Object} Plugin~PluginEventHash\\n *\\n * @property {string} instance\\n *           For basic plugins, the return value of the plugin function. For\\n *           advanced plugins, the plugin instance on which the event is fired.\\n *\\n * @property {string} name\\n *           The name of the plugin.\\n *\\n * @property {string} plugin\\n *           For basic plugins, the plugin function. For advanced plugins, the\\n *           plugin class/constructor.\\n */\\n\\n/**\\n * @file extend.js\\n * @module extend\\n */\\n/**\\n * Used to subclass an existing class by emulating ES subclassing using the\\n * `extends` keyword.\\n *\\n * @function\\n * @example\\n * var MyComponent = videojs.extend(videojs.getComponent('Component'), {\\n *   myCustomMethod: function() {\\n *     // Do things in my method.\\n *   }\\n * });\\n *\\n * @param    {Function} superClass\\n *           The class to inherit from\\n *\\n * @param    {Object}   [subClassMethods={}]\\n *           Methods of the new class\\n *\\n * @return   {Function}\\n *           The new class with subClassMethods that inherited superClass.\\n */\\n\\nvar extend = function extend(superClass, subClassMethods) {\\n  if (subClassMethods === void 0) {\\n    subClassMethods = {};\\n  }\\n\\n  var subClass = function subClass() {\\n    superClass.apply(this, arguments);\\n  };\\n\\n  var methods = {};\\n\\n  if (typeof subClassMethods === 'object') {\\n    if (subClassMethods.constructor !== Object.prototype.constructor) {\\n      subClass = subClassMethods.constructor;\\n    }\\n\\n    methods = subClassMethods;\\n  } else if (typeof subClassMethods === 'function') {\\n    subClass = subClassMethods;\\n  }\\n\\n  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12___default()(subClass, superClass); // this is needed for backward-compatibility and node compatibility.\\n\\n\\n  if (superClass) {\\n    subClass.super_ = superClass;\\n  } // Extend subObj's prototype with functions and other properties from props\\n\\n\\n  for (var name in methods) {\\n    if (methods.hasOwnProperty(name)) {\\n      subClass.prototype[name] = methods[name];\\n    }\\n  }\\n\\n  return subClass;\\n};\\n\\n/**\\n * @file video.js\\n * @module videojs\\n */\\n/**\\n * Normalize an `id` value by trimming off a leading `#`\\n *\\n * @private\\n * @param   {string} id\\n *          A string, maybe with a leading `#`.\\n *\\n * @return {string}\\n *          The string, without any leading `#`.\\n */\\n\\nvar normalizeId = function normalizeId(id) {\\n  return id.indexOf('#') === 0 ? id.slice(1) : id;\\n};\\n/**\\n * The `videojs()` function doubles as the main function for users to create a\\n * {@link Player} instance as well as the main library namespace.\\n *\\n * It can also be used as a getter for a pre-existing {@link Player} instance.\\n * However, we _strongly_ recommend using `videojs.getPlayer()` for this\\n * purpose because it avoids any potential for unintended initialization.\\n *\\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\\n * of our JSDoc template, we cannot properly document this as both a function\\n * and a namespace, so its function signature is documented here.\\n *\\n * #### Arguments\\n * ##### id\\n * string|Element, **required**\\n *\\n * Video element or video element ID.\\n *\\n * ##### options\\n * Object, optional\\n *\\n * Options object for providing settings.\\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\\n *\\n * ##### ready\\n * {@link Component~ReadyCallback}, optional\\n *\\n * A function to be called when the {@link Player} and {@link Tech} are ready.\\n *\\n * #### Return Value\\n *\\n * The `videojs()` function returns a {@link Player} instance.\\n *\\n * @namespace\\n *\\n * @borrows AudioTrack as AudioTrack\\n * @borrows Component.getComponent as getComponent\\n * @borrows module:computed-style~computedStyle as computedStyle\\n * @borrows module:events.on as on\\n * @borrows module:events.one as one\\n * @borrows module:events.off as off\\n * @borrows module:events.trigger as trigger\\n * @borrows EventTarget as EventTarget\\n * @borrows module:extend~extend as extend\\n * @borrows module:fn.bind as bind\\n * @borrows module:format-time.formatTime as formatTime\\n * @borrows module:format-time.resetFormatTime as resetFormatTime\\n * @borrows module:format-time.setFormatTime as setFormatTime\\n * @borrows module:merge-options.mergeOptions as mergeOptions\\n * @borrows module:middleware.use as use\\n * @borrows Player.players as players\\n * @borrows Plugin.registerPlugin as registerPlugin\\n * @borrows Plugin.deregisterPlugin as deregisterPlugin\\n * @borrows Plugin.getPlugins as getPlugins\\n * @borrows Plugin.getPlugin as getPlugin\\n * @borrows Plugin.getPluginVersion as getPluginVersion\\n * @borrows Tech.getTech as getTech\\n * @borrows Tech.registerTech as registerTech\\n * @borrows TextTrack as TextTrack\\n * @borrows module:time-ranges.createTimeRanges as createTimeRange\\n * @borrows module:time-ranges.createTimeRanges as createTimeRanges\\n * @borrows module:url.isCrossOrigin as isCrossOrigin\\n * @borrows module:url.parseUrl as parseUrl\\n * @borrows VideoTrack as VideoTrack\\n *\\n * @param  {string|Element} id\\n *         Video element or video element ID.\\n *\\n * @param  {Object} [options]\\n *         Options object for providing settings.\\n *         See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\\n *\\n * @param  {Component~ReadyCallback} [ready]\\n *         A function to be called when the {@link Player} and {@link Tech} are\\n *         ready.\\n *\\n * @return {Player}\\n *         The `videojs()` function returns a {@link Player|Player} instance.\\n */\\n\\n\\nfunction videojs$1(id, options, ready) {\\n  var player = videojs$1.getPlayer(id);\\n\\n  if (player) {\\n    if (options) {\\n      log.warn(\\\"Player \\\\\\\"\\\" + id + \\\"\\\\\\\" is already initialised. Options will not be applied.\\\");\\n    }\\n\\n    if (ready) {\\n      player.ready(ready);\\n    }\\n\\n    return player;\\n  }\\n\\n  var el = typeof id === 'string' ? $('#' + normalizeId(id)) : id;\\n\\n  if (!isEl(el)) {\\n    throw new TypeError('The element or ID supplied is not valid. (videojs)');\\n  } // document.body.contains(el) will only check if el is contained within that one document.\\n  // This causes problems for elements in iframes.\\n  // Instead, use the element's ownerDocument instead of the global document.\\n  // This will make sure that the element is indeed in the dom of that document.\\n  // Additionally, check that the document in question has a default view.\\n  // If the document is no longer attached to the dom, the defaultView of the document will be null.\\n\\n\\n  if (!el.ownerDocument.defaultView || !el.ownerDocument.body.contains(el)) {\\n    log.warn('The element supplied is not included in the DOM');\\n  }\\n\\n  options = options || {};\\n  videojs$1.hooks('beforesetup').forEach(function (hookFunction) {\\n    var opts = hookFunction(el, mergeOptions(options));\\n\\n    if (!isObject(opts) || Array.isArray(opts)) {\\n      log.error('please return an object in beforesetup hooks');\\n      return;\\n    }\\n\\n    options = mergeOptions(options, opts);\\n  }); // We get the current \\\"Player\\\" component here in case an integration has\\n  // replaced it with a custom player.\\n\\n  var PlayerComponent = Component.getComponent('Player');\\n  player = new PlayerComponent(el, options, ready);\\n  videojs$1.hooks('setup').forEach(function (hookFunction) {\\n    return hookFunction(player);\\n  });\\n  return player;\\n}\\n/**\\n * An Object that contains lifecycle hooks as keys which point to an array\\n * of functions that are run when a lifecycle is triggered\\n *\\n * @private\\n */\\n\\n\\nvideojs$1.hooks_ = {};\\n/**\\n * Get a list of hooks for a specific lifecycle\\n *\\n * @param  {string} type\\n *         the lifecyle to get hooks from\\n *\\n * @param  {Function|Function[]} [fn]\\n *         Optionally add a hook (or hooks) to the lifecycle that your are getting.\\n *\\n * @return {Array}\\n *         an array of hooks, or an empty array if there are none.\\n */\\n\\nvideojs$1.hooks = function (type, fn) {\\n  videojs$1.hooks_[type] = videojs$1.hooks_[type] || [];\\n\\n  if (fn) {\\n    videojs$1.hooks_[type] = videojs$1.hooks_[type].concat(fn);\\n  }\\n\\n  return videojs$1.hooks_[type];\\n};\\n/**\\n * Add a function hook to a specific videojs lifecycle.\\n *\\n * @param {string} type\\n *        the lifecycle to hook the function to.\\n *\\n * @param {Function|Function[]}\\n *        The function or array of functions to attach.\\n */\\n\\n\\nvideojs$1.hook = function (type, fn) {\\n  videojs$1.hooks(type, fn);\\n};\\n/**\\n * Add a function hook that will only run once to a specific videojs lifecycle.\\n *\\n * @param {string} type\\n *        the lifecycle to hook the function to.\\n *\\n * @param {Function|Function[]}\\n *        The function or array of functions to attach.\\n */\\n\\n\\nvideojs$1.hookOnce = function (type, fn) {\\n  videojs$1.hooks(type, [].concat(fn).map(function (original) {\\n    var wrapper = function wrapper() {\\n      videojs$1.removeHook(type, wrapper);\\n      return original.apply(void 0, arguments);\\n    };\\n\\n    return wrapper;\\n  }));\\n};\\n/**\\n * Remove a hook from a specific videojs lifecycle.\\n *\\n * @param  {string} type\\n *         the lifecycle that the function hooked to\\n *\\n * @param  {Function} fn\\n *         The hooked function to remove\\n *\\n * @return {boolean}\\n *         The function that was removed or undef\\n */\\n\\n\\nvideojs$1.removeHook = function (type, fn) {\\n  var index = videojs$1.hooks(type).indexOf(fn);\\n\\n  if (index <= -1) {\\n    return false;\\n  }\\n\\n  videojs$1.hooks_[type] = videojs$1.hooks_[type].slice();\\n  videojs$1.hooks_[type].splice(index, 1);\\n  return true;\\n}; // Add default styles\\n\\n\\nif (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\\n  var style = $('.vjs-styles-defaults');\\n\\n  if (!style) {\\n    style = createStyleElement('vjs-styles-defaults');\\n    var head = $('head');\\n\\n    if (head) {\\n      head.insertBefore(style, head.firstChild);\\n    }\\n\\n    setTextContent(style, \\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\");\\n  }\\n} // Run Auto-load players\\n// You have to wait at least once in case this script is loaded after your\\n// video in the DOM (weird behavior only with minified version)\\n\\n\\nautoSetupTimeout(1, videojs$1);\\n/**\\n * Current Video.js version. Follows [semantic versioning](https://semver.org/).\\n *\\n * @type {string}\\n */\\n\\nvideojs$1.VERSION = version;\\n/**\\n * The global options object. These are the settings that take effect\\n * if no overrides are specified when the player is created.\\n *\\n * @type {Object}\\n */\\n\\nvideojs$1.options = Player.prototype.options_;\\n/**\\n * Get an object with the currently created players, keyed by player ID\\n *\\n * @return {Object}\\n *         The created players\\n */\\n\\nvideojs$1.getPlayers = function () {\\n  return Player.players;\\n};\\n/**\\n * Get a single player based on an ID or DOM element.\\n *\\n * This is useful if you want to check if an element or ID has an associated\\n * Video.js player, but not create one if it doesn't.\\n *\\n * @param   {string|Element} id\\n *          An HTML element - `<video>`, `<audio>`, or `<video-js>` -\\n *          or a string matching the `id` of such an element.\\n *\\n * @return {Player|undefined}\\n *          A player instance or `undefined` if there is no player instance\\n *          matching the argument.\\n */\\n\\n\\nvideojs$1.getPlayer = function (id) {\\n  var players = Player.players;\\n  var tag;\\n\\n  if (typeof id === 'string') {\\n    var nId = normalizeId(id);\\n    var player = players[nId];\\n\\n    if (player) {\\n      return player;\\n    }\\n\\n    tag = $('#' + nId);\\n  } else {\\n    tag = id;\\n  }\\n\\n  if (isEl(tag)) {\\n    var _tag = tag,\\n        _player = _tag.player,\\n        playerId = _tag.playerId; // Element may have a `player` property referring to an already created\\n    // player instance. If so, return that.\\n\\n    if (_player || players[playerId]) {\\n      return _player || players[playerId];\\n    }\\n  }\\n};\\n/**\\n * Returns an array of all current players.\\n *\\n * @return {Array}\\n *         An array of all players. The array will be in the order that\\n *         `Object.keys` provides, which could potentially vary between\\n *         JavaScript engines.\\n *\\n */\\n\\n\\nvideojs$1.getAllPlayers = function () {\\n  return (// Disposed players leave a key with a `null` value, so we need to make sure\\n    // we filter those out.\\n    Object.keys(Player.players).map(function (k) {\\n      return Player.players[k];\\n    }).filter(Boolean)\\n  );\\n};\\n\\nvideojs$1.players = Player.players;\\nvideojs$1.getComponent = Component.getComponent;\\n/**\\n * Register a component so it can referred to by name. Used when adding to other\\n * components, either through addChild `component.addChild('myComponent')` or through\\n * default children options  `{ children: ['myComponent'] }`.\\n *\\n * > NOTE: You could also just initialize the component before adding.\\n * `component.addChild(new MyComponent());`\\n *\\n * @param {string} name\\n *        The class name of the component\\n *\\n * @param {Component} comp\\n *        The component class\\n *\\n * @return {Component}\\n *         The newly registered component\\n */\\n\\nvideojs$1.registerComponent = function (name, comp) {\\n  if (Tech.isTech(comp)) {\\n    log.warn(\\\"The \\\" + name + \\\" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)\\\");\\n  }\\n\\n  Component.registerComponent.call(Component, name, comp);\\n};\\n\\nvideojs$1.getTech = Tech.getTech;\\nvideojs$1.registerTech = Tech.registerTech;\\nvideojs$1.use = use;\\n/**\\n * An object that can be returned by a middleware to signify\\n * that the middleware is being terminated.\\n *\\n * @type {object}\\n * @property {object} middleware.TERMINATOR\\n */\\n\\nObject.defineProperty(videojs$1, 'middleware', {\\n  value: {},\\n  writeable: false,\\n  enumerable: true\\n});\\nObject.defineProperty(videojs$1.middleware, 'TERMINATOR', {\\n  value: TERMINATOR,\\n  writeable: false,\\n  enumerable: true\\n});\\n/**\\n * A reference to the {@link module:browser|browser utility module} as an object.\\n *\\n * @type {Object}\\n * @see  {@link module:browser|browser}\\n */\\n\\nvideojs$1.browser = browser;\\n/**\\n * Use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED} instead; only\\n * included for backward-compatibility with 4.x.\\n *\\n * @deprecated Since version 5.0, use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED instead.\\n * @type {boolean}\\n */\\n\\nvideojs$1.TOUCH_ENABLED = TOUCH_ENABLED;\\nvideojs$1.extend = extend;\\nvideojs$1.mergeOptions = mergeOptions;\\nvideojs$1.bind = bind;\\nvideojs$1.registerPlugin = Plugin.registerPlugin;\\nvideojs$1.deregisterPlugin = Plugin.deregisterPlugin;\\n/**\\n * Deprecated method to register a plugin with Video.js\\n *\\n * @deprecated videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\n *\\n * @param {string} name\\n *        The plugin name\\n *\\n * @param {Plugin|Function} plugin\\n *         The plugin sub-class or function\\n */\\n\\nvideojs$1.plugin = function (name, plugin) {\\n  log.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\\n  return Plugin.registerPlugin(name, plugin);\\n};\\n\\nvideojs$1.getPlugins = Plugin.getPlugins;\\nvideojs$1.getPlugin = Plugin.getPlugin;\\nvideojs$1.getPluginVersion = Plugin.getPluginVersion;\\n/**\\n * Adding languages so that they're available to all players.\\n * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\\n *\\n * @param {string} code\\n *        The language code or dictionary property\\n *\\n * @param {Object} data\\n *        The data values to be translated\\n *\\n * @return {Object}\\n *         The resulting language dictionary object\\n */\\n\\nvideojs$1.addLanguage = function (code, data) {\\n  var _mergeOptions;\\n\\n  code = ('' + code).toLowerCase();\\n  videojs$1.options.languages = mergeOptions(videojs$1.options.languages, (_mergeOptions = {}, _mergeOptions[code] = data, _mergeOptions));\\n  return videojs$1.options.languages[code];\\n};\\n/**\\n * A reference to the {@link module:log|log utility module} as an object.\\n *\\n * @type {Function}\\n * @see  {@link module:log|log}\\n */\\n\\n\\nvideojs$1.log = log;\\nvideojs$1.createLogger = createLogger$1;\\nvideojs$1.createTimeRange = videojs$1.createTimeRanges = createTimeRanges;\\nvideojs$1.formatTime = formatTime;\\nvideojs$1.setFormatTime = setFormatTime;\\nvideojs$1.resetFormatTime = resetFormatTime;\\nvideojs$1.parseUrl = parseUrl;\\nvideojs$1.isCrossOrigin = isCrossOrigin;\\nvideojs$1.EventTarget = EventTarget;\\nvideojs$1.on = on;\\nvideojs$1.one = one;\\nvideojs$1.off = off;\\nvideojs$1.trigger = trigger;\\n/**\\n * A cross-browser XMLHttpRequest wrapper.\\n *\\n * @function\\n * @param    {Object} options\\n *           Settings for the request.\\n *\\n * @return   {XMLHttpRequest|XDomainRequest}\\n *           The request object.\\n *\\n * @see      https://github.com/Raynos/xhr\\n */\\n\\nvideojs$1.xhr = _videojs_xhr__WEBPACK_IMPORTED_MODULE_9___default.a;\\nvideojs$1.TextTrack = TextTrack;\\nvideojs$1.AudioTrack = AudioTrack;\\nvideojs$1.VideoTrack = VideoTrack;\\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(function (k) {\\n  videojs$1[k] = function () {\\n    log.warn(\\\"videojs.\\\" + k + \\\"() is deprecated; use videojs.dom.\\\" + k + \\\"() instead\\\");\\n    return Dom[k].apply(null, arguments);\\n  };\\n});\\nvideojs$1.computedStyle = computedStyle;\\n/**\\n * A reference to the {@link module:dom|DOM utility module} as an object.\\n *\\n * @type {Object}\\n * @see  {@link module:dom|dom}\\n */\\n\\nvideojs$1.dom = Dom;\\n/**\\n * A reference to the {@link module:url|URL utility module} as an object.\\n *\\n * @type {Object}\\n * @see  {@link module:url|url}\\n */\\n\\nvideojs$1.url = Url;\\nvideojs$1.defineLazyProperty = defineLazyProperty;\\n\\n/**\\n * @videojs/http-streaming\\n * @version 1.13.2\\n * @copyright 2020 Brightcove, Inc\\n * @license Apache-2.0\\n */\\n/**\\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\\n */\\n\\nvar resolveUrl = function resolveUrl(baseURL, relativeURL) {\\n  // return early if we don't need to resolve\\n  if (/^[a-z]+:/i.test(relativeURL)) {\\n    return relativeURL;\\n  } // if the base URL is relative then combine with the current location\\n\\n\\n  if (!/\\\\/\\\\//i.test(baseURL)) {\\n    baseURL = url_toolkit__WEBPACK_IMPORTED_MODULE_13___default.a.buildAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href, baseURL);\\n  }\\n\\n  return url_toolkit__WEBPACK_IMPORTED_MODULE_13___default.a.buildAbsoluteURL(baseURL, relativeURL);\\n};\\n/**\\n * Checks whether xhr request was redirected and returns correct url depending\\n * on `handleManifestRedirects` option\\n *\\n * @api private\\n *\\n * @param  {String} url - an url being requested\\n * @param  {XMLHttpRequest} req - xhr request result\\n *\\n * @return {String}\\n */\\n\\n\\nvar resolveManifestRedirect = function resolveManifestRedirect(handleManifestRedirect, url, req) {\\n  // To understand how the responseURL below is set and generated:\\n  // - https://fetch.spec.whatwg.org/#concept-response-url\\n  // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\\n  if (handleManifestRedirect && req.responseURL && url !== req.responseURL) {\\n    return req.responseURL;\\n  }\\n\\n  return url;\\n};\\n\\nvar classCallCheck = function classCallCheck(instance, Constructor) {\\n  if (!(instance instanceof Constructor)) {\\n    throw new TypeError(\\\"Cannot call a class as a function\\\");\\n  }\\n};\\n\\nvar createClass = function () {\\n  function defineProperties(target, props) {\\n    for (var i = 0; i < props.length; i++) {\\n      var descriptor = props[i];\\n      descriptor.enumerable = descriptor.enumerable || false;\\n      descriptor.configurable = true;\\n      if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n      Object.defineProperty(target, descriptor.key, descriptor);\\n    }\\n  }\\n\\n  return function (Constructor, protoProps, staticProps) {\\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n    if (staticProps) defineProperties(Constructor, staticProps);\\n    return Constructor;\\n  };\\n}();\\n\\nvar get$1 = function get(object, property, receiver) {\\n  if (object === null) object = Function.prototype;\\n  var desc = Object.getOwnPropertyDescriptor(object, property);\\n\\n  if (desc === undefined) {\\n    var parent = Object.getPrototypeOf(object);\\n\\n    if (parent === null) {\\n      return undefined;\\n    } else {\\n      return get(parent, property, receiver);\\n    }\\n  } else if (\\\"value\\\" in desc) {\\n    return desc.value;\\n  } else {\\n    var getter = desc.get;\\n\\n    if (getter === undefined) {\\n      return undefined;\\n    }\\n\\n    return getter.call(receiver);\\n  }\\n};\\n\\nvar inherits = function inherits(subClass, superClass) {\\n  if (typeof superClass !== \\\"function\\\" && superClass !== null) {\\n    throw new TypeError(\\\"Super expression must either be null or a function, not \\\" + typeof superClass);\\n  }\\n\\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\\n    constructor: {\\n      value: subClass,\\n      enumerable: false,\\n      writable: true,\\n      configurable: true\\n    }\\n  });\\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\\n};\\n\\nvar possibleConstructorReturn = function possibleConstructorReturn(self, call) {\\n  if (!self) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return call && (typeof call === \\\"object\\\" || typeof call === \\\"function\\\") ? call : self;\\n};\\n\\nvar slicedToArray = function () {\\n  function sliceIterator(arr, i) {\\n    var _arr = [];\\n    var _n = true;\\n    var _d = false;\\n    var _e = undefined;\\n\\n    try {\\n      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\\n        _arr.push(_s.value);\\n\\n        if (i && _arr.length === i) break;\\n      }\\n    } catch (err) {\\n      _d = true;\\n      _e = err;\\n    } finally {\\n      try {\\n        if (!_n && _i[\\\"return\\\"]) _i[\\\"return\\\"]();\\n      } finally {\\n        if (_d) throw _e;\\n      }\\n    }\\n\\n    return _arr;\\n  }\\n\\n  return function (arr, i) {\\n    if (Array.isArray(arr)) {\\n      return arr;\\n    } else if (Symbol.iterator in Object(arr)) {\\n      return sliceIterator(arr, i);\\n    } else {\\n      throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance\\\");\\n    }\\n  };\\n}();\\n/**\\n * @file playlist-loader.js\\n *\\n * A state machine that manages the loading, caching, and updating of\\n * M3U8 playlists.\\n *\\n */\\n\\n\\nvar mergeOptions$1 = videojs$1.mergeOptions,\\n    EventTarget$1 = videojs$1.EventTarget,\\n    log$1 = videojs$1.log;\\n/**\\n * Loops through all supported media groups in master and calls the provided\\n * callback for each group\\n *\\n * @param {Object} master\\n *        The parsed master manifest object\\n * @param {Function} callback\\n *        Callback to call for each media group\\n */\\n\\nvar forEachMediaGroup = function forEachMediaGroup(master, callback) {\\n  ['AUDIO', 'SUBTITLES'].forEach(function (mediaType) {\\n    for (var groupKey in master.mediaGroups[mediaType]) {\\n      for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\\n        var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\\n        callback(mediaProperties, mediaType, groupKey, labelKey);\\n      }\\n    }\\n  });\\n};\\n/**\\n  * Returns a new array of segments that is the result of merging\\n  * properties from an older list of segments onto an updated\\n  * list. No properties on the updated playlist will be overridden.\\n  *\\n  * @param {Array} original the outdated list of segments\\n  * @param {Array} update the updated list of segments\\n  * @param {Number=} offset the index of the first update\\n  * segment in the original segment list. For non-live playlists,\\n  * this should always be zero and does not need to be\\n  * specified. For live playlists, it should be the difference\\n  * between the media sequence numbers in the original and updated\\n  * playlists.\\n  * @return a list of merged segment objects\\n  */\\n\\n\\nvar updateSegments = function updateSegments(original, update, offset) {\\n  var result = update.slice();\\n  offset = offset || 0;\\n  var length = Math.min(original.length, update.length + offset);\\n\\n  for (var i = offset; i < length; i++) {\\n    result[i - offset] = mergeOptions$1(original[i], result[i - offset]);\\n  }\\n\\n  return result;\\n};\\n\\nvar resolveSegmentUris = function resolveSegmentUris(segment, baseUri) {\\n  if (!segment.resolvedUri) {\\n    segment.resolvedUri = resolveUrl(baseUri, segment.uri);\\n  }\\n\\n  if (segment.key && !segment.key.resolvedUri) {\\n    segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\\n  }\\n\\n  if (segment.map && !segment.map.resolvedUri) {\\n    segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\\n  }\\n};\\n/**\\n  * Returns a new master playlist that is the result of merging an\\n  * updated media playlist into the original version. If the\\n  * updated media playlist does not match any of the playlist\\n  * entries in the original master playlist, null is returned.\\n  *\\n  * @param {Object} master a parsed master M3U8 object\\n  * @param {Object} media a parsed media M3U8 object\\n  * @return {Object} a new object that represents the original\\n  * master playlist with the updated media playlist merged in, or\\n  * null if the merge produced no change.\\n  */\\n\\n\\nvar updateMaster = function updateMaster(master, media) {\\n  var result = mergeOptions$1(master, {});\\n  var playlist = result.playlists[media.id];\\n\\n  if (!playlist) {\\n    return null;\\n  } // consider the playlist unchanged if the number of segments is equal, the media\\n  // sequence number is unchanged, and this playlist hasn't become the end of the playlist\\n\\n\\n  if (playlist.segments && media.segments && playlist.segments.length === media.segments.length && playlist.endList === media.endList && playlist.mediaSequence === media.mediaSequence) {\\n    return null;\\n  }\\n\\n  var mergedPlaylist = mergeOptions$1(playlist, media); // if the update could overlap existing segment information, merge the two segment lists\\n\\n  if (playlist.segments) {\\n    mergedPlaylist.segments = updateSegments(playlist.segments, media.segments, media.mediaSequence - playlist.mediaSequence);\\n  } // resolve any segment URIs to prevent us from having to do it later\\n\\n\\n  mergedPlaylist.segments.forEach(function (segment) {\\n    resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\\n  }); // TODO Right now in the playlists array there are two references to each playlist, one\\n  // that is referenced by index, and one by URI. The index reference may no longer be\\n  // necessary.\\n\\n  for (var i = 0; i < result.playlists.length; i++) {\\n    if (result.playlists[i].id === media.id) {\\n      result.playlists[i] = mergedPlaylist;\\n    }\\n  }\\n\\n  result.playlists[media.id] = mergedPlaylist; // URI reference added for backwards compatibility\\n\\n  result.playlists[media.uri] = mergedPlaylist;\\n  return result;\\n};\\n\\nvar createPlaylistID = function createPlaylistID(index, uri) {\\n  return index + '-' + uri;\\n};\\n\\nvar setupMediaPlaylists = function setupMediaPlaylists(master) {\\n  // setup by-URI lookups and resolve media playlist URIs\\n  var i = master.playlists.length;\\n\\n  while (i--) {\\n    var playlist = master.playlists[i];\\n    playlist.resolvedUri = resolveUrl(master.uri, playlist.uri);\\n    playlist.id = createPlaylistID(i, playlist.uri);\\n    master.playlists[playlist.id] = playlist; // URI reference added for backwards compatibility\\n\\n    master.playlists[playlist.uri] = playlist;\\n\\n    if (!playlist.attributes) {\\n      // Although the spec states an #EXT-X-STREAM-INF tag MUST have a\\n      // BANDWIDTH attribute, we can play the stream without it. This means a poorly\\n      // formatted master playlist may not have an attribute list. An attributes\\n      // property is added here to prevent undefined references when we encounter\\n      // this scenario.\\n      playlist.attributes = {};\\n      log$1.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\\n    }\\n  }\\n};\\n\\nvar resolveMediaGroupUris = function resolveMediaGroupUris(master) {\\n  forEachMediaGroup(master, function (properties) {\\n    if (properties.uri) {\\n      properties.resolvedUri = resolveUrl(master.uri, properties.uri);\\n    }\\n  });\\n};\\n/**\\n * Calculates the time to wait before refreshing a live playlist\\n *\\n * @param {Object} media\\n *        The current media\\n * @param {Boolean} update\\n *        True if there were any updates from the last refresh, false otherwise\\n * @return {Number}\\n *         The time in ms to wait before refreshing the live playlist\\n */\\n\\n\\nvar refreshDelay = function refreshDelay(media, update) {\\n  var lastSegment = media.segments[media.segments.length - 1];\\n  var delay = void 0;\\n\\n  if (update && lastSegment && lastSegment.duration) {\\n    delay = lastSegment.duration * 1000;\\n  } else {\\n    // if the playlist is unchanged since the last reload or last segment duration\\n    // cannot be determined, try again after half the target duration\\n    delay = (media.targetDuration || 10) * 500;\\n  }\\n\\n  return delay;\\n};\\n/**\\n * Load a playlist from a remote location\\n *\\n * @class PlaylistLoader\\n * @extends Stream\\n * @param {String} srcUrl the url to start with\\n * @param {Boolean} withCredentials the withCredentials xhr option\\n * @constructor\\n */\\n\\n\\nvar PlaylistLoader = function (_EventTarget) {\\n  inherits(PlaylistLoader, _EventTarget);\\n\\n  function PlaylistLoader(srcUrl, hls) {\\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\\n    classCallCheck(this, PlaylistLoader);\\n\\n    var _this = possibleConstructorReturn(this, (PlaylistLoader.__proto__ || Object.getPrototypeOf(PlaylistLoader)).call(this));\\n\\n    var _options$withCredenti = options.withCredentials,\\n        withCredentials = _options$withCredenti === undefined ? false : _options$withCredenti,\\n        _options$handleManife = options.handleManifestRedirects,\\n        handleManifestRedirects = _options$handleManife === undefined ? false : _options$handleManife;\\n    _this.srcUrl = srcUrl;\\n    _this.hls_ = hls;\\n    _this.withCredentials = withCredentials;\\n    _this.handleManifestRedirects = handleManifestRedirects;\\n    var hlsOptions = hls.options_;\\n    _this.customTagParsers = hlsOptions && hlsOptions.customTagParsers || [];\\n    _this.customTagMappers = hlsOptions && hlsOptions.customTagMappers || [];\\n\\n    if (!_this.srcUrl) {\\n      throw new Error('A non-empty playlist URL is required');\\n    } // initialize the loader state\\n\\n\\n    _this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\\n\\n    _this.on('mediaupdatetimeout', function () {\\n      if (_this.state !== 'HAVE_METADATA') {\\n        // only refresh the media playlist if no other activity is going on\\n        return;\\n      }\\n\\n      _this.state = 'HAVE_CURRENT_METADATA';\\n      _this.request = _this.hls_.xhr({\\n        uri: resolveUrl(_this.master.uri, _this.media().uri),\\n        withCredentials: _this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this.request) {\\n          return;\\n        }\\n\\n        if (error) {\\n          return _this.playlistRequestError(_this.request, _this.media(), 'HAVE_METADATA');\\n        }\\n\\n        _this.haveMetadata(_this.request, _this.media().uri, _this.media().id);\\n      });\\n    });\\n\\n    return _this;\\n  }\\n\\n  createClass(PlaylistLoader, [{\\n    key: 'playlistRequestError',\\n    value: function playlistRequestError(xhr, playlist, startingState) {\\n      var uri = playlist.uri,\\n          id = playlist.id; // any in-flight request is now finished\\n\\n      this.request = null;\\n\\n      if (startingState) {\\n        this.state = startingState;\\n      }\\n\\n      this.error = {\\n        playlist: this.master.playlists[id],\\n        status: xhr.status,\\n        message: 'HLS playlist request error at URL: ' + uri + '.',\\n        responseText: xhr.responseText,\\n        code: xhr.status >= 500 ? 4 : 2\\n      };\\n      this.trigger('error');\\n    } // update the playlist loader's state in response to a new or\\n    // updated playlist.\\n\\n  }, {\\n    key: 'haveMetadata',\\n    value: function haveMetadata(xhr, url, id) {\\n      var _this2 = this; // any in-flight request is now finished\\n\\n\\n      this.request = null;\\n      this.state = 'HAVE_METADATA';\\n      var parser = new m3u8_parser__WEBPACK_IMPORTED_MODULE_14__[\\\"Parser\\\"](); // adding custom tag parsers\\n\\n      this.customTagParsers.forEach(function (customParser) {\\n        return parser.addParser(customParser);\\n      }); // adding custom tag mappers\\n\\n      this.customTagMappers.forEach(function (mapper) {\\n        return parser.addTagMapper(mapper);\\n      });\\n      parser.push(xhr.responseText);\\n      parser.end();\\n      parser.manifest.uri = url;\\n      parser.manifest.id = id; // m3u8-parser does not attach an attributes property to media playlists so make\\n      // sure that the property is attached to avoid undefined reference errors\\n\\n      parser.manifest.attributes = parser.manifest.attributes || {}; // merge this playlist into the master\\n\\n      var update = updateMaster(this.master, parser.manifest);\\n      this.targetDuration = parser.manifest.targetDuration;\\n\\n      if (update) {\\n        this.master = update;\\n        this.media_ = this.master.playlists[id];\\n      } else {\\n        this.trigger('playlistunchanged');\\n      } // refresh live playlists after a target duration passes\\n\\n\\n      if (!this.media().endList) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this2.trigger('mediaupdatetimeout');\\n        }, refreshDelay(this.media(), !!update));\\n      }\\n\\n      this.trigger('loadedplaylist');\\n    }\\n    /**\\n     * Abort any outstanding work and clean up.\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.stopRequest();\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.finalRenditionTimeout);\\n      this.off();\\n    }\\n  }, {\\n    key: 'stopRequest',\\n    value: function stopRequest() {\\n      if (this.request) {\\n        var oldRequest = this.request;\\n        this.request = null;\\n        oldRequest.onreadystatechange = null;\\n        oldRequest.abort();\\n      }\\n    }\\n    /**\\n     * When called without any arguments, returns the currently\\n     * active media playlist. When called with a single argument,\\n     * triggers the playlist loader to asynchronously switch to the\\n     * specified media playlist. Calling this method while the\\n     * loader is in the HAVE_NOTHING causes an error to be emitted\\n     * but otherwise has no effect.\\n     *\\n     * @param {Object=} playlist the parsed media playlist\\n     * object to switch to\\n     * @param {Boolean=} is this the last available playlist\\n     *\\n     * @return {Playlist} the current loaded media\\n     */\\n\\n  }, {\\n    key: 'media',\\n    value: function media(playlist, isFinalRendition) {\\n      var _this3 = this; // getter\\n\\n\\n      if (!playlist) {\\n        return this.media_;\\n      } // setter\\n\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        throw new Error('Cannot switch media playlist from ' + this.state);\\n      } // find the playlist object if the target playlist has been\\n      // specified by URI\\n\\n\\n      if (typeof playlist === 'string') {\\n        if (!this.master.playlists[playlist]) {\\n          throw new Error('Unknown playlist URI: ' + playlist);\\n        }\\n\\n        playlist = this.master.playlists[playlist];\\n      }\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.finalRenditionTimeout);\\n\\n      if (isFinalRendition) {\\n        var delay = playlist.targetDuration / 2 * 1000 || 5 * 1000;\\n        this.finalRenditionTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.media.bind(this, playlist, false), delay);\\n        return;\\n      }\\n\\n      var startingState = this.state;\\n      var mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to fully loaded playlists immediately\\n\\n      if (this.master.playlists[playlist.id].endList) {\\n        // abort outstanding playlist requests\\n        if (this.request) {\\n          this.request.onreadystatechange = null;\\n          this.request.abort();\\n          this.request = null;\\n        }\\n\\n        this.state = 'HAVE_METADATA';\\n        this.media_ = playlist; // trigger media change if the active media has been updated\\n\\n        if (mediaChange) {\\n          this.trigger('mediachanging');\\n          this.trigger('mediachange');\\n        }\\n\\n        return;\\n      } // switching to the active playlist is a no-op\\n\\n\\n      if (!mediaChange) {\\n        return;\\n      }\\n\\n      this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\\n\\n      if (this.request) {\\n        if (playlist.resolvedUri === this.request.url) {\\n          // requesting to switch to the same playlist multiple times\\n          // has no effect after the first\\n          return;\\n        }\\n\\n        this.request.onreadystatechange = null;\\n        this.request.abort();\\n        this.request = null;\\n      } // request the new playlist\\n\\n\\n      if (this.media_) {\\n        this.trigger('mediachanging');\\n      }\\n\\n      this.request = this.hls_.xhr({\\n        uri: playlist.resolvedUri,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this3.request) {\\n          return;\\n        }\\n\\n        playlist.resolvedUri = resolveManifestRedirect(_this3.handleManifestRedirects, playlist.resolvedUri, req);\\n\\n        if (error) {\\n          return _this3.playlistRequestError(_this3.request, playlist, startingState);\\n        }\\n\\n        _this3.haveMetadata(req, playlist.uri, playlist.id); // fire loadedmetadata the first time a media playlist is loaded\\n\\n\\n        if (startingState === 'HAVE_MASTER') {\\n          _this3.trigger('loadedmetadata');\\n        } else {\\n          _this3.trigger('mediachange');\\n        }\\n      });\\n    }\\n    /**\\n     * pause loading of the playlist\\n     */\\n\\n  }, {\\n    key: 'pause',\\n    value: function pause() {\\n      this.stopRequest();\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        // If we pause the loader before any data has been retrieved, its as if we never\\n        // started, so reset to an unstarted state.\\n        this.started = false;\\n      } // Need to restore state now that no activity is happening\\n\\n\\n      if (this.state === 'SWITCHING_MEDIA') {\\n        // if the loader was in the process of switching media, it should either return to\\n        // HAVE_MASTER or HAVE_METADATA depending on if the loader has loaded a media\\n        // playlist yet. This is determined by the existence of loader.media_\\n        if (this.media_) {\\n          this.state = 'HAVE_METADATA';\\n        } else {\\n          this.state = 'HAVE_MASTER';\\n        }\\n      } else if (this.state === 'HAVE_CURRENT_METADATA') {\\n        this.state = 'HAVE_METADATA';\\n      }\\n    }\\n    /**\\n     * start loading of the playlist\\n     */\\n\\n  }, {\\n    key: 'load',\\n    value: function load(isFinalRendition) {\\n      var _this4 = this;\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      var media = this.media();\\n\\n      if (isFinalRendition) {\\n        var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          return _this4.load();\\n        }, delay);\\n        return;\\n      }\\n\\n      if (!this.started) {\\n        this.start();\\n        return;\\n      }\\n\\n      if (media && !media.endList) {\\n        this.trigger('mediaupdatetimeout');\\n      } else {\\n        this.trigger('loadedplaylist');\\n      }\\n    }\\n    /**\\n     * start loading of the playlist\\n     */\\n\\n  }, {\\n    key: 'start',\\n    value: function start() {\\n      var _this5 = this;\\n\\n      this.started = true; // request the specified URL\\n\\n      this.request = this.hls_.xhr({\\n        uri: this.srcUrl,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this5.request) {\\n          return;\\n        } // clear the loader's request reference\\n\\n\\n        _this5.request = null;\\n\\n        if (error) {\\n          _this5.error = {\\n            status: req.status,\\n            message: 'HLS playlist request error at URL: ' + _this5.srcUrl + '.',\\n            responseText: req.responseText,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (_this5.state === 'HAVE_NOTHING') {\\n            _this5.started = false;\\n          }\\n\\n          return _this5.trigger('error');\\n        }\\n\\n        var parser = new m3u8_parser__WEBPACK_IMPORTED_MODULE_14__[\\\"Parser\\\"](); // adding custom tag parsers\\n\\n        _this5.customTagParsers.forEach(function (customParser) {\\n          return parser.addParser(customParser);\\n        }); // adding custom tag mappers\\n\\n\\n        _this5.customTagMappers.forEach(function (mapper) {\\n          return parser.addTagMapper(mapper);\\n        });\\n\\n        parser.push(req.responseText);\\n        parser.end();\\n        _this5.state = 'HAVE_MASTER';\\n        _this5.srcUrl = resolveManifestRedirect(_this5.handleManifestRedirects, _this5.srcUrl, req);\\n        parser.manifest.uri = _this5.srcUrl; // loaded a master playlist\\n\\n        if (parser.manifest.playlists) {\\n          _this5.master = parser.manifest;\\n          setupMediaPlaylists(_this5.master);\\n          resolveMediaGroupUris(_this5.master);\\n\\n          _this5.trigger('loadedplaylist');\\n\\n          if (!_this5.request) {\\n            // no media playlist was specifically selected so start\\n            // from the first listed one\\n            _this5.media(parser.manifest.playlists[0]);\\n          }\\n\\n          return;\\n        }\\n\\n        var id = createPlaylistID(0, _this5.srcUrl); // loaded a media playlist\\n        // infer a master playlist if none was previously requested\\n\\n        _this5.master = {\\n          mediaGroups: {\\n            'AUDIO': {},\\n            'VIDEO': {},\\n            'CLOSED-CAPTIONS': {},\\n            'SUBTITLES': {}\\n          },\\n          uri: global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href,\\n          playlists: [{\\n            uri: _this5.srcUrl,\\n            id: id,\\n            resolvedUri: _this5.srcUrl,\\n            // m3u8-parser does not attach an attributes property to media playlists so make\\n            // sure that the property is attached to avoid undefined reference errors\\n            attributes: {}\\n          }]\\n        };\\n        _this5.master.playlists[id] = _this5.master.playlists[0]; // URI reference added for backwards compatibility\\n\\n        _this5.master.playlists[_this5.srcUrl] = _this5.master.playlists[0];\\n\\n        _this5.haveMetadata(req, _this5.srcUrl, id);\\n\\n        return _this5.trigger('loadedmetadata');\\n      });\\n    }\\n  }]);\\n  return PlaylistLoader;\\n}(EventTarget$1);\\n/**\\n * @file playlist.js\\n *\\n * Playlist related utilities.\\n */\\n\\n\\nvar createTimeRange = videojs$1.createTimeRange;\\n/**\\n * walk backward until we find a duration we can use\\n * or return a failure\\n *\\n * @param {Playlist} playlist the playlist to walk through\\n * @param {Number} endSequence the mediaSequence to stop walking on\\n */\\n\\nvar backwardDuration = function backwardDuration(playlist, endSequence) {\\n  var result = 0;\\n  var i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\\n  // the interval, use it\\n\\n  var segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\\n  // information that is earlier than endSequence\\n\\n  if (segment) {\\n    if (typeof segment.start !== 'undefined') {\\n      return {\\n        result: segment.start,\\n        precise: true\\n      };\\n    }\\n\\n    if (typeof segment.end !== 'undefined') {\\n      return {\\n        result: segment.end - segment.duration,\\n        precise: true\\n      };\\n    }\\n  }\\n\\n  while (i--) {\\n    segment = playlist.segments[i];\\n\\n    if (typeof segment.end !== 'undefined') {\\n      return {\\n        result: result + segment.end,\\n        precise: true\\n      };\\n    }\\n\\n    result += segment.duration;\\n\\n    if (typeof segment.start !== 'undefined') {\\n      return {\\n        result: result + segment.start,\\n        precise: true\\n      };\\n    }\\n  }\\n\\n  return {\\n    result: result,\\n    precise: false\\n  };\\n};\\n/**\\n * walk forward until we find a duration we can use\\n * or return a failure\\n *\\n * @param {Playlist} playlist the playlist to walk through\\n * @param {Number} endSequence the mediaSequence to stop walking on\\n */\\n\\n\\nvar forwardDuration = function forwardDuration(playlist, endSequence) {\\n  var result = 0;\\n  var segment = void 0;\\n  var i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\\n  // information\\n\\n  for (; i < playlist.segments.length; i++) {\\n    segment = playlist.segments[i];\\n\\n    if (typeof segment.start !== 'undefined') {\\n      return {\\n        result: segment.start - result,\\n        precise: true\\n      };\\n    }\\n\\n    result += segment.duration;\\n\\n    if (typeof segment.end !== 'undefined') {\\n      return {\\n        result: segment.end - result,\\n        precise: true\\n      };\\n    }\\n  } // indicate we didn't find a useful duration estimate\\n\\n\\n  return {\\n    result: -1,\\n    precise: false\\n  };\\n};\\n/**\\n  * Calculate the media duration from the segments associated with a\\n  * playlist. The duration of a subinterval of the available segments\\n  * may be calculated by specifying an end index.\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * @param {Number=} endSequence an exclusive upper boundary\\n  * for the playlist.  Defaults to playlist length.\\n  * @param {Number} expired the amount of time that has dropped\\n  * off the front of the playlist in a live scenario\\n  * @return {Number} the duration between the first available segment\\n  * and end index.\\n  */\\n\\n\\nvar intervalDuration = function intervalDuration(playlist, endSequence, expired) {\\n  var backward = void 0;\\n  var forward = void 0;\\n\\n  if (typeof endSequence === 'undefined') {\\n    endSequence = playlist.mediaSequence + playlist.segments.length;\\n  }\\n\\n  if (endSequence < playlist.mediaSequence) {\\n    return 0;\\n  } // do a backward walk to estimate the duration\\n\\n\\n  backward = backwardDuration(playlist, endSequence);\\n\\n  if (backward.precise) {\\n    // if we were able to base our duration estimate on timing\\n    // information provided directly from the Media Source, return\\n    // it\\n    return backward.result;\\n  } // walk forward to see if a precise duration estimate can be made\\n  // that way\\n\\n\\n  forward = forwardDuration(playlist, endSequence);\\n\\n  if (forward.precise) {\\n    // we found a segment that has been buffered and so it's\\n    // position is known precisely\\n    return forward.result;\\n  } // return the less-precise, playlist-based duration estimate\\n\\n\\n  return backward.result + expired;\\n};\\n/**\\n  * Calculates the duration of a playlist. If a start and end index\\n  * are specified, the duration will be for the subset of the media\\n  * timeline between those two indices. The total duration for live\\n  * playlists is always Infinity.\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * @param {Number=} endSequence an exclusive upper\\n  * boundary for the playlist. Defaults to the playlist media\\n  * sequence number plus its length.\\n  * @param {Number=} expired the amount of time that has\\n  * dropped off the front of the playlist in a live scenario\\n  * @return {Number} the duration between the start index and end\\n  * index.\\n  */\\n\\n\\nvar duration = function duration(playlist, endSequence, expired) {\\n  if (!playlist) {\\n    return 0;\\n  }\\n\\n  if (typeof expired !== 'number') {\\n    expired = 0;\\n  } // if a slice of the total duration is not requested, use\\n  // playlist-level duration indicators when they're present\\n\\n\\n  if (typeof endSequence === 'undefined') {\\n    // if present, use the duration specified in the playlist\\n    if (playlist.totalDuration) {\\n      return playlist.totalDuration;\\n    } // duration should be Infinity for live playlists\\n\\n\\n    if (!playlist.endList) {\\n      return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Infinity;\\n    }\\n  } // calculate the total duration based on the segment durations\\n\\n\\n  return intervalDuration(playlist, endSequence, expired);\\n};\\n/**\\n  * Calculate the time between two indexes in the current playlist\\n  * neight the start- nor the end-index need to be within the current\\n  * playlist in which case, the targetDuration of the playlist is used\\n  * to approximate the durations of the segments\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * @param {Number} startIndex\\n  * @param {Number} endIndex\\n  * @return {Number} the number of seconds between startIndex and endIndex\\n  */\\n\\n\\nvar sumDurations = function sumDurations(playlist, startIndex, endIndex) {\\n  var durations = 0;\\n\\n  if (startIndex > endIndex) {\\n    var _ref = [endIndex, startIndex];\\n    startIndex = _ref[0];\\n    endIndex = _ref[1];\\n  }\\n\\n  if (startIndex < 0) {\\n    for (var i = startIndex; i < Math.min(0, endIndex); i++) {\\n      durations += playlist.targetDuration;\\n    }\\n\\n    startIndex = 0;\\n  }\\n\\n  for (var _i = startIndex; _i < endIndex; _i++) {\\n    durations += playlist.segments[_i].duration;\\n  }\\n\\n  return durations;\\n};\\n/**\\n * Determines the media index of the segment corresponding to the safe edge of the live\\n * window which is the duration of the last segment plus 2 target durations from the end\\n * of the playlist.\\n *\\n * A liveEdgePadding can be provided which will be used instead of calculating the safe live edge.\\n * This corresponds to suggestedPresentationDelay in DASH manifests.\\n *\\n * @param {Object} playlist\\n *        a media playlist object\\n * @param {Number} [liveEdgePadding]\\n *        A number in seconds indicating how far from the end we want to be.\\n *        If provided, this value is used instead of calculating the safe live index from the target durations.\\n *        Corresponds to suggestedPresentationDelay in DASH manifests.\\n * @return {Number}\\n *         The media index of the segment at the safe live point. 0 if there is no \\\"safe\\\"\\n *         point.\\n * @function safeLiveIndex\\n */\\n\\n\\nvar safeLiveIndex = function safeLiveIndex(playlist, liveEdgePadding) {\\n  if (!playlist.segments.length) {\\n    return 0;\\n  }\\n\\n  var i = playlist.segments.length;\\n  var lastSegmentDuration = playlist.segments[i - 1].duration || playlist.targetDuration;\\n  var safeDistance = typeof liveEdgePadding === 'number' ? liveEdgePadding : lastSegmentDuration + playlist.targetDuration * 2;\\n\\n  if (safeDistance === 0) {\\n    return i;\\n  }\\n\\n  var distanceFromEnd = 0;\\n\\n  while (i--) {\\n    distanceFromEnd += playlist.segments[i].duration;\\n\\n    if (distanceFromEnd >= safeDistance) {\\n      break;\\n    }\\n  }\\n\\n  return Math.max(0, i);\\n};\\n/**\\n * Calculates the playlist end time\\n *\\n * @param {Object} playlist a media playlist object\\n * @param {Number=} expired the amount of time that has\\n *                  dropped off the front of the playlist in a live scenario\\n * @param {Boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\\n *                        playlist end calculation should consider the safe live end\\n *                        (truncate the playlist end by three segments). This is normally\\n *                        used for calculating the end of the playlist's seekable range.\\n *                        This takes into account the value of liveEdgePadding.\\n *                        Setting liveEdgePadding to 0 is equivalent to setting this to false.\\n * @param {Number} liveEdgePadding a number indicating how far from the end of the playlist we should be in seconds.\\n *                 If this is provided, it is used in the safe live end calculation.\\n *                 Setting useSafeLiveEnd=false or liveEdgePadding=0 are equivalent.\\n *                 Corresponds to suggestedPresentationDelay in DASH manifests.\\n * @returns {Number} the end time of playlist\\n * @function playlistEnd\\n */\\n\\n\\nvar playlistEnd = function playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding) {\\n  if (!playlist || !playlist.segments) {\\n    return null;\\n  }\\n\\n  if (playlist.endList) {\\n    return duration(playlist);\\n  }\\n\\n  if (expired === null) {\\n    return null;\\n  }\\n\\n  expired = expired || 0;\\n  var endSequence = useSafeLiveEnd ? safeLiveIndex(playlist, liveEdgePadding) : playlist.segments.length;\\n  return intervalDuration(playlist, playlist.mediaSequence + endSequence, expired);\\n};\\n/**\\n  * Calculates the interval of time that is currently seekable in a\\n  * playlist. The returned time ranges are relative to the earliest\\n  * moment in the specified playlist that is still available. A full\\n  * seekable implementation for live streams would need to offset\\n  * these values by the duration of content that has expired from the\\n  * stream.\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * dropped off the front of the playlist in a live scenario\\n  * @param {Number=} expired the amount of time that has\\n  * dropped off the front of the playlist in a live scenario\\n  * @param {Number} liveEdgePadding how far from the end of the playlist we should be in seconds.\\n  *        Corresponds to suggestedPresentationDelay in DASH manifests.\\n  * @return {TimeRanges} the periods of time that are valid targets\\n  * for seeking\\n  */\\n\\n\\nvar seekable = function seekable(playlist, expired, liveEdgePadding) {\\n  var useSafeLiveEnd = true;\\n  var seekableStart = expired || 0;\\n  var seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\\n\\n  if (seekableEnd === null) {\\n    return createTimeRange();\\n  }\\n\\n  return createTimeRange(seekableStart, seekableEnd);\\n};\\n\\nvar isWholeNumber = function isWholeNumber(num) {\\n  return num - Math.floor(num) === 0;\\n};\\n\\nvar roundSignificantDigit = function roundSignificantDigit(increment, num) {\\n  // If we have a whole number, just add 1 to it\\n  if (isWholeNumber(num)) {\\n    return num + increment * 0.1;\\n  }\\n\\n  var numDecimalDigits = num.toString().split('.')[1].length;\\n\\n  for (var i = 1; i <= numDecimalDigits; i++) {\\n    var scale = Math.pow(10, i);\\n    var temp = num * scale;\\n\\n    if (isWholeNumber(temp) || i === numDecimalDigits) {\\n      return (temp + increment) / scale;\\n    }\\n  }\\n};\\n\\nvar ceilLeastSignificantDigit = roundSignificantDigit.bind(null, 1);\\nvar floorLeastSignificantDigit = roundSignificantDigit.bind(null, -1);\\n/**\\n * Determine the index and estimated starting time of the segment that\\n * contains a specified playback position in a media playlist.\\n *\\n * @param {Object} playlist the media playlist to query\\n * @param {Number} currentTime The number of seconds since the earliest\\n * possible position to determine the containing segment for\\n * @param {Number} startIndex\\n * @param {Number} startTime\\n * @return {Object}\\n */\\n\\nvar getMediaInfoForTime = function getMediaInfoForTime(playlist, currentTime, startIndex, startTime) {\\n  var i = void 0;\\n  var segment = void 0;\\n  var numSegments = playlist.segments.length;\\n  var time = currentTime - startTime;\\n\\n  if (time < 0) {\\n    // Walk backward from startIndex in the playlist, adding durations\\n    // until we find a segment that contains `time` and return it\\n    if (startIndex > 0) {\\n      for (i = startIndex - 1; i >= 0; i--) {\\n        segment = playlist.segments[i];\\n        time += floorLeastSignificantDigit(segment.duration);\\n\\n        if (time > 0) {\\n          return {\\n            mediaIndex: i,\\n            startTime: startTime - sumDurations(playlist, startIndex, i)\\n          };\\n        }\\n      }\\n    } // We were unable to find a good segment within the playlist\\n    // so select the first segment\\n\\n\\n    return {\\n      mediaIndex: 0,\\n      startTime: currentTime\\n    };\\n  } // When startIndex is negative, we first walk forward to first segment\\n  // adding target durations. If we \\\"run out of time\\\" before getting to\\n  // the first segment, return the first segment\\n\\n\\n  if (startIndex < 0) {\\n    for (i = startIndex; i < 0; i++) {\\n      time -= playlist.targetDuration;\\n\\n      if (time < 0) {\\n        return {\\n          mediaIndex: 0,\\n          startTime: currentTime\\n        };\\n      }\\n    }\\n\\n    startIndex = 0;\\n  } // Walk forward from startIndex in the playlist, subtracting durations\\n  // until we find a segment that contains `time` and return it\\n\\n\\n  for (i = startIndex; i < numSegments; i++) {\\n    segment = playlist.segments[i];\\n    time -= ceilLeastSignificantDigit(segment.duration);\\n\\n    if (time < 0) {\\n      return {\\n        mediaIndex: i,\\n        startTime: startTime + sumDurations(playlist, startIndex, i)\\n      };\\n    }\\n  } // We are out of possible candidates so load the last one...\\n\\n\\n  return {\\n    mediaIndex: numSegments - 1,\\n    startTime: currentTime\\n  };\\n};\\n/**\\n * Check whether the playlist is blacklisted or not.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is blacklisted or not\\n * @function isBlacklisted\\n */\\n\\n\\nvar isBlacklisted = function isBlacklisted(playlist) {\\n  return playlist.excludeUntil && playlist.excludeUntil > Date.now();\\n};\\n/**\\n * Check whether the playlist is compatible with current playback configuration or has\\n * been blacklisted permanently for being incompatible.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is incompatible or not\\n * @function isIncompatible\\n */\\n\\n\\nvar isIncompatible = function isIncompatible(playlist) {\\n  return playlist.excludeUntil && playlist.excludeUntil === Infinity;\\n};\\n/**\\n * Check whether the playlist is enabled or not.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is enabled or not\\n * @function isEnabled\\n */\\n\\n\\nvar isEnabled = function isEnabled(playlist) {\\n  var blacklisted = isBlacklisted(playlist);\\n  return !playlist.disabled && !blacklisted;\\n};\\n/**\\n * Check whether the playlist has been manually disabled through the representations api.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is disabled manually or not\\n * @function isDisabled\\n */\\n\\n\\nvar isDisabled = function isDisabled(playlist) {\\n  return playlist.disabled;\\n};\\n/**\\n * Returns whether the current playlist is an AES encrypted HLS stream\\n *\\n * @return {Boolean} true if it's an AES encrypted HLS stream\\n */\\n\\n\\nvar isAes = function isAes(media) {\\n  for (var i = 0; i < media.segments.length; i++) {\\n    if (media.segments[i].key) {\\n      return true;\\n    }\\n  }\\n\\n  return false;\\n};\\n/**\\n * Returns whether the current playlist contains fMP4\\n *\\n * @return {Boolean} true if the playlist contains fMP4\\n */\\n\\n\\nvar isFmp4 = function isFmp4(media) {\\n  for (var i = 0; i < media.segments.length; i++) {\\n    if (media.segments[i].map) {\\n      return true;\\n    }\\n  }\\n\\n  return false;\\n};\\n/**\\n * Checks if the playlist has a value for the specified attribute\\n *\\n * @param {String} attr\\n *        Attribute to check for\\n * @param {Object} playlist\\n *        The media playlist object\\n * @return {Boolean}\\n *         Whether the playlist contains a value for the attribute or not\\n * @function hasAttribute\\n */\\n\\n\\nvar hasAttribute = function hasAttribute(attr, playlist) {\\n  return playlist.attributes && playlist.attributes[attr];\\n};\\n/**\\n * Estimates the time required to complete a segment download from the specified playlist\\n *\\n * @param {Number} segmentDuration\\n *        Duration of requested segment\\n * @param {Number} bandwidth\\n *        Current measured bandwidth of the player\\n * @param {Object} playlist\\n *        The media playlist object\\n * @param {Number=} bytesReceived\\n *        Number of bytes already received for the request. Defaults to 0\\n * @return {Number|NaN}\\n *         The estimated time to request the segment. NaN if bandwidth information for\\n *         the given playlist is unavailable\\n * @function estimateSegmentRequestTime\\n */\\n\\n\\nvar estimateSegmentRequestTime = function estimateSegmentRequestTime(segmentDuration, bandwidth, playlist) {\\n  var bytesReceived = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\\n\\n  if (!hasAttribute('BANDWIDTH', playlist)) {\\n    return NaN;\\n  }\\n\\n  var size = segmentDuration * playlist.attributes.BANDWIDTH;\\n  return (size - bytesReceived * 8) / bandwidth;\\n};\\n/*\\n * Returns whether the current playlist is the lowest rendition\\n *\\n * @return {Boolean} true if on lowest rendition\\n */\\n\\n\\nvar isLowestEnabledRendition = function isLowestEnabledRendition(master, media) {\\n  if (master.playlists.length === 1) {\\n    return true;\\n  }\\n\\n  var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\\n  return master.playlists.filter(function (playlist) {\\n    if (!isEnabled(playlist)) {\\n      return false;\\n    }\\n\\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\\n  }).length === 0;\\n}; // exports\\n\\n\\nvar Playlist = {\\n  duration: duration,\\n  seekable: seekable,\\n  safeLiveIndex: safeLiveIndex,\\n  getMediaInfoForTime: getMediaInfoForTime,\\n  isEnabled: isEnabled,\\n  isDisabled: isDisabled,\\n  isBlacklisted: isBlacklisted,\\n  isIncompatible: isIncompatible,\\n  playlistEnd: playlistEnd,\\n  isAes: isAes,\\n  isFmp4: isFmp4,\\n  hasAttribute: hasAttribute,\\n  estimateSegmentRequestTime: estimateSegmentRequestTime,\\n  isLowestEnabledRendition: isLowestEnabledRendition\\n};\\n/**\\n * @file xhr.js\\n */\\n\\nvar videojsXHR = videojs$1.xhr,\\n    mergeOptions$1$1 = videojs$1.mergeOptions;\\n\\nvar xhrFactory = function xhrFactory() {\\n  var xhr = function XhrFunction(options, callback) {\\n    // Add a default timeout for all hls requests\\n    options = mergeOptions$1$1({\\n      timeout: 45e3\\n    }, options); // Allow an optional user-specified function to modify the option\\n    // object before we construct the xhr request\\n\\n    var beforeRequest = XhrFunction.beforeRequest || videojs$1.Hls.xhr.beforeRequest;\\n\\n    if (beforeRequest && typeof beforeRequest === 'function') {\\n      var newOptions = beforeRequest(options);\\n\\n      if (newOptions) {\\n        options = newOptions;\\n      }\\n    }\\n\\n    var request = videojsXHR(options, function (error, response) {\\n      var reqResponse = request.response;\\n\\n      if (!error && reqResponse) {\\n        request.responseTime = Date.now();\\n        request.roundTripTime = request.responseTime - request.requestTime;\\n        request.bytesReceived = reqResponse.byteLength || reqResponse.length;\\n\\n        if (!request.bandwidth) {\\n          request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\\n        }\\n      }\\n\\n      if (response.headers) {\\n        request.responseHeaders = response.headers;\\n      } // videojs.xhr now uses a specific code on the error\\n      // object to signal that a request has timed out instead\\n      // of setting a boolean on the request object\\n\\n\\n      if (error && error.code === 'ETIMEDOUT') {\\n        request.timedout = true;\\n      } // videojs.xhr no longer considers status codes outside of 200 and 0\\n      // (for file uris) to be errors, but the old XHR did, so emulate that\\n      // behavior. Status 206 may be used in response to byterange requests.\\n\\n\\n      if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\\n        error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\\n      }\\n\\n      callback(error, request);\\n    });\\n    var originalAbort = request.abort;\\n\\n    request.abort = function () {\\n      request.aborted = true;\\n      return originalAbort.apply(request, arguments);\\n    };\\n\\n    request.uri = options.uri;\\n    request.requestTime = Date.now();\\n    return request;\\n  };\\n\\n  return xhr;\\n};\\n/**\\n * Turns segment byterange into a string suitable for use in\\n * HTTP Range requests\\n *\\n * @param {Object} byterange - an object with two values defining the start and end\\n *                             of a byte-range\\n */\\n\\n\\nvar byterangeStr = function byterangeStr(byterange) {\\n  var byterangeStart = void 0;\\n  var byterangeEnd = void 0; // `byterangeEnd` is one less than `offset + length` because the HTTP range\\n  // header uses inclusive ranges\\n\\n  byterangeEnd = byterange.offset + byterange.length - 1;\\n  byterangeStart = byterange.offset;\\n  return 'bytes=' + byterangeStart + '-' + byterangeEnd;\\n};\\n/**\\n * Defines headers for use in the xhr request for a particular segment.\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n */\\n\\n\\nvar segmentXhrHeaders = function segmentXhrHeaders(segment) {\\n  var headers = {};\\n\\n  if (segment.byterange) {\\n    headers.Range = byterangeStr(segment.byterange);\\n  }\\n\\n  return headers;\\n};\\n/**\\n * @file bin-utils.js\\n */\\n\\n/**\\n * convert a TimeRange to text\\n *\\n * @param {TimeRange} range the timerange to use for conversion\\n * @param {Number} i the iterator on the range to convert\\n */\\n\\n\\nvar textRange = function textRange(range, i) {\\n  return range.start(i) + '-' + range.end(i);\\n};\\n/**\\n * format a number as hex string\\n *\\n * @param {Number} e The number\\n * @param {Number} i the iterator\\n */\\n\\n\\nvar formatHexString = function formatHexString(e, i) {\\n  var value = e.toString(16);\\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\\n};\\n\\nvar formatAsciiString = function formatAsciiString(e) {\\n  if (e >= 0x20 && e < 0x7e) {\\n    return String.fromCharCode(e);\\n  }\\n\\n  return '.';\\n};\\n/**\\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\\n *\\n * @param {Object} message\\n *        Object of properties and values to send to the web worker\\n * @return {Object}\\n *         Modified message with TypedArray values expanded\\n * @function createTransferableMessage\\n */\\n\\n\\nvar createTransferableMessage = function createTransferableMessage(message) {\\n  var transferable = {};\\n  Object.keys(message).forEach(function (key) {\\n    var value = message[key];\\n\\n    if (ArrayBuffer.isView(value)) {\\n      transferable[key] = {\\n        bytes: value.buffer,\\n        byteOffset: value.byteOffset,\\n        byteLength: value.byteLength\\n      };\\n    } else {\\n      transferable[key] = value;\\n    }\\n  });\\n  return transferable;\\n};\\n/**\\n * Returns a unique string identifier for a media initialization\\n * segment.\\n */\\n\\n\\nvar initSegmentId = function initSegmentId(initSegment) {\\n  var byterange = initSegment.byterange || {\\n    length: Infinity,\\n    offset: 0\\n  };\\n  return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\\n};\\n/**\\n * Returns a unique string identifier for a media segment key.\\n */\\n\\n\\nvar segmentKeyId = function segmentKeyId(key) {\\n  return key.resolvedUri;\\n};\\n/**\\n * utils to help dump binary data to the console\\n */\\n\\n\\nvar hexDump = function hexDump(data) {\\n  var bytes = Array.prototype.slice.call(data);\\n  var step = 16;\\n  var result = '';\\n  var hex = void 0;\\n  var ascii = void 0;\\n\\n  for (var j = 0; j < bytes.length / step; j++) {\\n    hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\\n    ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\\n    result += hex + ' ' + ascii + '\\\\n';\\n  }\\n\\n  return result;\\n};\\n\\nvar tagDump = function tagDump(_ref) {\\n  var bytes = _ref.bytes;\\n  return hexDump(bytes);\\n};\\n\\nvar textRanges = function textRanges(ranges) {\\n  var result = '';\\n  var i = void 0;\\n\\n  for (i = 0; i < ranges.length; i++) {\\n    result += textRange(ranges, i) + ' ';\\n  }\\n\\n  return result;\\n};\\n\\nvar utils = /*#__PURE__*/Object.freeze({\\n  createTransferableMessage: createTransferableMessage,\\n  initSegmentId: initSegmentId,\\n  segmentKeyId: segmentKeyId,\\n  hexDump: hexDump,\\n  tagDump: tagDump,\\n  textRanges: textRanges\\n}); // TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\\n// Add 25% to the segment duration to account for small discrepencies in segment timing.\\n// 25% was arbitrarily chosen, and may need to be refined over time.\\n\\nvar SEGMENT_END_FUDGE_PERCENT = 0.25;\\n/**\\n * Converts a player time (any time that can be gotten/set from player.currentTime(),\\n * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\\n * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\\n *\\n * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \\\"anchor\\n * point\\\" (a point where we have a mapping from program time to player time, with player\\n * time being the post transmux start of the segment).\\n *\\n * For more details, see [this doc](../../docs/program-time-from-player-time.md).\\n *\\n * @param {Number} playerTime the player time\\n * @param {Object} segment the segment which contains the player time\\n * @return {Date} program time\\n */\\n\\nvar playerTimeToProgramTime = function playerTimeToProgramTime(playerTime, segment) {\\n  if (!segment.dateTimeObject) {\\n    // Can't convert without an \\\"anchor point\\\" for the program time (i.e., a time that can\\n    // be used to map the start of a segment with a real world time).\\n    return null;\\n  }\\n\\n  var transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\\n  var transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\\n\\n  var startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\\n  var offsetFromSegmentStart = playerTime - startOfSegment;\\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\\n};\\n\\nvar originalSegmentVideoDuration = function originalSegmentVideoDuration(videoTimingInfo) {\\n  return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\\n};\\n/**\\n * Finds a segment that contains the time requested given as an ISO-8601 string. The\\n * returned segment might be an estimate or an accurate match.\\n *\\n * @param {String} programTime The ISO-8601 programTime to find a match for\\n * @param {Object} playlist A playlist object to search within\\n */\\n\\n\\nvar findSegmentForProgramTime = function findSegmentForProgramTime(programTime, playlist) {\\n  // Assumptions:\\n  //  - verifyProgramDateTimeTags has already been run\\n  //  - live streams have been started\\n  var dateTimeObject = void 0;\\n\\n  try {\\n    dateTimeObject = new Date(programTime);\\n  } catch (e) {\\n    return null;\\n  }\\n\\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\\n    return null;\\n  }\\n\\n  var segment = playlist.segments[0];\\n\\n  if (dateTimeObject < segment.dateTimeObject) {\\n    // Requested time is before stream start.\\n    return null;\\n  }\\n\\n  for (var i = 0; i < playlist.segments.length - 1; i++) {\\n    segment = playlist.segments[i];\\n    var nextSegmentStart = playlist.segments[i + 1].dateTimeObject;\\n\\n    if (dateTimeObject < nextSegmentStart) {\\n      break;\\n    }\\n  }\\n\\n  var lastSegment = playlist.segments[playlist.segments.length - 1];\\n  var lastSegmentStart = lastSegment.dateTimeObject;\\n  var lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\\n  var lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\\n\\n  if (dateTimeObject > lastSegmentEnd) {\\n    // Beyond the end of the stream, or our best guess of the end of the stream.\\n    return null;\\n  }\\n\\n  if (dateTimeObject > lastSegmentStart) {\\n    segment = lastSegment;\\n  }\\n\\n  return {\\n    segment: segment,\\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\\n    // Although, given that all segments have accurate date time objects, the segment\\n    // selected should be accurate, unless the video has been transmuxed at some point\\n    // (determined by the presence of the videoTimingInfo object), the segment's \\\"player\\n    // time\\\" (the start time in the player) can't be considered accurate.\\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\\n  };\\n};\\n/**\\n * Finds a segment that contains the given player time(in seconds).\\n *\\n * @param {Number} time The player time to find a match for\\n * @param {Object} playlist A playlist object to search within\\n */\\n\\n\\nvar findSegmentForPlayerTime = function findSegmentForPlayerTime(time, playlist) {\\n  // Assumptions:\\n  // - there will always be a segment.duration\\n  // - we can start from zero\\n  // - segments are in time order\\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\\n    return null;\\n  }\\n\\n  var segmentEnd = 0;\\n  var segment = void 0;\\n\\n  for (var i = 0; i < playlist.segments.length; i++) {\\n    segment = playlist.segments[i]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\\n    // should contain the most accurate values we have for the segment's player times.\\n    //\\n    // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\\n    // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\\n    // calculate an end value.\\n\\n    segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\\n\\n    if (time <= segmentEnd) {\\n      break;\\n    }\\n  }\\n\\n  var lastSegment = playlist.segments[playlist.segments.length - 1];\\n\\n  if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\\n    // The time requested is beyond the stream end.\\n    return null;\\n  }\\n\\n  if (time > segmentEnd) {\\n    // The time is within or beyond the last segment.\\n    //\\n    // Check to see if the time is beyond a reasonable guess of the end of the stream.\\n    if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\\n      // Technically, because the duration value is only an estimate, the time may still\\n      // exist in the last segment, however, there isn't enough information to make even\\n      // a reasonable estimate.\\n      return null;\\n    }\\n\\n    segment = lastSegment;\\n  }\\n\\n  return {\\n    segment: segment,\\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\\n    // Because videoTimingInfo is only set after transmux, it is the only way to get\\n    // accurate timing values.\\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\\n  };\\n};\\n/**\\n * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\\n * If the offset returned is positive, the programTime occurs after the\\n * comparisonTimestamp.\\n * If the offset is negative, the programTime occurs before the comparisonTimestamp.\\n *\\n * @param {String} comparisonTimeStamp An ISO-8601 timestamp to compare against\\n * @param {String} programTime The programTime as an ISO-8601 string\\n * @return {Number} offset\\n */\\n\\n\\nvar getOffsetFromTimestamp = function getOffsetFromTimestamp(comparisonTimeStamp, programTime) {\\n  var segmentDateTime = void 0;\\n  var programDateTime = void 0;\\n\\n  try {\\n    segmentDateTime = new Date(comparisonTimeStamp);\\n    programDateTime = new Date(programTime);\\n  } catch (e) {// TODO handle error\\n  }\\n\\n  var segmentTimeEpoch = segmentDateTime.getTime();\\n  var programTimeEpoch = programDateTime.getTime();\\n  return (programTimeEpoch - segmentTimeEpoch) / 1000;\\n};\\n/**\\n * Checks that all segments in this playlist have programDateTime tags.\\n *\\n * @param {Object} playlist A playlist object\\n */\\n\\n\\nvar verifyProgramDateTimeTags = function verifyProgramDateTimeTags(playlist) {\\n  if (!playlist.segments || playlist.segments.length === 0) {\\n    return false;\\n  }\\n\\n  for (var i = 0; i < playlist.segments.length; i++) {\\n    var segment = playlist.segments[i];\\n\\n    if (!segment.dateTimeObject) {\\n      return false;\\n    }\\n  }\\n\\n  return true;\\n};\\n/**\\n * Returns the programTime of the media given a playlist and a playerTime.\\n * The playlist must have programDateTime tags for a programDateTime tag to be returned.\\n * If the segments containing the time requested have not been buffered yet, an estimate\\n * may be returned to the callback.\\n *\\n * @param {Object} args\\n * @param {Object} args.playlist A playlist object to search within\\n * @param {Number} time A playerTime in seconds\\n * @param {Function} callback(err, programTime)\\n * @returns {String} err.message A detailed error message\\n * @returns {Object} programTime\\n * @returns {Number} programTime.mediaSeconds The streamTime in seconds\\n * @returns {String} programTime.programDateTime The programTime as an ISO-8601 String\\n */\\n\\n\\nvar getProgramTime = function getProgramTime(_ref) {\\n  var playlist = _ref.playlist,\\n      _ref$time = _ref.time,\\n      time = _ref$time === undefined ? undefined : _ref$time,\\n      callback = _ref.callback;\\n\\n  if (!callback) {\\n    throw new Error('getProgramTime: callback must be provided');\\n  }\\n\\n  if (!playlist || time === undefined) {\\n    return callback({\\n      message: 'getProgramTime: playlist and time must be provided'\\n    });\\n  }\\n\\n  var matchedSegment = findSegmentForPlayerTime(time, playlist);\\n\\n  if (!matchedSegment) {\\n    return callback({\\n      message: 'valid programTime was not found'\\n    });\\n  }\\n\\n  if (matchedSegment.type === 'estimate') {\\n    return callback({\\n      message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\\n      seekTime: matchedSegment.estimatedStart\\n    });\\n  }\\n\\n  var programTimeObject = {\\n    mediaSeconds: time\\n  };\\n  var programTime = playerTimeToProgramTime(time, matchedSegment.segment);\\n\\n  if (programTime) {\\n    programTimeObject.programDateTime = programTime.toISOString();\\n  }\\n\\n  return callback(null, programTimeObject);\\n};\\n/**\\n * Seeks in the player to a time that matches the given programTime ISO-8601 string.\\n *\\n * @param {Object} args\\n * @param {String} args.programTime A programTime to seek to as an ISO-8601 String\\n * @param {Object} args.playlist A playlist to look within\\n * @param {Number} args.retryCount The number of times to try for an accurate seek. Default is 2.\\n * @param {Function} args.seekTo A method to perform a seek\\n * @param {Boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\\n * @param {Object} args.tech The tech to seek on\\n * @param {Function} args.callback(err, newTime) A callback to return the new time to\\n * @returns {String} err.message A detailed error message\\n * @returns {Number} newTime The exact time that was seeked to in seconds\\n */\\n\\n\\nvar seekToProgramTime = function seekToProgramTime(_ref2) {\\n  var programTime = _ref2.programTime,\\n      playlist = _ref2.playlist,\\n      _ref2$retryCount = _ref2.retryCount,\\n      retryCount = _ref2$retryCount === undefined ? 2 : _ref2$retryCount,\\n      seekTo = _ref2.seekTo,\\n      _ref2$pauseAfterSeek = _ref2.pauseAfterSeek,\\n      pauseAfterSeek = _ref2$pauseAfterSeek === undefined ? true : _ref2$pauseAfterSeek,\\n      tech = _ref2.tech,\\n      callback = _ref2.callback;\\n\\n  if (!callback) {\\n    throw new Error('seekToProgramTime: callback must be provided');\\n  }\\n\\n  if (typeof programTime === 'undefined' || !playlist || !seekTo) {\\n    return callback({\\n      message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\\n    });\\n  }\\n\\n  if (!playlist.endList && !tech.hasStarted_) {\\n    return callback({\\n      message: 'player must be playing a live stream to start buffering'\\n    });\\n  }\\n\\n  if (!verifyProgramDateTimeTags(playlist)) {\\n    return callback({\\n      message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\\n    });\\n  }\\n\\n  var matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\\n\\n  if (!matchedSegment) {\\n    return callback({\\n      message: programTime + ' was not found in the stream'\\n    });\\n  }\\n\\n  var segment = matchedSegment.segment;\\n  var mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\\n\\n  if (matchedSegment.type === 'estimate') {\\n    // we've run out of retries\\n    if (retryCount === 0) {\\n      return callback({\\n        message: programTime + ' is not buffered yet. Try again'\\n      });\\n    }\\n\\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\\n    tech.one('seeked', function () {\\n      seekToProgramTime({\\n        programTime: programTime,\\n        playlist: playlist,\\n        retryCount: retryCount - 1,\\n        seekTo: seekTo,\\n        pauseAfterSeek: pauseAfterSeek,\\n        tech: tech,\\n        callback: callback\\n      });\\n    });\\n    return;\\n  } // Since the segment.start value is determined from the buffered end or ending time\\n  // of the prior segment, the seekToTime doesn't need to account for any transmuxer\\n  // modifications.\\n\\n\\n  var seekToTime = segment.start + mediaOffset;\\n\\n  var seekedCallback = function seekedCallback() {\\n    return callback(null, tech.currentTime());\\n  }; // listen for seeked event\\n\\n\\n  tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\\n\\n  if (pauseAfterSeek) {\\n    tech.pause();\\n  }\\n\\n  seekTo(seekToTime);\\n};\\n/**\\n * ranges\\n *\\n * Utilities for working with TimeRanges.\\n *\\n */\\n// Fudge factor to account for TimeRanges rounding\\n\\n\\nvar TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\\n// can be misleading because of precision differences or when the current media has poorly\\n// aligned audio and video, which can cause values to be slightly off from what you would\\n// expect. This value is what we consider to be safe to use in such comparisons to account\\n// for these scenarios.\\n\\nvar SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\\n\\nvar filterRanges = function filterRanges(timeRanges, predicate) {\\n  var results = [];\\n  var i = void 0;\\n\\n  if (timeRanges && timeRanges.length) {\\n    // Search for ranges that match the predicate\\n    for (i = 0; i < timeRanges.length; i++) {\\n      if (predicate(timeRanges.start(i), timeRanges.end(i))) {\\n        results.push([timeRanges.start(i), timeRanges.end(i)]);\\n      }\\n    }\\n  }\\n\\n  return videojs$1.createTimeRanges(results);\\n};\\n/**\\n * Attempts to find the buffered TimeRange that contains the specified\\n * time.\\n * @param {TimeRanges} buffered - the TimeRanges object to query\\n * @param {number} time  - the time to filter on.\\n * @returns {TimeRanges} a new TimeRanges object\\n */\\n\\n\\nvar findRange = function findRange(buffered, time) {\\n  return filterRanges(buffered, function (start, end) {\\n    return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\\n  });\\n};\\n/**\\n * Returns the TimeRanges that begin later than the specified time.\\n * @param {TimeRanges} timeRanges - the TimeRanges object to query\\n * @param {number} time - the time to filter on.\\n * @returns {TimeRanges} a new TimeRanges object.\\n */\\n\\n\\nvar findNextRange = function findNextRange(timeRanges, time) {\\n  return filterRanges(timeRanges, function (start) {\\n    return start - TIME_FUDGE_FACTOR >= time;\\n  });\\n};\\n/**\\n * Returns gaps within a list of TimeRanges\\n * @param {TimeRanges} buffered - the TimeRanges object\\n * @return {TimeRanges} a TimeRanges object of gaps\\n */\\n\\n\\nvar findGaps = function findGaps(buffered) {\\n  if (buffered.length < 2) {\\n    return videojs$1.createTimeRanges();\\n  }\\n\\n  var ranges = [];\\n\\n  for (var i = 1; i < buffered.length; i++) {\\n    var start = buffered.end(i - 1);\\n    var end = buffered.start(i);\\n    ranges.push([start, end]);\\n  }\\n\\n  return videojs$1.createTimeRanges(ranges);\\n};\\n/**\\n * Gets a human readable string for a TimeRange\\n *\\n * @param {TimeRange} range\\n * @returns {String} a human readable string\\n */\\n\\n\\nvar printableRange = function printableRange(range) {\\n  var strArr = [];\\n\\n  if (!range || !range.length) {\\n    return '';\\n  }\\n\\n  for (var i = 0; i < range.length; i++) {\\n    strArr.push(range.start(i) + ' => ' + range.end(i));\\n  }\\n\\n  return strArr.join(', ');\\n};\\n/**\\n * Calculates the amount of time left in seconds until the player hits the end of the\\n * buffer and causes a rebuffer\\n *\\n * @param {TimeRange} buffered\\n *        The state of the buffer\\n * @param {Numnber} currentTime\\n *        The current time of the player\\n * @param {Number} playbackRate\\n *        The current playback rate of the player. Defaults to 1.\\n * @return {Number}\\n *         Time until the player has to start rebuffering in seconds.\\n * @function timeUntilRebuffer\\n */\\n\\n\\nvar timeUntilRebuffer = function timeUntilRebuffer(buffered, currentTime) {\\n  var playbackRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\\n  var bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\\n  return (bufferedEnd - currentTime) / playbackRate;\\n};\\n/**\\n * Converts a TimeRanges object into an array representation\\n * @param {TimeRanges} timeRanges\\n * @returns {Array}\\n */\\n\\n\\nvar timeRangesToArray = function timeRangesToArray(timeRanges) {\\n  var timeRangesList = [];\\n\\n  for (var i = 0; i < timeRanges.length; i++) {\\n    timeRangesList.push({\\n      start: timeRanges.start(i),\\n      end: timeRanges.end(i)\\n    });\\n  }\\n\\n  return timeRangesList;\\n};\\n/**\\n * @file create-text-tracks-if-necessary.js\\n */\\n\\n/**\\n * Create text tracks on video.js if they exist on a segment.\\n *\\n * @param {Object} sourceBuffer the VSB or FSB\\n * @param {Object} mediaSource the HTML media source\\n * @param {Object} segment the segment that may contain the text track\\n * @private\\n */\\n\\n\\nvar createTextTracksIfNecessary = function createTextTracksIfNecessary(sourceBuffer, mediaSource, segment) {\\n  var player = mediaSource.player_; // create an in-band caption track if one is present in the segment\\n\\n  if (segment.captions && segment.captions.length) {\\n    if (!sourceBuffer.inbandTextTracks_) {\\n      sourceBuffer.inbandTextTracks_ = {};\\n    }\\n\\n    for (var trackId in segment.captionStreams) {\\n      if (!sourceBuffer.inbandTextTracks_[trackId]) {\\n        player.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-608'\\n        });\\n        var track = player.textTracks().getTrackById(trackId);\\n\\n        if (track) {\\n          // Resuse an existing track with a CC# id because this was\\n          // very likely created by videojs-contrib-hls from information\\n          // in the m3u8 for us to use\\n          sourceBuffer.inbandTextTracks_[trackId] = track;\\n        } else {\\n          // Otherwise, create a track with the default `CC#` label and\\n          // without a language\\n          sourceBuffer.inbandTextTracks_[trackId] = player.addRemoteTextTrack({\\n            kind: 'captions',\\n            id: trackId,\\n            label: trackId\\n          }, false).track;\\n        }\\n      }\\n    }\\n  }\\n\\n  if (segment.metadata && segment.metadata.length && !sourceBuffer.metadataTrack_) {\\n    sourceBuffer.metadataTrack_ = player.addRemoteTextTrack({\\n      kind: 'metadata',\\n      label: 'Timed Metadata'\\n    }, false).track;\\n    sourceBuffer.metadataTrack_.inBandMetadataTrackDispatchType = segment.metadata.dispatchType;\\n  }\\n};\\n/**\\n * @file remove-cues-from-track.js\\n */\\n\\n/**\\n * Remove cues from a track on video.js.\\n *\\n * @param {Double} start start of where we should remove the cue\\n * @param {Double} end end of where the we should remove the cue\\n * @param {Object} track the text track to remove the cues from\\n * @private\\n */\\n\\n\\nvar removeCuesFromTrack = function removeCuesFromTrack(start, end, track) {\\n  var i = void 0;\\n  var cue = void 0;\\n\\n  if (!track) {\\n    return;\\n  }\\n\\n  if (!track.cues) {\\n    return;\\n  }\\n\\n  i = track.cues.length;\\n\\n  while (i--) {\\n    cue = track.cues[i]; // Remove any overlapping cue\\n\\n    if (cue.startTime <= end && cue.endTime >= start) {\\n      track.removeCue(cue);\\n    }\\n  }\\n};\\n/**\\n * @file add-text-track-data.js\\n */\\n\\n/**\\n * Define properties on a cue for backwards compatability,\\n * but warn the user that the way that they are using it\\n * is depricated and will be removed at a later date.\\n *\\n * @param {Cue} cue the cue to add the properties on\\n * @private\\n */\\n\\n\\nvar deprecateOldCue = function deprecateOldCue(cue) {\\n  Object.defineProperties(cue.frame, {\\n    id: {\\n      get: function get() {\\n        videojs$1.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\\n        return cue.value.key;\\n      }\\n    },\\n    value: {\\n      get: function get() {\\n        videojs$1.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\\n        return cue.value.data;\\n      }\\n    },\\n    privateData: {\\n      get: function get() {\\n        videojs$1.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\\n        return cue.value.data;\\n      }\\n    }\\n  });\\n};\\n\\nvar durationOfVideo = function durationOfVideo(duration) {\\n  var dur = void 0;\\n\\n  if (isNaN(duration) || Math.abs(duration) === Infinity) {\\n    dur = Number.MAX_VALUE;\\n  } else {\\n    dur = duration;\\n  }\\n\\n  return dur;\\n};\\n/**\\n * Add text track data to a source handler given the captions and\\n * metadata from the buffer.\\n *\\n * @param {Object} sourceHandler the virtual source buffer\\n * @param {Array} captionArray an array of caption data\\n * @param {Array} metadataArray an array of meta data\\n * @private\\n */\\n\\n\\nvar addTextTrackData = function addTextTrackData(sourceHandler, captionArray, metadataArray) {\\n  var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\\n\\n  if (captionArray) {\\n    captionArray.forEach(function (caption) {\\n      var track = caption.stream;\\n      this.inbandTextTracks_[track].addCue(new Cue(caption.startTime + this.timestampOffset, caption.endTime + this.timestampOffset, caption.text));\\n    }, sourceHandler);\\n  }\\n\\n  if (metadataArray) {\\n    var videoDuration = durationOfVideo(sourceHandler.mediaSource_.duration);\\n    metadataArray.forEach(function (metadata) {\\n      var time = metadata.cueTime + this.timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\\n      // ignore this bit of metadata.\\n      // This likely occurs when you have an non-timed ID3 tag like TIT2,\\n      // which is the \\\"Title/Songname/Content description\\\" frame\\n\\n      if (typeof time !== 'number' || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.isNaN(time) || time < 0 || !(time < Infinity)) {\\n        return;\\n      }\\n\\n      metadata.frames.forEach(function (frame) {\\n        var cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\\n        cue.frame = frame;\\n        cue.value = frame;\\n        deprecateOldCue(cue);\\n        this.metadataTrack_.addCue(cue);\\n      }, this);\\n    }, sourceHandler); // Updating the metadeta cues so that\\n    // the endTime of each cue is the startTime of the next cue\\n    // the endTime of last cue is the duration of the video\\n\\n    if (sourceHandler.metadataTrack_ && sourceHandler.metadataTrack_.cues && sourceHandler.metadataTrack_.cues.length) {\\n      var cues = sourceHandler.metadataTrack_.cues;\\n      var cuesArray = []; // Create a copy of the TextTrackCueList...\\n      // ...disregarding cues with a falsey value\\n\\n      for (var i = 0; i < cues.length; i++) {\\n        if (cues[i]) {\\n          cuesArray.push(cues[i]);\\n        }\\n      } // Group cues by their startTime value\\n\\n\\n      var cuesGroupedByStartTime = cuesArray.reduce(function (obj, cue) {\\n        var timeSlot = obj[cue.startTime] || [];\\n        timeSlot.push(cue);\\n        obj[cue.startTime] = timeSlot;\\n        return obj;\\n      }, {}); // Sort startTimes by ascending order\\n\\n      var sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort(function (a, b) {\\n        return Number(a) - Number(b);\\n      }); // Map each cue group's endTime to the next group's startTime\\n\\n      sortedStartTimes.forEach(function (startTime, idx) {\\n        var cueGroup = cuesGroupedByStartTime[startTime];\\n        var nextTime = Number(sortedStartTimes[idx + 1]) || videoDuration; // Map each cue's endTime the next group's startTime\\n\\n        cueGroup.forEach(function (cue) {\\n          cue.endTime = nextTime;\\n        });\\n      });\\n    }\\n  }\\n};\\n\\nvar win = typeof window !== 'undefined' ? window : {},\\n    TARGET = typeof Symbol === 'undefined' ? '__target' : Symbol(),\\n    SCRIPT_TYPE = 'application/javascript',\\n    BlobBuilder = win.BlobBuilder || win.WebKitBlobBuilder || win.MozBlobBuilder || win.MSBlobBuilder,\\n    URL = win.URL || win.webkitURL || URL && URL.msURL,\\n    Worker = win.Worker;\\n/**\\n * Returns a wrapper around Web Worker code that is constructible.\\n *\\n * @function shimWorker\\n *\\n * @param { String }    filename    The name of the file\\n * @param { Function }  fn          Function wrapping the code of the worker\\n */\\n\\nfunction shimWorker(filename, fn) {\\n  return function ShimWorker(forceFallback) {\\n    var o = this;\\n\\n    if (!fn) {\\n      return new Worker(filename);\\n    } else if (Worker && !forceFallback) {\\n      // Convert the function's inner code to a string to construct the worker\\n      var source = fn.toString().replace(/^function.+?{/, '').slice(0, -1),\\n          objURL = createSourceObject(source);\\n      this[TARGET] = new Worker(objURL);\\n      wrapTerminate(this[TARGET], objURL);\\n      return this[TARGET];\\n    } else {\\n      var selfShim = {\\n        postMessage: function postMessage(m) {\\n          if (o.onmessage) {\\n            setTimeout(function () {\\n              o.onmessage({\\n                data: m,\\n                target: selfShim\\n              });\\n            });\\n          }\\n        }\\n      };\\n      fn.call(selfShim);\\n\\n      this.postMessage = function (m) {\\n        setTimeout(function () {\\n          selfShim.onmessage({\\n            data: m,\\n            target: o\\n          });\\n        });\\n      };\\n\\n      this.isThisThread = true;\\n    }\\n  };\\n} // Test Worker capabilities\\n\\n\\nif (Worker) {\\n  var testWorker,\\n      objURL = createSourceObject('self.onmessage = function () {}'),\\n      testArray = new Uint8Array(1);\\n\\n  try {\\n    testWorker = new Worker(objURL); // Native browser on some Samsung devices throws for transferables, let's detect it\\n\\n    testWorker.postMessage(testArray, [testArray.buffer]);\\n  } catch (e) {\\n    Worker = null;\\n  } finally {\\n    URL.revokeObjectURL(objURL);\\n\\n    if (testWorker) {\\n      testWorker.terminate();\\n    }\\n  }\\n}\\n\\nfunction createSourceObject(str) {\\n  try {\\n    return URL.createObjectURL(new Blob([str], {\\n      type: SCRIPT_TYPE\\n    }));\\n  } catch (e) {\\n    var blob = new BlobBuilder();\\n    blob.append(str);\\n    return URL.createObjectURL(blob.getBlob(type));\\n  }\\n}\\n\\nfunction wrapTerminate(worker, objURL) {\\n  if (!worker || !objURL) return;\\n  var term = worker.terminate;\\n  worker.objURL = objURL;\\n\\n  worker.terminate = function () {\\n    if (worker.objURL) URL.revokeObjectURL(worker.objURL);\\n    term.call(worker);\\n  };\\n}\\n\\nvar TransmuxWorker = new shimWorker(\\\"./transmuxer-worker.worker.js\\\", function (window, document$$1) {\\n  var self = this;\\n\\n  var transmuxerWorker = function () {\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * A lightweight readable stream implemention that handles event dispatching.\\n     * Objects that inherit from streams should call init in their constructors.\\n     */\\n    var Stream = function Stream() {\\n      this.init = function () {\\n        var listeners = {};\\n        /**\\n         * Add a listener for a specified event type.\\n         * @param type {string} the event name\\n         * @param listener {function} the callback to be invoked when an event of\\n         * the specified type occurs\\n         */\\n\\n        this.on = function (type, listener) {\\n          if (!listeners[type]) {\\n            listeners[type] = [];\\n          }\\n\\n          listeners[type] = listeners[type].concat(listener);\\n        };\\n        /**\\n         * Remove a listener for a specified event type.\\n         * @param type {string} the event name\\n         * @param listener {function} a function previously registered for this\\n         * type of event through `on`\\n         */\\n\\n\\n        this.off = function (type, listener) {\\n          var index;\\n\\n          if (!listeners[type]) {\\n            return false;\\n          }\\n\\n          index = listeners[type].indexOf(listener);\\n          listeners[type] = listeners[type].slice();\\n          listeners[type].splice(index, 1);\\n          return index > -1;\\n        };\\n        /**\\n         * Trigger an event of the specified type on this stream. Any additional\\n         * arguments to this function are passed as parameters to event listeners.\\n         * @param type {string} the event name\\n         */\\n\\n\\n        this.trigger = function (type) {\\n          var callbacks, i, length, args;\\n          callbacks = listeners[type];\\n\\n          if (!callbacks) {\\n            return;\\n          } // Slicing the arguments on every invocation of this method\\n          // can add a significant amount of overhead. Avoid the\\n          // intermediate object creation for the common case of a\\n          // single callback argument\\n\\n\\n          if (arguments.length === 2) {\\n            length = callbacks.length;\\n\\n            for (i = 0; i < length; ++i) {\\n              callbacks[i].call(this, arguments[1]);\\n            }\\n          } else {\\n            args = [];\\n            i = arguments.length;\\n\\n            for (i = 1; i < arguments.length; ++i) {\\n              args.push(arguments[i]);\\n            }\\n\\n            length = callbacks.length;\\n\\n            for (i = 0; i < length; ++i) {\\n              callbacks[i].apply(this, args);\\n            }\\n          }\\n        };\\n        /**\\n         * Destroys the stream and cleans up.\\n         */\\n\\n\\n        this.dispose = function () {\\n          listeners = {};\\n        };\\n      };\\n    };\\n    /**\\n     * Forwards all `data` events on this stream to the destination stream. The\\n     * destination stream should provide a method `push` to receive the data\\n     * events as they arrive.\\n     * @param destination {stream} the stream that will receive all `data` events\\n     * @param autoFlush {boolean} if false, we will not call `flush` on the destination\\n     *                            when the current stream emits a 'done' event\\n     * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n     */\\n\\n\\n    Stream.prototype.pipe = function (destination) {\\n      this.on('data', function (data) {\\n        destination.push(data);\\n      });\\n      this.on('done', function (flushSource) {\\n        destination.flush(flushSource);\\n      });\\n      this.on('partialdone', function (flushSource) {\\n        destination.partialFlush(flushSource);\\n      });\\n      this.on('endedtimeline', function (flushSource) {\\n        destination.endTimeline(flushSource);\\n      });\\n      this.on('reset', function (flushSource) {\\n        destination.reset(flushSource);\\n      });\\n      return destination;\\n    }; // Default stream functions that are expected to be overridden to perform\\n    // actual work. These are provided by the prototype as a sort of no-op\\n    // implementation so that we don't have to check for their existence in the\\n    // `pipe` function above.\\n\\n\\n    Stream.prototype.push = function (data) {\\n      this.trigger('data', data);\\n    };\\n\\n    Stream.prototype.flush = function (flushSource) {\\n      this.trigger('done', flushSource);\\n    };\\n\\n    Stream.prototype.partialFlush = function (flushSource) {\\n      this.trigger('partialdone', flushSource);\\n    };\\n\\n    Stream.prototype.endTimeline = function (flushSource) {\\n      this.trigger('endedtimeline', flushSource);\\n    };\\n\\n    Stream.prototype.reset = function (flushSource) {\\n      this.trigger('reset', flushSource);\\n    };\\n\\n    var stream = Stream;\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * Functions that generate fragmented MP4s suitable for use with Media\\n     * Source Extensions.\\n     */\\n\\n    var UINT32_MAX = Math.pow(2, 32) - 1;\\n    var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\\n\\n    (function () {\\n      var i;\\n      types = {\\n        avc1: [],\\n        // codingname\\n        avcC: [],\\n        btrt: [],\\n        dinf: [],\\n        dref: [],\\n        esds: [],\\n        ftyp: [],\\n        hdlr: [],\\n        mdat: [],\\n        mdhd: [],\\n        mdia: [],\\n        mfhd: [],\\n        minf: [],\\n        moof: [],\\n        moov: [],\\n        mp4a: [],\\n        // codingname\\n        mvex: [],\\n        mvhd: [],\\n        pasp: [],\\n        sdtp: [],\\n        smhd: [],\\n        stbl: [],\\n        stco: [],\\n        stsc: [],\\n        stsd: [],\\n        stsz: [],\\n        stts: [],\\n        styp: [],\\n        tfdt: [],\\n        tfhd: [],\\n        traf: [],\\n        trak: [],\\n        trun: [],\\n        trex: [],\\n        tkhd: [],\\n        vmhd: []\\n      }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\\n      // don't throw an error\\n\\n      if (typeof Uint8Array === 'undefined') {\\n        return;\\n      }\\n\\n      for (i in types) {\\n        if (types.hasOwnProperty(i)) {\\n          types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\\n        }\\n      }\\n\\n      MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\\n      AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\\n      MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\\n      VIDEO_HDLR = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00, // pre_defined\\n      0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\\n      ]);\\n      AUDIO_HDLR = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00, // pre_defined\\n      0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\\n      ]);\\n      HDLR_TYPES = {\\n        video: VIDEO_HDLR,\\n        audio: AUDIO_HDLR\\n      };\\n      DREF = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x01, // entry_count\\n      0x00, 0x00, 0x00, 0x0c, // entry_size\\n      0x75, 0x72, 0x6c, 0x20, // 'url' type\\n      0x00, // version 0\\n      0x00, 0x00, 0x01 // entry_flags\\n      ]);\\n      SMHD = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, // balance, 0 means centered\\n      0x00, 0x00 // reserved\\n      ]);\\n      STCO = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00 // entry_count\\n      ]);\\n      STSC = STCO;\\n      STSZ = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00, // sample_size\\n      0x00, 0x00, 0x00, 0x00 // sample_count\\n      ]);\\n      STTS = STCO;\\n      VMHD = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x01, // flags\\n      0x00, 0x00, // graphicsmode\\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\\n      ]);\\n    })();\\n\\n    box = function box(type) {\\n      var payload = [],\\n          size = 0,\\n          i,\\n          result,\\n          view;\\n\\n      for (i = 1; i < arguments.length; i++) {\\n        payload.push(arguments[i]);\\n      }\\n\\n      i = payload.length; // calculate the total size we need to allocate\\n\\n      while (i--) {\\n        size += payload[i].byteLength;\\n      }\\n\\n      result = new Uint8Array(size + 8);\\n      view = new DataView(result.buffer, result.byteOffset, result.byteLength);\\n      view.setUint32(0, result.byteLength);\\n      result.set(type, 4); // copy the payload into the result\\n\\n      for (i = 0, size = 8; i < payload.length; i++) {\\n        result.set(payload[i], size);\\n        size += payload[i].byteLength;\\n      }\\n\\n      return result;\\n    };\\n\\n    dinf = function dinf() {\\n      return box(types.dinf, box(types.dref, DREF));\\n    };\\n\\n    esds = function esds(track) {\\n      return box(types.esds, new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      // ES_Descriptor\\n      0x03, // tag, ES_DescrTag\\n      0x19, // length\\n      0x00, 0x00, // ES_ID\\n      0x00, // streamDependenceFlag, URL_flag, reserved, streamPriority\\n      // DecoderConfigDescriptor\\n      0x04, // tag, DecoderConfigDescrTag\\n      0x11, // length\\n      0x40, // object type\\n      0x15, // streamType\\n      0x00, 0x06, 0x00, // bufferSizeDB\\n      0x00, 0x00, 0xda, 0xc0, // maxBitrate\\n      0x00, 0x00, 0xda, 0xc0, // avgBitrate\\n      // DecoderSpecificInfo\\n      0x05, // tag, DecoderSpecificInfoTag\\n      0x02, // length\\n      // ISO/IEC 14496-3, AudioSpecificConfig\\n      // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\\n      track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\\n      ]));\\n    };\\n\\n    ftyp = function ftyp() {\\n      return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\\n    };\\n\\n    hdlr = function hdlr(type) {\\n      return box(types.hdlr, HDLR_TYPES[type]);\\n    };\\n\\n    mdat = function mdat(data) {\\n      return box(types.mdat, data);\\n    };\\n\\n    mdhd = function mdhd(track) {\\n      var result = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x02, // creation_time\\n      0x00, 0x00, 0x00, 0x03, // modification_time\\n      0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \\\"ticks\\\" per second\\n      track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF, // duration\\n      0x55, 0xc4, // 'und' language (undetermined)\\n      0x00, 0x00]); // Use the sample rate from the track metadata, when it is\\n      // defined. The sample rate can be parsed out of an ADTS header, for\\n      // instance.\\n\\n      if (track.samplerate) {\\n        result[12] = track.samplerate >>> 24 & 0xFF;\\n        result[13] = track.samplerate >>> 16 & 0xFF;\\n        result[14] = track.samplerate >>> 8 & 0xFF;\\n        result[15] = track.samplerate & 0xFF;\\n      }\\n\\n      return box(types.mdhd, result);\\n    };\\n\\n    mdia = function mdia(track) {\\n      return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\\n    };\\n\\n    mfhd = function mfhd(sequenceNumber) {\\n      return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\\n      (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\\n      ]));\\n    };\\n\\n    minf = function minf(track) {\\n      return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\\n    };\\n\\n    moof = function moof(sequenceNumber, tracks) {\\n      var trackFragments = [],\\n          i = tracks.length; // build traf boxes for each track fragment\\n\\n      while (i--) {\\n        trackFragments[i] = traf(tracks[i]);\\n      }\\n\\n      return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\\n    };\\n    /**\\n     * Returns a movie box.\\n     * @param tracks {array} the tracks associated with this movie\\n     * @see ISO/IEC 14496-12:2012(E), section 8.2.1\\n     */\\n\\n\\n    moov = function moov(tracks) {\\n      var i = tracks.length,\\n          boxes = [];\\n\\n      while (i--) {\\n        boxes[i] = trak(tracks[i]);\\n      }\\n\\n      return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\\n    };\\n\\n    mvex = function mvex(tracks) {\\n      var i = tracks.length,\\n          boxes = [];\\n\\n      while (i--) {\\n        boxes[i] = trex(tracks[i]);\\n      }\\n\\n      return box.apply(null, [types.mvex].concat(boxes));\\n    };\\n\\n    mvhd = function mvhd(duration) {\\n      var bytes = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x01, // creation_time\\n      0x00, 0x00, 0x00, 0x02, // modification_time\\n      0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \\\"ticks\\\" per second\\n      (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF, // duration\\n      0x00, 0x01, 0x00, 0x00, // 1.0 rate\\n      0x01, 0x00, // 1.0 volume\\n      0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\\n      0xff, 0xff, 0xff, 0xff // next_track_ID\\n      ]);\\n      return box(types.mvhd, bytes);\\n    };\\n\\n    sdtp = function sdtp(track) {\\n      var samples = track.samples || [],\\n          bytes = new Uint8Array(4 + samples.length),\\n          flags,\\n          i; // leave the full box header (4 bytes) all zero\\n      // write the sample table\\n\\n      for (i = 0; i < samples.length; i++) {\\n        flags = samples[i].flags;\\n        bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\\n      }\\n\\n      return box(types.sdtp, bytes);\\n    };\\n\\n    stbl = function stbl(track) {\\n      return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\\n    };\\n\\n    (function () {\\n      var videoSample, audioSample;\\n\\n      stsd = function stsd(track) {\\n        return box(types.stsd, new Uint8Array([0x00, // version 0\\n        0x00, 0x00, 0x00, // flags\\n        0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\\n      };\\n\\n      videoSample = function videoSample(track) {\\n        var sps = track.sps || [],\\n            pps = track.pps || [],\\n            sequenceParameterSets = [],\\n            pictureParameterSets = [],\\n            i,\\n            avc1Box; // assemble the SPSs\\n\\n        for (i = 0; i < sps.length; i++) {\\n          sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\\n          sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\\n\\n          sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\\n        } // assemble the PPSs\\n\\n\\n        for (i = 0; i < pps.length; i++) {\\n          pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\\n          pictureParameterSets.push(pps[i].byteLength & 0xFF);\\n          pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\\n        }\\n\\n        avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x01, // data_reference_index\\n        0x00, 0x00, // pre_defined\\n        0x00, 0x00, // reserved\\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\\n        (track.width & 0xff00) >> 8, track.width & 0xff, // width\\n        (track.height & 0xff00) >> 8, track.height & 0xff, // height\\n        0x00, 0x48, 0x00, 0x00, // horizresolution\\n        0x00, 0x48, 0x00, 0x00, // vertresolution\\n        0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x01, // frame_count\\n        0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname\\n        0x00, 0x18, // depth = 24\\n        0x11, 0x11 // pre_defined = -1\\n        ]), box(types.avcC, new Uint8Array([0x01, // configurationVersion\\n        track.profileIdc, // AVCProfileIndication\\n        track.profileCompatibility, // profile_compatibility\\n        track.levelIdc, // AVCLevelIndication\\n        0xff // lengthSizeMinusOne, hard-coded to 4 bytes\\n        ].concat([sps.length], // numOfSequenceParameterSets\\n        sequenceParameterSets, // \\\"SPS\\\"\\n        [pps.length], // numOfPictureParameterSets\\n        pictureParameterSets // \\\"PPS\\\"\\n        ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\\n        0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\\n        0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\\n        ]))];\\n\\n        if (track.sarRatio) {\\n          var hSpacing = track.sarRatio[0],\\n              vSpacing = track.sarRatio[1];\\n          avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\\n        }\\n\\n        return box.apply(null, avc1Box);\\n      };\\n\\n      audioSample = function audioSample(track) {\\n        return box(types.mp4a, new Uint8Array([// SampleEntry, ISO/IEC 14496-12\\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x01, // data_reference_index\\n        // AudioSampleEntry, ISO/IEC 14496-12\\n        0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x00, 0x00, 0x00, // reserved\\n        (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff, // channelcount\\n        (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff, // samplesize\\n        0x00, 0x00, // pre_defined\\n        0x00, 0x00, // reserved\\n        (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\\n        // MP4AudioSampleEntry, ISO/IEC 14496-14\\n        ]), esds(track));\\n      };\\n    })();\\n\\n    tkhd = function tkhd(track) {\\n      var result = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x07, // flags\\n      0x00, 0x00, 0x00, 0x00, // creation_time\\n      0x00, 0x00, 0x00, 0x00, // modification_time\\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF, // duration\\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, // layer\\n      0x00, 0x00, // alternate_group\\n      0x01, 0x00, // non-audio track volume\\n      0x00, 0x00, // reserved\\n      0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\\n      (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00, // width\\n      (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\\n      ]);\\n      return box(types.tkhd, result);\\n    };\\n    /**\\n     * Generate a track fragment (traf) box. A traf box collects metadata\\n     * about tracks in a movie fragment (moof) box.\\n     */\\n\\n\\n    traf = function traf(track) {\\n      var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\\n      trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x3a, // flags\\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\\n      0x00, 0x00, 0x00, 0x01, // sample_description_index\\n      0x00, 0x00, 0x00, 0x00, // default_sample_duration\\n      0x00, 0x00, 0x00, 0x00, // default_sample_size\\n      0x00, 0x00, 0x00, 0x00 // default_sample_flags\\n      ]));\\n      upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / (UINT32_MAX + 1));\\n      lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % (UINT32_MAX + 1));\\n      trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01, // version 1\\n      0x00, 0x00, 0x00, // flags\\n      // baseMediaDecodeTime\\n      upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\\n      // the containing moof to the first payload byte of the associated\\n      // mdat\\n\\n      dataOffset = 32 + // tfhd\\n      20 + // tfdt\\n      8 + // traf header\\n      16 + // mfhd\\n      8 + // moof header\\n      8; // mdat header\\n      // audio tracks require less metadata\\n\\n      if (track.type === 'audio') {\\n        trackFragmentRun = trun(track, dataOffset);\\n        return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\\n      } // video tracks should contain an independent and disposable samples\\n      // box (sdtp)\\n      // generate one and adjust offsets to match\\n\\n\\n      sampleDependencyTable = sdtp(track);\\n      trackFragmentRun = trun(track, sampleDependencyTable.length + dataOffset);\\n      return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\\n    };\\n    /**\\n     * Generate a track box.\\n     * @param track {object} a track definition\\n     * @return {Uint8Array} the track box\\n     */\\n\\n\\n    trak = function trak(track) {\\n      track.duration = track.duration || 0xffffffff;\\n      return box(types.trak, tkhd(track), mdia(track));\\n    };\\n\\n    trex = function trex(track) {\\n      var result = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\\n      0x00, 0x00, 0x00, 0x01, // default_sample_description_index\\n      0x00, 0x00, 0x00, 0x00, // default_sample_duration\\n      0x00, 0x00, 0x00, 0x00, // default_sample_size\\n      0x00, 0x01, 0x00, 0x01 // default_sample_flags\\n      ]); // the last two bytes of default_sample_flags is the sample\\n      // degradation priority, a hint about the importance of this sample\\n      // relative to others. Lower the degradation priority for all sample\\n      // types other than video.\\n\\n      if (track.type !== 'video') {\\n        result[result.length - 1] = 0x00;\\n      }\\n\\n      return box(types.trex, result);\\n    };\\n\\n    (function () {\\n      var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\\n      // duration is present for the first sample, it will be present for\\n      // all subsequent samples.\\n      // see ISO/IEC 14496-12:2012, Section 8.8.8.1\\n\\n      trunHeader = function trunHeader(samples, offset) {\\n        var durationPresent = 0,\\n            sizePresent = 0,\\n            flagsPresent = 0,\\n            compositionTimeOffset = 0; // trun flag constants\\n\\n        if (samples.length) {\\n          if (samples[0].duration !== undefined) {\\n            durationPresent = 0x1;\\n          }\\n\\n          if (samples[0].size !== undefined) {\\n            sizePresent = 0x2;\\n          }\\n\\n          if (samples[0].flags !== undefined) {\\n            flagsPresent = 0x4;\\n          }\\n\\n          if (samples[0].compositionTimeOffset !== undefined) {\\n            compositionTimeOffset = 0x8;\\n          }\\n        }\\n\\n        return [0x00, // version 0\\n        0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01, // flags\\n        (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF, // sample_count\\n        (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\\n        ];\\n      };\\n\\n      videoTrun = function videoTrun(track, offset) {\\n        var bytes, samples, sample, i;\\n        samples = track.samples || [];\\n        offset += 8 + 12 + 16 * samples.length;\\n        bytes = trunHeader(samples, offset);\\n\\n        for (i = 0; i < samples.length; i++) {\\n          sample = samples[i];\\n          bytes = bytes.concat([(sample.duration & 0xFF000000) >>> 24, (sample.duration & 0xFF0000) >>> 16, (sample.duration & 0xFF00) >>> 8, sample.duration & 0xFF, // sample_duration\\n          (sample.size & 0xFF000000) >>> 24, (sample.size & 0xFF0000) >>> 16, (sample.size & 0xFF00) >>> 8, sample.size & 0xFF, // sample_size\\n          sample.flags.isLeading << 2 | sample.flags.dependsOn, sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample, sample.flags.degradationPriority & 0xF0 << 8, sample.flags.degradationPriority & 0x0F, // sample_flags\\n          (sample.compositionTimeOffset & 0xFF000000) >>> 24, (sample.compositionTimeOffset & 0xFF0000) >>> 16, (sample.compositionTimeOffset & 0xFF00) >>> 8, sample.compositionTimeOffset & 0xFF // sample_composition_time_offset\\n          ]);\\n        }\\n\\n        return box(types.trun, new Uint8Array(bytes));\\n      };\\n\\n      audioTrun = function audioTrun(track, offset) {\\n        var bytes, samples, sample, i;\\n        samples = track.samples || [];\\n        offset += 8 + 12 + 8 * samples.length;\\n        bytes = trunHeader(samples, offset);\\n\\n        for (i = 0; i < samples.length; i++) {\\n          sample = samples[i];\\n          bytes = bytes.concat([(sample.duration & 0xFF000000) >>> 24, (sample.duration & 0xFF0000) >>> 16, (sample.duration & 0xFF00) >>> 8, sample.duration & 0xFF, // sample_duration\\n          (sample.size & 0xFF000000) >>> 24, (sample.size & 0xFF0000) >>> 16, (sample.size & 0xFF00) >>> 8, sample.size & 0xFF]); // sample_size\\n        }\\n\\n        return box(types.trun, new Uint8Array(bytes));\\n      };\\n\\n      trun = function trun(track, offset) {\\n        if (track.type === 'audio') {\\n          return audioTrun(track, offset);\\n        }\\n\\n        return videoTrun(track, offset);\\n      };\\n    })();\\n\\n    var mp4Generator = {\\n      ftyp: ftyp,\\n      mdat: mdat,\\n      moof: moof,\\n      moov: moov,\\n      initSegment: function initSegment(tracks) {\\n        var fileType = ftyp(),\\n            movie = moov(tracks),\\n            result;\\n        result = new Uint8Array(fileType.byteLength + movie.byteLength);\\n        result.set(fileType);\\n        result.set(movie, fileType.byteLength);\\n        return result;\\n      }\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n    // Convert an array of nal units into an array of frames with each frame being\\n    // composed of the nal units that make up that frame\\n    // Also keep track of cummulative data about the frame from the nal units such\\n    // as the frame duration, starting pts, etc.\\n\\n    var groupNalsIntoFrames = function groupNalsIntoFrames(nalUnits) {\\n      var i,\\n          currentNal,\\n          currentFrame = [],\\n          frames = []; // TODO added for LHLS, make sure this is OK\\n\\n      frames.byteLength = 0;\\n      frames.nalCount = 0;\\n      frames.duration = 0;\\n      currentFrame.byteLength = 0;\\n\\n      for (i = 0; i < nalUnits.length; i++) {\\n        currentNal = nalUnits[i]; // Split on 'aud'-type nal units\\n\\n        if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\\n          // Since the very first nal unit is expected to be an AUD\\n          // only push to the frames array when currentFrame is not empty\\n          if (currentFrame.length) {\\n            currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\\n\\n            frames.byteLength += currentFrame.byteLength;\\n            frames.nalCount += currentFrame.length;\\n            frames.duration += currentFrame.duration;\\n            frames.push(currentFrame);\\n          }\\n\\n          currentFrame = [currentNal];\\n          currentFrame.byteLength = currentNal.data.byteLength;\\n          currentFrame.pts = currentNal.pts;\\n          currentFrame.dts = currentNal.dts;\\n        } else {\\n          // Specifically flag key frames for ease of use later\\n          if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\\n            currentFrame.keyFrame = true;\\n          }\\n\\n          currentFrame.duration = currentNal.dts - currentFrame.dts;\\n          currentFrame.byteLength += currentNal.data.byteLength;\\n          currentFrame.push(currentNal);\\n        }\\n      } // For the last frame, use the duration of the previous frame if we\\n      // have nothing better to go on\\n\\n\\n      if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\\n        currentFrame.duration = frames[frames.length - 1].duration;\\n      } // Push the final frame\\n      // TODO added for LHLS, make sure this is OK\\n\\n\\n      frames.byteLength += currentFrame.byteLength;\\n      frames.nalCount += currentFrame.length;\\n      frames.duration += currentFrame.duration;\\n      frames.push(currentFrame);\\n      return frames;\\n    }; // Convert an array of frames into an array of Gop with each Gop being composed\\n    // of the frames that make up that Gop\\n    // Also keep track of cummulative data about the Gop from the frames such as the\\n    // Gop duration, starting pts, etc.\\n\\n\\n    var groupFramesIntoGops = function groupFramesIntoGops(frames) {\\n      var i,\\n          currentFrame,\\n          currentGop = [],\\n          gops = []; // We must pre-set some of the values on the Gop since we\\n      // keep running totals of these values\\n\\n      currentGop.byteLength = 0;\\n      currentGop.nalCount = 0;\\n      currentGop.duration = 0;\\n      currentGop.pts = frames[0].pts;\\n      currentGop.dts = frames[0].dts; // store some metadata about all the Gops\\n\\n      gops.byteLength = 0;\\n      gops.nalCount = 0;\\n      gops.duration = 0;\\n      gops.pts = frames[0].pts;\\n      gops.dts = frames[0].dts;\\n\\n      for (i = 0; i < frames.length; i++) {\\n        currentFrame = frames[i];\\n\\n        if (currentFrame.keyFrame) {\\n          // Since the very first frame is expected to be an keyframe\\n          // only push to the gops array when currentGop is not empty\\n          if (currentGop.length) {\\n            gops.push(currentGop);\\n            gops.byteLength += currentGop.byteLength;\\n            gops.nalCount += currentGop.nalCount;\\n            gops.duration += currentGop.duration;\\n          }\\n\\n          currentGop = [currentFrame];\\n          currentGop.nalCount = currentFrame.length;\\n          currentGop.byteLength = currentFrame.byteLength;\\n          currentGop.pts = currentFrame.pts;\\n          currentGop.dts = currentFrame.dts;\\n          currentGop.duration = currentFrame.duration;\\n        } else {\\n          currentGop.duration += currentFrame.duration;\\n          currentGop.nalCount += currentFrame.length;\\n          currentGop.byteLength += currentFrame.byteLength;\\n          currentGop.push(currentFrame);\\n        }\\n      }\\n\\n      if (gops.length && currentGop.duration <= 0) {\\n        currentGop.duration = gops[gops.length - 1].duration;\\n      }\\n\\n      gops.byteLength += currentGop.byteLength;\\n      gops.nalCount += currentGop.nalCount;\\n      gops.duration += currentGop.duration; // push the final Gop\\n\\n      gops.push(currentGop);\\n      return gops;\\n    };\\n    /*\\n     * Search for the first keyframe in the GOPs and throw away all frames\\n     * until that keyframe. Then extend the duration of the pulled keyframe\\n     * and pull the PTS and DTS of the keyframe so that it covers the time\\n     * range of the frames that were disposed.\\n     *\\n     * @param {Array} gops video GOPs\\n     * @returns {Array} modified video GOPs\\n     */\\n\\n\\n    var extendFirstKeyFrame = function extendFirstKeyFrame(gops) {\\n      var currentGop;\\n\\n      if (!gops[0][0].keyFrame && gops.length > 1) {\\n        // Remove the first GOP\\n        currentGop = gops.shift();\\n        gops.byteLength -= currentGop.byteLength;\\n        gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\\n        // first gop to cover the time period of the\\n        // frames we just removed\\n\\n        gops[0][0].dts = currentGop.dts;\\n        gops[0][0].pts = currentGop.pts;\\n        gops[0][0].duration += currentGop.duration;\\n      }\\n\\n      return gops;\\n    };\\n    /**\\n     * Default sample object\\n     * see ISO/IEC 14496-12:2012, section 8.6.4.3\\n     */\\n\\n\\n    var createDefaultSample = function createDefaultSample() {\\n      return {\\n        size: 0,\\n        flags: {\\n          isLeading: 0,\\n          dependsOn: 1,\\n          isDependedOn: 0,\\n          hasRedundancy: 0,\\n          degradationPriority: 0,\\n          isNonSyncSample: 1\\n        }\\n      };\\n    };\\n    /*\\n     * Collates information from a video frame into an object for eventual\\n     * entry into an MP4 sample table.\\n     *\\n     * @param {Object} frame the video frame\\n     * @param {Number} dataOffset the byte offset to position the sample\\n     * @return {Object} object containing sample table info for a frame\\n     */\\n\\n\\n    var sampleForFrame = function sampleForFrame(frame, dataOffset) {\\n      var sample = createDefaultSample();\\n      sample.dataOffset = dataOffset;\\n      sample.compositionTimeOffset = frame.pts - frame.dts;\\n      sample.duration = frame.duration;\\n      sample.size = 4 * frame.length; // Space for nal unit size\\n\\n      sample.size += frame.byteLength;\\n\\n      if (frame.keyFrame) {\\n        sample.flags.dependsOn = 2;\\n        sample.flags.isNonSyncSample = 0;\\n      }\\n\\n      return sample;\\n    }; // generate the track's sample table from an array of gops\\n\\n\\n    var generateSampleTable = function generateSampleTable(gops, baseDataOffset) {\\n      var h,\\n          i,\\n          sample,\\n          currentGop,\\n          currentFrame,\\n          dataOffset = baseDataOffset || 0,\\n          samples = [];\\n\\n      for (h = 0; h < gops.length; h++) {\\n        currentGop = gops[h];\\n\\n        for (i = 0; i < currentGop.length; i++) {\\n          currentFrame = currentGop[i];\\n          sample = sampleForFrame(currentFrame, dataOffset);\\n          dataOffset += sample.size;\\n          samples.push(sample);\\n        }\\n      }\\n\\n      return samples;\\n    }; // generate the track's raw mdat data from an array of gops\\n\\n\\n    var concatenateNalData = function concatenateNalData(gops) {\\n      var h,\\n          i,\\n          j,\\n          currentGop,\\n          currentFrame,\\n          currentNal,\\n          dataOffset = 0,\\n          nalsByteLength = gops.byteLength,\\n          numberOfNals = gops.nalCount,\\n          totalByteLength = nalsByteLength + 4 * numberOfNals,\\n          data = new Uint8Array(totalByteLength),\\n          view = new DataView(data.buffer); // For each Gop..\\n\\n      for (h = 0; h < gops.length; h++) {\\n        currentGop = gops[h]; // For each Frame..\\n\\n        for (i = 0; i < currentGop.length; i++) {\\n          currentFrame = currentGop[i]; // For each NAL..\\n\\n          for (j = 0; j < currentFrame.length; j++) {\\n            currentNal = currentFrame[j];\\n            view.setUint32(dataOffset, currentNal.data.byteLength);\\n            dataOffset += 4;\\n            data.set(currentNal.data, dataOffset);\\n            dataOffset += currentNal.data.byteLength;\\n          }\\n        }\\n      }\\n\\n      return data;\\n    }; // generate the track's sample table from a frame\\n\\n\\n    var generateSampleTableForFrame = function generateSampleTableForFrame(frame, baseDataOffset) {\\n      var sample,\\n          dataOffset = baseDataOffset || 0,\\n          samples = [];\\n      sample = sampleForFrame(frame, dataOffset);\\n      samples.push(sample);\\n      return samples;\\n    }; // generate the track's raw mdat data from a frame\\n\\n\\n    var concatenateNalDataForFrame = function concatenateNalDataForFrame(frame) {\\n      var i,\\n          currentNal,\\n          dataOffset = 0,\\n          nalsByteLength = frame.byteLength,\\n          numberOfNals = frame.length,\\n          totalByteLength = nalsByteLength + 4 * numberOfNals,\\n          data = new Uint8Array(totalByteLength),\\n          view = new DataView(data.buffer); // For each NAL..\\n\\n      for (i = 0; i < frame.length; i++) {\\n        currentNal = frame[i];\\n        view.setUint32(dataOffset, currentNal.data.byteLength);\\n        dataOffset += 4;\\n        data.set(currentNal.data, dataOffset);\\n        dataOffset += currentNal.data.byteLength;\\n      }\\n\\n      return data;\\n    };\\n\\n    var frameUtils = {\\n      groupNalsIntoFrames: groupNalsIntoFrames,\\n      groupFramesIntoGops: groupFramesIntoGops,\\n      extendFirstKeyFrame: extendFirstKeyFrame,\\n      generateSampleTable: generateSampleTable,\\n      concatenateNalData: concatenateNalData,\\n      generateSampleTableForFrame: generateSampleTableForFrame,\\n      concatenateNalDataForFrame: concatenateNalDataForFrame\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var highPrefix = [33, 16, 5, 32, 164, 27];\\n    var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\\n\\n    var zeroFill = function zeroFill(count) {\\n      var a = [];\\n\\n      while (count--) {\\n        a.push(0);\\n      }\\n\\n      return a;\\n    };\\n\\n    var makeTable = function makeTable(metaTable) {\\n      return Object.keys(metaTable).reduce(function (obj, key) {\\n        obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\\n          return arr.concat(part);\\n        }, []));\\n        return obj;\\n      }, {});\\n    }; // Frames-of-silence to use for filling in missing AAC frames\\n\\n\\n    var coneOfSilence = {\\n      96000: [highPrefix, [227, 64], zeroFill(154), [56]],\\n      88200: [highPrefix, [231], zeroFill(170), [56]],\\n      64000: [highPrefix, [248, 192], zeroFill(240), [56]],\\n      48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\\n      44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\\n      32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\\n      24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\\n      16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\\n      12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\\n      11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\\n      8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\\n    };\\n    var silence = makeTable(coneOfSilence);\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var ONE_SECOND_IN_TS = 90000,\\n        // 90kHz clock\\n    secondsToVideoTs,\\n        secondsToAudioTs,\\n        videoTsToSeconds,\\n        audioTsToSeconds,\\n        audioTsToVideoTs,\\n        videoTsToAudioTs,\\n        metadataTsToSeconds;\\n\\n    secondsToVideoTs = function secondsToVideoTs(seconds) {\\n      return seconds * ONE_SECOND_IN_TS;\\n    };\\n\\n    secondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\\n      return seconds * sampleRate;\\n    };\\n\\n    videoTsToSeconds = function videoTsToSeconds(timestamp) {\\n      return timestamp / ONE_SECOND_IN_TS;\\n    };\\n\\n    audioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\\n      return timestamp / sampleRate;\\n    };\\n\\n    audioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\\n      return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\\n    };\\n\\n    videoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\\n      return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\\n    };\\n    /**\\n     * Adjust ID3 tag or caption timing information by the timeline pts values\\n     * (if keepOriginalTimestamps is false) and convert to seconds\\n     */\\n\\n\\n    metadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\\n      return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\\n    };\\n\\n    var clock = {\\n      ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\\n      secondsToVideoTs: secondsToVideoTs,\\n      secondsToAudioTs: secondsToAudioTs,\\n      videoTsToSeconds: videoTsToSeconds,\\n      audioTsToSeconds: audioTsToSeconds,\\n      audioTsToVideoTs: audioTsToVideoTs,\\n      videoTsToAudioTs: videoTsToAudioTs,\\n      metadataTsToSeconds: metadataTsToSeconds\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    /**\\n     * Sum the `byteLength` properties of the data in each AAC frame\\n     */\\n\\n    var sumFrameByteLengths = function sumFrameByteLengths(array) {\\n      var i,\\n          currentObj,\\n          sum = 0; // sum the byteLength's all each nal unit in the frame\\n\\n      for (i = 0; i < array.length; i++) {\\n        currentObj = array[i];\\n        sum += currentObj.data.byteLength;\\n      }\\n\\n      return sum;\\n    }; // Possibly pad (prefix) the audio track with silence if appending this track\\n    // would lead to the introduction of a gap in the audio buffer\\n\\n\\n    var prefixWithSilence = function prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\\n      var baseMediaDecodeTimeTs,\\n          frameDuration = 0,\\n          audioGapDuration = 0,\\n          audioFillFrameCount = 0,\\n          audioFillDuration = 0,\\n          silentFrame,\\n          i,\\n          firstFrame;\\n\\n      if (!frames.length) {\\n        return;\\n      }\\n\\n      baseMediaDecodeTimeTs = clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\\n\\n      frameDuration = Math.ceil(clock.ONE_SECOND_IN_TS / (track.samplerate / 1024));\\n\\n      if (audioAppendStartTs && videoBaseMediaDecodeTime) {\\n        // insert the shortest possible amount (audio gap or audio to video gap)\\n        audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\\n\\n        audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\\n        audioFillDuration = audioFillFrameCount * frameDuration;\\n      } // don't attempt to fill gaps smaller than a single frame or larger\\n      // than a half second\\n\\n\\n      if (audioFillFrameCount < 1 || audioFillDuration > clock.ONE_SECOND_IN_TS / 2) {\\n        return;\\n      }\\n\\n      silentFrame = silence[track.samplerate];\\n\\n      if (!silentFrame) {\\n        // we don't have a silent frame pregenerated for the sample rate, so use a frame\\n        // from the content instead\\n        silentFrame = frames[0].data;\\n      }\\n\\n      for (i = 0; i < audioFillFrameCount; i++) {\\n        firstFrame = frames[0];\\n        frames.splice(0, 0, {\\n          data: silentFrame,\\n          dts: firstFrame.dts - frameDuration,\\n          pts: firstFrame.pts - frameDuration\\n        });\\n      }\\n\\n      track.baseMediaDecodeTime -= Math.floor(clock.videoTsToAudioTs(audioFillDuration, track.samplerate));\\n    }; // If the audio segment extends before the earliest allowed dts\\n    // value, remove AAC frames until starts at or after the earliest\\n    // allowed DTS so that we don't end up with a negative baseMedia-\\n    // DecodeTime for the audio track\\n\\n\\n    var trimAdtsFramesByEarliestDts = function trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts) {\\n      if (track.minSegmentDts >= earliestAllowedDts) {\\n        return adtsFrames;\\n      } // We will need to recalculate the earliest segment Dts\\n\\n\\n      track.minSegmentDts = Infinity;\\n      return adtsFrames.filter(function (currentFrame) {\\n        // If this is an allowed frame, keep it and record it's Dts\\n        if (currentFrame.dts >= earliestAllowedDts) {\\n          track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\\n          track.minSegmentPts = track.minSegmentDts;\\n          return true;\\n        } // Otherwise, discard it\\n\\n\\n        return false;\\n      });\\n    }; // generate the track's raw mdat data from an array of frames\\n\\n\\n    var generateSampleTable$1 = function generateSampleTable(frames) {\\n      var i,\\n          currentFrame,\\n          samples = [];\\n\\n      for (i = 0; i < frames.length; i++) {\\n        currentFrame = frames[i];\\n        samples.push({\\n          size: currentFrame.data.byteLength,\\n          duration: 1024 // For AAC audio, all samples contain 1024 samples\\n\\n        });\\n      }\\n\\n      return samples;\\n    }; // generate the track's sample table from an array of frames\\n\\n\\n    var concatenateFrameData = function concatenateFrameData(frames) {\\n      var i,\\n          currentFrame,\\n          dataOffset = 0,\\n          data = new Uint8Array(sumFrameByteLengths(frames));\\n\\n      for (i = 0; i < frames.length; i++) {\\n        currentFrame = frames[i];\\n        data.set(currentFrame.data, dataOffset);\\n        dataOffset += currentFrame.data.byteLength;\\n      }\\n\\n      return data;\\n    };\\n\\n    var audioFrameUtils = {\\n      prefixWithSilence: prefixWithSilence,\\n      trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\\n      generateSampleTable: generateSampleTable$1,\\n      concatenateFrameData: concatenateFrameData\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var ONE_SECOND_IN_TS$1 = clock.ONE_SECOND_IN_TS;\\n    /**\\n     * Store information about the start and end of the track and the\\n     * duration for each frame/sample we process in order to calculate\\n     * the baseMediaDecodeTime\\n     */\\n\\n    var collectDtsInfo = function collectDtsInfo(track, data) {\\n      if (typeof data.pts === 'number') {\\n        if (track.timelineStartInfo.pts === undefined) {\\n          track.timelineStartInfo.pts = data.pts;\\n        }\\n\\n        if (track.minSegmentPts === undefined) {\\n          track.minSegmentPts = data.pts;\\n        } else {\\n          track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\\n        }\\n\\n        if (track.maxSegmentPts === undefined) {\\n          track.maxSegmentPts = data.pts;\\n        } else {\\n          track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\\n        }\\n      }\\n\\n      if (typeof data.dts === 'number') {\\n        if (track.timelineStartInfo.dts === undefined) {\\n          track.timelineStartInfo.dts = data.dts;\\n        }\\n\\n        if (track.minSegmentDts === undefined) {\\n          track.minSegmentDts = data.dts;\\n        } else {\\n          track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\\n        }\\n\\n        if (track.maxSegmentDts === undefined) {\\n          track.maxSegmentDts = data.dts;\\n        } else {\\n          track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\\n        }\\n      }\\n    };\\n    /**\\n     * Clear values used to calculate the baseMediaDecodeTime between\\n     * tracks\\n     */\\n\\n\\n    var clearDtsInfo = function clearDtsInfo(track) {\\n      delete track.minSegmentDts;\\n      delete track.maxSegmentDts;\\n      delete track.minSegmentPts;\\n      delete track.maxSegmentPts;\\n    };\\n    /**\\n     * Calculate the track's baseMediaDecodeTime based on the earliest\\n     * DTS the transmuxer has ever seen and the minimum DTS for the\\n     * current track\\n     * @param track {object} track metadata configuration\\n     * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at 0.\\n     */\\n\\n\\n    var calculateTrackBaseMediaDecodeTime = function calculateTrackBaseMediaDecodeTime(track, keepOriginalTimestamps) {\\n      var baseMediaDecodeTime,\\n          scale,\\n          minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\\n\\n      if (!keepOriginalTimestamps) {\\n        minSegmentDts -= track.timelineStartInfo.dts;\\n      } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\\n      // we want the start of the first segment to be placed\\n\\n\\n      baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\\n\\n      baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\\n\\n      baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\\n\\n      if (track.type === 'audio') {\\n        // Audio has a different clock equal to the sampling_rate so we need to\\n        // scale the PTS values into the clock rate of the track\\n        scale = track.samplerate / ONE_SECOND_IN_TS$1;\\n        baseMediaDecodeTime *= scale;\\n        baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\\n      }\\n\\n      return baseMediaDecodeTime;\\n    };\\n\\n    var trackDecodeInfo = {\\n      clearDtsInfo: clearDtsInfo,\\n      calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\\n      collectDtsInfo: collectDtsInfo\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * Reads in-band caption information from a video elementary\\n     * stream. Captions must follow the CEA-708 standard for injection\\n     * into an MPEG-2 transport streams.\\n     * @see https://en.wikipedia.org/wiki/CEA-708\\n     * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\\n     */\\n    // Supplemental enhancement information (SEI) NAL units have a\\n    // payload type field to indicate how they are to be\\n    // interpreted. CEAS-708 caption content is always transmitted with\\n    // payload type 0x04.\\n\\n    var USER_DATA_REGISTERED_ITU_T_T35 = 4,\\n        RBSP_TRAILING_BITS = 128;\\n    /**\\n      * Parse a supplemental enhancement information (SEI) NAL unit.\\n      * Stops parsing once a message of type ITU T T35 has been found.\\n      *\\n      * @param bytes {Uint8Array} the bytes of a SEI NAL unit\\n      * @return {object} the parsed SEI payload\\n      * @see Rec. ITU-T H.264, 7.3.2.3.1\\n      */\\n\\n    var parseSei = function parseSei(bytes) {\\n      var i = 0,\\n          result = {\\n        payloadType: -1,\\n        payloadSize: 0\\n      },\\n          payloadType = 0,\\n          payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\\n\\n      while (i < bytes.byteLength) {\\n        // stop once we have hit the end of the sei_rbsp\\n        if (bytes[i] === RBSP_TRAILING_BITS) {\\n          break;\\n        } // Parse payload type\\n\\n\\n        while (bytes[i] === 0xFF) {\\n          payloadType += 255;\\n          i++;\\n        }\\n\\n        payloadType += bytes[i++]; // Parse payload size\\n\\n        while (bytes[i] === 0xFF) {\\n          payloadSize += 255;\\n          i++;\\n        }\\n\\n        payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\\n        // there can only ever be one caption message in a frame's sei\\n\\n        if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\\n          result.payloadType = payloadType;\\n          result.payloadSize = payloadSize;\\n          result.payload = bytes.subarray(i, i + payloadSize);\\n          break;\\n        } // skip the payload and parse the next message\\n\\n\\n        i += payloadSize;\\n        payloadType = 0;\\n        payloadSize = 0;\\n      }\\n\\n      return result;\\n    }; // see ANSI/SCTE 128-1 (2013), section 8.1\\n\\n\\n    var parseUserData = function parseUserData(sei) {\\n      // itu_t_t35_contry_code must be 181 (United States) for\\n      // captions\\n      if (sei.payload[0] !== 181) {\\n        return null;\\n      } // itu_t_t35_provider_code should be 49 (ATSC) for captions\\n\\n\\n      if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\\n        return null;\\n      } // the user_identifier should be \\\"GA94\\\" to indicate ATSC1 data\\n\\n\\n      if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\\n        return null;\\n      } // finally, user_data_type_code should be 0x03 for caption data\\n\\n\\n      if (sei.payload[7] !== 0x03) {\\n        return null;\\n      } // return the user_data_type_structure and strip the trailing\\n      // marker bits\\n\\n\\n      return sei.payload.subarray(8, sei.payload.length - 1);\\n    }; // see CEA-708-D, section 4.4\\n\\n\\n    var parseCaptionPackets = function parseCaptionPackets(pts, userData) {\\n      var results = [],\\n          i,\\n          count,\\n          offset,\\n          data; // if this is just filler, return immediately\\n\\n      if (!(userData[0] & 0x40)) {\\n        return results;\\n      } // parse out the cc_data_1 and cc_data_2 fields\\n\\n\\n      count = userData[0] & 0x1f;\\n\\n      for (i = 0; i < count; i++) {\\n        offset = i * 3;\\n        data = {\\n          type: userData[offset + 2] & 0x03,\\n          pts: pts\\n        }; // capture cc data when cc_valid is 1\\n\\n        if (userData[offset + 2] & 0x04) {\\n          data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\\n          results.push(data);\\n        }\\n      }\\n\\n      return results;\\n    };\\n\\n    var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\\n      var length = data.byteLength,\\n          emulationPreventionBytesPositions = [],\\n          i = 1,\\n          newLength,\\n          newData; // Find all `Emulation Prevention Bytes`\\n\\n      while (i < length - 2) {\\n        if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\\n          emulationPreventionBytesPositions.push(i + 2);\\n          i += 2;\\n        } else {\\n          i++;\\n        }\\n      } // If no Emulation Prevention Bytes were found just return the original\\n      // array\\n\\n\\n      if (emulationPreventionBytesPositions.length === 0) {\\n        return data;\\n      } // Create a new array to hold the NAL unit data\\n\\n\\n      newLength = length - emulationPreventionBytesPositions.length;\\n      newData = new Uint8Array(newLength);\\n      var sourceIndex = 0;\\n\\n      for (i = 0; i < newLength; sourceIndex++, i++) {\\n        if (sourceIndex === emulationPreventionBytesPositions[0]) {\\n          // Skip this byte\\n          sourceIndex++; // Remove this position index\\n\\n          emulationPreventionBytesPositions.shift();\\n        }\\n\\n        newData[i] = data[sourceIndex];\\n      }\\n\\n      return newData;\\n    }; // exports\\n\\n\\n    var captionPacketParser = {\\n      parseSei: parseSei,\\n      parseUserData: parseUserData,\\n      parseCaptionPackets: parseCaptionPackets,\\n      discardEmulationPreventionBytes: discardEmulationPreventionBytes,\\n      USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\\n    }; // -----------------\\n    // Link To Transport\\n    // -----------------\\n\\n    var CaptionStream = function CaptionStream() {\\n      CaptionStream.prototype.init.call(this);\\n      this.captionPackets_ = [];\\n      this.ccStreams_ = [new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\\n      new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\\n      new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\\n      new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\\n      ];\\n      this.reset(); // forward data and done events from CCs to this CaptionStream\\n\\n      this.ccStreams_.forEach(function (cc) {\\n        cc.on('data', this.trigger.bind(this, 'data'));\\n        cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\\n        cc.on('done', this.trigger.bind(this, 'done'));\\n      }, this);\\n    };\\n\\n    CaptionStream.prototype = new stream();\\n\\n    CaptionStream.prototype.push = function (event) {\\n      var sei, userData, newCaptionPackets; // only examine SEI NALs\\n\\n      if (event.nalUnitType !== 'sei_rbsp') {\\n        return;\\n      } // parse the sei\\n\\n\\n      sei = captionPacketParser.parseSei(event.escapedRBSP); // ignore everything but user_data_registered_itu_t_t35\\n\\n      if (sei.payloadType !== captionPacketParser.USER_DATA_REGISTERED_ITU_T_T35) {\\n        return;\\n      } // parse out the user data payload\\n\\n\\n      userData = captionPacketParser.parseUserData(sei); // ignore unrecognized userData\\n\\n      if (!userData) {\\n        return;\\n      } // Sometimes, the same segment # will be downloaded twice. To stop the\\n      // caption data from being processed twice, we track the latest dts we've\\n      // received and ignore everything with a dts before that. However, since\\n      // data for a specific dts can be split across packets on either side of\\n      // a segment boundary, we need to make sure we *don't* ignore the packets\\n      // from the *next* segment that have dts === this.latestDts_. By constantly\\n      // tracking the number of packets received with dts === this.latestDts_, we\\n      // know how many should be ignored once we start receiving duplicates.\\n\\n\\n      if (event.dts < this.latestDts_) {\\n        // We've started getting older data, so set the flag.\\n        this.ignoreNextEqualDts_ = true;\\n        return;\\n      } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\\n        this.numSameDts_--;\\n\\n        if (!this.numSameDts_) {\\n          // We've received the last duplicate packet, time to start processing again\\n          this.ignoreNextEqualDts_ = false;\\n        }\\n\\n        return;\\n      } // parse out CC data packets and save them for later\\n\\n\\n      newCaptionPackets = captionPacketParser.parseCaptionPackets(event.pts, userData);\\n      this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\\n\\n      if (this.latestDts_ !== event.dts) {\\n        this.numSameDts_ = 0;\\n      }\\n\\n      this.numSameDts_++;\\n      this.latestDts_ = event.dts;\\n    };\\n\\n    CaptionStream.prototype.flushCCStreams = function (flushType) {\\n      this.ccStreams_.forEach(function (cc) {\\n        return flushType === 'flush' ? cc.flush() : cc.partialFlush();\\n      }, this);\\n    };\\n\\n    CaptionStream.prototype.flushStream = function (flushType) {\\n      // make sure we actually parsed captions before proceeding\\n      if (!this.captionPackets_.length) {\\n        this.flushCCStreams(flushType);\\n        return;\\n      } // In Chrome, the Array#sort function is not stable so add a\\n      // presortIndex that we can use to ensure we get a stable-sort\\n\\n\\n      this.captionPackets_.forEach(function (elem, idx) {\\n        elem.presortIndex = idx;\\n      }); // sort caption byte-pairs based on their PTS values\\n\\n      this.captionPackets_.sort(function (a, b) {\\n        if (a.pts === b.pts) {\\n          return a.presortIndex - b.presortIndex;\\n        }\\n\\n        return a.pts - b.pts;\\n      });\\n      this.captionPackets_.forEach(function (packet) {\\n        if (packet.type < 2) {\\n          // Dispatch packet to the right Cea608Stream\\n          this.dispatchCea608Packet(packet);\\n        } // this is where an 'else' would go for a dispatching packets\\n        // to a theoretical Cea708Stream that handles SERVICEn data\\n\\n      }, this);\\n      this.captionPackets_.length = 0;\\n      this.flushCCStreams(flushType);\\n    };\\n\\n    CaptionStream.prototype.flush = function () {\\n      return this.flushStream('flush');\\n    }; // Only called if handling partial data\\n\\n\\n    CaptionStream.prototype.partialFlush = function () {\\n      return this.flushStream('partialFlush');\\n    };\\n\\n    CaptionStream.prototype.reset = function () {\\n      this.latestDts_ = null;\\n      this.ignoreNextEqualDts_ = false;\\n      this.numSameDts_ = 0;\\n      this.activeCea608Channel_ = [null, null];\\n      this.ccStreams_.forEach(function (ccStream) {\\n        ccStream.reset();\\n      });\\n    }; // From the CEA-608 spec:\\n\\n    /*\\n     * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\\n     * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\\n     * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\\n     * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\\n     * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\\n     * to switch to captioning or Text.\\n    */\\n    // With that in mind, we ignore any data between an XDS control code and a\\n    // subsequent closed-captioning control code.\\n\\n\\n    CaptionStream.prototype.dispatchCea608Packet = function (packet) {\\n      // NOTE: packet.type is the CEA608 field\\n      if (this.setsTextOrXDSActive(packet)) {\\n        this.activeCea608Channel_[packet.type] = null;\\n      } else if (this.setsChannel1Active(packet)) {\\n        this.activeCea608Channel_[packet.type] = 0;\\n      } else if (this.setsChannel2Active(packet)) {\\n        this.activeCea608Channel_[packet.type] = 1;\\n      }\\n\\n      if (this.activeCea608Channel_[packet.type] === null) {\\n        // If we haven't received anything to set the active channel, or the\\n        // packets are Text/XDS data, discard the data; we don't want jumbled\\n        // captions\\n        return;\\n      }\\n\\n      this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\\n    };\\n\\n    CaptionStream.prototype.setsChannel1Active = function (packet) {\\n      return (packet.ccData & 0x7800) === 0x1000;\\n    };\\n\\n    CaptionStream.prototype.setsChannel2Active = function (packet) {\\n      return (packet.ccData & 0x7800) === 0x1800;\\n    };\\n\\n    CaptionStream.prototype.setsTextOrXDSActive = function (packet) {\\n      return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\\n    }; // ----------------------\\n    // Session to Application\\n    // ----------------------\\n    // This hash maps non-ASCII, special, and extended character codes to their\\n    // proper Unicode equivalent. The first keys that are only a single byte\\n    // are the non-standard ASCII characters, which simply map the CEA608 byte\\n    // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\\n    // character codes, but have their MSB bitmasked with 0x03 so that a lookup\\n    // can be performed regardless of the field and data channel on which the\\n    // character code was received.\\n\\n\\n    var CHARACTER_TRANSLATION = {\\n      0x2a: 0xe1,\\n      // á\\n      0x5c: 0xe9,\\n      // é\\n      0x5e: 0xed,\\n      // í\\n      0x5f: 0xf3,\\n      // ó\\n      0x60: 0xfa,\\n      // ú\\n      0x7b: 0xe7,\\n      // ç\\n      0x7c: 0xf7,\\n      // ÷\\n      0x7d: 0xd1,\\n      // Ñ\\n      0x7e: 0xf1,\\n      // ñ\\n      0x7f: 0x2588,\\n      // █\\n      0x0130: 0xae,\\n      // ®\\n      0x0131: 0xb0,\\n      // °\\n      0x0132: 0xbd,\\n      // ½\\n      0x0133: 0xbf,\\n      // ¿\\n      0x0134: 0x2122,\\n      // ™\\n      0x0135: 0xa2,\\n      // ¢\\n      0x0136: 0xa3,\\n      // £\\n      0x0137: 0x266a,\\n      // ♪\\n      0x0138: 0xe0,\\n      // à\\n      0x0139: 0xa0,\\n      //\\n      0x013a: 0xe8,\\n      // è\\n      0x013b: 0xe2,\\n      // â\\n      0x013c: 0xea,\\n      // ê\\n      0x013d: 0xee,\\n      // î\\n      0x013e: 0xf4,\\n      // ô\\n      0x013f: 0xfb,\\n      // û\\n      0x0220: 0xc1,\\n      // Á\\n      0x0221: 0xc9,\\n      // É\\n      0x0222: 0xd3,\\n      // Ó\\n      0x0223: 0xda,\\n      // Ú\\n      0x0224: 0xdc,\\n      // Ü\\n      0x0225: 0xfc,\\n      // ü\\n      0x0226: 0x2018,\\n      // ‘\\n      0x0227: 0xa1,\\n      // ¡\\n      0x0228: 0x2a,\\n      // *\\n      0x0229: 0x27,\\n      // '\\n      0x022a: 0x2014,\\n      // —\\n      0x022b: 0xa9,\\n      // ©\\n      0x022c: 0x2120,\\n      // ℠\\n      0x022d: 0x2022,\\n      // •\\n      0x022e: 0x201c,\\n      // “\\n      0x022f: 0x201d,\\n      // ”\\n      0x0230: 0xc0,\\n      // À\\n      0x0231: 0xc2,\\n      // Â\\n      0x0232: 0xc7,\\n      // Ç\\n      0x0233: 0xc8,\\n      // È\\n      0x0234: 0xca,\\n      // Ê\\n      0x0235: 0xcb,\\n      // Ë\\n      0x0236: 0xeb,\\n      // ë\\n      0x0237: 0xce,\\n      // Î\\n      0x0238: 0xcf,\\n      // Ï\\n      0x0239: 0xef,\\n      // ï\\n      0x023a: 0xd4,\\n      // Ô\\n      0x023b: 0xd9,\\n      // Ù\\n      0x023c: 0xf9,\\n      // ù\\n      0x023d: 0xdb,\\n      // Û\\n      0x023e: 0xab,\\n      // «\\n      0x023f: 0xbb,\\n      // »\\n      0x0320: 0xc3,\\n      // Ã\\n      0x0321: 0xe3,\\n      // ã\\n      0x0322: 0xcd,\\n      // Í\\n      0x0323: 0xcc,\\n      // Ì\\n      0x0324: 0xec,\\n      // ì\\n      0x0325: 0xd2,\\n      // Ò\\n      0x0326: 0xf2,\\n      // ò\\n      0x0327: 0xd5,\\n      // Õ\\n      0x0328: 0xf5,\\n      // õ\\n      0x0329: 0x7b,\\n      // {\\n      0x032a: 0x7d,\\n      // }\\n      0x032b: 0x5c,\\n      // \\\\\\n      0x032c: 0x5e,\\n      // ^\\n      0x032d: 0x5f,\\n      // _\\n      0x032e: 0x7c,\\n      // |\\n      0x032f: 0x7e,\\n      // ~\\n      0x0330: 0xc4,\\n      // Ä\\n      0x0331: 0xe4,\\n      // ä\\n      0x0332: 0xd6,\\n      // Ö\\n      0x0333: 0xf6,\\n      // ö\\n      0x0334: 0xdf,\\n      // ß\\n      0x0335: 0xa5,\\n      // ¥\\n      0x0336: 0xa4,\\n      // ¤\\n      0x0337: 0x2502,\\n      // │\\n      0x0338: 0xc5,\\n      // Å\\n      0x0339: 0xe5,\\n      // å\\n      0x033a: 0xd8,\\n      // Ø\\n      0x033b: 0xf8,\\n      // ø\\n      0x033c: 0x250c,\\n      // ┌\\n      0x033d: 0x2510,\\n      // ┐\\n      0x033e: 0x2514,\\n      // └\\n      0x033f: 0x2518 // ┘\\n\\n    };\\n\\n    var getCharFromCode = function getCharFromCode(code) {\\n      if (code === null) {\\n        return '';\\n      }\\n\\n      code = CHARACTER_TRANSLATION[code] || code;\\n      return String.fromCharCode(code);\\n    }; // the index of the last row in a CEA-608 display buffer\\n\\n\\n    var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\\n    // getting it through bit logic.\\n\\n    var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\\n    // cells. The \\\"bottom\\\" row is the last element in the outer array.\\n\\n    var createDisplayBuffer = function createDisplayBuffer() {\\n      var result = [],\\n          i = BOTTOM_ROW + 1;\\n\\n      while (i--) {\\n        result.push('');\\n      }\\n\\n      return result;\\n    };\\n\\n    var Cea608Stream = function Cea608Stream(field, dataChannel) {\\n      Cea608Stream.prototype.init.call(this);\\n      this.field_ = field || 0;\\n      this.dataChannel_ = dataChannel || 0;\\n      this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\\n      this.setConstants();\\n      this.reset();\\n\\n      this.push = function (packet) {\\n        var data, swap, char0, char1, text; // remove the parity bits\\n\\n        data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\\n\\n        if (data === this.lastControlCode_) {\\n          this.lastControlCode_ = null;\\n          return;\\n        } // Store control codes\\n\\n\\n        if ((data & 0xf000) === 0x1000) {\\n          this.lastControlCode_ = data;\\n        } else if (data !== this.PADDING_) {\\n          this.lastControlCode_ = null;\\n        }\\n\\n        char0 = data >>> 8;\\n        char1 = data & 0xff;\\n\\n        if (data === this.PADDING_) {\\n          return;\\n        } else if (data === this.RESUME_CAPTION_LOADING_) {\\n          this.mode_ = 'popOn';\\n        } else if (data === this.END_OF_CAPTION_) {\\n          // If an EOC is received while in paint-on mode, the displayed caption\\n          // text should be swapped to non-displayed memory as if it was a pop-on\\n          // caption. Because of that, we should explicitly switch back to pop-on\\n          // mode\\n          this.mode_ = 'popOn';\\n          this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\\n\\n          this.flushDisplayed(packet.pts); // flip memory\\n\\n          swap = this.displayed_;\\n          this.displayed_ = this.nonDisplayed_;\\n          this.nonDisplayed_ = swap; // start measuring the time to display the caption\\n\\n          this.startPts_ = packet.pts;\\n        } else if (data === this.ROLL_UP_2_ROWS_) {\\n          this.rollUpRows_ = 2;\\n          this.setRollUp(packet.pts);\\n        } else if (data === this.ROLL_UP_3_ROWS_) {\\n          this.rollUpRows_ = 3;\\n          this.setRollUp(packet.pts);\\n        } else if (data === this.ROLL_UP_4_ROWS_) {\\n          this.rollUpRows_ = 4;\\n          this.setRollUp(packet.pts);\\n        } else if (data === this.CARRIAGE_RETURN_) {\\n          this.clearFormatting(packet.pts);\\n          this.flushDisplayed(packet.pts);\\n          this.shiftRowsUp_();\\n          this.startPts_ = packet.pts;\\n        } else if (data === this.BACKSPACE_) {\\n          if (this.mode_ === 'popOn') {\\n            this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n          } else {\\n            this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n          }\\n        } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\\n          this.flushDisplayed(packet.pts);\\n          this.displayed_ = createDisplayBuffer();\\n        } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\\n          this.nonDisplayed_ = createDisplayBuffer();\\n        } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\\n          if (this.mode_ !== 'paintOn') {\\n            // NOTE: This should be removed when proper caption positioning is\\n            // implemented\\n            this.flushDisplayed(packet.pts);\\n            this.displayed_ = createDisplayBuffer();\\n          }\\n\\n          this.mode_ = 'paintOn';\\n          this.startPts_ = packet.pts; // Append special characters to caption text\\n        } else if (this.isSpecialCharacter(char0, char1)) {\\n          // Bitmask char0 so that we can apply character transformations\\n          // regardless of field and data channel.\\n          // Then byte-shift to the left and OR with char1 so we can pass the\\n          // entire character code to `getCharFromCode`.\\n          char0 = (char0 & 0x03) << 8;\\n          text = getCharFromCode(char0 | char1);\\n          this[this.mode_](packet.pts, text);\\n          this.column_++; // Append extended characters to caption text\\n        } else if (this.isExtCharacter(char0, char1)) {\\n          // Extended characters always follow their \\\"non-extended\\\" equivalents.\\n          // IE if a \\\"è\\\" is desired, you'll always receive \\\"eè\\\"; non-compliant\\n          // decoders are supposed to drop the \\\"è\\\", while compliant decoders\\n          // backspace the \\\"e\\\" and insert \\\"è\\\".\\n          // Delete the previous character\\n          if (this.mode_ === 'popOn') {\\n            this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n          } else {\\n            this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n          } // Bitmask char0 so that we can apply character transformations\\n          // regardless of field and data channel.\\n          // Then byte-shift to the left and OR with char1 so we can pass the\\n          // entire character code to `getCharFromCode`.\\n\\n\\n          char0 = (char0 & 0x03) << 8;\\n          text = getCharFromCode(char0 | char1);\\n          this[this.mode_](packet.pts, text);\\n          this.column_++; // Process mid-row codes\\n        } else if (this.isMidRowCode(char0, char1)) {\\n          // Attributes are not additive, so clear all formatting\\n          this.clearFormatting(packet.pts); // According to the standard, mid-row codes\\n          // should be replaced with spaces, so add one now\\n\\n          this[this.mode_](packet.pts, ' ');\\n          this.column_++;\\n\\n          if ((char1 & 0xe) === 0xe) {\\n            this.addFormatting(packet.pts, ['i']);\\n          }\\n\\n          if ((char1 & 0x1) === 0x1) {\\n            this.addFormatting(packet.pts, ['u']);\\n          } // Detect offset control codes and adjust cursor\\n\\n        } else if (this.isOffsetControlCode(char0, char1)) {\\n          // Cursor position is set by indent PAC (see below) in 4-column\\n          // increments, with an additional offset code of 1-3 to reach any\\n          // of the 32 columns specified by CEA-608. So all we need to do\\n          // here is increment the column cursor by the given offset.\\n          this.column_ += char1 & 0x03; // Detect PACs (Preamble Address Codes)\\n        } else if (this.isPAC(char0, char1)) {\\n          // There's no logic for PAC -> row mapping, so we have to just\\n          // find the row code in an array and use its index :(\\n          var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\\n\\n          if (this.mode_ === 'rollUp') {\\n            // This implies that the base row is incorrectly set.\\n            // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\\n            // of roll-up rows set.\\n            if (row - this.rollUpRows_ + 1 < 0) {\\n              row = this.rollUpRows_ - 1;\\n            }\\n\\n            this.setRollUp(packet.pts, row);\\n          }\\n\\n          if (row !== this.row_) {\\n            // formatting is only persistent for current row\\n            this.clearFormatting(packet.pts);\\n            this.row_ = row;\\n          } // All PACs can apply underline, so detect and apply\\n          // (All odd-numbered second bytes set underline)\\n\\n\\n          if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\\n            this.addFormatting(packet.pts, ['u']);\\n          }\\n\\n          if ((data & 0x10) === 0x10) {\\n            // We've got an indent level code. Each successive even number\\n            // increments the column cursor by 4, so we can get the desired\\n            // column position by bit-shifting to the right (to get n/2)\\n            // and multiplying by 4.\\n            this.column_ = ((data & 0xe) >> 1) * 4;\\n          }\\n\\n          if (this.isColorPAC(char1)) {\\n            // it's a color code, though we only support white, which\\n            // can be either normal or italicized. white italics can be\\n            // either 0x4e or 0x6e depending on the row, so we just\\n            // bitwise-and with 0xe to see if italics should be turned on\\n            if ((char1 & 0xe) === 0xe) {\\n              this.addFormatting(packet.pts, ['i']);\\n            }\\n          } // We have a normal character in char0, and possibly one in char1\\n\\n        } else if (this.isNormalChar(char0)) {\\n          if (char1 === 0x00) {\\n            char1 = null;\\n          }\\n\\n          text = getCharFromCode(char0);\\n          text += getCharFromCode(char1);\\n          this[this.mode_](packet.pts, text);\\n          this.column_ += text.length;\\n        } // finish data processing\\n\\n      };\\n    };\\n\\n    Cea608Stream.prototype = new stream(); // Trigger a cue point that captures the current state of the\\n    // display buffer\\n\\n    Cea608Stream.prototype.flushDisplayed = function (pts) {\\n      var content = this.displayed_ // remove spaces from the start and end of the string\\n      .map(function (row) {\\n        try {\\n          return row.trim();\\n        } catch (e) {\\n          // Ordinarily, this shouldn't happen. However, caption\\n          // parsing errors should not throw exceptions and\\n          // break playback.\\n          // eslint-disable-next-line no-console\\n          console.error('Skipping malformed caption.');\\n          return '';\\n        }\\n      }) // combine all text rows to display in one cue\\n      .join('\\\\n') // and remove blank rows from the start and end, but not the middle\\n      .replace(/^\\\\n+|\\\\n+$/g, '');\\n\\n      if (content.length) {\\n        this.trigger('data', {\\n          startPts: this.startPts_,\\n          endPts: pts,\\n          text: content,\\n          stream: this.name_\\n        });\\n      }\\n    };\\n    /**\\n     * Zero out the data, used for startup and on seek\\n     */\\n\\n\\n    Cea608Stream.prototype.reset = function () {\\n      this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\\n      // actually display captions. If a caption is shifted to a row\\n      // with a lower index than this, it is cleared from the display\\n      // buffer\\n\\n      this.topRow_ = 0;\\n      this.startPts_ = 0;\\n      this.displayed_ = createDisplayBuffer();\\n      this.nonDisplayed_ = createDisplayBuffer();\\n      this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\\n\\n      this.column_ = 0;\\n      this.row_ = BOTTOM_ROW;\\n      this.rollUpRows_ = 2; // This variable holds currently-applied formatting\\n\\n      this.formatting_ = [];\\n    };\\n    /**\\n     * Sets up control code and related constants for this instance\\n     */\\n\\n\\n    Cea608Stream.prototype.setConstants = function () {\\n      // The following attributes have these uses:\\n      // ext_ :    char0 for mid-row codes, and the base for extended\\n      //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\\n      //           extended codes)\\n      // control_: char0 for control codes, except byte-shifted to the\\n      //           left so that we can do this.control_ | CONTROL_CODE\\n      // offset_:  char0 for tab offset codes\\n      //\\n      // It's also worth noting that control codes, and _only_ control codes,\\n      // differ between field 1 and field2. Field 2 control codes are always\\n      // their field 1 value plus 1. That's why there's the \\\"| field\\\" on the\\n      // control value.\\n      if (this.dataChannel_ === 0) {\\n        this.BASE_ = 0x10;\\n        this.EXT_ = 0x11;\\n        this.CONTROL_ = (0x14 | this.field_) << 8;\\n        this.OFFSET_ = 0x17;\\n      } else if (this.dataChannel_ === 1) {\\n        this.BASE_ = 0x18;\\n        this.EXT_ = 0x19;\\n        this.CONTROL_ = (0x1c | this.field_) << 8;\\n        this.OFFSET_ = 0x1f;\\n      } // Constants for the LSByte command codes recognized by Cea608Stream. This\\n      // list is not exhaustive. For a more comprehensive listing and semantics see\\n      // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\\n      // Padding\\n\\n\\n      this.PADDING_ = 0x0000; // Pop-on Mode\\n\\n      this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\\n      this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\\n\\n      this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\\n      this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\\n      this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\\n      this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\\n\\n      this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\\n\\n      this.BACKSPACE_ = this.CONTROL_ | 0x21;\\n      this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\\n      this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\\n    };\\n    /**\\n     * Detects if the 2-byte packet data is a special character\\n     *\\n     * Special characters have a second byte in the range 0x30 to 0x3f,\\n     * with the first byte being 0x11 (for data channel 1) or 0x19 (for\\n     * data channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are an special character\\n     */\\n\\n\\n    Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\\n      return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\\n    };\\n    /**\\n     * Detects if the 2-byte packet data is an extended character\\n     *\\n     * Extended characters have a second byte in the range 0x20 to 0x3f,\\n     * with the first byte being 0x12 or 0x13 (for data channel 1) or\\n     * 0x1a or 0x1b (for data channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are an extended character\\n     */\\n\\n\\n    Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\\n      return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\\n    };\\n    /**\\n     * Detects if the 2-byte packet is a mid-row code\\n     *\\n     * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\\n     * the first byte being 0x11 (for data channel 1) or 0x19 (for data\\n     * channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are a mid-row code\\n     */\\n\\n\\n    Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\\n      return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\\n    };\\n    /**\\n     * Detects if the 2-byte packet is an offset control code\\n     *\\n     * Offset control codes have a second byte in the range 0x21 to 0x23,\\n     * with the first byte being 0x17 (for data channel 1) or 0x1f (for\\n     * data channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are an offset control code\\n     */\\n\\n\\n    Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\\n      return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\\n    };\\n    /**\\n     * Detects if the 2-byte packet is a Preamble Address Code\\n     *\\n     * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\\n     * or 0x18 to 0x1f (for data channel 2), with the second byte in the\\n     * range 0x40 to 0x7f.\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are a PAC\\n     */\\n\\n\\n    Cea608Stream.prototype.isPAC = function (char0, char1) {\\n      return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\\n    };\\n    /**\\n     * Detects if a packet's second byte is in the range of a PAC color code\\n     *\\n     * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\\n     * 0x60 to 0x6f.\\n     *\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the byte is a color PAC\\n     */\\n\\n\\n    Cea608Stream.prototype.isColorPAC = function (char1) {\\n      return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\\n    };\\n    /**\\n     * Detects if a single byte is in the range of a normal character\\n     *\\n     * Normal text bytes are in the range 0x20 to 0x7f.\\n     *\\n     * @param  {Integer} char  The byte\\n     * @return {Boolean}       Whether the byte is a normal character\\n     */\\n\\n\\n    Cea608Stream.prototype.isNormalChar = function (_char) {\\n      return _char >= 0x20 && _char <= 0x7f;\\n    };\\n    /**\\n     * Configures roll-up\\n     *\\n     * @param  {Integer} pts         Current PTS\\n     * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\\n     *                               a new position\\n     */\\n\\n\\n    Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\\n      // Reset the base row to the bottom row when switching modes\\n      if (this.mode_ !== 'rollUp') {\\n        this.row_ = BOTTOM_ROW;\\n        this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\\n\\n        this.flushDisplayed(pts);\\n        this.nonDisplayed_ = createDisplayBuffer();\\n        this.displayed_ = createDisplayBuffer();\\n      }\\n\\n      if (newBaseRow !== undefined && newBaseRow !== this.row_) {\\n        // move currently displayed captions (up or down) to the new base row\\n        for (var i = 0; i < this.rollUpRows_; i++) {\\n          this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\\n          this.displayed_[this.row_ - i] = '';\\n        }\\n      }\\n\\n      if (newBaseRow === undefined) {\\n        newBaseRow = this.row_;\\n      }\\n\\n      this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\\n    }; // Adds the opening HTML tag for the passed character to the caption text,\\n    // and keeps track of it for later closing\\n\\n\\n    Cea608Stream.prototype.addFormatting = function (pts, format) {\\n      this.formatting_ = this.formatting_.concat(format);\\n      var text = format.reduce(function (text, format) {\\n        return text + '<' + format + '>';\\n      }, '');\\n      this[this.mode_](pts, text);\\n    }; // Adds HTML closing tags for current formatting to caption text and\\n    // clears remembered formatting\\n\\n\\n    Cea608Stream.prototype.clearFormatting = function (pts) {\\n      if (!this.formatting_.length) {\\n        return;\\n      }\\n\\n      var text = this.formatting_.reverse().reduce(function (text, format) {\\n        return text + '</' + format + '>';\\n      }, '');\\n      this.formatting_ = [];\\n      this[this.mode_](pts, text);\\n    }; // Mode Implementations\\n\\n\\n    Cea608Stream.prototype.popOn = function (pts, text) {\\n      var baseRow = this.nonDisplayed_[this.row_]; // buffer characters\\n\\n      baseRow += text;\\n      this.nonDisplayed_[this.row_] = baseRow;\\n    };\\n\\n    Cea608Stream.prototype.rollUp = function (pts, text) {\\n      var baseRow = this.displayed_[this.row_];\\n      baseRow += text;\\n      this.displayed_[this.row_] = baseRow;\\n    };\\n\\n    Cea608Stream.prototype.shiftRowsUp_ = function () {\\n      var i; // clear out inactive rows\\n\\n      for (i = 0; i < this.topRow_; i++) {\\n        this.displayed_[i] = '';\\n      }\\n\\n      for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\\n        this.displayed_[i] = '';\\n      } // shift displayed rows up\\n\\n\\n      for (i = this.topRow_; i < this.row_; i++) {\\n        this.displayed_[i] = this.displayed_[i + 1];\\n      } // clear out the bottom row\\n\\n\\n      this.displayed_[this.row_] = '';\\n    };\\n\\n    Cea608Stream.prototype.paintOn = function (pts, text) {\\n      var baseRow = this.displayed_[this.row_];\\n      baseRow += text;\\n      this.displayed_[this.row_] = baseRow;\\n    }; // exports\\n\\n\\n    var captionStream = {\\n      CaptionStream: CaptionStream,\\n      Cea608Stream: Cea608Stream\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var streamTypes = {\\n      H264_STREAM_TYPE: 0x1B,\\n      ADTS_STREAM_TYPE: 0x0F,\\n      METADATA_STREAM_TYPE: 0x15\\n    };\\n    var MAX_TS = 8589934592;\\n    var RO_THRESH = 4294967296;\\n    var TYPE_SHARED = 'shared';\\n\\n    var handleRollover = function handleRollover(value, reference) {\\n      var direction = 1;\\n\\n      if (value > reference) {\\n        // If the current timestamp value is greater than our reference timestamp and we detect a\\n        // timestamp rollover, this means the roll over is happening in the opposite direction.\\n        // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\\n        // point will be set to a small number, e.g. 1. The user then seeks backwards over the\\n        // rollover point. In loading this segment, the timestamp values will be very large,\\n        // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\\n        // the time stamp to be `value - 2^33`.\\n        direction = -1;\\n      } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\\n      // cause an incorrect adjustment.\\n\\n\\n      while (Math.abs(reference - value) > RO_THRESH) {\\n        value += direction * MAX_TS;\\n      }\\n\\n      return value;\\n    };\\n\\n    var TimestampRolloverStream = function TimestampRolloverStream(type) {\\n      var lastDTS, referenceDTS;\\n      TimestampRolloverStream.prototype.init.call(this); // The \\\"shared\\\" type is used in cases where a stream will contain muxed\\n      // video and audio. We could use `undefined` here, but having a string\\n      // makes debugging a little clearer.\\n\\n      this.type_ = type || TYPE_SHARED;\\n\\n      this.push = function (data) {\\n        // Any \\\"shared\\\" rollover streams will accept _all_ data. Otherwise,\\n        // streams will only accept data that matches their type.\\n        if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\\n          return;\\n        }\\n\\n        if (referenceDTS === undefined) {\\n          referenceDTS = data.dts;\\n        }\\n\\n        data.dts = handleRollover(data.dts, referenceDTS);\\n        data.pts = handleRollover(data.pts, referenceDTS);\\n        lastDTS = data.dts;\\n        this.trigger('data', data);\\n      };\\n\\n      this.flush = function () {\\n        referenceDTS = lastDTS;\\n        this.trigger('done');\\n      };\\n\\n      this.endTimeline = function () {\\n        this.flush();\\n        this.trigger('endedtimeline');\\n      };\\n\\n      this.discontinuity = function () {\\n        referenceDTS = void 0;\\n        lastDTS = void 0;\\n      };\\n\\n      this.reset = function () {\\n        this.discontinuity();\\n        this.trigger('reset');\\n      };\\n    };\\n\\n    TimestampRolloverStream.prototype = new stream();\\n    var timestampRolloverStream = {\\n      TimestampRolloverStream: TimestampRolloverStream,\\n      handleRollover: handleRollover\\n    };\\n\\n    var percentEncode = function percentEncode(bytes, start, end) {\\n      var i,\\n          result = '';\\n\\n      for (i = start; i < end; i++) {\\n        result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\\n      }\\n\\n      return result;\\n    },\\n        // return the string representation of the specified byte range,\\n    // interpreted as UTf-8.\\n    parseUtf8 = function parseUtf8(bytes, start, end) {\\n      return decodeURIComponent(percentEncode(bytes, start, end));\\n    },\\n        // return the string representation of the specified byte range,\\n    // interpreted as ISO-8859-1.\\n    parseIso88591 = function parseIso88591(bytes, start, end) {\\n      return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\\n    },\\n        parseSyncSafeInteger = function parseSyncSafeInteger(data) {\\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\\n    },\\n        tagParsers = {\\n      TXXX: function TXXX(tag) {\\n        var i;\\n\\n        if (tag.data[0] !== 3) {\\n          // ignore frames with unrecognized character encodings\\n          return;\\n        }\\n\\n        for (i = 1; i < tag.data.length; i++) {\\n          if (tag.data[i] === 0) {\\n            // parse the text fields\\n            tag.description = parseUtf8(tag.data, 1, i); // do not include the null terminator in the tag value\\n\\n            tag.value = parseUtf8(tag.data, i + 1, tag.data.length).replace(/\\\\0*$/, '');\\n            break;\\n          }\\n        }\\n\\n        tag.data = tag.value;\\n      },\\n      WXXX: function WXXX(tag) {\\n        var i;\\n\\n        if (tag.data[0] !== 3) {\\n          // ignore frames with unrecognized character encodings\\n          return;\\n        }\\n\\n        for (i = 1; i < tag.data.length; i++) {\\n          if (tag.data[i] === 0) {\\n            // parse the description and URL fields\\n            tag.description = parseUtf8(tag.data, 1, i);\\n            tag.url = parseUtf8(tag.data, i + 1, tag.data.length);\\n            break;\\n          }\\n        }\\n      },\\n      PRIV: function PRIV(tag) {\\n        var i;\\n\\n        for (i = 0; i < tag.data.length; i++) {\\n          if (tag.data[i] === 0) {\\n            // parse the description and URL fields\\n            tag.owner = parseIso88591(tag.data, 0, i);\\n            break;\\n          }\\n        }\\n\\n        tag.privateData = tag.data.subarray(i + 1);\\n        tag.data = tag.privateData;\\n      }\\n    },\\n        _MetadataStream;\\n\\n    _MetadataStream = function MetadataStream(options) {\\n      var settings = {\\n        debug: !!(options && options.debug),\\n        // the bytes of the program-level descriptor field in MP2T\\n        // see ISO/IEC 13818-1:2013 (E), section 2.6 \\\"Program and\\n        // program element descriptors\\\"\\n        descriptor: options && options.descriptor\\n      },\\n          // the total size in bytes of the ID3 tag being parsed\\n      tagSize = 0,\\n          // tag data that is not complete enough to be parsed\\n      buffer = [],\\n          // the total number of bytes currently in the buffer\\n      bufferSize = 0,\\n          i;\\n\\n      _MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\\n      // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\\n\\n\\n      this.dispatchType = streamTypes.METADATA_STREAM_TYPE.toString(16);\\n\\n      if (settings.descriptor) {\\n        for (i = 0; i < settings.descriptor.length; i++) {\\n          this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\\n        }\\n      }\\n\\n      this.push = function (chunk) {\\n        var tag, frameStart, frameSize, frame, i, frameHeader;\\n\\n        if (chunk.type !== 'timed-metadata') {\\n          return;\\n        } // if data_alignment_indicator is set in the PES header,\\n        // we must have the start of a new ID3 tag. Assume anything\\n        // remaining in the buffer was malformed and throw it out\\n\\n\\n        if (chunk.dataAlignmentIndicator) {\\n          bufferSize = 0;\\n          buffer.length = 0;\\n        } // ignore events that don't look like ID3 data\\n\\n\\n        if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\\n          if (settings.debug) {\\n            // eslint-disable-next-line no-console\\n            console.log('Skipping unrecognized metadata packet');\\n          }\\n\\n          return;\\n        } // add this chunk to the data we've collected so far\\n\\n\\n        buffer.push(chunk);\\n        bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\\n\\n        if (buffer.length === 1) {\\n          // the frame size is transmitted as a 28-bit integer in the\\n          // last four bytes of the ID3 header.\\n          // The most significant bit of each byte is dropped and the\\n          // results concatenated to recover the actual value.\\n          tagSize = parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\\n          // convenient for our comparisons to include it\\n\\n          tagSize += 10;\\n        } // if the entire frame has not arrived, wait for more data\\n\\n\\n        if (bufferSize < tagSize) {\\n          return;\\n        } // collect the entire frame so it can be parsed\\n\\n\\n        tag = {\\n          data: new Uint8Array(tagSize),\\n          frames: [],\\n          pts: buffer[0].pts,\\n          dts: buffer[0].dts\\n        };\\n\\n        for (i = 0; i < tagSize;) {\\n          tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\\n          i += buffer[0].data.byteLength;\\n          bufferSize -= buffer[0].data.byteLength;\\n          buffer.shift();\\n        } // find the start of the first frame and the end of the tag\\n\\n\\n        frameStart = 10;\\n\\n        if (tag.data[5] & 0x40) {\\n          // advance the frame start past the extended header\\n          frameStart += 4; // header size field\\n\\n          frameStart += parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\\n\\n          tagSize -= parseSyncSafeInteger(tag.data.subarray(16, 20));\\n        } // parse one or more ID3 frames\\n        // http://id3.org/id3v2.3.0#ID3v2_frame_overview\\n\\n\\n        do {\\n          // determine the number of bytes in this frame\\n          frameSize = parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\\n\\n          if (frameSize < 1) {\\n            // eslint-disable-next-line no-console\\n            return console.log('Malformed ID3 frame encountered. Skipping metadata parsing.');\\n          }\\n\\n          frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\\n          frame = {\\n            id: frameHeader,\\n            data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\\n          };\\n          frame.key = frame.id;\\n\\n          if (tagParsers[frame.id]) {\\n            tagParsers[frame.id](frame); // handle the special PRIV frame used to indicate the start\\n            // time for raw AAC data\\n\\n            if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\\n              var d = frame.data,\\n                  size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\\n              size *= 4;\\n              size += d[7] & 0x03;\\n              frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\\n              // on the value of this frame\\n              // we couldn't have known the appropriate pts and dts before\\n              // parsing this ID3 tag so set those values now\\n\\n              if (tag.pts === undefined && tag.dts === undefined) {\\n                tag.pts = frame.timeStamp;\\n                tag.dts = frame.timeStamp;\\n              }\\n\\n              this.trigger('timestamp', frame);\\n            }\\n          }\\n\\n          tag.frames.push(frame);\\n          frameStart += 10; // advance past the frame header\\n\\n          frameStart += frameSize; // advance past the frame body\\n        } while (frameStart < tagSize);\\n\\n        this.trigger('data', tag);\\n      };\\n    };\\n\\n    _MetadataStream.prototype = new stream();\\n    var metadataStream = _MetadataStream;\\n    var TimestampRolloverStream$1 = timestampRolloverStream.TimestampRolloverStream; // object types\\n\\n    var _TransportPacketStream, _TransportParseStream, _ElementaryStream; // constants\\n\\n\\n    var MP2T_PACKET_LENGTH = 188,\\n        // bytes\\n    SYNC_BYTE = 0x47;\\n    /**\\n     * Splits an incoming stream of binary data into MPEG-2 Transport\\n     * Stream packets.\\n     */\\n\\n    _TransportPacketStream = function TransportPacketStream() {\\n      var buffer = new Uint8Array(MP2T_PACKET_LENGTH),\\n          bytesInBuffer = 0;\\n\\n      _TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\\n\\n      /**\\n       * Split a stream of data into M2TS packets\\n      **/\\n\\n\\n      this.push = function (bytes) {\\n        var startIndex = 0,\\n            endIndex = MP2T_PACKET_LENGTH,\\n            everything; // If there are bytes remaining from the last segment, prepend them to the\\n        // bytes that were pushed in\\n\\n        if (bytesInBuffer) {\\n          everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\\n          everything.set(buffer.subarray(0, bytesInBuffer));\\n          everything.set(bytes, bytesInBuffer);\\n          bytesInBuffer = 0;\\n        } else {\\n          everything = bytes;\\n        } // While we have enough data for a packet\\n\\n\\n        while (endIndex < everything.byteLength) {\\n          // Look for a pair of start and end sync bytes in the data..\\n          if (everything[startIndex] === SYNC_BYTE && everything[endIndex] === SYNC_BYTE) {\\n            // We found a packet so emit it and jump one whole packet forward in\\n            // the stream\\n            this.trigger('data', everything.subarray(startIndex, endIndex));\\n            startIndex += MP2T_PACKET_LENGTH;\\n            endIndex += MP2T_PACKET_LENGTH;\\n            continue;\\n          } // If we get here, we have somehow become de-synchronized and we need to step\\n          // forward one byte at a time until we find a pair of sync bytes that denote\\n          // a packet\\n\\n\\n          startIndex++;\\n          endIndex++;\\n        } // If there was some data left over at the end of the segment that couldn't\\n        // possibly be a whole packet, keep it because it might be the start of a packet\\n        // that continues in the next segment\\n\\n\\n        if (startIndex < everything.byteLength) {\\n          buffer.set(everything.subarray(startIndex), 0);\\n          bytesInBuffer = everything.byteLength - startIndex;\\n        }\\n      };\\n      /**\\n       * Passes identified M2TS packets to the TransportParseStream to be parsed\\n      **/\\n\\n\\n      this.flush = function () {\\n        // If the buffer contains a whole packet when we are being flushed, emit it\\n        // and empty the buffer. Otherwise hold onto the data because it may be\\n        // important for decoding the next segment\\n        if (bytesInBuffer === MP2T_PACKET_LENGTH && buffer[0] === SYNC_BYTE) {\\n          this.trigger('data', buffer);\\n          bytesInBuffer = 0;\\n        }\\n\\n        this.trigger('done');\\n      };\\n\\n      this.endTimeline = function () {\\n        this.flush();\\n        this.trigger('endedtimeline');\\n      };\\n\\n      this.reset = function () {\\n        bytesInBuffer = 0;\\n        this.trigger('reset');\\n      };\\n    };\\n\\n    _TransportPacketStream.prototype = new stream();\\n    /**\\n     * Accepts an MP2T TransportPacketStream and emits data events with parsed\\n     * forms of the individual transport stream packets.\\n     */\\n\\n    _TransportParseStream = function TransportParseStream() {\\n      var parsePsi, parsePat, parsePmt, self;\\n\\n      _TransportParseStream.prototype.init.call(this);\\n\\n      self = this;\\n      this.packetsWaitingForPmt = [];\\n      this.programMapTable = undefined;\\n\\n      parsePsi = function parsePsi(payload, psi) {\\n        var offset = 0; // PSI packets may be split into multiple sections and those\\n        // sections may be split into multiple packets. If a PSI\\n        // section starts in this packet, the payload_unit_start_indicator\\n        // will be true and the first byte of the payload will indicate\\n        // the offset from the current position to the start of the\\n        // section.\\n\\n        if (psi.payloadUnitStartIndicator) {\\n          offset += payload[offset] + 1;\\n        }\\n\\n        if (psi.type === 'pat') {\\n          parsePat(payload.subarray(offset), psi);\\n        } else {\\n          parsePmt(payload.subarray(offset), psi);\\n        }\\n      };\\n\\n      parsePat = function parsePat(payload, pat) {\\n        pat.section_number = payload[7]; // eslint-disable-line camelcase\\n\\n        pat.last_section_number = payload[8]; // eslint-disable-line camelcase\\n        // skip the PSI header and parse the first PMT entry\\n\\n        self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\\n        pat.pmtPid = self.pmtPid;\\n      };\\n      /**\\n       * Parse out the relevant fields of a Program Map Table (PMT).\\n       * @param payload {Uint8Array} the PMT-specific portion of an MP2T\\n       * packet. The first byte in this array should be the table_id\\n       * field.\\n       * @param pmt {object} the object that should be decorated with\\n       * fields parsed from the PMT.\\n       */\\n\\n\\n      parsePmt = function parsePmt(payload, pmt) {\\n        var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\\n        // take effect. We don't believe this should ever be the case\\n        // for HLS but we'll ignore \\\"forward\\\" PMT declarations if we see\\n        // them. Future PMT declarations have the current_next_indicator\\n        // set to zero.\\n\\n        if (!(payload[5] & 0x01)) {\\n          return;\\n        } // overwrite any existing program map table\\n\\n\\n        self.programMapTable = {\\n          video: null,\\n          audio: null,\\n          'timed-metadata': {}\\n        }; // the mapping table ends at the end of the current section\\n\\n        sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\\n        tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\\n        // long the program info descriptors are\\n\\n        programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\\n\\n        offset = 12 + programInfoLength;\\n\\n        while (offset < tableEnd) {\\n          var streamType = payload[offset];\\n          var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\\n          // TODO: should this be done for metadata too? for now maintain behavior of\\n          //       multiple metadata streams\\n\\n          if (streamType === streamTypes.H264_STREAM_TYPE && self.programMapTable.video === null) {\\n            self.programMapTable.video = pid;\\n          } else if (streamType === streamTypes.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\\n            self.programMapTable.audio = pid;\\n          } else if (streamType === streamTypes.METADATA_STREAM_TYPE) {\\n            // map pid to stream type for metadata streams\\n            self.programMapTable['timed-metadata'][pid] = streamType;\\n          } // move to the next table entry\\n          // skip past the elementary stream descriptors, if present\\n\\n\\n          offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\\n        } // record the map on the packet as well\\n\\n\\n        pmt.programMapTable = self.programMapTable;\\n      };\\n      /**\\n       * Deliver a new MP2T packet to the next stream in the pipeline.\\n       */\\n\\n\\n      this.push = function (packet) {\\n        var result = {},\\n            offset = 4;\\n        result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\\n\\n        result.pid = packet[1] & 0x1f;\\n        result.pid <<= 8;\\n        result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\\n        // fifth byte of the TS packet header. The adaptation field is\\n        // used to add stuffing to PES packets that don't fill a complete\\n        // TS packet, and to specify some forms of timing and control data\\n        // that we do not currently use.\\n\\n        if ((packet[3] & 0x30) >>> 4 > 0x01) {\\n          offset += packet[offset] + 1;\\n        } // parse the rest of the packet based on the type\\n\\n\\n        if (result.pid === 0) {\\n          result.type = 'pat';\\n          parsePsi(packet.subarray(offset), result);\\n          this.trigger('data', result);\\n        } else if (result.pid === this.pmtPid) {\\n          result.type = 'pmt';\\n          parsePsi(packet.subarray(offset), result);\\n          this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\\n\\n          while (this.packetsWaitingForPmt.length) {\\n            this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\\n          }\\n        } else if (this.programMapTable === undefined) {\\n          // When we have not seen a PMT yet, defer further processing of\\n          // PES packets until one has been parsed\\n          this.packetsWaitingForPmt.push([packet, offset, result]);\\n        } else {\\n          this.processPes_(packet, offset, result);\\n        }\\n      };\\n\\n      this.processPes_ = function (packet, offset, result) {\\n        // set the appropriate stream type\\n        if (result.pid === this.programMapTable.video) {\\n          result.streamType = streamTypes.H264_STREAM_TYPE;\\n        } else if (result.pid === this.programMapTable.audio) {\\n          result.streamType = streamTypes.ADTS_STREAM_TYPE;\\n        } else {\\n          // if not video or audio, it is timed-metadata or unknown\\n          // if unknown, streamType will be undefined\\n          result.streamType = this.programMapTable['timed-metadata'][result.pid];\\n        }\\n\\n        result.type = 'pes';\\n        result.data = packet.subarray(offset);\\n        this.trigger('data', result);\\n      };\\n    };\\n\\n    _TransportParseStream.prototype = new stream();\\n    _TransportParseStream.STREAM_TYPES = {\\n      h264: 0x1b,\\n      adts: 0x0f\\n    };\\n    /**\\n     * Reconsistutes program elementary stream (PES) packets from parsed\\n     * transport stream packets. That is, if you pipe an\\n     * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\\n     * events will be events which capture the bytes for individual PES\\n     * packets plus relevant metadata that has been extracted from the\\n     * container.\\n     */\\n\\n    _ElementaryStream = function ElementaryStream() {\\n      var self = this,\\n          // PES packet fragments\\n      video = {\\n        data: [],\\n        size: 0\\n      },\\n          audio = {\\n        data: [],\\n        size: 0\\n      },\\n          timedMetadata = {\\n        data: [],\\n        size: 0\\n      },\\n          programMapTable,\\n          parsePes = function parsePes(payload, pes) {\\n        var ptsDtsFlags; // get the packet length, this will be 0 for video\\n\\n        pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\\n\\n        pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\\n        // and a DTS value. Determine what combination of values is\\n        // available to work with.\\n\\n        ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\\n        // performs all bitwise operations on 32-bit integers but javascript\\n        // supports a much greater range (52-bits) of integer using standard\\n        // mathematical operations.\\n        // We construct a 31-bit value using bitwise operators over the 31\\n        // most significant bits and then multiply by 4 (equal to a left-shift\\n        // of 2) before we add the final 2 least significant bits of the\\n        // timestamp (equal to an OR.)\\n\\n        if (ptsDtsFlags & 0xC0) {\\n          // the PTS and DTS are not written out directly. For information\\n          // on how they are encoded, see\\n          // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\\n          pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\\n          pes.pts *= 4; // Left shift by 2\\n\\n          pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\\n\\n          pes.dts = pes.pts;\\n\\n          if (ptsDtsFlags & 0x40) {\\n            pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\\n            pes.dts *= 4; // Left shift by 2\\n\\n            pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\\n          }\\n        } // the data section starts immediately after the PES header.\\n        // pes_header_data_length specifies the number of header bytes\\n        // that follow the last byte of the field.\\n\\n\\n        pes.data = payload.subarray(9 + payload[8]);\\n      },\\n\\n      /**\\n        * Pass completely parsed PES packets to the next stream in the pipeline\\n       **/\\n      flushStream = function flushStream(stream$$1, type, forceFlush) {\\n        var packetData = new Uint8Array(stream$$1.size),\\n            event = {\\n          type: type\\n        },\\n            i = 0,\\n            offset = 0,\\n            packetFlushable = false,\\n            fragment; // do nothing if there is not enough buffered data for a complete\\n        // PES header\\n\\n        if (!stream$$1.data.length || stream$$1.size < 9) {\\n          return;\\n        }\\n\\n        event.trackId = stream$$1.data[0].pid; // reassemble the packet\\n\\n        for (i = 0; i < stream$$1.data.length; i++) {\\n          fragment = stream$$1.data[i];\\n          packetData.set(fragment.data, offset);\\n          offset += fragment.data.byteLength;\\n        } // parse assembled packet's PES header\\n\\n\\n        parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\\n        // check that there is enough stream data to fill the packet\\n\\n        packetFlushable = type === 'video' || event.packetLength <= stream$$1.size; // flush pending packets if the conditions are right\\n\\n        if (forceFlush || packetFlushable) {\\n          stream$$1.size = 0;\\n          stream$$1.data.length = 0;\\n        } // only emit packets that are complete. this is to avoid assembling\\n        // incomplete PES packets due to poor segmentation\\n\\n\\n        if (packetFlushable) {\\n          self.trigger('data', event);\\n        }\\n      };\\n\\n      _ElementaryStream.prototype.init.call(this);\\n      /**\\n       * Identifies M2TS packet types and parses PES packets using metadata\\n       * parsed from the PMT\\n       **/\\n\\n\\n      this.push = function (data) {\\n        ({\\n          pat: function pat() {// we have to wait for the PMT to arrive as well before we\\n            // have any meaningful metadata\\n          },\\n          pes: function pes() {\\n            var stream$$1, streamType;\\n\\n            switch (data.streamType) {\\n              case streamTypes.H264_STREAM_TYPE:\\n              case streamTypes.H264_STREAM_TYPE:\\n                stream$$1 = video;\\n                streamType = 'video';\\n                break;\\n\\n              case streamTypes.ADTS_STREAM_TYPE:\\n                stream$$1 = audio;\\n                streamType = 'audio';\\n                break;\\n\\n              case streamTypes.METADATA_STREAM_TYPE:\\n                stream$$1 = timedMetadata;\\n                streamType = 'timed-metadata';\\n                break;\\n\\n              default:\\n                // ignore unknown stream types\\n                return;\\n            } // if a new packet is starting, we can flush the completed\\n            // packet\\n\\n\\n            if (data.payloadUnitStartIndicator) {\\n              flushStream(stream$$1, streamType, true);\\n            } // buffer this fragment until we are sure we've received the\\n            // complete payload\\n\\n\\n            stream$$1.data.push(data);\\n            stream$$1.size += data.data.byteLength;\\n          },\\n          pmt: function pmt() {\\n            var event = {\\n              type: 'metadata',\\n              tracks: []\\n            };\\n            programMapTable = data.programMapTable; // translate audio and video streams to tracks\\n\\n            if (programMapTable.video !== null) {\\n              event.tracks.push({\\n                timelineStartInfo: {\\n                  baseMediaDecodeTime: 0\\n                },\\n                id: +programMapTable.video,\\n                codec: 'avc',\\n                type: 'video'\\n              });\\n            }\\n\\n            if (programMapTable.audio !== null) {\\n              event.tracks.push({\\n                timelineStartInfo: {\\n                  baseMediaDecodeTime: 0\\n                },\\n                id: +programMapTable.audio,\\n                codec: 'adts',\\n                type: 'audio'\\n              });\\n            }\\n\\n            self.trigger('data', event);\\n          }\\n        })[data.type]();\\n      };\\n\\n      this.reset = function () {\\n        video.size = 0;\\n        video.data.length = 0;\\n        audio.size = 0;\\n        audio.data.length = 0;\\n        this.trigger('reset');\\n      };\\n      /**\\n       * Flush any remaining input. Video PES packets may be of variable\\n       * length. Normally, the start of a new video packet can trigger the\\n       * finalization of the previous packet. That is not possible if no\\n       * more video is forthcoming, however. In that case, some other\\n       * mechanism (like the end of the file) has to be employed. When it is\\n       * clear that no additional data is forthcoming, calling this method\\n       * will flush the buffered packets.\\n       */\\n\\n\\n      this.flushStreams_ = function () {\\n        // !!THIS ORDER IS IMPORTANT!!\\n        // video first then audio\\n        flushStream(video, 'video');\\n        flushStream(audio, 'audio');\\n        flushStream(timedMetadata, 'timed-metadata');\\n      };\\n\\n      this.flush = function () {\\n        this.flushStreams_();\\n        this.trigger('done');\\n      };\\n    };\\n\\n    _ElementaryStream.prototype = new stream();\\n    var m2ts = {\\n      PAT_PID: 0x0000,\\n      MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH,\\n      TransportPacketStream: _TransportPacketStream,\\n      TransportParseStream: _TransportParseStream,\\n      ElementaryStream: _ElementaryStream,\\n      TimestampRolloverStream: TimestampRolloverStream$1,\\n      CaptionStream: captionStream.CaptionStream,\\n      Cea608Stream: captionStream.Cea608Stream,\\n      MetadataStream: metadataStream\\n    };\\n\\n    for (var type in streamTypes) {\\n      if (streamTypes.hasOwnProperty(type)) {\\n        m2ts[type] = streamTypes[type];\\n      }\\n    }\\n\\n    var m2ts_1 = m2ts;\\n    var ONE_SECOND_IN_TS$2 = clock.ONE_SECOND_IN_TS;\\n\\n    var _AdtsStream;\\n\\n    var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\\n    /*\\n     * Accepts a ElementaryStream and emits data events with parsed\\n     * AAC Audio Frames of the individual packets. Input audio in ADTS\\n     * format is unpacked and re-emitted as AAC frames.\\n     *\\n     * @see http://wiki.multimedia.cx/index.php?title=ADTS\\n     * @see http://wiki.multimedia.cx/?title=Understanding_AAC\\n     */\\n\\n    _AdtsStream = function AdtsStream(handlePartialSegments) {\\n      var buffer,\\n          frameNum = 0;\\n\\n      _AdtsStream.prototype.init.call(this);\\n\\n      this.push = function (packet) {\\n        var i = 0,\\n            frameLength,\\n            protectionSkipBytes,\\n            frameEnd,\\n            oldBuffer,\\n            sampleCount,\\n            adtsFrameDuration;\\n\\n        if (!handlePartialSegments) {\\n          frameNum = 0;\\n        }\\n\\n        if (packet.type !== 'audio') {\\n          // ignore non-audio data\\n          return;\\n        } // Prepend any data in the buffer to the input data so that we can parse\\n        // aac frames the cross a PES packet boundary\\n\\n\\n        if (buffer) {\\n          oldBuffer = buffer;\\n          buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\\n          buffer.set(oldBuffer);\\n          buffer.set(packet.data, oldBuffer.byteLength);\\n        } else {\\n          buffer = packet.data;\\n        } // unpack any ADTS frames which have been fully received\\n        // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\\n\\n\\n        while (i + 5 < buffer.length) {\\n          // Look for the start of an ADTS header..\\n          if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\\n            // If a valid header was not found,  jump one forward and attempt to\\n            // find a valid ADTS header starting at the next byte\\n            i++;\\n            continue;\\n          } // The protection skip bit tells us if we have 2 bytes of CRC data at the\\n          // end of the ADTS header\\n\\n\\n          protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\\n          // end of the sync sequence\\n\\n          frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\\n          sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\\n          adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2];\\n          frameEnd = i + frameLength; // If we don't have enough data to actually finish this ADTS frame, return\\n          // and wait for more data\\n\\n          if (buffer.byteLength < frameEnd) {\\n            return;\\n          } // Otherwise, deliver the complete AAC frame\\n\\n\\n          this.trigger('data', {\\n            pts: packet.pts + frameNum * adtsFrameDuration,\\n            dts: packet.dts + frameNum * adtsFrameDuration,\\n            sampleCount: sampleCount,\\n            audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\\n            channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\\n            samplerate: ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2],\\n            samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\\n            // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\\n            samplesize: 16,\\n            data: buffer.subarray(i + 7 + protectionSkipBytes, frameEnd)\\n          });\\n          frameNum++; // If the buffer is empty, clear it and return\\n\\n          if (buffer.byteLength === frameEnd) {\\n            buffer = undefined;\\n            return;\\n          } // Remove the finished frame from the buffer and start the process again\\n\\n\\n          buffer = buffer.subarray(frameEnd);\\n        }\\n      };\\n\\n      this.flush = function () {\\n        frameNum = 0;\\n        this.trigger('done');\\n      };\\n\\n      this.reset = function () {\\n        buffer = void 0;\\n        this.trigger('reset');\\n      };\\n\\n      this.endTimeline = function () {\\n        buffer = void 0;\\n        this.trigger('endedtimeline');\\n      };\\n    };\\n\\n    _AdtsStream.prototype = new stream();\\n    var adts = _AdtsStream;\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var ExpGolomb;\\n    /**\\n     * Parser for exponential Golomb codes, a variable-bitwidth number encoding\\n     * scheme used by h264.\\n     */\\n\\n    ExpGolomb = function ExpGolomb(workingData) {\\n      var // the number of bytes left to examine in workingData\\n      workingBytesAvailable = workingData.byteLength,\\n          // the current word being examined\\n      workingWord = 0,\\n          // :uint\\n      // the number of bits left to examine in the current word\\n      workingBitsAvailable = 0; // :uint;\\n      // ():uint\\n\\n      this.length = function () {\\n        return 8 * workingBytesAvailable;\\n      }; // ():uint\\n\\n\\n      this.bitsAvailable = function () {\\n        return 8 * workingBytesAvailable + workingBitsAvailable;\\n      }; // ():void\\n\\n\\n      this.loadWord = function () {\\n        var position = workingData.byteLength - workingBytesAvailable,\\n            workingBytes = new Uint8Array(4),\\n            availableBytes = Math.min(4, workingBytesAvailable);\\n\\n        if (availableBytes === 0) {\\n          throw new Error('no bytes available');\\n        }\\n\\n        workingBytes.set(workingData.subarray(position, position + availableBytes));\\n        workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\\n\\n        workingBitsAvailable = availableBytes * 8;\\n        workingBytesAvailable -= availableBytes;\\n      }; // (count:int):void\\n\\n\\n      this.skipBits = function (count) {\\n        var skipBytes; // :int\\n\\n        if (workingBitsAvailable > count) {\\n          workingWord <<= count;\\n          workingBitsAvailable -= count;\\n        } else {\\n          count -= workingBitsAvailable;\\n          skipBytes = Math.floor(count / 8);\\n          count -= skipBytes * 8;\\n          workingBytesAvailable -= skipBytes;\\n          this.loadWord();\\n          workingWord <<= count;\\n          workingBitsAvailable -= count;\\n        }\\n      }; // (size:int):uint\\n\\n\\n      this.readBits = function (size) {\\n        var bits = Math.min(workingBitsAvailable, size),\\n            // :uint\\n        valu = workingWord >>> 32 - bits; // :uint\\n        // if size > 31, handle error\\n\\n        workingBitsAvailable -= bits;\\n\\n        if (workingBitsAvailable > 0) {\\n          workingWord <<= bits;\\n        } else if (workingBytesAvailable > 0) {\\n          this.loadWord();\\n        }\\n\\n        bits = size - bits;\\n\\n        if (bits > 0) {\\n          return valu << bits | this.readBits(bits);\\n        }\\n\\n        return valu;\\n      }; // ():uint\\n\\n\\n      this.skipLeadingZeros = function () {\\n        var leadingZeroCount; // :uint\\n\\n        for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\\n          if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\\n            // the first bit of working word is 1\\n            workingWord <<= leadingZeroCount;\\n            workingBitsAvailable -= leadingZeroCount;\\n            return leadingZeroCount;\\n          }\\n        } // we exhausted workingWord and still have not found a 1\\n\\n\\n        this.loadWord();\\n        return leadingZeroCount + this.skipLeadingZeros();\\n      }; // ():void\\n\\n\\n      this.skipUnsignedExpGolomb = function () {\\n        this.skipBits(1 + this.skipLeadingZeros());\\n      }; // ():void\\n\\n\\n      this.skipExpGolomb = function () {\\n        this.skipBits(1 + this.skipLeadingZeros());\\n      }; // ():uint\\n\\n\\n      this.readUnsignedExpGolomb = function () {\\n        var clz = this.skipLeadingZeros(); // :uint\\n\\n        return this.readBits(clz + 1) - 1;\\n      }; // ():int\\n\\n\\n      this.readExpGolomb = function () {\\n        var valu = this.readUnsignedExpGolomb(); // :int\\n\\n        if (0x01 & valu) {\\n          // the number is odd if the low order bit is set\\n          return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\\n        }\\n\\n        return -1 * (valu >>> 1); // divide by two then make it negative\\n      }; // Some convenience functions\\n      // :Boolean\\n\\n\\n      this.readBoolean = function () {\\n        return this.readBits(1) === 1;\\n      }; // ():int\\n\\n\\n      this.readUnsignedByte = function () {\\n        return this.readBits(8);\\n      };\\n\\n      this.loadWord();\\n    };\\n\\n    var expGolomb = ExpGolomb;\\n\\n    var _H264Stream, _NalByteStream;\\n\\n    var PROFILES_WITH_OPTIONAL_SPS_DATA;\\n    /**\\n     * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\\n     */\\n\\n    _NalByteStream = function NalByteStream() {\\n      var syncPoint = 0,\\n          i,\\n          buffer;\\n\\n      _NalByteStream.prototype.init.call(this);\\n      /*\\n       * Scans a byte stream and triggers a data event with the NAL units found.\\n       * @param {Object} data Event received from H264Stream\\n       * @param {Uint8Array} data.data The h264 byte stream to be scanned\\n       *\\n       * @see H264Stream.push\\n       */\\n\\n\\n      this.push = function (data) {\\n        var swapBuffer;\\n\\n        if (!buffer) {\\n          buffer = data.data;\\n        } else {\\n          swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\\n          swapBuffer.set(buffer);\\n          swapBuffer.set(data.data, buffer.byteLength);\\n          buffer = swapBuffer;\\n        }\\n\\n        var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\\n        // scan for NAL unit boundaries\\n        // a match looks like this:\\n        // 0 0 1 .. NAL .. 0 0 1\\n        // ^ sync point        ^ i\\n        // or this:\\n        // 0 0 1 .. NAL .. 0 0 0\\n        // ^ sync point        ^ i\\n        // advance the sync point to a NAL start, if necessary\\n\\n        for (; syncPoint < len - 3; syncPoint++) {\\n          if (buffer[syncPoint + 2] === 1) {\\n            // the sync point is properly aligned\\n            i = syncPoint + 5;\\n            break;\\n          }\\n        }\\n\\n        while (i < len) {\\n          // look at the current byte to determine if we've hit the end of\\n          // a NAL unit boundary\\n          switch (buffer[i]) {\\n            case 0:\\n              // skip past non-sync sequences\\n              if (buffer[i - 1] !== 0) {\\n                i += 2;\\n                break;\\n              } else if (buffer[i - 2] !== 0) {\\n                i++;\\n                break;\\n              } // deliver the NAL unit if it isn't empty\\n\\n\\n              if (syncPoint + 3 !== i - 2) {\\n                this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\\n              } // drop trailing zeroes\\n\\n\\n              do {\\n                i++;\\n              } while (buffer[i] !== 1 && i < len);\\n\\n              syncPoint = i - 2;\\n              i += 3;\\n              break;\\n\\n            case 1:\\n              // skip past non-sync sequences\\n              if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\\n                i += 3;\\n                break;\\n              } // deliver the NAL unit\\n\\n\\n              this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\\n              syncPoint = i - 2;\\n              i += 3;\\n              break;\\n\\n            default:\\n              // the current byte isn't a one or zero, so it cannot be part\\n              // of a sync sequence\\n              i += 3;\\n              break;\\n          }\\n        } // filter out the NAL units that were delivered\\n\\n\\n        buffer = buffer.subarray(syncPoint);\\n        i -= syncPoint;\\n        syncPoint = 0;\\n      };\\n\\n      this.reset = function () {\\n        buffer = null;\\n        syncPoint = 0;\\n        this.trigger('reset');\\n      };\\n\\n      this.flush = function () {\\n        // deliver the last buffered NAL unit\\n        if (buffer && buffer.byteLength > 3) {\\n          this.trigger('data', buffer.subarray(syncPoint + 3));\\n        } // reset the stream state\\n\\n\\n        buffer = null;\\n        syncPoint = 0;\\n        this.trigger('done');\\n      };\\n\\n      this.endTimeline = function () {\\n        this.flush();\\n        this.trigger('endedtimeline');\\n      };\\n    };\\n\\n    _NalByteStream.prototype = new stream(); // values of profile_idc that indicate additional fields are included in the SPS\\n    // see Recommendation ITU-T H.264 (4/2013),\\n    // 7.3.2.1.1 Sequence parameter set data syntax\\n\\n    PROFILES_WITH_OPTIONAL_SPS_DATA = {\\n      100: true,\\n      110: true,\\n      122: true,\\n      244: true,\\n      44: true,\\n      83: true,\\n      86: true,\\n      118: true,\\n      128: true,\\n      138: true,\\n      139: true,\\n      134: true\\n    };\\n    /**\\n     * Accepts input from a ElementaryStream and produces H.264 NAL unit data\\n     * events.\\n     */\\n\\n    _H264Stream = function H264Stream() {\\n      var nalByteStream = new _NalByteStream(),\\n          self,\\n          trackId,\\n          currentPts,\\n          currentDts,\\n          discardEmulationPreventionBytes,\\n          readSequenceParameterSet,\\n          skipScalingList;\\n\\n      _H264Stream.prototype.init.call(this);\\n\\n      self = this;\\n      /*\\n       * Pushes a packet from a stream onto the NalByteStream\\n       *\\n       * @param {Object} packet - A packet received from a stream\\n       * @param {Uint8Array} packet.data - The raw bytes of the packet\\n       * @param {Number} packet.dts - Decode timestamp of the packet\\n       * @param {Number} packet.pts - Presentation timestamp of the packet\\n       * @param {Number} packet.trackId - The id of the h264 track this packet came from\\n       * @param {('video'|'audio')} packet.type - The type of packet\\n       *\\n       */\\n\\n      this.push = function (packet) {\\n        if (packet.type !== 'video') {\\n          return;\\n        }\\n\\n        trackId = packet.trackId;\\n        currentPts = packet.pts;\\n        currentDts = packet.dts;\\n        nalByteStream.push(packet);\\n      };\\n      /*\\n       * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\\n       * for the NALUs to the next stream component.\\n       * Also, preprocess caption and sequence parameter NALUs.\\n       *\\n       * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\\n       * @see NalByteStream.push\\n       */\\n\\n\\n      nalByteStream.on('data', function (data) {\\n        var event = {\\n          trackId: trackId,\\n          pts: currentPts,\\n          dts: currentDts,\\n          data: data\\n        };\\n\\n        switch (data[0] & 0x1f) {\\n          case 0x05:\\n            event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\\n            break;\\n\\n          case 0x06:\\n            event.nalUnitType = 'sei_rbsp';\\n            event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\\n            break;\\n\\n          case 0x07:\\n            event.nalUnitType = 'seq_parameter_set_rbsp';\\n            event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\\n            event.config = readSequenceParameterSet(event.escapedRBSP);\\n            break;\\n\\n          case 0x08:\\n            event.nalUnitType = 'pic_parameter_set_rbsp';\\n            break;\\n\\n          case 0x09:\\n            event.nalUnitType = 'access_unit_delimiter_rbsp';\\n            break;\\n        } // This triggers data on the H264Stream\\n\\n\\n        self.trigger('data', event);\\n      });\\n      nalByteStream.on('done', function () {\\n        self.trigger('done');\\n      });\\n      nalByteStream.on('partialdone', function () {\\n        self.trigger('partialdone');\\n      });\\n      nalByteStream.on('reset', function () {\\n        self.trigger('reset');\\n      });\\n      nalByteStream.on('endedtimeline', function () {\\n        self.trigger('endedtimeline');\\n      });\\n\\n      this.flush = function () {\\n        nalByteStream.flush();\\n      };\\n\\n      this.partialFlush = function () {\\n        nalByteStream.partialFlush();\\n      };\\n\\n      this.reset = function () {\\n        nalByteStream.reset();\\n      };\\n\\n      this.endTimeline = function () {\\n        nalByteStream.endTimeline();\\n      };\\n      /**\\n       * Advance the ExpGolomb decoder past a scaling list. The scaling\\n       * list is optionally transmitted as part of a sequence parameter\\n       * set and is not relevant to transmuxing.\\n       * @param count {number} the number of entries in this scaling list\\n       * @param expGolombDecoder {object} an ExpGolomb pointed to the\\n       * start of a scaling list\\n       * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\\n       */\\n\\n\\n      skipScalingList = function skipScalingList(count, expGolombDecoder) {\\n        var lastScale = 8,\\n            nextScale = 8,\\n            j,\\n            deltaScale;\\n\\n        for (j = 0; j < count; j++) {\\n          if (nextScale !== 0) {\\n            deltaScale = expGolombDecoder.readExpGolomb();\\n            nextScale = (lastScale + deltaScale + 256) % 256;\\n          }\\n\\n          lastScale = nextScale === 0 ? lastScale : nextScale;\\n        }\\n      };\\n      /**\\n       * Expunge any \\\"Emulation Prevention\\\" bytes from a \\\"Raw Byte\\n       * Sequence Payload\\\"\\n       * @param data {Uint8Array} the bytes of a RBSP from a NAL\\n       * unit\\n       * @return {Uint8Array} the RBSP without any Emulation\\n       * Prevention Bytes\\n       */\\n\\n\\n      discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\\n        var length = data.byteLength,\\n            emulationPreventionBytesPositions = [],\\n            i = 1,\\n            newLength,\\n            newData; // Find all `Emulation Prevention Bytes`\\n\\n        while (i < length - 2) {\\n          if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\\n            emulationPreventionBytesPositions.push(i + 2);\\n            i += 2;\\n          } else {\\n            i++;\\n          }\\n        } // If no Emulation Prevention Bytes were found just return the original\\n        // array\\n\\n\\n        if (emulationPreventionBytesPositions.length === 0) {\\n          return data;\\n        } // Create a new array to hold the NAL unit data\\n\\n\\n        newLength = length - emulationPreventionBytesPositions.length;\\n        newData = new Uint8Array(newLength);\\n        var sourceIndex = 0;\\n\\n        for (i = 0; i < newLength; sourceIndex++, i++) {\\n          if (sourceIndex === emulationPreventionBytesPositions[0]) {\\n            // Skip this byte\\n            sourceIndex++; // Remove this position index\\n\\n            emulationPreventionBytesPositions.shift();\\n          }\\n\\n          newData[i] = data[sourceIndex];\\n        }\\n\\n        return newData;\\n      };\\n      /**\\n       * Read a sequence parameter set and return some interesting video\\n       * properties. A sequence parameter set is the H264 metadata that\\n       * describes the properties of upcoming video frames.\\n       * @param data {Uint8Array} the bytes of a sequence parameter set\\n       * @return {object} an object with configuration parsed from the\\n       * sequence parameter set, including the dimensions of the\\n       * associated video frames.\\n       */\\n\\n\\n      readSequenceParameterSet = function readSequenceParameterSet(data) {\\n        var frameCropLeftOffset = 0,\\n            frameCropRightOffset = 0,\\n            frameCropTopOffset = 0,\\n            frameCropBottomOffset = 0,\\n            sarScale = 1,\\n            expGolombDecoder,\\n            profileIdc,\\n            levelIdc,\\n            profileCompatibility,\\n            chromaFormatIdc,\\n            picOrderCntType,\\n            numRefFramesInPicOrderCntCycle,\\n            picWidthInMbsMinus1,\\n            picHeightInMapUnitsMinus1,\\n            frameMbsOnlyFlag,\\n            scalingListCount,\\n            sarRatio,\\n            aspectRatioIdc,\\n            i;\\n        expGolombDecoder = new expGolomb(data);\\n        profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\\n\\n        profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\\n\\n        levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\\n\\n        expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\\n        // some profiles have more optional data we don't need\\n\\n        if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\\n          chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\\n\\n          if (chromaFormatIdc === 3) {\\n            expGolombDecoder.skipBits(1); // separate_colour_plane_flag\\n          }\\n\\n          expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\\n\\n          expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\\n\\n          expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\\n\\n          if (expGolombDecoder.readBoolean()) {\\n            // seq_scaling_matrix_present_flag\\n            scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\\n\\n            for (i = 0; i < scalingListCount; i++) {\\n              if (expGolombDecoder.readBoolean()) {\\n                // seq_scaling_list_present_flag[ i ]\\n                if (i < 6) {\\n                  skipScalingList(16, expGolombDecoder);\\n                } else {\\n                  skipScalingList(64, expGolombDecoder);\\n                }\\n              }\\n            }\\n          }\\n        }\\n\\n        expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\\n\\n        picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\\n\\n        if (picOrderCntType === 0) {\\n          expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\\n        } else if (picOrderCntType === 1) {\\n          expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\\n\\n          expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\\n\\n          expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\\n\\n          numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\\n\\n          for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\\n            expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\\n          }\\n        }\\n\\n        expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\\n\\n        expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\\n\\n        picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\\n        picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\\n        frameMbsOnlyFlag = expGolombDecoder.readBits(1);\\n\\n        if (frameMbsOnlyFlag === 0) {\\n          expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\\n        }\\n\\n        expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\\n\\n        if (expGolombDecoder.readBoolean()) {\\n          // frame_cropping_flag\\n          frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\\n          frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\\n          frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\\n          frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\\n        }\\n\\n        if (expGolombDecoder.readBoolean()) {\\n          // vui_parameters_present_flag\\n          if (expGolombDecoder.readBoolean()) {\\n            // aspect_ratio_info_present_flag\\n            aspectRatioIdc = expGolombDecoder.readUnsignedByte();\\n\\n            switch (aspectRatioIdc) {\\n              case 1:\\n                sarRatio = [1, 1];\\n                break;\\n\\n              case 2:\\n                sarRatio = [12, 11];\\n                break;\\n\\n              case 3:\\n                sarRatio = [10, 11];\\n                break;\\n\\n              case 4:\\n                sarRatio = [16, 11];\\n                break;\\n\\n              case 5:\\n                sarRatio = [40, 33];\\n                break;\\n\\n              case 6:\\n                sarRatio = [24, 11];\\n                break;\\n\\n              case 7:\\n                sarRatio = [20, 11];\\n                break;\\n\\n              case 8:\\n                sarRatio = [32, 11];\\n                break;\\n\\n              case 9:\\n                sarRatio = [80, 33];\\n                break;\\n\\n              case 10:\\n                sarRatio = [18, 11];\\n                break;\\n\\n              case 11:\\n                sarRatio = [15, 11];\\n                break;\\n\\n              case 12:\\n                sarRatio = [64, 33];\\n                break;\\n\\n              case 13:\\n                sarRatio = [160, 99];\\n                break;\\n\\n              case 14:\\n                sarRatio = [4, 3];\\n                break;\\n\\n              case 15:\\n                sarRatio = [3, 2];\\n                break;\\n\\n              case 16:\\n                sarRatio = [2, 1];\\n                break;\\n\\n              case 255:\\n                {\\n                  sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\\n                  break;\\n                }\\n            }\\n\\n            if (sarRatio) {\\n              sarScale = sarRatio[0] / sarRatio[1];\\n            }\\n          }\\n        }\\n\\n        return {\\n          profileIdc: profileIdc,\\n          levelIdc: levelIdc,\\n          profileCompatibility: profileCompatibility,\\n          width: Math.ceil(((picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\\n          height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\\n          sarRatio: sarRatio\\n        };\\n      };\\n    };\\n\\n    _H264Stream.prototype = new stream();\\n    var h264 = {\\n      H264Stream: _H264Stream,\\n      NalByteStream: _NalByteStream\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * Utilities to detect basic properties and metadata about Aac data.\\n     */\\n\\n    var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\\n\\n    var isLikelyAacData = function isLikelyAacData(data) {\\n      if (data[0] === 'I'.charCodeAt(0) && data[1] === 'D'.charCodeAt(0) && data[2] === '3'.charCodeAt(0)) {\\n        return true;\\n      }\\n\\n      return false;\\n    };\\n\\n    var parseSyncSafeInteger$1 = function parseSyncSafeInteger(data) {\\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\\n    }; // return a percent-encoded representation of the specified byte range\\n    // @see http://en.wikipedia.org/wiki/Percent-encoding\\n\\n\\n    var percentEncode$1 = function percentEncode(bytes, start, end) {\\n      var i,\\n          result = '';\\n\\n      for (i = start; i < end; i++) {\\n        result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\\n      }\\n\\n      return result;\\n    }; // return the string representation of the specified byte range,\\n    // interpreted as ISO-8859-1.\\n\\n\\n    var parseIso88591$1 = function parseIso88591(bytes, start, end) {\\n      return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\\n    };\\n\\n    var parseId3TagSize = function parseId3TagSize(header, byteIndex) {\\n      var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\\n          flags = header[byteIndex + 5],\\n          footerPresent = (flags & 16) >> 4;\\n\\n      if (footerPresent) {\\n        return returnSize + 20;\\n      }\\n\\n      return returnSize + 10;\\n    };\\n\\n    var parseAdtsSize = function parseAdtsSize(header, byteIndex) {\\n      var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\\n          middle = header[byteIndex + 4] << 3,\\n          highTwo = header[byteIndex + 3] & 0x3 << 11;\\n      return highTwo | middle | lowThree;\\n    };\\n\\n    var parseType = function parseType(header, byteIndex) {\\n      if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\\n        return 'timed-metadata';\\n      } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\\n        return 'audio';\\n      }\\n\\n      return null;\\n    };\\n\\n    var parseSampleRate = function parseSampleRate(packet) {\\n      var i = 0;\\n\\n      while (i + 5 < packet.length) {\\n        if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\\n          // If a valid header was not found,  jump one forward and attempt to\\n          // find a valid ADTS header starting at the next byte\\n          i++;\\n          continue;\\n        }\\n\\n        return ADTS_SAMPLING_FREQUENCIES$1[(packet[i + 2] & 0x3c) >>> 2];\\n      }\\n\\n      return null;\\n    };\\n\\n    var parseAacTimestamp = function parseAacTimestamp(packet) {\\n      var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\\n\\n      frameStart = 10;\\n\\n      if (packet[5] & 0x40) {\\n        // advance the frame start past the extended header\\n        frameStart += 4; // header size field\\n\\n        frameStart += parseSyncSafeInteger$1(packet.subarray(10, 14));\\n      } // parse one or more ID3 frames\\n      // http://id3.org/id3v2.3.0#ID3v2_frame_overview\\n\\n\\n      do {\\n        // determine the number of bytes in this frame\\n        frameSize = parseSyncSafeInteger$1(packet.subarray(frameStart + 4, frameStart + 8));\\n\\n        if (frameSize < 1) {\\n          return null;\\n        }\\n\\n        frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\\n\\n        if (frameHeader === 'PRIV') {\\n          frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\\n\\n          for (var i = 0; i < frame.byteLength; i++) {\\n            if (frame[i] === 0) {\\n              var owner = parseIso88591$1(frame, 0, i);\\n\\n              if (owner === 'com.apple.streaming.transportStreamTimestamp') {\\n                var d = frame.subarray(i + 1);\\n                var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\\n                size *= 4;\\n                size += d[7] & 0x03;\\n                return size;\\n              }\\n\\n              break;\\n            }\\n          }\\n        }\\n\\n        frameStart += 10; // advance past the frame header\\n\\n        frameStart += frameSize; // advance past the frame body\\n      } while (frameStart < packet.byteLength);\\n\\n      return null;\\n    };\\n\\n    var utils = {\\n      isLikelyAacData: isLikelyAacData,\\n      parseId3TagSize: parseId3TagSize,\\n      parseAdtsSize: parseAdtsSize,\\n      parseType: parseType,\\n      parseSampleRate: parseSampleRate,\\n      parseAacTimestamp: parseAacTimestamp\\n    }; // Constants\\n\\n    var _AacStream;\\n    /**\\n     * Splits an incoming stream of binary data into ADTS and ID3 Frames.\\n     */\\n\\n\\n    _AacStream = function AacStream() {\\n      var everything = new Uint8Array(),\\n          timeStamp = 0;\\n\\n      _AacStream.prototype.init.call(this);\\n\\n      this.setTimestamp = function (timestamp) {\\n        timeStamp = timestamp;\\n      };\\n\\n      this.push = function (bytes) {\\n        var frameSize = 0,\\n            byteIndex = 0,\\n            bytesLeft,\\n            chunk,\\n            packet,\\n            tempLength; // If there are bytes remaining from the last segment, prepend them to the\\n        // bytes that were pushed in\\n\\n        if (everything.length) {\\n          tempLength = everything.length;\\n          everything = new Uint8Array(bytes.byteLength + tempLength);\\n          everything.set(everything.subarray(0, tempLength));\\n          everything.set(bytes, tempLength);\\n        } else {\\n          everything = bytes;\\n        }\\n\\n        while (everything.length - byteIndex >= 3) {\\n          if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\\n            // Exit early because we don't have enough to parse\\n            // the ID3 tag header\\n            if (everything.length - byteIndex < 10) {\\n              break;\\n            } // check framesize\\n\\n\\n            frameSize = utils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\\n            // to emit a full packet\\n            // Add to byteIndex to support multiple ID3 tags in sequence\\n\\n            if (byteIndex + frameSize > everything.length) {\\n              break;\\n            }\\n\\n            chunk = {\\n              type: 'timed-metadata',\\n              data: everything.subarray(byteIndex, byteIndex + frameSize)\\n            };\\n            this.trigger('data', chunk);\\n            byteIndex += frameSize;\\n            continue;\\n          } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\\n            // Exit early because we don't have enough to parse\\n            // the ADTS frame header\\n            if (everything.length - byteIndex < 7) {\\n              break;\\n            }\\n\\n            frameSize = utils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\\n            // to emit a full packet\\n\\n            if (byteIndex + frameSize > everything.length) {\\n              break;\\n            }\\n\\n            packet = {\\n              type: 'audio',\\n              data: everything.subarray(byteIndex, byteIndex + frameSize),\\n              pts: timeStamp,\\n              dts: timeStamp\\n            };\\n            this.trigger('data', packet);\\n            byteIndex += frameSize;\\n            continue;\\n          }\\n\\n          byteIndex++;\\n        }\\n\\n        bytesLeft = everything.length - byteIndex;\\n\\n        if (bytesLeft > 0) {\\n          everything = everything.subarray(byteIndex);\\n        } else {\\n          everything = new Uint8Array();\\n        }\\n      };\\n\\n      this.reset = function () {\\n        everything = new Uint8Array();\\n        this.trigger('reset');\\n      };\\n\\n      this.endTimeline = function () {\\n        everything = new Uint8Array();\\n        this.trigger('endedtimeline');\\n      };\\n    };\\n\\n    _AacStream.prototype = new stream();\\n    var aac = _AacStream;\\n    var H264Stream = h264.H264Stream;\\n    var isLikelyAacData$1 = utils.isLikelyAacData;\\n    var ONE_SECOND_IN_TS$3 = clock.ONE_SECOND_IN_TS; // constants\\n\\n    var AUDIO_PROPERTIES = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\\n    var VIDEO_PROPERTIES = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio']; // object types\\n\\n    var _VideoSegmentStream, _AudioSegmentStream, _Transmuxer, _CoalesceStream;\\n    /**\\n     * Compare two arrays (even typed) for same-ness\\n     */\\n\\n\\n    var arrayEquals = function arrayEquals(a, b) {\\n      var i;\\n\\n      if (a.length !== b.length) {\\n        return false;\\n      } // compare the value of each element in the array\\n\\n\\n      for (i = 0; i < a.length; i++) {\\n        if (a[i] !== b[i]) {\\n          return false;\\n        }\\n      }\\n\\n      return true;\\n    };\\n\\n    var generateVideoSegmentTimingInfo = function generateVideoSegmentTimingInfo(baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\\n      var ptsOffsetFromDts = startPts - startDts,\\n          decodeDuration = endDts - startDts,\\n          presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\\n      // however, the player time values will reflect a start from the baseMediaDecodeTime.\\n      // In order to provide relevant values for the player times, base timing info on the\\n      // baseMediaDecodeTime and the DTS and PTS durations of the segment.\\n\\n      return {\\n        start: {\\n          dts: baseMediaDecodeTime,\\n          pts: baseMediaDecodeTime + ptsOffsetFromDts\\n        },\\n        end: {\\n          dts: baseMediaDecodeTime + decodeDuration,\\n          pts: baseMediaDecodeTime + presentationDuration\\n        },\\n        prependedContentDuration: prependedContentDuration,\\n        baseMediaDecodeTime: baseMediaDecodeTime\\n      };\\n    };\\n    /**\\n     * Constructs a single-track, ISO BMFF media segment from AAC data\\n     * events. The output of this stream can be fed to a SourceBuffer\\n     * configured with a suitable initialization segment.\\n     * @param track {object} track metadata configuration\\n     * @param options {object} transmuxer options object\\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at 0.\\n     */\\n\\n\\n    _AudioSegmentStream = function AudioSegmentStream(track, options) {\\n      var adtsFrames = [],\\n          sequenceNumber = 0,\\n          earliestAllowedDts = 0,\\n          audioAppendStartTs = 0,\\n          videoBaseMediaDecodeTime = Infinity;\\n      options = options || {};\\n\\n      _AudioSegmentStream.prototype.init.call(this);\\n\\n      this.push = function (data) {\\n        trackDecodeInfo.collectDtsInfo(track, data);\\n\\n        if (track) {\\n          AUDIO_PROPERTIES.forEach(function (prop) {\\n            track[prop] = data[prop];\\n          });\\n        } // buffer audio data until end() is called\\n\\n\\n        adtsFrames.push(data);\\n      };\\n\\n      this.setEarliestDts = function (earliestDts) {\\n        earliestAllowedDts = earliestDts - track.timelineStartInfo.baseMediaDecodeTime;\\n      };\\n\\n      this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\\n        videoBaseMediaDecodeTime = baseMediaDecodeTime;\\n      };\\n\\n      this.setAudioAppendStart = function (timestamp) {\\n        audioAppendStartTs = timestamp;\\n      };\\n\\n      this.flush = function () {\\n        var frames, moof, mdat, boxes, frameDuration; // return early if no audio data has been observed\\n\\n        if (adtsFrames.length === 0) {\\n          this.trigger('done', 'AudioSegmentStream');\\n          return;\\n        }\\n\\n        frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\\n        track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\\n        audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\\n        // samples (that is, adts frames) in the audio data\\n\\n        track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\\n\\n        mdat = mp4Generator.mdat(audioFrameUtils.concatenateFrameData(frames));\\n        adtsFrames = [];\\n        moof = mp4Generator.moof(sequenceNumber, [track]);\\n        boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\\n\\n        sequenceNumber++;\\n        boxes.set(moof);\\n        boxes.set(mdat, moof.byteLength);\\n        trackDecodeInfo.clearDtsInfo(track);\\n        frameDuration = Math.ceil(ONE_SECOND_IN_TS$3 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\\n        // tests) on adding the timingInfo event. However, it seems unlikely that there's a\\n        // valid use-case where an init segment/data should be triggered without associated\\n        // frames. Leaving for now, but should be looked into.\\n\\n        if (frames.length) {\\n          this.trigger('timingInfo', {\\n            start: frames[0].pts,\\n            end: frames[0].pts + frames.length * frameDuration\\n          });\\n        }\\n\\n        this.trigger('data', {\\n          track: track,\\n          boxes: boxes\\n        });\\n        this.trigger('done', 'AudioSegmentStream');\\n      };\\n\\n      this.reset = function () {\\n        trackDecodeInfo.clearDtsInfo(track);\\n        adtsFrames = [];\\n        this.trigger('reset');\\n      };\\n    };\\n\\n    _AudioSegmentStream.prototype = new stream();\\n    /**\\n     * Constructs a single-track, ISO BMFF media segment from H264 data\\n     * events. The output of this stream can be fed to a SourceBuffer\\n     * configured with a suitable initialization segment.\\n     * @param track {object} track metadata configuration\\n     * @param options {object} transmuxer options object\\n     * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\\n     *        gopsToAlignWith list when attempting to align gop pts\\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at 0.\\n     */\\n\\n    _VideoSegmentStream = function VideoSegmentStream(track, options) {\\n      var sequenceNumber = 0,\\n          nalUnits = [],\\n          gopsToAlignWith = [],\\n          config,\\n          pps;\\n      options = options || {};\\n\\n      _VideoSegmentStream.prototype.init.call(this);\\n\\n      delete track.minPTS;\\n      this.gopCache_ = [];\\n      /**\\n        * Constructs a ISO BMFF segment given H264 nalUnits\\n        * @param {Object} nalUnit A data event representing a nalUnit\\n        * @param {String} nalUnit.nalUnitType\\n        * @param {Object} nalUnit.config Properties for a mp4 track\\n        * @param {Uint8Array} nalUnit.data The nalUnit bytes\\n        * @see lib/codecs/h264.js\\n       **/\\n\\n      this.push = function (nalUnit) {\\n        trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\\n\\n        if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\\n          config = nalUnit.config;\\n          track.sps = [nalUnit.data];\\n          VIDEO_PROPERTIES.forEach(function (prop) {\\n            track[prop] = config[prop];\\n          }, this);\\n        }\\n\\n        if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\\n          pps = nalUnit.data;\\n          track.pps = [nalUnit.data];\\n        } // buffer video until flush() is called\\n\\n\\n        nalUnits.push(nalUnit);\\n      };\\n      /**\\n        * Pass constructed ISO BMFF track and boxes on to the\\n        * next stream in the pipeline\\n       **/\\n\\n\\n      this.flush = function () {\\n        var frames,\\n            gopForFusion,\\n            gops,\\n            moof,\\n            mdat,\\n            boxes,\\n            prependedContentDuration = 0,\\n            firstGop,\\n            lastGop; // Throw away nalUnits at the start of the byte stream until\\n        // we find the first AUD\\n\\n        while (nalUnits.length) {\\n          if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\\n            break;\\n          }\\n\\n          nalUnits.shift();\\n        } // Return early if no video data has been observed\\n\\n\\n        if (nalUnits.length === 0) {\\n          this.resetStream_();\\n          this.trigger('done', 'VideoSegmentStream');\\n          return;\\n        } // Organize the raw nal-units into arrays that represent\\n        // higher-level constructs such as frames and gops\\n        // (group-of-pictures)\\n\\n\\n        frames = frameUtils.groupNalsIntoFrames(nalUnits);\\n        gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\\n        // a problem since MSE (on Chrome) requires a leading keyframe.\\n        //\\n        // We have two approaches to repairing this situation:\\n        // 1) GOP-FUSION:\\n        //    This is where we keep track of the GOPS (group-of-pictures)\\n        //    from previous fragments and attempt to find one that we can\\n        //    prepend to the current fragment in order to create a valid\\n        //    fragment.\\n        // 2) KEYFRAME-PULLING:\\n        //    Here we search for the first keyframe in the fragment and\\n        //    throw away all the frames between the start of the fragment\\n        //    and that keyframe. We then extend the duration and pull the\\n        //    PTS of the keyframe forward so that it covers the time range\\n        //    of the frames that were disposed of.\\n        //\\n        // #1 is far prefereable over #2 which can cause \\\"stuttering\\\" but\\n        // requires more things to be just right.\\n\\n        if (!gops[0][0].keyFrame) {\\n          // Search for a gop for fusion from our gopCache\\n          gopForFusion = this.getGopForFusion_(nalUnits[0], track);\\n\\n          if (gopForFusion) {\\n            // in order to provide more accurate timing information about the segment, save\\n            // the number of seconds prepended to the original segment due to GOP fusion\\n            prependedContentDuration = gopForFusion.duration;\\n            gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\\n            // new gop at the beginning\\n\\n            gops.byteLength += gopForFusion.byteLength;\\n            gops.nalCount += gopForFusion.nalCount;\\n            gops.pts = gopForFusion.pts;\\n            gops.dts = gopForFusion.dts;\\n            gops.duration += gopForFusion.duration;\\n          } else {\\n            // If we didn't find a candidate gop fall back to keyframe-pulling\\n            gops = frameUtils.extendFirstKeyFrame(gops);\\n          }\\n        } // Trim gops to align with gopsToAlignWith\\n\\n\\n        if (gopsToAlignWith.length) {\\n          var alignedGops;\\n\\n          if (options.alignGopsAtEnd) {\\n            alignedGops = this.alignGopsAtEnd_(gops);\\n          } else {\\n            alignedGops = this.alignGopsAtStart_(gops);\\n          }\\n\\n          if (!alignedGops) {\\n            // save all the nals in the last GOP into the gop cache\\n            this.gopCache_.unshift({\\n              gop: gops.pop(),\\n              pps: track.pps,\\n              sps: track.sps\\n            }); // Keep a maximum of 6 GOPs in the cache\\n\\n            this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\\n\\n            nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\\n\\n            this.resetStream_();\\n            this.trigger('done', 'VideoSegmentStream');\\n            return;\\n          } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\\n          // when recalculated before sending off to CoalesceStream\\n\\n\\n          trackDecodeInfo.clearDtsInfo(track);\\n          gops = alignedGops;\\n        }\\n\\n        trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\\n        // samples (that is, frames) in the video data\\n\\n        track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\\n\\n        mdat = mp4Generator.mdat(frameUtils.concatenateNalData(gops));\\n        track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\\n        this.trigger('processedGopsInfo', gops.map(function (gop) {\\n          return {\\n            pts: gop.pts,\\n            dts: gop.dts,\\n            byteLength: gop.byteLength\\n          };\\n        }));\\n        firstGop = gops[0];\\n        lastGop = gops[gops.length - 1];\\n        this.trigger('segmentTimingInfo', generateVideoSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\\n        this.trigger('timingInfo', {\\n          start: gops[0].pts,\\n          end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\\n        }); // save all the nals in the last GOP into the gop cache\\n\\n        this.gopCache_.unshift({\\n          gop: gops.pop(),\\n          pps: track.pps,\\n          sps: track.sps\\n        }); // Keep a maximum of 6 GOPs in the cache\\n\\n        this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\\n\\n        nalUnits = [];\\n        this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\\n        this.trigger('timelineStartInfo', track.timelineStartInfo);\\n        moof = mp4Generator.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\\n        // throwing away hundreds of media segment fragments\\n\\n        boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\\n\\n        sequenceNumber++;\\n        boxes.set(moof);\\n        boxes.set(mdat, moof.byteLength);\\n        this.trigger('data', {\\n          track: track,\\n          boxes: boxes\\n        });\\n        this.resetStream_(); // Continue with the flush process now\\n\\n        this.trigger('done', 'VideoSegmentStream');\\n      };\\n\\n      this.reset = function () {\\n        this.resetStream_();\\n        nalUnits = [];\\n        this.gopCache_.length = 0;\\n        gopsToAlignWith.length = 0;\\n        this.trigger('reset');\\n      };\\n\\n      this.resetStream_ = function () {\\n        trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\\n        // for instance, when we are rendition switching\\n\\n        config = undefined;\\n        pps = undefined;\\n      }; // Search for a candidate Gop for gop-fusion from the gop cache and\\n      // return it or return null if no good candidate was found\\n\\n\\n      this.getGopForFusion_ = function (nalUnit) {\\n        var halfSecond = 45000,\\n            // Half-a-second in a 90khz clock\\n        allowableOverlap = 10000,\\n            // About 3 frames @ 30fps\\n        nearestDistance = Infinity,\\n            dtsDistance,\\n            nearestGopObj,\\n            currentGop,\\n            currentGopObj,\\n            i; // Search for the GOP nearest to the beginning of this nal unit\\n\\n        for (i = 0; i < this.gopCache_.length; i++) {\\n          currentGopObj = this.gopCache_[i];\\n          currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\\n\\n          if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\\n            continue;\\n          } // Reject Gops that would require a negative baseMediaDecodeTime\\n\\n\\n          if (currentGop.dts < track.timelineStartInfo.dts) {\\n            continue;\\n          } // The distance between the end of the gop and the start of the nalUnit\\n\\n\\n          dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\\n          // a half-second of the nal unit\\n\\n          if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\\n            // Always use the closest GOP we found if there is more than\\n            // one candidate\\n            if (!nearestGopObj || nearestDistance > dtsDistance) {\\n              nearestGopObj = currentGopObj;\\n              nearestDistance = dtsDistance;\\n            }\\n          }\\n        }\\n\\n        if (nearestGopObj) {\\n          return nearestGopObj.gop;\\n        }\\n\\n        return null;\\n      }; // trim gop list to the first gop found that has a matching pts with a gop in the list\\n      // of gopsToAlignWith starting from the START of the list\\n\\n\\n      this.alignGopsAtStart_ = function (gops) {\\n        var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\\n        byteLength = gops.byteLength;\\n        nalCount = gops.nalCount;\\n        duration = gops.duration;\\n        alignIndex = gopIndex = 0;\\n\\n        while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\\n          align = gopsToAlignWith[alignIndex];\\n          gop = gops[gopIndex];\\n\\n          if (align.pts === gop.pts) {\\n            break;\\n          }\\n\\n          if (gop.pts > align.pts) {\\n            // this current gop starts after the current gop we want to align on, so increment\\n            // align index\\n            alignIndex++;\\n            continue;\\n          } // current gop starts before the current gop we want to align on. so increment gop\\n          // index\\n\\n\\n          gopIndex++;\\n          byteLength -= gop.byteLength;\\n          nalCount -= gop.nalCount;\\n          duration -= gop.duration;\\n        }\\n\\n        if (gopIndex === 0) {\\n          // no gops to trim\\n          return gops;\\n        }\\n\\n        if (gopIndex === gops.length) {\\n          // all gops trimmed, skip appending all gops\\n          return null;\\n        }\\n\\n        alignedGops = gops.slice(gopIndex);\\n        alignedGops.byteLength = byteLength;\\n        alignedGops.duration = duration;\\n        alignedGops.nalCount = nalCount;\\n        alignedGops.pts = alignedGops[0].pts;\\n        alignedGops.dts = alignedGops[0].dts;\\n        return alignedGops;\\n      }; // trim gop list to the first gop found that has a matching pts with a gop in the list\\n      // of gopsToAlignWith starting from the END of the list\\n\\n\\n      this.alignGopsAtEnd_ = function (gops) {\\n        var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\\n        alignIndex = gopsToAlignWith.length - 1;\\n        gopIndex = gops.length - 1;\\n        alignEndIndex = null;\\n        matchFound = false;\\n\\n        while (alignIndex >= 0 && gopIndex >= 0) {\\n          align = gopsToAlignWith[alignIndex];\\n          gop = gops[gopIndex];\\n\\n          if (align.pts === gop.pts) {\\n            matchFound = true;\\n            break;\\n          }\\n\\n          if (align.pts > gop.pts) {\\n            alignIndex--;\\n            continue;\\n          }\\n\\n          if (alignIndex === gopsToAlignWith.length - 1) {\\n            // gop.pts is greater than the last alignment candidate. If no match is found\\n            // by the end of this loop, we still want to append gops that come after this\\n            // point\\n            alignEndIndex = gopIndex;\\n          }\\n\\n          gopIndex--;\\n        }\\n\\n        if (!matchFound && alignEndIndex === null) {\\n          return null;\\n        }\\n\\n        var trimIndex;\\n\\n        if (matchFound) {\\n          trimIndex = gopIndex;\\n        } else {\\n          trimIndex = alignEndIndex;\\n        }\\n\\n        if (trimIndex === 0) {\\n          return gops;\\n        }\\n\\n        var alignedGops = gops.slice(trimIndex);\\n        var metadata = alignedGops.reduce(function (total, gop) {\\n          total.byteLength += gop.byteLength;\\n          total.duration += gop.duration;\\n          total.nalCount += gop.nalCount;\\n          return total;\\n        }, {\\n          byteLength: 0,\\n          duration: 0,\\n          nalCount: 0\\n        });\\n        alignedGops.byteLength = metadata.byteLength;\\n        alignedGops.duration = metadata.duration;\\n        alignedGops.nalCount = metadata.nalCount;\\n        alignedGops.pts = alignedGops[0].pts;\\n        alignedGops.dts = alignedGops[0].dts;\\n        return alignedGops;\\n      };\\n\\n      this.alignGopsWith = function (newGopsToAlignWith) {\\n        gopsToAlignWith = newGopsToAlignWith;\\n      };\\n    };\\n\\n    _VideoSegmentStream.prototype = new stream();\\n    /**\\n     * A Stream that can combine multiple streams (ie. audio & video)\\n     * into a single output segment for MSE. Also supports audio-only\\n     * and video-only streams.\\n     * @param options {object} transmuxer options object\\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at media timeline start.\\n     */\\n\\n    _CoalesceStream = function CoalesceStream(options, metadataStream) {\\n      // Number of Tracks per output segment\\n      // If greater than 1, we combine multiple\\n      // tracks into a single segment\\n      this.numberOfTracks = 0;\\n      this.metadataStream = metadataStream;\\n      options = options || {};\\n\\n      if (typeof options.remux !== 'undefined') {\\n        this.remuxTracks = !!options.remux;\\n      } else {\\n        this.remuxTracks = true;\\n      }\\n\\n      if (typeof options.keepOriginalTimestamps === 'boolean') {\\n        this.keepOriginalTimestamps = options.keepOriginalTimestamps;\\n      } else {\\n        this.keepOriginalTimestamps = false;\\n      }\\n\\n      this.pendingTracks = [];\\n      this.videoTrack = null;\\n      this.pendingBoxes = [];\\n      this.pendingCaptions = [];\\n      this.pendingMetadata = [];\\n      this.pendingBytes = 0;\\n      this.emittedTracks = 0;\\n\\n      _CoalesceStream.prototype.init.call(this); // Take output from multiple\\n\\n\\n      this.push = function (output) {\\n        // buffer incoming captions until the associated video segment\\n        // finishes\\n        if (output.text) {\\n          return this.pendingCaptions.push(output);\\n        } // buffer incoming id3 tags until the final flush\\n\\n\\n        if (output.frames) {\\n          return this.pendingMetadata.push(output);\\n        } // Add this track to the list of pending tracks and store\\n        // important information required for the construction of\\n        // the final segment\\n\\n\\n        this.pendingTracks.push(output.track);\\n        this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\\n        // We unshift audio and push video because\\n        // as of Chrome 75 when switching from\\n        // one init segment to another if the video\\n        // mdat does not appear after the audio mdat\\n        // only audio will play for the duration of our transmux.\\n\\n        if (output.track.type === 'video') {\\n          this.videoTrack = output.track;\\n          this.pendingBoxes.push(output.boxes);\\n        }\\n\\n        if (output.track.type === 'audio') {\\n          this.audioTrack = output.track;\\n          this.pendingBoxes.unshift(output.boxes);\\n        }\\n      };\\n    };\\n\\n    _CoalesceStream.prototype = new stream();\\n\\n    _CoalesceStream.prototype.flush = function (flushSource) {\\n      var offset = 0,\\n          event = {\\n        captions: [],\\n        captionStreams: {},\\n        metadata: [],\\n        info: {}\\n      },\\n          caption,\\n          id3,\\n          initSegment,\\n          timelineStartPts = 0,\\n          i;\\n\\n      if (this.pendingTracks.length < this.numberOfTracks) {\\n        if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\\n          // Return because we haven't received a flush from a data-generating\\n          // portion of the segment (meaning that we have only recieved meta-data\\n          // or captions.)\\n          return;\\n        } else if (this.remuxTracks) {\\n          // Return until we have enough tracks from the pipeline to remux (if we\\n          // are remuxing audio and video into a single MP4)\\n          return;\\n        } else if (this.pendingTracks.length === 0) {\\n          // In the case where we receive a flush without any data having been\\n          // received we consider it an emitted track for the purposes of coalescing\\n          // `done` events.\\n          // We do this for the case where there is an audio and video track in the\\n          // segment but no audio data. (seen in several playlists with alternate\\n          // audio tracks and no audio present in the main TS segments.)\\n          this.emittedTracks++;\\n\\n          if (this.emittedTracks >= this.numberOfTracks) {\\n            this.trigger('done');\\n            this.emittedTracks = 0;\\n          }\\n\\n          return;\\n        }\\n      }\\n\\n      if (this.videoTrack) {\\n        timelineStartPts = this.videoTrack.timelineStartInfo.pts;\\n        VIDEO_PROPERTIES.forEach(function (prop) {\\n          event.info[prop] = this.videoTrack[prop];\\n        }, this);\\n      } else if (this.audioTrack) {\\n        timelineStartPts = this.audioTrack.timelineStartInfo.pts;\\n        AUDIO_PROPERTIES.forEach(function (prop) {\\n          event.info[prop] = this.audioTrack[prop];\\n        }, this);\\n      }\\n\\n      if (this.videoTrack || this.audioTrack) {\\n        if (this.pendingTracks.length === 1) {\\n          event.type = this.pendingTracks[0].type;\\n        } else {\\n          event.type = 'combined';\\n        }\\n\\n        this.emittedTracks += this.pendingTracks.length;\\n        initSegment = mp4Generator.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\\n\\n        event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\\n        // and track definitions\\n\\n        event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\\n\\n        event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\\n\\n        for (i = 0; i < this.pendingBoxes.length; i++) {\\n          event.data.set(this.pendingBoxes[i], offset);\\n          offset += this.pendingBoxes[i].byteLength;\\n        } // Translate caption PTS times into second offsets to match the\\n        // video timeline for the segment, and add track info\\n\\n\\n        for (i = 0; i < this.pendingCaptions.length; i++) {\\n          caption = this.pendingCaptions[i];\\n          caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\\n          caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\\n          event.captionStreams[caption.stream] = true;\\n          event.captions.push(caption);\\n        } // Translate ID3 frame PTS times into second offsets to match the\\n        // video timeline for the segment\\n\\n\\n        for (i = 0; i < this.pendingMetadata.length; i++) {\\n          id3 = this.pendingMetadata[i];\\n          id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\\n          event.metadata.push(id3);\\n        } // We add this to every single emitted segment even though we only need\\n        // it for the first\\n\\n\\n        event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\\n\\n        this.pendingTracks.length = 0;\\n        this.videoTrack = null;\\n        this.pendingBoxes.length = 0;\\n        this.pendingCaptions.length = 0;\\n        this.pendingBytes = 0;\\n        this.pendingMetadata.length = 0; // Emit the built segment\\n        // We include captions and ID3 tags for backwards compatibility,\\n        // ideally we should send only video and audio in the data event\\n\\n        this.trigger('data', event); // Emit each caption to the outside world\\n        // Ideally, this would happen immediately on parsing captions,\\n        // but we need to ensure that video data is sent back first\\n        // so that caption timing can be adjusted to match video timing\\n\\n        for (i = 0; i < event.captions.length; i++) {\\n          caption = event.captions[i];\\n          this.trigger('caption', caption);\\n        } // Emit each id3 tag to the outside world\\n        // Ideally, this would happen immediately on parsing the tag,\\n        // but we need to ensure that video data is sent back first\\n        // so that ID3 frame timing can be adjusted to match video timing\\n\\n\\n        for (i = 0; i < event.metadata.length; i++) {\\n          id3 = event.metadata[i];\\n          this.trigger('id3Frame', id3);\\n        }\\n      } // Only emit `done` if all tracks have been flushed and emitted\\n\\n\\n      if (this.emittedTracks >= this.numberOfTracks) {\\n        this.trigger('done');\\n        this.emittedTracks = 0;\\n      }\\n    };\\n\\n    _CoalesceStream.prototype.setRemux = function (val) {\\n      this.remuxTracks = val;\\n    };\\n    /**\\n     * A Stream that expects MP2T binary data as input and produces\\n     * corresponding media segments, suitable for use with Media Source\\n     * Extension (MSE) implementations that support the ISO BMFF byte\\n     * stream format, like Chrome.\\n     */\\n\\n\\n    _Transmuxer = function Transmuxer(options) {\\n      var self = this,\\n          hasFlushed = true,\\n          videoTrack,\\n          audioTrack;\\n\\n      _Transmuxer.prototype.init.call(this);\\n\\n      options = options || {};\\n      this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\\n      this.transmuxPipeline_ = {};\\n\\n      this.setupAacPipeline = function () {\\n        var pipeline = {};\\n        this.transmuxPipeline_ = pipeline;\\n        pipeline.type = 'aac';\\n        pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\\n\\n        pipeline.aacStream = new aac();\\n        pipeline.audioTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('audio');\\n        pipeline.timedMetadataTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('timed-metadata');\\n        pipeline.adtsStream = new adts();\\n        pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\\n        pipeline.headOfPipeline = pipeline.aacStream;\\n        pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\\n        pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\\n        pipeline.metadataStream.on('timestamp', function (frame) {\\n          pipeline.aacStream.setTimestamp(frame.timeStamp);\\n        });\\n        pipeline.aacStream.on('data', function (data) {\\n          if (data.type === 'timed-metadata' && !pipeline.audioSegmentStream) {\\n            audioTrack = audioTrack || {\\n              timelineStartInfo: {\\n                baseMediaDecodeTime: self.baseMediaDecodeTime\\n              },\\n              codec: 'adts',\\n              type: 'audio'\\n            }; // hook up the audio segment stream to the first track with aac data\\n\\n            pipeline.coalesceStream.numberOfTracks++;\\n            pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\\n            pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\\n\\n            pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\\n          } // emit pmt info\\n\\n\\n          self.trigger('trackinfo', {\\n            hasAudio: !!audioTrack,\\n            hasVideo: !!videoTrack\\n          });\\n        }); // Re-emit any data coming from the coalesce stream to the outside world\\n\\n        pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\\n\\n        pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\\n      };\\n\\n      this.setupTsPipeline = function () {\\n        var pipeline = {};\\n        this.transmuxPipeline_ = pipeline;\\n        pipeline.type = 'ts';\\n        pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\\n\\n        pipeline.packetStream = new m2ts_1.TransportPacketStream();\\n        pipeline.parseStream = new m2ts_1.TransportParseStream();\\n        pipeline.elementaryStream = new m2ts_1.ElementaryStream();\\n        pipeline.timestampRolloverStream = new m2ts_1.TimestampRolloverStream();\\n        pipeline.adtsStream = new adts();\\n        pipeline.h264Stream = new H264Stream();\\n        pipeline.captionStream = new m2ts_1.CaptionStream();\\n        pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\\n        pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\\n\\n        pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\\n        // demux the streams\\n\\n        pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\\n        pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\\n        pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\\n\\n        pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\\n        pipeline.elementaryStream.on('data', function (data) {\\n          var i;\\n\\n          if (data.type === 'metadata') {\\n            i = data.tracks.length; // scan the tracks listed in the metadata\\n\\n            while (i--) {\\n              if (!videoTrack && data.tracks[i].type === 'video') {\\n                videoTrack = data.tracks[i];\\n                videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\\n              } else if (!audioTrack && data.tracks[i].type === 'audio') {\\n                audioTrack = data.tracks[i];\\n                audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\\n              }\\n            } // hook up the video segment stream to the first track with h264 data\\n\\n\\n            if (videoTrack && !pipeline.videoSegmentStream) {\\n              pipeline.coalesceStream.numberOfTracks++;\\n              pipeline.videoSegmentStream = new _VideoSegmentStream(videoTrack, options);\\n              pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\\n                // When video emits timelineStartInfo data after a flush, we forward that\\n                // info to the AudioSegmentStream, if it exists, because video timeline\\n                // data takes precedence.\\n                if (audioTrack) {\\n                  audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\\n                  // very earliest DTS we have seen in video because Chrome will\\n                  // interpret any video track with a baseMediaDecodeTime that is\\n                  // non-zero as a gap.\\n\\n                  pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts);\\n                }\\n              });\\n              pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\\n              pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\\n              pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\\n                if (audioTrack) {\\n                  pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\\n                }\\n              });\\n              pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\\n\\n              pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\\n            }\\n\\n            if (audioTrack && !pipeline.audioSegmentStream) {\\n              // hook up the audio segment stream to the first track with aac data\\n              pipeline.coalesceStream.numberOfTracks++;\\n              pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\\n              pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\\n\\n              pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\\n            } // emit pmt info\\n\\n\\n            self.trigger('trackinfo', {\\n              hasAudio: !!audioTrack,\\n              hasVideo: !!videoTrack\\n            });\\n          }\\n        }); // Re-emit any data coming from the coalesce stream to the outside world\\n\\n        pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\\n        pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\\n          id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\\n          self.trigger('id3Frame', id3Frame);\\n        });\\n        pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\\n\\n        pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\\n      }; // hook up the segment streams once track metadata is delivered\\n\\n\\n      this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\\n        var pipeline = this.transmuxPipeline_;\\n\\n        if (!options.keepOriginalTimestamps) {\\n          this.baseMediaDecodeTime = baseMediaDecodeTime;\\n        }\\n\\n        if (audioTrack) {\\n          audioTrack.timelineStartInfo.dts = undefined;\\n          audioTrack.timelineStartInfo.pts = undefined;\\n          trackDecodeInfo.clearDtsInfo(audioTrack);\\n\\n          if (!options.keepOriginalTimestamps) {\\n            audioTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\\n          }\\n\\n          if (pipeline.audioTimestampRolloverStream) {\\n            pipeline.audioTimestampRolloverStream.discontinuity();\\n          }\\n        }\\n\\n        if (videoTrack) {\\n          if (pipeline.videoSegmentStream) {\\n            pipeline.videoSegmentStream.gopCache_ = [];\\n          }\\n\\n          videoTrack.timelineStartInfo.dts = undefined;\\n          videoTrack.timelineStartInfo.pts = undefined;\\n          trackDecodeInfo.clearDtsInfo(videoTrack);\\n          pipeline.captionStream.reset();\\n\\n          if (!options.keepOriginalTimestamps) {\\n            videoTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\\n          }\\n        }\\n\\n        if (pipeline.timestampRolloverStream) {\\n          pipeline.timestampRolloverStream.discontinuity();\\n        }\\n      };\\n\\n      this.setAudioAppendStart = function (timestamp) {\\n        if (audioTrack) {\\n          this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\\n        }\\n      };\\n\\n      this.setRemux = function (val) {\\n        var pipeline = this.transmuxPipeline_;\\n        options.remux = val;\\n\\n        if (pipeline && pipeline.coalesceStream) {\\n          pipeline.coalesceStream.setRemux(val);\\n        }\\n      };\\n\\n      this.alignGopsWith = function (gopsToAlignWith) {\\n        if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\\n          this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\\n        }\\n      }; // feed incoming data to the front of the parsing pipeline\\n\\n\\n      this.push = function (data) {\\n        if (hasFlushed) {\\n          var isAac = isLikelyAacData$1(data);\\n\\n          if (isAac && this.transmuxPipeline_.type !== 'aac') {\\n            this.setupAacPipeline();\\n          } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\\n            this.setupTsPipeline();\\n          }\\n\\n          hasFlushed = false;\\n        }\\n\\n        this.transmuxPipeline_.headOfPipeline.push(data);\\n      }; // flush any buffered data\\n\\n\\n      this.flush = function () {\\n        hasFlushed = true; // Start at the top of the pipeline and flush all pending work\\n\\n        this.transmuxPipeline_.headOfPipeline.flush();\\n      };\\n\\n      this.endTimeline = function () {\\n        this.transmuxPipeline_.headOfPipeline.endTimeline();\\n      };\\n\\n      this.reset = function () {\\n        if (this.transmuxPipeline_.headOfPipeline) {\\n          this.transmuxPipeline_.headOfPipeline.reset();\\n        }\\n      }; // Caption data has to be reset when seeking outside buffered range\\n\\n\\n      this.resetCaptions = function () {\\n        if (this.transmuxPipeline_.captionStream) {\\n          this.transmuxPipeline_.captionStream.reset();\\n        }\\n      };\\n    };\\n\\n    _Transmuxer.prototype = new stream();\\n    var transmuxer = {\\n      Transmuxer: _Transmuxer,\\n      VideoSegmentStream: _VideoSegmentStream,\\n      AudioSegmentStream: _AudioSegmentStream,\\n      AUDIO_PROPERTIES: AUDIO_PROPERTIES,\\n      VIDEO_PROPERTIES: VIDEO_PROPERTIES,\\n      // exported for testing\\n      generateVideoSegmentTimingInfo: generateVideoSegmentTimingInfo\\n    };\\n\\n    var classCallCheck = function classCallCheck(instance, Constructor) {\\n      if (!(instance instanceof Constructor)) {\\n        throw new TypeError(\\\"Cannot call a class as a function\\\");\\n      }\\n    };\\n\\n    var createClass = function () {\\n      function defineProperties(target, props) {\\n        for (var i = 0; i < props.length; i++) {\\n          var descriptor = props[i];\\n          descriptor.enumerable = descriptor.enumerable || false;\\n          descriptor.configurable = true;\\n          if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n          Object.defineProperty(target, descriptor.key, descriptor);\\n        }\\n      }\\n\\n      return function (Constructor, protoProps, staticProps) {\\n        if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n        if (staticProps) defineProperties(Constructor, staticProps);\\n        return Constructor;\\n      };\\n    }();\\n    /**\\n     * @file transmuxer-worker.js\\n     */\\n\\n    /**\\n     * Re-emits transmuxer events by converting them into messages to the\\n     * world outside the worker.\\n     *\\n     * @param {Object} transmuxer the transmuxer to wire events on\\n     * @private\\n     */\\n\\n\\n    var wireTransmuxerEvents = function wireTransmuxerEvents(self, transmuxer$$1) {\\n      transmuxer$$1.on('data', function (segment) {\\n        // transfer ownership of the underlying ArrayBuffer\\n        // instead of doing a copy to save memory\\n        // ArrayBuffers are transferable but generic TypedArrays are not\\n        // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\\n        var initArray = segment.initSegment;\\n        segment.initSegment = {\\n          data: initArray.buffer,\\n          byteOffset: initArray.byteOffset,\\n          byteLength: initArray.byteLength\\n        };\\n        var typedArray = segment.data;\\n        segment.data = typedArray.buffer;\\n        self.postMessage({\\n          action: 'data',\\n          segment: segment,\\n          byteOffset: typedArray.byteOffset,\\n          byteLength: typedArray.byteLength\\n        }, [segment.data]);\\n      });\\n\\n      if (transmuxer$$1.captionStream) {\\n        transmuxer$$1.captionStream.on('data', function (caption) {\\n          self.postMessage({\\n            action: 'caption',\\n            data: caption\\n          });\\n        });\\n      }\\n\\n      transmuxer$$1.on('done', function (data) {\\n        self.postMessage({\\n          action: 'done'\\n        });\\n      });\\n      transmuxer$$1.on('gopInfo', function (gopInfo) {\\n        self.postMessage({\\n          action: 'gopInfo',\\n          gopInfo: gopInfo\\n        });\\n      });\\n      transmuxer$$1.on('videoSegmentTimingInfo', function (videoSegmentTimingInfo) {\\n        self.postMessage({\\n          action: 'videoSegmentTimingInfo',\\n          videoSegmentTimingInfo: videoSegmentTimingInfo\\n        });\\n      });\\n    };\\n    /**\\n     * All incoming messages route through this hash. If no function exists\\n     * to handle an incoming message, then we ignore the message.\\n     *\\n     * @class MessageHandlers\\n     * @param {Object} options the options to initialize with\\n     */\\n\\n\\n    var MessageHandlers = function () {\\n      function MessageHandlers(self, options) {\\n        classCallCheck(this, MessageHandlers);\\n        this.options = options || {};\\n        this.self = self;\\n        this.init();\\n      }\\n      /**\\n       * initialize our web worker and wire all the events.\\n       */\\n\\n\\n      createClass(MessageHandlers, [{\\n        key: 'init',\\n        value: function init() {\\n          if (this.transmuxer) {\\n            this.transmuxer.dispose();\\n          }\\n\\n          this.transmuxer = new transmuxer.Transmuxer(this.options);\\n          wireTransmuxerEvents(this.self, this.transmuxer);\\n        }\\n        /**\\n         * Adds data (a ts segment) to the start of the transmuxer pipeline for\\n         * processing.\\n         *\\n         * @param {ArrayBuffer} data data to push into the muxer\\n         */\\n\\n      }, {\\n        key: 'push',\\n        value: function push(data) {\\n          // Cast array buffer to correct type for transmuxer\\n          var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\\n          this.transmuxer.push(segment);\\n        }\\n        /**\\n         * Recreate the transmuxer so that the next segment added via `push`\\n         * start with a fresh transmuxer.\\n         */\\n\\n      }, {\\n        key: 'reset',\\n        value: function reset() {\\n          this.init();\\n        }\\n        /**\\n         * Set the value that will be used as the `baseMediaDecodeTime` time for the\\n         * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\\n         * set relative to the first based on the PTS values.\\n         *\\n         * @param {Object} data used to set the timestamp offset in the muxer\\n         */\\n\\n      }, {\\n        key: 'setTimestampOffset',\\n        value: function setTimestampOffset(data) {\\n          var timestampOffset = data.timestampOffset || 0;\\n          this.transmuxer.setBaseMediaDecodeTime(Math.round(timestampOffset * 90000));\\n        }\\n      }, {\\n        key: 'setAudioAppendStart',\\n        value: function setAudioAppendStart(data) {\\n          this.transmuxer.setAudioAppendStart(Math.ceil(data.appendStart * 90000));\\n        }\\n        /**\\n         * Forces the pipeline to finish processing the last segment and emit it's\\n         * results.\\n         *\\n         * @param {Object} data event data, not really used\\n         */\\n\\n      }, {\\n        key: 'flush',\\n        value: function flush(data) {\\n          this.transmuxer.flush();\\n        }\\n      }, {\\n        key: 'resetCaptions',\\n        value: function resetCaptions() {\\n          this.transmuxer.resetCaptions();\\n        }\\n      }, {\\n        key: 'alignGopsWith',\\n        value: function alignGopsWith(data) {\\n          this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\\n        }\\n      }]);\\n      return MessageHandlers;\\n    }();\\n    /**\\n     * Our web wroker interface so that things can talk to mux.js\\n     * that will be running in a web worker. the scope is passed to this by\\n     * webworkify.\\n     *\\n     * @param {Object} self the scope for the web worker\\n     */\\n\\n\\n    var TransmuxerWorker = function TransmuxerWorker(self) {\\n      self.onmessage = function (event) {\\n        if (event.data.action === 'init' && event.data.options) {\\n          this.messageHandlers = new MessageHandlers(self, event.data.options);\\n          return;\\n        }\\n\\n        if (!this.messageHandlers) {\\n          this.messageHandlers = new MessageHandlers(self);\\n        }\\n\\n        if (event.data && event.data.action && event.data.action !== 'init') {\\n          if (this.messageHandlers[event.data.action]) {\\n            this.messageHandlers[event.data.action](event.data);\\n          }\\n        }\\n      };\\n    };\\n\\n    var transmuxerWorker = new TransmuxerWorker(self);\\n    return transmuxerWorker;\\n  }();\\n});\\n/**\\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\\n * codec strings, or translating codec strings into objects that can be examined.\\n */\\n// Default codec parameters if none were provided for video and/or audio\\n\\nvar defaultCodecs = {\\n  videoCodec: 'avc1',\\n  videoObjectTypeIndicator: '.4d400d',\\n  // AAC-LC\\n  audioProfile: '2'\\n};\\n/**\\n * Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard\\n * `avc1.<hhhhhh>`\\n *\\n * @param {Array} codecs an array of codec strings to fix\\n * @return {Array} the translated codec array\\n * @private\\n */\\n\\nvar translateLegacyCodecs = function translateLegacyCodecs(codecs) {\\n  return codecs.map(function (codec) {\\n    return codec.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i, function (orig, profile, avcLevel) {\\n      var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\\n      var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\\n      return 'avc1.' + profileHex + '00' + avcLevelHex;\\n    });\\n  });\\n};\\n/**\\n * Parses a codec string to retrieve the number of codecs specified,\\n * the video codec and object type indicator, and the audio profile.\\n */\\n\\n\\nvar parseCodecs = function parseCodecs() {\\n  var codecs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\\n  var result = {\\n    codecCount: 0\\n  };\\n  var parsed = void 0;\\n  result.codecCount = codecs.split(',').length;\\n  result.codecCount = result.codecCount || 2; // parse the video codec\\n\\n  parsed = /(^|\\\\s|,)+(avc[13])([^ ,]*)/i.exec(codecs);\\n\\n  if (parsed) {\\n    result.videoCodec = parsed[2];\\n    result.videoObjectTypeIndicator = parsed[3];\\n  } // parse the last field of the audio codec\\n\\n\\n  result.audioProfile = /(^|\\\\s|,)+mp4a.[0-9A-Fa-f]+\\\\.([0-9A-Fa-f]+)/i.exec(codecs);\\n  result.audioProfile = result.audioProfile && result.audioProfile[2];\\n  return result;\\n};\\n/**\\n * Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the\\n * standard `avc1.<hhhhhh>`.\\n *\\n * @param codecString {String} the codec string\\n * @return {String} the codec string with old apple-style codecs replaced\\n *\\n * @private\\n */\\n\\n\\nvar mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\\n  return codecString.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i, function (match) {\\n    return translateLegacyCodecs([match])[0];\\n  });\\n};\\n/**\\n * Build a media mime-type string from a set of parameters\\n * @param {String} type either 'audio' or 'video'\\n * @param {String} container either 'mp2t' or 'mp4'\\n * @param {Array} codecs an array of codec strings to add\\n * @return {String} a valid media mime-type\\n */\\n\\n\\nvar makeMimeTypeString = function makeMimeTypeString(type, container, codecs) {\\n  // The codecs array is filtered so that falsey values are\\n  // dropped and don't cause Array#join to create spurious\\n  // commas\\n  return type + '/' + container + '; codecs=\\\"' + codecs.filter(function (c) {\\n    return !!c;\\n  }).join(', ') + '\\\"';\\n};\\n/**\\n * Returns the type container based on information in the playlist\\n * @param {Playlist} media the current media playlist\\n * @return {String} a valid media container type\\n */\\n\\n\\nvar getContainerType = function getContainerType(media) {\\n  // An initialization segment means the media playlist is an iframe\\n  // playlist or is using the mp4 container. We don't currently\\n  // support iframe playlists, so assume this is signalling mp4\\n  // fragments.\\n  if (media.segments && media.segments.length && media.segments[0].map) {\\n    return 'mp4';\\n  }\\n\\n  return 'mp2t';\\n};\\n/**\\n * Returns a set of codec strings parsed from the playlist or the default\\n * codec strings if no codecs were specified in the playlist\\n * @param {Playlist} media the current media playlist\\n * @return {Object} an object with the video and audio codecs\\n */\\n\\n\\nvar getCodecs = function getCodecs(media) {\\n  // if the codecs were explicitly specified, use them instead of the\\n  // defaults\\n  var mediaAttributes = media.attributes || {};\\n\\n  if (mediaAttributes.CODECS) {\\n    return parseCodecs(mediaAttributes.CODECS);\\n  }\\n\\n  return defaultCodecs;\\n};\\n\\nvar audioProfileFromDefault = function audioProfileFromDefault(master, audioGroupId) {\\n  if (!master.mediaGroups.AUDIO || !audioGroupId) {\\n    return null;\\n  }\\n\\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\\n\\n  if (!audioGroup) {\\n    return null;\\n  }\\n\\n  for (var name in audioGroup) {\\n    var audioType = audioGroup[name];\\n\\n    if (audioType[\\\"default\\\"] && audioType.playlists) {\\n      // codec should be the same for all playlists within the audio type\\n      return parseCodecs(audioType.playlists[0].attributes.CODECS).audioProfile;\\n    }\\n  }\\n\\n  return null;\\n};\\n/**\\n * Calculates the MIME type strings for a working configuration of\\n * SourceBuffers to play variant streams in a master playlist. If\\n * there is no possible working configuration, an empty array will be\\n * returned.\\n *\\n * @param master {Object} the m3u8 object for the master playlist\\n * @param media {Object} the m3u8 object for the variant playlist\\n * @return {Array} the MIME type strings. If the array has more than\\n * one entry, the first element should be applied to the video\\n * SourceBuffer and the second to the audio SourceBuffer.\\n *\\n * @private\\n */\\n\\n\\nvar mimeTypesForPlaylist = function mimeTypesForPlaylist(master, media) {\\n  var containerType = getContainerType(media);\\n  var codecInfo = getCodecs(media);\\n  var mediaAttributes = media.attributes || {}; // Default condition for a traditional HLS (no demuxed audio/video)\\n\\n  var isMuxed = true;\\n  var isMaat = false;\\n\\n  if (!media) {\\n    // Not enough information\\n    return [];\\n  }\\n\\n  if (master.mediaGroups.AUDIO && mediaAttributes.AUDIO) {\\n    var audioGroup = master.mediaGroups.AUDIO[mediaAttributes.AUDIO]; // Handle the case where we are in a multiple-audio track scenario\\n\\n    if (audioGroup) {\\n      isMaat = true; // Start with the everything demuxed then...\\n\\n      isMuxed = false; // ...check to see if any audio group tracks are muxed (ie. lacking a uri)\\n\\n      for (var groupId in audioGroup) {\\n        // either a uri is present (if the case of HLS and an external playlist), or\\n        // playlists is present (in the case of DASH where we don't have external audio\\n        // playlists)\\n        if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\\n          isMuxed = true;\\n          break;\\n        }\\n      }\\n    }\\n  } // HLS with multiple-audio tracks must always get an audio codec.\\n  // Put another way, there is no way to have a video-only multiple-audio HLS!\\n\\n\\n  if (isMaat && !codecInfo.audioProfile) {\\n    if (!isMuxed) {\\n      // It is possible for codecs to be specified on the audio media group playlist but\\n      // not on the rendition playlist. This is mostly the case for DASH, where audio and\\n      // video are always separate (and separately specified).\\n      codecInfo.audioProfile = audioProfileFromDefault(master, mediaAttributes.AUDIO);\\n    }\\n\\n    if (!codecInfo.audioProfile) {\\n      videojs$1.log.warn('Multiple audio tracks present but no audio codec string is specified. ' + 'Attempting to use the default audio codec (mp4a.40.2)');\\n      codecInfo.audioProfile = defaultCodecs.audioProfile;\\n    }\\n  } // Generate the final codec strings from the codec object generated above\\n\\n\\n  var codecStrings = {};\\n\\n  if (codecInfo.videoCodec) {\\n    codecStrings.video = '' + codecInfo.videoCodec + codecInfo.videoObjectTypeIndicator;\\n  }\\n\\n  if (codecInfo.audioProfile) {\\n    codecStrings.audio = 'mp4a.40.' + codecInfo.audioProfile;\\n  } // Finally, make and return an array with proper mime-types depending on\\n  // the configuration\\n\\n\\n  var justAudio = makeMimeTypeString('audio', containerType, [codecStrings.audio]);\\n  var justVideo = makeMimeTypeString('video', containerType, [codecStrings.video]);\\n  var bothVideoAudio = makeMimeTypeString('video', containerType, [codecStrings.video, codecStrings.audio]);\\n\\n  if (isMaat) {\\n    if (!isMuxed && codecStrings.video) {\\n      return [justVideo, justAudio];\\n    }\\n\\n    if (!isMuxed && !codecStrings.video) {\\n      // There is no muxed content and no video codec string, so this is an audio only\\n      // stream with alternate audio.\\n      return [justAudio, justAudio];\\n    } // There exists the possiblity that this will return a `video/container`\\n    // mime-type for the first entry in the array even when there is only audio.\\n    // This doesn't appear to be a problem and simplifies the code.\\n\\n\\n    return [bothVideoAudio, justAudio];\\n  } // If there is no video codec at all, always just return a single\\n  // audio/<container> mime-type\\n\\n\\n  if (!codecStrings.video) {\\n    return [justAudio];\\n  } // When not using separate audio media groups, audio and video is\\n  // *always* muxed\\n\\n\\n  return [bothVideoAudio];\\n};\\n/**\\n * Parse a content type header into a type and parameters\\n * object\\n *\\n * @param {String} type the content type header\\n * @return {Object} the parsed content-type\\n * @private\\n */\\n\\n\\nvar parseContentType = function parseContentType(type) {\\n  var object = {\\n    type: '',\\n    parameters: {}\\n  };\\n  var parameters = type.trim().split(';'); // first parameter should always be content-type\\n\\n  object.type = parameters.shift().trim();\\n  parameters.forEach(function (parameter) {\\n    var pair = parameter.trim().split('=');\\n\\n    if (pair.length > 1) {\\n      var name = pair[0].replace(/\\\"/g, '').trim();\\n      var value = pair[1].replace(/\\\"/g, '').trim();\\n      object.parameters[name] = value;\\n    }\\n  });\\n  return object;\\n};\\n/**\\n * Check if a codec string refers to an audio codec.\\n *\\n * @param {String} codec codec string to check\\n * @return {Boolean} if this is an audio codec\\n * @private\\n */\\n\\n\\nvar isAudioCodec = function isAudioCodec(codec) {\\n  return /mp4a\\\\.\\\\d+.\\\\d+/i.test(codec);\\n};\\n/**\\n * Check if a codec string refers to a video codec.\\n *\\n * @param {String} codec codec string to check\\n * @return {Boolean} if this is a video codec\\n * @private\\n */\\n\\n\\nvar isVideoCodec = function isVideoCodec(codec) {\\n  return /avc1\\\\.[\\\\da-f]+/i.test(codec);\\n};\\n/**\\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\\n * front of current time.\\n *\\n * @param {Array} buffer\\n *        The current buffer of gop information\\n * @param {Number} currentTime\\n *        The current time\\n * @param {Double} mapping\\n *        Offset to map display time to stream presentation time\\n * @return {Array}\\n *         List of gops considered safe to append over\\n */\\n\\n\\nvar gopsSafeToAlignWith = function gopsSafeToAlignWith(buffer, currentTime, mapping) {\\n  if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\\n    return [];\\n  } // pts value for current time + 3 seconds to give a bit more wiggle room\\n\\n\\n  var currentTimePts = Math.ceil((currentTime - mapping + 3) * 90000);\\n  var i = void 0;\\n\\n  for (i = 0; i < buffer.length; i++) {\\n    if (buffer[i].pts > currentTimePts) {\\n      break;\\n    }\\n  }\\n\\n  return buffer.slice(i);\\n};\\n/**\\n * Appends gop information (timing and byteLength) received by the transmuxer for the\\n * gops appended in the last call to appendBuffer\\n *\\n * @param {Array} buffer\\n *        The current buffer of gop information\\n * @param {Array} gops\\n *        List of new gop information\\n * @param {boolean} replace\\n *        If true, replace the buffer with the new gop information. If false, append the\\n *        new gop information to the buffer in the right location of time.\\n * @return {Array}\\n *         Updated list of gop information\\n */\\n\\n\\nvar updateGopBuffer = function updateGopBuffer(buffer, gops, replace) {\\n  if (!gops.length) {\\n    return buffer;\\n  }\\n\\n  if (replace) {\\n    // If we are in safe append mode, then completely overwrite the gop buffer\\n    // with the most recent appeneded data. This will make sure that when appending\\n    // future segments, we only try to align with gops that are both ahead of current\\n    // time and in the last segment appended.\\n    return gops.slice();\\n  }\\n\\n  var start = gops[0].pts;\\n  var i = 0;\\n\\n  for (i; i < buffer.length; i++) {\\n    if (buffer[i].pts >= start) {\\n      break;\\n    }\\n  }\\n\\n  return buffer.slice(0, i).concat(gops);\\n};\\n/**\\n * Removes gop information in buffer that overlaps with provided start and end\\n *\\n * @param {Array} buffer\\n *        The current buffer of gop information\\n * @param {Double} start\\n *        position to start the remove at\\n * @param {Double} end\\n *        position to end the remove at\\n * @param {Double} mapping\\n *        Offset to map display time to stream presentation time\\n */\\n\\n\\nvar removeGopBuffer = function removeGopBuffer(buffer, start, end, mapping) {\\n  var startPts = Math.ceil((start - mapping) * 90000);\\n  var endPts = Math.ceil((end - mapping) * 90000);\\n  var updatedBuffer = buffer.slice();\\n  var i = buffer.length;\\n\\n  while (i--) {\\n    if (buffer[i].pts <= endPts) {\\n      break;\\n    }\\n  }\\n\\n  if (i === -1) {\\n    // no removal because end of remove range is before start of buffer\\n    return updatedBuffer;\\n  }\\n\\n  var j = i + 1;\\n\\n  while (j--) {\\n    if (buffer[j].pts <= startPts) {\\n      break;\\n    }\\n  } // clamp remove range start to 0 index\\n\\n\\n  j = Math.max(j, 0);\\n  updatedBuffer.splice(j, i - j + 1);\\n  return updatedBuffer;\\n};\\n\\nvar buffered = function buffered(videoBuffer, audioBuffer, audioDisabled) {\\n  var start = null;\\n  var end = null;\\n  var arity = 0;\\n  var extents = [];\\n  var ranges = []; // neither buffer has been created yet\\n\\n  if (!videoBuffer && !audioBuffer) {\\n    return videojs$1.createTimeRange();\\n  } // only one buffer is configured\\n\\n\\n  if (!videoBuffer) {\\n    return audioBuffer.buffered;\\n  }\\n\\n  if (!audioBuffer) {\\n    return videoBuffer.buffered;\\n  } // both buffers are configured\\n\\n\\n  if (audioDisabled) {\\n    return videoBuffer.buffered;\\n  } // both buffers are empty\\n\\n\\n  if (videoBuffer.buffered.length === 0 && audioBuffer.buffered.length === 0) {\\n    return videojs$1.createTimeRange();\\n  } // Handle the case where we have both buffers and create an\\n  // intersection of the two\\n\\n\\n  var videoBuffered = videoBuffer.buffered;\\n  var audioBuffered = audioBuffer.buffered;\\n  var count = videoBuffered.length; // A) Gather up all start and end times\\n\\n  while (count--) {\\n    extents.push({\\n      time: videoBuffered.start(count),\\n      type: 'start'\\n    });\\n    extents.push({\\n      time: videoBuffered.end(count),\\n      type: 'end'\\n    });\\n  }\\n\\n  count = audioBuffered.length;\\n\\n  while (count--) {\\n    extents.push({\\n      time: audioBuffered.start(count),\\n      type: 'start'\\n    });\\n    extents.push({\\n      time: audioBuffered.end(count),\\n      type: 'end'\\n    });\\n  } // B) Sort them by time\\n\\n\\n  extents.sort(function (a, b) {\\n    return a.time - b.time;\\n  }); // C) Go along one by one incrementing arity for start and decrementing\\n  //    arity for ends\\n\\n  for (count = 0; count < extents.length; count++) {\\n    if (extents[count].type === 'start') {\\n      arity++; // D) If arity is ever incremented to 2 we are entering an\\n      //    overlapping range\\n\\n      if (arity === 2) {\\n        start = extents[count].time;\\n      }\\n    } else if (extents[count].type === 'end') {\\n      arity--; // E) If arity is ever decremented to 1 we leaving an\\n      //    overlapping range\\n\\n      if (arity === 1) {\\n        end = extents[count].time;\\n      }\\n    } // F) Record overlapping ranges\\n\\n\\n    if (start !== null && end !== null) {\\n      ranges.push([start, end]);\\n      start = null;\\n      end = null;\\n    }\\n  }\\n\\n  return videojs$1.createTimeRanges(ranges);\\n};\\n/**\\n * @file virtual-source-buffer.js\\n */\\n\\n\\nvar ONE_SECOND_IN_TS = 90000; // We create a wrapper around the SourceBuffer so that we can manage the\\n// state of the `updating` property manually. We have to do this because\\n// Firefox changes `updating` to false long before triggering `updateend`\\n// events and that was causing strange problems in videojs-contrib-hls\\n\\nvar makeWrappedSourceBuffer = function makeWrappedSourceBuffer(mediaSource, mimeType) {\\n  var sourceBuffer = mediaSource.addSourceBuffer(mimeType);\\n  var wrapper = Object.create(null);\\n  wrapper.updating = false;\\n  wrapper.realBuffer_ = sourceBuffer;\\n\\n  var _loop = function _loop(key) {\\n    if (typeof sourceBuffer[key] === 'function') {\\n      wrapper[key] = function () {\\n        return sourceBuffer[key].apply(sourceBuffer, arguments);\\n      };\\n    } else if (typeof wrapper[key] === 'undefined') {\\n      Object.defineProperty(wrapper, key, {\\n        get: function get$$1() {\\n          return sourceBuffer[key];\\n        },\\n        set: function set$$1(v) {\\n          return sourceBuffer[key] = v;\\n        }\\n      });\\n    }\\n  };\\n\\n  for (var key in sourceBuffer) {\\n    _loop(key);\\n  }\\n\\n  return wrapper;\\n};\\n/**\\n * VirtualSourceBuffers exist so that we can transmux non native formats\\n * into a native format, but keep the same api as a native source buffer.\\n * It creates a transmuxer, that works in its own thread (a web worker) and\\n * that transmuxer muxes the data into a native format. VirtualSourceBuffer will\\n * then send all of that data to the naive sourcebuffer so that it is\\n * indestinguishable from a natively supported format.\\n *\\n * @param {HtmlMediaSource} mediaSource the parent mediaSource\\n * @param {Array} codecs array of codecs that we will be dealing with\\n * @class VirtualSourceBuffer\\n * @extends video.js.EventTarget\\n */\\n\\n\\nvar VirtualSourceBuffer = function (_videojs$EventTarget) {\\n  inherits(VirtualSourceBuffer, _videojs$EventTarget);\\n\\n  function VirtualSourceBuffer(mediaSource, codecs) {\\n    classCallCheck(this, VirtualSourceBuffer);\\n\\n    var _this = possibleConstructorReturn(this, (VirtualSourceBuffer.__proto__ || Object.getPrototypeOf(VirtualSourceBuffer)).call(this, videojs$1.EventTarget));\\n\\n    _this.timestampOffset_ = 0;\\n    _this.pendingBuffers_ = [];\\n    _this.bufferUpdating_ = false;\\n    _this.mediaSource_ = mediaSource;\\n    _this.codecs_ = codecs;\\n    _this.audioCodec_ = null;\\n    _this.videoCodec_ = null;\\n    _this.audioDisabled_ = false;\\n    _this.appendAudioInitSegment_ = true;\\n    _this.gopBuffer_ = [];\\n    _this.timeMapping_ = 0;\\n    _this.safeAppend_ = videojs$1.browser.IE_VERSION >= 11;\\n    var options = {\\n      remux: false,\\n      alignGopsAtEnd: _this.safeAppend_\\n    };\\n\\n    _this.codecs_.forEach(function (codec) {\\n      if (isAudioCodec(codec)) {\\n        _this.audioCodec_ = codec;\\n      } else if (isVideoCodec(codec)) {\\n        _this.videoCodec_ = codec;\\n      }\\n    }); // append muxed segments to their respective native buffers as\\n    // soon as they are available\\n\\n\\n    _this.transmuxer_ = new TransmuxWorker();\\n\\n    _this.transmuxer_.postMessage({\\n      action: 'init',\\n      options: options\\n    });\\n\\n    _this.transmuxer_.onmessage = function (event) {\\n      if (event.data.action === 'data') {\\n        return _this.data_(event);\\n      }\\n\\n      if (event.data.action === 'done') {\\n        return _this.done_(event);\\n      }\\n\\n      if (event.data.action === 'gopInfo') {\\n        return _this.appendGopInfo_(event);\\n      }\\n\\n      if (event.data.action === 'videoSegmentTimingInfo') {\\n        return _this.videoSegmentTimingInfo_(event.data.videoSegmentTimingInfo);\\n      }\\n    }; // this timestampOffset is a property with the side-effect of resetting\\n    // baseMediaDecodeTime in the transmuxer on the setter\\n\\n\\n    Object.defineProperty(_this, 'timestampOffset', {\\n      get: function get$$1() {\\n        return this.timestampOffset_;\\n      },\\n      set: function set$$1(val) {\\n        if (typeof val === 'number' && val >= 0) {\\n          this.timestampOffset_ = val;\\n          this.appendAudioInitSegment_ = true; // reset gop buffer on timestampoffset as this signals a change in timeline\\n\\n          this.gopBuffer_.length = 0;\\n          this.timeMapping_ = 0; // We have to tell the transmuxer to set the baseMediaDecodeTime to\\n          // the desired timestampOffset for the next segment\\n\\n          this.transmuxer_.postMessage({\\n            action: 'setTimestampOffset',\\n            timestampOffset: val\\n          });\\n        }\\n      }\\n    }); // setting the append window affects both source buffers\\n\\n    Object.defineProperty(_this, 'appendWindowStart', {\\n      get: function get$$1() {\\n        return (this.videoBuffer_ || this.audioBuffer_).appendWindowStart;\\n      },\\n      set: function set$$1(start) {\\n        if (this.videoBuffer_) {\\n          this.videoBuffer_.appendWindowStart = start;\\n        }\\n\\n        if (this.audioBuffer_) {\\n          this.audioBuffer_.appendWindowStart = start;\\n        }\\n      }\\n    }); // this buffer is \\\"updating\\\" if either of its native buffers are\\n\\n    Object.defineProperty(_this, 'updating', {\\n      get: function get$$1() {\\n        return !!(this.bufferUpdating_ || !this.audioDisabled_ && this.audioBuffer_ && this.audioBuffer_.updating || this.videoBuffer_ && this.videoBuffer_.updating);\\n      }\\n    }); // the buffered property is the intersection of the buffered\\n    // ranges of the native source buffers\\n\\n    Object.defineProperty(_this, 'buffered', {\\n      get: function get$$1() {\\n        return buffered(this.videoBuffer_, this.audioBuffer_, this.audioDisabled_);\\n      }\\n    });\\n    return _this;\\n  }\\n  /**\\n   * When we get a data event from the transmuxer\\n   * we call this function and handle the data that\\n   * was sent to us\\n   *\\n   * @private\\n   * @param {Event} event the data event from the transmuxer\\n   */\\n\\n\\n  createClass(VirtualSourceBuffer, [{\\n    key: 'data_',\\n    value: function data_(event) {\\n      var segment = event.data.segment; // Cast ArrayBuffer to TypedArray\\n\\n      segment.data = new Uint8Array(segment.data, event.data.byteOffset, event.data.byteLength);\\n      segment.initSegment = new Uint8Array(segment.initSegment.data, segment.initSegment.byteOffset, segment.initSegment.byteLength);\\n      createTextTracksIfNecessary(this, this.mediaSource_, segment); // Add the segments to the pendingBuffers array\\n\\n      this.pendingBuffers_.push(segment);\\n      return;\\n    }\\n    /**\\n     * When we get a done event from the transmuxer\\n     * we call this function and we process all\\n     * of the pending data that we have been saving in the\\n     * data_ function\\n     *\\n     * @private\\n     * @param {Event} event the done event from the transmuxer\\n     */\\n\\n  }, {\\n    key: 'done_',\\n    value: function done_(event) {\\n      // Don't process and append data if the mediaSource is closed\\n      if (this.mediaSource_.readyState === 'closed') {\\n        this.pendingBuffers_.length = 0;\\n        return;\\n      } // All buffers should have been flushed from the muxer\\n      // start processing anything we have received\\n\\n\\n      this.processPendingSegments_();\\n      return;\\n    }\\n  }, {\\n    key: 'videoSegmentTimingInfo_',\\n    value: function videoSegmentTimingInfo_(timingInfo) {\\n      var timingInfoInSeconds = {\\n        start: {\\n          decode: timingInfo.start.dts / ONE_SECOND_IN_TS,\\n          presentation: timingInfo.start.pts / ONE_SECOND_IN_TS\\n        },\\n        end: {\\n          decode: timingInfo.end.dts / ONE_SECOND_IN_TS,\\n          presentation: timingInfo.end.pts / ONE_SECOND_IN_TS\\n        },\\n        baseMediaDecodeTime: timingInfo.baseMediaDecodeTime / ONE_SECOND_IN_TS\\n      };\\n\\n      if (timingInfo.prependedContentDuration) {\\n        timingInfoInSeconds.prependedContentDuration = timingInfo.prependedContentDuration / ONE_SECOND_IN_TS;\\n      }\\n\\n      this.trigger({\\n        type: 'videoSegmentTimingInfo',\\n        videoSegmentTimingInfo: timingInfoInSeconds\\n      });\\n    }\\n    /**\\n     * Create our internal native audio/video source buffers and add\\n     * event handlers to them with the following conditions:\\n     * 1. they do not already exist on the mediaSource\\n     * 2. this VSB has a codec for them\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'createRealSourceBuffers_',\\n    value: function createRealSourceBuffers_() {\\n      var _this2 = this;\\n\\n      var types = ['audio', 'video'];\\n      types.forEach(function (type) {\\n        // Don't create a SourceBuffer of this type if we don't have a\\n        // codec for it\\n        if (!_this2[type + 'Codec_']) {\\n          return;\\n        } // Do nothing if a SourceBuffer of this type already exists\\n\\n\\n        if (_this2[type + 'Buffer_']) {\\n          return;\\n        }\\n\\n        var buffer = null; // If the mediasource already has a SourceBuffer for the codec\\n        // use that\\n\\n        if (_this2.mediaSource_[type + 'Buffer_']) {\\n          buffer = _this2.mediaSource_[type + 'Buffer_']; // In multiple audio track cases, the audio source buffer is disabled\\n          // on the main VirtualSourceBuffer by the HTMLMediaSource much earlier\\n          // than createRealSourceBuffers_ is called to create the second\\n          // VirtualSourceBuffer because that happens as a side-effect of\\n          // videojs-contrib-hls starting the audioSegmentLoader. As a result,\\n          // the audioBuffer is essentially \\\"ownerless\\\" and no one will toggle\\n          // the `updating` state back to false once the `updateend` event is received\\n          //\\n          // Setting `updating` to false manually will work around this\\n          // situation and allow work to continue\\n\\n          buffer.updating = false;\\n        } else {\\n          var codecProperty = type + 'Codec_';\\n          var mimeType = type + '/mp4;codecs=\\\"' + _this2[codecProperty] + '\\\"';\\n          buffer = makeWrappedSourceBuffer(_this2.mediaSource_.nativeMediaSource_, mimeType);\\n          _this2.mediaSource_[type + 'Buffer_'] = buffer;\\n        }\\n\\n        _this2[type + 'Buffer_'] = buffer; // Wire up the events to the SourceBuffer\\n\\n        ['update', 'updatestart', 'updateend'].forEach(function (event) {\\n          buffer.addEventListener(event, function () {\\n            // if audio is disabled\\n            if (type === 'audio' && _this2.audioDisabled_) {\\n              return;\\n            }\\n\\n            if (event === 'updateend') {\\n              _this2[type + 'Buffer_'].updating = false;\\n            }\\n\\n            var shouldTrigger = types.every(function (t) {\\n              // skip checking audio's updating status if audio\\n              // is not enabled\\n              if (t === 'audio' && _this2.audioDisabled_) {\\n                return true;\\n              } // if the other type is updating we don't trigger\\n\\n\\n              if (type !== t && _this2[t + 'Buffer_'] && _this2[t + 'Buffer_'].updating) {\\n                return false;\\n              }\\n\\n              return true;\\n            });\\n\\n            if (shouldTrigger) {\\n              return _this2.trigger(event);\\n            }\\n          });\\n        });\\n      });\\n    }\\n    /**\\n     * Emulate the native mediasource function, but our function will\\n     * send all of the proposed segments to the transmuxer so that we\\n     * can transmux them before we append them to our internal\\n     * native source buffers in the correct format.\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer\\n     * @param {Uint8Array} segment the segment to append to the buffer\\n     */\\n\\n  }, {\\n    key: 'appendBuffer',\\n    value: function appendBuffer(segment) {\\n      // Start the internal \\\"updating\\\" state\\n      this.bufferUpdating_ = true;\\n\\n      if (this.audioBuffer_ && this.audioBuffer_.buffered.length) {\\n        var audioBuffered = this.audioBuffer_.buffered;\\n        this.transmuxer_.postMessage({\\n          action: 'setAudioAppendStart',\\n          appendStart: audioBuffered.end(audioBuffered.length - 1)\\n        });\\n      }\\n\\n      if (this.videoBuffer_) {\\n        this.transmuxer_.postMessage({\\n          action: 'alignGopsWith',\\n          gopsToAlignWith: gopsSafeToAlignWith(this.gopBuffer_, this.mediaSource_.player_ ? this.mediaSource_.player_.currentTime() : null, this.timeMapping_)\\n        });\\n      }\\n\\n      this.transmuxer_.postMessage({\\n        action: 'push',\\n        // Send the typed-array of data as an ArrayBuffer so that\\n        // it can be sent as a \\\"Transferable\\\" and avoid the costly\\n        // memory copy\\n        data: segment.buffer,\\n        // To recreate the original typed-array, we need information\\n        // about what portion of the ArrayBuffer it was a view into\\n        byteOffset: segment.byteOffset,\\n        byteLength: segment.byteLength\\n      }, [segment.buffer]);\\n      this.transmuxer_.postMessage({\\n        action: 'flush'\\n      });\\n    }\\n    /**\\n     * Appends gop information (timing and byteLength) received by the transmuxer for the\\n     * gops appended in the last call to appendBuffer\\n     *\\n     * @param {Event} event\\n     *        The gopInfo event from the transmuxer\\n     * @param {Array} event.data.gopInfo\\n     *        List of gop info to append\\n     */\\n\\n  }, {\\n    key: 'appendGopInfo_',\\n    value: function appendGopInfo_(event) {\\n      this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, event.data.gopInfo, this.safeAppend_);\\n    }\\n    /**\\n     * Emulate the native mediasource function and remove parts\\n     * of the buffer from any of our internal buffers that exist\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/remove\\n     * @param {Double} start position to start the remove at\\n     * @param {Double} end position to end the remove at\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end) {\\n      if (this.videoBuffer_) {\\n        this.videoBuffer_.updating = true;\\n        this.videoBuffer_.remove(start, end);\\n        this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\\n      }\\n\\n      if (!this.audioDisabled_ && this.audioBuffer_) {\\n        this.audioBuffer_.updating = true;\\n        this.audioBuffer_.remove(start, end);\\n      } // Remove Metadata Cues (id3)\\n\\n\\n      removeCuesFromTrack(start, end, this.metadataTrack_); // Remove Any Captions\\n\\n      if (this.inbandTextTracks_) {\\n        for (var track in this.inbandTextTracks_) {\\n          removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\\n        }\\n      }\\n    }\\n    /**\\n     * Process any segments that the muxer has output\\n     * Concatenate segments together based on type and append them into\\n     * their respective sourceBuffers\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'processPendingSegments_',\\n    value: function processPendingSegments_() {\\n      var sortedSegments = {\\n        video: {\\n          segments: [],\\n          bytes: 0\\n        },\\n        audio: {\\n          segments: [],\\n          bytes: 0\\n        },\\n        captions: [],\\n        metadata: []\\n      };\\n\\n      if (!this.pendingBuffers_.length) {\\n        // We are no longer in the internal \\\"updating\\\" state\\n        this.trigger('updateend');\\n        this.bufferUpdating_ = false;\\n        return;\\n      } // Sort segments into separate video/audio arrays and\\n      // keep track of their total byte lengths\\n\\n\\n      sortedSegments = this.pendingBuffers_.reduce(function (segmentObj, segment) {\\n        var type = segment.type;\\n        var data = segment.data;\\n        var initSegment = segment.initSegment;\\n        segmentObj[type].segments.push(data);\\n        segmentObj[type].bytes += data.byteLength;\\n        segmentObj[type].initSegment = initSegment; // Gather any captions into a single array\\n\\n        if (segment.captions) {\\n          segmentObj.captions = segmentObj.captions.concat(segment.captions);\\n        }\\n\\n        if (segment.info) {\\n          segmentObj[type].info = segment.info;\\n        } // Gather any metadata into a single array\\n\\n\\n        if (segment.metadata) {\\n          segmentObj.metadata = segmentObj.metadata.concat(segment.metadata);\\n        }\\n\\n        return segmentObj;\\n      }, sortedSegments); // Create the real source buffers if they don't exist by now since we\\n      // finally are sure what tracks are contained in the source\\n\\n      if (!this.videoBuffer_ && !this.audioBuffer_) {\\n        // Remove any codecs that may have been specified by default but\\n        // are no longer applicable now\\n        if (sortedSegments.video.bytes === 0) {\\n          this.videoCodec_ = null;\\n        }\\n\\n        if (sortedSegments.audio.bytes === 0) {\\n          this.audioCodec_ = null;\\n        }\\n\\n        this.createRealSourceBuffers_();\\n      }\\n\\n      if (sortedSegments.audio.info) {\\n        this.mediaSource_.trigger({\\n          type: 'audioinfo',\\n          info: sortedSegments.audio.info\\n        });\\n      }\\n\\n      if (sortedSegments.video.info) {\\n        this.mediaSource_.trigger({\\n          type: 'videoinfo',\\n          info: sortedSegments.video.info\\n        });\\n      }\\n\\n      if (this.appendAudioInitSegment_) {\\n        if (!this.audioDisabled_ && this.audioBuffer_) {\\n          sortedSegments.audio.segments.unshift(sortedSegments.audio.initSegment);\\n          sortedSegments.audio.bytes += sortedSegments.audio.initSegment.byteLength;\\n        }\\n\\n        this.appendAudioInitSegment_ = false;\\n      }\\n\\n      var triggerUpdateend = false; // Merge multiple video and audio segments into one and append\\n\\n      if (this.videoBuffer_ && sortedSegments.video.bytes) {\\n        sortedSegments.video.segments.unshift(sortedSegments.video.initSegment);\\n        sortedSegments.video.bytes += sortedSegments.video.initSegment.byteLength;\\n        this.concatAndAppendSegments_(sortedSegments.video, this.videoBuffer_);\\n      } else if (this.videoBuffer_ && (this.audioDisabled_ || !this.audioBuffer_)) {\\n        // The transmuxer did not return any bytes of video, meaning it was all trimmed\\n        // for gop alignment. Since we have a video buffer and audio is disabled, updateend\\n        // will never be triggered by this source buffer, which will cause contrib-hls\\n        // to be stuck forever waiting for updateend. If audio is not disabled, updateend\\n        // will be triggered by the audio buffer, which will be sent upwards since the video\\n        // buffer will not be in an updating state.\\n        triggerUpdateend = true;\\n      } // Add text-track data for all\\n\\n\\n      addTextTrackData(this, sortedSegments.captions, sortedSegments.metadata);\\n\\n      if (!this.audioDisabled_ && this.audioBuffer_) {\\n        this.concatAndAppendSegments_(sortedSegments.audio, this.audioBuffer_);\\n      }\\n\\n      this.pendingBuffers_.length = 0;\\n\\n      if (triggerUpdateend) {\\n        this.trigger('updateend');\\n      } // We are no longer in the internal \\\"updating\\\" state\\n\\n\\n      this.bufferUpdating_ = false;\\n    }\\n    /**\\n     * Combine all segments into a single Uint8Array and then append them\\n     * to the destination buffer\\n     *\\n     * @param {Object} segmentObj\\n     * @param {SourceBuffer} destinationBuffer native source buffer to append data to\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'concatAndAppendSegments_',\\n    value: function concatAndAppendSegments_(segmentObj, destinationBuffer) {\\n      var offset = 0;\\n      var tempBuffer = void 0;\\n\\n      if (segmentObj.bytes) {\\n        tempBuffer = new Uint8Array(segmentObj.bytes); // Combine the individual segments into one large typed-array\\n\\n        segmentObj.segments.forEach(function (segment) {\\n          tempBuffer.set(segment, offset);\\n          offset += segment.byteLength;\\n        });\\n\\n        try {\\n          destinationBuffer.updating = true;\\n          destinationBuffer.appendBuffer(tempBuffer);\\n        } catch (error) {\\n          if (this.mediaSource_.player_) {\\n            this.mediaSource_.player_.error({\\n              code: -3,\\n              type: 'APPEND_BUFFER_ERR',\\n              message: error.message,\\n              originalError: error\\n            });\\n          }\\n        }\\n      }\\n    }\\n    /**\\n     * Emulate the native mediasource function. abort any soureBuffer\\n     * actions and throw out any un-appended data.\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/abort\\n     */\\n\\n  }, {\\n    key: 'abort',\\n    value: function abort() {\\n      if (this.videoBuffer_) {\\n        this.videoBuffer_.abort();\\n      }\\n\\n      if (!this.audioDisabled_ && this.audioBuffer_) {\\n        this.audioBuffer_.abort();\\n      }\\n\\n      if (this.transmuxer_) {\\n        this.transmuxer_.postMessage({\\n          action: 'reset'\\n        });\\n      }\\n\\n      this.pendingBuffers_.length = 0;\\n      this.bufferUpdating_ = false;\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      if (this.transmuxer_) {\\n        this.transmuxer_.terminate();\\n      }\\n\\n      this.trigger('dispose');\\n      this.off();\\n    }\\n  }]);\\n  return VirtualSourceBuffer;\\n}(videojs$1.EventTarget);\\n/**\\n * @file html-media-source.js\\n */\\n\\n/**\\n * Our MediaSource implementation in HTML, mimics native\\n * MediaSource where/if possible.\\n *\\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\\n * @class HtmlMediaSource\\n * @extends videojs.EventTarget\\n */\\n\\n\\nvar HtmlMediaSource = function (_videojs$EventTarget) {\\n  inherits(HtmlMediaSource, _videojs$EventTarget);\\n\\n  function HtmlMediaSource() {\\n    classCallCheck(this, HtmlMediaSource);\\n\\n    var _this = possibleConstructorReturn(this, (HtmlMediaSource.__proto__ || Object.getPrototypeOf(HtmlMediaSource)).call(this));\\n\\n    var property = void 0;\\n    _this.nativeMediaSource_ = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource(); // delegate to the native MediaSource's methods by default\\n\\n    for (property in _this.nativeMediaSource_) {\\n      if (!(property in HtmlMediaSource.prototype) && typeof _this.nativeMediaSource_[property] === 'function') {\\n        _this[property] = _this.nativeMediaSource_[property].bind(_this.nativeMediaSource_);\\n      }\\n    } // emulate `duration` and `seekable` until seeking can be\\n    // handled uniformly for live streams\\n    // see https://github.com/w3c/media-source/issues/5\\n\\n\\n    _this.duration_ = NaN;\\n    Object.defineProperty(_this, 'duration', {\\n      get: function get$$1() {\\n        if (this.duration_ === Infinity) {\\n          return this.duration_;\\n        }\\n\\n        return this.nativeMediaSource_.duration;\\n      },\\n      set: function set$$1(duration) {\\n        this.duration_ = duration;\\n\\n        if (duration !== Infinity) {\\n          this.nativeMediaSource_.duration = duration;\\n          return;\\n        }\\n      }\\n    });\\n    Object.defineProperty(_this, 'seekable', {\\n      get: function get$$1() {\\n        if (this.duration_ === Infinity) {\\n          return videojs$1.createTimeRanges([[0, this.nativeMediaSource_.duration]]);\\n        }\\n\\n        return this.nativeMediaSource_.seekable;\\n      }\\n    });\\n    Object.defineProperty(_this, 'readyState', {\\n      get: function get$$1() {\\n        return this.nativeMediaSource_.readyState;\\n      }\\n    });\\n    Object.defineProperty(_this, 'activeSourceBuffers', {\\n      get: function get$$1() {\\n        return this.activeSourceBuffers_;\\n      }\\n    }); // the list of virtual and native SourceBuffers created by this\\n    // MediaSource\\n\\n    _this.sourceBuffers = [];\\n    _this.activeSourceBuffers_ = [];\\n    /**\\n     * update the list of active source buffers based upon various\\n     * imformation from HLS and video.js\\n     *\\n     * @private\\n     */\\n\\n    _this.updateActiveSourceBuffers_ = function () {\\n      // Retain the reference but empty the array\\n      _this.activeSourceBuffers_.length = 0; // If there is only one source buffer, then it will always be active and audio will\\n      // be disabled based on the codec of the source buffer\\n\\n      if (_this.sourceBuffers.length === 1) {\\n        var sourceBuffer = _this.sourceBuffers[0];\\n        sourceBuffer.appendAudioInitSegment_ = true;\\n        sourceBuffer.audioDisabled_ = !sourceBuffer.audioCodec_;\\n\\n        _this.activeSourceBuffers_.push(sourceBuffer);\\n\\n        return;\\n      } // There are 2 source buffers, a combined (possibly video only) source buffer and\\n      // and an audio only source buffer.\\n      // By default, the audio in the combined virtual source buffer is enabled\\n      // and the audio-only source buffer (if it exists) is disabled.\\n\\n\\n      var disableCombined = false;\\n      var disableAudioOnly = true; // TODO: maybe we can store the sourcebuffers on the track objects?\\n      // safari may do something like this\\n\\n      for (var i = 0; i < _this.player_.audioTracks().length; i++) {\\n        var track = _this.player_.audioTracks()[i];\\n\\n        if (track.enabled && track.kind !== 'main') {\\n          // The enabled track is an alternate audio track so disable the audio in\\n          // the combined source buffer and enable the audio-only source buffer.\\n          disableCombined = true;\\n          disableAudioOnly = false;\\n          break;\\n        }\\n      }\\n\\n      _this.sourceBuffers.forEach(function (sourceBuffer, index) {\\n        /* eslinst-disable */\\n        // TODO once codecs are required, we can switch to using the codecs to determine\\n        //      what stream is the video stream, rather than relying on videoTracks\\n\\n        /* eslinst-enable */\\n        sourceBuffer.appendAudioInitSegment_ = true;\\n\\n        if (sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\\n          // combined\\n          sourceBuffer.audioDisabled_ = disableCombined;\\n        } else if (sourceBuffer.videoCodec_ && !sourceBuffer.audioCodec_) {\\n          // If the \\\"combined\\\" source buffer is video only, then we do not want\\n          // disable the audio-only source buffer (this is mostly for demuxed\\n          // audio and video hls)\\n          sourceBuffer.audioDisabled_ = true;\\n          disableAudioOnly = false;\\n        } else if (!sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\\n          // audio only\\n          // In the case of audio only with alternate audio and disableAudioOnly is true\\n          // this means we want to disable the audio on the alternate audio sourcebuffer\\n          // but not the main \\\"combined\\\" source buffer. The \\\"combined\\\" source buffer is\\n          // always at index 0, so this ensures audio won't be disabled in both source\\n          // buffers.\\n          sourceBuffer.audioDisabled_ = index ? disableAudioOnly : !disableAudioOnly;\\n\\n          if (sourceBuffer.audioDisabled_) {\\n            return;\\n          }\\n        }\\n\\n        _this.activeSourceBuffers_.push(sourceBuffer);\\n      });\\n    };\\n\\n    _this.onPlayerMediachange_ = function () {\\n      _this.sourceBuffers.forEach(function (sourceBuffer) {\\n        sourceBuffer.appendAudioInitSegment_ = true;\\n      });\\n    };\\n\\n    _this.onHlsReset_ = function () {\\n      _this.sourceBuffers.forEach(function (sourceBuffer) {\\n        if (sourceBuffer.transmuxer_) {\\n          sourceBuffer.transmuxer_.postMessage({\\n            action: 'resetCaptions'\\n          });\\n        }\\n      });\\n    };\\n\\n    _this.onHlsSegmentTimeMapping_ = function (event) {\\n      _this.sourceBuffers.forEach(function (buffer) {\\n        return buffer.timeMapping_ = event.mapping;\\n      });\\n    }; // Re-emit MediaSource events on the polyfill\\n\\n\\n    ['sourceopen', 'sourceclose', 'sourceended'].forEach(function (eventName) {\\n      this.nativeMediaSource_.addEventListener(eventName, this.trigger.bind(this));\\n    }, _this); // capture the associated player when the MediaSource is\\n    // successfully attached\\n\\n    _this.on('sourceopen', function (event) {\\n      // Get the player this MediaSource is attached to\\n      var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.querySelector('[src=\\\"' + _this.url_ + '\\\"]');\\n\\n      if (!video) {\\n        return;\\n      }\\n\\n      _this.player_ = videojs$1(video.parentNode);\\n\\n      if (!_this.player_) {\\n        return;\\n      } // hls-reset is fired by videojs.Hls on to the tech after the main SegmentLoader\\n      // resets its state and flushes the buffer\\n\\n\\n      _this.player_.tech_.on('hls-reset', _this.onHlsReset_); // hls-segment-time-mapping is fired by videojs.Hls on to the tech after the main\\n      // SegmentLoader inspects an MTS segment and has an accurate stream to display\\n      // time mapping\\n\\n\\n      _this.player_.tech_.on('hls-segment-time-mapping', _this.onHlsSegmentTimeMapping_);\\n\\n      if (_this.player_.audioTracks && _this.player_.audioTracks()) {\\n        _this.player_.audioTracks().on('change', _this.updateActiveSourceBuffers_);\\n\\n        _this.player_.audioTracks().on('addtrack', _this.updateActiveSourceBuffers_);\\n\\n        _this.player_.audioTracks().on('removetrack', _this.updateActiveSourceBuffers_);\\n      }\\n\\n      _this.player_.on('mediachange', _this.onPlayerMediachange_);\\n    });\\n\\n    _this.on('sourceended', function (event) {\\n      var duration = durationOfVideo(_this.duration);\\n\\n      for (var i = 0; i < _this.sourceBuffers.length; i++) {\\n        var sourcebuffer = _this.sourceBuffers[i];\\n        var cues = sourcebuffer.metadataTrack_ && sourcebuffer.metadataTrack_.cues;\\n\\n        if (cues && cues.length) {\\n          cues[cues.length - 1].endTime = duration;\\n        }\\n      }\\n    }); // explicitly terminate any WebWorkers that were created\\n    // by SourceHandlers\\n\\n\\n    _this.on('sourceclose', function (event) {\\n      this.sourceBuffers.forEach(function (sourceBuffer) {\\n        if (sourceBuffer.transmuxer_) {\\n          sourceBuffer.transmuxer_.terminate();\\n        }\\n      });\\n      this.sourceBuffers.length = 0;\\n\\n      if (!this.player_) {\\n        return;\\n      }\\n\\n      if (this.player_.audioTracks && this.player_.audioTracks()) {\\n        this.player_.audioTracks().off('change', this.updateActiveSourceBuffers_);\\n        this.player_.audioTracks().off('addtrack', this.updateActiveSourceBuffers_);\\n        this.player_.audioTracks().off('removetrack', this.updateActiveSourceBuffers_);\\n      } // We can only change this if the player hasn't been disposed of yet\\n      // because `off` eventually tries to use the el_ property. If it has\\n      // been disposed of, then don't worry about it because there are no\\n      // event handlers left to unbind anyway\\n\\n\\n      if (this.player_.el_) {\\n        this.player_.off('mediachange', this.onPlayerMediachange_);\\n      }\\n\\n      if (this.player_.tech_ && this.player_.tech_.el_) {\\n        this.player_.tech_.off('hls-reset', this.onHlsReset_);\\n        this.player_.tech_.off('hls-segment-time-mapping', this.onHlsSegmentTimeMapping_);\\n      }\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Add a range that that can now be seeked to.\\n   *\\n   * @param {Double} start where to start the addition\\n   * @param {Double} end where to end the addition\\n   * @private\\n   */\\n\\n\\n  createClass(HtmlMediaSource, [{\\n    key: 'addSeekableRange_',\\n    value: function addSeekableRange_(start, end) {\\n      var error = void 0;\\n\\n      if (this.duration !== Infinity) {\\n        error = new Error('MediaSource.addSeekableRange() can only be invoked ' + 'when the duration is Infinity');\\n        error.name = 'InvalidStateError';\\n        error.code = 11;\\n        throw error;\\n      }\\n\\n      if (end > this.nativeMediaSource_.duration || isNaN(this.nativeMediaSource_.duration)) {\\n        this.nativeMediaSource_.duration = end;\\n      }\\n    }\\n    /**\\n     * Add a source buffer to the media source.\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer\\n     * @param {String} type the content-type of the content\\n     * @return {Object} the created source buffer\\n     */\\n\\n  }, {\\n    key: 'addSourceBuffer',\\n    value: function addSourceBuffer(type) {\\n      var buffer = void 0;\\n      var parsedType = parseContentType(type); // Create a VirtualSourceBuffer to transmux MPEG-2 transport\\n      // stream segments into fragmented MP4s\\n\\n      if (/^(video|audio)\\\\/mp2t$/i.test(parsedType.type)) {\\n        var codecs = [];\\n\\n        if (parsedType.parameters && parsedType.parameters.codecs) {\\n          codecs = parsedType.parameters.codecs.split(',');\\n          codecs = translateLegacyCodecs(codecs);\\n          codecs = codecs.filter(function (codec) {\\n            return isAudioCodec(codec) || isVideoCodec(codec);\\n          });\\n        }\\n\\n        if (codecs.length === 0) {\\n          codecs = ['avc1.4d400d', 'mp4a.40.2'];\\n        }\\n\\n        buffer = new VirtualSourceBuffer(this, codecs);\\n\\n        if (this.sourceBuffers.length !== 0) {\\n          // If another VirtualSourceBuffer already exists, then we are creating a\\n          // SourceBuffer for an alternate audio track and therefore we know that\\n          // the source has both an audio and video track.\\n          // That means we should trigger the manual creation of the real\\n          // SourceBuffers instead of waiting for the transmuxer to return data\\n          this.sourceBuffers[0].createRealSourceBuffers_();\\n          buffer.createRealSourceBuffers_(); // Automatically disable the audio on the first source buffer if\\n          // a second source buffer is ever created\\n\\n          this.sourceBuffers[0].audioDisabled_ = true;\\n        }\\n      } else {\\n        // delegate to the native implementation\\n        buffer = this.nativeMediaSource_.addSourceBuffer(type);\\n      }\\n\\n      this.sourceBuffers.push(buffer);\\n      return buffer;\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.off();\\n      this.sourceBuffers.forEach(function (buffer) {\\n        if (buffer.dispose) {\\n          buffer.dispose();\\n        }\\n      });\\n      this.sourceBuffers.length = 0;\\n    }\\n  }]);\\n  return HtmlMediaSource;\\n}(videojs$1.EventTarget);\\n/**\\n * @file videojs-contrib-media-sources.js\\n */\\n\\n\\nvar urlCount = 0; // ------------\\n// Media Source\\n// ------------\\n// store references to the media sources so they can be connected\\n// to a video element (a swf object)\\n// TODO: can we store this somewhere local to this module?\\n\\nvideojs$1.mediaSources = {};\\n/**\\n * Provide a method for a swf object to notify JS that a\\n * media source is now open.\\n *\\n * @param {String} msObjectURL string referencing the MSE Object URL\\n * @param {String} swfId the swf id\\n */\\n\\nvar open = function open(msObjectURL, swfId) {\\n  var mediaSource = videojs$1.mediaSources[msObjectURL];\\n\\n  if (mediaSource) {\\n    mediaSource.trigger({\\n      type: 'sourceopen',\\n      swfId: swfId\\n    });\\n  } else {\\n    throw new Error('Media Source not found (Video.js)');\\n  }\\n};\\n/**\\n * Check to see if the native MediaSource object exists and supports\\n * an MP4 container with both H.264 video and AAC-LC audio.\\n *\\n * @return {Boolean} if  native media sources are supported\\n */\\n\\n\\nvar supportsNativeMediaSources = function supportsNativeMediaSources() {\\n  return !!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource && !!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported('video/mp4;codecs=\\\"avc1.4d400d,mp4a.40.2\\\"');\\n};\\n/**\\n * An emulation of the MediaSource API so that we can support\\n * native and non-native functionality. returns an instance of\\n * HtmlMediaSource.\\n *\\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/MediaSource\\n */\\n\\n\\nvar MediaSource = function MediaSource() {\\n  this.MediaSource = {\\n    open: open,\\n    supportsNativeMediaSources: supportsNativeMediaSources\\n  };\\n\\n  if (supportsNativeMediaSources()) {\\n    return new HtmlMediaSource();\\n  }\\n\\n  throw new Error('Cannot use create a virtual MediaSource for this video');\\n};\\n\\nMediaSource.open = open;\\nMediaSource.supportsNativeMediaSources = supportsNativeMediaSources;\\n/**\\n * A wrapper around the native URL for our MSE object\\n * implementation, this object is exposed under videojs.URL\\n *\\n * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/URL\\n */\\n\\nvar URL$1 = {\\n  /**\\n   * A wrapper around the native createObjectURL for our objects.\\n   * This function maps a native or emulated mediaSource to a blob\\n   * url so that it can be loaded into video.js\\n   *\\n   * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\\n   * @param {MediaSource} object the object to create a blob url to\\n   */\\n  createObjectURL: function createObjectURL(object) {\\n    var objectUrlPrefix = 'blob:vjs-media-source/';\\n    var url = void 0; // use the native MediaSource to generate an object URL\\n\\n    if (object instanceof HtmlMediaSource) {\\n      url = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.createObjectURL(object.nativeMediaSource_);\\n      object.url_ = url;\\n      return url;\\n    } // if the object isn't an emulated MediaSource, delegate to the\\n    // native implementation\\n\\n\\n    if (!(object instanceof HtmlMediaSource)) {\\n      url = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.createObjectURL(object);\\n      object.url_ = url;\\n      return url;\\n    } // build a URL that can be used to map back to the emulated\\n    // MediaSource\\n\\n\\n    url = objectUrlPrefix + urlCount;\\n    urlCount++; // setup the mapping back to object\\n\\n    videojs$1.mediaSources[url] = object;\\n    return url;\\n  }\\n};\\nvideojs$1.MediaSource = MediaSource;\\nvideojs$1.URL = URL$1;\\nvar EventTarget$1$1 = videojs$1.EventTarget,\\n    mergeOptions$2 = videojs$1.mergeOptions;\\n/**\\n * Returns a new master manifest that is the result of merging an updated master manifest\\n * into the original version.\\n *\\n * @param {Object} oldMaster\\n *        The old parsed mpd object\\n * @param {Object} newMaster\\n *        The updated parsed mpd object\\n * @return {Object}\\n *         A new object representing the original master manifest with the updated media\\n *         playlists merged in\\n */\\n\\nvar updateMaster$1 = function updateMaster$$1(oldMaster, newMaster) {\\n  var noChanges = void 0;\\n  var update = mergeOptions$2(oldMaster, {\\n    // These are top level properties that can be updated\\n    duration: newMaster.duration,\\n    minimumUpdatePeriod: newMaster.minimumUpdatePeriod\\n  }); // First update the playlists in playlist list\\n\\n  for (var i = 0; i < newMaster.playlists.length; i++) {\\n    var playlistUpdate = updateMaster(update, newMaster.playlists[i]);\\n\\n    if (playlistUpdate) {\\n      update = playlistUpdate;\\n    } else {\\n      noChanges = true;\\n    }\\n  } // Then update media group playlists\\n\\n\\n  forEachMediaGroup(newMaster, function (properties, type, group, label) {\\n    if (properties.playlists && properties.playlists.length) {\\n      var id = properties.playlists[0].id;\\n\\n      var _playlistUpdate = updateMaster(update, properties.playlists[0]);\\n\\n      if (_playlistUpdate) {\\n        update = _playlistUpdate; // update the playlist reference within media groups\\n\\n        update.mediaGroups[type][group][label].playlists[0] = update.playlists[id];\\n        noChanges = false;\\n      }\\n    }\\n  });\\n\\n  if (noChanges) {\\n    return null;\\n  }\\n\\n  return update;\\n};\\n\\nvar generateSidxKey = function generateSidxKey(sidxInfo) {\\n  // should be non-inclusive\\n  var sidxByteRangeEnd = sidxInfo.byterange.offset + sidxInfo.byterange.length - 1;\\n  return sidxInfo.uri + '-' + sidxInfo.byterange.offset + '-' + sidxByteRangeEnd;\\n}; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\\n// If the SIDXs have maps, the two maps should match,\\n// both `a` and `b` missing SIDXs is considered matching.\\n// If `a` or `b` but not both have a map, they aren't matching.\\n\\n\\nvar equivalentSidx = function equivalentSidx(a, b) {\\n  var neitherMap = Boolean(!a.map && !b.map);\\n  var equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\\n  return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\\n}; // exported for testing\\n\\n\\nvar compareSidxEntry = function compareSidxEntry(playlists, oldSidxMapping) {\\n  var newSidxMapping = {};\\n\\n  for (var id in playlists) {\\n    var playlist = playlists[id];\\n    var currentSidxInfo = playlist.sidx;\\n\\n    if (currentSidxInfo) {\\n      var key = generateSidxKey(currentSidxInfo);\\n\\n      if (!oldSidxMapping[key]) {\\n        break;\\n      }\\n\\n      var savedSidxInfo = oldSidxMapping[key].sidxInfo;\\n\\n      if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\\n        newSidxMapping[key] = oldSidxMapping[key];\\n      }\\n    }\\n  }\\n\\n  return newSidxMapping;\\n};\\n/**\\n *  A function that filters out changed items as they need to be requested separately.\\n *\\n *  The method is exported for testing\\n *\\n *  @param {Object} masterXml the mpd XML\\n *  @param {string} srcUrl the mpd url\\n *  @param {Date} clientOffset a time difference between server and client (passed through and not used)\\n *  @param {Object} oldSidxMapping the SIDX to compare against\\n */\\n\\n\\nvar filterChangedSidxMappings = function filterChangedSidxMappings(masterXml, srcUrl, clientOffset, oldSidxMapping) {\\n  // Don't pass current sidx mapping\\n  var master = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_15__[\\\"parse\\\"])(masterXml, {\\n    manifestUri: srcUrl,\\n    clientOffset: clientOffset\\n  });\\n  var videoSidx = compareSidxEntry(master.playlists, oldSidxMapping);\\n  var mediaGroupSidx = videoSidx;\\n  forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\\n    if (properties.playlists && properties.playlists.length) {\\n      var playlists = properties.playlists;\\n      mediaGroupSidx = mergeOptions$2(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\\n    }\\n  });\\n  return mediaGroupSidx;\\n}; // exported for testing\\n\\n\\nvar requestSidx_ = function requestSidx_(sidxRange, playlist, xhr, options, finishProcessingFn) {\\n  var sidxInfo = {\\n    // resolve the segment URL relative to the playlist\\n    uri: resolveManifestRedirect(options.handleManifestRedirects, sidxRange.resolvedUri),\\n    // resolvedUri: sidxRange.resolvedUri,\\n    byterange: sidxRange.byterange,\\n    // the segment's playlist\\n    playlist: playlist\\n  };\\n  var sidxRequestOptions = videojs$1.mergeOptions(sidxInfo, {\\n    responseType: 'arraybuffer',\\n    headers: segmentXhrHeaders(sidxInfo)\\n  });\\n  return xhr(sidxRequestOptions, finishProcessingFn);\\n};\\n\\nvar DashPlaylistLoader = function (_EventTarget) {\\n  inherits(DashPlaylistLoader, _EventTarget); // DashPlaylistLoader must accept either a src url or a playlist because subsequent\\n  // playlist loader setups from media groups will expect to be able to pass a playlist\\n  // (since there aren't external URLs to media playlists with DASH)\\n\\n  function DashPlaylistLoader(srcUrlOrPlaylist, hls) {\\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\\n    var masterPlaylistLoader = arguments[3];\\n    classCallCheck(this, DashPlaylistLoader);\\n\\n    var _this = possibleConstructorReturn(this, (DashPlaylistLoader.__proto__ || Object.getPrototypeOf(DashPlaylistLoader)).call(this));\\n\\n    var _options$withCredenti = options.withCredentials,\\n        withCredentials = _options$withCredenti === undefined ? false : _options$withCredenti,\\n        _options$handleManife = options.handleManifestRedirects,\\n        handleManifestRedirects = _options$handleManife === undefined ? false : _options$handleManife;\\n    _this.hls_ = hls;\\n    _this.withCredentials = withCredentials;\\n    _this.handleManifestRedirects = handleManifestRedirects;\\n\\n    if (!srcUrlOrPlaylist) {\\n      throw new Error('A non-empty playlist URL or playlist is required');\\n    } // event naming?\\n\\n\\n    _this.on('minimumUpdatePeriod', function () {\\n      _this.refreshXml_();\\n    }); // live playlist staleness timeout\\n\\n\\n    _this.on('mediaupdatetimeout', function () {\\n      _this.refreshMedia_(_this.media().id);\\n    });\\n\\n    _this.state = 'HAVE_NOTHING';\\n    _this.loadedPlaylists_ = {}; // initialize the loader state\\n    // The masterPlaylistLoader will be created with a string\\n\\n    if (typeof srcUrlOrPlaylist === 'string') {\\n      _this.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\\n      // once multi-period is refactored\\n\\n      _this.sidxMapping_ = {};\\n      return possibleConstructorReturn(_this);\\n    }\\n\\n    _this.setupChildLoader(masterPlaylistLoader, srcUrlOrPlaylist);\\n\\n    return _this;\\n  }\\n\\n  createClass(DashPlaylistLoader, [{\\n    key: 'setupChildLoader',\\n    value: function setupChildLoader(masterPlaylistLoader, playlist) {\\n      this.masterPlaylistLoader_ = masterPlaylistLoader;\\n      this.childPlaylist_ = playlist;\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.stopRequest();\\n      this.loadedPlaylists_ = {};\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaRequest_);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      this.off();\\n    }\\n  }, {\\n    key: 'hasPendingRequest',\\n    value: function hasPendingRequest() {\\n      return this.request || this.mediaRequest_;\\n    }\\n  }, {\\n    key: 'stopRequest',\\n    value: function stopRequest() {\\n      if (this.request) {\\n        var oldRequest = this.request;\\n        this.request = null;\\n        oldRequest.onreadystatechange = null;\\n        oldRequest.abort();\\n      }\\n    }\\n  }, {\\n    key: 'sidxRequestFinished_',\\n    value: function sidxRequestFinished_(playlist, master, startingState, doneFn) {\\n      var _this2 = this;\\n\\n      return function (err, request) {\\n        // disposed\\n        if (!_this2.request) {\\n          return;\\n        } // pending request is cleared\\n\\n\\n        _this2.request = null;\\n\\n        if (err) {\\n          _this2.error = {\\n            status: request.status,\\n            message: 'DASH playlist request error at URL: ' + playlist.uri,\\n            response: request.response,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (startingState) {\\n            _this2.state = startingState;\\n          }\\n\\n          _this2.trigger('error');\\n\\n          return doneFn(master, null);\\n        }\\n\\n        var bytes = new Uint8Array(request.response);\\n        var sidx = mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16___default.a.parseSidx(bytes.subarray(8));\\n        return doneFn(master, sidx);\\n      };\\n    }\\n  }, {\\n    key: 'media',\\n    value: function media(playlist) {\\n      var _this3 = this; // getter\\n\\n\\n      if (!playlist) {\\n        return this.media_;\\n      } // setter\\n\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        throw new Error('Cannot switch media playlist from ' + this.state);\\n      }\\n\\n      var startingState = this.state; // find the playlist object if the target playlist has been specified by URI\\n\\n      if (typeof playlist === 'string') {\\n        if (!this.master.playlists[playlist]) {\\n          throw new Error('Unknown playlist URI: ' + playlist);\\n        }\\n\\n        playlist = this.master.playlists[playlist];\\n      }\\n\\n      var mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to previously loaded playlists immediately\\n\\n      if (mediaChange && this.loadedPlaylists_[playlist.id] && this.loadedPlaylists_[playlist.id].endList) {\\n        this.state = 'HAVE_METADATA';\\n        this.media_ = playlist; // trigger media change if the active media has been updated\\n\\n        if (mediaChange) {\\n          this.trigger('mediachanging');\\n          this.trigger('mediachange');\\n        }\\n\\n        return;\\n      } // switching to the active playlist is a no-op\\n\\n\\n      if (!mediaChange) {\\n        return;\\n      } // switching from an already loaded playlist\\n\\n\\n      if (this.media_) {\\n        this.trigger('mediachanging');\\n      }\\n\\n      if (!playlist.sidx) {\\n        // Continue asynchronously if there is no sidx\\n        // wait one tick to allow haveMaster to run first on a child loader\\n        this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.haveMetadata.bind(this, {\\n          startingState: startingState,\\n          playlist: playlist\\n        }), 0); // exit early and don't do sidx work\\n\\n        return;\\n      } // we have sidx mappings\\n\\n\\n      var oldMaster = void 0;\\n      var sidxMapping = void 0; // sidxMapping is used when parsing the masterXml, so store\\n      // it on the masterPlaylistLoader\\n\\n      if (this.masterPlaylistLoader_) {\\n        oldMaster = this.masterPlaylistLoader_.master;\\n        sidxMapping = this.masterPlaylistLoader_.sidxMapping_;\\n      } else {\\n        oldMaster = this.master;\\n        sidxMapping = this.sidxMapping_;\\n      }\\n\\n      var sidxKey = generateSidxKey(playlist.sidx);\\n      sidxMapping[sidxKey] = {\\n        sidxInfo: playlist.sidx\\n      };\\n      this.request = requestSidx_(playlist.sidx, playlist, this.hls_.xhr, {\\n        handleManifestRedirects: this.handleManifestRedirects\\n      }, this.sidxRequestFinished_(playlist, oldMaster, startingState, function (newMaster, sidx) {\\n        if (!newMaster || !sidx) {\\n          throw new Error('failed to request sidx');\\n        } // update loader's sidxMapping with parsed sidx box\\n\\n\\n        sidxMapping[sidxKey].sidx = sidx; // everything is ready just continue to haveMetadata\\n\\n        _this3.haveMetadata({\\n          startingState: startingState,\\n          playlist: newMaster.playlists[playlist.id]\\n        });\\n      }));\\n    }\\n  }, {\\n    key: 'haveMetadata',\\n    value: function haveMetadata(_ref) {\\n      var startingState = _ref.startingState,\\n          playlist = _ref.playlist;\\n      this.state = 'HAVE_METADATA';\\n      this.loadedPlaylists_[playlist.id] = playlist;\\n      this.mediaRequest_ = null; // This will trigger loadedplaylist\\n\\n      this.refreshMedia_(playlist.id); // fire loadedmetadata the first time a media playlist is loaded\\n      // to resolve setup of media groups\\n\\n      if (startingState === 'HAVE_MASTER') {\\n        this.trigger('loadedmetadata');\\n      } else {\\n        // trigger media change if the active media has been updated\\n        this.trigger('mediachange');\\n      }\\n    }\\n  }, {\\n    key: 'pause',\\n    value: function pause() {\\n      this.stopRequest();\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        // If we pause the loader before any data has been retrieved, its as if we never\\n        // started, so reset to an unstarted state.\\n        this.started = false;\\n      }\\n    }\\n  }, {\\n    key: 'load',\\n    value: function load(isFinalRendition) {\\n      var _this4 = this;\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\\n      var media = this.media();\\n\\n      if (isFinalRendition) {\\n        var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          return _this4.load();\\n        }, delay);\\n        return;\\n      } // because the playlists are internal to the manifest, load should either load the\\n      // main manifest, or do nothing but trigger an event\\n\\n\\n      if (!this.started) {\\n        this.start();\\n        return;\\n      }\\n\\n      if (media && !media.endList) {\\n        this.trigger('mediaupdatetimeout');\\n      } else {\\n        this.trigger('loadedplaylist');\\n      }\\n    }\\n    /**\\n     * Parses the master xml string and updates playlist uri references\\n     *\\n     * @return {Object}\\n     *         The parsed mpd manifest object\\n     */\\n\\n  }, {\\n    key: 'parseMasterXml',\\n    value: function parseMasterXml() {\\n      var master = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_15__[\\\"parse\\\"])(this.masterXml_, {\\n        manifestUri: this.srcUrl,\\n        clientOffset: this.clientOffset_,\\n        sidxMapping: this.sidxMapping_\\n      });\\n      master.uri = this.srcUrl; // Set up phony URIs for the playlists since we won't have external URIs for DASH\\n      // but reference playlists by their URI throughout the project\\n      // TODO: Should we create the dummy uris in mpd-parser as well (leaning towards yes).\\n\\n      for (var i = 0; i < master.playlists.length; i++) {\\n        var phonyUri = 'placeholder-uri-' + i;\\n        master.playlists[i].uri = phonyUri;\\n      } // set up phony URIs for the media group playlists since we won't have external\\n      // URIs for DASH but reference playlists by their URI throughout the project\\n\\n\\n      forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\\n        if (properties.playlists && properties.playlists.length) {\\n          var _phonyUri = 'placeholder-uri-' + mediaType + '-' + groupKey + '-' + labelKey;\\n\\n          var id = createPlaylistID(0, _phonyUri);\\n          properties.playlists[0].uri = _phonyUri;\\n          properties.playlists[0].id = id; // setup ID and URI references (URI for backwards compatibility)\\n\\n          master.playlists[id] = properties.playlists[0];\\n          master.playlists[_phonyUri] = properties.playlists[0];\\n        }\\n      });\\n      setupMediaPlaylists(master);\\n      resolveMediaGroupUris(master);\\n      return master;\\n    }\\n  }, {\\n    key: 'start',\\n    value: function start() {\\n      var _this5 = this;\\n\\n      this.started = true; // We don't need to request the master manifest again\\n      // Call this asynchronously to match the xhr request behavior below\\n\\n      if (this.masterPlaylistLoader_) {\\n        this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.haveMaster_.bind(this), 0);\\n        return;\\n      } // request the specified URL\\n\\n\\n      this.request = this.hls_.xhr({\\n        uri: this.srcUrl,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this5.request) {\\n          return;\\n        } // clear the loader's request reference\\n\\n\\n        _this5.request = null;\\n\\n        if (error) {\\n          _this5.error = {\\n            status: req.status,\\n            message: 'DASH playlist request error at URL: ' + _this5.srcUrl,\\n            responseText: req.responseText,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (_this5.state === 'HAVE_NOTHING') {\\n            _this5.started = false;\\n          }\\n\\n          return _this5.trigger('error');\\n        }\\n\\n        _this5.masterXml_ = req.responseText;\\n\\n        if (req.responseHeaders && req.responseHeaders.date) {\\n          _this5.masterLoaded_ = Date.parse(req.responseHeaders.date);\\n        } else {\\n          _this5.masterLoaded_ = Date.now();\\n        }\\n\\n        _this5.srcUrl = resolveManifestRedirect(_this5.handleManifestRedirects, _this5.srcUrl, req);\\n\\n        _this5.syncClientServerClock_(_this5.onClientServerClockSync_.bind(_this5));\\n      });\\n    }\\n    /**\\n     * Parses the master xml for UTCTiming node to sync the client clock to the server\\n     * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\\n     *\\n     * @param {Function} done\\n     *        Function to call when clock sync has completed\\n     */\\n\\n  }, {\\n    key: 'syncClientServerClock_',\\n    value: function syncClientServerClock_(done) {\\n      var _this6 = this;\\n\\n      var utcTiming = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_15__[\\\"parseUTCTiming\\\"])(this.masterXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\\n      // server clock\\n\\n      if (utcTiming === null) {\\n        this.clientOffset_ = this.masterLoaded_ - Date.now();\\n        return done();\\n      }\\n\\n      if (utcTiming.method === 'DIRECT') {\\n        this.clientOffset_ = utcTiming.value - Date.now();\\n        return done();\\n      }\\n\\n      this.request = this.hls_.xhr({\\n        uri: resolveUrl(this.srcUrl, utcTiming.value),\\n        method: utcTiming.method,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this6.request) {\\n          return;\\n        }\\n\\n        if (error) {\\n          // sync request failed, fall back to using date header from mpd\\n          // TODO: log warning\\n          _this6.clientOffset_ = _this6.masterLoaded_ - Date.now();\\n          return done();\\n        }\\n\\n        var serverTime = void 0;\\n\\n        if (utcTiming.method === 'HEAD') {\\n          if (!req.responseHeaders || !req.responseHeaders.date) {\\n            // expected date header not preset, fall back to using date header from mpd\\n            // TODO: log warning\\n            serverTime = _this6.masterLoaded_;\\n          } else {\\n            serverTime = Date.parse(req.responseHeaders.date);\\n          }\\n        } else {\\n          serverTime = Date.parse(req.responseText);\\n        }\\n\\n        _this6.clientOffset_ = serverTime - Date.now();\\n        done();\\n      });\\n    }\\n  }, {\\n    key: 'haveMaster_',\\n    value: function haveMaster_() {\\n      this.state = 'HAVE_MASTER'; // clear media request\\n\\n      this.mediaRequest_ = null;\\n\\n      if (!this.masterPlaylistLoader_) {\\n        this.master = this.parseMasterXml(); // We have the master playlist at this point, so\\n        // trigger this to allow MasterPlaylistController\\n        // to make an initial playlist selection\\n\\n        this.trigger('loadedplaylist');\\n      } else if (!this.media_) {\\n        // no media playlist was specifically selected so select\\n        // the one the child playlist loader was created with\\n        this.media(this.childPlaylist_);\\n      }\\n    }\\n    /**\\n     * Handler for after client/server clock synchronization has happened. Sets up\\n     * xml refresh timer if specificed by the manifest.\\n     */\\n\\n  }, {\\n    key: 'onClientServerClockSync_',\\n    value: function onClientServerClockSync_() {\\n      var _this7 = this;\\n\\n      this.haveMaster_();\\n\\n      if (!this.hasPendingRequest() && !this.media_) {\\n        this.media(this.master.playlists[0]);\\n      } // TODO: minimumUpdatePeriod can have a value of 0. Currently the manifest will not\\n      // be refreshed when this is the case. The inter-op guide says that when the\\n      // minimumUpdatePeriod is 0, the manifest should outline all currently available\\n      // segments, but future segments may require an update. I think a good solution\\n      // would be to update the manifest at the same rate that the media playlists\\n      // are \\\"refreshed\\\", i.e. every targetDuration.\\n\\n\\n      if (this.master && this.master.minimumUpdatePeriod) {\\n        this.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this7.trigger('minimumUpdatePeriod');\\n        }, this.master.minimumUpdatePeriod);\\n      }\\n    }\\n    /**\\n     * Sends request to refresh the master xml and updates the parsed master manifest\\n     * TODO: Does the client offset need to be recalculated when the xml is refreshed?\\n     */\\n\\n  }, {\\n    key: 'refreshXml_',\\n    value: function refreshXml_() {\\n      var _this8 = this; // The srcUrl here *may* need to pass through handleManifestsRedirects when\\n      // sidx is implemented\\n\\n\\n      this.request = this.hls_.xhr({\\n        uri: this.srcUrl,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this8.request) {\\n          return;\\n        } // clear the loader's request reference\\n\\n\\n        _this8.request = null;\\n\\n        if (error) {\\n          _this8.error = {\\n            status: req.status,\\n            message: 'DASH playlist request error at URL: ' + _this8.srcUrl,\\n            responseText: req.responseText,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (_this8.state === 'HAVE_NOTHING') {\\n            _this8.started = false;\\n          }\\n\\n          return _this8.trigger('error');\\n        }\\n\\n        _this8.masterXml_ = req.responseText; // This will filter out updated sidx info from the mapping\\n\\n        _this8.sidxMapping_ = filterChangedSidxMappings(_this8.masterXml_, _this8.srcUrl, _this8.clientOffset_, _this8.sidxMapping_);\\n\\n        var master = _this8.parseMasterXml();\\n\\n        var updatedMaster = updateMaster$1(_this8.master, master);\\n\\n        var currentSidxInfo = _this8.media().sidx;\\n\\n        if (updatedMaster) {\\n          if (currentSidxInfo) {\\n            var sidxKey = generateSidxKey(currentSidxInfo); // the sidx was updated, so the previous mapping was removed\\n\\n            if (!_this8.sidxMapping_[sidxKey]) {\\n              var playlist = _this8.media();\\n\\n              _this8.request = requestSidx_(playlist.sidx, playlist, _this8.hls_.xhr, {\\n                handleManifestRedirects: _this8.handleManifestRedirects\\n              }, _this8.sidxRequestFinished_(playlist, master, _this8.state, function (newMaster, sidx) {\\n                if (!newMaster || !sidx) {\\n                  throw new Error('failed to request sidx on minimumUpdatePeriod');\\n                } // update loader's sidxMapping with parsed sidx box\\n\\n\\n                _this8.sidxMapping_[sidxKey].sidx = sidx;\\n                _this8.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n                  _this8.trigger('minimumUpdatePeriod');\\n                }, _this8.master.minimumUpdatePeriod); // TODO: do we need to reload the current playlist?\\n\\n                _this8.refreshMedia_(_this8.media().id);\\n\\n                return;\\n              }));\\n            }\\n          } else {\\n            _this8.master = updatedMaster;\\n          }\\n        }\\n\\n        _this8.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this8.trigger('minimumUpdatePeriod');\\n        }, _this8.master.minimumUpdatePeriod);\\n      });\\n    }\\n    /**\\n     * Refreshes the media playlist by re-parsing the master xml and updating playlist\\n     * references. If this is an alternate loader, the updated parsed manifest is retrieved\\n     * from the master loader.\\n     */\\n\\n  }, {\\n    key: 'refreshMedia_',\\n    value: function refreshMedia_(mediaID) {\\n      var _this9 = this;\\n\\n      if (!mediaID) {\\n        throw new Error('refreshMedia_ must take a media id');\\n      }\\n\\n      var oldMaster = void 0;\\n      var newMaster = void 0;\\n\\n      if (this.masterPlaylistLoader_) {\\n        oldMaster = this.masterPlaylistLoader_.master;\\n        newMaster = this.masterPlaylistLoader_.parseMasterXml();\\n      } else {\\n        oldMaster = this.master;\\n        newMaster = this.parseMasterXml();\\n      }\\n\\n      var updatedMaster = updateMaster$1(oldMaster, newMaster);\\n\\n      if (updatedMaster) {\\n        if (this.masterPlaylistLoader_) {\\n          this.masterPlaylistLoader_.master = updatedMaster;\\n        } else {\\n          this.master = updatedMaster;\\n        }\\n\\n        this.media_ = updatedMaster.playlists[mediaID];\\n      } else {\\n        this.media_ = newMaster.playlists[mediaID];\\n        this.trigger('playlistunchanged');\\n      }\\n\\n      if (!this.media().endList) {\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this9.trigger('mediaupdatetimeout');\\n        }, refreshDelay(this.media(), !!updatedMaster));\\n      }\\n\\n      this.trigger('loadedplaylist');\\n    }\\n  }]);\\n  return DashPlaylistLoader;\\n}(EventTarget$1$1);\\n\\nvar logger = function logger(source) {\\n  if (videojs$1.log.debug) {\\n    return videojs$1.log.debug.bind(videojs$1, 'VHS:', source + ' >');\\n  }\\n\\n  return function () {};\\n};\\n\\nfunction noop() {}\\n/**\\n * @file source-updater.js\\n */\\n\\n/**\\n * A queue of callbacks to be serialized and applied when a\\n * MediaSource and its associated SourceBuffers are not in the\\n * updating state. It is used by the segment loader to update the\\n * underlying SourceBuffers when new data is loaded, for instance.\\n *\\n * @class SourceUpdater\\n * @param {MediaSource} mediaSource the MediaSource to create the\\n * SourceBuffer from\\n * @param {String} mimeType the desired MIME type of the underlying\\n * SourceBuffer\\n * @param {Object} sourceBufferEmitter an event emitter that fires when a source buffer is\\n * added to the media source\\n */\\n\\n\\nvar SourceUpdater = function () {\\n  function SourceUpdater(mediaSource, mimeType, type, sourceBufferEmitter) {\\n    classCallCheck(this, SourceUpdater);\\n    this.callbacks_ = [];\\n    this.pendingCallback_ = null;\\n    this.timestampOffset_ = 0;\\n    this.mediaSource = mediaSource;\\n    this.processedAppend_ = false;\\n    this.type_ = type;\\n    this.mimeType_ = mimeType;\\n    this.logger_ = logger('SourceUpdater[' + type + '][' + mimeType + ']');\\n\\n    if (mediaSource.readyState === 'closed') {\\n      mediaSource.addEventListener('sourceopen', this.createSourceBuffer_.bind(this, mimeType, sourceBufferEmitter));\\n    } else {\\n      this.createSourceBuffer_(mimeType, sourceBufferEmitter);\\n    }\\n  }\\n\\n  createClass(SourceUpdater, [{\\n    key: 'createSourceBuffer_',\\n    value: function createSourceBuffer_(mimeType, sourceBufferEmitter) {\\n      var _this = this;\\n\\n      this.sourceBuffer_ = this.mediaSource.addSourceBuffer(mimeType);\\n      this.logger_('created SourceBuffer');\\n\\n      if (sourceBufferEmitter) {\\n        sourceBufferEmitter.trigger('sourcebufferadded');\\n\\n        if (this.mediaSource.sourceBuffers.length < 2) {\\n          // There's another source buffer we must wait for before we can start updating\\n          // our own (or else we can get into a bad state, i.e., appending video/audio data\\n          // before the other video/audio source buffer is available and leading to a video\\n          // or audio only buffer).\\n          sourceBufferEmitter.on('sourcebufferadded', function () {\\n            _this.start_();\\n          });\\n          return;\\n        }\\n      }\\n\\n      this.start_();\\n    }\\n  }, {\\n    key: 'start_',\\n    value: function start_() {\\n      var _this2 = this;\\n\\n      this.started_ = true; // run completion handlers and process callbacks as updateend\\n      // events fire\\n\\n      this.onUpdateendCallback_ = function () {\\n        var pendingCallback = _this2.pendingCallback_;\\n        _this2.pendingCallback_ = null;\\n        _this2.sourceBuffer_.removing = false;\\n\\n        _this2.logger_('buffered [' + printableRange(_this2.buffered()) + ']');\\n\\n        if (pendingCallback) {\\n          pendingCallback();\\n        }\\n\\n        _this2.runCallback_();\\n      };\\n\\n      this.sourceBuffer_.addEventListener('updateend', this.onUpdateendCallback_);\\n      this.runCallback_();\\n    }\\n    /**\\n     * Aborts the current segment and resets the segment parser.\\n     *\\n     * @param {Function} done function to call when done\\n     * @see http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void\\n     */\\n\\n  }, {\\n    key: 'abort',\\n    value: function abort(done) {\\n      var _this3 = this;\\n\\n      if (this.processedAppend_) {\\n        this.queueCallback_(function () {\\n          _this3.sourceBuffer_.abort();\\n        }, done);\\n      }\\n    }\\n    /**\\n     * Queue an update to append an ArrayBuffer.\\n     *\\n     * @param {ArrayBuffer} bytes\\n     * @param {Function} done the function to call when done\\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\\n     */\\n\\n  }, {\\n    key: 'appendBuffer',\\n    value: function appendBuffer(config, done) {\\n      var _this4 = this;\\n\\n      this.processedAppend_ = true;\\n      this.queueCallback_(function () {\\n        if (config.videoSegmentTimingInfoCallback) {\\n          _this4.sourceBuffer_.addEventListener('videoSegmentTimingInfo', config.videoSegmentTimingInfoCallback);\\n        }\\n\\n        _this4.sourceBuffer_.appendBuffer(config.bytes);\\n      }, function () {\\n        if (config.videoSegmentTimingInfoCallback) {\\n          _this4.sourceBuffer_.removeEventListener('videoSegmentTimingInfo', config.videoSegmentTimingInfoCallback);\\n        }\\n\\n        done();\\n      });\\n    }\\n    /**\\n     * Indicates what TimeRanges are buffered in the managed SourceBuffer.\\n     *\\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-buffered\\n     */\\n\\n  }, {\\n    key: 'buffered',\\n    value: function buffered() {\\n      if (!this.sourceBuffer_) {\\n        return videojs$1.createTimeRanges();\\n      }\\n\\n      return this.sourceBuffer_.buffered;\\n    }\\n    /**\\n     * Queue an update to remove a time range from the buffer.\\n     *\\n     * @param {Number} start where to start the removal\\n     * @param {Number} end where to end the removal\\n     * @param {Function} [done=noop] optional callback to be executed when the remove\\n     * operation is complete\\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end) {\\n      var _this5 = this;\\n\\n      var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\\n\\n      if (this.processedAppend_) {\\n        this.queueCallback_(function () {\\n          _this5.logger_('remove [' + start + ' => ' + end + ']');\\n\\n          _this5.sourceBuffer_.removing = true;\\n\\n          _this5.sourceBuffer_.remove(start, end);\\n        }, done);\\n      }\\n    }\\n    /**\\n     * Whether the underlying sourceBuffer is updating or not\\n     *\\n     * @return {Boolean} the updating status of the SourceBuffer\\n     */\\n\\n  }, {\\n    key: 'updating',\\n    value: function updating() {\\n      // we are updating if the sourcebuffer is updating or\\n      return !this.sourceBuffer_ || this.sourceBuffer_.updating || // if we have a pending callback that is not our internal noop\\n      !!this.pendingCallback_ && this.pendingCallback_ !== noop;\\n    }\\n    /**\\n     * Set/get the timestampoffset on the SourceBuffer\\n     *\\n     * @return {Number} the timestamp offset\\n     */\\n\\n  }, {\\n    key: 'timestampOffset',\\n    value: function timestampOffset(offset) {\\n      var _this6 = this;\\n\\n      if (typeof offset !== 'undefined') {\\n        this.queueCallback_(function () {\\n          _this6.sourceBuffer_.timestampOffset = offset;\\n\\n          _this6.runCallback_();\\n        });\\n        this.timestampOffset_ = offset;\\n      }\\n\\n      return this.timestampOffset_;\\n    }\\n    /**\\n     * Queue a callback to run\\n     */\\n\\n  }, {\\n    key: 'queueCallback_',\\n    value: function queueCallback_(callback, done) {\\n      this.callbacks_.push([callback.bind(this), done]);\\n      this.runCallback_();\\n    }\\n    /**\\n     * Run a queued callback\\n     */\\n\\n  }, {\\n    key: 'runCallback_',\\n    value: function runCallback_() {\\n      var callbacks = void 0;\\n\\n      if (!this.updating() && this.callbacks_.length && this.started_) {\\n        callbacks = this.callbacks_.shift();\\n        this.pendingCallback_ = callbacks[1];\\n        callbacks[0]();\\n      }\\n    }\\n    /**\\n     * dispose of the source updater and the underlying sourceBuffer\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      var _this7 = this;\\n\\n      var disposeFn = function disposeFn() {\\n        if (_this7.sourceBuffer_ && _this7.mediaSource.readyState === 'open') {\\n          _this7.sourceBuffer_.abort();\\n        }\\n\\n        _this7.sourceBuffer_.removeEventListener('updateend', disposeFn);\\n      };\\n\\n      this.sourceBuffer_.removeEventListener('updateend', this.onUpdateendCallback_);\\n\\n      if (this.sourceBuffer_.removing) {\\n        this.sourceBuffer_.addEventListener('updateend', disposeFn);\\n      } else {\\n        disposeFn();\\n      }\\n    }\\n  }]);\\n  return SourceUpdater;\\n}();\\n\\nvar Config = {\\n  GOAL_BUFFER_LENGTH: 30,\\n  MAX_GOAL_BUFFER_LENGTH: 60,\\n  GOAL_BUFFER_LENGTH_RATE: 1,\\n  // 0.5 MB/s\\n  INITIAL_BANDWIDTH: 4194304,\\n  // A fudge factor to apply to advertised playlist bitrates to account for\\n  // temporary flucations in client bandwidth\\n  BANDWIDTH_VARIANCE: 1.2,\\n  // How much of the buffer must be filled before we consider upswitching\\n  BUFFER_LOW_WATER_LINE: 0,\\n  MAX_BUFFER_LOW_WATER_LINE: 30,\\n  BUFFER_LOW_WATER_LINE_RATE: 1\\n};\\nvar REQUEST_ERRORS = {\\n  FAILURE: 2,\\n  TIMEOUT: -101,\\n  ABORTED: -102\\n};\\n/**\\n * Abort all requests\\n *\\n * @param {Object} activeXhrs - an object that tracks all XHR requests\\n */\\n\\nvar abortAll = function abortAll(activeXhrs) {\\n  activeXhrs.forEach(function (xhr) {\\n    xhr.abort();\\n  });\\n};\\n/**\\n * Gather important bandwidth stats once a request has completed\\n *\\n * @param {Object} request - the XHR request from which to gather stats\\n */\\n\\n\\nvar getRequestStats = function getRequestStats(request) {\\n  return {\\n    bandwidth: request.bandwidth,\\n    bytesReceived: request.bytesReceived || 0,\\n    roundTripTime: request.roundTripTime || 0\\n  };\\n};\\n/**\\n * If possible gather bandwidth stats as a request is in\\n * progress\\n *\\n * @param {Event} progressEvent - an event object from an XHR's progress event\\n */\\n\\n\\nvar getProgressStats = function getProgressStats(progressEvent) {\\n  var request = progressEvent.target;\\n  var roundTripTime = Date.now() - request.requestTime;\\n  var stats = {\\n    bandwidth: Infinity,\\n    bytesReceived: 0,\\n    roundTripTime: roundTripTime || 0\\n  };\\n  stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\\n  // because we should only use bandwidth stats on progress to determine when\\n  // abort a request early due to insufficient bandwidth\\n\\n  stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\\n  return stats;\\n};\\n/**\\n * Handle all error conditions in one place and return an object\\n * with all the information\\n *\\n * @param {Error|null} error - if non-null signals an error occured with the XHR\\n * @param {Object} request -  the XHR request that possibly generated the error\\n */\\n\\n\\nvar handleErrors = function handleErrors(error, request) {\\n  if (request.timedout) {\\n    return {\\n      status: request.status,\\n      message: 'HLS request timed-out at URL: ' + request.uri,\\n      code: REQUEST_ERRORS.TIMEOUT,\\n      xhr: request\\n    };\\n  }\\n\\n  if (request.aborted) {\\n    return {\\n      status: request.status,\\n      message: 'HLS request aborted at URL: ' + request.uri,\\n      code: REQUEST_ERRORS.ABORTED,\\n      xhr: request\\n    };\\n  }\\n\\n  if (error) {\\n    return {\\n      status: request.status,\\n      message: 'HLS request errored at URL: ' + request.uri,\\n      code: REQUEST_ERRORS.FAILURE,\\n      xhr: request\\n    };\\n  }\\n\\n  return null;\\n};\\n/**\\n * Handle responses for key data and convert the key data to the correct format\\n * for the decryption step later\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\\n *                                        this request\\n */\\n\\n\\nvar handleKeyResponse = function handleKeyResponse(segment, finishProcessingFn) {\\n  return function (error, request) {\\n    var response = request.response;\\n    var errorObj = handleErrors(error, request);\\n\\n    if (errorObj) {\\n      return finishProcessingFn(errorObj, segment);\\n    }\\n\\n    if (response.byteLength !== 16) {\\n      return finishProcessingFn({\\n        status: request.status,\\n        message: 'Invalid HLS key at URL: ' + request.uri,\\n        code: REQUEST_ERRORS.FAILURE,\\n        xhr: request\\n      }, segment);\\n    }\\n\\n    var view = new DataView(response);\\n    segment.key.bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\\n    return finishProcessingFn(null, segment);\\n  };\\n};\\n/**\\n * Handle init-segment responses\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\\n *                                        this request\\n */\\n\\n\\nvar handleInitSegmentResponse = function handleInitSegmentResponse(segment, captionParser, finishProcessingFn) {\\n  return function (error, request) {\\n    var response = request.response;\\n    var errorObj = handleErrors(error, request);\\n\\n    if (errorObj) {\\n      return finishProcessingFn(errorObj, segment);\\n    } // stop processing if received empty content\\n\\n\\n    if (response.byteLength === 0) {\\n      return finishProcessingFn({\\n        status: request.status,\\n        message: 'Empty HLS segment content at URL: ' + request.uri,\\n        code: REQUEST_ERRORS.FAILURE,\\n        xhr: request\\n      }, segment);\\n    }\\n\\n    segment.map.bytes = new Uint8Array(request.response); // Initialize CaptionParser if it hasn't been yet\\n\\n    if (captionParser && !captionParser.isInitialized()) {\\n      captionParser.init();\\n    }\\n\\n    segment.map.timescales = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.timescale(segment.map.bytes);\\n    segment.map.videoTrackIds = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.videoTrackIds(segment.map.bytes);\\n    return finishProcessingFn(null, segment);\\n  };\\n};\\n/**\\n * Response handler for segment-requests being sure to set the correct\\n * property depending on whether the segment is encryped or not\\n * Also records and keeps track of stats that are used for ABR purposes\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\\n *                                        this request\\n */\\n\\n\\nvar handleSegmentResponse = function handleSegmentResponse(segment, captionParser, finishProcessingFn) {\\n  return function (error, request) {\\n    var response = request.response;\\n    var errorObj = handleErrors(error, request);\\n    var parsed = void 0;\\n\\n    if (errorObj) {\\n      return finishProcessingFn(errorObj, segment);\\n    } // stop processing if received empty content\\n\\n\\n    if (response.byteLength === 0) {\\n      return finishProcessingFn({\\n        status: request.status,\\n        message: 'Empty HLS segment content at URL: ' + request.uri,\\n        code: REQUEST_ERRORS.FAILURE,\\n        xhr: request\\n      }, segment);\\n    }\\n\\n    segment.stats = getRequestStats(request);\\n\\n    if (segment.key) {\\n      segment.encryptedBytes = new Uint8Array(request.response);\\n    } else {\\n      segment.bytes = new Uint8Array(request.response);\\n    } // This is likely an FMP4 and has the init segment.\\n    // Run through the CaptionParser in case there are captions.\\n\\n\\n    if (captionParser && segment.map && segment.map.bytes) {\\n      // Initialize CaptionParser if it hasn't been yet\\n      if (!captionParser.isInitialized()) {\\n        captionParser.init();\\n      }\\n\\n      parsed = captionParser.parse(segment.bytes, segment.map.videoTrackIds, segment.map.timescales);\\n\\n      if (parsed && parsed.captions) {\\n        segment.captionStreams = parsed.captionStreams;\\n        segment.fmp4Captions = parsed.captions;\\n      }\\n    }\\n\\n    return finishProcessingFn(null, segment);\\n  };\\n};\\n/**\\n * Decrypt the segment via the decryption web worker\\n *\\n * @param {WebWorker} decrypter - a WebWorker interface to AES-128 decryption routines\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} doneFn - a callback that is executed after decryption has completed\\n */\\n\\n\\nvar decryptSegment = function decryptSegment(decrypter, segment, doneFn) {\\n  var decryptionHandler = function decryptionHandler(event) {\\n    if (event.data.source === segment.requestId) {\\n      decrypter.removeEventListener('message', decryptionHandler);\\n      var decrypted = event.data.decrypted;\\n      segment.bytes = new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength);\\n      return doneFn(null, segment);\\n    }\\n  };\\n\\n  decrypter.addEventListener('message', decryptionHandler);\\n  var keyBytes = void 0;\\n\\n  if (segment.key.bytes.slice) {\\n    keyBytes = segment.key.bytes.slice();\\n  } else {\\n    keyBytes = new Uint32Array(Array.prototype.slice.call(segment.key.bytes));\\n  } // this is an encrypted segment\\n  // incrementally decrypt the segment\\n\\n\\n  decrypter.postMessage(createTransferableMessage({\\n    source: segment.requestId,\\n    encrypted: segment.encryptedBytes,\\n    key: keyBytes,\\n    iv: segment.key.iv\\n  }), [segment.encryptedBytes.buffer, keyBytes.buffer]);\\n};\\n/**\\n * This function waits for all XHRs to finish (with either success or failure)\\n * before continueing processing via it's callback. The function gathers errors\\n * from each request into a single errors array so that the error status for\\n * each request can be examined later.\\n *\\n * @param {Object} activeXhrs - an object that tracks all XHR requests\\n * @param {WebWorker} decrypter - a WebWorker interface to AES-128 decryption routines\\n * @param {Function} doneFn - a callback that is executed after all resources have been\\n *                            downloaded and any decryption completed\\n */\\n\\n\\nvar waitForCompletion = function waitForCompletion(activeXhrs, decrypter, doneFn) {\\n  var count = 0;\\n  var didError = false;\\n  return function (error, segment) {\\n    if (didError) {\\n      return;\\n    }\\n\\n    if (error) {\\n      didError = true; // If there are errors, we have to abort any outstanding requests\\n\\n      abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\\n      // handle the aborted events from those requests, there are some cases where we may\\n      // never get an aborted event. For instance, if the network connection is lost and\\n      // there were two requests, the first may have triggered an error immediately, while\\n      // the second request remains unsent. In that case, the aborted algorithm will not\\n      // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\\n      //\\n      // We also can't rely on the ready state of the XHR, since the request that\\n      // triggered the connection error may also show as a ready state of 0 (unsent).\\n      // Therefore, we have to finish this group of requests immediately after the first\\n      // seen error.\\n\\n      return doneFn(error, segment);\\n    }\\n\\n    count += 1;\\n\\n    if (count === activeXhrs.length) {\\n      // Keep track of when *all* of the requests have completed\\n      segment.endOfAllRequests = Date.now();\\n\\n      if (segment.encryptedBytes) {\\n        return decryptSegment(decrypter, segment, doneFn);\\n      } // Otherwise, everything is ready just continue\\n\\n\\n      return doneFn(null, segment);\\n    }\\n  };\\n};\\n/**\\n * Simple progress event callback handler that gathers some stats before\\n * executing a provided callback with the `segment` object\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} progressFn - a callback that is executed each time a progress event\\n *                                is received\\n * @param {Event} event - the progress event object from XMLHttpRequest\\n */\\n\\n\\nvar handleProgress = function handleProgress(segment, progressFn) {\\n  return function (event) {\\n    segment.stats = videojs$1.mergeOptions(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\\n\\n    if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\\n      segment.stats.firstBytesReceivedAt = Date.now();\\n    }\\n\\n    return progressFn(event, segment);\\n  };\\n};\\n/**\\n * Load all resources and does any processing necessary for a media-segment\\n *\\n * Features:\\n *   decrypts the media-segment if it has a key uri and an iv\\n *   aborts *all* requests if *any* one request fails\\n *\\n * The segment object, at minimum, has the following format:\\n * {\\n *   resolvedUri: String,\\n *   [byterange]: {\\n *     offset: Number,\\n *     length: Number\\n *   },\\n *   [key]: {\\n *     resolvedUri: String\\n *     [byterange]: {\\n *       offset: Number,\\n *       length: Number\\n *     },\\n *     iv: {\\n *       bytes: Uint32Array\\n *     }\\n *   },\\n *   [map]: {\\n *     resolvedUri: String,\\n *     [byterange]: {\\n *       offset: Number,\\n *       length: Number\\n *     },\\n *     [bytes]: Uint8Array\\n *   }\\n * }\\n * ...where [name] denotes optional properties\\n *\\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\\n *                                       decryption routines\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} progressFn - a callback that receives progress events from the main\\n *                                segment's xhr request\\n * @param {Function} doneFn - a callback that is executed only once all requests have\\n *                            succeeded or failed\\n * @returns {Function} a function that, when invoked, immediately aborts all\\n *                     outstanding requests\\n */\\n\\n\\nvar mediaSegmentRequest = function mediaSegmentRequest(xhr, xhrOptions, decryptionWorker, captionParser, segment, progressFn, doneFn) {\\n  var activeXhrs = [];\\n  var finishProcessingFn = waitForCompletion(activeXhrs, decryptionWorker, doneFn); // optionally, request the decryption key\\n\\n  if (segment.key && !segment.key.bytes) {\\n    var keyRequestOptions = videojs$1.mergeOptions(xhrOptions, {\\n      uri: segment.key.resolvedUri,\\n      responseType: 'arraybuffer'\\n    });\\n    var keyRequestCallback = handleKeyResponse(segment, finishProcessingFn);\\n    var keyXhr = xhr(keyRequestOptions, keyRequestCallback);\\n    activeXhrs.push(keyXhr);\\n  } // optionally, request the associated media init segment\\n\\n\\n  if (segment.map && !segment.map.bytes) {\\n    var initSegmentOptions = videojs$1.mergeOptions(xhrOptions, {\\n      uri: segment.map.resolvedUri,\\n      responseType: 'arraybuffer',\\n      headers: segmentXhrHeaders(segment.map)\\n    });\\n    var initSegmentRequestCallback = handleInitSegmentResponse(segment, captionParser, finishProcessingFn);\\n    var initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\\n    activeXhrs.push(initSegmentXhr);\\n  }\\n\\n  var segmentRequestOptions = videojs$1.mergeOptions(xhrOptions, {\\n    uri: segment.resolvedUri,\\n    responseType: 'arraybuffer',\\n    headers: segmentXhrHeaders(segment)\\n  });\\n  var segmentRequestCallback = handleSegmentResponse(segment, captionParser, finishProcessingFn);\\n  var segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\\n  segmentXhr.addEventListener('progress', handleProgress(segment, progressFn));\\n  activeXhrs.push(segmentXhr);\\n  return function () {\\n    return abortAll(activeXhrs);\\n  };\\n}; // Utilities\\n\\n/**\\n * Returns the CSS value for the specified property on an element\\n * using `getComputedStyle`. Firefox has a long-standing issue where\\n * getComputedStyle() may return null when running in an iframe with\\n * `display: none`.\\n *\\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\\n * @param {HTMLElement} el the htmlelement to work on\\n * @param {string} the proprety to get the style for\\n */\\n\\n\\nvar safeGetComputedStyle = function safeGetComputedStyle(el, property) {\\n  var result = void 0;\\n\\n  if (!el) {\\n    return '';\\n  }\\n\\n  result = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle(el);\\n\\n  if (!result) {\\n    return '';\\n  }\\n\\n  return result[property];\\n};\\n/**\\n * Resuable stable sort function\\n *\\n * @param {Playlists} array\\n * @param {Function} sortFn Different comparators\\n * @function stableSort\\n */\\n\\n\\nvar stableSort = function stableSort(array, sortFn) {\\n  var newArray = array.slice();\\n  array.sort(function (left, right) {\\n    var cmp = sortFn(left, right);\\n\\n    if (cmp === 0) {\\n      return newArray.indexOf(left) - newArray.indexOf(right);\\n    }\\n\\n    return cmp;\\n  });\\n};\\n/**\\n * A comparator function to sort two playlist object by bandwidth.\\n *\\n * @param {Object} left a media playlist object\\n * @param {Object} right a media playlist object\\n * @return {Number} Greater than zero if the bandwidth attribute of\\n * left is greater than the corresponding attribute of right. Less\\n * than zero if the bandwidth of right is greater than left and\\n * exactly zero if the two are equal.\\n */\\n\\n\\nvar comparePlaylistBandwidth = function comparePlaylistBandwidth(left, right) {\\n  var leftBandwidth = void 0;\\n  var rightBandwidth = void 0;\\n\\n  if (left.attributes.BANDWIDTH) {\\n    leftBandwidth = left.attributes.BANDWIDTH;\\n  }\\n\\n  leftBandwidth = leftBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n\\n  if (right.attributes.BANDWIDTH) {\\n    rightBandwidth = right.attributes.BANDWIDTH;\\n  }\\n\\n  rightBandwidth = rightBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n  return leftBandwidth - rightBandwidth;\\n};\\n/**\\n * A comparator function to sort two playlist object by resolution (width).\\n * @param {Object} left a media playlist object\\n * @param {Object} right a media playlist object\\n * @return {Number} Greater than zero if the resolution.width attribute of\\n * left is greater than the corresponding attribute of right. Less\\n * than zero if the resolution.width of right is greater than left and\\n * exactly zero if the two are equal.\\n */\\n\\n\\nvar comparePlaylistResolution = function comparePlaylistResolution(left, right) {\\n  var leftWidth = void 0;\\n  var rightWidth = void 0;\\n\\n  if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\\n    leftWidth = left.attributes.RESOLUTION.width;\\n  }\\n\\n  leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n\\n  if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\\n    rightWidth = right.attributes.RESOLUTION.width;\\n  }\\n\\n  rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\\n  // have the same media dimensions/ resolution\\n\\n  if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\\n    return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\\n  }\\n\\n  return leftWidth - rightWidth;\\n};\\n/**\\n * Chooses the appropriate media playlist based on bandwidth and player size\\n *\\n * @param {Object} master\\n *        Object representation of the master manifest\\n * @param {Number} playerBandwidth\\n *        Current calculated bandwidth of the player\\n * @param {Number} playerWidth\\n *        Current width of the player element (should account for the device pixel ratio)\\n * @param {Number} playerHeight\\n *        Current height of the player element (should account for the device pixel ratio)\\n * @param {Boolean} limitRenditionByPlayerDimensions\\n *        True if the player width and height should be used during the selection, false otherwise\\n * @return {Playlist} the highest bitrate playlist less than the\\n * currently detected bandwidth, accounting for some amount of\\n * bandwidth variance\\n */\\n\\n\\nvar simpleSelector = function simpleSelector(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions) {\\n  // convert the playlists to an intermediary representation to make comparisons easier\\n  var sortedPlaylistReps = master.playlists.map(function (playlist) {\\n    var width = void 0;\\n    var height = void 0;\\n    var bandwidth = void 0;\\n    width = playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\\n    height = playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\\n    bandwidth = playlist.attributes.BANDWIDTH;\\n    bandwidth = bandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n    return {\\n      bandwidth: bandwidth,\\n      width: width,\\n      height: height,\\n      playlist: playlist\\n    };\\n  });\\n  stableSort(sortedPlaylistReps, function (left, right) {\\n    return left.bandwidth - right.bandwidth;\\n  }); // filter out any playlists that have been excluded due to\\n  // incompatible configurations\\n\\n  sortedPlaylistReps = sortedPlaylistReps.filter(function (rep) {\\n    return !Playlist.isIncompatible(rep.playlist);\\n  }); // filter out any playlists that have been disabled manually through the representations\\n  // api or blacklisted temporarily due to playback errors.\\n\\n  var enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\\n    return Playlist.isEnabled(rep.playlist);\\n  });\\n\\n  if (!enabledPlaylistReps.length) {\\n    // if there are no enabled playlists, then they have all been blacklisted or disabled\\n    // by the user through the representations api. In this case, ignore blacklisting and\\n    // fallback to what the user wants by using playlists the user has not disabled.\\n    enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\\n      return !Playlist.isDisabled(rep.playlist);\\n    });\\n  } // filter out any variant that has greater effective bitrate\\n  // than the current estimated bandwidth\\n\\n\\n  var bandwidthPlaylistReps = enabledPlaylistReps.filter(function (rep) {\\n    return rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth;\\n  });\\n  var highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\\n  // and then taking the very first element\\n\\n  var bandwidthBestRep = bandwidthPlaylistReps.filter(function (rep) {\\n    return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\\n  })[0]; // if we're not going to limit renditions by player size, make an early decision.\\n\\n  if (limitRenditionByPlayerDimensions === false) {\\n    var _chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\\n\\n    return _chosenRep ? _chosenRep.playlist : null;\\n  } // filter out playlists without resolution information\\n\\n\\n  var haveResolution = bandwidthPlaylistReps.filter(function (rep) {\\n    return rep.width && rep.height;\\n  }); // sort variants by resolution\\n\\n  stableSort(haveResolution, function (left, right) {\\n    return left.width - right.width;\\n  }); // if we have the exact resolution as the player use it\\n\\n  var resolutionBestRepList = haveResolution.filter(function (rep) {\\n    return rep.width === playerWidth && rep.height === playerHeight;\\n  });\\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\\n\\n  var resolutionBestRep = resolutionBestRepList.filter(function (rep) {\\n    return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\\n  })[0];\\n  var resolutionPlusOneList = void 0;\\n  var resolutionPlusOneSmallest = void 0;\\n  var resolutionPlusOneRep = void 0; // find the smallest variant that is larger than the player\\n  // if there is no match of exact resolution\\n\\n  if (!resolutionBestRep) {\\n    resolutionPlusOneList = haveResolution.filter(function (rep) {\\n      return rep.width > playerWidth || rep.height > playerHeight;\\n    }); // find all the variants have the same smallest resolution\\n\\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(function (rep) {\\n      return rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height;\\n    }); // ensure that we also pick the highest bandwidth variant that\\n    // is just-larger-than the video player\\n\\n    highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\\n    resolutionPlusOneRep = resolutionPlusOneSmallest.filter(function (rep) {\\n      return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\\n    })[0];\\n  } // fallback chain of variants\\n\\n\\n  var chosenRep = resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\\n  return chosenRep ? chosenRep.playlist : null;\\n}; // Playlist Selectors\\n\\n/**\\n * Chooses the appropriate media playlist based on the most recent\\n * bandwidth estimate and the player size.\\n *\\n * Expects to be called within the context of an instance of HlsHandler\\n *\\n * @return {Playlist} the highest bitrate playlist less than the\\n * currently detected bandwidth, accounting for some amount of\\n * bandwidth variance\\n */\\n\\n\\nvar lastBandwidthSelector = function lastBandwidthSelector() {\\n  var pixelRatio = this.useDevicePixelRatio ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.devicePixelRatio || 1 : 1;\\n  return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions);\\n};\\n/**\\n * Chooses the appropriate media playlist based on the potential to rebuffer\\n *\\n * @param {Object} settings\\n *        Object of information required to use this selector\\n * @param {Object} settings.master\\n *        Object representation of the master manifest\\n * @param {Number} settings.currentTime\\n *        The current time of the player\\n * @param {Number} settings.bandwidth\\n *        Current measured bandwidth\\n * @param {Number} settings.duration\\n *        Duration of the media\\n * @param {Number} settings.segmentDuration\\n *        Segment duration to be used in round trip time calculations\\n * @param {Number} settings.timeUntilRebuffer\\n *        Time left in seconds until the player has to rebuffer\\n * @param {Number} settings.currentTimeline\\n *        The current timeline segments are being loaded from\\n * @param {SyncController} settings.syncController\\n *        SyncController for determining if we have a sync point for a given playlist\\n * @return {Object|null}\\n *         {Object} return.playlist\\n *         The highest bandwidth playlist with the least amount of rebuffering\\n *         {Number} return.rebufferingImpact\\n *         The amount of time in seconds switching to this playlist will rebuffer. A\\n *         negative value means that switching will cause zero rebuffering.\\n */\\n\\n\\nvar minRebufferMaxBandwidthSelector = function minRebufferMaxBandwidthSelector(settings) {\\n  var master = settings.master,\\n      currentTime = settings.currentTime,\\n      bandwidth = settings.bandwidth,\\n      duration$$1 = settings.duration,\\n      segmentDuration = settings.segmentDuration,\\n      timeUntilRebuffer = settings.timeUntilRebuffer,\\n      currentTimeline = settings.currentTimeline,\\n      syncController = settings.syncController; // filter out any playlists that have been excluded due to\\n  // incompatible configurations\\n\\n  var compatiblePlaylists = master.playlists.filter(function (playlist) {\\n    return !Playlist.isIncompatible(playlist);\\n  }); // filter out any playlists that have been disabled manually through the representations\\n  // api or blacklisted temporarily due to playback errors.\\n\\n  var enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\\n\\n  if (!enabledPlaylists.length) {\\n    // if there are no enabled playlists, then they have all been blacklisted or disabled\\n    // by the user through the representations api. In this case, ignore blacklisting and\\n    // fallback to what the user wants by using playlists the user has not disabled.\\n    enabledPlaylists = compatiblePlaylists.filter(function (playlist) {\\n      return !Playlist.isDisabled(playlist);\\n    });\\n  }\\n\\n  var bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\\n  var rebufferingEstimates = bandwidthPlaylists.map(function (playlist) {\\n    var syncPoint = syncController.getSyncPoint(playlist, duration$$1, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\\n    // sync request first. This will double the request time\\n\\n    var numRequests = syncPoint ? 1 : 2;\\n    var requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\\n    var rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\\n    return {\\n      playlist: playlist,\\n      rebufferingImpact: rebufferingImpact\\n    };\\n  });\\n  var noRebufferingPlaylists = rebufferingEstimates.filter(function (estimate) {\\n    return estimate.rebufferingImpact <= 0;\\n  }); // Sort by bandwidth DESC\\n\\n  stableSort(noRebufferingPlaylists, function (a, b) {\\n    return comparePlaylistBandwidth(b.playlist, a.playlist);\\n  });\\n\\n  if (noRebufferingPlaylists.length) {\\n    return noRebufferingPlaylists[0];\\n  }\\n\\n  stableSort(rebufferingEstimates, function (a, b) {\\n    return a.rebufferingImpact - b.rebufferingImpact;\\n  });\\n  return rebufferingEstimates[0] || null;\\n};\\n/**\\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\\n * one with video.  If no renditions with video exist, return the lowest audio rendition.\\n *\\n * Expects to be called within the context of an instance of HlsHandler\\n *\\n * @return {Object|null}\\n *         {Object} return.playlist\\n *         The lowest bitrate playlist that contains a video codec.  If no such rendition\\n *         exists pick the lowest audio rendition.\\n */\\n\\n\\nvar lowestBitrateCompatibleVariantSelector = function lowestBitrateCompatibleVariantSelector() {\\n  // filter out any playlists that have been excluded due to\\n  // incompatible configurations or playback errors\\n  var playlists = this.playlists.master.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\\n\\n  stableSort(playlists, function (a, b) {\\n    return comparePlaylistBandwidth(a, b);\\n  }); // Parse and assume that playlists with no video codec have no video\\n  // (this is not necessarily true, although it is generally true).\\n  //\\n  // If an entire manifest has no valid videos everything will get filtered\\n  // out.\\n\\n  var playlistsWithVideo = playlists.filter(function (playlist) {\\n    return parseCodecs(playlist.attributes.CODECS).videoCodec;\\n  });\\n  return playlistsWithVideo[0] || null;\\n};\\n/**\\n * Create captions text tracks on video.js if they do not exist\\n *\\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\\n * @param {Object} tech the video.js tech\\n * @param {Object} captionStreams the caption streams to create\\n * @private\\n */\\n\\n\\nvar createCaptionsTrackIfNotExists = function createCaptionsTrackIfNotExists(inbandTextTracks, tech, captionStreams) {\\n  for (var trackId in captionStreams) {\\n    if (!inbandTextTracks[trackId]) {\\n      tech.trigger({\\n        type: 'usage',\\n        name: 'hls-608'\\n      });\\n      var track = tech.textTracks().getTrackById(trackId);\\n\\n      if (track) {\\n        // Resuse an existing track with a CC# id because this was\\n        // very likely created by videojs-contrib-hls from information\\n        // in the m3u8 for us to use\\n        inbandTextTracks[trackId] = track;\\n      } else {\\n        // Otherwise, create a track with the default `CC#` label and\\n        // without a language\\n        inbandTextTracks[trackId] = tech.addRemoteTextTrack({\\n          kind: 'captions',\\n          id: trackId,\\n          label: trackId\\n        }, false).track;\\n      }\\n    }\\n  }\\n};\\n\\nvar addCaptionData = function addCaptionData(_ref) {\\n  var inbandTextTracks = _ref.inbandTextTracks,\\n      captionArray = _ref.captionArray,\\n      timestampOffset = _ref.timestampOffset;\\n\\n  if (!captionArray) {\\n    return;\\n  }\\n\\n  var Cue = window.WebKitDataCue || window.VTTCue;\\n  captionArray.forEach(function (caption) {\\n    var track = caption.stream;\\n    var startTime = caption.startTime;\\n    var endTime = caption.endTime;\\n\\n    if (!inbandTextTracks[track]) {\\n      return;\\n    }\\n\\n    startTime += timestampOffset;\\n    endTime += timestampOffset;\\n    inbandTextTracks[track].addCue(new Cue(startTime, endTime, caption.text));\\n  });\\n};\\n/**\\n * @file segment-loader.js\\n */\\n// in ms\\n\\n\\nvar CHECK_BUFFER_DELAY = 500;\\n/**\\n * Determines if we should call endOfStream on the media source based\\n * on the state of the buffer or if appened segment was the final\\n * segment in the playlist.\\n *\\n * @param {Object} playlist a media playlist object\\n * @param {Object} mediaSource the MediaSource object\\n * @param {Number} segmentIndex the index of segment we last appended\\n * @returns {Boolean} do we need to call endOfStream on the MediaSource\\n */\\n\\nvar detectEndOfStream = function detectEndOfStream(playlist, mediaSource, segmentIndex) {\\n  if (!playlist || !mediaSource) {\\n    return false;\\n  }\\n\\n  var segments = playlist.segments; // determine a few boolean values to help make the branch below easier\\n  // to read\\n\\n  var appendedLastSegment = segmentIndex === segments.length; // if we've buffered to the end of the video, we need to call endOfStream\\n  // so that MediaSources can trigger the `ended` event when it runs out of\\n  // buffered data instead of waiting for me\\n\\n  return playlist.endList && mediaSource.readyState === 'open' && appendedLastSegment;\\n};\\n\\nvar finite = function finite(num) {\\n  return typeof num === 'number' && isFinite(num);\\n};\\n\\nvar illegalMediaSwitch = function illegalMediaSwitch(loaderType, startingMedia, newSegmentMedia) {\\n  // Although these checks should most likely cover non 'main' types, for now it narrows\\n  // the scope of our checks.\\n  if (loaderType !== 'main' || !startingMedia || !newSegmentMedia) {\\n    return null;\\n  }\\n\\n  if (!newSegmentMedia.containsAudio && !newSegmentMedia.containsVideo) {\\n    return 'Neither audio nor video found in segment.';\\n  }\\n\\n  if (startingMedia.containsVideo && !newSegmentMedia.containsVideo) {\\n    return 'Only audio found in segment when we expected video.' + ' We can\\\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\\n  }\\n\\n  if (!startingMedia.containsVideo && newSegmentMedia.containsVideo) {\\n    return 'Video found in segment when we expected only audio.' + ' We can\\\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\\n  }\\n\\n  return null;\\n};\\n/**\\n * Calculates a time value that is safe to remove from the back buffer without interupting\\n * playback.\\n *\\n * @param {TimeRange} seekable\\n *        The current seekable range\\n * @param {Number} currentTime\\n *        The current time of the player\\n * @param {Number} targetDuration\\n *        The target duration of the current playlist\\n * @return {Number}\\n *         Time that is safe to remove from the back buffer without interupting playback\\n */\\n\\n\\nvar safeBackBufferTrimTime = function safeBackBufferTrimTime(seekable$$1, currentTime, targetDuration) {\\n  // 30 seconds before the playhead provides a safe default for trimming.\\n  //\\n  // Choosing a reasonable default is particularly important for high bitrate content and\\n  // VOD videos/live streams with large windows, as the buffer may end up overfilled and\\n  // throw an APPEND_BUFFER_ERR.\\n  var trimTime = currentTime - 30;\\n\\n  if (seekable$$1.length) {\\n    // Some live playlists may have a shorter window of content than the full allowed back\\n    // buffer. For these playlists, don't save content that's no longer within the window.\\n    trimTime = Math.max(trimTime, seekable$$1.start(0));\\n  } // Don't remove within target duration of the current time to avoid the possibility of\\n  // removing the GOP currently being played, as removing it can cause playback stalls.\\n\\n\\n  var maxTrimTime = currentTime - targetDuration;\\n  return Math.min(maxTrimTime, trimTime);\\n};\\n\\nvar segmentInfoString = function segmentInfoString(segmentInfo) {\\n  var _segmentInfo$segment = segmentInfo.segment,\\n      start = _segmentInfo$segment.start,\\n      end = _segmentInfo$segment.end,\\n      _segmentInfo$playlist = segmentInfo.playlist,\\n      seq = _segmentInfo$playlist.mediaSequence,\\n      id = _segmentInfo$playlist.id,\\n      _segmentInfo$playlist2 = _segmentInfo$playlist.segments,\\n      segments = _segmentInfo$playlist2 === undefined ? [] : _segmentInfo$playlist2,\\n      index = segmentInfo.mediaIndex,\\n      timeline = segmentInfo.timeline;\\n  return ['appending [' + index + '] of [' + seq + ', ' + (seq + segments.length) + '] from playlist [' + id + ']', '[' + start + ' => ' + end + '] in timeline [' + timeline + ']'].join(' ');\\n};\\n/**\\n * An object that manages segment loading and appending.\\n *\\n * @class SegmentLoader\\n * @param {Object} options required and optional options\\n * @extends videojs.EventTarget\\n */\\n\\n\\nvar SegmentLoader = function (_videojs$EventTarget) {\\n  inherits(SegmentLoader, _videojs$EventTarget);\\n\\n  function SegmentLoader(settings) {\\n    classCallCheck(this, SegmentLoader); // check pre-conditions\\n\\n    var _this = possibleConstructorReturn(this, (SegmentLoader.__proto__ || Object.getPrototypeOf(SegmentLoader)).call(this));\\n\\n    if (!settings) {\\n      throw new TypeError('Initialization settings are required');\\n    }\\n\\n    if (typeof settings.currentTime !== 'function') {\\n      throw new TypeError('No currentTime getter specified');\\n    }\\n\\n    if (!settings.mediaSource) {\\n      throw new TypeError('No MediaSource specified');\\n    } // public properties\\n\\n\\n    _this.bandwidth = settings.bandwidth;\\n    _this.throughput = {\\n      rate: 0,\\n      count: 0\\n    };\\n    _this.roundTrip = NaN;\\n\\n    _this.resetStats_();\\n\\n    _this.mediaIndex = null; // private settings\\n\\n    _this.hasPlayed_ = settings.hasPlayed;\\n    _this.currentTime_ = settings.currentTime;\\n    _this.seekable_ = settings.seekable;\\n    _this.seeking_ = settings.seeking;\\n    _this.duration_ = settings.duration;\\n    _this.mediaSource_ = settings.mediaSource;\\n    _this.hls_ = settings.hls;\\n    _this.loaderType_ = settings.loaderType;\\n    _this.startingMedia_ = void 0;\\n    _this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\\n    _this.goalBufferLength_ = settings.goalBufferLength;\\n    _this.sourceType_ = settings.sourceType;\\n    _this.inbandTextTracks_ = settings.inbandTextTracks;\\n    _this.state_ = 'INIT'; // private instance variables\\n\\n    _this.checkBufferTimeout_ = null;\\n    _this.error_ = void 0;\\n    _this.currentTimeline_ = -1;\\n    _this.pendingSegment_ = null;\\n    _this.mimeType_ = null;\\n    _this.sourceUpdater_ = null;\\n    _this.xhrOptions_ = null; // Fragmented mp4 playback\\n\\n    _this.activeInitSegmentId_ = null;\\n    _this.initSegments_ = {}; // HLSe playback\\n\\n    _this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\\n    _this.keyCache_ = {}; // Fmp4 CaptionParser\\n\\n    if (_this.loaderType_ === 'main') {\\n      _this.captionParser_ = new mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18___default.a();\\n    } else {\\n      _this.captionParser_ = null;\\n    }\\n\\n    _this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\\n    // between a time in the display time and a segment index within\\n    // a playlist\\n\\n    _this.syncController_ = settings.syncController;\\n    _this.syncPoint_ = {\\n      segmentIndex: 0,\\n      time: 0\\n    };\\n\\n    _this.triggerSyncInfoUpdate_ = function () {\\n      return _this.trigger('syncinfoupdate');\\n    };\\n\\n    _this.syncController_.on('syncinfoupdate', _this.triggerSyncInfoUpdate_);\\n\\n    _this.mediaSource_.addEventListener('sourceopen', function () {\\n      return _this.ended_ = false;\\n    }); // ...for determining the fetch location\\n\\n\\n    _this.fetchAtBuffer_ = false;\\n    _this.logger_ = logger('SegmentLoader[' + _this.loaderType_ + ']');\\n    Object.defineProperty(_this, 'state', {\\n      get: function get$$1() {\\n        return this.state_;\\n      },\\n      set: function set$$1(newState) {\\n        if (newState !== this.state_) {\\n          this.logger_(this.state_ + ' -> ' + newState);\\n          this.state_ = newState;\\n        }\\n      }\\n    });\\n    return _this;\\n  }\\n  /**\\n   * reset all of our media stats\\n   *\\n   * @private\\n   */\\n\\n\\n  createClass(SegmentLoader, [{\\n    key: 'resetStats_',\\n    value: function resetStats_() {\\n      this.mediaBytesTransferred = 0;\\n      this.mediaRequests = 0;\\n      this.mediaRequestsAborted = 0;\\n      this.mediaRequestsTimedout = 0;\\n      this.mediaRequestsErrored = 0;\\n      this.mediaTransferDuration = 0;\\n      this.mediaSecondsLoaded = 0;\\n    }\\n    /**\\n     * dispose of the SegmentLoader and reset to the default state\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.state = 'DISPOSED';\\n      this.pause();\\n      this.abort_();\\n\\n      if (this.sourceUpdater_) {\\n        this.sourceUpdater_.dispose();\\n      }\\n\\n      this.resetStats_();\\n\\n      if (this.captionParser_) {\\n        this.captionParser_.reset();\\n      }\\n\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n      }\\n\\n      if (this.syncController_ && this.triggerSyncInfoUpdate_) {\\n        this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\\n      }\\n\\n      this.off();\\n    }\\n    /**\\n     * abort anything that is currently doing on with the SegmentLoader\\n     * and reset to a default state\\n     */\\n\\n  }, {\\n    key: 'abort',\\n    value: function abort() {\\n      if (this.state !== 'WAITING') {\\n        if (this.pendingSegment_) {\\n          this.pendingSegment_ = null;\\n        }\\n\\n        return;\\n      }\\n\\n      this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\\n      // since we are no longer \\\"waiting\\\" on any requests. XHR callback is not always run\\n      // when the request is aborted. This will prevent the loader from being stuck in the\\n      // WAITING state indefinitely.\\n\\n      this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\\n      // next segment\\n\\n      if (!this.paused()) {\\n        this.monitorBuffer_();\\n      }\\n    }\\n    /**\\n     * abort all pending xhr requests and null any pending segements\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'abort_',\\n    value: function abort_() {\\n      if (this.pendingSegment_) {\\n        this.pendingSegment_.abortRequests();\\n      } // clear out the segment being processed\\n\\n\\n      this.pendingSegment_ = null;\\n    }\\n    /**\\n     * set an error on the segment loader and null out any pending segements\\n     *\\n     * @param {Error} error the error to set on the SegmentLoader\\n     * @return {Error} the error that was set or that is currently set\\n     */\\n\\n  }, {\\n    key: 'error',\\n    value: function error(_error) {\\n      if (typeof _error !== 'undefined') {\\n        this.error_ = _error;\\n      }\\n\\n      this.pendingSegment_ = null;\\n      return this.error_;\\n    }\\n  }, {\\n    key: 'endOfStream',\\n    value: function endOfStream() {\\n      this.ended_ = true;\\n      this.pause();\\n      this.trigger('ended');\\n    }\\n    /**\\n     * Indicates which time ranges are buffered\\n     *\\n     * @return {TimeRange}\\n     *         TimeRange object representing the current buffered ranges\\n     */\\n\\n  }, {\\n    key: 'buffered_',\\n    value: function buffered_() {\\n      if (!this.sourceUpdater_) {\\n        return videojs$1.createTimeRanges();\\n      }\\n\\n      return this.sourceUpdater_.buffered();\\n    }\\n    /**\\n     * Gets and sets init segment for the provided map\\n     *\\n     * @param {Object} map\\n     *        The map object representing the init segment to get or set\\n     * @param {Boolean=} set\\n     *        If true, the init segment for the provided map should be saved\\n     * @return {Object}\\n     *         map object for desired init segment\\n     */\\n\\n  }, {\\n    key: 'initSegment',\\n    value: function initSegment(map) {\\n      var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\\n\\n      if (!map) {\\n        return null;\\n      }\\n\\n      var id = initSegmentId(map);\\n      var storedMap = this.initSegments_[id];\\n\\n      if (set$$1 && !storedMap && map.bytes) {\\n        this.initSegments_[id] = storedMap = {\\n          resolvedUri: map.resolvedUri,\\n          byterange: map.byterange,\\n          bytes: map.bytes,\\n          timescales: map.timescales,\\n          videoTrackIds: map.videoTrackIds\\n        };\\n      }\\n\\n      return storedMap || map;\\n    }\\n    /**\\n     * Gets and sets key for the provided key\\n     *\\n     * @param {Object} key\\n     *        The key object representing the key to get or set\\n     * @param {Boolean=} set\\n     *        If true, the key for the provided key should be saved\\n     * @return {Object}\\n     *         Key object for desired key\\n     */\\n\\n  }, {\\n    key: 'segmentKey',\\n    value: function segmentKey(key) {\\n      var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\\n\\n      if (!key) {\\n        return null;\\n      }\\n\\n      var id = segmentKeyId(key);\\n      var storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\\n      // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\\n\\n      if (this.cacheEncryptionKeys_ && set$$1 && !storedKey && key.bytes) {\\n        this.keyCache_[id] = storedKey = {\\n          resolvedUri: key.resolvedUri,\\n          bytes: key.bytes\\n        };\\n      }\\n\\n      var result = {\\n        resolvedUri: (storedKey || key).resolvedUri\\n      };\\n\\n      if (storedKey) {\\n        result.bytes = storedKey.bytes;\\n      }\\n\\n      return result;\\n    }\\n    /**\\n     * Returns true if all configuration required for loading is present, otherwise false.\\n     *\\n     * @return {Boolean} True if the all configuration is ready for loading\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'couldBeginLoading_',\\n    value: function couldBeginLoading_() {\\n      return this.playlist_ && ( // the source updater is created when init_ is called, so either having a\\n      // source updater or being in the INIT state with a mimeType is enough\\n      // to say we have all the needed configuration to start loading.\\n      this.sourceUpdater_ || this.mimeType_ && this.state === 'INIT') && !this.paused();\\n    }\\n    /**\\n     * load a playlist and start to fill the buffer\\n     */\\n\\n  }, {\\n    key: 'load',\\n    value: function load() {\\n      // un-pause\\n      this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\\n      // specified\\n\\n      if (!this.playlist_) {\\n        return;\\n      } // not sure if this is the best place for this\\n\\n\\n      this.syncController_.setDateTimeMapping(this.playlist_); // if all the configuration is ready, initialize and begin loading\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        return this.init_();\\n      } // if we're in the middle of processing a segment already, don't\\n      // kick off an additional segment request\\n\\n\\n      if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\\n        return;\\n      }\\n\\n      this.state = 'READY';\\n    }\\n    /**\\n     * Once all the starting parameters have been specified, begin\\n     * operation. This method should only be invoked from the INIT\\n     * state.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'init_',\\n    value: function init_() {\\n      this.state = 'READY';\\n      this.sourceUpdater_ = new SourceUpdater(this.mediaSource_, this.mimeType_, this.loaderType_, this.sourceBufferEmitter_);\\n      this.resetEverything();\\n      return this.monitorBuffer_();\\n    }\\n    /**\\n     * set a playlist on the segment loader\\n     *\\n     * @param {PlaylistLoader} media the playlist to set on the segment loader\\n     */\\n\\n  }, {\\n    key: 'playlist',\\n    value: function playlist(newPlaylist) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (!newPlaylist) {\\n        return;\\n      }\\n\\n      var oldPlaylist = this.playlist_;\\n      var segmentInfo = this.pendingSegment_;\\n      this.playlist_ = newPlaylist;\\n      this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\\n      // is always our zero-time so force a sync update each time the playlist\\n      // is refreshed from the server\\n      //\\n      // Use the INIT state to determine if playback has started, as the playlist sync info\\n      // should be fixed once requests begin (as sync points are generated based on sync\\n      // info), but not before then.\\n\\n      if (this.state === 'INIT') {\\n        newPlaylist.syncInfo = {\\n          mediaSequence: newPlaylist.mediaSequence,\\n          time: 0\\n        };\\n      }\\n\\n      var oldId = null;\\n\\n      if (oldPlaylist) {\\n        if (oldPlaylist.id) {\\n          oldId = oldPlaylist.id;\\n        } else if (oldPlaylist.uri) {\\n          oldId = oldPlaylist.uri;\\n        }\\n      }\\n\\n      this.logger_('playlist update [' + oldId + ' => ' + (newPlaylist.id || newPlaylist.uri) + ']'); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\\n      // in LIVE, we always want to update with new playlists (including refreshes)\\n\\n      this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\\n      // buffering now\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        return this.init_();\\n      }\\n\\n      if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\\n        if (this.mediaIndex !== null) {\\n          // we must \\\"resync\\\" the segment loader when we switch renditions and\\n          // the segment loader is already synced to the previous rendition\\n          this.resyncLoader();\\n        } // the rest of this function depends on `oldPlaylist` being defined\\n\\n\\n        return;\\n      } // we reloaded the same playlist so we are in a live scenario\\n      // and we will likely need to adjust the mediaIndex\\n\\n\\n      var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\\n      this.logger_('live window shift [' + mediaSequenceDiff + ']'); // update the mediaIndex on the SegmentLoader\\n      // this is important because we can abort a request and this value must be\\n      // equal to the last appended mediaIndex\\n\\n      if (this.mediaIndex !== null) {\\n        this.mediaIndex -= mediaSequenceDiff;\\n      } // update the mediaIndex on the SegmentInfo object\\n      // this is important because we will update this.mediaIndex with this value\\n      // in `handleUpdateEnd_` after the segment has been successfully appended\\n\\n\\n      if (segmentInfo) {\\n        segmentInfo.mediaIndex -= mediaSequenceDiff; // we need to update the referenced segment so that timing information is\\n        // saved for the new playlist's segment, however, if the segment fell off the\\n        // playlist, we can leave the old reference and just lose the timing info\\n\\n        if (segmentInfo.mediaIndex >= 0) {\\n          segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\\n        }\\n      }\\n\\n      this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\\n    }\\n    /**\\n     * Prevent the loader from fetching additional segments. If there\\n     * is a segment request outstanding, it will finish processing\\n     * before the loader halts. A segment loader can be unpaused by\\n     * calling load().\\n     */\\n\\n  }, {\\n    key: 'pause',\\n    value: function pause() {\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n        this.checkBufferTimeout_ = null;\\n      }\\n    }\\n    /**\\n     * Returns whether the segment loader is fetching additional\\n     * segments when given the opportunity. This property can be\\n     * modified through calls to pause() and load().\\n     */\\n\\n  }, {\\n    key: 'paused',\\n    value: function paused() {\\n      return this.checkBufferTimeout_ === null;\\n    }\\n    /**\\n     * create/set the following mimetype on the SourceBuffer through a\\n     * SourceUpdater\\n     *\\n     * @param {String} mimeType the mime type string to use\\n     * @param {Object} sourceBufferEmitter an event emitter that fires when a source buffer\\n     * is added to the media source\\n     */\\n\\n  }, {\\n    key: 'mimeType',\\n    value: function mimeType(_mimeType, sourceBufferEmitter) {\\n      if (this.mimeType_) {\\n        return;\\n      }\\n\\n      this.mimeType_ = _mimeType;\\n      this.sourceBufferEmitter_ = sourceBufferEmitter; // if we were unpaused but waiting for a sourceUpdater, start\\n      // buffering now\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        this.init_();\\n      }\\n    }\\n    /**\\n     * Delete all the buffered data and reset the SegmentLoader\\n     * @param {Function} [done] an optional callback to be executed when the remove\\n     * operation is complete\\n     */\\n\\n  }, {\\n    key: 'resetEverything',\\n    value: function resetEverything(done) {\\n      this.ended_ = false;\\n      this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\\n      // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\\n      // we then clamp the value to duration if necessary.\\n\\n      this.remove(0, Infinity, done); // clears fmp4 captions\\n\\n      if (this.captionParser_) {\\n        this.captionParser_.clearAllCaptions();\\n      }\\n\\n      this.trigger('reseteverything');\\n    }\\n    /**\\n     * Force the SegmentLoader to resync and start loading around the currentTime instead\\n     * of starting at the end of the buffer\\n     *\\n     * Useful for fast quality changes\\n     */\\n\\n  }, {\\n    key: 'resetLoader',\\n    value: function resetLoader() {\\n      this.fetchAtBuffer_ = false;\\n      this.resyncLoader();\\n    }\\n    /**\\n     * Force the SegmentLoader to restart synchronization and make a conservative guess\\n     * before returning to the simple walk-forward method\\n     */\\n\\n  }, {\\n    key: 'resyncLoader',\\n    value: function resyncLoader() {\\n      this.mediaIndex = null;\\n      this.syncPoint_ = null;\\n      this.abort();\\n    }\\n    /**\\n     * Remove any data in the source buffer between start and end times\\n     * @param {Number} start - the start time of the region to remove from the buffer\\n     * @param {Number} end - the end time of the region to remove from the buffer\\n     * @param {Function} [done] - an optional callback to be executed when the remove\\n     * operation is complete\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end, done) {\\n      // clamp end to duration if we need to remove everything.\\n      // This is due to a browser bug that causes issues if we remove to Infinity.\\n      // videojs/videojs-contrib-hls#1225\\n      if (end === Infinity) {\\n        end = this.duration_();\\n      }\\n\\n      if (this.sourceUpdater_) {\\n        this.sourceUpdater_.remove(start, end, done);\\n      }\\n\\n      removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\\n\\n      if (this.inbandTextTracks_) {\\n        for (var id in this.inbandTextTracks_) {\\n          removeCuesFromTrack(start, end, this.inbandTextTracks_[id]);\\n        }\\n      }\\n    }\\n    /**\\n     * (re-)schedule monitorBufferTick_ to run as soon as possible\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'monitorBuffer_',\\n    value: function monitorBuffer_() {\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n      }\\n\\n      this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorBufferTick_.bind(this), 1);\\n    }\\n    /**\\n     * As long as the SegmentLoader is in the READY state, periodically\\n     * invoke fillBuffer_().\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'monitorBufferTick_',\\n    value: function monitorBufferTick_() {\\n      if (this.state === 'READY') {\\n        this.fillBuffer_();\\n      }\\n\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n      }\\n\\n      this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\\n    }\\n    /**\\n     * fill the buffer with segements unless the sourceBuffers are\\n     * currently updating\\n     *\\n     * Note: this function should only ever be called by monitorBuffer_\\n     * and never directly\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fillBuffer_',\\n    value: function fillBuffer_() {\\n      if (this.sourceUpdater_.updating()) {\\n        return;\\n      }\\n\\n      if (!this.syncPoint_) {\\n        this.syncPoint_ = this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\\n      } // see if we need to begin loading immediately\\n\\n\\n      var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);\\n\\n      if (!segmentInfo) {\\n        return;\\n      }\\n\\n      if (this.isEndOfStream_(segmentInfo.mediaIndex)) {\\n        this.endOfStream();\\n        return;\\n      }\\n\\n      if (segmentInfo.mediaIndex === this.playlist_.segments.length - 1 && this.mediaSource_.readyState === 'ended' && !this.seeking_()) {\\n        return;\\n      } // We will need to change timestampOffset of the sourceBuffer if:\\n      // - The segment.timeline !== this.currentTimeline\\n      //   (we are crossing a discontinuity somehow)\\n      // - The \\\"timestampOffset\\\" for the start of this segment is less than\\n      //   the currently set timestampOffset\\n      // Also, clear captions if we are crossing a discontinuity boundary\\n      // Previously, we changed the timestampOffset if the start of this segment\\n      // is less than the currently set timestampOffset but this isn't wanted\\n      // as it can produce bad behavior, especially around long running\\n      // live streams\\n\\n\\n      if (segmentInfo.timeline !== this.currentTimeline_) {\\n        this.syncController_.reset();\\n        segmentInfo.timestampOffset = segmentInfo.startOfSegment;\\n\\n        if (this.captionParser_) {\\n          this.captionParser_.clearAllCaptions();\\n        }\\n      }\\n\\n      this.loadSegment_(segmentInfo);\\n    }\\n    /**\\n     * Determines if this segment loader is at the end of it's stream.\\n     *\\n     * @param {Number} mediaIndex the index of segment we last appended\\n     * @param {Object} [playlist=this.playlist_] a media playlist object\\n     * @returns {Boolean} true if at end of stream, false otherwise.\\n     */\\n\\n  }, {\\n    key: 'isEndOfStream_',\\n    value: function isEndOfStream_(mediaIndex) {\\n      var playlist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.playlist_;\\n      return detectEndOfStream(playlist, this.mediaSource_, mediaIndex) && !this.sourceUpdater_.updating();\\n    }\\n    /**\\n     * Determines what segment request should be made, given current playback\\n     * state.\\n     *\\n     * @param {TimeRanges} buffered - the state of the buffer\\n     * @param {Object} playlist - the playlist object to fetch segments from\\n     * @param {Number} mediaIndex - the previous mediaIndex fetched or null\\n     * @param {Boolean} hasPlayed - a flag indicating whether we have played or not\\n     * @param {Number} currentTime - the playback position in seconds\\n     * @param {Object} syncPoint - a segment info object that describes the\\n     * @returns {Object} a segment request object that describes the segment to load\\n     */\\n\\n  }, {\\n    key: 'checkBuffer_',\\n    value: function checkBuffer_(buffered, playlist, mediaIndex, hasPlayed, currentTime, syncPoint) {\\n      var lastBufferedEnd = 0;\\n      var startOfSegment = void 0;\\n\\n      if (buffered.length) {\\n        lastBufferedEnd = buffered.end(buffered.length - 1);\\n      }\\n\\n      var bufferedTime = Math.max(0, lastBufferedEnd - currentTime);\\n\\n      if (!playlist.segments.length) {\\n        return null;\\n      } // if there is plenty of content buffered, and the video has\\n      // been played before relax for awhile\\n\\n\\n      if (bufferedTime >= this.goalBufferLength_()) {\\n        return null;\\n      } // if the video has not yet played once, and we already have\\n      // one segment downloaded do nothing\\n\\n\\n      if (!hasPlayed && bufferedTime >= 1) {\\n        return null;\\n      } // When the syncPoint is null, there is no way of determining a good\\n      // conservative segment index to fetch from\\n      // The best thing to do here is to get the kind of sync-point data by\\n      // making a request\\n\\n\\n      if (syncPoint === null) {\\n        mediaIndex = this.getSyncSegmentCandidate_(playlist);\\n        return this.generateSegmentInfo_(playlist, mediaIndex, null, true);\\n      } // Under normal playback conditions fetching is a simple walk forward\\n\\n\\n      if (mediaIndex !== null) {\\n        var segment = playlist.segments[mediaIndex];\\n        startOfSegment = lastBufferedEnd;\\n        return this.generateSegmentInfo_(playlist, mediaIndex + 1, startOfSegment, false);\\n      } // There is a sync-point but the lack of a mediaIndex indicates that\\n      // we need to make a good conservative guess about which segment to\\n      // fetch\\n\\n\\n      if (this.fetchAtBuffer_) {\\n        // Find the segment containing the end of the buffer\\n        var mediaSourceInfo = Playlist.getMediaInfoForTime(playlist, lastBufferedEnd, syncPoint.segmentIndex, syncPoint.time);\\n        mediaIndex = mediaSourceInfo.mediaIndex;\\n        startOfSegment = mediaSourceInfo.startTime;\\n      } else {\\n        // Find the segment containing currentTime\\n        var _mediaSourceInfo = Playlist.getMediaInfoForTime(playlist, currentTime, syncPoint.segmentIndex, syncPoint.time);\\n\\n        mediaIndex = _mediaSourceInfo.mediaIndex;\\n        startOfSegment = _mediaSourceInfo.startTime;\\n      }\\n\\n      return this.generateSegmentInfo_(playlist, mediaIndex, startOfSegment, false);\\n    }\\n    /**\\n     * The segment loader has no recourse except to fetch a segment in the\\n     * current playlist and use the internal timestamps in that segment to\\n     * generate a syncPoint. This function returns a good candidate index\\n     * for that process.\\n     *\\n     * @param {Object} playlist - the playlist object to look for a\\n     * @returns {Number} An index of a segment from the playlist to load\\n     */\\n\\n  }, {\\n    key: 'getSyncSegmentCandidate_',\\n    value: function getSyncSegmentCandidate_(playlist) {\\n      var _this2 = this;\\n\\n      if (this.currentTimeline_ === -1) {\\n        return 0;\\n      }\\n\\n      var segmentIndexArray = playlist.segments.map(function (s, i) {\\n        return {\\n          timeline: s.timeline,\\n          segmentIndex: i\\n        };\\n      }).filter(function (s) {\\n        return s.timeline === _this2.currentTimeline_;\\n      });\\n\\n      if (segmentIndexArray.length) {\\n        return segmentIndexArray[Math.min(segmentIndexArray.length - 1, 1)].segmentIndex;\\n      }\\n\\n      return Math.max(playlist.segments.length - 1, 0);\\n    }\\n  }, {\\n    key: 'generateSegmentInfo_',\\n    value: function generateSegmentInfo_(playlist, mediaIndex, startOfSegment, isSyncRequest) {\\n      if (mediaIndex < 0 || mediaIndex >= playlist.segments.length) {\\n        return null;\\n      }\\n\\n      var segment = playlist.segments[mediaIndex];\\n      return {\\n        requestId: 'segment-loader-' + Math.random(),\\n        // resolve the segment URL relative to the playlist\\n        uri: segment.resolvedUri,\\n        // the segment's mediaIndex at the time it was requested\\n        mediaIndex: mediaIndex,\\n        // whether or not to update the SegmentLoader's state with this\\n        // segment's mediaIndex\\n        isSyncRequest: isSyncRequest,\\n        startOfSegment: startOfSegment,\\n        // the segment's playlist\\n        playlist: playlist,\\n        // unencrypted bytes of the segment\\n        bytes: null,\\n        // when a key is defined for this segment, the encrypted bytes\\n        encryptedBytes: null,\\n        // The target timestampOffset for this segment when we append it\\n        // to the source buffer\\n        timestampOffset: null,\\n        // The timeline that the segment is in\\n        timeline: segment.timeline,\\n        // The expected duration of the segment in seconds\\n        duration: segment.duration,\\n        // retain the segment in case the playlist updates while doing an async process\\n        segment: segment\\n      };\\n    }\\n    /**\\n     * Determines if the network has enough bandwidth to complete the current segment\\n     * request in a timely manner. If not, the request will be aborted early and bandwidth\\n     * updated to trigger a playlist switch.\\n     *\\n     * @param {Object} stats\\n     *        Object containing stats about the request timing and size\\n     * @return {Boolean} True if the request was aborted, false otherwise\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'abortRequestEarly_',\\n    value: function abortRequestEarly_(stats) {\\n      if (this.hls_.tech_.paused() || // Don't abort if the current playlist is on the lowestEnabledRendition\\n      // TODO: Replace using timeout with a boolean indicating whether this playlist is\\n      //       the lowestEnabledRendition.\\n      !this.xhrOptions_.timeout || // Don't abort if we have no bandwidth information to estimate segment sizes\\n      !this.playlist_.attributes.BANDWIDTH) {\\n        return false;\\n      } // Wait at least 1 second since the first byte of data has been received before\\n      // using the calculated bandwidth from the progress event to allow the bitrate\\n      // to stabilize\\n\\n\\n      if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\\n        return false;\\n      }\\n\\n      var currentTime = this.currentTime_();\\n      var measuredBandwidth = stats.bandwidth;\\n      var segmentDuration = this.pendingSegment_.duration;\\n      var requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\\n      // if we are only left with less than 1 second when the request completes.\\n      // A negative timeUntilRebuffering indicates we are already rebuffering\\n\\n      var timeUntilRebuffer$$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.hls_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\\n      // is larger than the estimated time until the player runs out of forward buffer\\n\\n      if (requestTimeRemaining <= timeUntilRebuffer$$1) {\\n        return false;\\n      }\\n\\n      var switchCandidate = minRebufferMaxBandwidthSelector({\\n        master: this.hls_.playlists.master,\\n        currentTime: currentTime,\\n        bandwidth: measuredBandwidth,\\n        duration: this.duration_(),\\n        segmentDuration: segmentDuration,\\n        timeUntilRebuffer: timeUntilRebuffer$$1,\\n        currentTimeline: this.currentTimeline_,\\n        syncController: this.syncController_\\n      });\\n\\n      if (!switchCandidate) {\\n        return;\\n      }\\n\\n      var rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$$1;\\n      var timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\\n      var minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\\n      // potential round trip time of the new request so that we are not too aggressive\\n      // with switching to a playlist that might save us a fraction of a second.\\n\\n      if (timeUntilRebuffer$$1 <= TIME_FUDGE_FACTOR) {\\n        minimumTimeSaving = 1;\\n      }\\n\\n      if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\\n        return false;\\n      } // set the bandwidth to that of the desired playlist being sure to scale by\\n      // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\\n      // don't trigger a bandwidthupdate as the bandwidth is artifial\\n\\n\\n      this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\\n      this.abort();\\n      this.trigger('earlyabort');\\n      return true;\\n    }\\n    /**\\n     * XHR `progress` event handler\\n     *\\n     * @param {Event}\\n     *        The XHR `progress` event\\n     * @param {Object} simpleSegment\\n     *        A simplified segment object copy\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleProgress_',\\n    value: function handleProgress_(event, simpleSegment) {\\n      if (!this.pendingSegment_ || simpleSegment.requestId !== this.pendingSegment_.requestId || this.abortRequestEarly_(simpleSegment.stats)) {\\n        return;\\n      }\\n\\n      this.trigger('progress');\\n    }\\n    /**\\n     * load a specific segment from a request into the buffer\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'loadSegment_',\\n    value: function loadSegment_(segmentInfo) {\\n      this.state = 'WAITING';\\n      this.pendingSegment_ = segmentInfo;\\n      this.trimBackBuffer_(segmentInfo);\\n      segmentInfo.abortRequests = mediaSegmentRequest(this.hls_.xhr, this.xhrOptions_, this.decrypter_, this.captionParser_, this.createSimplifiedSegmentObj_(segmentInfo), // progress callback\\n      this.handleProgress_.bind(this), this.segmentRequestFinished_.bind(this));\\n    }\\n    /**\\n     * trim the back buffer so that we don't have too much data\\n     * in the source buffer\\n     *\\n     * @private\\n     *\\n     * @param {Object} segmentInfo - the current segment\\n     */\\n\\n  }, {\\n    key: 'trimBackBuffer_',\\n    value: function trimBackBuffer_(segmentInfo) {\\n      var removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\\n      // buffer and a very conservative \\\"garbage collector\\\"\\n      // We manually clear out the old buffer to ensure\\n      // we don't trigger the QuotaExceeded error\\n      // on the source buffer during subsequent appends\\n\\n      if (removeToTime > 0) {\\n        this.remove(0, removeToTime);\\n      }\\n    }\\n    /**\\n     * created a simplified copy of the segment object with just the\\n     * information necessary to perform the XHR and decryption\\n     *\\n     * @private\\n     *\\n     * @param {Object} segmentInfo - the current segment\\n     * @returns {Object} a simplified segment object copy\\n     */\\n\\n  }, {\\n    key: 'createSimplifiedSegmentObj_',\\n    value: function createSimplifiedSegmentObj_(segmentInfo) {\\n      var segment = segmentInfo.segment;\\n      var simpleSegment = {\\n        resolvedUri: segment.resolvedUri,\\n        byterange: segment.byterange,\\n        requestId: segmentInfo.requestId\\n      };\\n\\n      if (segment.key) {\\n        // if the media sequence is greater than 2^32, the IV will be incorrect\\n        // assuming 10s segments, that would be about 1300 years\\n        var iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\\n        simpleSegment.key = this.segmentKey(segment.key);\\n        simpleSegment.key.iv = iv;\\n      }\\n\\n      if (segment.map) {\\n        simpleSegment.map = this.initSegment(segment.map);\\n      }\\n\\n      return simpleSegment;\\n    }\\n    /**\\n     * Handle the callback from the segmentRequest function and set the\\n     * associated SegmentLoader state and errors if necessary\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'segmentRequestFinished_',\\n    value: function segmentRequestFinished_(error, simpleSegment) {\\n      // every request counts as a media request even if it has been aborted\\n      // or canceled due to a timeout\\n      this.mediaRequests += 1;\\n\\n      if (simpleSegment.stats) {\\n        this.mediaBytesTransferred += simpleSegment.stats.bytesReceived;\\n        this.mediaTransferDuration += simpleSegment.stats.roundTripTime;\\n      } // The request was aborted and the SegmentLoader has already been reset\\n\\n\\n      if (!this.pendingSegment_) {\\n        this.mediaRequestsAborted += 1;\\n        return;\\n      } // the request was aborted and the SegmentLoader has already started\\n      // another request. this can happen when the timeout for an aborted\\n      // request triggers due to a limitation in the XHR library\\n      // do not count this as any sort of request or we risk double-counting\\n\\n\\n      if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\\n        return;\\n      } // an error occurred from the active pendingSegment_ so reset everything\\n\\n\\n      if (error) {\\n        this.pendingSegment_ = null;\\n        this.state = 'READY'; // the requests were aborted just record the aborted stat and exit\\n        // this is not a true error condition and nothing corrective needs\\n        // to be done\\n\\n        if (error.code === REQUEST_ERRORS.ABORTED) {\\n          this.mediaRequestsAborted += 1;\\n          return;\\n        }\\n\\n        this.pause(); // the error is really just that at least one of the requests timed-out\\n        // set the bandwidth to a very low value and trigger an ABR switch to\\n        // take emergency action\\n\\n        if (error.code === REQUEST_ERRORS.TIMEOUT) {\\n          this.mediaRequestsTimedout += 1;\\n          this.bandwidth = 1;\\n          this.roundTrip = NaN;\\n          this.trigger('bandwidthupdate');\\n          return;\\n        } // if control-flow has arrived here, then the error is real\\n        // emit an error event to blacklist the current playlist\\n\\n\\n        this.mediaRequestsErrored += 1;\\n        this.error(error);\\n        this.trigger('error');\\n        return;\\n      } // the response was a success so set any bandwidth stats the request\\n      // generated for ABR purposes\\n\\n\\n      this.bandwidth = simpleSegment.stats.bandwidth;\\n      this.roundTrip = simpleSegment.stats.roundTripTime; // if this request included an initialization segment, save that data\\n      // to the initSegment cache\\n\\n      if (simpleSegment.map) {\\n        simpleSegment.map = this.initSegment(simpleSegment.map, true);\\n      } // if this request included a segment key, save that data in the cache\\n\\n\\n      if (simpleSegment.key) {\\n        this.segmentKey(simpleSegment.key, true);\\n      }\\n\\n      this.processSegmentResponse_(simpleSegment);\\n    }\\n    /**\\n     * Move any important data from the simplified segment object\\n     * back to the real segment object for future phases\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'processSegmentResponse_',\\n    value: function processSegmentResponse_(simpleSegment) {\\n      var segmentInfo = this.pendingSegment_;\\n      segmentInfo.bytes = simpleSegment.bytes;\\n\\n      if (simpleSegment.map) {\\n        segmentInfo.segment.map.bytes = simpleSegment.map.bytes;\\n      }\\n\\n      segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests; // This has fmp4 captions, add them to text tracks\\n\\n      if (simpleSegment.fmp4Captions) {\\n        createCaptionsTrackIfNotExists(this.inbandTextTracks_, this.hls_.tech_, simpleSegment.captionStreams);\\n        addCaptionData({\\n          inbandTextTracks: this.inbandTextTracks_,\\n          captionArray: simpleSegment.fmp4Captions,\\n          // fmp4s will not have a timestamp offset\\n          timestampOffset: 0\\n        }); // Reset stored captions since we added parsed\\n        // captions to a text track at this point\\n\\n        if (this.captionParser_) {\\n          this.captionParser_.clearParsedCaptions();\\n        }\\n      }\\n\\n      this.handleSegment_();\\n    }\\n    /**\\n     * append a decrypted segement to the SourceBuffer through a SourceUpdater\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleSegment_',\\n    value: function handleSegment_() {\\n      var _this3 = this;\\n\\n      if (!this.pendingSegment_) {\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      var segmentInfo = this.pendingSegment_;\\n      var segment = segmentInfo.segment;\\n      var timingInfo = this.syncController_.probeSegmentInfo(segmentInfo); // When we have our first timing info, determine what media types this loader is\\n      // dealing with. Although we're maintaining extra state, it helps to preserve the\\n      // separation of segment loader from the actual source buffers.\\n\\n      if (typeof this.startingMedia_ === 'undefined' && timingInfo && ( // Guard against cases where we're not getting timing info at all until we are\\n      // certain that all streams will provide it.\\n      timingInfo.containsAudio || timingInfo.containsVideo)) {\\n        this.startingMedia_ = {\\n          containsAudio: timingInfo.containsAudio,\\n          containsVideo: timingInfo.containsVideo\\n        };\\n      }\\n\\n      var illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.startingMedia_, timingInfo);\\n\\n      if (illegalMediaSwitchError) {\\n        this.error({\\n          message: illegalMediaSwitchError,\\n          blacklistDuration: Infinity\\n        });\\n        this.trigger('error');\\n        return;\\n      }\\n\\n      if (segmentInfo.isSyncRequest) {\\n        this.trigger('syncinfoupdate');\\n        this.pendingSegment_ = null;\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      if (segmentInfo.timestampOffset !== null && segmentInfo.timestampOffset !== this.sourceUpdater_.timestampOffset()) {\\n        // Subtract any difference between the PTS and DTS times of the first frame\\n        // from the timeStampOffset (which currently equals the buffered.end) to prevent\\n        // creating any gaps in the buffer\\n        if (timingInfo && timingInfo.segmentTimestampInfo) {\\n          var ptsStartTime = timingInfo.segmentTimestampInfo[0].ptsTime;\\n          var dtsStartTime = timingInfo.segmentTimestampInfo[0].dtsTime;\\n          segmentInfo.timestampOffset -= ptsStartTime - dtsStartTime;\\n        }\\n\\n        this.sourceUpdater_.timestampOffset(segmentInfo.timestampOffset); // fired when a timestamp offset is set in HLS (can also identify discontinuities)\\n\\n        this.trigger('timestampoffset');\\n      }\\n\\n      var timelineMapping = this.syncController_.mappingForTimeline(segmentInfo.timeline);\\n\\n      if (timelineMapping !== null) {\\n        this.trigger({\\n          type: 'segmenttimemapping',\\n          mapping: timelineMapping\\n        });\\n      }\\n\\n      this.state = 'APPENDING'; // if the media initialization segment is changing, append it\\n      // before the content segment\\n\\n      if (segment.map) {\\n        var initId = initSegmentId(segment.map);\\n\\n        if (!this.activeInitSegmentId_ || this.activeInitSegmentId_ !== initId) {\\n          var initSegment = this.initSegment(segment.map);\\n          this.sourceUpdater_.appendBuffer({\\n            bytes: initSegment.bytes\\n          }, function () {\\n            _this3.activeInitSegmentId_ = initId;\\n          });\\n        }\\n      }\\n\\n      segmentInfo.byteLength = segmentInfo.bytes.byteLength;\\n\\n      if (typeof segment.start === 'number' && typeof segment.end === 'number') {\\n        this.mediaSecondsLoaded += segment.end - segment.start;\\n      } else {\\n        this.mediaSecondsLoaded += segment.duration;\\n      }\\n\\n      this.logger_(segmentInfoString(segmentInfo));\\n      this.sourceUpdater_.appendBuffer({\\n        bytes: segmentInfo.bytes,\\n        videoSegmentTimingInfoCallback: this.handleVideoSegmentTimingInfo_.bind(this, segmentInfo.requestId)\\n      }, this.handleUpdateEnd_.bind(this));\\n    }\\n  }, {\\n    key: 'handleVideoSegmentTimingInfo_',\\n    value: function handleVideoSegmentTimingInfo_(requestId, event) {\\n      if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\\n        return;\\n      }\\n\\n      var segment = this.pendingSegment_.segment;\\n\\n      if (!segment.videoTimingInfo) {\\n        segment.videoTimingInfo = {};\\n      }\\n\\n      segment.videoTimingInfo.transmuxerPrependedSeconds = event.videoSegmentTimingInfo.prependedContentDuration || 0;\\n      segment.videoTimingInfo.transmuxedPresentationStart = event.videoSegmentTimingInfo.start.presentation;\\n      segment.videoTimingInfo.transmuxedPresentationEnd = event.videoSegmentTimingInfo.end.presentation; // mainly used as a reference for debugging\\n\\n      segment.videoTimingInfo.baseMediaDecodeTime = event.videoSegmentTimingInfo.baseMediaDecodeTime;\\n    }\\n    /**\\n     * callback to run when appendBuffer is finished. detects if we are\\n     * in a good state to do things with the data we got, or if we need\\n     * to wait for more\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleUpdateEnd_',\\n    value: function handleUpdateEnd_() {\\n      if (!this.pendingSegment_) {\\n        this.state = 'READY';\\n\\n        if (!this.paused()) {\\n          this.monitorBuffer_();\\n        }\\n\\n        return;\\n      }\\n\\n      var segmentInfo = this.pendingSegment_;\\n      var segment = segmentInfo.segment;\\n      var isWalkingForward = this.mediaIndex !== null;\\n      this.pendingSegment_ = null;\\n      this.recordThroughput_(segmentInfo);\\n      this.addSegmentMetadataCue_(segmentInfo);\\n      this.state = 'READY';\\n      this.mediaIndex = segmentInfo.mediaIndex;\\n      this.fetchAtBuffer_ = true;\\n      this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\\n      // the following conditional otherwise it may consider this a bad \\\"guess\\\"\\n      // and attempt to resync when the post-update seekable window and live\\n      // point would mean that this was the perfect segment to fetch\\n\\n      this.trigger('syncinfoupdate'); // If we previously appended a segment that ends more than 3 targetDurations before\\n      // the currentTime_ that means that our conservative guess was too conservative.\\n      // In that case, reset the loader state so that we try to use any information gained\\n      // from the previous request to create a new, more accurate, sync-point.\\n\\n      if (segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3) {\\n        this.resetEverything();\\n        return;\\n      } // Don't do a rendition switch unless we have enough time to get a sync segment\\n      // and conservatively guess\\n\\n\\n      if (isWalkingForward) {\\n        this.trigger('bandwidthupdate');\\n      }\\n\\n      this.trigger('progress'); // any time an update finishes and the last segment is in the\\n      // buffer, end the stream. this ensures the \\\"ended\\\" event will\\n      // fire if playback reaches that point.\\n\\n      if (this.isEndOfStream_(segmentInfo.mediaIndex + 1, segmentInfo.playlist)) {\\n        this.endOfStream();\\n      }\\n\\n      if (!this.paused()) {\\n        this.monitorBuffer_();\\n      }\\n    }\\n    /**\\n     * Records the current throughput of the decrypt, transmux, and append\\n     * portion of the semgment pipeline. `throughput.rate` is a the cumulative\\n     * moving average of the throughput. `throughput.count` is the number of\\n     * data points in the average.\\n     *\\n     * @private\\n     * @param {Object} segmentInfo the object returned by loadSegment\\n     */\\n\\n  }, {\\n    key: 'recordThroughput_',\\n    value: function recordThroughput_(segmentInfo) {\\n      var rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\\n      // by zero in the case where the throughput is ridiculously high\\n\\n      var segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\\n\\n      var segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\\n      //   newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\\n\\n      this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\\n    }\\n    /**\\n     * Adds a cue to the segment-metadata track with some metadata information about the\\n     * segment\\n     *\\n     * @private\\n     * @param {Object} segmentInfo\\n     *        the object returned by loadSegment\\n     * @method addSegmentMetadataCue_\\n     */\\n\\n  }, {\\n    key: 'addSegmentMetadataCue_',\\n    value: function addSegmentMetadataCue_(segmentInfo) {\\n      if (!this.segmentMetadataTrack_) {\\n        return;\\n      }\\n\\n      var segment = segmentInfo.segment;\\n      var start = segment.start;\\n      var end = segment.end; // Do not try adding the cue if the start and end times are invalid.\\n\\n      if (!finite(start) || !finite(end)) {\\n        return;\\n      }\\n\\n      removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\\n      var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\\n      var value = {\\n        custom: segment.custom,\\n        dateTimeObject: segment.dateTimeObject,\\n        dateTimeString: segment.dateTimeString,\\n        bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\\n        resolution: segmentInfo.playlist.attributes.RESOLUTION,\\n        codecs: segmentInfo.playlist.attributes.CODECS,\\n        byteLength: segmentInfo.byteLength,\\n        uri: segmentInfo.uri,\\n        timeline: segmentInfo.timeline,\\n        playlist: segmentInfo.playlist.id,\\n        start: start,\\n        end: end\\n      };\\n      var data = JSON.stringify(value);\\n      var cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\\n      // the differences of WebKitDataCue in safari and VTTCue in other browsers\\n\\n      cue.value = value;\\n      this.segmentMetadataTrack_.addCue(cue);\\n    }\\n  }]);\\n  return SegmentLoader;\\n}(videojs$1.EventTarget);\\n\\nvar uint8ToUtf8 = function uint8ToUtf8(uintArray) {\\n  return decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\\n};\\n/**\\n * @file vtt-segment-loader.js\\n */\\n\\n\\nvar VTT_LINE_TERMINATORS = new Uint8Array('\\\\n\\\\n'.split('').map(function (_char2) {\\n  return _char2.charCodeAt(0);\\n}));\\n/**\\n * An object that manages segment loading and appending.\\n *\\n * @class VTTSegmentLoader\\n * @param {Object} options required and optional options\\n * @extends videojs.EventTarget\\n */\\n\\nvar VTTSegmentLoader = function (_SegmentLoader) {\\n  inherits(VTTSegmentLoader, _SegmentLoader);\\n\\n  function VTTSegmentLoader(settings) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n    classCallCheck(this, VTTSegmentLoader); // SegmentLoader requires a MediaSource be specified or it will throw an error;\\n    // however, VTTSegmentLoader has no need of a media source, so delete the reference\\n\\n    var _this = possibleConstructorReturn(this, (VTTSegmentLoader.__proto__ || Object.getPrototypeOf(VTTSegmentLoader)).call(this, settings, options));\\n\\n    _this.mediaSource_ = null;\\n    _this.subtitlesTrack_ = null;\\n    _this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\\n    return _this;\\n  }\\n  /**\\n   * Indicates which time ranges are buffered\\n   *\\n   * @return {TimeRange}\\n   *         TimeRange object representing the current buffered ranges\\n   */\\n\\n\\n  createClass(VTTSegmentLoader, [{\\n    key: 'buffered_',\\n    value: function buffered_() {\\n      if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues.length) {\\n        return videojs$1.createTimeRanges();\\n      }\\n\\n      var cues = this.subtitlesTrack_.cues;\\n      var start = cues[0].startTime;\\n      var end = cues[cues.length - 1].startTime;\\n      return videojs$1.createTimeRanges([[start, end]]);\\n    }\\n    /**\\n     * Gets and sets init segment for the provided map\\n     *\\n     * @param {Object} map\\n     *        The map object representing the init segment to get or set\\n     * @param {Boolean=} set\\n     *        If true, the init segment for the provided map should be saved\\n     * @return {Object}\\n     *         map object for desired init segment\\n     */\\n\\n  }, {\\n    key: 'initSegment',\\n    value: function initSegment(map) {\\n      var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\\n\\n      if (!map) {\\n        return null;\\n      }\\n\\n      var id = initSegmentId(map);\\n      var storedMap = this.initSegments_[id];\\n\\n      if (set$$1 && !storedMap && map.bytes) {\\n        // append WebVTT line terminators to the media initialization segment if it exists\\n        // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\\n        // requires two or more WebVTT line terminators between the WebVTT header and the\\n        // rest of the file\\n        var combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\\n        var combinedSegment = new Uint8Array(combinedByteLength);\\n        combinedSegment.set(map.bytes);\\n        combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\\n        this.initSegments_[id] = storedMap = {\\n          resolvedUri: map.resolvedUri,\\n          byterange: map.byterange,\\n          bytes: combinedSegment\\n        };\\n      }\\n\\n      return storedMap || map;\\n    }\\n    /**\\n     * Returns true if all configuration required for loading is present, otherwise false.\\n     *\\n     * @return {Boolean} True if the all configuration is ready for loading\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'couldBeginLoading_',\\n    value: function couldBeginLoading_() {\\n      return this.playlist_ && this.subtitlesTrack_ && !this.paused();\\n    }\\n    /**\\n     * Once all the starting parameters have been specified, begin\\n     * operation. This method should only be invoked from the INIT\\n     * state.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'init_',\\n    value: function init_() {\\n      this.state = 'READY';\\n      this.resetEverything();\\n      return this.monitorBuffer_();\\n    }\\n    /**\\n     * Set a subtitle track on the segment loader to add subtitles to\\n     *\\n     * @param {TextTrack=} track\\n     *        The text track to add loaded subtitles to\\n     * @return {TextTrack}\\n     *        Returns the subtitles track\\n     */\\n\\n  }, {\\n    key: 'track',\\n    value: function track(_track) {\\n      if (typeof _track === 'undefined') {\\n        return this.subtitlesTrack_;\\n      }\\n\\n      this.subtitlesTrack_ = _track; // if we were unpaused but waiting for a sourceUpdater, start\\n      // buffering now\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        this.init_();\\n      }\\n\\n      return this.subtitlesTrack_;\\n    }\\n    /**\\n     * Remove any data in the source buffer between start and end times\\n     * @param {Number} start - the start time of the region to remove from the buffer\\n     * @param {Number} end - the end time of the region to remove from the buffer\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end) {\\n      removeCuesFromTrack(start, end, this.subtitlesTrack_);\\n    }\\n    /**\\n     * fill the buffer with segements unless the sourceBuffers are\\n     * currently updating\\n     *\\n     * Note: this function should only ever be called by monitorBuffer_\\n     * and never directly\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fillBuffer_',\\n    value: function fillBuffer_() {\\n      var _this2 = this;\\n\\n      if (!this.syncPoint_) {\\n        this.syncPoint_ = this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\\n      } // see if we need to begin loading immediately\\n\\n\\n      var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);\\n      segmentInfo = this.skipEmptySegments_(segmentInfo);\\n\\n      if (!segmentInfo) {\\n        return;\\n      }\\n\\n      if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\\n        // We don't have the timestamp offset that we need to sync subtitles.\\n        // Rerun on a timestamp offset or user interaction.\\n        var checkTimestampOffset = function checkTimestampOffset() {\\n          _this2.state = 'READY';\\n\\n          if (!_this2.paused()) {\\n            // if not paused, queue a buffer check as soon as possible\\n            _this2.monitorBuffer_();\\n          }\\n        };\\n\\n        this.syncController_.one('timestampoffset', checkTimestampOffset);\\n        this.state = 'WAITING_ON_TIMELINE';\\n        return;\\n      }\\n\\n      this.loadSegment_(segmentInfo);\\n    }\\n    /**\\n     * Prevents the segment loader from requesting segments we know contain no subtitles\\n     * by walking forward until we find the next segment that we don't know whether it is\\n     * empty or not.\\n     *\\n     * @param {Object} segmentInfo\\n     *        a segment info object that describes the current segment\\n     * @return {Object}\\n     *         a segment info object that describes the current segment\\n     */\\n\\n  }, {\\n    key: 'skipEmptySegments_',\\n    value: function skipEmptySegments_(segmentInfo) {\\n      while (segmentInfo && segmentInfo.segment.empty) {\\n        segmentInfo = this.generateSegmentInfo_(segmentInfo.playlist, segmentInfo.mediaIndex + 1, segmentInfo.startOfSegment + segmentInfo.duration, segmentInfo.isSyncRequest);\\n      }\\n\\n      return segmentInfo;\\n    }\\n    /**\\n     * append a decrypted segement to the SourceBuffer through a SourceUpdater\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleSegment_',\\n    value: function handleSegment_() {\\n      var _this3 = this;\\n\\n      if (!this.pendingSegment_ || !this.subtitlesTrack_) {\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      this.state = 'APPENDING';\\n      var segmentInfo = this.pendingSegment_;\\n      var segment = segmentInfo.segment; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\\n\\n      if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function' && this.subtitlesTrack_ && this.subtitlesTrack_.tech_) {\\n        var loadHandler = void 0;\\n\\n        var errorHandler = function errorHandler() {\\n          _this3.subtitlesTrack_.tech_.off('vttjsloaded', loadHandler);\\n\\n          _this3.error({\\n            message: 'Error loading vtt.js'\\n          });\\n\\n          _this3.state = 'READY';\\n\\n          _this3.pause();\\n\\n          _this3.trigger('error');\\n        };\\n\\n        loadHandler = function loadHandler() {\\n          _this3.subtitlesTrack_.tech_.off('vttjserror', errorHandler);\\n\\n          _this3.handleSegment_();\\n        };\\n\\n        this.state = 'WAITING_ON_VTTJS';\\n        this.subtitlesTrack_.tech_.one('vttjsloaded', loadHandler);\\n        this.subtitlesTrack_.tech_.one('vttjserror', errorHandler);\\n        return;\\n      }\\n\\n      segment.requested = true;\\n\\n      try {\\n        this.parseVTTCues_(segmentInfo);\\n      } catch (e) {\\n        this.error({\\n          message: e.message\\n        });\\n        this.state = 'READY';\\n        this.pause();\\n        return this.trigger('error');\\n      }\\n\\n      this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\\n\\n      if (segmentInfo.isSyncRequest) {\\n        this.trigger('syncinfoupdate');\\n        this.pendingSegment_ = null;\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      segmentInfo.byteLength = segmentInfo.bytes.byteLength;\\n      this.mediaSecondsLoaded += segment.duration;\\n\\n      if (segmentInfo.cues.length) {\\n        // remove any overlapping cues to prevent doubling\\n        this.remove(segmentInfo.cues[0].endTime, segmentInfo.cues[segmentInfo.cues.length - 1].endTime);\\n      }\\n\\n      segmentInfo.cues.forEach(function (cue) {\\n        _this3.subtitlesTrack_.addCue(_this3.featuresNativeTextTracks_ ? new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\\n      });\\n      this.handleUpdateEnd_();\\n    }\\n    /**\\n     * Uses the WebVTT parser to parse the segment response\\n     *\\n     * @param {Object} segmentInfo\\n     *        a segment info object that describes the current segment\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'parseVTTCues_',\\n    value: function parseVTTCues_(segmentInfo) {\\n      var decoder = void 0;\\n      var decodeBytesToString = false;\\n\\n      if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.TextDecoder === 'function') {\\n        decoder = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.TextDecoder('utf8');\\n      } else {\\n        decoder = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.StringDecoder();\\n        decodeBytesToString = true;\\n      }\\n\\n      var parser = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs, decoder);\\n      segmentInfo.cues = [];\\n      segmentInfo.timestampmap = {\\n        MPEGTS: 0,\\n        LOCAL: 0\\n      };\\n      parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\\n\\n      parser.ontimestampmap = function (map) {\\n        return segmentInfo.timestampmap = map;\\n      };\\n\\n      parser.onparsingerror = function (error) {\\n        videojs$1.log.warn('Error encountered when parsing cues: ' + error.message);\\n      };\\n\\n      if (segmentInfo.segment.map) {\\n        var mapData = segmentInfo.segment.map.bytes;\\n\\n        if (decodeBytesToString) {\\n          mapData = uint8ToUtf8(mapData);\\n        }\\n\\n        parser.parse(mapData);\\n      }\\n\\n      var segmentData = segmentInfo.bytes;\\n\\n      if (decodeBytesToString) {\\n        segmentData = uint8ToUtf8(segmentData);\\n      }\\n\\n      parser.parse(segmentData);\\n      parser.flush();\\n    }\\n    /**\\n     * Updates the start and end times of any cues parsed by the WebVTT parser using\\n     * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\\n     * from the SyncController\\n     *\\n     * @param {Object} segmentInfo\\n     *        a segment info object that describes the current segment\\n     * @param {Object} mappingObj\\n     *        object containing a mapping from TS to media time\\n     * @param {Object} playlist\\n     *        the playlist object containing the segment\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'updateTimeMapping_',\\n    value: function updateTimeMapping_(segmentInfo, mappingObj, playlist) {\\n      var segment = segmentInfo.segment;\\n\\n      if (!mappingObj) {\\n        // If the sync controller does not have a mapping of TS to Media Time for the\\n        // timeline, then we don't have enough information to update the cue\\n        // start/end times\\n        return;\\n      }\\n\\n      if (!segmentInfo.cues.length) {\\n        // If there are no cues, we also do not have enough information to figure out\\n        // segment timing. Mark that the segment contains no cues so we don't re-request\\n        // an empty segment.\\n        segment.empty = true;\\n        return;\\n      }\\n\\n      var timestampmap = segmentInfo.timestampmap;\\n      var diff = timestampmap.MPEGTS / 90000 - timestampmap.LOCAL + mappingObj.mapping;\\n      segmentInfo.cues.forEach(function (cue) {\\n        // First convert cue time to TS time using the timestamp-map provided within the vtt\\n        cue.startTime += diff;\\n        cue.endTime += diff;\\n      });\\n\\n      if (!playlist.syncInfo) {\\n        var firstStart = segmentInfo.cues[0].startTime;\\n        var lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\\n        playlist.syncInfo = {\\n          mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\\n          time: Math.min(firstStart, lastStart - segment.duration)\\n        };\\n      }\\n    }\\n  }]);\\n  return VTTSegmentLoader;\\n}(SegmentLoader);\\n/**\\n * @file ad-cue-tags.js\\n */\\n\\n/**\\n * Searches for an ad cue that overlaps with the given mediaTime\\n */\\n\\n\\nvar findAdCue = function findAdCue(track, mediaTime) {\\n  var cues = track.cues;\\n\\n  for (var i = 0; i < cues.length; i++) {\\n    var cue = cues[i];\\n\\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\\n      return cue;\\n    }\\n  }\\n\\n  return null;\\n};\\n\\nvar updateAdCues = function updateAdCues(media, track) {\\n  var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\\n\\n  if (!media.segments) {\\n    return;\\n  }\\n\\n  var mediaTime = offset;\\n  var cue = void 0;\\n\\n  for (var i = 0; i < media.segments.length; i++) {\\n    var segment = media.segments[i];\\n\\n    if (!cue) {\\n      // Since the cues will span for at least the segment duration, adding a fudge\\n      // factor of half segment duration will prevent duplicate cues from being\\n      // created when timing info is not exact (e.g. cue start time initialized\\n      // at 10.006677, but next call mediaTime is 10.003332 )\\n      cue = findAdCue(track, mediaTime + segment.duration / 2);\\n    }\\n\\n    if (cue) {\\n      if ('cueIn' in segment) {\\n        // Found a CUE-IN so end the cue\\n        cue.endTime = mediaTime;\\n        cue.adEndTime = mediaTime;\\n        mediaTime += segment.duration;\\n        cue = null;\\n        continue;\\n      }\\n\\n      if (mediaTime < cue.endTime) {\\n        // Already processed this mediaTime for this cue\\n        mediaTime += segment.duration;\\n        continue;\\n      } // otherwise extend cue until a CUE-IN is found\\n\\n\\n      cue.endTime += segment.duration;\\n    } else {\\n      if ('cueOut' in segment) {\\n        cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\\n        cue.adStartTime = mediaTime; // Assumes tag format to be\\n        // #EXT-X-CUE-OUT:30\\n\\n        cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\\n        track.addCue(cue);\\n      }\\n\\n      if ('cueOutCont' in segment) {\\n        // Entered into the middle of an ad cue\\n        var adOffset = void 0;\\n        var adTotal = void 0; // Assumes tag formate to be\\n        // #EXT-X-CUE-OUT-CONT:10/30\\n\\n        var _segment$cueOutCont$s = segment.cueOutCont.split('/').map(parseFloat);\\n\\n        var _segment$cueOutCont$s2 = slicedToArray(_segment$cueOutCont$s, 2);\\n\\n        adOffset = _segment$cueOutCont$s2[0];\\n        adTotal = _segment$cueOutCont$s2[1];\\n        cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(mediaTime, mediaTime + segment.duration, '');\\n        cue.adStartTime = mediaTime - adOffset;\\n        cue.adEndTime = cue.adStartTime + adTotal;\\n        track.addCue(cue);\\n      }\\n    }\\n\\n    mediaTime += segment.duration;\\n  }\\n};\\n/**\\n * @file sync-controller.js\\n */\\n\\n\\nvar tsprobe = mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19___default.a.inspect;\\nvar syncPointStrategies = [// Stategy \\\"VOD\\\": Handle the VOD-case where the sync-point is *always*\\n//                the equivalence display-time 0 === segment-index 0\\n{\\n  name: 'VOD',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    if (duration$$1 !== Infinity) {\\n      var syncPoint = {\\n        time: 0,\\n        segmentIndex: 0\\n      };\\n      return syncPoint;\\n    }\\n\\n    return null;\\n  }\\n}, // Stategy \\\"ProgramDateTime\\\": We have a program-date-time tag in this playlist\\n{\\n  name: 'ProgramDateTime',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    if (!syncController.datetimeToDisplayTime) {\\n      return null;\\n    }\\n\\n    var segments = playlist.segments || [];\\n    var syncPoint = null;\\n    var lastDistance = null;\\n    currentTime = currentTime || 0;\\n\\n    for (var i = 0; i < segments.length; i++) {\\n      var segment = segments[i];\\n\\n      if (segment.dateTimeObject) {\\n        var segmentTime = segment.dateTimeObject.getTime() / 1000;\\n        var segmentStart = segmentTime + syncController.datetimeToDisplayTime;\\n        var distance = Math.abs(currentTime - segmentStart); // Once the distance begins to increase, or if distance is 0, we have passed\\n        // currentTime and can stop looking for better candidates\\n\\n        if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\\n          break;\\n        }\\n\\n        lastDistance = distance;\\n        syncPoint = {\\n          time: segmentStart,\\n          segmentIndex: i\\n        };\\n      }\\n    }\\n\\n    return syncPoint;\\n  }\\n}, // Stategy \\\"Segment\\\": We have a known time mapping for a timeline and a\\n//                    segment in the current timeline with timing data\\n{\\n  name: 'Segment',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    var segments = playlist.segments || [];\\n    var syncPoint = null;\\n    var lastDistance = null;\\n    currentTime = currentTime || 0;\\n\\n    for (var i = 0; i < segments.length; i++) {\\n      var segment = segments[i];\\n\\n      if (segment.timeline === currentTimeline && typeof segment.start !== 'undefined') {\\n        var distance = Math.abs(currentTime - segment.start); // Once the distance begins to increase, we have passed\\n        // currentTime and can stop looking for better candidates\\n\\n        if (lastDistance !== null && lastDistance < distance) {\\n          break;\\n        }\\n\\n        if (!syncPoint || lastDistance === null || lastDistance >= distance) {\\n          lastDistance = distance;\\n          syncPoint = {\\n            time: segment.start,\\n            segmentIndex: i\\n          };\\n        }\\n      }\\n    }\\n\\n    return syncPoint;\\n  }\\n}, // Stategy \\\"Discontinuity\\\": We have a discontinuity with a known\\n//                          display-time\\n{\\n  name: 'Discontinuity',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    var syncPoint = null;\\n    currentTime = currentTime || 0;\\n\\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\\n      var lastDistance = null;\\n\\n      for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\\n        var segmentIndex = playlist.discontinuityStarts[i];\\n        var discontinuity = playlist.discontinuitySequence + i + 1;\\n        var discontinuitySync = syncController.discontinuities[discontinuity];\\n\\n        if (discontinuitySync) {\\n          var distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\\n          // currentTime and can stop looking for better candidates\\n\\n          if (lastDistance !== null && lastDistance < distance) {\\n            break;\\n          }\\n\\n          if (!syncPoint || lastDistance === null || lastDistance >= distance) {\\n            lastDistance = distance;\\n            syncPoint = {\\n              time: discontinuitySync.time,\\n              segmentIndex: segmentIndex\\n            };\\n          }\\n        }\\n      }\\n    }\\n\\n    return syncPoint;\\n  }\\n}, // Stategy \\\"Playlist\\\": We have a playlist with a known mapping of\\n//                     segment index to display time\\n{\\n  name: 'Playlist',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    if (playlist.syncInfo) {\\n      var syncPoint = {\\n        time: playlist.syncInfo.time,\\n        segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence\\n      };\\n      return syncPoint;\\n    }\\n\\n    return null;\\n  }\\n}];\\n\\nvar SyncController = function (_videojs$EventTarget) {\\n  inherits(SyncController, _videojs$EventTarget);\\n\\n  function SyncController() {\\n    classCallCheck(this, SyncController); // Segment Loader state variables...\\n    // ...for synching across variants\\n\\n    var _this = possibleConstructorReturn(this, (SyncController.__proto__ || Object.getPrototypeOf(SyncController)).call(this));\\n\\n    _this.inspectCache_ = undefined; // ...for synching across variants\\n\\n    _this.timelines = [];\\n    _this.discontinuities = [];\\n    _this.datetimeToDisplayTime = null;\\n    _this.logger_ = logger('SyncController');\\n    return _this;\\n  }\\n  /**\\n   * Find a sync-point for the playlist specified\\n   *\\n   * A sync-point is defined as a known mapping from display-time to\\n   * a segment-index in the current playlist.\\n   *\\n   * @param {Playlist} playlist\\n   *        The playlist that needs a sync-point\\n   * @param {Number} duration\\n   *        Duration of the MediaSource (Infinite if playing a live source)\\n   * @param {Number} currentTimeline\\n   *        The last timeline from which a segment was loaded\\n   * @returns {Object}\\n   *          A sync-point object\\n   */\\n\\n\\n  createClass(SyncController, [{\\n    key: 'getSyncPoint',\\n    value: function getSyncPoint(playlist, duration$$1, currentTimeline, currentTime) {\\n      var syncPoints = this.runStrategies_(playlist, duration$$1, currentTimeline, currentTime);\\n\\n      if (!syncPoints.length) {\\n        // Signal that we need to attempt to get a sync-point manually\\n        // by fetching a segment in the playlist and constructing\\n        // a sync-point from that information\\n        return null;\\n      } // Now find the sync-point that is closest to the currentTime because\\n      // that should result in the most accurate guess about which segment\\n      // to fetch\\n\\n\\n      return this.selectSyncPoint_(syncPoints, {\\n        key: 'time',\\n        value: currentTime\\n      });\\n    }\\n    /**\\n     * Calculate the amount of time that has expired off the playlist during playback\\n     *\\n     * @param {Playlist} playlist\\n     *        Playlist object to calculate expired from\\n     * @param {Number} duration\\n     *        Duration of the MediaSource (Infinity if playling a live source)\\n     * @returns {Number|null}\\n     *          The amount of time that has expired off the playlist during playback. Null\\n     *          if no sync-points for the playlist can be found.\\n     */\\n\\n  }, {\\n    key: 'getExpiredTime',\\n    value: function getExpiredTime(playlist, duration$$1) {\\n      if (!playlist || !playlist.segments) {\\n        return null;\\n      }\\n\\n      var syncPoints = this.runStrategies_(playlist, duration$$1, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\\n\\n      if (!syncPoints.length) {\\n        return null;\\n      }\\n\\n      var syncPoint = this.selectSyncPoint_(syncPoints, {\\n        key: 'segmentIndex',\\n        value: 0\\n      }); // If the sync-point is beyond the start of the playlist, we want to subtract the\\n      // duration from index 0 to syncPoint.segmentIndex instead of adding.\\n\\n      if (syncPoint.segmentIndex > 0) {\\n        syncPoint.time *= -1;\\n      }\\n\\n      return Math.abs(syncPoint.time + sumDurations(playlist, syncPoint.segmentIndex, 0));\\n    }\\n    /**\\n     * Runs each sync-point strategy and returns a list of sync-points returned by the\\n     * strategies\\n     *\\n     * @private\\n     * @param {Playlist} playlist\\n     *        The playlist that needs a sync-point\\n     * @param {Number} duration\\n     *        Duration of the MediaSource (Infinity if playing a live source)\\n     * @param {Number} currentTimeline\\n     *        The last timeline from which a segment was loaded\\n     * @returns {Array}\\n     *          A list of sync-point objects\\n     */\\n\\n  }, {\\n    key: 'runStrategies_',\\n    value: function runStrategies_(playlist, duration$$1, currentTimeline, currentTime) {\\n      var syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\\n\\n      for (var i = 0; i < syncPointStrategies.length; i++) {\\n        var strategy = syncPointStrategies[i];\\n        var syncPoint = strategy.run(this, playlist, duration$$1, currentTimeline, currentTime);\\n\\n        if (syncPoint) {\\n          syncPoint.strategy = strategy.name;\\n          syncPoints.push({\\n            strategy: strategy.name,\\n            syncPoint: syncPoint\\n          });\\n        }\\n      }\\n\\n      return syncPoints;\\n    }\\n    /**\\n     * Selects the sync-point nearest the specified target\\n     *\\n     * @private\\n     * @param {Array} syncPoints\\n     *        List of sync-points to select from\\n     * @param {Object} target\\n     *        Object specifying the property and value we are targeting\\n     * @param {String} target.key\\n     *        Specifies the property to target. Must be either 'time' or 'segmentIndex'\\n     * @param {Number} target.value\\n     *        The value to target for the specified key.\\n     * @returns {Object}\\n     *          The sync-point nearest the target\\n     */\\n\\n  }, {\\n    key: 'selectSyncPoint_',\\n    value: function selectSyncPoint_(syncPoints, target) {\\n      var bestSyncPoint = syncPoints[0].syncPoint;\\n      var bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\\n      var bestStrategy = syncPoints[0].strategy;\\n\\n      for (var i = 1; i < syncPoints.length; i++) {\\n        var newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\\n\\n        if (newDistance < bestDistance) {\\n          bestDistance = newDistance;\\n          bestSyncPoint = syncPoints[i].syncPoint;\\n          bestStrategy = syncPoints[i].strategy;\\n        }\\n      }\\n\\n      this.logger_('syncPoint for [' + target.key + ': ' + target.value + '] chosen with strategy' + (' [' + bestStrategy + ']: [time:' + bestSyncPoint.time + ',') + (' segmentIndex:' + bestSyncPoint.segmentIndex + ']'));\\n      return bestSyncPoint;\\n    }\\n    /**\\n     * Save any meta-data present on the segments when segments leave\\n     * the live window to the playlist to allow for synchronization at the\\n     * playlist level later.\\n     *\\n     * @param {Playlist} oldPlaylist - The previous active playlist\\n     * @param {Playlist} newPlaylist - The updated and most current playlist\\n     */\\n\\n  }, {\\n    key: 'saveExpiredSegmentInfo',\\n    value: function saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\\n      var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // When a segment expires from the playlist and it has a start time\\n      // save that information as a possible sync-point reference in future\\n\\n      for (var i = mediaSequenceDiff - 1; i >= 0; i--) {\\n        var lastRemovedSegment = oldPlaylist.segments[i];\\n\\n        if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\\n          newPlaylist.syncInfo = {\\n            mediaSequence: oldPlaylist.mediaSequence + i,\\n            time: lastRemovedSegment.start\\n          };\\n          this.logger_('playlist refresh sync: [time:' + newPlaylist.syncInfo.time + ',' + (' mediaSequence: ' + newPlaylist.syncInfo.mediaSequence + ']'));\\n          this.trigger('syncinfoupdate');\\n          break;\\n        }\\n      }\\n    }\\n    /**\\n     * Save the mapping from playlist's ProgramDateTime to display. This should\\n     * only ever happen once at the start of playback.\\n     *\\n     * @param {Playlist} playlist - The currently active playlist\\n     */\\n\\n  }, {\\n    key: 'setDateTimeMapping',\\n    value: function setDateTimeMapping(playlist) {\\n      if (!this.datetimeToDisplayTime && playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\\n        var playlistTimestamp = playlist.segments[0].dateTimeObject.getTime() / 1000;\\n        this.datetimeToDisplayTime = -playlistTimestamp;\\n      }\\n    }\\n    /**\\n     * Reset the state of the inspection cache when we do a rendition\\n     * switch\\n     */\\n\\n  }, {\\n    key: 'reset',\\n    value: function reset() {\\n      this.inspectCache_ = undefined;\\n    }\\n    /**\\n     * Probe or inspect a fmp4 or an mpeg2-ts segment to determine the start\\n     * and end of the segment in it's internal \\\"media time\\\". Used to generate\\n     * mappings from that internal \\\"media time\\\" to the display time that is\\n     * shown on the player.\\n     *\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     */\\n\\n  }, {\\n    key: 'probeSegmentInfo',\\n    value: function probeSegmentInfo(segmentInfo) {\\n      var segment = segmentInfo.segment;\\n      var playlist = segmentInfo.playlist;\\n      var timingInfo = void 0;\\n\\n      if (segment.map) {\\n        timingInfo = this.probeMp4Segment_(segmentInfo);\\n      } else {\\n        timingInfo = this.probeTsSegment_(segmentInfo);\\n      }\\n\\n      if (timingInfo) {\\n        if (this.calculateSegmentTimeMapping_(segmentInfo, timingInfo)) {\\n          this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\\n          // now with segment timing information\\n\\n          if (!playlist.syncInfo) {\\n            playlist.syncInfo = {\\n              mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\\n              time: segment.start\\n            };\\n          }\\n        }\\n      }\\n\\n      return timingInfo;\\n    }\\n    /**\\n     * Probe an fmp4 segment to determine the start of the segment\\n     * in it's internal \\\"composition time\\\", which is equal to the base\\n     * media decode time plus the composition time offset value\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     * @return {object} The start and end time of the current segment in \\\"composition time\\\"\\n     */\\n\\n  }, {\\n    key: 'probeMp4Segment_',\\n    value: function probeMp4Segment_(segmentInfo) {\\n      var segment = segmentInfo.segment; // get timescales from init segment\\n\\n      var timescales = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.timescale(segment.map.bytes); // calculate composition start time using the timescales and information\\n      // contained within the media segment\\n\\n      var compositionStartTime = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.compositionStartTime(timescales, segmentInfo.bytes);\\n\\n      if (segmentInfo.timestampOffset !== null) {\\n        segmentInfo.timestampOffset -= compositionStartTime;\\n      }\\n\\n      return {\\n        start: compositionStartTime,\\n        end: compositionStartTime + segment.duration\\n      };\\n    }\\n    /**\\n     * Probe an mpeg2-ts segment to determine the start and end of the segment\\n     * in it's internal \\\"media time\\\".\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     * @return {object} The start and end time of the current segment in \\\"media time\\\"\\n     */\\n\\n  }, {\\n    key: 'probeTsSegment_',\\n    value: function probeTsSegment_(segmentInfo) {\\n      var timeInfo = tsprobe(segmentInfo.bytes, this.inspectCache_);\\n      var segmentStartTime = void 0;\\n      var segmentEndTime = void 0;\\n      var segmentTimestampInfo = void 0;\\n\\n      if (!timeInfo) {\\n        return null;\\n      }\\n\\n      if (timeInfo.video && timeInfo.video.length === 2) {\\n        this.inspectCache_ = timeInfo.video[1].dts;\\n        segmentStartTime = timeInfo.video[0].dtsTime;\\n        segmentEndTime = timeInfo.video[1].dtsTime;\\n        segmentTimestampInfo = timeInfo.video;\\n      } else if (timeInfo.audio && timeInfo.audio.length === 2) {\\n        this.inspectCache_ = timeInfo.audio[1].dts;\\n        segmentStartTime = timeInfo.audio[0].dtsTime;\\n        segmentEndTime = timeInfo.audio[1].dtsTime;\\n        segmentTimestampInfo = timeInfo.audio;\\n      }\\n\\n      var probedInfo = {\\n        segmentTimestampInfo: segmentTimestampInfo,\\n        start: segmentStartTime,\\n        end: segmentEndTime,\\n        containsVideo: timeInfo.video && timeInfo.video.length === 2,\\n        containsAudio: timeInfo.audio && timeInfo.audio.length === 2\\n      };\\n      return probedInfo;\\n    }\\n  }, {\\n    key: 'timestampOffsetForTimeline',\\n    value: function timestampOffsetForTimeline(timeline) {\\n      if (typeof this.timelines[timeline] === 'undefined') {\\n        return null;\\n      }\\n\\n      return this.timelines[timeline].time;\\n    }\\n  }, {\\n    key: 'mappingForTimeline',\\n    value: function mappingForTimeline(timeline) {\\n      if (typeof this.timelines[timeline] === 'undefined') {\\n        return null;\\n      }\\n\\n      return this.timelines[timeline].mapping;\\n    }\\n    /**\\n     * Use the \\\"media time\\\" for a segment to generate a mapping to \\\"display time\\\" and\\n     * save that display time to the segment.\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo\\n     *        The current active request information\\n     * @param {object} timingInfo\\n     *        The start and end time of the current segment in \\\"media time\\\"\\n     * @returns {Boolean}\\n     *          Returns false if segment time mapping could not be calculated\\n     */\\n\\n  }, {\\n    key: 'calculateSegmentTimeMapping_',\\n    value: function calculateSegmentTimeMapping_(segmentInfo, timingInfo) {\\n      var segment = segmentInfo.segment;\\n      var mappingObj = this.timelines[segmentInfo.timeline];\\n\\n      if (segmentInfo.timestampOffset !== null) {\\n        mappingObj = {\\n          time: segmentInfo.startOfSegment,\\n          mapping: segmentInfo.startOfSegment - timingInfo.start\\n        };\\n        this.timelines[segmentInfo.timeline] = mappingObj;\\n        this.trigger('timestampoffset');\\n        this.logger_('time mapping for timeline ' + segmentInfo.timeline + ': ' + ('[time: ' + mappingObj.time + '] [mapping: ' + mappingObj.mapping + ']'));\\n        segment.start = segmentInfo.startOfSegment;\\n        segment.end = timingInfo.end + mappingObj.mapping;\\n      } else if (mappingObj) {\\n        segment.start = timingInfo.start + mappingObj.mapping;\\n        segment.end = timingInfo.end + mappingObj.mapping;\\n      } else {\\n        return false;\\n      }\\n\\n      return true;\\n    }\\n    /**\\n     * Each time we have discontinuity in the playlist, attempt to calculate the location\\n     * in display of the start of the discontinuity and save that. We also save an accuracy\\n     * value so that we save values with the most accuracy (closest to 0.)\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     */\\n\\n  }, {\\n    key: 'saveDiscontinuitySyncInfo_',\\n    value: function saveDiscontinuitySyncInfo_(segmentInfo) {\\n      var playlist = segmentInfo.playlist;\\n      var segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\\n      // the start of the range and it's accuracy is 0 (greater accuracy values\\n      // mean more approximation)\\n\\n      if (segment.discontinuity) {\\n        this.discontinuities[segment.timeline] = {\\n          time: segment.start,\\n          accuracy: 0\\n        };\\n      } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\\n        // Search for future discontinuities that we can provide better timing\\n        // information for and save that information for sync purposes\\n        for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\\n          var segmentIndex = playlist.discontinuityStarts[i];\\n          var discontinuity = playlist.discontinuitySequence + i + 1;\\n          var mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\\n          var accuracy = Math.abs(mediaIndexDiff);\\n\\n          if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\\n            var time = void 0;\\n\\n            if (mediaIndexDiff < 0) {\\n              time = segment.start - sumDurations(playlist, segmentInfo.mediaIndex, segmentIndex);\\n            } else {\\n              time = segment.end + sumDurations(playlist, segmentInfo.mediaIndex + 1, segmentIndex);\\n            }\\n\\n            this.discontinuities[discontinuity] = {\\n              time: time,\\n              accuracy: accuracy\\n            };\\n          }\\n        }\\n      }\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.off();\\n    }\\n  }]);\\n  return SyncController;\\n}(videojs$1.EventTarget);\\n\\nvar Decrypter$1 = new shimWorker(\\\"./decrypter-worker.worker.js\\\", function (window, document$$1) {\\n  var self = this;\\n\\n  var decrypterWorker = function () {\\n    /*\\n     * pkcs7.pad\\n     * https://github.com/brightcove/pkcs7\\n     *\\n     * Copyright (c) 2014 Brightcove\\n     * Licensed under the apache2 license.\\n     */\\n\\n    /**\\n     * Returns the subarray of a Uint8Array without PKCS#7 padding.\\n     * @param padded {Uint8Array} unencrypted bytes that have been padded\\n     * @return {Uint8Array} the unpadded bytes\\n     * @see http://tools.ietf.org/html/rfc5652\\n     */\\n    function unpad(padded) {\\n      return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\\n    }\\n\\n    var classCallCheck = function classCallCheck(instance, Constructor) {\\n      if (!(instance instanceof Constructor)) {\\n        throw new TypeError(\\\"Cannot call a class as a function\\\");\\n      }\\n    };\\n\\n    var createClass = function () {\\n      function defineProperties(target, props) {\\n        for (var i = 0; i < props.length; i++) {\\n          var descriptor = props[i];\\n          descriptor.enumerable = descriptor.enumerable || false;\\n          descriptor.configurable = true;\\n          if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n          Object.defineProperty(target, descriptor.key, descriptor);\\n        }\\n      }\\n\\n      return function (Constructor, protoProps, staticProps) {\\n        if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n        if (staticProps) defineProperties(Constructor, staticProps);\\n        return Constructor;\\n      };\\n    }();\\n\\n    var inherits = function inherits(subClass, superClass) {\\n      if (typeof superClass !== \\\"function\\\" && superClass !== null) {\\n        throw new TypeError(\\\"Super expression must either be null or a function, not \\\" + typeof superClass);\\n      }\\n\\n      subClass.prototype = Object.create(superClass && superClass.prototype, {\\n        constructor: {\\n          value: subClass,\\n          enumerable: false,\\n          writable: true,\\n          configurable: true\\n        }\\n      });\\n      if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\\n    };\\n\\n    var possibleConstructorReturn = function possibleConstructorReturn(self, call) {\\n      if (!self) {\\n        throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n      }\\n\\n      return call && (typeof call === \\\"object\\\" || typeof call === \\\"function\\\") ? call : self;\\n    };\\n    /**\\n     * @file aes.js\\n     *\\n     * This file contains an adaptation of the AES decryption algorithm\\n     * from the Standford Javascript Cryptography Library. That work is\\n     * covered by the following copyright and permissions notice:\\n     *\\n     * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\\n     * All rights reserved.\\n     *\\n     * Redistribution and use in source and binary forms, with or without\\n     * modification, are permitted provided that the following conditions are\\n     * met:\\n     *\\n     * 1. Redistributions of source code must retain the above copyright\\n     *    notice, this list of conditions and the following disclaimer.\\n     *\\n     * 2. Redistributions in binary form must reproduce the above\\n     *    copyright notice, this list of conditions and the following\\n     *    disclaimer in the documentation and/or other materials provided\\n     *    with the distribution.\\n     *\\n     * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\\n     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n     * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\\n     * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\\n     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\n     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\n     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\\n     * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\\n     * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\\n     * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n     *\\n     * The views and conclusions contained in the software and documentation\\n     * are those of the authors and should not be interpreted as representing\\n     * official policies, either expressed or implied, of the authors.\\n     */\\n\\n    /**\\n     * Expand the S-box tables.\\n     *\\n     * @private\\n     */\\n\\n\\n    var precompute = function precompute() {\\n      var tables = [[[], [], [], [], []], [[], [], [], [], []]];\\n      var encTable = tables[0];\\n      var decTable = tables[1];\\n      var sbox = encTable[4];\\n      var sboxInv = decTable[4];\\n      var i = void 0;\\n      var x = void 0;\\n      var xInv = void 0;\\n      var d = [];\\n      var th = [];\\n      var x2 = void 0;\\n      var x4 = void 0;\\n      var x8 = void 0;\\n      var s = void 0;\\n      var tEnc = void 0;\\n      var tDec = void 0; // Compute double and third tables\\n\\n      for (i = 0; i < 256; i++) {\\n        th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\\n      }\\n\\n      for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\\n        // Compute sbox\\n        s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\\n        s = s >> 8 ^ s & 255 ^ 99;\\n        sbox[x] = s;\\n        sboxInv[s] = x; // Compute MixColumns\\n\\n        x8 = d[x4 = d[x2 = d[x]]];\\n        tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\\n        tEnc = d[s] * 0x101 ^ s * 0x1010100;\\n\\n        for (i = 0; i < 4; i++) {\\n          encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\\n          decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\\n        }\\n      } // Compactify. Considerable speedup on Firefox.\\n\\n\\n      for (i = 0; i < 5; i++) {\\n        encTable[i] = encTable[i].slice(0);\\n        decTable[i] = decTable[i].slice(0);\\n      }\\n\\n      return tables;\\n    };\\n\\n    var aesTables = null;\\n    /**\\n     * Schedule out an AES key for both encryption and decryption. This\\n     * is a low-level class. Use a cipher mode to do bulk encryption.\\n     *\\n     * @class AES\\n     * @param key {Array} The key as an array of 4, 6 or 8 words.\\n     */\\n\\n    var AES = function () {\\n      function AES(key) {\\n        classCallCheck(this, AES);\\n        /**\\n         * The expanded S-box and inverse S-box tables. These will be computed\\n         * on the client so that we don't have to send them down the wire.\\n         *\\n         * There are two tables, _tables[0] is for encryption and\\n         * _tables[1] is for decryption.\\n         *\\n         * The first 4 sub-tables are the expanded S-box with MixColumns. The\\n         * last (_tables[01][4]) is the S-box itself.\\n         *\\n         * @private\\n         */\\n        // if we have yet to precompute the S-box tables\\n        // do so now\\n\\n        if (!aesTables) {\\n          aesTables = precompute();\\n        } // then make a copy of that object for use\\n\\n\\n        this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\\n        var i = void 0;\\n        var j = void 0;\\n        var tmp = void 0;\\n        var encKey = void 0;\\n        var decKey = void 0;\\n        var sbox = this._tables[0][4];\\n        var decTable = this._tables[1];\\n        var keyLen = key.length;\\n        var rcon = 1;\\n\\n        if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\\n          throw new Error('Invalid aes key size');\\n        }\\n\\n        encKey = key.slice(0);\\n        decKey = [];\\n        this._key = [encKey, decKey]; // schedule encryption keys\\n\\n        for (i = keyLen; i < 4 * keyLen + 28; i++) {\\n          tmp = encKey[i - 1]; // apply sbox\\n\\n          if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\\n            tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\\n\\n            if (i % keyLen === 0) {\\n              tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\\n              rcon = rcon << 1 ^ (rcon >> 7) * 283;\\n            }\\n          }\\n\\n          encKey[i] = encKey[i - keyLen] ^ tmp;\\n        } // schedule decryption keys\\n\\n\\n        for (j = 0; i; j++, i--) {\\n          tmp = encKey[j & 3 ? i : i - 4];\\n\\n          if (i <= 4 || j < 4) {\\n            decKey[j] = tmp;\\n          } else {\\n            decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\\n          }\\n        }\\n      }\\n      /**\\n       * Decrypt 16 bytes, specified as four 32-bit words.\\n       *\\n       * @param {Number} encrypted0 the first word to decrypt\\n       * @param {Number} encrypted1 the second word to decrypt\\n       * @param {Number} encrypted2 the third word to decrypt\\n       * @param {Number} encrypted3 the fourth word to decrypt\\n       * @param {Int32Array} out the array to write the decrypted words\\n       * into\\n       * @param {Number} offset the offset into the output array to start\\n       * writing results\\n       * @return {Array} The plaintext.\\n       */\\n\\n\\n      AES.prototype.decrypt = function decrypt$$1(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\\n        var key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\\n\\n        var a = encrypted0 ^ key[0];\\n        var b = encrypted3 ^ key[1];\\n        var c = encrypted2 ^ key[2];\\n        var d = encrypted1 ^ key[3];\\n        var a2 = void 0;\\n        var b2 = void 0;\\n        var c2 = void 0; // key.length === 2 ?\\n\\n        var nInnerRounds = key.length / 4 - 2;\\n        var i = void 0;\\n        var kIndex = 4;\\n        var table = this._tables[1]; // load up the tables\\n\\n        var table0 = table[0];\\n        var table1 = table[1];\\n        var table2 = table[2];\\n        var table3 = table[3];\\n        var sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\\n\\n        for (i = 0; i < nInnerRounds; i++) {\\n          a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\\n          b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\\n          c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\\n          d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\\n          kIndex += 4;\\n          a = a2;\\n          b = b2;\\n          c = c2;\\n        } // Last round.\\n\\n\\n        for (i = 0; i < 4; i++) {\\n          out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\\n          a2 = a;\\n          a = b;\\n          b = c;\\n          c = d;\\n          d = a2;\\n        }\\n      };\\n\\n      return AES;\\n    }();\\n    /**\\n     * @file stream.js\\n     */\\n\\n    /**\\n     * A lightweight readable stream implemention that handles event dispatching.\\n     *\\n     * @class Stream\\n     */\\n\\n\\n    var Stream = function () {\\n      function Stream() {\\n        classCallCheck(this, Stream);\\n        this.listeners = {};\\n      }\\n      /**\\n       * Add a listener for a specified event type.\\n       *\\n       * @param {String} type the event name\\n       * @param {Function} listener the callback to be invoked when an event of\\n       * the specified type occurs\\n       */\\n\\n\\n      Stream.prototype.on = function on(type, listener) {\\n        if (!this.listeners[type]) {\\n          this.listeners[type] = [];\\n        }\\n\\n        this.listeners[type].push(listener);\\n      };\\n      /**\\n       * Remove a listener for a specified event type.\\n       *\\n       * @param {String} type the event name\\n       * @param {Function} listener  a function previously registered for this\\n       * type of event through `on`\\n       * @return {Boolean} if we could turn it off or not\\n       */\\n\\n\\n      Stream.prototype.off = function off(type, listener) {\\n        if (!this.listeners[type]) {\\n          return false;\\n        }\\n\\n        var index = this.listeners[type].indexOf(listener);\\n        this.listeners[type].splice(index, 1);\\n        return index > -1;\\n      };\\n      /**\\n       * Trigger an event of the specified type on this stream. Any additional\\n       * arguments to this function are passed as parameters to event listeners.\\n       *\\n       * @param {String} type the event name\\n       */\\n\\n\\n      Stream.prototype.trigger = function trigger(type) {\\n        var callbacks = this.listeners[type];\\n\\n        if (!callbacks) {\\n          return;\\n        } // Slicing the arguments on every invocation of this method\\n        // can add a significant amount of overhead. Avoid the\\n        // intermediate object creation for the common case of a\\n        // single callback argument\\n\\n\\n        if (arguments.length === 2) {\\n          var length = callbacks.length;\\n\\n          for (var i = 0; i < length; ++i) {\\n            callbacks[i].call(this, arguments[1]);\\n          }\\n        } else {\\n          var args = Array.prototype.slice.call(arguments, 1);\\n          var _length = callbacks.length;\\n\\n          for (var _i = 0; _i < _length; ++_i) {\\n            callbacks[_i].apply(this, args);\\n          }\\n        }\\n      };\\n      /**\\n       * Destroys the stream and cleans up.\\n       */\\n\\n\\n      Stream.prototype.dispose = function dispose() {\\n        this.listeners = {};\\n      };\\n      /**\\n       * Forwards all `data` events on this stream to the destination stream. The\\n       * destination stream should provide a method `push` to receive the data\\n       * events as they arrive.\\n       *\\n       * @param {Stream} destination the stream that will receive all `data` events\\n       * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n       */\\n\\n\\n      Stream.prototype.pipe = function pipe(destination) {\\n        this.on('data', function (data) {\\n          destination.push(data);\\n        });\\n      };\\n\\n      return Stream;\\n    }();\\n    /**\\n     * @file async-stream.js\\n     */\\n\\n    /**\\n     * A wrapper around the Stream class to use setTiemout\\n     * and run stream \\\"jobs\\\" Asynchronously\\n     *\\n     * @class AsyncStream\\n     * @extends Stream\\n     */\\n\\n\\n    var AsyncStream$$1 = function (_Stream) {\\n      inherits(AsyncStream$$1, _Stream);\\n\\n      function AsyncStream$$1() {\\n        classCallCheck(this, AsyncStream$$1);\\n\\n        var _this = possibleConstructorReturn(this, _Stream.call(this, Stream));\\n\\n        _this.jobs = [];\\n        _this.delay = 1;\\n        _this.timeout_ = null;\\n        return _this;\\n      }\\n      /**\\n       * process an async job\\n       *\\n       * @private\\n       */\\n\\n\\n      AsyncStream$$1.prototype.processJob_ = function processJob_() {\\n        this.jobs.shift()();\\n\\n        if (this.jobs.length) {\\n          this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n        } else {\\n          this.timeout_ = null;\\n        }\\n      };\\n      /**\\n       * push a job into the stream\\n       *\\n       * @param {Function} job the job to push into the stream\\n       */\\n\\n\\n      AsyncStream$$1.prototype.push = function push(job) {\\n        this.jobs.push(job);\\n\\n        if (!this.timeout_) {\\n          this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n        }\\n      };\\n\\n      return AsyncStream$$1;\\n    }(Stream);\\n    /**\\n     * @file decrypter.js\\n     *\\n     * An asynchronous implementation of AES-128 CBC decryption with\\n     * PKCS#7 padding.\\n     */\\n\\n    /**\\n     * Convert network-order (big-endian) bytes into their little-endian\\n     * representation.\\n     */\\n\\n\\n    var ntoh = function ntoh(word) {\\n      return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\\n    };\\n    /**\\n     * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\\n     *\\n     * @param {Uint8Array} encrypted the encrypted bytes\\n     * @param {Uint32Array} key the bytes of the decryption key\\n     * @param {Uint32Array} initVector the initialization vector (IV) to\\n     * use for the first round of CBC.\\n     * @return {Uint8Array} the decrypted bytes\\n     *\\n     * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\\n     * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\\n     * @see https://tools.ietf.org/html/rfc2315\\n     */\\n\\n\\n    var decrypt$$1 = function decrypt$$1(encrypted, key, initVector) {\\n      // word-level access to the encrypted bytes\\n      var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\\n      var decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\\n\\n      var decrypted = new Uint8Array(encrypted.byteLength);\\n      var decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\\n      // decrypted data\\n\\n      var init0 = void 0;\\n      var init1 = void 0;\\n      var init2 = void 0;\\n      var init3 = void 0;\\n      var encrypted0 = void 0;\\n      var encrypted1 = void 0;\\n      var encrypted2 = void 0;\\n      var encrypted3 = void 0; // iteration variable\\n\\n      var wordIx = void 0; // pull out the words of the IV to ensure we don't modify the\\n      // passed-in reference and easier access\\n\\n      init0 = initVector[0];\\n      init1 = initVector[1];\\n      init2 = initVector[2];\\n      init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\\n      // to each decrypted block\\n\\n      for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\\n        // convert big-endian (network order) words into little-endian\\n        // (javascript order)\\n        encrypted0 = ntoh(encrypted32[wordIx]);\\n        encrypted1 = ntoh(encrypted32[wordIx + 1]);\\n        encrypted2 = ntoh(encrypted32[wordIx + 2]);\\n        encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\\n\\n        decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\\n        // plaintext\\n\\n        decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\\n        decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\\n        decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\\n        decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\\n\\n        init0 = encrypted0;\\n        init1 = encrypted1;\\n        init2 = encrypted2;\\n        init3 = encrypted3;\\n      }\\n\\n      return decrypted;\\n    };\\n    /**\\n     * The `Decrypter` class that manages decryption of AES\\n     * data through `AsyncStream` objects and the `decrypt`\\n     * function\\n     *\\n     * @param {Uint8Array} encrypted the encrypted bytes\\n     * @param {Uint32Array} key the bytes of the decryption key\\n     * @param {Uint32Array} initVector the initialization vector (IV) to\\n     * @param {Function} done the function to run when done\\n     * @class Decrypter\\n     */\\n\\n\\n    var Decrypter$$1 = function () {\\n      function Decrypter$$1(encrypted, key, initVector, done) {\\n        classCallCheck(this, Decrypter$$1);\\n        var step = Decrypter$$1.STEP;\\n        var encrypted32 = new Int32Array(encrypted.buffer);\\n        var decrypted = new Uint8Array(encrypted.byteLength);\\n        var i = 0;\\n        this.asyncStream_ = new AsyncStream$$1(); // split up the encryption job and do the individual chunks asynchronously\\n\\n        this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n\\n        for (i = step; i < encrypted32.length; i += step) {\\n          initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\\n          this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n        } // invoke the done() callback when everything is finished\\n\\n\\n        this.asyncStream_.push(function () {\\n          // remove pkcs#7 padding from the decrypted bytes\\n          done(null, unpad(decrypted));\\n        });\\n      }\\n      /**\\n       * a getter for step the maximum number of bytes to process at one time\\n       *\\n       * @return {Number} the value of step 32000\\n       */\\n\\n      /**\\n       * @private\\n       */\\n\\n\\n      Decrypter$$1.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\\n        return function () {\\n          var bytes = decrypt$$1(encrypted, key, initVector);\\n          decrypted.set(bytes, encrypted.byteOffset);\\n        };\\n      };\\n\\n      createClass(Decrypter$$1, null, [{\\n        key: 'STEP',\\n        get: function get$$1() {\\n          // 4 * 8000;\\n          return 32000;\\n        }\\n      }]);\\n      return Decrypter$$1;\\n    }();\\n    /**\\n     * @file bin-utils.js\\n     */\\n\\n    /**\\n     * Creates an object for sending to a web worker modifying properties that are TypedArrays\\n     * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\\n     *\\n     * @param {Object} message\\n     *        Object of properties and values to send to the web worker\\n     * @return {Object}\\n     *         Modified message with TypedArray values expanded\\n     * @function createTransferableMessage\\n     */\\n\\n\\n    var createTransferableMessage = function createTransferableMessage(message) {\\n      var transferable = {};\\n      Object.keys(message).forEach(function (key) {\\n        var value = message[key];\\n\\n        if (ArrayBuffer.isView(value)) {\\n          transferable[key] = {\\n            bytes: value.buffer,\\n            byteOffset: value.byteOffset,\\n            byteLength: value.byteLength\\n          };\\n        } else {\\n          transferable[key] = value;\\n        }\\n      });\\n      return transferable;\\n    };\\n    /**\\n     * Our web worker interface so that things can talk to aes-decrypter\\n     * that will be running in a web worker. the scope is passed to this by\\n     * webworkify.\\n     *\\n     * @param {Object} self\\n     *        the scope for the web worker\\n     */\\n\\n\\n    var DecrypterWorker = function DecrypterWorker(self) {\\n      self.onmessage = function (event) {\\n        var data = event.data;\\n        var encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\\n        var key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\\n        var iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\\n        /* eslint-disable no-new, handle-callback-err */\\n\\n        new Decrypter$$1(encrypted, key, iv, function (err, bytes) {\\n          self.postMessage(createTransferableMessage({\\n            source: data.source,\\n            decrypted: bytes\\n          }), [bytes.buffer]);\\n        });\\n        /* eslint-enable */\\n      };\\n    };\\n\\n    var decrypterWorker = new DecrypterWorker(self);\\n    return decrypterWorker;\\n  }();\\n});\\n/**\\n * Convert the properties of an HLS track into an audioTrackKind.\\n *\\n * @private\\n */\\n\\nvar audioTrackKind_ = function audioTrackKind_(properties) {\\n  var kind = properties[\\\"default\\\"] ? 'main' : 'alternative';\\n\\n  if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\\n    kind = 'main-desc';\\n  }\\n\\n  return kind;\\n};\\n/**\\n * Pause provided segment loader and playlist loader if active\\n *\\n * @param {SegmentLoader} segmentLoader\\n *        SegmentLoader to pause\\n * @param {Object} mediaType\\n *        Active media type\\n * @function stopLoaders\\n */\\n\\n\\nvar stopLoaders = function stopLoaders(segmentLoader, mediaType) {\\n  segmentLoader.abort();\\n  segmentLoader.pause();\\n\\n  if (mediaType && mediaType.activePlaylistLoader) {\\n    mediaType.activePlaylistLoader.pause();\\n    mediaType.activePlaylistLoader = null;\\n  }\\n};\\n/**\\n * Start loading provided segment loader and playlist loader\\n *\\n * @param {PlaylistLoader} playlistLoader\\n *        PlaylistLoader to start loading\\n * @param {Object} mediaType\\n *        Active media type\\n * @function startLoaders\\n */\\n\\n\\nvar startLoaders = function startLoaders(playlistLoader, mediaType) {\\n  // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\\n  // playlist loader\\n  mediaType.activePlaylistLoader = playlistLoader;\\n  playlistLoader.load();\\n};\\n/**\\n * Returns a function to be called when the media group changes. It performs a\\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\\n * change of group is merely a rendition switch of the same content at another encoding,\\n * rather than a change of content, such as switching audio from English to Spanish.\\n *\\n * @param {String} type\\n *        MediaGroup type\\n * @param {Object} settings\\n *        Object containing required information for media groups\\n * @return {Function}\\n *         Handler for a non-destructive resync of SegmentLoader when the active media\\n *         group changes.\\n * @function onGroupChanged\\n */\\n\\n\\nvar onGroupChanged = function onGroupChanged(type, settings) {\\n  return function () {\\n    var _settings$segmentLoad = settings.segmentLoaders,\\n        segmentLoader = _settings$segmentLoad[type],\\n        mainSegmentLoader = _settings$segmentLoad.main,\\n        mediaType = settings.mediaTypes[type];\\n    var activeTrack = mediaType.activeTrack();\\n    var activeGroup = mediaType.activeGroup(activeTrack);\\n    var previousActiveLoader = mediaType.activePlaylistLoader;\\n    stopLoaders(segmentLoader, mediaType);\\n\\n    if (!activeGroup) {\\n      // there is no group active\\n      return;\\n    }\\n\\n    if (!activeGroup.playlistLoader) {\\n      if (previousActiveLoader) {\\n        // The previous group had a playlist loader but the new active group does not\\n        // this means we are switching from demuxed to muxed audio. In this case we want to\\n        // do a destructive reset of the main segment loader and not restart the audio\\n        // loaders.\\n        mainSegmentLoader.resetEverything();\\n      }\\n\\n      return;\\n    } // Non-destructive resync\\n\\n\\n    segmentLoader.resyncLoader();\\n    startLoaders(activeGroup.playlistLoader, mediaType);\\n  };\\n};\\n/**\\n * Returns a function to be called when the media track changes. It performs a\\n * destructive reset of the SegmentLoader to ensure we start loading as close to\\n * currentTime as possible.\\n *\\n * @param {String} type\\n *        MediaGroup type\\n * @param {Object} settings\\n *        Object containing required information for media groups\\n * @return {Function}\\n *         Handler for a destructive reset of SegmentLoader when the active media\\n *         track changes.\\n * @function onTrackChanged\\n */\\n\\n\\nvar onTrackChanged = function onTrackChanged(type, settings) {\\n  return function () {\\n    var _settings$segmentLoad2 = settings.segmentLoaders,\\n        segmentLoader = _settings$segmentLoad2[type],\\n        mainSegmentLoader = _settings$segmentLoad2.main,\\n        mediaType = settings.mediaTypes[type];\\n    var activeTrack = mediaType.activeTrack();\\n    var activeGroup = mediaType.activeGroup(activeTrack);\\n    var previousActiveLoader = mediaType.activePlaylistLoader;\\n    stopLoaders(segmentLoader, mediaType);\\n\\n    if (!activeGroup) {\\n      // there is no group active so we do not want to restart loaders\\n      return;\\n    }\\n\\n    if (!activeGroup.playlistLoader) {\\n      // when switching from demuxed audio/video to muxed audio/video (noted by no playlist\\n      // loader for the audio group), we want to do a destructive reset of the main segment\\n      // loader and not restart the audio loaders\\n      mainSegmentLoader.resetEverything();\\n      return;\\n    }\\n\\n    if (previousActiveLoader === activeGroup.playlistLoader) {\\n      // Nothing has actually changed. This can happen because track change events can fire\\n      // multiple times for a \\\"single\\\" change. One for enabling the new active track, and\\n      // one for disabling the track that was active\\n      startLoaders(activeGroup.playlistLoader, mediaType);\\n      return;\\n    }\\n\\n    if (segmentLoader.track) {\\n      // For WebVTT, set the new text track in the segmentloader\\n      segmentLoader.track(activeTrack);\\n    } // destructive reset\\n\\n\\n    segmentLoader.resetEverything();\\n    startLoaders(activeGroup.playlistLoader, mediaType);\\n  };\\n};\\n\\nvar onError = {\\n  /**\\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\\n   * an error.\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Error handler. Logs warning (or error if the playlist is blacklisted) to\\n   *         console and switches back to default audio track.\\n   * @function onError.AUDIO\\n   */\\n  AUDIO: function AUDIO(type, settings) {\\n    return function () {\\n      var segmentLoader = settings.segmentLoaders[type],\\n          mediaType = settings.mediaTypes[type],\\n          blacklistCurrentPlaylist = settings.blacklistCurrentPlaylist;\\n      stopLoaders(segmentLoader, mediaType); // switch back to default audio track\\n\\n      var activeTrack = mediaType.activeTrack();\\n      var activeGroup = mediaType.activeGroup();\\n      var id = (activeGroup.filter(function (group) {\\n        return group[\\\"default\\\"];\\n      })[0] || activeGroup[0]).id;\\n      var defaultTrack = mediaType.tracks[id];\\n\\n      if (activeTrack === defaultTrack) {\\n        // Default track encountered an error. All we can do now is blacklist the current\\n        // rendition and hope another will switch audio groups\\n        blacklistCurrentPlaylist({\\n          message: 'Problem encountered loading the default audio track.'\\n        });\\n        return;\\n      }\\n\\n      videojs$1.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\\n\\n      for (var trackId in mediaType.tracks) {\\n        mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\\n      }\\n\\n      mediaType.onTrackChanged();\\n    };\\n  },\\n\\n  /**\\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\\n   * an error.\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Error handler. Logs warning to console and disables the active subtitle track\\n   * @function onError.SUBTITLES\\n   */\\n  SUBTITLES: function SUBTITLES(type, settings) {\\n    return function () {\\n      var segmentLoader = settings.segmentLoaders[type],\\n          mediaType = settings.mediaTypes[type];\\n      videojs$1.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\\n      stopLoaders(segmentLoader, mediaType);\\n      var track = mediaType.activeTrack();\\n\\n      if (track) {\\n        track.mode = 'disabled';\\n      }\\n\\n      mediaType.onTrackChanged();\\n    };\\n  }\\n};\\nvar setupListeners = {\\n  /**\\n   * Setup event listeners for audio playlist loader\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {PlaylistLoader|null} playlistLoader\\n   *        PlaylistLoader to register listeners on\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function setupListeners.AUDIO\\n   */\\n  AUDIO: function AUDIO(type, playlistLoader, settings) {\\n    if (!playlistLoader) {\\n      // no playlist loader means audio will be muxed with the video\\n      return;\\n    }\\n\\n    var tech = settings.tech,\\n        requestOptions = settings.requestOptions,\\n        segmentLoader = settings.segmentLoaders[type];\\n    playlistLoader.on('loadedmetadata', function () {\\n      var media = playlistLoader.media();\\n      segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\\n      // permits, start downloading segments\\n\\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('loadedplaylist', function () {\\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\\n\\n      if (!tech.paused()) {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('error', onError[type](type, settings));\\n  },\\n\\n  /**\\n   * Setup event listeners for subtitle playlist loader\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {PlaylistLoader|null} playlistLoader\\n   *        PlaylistLoader to register listeners on\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function setupListeners.SUBTITLES\\n   */\\n  SUBTITLES: function SUBTITLES(type, playlistLoader, settings) {\\n    var tech = settings.tech,\\n        requestOptions = settings.requestOptions,\\n        segmentLoader = settings.segmentLoaders[type],\\n        mediaType = settings.mediaTypes[type];\\n    playlistLoader.on('loadedmetadata', function () {\\n      var media = playlistLoader.media();\\n      segmentLoader.playlist(media, requestOptions);\\n      segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\\n      // permits, start downloading segments\\n\\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('loadedplaylist', function () {\\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\\n\\n      if (!tech.paused()) {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('error', onError[type](type, settings));\\n  }\\n};\\nvar initialize = {\\n  /**\\n   * Setup PlaylistLoaders and AudioTracks for the audio groups\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function initialize.AUDIO\\n   */\\n  'AUDIO': function AUDIO(type, settings) {\\n    var hls = settings.hls,\\n        sourceType = settings.sourceType,\\n        segmentLoader = settings.segmentLoaders[type],\\n        requestOptions = settings.requestOptions,\\n        mediaGroups = settings.master.mediaGroups,\\n        _settings$mediaTypes$ = settings.mediaTypes[type],\\n        groups = _settings$mediaTypes$.groups,\\n        tracks = _settings$mediaTypes$.tracks,\\n        masterPlaylistLoader = settings.masterPlaylistLoader; // force a default if we have none\\n\\n    if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\\n      mediaGroups[type] = {\\n        main: {\\n          \\\"default\\\": {\\n            \\\"default\\\": true\\n          }\\n        }\\n      };\\n    }\\n\\n    for (var groupId in mediaGroups[type]) {\\n      if (!groups[groupId]) {\\n        groups[groupId] = [];\\n      } // List of playlists that have an AUDIO attribute value matching the current\\n      // group ID\\n\\n\\n      for (var variantLabel in mediaGroups[type][groupId]) {\\n        var properties = mediaGroups[type][groupId][variantLabel];\\n        var playlistLoader = void 0;\\n\\n        if (properties.resolvedUri) {\\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, hls, requestOptions);\\n        } else if (properties.playlists && sourceType === 'dash') {\\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], hls, requestOptions, masterPlaylistLoader);\\n        } else {\\n          // no resolvedUri means the audio is muxed with the video when using this\\n          // audio track\\n          playlistLoader = null;\\n        }\\n\\n        properties = videojs$1.mergeOptions({\\n          id: variantLabel,\\n          playlistLoader: playlistLoader\\n        }, properties);\\n        setupListeners[type](type, properties.playlistLoader, settings);\\n        groups[groupId].push(properties);\\n\\n        if (typeof tracks[variantLabel] === 'undefined') {\\n          var track = new videojs$1.AudioTrack({\\n            id: variantLabel,\\n            kind: audioTrackKind_(properties),\\n            enabled: false,\\n            language: properties.language,\\n            \\\"default\\\": properties[\\\"default\\\"],\\n            label: variantLabel\\n          });\\n          tracks[variantLabel] = track;\\n        }\\n      }\\n    } // setup single error event handler for the segment loader\\n\\n\\n    segmentLoader.on('error', onError[type](type, settings));\\n  },\\n\\n  /**\\n   * Setup PlaylistLoaders and TextTracks for the subtitle groups\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function initialize.SUBTITLES\\n   */\\n  'SUBTITLES': function SUBTITLES(type, settings) {\\n    var tech = settings.tech,\\n        hls = settings.hls,\\n        sourceType = settings.sourceType,\\n        segmentLoader = settings.segmentLoaders[type],\\n        requestOptions = settings.requestOptions,\\n        mediaGroups = settings.master.mediaGroups,\\n        _settings$mediaTypes$2 = settings.mediaTypes[type],\\n        groups = _settings$mediaTypes$2.groups,\\n        tracks = _settings$mediaTypes$2.tracks,\\n        masterPlaylistLoader = settings.masterPlaylistLoader;\\n\\n    for (var groupId in mediaGroups[type]) {\\n      if (!groups[groupId]) {\\n        groups[groupId] = [];\\n      }\\n\\n      for (var variantLabel in mediaGroups[type][groupId]) {\\n        if (mediaGroups[type][groupId][variantLabel].forced) {\\n          // Subtitle playlists with the forced attribute are not selectable in Safari.\\n          // According to Apple's HLS Authoring Specification:\\n          //   If content has forced subtitles and regular subtitles in a given language,\\n          //   the regular subtitles track in that language MUST contain both the forced\\n          //   subtitles and the regular subtitles for that language.\\n          // Because of this requirement and that Safari does not add forced subtitles,\\n          // forced subtitles are skipped here to maintain consistent experience across\\n          // all platforms\\n          continue;\\n        }\\n\\n        var properties = mediaGroups[type][groupId][variantLabel];\\n        var playlistLoader = void 0;\\n\\n        if (sourceType === 'hls') {\\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, hls, requestOptions);\\n        } else if (sourceType === 'dash') {\\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], hls, requestOptions, masterPlaylistLoader);\\n        }\\n\\n        properties = videojs$1.mergeOptions({\\n          id: variantLabel,\\n          playlistLoader: playlistLoader\\n        }, properties);\\n        setupListeners[type](type, properties.playlistLoader, settings);\\n        groups[groupId].push(properties);\\n\\n        if (typeof tracks[variantLabel] === 'undefined') {\\n          var track = tech.addRemoteTextTrack({\\n            id: variantLabel,\\n            kind: 'subtitles',\\n            \\\"default\\\": properties[\\\"default\\\"] && properties.autoselect,\\n            language: properties.language,\\n            label: variantLabel\\n          }, false).track;\\n          tracks[variantLabel] = track;\\n        }\\n      }\\n    } // setup single error event handler for the segment loader\\n\\n\\n    segmentLoader.on('error', onError[type](type, settings));\\n  },\\n\\n  /**\\n   * Setup TextTracks for the closed-caption groups\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function initialize['CLOSED-CAPTIONS']\\n   */\\n  'CLOSED-CAPTIONS': function CLOSEDCAPTIONS(type, settings) {\\n    var tech = settings.tech,\\n        mediaGroups = settings.master.mediaGroups,\\n        _settings$mediaTypes$3 = settings.mediaTypes[type],\\n        groups = _settings$mediaTypes$3.groups,\\n        tracks = _settings$mediaTypes$3.tracks;\\n\\n    for (var groupId in mediaGroups[type]) {\\n      if (!groups[groupId]) {\\n        groups[groupId] = [];\\n      }\\n\\n      for (var variantLabel in mediaGroups[type][groupId]) {\\n        var properties = mediaGroups[type][groupId][variantLabel]; // We only support CEA608 captions for now, so ignore anything that\\n        // doesn't use a CCx INSTREAM-ID\\n\\n        if (!properties.instreamId.match(/CC\\\\d/)) {\\n          continue;\\n        } // No PlaylistLoader is required for Closed-Captions because the captions are\\n        // embedded within the video stream\\n\\n\\n        groups[groupId].push(videojs$1.mergeOptions({\\n          id: variantLabel\\n        }, properties));\\n\\n        if (typeof tracks[variantLabel] === 'undefined') {\\n          var track = tech.addRemoteTextTrack({\\n            id: properties.instreamId,\\n            kind: 'captions',\\n            \\\"default\\\": properties[\\\"default\\\"] && properties.autoselect,\\n            language: properties.language,\\n            label: variantLabel\\n          }, false).track;\\n          tracks[variantLabel] = track;\\n        }\\n      }\\n    }\\n  }\\n};\\n/**\\n * Returns a function used to get the active group of the provided type\\n *\\n * @param {String} type\\n *        MediaGroup type\\n * @param {Object} settings\\n *        Object containing required information for media groups\\n * @return {Function}\\n *         Function that returns the active media group for the provided type. Takes an\\n *         optional parameter {TextTrack} track. If no track is provided, a list of all\\n *         variants in the group, otherwise the variant corresponding to the provided\\n *         track is returned.\\n * @function activeGroup\\n */\\n\\nvar activeGroup = function activeGroup(type, settings) {\\n  return function (track) {\\n    var masterPlaylistLoader = settings.masterPlaylistLoader,\\n        groups = settings.mediaTypes[type].groups;\\n    var media = masterPlaylistLoader.media();\\n\\n    if (!media) {\\n      return null;\\n    }\\n\\n    var variants = null;\\n\\n    if (media.attributes[type]) {\\n      variants = groups[media.attributes[type]];\\n    }\\n\\n    variants = variants || groups.main;\\n\\n    if (typeof track === 'undefined') {\\n      return variants;\\n    }\\n\\n    if (track === null) {\\n      // An active track was specified so a corresponding group is expected. track === null\\n      // means no track is currently active so there is no corresponding group\\n      return null;\\n    }\\n\\n    return variants.filter(function (props) {\\n      return props.id === track.id;\\n    })[0] || null;\\n  };\\n};\\n\\nvar activeTrack = {\\n  /**\\n   * Returns a function used to get the active track of type provided\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Function that returns the active media track for the provided type. Returns\\n   *         null if no track is active\\n   * @function activeTrack.AUDIO\\n   */\\n  AUDIO: function AUDIO(type, settings) {\\n    return function () {\\n      var tracks = settings.mediaTypes[type].tracks;\\n\\n      for (var id in tracks) {\\n        if (tracks[id].enabled) {\\n          return tracks[id];\\n        }\\n      }\\n\\n      return null;\\n    };\\n  },\\n\\n  /**\\n   * Returns a function used to get the active track of type provided\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Function that returns the active media track for the provided type. Returns\\n   *         null if no track is active\\n   * @function activeTrack.SUBTITLES\\n   */\\n  SUBTITLES: function SUBTITLES(type, settings) {\\n    return function () {\\n      var tracks = settings.mediaTypes[type].tracks;\\n\\n      for (var id in tracks) {\\n        if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\\n          return tracks[id];\\n        }\\n      }\\n\\n      return null;\\n    };\\n  }\\n};\\n/**\\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\\n * Closed-Captions) specified in the master manifest.\\n *\\n * @param {Object} settings\\n *        Object containing required information for setting up the media groups\\n * @param {SegmentLoader} settings.segmentLoaders.AUDIO\\n *        Audio segment loader\\n * @param {SegmentLoader} settings.segmentLoaders.SUBTITLES\\n *        Subtitle segment loader\\n * @param {SegmentLoader} settings.segmentLoaders.main\\n *        Main segment loader\\n * @param {Tech} settings.tech\\n *        The tech of the player\\n * @param {Object} settings.requestOptions\\n *        XHR request options used by the segment loaders\\n * @param {PlaylistLoader} settings.masterPlaylistLoader\\n *        PlaylistLoader for the master source\\n * @param {HlsHandler} settings.hls\\n *        HLS SourceHandler\\n * @param {Object} settings.master\\n *        The parsed master manifest\\n * @param {Object} settings.mediaTypes\\n *        Object to store the loaders, tracks, and utility methods for each media type\\n * @param {Function} settings.blacklistCurrentPlaylist\\n *        Blacklists the current rendition and forces a rendition switch.\\n * @function setupMediaGroups\\n */\\n\\nvar setupMediaGroups = function setupMediaGroups(settings) {\\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\\n    initialize[type](type, settings);\\n  });\\n  var mediaTypes = settings.mediaTypes,\\n      masterPlaylistLoader = settings.masterPlaylistLoader,\\n      tech = settings.tech,\\n      hls = settings.hls; // setup active group and track getters and change event handlers\\n\\n  ['AUDIO', 'SUBTITLES'].forEach(function (type) {\\n    mediaTypes[type].activeGroup = activeGroup(type, settings);\\n    mediaTypes[type].activeTrack = activeTrack[type](type, settings);\\n    mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\\n    mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\\n  }); // DO NOT enable the default subtitle or caption track.\\n  // DO enable the default audio track\\n\\n  var audioGroup = mediaTypes.AUDIO.activeGroup();\\n  var groupId = (audioGroup.filter(function (group) {\\n    return group[\\\"default\\\"];\\n  })[0] || audioGroup[0]).id;\\n  mediaTypes.AUDIO.tracks[groupId].enabled = true;\\n  mediaTypes.AUDIO.onTrackChanged();\\n  masterPlaylistLoader.on('mediachange', function () {\\n    ['AUDIO', 'SUBTITLES'].forEach(function (type) {\\n      return mediaTypes[type].onGroupChanged();\\n    });\\n  }); // custom audio track change event handler for usage event\\n\\n  var onAudioTrackChanged = function onAudioTrackChanged() {\\n    mediaTypes.AUDIO.onTrackChanged();\\n    tech.trigger({\\n      type: 'usage',\\n      name: 'hls-audio-change'\\n    });\\n  };\\n\\n  tech.audioTracks().addEventListener('change', onAudioTrackChanged);\\n  tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\\n  hls.on('dispose', function () {\\n    tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\\n    tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\\n  }); // clear existing audio tracks and add the ones we just created\\n\\n  tech.clearTracks('audio');\\n\\n  for (var id in mediaTypes.AUDIO.tracks) {\\n    tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\\n  }\\n};\\n/**\\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\\n * media type\\n *\\n * @return {Object}\\n *         Object to store the loaders, tracks, and utility methods for each media type\\n * @function createMediaTypes\\n */\\n\\n\\nvar createMediaTypes = function createMediaTypes() {\\n  var mediaTypes = {};\\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\\n    mediaTypes[type] = {\\n      groups: {},\\n      tracks: {},\\n      activePlaylistLoader: null,\\n      activeGroup: noop,\\n      activeTrack: noop,\\n      onGroupChanged: noop,\\n      onTrackChanged: noop\\n    };\\n  });\\n  return mediaTypes;\\n};\\n/**\\n * @file master-playlist-controller.js\\n */\\n\\n\\nvar ABORT_EARLY_BLACKLIST_SECONDS = 60 * 2;\\nvar Hls = void 0; // SegmentLoader stats that need to have each loader's\\n// values summed to calculate the final value\\n\\nvar loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred'];\\n\\nvar sumLoaderStat = function sumLoaderStat(stat) {\\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\\n};\\n\\nvar shouldSwitchToMedia = function shouldSwitchToMedia(_ref) {\\n  var currentPlaylist = _ref.currentPlaylist,\\n      nextPlaylist = _ref.nextPlaylist,\\n      forwardBuffer = _ref.forwardBuffer,\\n      bufferLowWaterLine = _ref.bufferLowWaterLine,\\n      duration$$1 = _ref.duration,\\n      log = _ref.log; // we have no other playlist to switch to\\n\\n  if (!nextPlaylist) {\\n    videojs$1.log.warn('We received no playlist to switch to. Please check your stream.');\\n    return false;\\n  } // If the playlist is live, then we want to not take low water line into account.\\n  // This is because in LIVE, the player plays 3 segments from the end of the\\n  // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\\n  // in those segments, a viewer will never experience a rendition upswitch.\\n\\n\\n  if (!currentPlaylist.endList) {\\n    return true;\\n  } // For the same reason as LIVE, we ignore the low water line when the VOD\\n  // duration is below the max potential low water line\\n\\n\\n  if (duration$$1 < Config.MAX_BUFFER_LOW_WATER_LINE) {\\n    return true;\\n  } // we want to switch down to lower resolutions quickly to continue playback, but\\n\\n\\n  if (nextPlaylist.attributes.BANDWIDTH < currentPlaylist.attributes.BANDWIDTH) {\\n    return true;\\n  } // ensure we have some buffer before we switch up to prevent us running out of\\n  // buffer while loading a higher rendition.\\n\\n\\n  if (forwardBuffer >= bufferLowWaterLine) {\\n    return true;\\n  }\\n\\n  return false;\\n};\\n/**\\n * the master playlist controller controller all interactons\\n * between playlists and segmentloaders. At this time this mainly\\n * involves a master playlist and a series of audio playlists\\n * if they are available\\n *\\n * @class MasterPlaylistController\\n * @extends videojs.EventTarget\\n */\\n\\n\\nvar MasterPlaylistController = function (_videojs$EventTarget) {\\n  inherits(MasterPlaylistController, _videojs$EventTarget);\\n\\n  function MasterPlaylistController(options) {\\n    classCallCheck(this, MasterPlaylistController);\\n\\n    var _this = possibleConstructorReturn(this, (MasterPlaylistController.__proto__ || Object.getPrototypeOf(MasterPlaylistController)).call(this));\\n\\n    var url = options.url,\\n        handleManifestRedirects = options.handleManifestRedirects,\\n        withCredentials = options.withCredentials,\\n        tech = options.tech,\\n        bandwidth = options.bandwidth,\\n        externHls = options.externHls,\\n        useCueTags = options.useCueTags,\\n        blacklistDuration = options.blacklistDuration,\\n        enableLowInitialPlaylist = options.enableLowInitialPlaylist,\\n        cacheEncryptionKeys = options.cacheEncryptionKeys,\\n        sourceType = options.sourceType;\\n\\n    if (!url) {\\n      throw new Error('A non-empty playlist URL is required');\\n    }\\n\\n    Hls = externHls;\\n    _this.withCredentials = withCredentials;\\n    _this.tech_ = tech;\\n    _this.hls_ = tech.hls;\\n    _this.sourceType_ = sourceType;\\n    _this.useCueTags_ = useCueTags;\\n    _this.blacklistDuration = blacklistDuration;\\n    _this.enableLowInitialPlaylist = enableLowInitialPlaylist;\\n\\n    if (_this.useCueTags_) {\\n      _this.cueTagsTrack_ = _this.tech_.addTextTrack('metadata', 'ad-cues');\\n      _this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\\n    }\\n\\n    _this.requestOptions_ = {\\n      withCredentials: withCredentials,\\n      handleManifestRedirects: handleManifestRedirects,\\n      timeout: null\\n    };\\n    _this.mediaTypes_ = createMediaTypes();\\n    _this.mediaSource = new videojs$1.MediaSource(); // load the media source into the player\\n\\n    _this.mediaSource.addEventListener('sourceopen', _this.handleSourceOpen_.bind(_this));\\n\\n    _this.seekable_ = videojs$1.createTimeRanges();\\n    _this.hasPlayed_ = false;\\n    _this.syncController_ = new SyncController(options);\\n    _this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\\n      kind: 'metadata',\\n      label: 'segment-metadata'\\n    }, false).track;\\n    _this.decrypter_ = new Decrypter$1();\\n    _this.inbandTextTracks_ = {};\\n    var segmentLoaderSettings = {\\n      hls: _this.hls_,\\n      mediaSource: _this.mediaSource,\\n      currentTime: _this.tech_.currentTime.bind(_this.tech_),\\n      seekable: function seekable$$1() {\\n        return _this.seekable();\\n      },\\n      seeking: function seeking() {\\n        return _this.tech_.seeking();\\n      },\\n      duration: function duration$$1() {\\n        return _this.mediaSource.duration;\\n      },\\n      hasPlayed: function hasPlayed() {\\n        return _this.hasPlayed_;\\n      },\\n      goalBufferLength: function goalBufferLength() {\\n        return _this.goalBufferLength();\\n      },\\n      bandwidth: bandwidth,\\n      syncController: _this.syncController_,\\n      decrypter: _this.decrypter_,\\n      sourceType: _this.sourceType_,\\n      inbandTextTracks: _this.inbandTextTracks_,\\n      cacheEncryptionKeys: cacheEncryptionKeys\\n    };\\n    _this.masterPlaylistLoader_ = _this.sourceType_ === 'dash' ? new DashPlaylistLoader(url, _this.hls_, _this.requestOptions_) : new PlaylistLoader(url, _this.hls_, _this.requestOptions_);\\n\\n    _this.setupMasterPlaylistLoaderListeners_(); // setup segment loaders\\n    // combined audio/video or just video when alternate audio track is selected\\n\\n\\n    _this.mainSegmentLoader_ = new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\\n      segmentMetadataTrack: _this.segmentMetadataTrack_,\\n      loaderType: 'main'\\n    }), options); // alternate audio track\\n\\n    _this.audioSegmentLoader_ = new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\\n      loaderType: 'audio'\\n    }), options);\\n    _this.subtitleSegmentLoader_ = new VTTSegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\\n      loaderType: 'vtt',\\n      featuresNativeTextTracks: _this.tech_.featuresNativeTextTracks\\n    }), options);\\n\\n    _this.setupSegmentLoaderListeners_(); // Create SegmentLoader stat-getters\\n\\n\\n    loaderStats.forEach(function (stat) {\\n      _this[stat + '_'] = sumLoaderStat.bind(_this, stat);\\n    });\\n    _this.logger_ = logger('MPC');\\n\\n    _this.masterPlaylistLoader_.load();\\n\\n    return _this;\\n  }\\n  /**\\n   * Register event handlers on the master playlist loader. A helper\\n   * function for construction time.\\n   *\\n   * @private\\n   */\\n\\n\\n  createClass(MasterPlaylistController, [{\\n    key: 'setupMasterPlaylistLoaderListeners_',\\n    value: function setupMasterPlaylistLoaderListeners_() {\\n      var _this2 = this;\\n\\n      this.masterPlaylistLoader_.on('loadedmetadata', function () {\\n        var media = _this2.masterPlaylistLoader_.media();\\n\\n        var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\\n        // timeout the request.\\n\\n        if (isLowestEnabledRendition(_this2.masterPlaylistLoader_.master, _this2.masterPlaylistLoader_.media())) {\\n          _this2.requestOptions_.timeout = 0;\\n        } else {\\n          _this2.requestOptions_.timeout = requestTimeout;\\n        } // if this isn't a live video and preload permits, start\\n        // downloading segments\\n\\n\\n        if (media.endList && _this2.tech_.preload() !== 'none') {\\n          _this2.mainSegmentLoader_.playlist(media, _this2.requestOptions_);\\n\\n          _this2.mainSegmentLoader_.load();\\n        }\\n\\n        setupMediaGroups({\\n          sourceType: _this2.sourceType_,\\n          segmentLoaders: {\\n            AUDIO: _this2.audioSegmentLoader_,\\n            SUBTITLES: _this2.subtitleSegmentLoader_,\\n            main: _this2.mainSegmentLoader_\\n          },\\n          tech: _this2.tech_,\\n          requestOptions: _this2.requestOptions_,\\n          masterPlaylistLoader: _this2.masterPlaylistLoader_,\\n          hls: _this2.hls_,\\n          master: _this2.master(),\\n          mediaTypes: _this2.mediaTypes_,\\n          blacklistCurrentPlaylist: _this2.blacklistCurrentPlaylist.bind(_this2)\\n        });\\n\\n        _this2.triggerPresenceUsage_(_this2.master(), media);\\n\\n        try {\\n          _this2.setupSourceBuffers_();\\n        } catch (e) {\\n          videojs$1.log.warn('Failed to create SourceBuffers', e);\\n          return _this2.mediaSource.endOfStream('decode');\\n        }\\n\\n        _this2.setupFirstPlay();\\n\\n        if (!_this2.mediaTypes_.AUDIO.activePlaylistLoader || _this2.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\\n          _this2.trigger('selectedinitialmedia');\\n        } else {\\n          // We must wait for the active audio playlist loader to\\n          // finish setting up before triggering this event so the\\n          // representations API and EME setup is correct\\n          _this2.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', function () {\\n            _this2.trigger('selectedinitialmedia');\\n          });\\n        }\\n      });\\n      this.masterPlaylistLoader_.on('loadedplaylist', function () {\\n        var updatedPlaylist = _this2.masterPlaylistLoader_.media();\\n\\n        if (!updatedPlaylist) {\\n          // blacklist any variants that are not supported by the browser before selecting\\n          // an initial media as the playlist selectors do not consider browser support\\n          _this2.excludeUnsupportedVariants_();\\n\\n          var selectedMedia = void 0;\\n\\n          if (_this2.enableLowInitialPlaylist) {\\n            selectedMedia = _this2.selectInitialPlaylist();\\n          }\\n\\n          if (!selectedMedia) {\\n            selectedMedia = _this2.selectPlaylist();\\n          }\\n\\n          _this2.initialMedia_ = selectedMedia;\\n\\n          _this2.masterPlaylistLoader_.media(_this2.initialMedia_);\\n\\n          return;\\n        }\\n\\n        if (_this2.useCueTags_) {\\n          _this2.updateAdCues_(updatedPlaylist);\\n        } // TODO: Create a new event on the PlaylistLoader that signals\\n        // that the segments have changed in some way and use that to\\n        // update the SegmentLoader instead of doing it twice here and\\n        // on `mediachange`\\n\\n\\n        _this2.mainSegmentLoader_.playlist(updatedPlaylist, _this2.requestOptions_);\\n\\n        _this2.updateDuration(); // If the player isn't paused, ensure that the segment loader is running,\\n        // as it is possible that it was temporarily stopped while waiting for\\n        // a playlist (e.g., in case the playlist errored and we re-requested it).\\n\\n\\n        if (!_this2.tech_.paused()) {\\n          _this2.mainSegmentLoader_.load();\\n\\n          if (_this2.audioSegmentLoader_) {\\n            _this2.audioSegmentLoader_.load();\\n          }\\n        }\\n\\n        if (!updatedPlaylist.endList) {\\n          var addSeekableRange = function addSeekableRange() {\\n            var seekable$$1 = _this2.seekable();\\n\\n            if (seekable$$1.length !== 0) {\\n              _this2.mediaSource.addSeekableRange_(seekable$$1.start(0), seekable$$1.end(0));\\n            }\\n          };\\n\\n          if (_this2.duration() !== Infinity) {\\n            var onDurationchange = function onDurationchange() {\\n              if (_this2.duration() === Infinity) {\\n                addSeekableRange();\\n              } else {\\n                _this2.tech_.one('durationchange', onDurationchange);\\n              }\\n            };\\n\\n            _this2.tech_.one('durationchange', onDurationchange);\\n          } else {\\n            addSeekableRange();\\n          }\\n        }\\n      });\\n      this.masterPlaylistLoader_.on('error', function () {\\n        _this2.blacklistCurrentPlaylist(_this2.masterPlaylistLoader_.error);\\n      });\\n      this.masterPlaylistLoader_.on('mediachanging', function () {\\n        _this2.mainSegmentLoader_.abort();\\n\\n        _this2.mainSegmentLoader_.pause();\\n      });\\n      this.masterPlaylistLoader_.on('mediachange', function () {\\n        var media = _this2.masterPlaylistLoader_.media();\\n\\n        var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\\n        // timeout the request.\\n\\n        if (isLowestEnabledRendition(_this2.masterPlaylistLoader_.master, _this2.masterPlaylistLoader_.media())) {\\n          _this2.requestOptions_.timeout = 0;\\n        } else {\\n          _this2.requestOptions_.timeout = requestTimeout;\\n        } // TODO: Create a new event on the PlaylistLoader that signals\\n        // that the segments have changed in some way and use that to\\n        // update the SegmentLoader instead of doing it twice here and\\n        // on `loadedplaylist`\\n\\n\\n        _this2.mainSegmentLoader_.playlist(media, _this2.requestOptions_);\\n\\n        _this2.mainSegmentLoader_.load();\\n\\n        _this2.tech_.trigger({\\n          type: 'mediachange',\\n          bubbles: true\\n        });\\n      });\\n      this.masterPlaylistLoader_.on('playlistunchanged', function () {\\n        var updatedPlaylist = _this2.masterPlaylistLoader_.media();\\n\\n        var playlistOutdated = _this2.stuckAtPlaylistEnd_(updatedPlaylist);\\n\\n        if (playlistOutdated) {\\n          // Playlist has stopped updating and we're stuck at its end. Try to\\n          // blacklist it and switch to another playlist in the hope that that\\n          // one is updating (and give the player a chance to re-adjust to the\\n          // safe live point).\\n          _this2.blacklistCurrentPlaylist({\\n            message: 'Playlist no longer updating.'\\n          }); // useful for monitoring QoS\\n\\n\\n          _this2.tech_.trigger('playliststuck');\\n        }\\n      });\\n      this.masterPlaylistLoader_.on('renditiondisabled', function () {\\n        _this2.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-rendition-disabled'\\n        });\\n      });\\n      this.masterPlaylistLoader_.on('renditionenabled', function () {\\n        _this2.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-rendition-enabled'\\n        });\\n      });\\n    }\\n    /**\\n     * A helper function for triggerring presence usage events once per source\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'triggerPresenceUsage_',\\n    value: function triggerPresenceUsage_(master, media) {\\n      var mediaGroups = master.mediaGroups || {};\\n      var defaultDemuxed = true;\\n      var audioGroupKeys = Object.keys(mediaGroups.AUDIO);\\n\\n      for (var mediaGroup in mediaGroups.AUDIO) {\\n        for (var label in mediaGroups.AUDIO[mediaGroup]) {\\n          var properties = mediaGroups.AUDIO[mediaGroup][label];\\n\\n          if (!properties.uri) {\\n            defaultDemuxed = false;\\n          }\\n        }\\n      }\\n\\n      if (defaultDemuxed) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-demuxed'\\n        });\\n      }\\n\\n      if (Object.keys(mediaGroups.SUBTITLES).length) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-webvtt'\\n        });\\n      }\\n\\n      if (Hls.Playlist.isAes(media)) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-aes'\\n        });\\n      }\\n\\n      if (Hls.Playlist.isFmp4(media)) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-fmp4'\\n        });\\n      }\\n\\n      if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-alternate-audio'\\n        });\\n      }\\n\\n      if (this.useCueTags_) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-playlist-cue-tags'\\n        });\\n      }\\n    }\\n    /**\\n     * Register event handlers on the segment loaders. A helper function\\n     * for construction time.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'setupSegmentLoaderListeners_',\\n    value: function setupSegmentLoaderListeners_() {\\n      var _this3 = this;\\n\\n      this.mainSegmentLoader_.on('bandwidthupdate', function () {\\n        var nextPlaylist = _this3.selectPlaylist();\\n\\n        var currentPlaylist = _this3.masterPlaylistLoader_.media();\\n\\n        var buffered = _this3.tech_.buffered();\\n\\n        var forwardBuffer = buffered.length ? buffered.end(buffered.length - 1) - _this3.tech_.currentTime() : 0;\\n\\n        var bufferLowWaterLine = _this3.bufferLowWaterLine();\\n\\n        if (shouldSwitchToMedia({\\n          currentPlaylist: currentPlaylist,\\n          nextPlaylist: nextPlaylist,\\n          forwardBuffer: forwardBuffer,\\n          bufferLowWaterLine: bufferLowWaterLine,\\n          duration: _this3.duration(),\\n          log: _this3.logger_\\n        })) {\\n          _this3.masterPlaylistLoader_.media(nextPlaylist);\\n        }\\n\\n        _this3.tech_.trigger('bandwidthupdate');\\n      });\\n      this.mainSegmentLoader_.on('progress', function () {\\n        _this3.trigger('progress');\\n      });\\n      this.mainSegmentLoader_.on('error', function () {\\n        _this3.blacklistCurrentPlaylist(_this3.mainSegmentLoader_.error());\\n      });\\n      this.mainSegmentLoader_.on('syncinfoupdate', function () {\\n        _this3.onSyncInfoUpdate_();\\n      });\\n      this.mainSegmentLoader_.on('timestampoffset', function () {\\n        _this3.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-timestamp-offset'\\n        });\\n      });\\n      this.audioSegmentLoader_.on('syncinfoupdate', function () {\\n        _this3.onSyncInfoUpdate_();\\n      });\\n      this.mainSegmentLoader_.on('ended', function () {\\n        _this3.onEndOfStream();\\n      });\\n      this.mainSegmentLoader_.on('earlyabort', function () {\\n        _this3.blacklistCurrentPlaylist({\\n          message: 'Aborted early because there isn\\\\'t enough bandwidth to complete the ' + 'request without rebuffering.'\\n        }, ABORT_EARLY_BLACKLIST_SECONDS);\\n      });\\n      this.mainSegmentLoader_.on('reseteverything', function () {\\n        // If playing an MTS stream, a videojs.MediaSource is listening for\\n        // hls-reset to reset caption parsing state in the transmuxer\\n        _this3.tech_.trigger('hls-reset');\\n      });\\n      this.mainSegmentLoader_.on('segmenttimemapping', function (event) {\\n        // If playing an MTS stream in html, a videojs.MediaSource is listening for\\n        // hls-segment-time-mapping update its internal mapping of stream to display time\\n        _this3.tech_.trigger({\\n          type: 'hls-segment-time-mapping',\\n          mapping: event.mapping\\n        });\\n      });\\n      this.audioSegmentLoader_.on('ended', function () {\\n        _this3.onEndOfStream();\\n      });\\n    }\\n  }, {\\n    key: 'mediaSecondsLoaded_',\\n    value: function mediaSecondsLoaded_() {\\n      return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\\n    }\\n    /**\\n     * Call load on our SegmentLoaders\\n     */\\n\\n  }, {\\n    key: 'load',\\n    value: function load() {\\n      this.mainSegmentLoader_.load();\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        this.audioSegmentLoader_.load();\\n      }\\n\\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\\n        this.subtitleSegmentLoader_.load();\\n      }\\n    }\\n    /**\\n     * Re-tune playback quality level for the current player\\n     * conditions without performing destructive actions, like\\n     * removing already buffered content\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'smoothQualityChange_',\\n    value: function smoothQualityChange_() {\\n      var media = this.selectPlaylist();\\n\\n      if (media !== this.masterPlaylistLoader_.media()) {\\n        this.masterPlaylistLoader_.media(media);\\n        this.mainSegmentLoader_.resetLoader(); // don't need to reset audio as it is reset when media changes\\n      }\\n    }\\n    /**\\n     * Re-tune playback quality level for the current player\\n     * conditions. This method will perform destructive actions like removing\\n     * already buffered content in order to readjust the currently active\\n     * playlist quickly. This is good for manual quality changes\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fastQualityChange_',\\n    value: function fastQualityChange_() {\\n      var _this4 = this;\\n\\n      var media = this.selectPlaylist();\\n\\n      if (media === this.masterPlaylistLoader_.media()) {\\n        return;\\n      }\\n\\n      this.masterPlaylistLoader_.media(media); // Delete all buffered data to allow an immediate quality switch, then seek to give\\n      // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\\n      // ahead is roughly the minimum that will accomplish this across a variety of content\\n      // in IE and Edge, but seeking in place is sufficient on all other browsers)\\n      // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\\n      // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\\n\\n      this.mainSegmentLoader_.resetEverything(function () {\\n        // Since this is not a typical seek, we avoid the seekTo method which can cause segments\\n        // from the previously enabled rendition to load before the new playlist has finished loading\\n        if (videojs$1.browser.IE_VERSION || videojs$1.browser.IS_EDGE) {\\n          _this4.tech_.setCurrentTime(_this4.tech_.currentTime() + 0.04);\\n        } else {\\n          _this4.tech_.setCurrentTime(_this4.tech_.currentTime());\\n        }\\n      }); // don't need to reset audio as it is reset when media changes\\n    }\\n    /**\\n     * Begin playback.\\n     */\\n\\n  }, {\\n    key: 'play',\\n    value: function play() {\\n      if (this.setupFirstPlay()) {\\n        return;\\n      }\\n\\n      if (this.tech_.ended()) {\\n        this.tech_.setCurrentTime(0);\\n      }\\n\\n      if (this.hasPlayed_) {\\n        this.load();\\n      }\\n\\n      var seekable$$1 = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\\n      // seek forward to the live point\\n\\n      if (this.tech_.duration() === Infinity) {\\n        if (this.tech_.currentTime() < seekable$$1.start(0)) {\\n          return this.tech_.setCurrentTime(seekable$$1.end(seekable$$1.length - 1));\\n        }\\n      }\\n    }\\n    /**\\n     * Seek to the latest media position if this is a live video and the\\n     * player and video are loaded and initialized.\\n     */\\n\\n  }, {\\n    key: 'setupFirstPlay',\\n    value: function setupFirstPlay() {\\n      var _this5 = this;\\n\\n      var media = this.masterPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\\n      //  If 1) there is no active media\\n      //     2) the player is paused\\n      //     3) the first play has already been setup\\n      // then exit early\\n\\n      if (!media || this.tech_.paused() || this.hasPlayed_) {\\n        return false;\\n      } // when the video is a live stream\\n\\n\\n      if (!media.endList) {\\n        var seekable$$1 = this.seekable();\\n\\n        if (!seekable$$1.length) {\\n          // without a seekable range, the player cannot seek to begin buffering at the live\\n          // point\\n          return false;\\n        }\\n\\n        if (videojs$1.browser.IE_VERSION && this.tech_.readyState() === 0) {\\n          // IE11 throws an InvalidStateError if you try to set currentTime while the\\n          // readyState is 0, so it must be delayed until the tech fires loadedmetadata.\\n          this.tech_.one('loadedmetadata', function () {\\n            _this5.trigger('firstplay');\\n\\n            _this5.tech_.setCurrentTime(seekable$$1.end(0));\\n\\n            _this5.hasPlayed_ = true;\\n          });\\n          return false;\\n        } // trigger firstplay to inform the source handler to ignore the next seek event\\n\\n\\n        this.trigger('firstplay'); // seek to the live point\\n\\n        this.tech_.setCurrentTime(seekable$$1.end(0));\\n      }\\n\\n      this.hasPlayed_ = true; // we can begin loading now that everything is ready\\n\\n      this.load();\\n      return true;\\n    }\\n    /**\\n     * handle the sourceopen event on the MediaSource\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleSourceOpen_',\\n    value: function handleSourceOpen_() {\\n      // Only attempt to create the source buffer if none already exist.\\n      // handleSourceOpen is also called when we are \\\"re-opening\\\" a source buffer\\n      // after `endOfStream` has been called (in response to a seek for instance)\\n      try {\\n        this.setupSourceBuffers_();\\n      } catch (e) {\\n        videojs$1.log.warn('Failed to create Source Buffers', e);\\n        return this.mediaSource.endOfStream('decode');\\n      } // if autoplay is enabled, begin playback. This is duplicative of\\n      // code in video.js but is required because play() must be invoked\\n      // *after* the media source has opened.\\n\\n\\n      if (this.tech_.autoplay()) {\\n        var playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\\n        // on browsers which return a promise\\n\\n        if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\\n          playPromise.then(null, function (e) {});\\n        }\\n      }\\n\\n      this.trigger('sourceopen');\\n    }\\n    /**\\n     * Calls endOfStream on the media source when all active stream types have called\\n     * endOfStream\\n     *\\n     * @param {string} streamType\\n     *        Stream type of the segment loader that called endOfStream\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'onEndOfStream',\\n    value: function onEndOfStream() {\\n      var isEndOfStream = this.mainSegmentLoader_.ended_;\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        // if the audio playlist loader exists, then alternate audio is active\\n        if (!this.mainSegmentLoader_.startingMedia_ || this.mainSegmentLoader_.startingMedia_.containsVideo) {\\n          // if we do not know if the main segment loader contains video yet or if we\\n          // definitively know the main segment loader contains video, then we need to wait\\n          // for both main and audio segment loaders to call endOfStream\\n          isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\\n        } else {\\n          // otherwise just rely on the audio loader\\n          isEndOfStream = this.audioSegmentLoader_.ended_;\\n        }\\n      }\\n\\n      if (!isEndOfStream) {\\n        return;\\n      }\\n\\n      this.logger_('calling mediaSource.endOfStream()'); // on chrome calling endOfStream can sometimes cause an exception,\\n      // even when the media source is in a valid state.\\n\\n      try {\\n        this.mediaSource.endOfStream();\\n      } catch (e) {\\n        videojs$1.log.warn('Failed to call media source endOfStream', e);\\n      }\\n    }\\n    /**\\n     * Check if a playlist has stopped being updated\\n     * @param {Object} playlist the media playlist object\\n     * @return {boolean} whether the playlist has stopped being updated or not\\n     */\\n\\n  }, {\\n    key: 'stuckAtPlaylistEnd_',\\n    value: function stuckAtPlaylistEnd_(playlist) {\\n      var seekable$$1 = this.seekable();\\n\\n      if (!seekable$$1.length) {\\n        // playlist doesn't have enough information to determine whether we are stuck\\n        return false;\\n      }\\n\\n      var expired = this.syncController_.getExpiredTime(playlist, this.mediaSource.duration);\\n\\n      if (expired === null) {\\n        return false;\\n      } // does not use the safe live end to calculate playlist end, since we\\n      // don't want to say we are stuck while there is still content\\n\\n\\n      var absolutePlaylistEnd = Hls.Playlist.playlistEnd(playlist, expired);\\n      var currentTime = this.tech_.currentTime();\\n      var buffered = this.tech_.buffered();\\n\\n      if (!buffered.length) {\\n        // return true if the playhead reached the absolute end of the playlist\\n        return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\\n      }\\n\\n      var bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\\n      // end of playlist\\n\\n      return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\\n    }\\n    /**\\n     * Blacklists a playlist when an error occurs for a set amount of time\\n     * making it unavailable for selection by the rendition selection algorithm\\n     * and then forces a new playlist (rendition) selection.\\n     *\\n     * @param {Object=} error an optional error that may include the playlist\\n     * to blacklist\\n     * @param {Number=} blacklistDuration an optional number of seconds to blacklist the\\n     * playlist\\n     */\\n\\n  }, {\\n    key: 'blacklistCurrentPlaylist',\\n    value: function blacklistCurrentPlaylist() {\\n      var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n      var blacklistDuration = arguments[1];\\n      var currentPlaylist = void 0;\\n      var nextPlaylist = void 0; // If the `error` was generated by the playlist loader, it will contain\\n      // the playlist we were trying to load (but failed) and that should be\\n      // blacklisted instead of the currently selected playlist which is likely\\n      // out-of-date in this scenario\\n\\n      currentPlaylist = error.playlist || this.masterPlaylistLoader_.media();\\n      blacklistDuration = blacklistDuration || error.blacklistDuration || this.blacklistDuration; // If there is no current playlist, then an error occurred while we were\\n      // trying to load the master OR while we were disposing of the tech\\n\\n      if (!currentPlaylist) {\\n        this.error = error;\\n\\n        try {\\n          return this.mediaSource.endOfStream('network');\\n        } catch (e) {\\n          return this.trigger('error');\\n        }\\n      }\\n\\n      var isFinalRendition = this.masterPlaylistLoader_.master.playlists.filter(isEnabled).length === 1;\\n      var playlists = this.masterPlaylistLoader_.master.playlists;\\n\\n      if (playlists.length === 1) {\\n        // Never blacklisting this playlist because it's the only playlist\\n        videojs$1.log.warn('Problem encountered with the current ' + 'HLS playlist. Trying again since it is the only playlist.');\\n        this.tech_.trigger('retryplaylist');\\n        return this.masterPlaylistLoader_.load(isFinalRendition);\\n      }\\n\\n      if (isFinalRendition) {\\n        // Since we're on the final non-blacklisted playlist, and we're about to blacklist\\n        // it, instead of erring the player or retrying this playlist, clear out the current\\n        // blacklist. This allows other playlists to be attempted in case any have been\\n        // fixed.\\n        videojs$1.log.warn('Removing all playlists from the blacklist because the last ' + 'rendition is about to be blacklisted.');\\n        playlists.forEach(function (playlist) {\\n          if (playlist.excludeUntil !== Infinity) {\\n            delete playlist.excludeUntil;\\n          }\\n        }); // Technically we are retrying a playlist, in that we are simply retrying a previous\\n        // playlist. This is needed for users relying on the retryplaylist event to catch a\\n        // case where the player might be stuck and looping through \\\"dead\\\" playlists.\\n\\n        this.tech_.trigger('retryplaylist');\\n      } // Blacklist this playlist\\n\\n\\n      currentPlaylist.excludeUntil = Date.now() + blacklistDuration * 1000;\\n      this.tech_.trigger('blacklistplaylist');\\n      this.tech_.trigger({\\n        type: 'usage',\\n        name: 'hls-rendition-blacklisted'\\n      }); // Select a new playlist\\n\\n      nextPlaylist = this.selectPlaylist();\\n      videojs$1.log.warn('Problem encountered with the current HLS playlist.' + (error.message ? ' ' + error.message : '') + ' Switching to another playlist.');\\n      return this.masterPlaylistLoader_.media(nextPlaylist, isFinalRendition);\\n    }\\n    /**\\n     * Pause all segment loaders\\n     */\\n\\n  }, {\\n    key: 'pauseLoading',\\n    value: function pauseLoading() {\\n      this.mainSegmentLoader_.pause();\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        this.audioSegmentLoader_.pause();\\n      }\\n\\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\\n        this.subtitleSegmentLoader_.pause();\\n      }\\n    }\\n    /**\\n     * set the current time on all segment loaders\\n     *\\n     * @param {TimeRange} currentTime the current time to set\\n     * @return {TimeRange} the current time\\n     */\\n\\n  }, {\\n    key: 'setCurrentTime',\\n    value: function setCurrentTime(currentTime) {\\n      var buffered = findRange(this.tech_.buffered(), currentTime);\\n\\n      if (!(this.masterPlaylistLoader_ && this.masterPlaylistLoader_.media())) {\\n        // return immediately if the metadata is not ready yet\\n        return 0;\\n      } // it's clearly an edge-case but don't thrown an error if asked to\\n      // seek within an empty playlist\\n\\n\\n      if (!this.masterPlaylistLoader_.media().segments) {\\n        return 0;\\n      } // In flash playback, the segment loaders should be reset on every seek, even\\n      // in buffer seeks. If the seek location is already buffered, continue buffering as\\n      // usual\\n      // TODO: redo this comment\\n\\n\\n      if (buffered && buffered.length) {\\n        return currentTime;\\n      } // cancel outstanding requests so we begin buffering at the new\\n      // location\\n\\n\\n      this.mainSegmentLoader_.resetEverything();\\n      this.mainSegmentLoader_.abort();\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        this.audioSegmentLoader_.resetEverything();\\n        this.audioSegmentLoader_.abort();\\n      }\\n\\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\\n        this.subtitleSegmentLoader_.resetEverything();\\n        this.subtitleSegmentLoader_.abort();\\n      } // start segment loader loading in case they are paused\\n\\n\\n      this.load();\\n    }\\n    /**\\n     * get the current duration\\n     *\\n     * @return {TimeRange} the duration\\n     */\\n\\n  }, {\\n    key: 'duration',\\n    value: function duration$$1() {\\n      if (!this.masterPlaylistLoader_) {\\n        return 0;\\n      }\\n\\n      if (this.mediaSource) {\\n        return this.mediaSource.duration;\\n      }\\n\\n      return Hls.Playlist.duration(this.masterPlaylistLoader_.media());\\n    }\\n    /**\\n     * check the seekable range\\n     *\\n     * @return {TimeRange} the seekable range\\n     */\\n\\n  }, {\\n    key: 'seekable',\\n    value: function seekable$$1() {\\n      return this.seekable_;\\n    }\\n  }, {\\n    key: 'onSyncInfoUpdate_',\\n    value: function onSyncInfoUpdate_() {\\n      var audioSeekable = void 0;\\n\\n      if (!this.masterPlaylistLoader_) {\\n        return;\\n      }\\n\\n      var media = this.masterPlaylistLoader_.media();\\n\\n      if (!media) {\\n        return;\\n      }\\n\\n      var expired = this.syncController_.getExpiredTime(media, this.mediaSource.duration);\\n\\n      if (expired === null) {\\n        // not enough information to update seekable\\n        return;\\n      }\\n\\n      var suggestedPresentationDelay = this.masterPlaylistLoader_.master.suggestedPresentationDelay;\\n      var mainSeekable = Hls.Playlist.seekable(media, expired, suggestedPresentationDelay);\\n\\n      if (mainSeekable.length === 0) {\\n        return;\\n      }\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\\n        expired = this.syncController_.getExpiredTime(media, this.mediaSource.duration);\\n\\n        if (expired === null) {\\n          return;\\n        }\\n\\n        audioSeekable = Hls.Playlist.seekable(media, expired, suggestedPresentationDelay);\\n\\n        if (audioSeekable.length === 0) {\\n          return;\\n        }\\n      }\\n\\n      var oldEnd = void 0;\\n      var oldStart = void 0;\\n\\n      if (this.seekable_ && this.seekable_.length) {\\n        oldEnd = this.seekable_.end(0);\\n        oldStart = this.seekable_.start(0);\\n      }\\n\\n      if (!audioSeekable) {\\n        // seekable has been calculated based on buffering video data so it\\n        // can be returned directly\\n        this.seekable_ = mainSeekable;\\n      } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\\n        // seekables are pretty far off, rely on main\\n        this.seekable_ = mainSeekable;\\n      } else {\\n        this.seekable_ = videojs$1.createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\\n      } // seekable is the same as last time\\n\\n\\n      if (this.seekable_ && this.seekable_.length) {\\n        if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\\n          return;\\n        }\\n      }\\n\\n      this.logger_('seekable updated [' + printableRange(this.seekable_) + ']');\\n      this.tech_.trigger('seekablechanged');\\n    }\\n    /**\\n     * Update the player duration\\n     */\\n\\n  }, {\\n    key: 'updateDuration',\\n    value: function updateDuration() {\\n      var _this6 = this;\\n\\n      var oldDuration = this.mediaSource.duration;\\n      var newDuration = Hls.Playlist.duration(this.masterPlaylistLoader_.media());\\n      var buffered = this.tech_.buffered();\\n\\n      var setDuration = function setDuration() {\\n        // on firefox setting the duration may sometimes cause an exception\\n        // even if the media source is open and source buffers are not\\n        // updating, something about the media source being in an invalid state.\\n        _this6.logger_('Setting duration from ' + _this6.mediaSource.duration + ' => ' + newDuration);\\n\\n        try {\\n          _this6.mediaSource.duration = newDuration;\\n        } catch (e) {\\n          videojs$1.log.warn('Failed to set media source duration', e);\\n        }\\n\\n        _this6.tech_.trigger('durationchange');\\n\\n        _this6.mediaSource.removeEventListener('sourceopen', setDuration);\\n      };\\n\\n      if (buffered.length > 0) {\\n        newDuration = Math.max(newDuration, buffered.end(buffered.length - 1));\\n      } // if the duration has changed, invalidate the cached value\\n\\n\\n      if (oldDuration !== newDuration) {\\n        // update the duration\\n        if (this.mediaSource.readyState !== 'open') {\\n          this.mediaSource.addEventListener('sourceopen', setDuration);\\n        } else {\\n          setDuration();\\n        }\\n      }\\n    }\\n    /**\\n     * dispose of the MasterPlaylistController and everything\\n     * that it controls\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      var _this7 = this;\\n\\n      this.trigger('dispose');\\n\\n      if (this.decrypter_) {\\n        this.decrypter_.terminate();\\n      }\\n\\n      this.masterPlaylistLoader_.dispose();\\n      this.mainSegmentLoader_.dispose();\\n      ['AUDIO', 'SUBTITLES'].forEach(function (type) {\\n        var groups = _this7.mediaTypes_[type].groups;\\n\\n        for (var id in groups) {\\n          groups[id].forEach(function (group) {\\n            if (group.playlistLoader) {\\n              group.playlistLoader.dispose();\\n            }\\n          });\\n        }\\n      });\\n      this.audioSegmentLoader_.dispose();\\n      this.subtitleSegmentLoader_.dispose();\\n      this.off();\\n\\n      if (this.mediaSource.dispose) {\\n        this.mediaSource.dispose();\\n      }\\n    }\\n    /**\\n     * return the master playlist object if we have one\\n     *\\n     * @return {Object} the master playlist object that we parsed\\n     */\\n\\n  }, {\\n    key: 'master',\\n    value: function master() {\\n      return this.masterPlaylistLoader_.master;\\n    }\\n    /**\\n     * return the currently selected playlist\\n     *\\n     * @return {Object} the currently selected playlist object that we parsed\\n     */\\n\\n  }, {\\n    key: 'media',\\n    value: function media() {\\n      // playlist loader will not return media if it has not been fully loaded\\n      return this.masterPlaylistLoader_.media() || this.initialMedia_;\\n    }\\n    /**\\n     * setup our internal source buffers on our segment Loaders\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'setupSourceBuffers_',\\n    value: function setupSourceBuffers_() {\\n      var media = this.masterPlaylistLoader_.media();\\n      var mimeTypes = void 0; // wait until a media playlist is available and the Media Source is\\n      // attached\\n\\n      if (!media || this.mediaSource.readyState !== 'open') {\\n        return;\\n      }\\n\\n      mimeTypes = mimeTypesForPlaylist(this.masterPlaylistLoader_.master, media);\\n\\n      if (mimeTypes.length < 1) {\\n        this.error = 'No compatible SourceBuffer configuration for the variant stream:' + media.resolvedUri;\\n        return this.mediaSource.endOfStream('decode');\\n      }\\n\\n      this.configureLoaderMimeTypes_(mimeTypes); // exclude any incompatible variant streams from future playlist\\n      // selection\\n\\n      this.excludeIncompatibleVariants_(media);\\n    }\\n  }, {\\n    key: 'configureLoaderMimeTypes_',\\n    value: function configureLoaderMimeTypes_(mimeTypes) {\\n      // If the content is demuxed, we can't start appending segments to a source buffer\\n      // until both source buffers are set up, or else the browser may not let us add the\\n      // second source buffer (it will assume we are playing either audio only or video\\n      // only).\\n      var sourceBufferEmitter = // If there is more than one mime type\\n      mimeTypes.length > 1 && // and the first mime type does not have muxed video and audio\\n      mimeTypes[0].indexOf(',') === -1 && // and the two mime types are different (they can be the same in the case of audio\\n      // only with alternate audio)\\n      mimeTypes[0] !== mimeTypes[1] ? // then we want to wait on the second source buffer\\n      new videojs$1.EventTarget() : // otherwise there is no need to wait as the content is either audio only,\\n      // video only, or muxed content.\\n      null;\\n      this.mainSegmentLoader_.mimeType(mimeTypes[0], sourceBufferEmitter);\\n\\n      if (mimeTypes[1]) {\\n        this.audioSegmentLoader_.mimeType(mimeTypes[1], sourceBufferEmitter);\\n      }\\n    }\\n    /**\\n     * Blacklists playlists with codecs that are unsupported by the browser.\\n     */\\n\\n  }, {\\n    key: 'excludeUnsupportedVariants_',\\n    value: function excludeUnsupportedVariants_() {\\n      this.master().playlists.forEach(function (variant) {\\n        if (variant.attributes.CODECS && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported && !global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported('video/mp4; codecs=\\\"' + mapLegacyAvcCodecs(variant.attributes.CODECS) + '\\\"')) {\\n          variant.excludeUntil = Infinity;\\n        }\\n      });\\n    }\\n    /**\\n     * Blacklist playlists that are known to be codec or\\n     * stream-incompatible with the SourceBuffer configuration. For\\n     * instance, Media Source Extensions would cause the video element to\\n     * stall waiting for video data if you switched from a variant with\\n     * video and audio to an audio-only one.\\n     *\\n     * @param {Object} media a media playlist compatible with the current\\n     * set of SourceBuffers. Variants in the current master playlist that\\n     * do not appear to have compatible codec or stream configurations\\n     * will be excluded from the default playlist selection algorithm\\n     * indefinitely.\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'excludeIncompatibleVariants_',\\n    value: function excludeIncompatibleVariants_(media) {\\n      var codecCount = 2;\\n      var videoCodec = null;\\n      var codecs = void 0;\\n\\n      if (media.attributes.CODECS) {\\n        codecs = parseCodecs(media.attributes.CODECS);\\n        videoCodec = codecs.videoCodec;\\n        codecCount = codecs.codecCount;\\n      }\\n\\n      this.master().playlists.forEach(function (variant) {\\n        var variantCodecs = {\\n          codecCount: 2,\\n          videoCodec: null\\n        };\\n\\n        if (variant.attributes.CODECS) {\\n          variantCodecs = parseCodecs(variant.attributes.CODECS);\\n        } // if the streams differ in the presence or absence of audio or\\n        // video, they are incompatible\\n\\n\\n        if (variantCodecs.codecCount !== codecCount) {\\n          variant.excludeUntil = Infinity;\\n        } // if h.264 is specified on the current playlist, some flavor of\\n        // it must be specified on all compatible variants\\n\\n\\n        if (variantCodecs.videoCodec !== videoCodec) {\\n          variant.excludeUntil = Infinity;\\n        }\\n      });\\n    }\\n  }, {\\n    key: 'updateAdCues_',\\n    value: function updateAdCues_(media) {\\n      var offset = 0;\\n      var seekable$$1 = this.seekable();\\n\\n      if (seekable$$1.length) {\\n        offset = seekable$$1.start(0);\\n      }\\n\\n      updateAdCues(media, this.cueTagsTrack_, offset);\\n    }\\n    /**\\n     * Calculates the desired forward buffer length based on current time\\n     *\\n     * @return {Number} Desired forward buffer length in seconds\\n     */\\n\\n  }, {\\n    key: 'goalBufferLength',\\n    value: function goalBufferLength() {\\n      var currentTime = this.tech_.currentTime();\\n      var initial = Config.GOAL_BUFFER_LENGTH;\\n      var rate = Config.GOAL_BUFFER_LENGTH_RATE;\\n      var max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\\n      return Math.min(initial + currentTime * rate, max);\\n    }\\n    /**\\n     * Calculates the desired buffer low water line based on current time\\n     *\\n     * @return {Number} Desired buffer low water line in seconds\\n     */\\n\\n  }, {\\n    key: 'bufferLowWaterLine',\\n    value: function bufferLowWaterLine() {\\n      var currentTime = this.tech_.currentTime();\\n      var initial = Config.BUFFER_LOW_WATER_LINE;\\n      var rate = Config.BUFFER_LOW_WATER_LINE_RATE;\\n      var max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\\n      return Math.min(initial + currentTime * rate, max);\\n    }\\n  }]);\\n  return MasterPlaylistController;\\n}(videojs$1.EventTarget);\\n/**\\n * Returns a function that acts as the Enable/disable playlist function.\\n *\\n * @param {PlaylistLoader} loader - The master playlist loader\\n\\n * @param {string} playlistID - id of the playlist\\n * @param {Function} changePlaylistFn - A function to be called after a\\n * playlist's enabled-state has been changed. Will NOT be called if a\\n * playlist's enabled-state is unchanged\\n * @param {Boolean=} enable - Value to set the playlist enabled-state to\\n * or if undefined returns the current enabled-state for the playlist\\n * @return {Function} Function for setting/getting enabled\\n */\\n\\n\\nvar enableFunction = function enableFunction(loader, playlistID, changePlaylistFn) {\\n  return function (enable) {\\n    var playlist = loader.master.playlists[playlistID];\\n    var incompatible = isIncompatible(playlist);\\n    var currentlyEnabled = isEnabled(playlist);\\n\\n    if (typeof enable === 'undefined') {\\n      return currentlyEnabled;\\n    }\\n\\n    if (enable) {\\n      delete playlist.disabled;\\n    } else {\\n      playlist.disabled = true;\\n    }\\n\\n    if (enable !== currentlyEnabled && !incompatible) {\\n      // Ensure the outside world knows about our changes\\n      changePlaylistFn();\\n\\n      if (enable) {\\n        loader.trigger('renditionenabled');\\n      } else {\\n        loader.trigger('renditiondisabled');\\n      }\\n    }\\n\\n    return enable;\\n  };\\n};\\n/**\\n * The representation object encapsulates the publicly visible information\\n * in a media playlist along with a setter/getter-type function (enabled)\\n * for changing the enabled-state of a particular playlist entry\\n *\\n * @class Representation\\n */\\n\\n\\nvar Representation = function Representation(hlsHandler, playlist, id) {\\n  classCallCheck(this, Representation);\\n  var mpc = hlsHandler.masterPlaylistController_,\\n      smoothQualityChange = hlsHandler.options_.smoothQualityChange; // Get a reference to a bound version of the quality change function\\n\\n  var changeType = smoothQualityChange ? 'smooth' : 'fast';\\n  var qualityChangeFunction = mpc[changeType + 'QualityChange_'].bind(mpc); // some playlist attributes are optional\\n\\n  if (playlist.attributes.RESOLUTION) {\\n    var resolution = playlist.attributes.RESOLUTION;\\n    this.width = resolution.width;\\n    this.height = resolution.height;\\n  }\\n\\n  this.bandwidth = playlist.attributes.BANDWIDTH; // The id is simply the ordinality of the media playlist\\n  // within the master playlist\\n\\n  this.id = id; // Partially-apply the enableFunction to create a playlist-\\n  // specific variant\\n\\n  this.enabled = enableFunction(hlsHandler.playlists, playlist.id, qualityChangeFunction);\\n};\\n/**\\n * A mixin function that adds the `representations` api to an instance\\n * of the HlsHandler class\\n * @param {HlsHandler} hlsHandler - An instance of HlsHandler to add the\\n * representation API into\\n */\\n\\n\\nvar renditionSelectionMixin = function renditionSelectionMixin(hlsHandler) {\\n  var playlists = hlsHandler.playlists; // Add a single API-specific function to the HlsHandler instance\\n\\n  hlsHandler.representations = function () {\\n    if (!playlists || !playlists.master || !playlists.master.playlists) {\\n      return [];\\n    }\\n\\n    return playlists.master.playlists.filter(function (media) {\\n      return !isIncompatible(media);\\n    }).map(function (e, i) {\\n      return new Representation(hlsHandler, e, e.id);\\n    });\\n  };\\n};\\n/**\\n * @file playback-watcher.js\\n *\\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\\n */\\n// Set of events that reset the playback-watcher time check logic and clear the timeout\\n\\n\\nvar timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\\n/**\\n * @class PlaybackWatcher\\n */\\n\\nvar PlaybackWatcher = function () {\\n  /**\\n   * Represents an PlaybackWatcher object.\\n   * @constructor\\n   * @param {object} options an object that includes the tech and settings\\n   */\\n  function PlaybackWatcher(options) {\\n    var _this = this;\\n\\n    classCallCheck(this, PlaybackWatcher);\\n    this.tech_ = options.tech;\\n    this.seekable = options.seekable;\\n    this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\\n    this.media = options.media;\\n    this.consecutiveUpdates = 0;\\n    this.lastRecordedTime = null;\\n    this.timer_ = null;\\n    this.checkCurrentTimeTimeout_ = null;\\n    this.logger_ = logger('PlaybackWatcher');\\n    this.logger_('initialize');\\n\\n    var canPlayHandler = function canPlayHandler() {\\n      return _this.monitorCurrentTime_();\\n    };\\n\\n    var waitingHandler = function waitingHandler() {\\n      return _this.techWaiting_();\\n    };\\n\\n    var cancelTimerHandler = function cancelTimerHandler() {\\n      return _this.cancelTimer_();\\n    };\\n\\n    var fixesBadSeeksHandler = function fixesBadSeeksHandler() {\\n      return _this.fixesBadSeeks_();\\n    };\\n\\n    this.tech_.on('seekablechanged', fixesBadSeeksHandler);\\n    this.tech_.on('waiting', waitingHandler);\\n    this.tech_.on(timerCancelEvents, cancelTimerHandler);\\n    this.tech_.on('canplay', canPlayHandler); // Define the dispose function to clean up our events\\n\\n    this.dispose = function () {\\n      _this.logger_('dispose');\\n\\n      _this.tech_.off('seekablechanged', fixesBadSeeksHandler);\\n\\n      _this.tech_.off('waiting', waitingHandler);\\n\\n      _this.tech_.off(timerCancelEvents, cancelTimerHandler);\\n\\n      _this.tech_.off('canplay', canPlayHandler);\\n\\n      if (_this.checkCurrentTimeTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(_this.checkCurrentTimeTimeout_);\\n      }\\n\\n      _this.cancelTimer_();\\n    };\\n  }\\n  /**\\n   * Periodically check current time to see if playback stopped\\n   *\\n   * @private\\n   */\\n\\n\\n  createClass(PlaybackWatcher, [{\\n    key: 'monitorCurrentTime_',\\n    value: function monitorCurrentTime_() {\\n      this.checkCurrentTime_();\\n\\n      if (this.checkCurrentTimeTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkCurrentTimeTimeout_);\\n      } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\\n\\n\\n      this.checkCurrentTimeTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorCurrentTime_.bind(this), 250);\\n    }\\n    /**\\n     * The purpose of this function is to emulate the \\\"waiting\\\" event on\\n     * browsers that do not emit it when they are waiting for more\\n     * data to continue playback\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'checkCurrentTime_',\\n    value: function checkCurrentTime_() {\\n      if (this.tech_.seeking() && this.fixesBadSeeks_()) {\\n        this.consecutiveUpdates = 0;\\n        this.lastRecordedTime = this.tech_.currentTime();\\n        return;\\n      }\\n\\n      if (this.tech_.paused() || this.tech_.seeking()) {\\n        return;\\n      }\\n\\n      var currentTime = this.tech_.currentTime();\\n      var buffered = this.tech_.buffered();\\n\\n      if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\\n        // If current time is at the end of the final buffered region, then any playback\\n        // stall is most likely caused by buffering in a low bandwidth environment. The tech\\n        // should fire a `waiting` event in this scenario, but due to browser and tech\\n        // inconsistencies. Calling `techWaiting_` here allows us to simulate\\n        // responding to a native `waiting` event when the tech fails to emit one.\\n        return this.techWaiting_();\\n      }\\n\\n      if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\\n        this.consecutiveUpdates++;\\n        this.waiting_();\\n      } else if (currentTime === this.lastRecordedTime) {\\n        this.consecutiveUpdates++;\\n      } else {\\n        this.consecutiveUpdates = 0;\\n        this.lastRecordedTime = currentTime;\\n      }\\n    }\\n    /**\\n     * Cancels any pending timers and resets the 'timeupdate' mechanism\\n     * designed to detect that we are stalled\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'cancelTimer_',\\n    value: function cancelTimer_() {\\n      this.consecutiveUpdates = 0;\\n\\n      if (this.timer_) {\\n        this.logger_('cancelTimer_');\\n        clearTimeout(this.timer_);\\n      }\\n\\n      this.timer_ = null;\\n    }\\n    /**\\n     * Fixes situations where there's a bad seek\\n     *\\n     * @return {Boolean} whether an action was taken to fix the seek\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fixesBadSeeks_',\\n    value: function fixesBadSeeks_() {\\n      var seeking = this.tech_.seeking();\\n\\n      if (!seeking) {\\n        return false;\\n      }\\n\\n      var seekable = this.seekable();\\n      var currentTime = this.tech_.currentTime();\\n      var isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\\n      var seekTo = void 0;\\n\\n      if (isAfterSeekableRange) {\\n        var seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\\n\\n        seekTo = seekableEnd;\\n      }\\n\\n      if (this.beforeSeekableWindow_(seekable, currentTime)) {\\n        var seekableStart = seekable.start(0); // sync to the beginning of the live window\\n        // provide a buffer of .1 seconds to handle rounding/imprecise numbers\\n\\n        seekTo = seekableStart + SAFE_TIME_DELTA;\\n      }\\n\\n      if (typeof seekTo !== 'undefined') {\\n        this.logger_('Trying to seek outside of seekable at time ' + currentTime + ' with ' + ('seekable range ' + printableRange(seekable) + '. Seeking to ') + (seekTo + '.'));\\n        this.tech_.setCurrentTime(seekTo);\\n        return true;\\n      }\\n\\n      return false;\\n    }\\n    /**\\n     * Handler for situations when we determine the player is waiting.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'waiting_',\\n    value: function waiting_() {\\n      if (this.techWaiting_()) {\\n        return;\\n      } // All tech waiting checks failed. Use last resort correction\\n\\n\\n      var currentTime = this.tech_.currentTime();\\n      var buffered = this.tech_.buffered();\\n      var currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\\n      // region with no indication that anything is amiss (seen in Firefox). Seeking to\\n      // currentTime is usually enough to kickstart the player. This checks that the player\\n      // is currently within a buffered region before attempting a corrective seek.\\n      // Chrome does not appear to continue `timeupdate` events after a `waiting` event\\n      // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\\n      // make sure there is ~3 seconds of forward buffer before taking any corrective action\\n      // to avoid triggering an `unknownwaiting` event when the network is slow.\\n\\n      if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\\n        this.cancelTimer_();\\n        this.tech_.setCurrentTime(currentTime);\\n        this.logger_('Stopped at ' + currentTime + ' while inside a buffered region ' + ('[' + currentRange.start(0) + ' -> ' + currentRange.end(0) + ']. Attempting to resume ') + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\\n\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-unknown-waiting'\\n        });\\n        return;\\n      }\\n    }\\n    /**\\n     * Handler for situations when the tech fires a `waiting` event\\n     *\\n     * @return {Boolean}\\n     *         True if an action (or none) was needed to correct the waiting. False if no\\n     *         checks passed\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'techWaiting_',\\n    value: function techWaiting_() {\\n      var seekable = this.seekable();\\n      var currentTime = this.tech_.currentTime();\\n\\n      if (this.tech_.seeking() && this.fixesBadSeeks_()) {\\n        // Tech is seeking or bad seek fixed, no action needed\\n        return true;\\n      }\\n\\n      if (this.tech_.seeking() || this.timer_ !== null) {\\n        // Tech is seeking or already waiting on another action, no action needed\\n        return true;\\n      }\\n\\n      if (this.beforeSeekableWindow_(seekable, currentTime)) {\\n        var livePoint = seekable.end(seekable.length - 1);\\n        this.logger_('Fell out of live window at time ' + currentTime + '. Seeking to ' + ('live point (seekable end) ' + livePoint));\\n        this.cancelTimer_();\\n        this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\\n\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-live-resync'\\n        });\\n        return true;\\n      }\\n\\n      var buffered = this.tech_.buffered();\\n      var nextRange = findNextRange(buffered, currentTime);\\n\\n      if (this.videoUnderflow_(nextRange, buffered, currentTime)) {\\n        // Even though the video underflowed and was stuck in a gap, the audio overplayed\\n        // the gap, leading currentTime into a buffered range. Seeking to currentTime\\n        // allows the video to catch up to the audio position without losing any audio\\n        // (only suffering ~3 seconds of frozen video and a pause in audio playback).\\n        this.cancelTimer_();\\n        this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\\n\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-video-underflow'\\n        });\\n        return true;\\n      } // check for gap\\n\\n\\n      if (nextRange.length > 0) {\\n        var difference = nextRange.start(0) - currentTime;\\n        this.logger_('Stopped at ' + currentTime + ', setting timer for ' + difference + ', seeking ' + ('to ' + nextRange.start(0)));\\n        this.timer_ = setTimeout(this.skipTheGap_.bind(this), difference * 1000, currentTime);\\n        return true;\\n      } // All checks failed. Returning false to indicate failure to correct waiting\\n\\n\\n      return false;\\n    }\\n  }, {\\n    key: 'afterSeekableWindow_',\\n    value: function afterSeekableWindow_(seekable, currentTime, playlist) {\\n      var allowSeeksWithinUnsafeLiveWindow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\\n\\n      if (!seekable.length) {\\n        // we can't make a solid case if there's no seekable, default to false\\n        return false;\\n      }\\n\\n      var allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\\n      var isLive = !playlist.endList;\\n\\n      if (isLive && allowSeeksWithinUnsafeLiveWindow) {\\n        allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\\n      }\\n\\n      if (currentTime > allowedEnd) {\\n        return true;\\n      }\\n\\n      return false;\\n    }\\n  }, {\\n    key: 'beforeSeekableWindow_',\\n    value: function beforeSeekableWindow_(seekable, currentTime) {\\n      if (seekable.length && // can't fall before 0 and 0 seekable start identifies VOD stream\\n      seekable.start(0) > 0 && currentTime < seekable.start(0) - SAFE_TIME_DELTA) {\\n        return true;\\n      }\\n\\n      return false;\\n    }\\n  }, {\\n    key: 'videoUnderflow_',\\n    value: function videoUnderflow_(nextRange, buffered, currentTime) {\\n      if (nextRange.length === 0) {\\n        // Even if there is no available next range, there is still a possibility we are\\n        // stuck in a gap due to video underflow.\\n        var gap = this.gapFromVideoUnderflow_(buffered, currentTime);\\n\\n        if (gap) {\\n          this.logger_('Encountered a gap in video from ' + gap.start + ' to ' + gap.end + '. ' + ('Seeking to current time ' + currentTime));\\n          return true;\\n        }\\n      }\\n\\n      return false;\\n    }\\n    /**\\n     * Timer callback. If playback still has not proceeded, then we seek\\n     * to the start of the next buffered region.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'skipTheGap_',\\n    value: function skipTheGap_(scheduledCurrentTime) {\\n      var buffered = this.tech_.buffered();\\n      var currentTime = this.tech_.currentTime();\\n      var nextRange = findNextRange(buffered, currentTime);\\n      this.cancelTimer_();\\n\\n      if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\\n        return;\\n      }\\n\\n      this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\\n\\n      this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\\n      this.tech_.trigger({\\n        type: 'usage',\\n        name: 'hls-gap-skip'\\n      });\\n    }\\n  }, {\\n    key: 'gapFromVideoUnderflow_',\\n    value: function gapFromVideoUnderflow_(buffered, currentTime) {\\n      // At least in Chrome, if there is a gap in the video buffer, the audio will continue\\n      // playing for ~3 seconds after the video gap starts. This is done to account for\\n      // video buffer underflow/underrun (note that this is not done when there is audio\\n      // buffer underflow/underrun -- in that case the video will stop as soon as it\\n      // encounters the gap, as audio stalls are more noticeable/jarring to a user than\\n      // video stalls). The player's time will reflect the playthrough of audio, so the\\n      // time will appear as if we are in a buffered region, even if we are stuck in a\\n      // \\\"gap.\\\"\\n      //\\n      // Example:\\n      // video buffer:   0 => 10.1, 10.2 => 20\\n      // audio buffer:   0 => 20\\n      // overall buffer: 0 => 10.1, 10.2 => 20\\n      // current time: 13\\n      //\\n      // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\\n      // however, the audio continued playing until it reached ~3 seconds past the gap\\n      // (13 seconds), at which point it stops as well. Since current time is past the\\n      // gap, findNextRange will return no ranges.\\n      //\\n      // To check for this issue, we see if there is a gap that starts somewhere within\\n      // a 3 second range (3 seconds +/- 1 second) back from our current time.\\n      var gaps = findGaps(buffered);\\n\\n      for (var i = 0; i < gaps.length; i++) {\\n        var start = gaps.start(i);\\n        var end = gaps.end(i); // gap is starts no more than 4 seconds back\\n\\n        if (currentTime - start < 4 && currentTime - start > 2) {\\n          return {\\n            start: start,\\n            end: end\\n          };\\n        }\\n      }\\n\\n      return null;\\n    }\\n  }]);\\n  return PlaybackWatcher;\\n}();\\n\\nvar defaultOptions = {\\n  errorInterval: 30,\\n  getSource: function getSource(next) {\\n    var tech = this.tech({\\n      IWillNotUseThisInPlugins: true\\n    });\\n    var sourceObj = tech.currentSource_;\\n    return next(sourceObj);\\n  }\\n};\\n/**\\n * Main entry point for the plugin\\n *\\n * @param {Player} player a reference to a videojs Player instance\\n * @param {Object} [options] an object with plugin options\\n * @private\\n */\\n\\nvar initPlugin = function initPlugin(player, options) {\\n  var lastCalled = 0;\\n  var seekTo = 0;\\n  var localOptions = videojs$1.mergeOptions(defaultOptions, options);\\n  player.ready(function () {\\n    player.trigger({\\n      type: 'usage',\\n      name: 'hls-error-reload-initialized'\\n    });\\n  });\\n  /**\\n   * Player modifications to perform that must wait until `loadedmetadata`\\n   * has been triggered\\n   *\\n   * @private\\n   */\\n\\n  var loadedMetadataHandler = function loadedMetadataHandler() {\\n    if (seekTo) {\\n      player.currentTime(seekTo);\\n    }\\n  };\\n  /**\\n   * Set the source on the player element, play, and seek if necessary\\n   *\\n   * @param {Object} sourceObj An object specifying the source url and mime-type to play\\n   * @private\\n   */\\n\\n\\n  var setSource = function setSource(sourceObj) {\\n    if (sourceObj === null || sourceObj === undefined) {\\n      return;\\n    }\\n\\n    seekTo = player.duration() !== Infinity && player.currentTime() || 0;\\n    player.one('loadedmetadata', loadedMetadataHandler);\\n    player.src(sourceObj);\\n    player.trigger({\\n      type: 'usage',\\n      name: 'hls-error-reload'\\n    });\\n    player.play();\\n  };\\n  /**\\n   * Attempt to get a source from either the built-in getSource function\\n   * or a custom function provided via the options\\n   *\\n   * @private\\n   */\\n\\n\\n  var errorHandler = function errorHandler() {\\n    // Do not attempt to reload the source if a source-reload occurred before\\n    // 'errorInterval' time has elapsed since the last source-reload\\n    if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\\n      player.trigger({\\n        type: 'usage',\\n        name: 'hls-error-reload-canceled'\\n      });\\n      return;\\n    }\\n\\n    if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\\n      videojs$1.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\\n      return;\\n    }\\n\\n    lastCalled = Date.now();\\n    return localOptions.getSource.call(player, setSource);\\n  };\\n  /**\\n   * Unbind any event handlers that were bound by the plugin\\n   *\\n   * @private\\n   */\\n\\n\\n  var cleanupEvents = function cleanupEvents() {\\n    player.off('loadedmetadata', loadedMetadataHandler);\\n    player.off('error', errorHandler);\\n    player.off('dispose', cleanupEvents);\\n  };\\n  /**\\n   * Cleanup before re-initializing the plugin\\n   *\\n   * @param {Object} [newOptions] an object with plugin options\\n   * @private\\n   */\\n\\n\\n  var reinitPlugin = function reinitPlugin(newOptions) {\\n    cleanupEvents();\\n    initPlugin(player, newOptions);\\n  };\\n\\n  player.on('error', errorHandler);\\n  player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\\n  // initializing the plugin\\n\\n  player.reloadSourceOnError = reinitPlugin;\\n};\\n/**\\n * Reload the source when an error is detected as long as there\\n * wasn't an error previously within the last 30 seconds\\n *\\n * @param {Object} [options] an object with plugin options\\n */\\n\\n\\nvar reloadSourceOnError = function reloadSourceOnError(options) {\\n  initPlugin(this, options);\\n};\\n\\nvar version$1 = \\\"1.13.2\\\";\\n/**\\n * @file videojs-http-streaming.js\\n *\\n * The main file for the HLS project.\\n * License: https://github.com/videojs/videojs-http-streaming/blob/master/LICENSE\\n */\\n\\nvar Hls$1 = {\\n  PlaylistLoader: PlaylistLoader,\\n  Playlist: Playlist,\\n  Decrypter: aes_decrypter__WEBPACK_IMPORTED_MODULE_20__[\\\"Decrypter\\\"],\\n  AsyncStream: aes_decrypter__WEBPACK_IMPORTED_MODULE_20__[\\\"AsyncStream\\\"],\\n  decrypt: aes_decrypter__WEBPACK_IMPORTED_MODULE_20__[\\\"decrypt\\\"],\\n  utils: utils,\\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\\n  comparePlaylistBandwidth: comparePlaylistBandwidth,\\n  comparePlaylistResolution: comparePlaylistResolution,\\n  xhr: xhrFactory()\\n}; // Define getter/setters for config properites\\n\\n['GOAL_BUFFER_LENGTH', 'MAX_GOAL_BUFFER_LENGTH', 'GOAL_BUFFER_LENGTH_RATE', 'BUFFER_LOW_WATER_LINE', 'MAX_BUFFER_LOW_WATER_LINE', 'BUFFER_LOW_WATER_LINE_RATE', 'BANDWIDTH_VARIANCE'].forEach(function (prop) {\\n  Object.defineProperty(Hls$1, prop, {\\n    get: function get$$1() {\\n      videojs$1.log.warn('using Hls.' + prop + ' is UNSAFE be sure you know what you are doing');\\n      return Config[prop];\\n    },\\n    set: function set$$1(value) {\\n      videojs$1.log.warn('using Hls.' + prop + ' is UNSAFE be sure you know what you are doing');\\n\\n      if (typeof value !== 'number' || value < 0) {\\n        videojs$1.log.warn('value of Hls.' + prop + ' must be greater than or equal to 0');\\n        return;\\n      }\\n\\n      Config[prop] = value;\\n    }\\n  });\\n});\\nvar LOCAL_STORAGE_KEY$1 = 'videojs-vhs';\\n\\nvar simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\\n  var mpegurlRE = /^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i;\\n\\n  if (mpegurlRE.test(type)) {\\n    return 'hls';\\n  }\\n\\n  var dashRE = /^application\\\\/dash\\\\+xml/i;\\n\\n  if (dashRE.test(type)) {\\n    return 'dash';\\n  }\\n\\n  return null;\\n};\\n/**\\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in hls.\\n *\\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\\n * @function handleHlsMediaChange\\n */\\n\\n\\nvar handleHlsMediaChange = function handleHlsMediaChange(qualityLevels, playlistLoader) {\\n  var newPlaylist = playlistLoader.media();\\n  var selectedIndex = -1;\\n\\n  for (var i = 0; i < qualityLevels.length; i++) {\\n    if (qualityLevels[i].id === newPlaylist.id) {\\n      selectedIndex = i;\\n      break;\\n    }\\n  }\\n\\n  qualityLevels.selectedIndex_ = selectedIndex;\\n  qualityLevels.trigger({\\n    selectedIndex: selectedIndex,\\n    type: 'change'\\n  });\\n};\\n/**\\n * Adds quality levels to list once playlist metadata is available\\n *\\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\\n * @param {Object} hls Hls object to listen to for media events.\\n * @function handleHlsLoadedMetadata\\n */\\n\\n\\nvar handleHlsLoadedMetadata = function handleHlsLoadedMetadata(qualityLevels, hls) {\\n  hls.representations().forEach(function (rep) {\\n    qualityLevels.addQualityLevel(rep);\\n  });\\n  handleHlsMediaChange(qualityLevels, hls.playlists);\\n}; // HLS is a source handler, not a tech. Make sure attempts to use it\\n// as one do not cause exceptions.\\n\\n\\nHls$1.canPlaySource = function () {\\n  return videojs$1.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\\\'s techOrder.');\\n};\\n\\nvar emeKeySystems = function emeKeySystems(keySystemOptions, mainSegmentLoader, audioSegmentLoader) {\\n  if (!keySystemOptions) {\\n    return keySystemOptions;\\n  }\\n\\n  var videoMimeType = void 0;\\n  var audioMimeType = void 0; // if there is a mimeType associated with the audioSegmentLoader, then the audio\\n  // and video mimeType and codec strings are already in the format we need to\\n  // pass with the other key systems\\n\\n  if (audioSegmentLoader.mimeType_) {\\n    videoMimeType = mainSegmentLoader.mimeType_;\\n    audioMimeType = audioSegmentLoader.mimeType_; // if there is no audioSegmentLoader mimeType, then we have to create the\\n    // the audio and video mimeType/codec strings from information extrapolated\\n    // from the mainSegmentLoader mimeType (ex. 'video/mp4; codecs=\\\"mp4, avc1\\\"' -->\\n    // 'video/mp4; codecs=\\\"avc1\\\"' and 'audio/mp4; codecs=\\\"mp4\\\"')\\n  } else {\\n    var parsedMimeType = parseContentType(mainSegmentLoader.mimeType_);\\n    var codecs = parsedMimeType.parameters.codecs.split(',');\\n    var audioCodec = void 0;\\n    var videoCodec = void 0;\\n    codecs.forEach(function (codec) {\\n      codec = codec.trim();\\n\\n      if (isAudioCodec(codec)) {\\n        audioCodec = codec;\\n      } else if (isVideoCodec(codec)) {\\n        videoCodec = codec;\\n      }\\n    });\\n    videoMimeType = parsedMimeType.type + '; codecs=\\\"' + videoCodec + '\\\"';\\n    audioMimeType = parsedMimeType.type.replace('video', 'audio') + '; codecs=\\\"' + audioCodec + '\\\"';\\n  } // upsert the content types based on the selected playlist\\n\\n\\n  var keySystemContentTypes = {};\\n  var videoPlaylist = mainSegmentLoader.playlist_;\\n\\n  for (var keySystem in keySystemOptions) {\\n    keySystemContentTypes[keySystem] = {\\n      audioContentType: audioMimeType,\\n      videoContentType: videoMimeType\\n    };\\n\\n    if (videoPlaylist.contentProtection && videoPlaylist.contentProtection[keySystem] && videoPlaylist.contentProtection[keySystem].pssh) {\\n      keySystemContentTypes[keySystem].pssh = videoPlaylist.contentProtection[keySystem].pssh;\\n    } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\\n    // so we need to prevent overwriting the URL entirely\\n\\n\\n    if (typeof keySystemOptions[keySystem] === 'string') {\\n      keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\\n    }\\n  }\\n\\n  return videojs$1.mergeOptions(keySystemOptions, keySystemContentTypes);\\n};\\n\\nvar setupEmeOptions = function setupEmeOptions(hlsHandler) {\\n  var mainSegmentLoader = hlsHandler.masterPlaylistController_.mainSegmentLoader_;\\n  var audioSegmentLoader = hlsHandler.masterPlaylistController_.audioSegmentLoader_;\\n  var player = videojs$1.players[hlsHandler.tech_.options_.playerId];\\n\\n  if (player.eme) {\\n    var sourceOptions = emeKeySystems(hlsHandler.source_.keySystems, mainSegmentLoader, audioSegmentLoader);\\n\\n    if (sourceOptions) {\\n      player.currentSource().keySystems = sourceOptions; // Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449\\n      // in non-IE11 browsers. In IE11 this is too early to initialize media keys\\n\\n      if (!(videojs$1.browser.IE_VERSION === 11) && player.eme.initializeMediaKeys) {\\n        player.eme.initializeMediaKeys();\\n      }\\n    }\\n  }\\n};\\n\\nvar getVhsLocalStorage = function getVhsLocalStorage() {\\n  if (!window.localStorage) {\\n    return null;\\n  }\\n\\n  var storedObject = window.localStorage.getItem(LOCAL_STORAGE_KEY$1);\\n\\n  if (!storedObject) {\\n    return null;\\n  }\\n\\n  try {\\n    return JSON.parse(storedObject);\\n  } catch (e) {\\n    // someone may have tampered with the value\\n    return null;\\n  }\\n};\\n\\nvar updateVhsLocalStorage = function updateVhsLocalStorage(options) {\\n  if (!window.localStorage) {\\n    return false;\\n  }\\n\\n  var objectToStore = getVhsLocalStorage();\\n  objectToStore = objectToStore ? videojs$1.mergeOptions(objectToStore, options) : options;\\n\\n  try {\\n    window.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(objectToStore));\\n  } catch (e) {\\n    // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\\n    // storage is set to 0).\\n    // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\\n    // No need to perform any operation.\\n    return false;\\n  }\\n\\n  return objectToStore;\\n};\\n/**\\n * Whether the browser has built-in HLS support.\\n */\\n\\n\\nHls$1.supportsNativeHls = function () {\\n  var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\\n\\n  if (!videojs$1.getTech('Html5').isSupported()) {\\n    return false;\\n  } // HLS manifests can go by many mime-types\\n\\n\\n  var canPlay = [// Apple santioned\\n  'application/vnd.apple.mpegurl', // Apple sanctioned for backwards compatibility\\n  'audio/mpegurl', // Very common\\n  'audio/x-mpegurl', // Very common\\n  'application/x-mpegurl', // Included for completeness\\n  'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\\n  return canPlay.some(function (canItPlay) {\\n    return /maybe|probably/i.test(video.canPlayType(canItPlay));\\n  });\\n}();\\n\\nHls$1.supportsNativeDash = function () {\\n  if (!videojs$1.getTech('Html5').isSupported()) {\\n    return false;\\n  }\\n\\n  return /maybe|probably/i.test(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video').canPlayType('application/dash+xml'));\\n}();\\n\\nHls$1.supportsTypeNatively = function (type) {\\n  if (type === 'hls') {\\n    return Hls$1.supportsNativeHls;\\n  }\\n\\n  if (type === 'dash') {\\n    return Hls$1.supportsNativeDash;\\n  }\\n\\n  return false;\\n};\\n/**\\n * HLS is a source handler, not a tech. Make sure attempts to use it\\n * as one do not cause exceptions.\\n */\\n\\n\\nHls$1.isSupported = function () {\\n  return videojs$1.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\\\'s techOrder.');\\n};\\n\\nvar Component$1 = videojs$1.getComponent('Component');\\n/**\\n * The Hls Handler object, where we orchestrate all of the parts\\n * of HLS to interact with video.js\\n *\\n * @class HlsHandler\\n * @extends videojs.Component\\n * @param {Object} source the soruce object\\n * @param {Tech} tech the parent tech object\\n * @param {Object} options optional and required options\\n */\\n\\nvar HlsHandler = function (_Component) {\\n  inherits(HlsHandler, _Component);\\n\\n  function HlsHandler(source, tech, options) {\\n    classCallCheck(this, HlsHandler); // tech.player() is deprecated but setup a reference to HLS for\\n    // backwards-compatibility\\n\\n    var _this = possibleConstructorReturn(this, (HlsHandler.__proto__ || Object.getPrototypeOf(HlsHandler)).call(this, tech, options.hls));\\n\\n    if (tech.options_ && tech.options_.playerId) {\\n      var _player = videojs$1(tech.options_.playerId);\\n\\n      if (!_player.hasOwnProperty('hls')) {\\n        Object.defineProperty(_player, 'hls', {\\n          get: function get$$1() {\\n            videojs$1.log.warn('player.hls is deprecated. Use player.tech().hls instead.');\\n            tech.trigger({\\n              type: 'usage',\\n              name: 'hls-player-access'\\n            });\\n            return _this;\\n          },\\n          configurable: true\\n        });\\n      } // Set up a reference to the HlsHandler from player.vhs. This allows users to start\\n      // migrating from player.tech_.hls... to player.vhs... for API access. Although this\\n      // isn't the most appropriate form of reference for video.js (since all APIs should\\n      // be provided through core video.js), it is a common pattern for plugins, and vhs\\n      // will act accordingly.\\n\\n\\n      _player.vhs = _this; // deprecated, for backwards compatibility\\n\\n      _player.dash = _this;\\n      _this.player_ = _player;\\n    }\\n\\n    _this.tech_ = tech;\\n    _this.source_ = source;\\n    _this.stats = {};\\n    _this.ignoreNextSeekingEvent_ = false;\\n\\n    _this.setOptions_();\\n\\n    if (_this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\\n      tech.overrideNativeAudioTracks(true);\\n      tech.overrideNativeVideoTracks(true);\\n    } else if (_this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\\n      // overriding native HLS only works if audio tracks have been emulated\\n      // error early if we're misconfigured\\n      throw new Error('Overriding native HLS requires emulated tracks. ' + 'See https://git.io/vMpjB');\\n    } // listen for fullscreenchange events for this player so that we\\n    // can adjust our quality selection quickly\\n\\n\\n    _this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], function (event) {\\n      var fullscreenElement = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.fullscreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.webkitFullscreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.mozFullScreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.msFullscreenElement;\\n\\n      if (fullscreenElement && fullscreenElement.contains(_this.tech_.el())) {\\n        _this.masterPlaylistController_.smoothQualityChange_();\\n      }\\n    });\\n\\n    _this.on(_this.tech_, 'seeking', function () {\\n      if (this.ignoreNextSeekingEvent_) {\\n        this.ignoreNextSeekingEvent_ = false;\\n        return;\\n      }\\n\\n      this.setCurrentTime(this.tech_.currentTime());\\n    });\\n\\n    _this.on(_this.tech_, 'error', function () {\\n      if (this.masterPlaylistController_) {\\n        this.masterPlaylistController_.pauseLoading();\\n      }\\n    });\\n\\n    _this.on(_this.tech_, 'play', _this.play);\\n\\n    return _this;\\n  }\\n\\n  createClass(HlsHandler, [{\\n    key: 'setOptions_',\\n    value: function setOptions_() {\\n      var _this2 = this; // defaults\\n\\n\\n      this.options_.withCredentials = this.options_.withCredentials || false;\\n      this.options_.handleManifestRedirects = this.options_.handleManifestRedirects || false;\\n      this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\\n      this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\\n      this.options_.smoothQualityChange = this.options_.smoothQualityChange || false;\\n      this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\\n      this.options_.customTagParsers = this.options_.customTagParsers || [];\\n      this.options_.customTagMappers = this.options_.customTagMappers || [];\\n      this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\\n\\n      if (typeof this.options_.blacklistDuration !== 'number') {\\n        this.options_.blacklistDuration = 5 * 60;\\n      }\\n\\n      if (typeof this.options_.bandwidth !== 'number') {\\n        if (this.options_.useBandwidthFromLocalStorage) {\\n          var storedObject = getVhsLocalStorage();\\n\\n          if (storedObject && storedObject.bandwidth) {\\n            this.options_.bandwidth = storedObject.bandwidth;\\n            this.tech_.trigger({\\n              type: 'usage',\\n              name: 'hls-bandwidth-from-local-storage'\\n            });\\n          }\\n\\n          if (storedObject && storedObject.throughput) {\\n            this.options_.throughput = storedObject.throughput;\\n            this.tech_.trigger({\\n              type: 'usage',\\n              name: 'hls-throughput-from-local-storage'\\n            });\\n          }\\n        }\\n      } // if bandwidth was not set by options or pulled from local storage, start playlist\\n      // selection at a reasonable bandwidth\\n\\n\\n      if (typeof this.options_.bandwidth !== 'number') {\\n        this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\\n      } // If the bandwidth number is unchanged from the initial setting\\n      // then this takes precedence over the enableLowInitialPlaylist option\\n\\n\\n      this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\\n\\n      ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'smoothQualityChange', 'customTagParsers', 'customTagMappers', 'handleManifestRedirects', 'cacheEncryptionKeys'].forEach(function (option) {\\n        if (typeof _this2.source_[option] !== 'undefined') {\\n          _this2.options_[option] = _this2.source_[option];\\n        }\\n      });\\n      this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\\n      this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\\n    }\\n    /**\\n     * called when player.src gets called, handle a new source\\n     *\\n     * @param {Object} src the source object to handle\\n     */\\n\\n  }, {\\n    key: 'src',\\n    value: function src(_src, type) {\\n      var _this3 = this; // do nothing if the src is falsey\\n\\n\\n      if (!_src) {\\n        return;\\n      }\\n\\n      this.setOptions_(); // add master playlist controller options\\n\\n      this.options_.url = this.source_.src;\\n      this.options_.tech = this.tech_;\\n      this.options_.externHls = Hls$1;\\n      this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\\n\\n      this.options_.seekTo = function (time) {\\n        _this3.tech_.setCurrentTime(time);\\n      };\\n\\n      this.masterPlaylistController_ = new MasterPlaylistController(this.options_);\\n      this.playbackWatcher_ = new PlaybackWatcher(videojs$1.mergeOptions(this.options_, {\\n        seekable: function seekable$$1() {\\n          return _this3.seekable();\\n        },\\n        media: function media() {\\n          return _this3.masterPlaylistController_.media();\\n        }\\n      }));\\n      this.masterPlaylistController_.on('error', function () {\\n        var player = videojs$1.players[_this3.tech_.options_.playerId];\\n        player.error(_this3.masterPlaylistController_.error);\\n      }); // `this` in selectPlaylist should be the HlsHandler for backwards\\n      // compatibility with < v2\\n\\n      this.masterPlaylistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : Hls$1.STANDARD_PLAYLIST_SELECTOR.bind(this);\\n      this.masterPlaylistController_.selectInitialPlaylist = Hls$1.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\\n\\n      this.playlists = this.masterPlaylistController_.masterPlaylistLoader_;\\n      this.mediaSource = this.masterPlaylistController_.mediaSource; // Proxy assignment of some properties to the master playlist\\n      // controller. Using a custom property for backwards compatibility\\n      // with < v2\\n\\n      Object.defineProperties(this, {\\n        selectPlaylist: {\\n          get: function get$$1() {\\n            return this.masterPlaylistController_.selectPlaylist;\\n          },\\n          set: function set$$1(selectPlaylist) {\\n            this.masterPlaylistController_.selectPlaylist = selectPlaylist.bind(this);\\n          }\\n        },\\n        throughput: {\\n          get: function get$$1() {\\n            return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;\\n          },\\n          set: function set$$1(throughput) {\\n            this.masterPlaylistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\\n            // for the cumulative average\\n\\n            this.masterPlaylistController_.mainSegmentLoader_.throughput.count = 1;\\n          }\\n        },\\n        bandwidth: {\\n          get: function get$$1() {\\n            return this.masterPlaylistController_.mainSegmentLoader_.bandwidth;\\n          },\\n          set: function set$$1(bandwidth) {\\n            this.masterPlaylistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\\n            // `count` is set to zero that current value of `rate` isn't included\\n            // in the cumulative average\\n\\n            this.masterPlaylistController_.mainSegmentLoader_.throughput = {\\n              rate: 0,\\n              count: 0\\n            };\\n          }\\n        },\\n\\n        /**\\n         * `systemBandwidth` is a combination of two serial processes bit-rates. The first\\n         * is the network bitrate provided by `bandwidth` and the second is the bitrate of\\n         * the entire process after that - decryption, transmuxing, and appending - provided\\n         * by `throughput`.\\n         *\\n         * Since the two process are serial, the overall system bandwidth is given by:\\n         *   sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\\n         */\\n        systemBandwidth: {\\n          get: function get$$1() {\\n            var invBandwidth = 1 / (this.bandwidth || 1);\\n            var invThroughput = void 0;\\n\\n            if (this.throughput > 0) {\\n              invThroughput = 1 / this.throughput;\\n            } else {\\n              invThroughput = 0;\\n            }\\n\\n            var systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\\n            return systemBitrate;\\n          },\\n          set: function set$$1() {\\n            videojs$1.log.error('The \\\"systemBandwidth\\\" property is read-only');\\n          }\\n        }\\n      });\\n\\n      if (this.options_.bandwidth) {\\n        this.bandwidth = this.options_.bandwidth;\\n      }\\n\\n      if (this.options_.throughput) {\\n        this.throughput = this.options_.throughput;\\n      }\\n\\n      Object.defineProperties(this.stats, {\\n        bandwidth: {\\n          get: function get$$1() {\\n            return _this3.bandwidth || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequests: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequests_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequestsAborted: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequestsAborted_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequestsTimedout: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequestsTimedout_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequestsErrored: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequestsErrored_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaTransferDuration: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaTransferDuration_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaBytesTransferred: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaBytesTransferred_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaSecondsLoaded: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaSecondsLoaded_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        buffered: {\\n          get: function get$$1() {\\n            return timeRangesToArray(_this3.tech_.buffered());\\n          },\\n          enumerable: true\\n        },\\n        currentTime: {\\n          get: function get$$1() {\\n            return _this3.tech_.currentTime();\\n          },\\n          enumerable: true\\n        },\\n        currentSource: {\\n          get: function get$$1() {\\n            return _this3.tech_.currentSource_;\\n          },\\n          enumerable: true\\n        },\\n        currentTech: {\\n          get: function get$$1() {\\n            return _this3.tech_.name_;\\n          },\\n          enumerable: true\\n        },\\n        duration: {\\n          get: function get$$1() {\\n            return _this3.tech_.duration();\\n          },\\n          enumerable: true\\n        },\\n        master: {\\n          get: function get$$1() {\\n            return _this3.playlists.master;\\n          },\\n          enumerable: true\\n        },\\n        playerDimensions: {\\n          get: function get$$1() {\\n            return _this3.tech_.currentDimensions();\\n          },\\n          enumerable: true\\n        },\\n        seekable: {\\n          get: function get$$1() {\\n            return timeRangesToArray(_this3.tech_.seekable());\\n          },\\n          enumerable: true\\n        },\\n        timestamp: {\\n          get: function get$$1() {\\n            return Date.now();\\n          },\\n          enumerable: true\\n        },\\n        videoPlaybackQuality: {\\n          get: function get$$1() {\\n            return _this3.tech_.getVideoPlaybackQuality();\\n          },\\n          enumerable: true\\n        }\\n      });\\n      this.tech_.one('canplay', this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));\\n      this.tech_.on('bandwidthupdate', function () {\\n        if (_this3.options_.useBandwidthFromLocalStorage) {\\n          updateVhsLocalStorage({\\n            bandwidth: _this3.bandwidth,\\n            throughput: Math.round(_this3.throughput)\\n          });\\n        }\\n      });\\n      this.masterPlaylistController_.on('selectedinitialmedia', function () {\\n        // Add the manual rendition mix-in to HlsHandler\\n        renditionSelectionMixin(_this3);\\n        setupEmeOptions(_this3);\\n      }); // the bandwidth of the primary segment loader is our best\\n      // estimate of overall bandwidth\\n\\n      this.on(this.masterPlaylistController_, 'progress', function () {\\n        this.tech_.trigger('progress');\\n      }); // In the live case, we need to ignore the very first `seeking` event since\\n      // that will be the result of the seek-to-live behavior\\n\\n      this.on(this.masterPlaylistController_, 'firstplay', function () {\\n        this.ignoreNextSeekingEvent_ = true;\\n      });\\n      this.setupQualityLevels_(); // do nothing if the tech has been disposed already\\n      // this can occur if someone sets the src in player.ready(), for instance\\n\\n      if (!this.tech_.el()) {\\n        return;\\n      }\\n\\n      this.tech_.src(videojs$1.URL.createObjectURL(this.masterPlaylistController_.mediaSource));\\n    }\\n    /**\\n     * Initializes the quality levels and sets listeners to update them.\\n     *\\n     * @method setupQualityLevels_\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'setupQualityLevels_',\\n    value: function setupQualityLevels_() {\\n      var _this4 = this;\\n\\n      var player = videojs$1.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\\n      // or qualityLevels_ listeners have already been setup, do nothing.\\n\\n      if (!player || !player.qualityLevels || this.qualityLevels_) {\\n        return;\\n      }\\n\\n      this.qualityLevels_ = player.qualityLevels();\\n      this.masterPlaylistController_.on('selectedinitialmedia', function () {\\n        handleHlsLoadedMetadata(_this4.qualityLevels_, _this4);\\n      });\\n      this.playlists.on('mediachange', function () {\\n        handleHlsMediaChange(_this4.qualityLevels_, _this4.playlists);\\n      });\\n    }\\n    /**\\n     * Begin playing the video.\\n     */\\n\\n  }, {\\n    key: 'play',\\n    value: function play() {\\n      this.masterPlaylistController_.play();\\n    }\\n    /**\\n     * a wrapper around the function in MasterPlaylistController\\n     */\\n\\n  }, {\\n    key: 'setCurrentTime',\\n    value: function setCurrentTime(currentTime) {\\n      this.masterPlaylistController_.setCurrentTime(currentTime);\\n    }\\n    /**\\n     * a wrapper around the function in MasterPlaylistController\\n     */\\n\\n  }, {\\n    key: 'duration',\\n    value: function duration$$1() {\\n      return this.masterPlaylistController_.duration();\\n    }\\n    /**\\n     * a wrapper around the function in MasterPlaylistController\\n     */\\n\\n  }, {\\n    key: 'seekable',\\n    value: function seekable$$1() {\\n      return this.masterPlaylistController_.seekable();\\n    }\\n    /**\\n     * Abort all outstanding work and cleanup.\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      if (this.playbackWatcher_) {\\n        this.playbackWatcher_.dispose();\\n      }\\n\\n      if (this.masterPlaylistController_) {\\n        this.masterPlaylistController_.dispose();\\n      }\\n\\n      if (this.qualityLevels_) {\\n        this.qualityLevels_.dispose();\\n      }\\n\\n      if (this.player_) {\\n        delete this.player_.vhs;\\n        delete this.player_.dash;\\n        delete this.player_.hls;\\n      }\\n\\n      if (this.tech_ && this.tech_.hls) {\\n        delete this.tech_.hls;\\n      }\\n\\n      get$1(HlsHandler.prototype.__proto__ || Object.getPrototypeOf(HlsHandler.prototype), 'dispose', this).call(this);\\n    }\\n  }, {\\n    key: 'convertToProgramTime',\\n    value: function convertToProgramTime(time, callback) {\\n      return getProgramTime({\\n        playlist: this.masterPlaylistController_.media(),\\n        time: time,\\n        callback: callback\\n      });\\n    } // the player must be playing before calling this\\n\\n  }, {\\n    key: 'seekToProgramTime',\\n    value: function seekToProgramTime$$1(programTime, callback) {\\n      var pauseAfterSeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\\n      var retryCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;\\n      return seekToProgramTime({\\n        programTime: programTime,\\n        playlist: this.masterPlaylistController_.media(),\\n        retryCount: retryCount,\\n        pauseAfterSeek: pauseAfterSeek,\\n        seekTo: this.options_.seekTo,\\n        tech: this.options_.tech,\\n        callback: callback\\n      });\\n    }\\n  }]);\\n  return HlsHandler;\\n}(Component$1);\\n/**\\n * The Source Handler object, which informs video.js what additional\\n * MIME types are supported and sets up playback. It is registered\\n * automatically to the appropriate tech based on the capabilities of\\n * the browser it is running in. It is not necessary to use or modify\\n * this object in normal usage.\\n */\\n\\n\\nvar HlsSourceHandler = {\\n  name: 'videojs-http-streaming',\\n  VERSION: version$1,\\n  canHandleSource: function canHandleSource(srcObj) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n    var localOptions = videojs$1.mergeOptions(videojs$1.options, options);\\n    return HlsSourceHandler.canPlayType(srcObj.type, localOptions);\\n  },\\n  handleSource: function handleSource(source, tech) {\\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\\n    var localOptions = videojs$1.mergeOptions(videojs$1.options, options);\\n    tech.hls = new HlsHandler(source, tech, localOptions);\\n    tech.hls.xhr = xhrFactory();\\n    tech.hls.src(source.src, source.type);\\n    return tech.hls;\\n  },\\n  canPlayType: function canPlayType(type) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    var _videojs$mergeOptions = videojs$1.mergeOptions(videojs$1.options, options),\\n        overrideNative = _videojs$mergeOptions.hls.overrideNative;\\n\\n    var supportedType = simpleTypeFromSourceType(type);\\n    var canUseMsePlayback = supportedType && (!Hls$1.supportsTypeNatively(supportedType) || overrideNative);\\n    return canUseMsePlayback ? 'maybe' : '';\\n  }\\n};\\n\\nif (typeof videojs$1.MediaSource === 'undefined' || typeof videojs$1.URL === 'undefined') {\\n  videojs$1.MediaSource = MediaSource;\\n  videojs$1.URL = URL$1;\\n} // register source handlers with the appropriate techs\\n\\n\\nif (MediaSource.supportsNativeMediaSources()) {\\n  videojs$1.getTech('Html5').registerSourceHandler(HlsSourceHandler, 0);\\n}\\n\\nvideojs$1.HlsHandler = HlsHandler;\\nvideojs$1.HlsSourceHandler = HlsSourceHandler;\\nvideojs$1.Hls = Hls$1;\\n\\nif (!videojs$1.use) {\\n  videojs$1.registerComponent('Hls', Hls$1);\\n}\\n\\nvideojs$1.options.hls = videojs$1.options.hls || {};\\n\\nif (videojs$1.registerPlugin) {\\n  videojs$1.registerPlugin('reloadSourceOnError', reloadSourceOnError);\\n} else {\\n  videojs$1.plugin('reloadSourceOnError', reloadSourceOnError);\\n}\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (videojs$1);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/dist/video.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/dist/video.es.js-exposed\":\n/*!*********************************************************!*\\\n  !*** ../node_modules/video.js/dist/video.es.js-exposed ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./video.es.js */ \\\"../node_modules/video.js/dist/video.es.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/dist/video.es.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js\":\n/*!*********************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!\n  \\*********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _assertThisInitialized(self) {\\n  if (self === void 0) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return self;\\n}\\n\\nmodule.exports = _assertThisInitialized;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed\":\n/*!*****************************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed ***!\n  \\*****************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./assertThisInitialized.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js\":\n/*!*********************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js ***!\n  \\*********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed\\\");\\n\\nvar isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed\\\");\\n\\nfunction _construct(Parent, args, Class) {\\n  if (isNativeReflectConstruct()) {\\n    module.exports = _construct = Reflect.construct;\\n  } else {\\n    module.exports = _construct = function _construct(Parent, args, Class) {\\n      var a = [null];\\n      a.push.apply(a, args);\\n      var Constructor = Function.bind.apply(Parent, a);\\n      var instance = new Constructor();\\n      if (Class) setPrototypeOf(instance, Class.prototype);\\n      return instance;\\n    };\\n  }\\n\\n  return _construct.apply(null, arguments);\\n}\\n\\nmodule.exports = _construct;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed\":\n/*!*****************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed ***!\n  \\*****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./construct.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js\":\n/*!*******************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _extends() {\\n  module.exports = _extends = Object.assign || function (target) {\\n    for (var i = 1; i < arguments.length; i++) {\\n      var source = arguments[i];\\n\\n      for (var key in source) {\\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\\n          target[key] = source[key];\\n        }\\n      }\\n    }\\n\\n    return target;\\n  };\\n\\n  return _extends.apply(this, arguments);\\n}\\n\\nmodule.exports = _extends;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed\":\n/*!***************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./extends.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _getPrototypeOf(o) {\\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\\n    return o.__proto__ || Object.getPrototypeOf(o);\\n  };\\n  return _getPrototypeOf(o);\\n}\\n\\nmodule.exports = _getPrototypeOf;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed\":\n/*!**********************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed ***!\n  \\**********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./getPrototypeOf.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js\":\n/*!********************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js ***!\n  \\********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed\\\");\\n\\nfunction _inherits(subClass, superClass) {\\n  if (typeof superClass !== \\\"function\\\" && superClass !== null) {\\n    throw new TypeError(\\\"Super expression must either be null or a function\\\");\\n  }\\n\\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\\n    constructor: {\\n      value: subClass,\\n      writable: true,\\n      configurable: true\\n    }\\n  });\\n  if (superClass) setPrototypeOf(subClass, superClass);\\n}\\n\\nmodule.exports = _inherits;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed\":\n/*!****************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed ***!\n  \\****************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./inherits.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js\":\n/*!*************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js ***!\n  \\*************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _inheritsLoose(subClass, superClass) {\\n  subClass.prototype = Object.create(superClass.prototype);\\n  subClass.prototype.constructor = subClass;\\n  subClass.__proto__ = superClass;\\n}\\n\\nmodule.exports = _inheritsLoose;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed\":\n/*!*********************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed ***!\n  \\*********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./inheritsLoose.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\":\n/*!************************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!\n  \\************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _isNativeReflectConstruct() {\\n  if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false;\\n  if (Reflect.construct.sham) return false;\\n  if (typeof Proxy === \\\"function\\\") return true;\\n\\n  try {\\n    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\\n    return true;\\n  } catch (e) {\\n    return false;\\n  }\\n}\\n\\nmodule.exports = _isNativeReflectConstruct;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed\":\n/*!********************************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed ***!\n  \\********************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./isNativeReflectConstruct.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\":\n/*!*************************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!\n  \\*************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var _typeof = __webpack_require__(/*! ../helpers/typeof */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed\\\");\\n\\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed\\\");\\n\\nfunction _possibleConstructorReturn(self, call) {\\n  if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) {\\n    return call;\\n  }\\n\\n  return assertThisInitialized(self);\\n}\\n\\nmodule.exports = _possibleConstructorReturn;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed\":\n/*!*********************************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed ***!\n  \\*********************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./possibleConstructorReturn.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _setPrototypeOf(o, p) {\\n  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\\n    o.__proto__ = p;\\n    return o;\\n  };\\n\\n  return _setPrototypeOf(o, p);\\n}\\n\\nmodule.exports = _setPrototypeOf;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed\":\n/*!**********************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed ***!\n  \\**********************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./setPrototypeOf.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js\":\n/*!******************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js ***!\n  \\******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"function _typeof(obj) {\\n  \\\"@babel/helpers - typeof\\\";\\n\\n  if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") {\\n    module.exports = _typeof = function _typeof(obj) {\\n      return typeof obj;\\n    };\\n  } else {\\n    module.exports = _typeof = function _typeof(obj) {\\n      return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj;\\n    };\\n  }\\n\\n  return _typeof(obj);\\n}\\n\\nmodule.exports = _typeof;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed\":\n/*!**************************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./typeof.js */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/global/document.js\":\n/*!****************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/global/document.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global :\\n    typeof window !== 'undefined' ? window : {}\\nvar minDoc = __webpack_require__(/*! min-document */ 0);\\n\\nvar doccy;\\n\\nif (typeof document !== 'undefined') {\\n    doccy = document;\\n} else {\\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\\n\\n    if (!doccy) {\\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\\n    }\\n}\\n\\nmodule.exports = doccy;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/document.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/global/document.js-exposed\":\n/*!************************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/global/document.js-exposed ***!\n  \\************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./document.js */ \\\"../node_modules/video.js/node_modules/global/document.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/document.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/global/window.js\":\n/*!**************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/global/window.js ***!\n  \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {var win;\\n\\nif (typeof window !== \\\"undefined\\\") {\\n    win = window;\\n} else if (typeof global !== \\\"undefined\\\") {\\n    win = global;\\n} else if (typeof self !== \\\"undefined\\\"){\\n    win = self;\\n} else {\\n    win = {};\\n}\\n\\nmodule.exports = win;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/window.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/video.js/node_modules/global/window.js-exposed\":\n/*!**********************************************************************!*\\\n  !*** ../node_modules/video.js/node_modules/global/window.js-exposed ***!\n  \\**********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\\\"videojs\\\"] = __webpack_require__(/*! -!./window.js */ \\\"../node_modules/video.js/node_modules/global/window.js\\\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/window.js-exposed?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-contextmenu/es5/plugin.js\":\n/*!*********************************************************!*\\\n  !*** ../node_modules/videojs-contextmenu/es5/plugin.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/**\\n * @module plugin\\n */\\n\\n\\nObject.defineProperty(exports, '__esModule', {\\n  value: true\\n});\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\\n\\nvar _videoJs = __webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\");\\n\\nvar _videoJs2 = _interopRequireDefault(_videoJs);\\n\\n// vjs 5/6 cross compatibility.\\nvar registerPlugin = _videoJs2['default'].registerPlugin || _videoJs2['default'].plugin;\\n\\n/* eslint func-style: 0 */\\n\\nvar defaults = {\\n  cancel: true,\\n  sensitivity: 10,\\n  wait: 500,\\n  disabled: false\\n};\\n\\nvar EVENT_NAME = 'vjs-contextmenu';\\n\\n/**\\n * Abstracts a DOM standard event into a vjs-contextmenu event.\\n *\\n * @private\\n * @param  {Player} player\\n * @param  {Event} event\\n *         A triggering, native event.\\n * @return {Player}\\n */\\nfunction sendAbstractedEvent(player, event) {\\n  if (player.contextmenu.options.disabled) {\\n    // videojs-contextmenu is disabled\\n    return player;\\n  }\\n  var abstracted = {\\n    target: player,\\n    type: EVENT_NAME\\n  };\\n\\n  ['clientX', 'clientY', 'pageX', 'pageY', 'screenX', 'screenY'].forEach(function (k) {\\n    abstracted[k] = event[k];\\n  });\\n\\n  return player.trigger(abstracted);\\n}\\n\\n/**\\n * Handles both touchcancel and touchend events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleTouchEnd(e) {\\n  var current = this.contextmenu.current;\\n\\n  if (!current) {\\n    return;\\n  }\\n\\n  var wait = this.contextmenu.options.wait;\\n\\n  if (e.type === 'touchend' && Number(new Date()) - current.time >= wait) {\\n    sendAbstractedEvent(this, e);\\n  }\\n\\n  this.contextmenu.current = null;\\n}\\n\\n/**\\n * Handles touchmove events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleTouchMove(e) {\\n  var current = this.contextmenu.current;\\n\\n  if (!current) {\\n    return;\\n  }\\n\\n  var touch = e.touches[0];\\n  var sensitivity = this.contextmenu.options.sensitivity;\\n\\n  // Cancel the current touch if the pointer has moved in either direction\\n  // more than the sensitivity number of pixels.\\n  if (touch.screenX - current.screenX > sensitivity || touch.screenY - current.screenY > sensitivity) {\\n    this.contextmenu.current = null;\\n  }\\n}\\n\\n/**\\n * Handles touchstart events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleTouchStart(e) {\\n\\n  // We only care about the first touch point.\\n  if (this.contextmenu.current) {\\n    return;\\n  }\\n\\n  var touch = e.touches[0];\\n\\n  this.contextmenu.current = {\\n    screenX: touch.screenX,\\n    screenY: touch.screenY,\\n    time: Number(new Date())\\n  };\\n}\\n\\n/**\\n * Handles contextmenu events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleContextMenu(e) {\\n  if (this.contextmenu.options.cancel && !this.contextmenu.options.disabled) {\\n    e.preventDefault();\\n  }\\n\\n  sendAbstractedEvent(this, e);\\n\\n  // If we get a \\\"contextmenu\\\" event, we can rely on that going forward\\n  // because this client supports it; so, we can stop listening for\\n  // touch events.\\n  this.off(['touchcancel', 'touchend'], handleTouchEnd);\\n  this.off('touchmove', handleTouchMove);\\n  this.off('touchstart', handleTouchStart);\\n}\\n\\n/**\\n * A cross-device context menu implementation for video.js players.\\n *\\n * @param    {Object}  [options={}]\\n * @param    {Boolean} [cancel=true]\\n *           Whether or not to cancel the native \\\"contextmenu\\\" event when\\n *           it is seen.\\n *\\n * @param    {Number} [sensitivity=10]\\n *           The maximum number of pixels a finger can move because a touch\\n *           is no longer considered to be \\\"held\\\".\\n *\\n * @param    {Number} [wait=500]\\n *           The minimum number of milliseconds a touch must be \\\"held\\\" before\\n *           it registers.\\n */\\nfunction contextmenu(options) {\\n  var _this = this;\\n\\n  this.contextmenu.options = _videoJs2['default'].mergeOptions(defaults, options);\\n  this.contextmenu.VERSION = '__VERSION__';\\n\\n  this.on('contextmenu', handleContextMenu);\\n  this.on(['touchcancel', 'touchend'], handleTouchEnd);\\n  this.on('touchmove', handleTouchMove);\\n  this.on('touchstart', handleTouchStart);\\n\\n  this.ready(function () {\\n    return _this.addClass(EVENT_NAME);\\n  });\\n}\\n\\nregisterPlugin('contextmenu', contextmenu);\\ncontextmenu.VERSION = '__VERSION__';\\n\\nexports['default'] = contextmenu;\\nmodule.exports = exports['default'];\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-contextmenu/es5/plugin.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js\":\n/*!***************************************************************************!*\\\n  !*** ../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/*! @name videojs-contrib-ads @version 6.6.5 @license Apache-2.0 */\\n!function(e,t){ true?module.exports=t(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"),__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"),__webpack_require__(/*! global/document */ \\\"../node_modules/global/document.js\\\")):undefined}(this,function(e,t,n){\\\"use strict\\\";e=e&&e.hasOwnProperty(\\\"default\\\")?e.default:e,t=t&&t.hasOwnProperty(\\\"default\\\")?t.default:t,n=n&&n.hasOwnProperty(\\\"default\\\")?n.default:n;var a=\\\"6.6.5\\\";var o=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},r=function(e,t,n){o(0,n),e.trigger({type:t+n.type,originalEvent:n})},i=function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&r(e,\\\"content\\\",t):r(e,\\\"ad\\\",t))},s=function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(o(0,t),e.trigger(\\\"resumeended\\\")):r(e,\\\"ad\\\",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(r(e,\\\"content\\\",t),e.trigger(\\\"readyforpostroll\\\"))},d=function(e,t){if(!(\\\"loadstart\\\"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||\\\"loadeddata\\\"===t.type&&!e.ads._hasThereBeenALoadedData||\\\"loadedmetadata\\\"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())r(e,\\\"ad\\\",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;r(e,\\\"content\\\",t)}},l=function(e,t){e.ads.inAdBreak()?r(e,\\\"ad\\\",t):e.ads.isContentResuming()&&r(e,\\\"content\\\",t)};function u(e){\\\"playing\\\"===e.type?i(this,e):\\\"ended\\\"===e.type?s(this,e):\\\"loadstart\\\"===e.type||\\\"loadeddata\\\"===e.type||\\\"loadedmetadata\\\"===e.type?d(this,e):\\\"play\\\"===e.type?l(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?r(this,\\\"content\\\",e):r(this,\\\"ad\\\",e))}var c=function(e,t){return t?encodeURIComponent(e):e},h=function(e,t,n){if(e&&e[n])for(var a=e[n],o=Object.keys(a),r=0;r<o.length;r++){t[\\\"{mediainfo.\\\"+n+\\\".\\\"+o[r]+\\\"}\\\"]=a[o[r]]}};var f={processMetadataTracks:function(e,t){for(var n=e.textTracks(),a=function(n){\\\"metadata\\\"===n.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(n),t(e,n))},o=0;o<n.length;o++)a(n[o]);n.addEventListener(\\\"addtrack\\\",function(e){a(e.track)})},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},p=function(e,t){return void 0!==t&&e.ads.includedCues[t]},g=function(e,t){void 0!==t&&\\\"\\\"!==t&&(e.ads.includedCues[t]=!0)};function v(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug(\\\"Playback was canceled by cancelContentPlay\\\"),this.pause()),this.ads._cancelledPlay=!0)}f.processAdTrack=function(t,n,a,o){t.ads.includedCues={};for(var r=0;r<n.length;r++){var i=n[r],s=this.getSupportedAdCue(t,i);if(!this.isSupportedAdCue(t,i))return void e.log.warn(\\\"Skipping as this is not a supported ad cue.\\\",i);var d=this.getCueId(t,i),l=i.startTime;if(p(t,d))return void e.log(\\\"Skipping ad already seen with ID \\\"+d);o&&o(t,s,d,l),a(t,s,d,l),g(t,d)}};var y={},m=e;y.isMiddlewareMediatorSupported=function(){return!m.browser.IS_IOS&&!m.browser.IS_ANDROID&&!!(m.use&&m.middleware&&m.middleware.TERMINATOR)},y.playMiddleware=function(t){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(t.ads&&!0===t.ads._shouldBlockPlay)return t.ads.debug(\\\"Using playMiddleware to block content playback\\\"),t.ads._playBlocked=!0,m.middleware.TERMINATOR},play:function(n,a){t.ads&&t.ads._playBlocked&&n?(t.ads.debug(\\\"Play call to Tech was terminated.\\\"),t.trigger(\\\"play\\\"),t.addClass(\\\"vjs-has-started\\\"),t.ads._playBlocked=!1):a&&a.catch&&a.catch(function(n){\\\"NotAllowedError\\\"!==n.name||e.browser.IS_SAFARI||t.trigger(\\\"pause\\\")})}}},y.testHook=function(e){m=e};var A=y.playMiddleware,S=y.isMiddlewareMediatorSupported,_=function(){if(e.getPlugin)return Boolean(e.getPlugin(\\\"ads\\\"));var t=e.getComponent(\\\"Player\\\");return Boolean(t&&t.prototype.ads)};var P=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,n){if(\\\"string\\\"!=typeof t||!t)throw new Error('Illegal state name, \\\"'+t+'\\\"; must be a non-empty string.');return e.states_||(e.states_={}),e.states_[t]=n,n},e}(),b=function(){function t(e){this.player=e}t._getName=function(){return\\\"Anonymous State\\\"};var n=t.prototype;return n.transitionTo=function(e){var t=this.player;this.cleanup(t);var n=new e(t);t.ads._state=n,t.ads.debug(this.constructor._getName()+\\\" -> \\\"+n.constructor._getName());for(var a=arguments.length,o=new Array(a>1?a-1:0),r=1;r<a;r++)o[r-1]=arguments[r];n.init.apply(n,[t].concat(o))},n.init=function(){},n.cleanup=function(){},n.onPlay=function(){},n.onPlaying=function(){},n.onEnded=function(){},n.onAdEnded=function(){},n.onAdsReady=function(){e.log.warn(\\\"Unexpected adsready event\\\")},n.onAdsError=function(){},n.onAdsCanceled=function(){},n.onAdTimeout=function(){},n.onAdStarted=function(){},n.onContentChanged=function(){},n.onContentResumed=function(){},n.onReadyForPostroll=function(){e.log.warn(\\\"Unexpected readyforpostroll event\\\")},n.onNoPreroll=function(){},n.onNoPostroll=function(){},n.startLinearAdMode=function(){e.log.warn(\\\"Unexpected startLinearAdMode invocation (State via \\\"+this.constructor._getName()+\\\")\\\")},n.endLinearAdMode=function(){e.log.warn(\\\"Unexpected endLinearAdMode invocation (State via \\\"+this.constructor._getName()+\\\")\\\")},n.skipLinearAdMode=function(){e.log.warn(\\\"Unexpected skipLinearAdMode invocation (State via \\\"+this.constructor._getName()+\\\")\\\")},n.isAdState=function(){throw new Error(\\\"isAdState unimplemented for \\\"+this.constructor._getName())},n.isWaitingForAdBreak=function(){return!1},n.isContentResuming=function(){return!1},n.inAdBreak=function(){return!1},n.handleEvent=function(e){var t=this.player;\\\"play\\\"===e?this.onPlay(t):\\\"adsready\\\"===e?this.onAdsReady(t):\\\"adserror\\\"===e?this.onAdsError(t):\\\"adscanceled\\\"===e?this.onAdsCanceled(t):\\\"adtimeout\\\"===e?this.onAdTimeout(t):\\\"ads-ad-started\\\"===e?this.onAdStarted(t):\\\"contentchanged\\\"===e?this.onContentChanged(t):\\\"contentresumed\\\"===e?this.onContentResumed(t):\\\"readyforpostroll\\\"===e?this.onReadyForPostroll(t):\\\"playing\\\"===e?this.onPlaying(t):\\\"ended\\\"===e?this.onEnded(t):\\\"nopreroll\\\"===e?this.onNoPreroll(t):\\\"nopostroll\\\"===e?this.onNoPostroll(t):\\\"adended\\\"===e&&this.onAdEnded(t)},t}();function k(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}P.registerState(\\\"State\\\",b);var C=function(e){function t(t){var n;return(n=e.call(this,t)||this).contentResuming=!1,n.waitingForAdBreak=!1,n}k(t,e);var n=t.prototype;return n.isAdState=function(){return!0},n.onPlaying=function(){var e=P.getState(\\\"ContentPlayback\\\");this.contentResuming&&this.transitionTo(e)},n.onContentResumed=function(){var e=P.getState(\\\"ContentPlayback\\\");this.contentResuming&&this.transitionTo(e)},n.isWaitingForAdBreak=function(){return this.waitingForAdBreak},n.isContentResuming=function(){return this.contentResuming},n.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(b);P.registerState(\\\"AdState\\\",C);var T=function(e){function t(){return e.apply(this,arguments)||this}k(t,e);var n=t.prototype;return n.isAdState=function(){return!1},n.onContentChanged=function(e){var t=P.getState(\\\"BeforePreroll\\\"),n=P.getState(\\\"Preroll\\\");e.ads.debug(\\\"Received contentchanged event (ContentState)\\\"),e.paused()?this.transitionTo(t):(this.transitionTo(n,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(b);P.registerState(\\\"ContentState\\\",T);var w,R=function(t){function n(){return t.apply(this,arguments)||this}k(n,t),n._getName=function(){return\\\"AdsDone\\\"};var a=n.prototype;return a.init=function(e){e.ads._contentHasEnded=!0,e.trigger(\\\"ended\\\")},a.startLinearAdMode=function(){e.log.warn(\\\"Unexpected startLinearAdMode invocation (AdsDone)\\\")},n}(P.getState(\\\"ContentState\\\"));P.registerState(\\\"AdsDone\\\",R);var B={start:function(t){t.ads.debug(\\\"Starting ad break\\\"),t.ads._inLinearAdMode=!0,t.trigger(\\\"adstart\\\"),t.ads.shouldTakeSnapshots()&&(t.ads.snapshot=function(t){var n;n=e.browser.IS_IOS&&t.ads.isLive(t)&&t.seekable().length>0?t.currentTime()-t.seekable().end(0):t.currentTime();var a=t.$(\\\".vjs-tech\\\"),o=t.textTracks?t.textTracks():[],r=[],i={ended:t.ended(),currentSrc:t.currentSrc(),sources:t.currentSources(),src:t.tech_.src(),currentTime:n,type:t.currentType()};a&&(i.style=a.getAttribute(\\\"style\\\"));for(var s=0;s<o.length;s++){var d=o[s];r.push({track:d,mode:d.mode}),d.mode=\\\"disabled\\\"}return i.suppressedTracks=r,i}(t)),t.ads.shouldPlayContentBehindAd(t)&&(t.ads.preAdVolume_=t.volume(),t.volume(0)),t.addClass(\\\"vjs-ad-playing\\\"),t.hasClass(\\\"vjs-live\\\")&&t.removeClass(\\\"vjs-live\\\"),t.ads.removeNativePoster()},end:function(t,n){t.ads.debug(\\\"Ending ad break\\\"),void 0===n&&(n=function(){}),t.ads.adType=null,t.ads._inLinearAdMode=!1,t.trigger(\\\"adend\\\"),t.removeClass(\\\"vjs-ad-playing\\\"),t.ads.isLive(t)&&t.addClass(\\\"vjs-live\\\"),t.ads.shouldTakeSnapshots()?function(t,n){var a=t.ads.snapshot;if(void 0===n&&(n=function(){}),!0===t.ads.disableNextSnapshotRestore)return t.ads.disableNextSnapshotRestore=!1,delete t.ads.snapshot,void n();var o,r=t.$(\\\".vjs-tech\\\"),i=20,s=a.suppressedTracks,d=function(){for(var e=0;e<s.length;e++)(o=s[e]).track.mode=o.mode},l=function(){var n;if(e.browser.IS_IOS&&t.ads.isLive(t)){if(a.currentTime<0&&(n=t.seekable().length>0?t.seekable().end(0)+a.currentTime:t.currentTime(),t.currentTime(n)),t.paused()){var o=t.play();o&&o.catch&&o.catch(function(t){e.log.warn(\\\"Play promise rejected in IOS snapshot resume\\\",t)})}}else if(a.ended)t.currentTime(t.duration());else{t.currentTime(a.currentTime);var r=t.play();r&&r.catch&&r.catch(function(t){e.log.warn(\\\"Play promise rejected in snapshot resume\\\",t)})}t.ads.shouldRemoveAutoplay_&&(t.autoplay(!1),t.ads.shouldRemoveAutoplay_=!1)},u=function n(){if(t.off(\\\"contentcanplay\\\",n),w&&t.clearTimeout(w),(r=t.el().querySelector(\\\".vjs-tech\\\")).readyState>1)return l();if(void 0===r.seekable)return l();if(r.seekable.length>0)return l();if(i--)t.setTimeout(n,50);else try{l()}catch(t){e.log.warn(\\\"Failed to resume the content after an advertisement\\\",t)}};if(\\\"style\\\"in a&&r.setAttribute(\\\"style\\\",a.style||\\\"\\\"),t.ads.videoElementRecycled())t.one(\\\"resumeended\\\",function(){delete t.ads.snapshot,n()}),t.one(\\\"contentloadedmetadata\\\",d),e.browser.IS_IOS&&!t.autoplay()&&(t.autoplay(!0),t.ads.shouldRemoveAutoplay_=!0),t.src(a.sources),t.one(\\\"contentcanplay\\\",u),w=t.setTimeout(u,2e3);else{if(d(),!t.ended()){var c=t.play();c&&c.catch&&c.catch(function(t){e.log.warn(\\\"Play promise rejected in snapshot restore\\\",t)})}delete t.ads.snapshot,n()}}(t,n):(t.volume(t.ads.preAdVolume_),n())}},L=function(t){function n(){return t.apply(this,arguments)||this}k(n,t),n._getName=function(){return\\\"Preroll\\\"};var a=n.prototype;return a.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass(\\\"vjs-ad-loading\\\"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var a=e.ads.settings.timeout;\\\"number\\\"==typeof e.ads.settings.prerollTimeout&&(a=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout(function(){e.trigger(\\\"adtimeout\\\")},a),t?this.handleAdsReady():this.adsReady=!1},a.onAdsReady=function(t){t.ads.inAdBreak()?e.log.warn(\\\"Unexpected adsready event (Preroll)\\\"):(t.ads.debug(\\\"Received adsready event (Preroll)\\\"),this.handleAdsReady())},a.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},a.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug(\\\"Waiting for loadstart...\\\"),t.one(\\\"loadstart\\\",function(){t.ads.debug(\\\"Received loadstart event\\\"),e()}))},a.noPreroll=function(){var e=this;this.afterLoadStart(function(){e.player.ads.debug(\\\"Skipping prerolls due to nopreroll event (Preroll)\\\"),e.resumeAfterNoPreroll(e.player)})},a.readyForPreroll=function(){var e=this.player;this.afterLoadStart(function(){e.ads.debug(\\\"Triggered readyforpreroll event (Preroll)\\\"),e.trigger(\\\"readyforpreroll\\\")})},a.onAdsCanceled=function(e){var t=this;e.ads.debug(\\\"adscanceled (Preroll)\\\"),this.afterLoadStart(function(){t.resumeAfterNoPreroll(e)})},a.onAdsError=function(t){var n=this;e.log(\\\"adserror (Preroll)\\\"),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart(function(){n.resumeAfterNoPreroll(t)})},a.startLinearAdMode=function(){var t=this.player;!this.adsReady||t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\\\"Unexpected startLinearAdMode invocation (Preroll)\\\"):(this.clearTimeout(t),t.ads.adType=\\\"preroll\\\",this.waitingForAdBreak=!1,B.start(t),t.ads._shouldBlockPlay=!1)},a.onAdStarted=function(e){e.removeClass(\\\"vjs-ad-loading\\\")},a.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass(\\\"vjs-ad-loading\\\"),e.addClass(\\\"vjs-ad-content-resuming\\\"),this.contentResuming=!0,B.end(e))},a.skipLinearAdMode=function(){var t=this,n=this.player;n.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\\\"Unexpected skipLinearAdMode invocation\\\"):this.afterLoadStart(function(){n.trigger(\\\"adskip\\\"),n.ads.debug(\\\"skipLinearAdMode (Preroll)\\\"),t.resumeAfterNoPreroll(n)})},a.onAdTimeout=function(e){var t=this;this.afterLoadStart(function(){e.ads.debug(\\\"adtimeout (Preroll)\\\"),t.resumeAfterNoPreroll(e)})},a.onNoPreroll=function(t){t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\\\"Unexpected nopreroll event (Preroll)\\\"):this.noPreroll()},a.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.paused()&&(e.ads._playRequested||e.ads._pausedOnContentupdate)){var t=e.play();t&&t.then&&t.then(null,function(e){})}},a.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||e.log.warn(\\\"Leaving Preroll state before loadstart event can cause issues.\\\"),this.cleanupPartial(t)},a.cleanupPartial=function(e){e.removeClass(\\\"vjs-ad-loading\\\"),e.removeClass(\\\"vjs-ad-content-resuming\\\"),this.clearTimeout(e)},a.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},n}(P.getState(\\\"AdState\\\"));P.registerState(\\\"Preroll\\\",L);var M=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\\\"BeforePreroll\\\"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!0},n.onAdsReady=function(e){e.ads.debug(\\\"Received adsready event (BeforePreroll)\\\"),this.adsReady=!0},n.onPlay=function(e){var t=P.getState(\\\"Preroll\\\");e.ads.debug(\\\"Received play event (BeforePreroll)\\\"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},n.onAdsCanceled=function(e){e.ads.debug(\\\"adscanceled (BeforePreroll)\\\"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug(\\\"adserror (BeforePreroll)\\\"),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug(\\\"Skipping prerolls due to nopreroll event (BeforePreroll)\\\"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger(\\\"adskip\\\"),e.ads.debug(\\\"skipLinearAdMode (BeforePreroll)\\\"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(P.getState(\\\"ContentState\\\"));P.registerState(\\\"BeforePreroll\\\",M);var j=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\\\"Midroll\\\"};var n=t.prototype;return n.init=function(e){e.ads.adType=\\\"midroll\\\",B.start(e),e.addClass(\\\"vjs-ad-loading\\\")},n.onAdStarted=function(e){e.removeClass(\\\"vjs-ad-loading\\\")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass(\\\"vjs-ad-content-resuming\\\"),e.removeClass(\\\"vjs-ad-loading\\\"),B.end(e))},n.onAdsError=function(e){this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass(\\\"vjs-ad-loading\\\"),e.removeClass(\\\"vjs-ad-content-resuming\\\")},t}(P.getState(\\\"AdState\\\"));P.registerState(\\\"Midroll\\\",j);var N=function(t){function n(){return t.apply(this,arguments)||this}k(n,t),n._getName=function(){return\\\"Postroll\\\"};var a=n.prototype;return a.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=P.getState(\\\"AdsDone\\\");this.transitionTo(t)}else{e.addClass(\\\"vjs-ad-loading\\\");var n=e.ads.settings.timeout;\\\"number\\\"==typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout(function(){e.trigger(\\\"adtimeout\\\")},n)}},a.startLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\\\"Unexpected startLinearAdMode invocation (Postroll)\\\"):(t.ads.adType=\\\"postroll\\\",t.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,B.start(t))},a.onAdStarted=function(e){e.removeClass(\\\"vjs-ad-loading\\\")},a.endLinearAdMode=function(){var e=this,t=this.player,n=P.getState(\\\"AdsDone\\\");this.inAdBreak()&&(t.removeClass(\\\"vjs-ad-loading\\\"),this.resumeContent(t),B.end(t,function(){e.transitionTo(n)}))},a.skipLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\\\"Unexpected skipLinearAdMode invocation\\\"):(t.ads.debug(\\\"Postroll abort (skipLinearAdMode)\\\"),t.trigger(\\\"adskip\\\"),this.abort(t))},a.onAdTimeout=function(e){e.ads.debug(\\\"Postroll abort (adtimeout)\\\"),this.abort(e)},a.onAdsError=function(e){e.ads.debug(\\\"Postroll abort (adserror)\\\"),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},a.onContentChanged=function(e){if(this.isContentResuming()){var t=P.getState(\\\"BeforePreroll\\\");this.transitionTo(t)}else if(!this.inAdBreak()){var n=P.getState(\\\"Preroll\\\");this.transitionTo(n)}},a.onNoPostroll=function(t){this.isContentResuming()||this.inAdBreak()?e.log.warn(\\\"Unexpected nopostroll event (Postroll)\\\"):this.abort(t)},a.resumeContent=function(e){this.contentResuming=!0,e.addClass(\\\"vjs-ad-content-resuming\\\")},a.abort=function(e){var t=P.getState(\\\"AdsDone\\\");this.resumeContent(e),e.removeClass(\\\"vjs-ad-loading\\\"),this.transitionTo(t)},a.cleanup=function(e){e.removeClass(\\\"vjs-ad-content-resuming\\\"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},n}(P.getState(\\\"AdState\\\"));P.registerState(\\\"Postroll\\\",N);var E=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\\\"ContentPlayback\\\"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug(\\\"Received adsready event (ContentPlayback)\\\"),e.ads.nopreroll_||(e.ads.debug(\\\"Triggered readyforpreroll event (ContentPlayback)\\\"),e.trigger(\\\"readyforpreroll\\\"))},n.onReadyForPostroll=function(e){var t=P.getState(\\\"Postroll\\\");e.ads.debug(\\\"Received readyforpostroll event\\\"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=P.getState(\\\"Midroll\\\");this.transitionTo(e)},t}(P.getState(\\\"ContentState\\\"));P.registerState(\\\"ContentPlayback\\\",E);var I=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\\\"StitchedContentPlayback\\\"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1},n.onContentChanged=function(){this.player.ads.debug(\\\"Received contentchanged event (\\\"+this.constructor._getName()+\\\")\\\")},n.startLinearAdMode=function(){var e=P.getState(\\\"StitchedAdRoll\\\");this.transitionTo(e)},t}(P.getState(\\\"ContentState\\\"));P.registerState(\\\"StitchedContentPlayback\\\",I);var x=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\\\"StitchedAdRoll\\\"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType=\\\"stitched\\\",B.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger(\\\"ended\\\")},n.endLinearAdMode=function(){var e=P.getState(\\\"StitchedContentPlayback\\\");B.end(this.player),this.transitionTo(e)},t}(P.getState(\\\"AdState\\\"));P.registerState(\\\"StitchedAdRoll\\\",x);var D=y.isMiddlewareMediatorSupported,O=e.getTech(\\\"Html5\\\").Events,F={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0},U=function(o){var r=this,i=e.mergeOptions(F,o),s=[];O.concat([\\\"firstplay\\\",\\\"loadedalldata\\\"]).forEach(function(e){-1===s.indexOf(e)&&s.push(e)}),r.on(s,u),D()||function(t,n){n&&e.log(\\\"Using cancelContentPlay to block content playback\\\"),t.on(\\\"play\\\",v)}(r,i.debug),r.setTimeout(function(){r.ads._hasThereBeenALoadStartDuringPlayerLife||\\\"\\\"===r.src()||e.log.error(\\\"videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html\\\")},5e3),r.on(\\\"ended\\\",function(){r.hasClass(\\\"vjs-has-started\\\")||r.addClass(\\\"vjs-has-started\\\")}),r.on(\\\"contenttimeupdate\\\",function(){r.removeClass(\\\"vjs-waiting\\\")}),r.on([\\\"addurationchange\\\",\\\"adcanplay\\\"],function(){if(!r.ads.settings.stitchedAds&&!r.hasStarted()&&(!r.ads.snapshot||r.currentSrc()!==r.ads.snapshot.currentSrc)&&r.ads.inAdBreak()){var t=r.play();t&&t.catch&&t.catch(function(t){e.log.warn(\\\"Play promise rejected when playing ad\\\",t)})}}),r.on(\\\"nopreroll\\\",function(){r.ads.debug(\\\"Received nopreroll event\\\"),r.ads.nopreroll_=!0}),r.on(\\\"nopostroll\\\",function(){r.ads.debug(\\\"Received nopostroll event\\\"),r.ads.nopostroll_=!0}),r.on(\\\"playing\\\",function(){r.ads._cancelledPlay=!1,r.ads._pausedOnContentupdate=!1}),r.on(\\\"play\\\",function(){r.ads._playRequested=!0}),r.one(\\\"loadstart\\\",function(){r.ads._hasThereBeenALoadStartDuringPlayerLife=!0}),r.on(\\\"loadeddata\\\",function(){r.ads._hasThereBeenALoadedData=!0}),r.on(\\\"loadedmetadata\\\",function(){r.ads._hasThereBeenALoadedMetaData=!0}),r.ads=function(t){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:a,reset:function(){t.ads.disableNextSnapshotRestore=!1,t.ads._contentEnding=!1,t.ads._contentHasEnded=!1,t.ads.snapshot=null,t.ads.adType=null,t.ads._hasThereBeenALoadedData=!1,t.ads._hasThereBeenALoadedMetaData=!1,t.ads._cancelledPlay=!1,t.ads._shouldBlockPlay=!1,t.ads._playBlocked=!1,t.ads.nopreroll_=!1,t.ads.nopostroll_=!1,t.ads._playRequested=!1},startLinearAdMode:function(){t.ads._state.startLinearAdMode()},endLinearAdMode:function(){t.ads._state.endLinearAdMode()},skipLinearAdMode:function(){t.ads._state.skipLinearAdMode()},stitchedAds:function(t){return void 0!==t&&(e.log.warn(\\\"Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads.\\\"),this.settings.stitchedAds=!!t),this.settings.stitchedAds},videoElementRecycled:function(){if(t.ads.shouldPlayContentBehindAd(t))return!1;if(!this.snapshot)throw new Error(\\\"You cannot use videoElementRecycled while there is no snapshot.\\\");var e=t.tech_.src()!==this.snapshot.src,n=t.currentSrc()!==this.snapshot.currentSrc;return e||n},isLive:function(n){return void 0===n&&(n=t),\\\"boolean\\\"==typeof n.ads.settings.contentIsLive?n.ads.settings.contentIsLive:n.duration()===1/0||\\\"8\\\"===e.browser.IOS_VERSION&&0===n.duration()},shouldPlayContentBehindAd:function(n){if(void 0===n&&(n=t),n)return!!n.ads.settings.liveCuePoints&&!e.browser.IS_IOS&&!e.browser.IS_ANDROID&&n.duration()===1/0;throw new Error(\\\"shouldPlayContentBehindAd requires a player as a param\\\")},shouldTakeSnapshots:function(e){return void 0===e&&(e=t),!this.shouldPlayContentBehindAd(e)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var e=t.$(\\\".vjs-tech\\\");e&&e.removeAttribute(\\\"poster\\\")},debug:function(){if(this.settings.debug){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];1===n.length&&\\\"string\\\"==typeof n[0]?e.log(\\\"ADS: \\\"+n[0]):e.log.apply(e,[\\\"ADS:\\\"].concat(n))}}}}(r),r.ads.settings=i,i.stitchedAds=!!i.stitchedAds,i.stitchedAds?r.ads._state=new(P.getState(\\\"StitchedContentPlayback\\\"))(r):r.ads._state=new(P.getState(\\\"BeforePreroll\\\"))(r),r.ads._state.init(r),r.ads.cueTextTracks=f,r.ads.adMacroReplacement=function(a,o,r){var i=this,s={};a=a.replace(/{([^}=]+)=([^}]+)}/g,function(e,t,n){return s[\\\"{\\\"+t+\\\"}\\\"]=n,\\\"{\\\"+t+\\\"}\\\"}),void 0===o&&(o=!1);var d={};for(var l in void 0!==r&&(d=r),d[\\\"{player.id}\\\"]=this.options_[\\\"data-player\\\"],d[\\\"{mediainfo.id}\\\"]=this.mediainfo?this.mediainfo.id:\\\"\\\",d[\\\"{mediainfo.name}\\\"]=this.mediainfo?this.mediainfo.name:\\\"\\\",d[\\\"{mediainfo.duration}\\\"]=this.mediainfo?this.mediainfo.duration:\\\"\\\",d[\\\"{player.duration}\\\"]=this.duration(),d[\\\"{timestamp}\\\"]=(new Date).getTime(),d[\\\"{document.referrer}\\\"]=n.referrer,d[\\\"{window.location.href}\\\"]=t.location.href,d[\\\"{random}\\\"]=Math.floor(1e12*Math.random()),[\\\"description\\\",\\\"tags\\\",\\\"reference_id\\\",\\\"ad_keys\\\"].forEach(function(e){i.mediainfo&&i.mediainfo[e]?d[\\\"{mediainfo.\\\"+e+\\\"}\\\"]=i.mediainfo[e]:s[\\\"{mediainfo.\\\"+e+\\\"}\\\"]?d[\\\"{mediainfo.\\\"+e+\\\"}\\\"]=s[\\\"{mediainfo.\\\"+e+\\\"}\\\"]:d[\\\"{mediainfo.\\\"+e+\\\"}\\\"]=\\\"\\\"}),h(this.mediainfo,d,\\\"custom_fields\\\"),h(this.mediainfo,d,\\\"customFields\\\"),d)a=a.split(l).join(c(d[l],o));for(var u in a=a.replace(/{pageVariable\\\\.([^}]+)}/g,function(n,a){for(var r,i=t,d=a.split(\\\".\\\"),l=0;l<d.length;l++)l===d.length-1?r=i[d[l]]:i=i[d[l]];var u=typeof r;return null===r?\\\"null\\\":void 0===r?s[\\\"{pageVariable.\\\"+a+\\\"}\\\"]?s[\\\"{pageVariable.\\\"+a+\\\"}\\\"]:(e.log.warn('Page variable \\\"'+a+'\\\" not found'),\\\"\\\"):\\\"string\\\"!==u&&\\\"number\\\"!==u&&\\\"boolean\\\"!==u?(e.log.warn('Page variable \\\"'+a+'\\\" is not a supported type'),\\\"\\\"):c(String(r),o)}),s)a=a.replace(u,s[u]);return a}.bind(r),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on(\\\"loadstart\\\",function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:\\\"contentchanged\\\"}),e.trigger({type:\\\"contentupdate\\\",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}})}(r),r.on(\\\"contentchanged\\\",r.ads.reset);var d=function(){var t=r.textTracks();if(!r.ads.shouldPlayContentBehindAd(r)&&r.ads.inAdBreak()&&r.tech_.featuresNativeTextTracks&&e.browser.IS_IOS&&!Array.isArray(r.textTracks()))for(var n=0;n<t.length;n++){var a=t[n];\\\"showing\\\"===a.mode&&(a.mode=\\\"disabled\\\")}};r.ready(function(){r.textTracks().addEventListener(\\\"change\\\",d)}),r.on([\\\"play\\\",\\\"playing\\\",\\\"ended\\\",\\\"adsready\\\",\\\"adscanceled\\\",\\\"adskip\\\",\\\"adserror\\\",\\\"adtimeout\\\",\\\"adended\\\",\\\"ads-ad-started\\\",\\\"contentchanged\\\",\\\"dispose\\\",\\\"contentresumed\\\",\\\"readyforpostroll\\\",\\\"nopreroll\\\",\\\"nopostroll\\\"],function(e){r.ads._state.handleEvent(e.type)}),r.on(\\\"dispose\\\",function(){r.ads.reset(),r.textTracks().removeEventListener(\\\"change\\\",d)})};return U.VERSION=a,function(t){!_(e)&&((e.registerPlugin||e.plugin)(\\\"ads\\\",t),S()&&!e.usingContribAdsMiddleware_&&(e.use(\\\"*\\\",A),e.usingContribAdsMiddleware_=!0,e.log.debug(\\\"Play middleware has been registered with videojs\\\")))}(U),U});\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\":\n/*!************************************************************************************************!*\\\n  !*** ../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js ***!\n  \\************************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\");\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/document */ \\\"../node_modules/global/document.js\\\");\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__);\\n/*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */\\n\\n\\n\\nfunction _inheritsLoose(subClass, superClass) {\\n  subClass.prototype = Object.create(superClass.prototype);\\n  subClass.prototype.constructor = subClass;\\n  subClass.__proto__ = superClass;\\n}\\n\\nfunction _assertThisInitialized(self) {\\n  if (self === void 0) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return self;\\n}\\n\\n/**\\n * A single QualityLevel.\\n *\\n * interface QualityLevel {\\n *   readonly attribute DOMString id;\\n *            attribute DOMString label;\\n *   readonly attribute long width;\\n *   readonly attribute long height;\\n *   readonly attribute long bitrate;\\n *            attribute boolean enabled;\\n * };\\n *\\n * @class QualityLevel\\n */\\n\\nvar QualityLevel =\\n/**\\n * Creates a QualityLevel\\n *\\n * @param {Representation|Object} representation The representation of the quality level\\n * @param {string}   representation.id        Unique id of the QualityLevel\\n * @param {number=}  representation.width     Resolution width of the QualityLevel\\n * @param {number=}  representation.height    Resolution height of the QualityLevel\\n * @param {number}   representation.bandwidth Bitrate of the QualityLevel\\n * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\\n */\\nfunction QualityLevel(representation) {\\n  var level = this; // eslint-disable-line\\n\\n  if (video_js__WEBPACK_IMPORTED_MODULE_0___default.a.browser.IS_IE8) {\\n    level = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('custom');\\n\\n    for (var prop in QualityLevel.prototype) {\\n      if (prop !== 'constructor') {\\n        level[prop] = QualityLevel.prototype[prop];\\n      }\\n    }\\n  }\\n\\n  level.id = representation.id;\\n  level.label = level.id;\\n  level.width = representation.width;\\n  level.height = representation.height;\\n  level.bitrate = representation.bandwidth;\\n  level.enabled_ = representation.enabled;\\n  Object.defineProperty(level, 'enabled', {\\n    /**\\n     * Get whether the QualityLevel is enabled.\\n     *\\n     * @return {boolean} True if the QualityLevel is enabled.\\n     */\\n    get: function get() {\\n      return level.enabled_();\\n    },\\n\\n    /**\\n     * Enable or disable the QualityLevel.\\n     *\\n     * @param {boolean} enable true to enable QualityLevel, false to disable.\\n     */\\n    set: function set(enable) {\\n      level.enabled_(enable);\\n    }\\n  });\\n  return level;\\n};\\n\\n/**\\n * A list of QualityLevels.\\n *\\n * interface QualityLevelList : EventTarget {\\n *   getter QualityLevel (unsigned long index);\\n *   readonly attribute unsigned long length;\\n *   readonly attribute long selectedIndex;\\n *\\n *   void addQualityLevel(QualityLevel qualityLevel)\\n *   void removeQualityLevel(QualityLevel remove)\\n *   QualityLevel? getQualityLevelById(DOMString id);\\n *\\n *   attribute EventHandler onchange;\\n *   attribute EventHandler onaddqualitylevel;\\n *   attribute EventHandler onremovequalitylevel;\\n * };\\n *\\n * @extends videojs.EventTarget\\n * @class QualityLevelList\\n */\\n\\nvar QualityLevelList =\\n/*#__PURE__*/\\nfunction (_videojs$EventTarget) {\\n  _inheritsLoose(QualityLevelList, _videojs$EventTarget);\\n\\n  function QualityLevelList() {\\n    var _this;\\n\\n    _this = _videojs$EventTarget.call(this) || this;\\n\\n    var list = _assertThisInitialized(_assertThisInitialized(_this)); // eslint-disable-line\\n\\n\\n    if (video_js__WEBPACK_IMPORTED_MODULE_0___default.a.browser.IS_IE8) {\\n      list = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('custom');\\n\\n      for (var prop in QualityLevelList.prototype) {\\n        if (prop !== 'constructor') {\\n          list[prop] = QualityLevelList.prototype[prop];\\n        }\\n      }\\n    }\\n\\n    list.levels_ = [];\\n    list.selectedIndex_ = -1;\\n    /**\\n     * Get the index of the currently selected QualityLevel.\\n     *\\n     * @returns {number} The index of the selected QualityLevel. -1 if none selected.\\n     * @readonly\\n     */\\n\\n    Object.defineProperty(list, 'selectedIndex', {\\n      get: function get() {\\n        return list.selectedIndex_;\\n      }\\n    });\\n    /**\\n     * Get the length of the list of QualityLevels.\\n     *\\n     * @returns {number} The length of the list.\\n     * @readonly\\n     */\\n\\n    Object.defineProperty(list, 'length', {\\n      get: function get() {\\n        return list.levels_.length;\\n      }\\n    });\\n    return list || _assertThisInitialized(_this);\\n  }\\n  /**\\n   * Adds a quality level to the list.\\n   *\\n   * @param {Representation|Object} representation The representation of the quality level\\n   * @param {string}   representation.id        Unique id of the QualityLevel\\n   * @param {number=}  representation.width     Resolution width of the QualityLevel\\n   * @param {number=}  representation.height    Resolution height of the QualityLevel\\n   * @param {number}   representation.bandwidth Bitrate of the QualityLevel\\n   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\\n   * @return {QualityLevel} the QualityLevel added to the list\\n   * @method addQualityLevel\\n   */\\n\\n\\n  var _proto = QualityLevelList.prototype;\\n\\n  _proto.addQualityLevel = function addQualityLevel(representation) {\\n    var qualityLevel = this.getQualityLevelById(representation.id); // Do not add duplicate quality levels\\n\\n    if (qualityLevel) {\\n      return qualityLevel;\\n    }\\n\\n    var index = this.levels_.length;\\n    qualityLevel = new QualityLevel(representation);\\n\\n    if (!('' + index in this)) {\\n      Object.defineProperty(this, index, {\\n        get: function get() {\\n          return this.levels_[index];\\n        }\\n      });\\n    }\\n\\n    this.levels_.push(qualityLevel);\\n    this.trigger({\\n      qualityLevel: qualityLevel,\\n      type: 'addqualitylevel'\\n    });\\n    return qualityLevel;\\n  };\\n  /**\\n   * Removes a quality level from the list.\\n   *\\n   * @param {QualityLevel} remove QualityLevel to remove to the list.\\n   * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed\\n   * @method removeQualityLevel\\n   */\\n\\n\\n  _proto.removeQualityLevel = function removeQualityLevel(qualityLevel) {\\n    var removed = null;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      if (this[i] === qualityLevel) {\\n        removed = this.levels_.splice(i, 1)[0];\\n\\n        if (this.selectedIndex_ === i) {\\n          this.selectedIndex_ = -1;\\n        } else if (this.selectedIndex_ > i) {\\n          this.selectedIndex_--;\\n        }\\n\\n        break;\\n      }\\n    }\\n\\n    if (removed) {\\n      this.trigger({\\n        qualityLevel: qualityLevel,\\n        type: 'removequalitylevel'\\n      });\\n    }\\n\\n    return removed;\\n  };\\n  /**\\n   * Searches for a QualityLevel with the given id.\\n   *\\n   * @param {string} id The id of the QualityLevel to find.\\n   * @return {QualityLevel|null} The QualityLevel with id, or null if not found.\\n   * @method getQualityLevelById\\n   */\\n\\n\\n  _proto.getQualityLevelById = function getQualityLevelById(id) {\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      var level = this[i];\\n\\n      if (level.id === id) {\\n        return level;\\n      }\\n    }\\n\\n    return null;\\n  };\\n  /**\\n   * Resets the list of QualityLevels to empty\\n   *\\n   * @method dispose\\n   */\\n\\n\\n  _proto.dispose = function dispose() {\\n    this.selectedIndex_ = -1;\\n    this.levels_.length = 0;\\n  };\\n\\n  return QualityLevelList;\\n}(video_js__WEBPACK_IMPORTED_MODULE_0___default.a.EventTarget);\\n/**\\n * change - The selected QualityLevel has changed.\\n * addqualitylevel - A QualityLevel has been added to the QualityLevelList.\\n * removequalitylevel - A QualityLevel has been removed from the QualityLevelList.\\n */\\n\\n\\nQualityLevelList.prototype.allowedEvents_ = {\\n  change: 'change',\\n  addqualitylevel: 'addqualitylevel',\\n  removequalitylevel: 'removequalitylevel'\\n}; // emulate attribute EventHandler support to allow for feature detection\\n\\nfor (var event in QualityLevelList.prototype.allowedEvents_) {\\n  QualityLevelList.prototype['on' + event] = null;\\n}\\n\\nvar version = \\\"2.0.9\\\";\\n\\nvar registerPlugin = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.registerPlugin || video_js__WEBPACK_IMPORTED_MODULE_0___default.a.plugin;\\n/**\\n * Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and\\n * event handlers.\\n *\\n * @param {Player} player Player object.\\n * @param {Object} options Plugin options object.\\n * @function initPlugin\\n */\\n\\nvar initPlugin = function initPlugin(player, options) {\\n  var originalPluginFn = player.qualityLevels;\\n  var qualityLevelList = new QualityLevelList();\\n\\n  var disposeHandler = function disposeHandler() {\\n    qualityLevelList.dispose();\\n    player.qualityLevels = originalPluginFn;\\n    player.off('dispose', disposeHandler);\\n  };\\n\\n  player.on('dispose', disposeHandler);\\n\\n  player.qualityLevels = function () {\\n    return qualityLevelList;\\n  };\\n\\n  player.qualityLevels.VERSION = version;\\n  return qualityLevelList;\\n};\\n/**\\n * A video.js plugin.\\n *\\n * In the plugin function, the value of `this` is a video.js `Player`\\n * instance. You cannot rely on the player being in a \\\"ready\\\" state here,\\n * depending on how the plugin is invoked. This may or may not be important\\n * to you; if not, remove the wait for \\\"ready\\\"!\\n *\\n * @param {Object} options Plugin options object\\n * @function qualityLevels\\n */\\n\\n\\nvar qualityLevels = function qualityLevels(options) {\\n  return initPlugin(this, video_js__WEBPACK_IMPORTED_MODULE_0___default.a.mergeOptions({}, options));\\n}; // Register the plugin with video.js.\\n\\n\\nregisterPlugin('qualityLevels', qualityLevels); // Include the version number.\\n\\nqualityLevels.VERSION = version;\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (qualityLevels);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js\":\n/*!********************************************************************************************!*\\\n  !*** ../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js ***!\n  \\********************************************************************************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\");\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\\n/*! @name videojs-per-source-behaviors @version 2.1.0 @license Apache-2.0 */\\n\\n\\nvar version = \\\"2.1.0\\\";\\n\\nvar Html5 = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.getTech('Html5'); // Video.js 5/6 cross-compatibility.\\n\\nvar registerPlugin = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.registerPlugin || video_js__WEBPACK_IMPORTED_MODULE_0___default.a.plugin;\\n/**\\n * For the most part, these are the events that occur early in the lifecycle\\n * of a source, but there is considerable variability across browsers and\\n * devices (not to mention properties like autoplay and preload). As such, we\\n * listen to a bunch of events for source changes.\\n *\\n * @type {Array}\\n */\\n\\nvar CHANGE_DETECT_EVENTS = ['abort', 'emptied', 'loadstart', 'play'];\\n/**\\n * These events will indicate that the source is \\\"unstable\\\" (i.e. it might be\\n * about to change).\\n *\\n * @type {Array}\\n */\\n\\nvar UNSTABLE_EVENTS = ['abort', 'emptied'];\\n/**\\n * These are the ad loading and playback states we care about from\\n * contrib-ads 5.\\n *\\n * @type {Array}\\n */\\n\\nvar AD_STATES = ['ad-playback', 'ads-ready?', 'postroll?', 'preroll?'];\\n/**\\n * Whether or not a string represents an \\\"ad state\\\".\\n *\\n * @param  {string} s\\n *         The string to check\\n *\\n * @return {boolean}\\n *         If the string is an ad state\\n */\\n\\nvar isAdState = function isAdState(s) {\\n  return AD_STATES.indexOf(s) > -1;\\n};\\n/**\\n * Determine whether or not a player is using contrib-ads 6+.\\n *\\n * @param  {Player} p\\n *         The player\\n *\\n * @return {boolean}\\n *         if the player is using contrib-ads 6+\\n */\\n\\n\\nvar usingAds6Plus = function usingAds6Plus(p) {\\n  return p.usingPlugin('ads') && typeof p.ads.inAdBreak === 'function';\\n};\\n/**\\n * Whether or not the player should ignore an event due to ad states.\\n *\\n * @param  {Player} p\\n *         The player\\n *\\n * @param  {Event} e\\n *         An event object\\n *\\n * @return {boolean}\\n *         If the player is in an ad state\\n */\\n\\n\\nvar ignoreEvent = function ignoreEvent(p, e) {\\n  // No ads, no ad states to ignore!\\n  if (!p.usingPlugin('ads')) {\\n    return false;\\n  } // In contrib-ads 6+ we only care about non-loadstart events because\\n  // loadstart events _may_ happen during ad mode.\\n\\n\\n  if (usingAds6Plus(p)) {\\n    return p.ads.isInAdMode() && e.type !== 'loadstart';\\n  } // contrib-ads 5+\\n\\n\\n  return isAdState(p.ads.state);\\n};\\n/**\\n * Applies per-source behaviors to a video.js Player object.\\n */\\n\\n\\nvar perSourceBehaviors = function perSourceBehaviors() {\\n  var _this2 = this;\\n\\n  var perSrcListeners = [];\\n  var cachedSrc;\\n  var _disabled = false;\\n  var srcChangeTimer;\\n  var srcStable = true;\\n  /**\\n   * Creates an event binder function of a given type.\\n   *\\n   * @param  {boolean} isOne\\n   *         Rather than delegating to the player's `one()` method, we want to\\n   *         retain full control over when the listener is unbound (particularly\\n   *         due to the ability for per-source behaviors to be toggled on and\\n   *         off at will).\\n   *\\n   * @return {Function}\\n   *         the per source binder function\\n   */\\n\\n  var createPerSrcBinder = function createPerSrcBinder(isOne) {\\n    return function (first, second) {\\n      var _this = this;\\n\\n      // Do not bind new listeners when per-source behaviors are disabled.\\n      if (this.perSourceBehaviors.disabled()) {\\n        return;\\n      }\\n\\n      var isTargetPlayer = arguments.length === 2;\\n      var originalSrc = this.currentSrc(); // This array is the set of arguments to use for `on()` and `off()` methods\\n      // of the player.\\n\\n      var args = [first]; // Make sure we bind here so that a GUID is set on the original listener\\n      // and that it is bound to the proper context.\\n\\n      var originalListener = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.bind(isTargetPlayer ? this : first, arguments[arguments.length - 1]); // The wrapped listener `subargs` are the arguments passed to the original\\n      // listener (i.e. the Event object and an additional data hash).\\n\\n      var wrappedListener = function wrappedListener() {\\n        var changed = _this.currentSrc() !== originalSrc; // Do not evaluate listeners if per-source behaviors are disabled.\\n\\n        if (_this.perSourceBehaviors.disabled()) {\\n          return;\\n        }\\n\\n        if (changed || isOne) {\\n          _this.off.apply(_this, args);\\n        }\\n\\n        if (!changed) {\\n          originalListener.apply(void 0, arguments);\\n        }\\n      }; // Make sure the wrapped listener and the original listener share a GUID,\\n      // so that video.js properly removes event bindings when `off()` is passed\\n      // the original listener!\\n\\n\\n      wrappedListener.guid = originalListener.guid; // If we are targeting a different object from the player, we need to include\\n      // the second argument.\\n\\n      if (!isTargetPlayer) {\\n        args.push(second);\\n      }\\n\\n      args.push(wrappedListener);\\n      perSrcListeners.push(args);\\n      return this.on.apply(this, args);\\n    };\\n  };\\n\\n  this.perSourceBehaviors = {\\n    /**\\n     * Disable per-source behaviors on this player.\\n     *\\n     * @return {boolean}\\n     */\\n    disable: video_js__WEBPACK_IMPORTED_MODULE_0___default.a.bind(this, function disable() {\\n      this.clearTimeout(srcChangeTimer);\\n      srcChangeTimer = null;\\n      _disabled = true;\\n      return _disabled;\\n    }),\\n\\n    /**\\n     * Whether per-source behaviors are disabled on this player.\\n     *\\n     * @return {boolean}\\n     *         if the per-source behaviors are disabled\\n     */\\n    disabled: function disabled() {\\n      return _disabled;\\n    },\\n\\n    /**\\n     * Enable per-source behaviors on this player.\\n     *\\n     * @return {boolean}\\n     *         always returns true\\n     */\\n    enable: function enable() {\\n      _disabled = false;\\n      return _disabled;\\n    },\\n\\n    /**\\n     * Whether per-source behaviors are disabled on this player.\\n     *\\n     * @return {boolean}\\n     *         if the per-source behaviors are enabled\\n     */\\n    enabled: function enabled() {\\n      return !_disabled;\\n    },\\n\\n    /**\\n     * Whether or not the source is \\\"stable\\\". This will return `true` if the\\n     * plugin feels that we may be about to change sources.\\n     *\\n     * @return {boolean}\\n     *         Whether the source is stable or not\\n     */\\n    isSrcStable: function isSrcStable() {\\n      return srcStable;\\n    },\\n    VERSION: version\\n  };\\n  /**\\n   * Bind an event listener on a per-source basis.\\n   *\\n   * @function onPerSrc\\n   * @param  {String|Array|Component|Element} first\\n   *         The event type(s) or target Component or Element.\\n   *\\n   * @param  {Function|String|Array} second\\n   *         The event listener or event type(s) (when `first` is target).\\n   *\\n   * @param  {Function} third\\n   *         The event listener (when `second` is event type(s)).\\n   *\\n   * @return {Player}\\n   */\\n\\n  this.onPerSrc = createPerSrcBinder();\\n  /**\\n   * Bind an event listener on a per-source basis. This listener can only\\n   * be called once.\\n   *\\n   * @function onePerSrc\\n   * @param  {String|Array|Component|Element} first\\n   *         The event type(s) or target Component or Element.\\n   *\\n   * @param  {Function|String|Array} second\\n   *         The event listener or event type(s) (when `first` is target).\\n   *\\n   * @param  {Function} third\\n   *         The event listener (when `second` is event type(s)).\\n   *\\n   * @return {Player}\\n   */\\n\\n  this.onePerSrc = createPerSrcBinder(true); // Clear out perSrcListeners cache on player dispose.\\n\\n  this.on('dispose', function () {\\n    perSrcListeners.length = 0;\\n  });\\n  this.on(CHANGE_DETECT_EVENTS, function (e) {\\n    // Bail-out conditions.\\n    if (_this2.perSourceBehaviors.disabled() || srcChangeTimer || ignoreEvent(_this2, e)) {\\n      return;\\n    } // If we did not previously detect that we were in an unstable state and\\n    // this was an event that qualifies as unstable, do that now. In the future,\\n    // we may want to restrict the conditions under which this is triggered by\\n    // checking networkState and/or readyState for reasonable values such as\\n    // NETWORK_NO_SOURCE and HAVE_NOTHING.\\n\\n\\n    if (srcStable && UNSTABLE_EVENTS.indexOf(e.type) > -1) {\\n      srcStable = false;\\n\\n      _this2.trigger('sourceunstable');\\n    } // Track any and all interim events from this one until the next tick\\n    // when we evaluate the timer.\\n\\n\\n    var interimEvents = [];\\n\\n    var addInterimEvent = function addInterimEvent(f) {\\n      return interimEvents.push({\\n        time: Date.now(),\\n        event: f\\n      });\\n    };\\n\\n    addInterimEvent(e);\\n\\n    _this2.on(Html5.Events, addInterimEvent);\\n\\n    srcChangeTimer = _this2.setTimeout(function () {\\n      var currentSrc = _this2.currentSrc();\\n\\n      srcStable = true;\\n      srcChangeTimer = null;\\n\\n      _this2.off(Html5.Events, addInterimEvent);\\n\\n      if (currentSrc && currentSrc !== cachedSrc) {\\n        // Remove per-source listeners explicitly when we know the source has\\n        // changed before we trigger the \\\"sourcechanged\\\" listener.\\n        perSrcListeners.forEach(function (args) {\\n          return _this2.off.apply(_this2, args);\\n        });\\n        perSrcListeners.length = 0;\\n\\n        _this2.trigger('sourcechanged', {\\n          interimEvents: interimEvents,\\n          from: cachedSrc,\\n          to: currentSrc\\n        });\\n\\n        cachedSrc = currentSrc;\\n      }\\n    }, 1);\\n  });\\n};\\n\\nperSourceBehaviors.VERSION = version;\\nregisterPlugin('perSourceBehaviors', perSourceBehaviors);\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (perSourceBehaviors);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-vtt.js/lib/browser-index.js\":\n/*!***********************************************************!*\\\n  !*** ../node_modules/videojs-vtt.js/lib/browser-index.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n// Default exports for Node. Export the extended versions of VTTCue and\\n// VTTRegion in Node since we likely want the capability to convert back and\\n// forth between JSON. If we don't then it's not that big of a deal since we're\\n// off browser.\\n\\nvar window = __webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\");\\n\\nvar vttjs = module.exports = {\\n  WebVTT: __webpack_require__(/*! ./vtt.js */ \\\"../node_modules/videojs-vtt.js/lib/vtt.js\\\"),\\n  VTTCue: __webpack_require__(/*! ./vttcue.js */ \\\"../node_modules/videojs-vtt.js/lib/vttcue.js\\\"),\\n  VTTRegion: __webpack_require__(/*! ./vttregion.js */ \\\"../node_modules/videojs-vtt.js/lib/vttregion.js\\\")\\n};\\n\\nwindow.vttjs = vttjs;\\nwindow.WebVTT = vttjs.WebVTT;\\n\\nvar cueShim = vttjs.VTTCue;\\nvar regionShim = vttjs.VTTRegion;\\nvar nativeVTTCue = window.VTTCue;\\nvar nativeVTTRegion = window.VTTRegion;\\n\\nvttjs.shim = function() {\\n  window.VTTCue = cueShim;\\n  window.VTTRegion = regionShim;\\n};\\n\\nvttjs.restore = function() {\\n  window.VTTCue = nativeVTTCue;\\n  window.VTTRegion = nativeVTTRegion;\\n};\\n\\nif (!window.VTTCue) {\\n  vttjs.shim();\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/browser-index.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-vtt.js/lib/vtt.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/videojs-vtt.js/lib/vtt.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\\nvar document = __webpack_require__(/*! global/document */ \\\"../node_modules/global/document.js\\\");\\n\\nvar _objCreate = Object.create || (function() {\\n  function F() {}\\n  return function(o) {\\n    if (arguments.length !== 1) {\\n      throw new Error('Object.create shim only accepts one parameter.');\\n    }\\n    F.prototype = o;\\n    return new F();\\n  };\\n})();\\n\\n// Creates a new ParserError object from an errorData object. The errorData\\n// object should have default code and message properties. The default message\\n// property can be overriden by passing in a message parameter.\\n// See ParsingError.Errors below for acceptable errors.\\nfunction ParsingError(errorData, message) {\\n  this.name = \\\"ParsingError\\\";\\n  this.code = errorData.code;\\n  this.message = message || errorData.message;\\n}\\nParsingError.prototype = _objCreate(Error.prototype);\\nParsingError.prototype.constructor = ParsingError;\\n\\n// ParsingError metadata for acceptable ParsingErrors.\\nParsingError.Errors = {\\n  BadSignature: {\\n    code: 0,\\n    message: \\\"Malformed WebVTT signature.\\\"\\n  },\\n  BadTimeStamp: {\\n    code: 1,\\n    message: \\\"Malformed time stamp.\\\"\\n  }\\n};\\n\\n// Try to parse input as a time stamp.\\nfunction parseTimeStamp(input) {\\n\\n  function computeSeconds(h, m, s, f) {\\n    return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\\n  }\\n\\n  var m = input.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);\\n  if (!m) {\\n    return null;\\n  }\\n\\n  if (m[3]) {\\n    // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\\n    return computeSeconds(m[1], m[2], m[3].replace(\\\":\\\", \\\"\\\"), m[4]);\\n  } else if (m[1] > 59) {\\n    // Timestamp takes the form of [hours]:[minutes].[milliseconds]\\n    // First position is hours as it's over 59.\\n    return computeSeconds(m[1], m[2], 0,  m[4]);\\n  } else {\\n    // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\\n    return computeSeconds(0, m[1], m[2], m[4]);\\n  }\\n}\\n\\n// A settings object holds key/value pairs and will ignore anything but the first\\n// assignment to a specific key.\\nfunction Settings() {\\n  this.values = _objCreate(null);\\n}\\n\\nSettings.prototype = {\\n  // Only accept the first assignment to any key.\\n  set: function(k, v) {\\n    if (!this.get(k) && v !== \\\"\\\") {\\n      this.values[k] = v;\\n    }\\n  },\\n  // Return the value for a key, or a default value.\\n  // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\\n  // a number of possible default values as properties where 'defaultKey' is\\n  // the key of the property that will be chosen; otherwise it's assumed to be\\n  // a single value.\\n  get: function(k, dflt, defaultKey) {\\n    if (defaultKey) {\\n      return this.has(k) ? this.values[k] : dflt[defaultKey];\\n    }\\n    return this.has(k) ? this.values[k] : dflt;\\n  },\\n  // Check whether we have a value for a key.\\n  has: function(k) {\\n    return k in this.values;\\n  },\\n  // Accept a setting if its one of the given alternatives.\\n  alt: function(k, v, a) {\\n    for (var n = 0; n < a.length; ++n) {\\n      if (v === a[n]) {\\n        this.set(k, v);\\n        break;\\n      }\\n    }\\n  },\\n  // Accept a setting if its a valid (signed) integer.\\n  integer: function(k, v) {\\n    if (/^-?\\\\d+$/.test(v)) { // integer\\n      this.set(k, parseInt(v, 10));\\n    }\\n  },\\n  // Accept a setting if its a valid percentage.\\n  percent: function(k, v) {\\n    var m;\\n    if ((m = v.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/))) {\\n      v = parseFloat(v);\\n      if (v >= 0 && v <= 100) {\\n        this.set(k, v);\\n        return true;\\n      }\\n    }\\n    return false;\\n  }\\n};\\n\\n// Helper function to parse input into groups separated by 'groupDelim', and\\n// interprete each group as a key/value pair separated by 'keyValueDelim'.\\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\\n  var groups = groupDelim ? input.split(groupDelim) : [input];\\n  for (var i in groups) {\\n    if (typeof groups[i] !== \\\"string\\\") {\\n      continue;\\n    }\\n    var kv = groups[i].split(keyValueDelim);\\n    if (kv.length !== 2) {\\n      continue;\\n    }\\n    var k = kv[0];\\n    var v = kv[1];\\n    callback(k, v);\\n  }\\n}\\n\\nfunction parseCue(input, cue, regionList) {\\n  // Remember the original input if we need to throw an error.\\n  var oInput = input;\\n  // 4.1 WebVTT timestamp\\n  function consumeTimeStamp() {\\n    var ts = parseTimeStamp(input);\\n    if (ts === null) {\\n      throw new ParsingError(ParsingError.Errors.BadTimeStamp,\\n                            \\\"Malformed timestamp: \\\" + oInput);\\n    }\\n    // Remove time stamp from input.\\n    input = input.replace(/^[^\\\\sa-zA-Z-]+/, \\\"\\\");\\n    return ts;\\n  }\\n\\n  // 4.4.2 WebVTT cue settings\\n  function consumeCueSettings(input, cue) {\\n    var settings = new Settings();\\n\\n    parseOptions(input, function (k, v) {\\n      switch (k) {\\n      case \\\"region\\\":\\n        // Find the last region we parsed with the same region id.\\n        for (var i = regionList.length - 1; i >= 0; i--) {\\n          if (regionList[i].id === v) {\\n            settings.set(k, regionList[i].region);\\n            break;\\n          }\\n        }\\n        break;\\n      case \\\"vertical\\\":\\n        settings.alt(k, v, [\\\"rl\\\", \\\"lr\\\"]);\\n        break;\\n      case \\\"line\\\":\\n        var vals = v.split(\\\",\\\"),\\n            vals0 = vals[0];\\n        settings.integer(k, vals0);\\n        settings.percent(k, vals0) ? settings.set(\\\"snapToLines\\\", false) : null;\\n        settings.alt(k, vals0, [\\\"auto\\\"]);\\n        if (vals.length === 2) {\\n          settings.alt(\\\"lineAlign\\\", vals[1], [\\\"start\\\", \\\"center\\\", \\\"end\\\"]);\\n        }\\n        break;\\n      case \\\"position\\\":\\n        vals = v.split(\\\",\\\");\\n        settings.percent(k, vals[0]);\\n        if (vals.length === 2) {\\n          settings.alt(\\\"positionAlign\\\", vals[1], [\\\"start\\\", \\\"center\\\", \\\"end\\\"]);\\n        }\\n        break;\\n      case \\\"size\\\":\\n        settings.percent(k, v);\\n        break;\\n      case \\\"align\\\":\\n        settings.alt(k, v, [\\\"start\\\", \\\"center\\\", \\\"end\\\", \\\"left\\\", \\\"right\\\"]);\\n        break;\\n      }\\n    }, /:/, /\\\\s/);\\n\\n    // Apply default values for any missing fields.\\n    cue.region = settings.get(\\\"region\\\", null);\\n    cue.vertical = settings.get(\\\"vertical\\\", \\\"\\\");\\n    try {\\n      cue.line = settings.get(\\\"line\\\", \\\"auto\\\");\\n    } catch (e) {}\\n    cue.lineAlign = settings.get(\\\"lineAlign\\\", \\\"start\\\");\\n    cue.snapToLines = settings.get(\\\"snapToLines\\\", true);\\n    cue.size = settings.get(\\\"size\\\", 100);\\n    // Safari still uses the old middle value and won't accept center\\n    try {\\n      cue.align = settings.get(\\\"align\\\", \\\"center\\\");\\n    } catch (e) {\\n      cue.align = settings.get(\\\"align\\\", \\\"middle\\\");\\n    }\\n    try {\\n      cue.position = settings.get(\\\"position\\\", \\\"auto\\\");\\n    } catch (e) {\\n      cue.position = settings.get(\\\"position\\\", {\\n        start: 0,\\n        left: 0,\\n        center: 50,\\n        middle: 50,\\n        end: 100,\\n        right: 100\\n      }, cue.align);\\n    }\\n\\n\\n    cue.positionAlign = settings.get(\\\"positionAlign\\\", {\\n      start: \\\"start\\\",\\n      left: \\\"start\\\",\\n      center: \\\"center\\\",\\n      middle: \\\"center\\\",\\n      end: \\\"end\\\",\\n      right: \\\"end\\\"\\n    }, cue.align);\\n  }\\n\\n  function skipWhitespace() {\\n    input = input.replace(/^\\\\s+/, \\\"\\\");\\n  }\\n\\n  // 4.1 WebVTT cue timings.\\n  skipWhitespace();\\n  cue.startTime = consumeTimeStamp();   // (1) collect cue start time\\n  skipWhitespace();\\n  if (input.substr(0, 3) !== \\\"-->\\\") {     // (3) next characters must match \\\"-->\\\"\\n    throw new ParsingError(ParsingError.Errors.BadTimeStamp,\\n                           \\\"Malformed time stamp (time stamps must be separated by '-->'): \\\" +\\n                           oInput);\\n  }\\n  input = input.substr(3);\\n  skipWhitespace();\\n  cue.endTime = consumeTimeStamp();     // (5) collect cue end time\\n\\n  // 4.1 WebVTT cue settings list.\\n  skipWhitespace();\\n  consumeCueSettings(input, cue);\\n}\\n\\nvar TEXTAREA_ELEMENT = document.createElement(\\\"textarea\\\");\\n\\nvar TAG_NAME = {\\n  c: \\\"span\\\",\\n  i: \\\"i\\\",\\n  b: \\\"b\\\",\\n  u: \\\"u\\\",\\n  ruby: \\\"ruby\\\",\\n  rt: \\\"rt\\\",\\n  v: \\\"span\\\",\\n  lang: \\\"span\\\"\\n};\\n\\n// 5.1 default text color\\n// 5.2 default text background color is equivalent to text color with bg_ prefix\\nvar DEFAULT_COLOR_CLASS = {\\n  white: 'rgba(255,255,255,1)',\\n  lime: 'rgba(0,255,0,1)',\\n  cyan: 'rgba(0,255,255,1)',\\n  red: 'rgba(255,0,0,1)',\\n  yellow: 'rgba(255,255,0,1)',\\n  magenta: 'rgba(255,0,255,1)',\\n  blue: 'rgba(0,0,255,1)',\\n  black: 'rgba(0,0,0,1)'\\n};\\n\\nvar TAG_ANNOTATION = {\\n  v: \\\"title\\\",\\n  lang: \\\"lang\\\"\\n};\\n\\nvar NEEDS_PARENT = {\\n  rt: \\\"ruby\\\"\\n};\\n\\n// Parse content into a document fragment.\\nfunction parseContent(window, input) {\\n  function nextToken() {\\n    // Check for end-of-string.\\n    if (!input) {\\n      return null;\\n    }\\n\\n    // Consume 'n' characters from the input.\\n    function consume(result) {\\n      input = input.substr(result.length);\\n      return result;\\n    }\\n\\n    var m = input.match(/^([^<]*)(<[^>]*>?)?/);\\n    // If there is some text before the next tag, return it, otherwise return\\n    // the tag.\\n    return consume(m[1] ? m[1] : m[2]);\\n  }\\n\\n  function unescape(s) {\\n    TEXTAREA_ELEMENT.innerHTML = s;\\n    s = TEXTAREA_ELEMENT.textContent;\\n    TEXTAREA_ELEMENT.textContent = \\\"\\\";\\n    return s;\\n  }\\n\\n  function shouldAdd(current, element) {\\n    return !NEEDS_PARENT[element.localName] ||\\n           NEEDS_PARENT[element.localName] === current.localName;\\n  }\\n\\n  // Create an element for this tag.\\n  function createElement(type, annotation) {\\n    var tagName = TAG_NAME[type];\\n    if (!tagName) {\\n      return null;\\n    }\\n    var element = window.document.createElement(tagName);\\n    var name = TAG_ANNOTATION[type];\\n    if (name && annotation) {\\n      element[name] = annotation.trim();\\n    }\\n    return element;\\n  }\\n\\n  var rootDiv = window.document.createElement(\\\"div\\\"),\\n      current = rootDiv,\\n      t,\\n      tagStack = [];\\n\\n  while ((t = nextToken()) !== null) {\\n    if (t[0] === '<') {\\n      if (t[1] === \\\"/\\\") {\\n        // If the closing tag matches, move back up to the parent node.\\n        if (tagStack.length &&\\n            tagStack[tagStack.length - 1] === t.substr(2).replace(\\\">\\\", \\\"\\\")) {\\n          tagStack.pop();\\n          current = current.parentNode;\\n        }\\n        // Otherwise just ignore the end tag.\\n        continue;\\n      }\\n      var ts = parseTimeStamp(t.substr(1, t.length - 2));\\n      var node;\\n      if (ts) {\\n        // Timestamps are lead nodes as well.\\n        node = window.document.createProcessingInstruction(\\\"timestamp\\\", ts);\\n        current.appendChild(node);\\n        continue;\\n      }\\n      var m = t.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);\\n      // If we can't parse the tag, skip to the next tag.\\n      if (!m) {\\n        continue;\\n      }\\n      // Try to construct an element, and ignore the tag if we couldn't.\\n      node = createElement(m[1], m[3]);\\n      if (!node) {\\n        continue;\\n      }\\n      // Determine if the tag should be added based on the context of where it\\n      // is placed in the cuetext.\\n      if (!shouldAdd(current, node)) {\\n        continue;\\n      }\\n      // Set the class list (as a list of classes, separated by space).\\n      if (m[2]) {\\n        var classes = m[2].split('.');\\n\\n        classes.forEach(function(cl) {\\n          var bgColor = /^bg_/.test(cl);\\n          // slice out `bg_` if it's a background color\\n          var colorName = bgColor ? cl.slice(3) : cl;\\n\\n          if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\\n            var propName = bgColor ? 'background-color' : 'color';\\n            var propValue = DEFAULT_COLOR_CLASS[colorName];\\n\\n            node.style[propName] = propValue;\\n          }\\n        });\\n\\n        node.className = classes.join(' ');\\n      }\\n      // Append the node to the current node, and enter the scope of the new\\n      // node.\\n      tagStack.push(m[1]);\\n      current.appendChild(node);\\n      current = node;\\n      continue;\\n    }\\n\\n    // Text nodes are leaf nodes.\\n    current.appendChild(window.document.createTextNode(unescape(t)));\\n  }\\n\\n  return rootDiv;\\n}\\n\\n// This is a list of all the Unicode characters that have a strong\\n// right-to-left category. What this means is that these characters are\\n// written right-to-left for sure. It was generated by pulling all the strong\\n// right-to-left characters out of the Unicode data table. That table can\\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\\n\\nfunction isStrongRTLChar(charCode) {\\n  for (var i = 0; i < strongRTLRanges.length; i++) {\\n    var currentRange = strongRTLRanges[i];\\n    if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\\n      return true;\\n    }\\n  }\\n\\n  return false;\\n}\\n\\nfunction determineBidi(cueDiv) {\\n  var nodeStack = [],\\n      text = \\\"\\\",\\n      charCode;\\n\\n  if (!cueDiv || !cueDiv.childNodes) {\\n    return \\\"ltr\\\";\\n  }\\n\\n  function pushNodes(nodeStack, node) {\\n    for (var i = node.childNodes.length - 1; i >= 0; i--) {\\n      nodeStack.push(node.childNodes[i]);\\n    }\\n  }\\n\\n  function nextTextNode(nodeStack) {\\n    if (!nodeStack || !nodeStack.length) {\\n      return null;\\n    }\\n\\n    var node = nodeStack.pop(),\\n        text = node.textContent || node.innerText;\\n    if (text) {\\n      // TODO: This should match all unicode type B characters (paragraph\\n      // separator characters). See issue #115.\\n      var m = text.match(/^.*(\\\\n|\\\\r)/);\\n      if (m) {\\n        nodeStack.length = 0;\\n        return m[0];\\n      }\\n      return text;\\n    }\\n    if (node.tagName === \\\"ruby\\\") {\\n      return nextTextNode(nodeStack);\\n    }\\n    if (node.childNodes) {\\n      pushNodes(nodeStack, node);\\n      return nextTextNode(nodeStack);\\n    }\\n  }\\n\\n  pushNodes(nodeStack, cueDiv);\\n  while ((text = nextTextNode(nodeStack))) {\\n    for (var i = 0; i < text.length; i++) {\\n      charCode = text.charCodeAt(i);\\n      if (isStrongRTLChar(charCode)) {\\n        return \\\"rtl\\\";\\n      }\\n    }\\n  }\\n  return \\\"ltr\\\";\\n}\\n\\nfunction computeLinePos(cue) {\\n  if (typeof cue.line === \\\"number\\\" &&\\n      (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\\n    return cue.line;\\n  }\\n  if (!cue.track || !cue.track.textTrackList ||\\n      !cue.track.textTrackList.mediaElement) {\\n    return -1;\\n  }\\n  var track = cue.track,\\n      trackList = track.textTrackList,\\n      count = 0;\\n  for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\\n    if (trackList[i].mode === \\\"showing\\\") {\\n      count++;\\n    }\\n  }\\n  return ++count * -1;\\n}\\n\\nfunction StyleBox() {\\n}\\n\\n// Apply styles to a div. If there is no div passed then it defaults to the\\n// div on 'this'.\\nStyleBox.prototype.applyStyles = function(styles, div) {\\n  div = div || this.div;\\n  for (var prop in styles) {\\n    if (styles.hasOwnProperty(prop)) {\\n      div.style[prop] = styles[prop];\\n    }\\n  }\\n};\\n\\nStyleBox.prototype.formatStyle = function(val, unit) {\\n  return val === 0 ? 0 : val + unit;\\n};\\n\\n// Constructs the computed display state of the cue (a div). Places the div\\n// into the overlay which should be a block level element (usually a div).\\nfunction CueStyleBox(window, cue, styleOptions) {\\n  StyleBox.call(this);\\n  this.cue = cue;\\n\\n  // Parse our cue's text into a DOM tree rooted at 'cueDiv'. This div will\\n  // have inline positioning and will function as the cue background box.\\n  this.cueDiv = parseContent(window, cue.text);\\n  var styles = {\\n    color: \\\"rgba(255, 255, 255, 1)\\\",\\n    backgroundColor:  \\\"rgba(0, 0, 0, 0.8)\\\",\\n    position: \\\"relative\\\",\\n    left: 0,\\n    right: 0,\\n    top: 0,\\n    bottom: 0,\\n    display: \\\"inline\\\",\\n    writingMode: cue.vertical === \\\"\\\" ? \\\"horizontal-tb\\\"\\n                                     : cue.vertical === \\\"lr\\\" ? \\\"vertical-lr\\\"\\n                                                             : \\\"vertical-rl\\\",\\n    unicodeBidi: \\\"plaintext\\\"\\n  };\\n\\n  this.applyStyles(styles, this.cueDiv);\\n\\n  // Create an absolutely positioned div that will be used to position the cue\\n  // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\\n  // mirrors of them except middle instead of center on Safari.\\n  this.div = window.document.createElement(\\\"div\\\");\\n  styles = {\\n    direction: determineBidi(this.cueDiv),\\n    writingMode: cue.vertical === \\\"\\\" ? \\\"horizontal-tb\\\"\\n                                     : cue.vertical === \\\"lr\\\" ? \\\"vertical-lr\\\"\\n                                                             : \\\"vertical-rl\\\",\\n    unicodeBidi: \\\"plaintext\\\",\\n    textAlign: cue.align === \\\"middle\\\" ? \\\"center\\\" : cue.align,\\n    font: styleOptions.font,\\n    whiteSpace: \\\"pre-line\\\",\\n    position: \\\"absolute\\\"\\n  };\\n\\n  this.applyStyles(styles);\\n  this.div.appendChild(this.cueDiv);\\n\\n  // Calculate the distance from the reference edge of the viewport to the text\\n  // position of the cue box. The reference edge will be resolved later when\\n  // the box orientation styles are applied.\\n  var textPos = 0;\\n  switch (cue.positionAlign) {\\n  case \\\"start\\\":\\n    textPos = cue.position;\\n    break;\\n  case \\\"center\\\":\\n    textPos = cue.position - (cue.size / 2);\\n    break;\\n  case \\\"end\\\":\\n    textPos = cue.position - cue.size;\\n    break;\\n  }\\n\\n  // Horizontal box orientation; textPos is the distance from the left edge of the\\n  // area to the left edge of the box and cue.size is the distance extending to\\n  // the right from there.\\n  if (cue.vertical === \\\"\\\") {\\n    this.applyStyles({\\n      left:  this.formatStyle(textPos, \\\"%\\\"),\\n      width: this.formatStyle(cue.size, \\\"%\\\")\\n    });\\n  // Vertical box orientation; textPos is the distance from the top edge of the\\n  // area to the top edge of the box and cue.size is the height extending\\n  // downwards from there.\\n  } else {\\n    this.applyStyles({\\n      top: this.formatStyle(textPos, \\\"%\\\"),\\n      height: this.formatStyle(cue.size, \\\"%\\\")\\n    });\\n  }\\n\\n  this.move = function(box) {\\n    this.applyStyles({\\n      top: this.formatStyle(box.top, \\\"px\\\"),\\n      bottom: this.formatStyle(box.bottom, \\\"px\\\"),\\n      left: this.formatStyle(box.left, \\\"px\\\"),\\n      right: this.formatStyle(box.right, \\\"px\\\"),\\n      height: this.formatStyle(box.height, \\\"px\\\"),\\n      width: this.formatStyle(box.width, \\\"px\\\")\\n    });\\n  };\\n}\\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\\nCueStyleBox.prototype.constructor = CueStyleBox;\\n\\n// Represents the co-ordinates of an Element in a way that we can easily\\n// compute things with such as if it overlaps or intersects with another Element.\\n// Can initialize it with either a StyleBox or another BoxPosition.\\nfunction BoxPosition(obj) {\\n  // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\\n  // was passed in and we need to copy the results of 'getBoundingClientRect'\\n  // as the object returned is readonly. All co-ordinate values are in reference\\n  // to the viewport origin (top left).\\n  var lh, height, width, top;\\n  if (obj.div) {\\n    height = obj.div.offsetHeight;\\n    width = obj.div.offsetWidth;\\n    top = obj.div.offsetTop;\\n\\n    var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\\n                rects.getClientRects && rects.getClientRects();\\n    obj = obj.div.getBoundingClientRect();\\n    // In certain cases the outter div will be slightly larger then the sum of\\n    // the inner div's lines. This could be due to bold text, etc, on some platforms.\\n    // In this case we should get the average line height and use that. This will\\n    // result in the desired behaviour.\\n    lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\\n               : 0;\\n\\n  }\\n  this.left = obj.left;\\n  this.right = obj.right;\\n  this.top = obj.top || top;\\n  this.height = obj.height || height;\\n  this.bottom = obj.bottom || (top + (obj.height || height));\\n  this.width = obj.width || width;\\n  this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\\n}\\n\\n// Move the box along a particular axis. Optionally pass in an amount to move\\n// the box. If no amount is passed then the default is the line height of the\\n// box.\\nBoxPosition.prototype.move = function(axis, toMove) {\\n  toMove = toMove !== undefined ? toMove : this.lineHeight;\\n  switch (axis) {\\n  case \\\"+x\\\":\\n    this.left += toMove;\\n    this.right += toMove;\\n    break;\\n  case \\\"-x\\\":\\n    this.left -= toMove;\\n    this.right -= toMove;\\n    break;\\n  case \\\"+y\\\":\\n    this.top += toMove;\\n    this.bottom += toMove;\\n    break;\\n  case \\\"-y\\\":\\n    this.top -= toMove;\\n    this.bottom -= toMove;\\n    break;\\n  }\\n};\\n\\n// Check if this box overlaps another box, b2.\\nBoxPosition.prototype.overlaps = function(b2) {\\n  return this.left < b2.right &&\\n         this.right > b2.left &&\\n         this.top < b2.bottom &&\\n         this.bottom > b2.top;\\n};\\n\\n// Check if this box overlaps any other boxes in boxes.\\nBoxPosition.prototype.overlapsAny = function(boxes) {\\n  for (var i = 0; i < boxes.length; i++) {\\n    if (this.overlaps(boxes[i])) {\\n      return true;\\n    }\\n  }\\n  return false;\\n};\\n\\n// Check if this box is within another box.\\nBoxPosition.prototype.within = function(container) {\\n  return this.top >= container.top &&\\n         this.bottom <= container.bottom &&\\n         this.left >= container.left &&\\n         this.right <= container.right;\\n};\\n\\n// Check if this box is entirely within the container or it is overlapping\\n// on the edge opposite of the axis direction passed. For example, if \\\"+x\\\" is\\n// passed and the box is overlapping on the left edge of the container, then\\n// return true.\\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\\n  switch (axis) {\\n  case \\\"+x\\\":\\n    return this.left < container.left;\\n  case \\\"-x\\\":\\n    return this.right > container.right;\\n  case \\\"+y\\\":\\n    return this.top < container.top;\\n  case \\\"-y\\\":\\n    return this.bottom > container.bottom;\\n  }\\n};\\n\\n// Find the percentage of the area that this box is overlapping with another\\n// box.\\nBoxPosition.prototype.intersectPercentage = function(b2) {\\n  var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\\n      y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\\n      intersectArea = x * y;\\n  return intersectArea / (this.height * this.width);\\n};\\n\\n// Convert the positions from this box to CSS compatible positions using\\n// the reference container's positions. This has to be done because this\\n// box's positions are in reference to the viewport origin, whereas, CSS\\n// values are in referecne to their respective edges.\\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\\n  return {\\n    top: this.top - reference.top,\\n    bottom: reference.bottom - this.bottom,\\n    left: this.left - reference.left,\\n    right: reference.right - this.right,\\n    height: this.height,\\n    width: this.width\\n  };\\n};\\n\\n// Get an object that represents the box's position without anything extra.\\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\\nBoxPosition.getSimpleBoxPosition = function(obj) {\\n  var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\\n  var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\\n  var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\\n\\n  obj = obj.div ? obj.div.getBoundingClientRect() :\\n                obj.tagName ? obj.getBoundingClientRect() : obj;\\n  var ret = {\\n    left: obj.left,\\n    right: obj.right,\\n    top: obj.top || top,\\n    height: obj.height || height,\\n    bottom: obj.bottom || (top + (obj.height || height)),\\n    width: obj.width || width\\n  };\\n  return ret;\\n};\\n\\n// Move a StyleBox to its specified, or next best, position. The containerBox\\n// is the box that contains the StyleBox, such as a div. boxPositions are\\n// a list of other boxes that the styleBox can't overlap with.\\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\\n\\n  // Find the best position for a cue box, b, on the video. The axis parameter\\n  // is a list of axis, the order of which, it will move the box along. For example:\\n  // Passing [\\\"+x\\\", \\\"-x\\\"] will move the box first along the x axis in the positive\\n  // direction. If it doesn't find a good position for it there it will then move\\n  // it along the x axis in the negative direction.\\n  function findBestPosition(b, axis) {\\n    var bestPosition,\\n        specifiedPosition = new BoxPosition(b),\\n        percentage = 1; // Highest possible so the first thing we get is better.\\n\\n    for (var i = 0; i < axis.length; i++) {\\n      while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\\n             (b.within(containerBox) && b.overlapsAny(boxPositions))) {\\n        b.move(axis[i]);\\n      }\\n      // We found a spot where we aren't overlapping anything. This is our\\n      // best position.\\n      if (b.within(containerBox)) {\\n        return b;\\n      }\\n      var p = b.intersectPercentage(containerBox);\\n      // If we're outside the container box less then we were on our last try\\n      // then remember this position as the best position.\\n      if (percentage > p) {\\n        bestPosition = new BoxPosition(b);\\n        percentage = p;\\n      }\\n      // Reset the box position to the specified position.\\n      b = new BoxPosition(specifiedPosition);\\n    }\\n    return bestPosition || specifiedPosition;\\n  }\\n\\n  var boxPosition = new BoxPosition(styleBox),\\n      cue = styleBox.cue,\\n      linePos = computeLinePos(cue),\\n      axis = [];\\n\\n  // If we have a line number to align the cue to.\\n  if (cue.snapToLines) {\\n    var size;\\n    switch (cue.vertical) {\\n    case \\\"\\\":\\n      axis = [ \\\"+y\\\", \\\"-y\\\" ];\\n      size = \\\"height\\\";\\n      break;\\n    case \\\"rl\\\":\\n      axis = [ \\\"+x\\\", \\\"-x\\\" ];\\n      size = \\\"width\\\";\\n      break;\\n    case \\\"lr\\\":\\n      axis = [ \\\"-x\\\", \\\"+x\\\" ];\\n      size = \\\"width\\\";\\n      break;\\n    }\\n\\n    var step = boxPosition.lineHeight,\\n        position = step * Math.round(linePos),\\n        maxPosition = containerBox[size] + step,\\n        initialAxis = axis[0];\\n\\n    // If the specified intial position is greater then the max position then\\n    // clamp the box to the amount of steps it would take for the box to\\n    // reach the max position.\\n    if (Math.abs(position) > maxPosition) {\\n      position = position < 0 ? -1 : 1;\\n      position *= Math.ceil(maxPosition / step) * step;\\n    }\\n\\n    // If computed line position returns negative then line numbers are\\n    // relative to the bottom of the video instead of the top. Therefore, we\\n    // need to increase our initial position by the length or width of the\\n    // video, depending on the writing direction, and reverse our axis directions.\\n    if (linePos < 0) {\\n      position += cue.vertical === \\\"\\\" ? containerBox.height : containerBox.width;\\n      axis = axis.reverse();\\n    }\\n\\n    // Move the box to the specified position. This may not be its best\\n    // position.\\n    boxPosition.move(initialAxis, position);\\n\\n  } else {\\n    // If we have a percentage line value for the cue.\\n    var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\\n\\n    switch (cue.lineAlign) {\\n    case \\\"center\\\":\\n      linePos -= (calculatedPercentage / 2);\\n      break;\\n    case \\\"end\\\":\\n      linePos -= calculatedPercentage;\\n      break;\\n    }\\n\\n    // Apply initial line position to the cue box.\\n    switch (cue.vertical) {\\n    case \\\"\\\":\\n      styleBox.applyStyles({\\n        top: styleBox.formatStyle(linePos, \\\"%\\\")\\n      });\\n      break;\\n    case \\\"rl\\\":\\n      styleBox.applyStyles({\\n        left: styleBox.formatStyle(linePos, \\\"%\\\")\\n      });\\n      break;\\n    case \\\"lr\\\":\\n      styleBox.applyStyles({\\n        right: styleBox.formatStyle(linePos, \\\"%\\\")\\n      });\\n      break;\\n    }\\n\\n    axis = [ \\\"+y\\\", \\\"-x\\\", \\\"+x\\\", \\\"-y\\\" ];\\n\\n    // Get the box position again after we've applied the specified positioning\\n    // to it.\\n    boxPosition = new BoxPosition(styleBox);\\n  }\\n\\n  var bestPosition = findBestPosition(boxPosition, axis);\\n  styleBox.move(bestPosition.toCSSCompatValues(containerBox));\\n}\\n\\nfunction WebVTT() {\\n  // Nothing\\n}\\n\\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\\nWebVTT.StringDecoder = function() {\\n  return {\\n    decode: function(data) {\\n      if (!data) {\\n        return \\\"\\\";\\n      }\\n      if (typeof data !== \\\"string\\\") {\\n        throw new Error(\\\"Error - expected string data.\\\");\\n      }\\n      return decodeURIComponent(encodeURIComponent(data));\\n    }\\n  };\\n};\\n\\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\\n  if (!window || !cuetext) {\\n    return null;\\n  }\\n  return parseContent(window, cuetext);\\n};\\n\\nvar FONT_SIZE_PERCENT = 0.05;\\nvar FONT_STYLE = \\\"sans-serif\\\";\\nvar CUE_BACKGROUND_PADDING = \\\"1.5%\\\";\\n\\n// Runs the processing model over the cues and regions passed to it.\\n// @param overlay A block level element (usually a div) that the computed cues\\n//                and regions will be placed into.\\nWebVTT.processCues = function(window, cues, overlay) {\\n  if (!window || !cues || !overlay) {\\n    return null;\\n  }\\n\\n  // Remove all previous children.\\n  while (overlay.firstChild) {\\n    overlay.removeChild(overlay.firstChild);\\n  }\\n\\n  var paddedOverlay = window.document.createElement(\\\"div\\\");\\n  paddedOverlay.style.position = \\\"absolute\\\";\\n  paddedOverlay.style.left = \\\"0\\\";\\n  paddedOverlay.style.right = \\\"0\\\";\\n  paddedOverlay.style.top = \\\"0\\\";\\n  paddedOverlay.style.bottom = \\\"0\\\";\\n  paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\\n  overlay.appendChild(paddedOverlay);\\n\\n  // Determine if we need to compute the display states of the cues. This could\\n  // be the case if a cue's state has been changed since the last computation or\\n  // if it has not been computed yet.\\n  function shouldCompute(cues) {\\n    for (var i = 0; i < cues.length; i++) {\\n      if (cues[i].hasBeenReset || !cues[i].displayState) {\\n        return true;\\n      }\\n    }\\n    return false;\\n  }\\n\\n  // We don't need to recompute the cues' display states. Just reuse them.\\n  if (!shouldCompute(cues)) {\\n    for (var i = 0; i < cues.length; i++) {\\n      paddedOverlay.appendChild(cues[i].displayState);\\n    }\\n    return;\\n  }\\n\\n  var boxPositions = [],\\n      containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\\n      fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\\n  var styleOptions = {\\n    font: fontSize + \\\"px \\\" + FONT_STYLE\\n  };\\n\\n  (function() {\\n    var styleBox, cue;\\n\\n    for (var i = 0; i < cues.length; i++) {\\n      cue = cues[i];\\n\\n      // Compute the intial position and styles of the cue div.\\n      styleBox = new CueStyleBox(window, cue, styleOptions);\\n      paddedOverlay.appendChild(styleBox.div);\\n\\n      // Move the cue div to it's correct line position.\\n      moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\\n\\n      // Remember the computed div so that we don't have to recompute it later\\n      // if we don't have too.\\n      cue.displayState = styleBox.div;\\n\\n      boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\\n    }\\n  })();\\n};\\n\\nWebVTT.Parser = function(window, vttjs, decoder) {\\n  if (!decoder) {\\n    decoder = vttjs;\\n    vttjs = {};\\n  }\\n  if (!vttjs) {\\n    vttjs = {};\\n  }\\n\\n  this.window = window;\\n  this.vttjs = vttjs;\\n  this.state = \\\"INITIAL\\\";\\n  this.buffer = \\\"\\\";\\n  this.decoder = decoder || new TextDecoder(\\\"utf8\\\");\\n  this.regionList = [];\\n};\\n\\nWebVTT.Parser.prototype = {\\n  // If the error is a ParsingError then report it to the consumer if\\n  // possible. If it's not a ParsingError then throw it like normal.\\n  reportOrThrowError: function(e) {\\n    if (e instanceof ParsingError) {\\n      this.onparsingerror && this.onparsingerror(e);\\n    } else {\\n      throw e;\\n    }\\n  },\\n  parse: function (data) {\\n    var self = this;\\n\\n    // If there is no data then we won't decode it, but will just try to parse\\n    // whatever is in buffer already. This may occur in circumstances, for\\n    // example when flush() is called.\\n    if (data) {\\n      // Try to decode the data that we received.\\n      self.buffer += self.decoder.decode(data, {stream: true});\\n    }\\n\\n    function collectNextLine() {\\n      var buffer = self.buffer;\\n      var pos = 0;\\n      while (pos < buffer.length && buffer[pos] !== '\\\\r' && buffer[pos] !== '\\\\n') {\\n        ++pos;\\n      }\\n      var line = buffer.substr(0, pos);\\n      // Advance the buffer early in case we fail below.\\n      if (buffer[pos] === '\\\\r') {\\n        ++pos;\\n      }\\n      if (buffer[pos] === '\\\\n') {\\n        ++pos;\\n      }\\n      self.buffer = buffer.substr(pos);\\n      return line;\\n    }\\n\\n    // 3.4 WebVTT region and WebVTT region settings syntax\\n    function parseRegion(input) {\\n      var settings = new Settings();\\n\\n      parseOptions(input, function (k, v) {\\n        switch (k) {\\n        case \\\"id\\\":\\n          settings.set(k, v);\\n          break;\\n        case \\\"width\\\":\\n          settings.percent(k, v);\\n          break;\\n        case \\\"lines\\\":\\n          settings.integer(k, v);\\n          break;\\n        case \\\"regionanchor\\\":\\n        case \\\"viewportanchor\\\":\\n          var xy = v.split(',');\\n          if (xy.length !== 2) {\\n            break;\\n          }\\n          // We have to make sure both x and y parse, so use a temporary\\n          // settings object here.\\n          var anchor = new Settings();\\n          anchor.percent(\\\"x\\\", xy[0]);\\n          anchor.percent(\\\"y\\\", xy[1]);\\n          if (!anchor.has(\\\"x\\\") || !anchor.has(\\\"y\\\")) {\\n            break;\\n          }\\n          settings.set(k + \\\"X\\\", anchor.get(\\\"x\\\"));\\n          settings.set(k + \\\"Y\\\", anchor.get(\\\"y\\\"));\\n          break;\\n        case \\\"scroll\\\":\\n          settings.alt(k, v, [\\\"up\\\"]);\\n          break;\\n        }\\n      }, /=/, /\\\\s/);\\n\\n      // Create the region, using default values for any values that were not\\n      // specified.\\n      if (settings.has(\\\"id\\\")) {\\n        var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\\n        region.width = settings.get(\\\"width\\\", 100);\\n        region.lines = settings.get(\\\"lines\\\", 3);\\n        region.regionAnchorX = settings.get(\\\"regionanchorX\\\", 0);\\n        region.regionAnchorY = settings.get(\\\"regionanchorY\\\", 100);\\n        region.viewportAnchorX = settings.get(\\\"viewportanchorX\\\", 0);\\n        region.viewportAnchorY = settings.get(\\\"viewportanchorY\\\", 100);\\n        region.scroll = settings.get(\\\"scroll\\\", \\\"\\\");\\n        // Register the region.\\n        self.onregion && self.onregion(region);\\n        // Remember the VTTRegion for later in case we parse any VTTCues that\\n        // reference it.\\n        self.regionList.push({\\n          id: settings.get(\\\"id\\\"),\\n          region: region\\n        });\\n      }\\n    }\\n\\n    // draft-pantos-http-live-streaming-20\\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\\n    // 3.5 WebVTT\\n    function parseTimestampMap(input) {\\n      var settings = new Settings();\\n\\n      parseOptions(input, function(k, v) {\\n        switch(k) {\\n        case \\\"MPEGT\\\":\\n          settings.integer(k + 'S', v);\\n          break;\\n        case \\\"LOCA\\\":\\n          settings.set(k + 'L', parseTimeStamp(v));\\n          break;\\n        }\\n      }, /[^\\\\d]:/, /,/);\\n\\n      self.ontimestampmap && self.ontimestampmap({\\n        \\\"MPEGTS\\\": settings.get(\\\"MPEGTS\\\"),\\n        \\\"LOCAL\\\": settings.get(\\\"LOCAL\\\")\\n      });\\n    }\\n\\n    // 3.2 WebVTT metadata header syntax\\n    function parseHeader(input) {\\n      if (input.match(/X-TIMESTAMP-MAP/)) {\\n        // This line contains HLS X-TIMESTAMP-MAP metadata\\n        parseOptions(input, function(k, v) {\\n          switch(k) {\\n          case \\\"X-TIMESTAMP-MAP\\\":\\n            parseTimestampMap(v);\\n            break;\\n          }\\n        }, /=/);\\n      } else {\\n        parseOptions(input, function (k, v) {\\n          switch (k) {\\n          case \\\"Region\\\":\\n            // 3.3 WebVTT region metadata header syntax\\n            parseRegion(v);\\n            break;\\n          }\\n        }, /:/);\\n      }\\n\\n    }\\n\\n    // 5.1 WebVTT file parsing.\\n    try {\\n      var line;\\n      if (self.state === \\\"INITIAL\\\") {\\n        // We can't start parsing until we have the first line.\\n        if (!/\\\\r\\\\n|\\\\n/.test(self.buffer)) {\\n          return this;\\n        }\\n\\n        line = collectNextLine();\\n\\n        var m = line.match(/^WEBVTT([ \\\\t].*)?$/);\\n        if (!m || !m[0]) {\\n          throw new ParsingError(ParsingError.Errors.BadSignature);\\n        }\\n\\n        self.state = \\\"HEADER\\\";\\n      }\\n\\n      var alreadyCollectedLine = false;\\n      while (self.buffer) {\\n        // We can't parse a line until we have the full line.\\n        if (!/\\\\r\\\\n|\\\\n/.test(self.buffer)) {\\n          return this;\\n        }\\n\\n        if (!alreadyCollectedLine) {\\n          line = collectNextLine();\\n        } else {\\n          alreadyCollectedLine = false;\\n        }\\n\\n        switch (self.state) {\\n        case \\\"HEADER\\\":\\n          // 13-18 - Allow a header (metadata) under the WEBVTT line.\\n          if (/:/.test(line)) {\\n            parseHeader(line);\\n          } else if (!line) {\\n            // An empty line terminates the header and starts the body (cues).\\n            self.state = \\\"ID\\\";\\n          }\\n          continue;\\n        case \\\"NOTE\\\":\\n          // Ignore NOTE blocks.\\n          if (!line) {\\n            self.state = \\\"ID\\\";\\n          }\\n          continue;\\n        case \\\"ID\\\":\\n          // Check for the start of NOTE blocks.\\n          if (/^NOTE($|[ \\\\t])/.test(line)) {\\n            self.state = \\\"NOTE\\\";\\n            break;\\n          }\\n          // 19-29 - Allow any number of line terminators, then initialize new cue values.\\n          if (!line) {\\n            continue;\\n          }\\n          self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \\\"\\\");\\n          // Safari still uses the old middle value and won't accept center\\n          try {\\n            self.cue.align = \\\"center\\\";\\n          } catch (e) {\\n            self.cue.align = \\\"middle\\\";\\n          }\\n          self.state = \\\"CUE\\\";\\n          // 30-39 - Check if self line contains an optional identifier or timing data.\\n          if (line.indexOf(\\\"-->\\\") === -1) {\\n            self.cue.id = line;\\n            continue;\\n          }\\n          // Process line as start of a cue.\\n          /*falls through*/\\n        case \\\"CUE\\\":\\n          // 40 - Collect cue timings and settings.\\n          try {\\n            parseCue(line, self.cue, self.regionList);\\n          } catch (e) {\\n            self.reportOrThrowError(e);\\n            // In case of an error ignore rest of the cue.\\n            self.cue = null;\\n            self.state = \\\"BADCUE\\\";\\n            continue;\\n          }\\n          self.state = \\\"CUETEXT\\\";\\n          continue;\\n        case \\\"CUETEXT\\\":\\n          var hasSubstring = line.indexOf(\\\"-->\\\") !== -1;\\n          // 34 - If we have an empty line then report the cue.\\n          // 35 - If we have the special substring '-->' then report the cue,\\n          // but do not collect the line as we need to process the current\\n          // one as a new cue.\\n          if (!line || hasSubstring && (alreadyCollectedLine = true)) {\\n            // We are done parsing self cue.\\n            self.oncue && self.oncue(self.cue);\\n            self.cue = null;\\n            self.state = \\\"ID\\\";\\n            continue;\\n          }\\n          if (self.cue.text) {\\n            self.cue.text += \\\"\\\\n\\\";\\n          }\\n          self.cue.text += line.replace(/\\\\u2028/g, '\\\\n').replace(/u2029/g, '\\\\n');\\n          continue;\\n        case \\\"BADCUE\\\": // BADCUE\\n          // 54-62 - Collect and discard the remaining cue.\\n          if (!line) {\\n            self.state = \\\"ID\\\";\\n          }\\n          continue;\\n        }\\n      }\\n    } catch (e) {\\n      self.reportOrThrowError(e);\\n\\n      // If we are currently parsing a cue, report what we have.\\n      if (self.state === \\\"CUETEXT\\\" && self.cue && self.oncue) {\\n        self.oncue(self.cue);\\n      }\\n      self.cue = null;\\n      // Enter BADWEBVTT state if header was not parsed correctly otherwise\\n      // another exception occurred so enter BADCUE state.\\n      self.state = self.state === \\\"INITIAL\\\" ? \\\"BADWEBVTT\\\" : \\\"BADCUE\\\";\\n    }\\n    return this;\\n  },\\n  flush: function () {\\n    var self = this;\\n    try {\\n      // Finish decoding the stream.\\n      self.buffer += self.decoder.decode();\\n      // Synthesize the end of the current cue or region.\\n      if (self.cue || self.state === \\\"HEADER\\\") {\\n        self.buffer += \\\"\\\\n\\\\n\\\";\\n        self.parse();\\n      }\\n      // If we've flushed, parsed, and we're still on the INITIAL state then\\n      // that means we don't have enough of the stream to parse the first\\n      // line.\\n      if (self.state === \\\"INITIAL\\\") {\\n        throw new ParsingError(ParsingError.Errors.BadSignature);\\n      }\\n    } catch(e) {\\n      self.reportOrThrowError(e);\\n    }\\n    self.onflush && self.onflush();\\n    return this;\\n  }\\n};\\n\\nmodule.exports = WebVTT;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/vtt.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-vtt.js/lib/vttcue.js\":\n/*!****************************************************!*\\\n  !*** ../node_modules/videojs-vtt.js/lib/vttcue.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nvar autoKeyword = \\\"auto\\\";\\nvar directionSetting = {\\n  \\\"\\\": 1,\\n  \\\"lr\\\": 1,\\n  \\\"rl\\\": 1\\n};\\nvar alignSetting = {\\n  \\\"start\\\": 1,\\n  \\\"center\\\": 1,\\n  \\\"end\\\": 1,\\n  \\\"left\\\": 1,\\n  \\\"right\\\": 1,\\n  \\\"auto\\\": 1,\\n  \\\"line-left\\\": 1,\\n  \\\"line-right\\\": 1\\n};\\n\\nfunction findDirectionSetting(value) {\\n  if (typeof value !== \\\"string\\\") {\\n    return false;\\n  }\\n  var dir = directionSetting[value.toLowerCase()];\\n  return dir ? value.toLowerCase() : false;\\n}\\n\\nfunction findAlignSetting(value) {\\n  if (typeof value !== \\\"string\\\") {\\n    return false;\\n  }\\n  var align = alignSetting[value.toLowerCase()];\\n  return align ? value.toLowerCase() : false;\\n}\\n\\nfunction VTTCue(startTime, endTime, text) {\\n  /**\\n   * Shim implementation specific properties. These properties are not in\\n   * the spec.\\n   */\\n\\n  // Lets us know when the VTTCue's data has changed in such a way that we need\\n  // to recompute its display state. This lets us compute its display state\\n  // lazily.\\n  this.hasBeenReset = false;\\n\\n  /**\\n   * VTTCue and TextTrackCue properties\\n   * http://dev.w3.org/html5/webvtt/#vttcue-interface\\n   */\\n\\n  var _id = \\\"\\\";\\n  var _pauseOnExit = false;\\n  var _startTime = startTime;\\n  var _endTime = endTime;\\n  var _text = text;\\n  var _region = null;\\n  var _vertical = \\\"\\\";\\n  var _snapToLines = true;\\n  var _line = \\\"auto\\\";\\n  var _lineAlign = \\\"start\\\";\\n  var _position = \\\"auto\\\";\\n  var _positionAlign = \\\"auto\\\";\\n  var _size = 100;\\n  var _align = \\\"center\\\";\\n\\n  Object.defineProperties(this, {\\n    \\\"id\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _id;\\n      },\\n      set: function(value) {\\n        _id = \\\"\\\" + value;\\n      }\\n    },\\n\\n    \\\"pauseOnExit\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _pauseOnExit;\\n      },\\n      set: function(value) {\\n        _pauseOnExit = !!value;\\n      }\\n    },\\n\\n    \\\"startTime\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _startTime;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \\\"number\\\") {\\n          throw new TypeError(\\\"Start time must be set to a number.\\\");\\n        }\\n        _startTime = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"endTime\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _endTime;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \\\"number\\\") {\\n          throw new TypeError(\\\"End time must be set to a number.\\\");\\n        }\\n        _endTime = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"text\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _text;\\n      },\\n      set: function(value) {\\n        _text = \\\"\\\" + value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"region\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _region;\\n      },\\n      set: function(value) {\\n        _region = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"vertical\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _vertical;\\n      },\\n      set: function(value) {\\n        var setting = findDirectionSetting(value);\\n        // Have to check for false because the setting an be an empty string.\\n        if (setting === false) {\\n          throw new SyntaxError(\\\"Vertical: an invalid or illegal direction string was specified.\\\");\\n        }\\n        _vertical = setting;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"snapToLines\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _snapToLines;\\n      },\\n      set: function(value) {\\n        _snapToLines = !!value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"line\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _line;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \\\"number\\\" && value !== autoKeyword) {\\n          throw new SyntaxError(\\\"Line: an invalid number or illegal string was specified.\\\");\\n        }\\n        _line = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"lineAlign\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _lineAlign;\\n      },\\n      set: function(value) {\\n        var setting = findAlignSetting(value);\\n        if (!setting) {\\n          console.warn(\\\"lineAlign: an invalid or illegal string was specified.\\\");\\n        } else {\\n          _lineAlign = setting;\\n          this.hasBeenReset = true;\\n        }\\n      }\\n    },\\n\\n    \\\"position\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _position;\\n      },\\n      set: function(value) {\\n        if (value < 0 || value > 100) {\\n          throw new Error(\\\"Position must be between 0 and 100.\\\");\\n        }\\n        _position = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"positionAlign\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _positionAlign;\\n      },\\n      set: function(value) {\\n        var setting = findAlignSetting(value);\\n        if (!setting) {\\n          console.warn(\\\"positionAlign: an invalid or illegal string was specified.\\\");\\n        } else {\\n          _positionAlign = setting;\\n          this.hasBeenReset = true;\\n        }\\n      }\\n    },\\n\\n    \\\"size\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _size;\\n      },\\n      set: function(value) {\\n        if (value < 0 || value > 100) {\\n          throw new Error(\\\"Size must be between 0 and 100.\\\");\\n        }\\n        _size = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \\\"align\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _align;\\n      },\\n      set: function(value) {\\n        var setting = findAlignSetting(value);\\n        if (!setting) {\\n          throw new SyntaxError(\\\"align: an invalid or illegal alignment string was specified.\\\");\\n        }\\n        _align = setting;\\n        this.hasBeenReset = true;\\n      }\\n    }\\n  });\\n\\n  /**\\n   * Other <track> spec defined properties\\n   */\\n\\n  // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\\n  this.displayState = undefined;\\n}\\n\\n/**\\n * VTTCue methods\\n */\\n\\nVTTCue.prototype.getCueAsHTML = function() {\\n  // Assume WebVTT.convertCueToDOMTree is on the global.\\n  return WebVTT.convertCueToDOMTree(window, this.text);\\n};\\n\\nmodule.exports = VTTCue;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/vttcue.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/videojs-vtt.js/lib/vttregion.js\":\n/*!*******************************************************!*\\\n  !*** ../node_modules/videojs-vtt.js/lib/vttregion.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nvar scrollSetting = {\\n  \\\"\\\": true,\\n  \\\"up\\\": true\\n};\\n\\nfunction findScrollSetting(value) {\\n  if (typeof value !== \\\"string\\\") {\\n    return false;\\n  }\\n  var scroll = scrollSetting[value.toLowerCase()];\\n  return scroll ? value.toLowerCase() : false;\\n}\\n\\nfunction isValidPercentValue(value) {\\n  return typeof value === \\\"number\\\" && (value >= 0 && value <= 100);\\n}\\n\\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\\nfunction VTTRegion() {\\n  var _width = 100;\\n  var _lines = 3;\\n  var _regionAnchorX = 0;\\n  var _regionAnchorY = 100;\\n  var _viewportAnchorX = 0;\\n  var _viewportAnchorY = 100;\\n  var _scroll = \\\"\\\";\\n\\n  Object.defineProperties(this, {\\n    \\\"width\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _width;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\\\"Width must be between 0 and 100.\\\");\\n        }\\n        _width = value;\\n      }\\n    },\\n    \\\"lines\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _lines;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \\\"number\\\") {\\n          throw new TypeError(\\\"Lines must be set to a number.\\\");\\n        }\\n        _lines = value;\\n      }\\n    },\\n    \\\"regionAnchorY\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _regionAnchorY;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\\\"RegionAnchorX must be between 0 and 100.\\\");\\n        }\\n        _regionAnchorY = value;\\n      }\\n    },\\n    \\\"regionAnchorX\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _regionAnchorX;\\n      },\\n      set: function(value) {\\n        if(!isValidPercentValue(value)) {\\n          throw new Error(\\\"RegionAnchorY must be between 0 and 100.\\\");\\n        }\\n        _regionAnchorX = value;\\n      }\\n    },\\n    \\\"viewportAnchorY\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _viewportAnchorY;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\\\"ViewportAnchorY must be between 0 and 100.\\\");\\n        }\\n        _viewportAnchorY = value;\\n      }\\n    },\\n    \\\"viewportAnchorX\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _viewportAnchorX;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\\\"ViewportAnchorX must be between 0 and 100.\\\");\\n        }\\n        _viewportAnchorX = value;\\n      }\\n    },\\n    \\\"scroll\\\": {\\n      enumerable: true,\\n      get: function() {\\n        return _scroll;\\n      },\\n      set: function(value) {\\n        var setting = findScrollSetting(value);\\n        // Have to check for false as an empty string is a legal value.\\n        if (setting === false) {\\n          console.warn(\\\"Scroll: an invalid or illegal string was specified.\\\");\\n        } else {\\n          _scroll = setting;\\n        }\\n      }\\n    }\\n  });\\n}\\n\\nmodule.exports = VTTRegion;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/vttregion.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/webfontloader/webfontloader.js\":\n/*!******************************************************!*\\\n  !*** ../node_modules/webfontloader/webfontloader.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_RESULT__;/* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function p(a,b,c){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(\\\"native code\\\")?aa:ba;return p.apply(null,arguments)}var q=Date.now||function(){return+new Date};function ca(a,b){this.a=a;this.o=b||a;this.c=this.o.document}var da=!!window.FontFace;function t(a,b,c,d){b=a.c.createElement(b);if(c)for(var e in c)c.hasOwnProperty(e)&&(\\\"style\\\"==e?b.style.cssText=c[e]:b.setAttribute(e,c[e]));d&&b.appendChild(a.c.createTextNode(d));return b}function u(a,b,c){a=a.c.getElementsByTagName(b)[0];a||(a=document.documentElement);a.insertBefore(c,a.lastChild)}function v(a){a.parentNode&&a.parentNode.removeChild(a)}\\nfunction w(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\\\\s+/),e=0;e<b.length;e+=1){for(var f=!1,g=0;g<d.length;g+=1)if(b[e]===d[g]){f=!0;break}f||d.push(b[e])}b=[];for(e=0;e<d.length;e+=1){f=!1;for(g=0;g<c.length;g+=1)if(d[e]===c[g]){f=!0;break}f||b.push(d[e])}a.className=b.join(\\\" \\\").replace(/\\\\s+/g,\\\" \\\").replace(/^\\\\s+|\\\\s+$/,\\\"\\\")}function y(a,b){for(var c=a.className.split(/\\\\s+/),d=0,e=c.length;d<e;d++)if(c[d]==b)return!0;return!1}\\nfunction ea(a){return a.o.location.hostname||a.a.location.hostname}function z(a,b,c){function d(){m&&e&&f&&(m(g),m=null)}b=t(a,\\\"link\\\",{rel:\\\"stylesheet\\\",href:b,media:\\\"all\\\"});var e=!1,f=!0,g=null,m=c||null;da?(b.onload=function(){e=!0;d()},b.onerror=function(){e=!0;g=Error(\\\"Stylesheet failed to load\\\");d()}):setTimeout(function(){e=!0;d()},0);u(a,\\\"head\\\",b)}\\nfunction A(a,b,c,d){var e=a.c.getElementsByTagName(\\\"head\\\")[0];if(e){var f=t(a,\\\"script\\\",{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyState&&\\\"loaded\\\"!=this.readyState&&\\\"complete\\\"!=this.readyState||(g=!0,c&&c(null),f.onload=f.onreadystatechange=null,\\\"HEAD\\\"==f.parentNode.tagName&&e.removeChild(f))};e.appendChild(f);setTimeout(function(){g||(g=!0,c&&c(Error(\\\"Script load timeout\\\")))},d||5E3);return f}return null};function B(){this.a=0;this.c=null}function C(a){a.a++;return function(){a.a--;D(a)}}function E(a,b){a.c=b;D(a)}function D(a){0==a.a&&a.c&&(a.c(),a.c=null)};function F(a){this.a=a||\\\"-\\\"}F.prototype.c=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\\\\W_]+/g,\\\"\\\").toLowerCase());return b.join(this.a)};function G(a,b){this.c=a;this.f=4;this.a=\\\"n\\\";var c=(b||\\\"n4\\\").match(/^([nio])([1-9])$/i);c&&(this.a=c[1],this.f=parseInt(c[2],10))}function fa(a){return H(a)+\\\" \\\"+(a.f+\\\"00\\\")+\\\" 300px \\\"+I(a.c)}function I(a){var b=[];a=a.split(/,\\\\s*/);for(var c=0;c<a.length;c++){var d=a[c].replace(/['\\\"]/g,\\\"\\\");-1!=d.indexOf(\\\" \\\")||/^\\\\d/.test(d)?b.push(\\\"'\\\"+d+\\\"'\\\"):b.push(d)}return b.join(\\\",\\\")}function J(a){return a.a+a.f}function H(a){var b=\\\"normal\\\";\\\"o\\\"===a.a?b=\\\"oblique\\\":\\\"i\\\"===a.a&&(b=\\\"italic\\\");return b}\\nfunction ga(a){var b=4,c=\\\"n\\\",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function ha(a,b){this.c=a;this.f=a.o.document.documentElement;this.h=b;this.a=new F(\\\"-\\\");this.j=!1!==b.events;this.g=!1!==b.classes}function ia(a){a.g&&w(a.f,[a.a.c(\\\"wf\\\",\\\"loading\\\")]);K(a,\\\"loading\\\")}function L(a){if(a.g){var b=y(a.f,a.a.c(\\\"wf\\\",\\\"active\\\")),c=[],d=[a.a.c(\\\"wf\\\",\\\"loading\\\")];b||c.push(a.a.c(\\\"wf\\\",\\\"inactive\\\"));w(a.f,c,d)}K(a,\\\"inactive\\\")}function K(a,b,c){if(a.j&&a.h[b])if(c)a.h[b](c.c,J(c));else a.h[b]()};function ja(){this.c={}}function ka(a,b,c){var d=[],e;for(e in b)if(b.hasOwnProperty(e)){var f=a.c[e];f&&d.push(f(b[e],c))}return d};function M(a,b){this.c=a;this.f=b;this.a=t(this.c,\\\"span\\\",{\\\"aria-hidden\\\":\\\"true\\\"},this.f)}function N(a){u(a.c,\\\"body\\\",a.a)}function O(a){return\\\"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:\\\"+I(a.c)+\\\";\\\"+(\\\"font-style:\\\"+H(a)+\\\";font-weight:\\\"+(a.f+\\\"00\\\")+\\\";\\\")};function P(a,b,c,d,e,f){this.g=a;this.j=b;this.a=d;this.c=c;this.f=e||3E3;this.h=f||void 0}P.prototype.start=function(){var a=this.c.o.document,b=this,c=q(),d=new Promise(function(d,e){function f(){q()-c>=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,d){e=setTimeout(d,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null);b.g(b.a)},function(){b.j(b.a)})};function Q(a,b,c,d,e,f,g){this.v=a;this.B=b;this.c=c;this.a=d;this.s=g||\\\"BESbswy\\\";this.f={};this.w=e||3E3;this.u=f||null;this.m=this.j=this.h=this.g=null;this.g=new M(this.c,this.s);this.h=new M(this.c,this.s);this.j=new M(this.c,this.s);this.m=new M(this.c,this.s);a=new G(this.a.c+\\\",serif\\\",J(this.a));a=O(a);this.g.a.style.cssText=a;a=new G(this.a.c+\\\",sans-serif\\\",J(this.a));a=O(a);this.h.a.style.cssText=a;a=new G(\\\"serif\\\",J(this.a));a=O(a);this.j.a.style.cssText=a;a=new G(\\\"sans-serif\\\",J(this.a));a=\\nO(a);this.m.a.style.cssText=a;N(this.g);N(this.h);N(this.j);N(this.m)}var R={D:\\\"serif\\\",C:\\\"sans-serif\\\"},S=null;function T(){if(null===S){var a=/AppleWebKit\\\\/([0-9]+)(?:\\\\.([0-9]+))/.exec(window.navigator.userAgent);S=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return S}Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f[\\\"sans-serif\\\"]=this.m.a.offsetWidth;this.A=q();U(this)};\\nfunction la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.f[R[d]]&&c===a.f[R[d]])return!0;return!1}function U(a){var b=a.g.a.offsetWidth,c=a.h.a.offsetWidth,d;(d=b===a.f.serif&&c===a.f[\\\"sans-serif\\\"])||(d=T()&&la(a,b,c));d?q()-a.A>=a.w?T()&&la(a,b,c)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):ma(a):V(a,a.v)}function ma(a){setTimeout(p(function(){U(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.m.a);b(this.a)},a),0)};function W(a,b,c){this.c=a;this.a=b;this.f=0;this.m=this.j=!1;this.s=c}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c(\\\"wf\\\",a.c,J(a).toString(),\\\"active\\\")],[b.a.c(\\\"wf\\\",a.c,J(a).toString(),\\\"loading\\\"),b.a.c(\\\"wf\\\",a.c,J(a).toString(),\\\"inactive\\\")]);K(b,\\\"fontactive\\\",a);this.m=!0;na(this)};\\nW.prototype.h=function(a){var b=this.a;if(b.g){var c=y(b.f,b.a.c(\\\"wf\\\",a.c,J(a).toString(),\\\"active\\\")),d=[],e=[b.a.c(\\\"wf\\\",a.c,J(a).toString(),\\\"loading\\\")];c||d.push(b.a.c(\\\"wf\\\",a.c,J(a).toString(),\\\"inactive\\\"));w(b.f,d,e)}K(b,\\\"fontinactive\\\",a);na(this)};function na(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&w(a.f,[a.a.c(\\\"wf\\\",\\\"active\\\")],[a.a.c(\\\"wf\\\",\\\"loading\\\"),a.a.c(\\\"wf\\\",\\\"inactive\\\")]),K(a,\\\"active\\\")):L(a.a))};function oa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}oa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;pa(this,new ha(this.c,a),a)};\\nfunction qa(a,b,c,d,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,m=d||null||{};if(0===c.length&&f)L(b.a);else{b.f+=c.length;f&&(b.j=f);var h,l=[];for(h=0;h<c.length;h++){var k=c[h],n=m[k.c],r=b.a,x=k;r.g&&w(r.f,[r.a.c(\\\"wf\\\",x.c,J(x).toString(),\\\"loading\\\")]);K(r,\\\"fontloading\\\",x);r=null;if(null===X)if(window.FontFace){var x=/Gecko.*Firefox\\\\/(\\\\d+)/.exec(window.navigator.userAgent),xa=/OS X.*Version\\\\/10\\\\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);\\nX=x?42<parseInt(x[1],10):xa?!1:!0}else X=!1;X?r=new P(p(b.g,b),p(b.h,b),b.c,k,b.s,n):r=new Q(p(b.g,b),p(b.h,b),b.c,k,b.s,a,n);l.push(r)}for(h=0;h<l.length;h++)l[h].start()}},0)}function pa(a,b,c){var d=[],e=c.timeout;ia(b);var d=ka(a.a,c,a.c),f=new W(a.c,b,e);a.h=d.length;b=0;for(c=d.length;b<c;b++)d[b].load(function(b,d,c){qa(a,f,b,d,c)})};function ra(a,b){this.c=a;this.a=b}\\nra.prototype.load=function(a){function b(){if(f[\\\"__mti_fntLst\\\"+d]){var c=f[\\\"__mti_fntLst\\\"+d](),e=[],h;if(c)for(var l=0;l<c.length;l++){var k=c[l].fontfamily;void 0!=c[l].fontStyle&&void 0!=c[l].fontWeight?(h=c[l].fontStyle+c[l].fontWeight,e.push(new G(k,h))):e.push(new G(k))}a(e)}else setTimeout(function(){b()},50)}var c=this,d=c.a.projectId,e=c.a.version;if(d){var f=c.c.o;A(this.c,(c.a.api||\\\"https://fast.fonts.net/jsapi\\\")+\\\"/\\\"+d+\\\".js\\\"+(e?\\\"?v=\\\"+e:\\\"\\\"),function(e){e?a([]):(f[\\\"__MonotypeConfiguration__\\\"+\\nd]=function(){return c.a},b())}).id=\\\"__MonotypeAPIScript__\\\"+d}else a([])};function sa(a,b){this.c=a;this.a=b}sa.prototype.load=function(a){var b,c,d=this.a.urls||[],e=this.a.families||[],f=this.a.testStrings||{},g=new B;b=0;for(c=d.length;b<c;b++)z(this.c,d[b],C(g));var m=[];b=0;for(c=e.length;b<c;b++)if(d=e[b].split(\\\":\\\"),d[1])for(var h=d[1].split(\\\",\\\"),l=0;l<h.length;l+=1)m.push(new G(d[0],h[l]));else m.push(new G(d[0]));E(g,function(){a(m,f)})};function ta(a,b){a?this.c=a:this.c=ua;this.a=[];this.f=[];this.g=b||\\\"\\\"}var ua=\\\"https://fonts.googleapis.com/css\\\";function va(a,b){for(var c=b.length,d=0;d<c;d++){var e=b[d].split(\\\":\\\");3==e.length&&a.f.push(e.pop());var f=\\\"\\\";2==e.length&&\\\"\\\"!=e[1]&&(f=\\\":\\\");a.a.push(e.join(f))}}\\nfunction wa(a){if(0==a.a.length)throw Error(\\\"No fonts to load!\\\");if(-1!=a.c.indexOf(\\\"kit=\\\"))return a.c;for(var b=a.a.length,c=[],d=0;d<b;d++)c.push(a.a[d].replace(/ /g,\\\"+\\\"));b=a.c+\\\"?family=\\\"+c.join(\\\"%7C\\\");0<a.f.length&&(b+=\\\"&subset=\\\"+a.f.join(\\\",\\\"));0<a.g.length&&(b+=\\\"&text=\\\"+encodeURIComponent(a.g));return b};function ya(a){this.f=a;this.a=[];this.c={}}\\nvar za={latin:\\\"BESbswy\\\",\\\"latin-ext\\\":\\\"\\\\u00e7\\\\u00f6\\\\u00fc\\\\u011f\\\\u015f\\\",cyrillic:\\\"\\\\u0439\\\\u044f\\\\u0416\\\",greek:\\\"\\\\u03b1\\\\u03b2\\\\u03a3\\\",khmer:\\\"\\\\u1780\\\\u1781\\\\u1782\\\",Hanuman:\\\"\\\\u1780\\\\u1781\\\\u1782\\\"},Aa={thin:\\\"1\\\",extralight:\\\"2\\\",\\\"extra-light\\\":\\\"2\\\",ultralight:\\\"2\\\",\\\"ultra-light\\\":\\\"2\\\",light:\\\"3\\\",regular:\\\"4\\\",book:\\\"4\\\",medium:\\\"5\\\",\\\"semi-bold\\\":\\\"6\\\",semibold:\\\"6\\\",\\\"demi-bold\\\":\\\"6\\\",demibold:\\\"6\\\",bold:\\\"7\\\",\\\"extra-bold\\\":\\\"8\\\",extrabold:\\\"8\\\",\\\"ultra-bold\\\":\\\"8\\\",ultrabold:\\\"8\\\",black:\\\"9\\\",heavy:\\\"9\\\",l:\\\"3\\\",r:\\\"4\\\",b:\\\"7\\\"},Ba={i:\\\"i\\\",italic:\\\"i\\\",n:\\\"n\\\",normal:\\\"n\\\"},\\nCa=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;\\nfunction Da(a){for(var b=a.f.length,c=0;c<b;c++){var d=a.f[c].split(\\\":\\\"),e=d[0].replace(/\\\\+/g,\\\" \\\"),f=[\\\"n4\\\"];if(2<=d.length){var g;var m=d[1];g=[];if(m)for(var m=m.split(\\\",\\\"),h=m.length,l=0;l<h;l++){var k;k=m[l];if(k.match(/^[\\\\w-]+$/)){var n=Ca.exec(k.toLowerCase());if(null==n)k=\\\"\\\";else{k=n[2];k=null==k||\\\"\\\"==k?\\\"n\\\":Ba[k];n=n[1];if(null==n||\\\"\\\"==n)n=\\\"4\\\";else var r=Aa[n],n=r?r:isNaN(n)?\\\"4\\\":n.substr(0,1);k=[k,n].join(\\\"\\\")}}else k=\\\"\\\";k&&g.push(k)}0<g.length&&(f=g);3==d.length&&(d=d[2],g=[],d=d?d.split(\\\",\\\"):\\ng,0<d.length&&(d=za[d[0]])&&(a.c[e]=d))}a.c[e]||(d=za[e])&&(a.c[e]=d);for(d=0;d<f.length;d+=1)a.a.push(new G(e,f[d]))}};function Ea(a,b){this.c=a;this.a=b}var Fa={Arimo:!0,Cousine:!0,Tinos:!0};Ea.prototype.load=function(a){var b=new B,c=this.c,d=new ta(this.a.api,this.a.text),e=this.a.families;va(d,e);var f=new ya(e);Da(f);z(c,wa(d),C(b));E(b,function(){a(f.a,f.c,Fa)})};function Ga(a,b){this.c=a;this.a=b}Ga.prototype.load=function(a){var b=this.a.id,c=this.c.o;b?A(this.c,(this.a.api||\\\"https://use.typekit.net\\\")+\\\"/\\\"+b+\\\".js\\\",function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var e=[],f=0;f<b.length;f+=2)for(var g=b[f],m=b[f+1],h=0;h<m.length;h++)e.push(new G(g,m[h]));try{c.Typekit.load({events:!1,classes:!1,async:!0})}catch(l){}a(e)}},2E3):a([])};function Ha(a,b){this.c=a;this.f=b;this.a=[]}Ha.prototype.load=function(a){var b=this.f.id,c=this.c.o,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,m=c.fonts.length;g<m;++g){var h=c.fonts[g];d.a.push(new G(h.name,ga(\\\"font-weight:\\\"+h.weight+\\\";font-style:\\\"+h.style)))}a(d.a)},A(this.c,(this.f.api||\\\"https://f.fontdeck.com/s/css/js/\\\")+ea(this.c)+\\\"/\\\"+b+\\\".js\\\",function(b){b&&a([])})):a([])};var Y=new oa(window);Y.a.c.custom=function(a,b){return new sa(b,a)};Y.a.c.fontdeck=function(a,b){return new Ha(b,a)};Y.a.c.monotype=function(a,b){return new ra(b,a)};Y.a.c.typekit=function(a,b){return new Ga(b,a)};Y.a.c.google=function(a,b){return new Ea(b,a)};var Z={load:p(Y.load,Y)}; true?!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return Z}).call(exports, __webpack_require__, exports, module),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined;}());\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/webfontloader/webfontloader.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/webpack/buildin/global.js\":\n/*!*************************************************!*\\\n  !*** ../node_modules/webpack/buildin/global.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"var g;\\n\\n// This works in non-strict mode\\ng = (function() {\\n\\treturn this;\\n})();\\n\\ntry {\\n\\t// This works if eval is allowed (see CSP)\\n\\tg = g || new Function(\\\"return this\\\")();\\n} catch (e) {\\n\\t// This works if the window reference is available\\n\\tif (typeof window === \\\"object\\\") g = window;\\n}\\n\\n// g can still be undefined, but nothing to do about it...\\n// We return undefined, instead of nothing here, so it's\\n// easier to handle this case. if(!global) { ...}\\n\\nmodule.exports = g;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/webpack/buildin/global.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/xmldom/dom-parser.js\":\n/*!********************************************!*\\\n  !*** ../node_modules/xmldom/dom-parser.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"function DOMParser(options){\\r\\n\\tthis.options = options ||{locator:{}};\\r\\n\\t\\r\\n}\\r\\nDOMParser.prototype.parseFromString = function(source,mimeType){\\r\\n\\tvar options = this.options;\\r\\n\\tvar sax =  new XMLReader();\\r\\n\\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\\r\\n\\tvar errorHandler = options.errorHandler;\\r\\n\\tvar locator = options.locator;\\r\\n\\tvar defaultNSMap = options.xmlns||{};\\r\\n\\tvar entityMap = {'lt':'<','gt':'>','amp':'&','quot':'\\\"','apos':\\\"'\\\"}\\r\\n\\tif(locator){\\r\\n\\t\\tdomBuilder.setDocumentLocator(locator)\\r\\n\\t}\\r\\n\\t\\r\\n\\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\\r\\n\\tsax.domBuilder = options.domBuilder || domBuilder;\\r\\n\\tif(/\\\\/x?html?$/.test(mimeType)){\\r\\n\\t\\tentityMap.nbsp = '\\\\xa0';\\r\\n\\t\\tentityMap.copy = '\\\\xa9';\\r\\n\\t\\tdefaultNSMap['']= 'http://www.w3.org/1999/xhtml';\\r\\n\\t}\\r\\n\\tdefaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';\\r\\n\\tif(source){\\r\\n\\t\\tsax.parse(source,defaultNSMap,entityMap);\\r\\n\\t}else{\\r\\n\\t\\tsax.errorHandler.error(\\\"invalid doc source\\\");\\r\\n\\t}\\r\\n\\treturn domBuilder.doc;\\r\\n}\\r\\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\\r\\n\\tif(!errorImpl){\\r\\n\\t\\tif(domBuilder instanceof DOMHandler){\\r\\n\\t\\t\\treturn domBuilder;\\r\\n\\t\\t}\\r\\n\\t\\terrorImpl = domBuilder ;\\r\\n\\t}\\r\\n\\tvar errorHandler = {}\\r\\n\\tvar isCallback = errorImpl instanceof Function;\\r\\n\\tlocator = locator||{}\\r\\n\\tfunction build(key){\\r\\n\\t\\tvar fn = errorImpl[key];\\r\\n\\t\\tif(!fn && isCallback){\\r\\n\\t\\t\\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\\r\\n\\t\\t}\\r\\n\\t\\terrorHandler[key] = fn && function(msg){\\r\\n\\t\\t\\tfn('[xmldom '+key+']\\\\t'+msg+_locator(locator));\\r\\n\\t\\t}||function(){};\\r\\n\\t}\\r\\n\\tbuild('warning');\\r\\n\\tbuild('error');\\r\\n\\tbuild('fatalError');\\r\\n\\treturn errorHandler;\\r\\n}\\r\\n\\r\\n//console.log('#\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n####')\\r\\n/**\\r\\n * +ContentHandler+ErrorHandler\\r\\n * +LexicalHandler+EntityResolver2\\r\\n * -DeclHandler-DTDHandler \\r\\n * \\r\\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\\r\\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\\r\\n */\\r\\nfunction DOMHandler() {\\r\\n    this.cdata = false;\\r\\n}\\r\\nfunction position(locator,node){\\r\\n\\tnode.lineNumber = locator.lineNumber;\\r\\n\\tnode.columnNumber = locator.columnNumber;\\r\\n}\\r\\n/**\\r\\n * @see org.xml.sax.ContentHandler#startDocument\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\\r\\n */ \\r\\nDOMHandler.prototype = {\\r\\n\\tstartDocument : function() {\\r\\n    \\tthis.doc = new DOMImplementation().createDocument(null, null, null);\\r\\n    \\tif (this.locator) {\\r\\n        \\tthis.doc.documentURI = this.locator.systemId;\\r\\n    \\t}\\r\\n\\t},\\r\\n\\tstartElement:function(namespaceURI, localName, qName, attrs) {\\r\\n\\t\\tvar doc = this.doc;\\r\\n\\t    var el = doc.createElementNS(namespaceURI, qName||localName);\\r\\n\\t    var len = attrs.length;\\r\\n\\t    appendElement(this, el);\\r\\n\\t    this.currentElement = el;\\r\\n\\t    \\r\\n\\t\\tthis.locator && position(this.locator,el)\\r\\n\\t    for (var i = 0 ; i < len; i++) {\\r\\n\\t        var namespaceURI = attrs.getURI(i);\\r\\n\\t        var value = attrs.getValue(i);\\r\\n\\t        var qName = attrs.getQName(i);\\r\\n\\t\\t\\tvar attr = doc.createAttributeNS(namespaceURI, qName);\\r\\n\\t\\t\\tthis.locator &&position(attrs.getLocator(i),attr);\\r\\n\\t\\t\\tattr.value = attr.nodeValue = value;\\r\\n\\t\\t\\tel.setAttributeNode(attr)\\r\\n\\t    }\\r\\n\\t},\\r\\n\\tendElement:function(namespaceURI, localName, qName) {\\r\\n\\t\\tvar current = this.currentElement\\r\\n\\t\\tvar tagName = current.tagName;\\r\\n\\t\\tthis.currentElement = current.parentNode;\\r\\n\\t},\\r\\n\\tstartPrefixMapping:function(prefix, uri) {\\r\\n\\t},\\r\\n\\tendPrefixMapping:function(prefix) {\\r\\n\\t},\\r\\n\\tprocessingInstruction:function(target, data) {\\r\\n\\t    var ins = this.doc.createProcessingInstruction(target, data);\\r\\n\\t    this.locator && position(this.locator,ins)\\r\\n\\t    appendElement(this, ins);\\r\\n\\t},\\r\\n\\tignorableWhitespace:function(ch, start, length) {\\r\\n\\t},\\r\\n\\tcharacters:function(chars, start, length) {\\r\\n\\t\\tchars = _toString.apply(this,arguments)\\r\\n\\t\\t//console.log(chars)\\r\\n\\t\\tif(chars){\\r\\n\\t\\t\\tif (this.cdata) {\\r\\n\\t\\t\\t\\tvar charNode = this.doc.createCDATASection(chars);\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\tvar charNode = this.doc.createTextNode(chars);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.currentElement){\\r\\n\\t\\t\\t\\tthis.currentElement.appendChild(charNode);\\r\\n\\t\\t\\t}else if(/^\\\\s*$/.test(chars)){\\r\\n\\t\\t\\t\\tthis.doc.appendChild(charNode);\\r\\n\\t\\t\\t\\t//process xml\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.locator && position(this.locator,charNode)\\r\\n\\t\\t}\\r\\n\\t},\\r\\n\\tskippedEntity:function(name) {\\r\\n\\t},\\r\\n\\tendDocument:function() {\\r\\n\\t\\tthis.doc.normalize();\\r\\n\\t},\\r\\n\\tsetDocumentLocator:function (locator) {\\r\\n\\t    if(this.locator = locator){// && !('lineNumber' in locator)){\\r\\n\\t    \\tlocator.lineNumber = 0;\\r\\n\\t    }\\r\\n\\t},\\r\\n\\t//LexicalHandler\\r\\n\\tcomment:function(chars, start, length) {\\r\\n\\t\\tchars = _toString.apply(this,arguments)\\r\\n\\t    var comm = this.doc.createComment(chars);\\r\\n\\t    this.locator && position(this.locator,comm)\\r\\n\\t    appendElement(this, comm);\\r\\n\\t},\\r\\n\\t\\r\\n\\tstartCDATA:function() {\\r\\n\\t    //used in characters() methods\\r\\n\\t    this.cdata = true;\\r\\n\\t},\\r\\n\\tendCDATA:function() {\\r\\n\\t    this.cdata = false;\\r\\n\\t},\\r\\n\\t\\r\\n\\tstartDTD:function(name, publicId, systemId) {\\r\\n\\t\\tvar impl = this.doc.implementation;\\r\\n\\t    if (impl && impl.createDocumentType) {\\r\\n\\t        var dt = impl.createDocumentType(name, publicId, systemId);\\r\\n\\t        this.locator && position(this.locator,dt)\\r\\n\\t        appendElement(this, dt);\\r\\n\\t    }\\r\\n\\t},\\r\\n\\t/**\\r\\n\\t * @see org.xml.sax.ErrorHandler\\r\\n\\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\\r\\n\\t */\\r\\n\\twarning:function(error) {\\r\\n\\t\\tconsole.warn('[xmldom warning]\\\\t'+error,_locator(this.locator));\\r\\n\\t},\\r\\n\\terror:function(error) {\\r\\n\\t\\tconsole.error('[xmldom error]\\\\t'+error,_locator(this.locator));\\r\\n\\t},\\r\\n\\tfatalError:function(error) {\\r\\n\\t\\tconsole.error('[xmldom fatalError]\\\\t'+error,_locator(this.locator));\\r\\n\\t    throw error;\\r\\n\\t}\\r\\n}\\r\\nfunction _locator(l){\\r\\n\\tif(l){\\r\\n\\t\\treturn '\\\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\\r\\n\\t}\\r\\n}\\r\\nfunction _toString(chars,start,length){\\r\\n\\tif(typeof chars == 'string'){\\r\\n\\t\\treturn chars.substr(start,length)\\r\\n\\t}else{//java sax connect width xmldom on rhino(what about: \\\"? && !(chars instanceof String)\\\")\\r\\n\\t\\tif(chars.length >= start+length || start){\\r\\n\\t\\t\\treturn new java.lang.String(chars,start,length)+'';\\r\\n\\t\\t}\\r\\n\\t\\treturn chars;\\r\\n\\t}\\r\\n}\\r\\n\\r\\n/*\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\\r\\n * used method of org.xml.sax.ext.LexicalHandler:\\r\\n *  #comment(chars, start, length)\\r\\n *  #startCDATA()\\r\\n *  #endCDATA()\\r\\n *  #startDTD(name, publicId, systemId)\\r\\n *\\r\\n *\\r\\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\\r\\n *  #endDTD()\\r\\n *  #startEntity(name)\\r\\n *  #endEntity(name)\\r\\n *\\r\\n *\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\\r\\n * IGNORED method of org.xml.sax.ext.DeclHandler\\r\\n * \\t#attributeDecl(eName, aName, type, mode, value)\\r\\n *  #elementDecl(name, model)\\r\\n *  #externalEntityDecl(name, publicId, systemId)\\r\\n *  #internalEntityDecl(name, value)\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\\r\\n * IGNORED method of org.xml.sax.EntityResolver2\\r\\n *  #resolveEntity(String name,String publicId,String baseURI,String systemId)\\r\\n *  #resolveEntity(publicId, systemId)\\r\\n *  #getExternalSubset(name, baseURI)\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\\r\\n * IGNORED method of org.xml.sax.DTDHandler\\r\\n *  #notationDecl(name, publicId, systemId) {};\\r\\n *  #unparsedEntityDecl(name, publicId, systemId, notationName) {};\\r\\n */\\r\\n\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(key){\\r\\n\\tDOMHandler.prototype[key] = function(){return null}\\r\\n})\\r\\n\\r\\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\\r\\nfunction appendElement (hander,node) {\\r\\n    if (!hander.currentElement) {\\r\\n        hander.doc.appendChild(node);\\r\\n    } else {\\r\\n        hander.currentElement.appendChild(node);\\r\\n    }\\r\\n}//appendChild and setAttributeNS are preformance key\\r\\n\\r\\n//if(typeof require == 'function'){\\r\\n\\tvar XMLReader = __webpack_require__(/*! ./sax */ \\\"../node_modules/xmldom/sax.js\\\").XMLReader;\\r\\n\\tvar DOMImplementation = exports.DOMImplementation = __webpack_require__(/*! ./dom */ \\\"../node_modules/xmldom/dom.js\\\").DOMImplementation;\\r\\n\\texports.XMLSerializer = __webpack_require__(/*! ./dom */ \\\"../node_modules/xmldom/dom.js\\\").XMLSerializer ;\\r\\n\\texports.DOMParser = DOMParser;\\r\\n//}\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/xmldom/dom-parser.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/xmldom/dom.js\":\n/*!*************************************!*\\\n  !*** ../node_modules/xmldom/dom.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/*\\n * DOM Level 2\\n * Object DOMException\\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\\n */\\n\\nfunction copy(src,dest){\\n\\tfor(var p in src){\\n\\t\\tdest[p] = src[p];\\n\\t}\\n}\\n/**\\n^\\\\w+\\\\.prototype\\\\.([_\\\\w]+)\\\\s*=\\\\s*((?:.*\\\\{\\\\s*?[\\\\r\\\\n][\\\\s\\\\S]*?^})|\\\\S.*?(?=[;\\\\r\\\\n]));?\\n^\\\\w+\\\\.prototype\\\\.([_\\\\w]+)\\\\s*=\\\\s*(\\\\S.*?(?=[;\\\\r\\\\n]));?\\n */\\nfunction _extends(Class,Super){\\n\\tvar pt = Class.prototype;\\n\\tif(Object.create){\\n\\t\\tvar ppt = Object.create(Super.prototype)\\n\\t\\tpt.__proto__ = ppt;\\n\\t}\\n\\tif(!(pt instanceof Super)){\\n\\t\\tfunction t(){};\\n\\t\\tt.prototype = Super.prototype;\\n\\t\\tt = new t();\\n\\t\\tcopy(pt,t);\\n\\t\\tClass.prototype = pt = t;\\n\\t}\\n\\tif(pt.constructor != Class){\\n\\t\\tif(typeof Class != 'function'){\\n\\t\\t\\tconsole.error(\\\"unknow Class:\\\"+Class)\\n\\t\\t}\\n\\t\\tpt.constructor = Class\\n\\t}\\n}\\nvar htmlns = 'http://www.w3.org/1999/xhtml' ;\\n// Node Types\\nvar NodeType = {}\\nvar ELEMENT_NODE                = NodeType.ELEMENT_NODE                = 1;\\nvar ATTRIBUTE_NODE              = NodeType.ATTRIBUTE_NODE              = 2;\\nvar TEXT_NODE                   = NodeType.TEXT_NODE                   = 3;\\nvar CDATA_SECTION_NODE          = NodeType.CDATA_SECTION_NODE          = 4;\\nvar ENTITY_REFERENCE_NODE       = NodeType.ENTITY_REFERENCE_NODE       = 5;\\nvar ENTITY_NODE                 = NodeType.ENTITY_NODE                 = 6;\\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\\nvar COMMENT_NODE                = NodeType.COMMENT_NODE                = 8;\\nvar DOCUMENT_NODE               = NodeType.DOCUMENT_NODE               = 9;\\nvar DOCUMENT_TYPE_NODE          = NodeType.DOCUMENT_TYPE_NODE          = 10;\\nvar DOCUMENT_FRAGMENT_NODE      = NodeType.DOCUMENT_FRAGMENT_NODE      = 11;\\nvar NOTATION_NODE               = NodeType.NOTATION_NODE               = 12;\\n\\n// ExceptionCode\\nvar ExceptionCode = {}\\nvar ExceptionMessage = {};\\nvar INDEX_SIZE_ERR              = ExceptionCode.INDEX_SIZE_ERR              = ((ExceptionMessage[1]=\\\"Index size error\\\"),1);\\nvar DOMSTRING_SIZE_ERR          = ExceptionCode.DOMSTRING_SIZE_ERR          = ((ExceptionMessage[2]=\\\"DOMString size error\\\"),2);\\nvar HIERARCHY_REQUEST_ERR       = ExceptionCode.HIERARCHY_REQUEST_ERR       = ((ExceptionMessage[3]=\\\"Hierarchy request error\\\"),3);\\nvar WRONG_DOCUMENT_ERR          = ExceptionCode.WRONG_DOCUMENT_ERR          = ((ExceptionMessage[4]=\\\"Wrong document\\\"),4);\\nvar INVALID_CHARACTER_ERR       = ExceptionCode.INVALID_CHARACTER_ERR       = ((ExceptionMessage[5]=\\\"Invalid character\\\"),5);\\nvar NO_DATA_ALLOWED_ERR         = ExceptionCode.NO_DATA_ALLOWED_ERR         = ((ExceptionMessage[6]=\\\"No data allowed\\\"),6);\\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\\\"No modification allowed\\\"),7);\\nvar NOT_FOUND_ERR               = ExceptionCode.NOT_FOUND_ERR               = ((ExceptionMessage[8]=\\\"Not found\\\"),8);\\nvar NOT_SUPPORTED_ERR           = ExceptionCode.NOT_SUPPORTED_ERR           = ((ExceptionMessage[9]=\\\"Not supported\\\"),9);\\nvar INUSE_ATTRIBUTE_ERR         = ExceptionCode.INUSE_ATTRIBUTE_ERR         = ((ExceptionMessage[10]=\\\"Attribute in use\\\"),10);\\n//level2\\nvar INVALID_STATE_ERR        \\t= ExceptionCode.INVALID_STATE_ERR        \\t= ((ExceptionMessage[11]=\\\"Invalid state\\\"),11);\\nvar SYNTAX_ERR               \\t= ExceptionCode.SYNTAX_ERR               \\t= ((ExceptionMessage[12]=\\\"Syntax error\\\"),12);\\nvar INVALID_MODIFICATION_ERR \\t= ExceptionCode.INVALID_MODIFICATION_ERR \\t= ((ExceptionMessage[13]=\\\"Invalid modification\\\"),13);\\nvar NAMESPACE_ERR            \\t= ExceptionCode.NAMESPACE_ERR           \\t= ((ExceptionMessage[14]=\\\"Invalid namespace\\\"),14);\\nvar INVALID_ACCESS_ERR       \\t= ExceptionCode.INVALID_ACCESS_ERR      \\t= ((ExceptionMessage[15]=\\\"Invalid access\\\"),15);\\n\\n\\nfunction DOMException(code, message) {\\n\\tif(message instanceof Error){\\n\\t\\tvar error = message;\\n\\t}else{\\n\\t\\terror = this;\\n\\t\\tError.call(this, ExceptionMessage[code]);\\n\\t\\tthis.message = ExceptionMessage[code];\\n\\t\\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\\n\\t}\\n\\terror.code = code;\\n\\tif(message) this.message = this.message + \\\": \\\" + message;\\n\\treturn error;\\n};\\nDOMException.prototype = Error.prototype;\\ncopy(ExceptionCode,DOMException)\\n/**\\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\\n * The items in the NodeList are accessible via an integral index, starting from 0.\\n */\\nfunction NodeList() {\\n};\\nNodeList.prototype = {\\n\\t/**\\n\\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\\n\\t * @standard level1\\n\\t */\\n\\tlength:0, \\n\\t/**\\n\\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\\n\\t * @standard level1\\n\\t * @param index  unsigned long \\n\\t *   Index into the collection.\\n\\t * @return Node\\n\\t * \\tThe node at the indexth position in the NodeList, or null if that is not a valid index. \\n\\t */\\n\\titem: function(index) {\\n\\t\\treturn this[index] || null;\\n\\t},\\n\\ttoString:function(isHTML,nodeFilter){\\n\\t\\tfor(var buf = [], i = 0;i<this.length;i++){\\n\\t\\t\\tserializeToString(this[i],buf,isHTML,nodeFilter);\\n\\t\\t}\\n\\t\\treturn buf.join('');\\n\\t}\\n};\\nfunction LiveNodeList(node,refresh){\\n\\tthis._node = node;\\n\\tthis._refresh = refresh\\n\\t_updateLiveList(this);\\n}\\nfunction _updateLiveList(list){\\n\\tvar inc = list._node._inc || list._node.ownerDocument._inc;\\n\\tif(list._inc != inc){\\n\\t\\tvar ls = list._refresh(list._node);\\n\\t\\t//console.log(ls.length)\\n\\t\\t__set__(list,'length',ls.length);\\n\\t\\tcopy(ls,list);\\n\\t\\tlist._inc = inc;\\n\\t}\\n}\\nLiveNodeList.prototype.item = function(i){\\n\\t_updateLiveList(this);\\n\\treturn this[i];\\n}\\n\\n_extends(LiveNodeList,NodeList);\\n/**\\n * \\n * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.\\n * NamedNodeMap objects in the DOM are live.\\n * used for attributes or DocumentType entities \\n */\\nfunction NamedNodeMap() {\\n};\\n\\nfunction _findNodeIndex(list,node){\\n\\tvar i = list.length;\\n\\twhile(i--){\\n\\t\\tif(list[i] === node){return i}\\n\\t}\\n}\\n\\nfunction _addNamedNode(el,list,newAttr,oldAttr){\\n\\tif(oldAttr){\\n\\t\\tlist[_findNodeIndex(list,oldAttr)] = newAttr;\\n\\t}else{\\n\\t\\tlist[list.length++] = newAttr;\\n\\t}\\n\\tif(el){\\n\\t\\tnewAttr.ownerElement = el;\\n\\t\\tvar doc = el.ownerDocument;\\n\\t\\tif(doc){\\n\\t\\t\\toldAttr && _onRemoveAttribute(doc,el,oldAttr);\\n\\t\\t\\t_onAddAttribute(doc,el,newAttr);\\n\\t\\t}\\n\\t}\\n}\\nfunction _removeNamedNode(el,list,attr){\\n\\t//console.log('remove attr:'+attr)\\n\\tvar i = _findNodeIndex(list,attr);\\n\\tif(i>=0){\\n\\t\\tvar lastIndex = list.length-1\\n\\t\\twhile(i<lastIndex){\\n\\t\\t\\tlist[i] = list[++i]\\n\\t\\t}\\n\\t\\tlist.length = lastIndex;\\n\\t\\tif(el){\\n\\t\\t\\tvar doc = el.ownerDocument;\\n\\t\\t\\tif(doc){\\n\\t\\t\\t\\t_onRemoveAttribute(doc,el,attr);\\n\\t\\t\\t\\tattr.ownerElement = null;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}else{\\n\\t\\tthrow DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))\\n\\t}\\n}\\nNamedNodeMap.prototype = {\\n\\tlength:0,\\n\\titem:NodeList.prototype.item,\\n\\tgetNamedItem: function(key) {\\n//\\t\\tif(key.indexOf(':')>0 || key == 'xmlns'){\\n//\\t\\t\\treturn null;\\n//\\t\\t}\\n\\t\\t//console.log()\\n\\t\\tvar i = this.length;\\n\\t\\twhile(i--){\\n\\t\\t\\tvar attr = this[i];\\n\\t\\t\\t//console.log(attr.nodeName,key)\\n\\t\\t\\tif(attr.nodeName == key){\\n\\t\\t\\t\\treturn attr;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n\\tsetNamedItem: function(attr) {\\n\\t\\tvar el = attr.ownerElement;\\n\\t\\tif(el && el!=this._ownerElement){\\n\\t\\t\\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\\n\\t\\t}\\n\\t\\tvar oldAttr = this.getNamedItem(attr.nodeName);\\n\\t\\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\\n\\t\\treturn oldAttr;\\n\\t},\\n\\t/* returns Node */\\n\\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\\n\\t\\tvar el = attr.ownerElement, oldAttr;\\n\\t\\tif(el && el!=this._ownerElement){\\n\\t\\t\\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\\n\\t\\t}\\n\\t\\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\\n\\t\\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\\n\\t\\treturn oldAttr;\\n\\t},\\n\\n\\t/* returns Node */\\n\\tremoveNamedItem: function(key) {\\n\\t\\tvar attr = this.getNamedItem(key);\\n\\t\\t_removeNamedNode(this._ownerElement,this,attr);\\n\\t\\treturn attr;\\n\\t\\t\\n\\t\\t\\n\\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\\n\\t\\n\\t//for level2\\n\\tremoveNamedItemNS:function(namespaceURI,localName){\\n\\t\\tvar attr = this.getNamedItemNS(namespaceURI,localName);\\n\\t\\t_removeNamedNode(this._ownerElement,this,attr);\\n\\t\\treturn attr;\\n\\t},\\n\\tgetNamedItemNS: function(namespaceURI, localName) {\\n\\t\\tvar i = this.length;\\n\\t\\twhile(i--){\\n\\t\\t\\tvar node = this[i];\\n\\t\\t\\tif(node.localName == localName && node.namespaceURI == namespaceURI){\\n\\t\\t\\t\\treturn node;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn null;\\n\\t}\\n};\\n/**\\n * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490\\n */\\nfunction DOMImplementation(/* Object */ features) {\\n\\tthis._features = {};\\n\\tif (features) {\\n\\t\\tfor (var feature in features) {\\n\\t\\t\\t this._features = features[feature];\\n\\t\\t}\\n\\t}\\n};\\n\\nDOMImplementation.prototype = {\\n\\thasFeature: function(/* string */ feature, /* string */ version) {\\n\\t\\tvar versions = this._features[feature.toLowerCase()];\\n\\t\\tif (versions && (!version || version in versions)) {\\n\\t\\t\\treturn true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateDocument:function(namespaceURI,  qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR\\n\\t\\tvar doc = new Document();\\n\\t\\tdoc.implementation = this;\\n\\t\\tdoc.childNodes = new NodeList();\\n\\t\\tdoc.doctype = doctype;\\n\\t\\tif(doctype){\\n\\t\\t\\tdoc.appendChild(doctype);\\n\\t\\t}\\n\\t\\tif(qualifiedName){\\n\\t\\t\\tvar root = doc.createElementNS(namespaceURI,qualifiedName);\\n\\t\\t\\tdoc.appendChild(root);\\n\\t\\t}\\n\\t\\treturn doc;\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR\\n\\t\\tvar node = new DocumentType();\\n\\t\\tnode.name = qualifiedName;\\n\\t\\tnode.nodeName = qualifiedName;\\n\\t\\tnode.publicId = publicId;\\n\\t\\tnode.systemId = systemId;\\n\\t\\t// Introduced in DOM Level 2:\\n\\t\\t//readonly attribute DOMString        internalSubset;\\n\\t\\t\\n\\t\\t//TODO:..\\n\\t\\t//  readonly attribute NamedNodeMap     entities;\\n\\t\\t//  readonly attribute NamedNodeMap     notations;\\n\\t\\treturn node;\\n\\t}\\n};\\n\\n\\n/**\\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\\n */\\n\\nfunction Node() {\\n};\\n\\nNode.prototype = {\\n\\tfirstChild : null,\\n\\tlastChild : null,\\n\\tpreviousSibling : null,\\n\\tnextSibling : null,\\n\\tattributes : null,\\n\\tparentNode : null,\\n\\tchildNodes : null,\\n\\townerDocument : null,\\n\\tnodeValue : null,\\n\\tnamespaceURI : null,\\n\\tprefix : null,\\n\\tlocalName : null,\\n\\t// Modified in DOM Level 2:\\n\\tinsertBefore:function(newChild, refChild){//raises \\n\\t\\treturn _insertBefore(this,newChild,refChild);\\n\\t},\\n\\treplaceChild:function(newChild, oldChild){//raises \\n\\t\\tthis.insertBefore(newChild,oldChild);\\n\\t\\tif(oldChild){\\n\\t\\t\\tthis.removeChild(oldChild);\\n\\t\\t}\\n\\t},\\n\\tremoveChild:function(oldChild){\\n\\t\\treturn _removeChild(this,oldChild);\\n\\t},\\n\\tappendChild:function(newChild){\\n\\t\\treturn this.insertBefore(newChild,null);\\n\\t},\\n\\thasChildNodes:function(){\\n\\t\\treturn this.firstChild != null;\\n\\t},\\n\\tcloneNode:function(deep){\\n\\t\\treturn cloneNode(this.ownerDocument||this,this,deep);\\n\\t},\\n\\t// Modified in DOM Level 2:\\n\\tnormalize:function(){\\n\\t\\tvar child = this.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tvar next = child.nextSibling;\\n\\t\\t\\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\\n\\t\\t\\t\\tthis.removeChild(next);\\n\\t\\t\\t\\tchild.appendData(next.data);\\n\\t\\t\\t}else{\\n\\t\\t\\t\\tchild.normalize();\\n\\t\\t\\t\\tchild = next;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n  \\t// Introduced in DOM Level 2:\\n\\tisSupported:function(feature, version){\\n\\t\\treturn this.ownerDocument.implementation.hasFeature(feature,version);\\n\\t},\\n    // Introduced in DOM Level 2:\\n    hasAttributes:function(){\\n    \\treturn this.attributes.length>0;\\n    },\\n    lookupPrefix:function(namespaceURI){\\n    \\tvar el = this;\\n    \\twhile(el){\\n    \\t\\tvar map = el._nsMap;\\n    \\t\\t//console.dir(map)\\n    \\t\\tif(map){\\n    \\t\\t\\tfor(var n in map){\\n    \\t\\t\\t\\tif(map[n] == namespaceURI){\\n    \\t\\t\\t\\t\\treturn n;\\n    \\t\\t\\t\\t}\\n    \\t\\t\\t}\\n    \\t\\t}\\n    \\t\\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\\n    \\t}\\n    \\treturn null;\\n    },\\n    // Introduced in DOM Level 3:\\n    lookupNamespaceURI:function(prefix){\\n    \\tvar el = this;\\n    \\twhile(el){\\n    \\t\\tvar map = el._nsMap;\\n    \\t\\t//console.dir(map)\\n    \\t\\tif(map){\\n    \\t\\t\\tif(prefix in map){\\n    \\t\\t\\t\\treturn map[prefix] ;\\n    \\t\\t\\t}\\n    \\t\\t}\\n    \\t\\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\\n    \\t}\\n    \\treturn null;\\n    },\\n    // Introduced in DOM Level 3:\\n    isDefaultNamespace:function(namespaceURI){\\n    \\tvar prefix = this.lookupPrefix(namespaceURI);\\n    \\treturn prefix == null;\\n    }\\n};\\n\\n\\nfunction _xmlEncoder(c){\\n\\treturn c == '<' && '&lt;' ||\\n         c == '>' && '&gt;' ||\\n         c == '&' && '&amp;' ||\\n         c == '\\\"' && '&quot;' ||\\n         '&#'+c.charCodeAt()+';'\\n}\\n\\n\\ncopy(NodeType,Node);\\ncopy(NodeType,Node.prototype);\\n\\n/**\\n * @param callback return true for continue,false for break\\n * @return boolean true: break visit;\\n */\\nfunction _visitNode(node,callback){\\n\\tif(callback(node)){\\n\\t\\treturn true;\\n\\t}\\n\\tif(node = node.firstChild){\\n\\t\\tdo{\\n\\t\\t\\tif(_visitNode(node,callback)){return true}\\n        }while(node=node.nextSibling)\\n    }\\n}\\n\\n\\n\\nfunction Document(){\\n}\\nfunction _onAddAttribute(doc,el,newAttr){\\n\\tdoc && doc._inc++;\\n\\tvar ns = newAttr.namespaceURI ;\\n\\tif(ns == 'http://www.w3.org/2000/xmlns/'){\\n\\t\\t//update namespace\\n\\t\\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\\n\\t}\\n}\\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\\n\\tdoc && doc._inc++;\\n\\tvar ns = newAttr.namespaceURI ;\\n\\tif(ns == 'http://www.w3.org/2000/xmlns/'){\\n\\t\\t//update namespace\\n\\t\\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\\n\\t}\\n}\\nfunction _onUpdateChild(doc,el,newChild){\\n\\tif(doc && doc._inc){\\n\\t\\tdoc._inc++;\\n\\t\\t//update childNodes\\n\\t\\tvar cs = el.childNodes;\\n\\t\\tif(newChild){\\n\\t\\t\\tcs[cs.length++] = newChild;\\n\\t\\t}else{\\n\\t\\t\\t//console.log(1)\\n\\t\\t\\tvar child = el.firstChild;\\n\\t\\t\\tvar i = 0;\\n\\t\\t\\twhile(child){\\n\\t\\t\\t\\tcs[i++] = child;\\n\\t\\t\\t\\tchild =child.nextSibling;\\n\\t\\t\\t}\\n\\t\\t\\tcs.length = i;\\n\\t\\t}\\n\\t}\\n}\\n\\n/**\\n * attributes;\\n * children;\\n * \\n * writeable properties:\\n * nodeValue,Attr:value,CharacterData:data\\n * prefix\\n */\\nfunction _removeChild(parentNode,child){\\n\\tvar previous = child.previousSibling;\\n\\tvar next = child.nextSibling;\\n\\tif(previous){\\n\\t\\tprevious.nextSibling = next;\\n\\t}else{\\n\\t\\tparentNode.firstChild = next\\n\\t}\\n\\tif(next){\\n\\t\\tnext.previousSibling = previous;\\n\\t}else{\\n\\t\\tparentNode.lastChild = previous;\\n\\t}\\n\\t_onUpdateChild(parentNode.ownerDocument,parentNode);\\n\\treturn child;\\n}\\n/**\\n * preformance key(refChild == null)\\n */\\nfunction _insertBefore(parentNode,newChild,nextChild){\\n\\tvar cp = newChild.parentNode;\\n\\tif(cp){\\n\\t\\tcp.removeChild(newChild);//remove and update\\n\\t}\\n\\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\\n\\t\\tvar newFirst = newChild.firstChild;\\n\\t\\tif (newFirst == null) {\\n\\t\\t\\treturn newChild;\\n\\t\\t}\\n\\t\\tvar newLast = newChild.lastChild;\\n\\t}else{\\n\\t\\tnewFirst = newLast = newChild;\\n\\t}\\n\\tvar pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;\\n\\n\\tnewFirst.previousSibling = pre;\\n\\tnewLast.nextSibling = nextChild;\\n\\t\\n\\t\\n\\tif(pre){\\n\\t\\tpre.nextSibling = newFirst;\\n\\t}else{\\n\\t\\tparentNode.firstChild = newFirst;\\n\\t}\\n\\tif(nextChild == null){\\n\\t\\tparentNode.lastChild = newLast;\\n\\t}else{\\n\\t\\tnextChild.previousSibling = newLast;\\n\\t}\\n\\tdo{\\n\\t\\tnewFirst.parentNode = parentNode;\\n\\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\\n\\t_onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);\\n\\t//console.log(parentNode.lastChild.nextSibling == null)\\n\\tif (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {\\n\\t\\tnewChild.firstChild = newChild.lastChild = null;\\n\\t}\\n\\treturn newChild;\\n}\\nfunction _appendSingleChild(parentNode,newChild){\\n\\tvar cp = newChild.parentNode;\\n\\tif(cp){\\n\\t\\tvar pre = parentNode.lastChild;\\n\\t\\tcp.removeChild(newChild);//remove and update\\n\\t\\tvar pre = parentNode.lastChild;\\n\\t}\\n\\tvar pre = parentNode.lastChild;\\n\\tnewChild.parentNode = parentNode;\\n\\tnewChild.previousSibling = pre;\\n\\tnewChild.nextSibling = null;\\n\\tif(pre){\\n\\t\\tpre.nextSibling = newChild;\\n\\t}else{\\n\\t\\tparentNode.firstChild = newChild;\\n\\t}\\n\\tparentNode.lastChild = newChild;\\n\\t_onUpdateChild(parentNode.ownerDocument,parentNode,newChild);\\n\\treturn newChild;\\n\\t//console.log(\\\"__aa\\\",parentNode.lastChild.nextSibling == null)\\n}\\nDocument.prototype = {\\n\\t//implementation : null,\\n\\tnodeName :  '#document',\\n\\tnodeType :  DOCUMENT_NODE,\\n\\tdoctype :  null,\\n\\tdocumentElement :  null,\\n\\t_inc : 1,\\n\\t\\n\\tinsertBefore :  function(newChild, refChild){//raises \\n\\t\\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\\n\\t\\t\\tvar child = newChild.firstChild;\\n\\t\\t\\twhile(child){\\n\\t\\t\\t\\tvar next = child.nextSibling;\\n\\t\\t\\t\\tthis.insertBefore(child,refChild);\\n\\t\\t\\t\\tchild = next;\\n\\t\\t\\t}\\n\\t\\t\\treturn newChild;\\n\\t\\t}\\n\\t\\tif(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){\\n\\t\\t\\tthis.documentElement = newChild;\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;\\n\\t},\\n\\tremoveChild :  function(oldChild){\\n\\t\\tif(this.documentElement == oldChild){\\n\\t\\t\\tthis.documentElement = null;\\n\\t\\t}\\n\\t\\treturn _removeChild(this,oldChild);\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\timportNode : function(importedNode,deep){\\n\\t\\treturn importNode(this,importedNode,deep);\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tgetElementById :\\tfunction(id){\\n\\t\\tvar rtv = null;\\n\\t\\t_visitNode(this.documentElement,function(node){\\n\\t\\t\\tif(node.nodeType == ELEMENT_NODE){\\n\\t\\t\\t\\tif(node.getAttribute('id') == id){\\n\\t\\t\\t\\t\\trtv = node;\\n\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t})\\n\\t\\treturn rtv;\\n\\t},\\n\\t\\n\\t//document factory method:\\n\\tcreateElement :\\tfunction(tagName){\\n\\t\\tvar node = new Element();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.nodeName = tagName;\\n\\t\\tnode.tagName = tagName;\\n\\t\\tnode.childNodes = new NodeList();\\n\\t\\tvar attrs\\t= node.attributes = new NamedNodeMap();\\n\\t\\tattrs._ownerElement = node;\\n\\t\\treturn node;\\n\\t},\\n\\tcreateDocumentFragment :\\tfunction(){\\n\\t\\tvar node = new DocumentFragment();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.childNodes = new NodeList();\\n\\t\\treturn node;\\n\\t},\\n\\tcreateTextNode :\\tfunction(data){\\n\\t\\tvar node = new Text();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.appendData(data)\\n\\t\\treturn node;\\n\\t},\\n\\tcreateComment :\\tfunction(data){\\n\\t\\tvar node = new Comment();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.appendData(data)\\n\\t\\treturn node;\\n\\t},\\n\\tcreateCDATASection :\\tfunction(data){\\n\\t\\tvar node = new CDATASection();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.appendData(data)\\n\\t\\treturn node;\\n\\t},\\n\\tcreateProcessingInstruction :\\tfunction(target,data){\\n\\t\\tvar node = new ProcessingInstruction();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.tagName = node.target = target;\\n\\t\\tnode.nodeValue= node.data = data;\\n\\t\\treturn node;\\n\\t},\\n\\tcreateAttribute :\\tfunction(name){\\n\\t\\tvar node = new Attr();\\n\\t\\tnode.ownerDocument\\t= this;\\n\\t\\tnode.name = name;\\n\\t\\tnode.nodeName\\t= name;\\n\\t\\tnode.localName = name;\\n\\t\\tnode.specified = true;\\n\\t\\treturn node;\\n\\t},\\n\\tcreateEntityReference :\\tfunction(name){\\n\\t\\tvar node = new EntityReference();\\n\\t\\tnode.ownerDocument\\t= this;\\n\\t\\tnode.nodeName\\t= name;\\n\\t\\treturn node;\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateElementNS :\\tfunction(namespaceURI,qualifiedName){\\n\\t\\tvar node = new Element();\\n\\t\\tvar pl = qualifiedName.split(':');\\n\\t\\tvar attrs\\t= node.attributes = new NamedNodeMap();\\n\\t\\tnode.childNodes = new NodeList();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.nodeName = qualifiedName;\\n\\t\\tnode.tagName = qualifiedName;\\n\\t\\tnode.namespaceURI = namespaceURI;\\n\\t\\tif(pl.length == 2){\\n\\t\\t\\tnode.prefix = pl[0];\\n\\t\\t\\tnode.localName = pl[1];\\n\\t\\t}else{\\n\\t\\t\\t//el.prefix = null;\\n\\t\\t\\tnode.localName = qualifiedName;\\n\\t\\t}\\n\\t\\tattrs._ownerElement = node;\\n\\t\\treturn node;\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateAttributeNS :\\tfunction(namespaceURI,qualifiedName){\\n\\t\\tvar node = new Attr();\\n\\t\\tvar pl = qualifiedName.split(':');\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.nodeName = qualifiedName;\\n\\t\\tnode.name = qualifiedName;\\n\\t\\tnode.namespaceURI = namespaceURI;\\n\\t\\tnode.specified = true;\\n\\t\\tif(pl.length == 2){\\n\\t\\t\\tnode.prefix = pl[0];\\n\\t\\t\\tnode.localName = pl[1];\\n\\t\\t}else{\\n\\t\\t\\t//el.prefix = null;\\n\\t\\t\\tnode.localName = qualifiedName;\\n\\t\\t}\\n\\t\\treturn node;\\n\\t}\\n};\\n_extends(Document,Node);\\n\\n\\nfunction Element() {\\n\\tthis._nsMap = {};\\n};\\nElement.prototype = {\\n\\tnodeType : ELEMENT_NODE,\\n\\thasAttribute : function(name){\\n\\t\\treturn this.getAttributeNode(name)!=null;\\n\\t},\\n\\tgetAttribute : function(name){\\n\\t\\tvar attr = this.getAttributeNode(name);\\n\\t\\treturn attr && attr.value || '';\\n\\t},\\n\\tgetAttributeNode : function(name){\\n\\t\\treturn this.attributes.getNamedItem(name);\\n\\t},\\n\\tsetAttribute : function(name, value){\\n\\t\\tvar attr = this.ownerDocument.createAttribute(name);\\n\\t\\tattr.value = attr.nodeValue = \\\"\\\" + value;\\n\\t\\tthis.setAttributeNode(attr)\\n\\t},\\n\\tremoveAttribute : function(name){\\n\\t\\tvar attr = this.getAttributeNode(name)\\n\\t\\tattr && this.removeAttributeNode(attr);\\n\\t},\\n\\t\\n\\t//four real opeartion method\\n\\tappendChild:function(newChild){\\n\\t\\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\\n\\t\\t\\treturn this.insertBefore(newChild,null);\\n\\t\\t}else{\\n\\t\\t\\treturn _appendSingleChild(this,newChild);\\n\\t\\t}\\n\\t},\\n\\tsetAttributeNode : function(newAttr){\\n\\t\\treturn this.attributes.setNamedItem(newAttr);\\n\\t},\\n\\tsetAttributeNodeNS : function(newAttr){\\n\\t\\treturn this.attributes.setNamedItemNS(newAttr);\\n\\t},\\n\\tremoveAttributeNode : function(oldAttr){\\n\\t\\t//console.log(this == oldAttr.ownerElement)\\n\\t\\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\\n\\t},\\n\\t//get real attribute name,and remove it by removeAttributeNode\\n\\tremoveAttributeNS : function(namespaceURI, localName){\\n\\t\\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\\n\\t\\told && this.removeAttributeNode(old);\\n\\t},\\n\\t\\n\\thasAttributeNS : function(namespaceURI, localName){\\n\\t\\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\\n\\t},\\n\\tgetAttributeNS : function(namespaceURI, localName){\\n\\t\\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\\n\\t\\treturn attr && attr.value || '';\\n\\t},\\n\\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\\n\\t\\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\\n\\t\\tattr.value = attr.nodeValue = \\\"\\\" + value;\\n\\t\\tthis.setAttributeNode(attr)\\n\\t},\\n\\tgetAttributeNodeNS : function(namespaceURI, localName){\\n\\t\\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\\n\\t},\\n\\t\\n\\tgetElementsByTagName : function(tagName){\\n\\t\\treturn new LiveNodeList(this,function(base){\\n\\t\\t\\tvar ls = [];\\n\\t\\t\\t_visitNode(base,function(node){\\n\\t\\t\\t\\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\\n\\t\\t\\t\\t\\tls.push(node);\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\t\\t\\treturn ls;\\n\\t\\t});\\n\\t},\\n\\tgetElementsByTagNameNS : function(namespaceURI, localName){\\n\\t\\treturn new LiveNodeList(this,function(base){\\n\\t\\t\\tvar ls = [];\\n\\t\\t\\t_visitNode(base,function(node){\\n\\t\\t\\t\\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\\n\\t\\t\\t\\t\\tls.push(node);\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\t\\t\\treturn ls;\\n\\t\\t\\t\\n\\t\\t});\\n\\t}\\n};\\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\\n\\n\\n_extends(Element,Node);\\nfunction Attr() {\\n};\\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\\n_extends(Attr,Node);\\n\\n\\nfunction CharacterData() {\\n};\\nCharacterData.prototype = {\\n\\tdata : '',\\n\\tsubstringData : function(offset, count) {\\n\\t\\treturn this.data.substring(offset, offset+count);\\n\\t},\\n\\tappendData: function(text) {\\n\\t\\ttext = this.data+text;\\n\\t\\tthis.nodeValue = this.data = text;\\n\\t\\tthis.length = text.length;\\n\\t},\\n\\tinsertData: function(offset,text) {\\n\\t\\tthis.replaceData(offset,0,text);\\n\\t\\n\\t},\\n\\tappendChild:function(newChild){\\n\\t\\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\\n\\t},\\n\\tdeleteData: function(offset, count) {\\n\\t\\tthis.replaceData(offset,count,\\\"\\\");\\n\\t},\\n\\treplaceData: function(offset, count, text) {\\n\\t\\tvar start = this.data.substring(0,offset);\\n\\t\\tvar end = this.data.substring(offset+count);\\n\\t\\ttext = start + text + end;\\n\\t\\tthis.nodeValue = this.data = text;\\n\\t\\tthis.length = text.length;\\n\\t}\\n}\\n_extends(CharacterData,Node);\\nfunction Text() {\\n};\\nText.prototype = {\\n\\tnodeName : \\\"#text\\\",\\n\\tnodeType : TEXT_NODE,\\n\\tsplitText : function(offset) {\\n\\t\\tvar text = this.data;\\n\\t\\tvar newText = text.substring(offset);\\n\\t\\ttext = text.substring(0, offset);\\n\\t\\tthis.data = this.nodeValue = text;\\n\\t\\tthis.length = text.length;\\n\\t\\tvar newNode = this.ownerDocument.createTextNode(newText);\\n\\t\\tif(this.parentNode){\\n\\t\\t\\tthis.parentNode.insertBefore(newNode, this.nextSibling);\\n\\t\\t}\\n\\t\\treturn newNode;\\n\\t}\\n}\\n_extends(Text,CharacterData);\\nfunction Comment() {\\n};\\nComment.prototype = {\\n\\tnodeName : \\\"#comment\\\",\\n\\tnodeType : COMMENT_NODE\\n}\\n_extends(Comment,CharacterData);\\n\\nfunction CDATASection() {\\n};\\nCDATASection.prototype = {\\n\\tnodeName : \\\"#cdata-section\\\",\\n\\tnodeType : CDATA_SECTION_NODE\\n}\\n_extends(CDATASection,CharacterData);\\n\\n\\nfunction DocumentType() {\\n};\\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\\n_extends(DocumentType,Node);\\n\\nfunction Notation() {\\n};\\nNotation.prototype.nodeType = NOTATION_NODE;\\n_extends(Notation,Node);\\n\\nfunction Entity() {\\n};\\nEntity.prototype.nodeType = ENTITY_NODE;\\n_extends(Entity,Node);\\n\\nfunction EntityReference() {\\n};\\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\\n_extends(EntityReference,Node);\\n\\nfunction DocumentFragment() {\\n};\\nDocumentFragment.prototype.nodeName =\\t\\\"#document-fragment\\\";\\nDocumentFragment.prototype.nodeType =\\tDOCUMENT_FRAGMENT_NODE;\\n_extends(DocumentFragment,Node);\\n\\n\\nfunction ProcessingInstruction() {\\n}\\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\\n_extends(ProcessingInstruction,Node);\\nfunction XMLSerializer(){}\\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\\n\\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\\n}\\nNode.prototype.toString = nodeSerializeToString;\\nfunction nodeSerializeToString(isHtml,nodeFilter){\\n\\tvar buf = [];\\n\\tvar refNode = this.nodeType == 9?this.documentElement:this;\\n\\tvar prefix = refNode.prefix;\\n\\tvar uri = refNode.namespaceURI;\\n\\t\\n\\tif(uri && prefix == null){\\n\\t\\t//console.log(prefix)\\n\\t\\tvar prefix = refNode.lookupPrefix(uri);\\n\\t\\tif(prefix == null){\\n\\t\\t\\t//isHTML = true;\\n\\t\\t\\tvar visibleNamespaces=[\\n\\t\\t\\t{namespace:uri,prefix:null}\\n\\t\\t\\t//{namespace:uri,prefix:''}\\n\\t\\t\\t]\\n\\t\\t}\\n\\t}\\n\\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\\n\\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\\n\\treturn buf.join('');\\n}\\nfunction needNamespaceDefine(node,isHTML, visibleNamespaces) {\\n\\tvar prefix = node.prefix||'';\\n\\tvar uri = node.namespaceURI;\\n\\tif (!prefix && !uri){\\n\\t\\treturn false;\\n\\t}\\n\\tif (prefix === \\\"xml\\\" && uri === \\\"http://www.w3.org/XML/1998/namespace\\\" \\n\\t\\t|| uri == 'http://www.w3.org/2000/xmlns/'){\\n\\t\\treturn false;\\n\\t}\\n\\t\\n\\tvar i = visibleNamespaces.length \\n\\t//console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)\\n\\twhile (i--) {\\n\\t\\tvar ns = visibleNamespaces[i];\\n\\t\\t// get namespace prefix\\n\\t\\t//console.log(node.nodeType,node.tagName,ns.prefix,prefix)\\n\\t\\tif (ns.prefix == prefix){\\n\\t\\t\\treturn ns.namespace != uri;\\n\\t\\t}\\n\\t}\\n\\t//console.log(isHTML,uri,prefix=='')\\n\\t//if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){\\n\\t//\\treturn false;\\n\\t//}\\n\\t//node.flag = '11111'\\n\\t//console.error(3,true,node.flag,node.prefix,node.namespaceURI)\\n\\treturn true;\\n}\\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\\n\\tif(nodeFilter){\\n\\t\\tnode = nodeFilter(node);\\n\\t\\tif(node){\\n\\t\\t\\tif(typeof node == 'string'){\\n\\t\\t\\t\\tbuf.push(node);\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t}else{\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t//buf.sort.apply(attrs, attributeSorter);\\n\\t}\\n\\tswitch(node.nodeType){\\n\\tcase ELEMENT_NODE:\\n\\t\\tif (!visibleNamespaces) visibleNamespaces = [];\\n\\t\\tvar startVisibleNamespaces = visibleNamespaces.length;\\n\\t\\tvar attrs = node.attributes;\\n\\t\\tvar len = attrs.length;\\n\\t\\tvar child = node.firstChild;\\n\\t\\tvar nodeName = node.tagName;\\n\\t\\t\\n\\t\\tisHTML =  (htmlns === node.namespaceURI) ||isHTML \\n\\t\\tbuf.push('<',nodeName);\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\tfor(var i=0;i<len;i++){\\n\\t\\t\\t// add namespaces for attributes\\n\\t\\t\\tvar attr = attrs.item(i);\\n\\t\\t\\tif (attr.prefix == 'xmlns') {\\n\\t\\t\\t\\tvisibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });\\n\\t\\t\\t}else if(attr.nodeName == 'xmlns'){\\n\\t\\t\\t\\tvisibleNamespaces.push({ prefix: '', namespace: attr.value });\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tfor(var i=0;i<len;i++){\\n\\t\\t\\tvar attr = attrs.item(i);\\n\\t\\t\\tif (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {\\n\\t\\t\\t\\tvar prefix = attr.prefix||'';\\n\\t\\t\\t\\tvar uri = attr.namespaceURI;\\n\\t\\t\\t\\tvar ns = prefix ? ' xmlns:' + prefix : \\\" xmlns\\\";\\n\\t\\t\\t\\tbuf.push(ns, '=\\\"' , uri , '\\\"');\\n\\t\\t\\t\\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\\n\\t\\t\\t}\\n\\t\\t\\tserializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t}\\n\\t\\t// add namespace for current node\\t\\t\\n\\t\\tif (needNamespaceDefine(node,isHTML, visibleNamespaces)) {\\n\\t\\t\\tvar prefix = node.prefix||'';\\n\\t\\t\\tvar uri = node.namespaceURI;\\n\\t\\t\\tvar ns = prefix ? ' xmlns:' + prefix : \\\" xmlns\\\";\\n\\t\\t\\tbuf.push(ns, '=\\\"' , uri , '\\\"');\\n\\t\\t\\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){\\n\\t\\t\\tbuf.push('>');\\n\\t\\t\\t//if is cdata child node\\n\\t\\t\\tif(isHTML && /^script$/i.test(nodeName)){\\n\\t\\t\\t\\twhile(child){\\n\\t\\t\\t\\t\\tif(child.data){\\n\\t\\t\\t\\t\\t\\tbuf.push(child.data);\\n\\t\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t\\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tchild = child.nextSibling;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else\\n\\t\\t\\t{\\n\\t\\t\\t\\twhile(child){\\n\\t\\t\\t\\t\\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t\\t\\t\\tchild = child.nextSibling;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tbuf.push('</',nodeName,'>');\\n\\t\\t}else{\\n\\t\\t\\tbuf.push('/>');\\n\\t\\t}\\n\\t\\t// remove added visible namespaces\\n\\t\\t//visibleNamespaces.length = startVisibleNamespaces;\\n\\t\\treturn;\\n\\tcase DOCUMENT_NODE:\\n\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\tvar child = node.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t\\tchild = child.nextSibling;\\n\\t\\t}\\n\\t\\treturn;\\n\\tcase ATTRIBUTE_NODE:\\n\\t\\treturn buf.push(' ',node.name,'=\\\"',node.value.replace(/[<&\\\"]/g,_xmlEncoder),'\\\"');\\n\\tcase TEXT_NODE:\\n\\t\\treturn buf.push(node.data.replace(/[<&]/g,_xmlEncoder));\\n\\tcase CDATA_SECTION_NODE:\\n\\t\\treturn buf.push( '<![CDATA[',node.data,']]>');\\n\\tcase COMMENT_NODE:\\n\\t\\treturn buf.push( \\\"<!--\\\",node.data,\\\"-->\\\");\\n\\tcase DOCUMENT_TYPE_NODE:\\n\\t\\tvar pubid = node.publicId;\\n\\t\\tvar sysid = node.systemId;\\n\\t\\tbuf.push('<!DOCTYPE ',node.name);\\n\\t\\tif(pubid){\\n\\t\\t\\tbuf.push(' PUBLIC \\\"',pubid);\\n\\t\\t\\tif (sysid && sysid!='.') {\\n\\t\\t\\t\\tbuf.push( '\\\" \\\"',sysid);\\n\\t\\t\\t}\\n\\t\\t\\tbuf.push('\\\">');\\n\\t\\t}else if(sysid && sysid!='.'){\\n\\t\\t\\tbuf.push(' SYSTEM \\\"',sysid,'\\\">');\\n\\t\\t}else{\\n\\t\\t\\tvar sub = node.internalSubset;\\n\\t\\t\\tif(sub){\\n\\t\\t\\t\\tbuf.push(\\\" [\\\",sub,\\\"]\\\");\\n\\t\\t\\t}\\n\\t\\t\\tbuf.push(\\\">\\\");\\n\\t\\t}\\n\\t\\treturn;\\n\\tcase PROCESSING_INSTRUCTION_NODE:\\n\\t\\treturn buf.push( \\\"<?\\\",node.target,\\\" \\\",node.data,\\\"?>\\\");\\n\\tcase ENTITY_REFERENCE_NODE:\\n\\t\\treturn buf.push( '&',node.nodeName,';');\\n\\t//case ENTITY_NODE:\\n\\t//case NOTATION_NODE:\\n\\tdefault:\\n\\t\\tbuf.push('??',node.nodeName);\\n\\t}\\n}\\nfunction importNode(doc,node,deep){\\n\\tvar node2;\\n\\tswitch (node.nodeType) {\\n\\tcase ELEMENT_NODE:\\n\\t\\tnode2 = node.cloneNode(false);\\n\\t\\tnode2.ownerDocument = doc;\\n\\t\\t//var attrs = node2.attributes;\\n\\t\\t//var len = attrs.length;\\n\\t\\t//for(var i=0;i<len;i++){\\n\\t\\t\\t//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\\n\\t\\t//}\\n\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\tbreak;\\n\\tcase ATTRIBUTE_NODE:\\n\\t\\tdeep = true;\\n\\t\\tbreak;\\n\\t//case ENTITY_REFERENCE_NODE:\\n\\t//case PROCESSING_INSTRUCTION_NODE:\\n\\t////case TEXT_NODE:\\n\\t//case CDATA_SECTION_NODE:\\n\\t//case COMMENT_NODE:\\n\\t//\\tdeep = false;\\n\\t//\\tbreak;\\n\\t//case DOCUMENT_NODE:\\n\\t//case DOCUMENT_TYPE_NODE:\\n\\t//cannot be imported.\\n\\t//case ENTITY_NODE:\\n\\t//case NOTATION_NODE:\\n\\t//can not hit in level3\\n\\t//default:throw e;\\n\\t}\\n\\tif(!node2){\\n\\t\\tnode2 = node.cloneNode(false);//false\\n\\t}\\n\\tnode2.ownerDocument = doc;\\n\\tnode2.parentNode = null;\\n\\tif(deep){\\n\\t\\tvar child = node.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tnode2.appendChild(importNode(doc,child,deep));\\n\\t\\t\\tchild = child.nextSibling;\\n\\t\\t}\\n\\t}\\n\\treturn node2;\\n}\\n//\\n//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\\n//\\t\\t\\t\\t\\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\\nfunction cloneNode(doc,node,deep){\\n\\tvar node2 = new node.constructor();\\n\\tfor(var n in node){\\n\\t\\tvar v = node[n];\\n\\t\\tif(typeof v != 'object' ){\\n\\t\\t\\tif(v != node2[n]){\\n\\t\\t\\t\\tnode2[n] = v;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\tif(node.childNodes){\\n\\t\\tnode2.childNodes = new NodeList();\\n\\t}\\n\\tnode2.ownerDocument = doc;\\n\\tswitch (node2.nodeType) {\\n\\tcase ELEMENT_NODE:\\n\\t\\tvar attrs\\t= node.attributes;\\n\\t\\tvar attrs2\\t= node2.attributes = new NamedNodeMap();\\n\\t\\tvar len = attrs.length\\n\\t\\tattrs2._ownerElement = node2;\\n\\t\\tfor(var i=0;i<len;i++){\\n\\t\\t\\tnode2.setAttributeNode(cloneNode(doc,attrs.item(i),true));\\n\\t\\t}\\n\\t\\tbreak;;\\n\\tcase ATTRIBUTE_NODE:\\n\\t\\tdeep = true;\\n\\t}\\n\\tif(deep){\\n\\t\\tvar child = node.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tnode2.appendChild(cloneNode(doc,child,deep));\\n\\t\\t\\tchild = child.nextSibling;\\n\\t\\t}\\n\\t}\\n\\treturn node2;\\n}\\n\\nfunction __set__(object,key,value){\\n\\tobject[key] = value\\n}\\n//do dynamic\\ntry{\\n\\tif(Object.defineProperty){\\n\\t\\tObject.defineProperty(LiveNodeList.prototype,'length',{\\n\\t\\t\\tget:function(){\\n\\t\\t\\t\\t_updateLiveList(this);\\n\\t\\t\\t\\treturn this.$$length;\\n\\t\\t\\t}\\n\\t\\t});\\n\\t\\tObject.defineProperty(Node.prototype,'textContent',{\\n\\t\\t\\tget:function(){\\n\\t\\t\\t\\treturn getTextContent(this);\\n\\t\\t\\t},\\n\\t\\t\\tset:function(data){\\n\\t\\t\\t\\tswitch(this.nodeType){\\n\\t\\t\\t\\tcase ELEMENT_NODE:\\n\\t\\t\\t\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\t\\t\\t\\twhile(this.firstChild){\\n\\t\\t\\t\\t\\t\\tthis.removeChild(this.firstChild);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tif(data || String(data)){\\n\\t\\t\\t\\t\\t\\tthis.appendChild(this.ownerDocument.createTextNode(data));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tdefault:\\n\\t\\t\\t\\t\\t//TODO:\\n\\t\\t\\t\\t\\tthis.data = data;\\n\\t\\t\\t\\t\\tthis.value = data;\\n\\t\\t\\t\\t\\tthis.nodeValue = data;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t})\\n\\t\\t\\n\\t\\tfunction getTextContent(node){\\n\\t\\t\\tswitch(node.nodeType){\\n\\t\\t\\tcase ELEMENT_NODE:\\n\\t\\t\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\t\\t\\tvar buf = [];\\n\\t\\t\\t\\tnode = node.firstChild;\\n\\t\\t\\t\\twhile(node){\\n\\t\\t\\t\\t\\tif(node.nodeType!==7 && node.nodeType !==8){\\n\\t\\t\\t\\t\\t\\tbuf.push(getTextContent(node));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tnode = node.nextSibling;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn buf.join('');\\n\\t\\t\\tdefault:\\n\\t\\t\\t\\treturn node.nodeValue;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t__set__ = function(object,key,value){\\n\\t\\t\\t//console.log(value)\\n\\t\\t\\tobject['$$'+key] = value\\n\\t\\t}\\n\\t}\\n}catch(e){//ie8\\n}\\n\\n//if(typeof require == 'function'){\\n\\texports.DOMImplementation = DOMImplementation;\\n\\texports.XMLSerializer = XMLSerializer;\\n//}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/xmldom/dom.js?\");\n\n/***/ }),\n\n/***/ \"../node_modules/xmldom/sax.js\":\n/*!*************************************!*\\\n  !*** ../node_modules/xmldom/sax.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"//[4]   \\tNameStartChar\\t   ::=   \\t\\\":\\\" | [A-Z] | \\\"_\\\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\\r\\n//[4a]   \\tNameChar\\t   ::=   \\tNameStartChar | \\\"-\\\" | \\\".\\\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\\r\\n//[5]   \\tName\\t   ::=   \\tNameStartChar (NameChar)*\\r\\nvar nameStartChar = /[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]///\\\\u10000-\\\\uEFFFF\\r\\nvar nameChar = new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+nameStartChar.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\");\\r\\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\\\:'+nameStartChar.source+nameChar.source+'*)?$');\\r\\n//var tagNamePattern = /^[a-zA-Z_][\\\\w\\\\-\\\\.]*(?:\\\\:[a-zA-Z_][\\\\w\\\\-\\\\.]*)?$/\\r\\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\\r\\n\\r\\n//S_TAG,\\tS_ATTR,\\tS_EQ,\\tS_ATTR_NOQUOT_VALUE\\r\\n//S_ATTR_SPACE,\\tS_ATTR_END,\\tS_TAG_SPACE, S_TAG_CLOSE\\r\\nvar S_TAG = 0;//tag name offerring\\r\\nvar S_ATTR = 1;//attr name offerring \\r\\nvar S_ATTR_SPACE=2;//attr name end and space offer\\r\\nvar S_EQ = 3;//=space?\\r\\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\\r\\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\\r\\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\\r\\nvar S_TAG_CLOSE = 7;//closed el<el />\\r\\n\\r\\nfunction XMLReader(){\\r\\n\\t\\r\\n}\\r\\n\\r\\nXMLReader.prototype = {\\r\\n\\tparse:function(source,defaultNSMap,entityMap){\\r\\n\\t\\tvar domBuilder = this.domBuilder;\\r\\n\\t\\tdomBuilder.startDocument();\\r\\n\\t\\t_copy(defaultNSMap ,defaultNSMap = {})\\r\\n\\t\\tparse(source,defaultNSMap,entityMap,\\r\\n\\t\\t\\t\\tdomBuilder,this.errorHandler);\\r\\n\\t\\tdomBuilder.endDocument();\\r\\n\\t}\\r\\n}\\r\\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\\r\\n\\tfunction fixedFromCharCode(code) {\\r\\n\\t\\t// String.prototype.fromCharCode does not supports\\r\\n\\t\\t// > 2 bytes unicode chars directly\\r\\n\\t\\tif (code > 0xffff) {\\r\\n\\t\\t\\tcode -= 0x10000;\\r\\n\\t\\t\\tvar surrogate1 = 0xd800 + (code >> 10)\\r\\n\\t\\t\\t\\t, surrogate2 = 0xdc00 + (code & 0x3ff);\\r\\n\\r\\n\\t\\t\\treturn String.fromCharCode(surrogate1, surrogate2);\\r\\n\\t\\t} else {\\r\\n\\t\\t\\treturn String.fromCharCode(code);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tfunction entityReplacer(a){\\r\\n\\t\\tvar k = a.slice(1,-1);\\r\\n\\t\\tif(k in entityMap){\\r\\n\\t\\t\\treturn entityMap[k]; \\r\\n\\t\\t}else if(k.charAt(0) === '#'){\\r\\n\\t\\t\\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\\r\\n\\t\\t}else{\\r\\n\\t\\t\\terrorHandler.error('entity not found:'+a);\\r\\n\\t\\t\\treturn a;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tfunction appendText(end){//has some bugs\\r\\n\\t\\tif(end>start){\\r\\n\\t\\t\\tvar xt = source.substring(start,end).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\tlocator&&position(start);\\r\\n\\t\\t\\tdomBuilder.characters(xt,0,end-start);\\r\\n\\t\\t\\tstart = end\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tfunction position(p,m){\\r\\n\\t\\twhile(p>=lineEnd && (m = linePattern.exec(source))){\\r\\n\\t\\t\\tlineStart = m.index;\\r\\n\\t\\t\\tlineEnd = lineStart + m[0].length;\\r\\n\\t\\t\\tlocator.lineNumber++;\\r\\n\\t\\t\\t//console.log('line++:',locator,startPos,endPos)\\r\\n\\t\\t}\\r\\n\\t\\tlocator.columnNumber = p-lineStart+1;\\r\\n\\t}\\r\\n\\tvar lineStart = 0;\\r\\n\\tvar lineEnd = 0;\\r\\n\\tvar linePattern = /.*(?:\\\\r\\\\n?|\\\\n)|.*$/g\\r\\n\\tvar locator = domBuilder.locator;\\r\\n\\t\\r\\n\\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\\r\\n\\tvar closeMap = {};\\r\\n\\tvar start = 0;\\r\\n\\twhile(true){\\r\\n\\t\\ttry{\\r\\n\\t\\t\\tvar tagStart = source.indexOf('<',start);\\r\\n\\t\\t\\tif(tagStart<0){\\r\\n\\t\\t\\t\\tif(!source.substr(start).match(/^\\\\s*$/)){\\r\\n\\t\\t\\t\\t\\tvar doc = domBuilder.doc;\\r\\n\\t    \\t\\t\\tvar text = doc.createTextNode(source.substr(start));\\r\\n\\t    \\t\\t\\tdoc.appendChild(text);\\r\\n\\t    \\t\\t\\tdomBuilder.currentElement = text;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(tagStart>start){\\r\\n\\t\\t\\t\\tappendText(tagStart);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tswitch(source.charAt(tagStart+1)){\\r\\n\\t\\t\\tcase '/':\\r\\n\\t\\t\\t\\tvar end = source.indexOf('>',tagStart+3);\\r\\n\\t\\t\\t\\tvar tagName = source.substring(tagStart+2,end);\\r\\n\\t\\t\\t\\tvar config = parseStack.pop();\\r\\n\\t\\t\\t\\tif(end<0){\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t        \\t\\ttagName = source.substring(tagStart+2).replace(/[\\\\s<].*/,'');\\r\\n\\t        \\t\\t//console.error('#@@@@@@'+tagName)\\r\\n\\t        \\t\\terrorHandler.error(\\\"end tag name: \\\"+tagName+' is not complete:'+config.tagName);\\r\\n\\t        \\t\\tend = tagStart+1+tagName.length;\\r\\n\\t        \\t}else if(tagName.match(/\\\\s</)){\\r\\n\\t        \\t\\ttagName = tagName.replace(/[\\\\s<].*/,'');\\r\\n\\t        \\t\\terrorHandler.error(\\\"end tag name: \\\"+tagName+' maybe not complete');\\r\\n\\t        \\t\\tend = tagStart+1+tagName.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//console.error(parseStack.length,parseStack)\\r\\n\\t\\t\\t\\t//console.error(config);\\r\\n\\t\\t\\t\\tvar localNSMap = config.localNSMap;\\r\\n\\t\\t\\t\\tvar endMatch = config.tagName == tagName;\\r\\n\\t\\t\\t\\tvar endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()\\r\\n\\t\\t        if(endIgnoreCaseMach){\\r\\n\\t\\t        \\tdomBuilder.endElement(config.uri,config.localName,tagName);\\r\\n\\t\\t\\t\\t\\tif(localNSMap){\\r\\n\\t\\t\\t\\t\\t\\tfor(var prefix in localNSMap){\\r\\n\\t\\t\\t\\t\\t\\t\\tdomBuilder.endPrefixMapping(prefix) ;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!endMatch){\\r\\n\\t\\t            \\terrorHandler.fatalError(\\\"end tag name: \\\"+tagName+' is not match the current start tagName:'+config.tagName );\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t        }else{\\r\\n\\t\\t        \\tparseStack.push(config)\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tend++;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t// end elment\\r\\n\\t\\t\\tcase '?':// <?...?>\\r\\n\\t\\t\\t\\tlocator&&position(tagStart);\\r\\n\\t\\t\\t\\tend = parseInstruction(source,tagStart,domBuilder);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase '!':// <!doctype,<![CDATA,<!--\\r\\n\\t\\t\\t\\tlocator&&position(tagStart);\\r\\n\\t\\t\\t\\tend = parseDCC(source,tagStart,domBuilder,errorHandler);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tdefault:\\r\\n\\t\\t\\t\\tlocator&&position(tagStart);\\r\\n\\t\\t\\t\\tvar el = new ElementAttributes();\\r\\n\\t\\t\\t\\tvar currentNSMap = parseStack[parseStack.length-1].currentNSMap;\\r\\n\\t\\t\\t\\t//elStartEnd\\r\\n\\t\\t\\t\\tvar end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);\\r\\n\\t\\t\\t\\tvar len = el.length;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){\\r\\n\\t\\t\\t\\t\\tel.closed = true;\\r\\n\\t\\t\\t\\t\\tif(!entityMap.nbsp){\\r\\n\\t\\t\\t\\t\\t\\terrorHandler.warning('unclosed xml attribute');\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(locator && len){\\r\\n\\t\\t\\t\\t\\tvar locator2 = copyLocator(locator,{});\\r\\n\\t\\t\\t\\t\\t//try{//attribute position fixed\\r\\n\\t\\t\\t\\t\\tfor(var i = 0;i<len;i++){\\r\\n\\t\\t\\t\\t\\t\\tvar a = el[i];\\r\\n\\t\\t\\t\\t\\t\\tposition(a.offset);\\r\\n\\t\\t\\t\\t\\t\\ta.locator = copyLocator(locator,{});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//}catch(e){console.error('@@@@@'+e)}\\r\\n\\t\\t\\t\\t\\tdomBuilder.locator = locator2\\r\\n\\t\\t\\t\\t\\tif(appendElement(el,domBuilder,currentNSMap)){\\r\\n\\t\\t\\t\\t\\t\\tparseStack.push(el)\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tdomBuilder.locator = locator;\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\tif(appendElement(el,domBuilder,currentNSMap)){\\r\\n\\t\\t\\t\\t\\t\\tparseStack.push(el)\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){\\r\\n\\t\\t\\t\\t\\tend = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\tend++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}catch(e){\\r\\n\\t\\t\\terrorHandler.error('element parse error: '+e)\\r\\n\\t\\t\\t//errorHandler.error('element parse error: '+e);\\r\\n\\t\\t\\tend = -1;\\r\\n\\t\\t\\t//throw e;\\r\\n\\t\\t}\\r\\n\\t\\tif(end>start){\\r\\n\\t\\t\\tstart = end;\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t//TODO: 这里有可能sax回退,有位置错误风险\\r\\n\\t\\t\\tappendText(Math.max(tagStart,start)+1);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\\r\\nfunction copyLocator(f,t){\\r\\n\\tt.lineNumber = f.lineNumber;\\r\\n\\tt.columnNumber = f.columnNumber;\\r\\n\\treturn t;\\r\\n}\\r\\n\\r\\n/**\\r\\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\\r\\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\\r\\n */\\r\\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\\r\\n\\tvar attrName;\\r\\n\\tvar value;\\r\\n\\tvar p = ++start;\\r\\n\\tvar s = S_TAG;//status\\r\\n\\twhile(true){\\r\\n\\t\\tvar c = source.charAt(p);\\r\\n\\t\\tswitch(c){\\r\\n\\t\\tcase '=':\\r\\n\\t\\t\\tif(s === S_ATTR){//attrName\\r\\n\\t\\t\\t\\tattrName = source.slice(start,p);\\r\\n\\t\\t\\t\\ts = S_EQ;\\r\\n\\t\\t\\t}else if(s === S_ATTR_SPACE){\\r\\n\\t\\t\\t\\ts = S_EQ;\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t//fatalError: equal must after attrName or space after attrName\\r\\n\\t\\t\\t\\tthrow new Error('attribute equal must after attrName');\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase '\\\\'':\\r\\n\\t\\tcase '\\\"':\\r\\n\\t\\t\\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\\r\\n\\t\\t\\t\\t){//equal\\r\\n\\t\\t\\t\\tif(s === S_ATTR){\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute value must after \\\"=\\\"')\\r\\n\\t\\t\\t\\t\\tattrName = source.slice(start,p)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tstart = p+1;\\r\\n\\t\\t\\t\\tp = source.indexOf(c,start)\\r\\n\\t\\t\\t\\tif(p>0){\\r\\n\\t\\t\\t\\t\\tvalue = source.slice(start,p).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\t\\tel.add(attrName,value,start-1);\\r\\n\\t\\t\\t\\t\\ts = S_ATTR_END;\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\t//fatalError: no end quot match\\r\\n\\t\\t\\t\\t\\tthrow new Error('attribute value no end \\\\''+c+'\\\\' match');\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}else if(s == S_ATTR_NOQUOT_VALUE){\\r\\n\\t\\t\\t\\tvalue = source.slice(start,p).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\t//console.log(attrName,value,start,p)\\r\\n\\t\\t\\t\\tel.add(attrName,value,start);\\r\\n\\t\\t\\t\\t//console.dir(el)\\r\\n\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+attrName+'\\\" missed start quot('+c+')!!');\\r\\n\\t\\t\\t\\tstart = p+1;\\r\\n\\t\\t\\t\\ts = S_ATTR_END\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t//fatalError: no equal before\\r\\n\\t\\t\\t\\tthrow new Error('attribute value must after \\\"=\\\"');\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase '/':\\r\\n\\t\\t\\tswitch(s){\\r\\n\\t\\t\\tcase S_TAG:\\r\\n\\t\\t\\t\\tel.setTagName(source.slice(start,p));\\r\\n\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\tcase S_TAG_SPACE:\\r\\n\\t\\t\\tcase S_TAG_CLOSE:\\r\\n\\t\\t\\t\\ts =S_TAG_CLOSE;\\r\\n\\t\\t\\t\\tel.closed = true;\\r\\n\\t\\t\\tcase S_ATTR_NOQUOT_VALUE:\\r\\n\\t\\t\\tcase S_ATTR:\\r\\n\\t\\t\\tcase S_ATTR_SPACE:\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t//case S_EQ:\\r\\n\\t\\t\\tdefault:\\r\\n\\t\\t\\t\\tthrow new Error(\\\"attribute invalid close char('/')\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase ''://end document\\r\\n\\t\\t\\t//throw new Error('unexpected end of input')\\r\\n\\t\\t\\terrorHandler.error('unexpected end of input');\\r\\n\\t\\t\\tif(s == S_TAG){\\r\\n\\t\\t\\t\\tel.setTagName(source.slice(start,p));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn p;\\r\\n\\t\\tcase '>':\\r\\n\\t\\t\\tswitch(s){\\r\\n\\t\\t\\tcase S_TAG:\\r\\n\\t\\t\\t\\tel.setTagName(source.slice(start,p));\\r\\n\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\tcase S_TAG_SPACE:\\r\\n\\t\\t\\tcase S_TAG_CLOSE:\\r\\n\\t\\t\\t\\tbreak;//normal\\r\\n\\t\\t\\tcase S_ATTR_NOQUOT_VALUE://Compatible state\\r\\n\\t\\t\\tcase S_ATTR:\\r\\n\\t\\t\\t\\tvalue = source.slice(start,p);\\r\\n\\t\\t\\t\\tif(value.slice(-1) === '/'){\\r\\n\\t\\t\\t\\t\\tel.closed  = true;\\r\\n\\t\\t\\t\\t\\tvalue = value.slice(0,-1)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\tcase S_ATTR_SPACE:\\r\\n\\t\\t\\t\\tif(s === S_ATTR_SPACE){\\r\\n\\t\\t\\t\\t\\tvalue = attrName;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(s == S_ATTR_NOQUOT_VALUE){\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+value+'\\\" missed quot(\\\")!!');\\r\\n\\t\\t\\t\\t\\tel.add(attrName,value.replace(/&#?\\\\w+;/g,entityReplacer),start)\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\tif(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){\\r\\n\\t\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+value+'\\\" missed value!! \\\"'+value+'\\\" instead!!')\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tel.add(value,value,start)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase S_EQ:\\r\\n\\t\\t\\t\\tthrow new Error('attribute value missed!!');\\r\\n\\t\\t\\t}\\r\\n//\\t\\t\\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\\r\\n\\t\\t\\treturn p;\\r\\n\\t\\t/*xml space '\\\\x20' | #x9 | #xD | #xA; */\\r\\n\\t\\tcase '\\\\u0080':\\r\\n\\t\\t\\tc = ' ';\\r\\n\\t\\tdefault:\\r\\n\\t\\t\\tif(c<= ' '){//space\\r\\n\\t\\t\\t\\tswitch(s){\\r\\n\\t\\t\\t\\tcase S_TAG:\\r\\n\\t\\t\\t\\t\\tel.setTagName(source.slice(start,p));//tagName\\r\\n\\t\\t\\t\\t\\ts = S_TAG_SPACE;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_ATTR:\\r\\n\\t\\t\\t\\t\\tattrName = source.slice(start,p)\\r\\n\\t\\t\\t\\t\\ts = S_ATTR_SPACE;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_ATTR_NOQUOT_VALUE:\\r\\n\\t\\t\\t\\t\\tvar value = source.slice(start,p).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+value+'\\\" missed quot(\\\")!!');\\r\\n\\t\\t\\t\\t\\tel.add(attrName,value,start)\\r\\n\\t\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\t\\t\\ts = S_TAG_SPACE;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t//case S_TAG_SPACE:\\r\\n\\t\\t\\t\\t//case S_EQ:\\r\\n\\t\\t\\t\\t//case S_ATTR_SPACE:\\r\\n\\t\\t\\t\\t//\\tvoid();break;\\r\\n\\t\\t\\t\\t//case S_TAG_CLOSE:\\r\\n\\t\\t\\t\\t\\t//ignore warning\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}else{//not space\\r\\n//S_TAG,\\tS_ATTR,\\tS_EQ,\\tS_ATTR_NOQUOT_VALUE\\r\\n//S_ATTR_SPACE,\\tS_ATTR_END,\\tS_TAG_SPACE, S_TAG_CLOSE\\r\\n\\t\\t\\t\\tswitch(s){\\r\\n\\t\\t\\t\\t//case S_TAG:void();break;\\r\\n\\t\\t\\t\\t//case S_ATTR:void();break;\\r\\n\\t\\t\\t\\t//case S_ATTR_NOQUOT_VALUE:void();break;\\r\\n\\t\\t\\t\\tcase S_ATTR_SPACE:\\r\\n\\t\\t\\t\\t\\tvar tagName =  el.tagName;\\r\\n\\t\\t\\t\\t\\tif(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){\\r\\n\\t\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+attrName+'\\\" missed value!! \\\"'+attrName+'\\\" instead2!!')\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tel.add(attrName,attrName,start);\\r\\n\\t\\t\\t\\t\\tstart = p;\\r\\n\\t\\t\\t\\t\\ts = S_ATTR;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute space is required\\\"'+attrName+'\\\"!!')\\r\\n\\t\\t\\t\\tcase S_TAG_SPACE:\\r\\n\\t\\t\\t\\t\\ts = S_ATTR;\\r\\n\\t\\t\\t\\t\\tstart = p;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_EQ:\\r\\n\\t\\t\\t\\t\\ts = S_ATTR_NOQUOT_VALUE;\\r\\n\\t\\t\\t\\t\\tstart = p;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_TAG_CLOSE:\\r\\n\\t\\t\\t\\t\\tthrow new Error(\\\"elements closed character '/' and '>' must be connected to\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}//end outer switch\\r\\n\\t\\t//console.log('p++',p)\\r\\n\\t\\tp++;\\r\\n\\t}\\r\\n}\\r\\n/**\\r\\n * @return true if has new namespace define\\r\\n */\\r\\nfunction appendElement(el,domBuilder,currentNSMap){\\r\\n\\tvar tagName = el.tagName;\\r\\n\\tvar localNSMap = null;\\r\\n\\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\\r\\n\\tvar i = el.length;\\r\\n\\twhile(i--){\\r\\n\\t\\tvar a = el[i];\\r\\n\\t\\tvar qName = a.qName;\\r\\n\\t\\tvar value = a.value;\\r\\n\\t\\tvar nsp = qName.indexOf(':');\\r\\n\\t\\tif(nsp>0){\\r\\n\\t\\t\\tvar prefix = a.prefix = qName.slice(0,nsp);\\r\\n\\t\\t\\tvar localName = qName.slice(nsp+1);\\r\\n\\t\\t\\tvar nsPrefix = prefix === 'xmlns' && localName\\r\\n\\t\\t}else{\\r\\n\\t\\t\\tlocalName = qName;\\r\\n\\t\\t\\tprefix = null\\r\\n\\t\\t\\tnsPrefix = qName === 'xmlns' && ''\\r\\n\\t\\t}\\r\\n\\t\\t//can not set prefix,because prefix !== ''\\r\\n\\t\\ta.localName = localName ;\\r\\n\\t\\t//prefix == null for no ns prefix attribute \\r\\n\\t\\tif(nsPrefix !== false){//hack!!\\r\\n\\t\\t\\tif(localNSMap == null){\\r\\n\\t\\t\\t\\tlocalNSMap = {}\\r\\n\\t\\t\\t\\t//console.log(currentNSMap,0)\\r\\n\\t\\t\\t\\t_copy(currentNSMap,currentNSMap={})\\r\\n\\t\\t\\t\\t//console.log(currentNSMap,1)\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\\r\\n\\t\\t\\ta.uri = 'http://www.w3.org/2000/xmlns/'\\r\\n\\t\\t\\tdomBuilder.startPrefixMapping(nsPrefix, value) \\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tvar i = el.length;\\r\\n\\twhile(i--){\\r\\n\\t\\ta = el[i];\\r\\n\\t\\tvar prefix = a.prefix;\\r\\n\\t\\tif(prefix){//no prefix attribute has no namespace\\r\\n\\t\\t\\tif(prefix === 'xml'){\\r\\n\\t\\t\\t\\ta.uri = 'http://www.w3.org/XML/1998/namespace';\\r\\n\\t\\t\\t}if(prefix !== 'xmlns'){\\r\\n\\t\\t\\t\\ta.uri = currentNSMap[prefix || '']\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tvar nsp = tagName.indexOf(':');\\r\\n\\tif(nsp>0){\\r\\n\\t\\tprefix = el.prefix = tagName.slice(0,nsp);\\r\\n\\t\\tlocalName = el.localName = tagName.slice(nsp+1);\\r\\n\\t}else{\\r\\n\\t\\tprefix = null;//important!!\\r\\n\\t\\tlocalName = el.localName = tagName;\\r\\n\\t}\\r\\n\\t//no prefix element has default namespace\\r\\n\\tvar ns = el.uri = currentNSMap[prefix || ''];\\r\\n\\tdomBuilder.startElement(ns,localName,tagName,el);\\r\\n\\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\\r\\n\\t//localNSMap = null\\r\\n\\tif(el.closed){\\r\\n\\t\\tdomBuilder.endElement(ns,localName,tagName);\\r\\n\\t\\tif(localNSMap){\\r\\n\\t\\t\\tfor(prefix in localNSMap){\\r\\n\\t\\t\\t\\tdomBuilder.endPrefixMapping(prefix) \\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}else{\\r\\n\\t\\tel.currentNSMap = currentNSMap;\\r\\n\\t\\tel.localNSMap = localNSMap;\\r\\n\\t\\t//parseStack.push(el);\\r\\n\\t\\treturn true;\\r\\n\\t}\\r\\n}\\r\\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\\r\\n\\tif(/^(?:script|textarea)$/i.test(tagName)){\\r\\n\\t\\tvar elEndStart =  source.indexOf('</'+tagName+'>',elStartEnd);\\r\\n\\t\\tvar text = source.substring(elStartEnd+1,elEndStart);\\r\\n\\t\\tif(/[&<]/.test(text)){\\r\\n\\t\\t\\tif(/^script$/i.test(tagName)){\\r\\n\\t\\t\\t\\t//if(!/\\\\]\\\\]>/.test(text)){\\r\\n\\t\\t\\t\\t\\t//lexHandler.startCDATA();\\r\\n\\t\\t\\t\\t\\tdomBuilder.characters(text,0,text.length);\\r\\n\\t\\t\\t\\t\\t//lexHandler.endCDATA();\\r\\n\\t\\t\\t\\t\\treturn elEndStart;\\r\\n\\t\\t\\t\\t//}\\r\\n\\t\\t\\t}//}else{//text area\\r\\n\\t\\t\\t\\ttext = text.replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\tdomBuilder.characters(text,0,text.length);\\r\\n\\t\\t\\t\\treturn elEndStart;\\r\\n\\t\\t\\t//}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn elStartEnd+1;\\r\\n}\\r\\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\\r\\n\\t//if(tagName in closeMap){\\r\\n\\tvar pos = closeMap[tagName];\\r\\n\\tif(pos == null){\\r\\n\\t\\t//console.log(tagName)\\r\\n\\t\\tpos =  source.lastIndexOf('</'+tagName+'>')\\r\\n\\t\\tif(pos<elStartEnd){//忘记闭合\\r\\n\\t\\t\\tpos = source.lastIndexOf('</'+tagName)\\r\\n\\t\\t}\\r\\n\\t\\tcloseMap[tagName] =pos\\r\\n\\t}\\r\\n\\treturn pos<elStartEnd;\\r\\n\\t//} \\r\\n}\\r\\nfunction _copy(source,target){\\r\\n\\tfor(var n in source){target[n] = source[n]}\\r\\n}\\r\\nfunction parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'\\r\\n\\tvar next= source.charAt(start+2)\\r\\n\\tswitch(next){\\r\\n\\tcase '-':\\r\\n\\t\\tif(source.charAt(start + 3) === '-'){\\r\\n\\t\\t\\tvar end = source.indexOf('-->',start+4);\\r\\n\\t\\t\\t//append comment source.substring(4,end)//<!--\\r\\n\\t\\t\\tif(end>start){\\r\\n\\t\\t\\t\\tdomBuilder.comment(source,start+4,end-start-4);\\r\\n\\t\\t\\t\\treturn end+3;\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\terrorHandler.error(\\\"Unclosed comment\\\");\\r\\n\\t\\t\\t\\treturn -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t//error\\r\\n\\t\\t\\treturn -1;\\r\\n\\t\\t}\\r\\n\\tdefault:\\r\\n\\t\\tif(source.substr(start+3,6) == 'CDATA['){\\r\\n\\t\\t\\tvar end = source.indexOf(']]>',start+9);\\r\\n\\t\\t\\tdomBuilder.startCDATA();\\r\\n\\t\\t\\tdomBuilder.characters(source,start+9,end-start-9);\\r\\n\\t\\t\\tdomBuilder.endCDATA() \\r\\n\\t\\t\\treturn end+3;\\r\\n\\t\\t}\\r\\n\\t\\t//<!DOCTYPE\\r\\n\\t\\t//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) \\r\\n\\t\\tvar matchs = split(source,start);\\r\\n\\t\\tvar len = matchs.length;\\r\\n\\t\\tif(len>1 && /!doctype/i.test(matchs[0][0])){\\r\\n\\t\\t\\tvar name = matchs[1][0];\\r\\n\\t\\t\\tvar pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]\\r\\n\\t\\t\\tvar sysid = len>4 && matchs[4][0];\\r\\n\\t\\t\\tvar lastMatch = matchs[len-1]\\r\\n\\t\\t\\tdomBuilder.startDTD(name,pubid && pubid.replace(/^(['\\\"])(.*?)\\\\1$/,'$2'),\\r\\n\\t\\t\\t\\t\\tsysid && sysid.replace(/^(['\\\"])(.*?)\\\\1$/,'$2'));\\r\\n\\t\\t\\tdomBuilder.endDTD();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn lastMatch.index+lastMatch[0].length\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn -1;\\r\\n}\\r\\n\\r\\n\\r\\n\\r\\nfunction parseInstruction(source,start,domBuilder){\\r\\n\\tvar end = source.indexOf('?>',start);\\r\\n\\tif(end){\\r\\n\\t\\tvar match = source.substring(start,end).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);\\r\\n\\t\\tif(match){\\r\\n\\t\\t\\tvar len = match[0].length;\\r\\n\\t\\t\\tdomBuilder.processingInstruction(match[1], match[2]) ;\\r\\n\\t\\t\\treturn end+2;\\r\\n\\t\\t}else{//error\\r\\n\\t\\t\\treturn -1;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn -1;\\r\\n}\\r\\n\\r\\n/**\\r\\n * @param source\\r\\n */\\r\\nfunction ElementAttributes(source){\\r\\n\\t\\r\\n}\\r\\nElementAttributes.prototype = {\\r\\n\\tsetTagName:function(tagName){\\r\\n\\t\\tif(!tagNamePattern.test(tagName)){\\r\\n\\t\\t\\tthrow new Error('invalid tagName:'+tagName)\\r\\n\\t\\t}\\r\\n\\t\\tthis.tagName = tagName\\r\\n\\t},\\r\\n\\tadd:function(qName,value,offset){\\r\\n\\t\\tif(!tagNamePattern.test(qName)){\\r\\n\\t\\t\\tthrow new Error('invalid attribute:'+qName)\\r\\n\\t\\t}\\r\\n\\t\\tthis[this.length++] = {qName:qName,value:value,offset:offset}\\r\\n\\t},\\r\\n\\tlength:0,\\r\\n\\tgetLocalName:function(i){return this[i].localName},\\r\\n\\tgetLocator:function(i){return this[i].locator},\\r\\n\\tgetQName:function(i){return this[i].qName},\\r\\n\\tgetURI:function(i){return this[i].uri},\\r\\n\\tgetValue:function(i){return this[i].value}\\r\\n//\\t,getIndex:function(uri, localName)){\\r\\n//\\t\\tif(localName){\\r\\n//\\t\\t\\t\\r\\n//\\t\\t}else{\\r\\n//\\t\\t\\tvar qName = uri\\r\\n//\\t\\t}\\r\\n//\\t},\\r\\n//\\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\\r\\n//\\tgetType:function(uri,localName){}\\r\\n//\\tgetType:function(i){},\\r\\n}\\r\\n\\r\\n\\r\\n\\r\\n\\r\\nfunction _set_proto_(thiz,parent){\\r\\n\\tthiz.__proto__ = parent;\\r\\n\\treturn thiz;\\r\\n}\\r\\nif(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){\\r\\n\\t_set_proto_ = function(thiz,parent){\\r\\n\\t\\tfunction p(){};\\r\\n\\t\\tp.prototype = parent;\\r\\n\\t\\tp = new p();\\r\\n\\t\\tfor(parent in thiz){\\r\\n\\t\\t\\tp[parent] = thiz[parent];\\r\\n\\t\\t}\\r\\n\\t\\treturn p;\\r\\n\\t}\\r\\n}\\r\\n\\r\\nfunction split(source,start){\\r\\n\\tvar match;\\r\\n\\tvar buf = [];\\r\\n\\tvar reg = /'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;\\r\\n\\treg.lastIndex = start;\\r\\n\\treg.exec(source);//skip <\\r\\n\\twhile(match = reg.exec(source)){\\r\\n\\t\\tbuf.push(match);\\r\\n\\t\\tif(match[1])return buf;\\r\\n\\t}\\r\\n}\\r\\n\\r\\nexports.XMLReader = XMLReader;\\r\\n\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/xmldom/sax.js?\");\n\n/***/ }),\n\n/***/ \"./assets/styles/components/playlist.scss\":\n/*!************************************************!*\\\n  !*** ./assets/styles/components/playlist.scss ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/playlist.scss?\");\n\n/***/ }),\n\n/***/ \"./assets/styles/components/thumbnail.scss\":\n/*!*************************************************!*\\\n  !*** ./assets/styles/components/thumbnail.scss ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/thumbnail.scss?\");\n\n/***/ }),\n\n/***/ \"./assets/styles/components/title-bar.scss\":\n/*!*************************************************!*\\\n  !*** ./assets/styles/components/title-bar.scss ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/title-bar.scss?\");\n\n/***/ }),\n\n/***/ \"./assets/styles/components/triangle-volume-bar.scss\":\n/*!***********************************************************!*\\\n  !*** ./assets/styles/components/triangle-volume-bar.scss ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/triangle-volume-bar.scss?\");\n\n/***/ }),\n\n/***/ \"./assets/styles/main.scss\":\n/*!*********************************!*\\\n  !*** ./assets/styles/main.scss ***!\n  \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/main.scss?\");\n\n/***/ }),\n\n/***/ \"./components/component-utils.js\":\n/*!***************************************!*\\\n  !*** ./components/component-utils.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nvar hide = function hide(el) {\\n  el.style.display = 'none';\\n};\\n\\nvar show = function show(el) {\\n  el.style.display = '';\\n};\\n\\nvar setText = function setText(el, text) {\\n  if (!text || text.length <= 0) {\\n    el.innerText = '';\\n    hide(el);\\n    return;\\n  }\\n\\n  el.innerText = text;\\n  show(el);\\n};\\n\\nmodule.exports = {\\n  hide: hide,\\n  show: show,\\n  setText: setText\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/component-utils.js?\");\n\n/***/ }),\n\n/***/ \"./components/index.js\":\n/*!*****************************!*\\\n  !*** ./components/index.js ***!\n  \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nObject.defineProperty(exports, \\\"JumpForwardButton\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _jump10Plus.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"JumpBackButton\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _jump10Minus.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"LogoButton\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _logoButton.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"PlaylistPanel\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _playlistPanel.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"ProgressControlEventsBlocker\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _progressControlEventsBlocker.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"RecommendationsOverlay\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _recommendationsOverlay.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"ShoppablePanel\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _shoppablePanel.default;\\n  }\\n});\\nObject.defineProperty(exports, \\\"TitleBar\\\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _titleBar.default;\\n  }\\n});\\n\\nvar _jump10Plus = _interopRequireDefault(__webpack_require__(/*! ./jumpButtons/jump-10-plus */ \\\"./components/jumpButtons/jump-10-plus.js\\\"));\\n\\nvar _jump10Minus = _interopRequireDefault(__webpack_require__(/*! ./jumpButtons/jump-10-minus */ \\\"./components/jumpButtons/jump-10-minus.js\\\"));\\n\\nvar _logoButton = _interopRequireDefault(__webpack_require__(/*! ./logoButton/logo-button */ \\\"./components/logoButton/logo-button.js\\\"));\\n\\nvar _playlistPanel = _interopRequireDefault(__webpack_require__(/*! ./playlist/panel/playlist-panel */ \\\"./components/playlist/panel/playlist-panel.js\\\"));\\n\\nvar _progressControlEventsBlocker = _interopRequireDefault(__webpack_require__(/*! ./progress-control-events-blocker/progress-control-events-blocker */ \\\"./components/progress-control-events-blocker/progress-control-events-blocker.js\\\"));\\n\\nvar _recommendationsOverlay = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay */ \\\"./components/recommendations-overlay/index.js\\\"));\\n\\nvar _shoppablePanel = _interopRequireDefault(__webpack_require__(/*! ./shoppable-bar/panel/shoppable-panel */ \\\"./components/shoppable-bar/panel/shoppable-panel.js\\\"));\\n\\nvar _titleBar = _interopRequireDefault(__webpack_require__(/*! ./title-bar/title-bar */ \\\"./components/title-bar/title-bar.js\\\"));\\n\\n__webpack_require__(/*! assets/styles/components/triangle-volume-bar.scss */ \\\"./assets/styles/components/triangle-volume-bar.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/index.js?\");\n\n/***/ }),\n\n/***/ \"./components/jumpButtons/jump-10-minus.js\":\n/*!*************************************************!*\\\n  !*** ./components/jumpButtons/jump-10-minus.js ***!\n  \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar JumpBackButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(JumpBackButton, _ClickableComponent);\\n\\n  var _super = _createSuper(JumpBackButton);\\n\\n  function JumpBackButton() {\\n    _classCallCheck(this, JumpBackButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(JumpBackButton, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(event) {\\n      _get(_getPrototypeOf(JumpBackButton.prototype), \\\"handleClick\\\", this).call(this, event);\\n\\n      this.player().currentTime(this.player().currentTime() - 10);\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      return _video.default.dom.createEl('button', {\\n        className: 'vjs-control vjs-icon-skip-10-min vjs-button'\\n      });\\n    }\\n  }]);\\n\\n  return JumpBackButton;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent('JumpBackButton', JumpBackButton);\\n\\nvar _default = JumpBackButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/jumpButtons/jump-10-minus.js?\");\n\n/***/ }),\n\n/***/ \"./components/jumpButtons/jump-10-plus.js\":\n/*!************************************************!*\\\n  !*** ./components/jumpButtons/jump-10-plus.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar JumpForwardButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(JumpForwardButton, _ClickableComponent);\\n\\n  var _super = _createSuper(JumpForwardButton);\\n\\n  function JumpForwardButton() {\\n    _classCallCheck(this, JumpForwardButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(JumpForwardButton, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(event) {\\n      _get(_getPrototypeOf(JumpForwardButton.prototype), \\\"handleClick\\\", this).call(this, event);\\n\\n      this.player().currentTime(this.player().currentTime() + 10);\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      return _video.default.dom.createEl('button', {\\n        className: 'vjs-control vjs-icon-skip-10-plus vjs-button'\\n      });\\n    }\\n  }]);\\n\\n  return JumpForwardButton;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent('JumpForwardButton', JumpForwardButton);\\n\\nvar _default = JumpForwardButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/jumpButtons/jump-10-plus.js?\");\n\n/***/ }),\n\n/***/ \"./components/logoButton/logo-button.js\":\n/*!**********************************************!*\\\n  !*** ./components/logoButton/logo-button.js ***!\n  \\**********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! ./logo-button.scss */ \\\"./components/logoButton/logo-button.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar LIGHT_BG_ICON = 'https://res.cloudinary.com/cloudinary-marketing/image/upload/v1597164189/creative_source/Logo/Cloud%20Glyph/cloudinary_cloud_glyph_regular.svg';\\nvar DARK_BG_ICON = 'https://res.cloudinary.com/cloudinary-marketing/image/upload/v1597164191/creative_source/Logo/Cloud%20Glyph/cloudinary_cloud_glyph_white.svg'; // support VJS5 & VJS6 at the same time\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar LogoButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(LogoButton, _ClickableComponent);\\n\\n  var _super = _createSuper(LogoButton);\\n\\n  function LogoButton() {\\n    _classCallCheck(this, LogoButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(LogoButton, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var opts = this.options_.playerOptions;\\n      var display = opts.showLogo ? 'block' : 'none';\\n      var bgIcon = '';\\n\\n      if (opts.logoImageUrl) {\\n        bgIcon = opts.logoImageUrl;\\n      } else {\\n        var isLight = opts.class.indexOf('cld-video-player-skin-light') > -1 || opts.skin === 'light';\\n        bgIcon = isLight ? LIGHT_BG_ICON : DARK_BG_ICON;\\n      }\\n\\n      return _video.default.dom.createEl('a', {}, {\\n        class: 'vjs-control vjs-cloudinary-button vjs-button',\\n        href: opts.logoOnclickUrl,\\n        target: '_blank',\\n        style: \\\"display: \\\".concat(display, \\\"; background-image: url(\\\").concat(bgIcon, \\\")\\\")\\n      });\\n    }\\n  }]);\\n\\n  return LogoButton;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent('logoButton', LogoButton);\\n\\nvar _default = LogoButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/logoButton/logo-button.js?\");\n\n/***/ }),\n\n/***/ \"./components/logoButton/logo-button.scss\":\n/*!************************************************!*\\\n  !*** ./components/logoButton/logo-button.scss ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/logoButton/logo-button.scss?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/components/upcoming-video-overlay.js\":\n/*!******************************************************************!*\\\n  !*** ./components/playlist/components/upcoming-video-overlay.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! ./upcoming-video-overlay.scss */ \\\"./components/playlist/components/upcoming-video-overlay.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar UpcomingVideoOverlay = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(UpcomingVideoOverlay, _ClickableComponent);\\n\\n  var _super = _createSuper(UpcomingVideoOverlay);\\n\\n  function UpcomingVideoOverlay(player) {\\n    var _this;\\n\\n    _classCallCheck(this, UpcomingVideoOverlay);\\n\\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n      args[_key - 1] = arguments[_key];\\n    }\\n\\n    _this = _super.call.apply(_super, [this, player].concat(args));\\n\\n    var show = function show() {\\n      if (_typeof(_this.player().ima) === 'object' && _this.player().ima.getAdsManager()) {\\n        if (!_this.player().ima.getAdsManager().getCurrentAd() || _this.player().ima.getAdsManager().getCurrentAd().isLinear()) {\\n          _this.addClass('vjs-upcoming-video-show');\\n        }\\n      } else {\\n        _this.addClass('vjs-upcoming-video-show');\\n      }\\n    };\\n\\n    var hide = function hide() {\\n      _this.removeClass('vjs-upcoming-video-show');\\n    };\\n\\n    var disableTransition = function disableTransition(block) {\\n      _this.addClass('disable-transition');\\n\\n      block();\\n\\n      _this.removeClass('disable-transition');\\n    };\\n\\n    var onPlaylistItemChange = function onPlaylistItemChange(_, event) {\\n      hide();\\n      disableTransition(function () {\\n        if (event.next) {\\n          _this.setItem(event.next);\\n        }\\n      });\\n    };\\n\\n    player.on('upcomingvideoshow', show);\\n    player.on('upcomingvideohide', hide);\\n    player.on('playlistitemchanged', onPlaylistItemChange);\\n    return _this;\\n  }\\n\\n  _createClass(UpcomingVideoOverlay, [{\\n    key: \\\"setTitle\\\",\\n    value: function setTitle(source) {\\n      var title = this.getChild('upcomingVideoOverlayContent').getChild('upcomingVideoOverlayBar').getChild('upcomingVideoOverlayTitle');\\n      title.setContent(source.info().title || source.publicId());\\n    }\\n  }, {\\n    key: \\\"setItem\\\",\\n    value: function setItem(source) {\\n      this._source = source;\\n      var maxWidth = parseInt(window.getComputedStyle(this.el(), null).getPropertyValue('max-width'), 10);\\n      var maxHeight = Math.round(maxWidth * (9 / 16.0));\\n      var transformation = {\\n        crop: 'pad',\\n        background: 'auto:predominant',\\n        width: maxWidth,\\n        height: maxHeight\\n      };\\n      var content = this.getChild('upcomingVideoOverlayContent');\\n      this.setTitle(source);\\n      content.el().style.backgroundImage = \\\"url(\\\".concat(this._source.poster().url({\\n        transformation: transformation\\n      }), \\\")\\\");\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(UpcomingVideoOverlay.prototype), \\\"handleClick\\\", this).call(this, event);\\n\\n      this.player().cloudinary.playlist().playNext();\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(UpcomingVideoOverlay.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-upcoming-video'\\n      });\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlay;\\n}(ClickableComponent);\\n\\nvar UpcomingVideoOverlayContent = /*#__PURE__*/function (_Component) {\\n  _inherits(UpcomingVideoOverlayContent, _Component);\\n\\n  var _super2 = _createSuper(UpcomingVideoOverlayContent);\\n\\n  function UpcomingVideoOverlayContent() {\\n    _classCallCheck(this, UpcomingVideoOverlayContent);\\n\\n    return _super2.apply(this, arguments);\\n  }\\n\\n  _createClass(UpcomingVideoOverlayContent, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      // Content wraps image and bar\\n      return _get(_getPrototypeOf(UpcomingVideoOverlayContent.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'aspect-ratio-content'\\n      });\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlayContent;\\n}(Component);\\n\\nvar UpcomingVideoOverlayTitle = /*#__PURE__*/function (_Component2) {\\n  _inherits(UpcomingVideoOverlayTitle, _Component2);\\n\\n  var _super3 = _createSuper(UpcomingVideoOverlayTitle);\\n\\n  function UpcomingVideoOverlayTitle() {\\n    _classCallCheck(this, UpcomingVideoOverlayTitle);\\n\\n    return _super3.apply(this, arguments);\\n  }\\n\\n  _createClass(UpcomingVideoOverlayTitle, [{\\n    key: \\\"setContent\\\",\\n    value: function setContent(title) {\\n      this._contentSpan.innerText = title;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(UpcomingVideoOverlayTitle.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-control vjs-upcoming-video-title'\\n      });\\n\\n      var container = dom.createEl('div', {\\n        className: 'vjs-upcoming-video-title-display',\\n        innerHTML: '<span class=\\\"vjs-control-text\\\">Next up</span>Next up: '\\n      });\\n      this._contentSpan = dom.createEl('span', {\\n        className: 'vjs-upcoming-video-title-display-label'\\n      });\\n      container.appendChild(this._contentSpan);\\n      el.appendChild(container);\\n      return el;\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlayTitle;\\n}(Component);\\n\\nvar UpcomingVideoOverlayBar = /*#__PURE__*/function (_Component3) {\\n  _inherits(UpcomingVideoOverlayBar, _Component3);\\n\\n  var _super4 = _createSuper(UpcomingVideoOverlayBar);\\n\\n  function UpcomingVideoOverlayBar() {\\n    _classCallCheck(this, UpcomingVideoOverlayBar);\\n\\n    return _super4.apply(this, arguments);\\n  }\\n\\n  _createClass(UpcomingVideoOverlayBar, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(UpcomingVideoOverlayBar.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-upcoming-video-bar'\\n      });\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlayBar;\\n}(Component);\\n\\nUpcomingVideoOverlay.prototype.options_ = {\\n  children: ['upcomingVideoOverlayContent']\\n};\\n\\n_video.default.registerComponent('upcomingVideoOverlay', UpcomingVideoOverlay);\\n\\nUpcomingVideoOverlayContent.prototype.options_ = {\\n  children: ['upcomingVideoOverlayBar']\\n};\\n\\n_video.default.registerComponent('upcomingVideoOverlayContent', UpcomingVideoOverlayContent);\\n\\nUpcomingVideoOverlayBar.prototype.options_ = {\\n  children: ['upcomingVideoOverlayTitle', 'playlistNextButton']\\n};\\n\\n_video.default.registerComponent('upcomingVideoOverlayBar', UpcomingVideoOverlayBar);\\n\\n_video.default.registerComponent('upcomingVideoOverlayTitle', UpcomingVideoOverlayTitle);\\n\\nvar _default = UpcomingVideoOverlay;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/components/upcoming-video-overlay.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/components/upcoming-video-overlay.scss\":\n/*!********************************************************************!*\\\n  !*** ./components/playlist/components/upcoming-video-overlay.scss ***!\n  \\********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/components/upcoming-video-overlay.scss?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/layout/playlist-layout-custom.js\":\n/*!**************************************************************!*\\\n  !*** ./components/playlist/layout/playlist-layout-custom.js ***!\n  \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlistLayout = _interopRequireDefault(__webpack_require__(/*! ./playlist-layout */ \\\"./components/playlist/layout/playlist-layout.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar PlaylistLayoutCustom = /*#__PURE__*/function (_PlaylistLayout) {\\n  _inherits(PlaylistLayoutCustom, _PlaylistLayout);\\n\\n  var _super = _createSuper(PlaylistLayoutCustom);\\n\\n  function PlaylistLayoutCustom() {\\n    _classCallCheck(this, PlaylistLayoutCustom);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(PlaylistLayoutCustom, [{\\n    key: \\\"getCls\\\",\\n    value: function getCls() {\\n      var cls = _get(_getPrototypeOf(PlaylistLayoutCustom.prototype), \\\"getCls\\\", this).call(this);\\n\\n      cls.push('cld-plw-custom');\\n      return cls;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistLayoutCustom.prototype), \\\"createEl\\\", this).call(this);\\n\\n      this.options_.renderTo.appendChild(el);\\n      return el;\\n    }\\n  }]);\\n\\n  return PlaylistLayoutCustom;\\n}(_playlistLayout.default);\\n\\nvar _default = PlaylistLayoutCustom;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout-custom.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/layout/playlist-layout-horizontal.js\":\n/*!******************************************************************!*\\\n  !*** ./components/playlist/layout/playlist-layout-horizontal.js ***!\n  \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlistLayout = _interopRequireDefault(__webpack_require__(/*! ./playlist-layout */ \\\"./components/playlist/layout/playlist-layout.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar PlaylistLayoutHorizontal = /*#__PURE__*/function (_PlaylistLayout) {\\n  _inherits(PlaylistLayoutHorizontal, _PlaylistLayout);\\n\\n  var _super = _createSuper(PlaylistLayoutHorizontal);\\n\\n  function PlaylistLayoutHorizontal(player, options) {\\n    _classCallCheck(this, PlaylistLayoutHorizontal);\\n\\n    options.wrap = true;\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(PlaylistLayoutHorizontal, [{\\n    key: \\\"getCls\\\",\\n    value: function getCls() {\\n      var cls = _get(_getPrototypeOf(PlaylistLayoutHorizontal.prototype), \\\"getCls\\\", this).call(this);\\n\\n      cls.push('cld-plw-horizontal');\\n      return cls;\\n    }\\n  }]);\\n\\n  return PlaylistLayoutHorizontal;\\n}(_playlistLayout.default);\\n\\nvar _default = PlaylistLayoutHorizontal;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout-horizontal.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/layout/playlist-layout-vertical.js\":\n/*!****************************************************************!*\\\n  !*** ./components/playlist/layout/playlist-layout-vertical.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlistLayout = _interopRequireDefault(__webpack_require__(/*! ./playlist-layout */ \\\"./components/playlist/layout/playlist-layout.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar PlaylistLayoutVertical = /*#__PURE__*/function (_PlaylistLayout) {\\n  _inherits(PlaylistLayoutVertical, _PlaylistLayout);\\n\\n  var _super = _createSuper(PlaylistLayoutVertical);\\n\\n  function PlaylistLayoutVertical(player, options) {\\n    _classCallCheck(this, PlaylistLayoutVertical);\\n\\n    options.wrap = true;\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(PlaylistLayoutVertical, [{\\n    key: \\\"getCls\\\",\\n    value: function getCls() {\\n      var cls = _get(_getPrototypeOf(PlaylistLayoutVertical.prototype), \\\"getCls\\\", this).call(this);\\n\\n      cls.push('cld-plw-vertical');\\n      return cls;\\n    }\\n  }]);\\n\\n  return PlaylistLayoutVertical;\\n}(_playlistLayout.default);\\n\\nvar _default = PlaylistLayoutVertical;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout-vertical.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/layout/playlist-layout.js\":\n/*!*******************************************************!*\\\n  !*** ./components/playlist/layout/playlist-layout.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _dom = __webpack_require__(/*! ../../../utils/dom */ \\\"./utils/dom.js\\\");\\n\\nvar _cssPrefix = __webpack_require__(/*! ../../../utils/css-prefix */ \\\"./utils/css-prefix.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\\n\\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\\n\\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar OPTIONS_DEFAULT = {\\n  wrap: false\\n};\\n\\nvar PlaylistLayout = /*#__PURE__*/function (_Component) {\\n  _inherits(PlaylistLayout, _Component);\\n\\n  var _super = _createSuper(PlaylistLayout);\\n\\n  function PlaylistLayout(player, options) {\\n    var _thisSuper, _this;\\n\\n    _classCallCheck(this, PlaylistLayout);\\n\\n    var layoutOptions = _objectSpread(_objectSpread({}, OPTIONS_DEFAULT), options);\\n\\n    _this = _super.call(this, player, layoutOptions);\\n    _this.player_ = player;\\n\\n    _this.setCls();\\n\\n    var fluidHandler = function fluidHandler(e, fluid) {\\n      _this.options_.fluid = fluid;\\n\\n      _this.removeCls();\\n\\n      _this.setCls();\\n    };\\n\\n    var wrapVideoWithLayout = function wrapVideoWithLayout() {\\n      var el = _this.el();\\n\\n      _this.videoWrap_ = dom.createEl('div', {\\n        className: 'cld-plw-col-player'\\n      });\\n      _this.contentEl_ = _this.contentEl_ = dom.createEl('div', {\\n        className: 'cld-plw-col-list'\\n      });\\n      (0, _dom.wrap)(_this.player().el(), el);\\n      el.appendChild(_this.videoWrap_);\\n      el.appendChild(_this.contentEl_);\\n      (0, _dom.wrap)(_this.player().el(), _this.videoWrap_);\\n    };\\n\\n    if (layoutOptions.wrap) {\\n      wrapVideoWithLayout();\\n    }\\n\\n    player.on('fluid', fluidHandler);\\n\\n    _this.addChild('PlaylistPanel', _this.options_);\\n\\n    _this.dispose = function () {\\n      _this.removeLayout();\\n\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(PlaylistLayout.prototype)), \\\"dispose\\\", _thisSuper).call(_thisSuper);\\n\\n      player.off('fluid', fluidHandler);\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(PlaylistLayout, [{\\n    key: \\\"getCls\\\",\\n    value: function getCls() {\\n      var cls = ['cld-video-player', 'cld-plw-layout'];\\n      cls.push((0, _cssPrefix.skinClassPrefix)(this.player()));\\n      cls.push((0, _cssPrefix.playerClassPrefix)(this.player()));\\n\\n      if (this.options_.fluid) {\\n        cls.push('cld-plw-layout-fluid');\\n      }\\n\\n      return cls;\\n    }\\n  }, {\\n    key: \\\"setCls\\\",\\n    value: function setCls() {\\n      var _this2 = this;\\n\\n      this.removeClass((0, _cssPrefix.skinClassPrefix)(this));\\n      this.getCls().forEach(function (cls) {\\n        _this2.addClass(cls);\\n      });\\n    }\\n  }, {\\n    key: \\\"removeCls\\\",\\n    value: function removeCls() {\\n      var _this3 = this;\\n\\n      this.getCls().forEach(function (cls) {\\n        _this3.removeClass(cls);\\n      });\\n    }\\n  }, {\\n    key: \\\"update\\\",\\n    value: function update(optionToChange, options) {\\n      this.options(options);\\n      this.removeChild('PlaylistPanel');\\n      this.addChild('PlaylistPanel', this.options_);\\n      this.trigger('playlistlayoutupdate');\\n    }\\n  }, {\\n    key: \\\"removeLayout\\\",\\n    value: function removeLayout() {\\n      var parentElem = this.el().parentElement;\\n\\n      if (this.el().parentElement) {\\n        parentElem.appendChild(this.player().el());\\n      }\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistLayout.prototype), \\\"createEl\\\", this).call(this, 'div'); // Apply font styles on wrapper div.\\n\\n\\n      el.style.fontFamily = this.player().el().style.fontFamily;\\n      return el;\\n    }\\n  }]);\\n\\n  return PlaylistLayout;\\n}(Component);\\n\\n_video.default.registerComponent('playlistLayout', PlaylistLayout);\\n\\nvar _default = PlaylistLayout;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/panel/playlist-panel-item.js\":\n/*!**********************************************************!*\\\n  !*** ./components/playlist/panel/playlist-panel-item.js ***!\n  \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _thumbnail = _interopRequireDefault(__webpack_require__(/*! ../thumbnail/thumbnail */ \\\"./components/playlist/thumbnail/thumbnail.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\nvar DEFAULT_OPTIONS = {\\n  source: null,\\n  next: false\\n};\\n\\nvar PlaylistPanelItem = /*#__PURE__*/function (_Thumbnail) {\\n  _inherits(PlaylistPanelItem, _Thumbnail);\\n\\n  var _super = _createSuper(PlaylistPanelItem);\\n\\n  function PlaylistPanelItem(player, options) {\\n    _classCallCheck(this, PlaylistPanelItem);\\n\\n    options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(PlaylistPanelItem, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(event) {\\n      _get(_getPrototypeOf(PlaylistPanelItem.prototype), \\\"handleClick\\\", this).call(this, event);\\n\\n      this.play();\\n    }\\n  }, {\\n    key: \\\"play\\\",\\n    value: function play() {\\n      var item = this.getItem();\\n      var list = this.player().cloudinary.playlist().list();\\n      var index = list.indexOf(item);\\n\\n      if (index === -1) {\\n        throw new Error('Invalid playlist item...');\\n      }\\n\\n      this.player().cloudinary.playlist().playAtIndex(index);\\n    }\\n  }, {\\n    key: \\\"isCurrent\\\",\\n    value: function isCurrent() {\\n      return this.options_.current;\\n    }\\n  }, {\\n    key: \\\"getTitle\\\",\\n    value: function getTitle() {\\n      return _get(_getPrototypeOf(PlaylistPanelItem.prototype), \\\"getTitle\\\", this).call(this);\\n    }\\n  }, {\\n    key: \\\"getDuration\\\",\\n    value: function getDuration() {\\n      return _get(_getPrototypeOf(PlaylistPanelItem.prototype), \\\"getDuration\\\", this).call(this);\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistPanelItem.prototype), \\\"createEl\\\", this).call(this);\\n\\n      el.classList.add('cld-plw-panel-item');\\n      var info = dom.createEl('div', {\\n        className: 'cld-plw-item-info-wrap'\\n      });\\n      var titleWrap = dom.createEl('div', {\\n        className: 'cld-plw-item-title'\\n      });\\n\\n      if (this.isCurrent()) {\\n        el.classList.add('cld-plw-panel-item-active');\\n        var currEl = dom.createEl('span', {\\n          className: 'cld-plw-item-title-curr'\\n        }, {}, 'Now Playing: ');\\n        titleWrap.appendChild(currEl);\\n      }\\n\\n      var title = dom.createEl('span', {\\n        className: 'cld-plw-item-title'\\n      }, {}, this.getTitle());\\n      titleWrap.appendChild(title);\\n      var duration = dom.createEl('div', {\\n        className: 'cld-plw-item-duration'\\n      }, {}, this.getDuration());\\n      info.appendChild(titleWrap);\\n      info.appendChild(duration);\\n\\n      if (el) {\\n        el.appendChild(info);\\n      }\\n\\n      el.appendChild(info);\\n      return el;\\n    }\\n  }]);\\n\\n  return PlaylistPanelItem;\\n}(_thumbnail.default);\\n\\n_video.default.registerComponent('playlistPanelItem', PlaylistPanelItem);\\n\\nvar _default = PlaylistPanelItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/panel/playlist-panel-item.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/panel/playlist-panel.js\":\n/*!*****************************************************!*\\\n  !*** ./components/playlist/panel/playlist-panel.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! assets/styles/components/playlist.scss */ \\\"./assets/styles/components/playlist.scss\\\");\\n\\nvar _playlistPanelItem = _interopRequireDefault(__webpack_require__(/*! ./playlist-panel-item */ \\\"./components/playlist/panel/playlist-panel-item.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar PlaylistPanel = /*#__PURE__*/function (_Component) {\\n  _inherits(PlaylistPanel, _Component);\\n\\n  var _super = _createSuper(PlaylistPanel);\\n\\n  function PlaylistPanel(player) {\\n    var _thisSuper, _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, PlaylistPanel);\\n\\n    _this = _super.call(this, player, options);\\n\\n    var itemChangeHandler = function itemChangeHandler() {\\n      _this.render();\\n    };\\n\\n    player.on('playlistitemchanged', itemChangeHandler);\\n\\n    _this.render();\\n\\n    _this.dispose = function () {\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(PlaylistPanel.prototype)), \\\"dispose\\\", _thisSuper).call(_thisSuper);\\n\\n      player.off('playlistitemchanged', itemChangeHandler);\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(PlaylistPanel, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistPanel.prototype), \\\"createEl\\\", this).call(this);\\n\\n      el.classList.add('cld-plw-panel');\\n      return el;\\n    }\\n  }, {\\n    key: \\\"removeAll\\\",\\n    value: function removeAll() {\\n      var childrens = this.children();\\n\\n      for (var i = childrens.length - 1; i >= 0; --i) {\\n        this.removeChild(childrens[i]);\\n      }\\n    }\\n  }, {\\n    key: \\\"getItems\\\",\\n    value: function getItems() {\\n      var playlist = this.player().cloudinary.playlist();\\n      var repeat = playlist._repeat;\\n\\n      if (this.options_.showAll) {\\n        return playlist.list();\\n      }\\n\\n      var items = [];\\n      var numOfItems = this.options_.total;\\n      var index = playlist.currentIndex();\\n      var source = playlist.list()[index];\\n      items.push(source);\\n\\n      while (items.length < numOfItems) {\\n        index = playlist.nextIndex(index);\\n\\n        if (index === -1) {\\n          if (!repeat && items.length > 0) {\\n            break;\\n          }\\n\\n          index = 0;\\n        }\\n\\n        source = playlist.list()[index];\\n        items.push(source);\\n      }\\n\\n      return items;\\n    }\\n  }, {\\n    key: \\\"render\\\",\\n    value: function render() {\\n      var _this2 = this;\\n\\n      var items = this.getItems();\\n      this.removeAll();\\n      items.forEach(function (source, index) {\\n        var playlistItem = new _playlistPanelItem.default(_this2.player(), _video.default.mergeOptions(_this2.options_, {\\n          item: source,\\n          next: index === 1,\\n          current: index === 0\\n        }));\\n\\n        _this2.addChild(playlistItem);\\n      });\\n    }\\n  }]);\\n\\n  return PlaylistPanel;\\n}(Component);\\n\\n_video.default.registerComponent('playlistPanel', PlaylistPanel);\\n\\nvar _default = PlaylistPanel;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/panel/playlist-panel.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/playlist-widget.js\":\n/*!************************************************!*\\\n  !*** ./components/playlist/playlist-widget.js ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _playlistLayoutHorizontal = _interopRequireDefault(__webpack_require__(/*! ./layout/playlist-layout-horizontal */ \\\"./components/playlist/layout/playlist-layout-horizontal.js\\\"));\\n\\nvar _playlistLayoutVertical = _interopRequireDefault(__webpack_require__(/*! ./layout/playlist-layout-vertical */ \\\"./components/playlist/layout/playlist-layout-vertical.js\\\"));\\n\\nvar _playlistLayoutCustom = _interopRequireDefault(__webpack_require__(/*! ./layout/playlist-layout-custom */ \\\"./components/playlist/layout/playlist-layout-custom.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\\n\\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\\n\\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\\n\\nvar OPTIONS_DEFAULTS = {\\n  fluid: false,\\n  show: true,\\n  direction: 'vertical',\\n  total: 4,\\n  selector: false,\\n  renderTo: []\\n};\\n\\nvar modifyOptions = function modifyOptions(player, opt) {\\n  var options = _objectSpread(_objectSpread({}, OPTIONS_DEFAULTS), opt);\\n\\n  if (options.show && typeof options.selector === 'string') {\\n    options.useDefaultLayout = false;\\n    options.useCustomLayout = true;\\n    options.renderTo = document.querySelector(options.selector);\\n    options.showAll = true;\\n\\n    if (!options.renderTo.length === 0) {\\n      throw new Error(\\\"Couldn't find element(s) by selector '\\\".concat(options.selector, \\\"' for playlist\\\"));\\n    }\\n  }\\n\\n  if (options.show && !options.selector) {\\n    options.useDefaultLayout = true;\\n    options.useCustomLayout = false;\\n  }\\n\\n  options.direction = options.direction.toLowerCase() === 'horizontal' ? 'horizontal' : 'vertical';\\n  options.skin = player.options_.skin;\\n  return options;\\n};\\n\\nvar PlaylistWidget = /*#__PURE__*/function () {\\n  function PlaylistWidget(player) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, PlaylistWidget);\\n\\n    options = modifyOptions(player, options);\\n    this.options_ = options;\\n    this.player_ = player;\\n    this.render();\\n\\n    var fluidHandler = function fluidHandler(e, fluid) {\\n      _this.options_.fluid = fluid;\\n    };\\n\\n    player.on('fluid', fluidHandler);\\n\\n    this.options = function (options) {\\n      if (!options) {\\n        return _this.options_;\\n      }\\n\\n      _this.options_ = _video.default.mergeOptions(_this.options_, options);\\n      player.trigger('playlistwidgetoption', _this.options_.playlistWidget);\\n      return _this.options_;\\n    };\\n\\n    this.dispose = function () {\\n      _this.layout_.dispose();\\n\\n      player.off('fluid', fluidHandler);\\n    };\\n  }\\n\\n  _createClass(PlaylistWidget, [{\\n    key: \\\"render\\\",\\n    value: function render() {\\n      if (this.options_.useDefaultLayout) {\\n        if (this.options_.direction === 'horizontal') {\\n          this.layout_ = new _playlistLayoutHorizontal.default(this.player_, this.options_);\\n        } else {\\n          this.layout_ = new _playlistLayoutVertical.default(this.player_, this.options_);\\n        }\\n      }\\n\\n      if (this.options_.useCustomLayout) {\\n        this.layout_ = new _playlistLayoutCustom.default(this.player_, this.options_);\\n      }\\n    }\\n  }, {\\n    key: \\\"getLayout\\\",\\n    value: function getLayout() {\\n      return this.layout_;\\n    }\\n  }, {\\n    key: \\\"update\\\",\\n    value: function update(optionName, optionValue) {\\n      this.options(optionValue);\\n\\n      if (optionName === 'direction') {\\n        this.layout_.removeLayout();\\n        this.layout_.dispose();\\n        this.render();\\n      } else {\\n        this.layout_.update(optionName, this.options_);\\n      }\\n    }\\n  }, {\\n    key: \\\"setSkin\\\",\\n    value: function setSkin() {\\n      this.layout_.setCls();\\n    }\\n  }, {\\n    key: \\\"total\\\",\\n    value: function total() {\\n      var _total = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : OPTIONS_DEFAULTS.total;\\n\\n      _total = parseInt(_total, 10);\\n\\n      if (_total !== this.options_.total && typeof _total === 'number' && _total > 0) {\\n        this.update('total', {\\n          total: _total\\n        });\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"direction\\\",\\n    value: function direction() {\\n      var _direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : OPTIONS_DEFAULTS.direction;\\n\\n      if (_direction === 'horizontal' || _direction === 'vertical') {\\n        this.update('direction', {\\n          direction: _direction\\n        });\\n      }\\n\\n      return this;\\n    }\\n  }]);\\n\\n  return PlaylistWidget;\\n}();\\n\\nvar _default = PlaylistWidget;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/playlist-widget.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/playlist.js\":\n/*!*****************************************!*\\\n  !*** ./components/playlist/playlist.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! plugins/cloudinary/models/video-source */ \\\"./plugins/cloudinary/models/video-source.js\\\"));\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \\\"./utils/type-inference.js\\\");\\n\\n__webpack_require__(/*! components/playlist/components/upcoming-video-overlay */ \\\"./components/playlist/components/upcoming-video-overlay.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar DEFAULT_AUTO_ADVANCE = 0;\\nvar DEFAULT_PRESENT_UPCOMING = 10;\\nvar UPCOMING_VIDEO_TRANSITION = 1;\\n\\nvar Playlist = /*#__PURE__*/function () {\\n  function Playlist(context) {\\n    var _this = this;\\n\\n    var sources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\\n\\n    var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\\n        _ref$repeat = _ref.repeat,\\n        repeat = _ref$repeat === void 0 ? false : _ref$repeat,\\n        _ref$autoAdvance = _ref.autoAdvance,\\n        autoAdvance = _ref$autoAdvance === void 0 ? false : _ref$autoAdvance,\\n        _ref$presentUpcoming = _ref.presentUpcoming,\\n        presentUpcoming = _ref$presentUpcoming === void 0 ? false : _ref$presentUpcoming;\\n\\n    _classCallCheck(this, Playlist);\\n\\n    var _context = context;\\n    var _sources = [];\\n    var _currentIndex = null;\\n    var _autoAdvance = null;\\n    var _presentUpcoming = null;\\n    var _defaultRecResolverCache = {};\\n    var _recommendationsHandler = null;\\n\\n    this.enqueue = function (source) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      var src = source instanceof _videoSource.default ? source : buildSource(source, options);\\n\\n      _sources.push(src);\\n\\n      return src;\\n    };\\n\\n    this.currentIndex = function (index) {\\n      if (index === undefined) {\\n        return _currentIndex;\\n      }\\n\\n      if (index >= _this.length() || index < 0) {\\n        throw new Error('Invalid playlist index.');\\n      }\\n\\n      _currentIndex = index;\\n\\n      var current = _this.currentSource();\\n\\n      var itemBuilder = recommendationItemBuilder(current);\\n\\n      if (!current.recommendations()) {\\n        current.recommendations(defaultRecommendationsResolver(current));\\n      }\\n\\n      _context.source(current, {\\n        recommendationOptions: {\\n          disableAutoShow: true,\\n          itemBuilder: itemBuilder\\n        }\\n      });\\n\\n      var eventData = {\\n        playlist: _this,\\n        current: current,\\n        next: _this.next()\\n      };\\n\\n      _this.player().trigger('playlistitemchanged', eventData);\\n\\n      refreshRecommendations();\\n      refreshTextTracks();\\n      return current;\\n    };\\n\\n    this.presentUpcoming = function (delay) {\\n      _presentUpcoming = _presentUpcoming || {};\\n\\n      if (delay === undefined) {\\n        return _presentUpcoming.delay;\\n      }\\n\\n      if (delay === true) {\\n        delay = DEFAULT_PRESENT_UPCOMING;\\n      } else if (delay === false) {\\n        delay = false;\\n      } else if (!(0, _typeInference.isInteger)(delay) || delay < 0) {\\n        throw new Error('presentUpcoming \\\\'delay\\\\' must be either a boolean or a positive integer.');\\n      }\\n\\n      _presentUpcoming.delay = delay;\\n      setupPresentUpcoming();\\n      return _presentUpcoming.delay;\\n    };\\n\\n    this.autoAdvance = function (delay) {\\n      _autoAdvance = _autoAdvance || {};\\n\\n      if (delay === undefined) {\\n        return _autoAdvance.delay;\\n      }\\n\\n      if (delay === true) {\\n        delay = DEFAULT_AUTO_ADVANCE;\\n      } else if (delay === false) {\\n        delay = false;\\n      } else if (!(0, _typeInference.isInteger)(delay) || delay < 0) {\\n        throw new Error('Auto advance \\\\'delay\\\\' must be either a boolean or a positive integer.');\\n      }\\n\\n      _autoAdvance.delay = delay;\\n      setupAutoAdvance();\\n      return _autoAdvance.delay;\\n    };\\n\\n    this.list = function () {\\n      return _sources;\\n    };\\n\\n    this.player = function () {\\n      return _context.player;\\n    };\\n\\n    this.dispose = function () {\\n      resetAutoAdvance();\\n      resetPresentUpcoming();\\n      resetRecommendations();\\n    };\\n\\n    this.resetState = function () {\\n      _this.repeat(repeat);\\n\\n      _this.autoAdvance(autoAdvance);\\n\\n      _this.presentUpcoming(presentUpcoming);\\n    };\\n\\n    var setupAutoAdvance = function setupAutoAdvance() {\\n      resetAutoAdvance();\\n      var delay = _autoAdvance.delay;\\n\\n      if (delay === false) {\\n        return;\\n      }\\n\\n      var trigger = function trigger() {\\n        if (_this.player().ended()) {\\n          _autoAdvance.timeout = setTimeout(function () {\\n            _this.playNext();\\n          }, delay * 1000);\\n        }\\n      };\\n\\n      _autoAdvance = {\\n        delay: delay,\\n        trigger: trigger\\n      };\\n\\n      _context.on('ended', _autoAdvance.trigger);\\n    };\\n\\n    var resetAutoAdvance = function resetAutoAdvance() {\\n      if (!_autoAdvance) {\\n        _autoAdvance = {};\\n      }\\n\\n      if (_autoAdvance.timeout) {\\n        clearTimeout(_autoAdvance.timeout);\\n      }\\n\\n      if (_autoAdvance.trigger) {\\n        _context.off('ended', _autoAdvance.trigger);\\n      }\\n\\n      _autoAdvance.timeout = null;\\n      _autoAdvance.trigger = null;\\n    };\\n\\n    var setupPresentUpcoming = function setupPresentUpcoming() {\\n      resetPresentUpcoming();\\n      var delay = _presentUpcoming.delay;\\n\\n      if (delay === false) {\\n        return;\\n      }\\n\\n      _presentUpcoming.trigger = function () {\\n        var currentTime = _this.player().currentTime();\\n\\n        var duration = _this.player().duration();\\n\\n        var remainingTime = duration - currentTime;\\n\\n        if (remainingTime < UPCOMING_VIDEO_TRANSITION + 0.5) {\\n          if (_presentUpcoming.showTriggered) {\\n            _this.player().trigger('upcomingvideohide');\\n\\n            _presentUpcoming.showTriggered = false;\\n          }\\n        } else if (remainingTime <= _presentUpcoming.delay && !_presentUpcoming.showTriggered && !_this.player().loop()) {\\n          _this.player().trigger('upcomingvideoshow');\\n\\n          _presentUpcoming.showTriggered = true;\\n        } else if (_presentUpcoming.showTriggered && (remainingTime > _presentUpcoming.delay || _this.player().loop())) {\\n          _this.player().trigger('upcomingvideohide');\\n\\n          _presentUpcoming.showTriggered = false;\\n        }\\n      };\\n\\n      _context.on('timeupdate', _presentUpcoming.trigger);\\n    };\\n\\n    var resetPresentUpcoming = function resetPresentUpcoming() {\\n      _this.player().trigger('upcomingvideohide');\\n\\n      if (!_presentUpcoming) {\\n        _presentUpcoming = {};\\n      }\\n\\n      if (_presentUpcoming.trigger) {\\n        _context.off('timeupdate', _presentUpcoming.trigger);\\n      }\\n\\n      _presentUpcoming.trigger = null;\\n      _presentUpcoming.showTriggered = false;\\n    };\\n\\n    var resetRecommendations = function resetRecommendations() {\\n      if (_recommendationsHandler) {\\n        _context.off('ended', _recommendationsHandler);\\n      }\\n    };\\n\\n    var refreshRecommendations = function refreshRecommendations() {\\n      resetRecommendations();\\n\\n      _recommendationsHandler = function _recommendationsHandler() {\\n        if (_this.autoAdvance() === false && _context.autoShowRecommendations()) {\\n          _this.player().trigger('recommendationsshow');\\n        }\\n      };\\n\\n      _context.on('ended', _recommendationsHandler);\\n    };\\n\\n    var recommendationItemBuilder = function recommendationItemBuilder(source) {\\n      var defaultResolver = _defaultRecResolverCache[source.objectId];\\n\\n      if (source.recommendations() && (!defaultResolver || source.recommendations() !== defaultResolver)) {\\n        return;\\n      }\\n\\n      return function (source) {\\n        return {\\n          source: source,\\n          action: function action() {\\n            return _this.playItem(source);\\n          }\\n        };\\n      };\\n    };\\n\\n    var defaultRecommendationsResolver = function defaultRecommendationsResolver(source) {\\n      var defaultResolver = _defaultRecResolverCache[source.objectId];\\n\\n      if (defaultResolver) {\\n        return defaultResolver;\\n      }\\n\\n      _defaultRecResolverCache[source.objectId] = function () {\\n        var index = _this.list().indexOf(source);\\n\\n        var items = [];\\n        var numOfItems = Math.min(4, _this.length() - 1);\\n\\n        while (items.length < numOfItems) {\\n          index = _this.nextIndex(index);\\n\\n          if (index === -1) {\\n            break;\\n          }\\n\\n          var _source = _this.list()[index];\\n\\n          items.push(_source);\\n        }\\n\\n        return items;\\n      };\\n\\n      return _defaultRecResolverCache[source.objectId];\\n    };\\n\\n    var refreshTextTracks = function refreshTextTracks() {\\n      _this.player().trigger('refreshTextTracks', _this.currentSource().textTracks());\\n    };\\n\\n    var buildSource = function buildSource(source) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return _context.buildSource(source, options);\\n    };\\n\\n    sources.forEach(function (source) {\\n      return _this.enqueue(source);\\n    });\\n    this.resetState();\\n  }\\n\\n  _createClass(Playlist, [{\\n    key: \\\"playItem\\\",\\n    value: function playItem(item) {\\n      var index = this.list().indexOf(item);\\n\\n      if (index === -1) {\\n        throw new Error('Invalid playlist item.');\\n      }\\n\\n      this.playAtIndex(index);\\n    }\\n  }, {\\n    key: \\\"playAtIndex\\\",\\n    value: function playAtIndex(index) {\\n      this.currentIndex(index);\\n      this.player().play();\\n      return this.currentSource();\\n    }\\n  }, {\\n    key: \\\"currentSource\\\",\\n    value: function currentSource() {\\n      return this.list()[this.currentIndex()];\\n    }\\n  }, {\\n    key: \\\"removeAt\\\",\\n    value: function removeAt(index) {\\n      if (index >= this.length() || index < 0) {\\n        throw new Error('Invalid playlist index.');\\n      }\\n\\n      this._sources.splice(index, 1);\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"repeat\\\",\\n    value: function repeat(_repeat) {\\n      if (_repeat === undefined) {\\n        return this._repeat;\\n      }\\n\\n      this._repeat = !!_repeat;\\n      return this._repeat;\\n    }\\n  }, {\\n    key: \\\"first\\\",\\n    value: function first() {\\n      return this.list()[0];\\n    }\\n  }, {\\n    key: \\\"last\\\",\\n    value: function last() {\\n      return this.list()[this.length() - 1];\\n    }\\n  }, {\\n    key: \\\"next\\\",\\n    value: function next() {\\n      var nextIndex = this.nextIndex();\\n\\n      if (nextIndex === -1) {\\n        return null;\\n      }\\n\\n      return this.list()[nextIndex];\\n    }\\n  }, {\\n    key: \\\"nextIndex\\\",\\n    value: function nextIndex(index) {\\n      index = index !== undefined ? index : this.currentIndex();\\n\\n      if (index >= this.length() || index < 0) {\\n        throw new Error('Invalid playlist index.');\\n      }\\n\\n      var isLast = index === this.length() - 1;\\n      var nextIndex = index + 1;\\n\\n      if (isLast) {\\n        if (this.repeat()) {\\n          nextIndex = 0;\\n        } else {\\n          return -1;\\n        }\\n      }\\n\\n      return nextIndex;\\n    }\\n  }, {\\n    key: \\\"previousIndex\\\",\\n    value: function previousIndex() {\\n      if (this.isFirst()) {\\n        return -1;\\n      }\\n\\n      return this.currentIndex() - 1;\\n    }\\n  }, {\\n    key: \\\"playFirst\\\",\\n    value: function playFirst() {\\n      return this.playAtIndex(0);\\n    }\\n  }, {\\n    key: \\\"playLast\\\",\\n    value: function playLast() {\\n      var lastIndex = this.list().length - 1;\\n      return this.playAtIndex(lastIndex);\\n    }\\n  }, {\\n    key: \\\"isLast\\\",\\n    value: function isLast() {\\n      return this.currentIndex() >= this.length() - 1;\\n    }\\n  }, {\\n    key: \\\"isFirst\\\",\\n    value: function isFirst() {\\n      return this.currentIndex() === 0;\\n    }\\n  }, {\\n    key: \\\"length\\\",\\n    value: function length() {\\n      return this.list().length;\\n    }\\n  }, {\\n    key: \\\"playNext\\\",\\n    value: function playNext() {\\n      var nextIndex = this.nextIndex();\\n\\n      if (nextIndex === -1) {\\n        return null;\\n      }\\n\\n      return this.playAtIndex(nextIndex);\\n    }\\n  }, {\\n    key: \\\"playPrevious\\\",\\n    value: function playPrevious() {\\n      var previousIndex = this.previousIndex();\\n\\n      if (previousIndex === -1) {\\n        return null;\\n      }\\n\\n      return this.playAtIndex(previousIndex);\\n    }\\n  }]);\\n\\n  return Playlist;\\n}();\\n\\nvar _default = Playlist;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/playlist.js?\");\n\n/***/ }),\n\n/***/ \"./components/playlist/thumbnail/thumbnail.js\":\n/*!****************************************************!*\\\n  !*** ./components/playlist/thumbnail/thumbnail.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! ../../../assets/styles/components/thumbnail.scss */ \\\"./assets/styles/components/thumbnail.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// Get the ClickableComponent base class from Video.js\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar THUMB_DEFAULT_WIDTH = 300;\\nvar DEFAULT_OPTIONS = {\\n  item: null,\\n  transformation: {\\n    width: THUMB_DEFAULT_WIDTH,\\n    aspect_ratio: '16:9',\\n    crop: 'pad',\\n    background: 'black'\\n  }\\n};\\n\\nvar Thumbnail = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(Thumbnail, _ClickableComponent);\\n\\n  var _super = _createSuper(Thumbnail);\\n\\n  function Thumbnail(player, options) {\\n    _classCallCheck(this, Thumbnail);\\n\\n    options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(Thumbnail, [{\\n    key: \\\"getItem\\\",\\n    value: function getItem() {\\n      return this.options_.item;\\n    }\\n  }, {\\n    key: \\\"getTitle\\\",\\n    value: function getTitle() {\\n      return this.getItem().info().title;\\n    }\\n  }, {\\n    key: \\\"getDuration\\\",\\n    value: function getDuration() {\\n      return ' '; // this.getItem().info().title;\\n    }\\n  }, {\\n    key: \\\"getThumbnail\\\",\\n    value: function getThumbnail() {\\n      return this.getItem().poster().url({\\n        transformation: this.options_.transformation\\n      });\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(e) {\\n      e.preventDefault();\\n    }\\n  }, {\\n    key: \\\"createControlTextEl\\\",\\n    value: function createControlTextEl() {\\n      return;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'a';\\n\\n      var el = _get(_getPrototypeOf(Thumbnail.prototype), \\\"createEl\\\", this).call(this, tag, {\\n        className: 'cld-thumbnail',\\n        href: '#'\\n      });\\n\\n      var img = _get(_getPrototypeOf(Thumbnail.prototype), \\\"createEl\\\", this).call(this, 'img', {\\n        className: 'cld-thumbnail-img',\\n        src: this.getThumbnail()\\n      });\\n\\n      el.appendChild(img);\\n      el.style.backgroundImage = \\\"url('\\\".concat(this.getThumbnail(), \\\"')\\\");\\n      return el;\\n    }\\n  }]);\\n\\n  return Thumbnail;\\n}(ClickableComponent);\\n\\nvar _default = Thumbnail;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/thumbnail/thumbnail.js?\");\n\n/***/ }),\n\n/***/ \"./components/progress-control-events-blocker/progress-control-events-blocker.js\":\n/*!***************************************************************************************!*\\\n  !*** ./components/progress-control-events-blocker/progress-control-events-blocker.js ***!\n  \\***************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ProgressControlEventsBlocker = /*#__PURE__*/function (_Component) {\\n  _inherits(ProgressControlEventsBlocker, _Component);\\n\\n  var _super = _createSuper(ProgressControlEventsBlocker);\\n\\n  function ProgressControlEventsBlocker(player) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ProgressControlEventsBlocker);\\n\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(ProgressControlEventsBlocker, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ProgressControlEventsBlocker.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-progress-control-events-blocker'\\n      });\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ProgressControlEventsBlocker;\\n}(Component);\\n\\n_video.default.registerComponent('progressControlEventsBlocker', ProgressControlEventsBlocker);\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/progress-control-events-blocker/progress-control-events-blocker.js?\");\n\n/***/ }),\n\n/***/ \"./components/qualitySelector/quality-selector.scss\":\n/*!**********************************************************!*\\\n  !*** ./components/qualitySelector/quality-selector.scss ***!\n  \\**********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/qualitySelector/quality-selector.scss?\");\n\n/***/ }),\n\n/***/ \"./components/qualitySelector/qualitySelector.js\":\n/*!*******************************************************!*\\\n  !*** ./components/qualitySelector/qualitySelector.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar djs = _interopRequireWildcard(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\n__webpack_require__(/*! videojs-per-source-behaviors */ \\\"../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js\\\");\\n\\n__webpack_require__(/*! videojs-contrib-quality-levels */ \\\"../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\\\");\\n\\n__webpack_require__(/*! ../../plugins/videojs-http-source-selector/plugin */ \\\"./plugins/videojs-http-source-selector/plugin.js\\\");\\n\\nvar _find = __webpack_require__(/*! ../../utils/find */ \\\"./utils/find.js\\\");\\n\\n__webpack_require__(/*! ./quality-selector.scss */ \\\"./components/qualitySelector/quality-selector.scss\\\");\\n\\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \\\"function\\\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\\n\\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \\\"object\\\" && typeof obj !== \\\"function\\\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\\n\\nvar qualitySelector = {\\n  init: function init(player) {\\n    // Handle DASH sources, HLS are handled internally.\\n    if (player && player.qualityLevels && player.dash && player.dash.mediaPlayer) {\\n      var MediaPlayer = djs.default.MediaPlayer;\\n      player.dash.qualityLevels = player.qualityLevels();\\n\\n      player.dash.mediaPlayer.getAutoSwitchQualityFor = function (type) {\\n        var dashPlayer = player.dash.mediaPlayer;\\n        var settings = dashPlayer.getSettings();\\n\\n        if (settings) {\\n          return settings.streaming.abr.autoSwitchBitrate[type];\\n        }\\n\\n        return true;\\n      };\\n\\n      player.dash.mediaPlayer.setAutoSwitchQualityFor = function (type, val) {\\n        var dashPlayer = player.dash.mediaPlayer;\\n        var upSettings = {\\n          streaming: {\\n            abr: {\\n              autoSwitchBitrate: {}\\n            }\\n          }\\n        };\\n        upSettings.streaming.abr.autoSwitchBitrate[type] = val;\\n        dashPlayer.updateSettings(upSettings);\\n      }; // When loaded, build quality-level list.\\n\\n\\n      player.dash.mediaPlayer.on(MediaPlayer.events.PLAYBACK_METADATA_LOADED, function () {\\n        var videoRates = player.dash.mediaPlayer.getBitrateInfoListFor('video');\\n        var audioRates = player.dash.mediaPlayer.getBitrateInfoListFor('audio');\\n\\n        if (videoRates.length > 0) {\\n          var normalizeFactor = videoRates[videoRates.length - 1].bitrate;\\n          player.dash.audioMapper = videoRates.map(function (rate) {\\n            return Math.round(rate.bitrate / normalizeFactor * (audioRates.length - 1));\\n          });\\n          videoRates.forEach(function (vrate) {\\n            player.dash.qualityLevels.addQualityLevel({\\n              id: vrate.bitrate,\\n              width: vrate.width,\\n              height: vrate.height,\\n              bandwidth: vrate.bitrate,\\n              selected: true,\\n              enabled: function enabled(val) {\\n                var _this = this;\\n\\n                if (val !== undefined) {\\n                  this.selected = val;\\n\\n                  if (val === true) {\\n                    var selectedIdx = (0, _find.findIndex)(player.qualityLevels().levels_, function (l) {\\n                      return l.id === _this.id;\\n                    });\\n                    player.qualityLevels().selectedIndex_ = selectedIdx;\\n                    player.qualityLevels().trigger({\\n                      type: 'change',\\n                      selectedIndex: selectedIdx\\n                    });\\n                  }\\n                } else {\\n                  return this.selected !== undefined ? this.selected : true;\\n                }\\n              }\\n            });\\n          });\\n        }\\n      }); // Pass qualityLevels 'change' event into the DASH player.\\n\\n      player.qualityLevels().on('change', function (event) {\\n        var enabledQualities = player.dash.qualityLevels.levels_.filter(function (q) {\\n          return q.enabled;\\n        });\\n\\n        if (enabledQualities.length === 1) {\\n          player.dash.mediaPlayer.setQualityFor('video', event.selectedIndex);\\n          player.dash.mediaPlayer.setQualityFor('audio', player.dash.audioMapper[event.selectedIndex]);\\n        } else if (!player.dash.mediaPlayer.getAutoSwitchQualityFor('video')) {\\n          player.dash.mediaPlayer.setAutoSwitchQualityFor('video', true);\\n          player.dash.mediaPlayer.setAutoSwitchQualityFor('audio', true);\\n        }\\n      }); // Handle 'change' event on the DASH player\\n\\n      /*\\n      player.dash.mediaPlayer.on(\\n        MediaPlayer.events.QUALITY_CHANGE_REQUESTED,\\n        (event) => {\\n          if (event.mediaType === 'video') {\\n            player.dash.qualityLevels.selectedIndex_ = event.newQuality;\\n            player.dash.qualityLevels.trigger({\\n              selectedIndex: event.newQuality,\\n              type: 'change'\\n            });\\n          }\\n        }\\n      );\\n      */\\n    }\\n  },\\n  // Show selector only if more then one option available\\n  setVisibility: function setVisibility(player) {\\n    var sourceMenuButton = player.controlBar.getChild('sourceMenuButton');\\n\\n    if (sourceMenuButton) {\\n      var qualityLevels = player.qualityLevels();\\n\\n      if (qualityLevels && qualityLevels.length > 1) {\\n        var levels = qualityLevels.levels_.filter(function (q) {\\n          return q.enabled;\\n        });\\n\\n        if (levels.length === 1) {\\n          var idx = qualityLevels.levels_.findIndex(function (l) {\\n            return l.id === levels[0].id;\\n          });\\n          sourceMenuButton.children()[1].children()[idx].selected(true);\\n        } else {\\n          sourceMenuButton.children()[1].children()[0].selected(true);\\n          sourceMenuButton.children()[1].children().forEach(function (item, i) {\\n            if (i > 0) {\\n              item.selected(false);\\n            }\\n          });\\n        }\\n\\n        sourceMenuButton.show();\\n      } else {\\n        sourceMenuButton.hide();\\n      } // ToDo: if there are multiple sources with same height (i.e. 720p)\\n      // add a bitrate indicator to distinguish them.\\n      // Labels: 720p => 1280x720 @ 3500Kbps\\n      // sourceMenuButton.items.forEach((item) => {\\n      //   const level = qualityLevels.levels_.find(ql => ql.height + 'p' === item.options_.label);\\n      //   if (level) {\\n      //     item.el_.innerText = level.width + 'x' + level.height + (level.bitrate ? ' @ ' + (Math.round(level.bitrate / 100)) + 'Kbps' : '');\\n      //   }\\n      // });\\n\\n    }\\n  }\\n};\\nvar _default = qualitySelector;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/qualitySelector/qualitySelector.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/index.js\":\n/*!*****************************************************!*\\\n  !*** ./components/recommendations-overlay/index.js ***!\n  \\*****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _recommendationsOverlay = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay */ \\\"./components/recommendations-overlay/recommendations-overlay.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar _default = _recommendationsOverlay.default;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/index.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay-content.js\":\n/*!*******************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay-content.js ***!\n  \\*******************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _recommendationsOverlayPrimaryItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-primary-item */ \\\"./components/recommendations-overlay/recommendations-overlay-primary-item.js\\\"));\\n\\nvar _recommendationsOverlaySecondaryItemsContainer = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-secondary-items-container */ \\\"./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar RecommendationsOverlayContent = /*#__PURE__*/function (_Component) {\\n  _inherits(RecommendationsOverlayContent, _Component);\\n\\n  var _super = _createSuper(RecommendationsOverlayContent);\\n\\n  function RecommendationsOverlayContent(player) {\\n    var _this;\\n\\n    _classCallCheck(this, RecommendationsOverlayContent);\\n\\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n      args[_key - 1] = arguments[_key];\\n    }\\n\\n    _this = _super.call.apply(_super, [this, player].concat(args));\\n    _this._content = new AspectRatioContent(player);\\n\\n    _this.addChild(_this._content);\\n\\n    return _this;\\n  }\\n\\n  _createClass(RecommendationsOverlayContent, [{\\n    key: \\\"setItems\\\",\\n    value: function setItems(primary) {\\n      var _this$_content;\\n\\n      for (var _len2 = arguments.length, secondary = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n        secondary[_key2 - 1] = arguments[_key2];\\n      }\\n\\n      (_this$_content = this._content).setItems.apply(_this$_content, [primary].concat(secondary));\\n    }\\n  }, {\\n    key: \\\"clearItems\\\",\\n    value: function clearItems() {\\n      this._content._primary.clearItem();\\n\\n      this._content._secondaryContainer.clearItems();\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      return _get(_getPrototypeOf(RecommendationsOverlayContent.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-recommendations-overlay-content'\\n      });\\n    }\\n  }]);\\n\\n  return RecommendationsOverlayContent;\\n}(Component);\\n\\nvar AspectRatioContent = /*#__PURE__*/function (_Component2) {\\n  _inherits(AspectRatioContent, _Component2);\\n\\n  var _super2 = _createSuper(AspectRatioContent);\\n\\n  function AspectRatioContent(player) {\\n    var _this2;\\n\\n    _classCallCheck(this, AspectRatioContent);\\n\\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\\n      args[_key3 - 1] = arguments[_key3];\\n    }\\n\\n    _this2 = _super2.call.apply(_super2, [this, player].concat(args));\\n    _this2._primary = new _recommendationsOverlayPrimaryItem.default(player);\\n    _this2._secondaryContainer = new _recommendationsOverlaySecondaryItemsContainer.default(player);\\n\\n    _this2.addChild(_this2._primary);\\n\\n    _this2.addChild(_this2._secondaryContainer);\\n\\n    return _this2;\\n  }\\n\\n  _createClass(AspectRatioContent, [{\\n    key: \\\"setItems\\\",\\n    value: function setItems(primary) {\\n      var _this$_secondaryConta;\\n\\n      this._primary.setItem(primary);\\n\\n      for (var _len4 = arguments.length, secondary = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\\n        secondary[_key4 - 1] = arguments[_key4];\\n      }\\n\\n      (_this$_secondaryConta = this._secondaryContainer).setItems.apply(_this$_secondaryConta, secondary);\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      return _get(_getPrototypeOf(AspectRatioContent.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'aspect-ratio-content'\\n      });\\n    }\\n  }]);\\n\\n  return AspectRatioContent;\\n}(Component);\\n\\nvar _default = RecommendationsOverlayContent;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-content.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay-hide-button.js\":\n/*!***********************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay-hide-button.js ***!\n  \\***********************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar RecommendationOverlayHideButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(RecommendationOverlayHideButton, _ClickableComponent);\\n\\n  var _super = _createSuper(RecommendationOverlayHideButton);\\n\\n  function RecommendationOverlayHideButton() {\\n    _classCallCheck(this, RecommendationOverlayHideButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationOverlayHideButton, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationOverlayHideButton.prototype), \\\"createEl\\\", this).call(this, 'span', {\\n        className: 'vjs-recommendations-overlay-hide vjs-icon-close'\\n      });\\n\\n      return el;\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      this.options_.clickHandler();\\n    }\\n  }]);\\n\\n  return RecommendationOverlayHideButton;\\n}(ClickableComponent);\\n\\nvar _default = RecommendationOverlayHideButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-hide-button.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay-item.js\":\n/*!****************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay-item.js ***!\n  \\****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar RecommendationsOverlayItem = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(RecommendationsOverlayItem, _ClickableComponent);\\n\\n  var _super = _createSuper(RecommendationsOverlayItem);\\n\\n  function RecommendationsOverlayItem() {\\n    _classCallCheck(this, RecommendationsOverlayItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlayItem, [{\\n    key: \\\"setItem\\\",\\n    value: function setItem(item) {\\n      var action = item.action,\\n          source = item.source;\\n      this.source = source;\\n      var info = source.info();\\n      this.setTitle(info.title || source.publicId());\\n      this.setPoster(this.source.poster().url({\\n        transformation: {\\n          aspect_ratio: '16:9',\\n          crop: 'pad',\\n          background: 'black'\\n        }\\n      }));\\n      this.setAction(action);\\n    }\\n  }, {\\n    key: \\\"setTitle\\\",\\n    value: function setTitle(text) {\\n      this.title.innerText = text;\\n    }\\n  }, {\\n    key: \\\"setAction\\\",\\n    value: function setAction(action) {\\n      this.action = action;\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(RecommendationsOverlayItem.prototype), \\\"handleClick\\\", this).call(this);\\n\\n      this.player().trigger('recommendationshide');\\n      this.action();\\n    }\\n  }]);\\n\\n  return RecommendationsOverlayItem;\\n}(ClickableComponent);\\n\\nvar _default = RecommendationsOverlayItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-item.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay-primary-item.js\":\n/*!************************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay-primary-item.js ***!\n  \\************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _recommendationsOverlayItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-item */ \\\"./components/recommendations-overlay/recommendations-overlay-item.js\\\"));\\n\\nvar _componentUtils = _interopRequireDefault(__webpack_require__(/*! ../component-utils */ \\\"./components/component-utils.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar RecommendationsOverlayPrimaryItem = /*#__PURE__*/function (_RecommendationsOverl) {\\n  _inherits(RecommendationsOverlayPrimaryItem, _RecommendationsOverl);\\n\\n  var _super = _createSuper(RecommendationsOverlayPrimaryItem);\\n\\n  function RecommendationsOverlayPrimaryItem() {\\n    _classCallCheck(this, RecommendationsOverlayPrimaryItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlayPrimaryItem, [{\\n    key: \\\"setItem\\\",\\n    value: function setItem(item) {\\n      _get(_getPrototypeOf(RecommendationsOverlayPrimaryItem.prototype), \\\"setItem\\\", this).call(this, item);\\n\\n      var info = this.source.info();\\n      this.setTitle(info.title);\\n      this.setSubtitle(info.subtitle);\\n\\n      if (info.description) {\\n        var descLength = 300;\\n        var description = info.description.length > descLength ? info.description.substring(0, descLength) + '...' : info.description;\\n        this.setDescription(description);\\n      }\\n    }\\n  }, {\\n    key: \\\"setPoster\\\",\\n    value: function setPoster(url) {\\n      this.poster.style.backgroundImage = \\\"url('\\\".concat(url, \\\"')\\\");\\n    }\\n  }, {\\n    key: \\\"setTitle\\\",\\n    value: function setTitle(text) {\\n      _componentUtils.default.setText(this.title, text);\\n    }\\n  }, {\\n    key: \\\"setSubtitle\\\",\\n    value: function setSubtitle(text) {\\n      _componentUtils.default.setText(this.subtitle, text);\\n    }\\n  }, {\\n    key: \\\"setDescription\\\",\\n    value: function setDescription(text) {\\n      _componentUtils.default.setText(this.description, text);\\n    }\\n  }, {\\n    key: \\\"clearItem\\\",\\n    value: function clearItem() {\\n      this.setTitle('');\\n      this.setSubtitle('');\\n      this.setDescription('');\\n      this.poster.style.backgroundImage = null;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationsOverlayPrimaryItem.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-recommendations-overlay-item vjs-recommendations-overlay-item-primary'\\n      });\\n\\n      this.poster = dom.createEl('div', {\\n        className: 'vjs-recommendations-overlay-item-primary-image'\\n      });\\n      this.title = dom.createEl('h2');\\n      this.title.innerHTML = '';\\n      this.subtitle = dom.createEl('h3');\\n      this.subtitle.innerHTML = '';\\n      this.description = dom.createEl('p');\\n      this.description.innerHTML = '';\\n      this.content = dom.createEl('div', {\\n        className: 'vjs-recommendations-overlay-item-info vjs-recommendations-overlay-item-primary-content'\\n      });\\n      this.content.appendChild(this.title);\\n      this.content.appendChild(this.subtitle);\\n      this.content.appendChild(this.description);\\n      el.appendChild(this.poster);\\n      el.appendChild(this.content);\\n      return el;\\n    }\\n  }]);\\n\\n  return RecommendationsOverlayPrimaryItem;\\n}(_recommendationsOverlayItem.default);\\n\\nvar _default = RecommendationsOverlayPrimaryItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-primary-item.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay-secondary-item.js\":\n/*!**************************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay-secondary-item.js ***!\n  \\**************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _recommendationsOverlayItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-item */ \\\"./components/recommendations-overlay/recommendations-overlay-item.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar RecommendationsOverlaySecondaryItem = /*#__PURE__*/function (_RecommendationsOverl) {\\n  _inherits(RecommendationsOverlaySecondaryItem, _RecommendationsOverl);\\n\\n  var _super = _createSuper(RecommendationsOverlaySecondaryItem);\\n\\n  function RecommendationsOverlaySecondaryItem() {\\n    _classCallCheck(this, RecommendationsOverlaySecondaryItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlaySecondaryItem, [{\\n    key: \\\"setItem\\\",\\n    value: function setItem(item) {\\n      _get(_getPrototypeOf(RecommendationsOverlaySecondaryItem.prototype), \\\"setItem\\\", this).call(this, item);\\n\\n      this.setDuration('');\\n    }\\n  }, {\\n    key: \\\"setPoster\\\",\\n    value: function setPoster(url) {\\n      this.el().style.backgroundImage = \\\"url('\\\".concat(url, \\\"')\\\");\\n    }\\n  }, {\\n    key: \\\"setDuration\\\",\\n    value: function setDuration(text) {\\n      this.duration.innerText = text;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationsOverlaySecondaryItem.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-recommendations-overlay-item vjs-recommendations-overlay-item-secondary'\\n      });\\n\\n      this.title = dom.createEl('span', {\\n        className: 'vjs-recommendations-overlay-item-secondary-title'\\n      });\\n      this.title.innerHTML = '';\\n      this.duration = dom.createEl('span', {\\n        className: 'vjs-recommendations-overlay-item-secondary-duration'\\n      });\\n      this.duration.innerHTML = '';\\n      var caption = dom.createEl('div', {\\n        className: 'vjs-recommendations-overlay-item-info'\\n      });\\n      caption.appendChild(this.title);\\n      caption.appendChild(this.duration);\\n      el.appendChild(caption);\\n      return el;\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(RecommendationsOverlaySecondaryItem.prototype), \\\"handleClick\\\", this).call(this);\\n\\n      this.action();\\n    }\\n  }]);\\n\\n  return RecommendationsOverlaySecondaryItem;\\n}(_recommendationsOverlayItem.default);\\n\\nvar _default = RecommendationsOverlaySecondaryItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-secondary-item.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js\":\n/*!*************************************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js ***!\n  \\*************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _recommendationsOverlaySecondaryItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-secondary-item */ \\\"./components/recommendations-overlay/recommendations-overlay-secondary-item.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar RecommendationsOverlaySecondaryItemsContainer = /*#__PURE__*/function (_Component) {\\n  _inherits(RecommendationsOverlaySecondaryItemsContainer, _Component);\\n\\n  var _super = _createSuper(RecommendationsOverlaySecondaryItemsContainer);\\n\\n  function RecommendationsOverlaySecondaryItemsContainer() {\\n    _classCallCheck(this, RecommendationsOverlaySecondaryItemsContainer);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlaySecondaryItemsContainer, [{\\n    key: \\\"setItems\\\",\\n    value: function setItems() {\\n      var _this = this;\\n\\n      for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {\\n        items[_key] = arguments[_key];\\n      }\\n\\n      this.clearItems();\\n\\n      if (!items) {\\n        return;\\n      }\\n\\n      items.forEach(function (item) {\\n        var component = new _recommendationsOverlaySecondaryItem.default(_this.player());\\n        component.setItem(item);\\n\\n        _this.addChild(component);\\n      });\\n    }\\n  }, {\\n    key: \\\"clearItems\\\",\\n    value: function clearItems() {\\n      var childrenSize = this.children().length;\\n\\n      for (var i = 0; i < childrenSize; ++i) {\\n        this.removeChild(this.children()[0]);\\n      }\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      return _get(_getPrototypeOf(RecommendationsOverlaySecondaryItemsContainer.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-recommendations-overlay-item-secondary-container'\\n      });\\n    }\\n  }]);\\n\\n  return RecommendationsOverlaySecondaryItemsContainer;\\n}(Component);\\n\\nvar _default = RecommendationsOverlaySecondaryItemsContainer;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay.js\":\n/*!***********************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _recommendationsOverlayContent = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-content */ \\\"./components/recommendations-overlay/recommendations-overlay-content.js\\\"));\\n\\nvar _recommendationsOverlayHideButton = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-hide-button */ \\\"./components/recommendations-overlay/recommendations-overlay-hide-button.js\\\"));\\n\\n__webpack_require__(/*! ./recommendations-overlay.scss */ \\\"./components/recommendations-overlay/recommendations-overlay.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\\n\\nfunction _nonIterableSpread() { throw new TypeError(\\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _iterableToArray(iter) { if (typeof Symbol !== \\\"undefined\\\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\\n\\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MAXIMUM_ITEMS = 4;\\n\\nvar Component = _video.default.getComponent('Component'); // TODO: Use Video.js's ModalDialog instead. It handles clicking block logic.\\n\\n\\nvar RecommendationsOverlay = /*#__PURE__*/function (_Component) {\\n  _inherits(RecommendationsOverlay, _Component);\\n\\n  var _super = _createSuper(RecommendationsOverlay);\\n\\n  function RecommendationsOverlay(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, RecommendationsOverlay);\\n\\n    for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\\n      args[_key - 2] = arguments[_key];\\n    }\\n\\n    _this = _super.call.apply(_super, [this, player].concat(args));\\n    _this._content = new _recommendationsOverlayContent.default(player);\\n\\n    _this.addChild(_this._content);\\n\\n    _this.addChild(_construct(_recommendationsOverlayHideButton.default, [player, {\\n      clickHandler: function clickHandler() {\\n        _this.close();\\n      }\\n    }].concat(args)));\\n\\n    _this.on(player, 'recommendationschanged', function (_, eventData) {\\n      var _this2;\\n\\n      (_this2 = _this).setItems.apply(_this2, _toConsumableArray(eventData.items));\\n    });\\n\\n    _this.on(player, 'recommendationsnoshow', _this.setDoNotOpen);\\n\\n    _this.on(player, 'recommendationsshow', _this.open);\\n\\n    _this.on(player, 'recommendationshide', _this.close);\\n\\n    _this.on(player, 'cldsourcechanged', function () {\\n      _this.clearItems();\\n\\n      _this.close();\\n    });\\n\\n    _this.doNotOpen = false;\\n    return _this;\\n  }\\n\\n  _createClass(RecommendationsOverlay, [{\\n    key: \\\"setDoNotOpen\\\",\\n    value: function setDoNotOpen() {\\n      this.doNotOpen = true;\\n    }\\n  }, {\\n    key: \\\"open\\\",\\n    value: function open() {\\n      if (!this.doNotOpen) {\\n        // Only show controls on close if they were visible from the first place\\n        this._showControlsOnClose = this.player().controls();\\n        this.player().controls(false);\\n        this.el().style.visibility = 'visible';\\n      }\\n    }\\n  }, {\\n    key: \\\"clearItems\\\",\\n    value: function clearItems() {\\n      this._content.clearItems();\\n    }\\n  }, {\\n    key: \\\"close\\\",\\n    value: function close() {\\n      this.el().style.visibility = 'hidden';\\n\\n      if (this._showControlsOnClose) {\\n        this.player().controls(true);\\n      }\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationsOverlay.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-recommendations-overlay'\\n      });\\n\\n      _video.default.dom.addClass(el, 'vjs-recommendations-overlay');\\n\\n      return el;\\n    }\\n  }, {\\n    key: \\\"setItems\\\",\\n    value: function setItems(primary) {\\n      var _this$_content;\\n\\n      for (var _len2 = arguments.length, secondary = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n        secondary[_key2 - 1] = arguments[_key2];\\n      }\\n\\n      this.doNotOpen = false;\\n      secondary = secondary.slice(0, MAXIMUM_ITEMS - 1);\\n\\n      (_this$_content = this._content).setItems.apply(_this$_content, [primary].concat(_toConsumableArray(secondary)));\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      this.stopPropagation();\\n    }\\n  }, {\\n    key: \\\"dispose\\\",\\n    value: function dispose() {\\n      _get(_getPrototypeOf(RecommendationsOverlay.prototype), \\\"dispose\\\", this).call(this);\\n    }\\n  }]);\\n\\n  return RecommendationsOverlay;\\n}(Component);\\n\\n_video.default.registerComponent('recommendationsOverlay', RecommendationsOverlay);\\n\\nvar _default = RecommendationsOverlay;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay.js?\");\n\n/***/ }),\n\n/***/ \"./components/recommendations-overlay/recommendations-overlay.scss\":\n/*!*************************************************************************!*\\\n  !*** ./components/recommendations-overlay/recommendations-overlay.scss ***!\n  \\*************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay.scss?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/layout/bar-layout.js\":\n/*!*******************************************************!*\\\n  !*** ./components/shoppable-bar/layout/bar-layout.js ***!\n  \\*******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _matches = __webpack_require__(/*! utils/matches */ \\\"./utils/matches.js\\\");\\n\\nvar _shoppableProductsOverlay = _interopRequireDefault(__webpack_require__(/*! ./shoppable-products-overlay */ \\\"./components/shoppable-bar/layout/shoppable-products-overlay.js\\\"));\\n\\nvar _shoppablePanelToggle = _interopRequireDefault(__webpack_require__(/*! ./shoppable-panel-toggle */ \\\"./components/shoppable-bar/layout/shoppable-panel-toggle.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ShoppableBarLayout = /*#__PURE__*/function (_Component) {\\n  _inherits(ShoppableBarLayout, _Component);\\n\\n  var _super = _createSuper(ShoppableBarLayout);\\n\\n  function ShoppableBarLayout(player, options) {\\n    var _thisSuper, _this;\\n\\n    _classCallCheck(this, ShoppableBarLayout);\\n\\n    _this = _super.call(this, player, options);\\n    _this.player_ = player;\\n\\n    _this.player().addClass('cld-shoppable-panel');\\n\\n    _this.player().addClass('shoppable-panel-hidden');\\n\\n    _this.contentWrpEl_ = dom.createEl('div', {\\n      className: 'cld-spbl-bar'\\n    });\\n    _this.contentBannerEl_ = dom.createEl('div', {\\n      className: 'cld-spbl-banner-msg base-color-text'\\n    }, {}, _this.options_.bannerMsg || 'Shop the Video');\\n\\n    _this.contentWrpEl_.appendChild(_this.contentBannerEl_);\\n\\n    var productsOverlay = new _shoppableProductsOverlay.default(_this.player_, _this.options_);\\n\\n    _this.contentWrpEl_.appendChild(productsOverlay.el_);\\n\\n    _this.contentEl_ = dom.createEl('div', {\\n      className: 'cld-spbl-bar-inner'\\n    });\\n\\n    _this.contentWrpEl_.appendChild(_this.contentEl_);\\n\\n    _this.player().el().appendChild(_this.contentWrpEl_);\\n\\n    _this.addChild(new _shoppablePanelToggle.default(_this.player_, {\\n      toggleIcon: _this.options_.toggleIcon,\\n      clickHandler: function clickHandler() {\\n        _this.togglePanel();\\n      }\\n    }));\\n\\n    _this.addChild('ShoppablePanel', _this.options_);\\n\\n    _this.dispose = function () {\\n      _this.removeLayout();\\n\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(ShoppableBarLayout.prototype)), \\\"dispose\\\", _thisSuper).call(_thisSuper);\\n    };\\n\\n    _this.togglePanel = function (open) {\\n      if (open === true) {\\n        // Open\\n        _this.player().removeClass('shoppable-panel-hidden');\\n\\n        _this.player().addClass('shoppable-panel-visible');\\n      } else if (open === false) {\\n        // Close\\n        _this.player().removeClass('shoppable-panel-visible');\\n\\n        _this.player().addClass('shoppable-panel-hidden');\\n      } else {\\n        // Toggle\\n        _this.player().toggleClass('shoppable-panel-hidden');\\n\\n        _this.player().toggleClass('shoppable-panel-visible');\\n      }\\n\\n      var eventName = _this.player().hasClass('shoppable-panel-visible') ? 'productBarMax' : 'productBarMin';\\n\\n      _this.player().trigger(eventName);\\n    }; // Open shoppable\\n\\n\\n    if (_this.options_.startState === 'open') {\\n      _this.togglePanel(true);\\n    } // On play start\\n\\n\\n    _this.player_.on('play', function () {\\n      if (_this.player_.currentTime() < 0.01) {\\n        // Open shoppable on-play\\n        if (_this.options_.startState === 'openOnPlay') {\\n          _this.togglePanel(true, _this.options_.autoClose);\\n        } // Auto-close shoppable\\n\\n\\n        if (_this.options_.autoClose && _this.options_.startState.indexOf('open') !== -1) {\\n          setTimeout(function () {\\n            // Keep it open while hovered\\n            if (!(0, _matches.elMatches)(_this.contentEl_, ':hover')) {\\n              _this.togglePanel(false);\\n            } else {\\n              _this.contentEl_.addEventListener('mouseleave', function () {\\n                _this.togglePanel(false);\\n              }, {\\n                once: true\\n              });\\n            }\\n          }, _this.options_.autoClose * 1000);\\n        }\\n      }\\n    });\\n\\n    return _this;\\n  }\\n\\n  _createClass(ShoppableBarLayout, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ShoppableBarLayout.prototype), \\\"createEl\\\", this).call(this, 'div');\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ShoppableBarLayout;\\n}(Component);\\n\\n_video.default.registerComponent('shoppableBarLayout', ShoppableBarLayout);\\n\\nvar _default = ShoppableBarLayout;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/layout/bar-layout.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/layout/shoppable-panel-toggle.js\":\n/*!*******************************************************************!*\\\n  !*** ./components/shoppable-bar/layout/shoppable-panel-toggle.js ***!\n  \\*******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar ShoppablePanelToggle = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(ShoppablePanelToggle, _ClickableComponent);\\n\\n  var _super = _createSuper(ShoppablePanelToggle);\\n\\n  function ShoppablePanelToggle(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, ShoppablePanelToggle);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options_ = options;\\n    return _this;\\n  }\\n\\n  _createClass(ShoppablePanelToggle, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(event) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.options_.clickHandler();\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var iconProps = {};\\n      var iconAttrs = {};\\n\\n      if (this.options_.toggleIcon) {\\n        iconProps = {\\n          className: 'cld-spbl-toggle-icon cld-spbl-toggle-custom-icon vjs-icon-close'\\n        };\\n        iconAttrs = {\\n          style: \\\"background-image: url(\\\".concat(this.options_.toggleIcon, \\\")\\\")\\n        };\\n      } else {\\n        iconProps = {\\n          className: 'cld-spbl-toggle-icon vjs-icon-cart'\\n        };\\n      }\\n\\n      var icon = dom.createEl('span', iconProps, iconAttrs);\\n\\n      var el = _get(_getPrototypeOf(ShoppablePanelToggle.prototype), \\\"createEl\\\", this).call(this, 'a', {\\n        className: 'cld-spbl-toggle base-color-bg'\\n      });\\n\\n      el.appendChild(icon);\\n      this.player_.on('productBarMin', function () {\\n        setTimeout(function () {\\n          icon.classList.add('animate');\\n          setTimeout(function () {\\n            icon.classList.remove('animate');\\n          }, 1000);\\n        }, 500);\\n      });\\n      return el;\\n    }\\n  }]);\\n\\n  return ShoppablePanelToggle;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent('shoppablePanelToggle', ShoppablePanelToggle);\\n\\nvar _default = ShoppablePanelToggle;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/layout/shoppable-panel-toggle.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/layout/shoppable-products-overlay.js\":\n/*!***********************************************************************!*\\\n  !*** ./components/shoppable-bar/layout/shoppable-products-overlay.js ***!\n  \\***********************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _time = __webpack_require__(/*! utils/time */ \\\"./utils/time.js\\\");\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ShoppableProductsOverlay = /*#__PURE__*/function (_Component) {\\n  _inherits(ShoppableProductsOverlay, _Component);\\n\\n  var _super = _createSuper(ShoppableProductsOverlay);\\n\\n  function ShoppableProductsOverlay(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppableProductsOverlay);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options_ = options;\\n    _this.player_ = player;\\n\\n    _this.player_.on('showProductsOverlay', function () {\\n      _this.renderProducts();\\n    });\\n\\n    _this.dispose = function () {\\n      _this.layout_.dispose();\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(ShoppableProductsOverlay, [{\\n    key: \\\"renderProducts\\\",\\n    value: function renderProducts() {\\n      var _this2 = this;\\n\\n      // Close products side-panel\\n      this.player_.removeClass('shoppable-panel-visible');\\n      this.player_.addClass('shoppable-panel-hidden');\\n      this.player_.addClass('shoppable-products-overlay');\\n      this.layout_.innerHTML = ''; // Filter products with appearance on currentTime\\n\\n      var currentTime = this.player_.currentTime();\\n      var currentProducts = this.options_.products.filter(function (product) {\\n        return product.hotspots && product.hotspots.some(function (a) {\\n          return (0, _time.parseTime)(a.time) === currentTime;\\n        });\\n      });\\n      currentProducts.forEach(function (product) {\\n        var hotspot = (0, _find.find)(product.hotspots, function (hs) {\\n          return (0, _time.parseTime)(hs.time) === currentTime;\\n        });\\n        var productName = dom.createEl('div', {\\n          className: 'cld-spbl-product-hotspot-name'\\n        }, {}, product.productName);\\n        var productTooltip = dom.createEl('div', {\\n          className: 'cld-spbl-product-tooltip cld-spbl-product-tooltip-' + hotspot.tooltipPosition\\n        }, {}, productName);\\n        var productHotSpot = dom.createEl('a', {\\n          className: 'cld-spbl-product-hotspot accent-color-text',\\n          href: hotspot.clickUrl,\\n          target: '_blank'\\n        }, {\\n          style: 'left:' + hotspot.x + '; top:' + hotspot.y + ';'\\n        }, productTooltip);\\n\\n        _this2.layout_.appendChild(productHotSpot);\\n      }); // Remove\\n\\n      this.player_.one('seeking', function (e) {\\n        return _this2.clearLayout(e);\\n      });\\n      this.player_.one('play', function (e) {\\n        return _this2.clearLayout(e);\\n      });\\n    }\\n  }, {\\n    key: \\\"clearLayout\\\",\\n    value: function clearLayout() {\\n      this.layout_.innerHTML = '';\\n      this.player_.removeClass('shoppable-products-overlay');\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      this.layout_ = dom.createEl('div', {\\n        className: 'cld-spbl-products-overlay'\\n      });\\n      return this.layout_;\\n    }\\n  }]);\\n\\n  return ShoppableProductsOverlay;\\n}(Component);\\n\\n_video.default.registerComponent('ShoppableProductsOverlay', ShoppableProductsOverlay);\\n\\nvar _default = ShoppableProductsOverlay;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/layout/shoppable-products-overlay.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/panel/shoppable-panel-item.js\":\n/*!****************************************************************!*\\\n  !*** ./components/shoppable-bar/panel/shoppable-panel-item.js ***!\n  \\****************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _matches = __webpack_require__(/*! utils/matches */ \\\"./utils/matches.js\\\");\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ShoppablePanelItem = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(ShoppablePanelItem, _ClickableComponent);\\n\\n  var _super = _createSuper(ShoppablePanelItem);\\n\\n  function ShoppablePanelItem(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, ShoppablePanelItem);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options_ = options;\\n    _this.isDragged = false;\\n    return _this;\\n  }\\n\\n  _createClass(ShoppablePanelItem, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(event) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n\\n      if (!(0, _matches.elMatches)(this.el_, '.dragged .cld-spbl-item')) {\\n        // Prevent click event if dragged\\n        this.options_.clickHandler(event);\\n      }\\n\\n      this.isDragged = false;\\n    }\\n  }, {\\n    key: \\\"getTitle\\\",\\n    value: function getTitle() {\\n      return this.options_.conf.title;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ShoppablePanelItem.prototype), \\\"createEl\\\", this).call(this, 'a', {\\n        className: 'cld-spbl-item base-color-bg accent-color-text',\\n        href: '#'\\n      });\\n\\n      el.setAttribute('data-product-id', this.options_.conf.productId || '');\\n      el.setAttribute('data-product-name', this.options_.conf.productName || '');\\n\\n      if (this.options_.conf.onHover) {\\n        addOnHover(el, this.options_.conf.onHover, this.options_.item.cloudinaryConfig());\\n      }\\n\\n      if (this.options_.conf.onClick) {\\n        addOnClick(el, this.options_.conf.onClick);\\n      }\\n\\n      var img = _get(_getPrototypeOf(ShoppablePanelItem.prototype), \\\"createEl\\\", this).call(this, 'img', {\\n        className: 'cld-spbl-img cld-vp-responsive'\\n      }, {\\n        'data-src': this.options_.item.url()\\n      });\\n\\n      el.appendChild(img);\\n\\n      if (this.getTitle()) {\\n        var info = dom.createEl('div', {\\n          className: 'cld-spbl-item-info base-color-semi-bg text-color-text'\\n        });\\n        var title = dom.createEl('span', {\\n          className: 'cld-spbl-item-title'\\n        }, {}, this.getTitle());\\n        info.appendChild(title);\\n        el.appendChild(info);\\n      }\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ShoppablePanelItem;\\n}(ClickableComponent);\\n\\nvar addOnHover = function addOnHover(el, conf, cldConf) {\\n  el.setAttribute('data-hover-action', conf.action);\\n\\n  if (conf.action === 'overlay') {\\n    var overlayText = dom.createEl('span', {\\n      className: 'cld-spbl-overlay-text base-color-text'\\n    }, {}, conf.args);\\n    var overlay = dom.createEl('span', {\\n      className: 'cld-spbl-overlay text-color-semi-bg base-color-text'\\n    }, {\\n      title: conf.args\\n    }, overlayText);\\n    el.appendChild(overlay);\\n  } else {\\n    var switchImgSource = new _imageSource.default(conf.args.publicId, {\\n      cloudinaryConfig: cldConf,\\n      transformation: conf.args.transformation\\n    });\\n    var hoverImg = dom.createEl('img', {\\n      className: 'cld-spbl-img cld-spbl-hover-img cld-vp-responsive'\\n    }, {\\n      'data-src': switchImgSource.url()\\n    });\\n    el.appendChild(hoverImg);\\n  }\\n};\\n\\nvar addOnClick = function addOnClick(el, conf) {\\n  el.setAttribute('data-click-action', conf.action);\\n  el.setAttribute('data-pause', conf.pause);\\n\\n  if (conf.action === 'seek') {\\n    el.setAttribute('data-seek', conf.args.time);\\n  } else if (conf.action === 'goto') {\\n    el.setAttribute('data-goto-url', conf.args.url);\\n  }\\n};\\n\\n_video.default.registerComponent('shoppablePanelItem', ShoppablePanelItem);\\n\\nvar _default = ShoppablePanelItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/panel/shoppable-panel-item.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/panel/shoppable-panel.js\":\n/*!***********************************************************!*\\\n  !*** ./components/shoppable-bar/panel/shoppable-panel.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _throttle = __webpack_require__(/*! utils/throttle */ \\\"./utils/throttle.js\\\");\\n\\nvar _time = __webpack_require__(/*! utils/time */ \\\"./utils/time.js\\\");\\n\\n__webpack_require__(/*! assets/styles/components/playlist.scss */ \\\"./assets/styles/components/playlist.scss\\\");\\n\\nvar _shoppablePanelItem = _interopRequireDefault(__webpack_require__(/*! ./shoppable-panel-item */ \\\"./components/shoppable-bar/panel/shoppable-panel-item.js\\\"));\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ShoppablePanel = /*#__PURE__*/function (_Component) {\\n  _inherits(ShoppablePanel, _Component);\\n\\n  var _super = _createSuper(ShoppablePanel);\\n\\n  function ShoppablePanel(player) {\\n    var _thisSuper, _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppablePanel);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options = options;\\n\\n    var itemChangeHandler = function itemChangeHandler() {\\n      _this.render();\\n    };\\n\\n    player.on('shoppableitemchanged', itemChangeHandler);\\n\\n    _this.render();\\n\\n    _this.dispose = function () {\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(ShoppablePanel.prototype)), \\\"dispose\\\", _thisSuper).call(_thisSuper);\\n\\n      player.off('shoppableitemchanged', itemChangeHandler);\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(ShoppablePanel, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ShoppablePanel.prototype), \\\"createEl\\\", this).call(this);\\n\\n      ['cld-spbl-panel', 'base-color-bg'].map(function (cls) {\\n        return el.classList.add(cls);\\n      });\\n      return el;\\n    }\\n  }, {\\n    key: \\\"removeAll\\\",\\n    value: function removeAll() {\\n      var childrens = this.children();\\n\\n      for (var i = childrens.length - 1; i >= 0; --i) {\\n        this.removeChild(childrens[i]);\\n      }\\n    }\\n  }, {\\n    key: \\\"getItems\\\",\\n    value: function getItems() {\\n      var _this2 = this;\\n\\n      var cloudinaryConfig = this.player_.cloudinary.cloudinaryConfig();\\n      return this.options.products.map(function (product) {\\n        if (product.onHover && _typeof(product.onHover.args) === 'object') {\\n          product.onHover.args.transformation = (0, _assign.assign)({}, _this2.options.transformation, product.onHover.args.transformation);\\n        }\\n\\n        var conf = {\\n          productId: product.productId,\\n          productName: product.productName,\\n          title: product.title,\\n          onHover: product.onHover,\\n          onClick: product.onClick,\\n          startTime: product.startTime,\\n          endTime: product.endTime\\n        };\\n        var imageSource = new _imageSource.default(product.publicId, {\\n          cloudinaryConfig: cloudinaryConfig,\\n          transformation: (0, _assign.assign)({}, _this2.options.transformation, product.transformation)\\n        });\\n        return {\\n          imageSrc: imageSource,\\n          conf: conf\\n        };\\n      });\\n    }\\n  }, {\\n    key: \\\"scrollToActiveItem\\\",\\n    value: function scrollToActiveItem() {\\n      var activeItems = this.el_.getElementsByClassName('active');\\n\\n      if (activeItems.length > 0) {\\n        var toScroll = activeItems[0].offsetTop - 12; // Test for native scrollTo support (IE will fail)\\n\\n        if ('scrollBehavior' in document.documentElement.style) {\\n          this.el_.scrollTo({\\n            top: toScroll,\\n            behavior: 'smooth'\\n          });\\n        } else {\\n          this.el_.scrollTop = toScroll;\\n        }\\n      }\\n    }\\n  }, {\\n    key: \\\"render\\\",\\n    value: function render() {\\n      var _this3 = this;\\n\\n      this.removeAll();\\n      var items = this.getItems();\\n      var throttledScrollToActiveItem = (0, _throttle.throttle)(function () {\\n        return _this3.scrollToActiveItem();\\n      }, 1000);\\n      items.forEach(function (item, index) {\\n        var shoppablePanelItem = new _shoppablePanelItem.default(_this3.player(), {\\n          item: item.imageSrc,\\n          conf: item.conf,\\n          next: index === 1,\\n          current: index === 0,\\n          clickHandler: function clickHandler(e) {\\n            var target = e.currentTarget || e.target;\\n            var evName = _this3.player_.ended() ? 'productClickPost' : 'productClick';\\n\\n            _this3.player_.trigger(evName, {\\n              productId: target.dataset.productId,\\n              productName: target.dataset.productName\\n            }); // Go to URL, or seek video (set currentTime)\\n\\n\\n            if (target.dataset.clickAction === 'goto') {\\n              window.open(target.dataset.gotoUrl, '_blank');\\n            } else if (target.dataset.clickAction === 'seek') {\\n              var gotoSecs = (0, _time.parseTime)(target.dataset.seek);\\n\\n              if (gotoSecs !== null) {\\n                _this3.player_.addClass('vjs-has-started'); // Hide the poster image\\n\\n\\n                if (_this3.player_.postModal) {\\n                  _this3.player_.postModal.close();\\n                }\\n\\n                _this3.player_.currentTime(gotoSecs); // Close products side-panel\\n\\n\\n                _this3.player_.removeClass('shoppable-panel-visible');\\n\\n                _this3.player_.addClass('shoppable-panel-hidden');\\n\\n                _this3.player_.addClass('shoppable-products-overlay'); // Wait for the time update and show the tooltips\\n\\n\\n                _this3.player_.one('seeked', function () {\\n                  return _this3.player_.trigger('showProductsOverlay');\\n                });\\n              }\\n            } // pause - true (default), false, or number of seconds\\n\\n\\n            if (target.dataset.pause !== 'false') {\\n              _this3.player_.pause();\\n\\n              if ((0, _time.parseTime)(target.dataset.pause)) {\\n                setTimeout(function () {\\n                  _this3.player_.play();\\n                }, (0, _time.parseTime)(target.dataset.pause) * 1000);\\n              }\\n            }\\n          }\\n        });\\n        shoppablePanelItem.on('mouseover', function (e) {\\n          var target = e.currentTarget || e.target;\\n          var evName = _this3.player_.ended() ? 'productHoverPost' : 'productHover';\\n\\n          _this3.player_.trigger(evName, {\\n            productId: target.dataset.productId,\\n            productName: target.dataset.productName\\n          });\\n        });\\n\\n        if (typeof item.conf.startTime !== 'undefined' && typeof item.conf.endTime !== 'undefined') {\\n          _this3.player_.on('timeupdate', function () {\\n            var time = _this3.player_.currentTime();\\n\\n            if (time >= item.conf.startTime && time < item.conf.endTime) {\\n              shoppablePanelItem.el_.classList.add('active');\\n              throttledScrollToActiveItem();\\n            } else if (shoppablePanelItem.el_.classList.contains('active')) {\\n              shoppablePanelItem.el_.classList.remove('active');\\n            }\\n          });\\n        }\\n\\n        _this3.addChild(shoppablePanelItem);\\n      });\\n    }\\n  }]);\\n\\n  return ShoppablePanel;\\n}(Component);\\n\\n_video.default.registerComponent('shoppablePanel', ShoppablePanel);\\n\\nvar _default = ShoppablePanel;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/panel/shoppable-panel.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/shoppable-post-widget.js\":\n/*!***********************************************************!*\\\n  !*** ./components/shoppable-bar/shoppable-post-widget.js ***!\n  \\***********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _shoppablePanel = _interopRequireDefault(__webpack_require__(/*! ./panel/shoppable-panel.js */ \\\"./components/shoppable-bar/panel/shoppable-panel.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\\n\\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\\n\\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ShoppablePostWidget = /*#__PURE__*/function () {\\n  function ShoppablePostWidget(player) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppablePostWidget);\\n\\n    this.options_ = _objectSpread(_objectSpread({}, options), {}, {\\n      postPlay: true\\n    });\\n    this.player_ = player;\\n    this.render(); // Handle drag-to-scroll\\n\\n    this.handleDragToScroll();\\n\\n    this.dispose = function () {\\n      _this.layout_.dispose();\\n    };\\n  }\\n\\n  _createClass(ShoppablePostWidget, [{\\n    key: \\\"handleDragToScroll\\\",\\n    value: function handleDragToScroll() {\\n      var postModal = this.player_.postModal.el_;\\n      var slider = postModal.querySelector('.cld-spbl-panel');\\n      var isDown = false;\\n      var startX = 0;\\n      var scrollLeft = 0;\\n      slider.addEventListener('mousedown', function (e) {\\n        isDown = true;\\n        startX = e.pageX - slider.offsetLeft;\\n        scrollLeft = slider.scrollLeft;\\n      });\\n      document.addEventListener('mouseup', function (e) {\\n        isDown = false;\\n        setTimeout(function () {\\n          slider.classList.remove('dragged');\\n        }, 300);\\n        var x = e.pageX - slider.offsetLeft;\\n        var walk = x - startX;\\n\\n        if (Math.abs(walk) > 5) {\\n          e.preventDefault();\\n        }\\n      });\\n      document.addEventListener('mousemove', function (e) {\\n        if (!isDown) {\\n          return;\\n        }\\n\\n        e.preventDefault();\\n        var x = e.pageX - slider.offsetLeft;\\n        var walk = x - startX;\\n        slider.scrollLeft = scrollLeft - walk;\\n\\n        if (Math.abs(walk) > 5 && !slider.classList.contains('dragged')) {\\n          slider.classList.add('dragged');\\n        }\\n      });\\n    }\\n  }, {\\n    key: \\\"render\\\",\\n    value: function render() {\\n      var _this2 = this;\\n\\n      this.player_.postModal = null;\\n      var el = dom.createEl('div', {\\n        className: 'cld-spbl-post-play'\\n      });\\n      var panel = new _shoppablePanel.default(this.player_, this.options_);\\n      var title = dom.createEl('div', {\\n        className: 'cld-spbl-post-title base-color-text'\\n      }, {}, this.options_.bannerMsg || 'Shop the Video'); // Background - poster + blur effect\\n\\n      var bgSrc = this.player_.cloudinary.currentPoster();\\n      bgSrc.transformation([bgSrc.transformation().toOptions(), {\\n        effect: 'blur:3000'\\n      }]);\\n      var panelBg = dom.createEl('div', {\\n        className: 'cld-spbl-post-play-bg',\\n        style: 'background-image: url(\\\"' + bgSrc.url() + '\\\")'\\n      });\\n      var replayBtn = dom.createEl('button', {\\n        className: 'cld-spbl-replay-btn base-color-bg vjs-icon-replay',\\n        onclick: function onclick() {\\n          _this2.player_.trigger('replay');\\n\\n          _this2.player_.postModal.close();\\n\\n          _this2.player_.play();\\n        }\\n      }, {}, 'Replay');\\n      el.appendChild(panelBg);\\n      el.appendChild(title);\\n      el.appendChild(panel.el());\\n      el.appendChild(replayBtn);\\n      this.player_.postModal = this.player_.createModal(el, {\\n        name: 'postModal',\\n        uncloseable: true\\n      });\\n      this.player_.addClass('cld-spbl-post-modal');\\n      this.player_.postModal.on('beforemodalclose', function () {\\n        _this2.player_.removeClass('cld-spbl-post-modal');\\n      });\\n    }\\n  }]);\\n\\n  return ShoppablePostWidget;\\n}();\\n\\nvar _default = ShoppablePostWidget;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/shoppable-post-widget.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/shoppable-widget.js\":\n/*!******************************************************!*\\\n  !*** ./components/shoppable-bar/shoppable-widget.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _barLayout = _interopRequireDefault(__webpack_require__(/*! ./layout/bar-layout */ \\\"./components/shoppable-bar/layout/bar-layout.js\\\"));\\n\\nvar _shoppablePostWidget = _interopRequireDefault(__webpack_require__(/*! ./shoppable-post-widget */ \\\"./components/shoppable-bar/shoppable-post-widget.js\\\"));\\n\\n__webpack_require__(/*! ./shoppable-widget.scss */ \\\"./components/shoppable-bar/shoppable-widget.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\\n\\nfunction _nonIterableRest() { throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \\\"undefined\\\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\\\"return\\\"] != null) _i[\\\"return\\\"](); } finally { if (_d) throw _e; } } return _arr; }\\n\\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\\n\\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \\\"undefined\\\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \\\"number\\\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\\\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar OPTIONS_DEFAULTS = {\\n  location: 'right',\\n  toggleIcon: '',\\n  width: '20%',\\n  startState: 'openOnPlay',\\n  autoClose: 2,\\n  transformation: {\\n    quality: 'auto',\\n    width: 'auto',\\n    fetch_format: 'auto',\\n    crop: 'scale'\\n  },\\n  products: [],\\n  showPostPlayOverlay: false\\n};\\n\\nvar ShoppableWidget = /*#__PURE__*/function () {\\n  function ShoppableWidget(player) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppableWidget);\\n\\n    this.options_ = _video.default.mergeOptions(OPTIONS_DEFAULTS, options);\\n    this.player_ = player;\\n\\n    this.init = function () {\\n      _this.render();\\n    };\\n\\n    if (this.options_.showPostPlayOverlay) {\\n      this.player_.on('ended', function () {\\n        _this.player_.addChild(new _shoppablePostWidget.default(_this.player_, _this.options_)); // Handle responsive images.\\n\\n\\n        _this.player_.player_.cloudinary.cloudinaryConfig().responsive({\\n          responsive_class: 'cld-vp-responsive'\\n        });\\n      });\\n    }\\n\\n    var injectCSS = function injectCSS(css) {\\n      var style = document.createElement('style');\\n      style.innerHTML = css;\\n      player.el_.appendChild(style);\\n    };\\n\\n    var width = this.options_.width;\\n    injectCSS(\\\"\\\\n      .cld-spbl-bar-inner {\\\\n        transform: translateX(\\\".concat(width, \\\");\\\\n      }\\\\n      .shoppable-panel-visible .vjs-control-bar {\\\\n        width: calc(100% - \\\").concat(width, \\\");\\\\n      }\\\\n      .cld-spbl-toggle {\\\\n        right: \\\").concat(width, \\\";\\\\n      }\\\\n      .cld-spbl-panel {\\\\n        width: \\\").concat(width, \\\";\\\\n      }\\\\n    \\\"));\\n\\n    var resizeHandler = function resizeHandler() {\\n      var shoppableBarBreakpoints = [['sm', 0, 80], ['md', 81, 110], ['lg', 111, 170]];\\n      var shoppableBarWidth = parseFloat(_this.options_.width) / 100.0 * player.el_.clientWidth;\\n      var inRange = false;\\n\\n      if (shoppableBarWidth) {\\n        var _iterator = _createForOfIteratorHelper(shoppableBarBreakpoints),\\n            _step;\\n\\n        try {\\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\\n            var _step$value = _slicedToArray(_step.value, 3),\\n                name = _step$value[0],\\n                min = _step$value[1],\\n                max = _step$value[2];\\n\\n            if (shoppableBarWidth > min && shoppableBarWidth <= max) {\\n              _this.layout_.contentWrpEl_.setAttribute('size', name);\\n\\n              inRange = name;\\n            }\\n          }\\n        } catch (err) {\\n          _iterator.e(err);\\n        } finally {\\n          _iterator.f();\\n        }\\n\\n        if (!inRange) {\\n          _this.layout_.contentWrpEl_.removeAttribute('size');\\n        }\\n      }\\n    };\\n\\n    this.player_.on('resize', resizeHandler);\\n    window.addEventListener('resize', resizeHandler);\\n\\n    this.dispose = function () {\\n      _this.player_.off('resize', resizeHandler);\\n\\n      window.removeEventListener('resize', resizeHandler);\\n\\n      _this.layout_.dispose();\\n    };\\n  }\\n\\n  _createClass(ShoppableWidget, [{\\n    key: \\\"render\\\",\\n    value: function render() {\\n      var _this2 = this;\\n\\n      this.layout_ = new _barLayout.default(this.player_, this.options_);\\n      this.player_.on('loadeddata', function () {\\n        // Handle responsive images.\\n        _this2.player_.player_.cloudinary.cloudinaryConfig().responsive({\\n          responsive_class: 'cld-vp-responsive'\\n        });\\n      });\\n    }\\n  }]);\\n\\n  return ShoppableWidget;\\n}();\\n\\nvar _default = ShoppableWidget;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/shoppable-widget.js?\");\n\n/***/ }),\n\n/***/ \"./components/shoppable-bar/shoppable-widget.scss\":\n/*!********************************************************!*\\\n  !*** ./components/shoppable-bar/shoppable-widget.scss ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/shoppable-widget.scss?\");\n\n/***/ }),\n\n/***/ \"./components/title-bar/title-bar.js\":\n/*!*******************************************!*\\\n  !*** ./components/title-bar/title-bar.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! assets/styles/components/title-bar.scss */ \\\"./assets/styles/components/title-bar.scss\\\");\\n\\nvar _componentUtils = _interopRequireDefault(__webpack_require__(/*! ../component-utils */ \\\"./components/component-utils.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar TitleBar = /*#__PURE__*/function (_Component) {\\n  _inherits(TitleBar, _Component);\\n\\n  var _super = _createSuper(TitleBar);\\n\\n  function TitleBar(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, TitleBar);\\n\\n    _this = _super.call(this, player, options);\\n\\n    _this.on(player, 'cldsourcechanged', function (_, _ref) {\\n      var source = _ref.source;\\n      return _this.setItem(source);\\n    });\\n\\n    _this.setItem = function (source) {\\n      if (!source) {\\n        _this.setTitle('');\\n\\n        _this.setSubtitle('');\\n\\n        return;\\n      }\\n\\n      var info = source.info();\\n\\n      _this.setTitle(info.title);\\n\\n      _this.setSubtitle(info.subtitle);\\n    };\\n\\n    _this.setTitle = function (text) {\\n      _componentUtils.default.setText(_this.titleEl, text);\\n\\n      refresh();\\n      return text;\\n    };\\n\\n    _this.setSubtitle = function (text) {\\n      _componentUtils.default.setText(_this.subtitleEl, text);\\n\\n      refresh();\\n      return text;\\n    };\\n\\n    var titleValue = function titleValue() {\\n      return _this.titleEl.innerText;\\n    };\\n\\n    var subtitleValue = function subtitleValue() {\\n      return _this.subtitleEl.innerText;\\n    };\\n\\n    var refresh = function refresh() {\\n      if (!titleValue() && !subtitleValue()) {\\n        _this.hide();\\n\\n        return;\\n      }\\n\\n      _this.show();\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(TitleBar, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      this.titleEl = dom.createEl('div', {\\n        className: 'vjs-title-bar-title'\\n      });\\n      this.subtitleEl = dom.createEl('div', {\\n        className: 'vjs-title-bar-subtitle'\\n      });\\n\\n      var el = _get(_getPrototypeOf(TitleBar.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        append: this.titleEl,\\n        className: 'vjs-title-bar'\\n      });\\n\\n      el.appendChild(this.titleEl);\\n      el.appendChild(this.subtitleEl);\\n      return el;\\n    }\\n  }]);\\n\\n  return TitleBar;\\n}(Component);\\n\\n_video.default.registerComponent('titleBar', TitleBar);\\n\\nvar _default = TitleBar;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/title-bar/title-bar.js?\");\n\n/***/ }),\n\n/***/ \"./config/defaults.js\":\n/*!****************************!*\\\n  !*** ./config/defaults.js ***!\n  \\****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _contextMenuContent = _interopRequireDefault(__webpack_require__(/*! ../plugins/context-menu/contextMenuContent */ \\\"./plugins/context-menu/contextMenuContent.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar _default = {\\n  logoOnclickUrl: 'https://cloudinary.com/',\\n  showLogo: true,\\n  showJumpControls: false,\\n  skin: 'dark',\\n  controls: false,\\n  controlBar: {\\n    'pictureInPictureToggle': false\\n  },\\n  preload: false,\\n  loop: false,\\n  muted: false,\\n  posterOptions: {},\\n  sourceTypes: ['webm/vp9', 'mp4/h265', 'mp4'],\\n  contextMenu: {\\n    content: _contextMenuContent.default\\n  },\\n  floatingWhenNotVisible: false,\\n  hideContextMenu: false,\\n  analytics: false,\\n  playedEventPercents: [25, 50, 75, 100]\\n};\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./config/defaults.js?\");\n\n/***/ }),\n\n/***/ \"./extended-events.js\":\n/*!****************************!*\\\n  !*** ./extended-events.js ***!\n  \\****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = exports.normalizeEventsParam = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _events = _interopRequireDefault(__webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \\\"./utils/type-inference.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar EVENT_DEFAULTS = {\\n  percentsplayed: {\\n    percents: [25, 50, 75, 100]\\n  }\\n};\\nvar DEFAULT_EVENTS = ['percentsplayed', 'pausenoseek', 'seek', 'mute', 'unmute', 'qualitychanged'];\\nvar DEFAULT_OPTIONS = {\\n  events: DEFAULT_EVENTS\\n}; // Emits the following additional events:\\n// percentsplayed, timeplayed, pausenoseek, seek, mute, unmute\\n\\nvar ExtendedEvents = /*#__PURE__*/function (_EventEmitter) {\\n  _inherits(ExtendedEvents, _EventEmitter);\\n\\n  var _super = _createSuper(ExtendedEvents);\\n\\n  function ExtendedEvents(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ExtendedEvents);\\n\\n    _this = _super.call(this);\\n    _this.player = player;\\n    options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n    var _muteData = {\\n      lastState: undefined\\n    };\\n    var _seekStart = 0;\\n    var _seekEnd = 0;\\n    var _seeking = false;\\n    var _percentsTracked = [];\\n    var _timesTracked = [];\\n    var _currentSource = null;\\n    var _ended = false;\\n\\n    var volumechange = function volumechange(event) {\\n      if (_this.player.muted() && _muteData.lastState !== 'muted') {\\n        _muteData.lastState = 'muted';\\n\\n        _this.emit('mute', event);\\n      } else if (!_this.player.muted() && _muteData.lastState !== 'unmuted') {\\n        _muteData.lastState = 'unmuted';\\n\\n        _this.emit('unmute', event);\\n      }\\n    };\\n\\n    var timeupdate = function timeupdate(event) {\\n      var currentTime = _this.player.currentTime();\\n\\n      var duration = _this.player.duration();\\n\\n      var _emit = function _emit(type, data) {\\n        data.originalType = 'timeupdate';\\n\\n        _this.emit(type, event, data);\\n      };\\n\\n      if (_this.events.percentsplayed) {\\n        _this.events.percentsplayed.percents.forEach(function (percent) {\\n          if (playedAtPercentage(currentTime, duration, percent) && _percentsTracked.indexOf(percent) === -1) {\\n            _percentsTracked.push(percent);\\n\\n            _emit('percentsplayed', {\\n              percent: percent\\n            });\\n          }\\n        });\\n      }\\n\\n      if (_this.events.timeplayed) {\\n        var timeplayed = _this.events.timeplayed;\\n        var times = timeplayed.interval ? [Math.floor(currentTime / timeplayed.interval) * timeplayed.interval] : timeplayed.times;\\n        times.forEach(function (time) {\\n          if (playedAtTime(currentTime, time) && _timesTracked.indexOf(time) === -1) {\\n            _timesTracked.push(time);\\n\\n            _emit('timeplayed', {\\n              time: time\\n            });\\n          }\\n        });\\n      }\\n\\n      if (_this.events.seek) {\\n        _seekStart = _seekEnd;\\n        _seekEnd = currentTime;\\n\\n        if (Math.abs(_seekStart - _seekEnd) > 1) {\\n          _seeking = true;\\n\\n          _emit('seek', {\\n            seekStart: _seekStart,\\n            seekEnd: _seekEnd\\n          });\\n        }\\n      }\\n    };\\n\\n    var pause = function pause(event) {\\n      var currentTime = Math.round(_this.player.currentTime());\\n      var duration = Math.round(_this.player.duration());\\n\\n      if (currentTime !== duration && !_seeking) {\\n        _this.emit('pausenoseek', event);\\n      }\\n    };\\n\\n    var play = function play() {\\n      _seeking = false;\\n    };\\n\\n    var replay = function replay() {\\n      if (_ended) {\\n        _this.player.trigger('replay');\\n\\n        _ended = false;\\n      }\\n    };\\n\\n    var loadedmetadata = function loadedmetadata() {\\n      if (_this.player.currentSource().src !== _currentSource) {\\n        resetPerVideoState();\\n        _currentSource = _this.player.currentSource().src;\\n      }\\n    };\\n\\n    var adaptiveEvents = function adaptiveEvents(event) {\\n      var ee = _assertThisInitialized(_this);\\n\\n      var tracks = _this.player.textTracks();\\n\\n      var segmentMetadataTrack = null;\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        if (tracks[i].label === 'segment-metadata') {\\n          segmentMetadataTrack = tracks[i];\\n        }\\n      }\\n\\n      var previousResolution = null;\\n\\n      if (segmentMetadataTrack) {\\n        segmentMetadataTrack.on('cuechange', function () {\\n          var activeCue = segmentMetadataTrack.activeCues[0];\\n\\n          if (activeCue) {\\n            var currentRes = activeCue.value.resolution;\\n\\n            if (previousResolution !== currentRes) {\\n              var data = {\\n                from: previousResolution,\\n                to: currentRes\\n              };\\n              ee.emit('qualitychanged', event, data);\\n            }\\n\\n            previousResolution = currentRes;\\n          }\\n        });\\n      }\\n    };\\n\\n    var resetState = function resetState() {\\n      _muteData = {\\n        lastState: undefined\\n      };\\n      _seekStart = _seekEnd = 0;\\n      _seeking = false;\\n      resetPerVideoState();\\n    };\\n\\n    var resetPerVideoState = function resetPerVideoState() {\\n      _percentsTracked = [];\\n      _timesTracked = [];\\n    };\\n\\n    var ended = function ended() {\\n      _ended = true;\\n    };\\n\\n    _this.events = normalizeEventsParam(options.events, EVENT_DEFAULTS);\\n    resetState();\\n\\n    _this.player.on('play', replay.bind(_assertThisInitialized(_this)));\\n\\n    _this.player.on('ended', ended.bind(_assertThisInitialized(_this)));\\n\\n    if (_this.events.percentsplayed || _this.events.timeplayed || _this.events.seek || _this.events.totaltimeplayed) {\\n      _this.player.on('timeupdate', timeupdate.bind(_assertThisInitialized(_this)));\\n    }\\n\\n    if (_this.events.mute || _this.events.unmute) {\\n      _this.player.on('volumechange', volumechange.bind(_assertThisInitialized(_this)));\\n    }\\n\\n    if (_this.events.pausenoseek) {\\n      _this.player.on('pause', pause.bind(_assertThisInitialized(_this)));\\n\\n      _this.player.on('play', play.bind(_assertThisInitialized(_this)));\\n    }\\n\\n    _this.player.on('loadedmetadata', loadedmetadata.bind(_assertThisInitialized(_this)));\\n\\n    _this.player.on('loadeddata', adaptiveEvents.bind(_assertThisInitialized(_this)));\\n\\n    return _this;\\n  }\\n\\n  return ExtendedEvents;\\n}(_events.default);\\n\\nvar normalizeEventsParam = function normalizeEventsParam(events, defaults) {\\n  var normalized = events;\\n\\n  if (events.constructor.name === 'Array') {\\n    normalized = events.reduce(function (agg, item) {\\n      var eventDefaults = defaults[item] || {};\\n\\n      if ((0, _typeInference.isPlainObject)(item)) {\\n        agg[item.type] = (0, _assign.assign)({}, eventDefaults, item);\\n      } else {\\n        agg[item] = eventDefaults;\\n      }\\n\\n      return agg;\\n    }, {});\\n  }\\n\\n  return normalized;\\n};\\n\\nexports.normalizeEventsParam = normalizeEventsParam;\\n\\nvar playedAtPercentage = function playedAtPercentage(currentTime, duration, percentageCheckpoint) {\\n  var graceRangeSeconds = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.5;\\n  var checkPoint = duration * percentageCheckpoint / 100;\\n  return playedAtTime(currentTime, checkPoint, graceRangeSeconds);\\n};\\n\\nvar playedAtTime = function playedAtTime(currentTime, checkpoint) {\\n  var graceRangeSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.5;\\n  return currentTime <= checkpoint + graceRangeSeconds && currentTime >= checkpoint - graceRangeSeconds;\\n};\\n\\nvar _default = ExtendedEvents;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./extended-events.js?\");\n\n/***/ }),\n\n/***/ \"./index.js\":\n/*!******************!*\\\n  !*** ./index.js ***!\n  \\******************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\n__webpack_require__(/*! assets/styles/main.scss */ \\\"./assets/styles/main.scss\\\");\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \\\"cloudinary-core\\\"));\\n\\nvar _videoPlayer = _interopRequireDefault(__webpack_require__(/*! ./video-player */ \\\"./video-player.js\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n_cloudinaryCore.default.VideoPlayer = _videoPlayer.default;\\nvar proto = _cloudinaryCore.default.Cloudinary.prototype;\\n\\nproto.videoPlayer = function (id) {\\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n  var ready = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\\n  (0, _assign.assign)(options, {\\n    cloudinaryConfig: this\\n  });\\n  return new _videoPlayer.default(id, options, ready);\\n};\\n\\nproto.videoPlayers = function (selector) {\\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n  var ready = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\\n  (0, _assign.assign)(options, {\\n    cloudinaryConfig: this\\n  });\\n  return _videoPlayer.default.all(selector, options, ready);\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./index.js?\");\n\n/***/ }),\n\n/***/ \"./mixins/eventable.js\":\n/*!*****************************!*\\\n  !*** ./mixins/eventable.js ***!\n  \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Eventable = function Eventable(superclass) {\\n  return /*#__PURE__*/function (_superclass) {\\n    _inherits(_class, _superclass);\\n\\n    var _super = _createSuper(_class);\\n\\n    function _class() {\\n      var _this;\\n\\n      _classCallCheck(this, _class);\\n\\n      _this = _super.call(this);\\n      var eventable = {\\n        data: {},\\n        handlers: {}\\n      };\\n\\n      _this.on = function () {\\n        var _this$videojs;\\n\\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n          args[_key] = arguments[_key];\\n        }\\n\\n        var lastIndex = args.length - 1;\\n        var func = args[lastIndex];\\n\\n        eventable.handlers[func] = function (event) {\\n          event.Player = _assertThisInitialized(_this);\\n\\n          for (var _len2 = arguments.length, _args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n            _args[_key2 - 1] = arguments[_key2];\\n          }\\n\\n          func.apply(void 0, [event].concat(_args));\\n        };\\n\\n        args[lastIndex] = eventable.handlers[func];\\n        return (_this$videojs = _this.videojs).on.apply(_this$videojs, args);\\n      };\\n\\n      _this.one = function () {\\n        var _this$videojs2;\\n\\n        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n          args[_key3] = arguments[_key3];\\n        }\\n\\n        var lastIndex = args.length - 1;\\n        var func = args[lastIndex];\\n\\n        eventable.handlers[func] = function (event) {\\n          event.Player = _assertThisInitialized(_this);\\n\\n          for (var _len4 = arguments.length, _args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\\n            _args[_key4 - 1] = arguments[_key4];\\n          }\\n\\n          func.apply(void 0, [event].concat(_args));\\n          delete eventable.handlers[func];\\n        };\\n\\n        args[lastIndex] = eventable.handlers[func];\\n        return (_this$videojs2 = _this.videojs).one.apply(_this$videojs2, args);\\n      };\\n\\n      _this.off = function () {\\n        var _this$videojs3;\\n\\n        for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\\n          args[_key5] = arguments[_key5];\\n        }\\n\\n        var lastIndex = args.length - 1;\\n        var func = args[lastIndex];\\n        args[lastIndex] = eventable.handlers[func];\\n\\n        var res = (_this$videojs3 = _this.videojs).off.apply(_this$videojs3, args);\\n\\n        delete eventable.handlers[func];\\n        return res;\\n      };\\n\\n      _this.trigger = function () {\\n        var _this$videojs4;\\n\\n        (_this$videojs4 = _this.videojs).trigger.apply(_this$videojs4, arguments);\\n      };\\n\\n      return _this;\\n    }\\n\\n    return _class;\\n  }(superclass);\\n};\\n\\nvar _default = Eventable;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./mixins/eventable.js?\");\n\n/***/ }),\n\n/***/ \"./mixins/playlistable.js\":\n/*!********************************!*\\\n  !*** ./mixins/playlistable.js ***!\n  \\********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlist2 = _interopRequireDefault(__webpack_require__(/*! components/playlist/playlist */ \\\"./components/playlist/playlist.js\\\"));\\n\\nvar _promisePolyfill = _interopRequireDefault(__webpack_require__(/*! promise-polyfill */ \\\"../node_modules/promise-polyfill/promise.js\\\"));\\n\\nvar _fetchBrowser = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill/build/fetch-browser */ \\\"../node_modules/fetch-ponyfill/build/fetch-browser.js\\\"));\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _api = __webpack_require__(/*! utils/api */ \\\"./utils/api.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar _fetchPF = (0, _fetchBrowser.default)({\\n  Promise: _promisePolyfill.default\\n}),\\n    fetch = _fetchPF.fetch;\\n\\nvar LIST_BY_TAG_PARAMS = {\\n  format: 'json',\\n  resource_type: 'video',\\n  type: 'list'\\n};\\n\\nvar Playlistable = function Playlistable(superclass) {\\n  return /*#__PURE__*/function (_superclass) {\\n    _inherits(_class, _superclass);\\n\\n    var _super = _createSuper(_class);\\n\\n    function _class(player) {\\n      var _this;\\n\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      _classCallCheck(this, _class);\\n\\n      _this = _super.call(this);\\n      var _chainTarget = (0, _slicing.sliceProperties)(options, 'chainTarget').chainTarget;\\n      var _playlist = null;\\n      var _playlistDisposer = null;\\n\\n      _this.playlist = function (sources) {\\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n        if (sources === undefined) {\\n          return _playlist;\\n        }\\n\\n        if (_this.playlist()) {\\n          _this.disposePlaylist();\\n        }\\n\\n        createPlaylist(sources, options);\\n        player.trigger('playlistcreated');\\n        return _chainTarget;\\n      };\\n\\n      _this.disposePlaylist = function () {\\n        player.removeClass('vjs-playlist');\\n\\n        var playlist = _this.playlist();\\n\\n        _playlist = undefined;\\n        playlist.dispose();\\n\\n        _this.off('cldsourcechanged', _playlistDisposer);\\n      };\\n\\n      var createPlaylist = function createPlaylist(sources, options) {\\n        if (sources instanceof _playlist2.default) {\\n          _playlist = sources;\\n\\n          _playlist.resetState();\\n\\n          _playlist.currentIndex(_playlist.currentIndex());\\n        } else {\\n          _playlist = new _playlist2.default(_assertThisInitialized(_this), sources, options);\\n\\n          _playlist.currentIndex(0);\\n        }\\n\\n        _playlistDisposer = addSourceChangedListener();\\n        player.addClass('vjs-playlist');\\n      };\\n\\n      var addSourceChangedListener = function addSourceChangedListener() {\\n        var disposer = function disposer() {\\n          if (_this.playlist() && !_this.playlist().currentSource().contains(_this.player.currentSource())) {\\n            _this.disposePlaylist();\\n          }\\n        };\\n\\n        _this.on('cldsourcechanged', disposer);\\n\\n        return disposer;\\n      };\\n\\n      return _this;\\n    }\\n\\n    _createClass(_class, [{\\n      key: \\\"playlistByTag\\\",\\n      value: function playlistByTag(tag) {\\n        var _this2 = this;\\n\\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n        return this.sourcesByTag(tag, options).then(function (sources) {\\n          return _this2.playlist(sources, options);\\n        });\\n      }\\n    }, {\\n      key: \\\"sourcesByTag\\\",\\n      value: function sourcesByTag(tag) {\\n        var _this3 = this;\\n\\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n        var url = this.cloudinaryConfig().url(tag, LIST_BY_TAG_PARAMS);\\n        return fetch(url).then(function (result) {\\n          return result.json();\\n        }).then(function (json) {\\n          var resources = (0, _api.normalizeJsonResponse)(json.resources);\\n\\n          if (options.sorter) {\\n            resources.sort(options.sorter);\\n          }\\n\\n          var sources = resources.map(function (resource) {\\n            var sourceParams = options.sourceParams || {};\\n\\n            if (typeof sourceParams === 'function') {\\n              sourceParams = sourceParams(resource);\\n            }\\n\\n            var info = resource.context && resource.context.custom || {};\\n            var source = (0, _assign.assign)({\\n              info: info\\n            }, sourceParams, {\\n              publicId: resource.publicId\\n            });\\n            return _this3.buildSource(source);\\n          });\\n          return sources;\\n        });\\n      }\\n    }]);\\n\\n    return _class;\\n  }(superclass);\\n};\\n\\nvar _default = Playlistable;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./mixins/playlistable.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/analytics/index.js\":\n/*!************************************!*\\\n  !*** ./plugins/analytics/index.js ***!\n  \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _extendedEvents2 = _interopRequireWildcard(__webpack_require__(/*! extended-events */ \\\"./extended-events.js\\\"));\\n\\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \\\"function\\\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\\n\\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \\\"object\\\" && typeof obj !== \\\"function\\\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar DEFAULT_EVENTS = ['play', 'pause', 'ended', 'volumechange', 'resize', 'error', 'fullscreenchange', 'start', 'videoload', 'percentsplayed', 'seek', 'playerload'];\\nvar EVENT_DEFAULTS = {\\n  percentsplayed: {\\n    percents: [25, 50, 75, 100]\\n  }\\n};\\nvar DEFAULT_OPTIONS = {\\n  events: DEFAULT_EVENTS,\\n  category: 'Video',\\n  defaultLabel: function defaultLabel(player) {\\n    return player.cloudinary && player.cloudinary.currentPublicId() || player.currentSource().src;\\n  }\\n};\\n\\nvar AnalyticsPlugin = function AnalyticsPlugin(player) {\\n  var _this = this;\\n\\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, AnalyticsPlugin);\\n\\n  this.player = player;\\n  options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n  this.events = (0, _extendedEvents2.normalizeEventsParam)(options.events, EVENT_DEFAULTS);\\n  var extendedEvents = (0, _slicing.sliceProperties)(this.events, 'percentsplayed', 'timeplayed', 'pause', 'seek');\\n\\n  if (extendedEvents.pause) {\\n    delete extendedEvents.pause;\\n    extendedEvents.pausenoseek = {};\\n  }\\n\\n  var _extendedEvents = new _extendedEvents2.default(player, {\\n    events: extendedEvents\\n  });\\n\\n  var _defaultLabel = options.defaultLabel;\\n  var _category = options.category;\\n  var _currentSource = null;\\n  var _startTracked = null;\\n  var _endTracked = null;\\n\\n  this.init = function () {\\n    var playerload = function playerload() {\\n      _this.track({\\n        action: 'Player Load',\\n        label: window.location.href,\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var videoload = function videoload() {\\n      _this.track({\\n        action: 'Video Load',\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var play = function play() {\\n      _this.track({\\n        action: 'Play'\\n      });\\n    };\\n\\n    var start = function start() {\\n      if (_startTracked) {\\n        _this.track({\\n          action: 'Start'\\n        });\\n\\n        _startTracked = true;\\n      }\\n    };\\n\\n    var pause = function pause() {\\n      _this.track({\\n        action: 'Pause'\\n      });\\n    };\\n\\n    var ended = function ended() {\\n      if (!_endTracked) {\\n        _this.track({\\n          action: 'Ended',\\n          nonInteraction: true\\n        });\\n\\n        _endTracked = true;\\n      }\\n    };\\n\\n    var error = function error() {\\n      _this.track({\\n        action: 'Error',\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var volumechange = function volumechange() {\\n      var value = _this.player.muted() ? 0 : _this.player.volume();\\n\\n      _this.track({\\n        action: 'Volume Change',\\n        value: value\\n      });\\n    };\\n\\n    var resize = function resize() {\\n      var action = \\\"Resize - \\\".concat(_this.player.width(), \\\"x\\\").concat(_this.player.height(), \\\"}\\\");\\n\\n      _this.track({\\n        action: action\\n      });\\n    };\\n\\n    var fullscreenchange = function fullscreenchange() {\\n      var action = _this.player.isFullscreen() ? 'Enter Fullscreen' : 'Exit Fullscreen';\\n\\n      _this.track({\\n        action: action\\n      });\\n    };\\n\\n    var percentsplayed = function percentsplayed(event, data) {\\n      var percent = data.percent;\\n\\n      _this.track({\\n        action: \\\"\\\".concat(percent, \\\" Percents Played\\\"),\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var timeplayed = function timeplayed(event, data) {\\n      var time = data.time;\\n\\n      _this.track({\\n        action: \\\"\\\".concat(time, \\\" Seconds Played\\\"),\\n        value: time,\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var seek = function seek(event, data) {\\n      var seekStart = data.seekStart,\\n          seekEnd = data.seekEnd;\\n\\n      _this.track({\\n        action: 'Seek Start',\\n        value: seekStart\\n      });\\n\\n      _this.track({\\n        action: 'Seek End',\\n        value: seekEnd\\n      });\\n    };\\n\\n    var loadedmetadata = function loadedmetadata() {\\n      if (_this.player.currentSource().src !== _currentSource) {\\n        resetState();\\n        _currentSource = _this.player.currentSource().src;\\n\\n        if (_this.events.videoload) {\\n          videoload();\\n        }\\n      }\\n    };\\n\\n    var shoppableProductHover = function shoppableProductHover(event, data) {\\n      _this.track({\\n        action: 'productHover',\\n        label: data.productName\\n      });\\n    };\\n\\n    var shoppableProductClick = function shoppableProductClick(event, data) {\\n      _this.track({\\n        action: 'productClick',\\n        label: data.productName\\n      });\\n    };\\n\\n    var shoppableBarMax = function shoppableBarMax() {\\n      _this.track({\\n        action: 'shoppableBar',\\n        label: 'opened'\\n      });\\n    };\\n\\n    var shoppableBarMin = function shoppableBarMin() {\\n      _this.track({\\n        action: 'shoppableBar',\\n        label: 'closed'\\n      });\\n    };\\n\\n    var shoppableReplay = function shoppableReplay() {\\n      _this.track({\\n        action: 'replay'\\n      });\\n    };\\n\\n    var shoppableProductClickPost = function shoppableProductClickPost(event, data) {\\n      _this.track({\\n        action: 'productClickPostPlay',\\n        label: data.productName\\n      });\\n    };\\n\\n    var shoppableProductHoverPost = function shoppableProductHoverPost(event, data) {\\n      _this.track({\\n        action: 'productHoverPostPlay',\\n        label: data.productName\\n      });\\n    };\\n\\n    if (_this.events.shoppable) {\\n      _this.player.on('productHover', shoppableProductHover.bind(_this));\\n\\n      _this.player.on('productClick', shoppableProductClick.bind(_this));\\n\\n      _this.player.on('productHoverPost', shoppableProductHoverPost.bind(_this));\\n\\n      _this.player.on('productClickPost', shoppableProductClickPost.bind(_this));\\n\\n      _this.player.on('productBarMin', shoppableBarMin.bind(_this));\\n\\n      _this.player.on('productBarMax', shoppableBarMax.bind(_this));\\n\\n      _this.player.on('replay', shoppableReplay.bind(_this));\\n    }\\n\\n    if (_this.events.play) {\\n      _this.player.on('play', play.bind(_this));\\n    }\\n\\n    if (_this.events.ended) {\\n      _this.player.on('ended', ended.bind(_this));\\n    }\\n\\n    if (_this.events.volumechange) {\\n      _this.player.on('volumechange', volumechange.bind(_this));\\n    }\\n\\n    if (_this.events.resize) {\\n      _this.player.on('resize', resize.bind(_this));\\n    }\\n\\n    if (_this.events.error) {\\n      _this.player.on('error', error.bind(_this));\\n    }\\n\\n    if (_this.events.start) {\\n      _this.player.on('playing', start.bind(_this));\\n    }\\n\\n    if (_this.events.fullscreenchange) {\\n      _this.player.on('fullscreenchange', fullscreenchange.bind(_this));\\n    }\\n\\n    if (_this.events.percentsplayed) {\\n      _extendedEvents.on('percentsplayed', percentsplayed.bind(_this));\\n    }\\n\\n    if (_this.events.timeplayed) {\\n      _extendedEvents.on('timeplayed', timeplayed.bind(_this));\\n    }\\n\\n    if (_this.events.pause) {\\n      _extendedEvents.on('pausenoseek', pause.bind(_this));\\n    }\\n\\n    if (_this.events.seek) {\\n      _extendedEvents.on('seek', seek.bind(_this));\\n    }\\n\\n    if (_this.events.playerload) {\\n      playerload();\\n    }\\n\\n    _this.player.on('loadedmetadata', loadedmetadata.bind(_this));\\n  };\\n\\n  this.track = function (_ref) {\\n    var action = _ref.action,\\n        label = _ref.label,\\n        _ref$value = _ref.value,\\n        value = _ref$value === void 0 ? null : _ref$value,\\n        _ref$nonInteraction = _ref.nonInteraction,\\n        nonInteraction = _ref$nonInteraction === void 0 ? false : _ref$nonInteraction;\\n    var eventData = {\\n      eventCategory: _category,\\n      eventAction: action,\\n      eventLabel: label || _defaultLabel(_this.player),\\n      eventValue: value || Math.round(_this.player.currentTime()),\\n      nonInteraction: nonInteraction\\n    };\\n    window.ga('send', 'event', eventData);\\n  };\\n\\n  var resetState = function resetState() {\\n    _currentSource = '';\\n    _startTracked = false;\\n    _endTracked = false;\\n  };\\n\\n  resetState();\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new AnalyticsPlugin(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/analytics/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/autoplay-on-scroll/index.js\":\n/*!*********************************************!*\\\n  !*** ./plugins/autoplay-on-scroll/index.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _positioning = __webpack_require__(/*! utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar defaults = {\\n  fraction: 0.5,\\n  isMuted: true\\n};\\n\\nvar AutoplayOnScrollPlugin = function AutoplayOnScrollPlugin(player) {\\n  var _this = this;\\n\\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, AutoplayOnScrollPlugin);\\n\\n  opts = (0, _assign.assign)({}, defaults, opts);\\n  this.player = player;\\n\\n  var _options = (0, _slicing.sliceProperties)(opts, 'fraction');\\n\\n  var _pausedByScroll = false;\\n  var _playedByScroll = false;\\n  var _pauseHandler = null;\\n  var _playHandler = null;\\n\\n  this.init = function () {\\n    registerEventHandlers();\\n    checkViewportState();\\n  };\\n\\n  var clearEventHandlers = function clearEventHandlers() {\\n    window.removeEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.removeEventListener('load', checkViewportState, false);\\n    window.removeEventListener('scroll', checkViewportState, false);\\n    window.removeEventListener('resize', checkViewportState, false);\\n\\n    _this.player.off('pause', _pauseHandler);\\n\\n    _this.player.off('play', _playHandler);\\n  };\\n\\n  var pause = function pause() {\\n    _pausedByScroll = true;\\n    _playedByScroll = false;\\n\\n    _this.player.pause();\\n  };\\n\\n  var play = function play() {\\n    _pausedByScroll = false;\\n    _playedByScroll = true;\\n\\n    _this.player.play();\\n  };\\n\\n  var checkViewportState = function checkViewportState() {\\n    var visible = (0, _positioning.isElementInViewport)(_this.player.el(), {\\n      fraction: _options.fraction\\n    });\\n\\n    if (visible) {\\n      if (_this.player.paused()) {\\n        play();\\n      }\\n    } else if (!_this.player.paused() && !_this.player.activePlugins_.floatingPlayer) {\\n      pause();\\n    }\\n  };\\n\\n  var registerEventHandlers = function registerEventHandlers() {\\n    // TODO: find a better replacement for 'pause' since it's being triggered\\n    // by 'buffering' as well.\\n    _pauseHandler = function _pauseHandler() {\\n      if (!_this.player.waiting && !_pausedByScroll) {\\n        clearEventHandlers();\\n      }\\n    };\\n\\n    _playHandler = function _playHandler() {\\n      if (!_playedByScroll) {\\n        clearEventHandlers();\\n      }\\n    };\\n\\n    window.addEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.addEventListener('load', checkViewportState, false);\\n    window.addEventListener('scroll', checkViewportState, false);\\n    window.addEventListener('resize', checkViewportState, false);\\n\\n    _this.player.on('pause', _pauseHandler);\\n\\n    _this.player.on('play', _playHandler);\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new AutoplayOnScrollPlugin(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/autoplay-on-scroll/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/common.js\":\n/*!**************************************!*\\\n  !*** ./plugins/cloudinary/common.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.codecToSrcTransformation = exports.h264avcToString = exports.codecShorthandTrans = exports.cloudinaryErrorsConverter = exports.mergeTransformation = exports.mergeCloudinaryConfig = exports.isSrcEqual = exports.normalizeOptions = void 0;\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \\\"cloudinary-core\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \\\"./utils/type-inference.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nvar normalizeOptions = function normalizeOptions(publicId, options) {\\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\\n      _ref$tolerateMissingI = _ref.tolerateMissingId,\\n      tolerateMissingId = _ref$tolerateMissingI === void 0 ? false : _ref$tolerateMissingI;\\n\\n  if ((0, _typeInference.isPlainObject)(publicId)) {\\n    var _options = (0, _assign.assign)({}, publicId);\\n\\n    publicId = (0, _slicing.sliceAndUnsetProperties)(_options, 'publicId').publicId;\\n\\n    if (!(0, _typeInference.isString)(publicId) && !tolerateMissingId) {\\n      throw new Error('Source is missing \\\\'publicId\\\\'.');\\n    }\\n\\n    if (options) {\\n      options = (0, _assign.assign)({}, _options, options);\\n    }\\n  }\\n\\n  return {\\n    publicId: publicId,\\n    options: options\\n  };\\n};\\n\\nexports.normalizeOptions = normalizeOptions;\\n\\nvar isSrcEqual = function isSrcEqual(source1, source2) {\\n  var src1 = source1;\\n  var src2 = source2;\\n\\n  if (_typeof(source1) === 'object') {\\n    src1 = source1.src;\\n  }\\n\\n  if (_typeof(source2) === 'object') {\\n    src2 = source2.src;\\n  }\\n\\n  if (/^\\\\/\\\\//.test(src1)) {\\n    src2 = src2.slice(src2.indexOf('//'));\\n  }\\n\\n  if (/^\\\\/\\\\//.test(src2)) {\\n    src1 = src1.slice(src1.indexOf('//'));\\n  }\\n\\n  return src1 === src2;\\n};\\n\\nexports.isSrcEqual = isSrcEqual;\\n\\nvar mergeCloudinaryConfig = function mergeCloudinaryConfig(config1, config2) {\\n  if (config1.constructor.name === 'Cloudinary' && config1.config) {\\n    config1 = config1.config();\\n  }\\n\\n  var newConfig = new _cloudinaryCore.default.Cloudinary(config1);\\n\\n  if (config2.constructor.name === 'Cloudinary' && config2.config) {\\n    config2 = config1.config();\\n  }\\n\\n  return newConfig.config(config2);\\n};\\n\\nexports.mergeCloudinaryConfig = mergeCloudinaryConfig;\\n\\nvar mergeTransformation = function mergeTransformation(transformation1, transformation2) {\\n  if (transformation1.constructor.name === 'Transformation' && transformation1.toOptions) {\\n    transformation1 = transformation1.toOptions();\\n  }\\n\\n  var newTransformation = new _cloudinaryCore.default.Transformation(transformation1);\\n  return newTransformation.fromOptions(transformation2);\\n};\\n\\nexports.mergeTransformation = mergeTransformation;\\n\\nvar cloudinaryErrorsConverter = function cloudinaryErrorsConverter(_ref2) {\\n  var errorMsg = _ref2.errorMsg,\\n      publicId = _ref2.publicId,\\n      cloudName = _ref2.cloudName,\\n      statusCode = _ref2.statusCode;\\n  var msg = 'Video cannot be played';\\n  var error = {\\n    code: 10,\\n    message: \\\"\\\".concat(msg).concat(errorMsg ? '- ' + errorMsg : ''),\\n    statusCode: statusCode\\n  };\\n  var err = errorMsg.toLowerCase();\\n\\n  if (err.startsWith('unknown customer')) {\\n    error.code = 11;\\n    error.message = \\\"\\\".concat(msg, \\\" Unknown cloud-name \\\").concat(cloudName);\\n  }\\n\\n  if (err.startsWith('resource not found')) {\\n    error.code = 12;\\n    error.message = \\\"\\\".concat(msg, \\\" Public ID \\\").concat(publicId, \\\" not found\\\");\\n  }\\n\\n  if (err.startsWith('private resource')) {\\n    error.code = 13;\\n    error.message = \\\"\\\".concat(msg, \\\" Private video\\\");\\n  }\\n\\n  if (err.startsWith('unauthenticated access')) {\\n    error.message = \\\"\\\".concat(msg, \\\" Requires authentication\\\");\\n    error.code = 14;\\n  }\\n\\n  return error;\\n};\\n\\nexports.cloudinaryErrorsConverter = cloudinaryErrorsConverter;\\n\\nvar codecShorthandTrans = function codecShorthandTrans(short) {\\n  var transTable = {\\n    h265: 'hev1.1.6.L93.B0',\\n    vp9: 'vp09.00.50.08',\\n    h264: 'avc1.42E01E'\\n  };\\n  return transTable[short] ? transTable[short] : short;\\n};\\n\\nexports.codecShorthandTrans = codecShorthandTrans;\\nvar ISOAVC_MAP = {\\n  'avc1': 'h264',\\n  'avc2': 'h264',\\n  'svc1': 'Scalable Video Coding',\\n  'mvc1': 'Multiview Video Coding',\\n  'mvc2': 'Multiview Video Coding'\\n};\\nvar PROFILE = {\\n  '0': 'No',\\n  //  0             - *** when profile=RCDO and level=0 - \\\"RCDO\\\"  - RCDO bitstream MUST obey to all the constraints of the Baseline profile\\n  '42': 'baseline',\\n  // 66 in-decimal\\n  '4d': 'main',\\n  // 77 in-decimal\\n  '58': 'extended',\\n  // 88 in-decimal\\n  '64': 'high',\\n  // 100 in-decimal\\n  '6e': 'high 10',\\n  // 110 in-decimal\\n  '7a': 'high 4:2:2',\\n  // 122 in-decimal\\n  'f4': 'high 4:4:4',\\n  // 244 in-decimal\\n  '2c': 'CAVLC 4:4:4',\\n  // 44 in-decimal\\n  // profiles for SVC - Scalable Video Coding extension to H.264\\n  '53': 'Scalable Baseline',\\n  // 83 in-decimal\\n  '56': 'Scalable High',\\n  // 86 in-decimal\\n  // profiles for MVC - Multiview Video Coding extension to H.264\\n  '80': 'Stereo High',\\n  // 128 in-decimal\\n  '76': 'Multiview High',\\n  // 118 in-decimal\\n  '8a': 'Multiview Depth High' // 138 in-decimal\\n\\n};\\n\\nfunction avcotiToStr(s) {\\n  var REGEX = /([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i;\\n\\n  if (REGEX.test(s) === false) {\\n    throw new Error('error: please provide a 3-bytes hex-sequence for example: 42001e');\\n  }\\n\\n  var matches = s.match(REGEX);\\n  matches.shift(); // kills first one (regex matchs entire string)\\n\\n  var profile_idc = matches[0];\\n  profile_idc = PROFILE[profile_idc];\\n  profile_idc = typeof profile_idc === 'string' ? profile_idc : 'Unknown'; // explicit fix.\\n  // constraint_set_flags  = matches[1]; //maybe some other time..\\n\\n  var level_idc = matches[2];\\n  level_idc = parseInt(level_idc, 16); // will give something like 30  (integer thirty)\\n\\n  level_idc = String(level_idc).split('').join('.'); // will give something like \\\"3.0\\\"\\n\\n  return \\\"\\\".concat(profile_idc, \\\":\\\").concat(level_idc);\\n}\\n\\nvar h264avcToString = function h264avcToString(s) {\\n  var REGEX = /(avc1|avc2|svc1|mvc1|mvc2)\\\\.([0-9a-f]{6})/i;\\n\\n  if (REGEX.test('avc1.42001e') === false) {\\n    throw new Error('Codec string is not formatted according to H.264/AVC standards for example avc1.42001e (maybe an iOS friendly version...)');\\n  }\\n\\n  var matches = s.match(REGEX);\\n\\n  if (matches !== null) {\\n    matches.shift(); // first one is the entire-string.\\n\\n    var vc_codec = ISOAVC_MAP[matches[0]];\\n    var avc_codec = typeof avc_codec === 'string' ? avc_codec : 'Unknown'; // explicit fix\\n\\n    return vc_codec + ':' + avcotiToStr(matches[1]);\\n  }\\n\\n  return s;\\n};\\n\\nexports.h264avcToString = h264avcToString;\\n\\nvar codecToSrcTransformation = function codecToSrcTransformation(codec) {\\n  if (!codec) {\\n    return {};\\n  }\\n\\n  switch (codec) {\\n    case 'vp9':\\n      return {\\n        video_codec: 'vp9'\\n      };\\n\\n    case 'hev1':\\n      return {\\n        video_codec: 'h265'\\n      };\\n\\n    case 'h264':\\n      return {\\n        video_codec: 'h264:baseline:3.0'\\n      };\\n\\n    default:\\n      return {\\n        video_codec: h264avcToString(codec)\\n      };\\n  }\\n};\\n\\nexports.codecToSrcTransformation = codecToSrcTransformation;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/common.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/event-handler-registry.js\":\n/*!******************************************************!*\\\n  !*** ./plugins/cloudinary/event-handler-registry.js ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar EventHandlerRegistry = /*#__PURE__*/function () {\\n  function EventHandlerRegistry(emitter) {\\n    _classCallCheck(this, EventHandlerRegistry);\\n\\n    this._emitter = emitter;\\n    this._eventHandlers = [];\\n  }\\n\\n  _createClass(EventHandlerRegistry, [{\\n    key: \\\"on\\\",\\n    value: function on(type, handler) {\\n      this._eventHandlers.push({\\n        type: type,\\n        handler: handler\\n      });\\n\\n      this._emitter.on(type, handler);\\n    }\\n  }, {\\n    key: \\\"one\\\",\\n    value: function one(type, handler) {\\n      var _this = this;\\n\\n      var wrapper = function wrapper() {\\n        handler.apply(void 0, arguments);\\n\\n        _this.off(type, handler);\\n      };\\n\\n      this._eventHandlers.push({\\n        type: type,\\n        handler: handler,\\n        wrapper: wrapper\\n      });\\n\\n      this._emitter.one(type, handler);\\n    }\\n  }, {\\n    key: \\\"off\\\",\\n    value: function off(type, handler) {\\n      var index = (0, _find.findIndex)(this._eventHandlers, function (event) {\\n        return event.type === type && event.handler === handler;\\n      });\\n\\n      if (index === -1) {\\n        return;\\n      }\\n\\n      var event = this._eventHandlers[index];\\n\\n      this._emitter.off(type, event.wrapper || event.handler);\\n\\n      this._eventHandlers.splice(index, 1);\\n    }\\n  }, {\\n    key: \\\"removeAllListeners\\\",\\n    value: function removeAllListeners() {\\n      var _this2 = this;\\n\\n      this._eventHandlers.forEach(function (event) {\\n        _this2.off(event);\\n      });\\n    }\\n  }]);\\n\\n  return EventHandlerRegistry;\\n}();\\n\\nvar _default = EventHandlerRegistry;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/event-handler-registry.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/index.js\":\n/*!*************************************!*\\\n  !*** ./plugins/cloudinary/index.js ***!\n  \\*************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\nexports.CONSTRUCTOR_PARAMS = void 0;\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \\\"cloudinary-core\\\"));\\n\\nvar _mixin2 = __webpack_require__(/*! utils/mixin */ \\\"./utils/mixin.js\\\");\\n\\nvar _applyWithProps = __webpack_require__(/*! utils/apply-with-props */ \\\"./utils/apply-with-props.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _cloudinary = __webpack_require__(/*! utils/cloudinary */ \\\"./utils/cloudinary.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _common = __webpack_require__(/*! ./common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _playlistable = _interopRequireDefault(__webpack_require__(/*! mixins/playlistable */ \\\"./mixins/playlistable.js\\\"));\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! ./models/video-source */ \\\"./plugins/cloudinary/models/video-source.js\\\"));\\n\\nvar _eventHandlerRegistry = _interopRequireDefault(__webpack_require__(/*! ./event-handler-registry */ \\\"./plugins/cloudinary/event-handler-registry.js\\\"));\\n\\nvar _audioSource = _interopRequireDefault(__webpack_require__(/*! ./models/audio-source */ \\\"./plugins/cloudinary/models/audio-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar DEFAULT_PARAMS = {\\n  transformation: {},\\n  sourceTypes: [],\\n  sourceTransformation: [],\\n  posterOptions: {}\\n};\\nvar CONSTRUCTOR_PARAMS = ['cloudinaryConfig', 'transformation', 'sourceTypes', 'sourceTransformation', 'posterOptions', 'autoShowRecommendations'];\\nexports.CONSTRUCTOR_PARAMS = CONSTRUCTOR_PARAMS;\\n\\nvar CloudinaryContext = /*#__PURE__*/function (_mixin) {\\n  _inherits(CloudinaryContext, _mixin);\\n\\n  var _super = _createSuper(CloudinaryContext);\\n\\n  function CloudinaryContext(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, CloudinaryContext);\\n\\n    _this = _super.call(this, player, options);\\n    _this.player = player;\\n    options = (0, _assign.assign)({}, DEFAULT_PARAMS, options);\\n    var _source = null;\\n    var _sources = null;\\n    var _lastSource = null;\\n    var _lastPlaylist = null;\\n    var _posterOptions = null;\\n    var _cloudinaryConfig = null;\\n    var _transformation = null;\\n    var _sourceTypes = null;\\n    var _sourceTransformation = null;\\n    var _chainTarget = options.chainTarget;\\n    var _playerEvents = null;\\n    var _recommendations = null;\\n    var _autoShowRecommendations = false;\\n\\n    _this.source = function (source) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      options = (0, _assign.assign)({}, options);\\n\\n      if (!source) {\\n        return _source;\\n      }\\n\\n      var src = null;\\n\\n      if (source instanceof _videoSource.default) {\\n        src = source;\\n      } else {\\n        var _normalizeOptions = (0, _common.normalizeOptions)(source, options),\\n            publicId = _normalizeOptions.publicId,\\n            _options = _normalizeOptions.options;\\n\\n        src = _this.buildSource(publicId, _options);\\n      }\\n\\n      if (src.recommendations()) {\\n        var recommendations = src.recommendations();\\n        var itemBuilder = null;\\n        var disableAutoShow = false;\\n\\n        if (options.recommendationOptions) {\\n          var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options.recommendationOptions, 'disableAutoShow', 'itemBuilder');\\n\\n          disableAutoShow = _sliceAndUnsetPropert.disableAutoShow;\\n          itemBuilder = _sliceAndUnsetPropert.itemBuilder;\\n        }\\n\\n        setRecommendations(recommendations, {\\n          disableAutoShow: disableAutoShow,\\n          itemBuilder: itemBuilder\\n        });\\n      } else {\\n        unsetRecommendations();\\n      }\\n\\n      _source = src;\\n\\n      if (!options.skipRefresh) {\\n        refresh();\\n      }\\n\\n      _this.player.trigger('cldsourcechanged', {\\n        source: src\\n      });\\n\\n      return _chainTarget;\\n    };\\n\\n    _this.buildSource = function (publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      var builtSrc = null;\\n\\n      var _normalizeOptions2 = (0, _common.normalizeOptions)(publicId, options);\\n\\n      publicId = _normalizeOptions2.publicId;\\n      options = _normalizeOptions2.options;\\n      options.cloudinaryConfig = (0, _common.mergeCloudinaryConfig)(_this.cloudinaryConfig(), options.cloudinaryConfig || {});\\n      options.transformation = (0, _common.mergeTransformation)(_this.transformation(), options.transformation || {});\\n      options.sourceTransformation = options.sourceTransformation || _this.sourceTransformation();\\n      options.sourceTypes = options.sourceTypes || _this.sourceTypes();\\n      options.poster = options.poster || posterOptionsForCurrent();\\n      options.queryParams = options.usageReport ? {\\n        _s: \\\"vp-\\\".concat(\\\"1.5.3\\\")\\n      } : {};\\n\\n      if (options.sourceTypes.indexOf('audio') > -1) {\\n        builtSrc = new _audioSource.default(publicId, options);\\n      } else {\\n        builtSrc = new _videoSource.default(publicId, options);\\n      }\\n\\n      return builtSrc;\\n    };\\n\\n    _this.posterOptions = function (options) {\\n      if (!options) {\\n        return _posterOptions;\\n      }\\n\\n      _posterOptions = options;\\n      return _chainTarget;\\n    };\\n\\n    _this.cloudinaryConfig = function (config) {\\n      if (!config) {\\n        return _cloudinaryConfig;\\n      }\\n\\n      _cloudinaryConfig = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Cloudinary, config);\\n      return _chainTarget;\\n    };\\n\\n    _this.transformation = function (trans) {\\n      if (!trans) {\\n        return _transformation;\\n      }\\n\\n      _transformation = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Transformation, trans);\\n      return _chainTarget;\\n    };\\n\\n    _this.sourceTypes = function (types) {\\n      if (!types) {\\n        return _sourceTypes;\\n      }\\n\\n      _sourceTypes = types;\\n      return _chainTarget;\\n    };\\n\\n    _this.getCurrentSources = function () {\\n      return _sources;\\n    };\\n\\n    _this.sourceTransformation = function (trans) {\\n      if (!trans) {\\n        return _sourceTransformation;\\n      }\\n\\n      _sourceTransformation = trans;\\n      return _chainTarget;\\n    };\\n\\n    _this.on = function () {\\n      var _playerEvents2;\\n\\n      return (_playerEvents2 = _playerEvents).on.apply(_playerEvents2, arguments);\\n    };\\n\\n    _this.one = function () {\\n      var _playerEvents3;\\n\\n      return (_playerEvents3 = _playerEvents).one.apply(_playerEvents3, arguments);\\n    };\\n\\n    _this.off = function () {\\n      var _playerEvents4;\\n\\n      return (_playerEvents4 = _playerEvents).off.apply(_playerEvents4, arguments);\\n    };\\n\\n    _this.autoShowRecommendations = function (autoShow) {\\n      if (autoShow === undefined) {\\n        return _autoShowRecommendations;\\n      }\\n\\n      _autoShowRecommendations = autoShow;\\n      return _chainTarget;\\n    };\\n\\n    _this.dispose = function () {\\n      if (_this.playlist()) {\\n        _this.disposePlaylist();\\n      }\\n\\n      unsetRecommendations();\\n      _source = undefined;\\n\\n      _playerEvents.removeAllListeners();\\n    };\\n\\n    var setRecommendations = function setRecommendations(recommendations, _ref) {\\n      var _ref$disableAutoShow = _ref.disableAutoShow,\\n          disableAutoShow = _ref$disableAutoShow === void 0 ? false : _ref$disableAutoShow,\\n          _ref$itemBuilder = _ref.itemBuilder,\\n          itemBuilder = _ref$itemBuilder === void 0 ? null : _ref$itemBuilder;\\n      unsetRecommendations();\\n\\n      if (!Array.isArray(recommendations) && typeof recommendations !== 'function' && !recommendations.then) {\\n        throw new Error('\\\"recommendations\\\" must be either an array or a function');\\n      }\\n\\n      _recommendations = {};\\n\\n      itemBuilder = itemBuilder || function (source) {\\n        return {\\n          source: source instanceof _videoSource.default ? source : _this.buildSource(source),\\n          action: function action() {\\n            return _this.source(source);\\n          }\\n        };\\n      };\\n\\n      _recommendations.sourceChangedHandler = function () {\\n        var trigger = function trigger(sources) {\\n          if (typeof sources !== 'undefined' && sources.length > 0) {\\n            var items = sources.map(function (_source) {\\n              return itemBuilder(_source);\\n            });\\n\\n            _this.player.trigger('recommendationschanged', {\\n              items: items\\n            });\\n          } else {\\n            _this.player.trigger('recommendationsnoshow');\\n          }\\n\\n          _recommendations.sources = sources;\\n        };\\n\\n        if (typeof recommendations === 'function') {\\n          trigger(recommendations());\\n        } else if (recommendations.then) {\\n          recommendations.then(trigger);\\n        } else {\\n          trigger(recommendations);\\n        }\\n      };\\n\\n      _this.one('cldsourcechanged', _recommendations.sourceChangedHandler);\\n\\n      _recommendations.endedHandler = function () {\\n        if (!disableAutoShow && _this.autoShowRecommendations()) {\\n          _this.player.trigger('recommendationsshow');\\n        }\\n      };\\n\\n      _this.on('ended', _recommendations.endedHandler);\\n    };\\n\\n    var unsetRecommendations = function unsetRecommendations() {\\n      if (_recommendations) {\\n        _this.off('cldsourcechanged', _recommendations.sourceChangedHandler);\\n\\n        _this.off('ended', _recommendations.endedHandler);\\n\\n        delete _recommendations.endedHandler;\\n        delete _recommendations.sourceChangedHandler;\\n      }\\n\\n      _recommendations = null;\\n    };\\n\\n    var refresh = function refresh() {\\n      var src = _this.source();\\n\\n      if (src.poster()) {\\n        _this.player.poster(src.poster().url());\\n      }\\n\\n      _sources = src.generateSources().filter(function (src) {\\n        if (src.isAdaptive) {\\n          var codec = src.type.split('; ')[1] || null;\\n\\n          if (codec && 'MediaSource' in window) {\\n            var typeStr = \\\"video/mp4; \\\".concat(src.type.split('; ')[1] || '');\\n            return MediaSource.isTypeSupported(typeStr);\\n          }\\n        }\\n\\n        return true;\\n      });\\n\\n      _this.player.src(_sources);\\n\\n      _lastSource = src;\\n      _lastPlaylist = _this.playlist();\\n    };\\n\\n    var posterOptionsForCurrent = function posterOptionsForCurrent() {\\n      var opts = (0, _assign.assign)({}, _this.posterOptions());\\n\\n      if (opts.transformation) {\\n        if ((opts.transformation.width || opts.transformation.height) && !opts.transformation.crop) {\\n          opts.transformation.crop = 'scale';\\n        }\\n      }\\n\\n      opts.transformation = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Transformation, opts.transformation || {}); // Set poster dimensions to player actual size.\\n      // (unless they were explicitly set via `posterOptions`)\\n\\n      var playerEl = _this.player.el();\\n\\n      if (playerEl && playerEl.clientWidth && playerEl.clientHeight && !(0, _cloudinary.isKeyInTransformation)(opts.transformation, 'width') && !(0, _cloudinary.isKeyInTransformation)(opts.transformation, 'height')) {\\n        var roundUp100 = function roundUp100(val) {\\n          return 100 * Math.ceil(val / 100);\\n        };\\n\\n        opts.transformation.width(roundUp100(playerEl.clientWidth)).height(roundUp100(playerEl.clientHeight)).crop('limit');\\n      }\\n\\n      return opts;\\n    }; // Handle external (non-cloudinary plugin) source changes (e.g. by ad plugins)\\n\\n\\n    var syncState = function syncState(_, data) {\\n      var src = data.to; // When source is cloudinary's\\n\\n      if (_lastSource && _lastSource.contains(src)) {\\n        // If plugin state doesn't have an active VideoSource\\n        if (!_this.source()) {\\n          // We might have been running a playlist, reset playlist's state.\\n          if (_lastPlaylist) {\\n            _this.playlist(_lastPlaylist);\\n          } // Rebuild last source state without calling vjs's 'src' and 'poster'\\n\\n\\n          _this.source(_lastSource, {\\n            skipRefresh: true\\n          });\\n        }\\n      } else {\\n        // Used by cloudinary-only components\\n        _this.player.trigger('cldsourcechanged', {}); // When source isn't cloudinary's - reset the plugin's state.\\n\\n\\n        _this.dispose();\\n      }\\n    };\\n\\n    _playerEvents = new _eventHandlerRegistry.default(_this.player);\\n\\n    var constructorParams = _slicing.sliceAndUnsetProperties.apply(void 0, [options].concat(CONSTRUCTOR_PARAMS));\\n\\n    (0, _applyWithProps.applyWithProps)(_assertThisInitialized(_this), constructorParams);\\n\\n    _this.on('sourcechanged', syncState);\\n\\n    return _this;\\n  }\\n\\n  _createClass(CloudinaryContext, [{\\n    key: \\\"currentSourceType\\\",\\n    value: function currentSourceType() {\\n      return this.source().getType();\\n    }\\n  }, {\\n    key: \\\"currentPublicId\\\",\\n    value: function currentPublicId() {\\n      return this.source() && this.source().publicId();\\n    }\\n  }, {\\n    key: \\\"currentPoster\\\",\\n    value: function currentPoster() {\\n      return this.source() && this.source().poster();\\n    }\\n  }]);\\n\\n  return CloudinaryContext;\\n}((0, _mixin2.mixin)(_playlistable.default));\\n\\nfunction _default() {\\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  options.chainTarget = options.chainTarget || this;\\n  this.cloudinary = new CloudinaryContext(this, options);\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/models/audio-source.js\":\n/*!***************************************************!*\\\n  !*** ./plugins/cloudinary/models/audio-source.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! ./video-source */ \\\"./plugins/cloudinary/models/video-source.js\\\"));\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ./image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _querystring = __webpack_require__(/*! utils/querystring */ \\\"./utils/querystring.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar DEFAULT_POSTER_PARAMS = {\\n  format: 'jpg',\\n  resource_type: 'video',\\n  transformation: {\\n    flags: 'waveform'\\n  }\\n};\\nvar COMMON_AUDIO_FORMATS = ['mp3', 'ogg', 'wav', 'mp4'];\\nvar AUDIO_SUFFIX_REMOVAL_PATTERN = RegExp(\\\"\\\\\\\\.(\\\".concat(COMMON_AUDIO_FORMATS.join('|'), \\\")$$\\\"));\\nvar DEFAULT_AUDIO_PARAMS = {\\n  resource_type: 'video',\\n  type: 'upload',\\n  transformation: []\\n};\\n\\nvar AudioSource = /*#__PURE__*/function (_VideoSource) {\\n  _inherits(AudioSource, _VideoSource);\\n\\n  var _super = _createSuper(AudioSource);\\n\\n  function AudioSource(publicId) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, AudioSource);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n    publicId = publicId.replace(AUDIO_SUFFIX_REMOVAL_PATTERN, '');\\n    options = (0, _assign.assign)({}, DEFAULT_AUDIO_PARAMS, options);\\n\\n    var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options, 'poster'),\\n        poster = _sliceAndUnsetPropert.poster;\\n\\n    _this = _super.call(this, publicId, options);\\n    var _poster = null;\\n    _this._type = 'AudioSource';\\n\\n    _this.poster = function (publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (!publicId) {\\n        return _poster;\\n      }\\n\\n      if (publicId instanceof _imageSource.default) {\\n        _poster = publicId;\\n        return _assertThisInitialized(_this);\\n      }\\n\\n      var _normalizeOptions2 = (0, _common.normalizeOptions)(publicId, options, {\\n        tolerateMissingId: true\\n      });\\n\\n      publicId = _normalizeOptions2.publicId;\\n      options = _normalizeOptions2.options;\\n\\n      if (!publicId) {\\n        publicId = _this.publicId();\\n        options = (0, _assign.assign)({}, options, DEFAULT_POSTER_PARAMS);\\n      }\\n\\n      options.cloudinaryConfig = options.cloudinaryConfig || _this.cloudinaryConfig();\\n      _poster = new _imageSource.default(publicId, options);\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.poster(poster);\\n\\n    _this.getPoster = function () {\\n      return _poster;\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(AudioSource, [{\\n    key: \\\"generateSources\\\",\\n    value: function generateSources() {\\n      var _this2 = this;\\n\\n      return this.sourceTypes().map(function (sourceType) {\\n        if (sourceType === 'audio') {\\n          var format = 'mp3';\\n          var opts = {};\\n          var srcTransformation = _this2.sourceTransformation()[sourceType] || [_this2.transformation()];\\n\\n          if (srcTransformation) {\\n            opts.transformation = srcTransformation;\\n          }\\n\\n          (0, _assign.assign)(opts, {\\n            resource_type: 'video',\\n            format: format\\n          });\\n          var queryString = '';\\n\\n          if (_this2.queryParams()) {\\n            queryString = (0, _querystring.objectToQuerystring)(_this2.queryParams());\\n          }\\n\\n          var src = \\\"\\\".concat(_this2.config().url(_this2.publicId(), opts)).concat(queryString);\\n          var type = 'video/mp4';\\n          return {\\n            type: type,\\n            src: src,\\n            cldSrc: _this2,\\n            poster: _this2.getPoster().url()\\n          };\\n        } else {\\n          return null;\\n        }\\n      }, this);\\n    }\\n  }]);\\n\\n  return AudioSource;\\n}(_videoSource.default);\\n\\nvar _default = AudioSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/audio-source.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/models/base-source.js\":\n/*!**************************************************!*\\\n  !*** ./plugins/cloudinary/models/base-source.js ***!\n  \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \\\"cloudinary-core\\\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _cloudinary = __webpack_require__(/*! utils/cloudinary */ \\\"./utils/cloudinary.js\\\");\\n\\nvar _querystring = __webpack_require__(/*! utils/querystring */ \\\"./utils/querystring.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar BaseSource = /*#__PURE__*/function () {\\n  function BaseSource(publicId) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, BaseSource);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n    var _publicId = null;\\n    var _cloudinaryConfig = null;\\n    var _transformation = null;\\n    var _resourceConfig = null;\\n    var _queryParams = null;\\n\\n    this.publicId = function (publicId) {\\n      if (!publicId) {\\n        return _publicId;\\n      }\\n\\n      _publicId = publicId;\\n      return _this;\\n    };\\n\\n    this.cloudinaryConfig = function (config) {\\n      if (!config) {\\n        return _cloudinaryConfig;\\n      }\\n\\n      _cloudinaryConfig = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Cloudinary, config);\\n      return _this;\\n    };\\n\\n    this.resourceConfig = function (config) {\\n      if (!config) {\\n        return _resourceConfig;\\n      }\\n\\n      _resourceConfig = config;\\n      return _this;\\n    };\\n\\n    this.transformation = function (trans) {\\n      if (!trans) {\\n        return _transformation;\\n      }\\n\\n      _transformation = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Transformation, trans);\\n      return _this;\\n    };\\n\\n    this.queryParams = function (params) {\\n      if (!params) {\\n        return _queryParams;\\n      }\\n\\n      _queryParams = params;\\n      return _this;\\n    };\\n\\n    this.getType = function () {\\n      return _this._type;\\n    };\\n\\n    var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options, 'cloudinaryConfig'),\\n        cloudinaryConfig = _sliceAndUnsetPropert.cloudinaryConfig;\\n\\n    if (!cloudinaryConfig) {\\n      throw new Error('Source is missing \\\\'cloudinaryConfig\\\\'.');\\n    }\\n\\n    this.cloudinaryConfig(cloudinaryConfig);\\n\\n    var _sliceAndUnsetPropert2 = (0, _slicing.sliceAndUnsetProperties)(options, 'transformation'),\\n        transformation = _sliceAndUnsetPropert2.transformation;\\n\\n    this.transformation(transformation);\\n\\n    var _sliceAndUnsetPropert3 = (0, _slicing.sliceAndUnsetProperties)(options, 'queryParams'),\\n        queryParams = _sliceAndUnsetPropert3.queryParams;\\n\\n    this.queryParams(queryParams);\\n    this.resourceConfig(options);\\n    this.publicId(publicId);\\n  }\\n\\n  _createClass(BaseSource, [{\\n    key: \\\"config\\\",\\n    value: function config() {\\n      var cld = new _cloudinaryCore.default.Cloudinary(this.cloudinaryConfig().config());\\n      cld.config(this.resourceConfig());\\n      return cld;\\n    }\\n  }, {\\n    key: \\\"url\\\",\\n    value: function url() {\\n      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\\n          transformation = _ref.transformation;\\n\\n      var url = this.config().url(this.publicId(), {\\n        transformation: transformation || this.transformation()\\n      });\\n      var queryString = '';\\n\\n      if (this.queryParams()) {\\n        queryString = (0, _querystring.objectToQuerystring)(this.queryParams());\\n      }\\n\\n      return \\\"\\\".concat(url).concat(queryString);\\n    }\\n  }]);\\n\\n  return BaseSource;\\n}();\\n\\nvar _default = BaseSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/base-source.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/models/image-source.js\":\n/*!***************************************************!*\\\n  !*** ./plugins/cloudinary/models/image-source.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _baseSource = _interopRequireDefault(__webpack_require__(/*! ./base-source */ \\\"./plugins/cloudinary/models/base-source.js\\\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar COMMON_IMAGE_FORMATS = ['jpg', 'png', 'gif', 'webp'];\\nvar IMAGE_SUFFIX_REMOVAL_PATTERN = RegExp(\\\"\\\\\\\\.(\\\".concat(COMMON_IMAGE_FORMATS.join('|'), \\\")$$\\\"));\\nvar DEFAULT_IMAGE_PARAMS = {\\n  resource_type: 'image',\\n  type: 'upload',\\n  transformation: []\\n};\\n\\nvar ImageSource = /*#__PURE__*/function (_BaseSource) {\\n  _inherits(ImageSource, _BaseSource);\\n\\n  var _super = _createSuper(ImageSource);\\n\\n  function ImageSource(publicId) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ImageSource);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n    publicId = publicId.replace(IMAGE_SUFFIX_REMOVAL_PATTERN, '');\\n    options = (0, _assign.assign)({}, DEFAULT_IMAGE_PARAMS, options);\\n    _this = _super.call(this, publicId, options);\\n    _this._type = 'ImageSource';\\n    return _this;\\n  }\\n\\n  return ImageSource;\\n}(_baseSource.default);\\n\\nvar _default = ImageSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/image-source.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/cloudinary/models/video-source.js\":\n/*!***************************************************!*\\\n  !*** ./plugins/cloudinary/models/video-source.js ***!\n  \\***************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _baseSource = _interopRequireDefault(__webpack_require__(/*! ./base-source */ \\\"./plugins/cloudinary/models/base-source.js\\\"));\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ./image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _querystring = __webpack_require__(/*! utils/querystring */ \\\"./utils/querystring.js\\\");\\n\\nvar _cloudinary = __webpack_require__(/*! utils/cloudinary */ \\\"./utils/cloudinary.js\\\");\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\\n\\nfunction _nonIterableRest() { throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \\\"undefined\\\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\\\"return\\\"] != null) _i[\\\"return\\\"](); } finally { if (_d) throw _e; } } return _arr; }\\n\\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar DEFAULT_POSTER_PARAMS = {\\n  format: 'jpg',\\n  resource_type: 'video'\\n};\\nvar DEFAULT_VIDEO_SOURCE_TYPES = ['webm/vp9', 'mp4/h265', 'mp4'];\\nvar DEFAULT_VIDEO_PARAMS = {\\n  resource_type: 'video',\\n  type: 'upload',\\n  transformation: [],\\n  sourceTransformation: {},\\n  sourceTypes: DEFAULT_VIDEO_SOURCE_TYPES,\\n  recommendations: null,\\n  info: {}\\n};\\nvar VIDEO_SUFFIX_REMOVAL_PATTERN = RegExp(\\\"\\\\\\\\.(\\\".concat(DEFAULT_VIDEO_SOURCE_TYPES.join('|'), \\\")$$\\\")); // eslint-disable-next-line no-control-regex\\n\\nvar URL_PATTERN = RegExp('https?:\\\\\\\\/\\\\\\\\/(www\\\\\\\\.)?[-a-zA-Z0-9@:%._\\\\+~#=]{1,256}\\\\\\\\.[a-zA-Z0-9()]{1,6}\\\\\\\\b([-a-zA-Z0-9()@:%_\\\\+.~#?&/=]*)');\\nvar objectId = 0;\\n\\nvar generateId = function generateId() {\\n  return objectId++;\\n};\\n\\nvar VideoSource = /*#__PURE__*/function (_BaseSource) {\\n  _inherits(VideoSource, _BaseSource);\\n\\n  var _super = _createSuper(VideoSource);\\n\\n  function VideoSource(publicId) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, VideoSource);\\n\\n    var isRawUrl = URL_PATTERN.test(publicId);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n\\n    if (!isRawUrl) {\\n      publicId = publicId.replace(VIDEO_SUFFIX_REMOVAL_PATTERN, '');\\n    }\\n\\n    options = (0, _assign.assign)({}, DEFAULT_VIDEO_PARAMS, options);\\n\\n    if (!options.poster) {\\n      options.poster = (0, _assign.assign)({\\n        publicId: publicId\\n      }, DEFAULT_POSTER_PARAMS);\\n    }\\n\\n    var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options, 'poster', 'sourceTypes', 'sourceTransformation', 'info', 'recommendations', 'textTracks'),\\n        poster = _sliceAndUnsetPropert.poster,\\n        sourceTypes = _sliceAndUnsetPropert.sourceTypes,\\n        sourceTransformation = _sliceAndUnsetPropert.sourceTransformation,\\n        info = _sliceAndUnsetPropert.info,\\n        recommendations = _sliceAndUnsetPropert.recommendations,\\n        textTracks = _sliceAndUnsetPropert.textTracks;\\n\\n    _this = _super.call(this, publicId, options);\\n    var _poster = null;\\n    var _sourceTypes = null;\\n    var _sourceTransformation = null;\\n    var _info = null;\\n    var _recommendations = null;\\n    var _textTracks = null;\\n    _this._type = 'VideoSource';\\n    _this.isRawUrl = isRawUrl;\\n\\n    _this.poster = function (publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (!publicId) {\\n        return _poster;\\n      }\\n\\n      if (publicId instanceof _imageSource.default) {\\n        _poster = publicId;\\n        return _assertThisInitialized(_this);\\n      }\\n\\n      var _normalizeOptions2 = (0, _common.normalizeOptions)(publicId, options, {\\n        tolerateMissingId: true\\n      });\\n\\n      publicId = _normalizeOptions2.publicId;\\n      options = _normalizeOptions2.options;\\n\\n      if (!publicId) {\\n        publicId = _this.publicId();\\n        options = (0, _assign.assign)({}, options, DEFAULT_POSTER_PARAMS);\\n      }\\n\\n      options.cloudinaryConfig = options.cloudinaryConfig || _this.cloudinaryConfig();\\n      _poster = new _imageSource.default(publicId, options);\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.sourceTypes = function (types) {\\n      if (!types) {\\n        return _sourceTypes;\\n      }\\n\\n      _sourceTypes = types;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.sourceTransformation = function (trans) {\\n      if (!trans) {\\n        return _sourceTransformation;\\n      }\\n\\n      _sourceTransformation = trans;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.info = function (info) {\\n      if (!info) {\\n        return _info;\\n      }\\n\\n      _info = info;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.recommendations = function (recommends) {\\n      if (recommends === undefined) {\\n        return _recommendations;\\n      }\\n\\n      _recommendations = recommends;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.textTracks = function (textTracks) {\\n      if (textTracks === undefined) {\\n        return _textTracks;\\n      }\\n\\n      _textTracks = textTracks;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.poster(poster);\\n\\n    _this.sourceTypes(sourceTypes);\\n\\n    _this.sourceTransformation(sourceTransformation);\\n\\n    _this.info(info);\\n\\n    _this.recommendations(recommendations);\\n\\n    _this.textTracks(textTracks);\\n\\n    _this.objectId = generateId();\\n    return _this;\\n  }\\n\\n  _createClass(VideoSource, [{\\n    key: \\\"contains\\\",\\n    value: function contains(source) {\\n      var sources = this.generateSources();\\n      return sources.some(function (_source) {\\n        return (0, _common.isSrcEqual)(_source, source);\\n      });\\n    }\\n  }, {\\n    key: \\\"generateSources\\\",\\n    value: function generateSources() {\\n      var _this2 = this;\\n\\n      if (this.isRawUrl) {\\n        var type = this.sourceTypes().length > 1 ? null : this.sourceTypes()[0];\\n        return [this.generateRawSource(this.publicId(), type)];\\n      }\\n\\n      var isIe = typeof navigator !== 'undefined' && (/MSIE/.test(navigator.userAgent) || /Trident\\\\//.test(navigator.appVersion));\\n      var srcs = this.sourceTypes().map(function (sourceType) {\\n        var src = null;\\n\\n        var srcTransformation = _this2.sourceTransformation()[sourceType] || _this2.transformation();\\n\\n        var format = normalizeFormat(sourceType);\\n        var isAdaptive = ['mpd', 'm3u8'].indexOf(format) !== -1;\\n        var opts = {};\\n\\n        if (srcTransformation) {\\n          opts.transformation = Array.isArray(srcTransformation) ? srcTransformation : [srcTransformation];\\n        }\\n\\n        (0, _assign.assign)(opts, {\\n          resource_type: 'video',\\n          format: format\\n        });\\n        var type = null;\\n        var codecTrans = null;\\n        var hasCodecSrcTrans = (0, _cloudinary.isKeyInTransformation)(opts.transformation, 'video_codec') || (0, _cloudinary.isKeyInTransformation)(opts.transformation, 'streaming_profile');\\n\\n        var _formatToMimeTypeAndT = formatToMimeTypeAndTransformation(sourceType);\\n\\n        var _formatToMimeTypeAndT2 = _slicedToArray(_formatToMimeTypeAndT, 2);\\n\\n        type = _formatToMimeTypeAndT2[0];\\n        codecTrans = _formatToMimeTypeAndT2[1];\\n\\n        // If user's transformation include video_codec then don't add another video codec to transformation\\n        if (codecTrans && !hasCodecSrcTrans) {\\n          opts.transformation.push(codecTrans);\\n        }\\n\\n        if (opts.format === 'auto') {\\n          delete opts.format;\\n        }\\n\\n        var queryString = _this2.queryParams() ? (0, _querystring.objectToQuerystring)(_this2.queryParams()) : '';\\n        src = _this2.config().url(_this2.publicId(), opts); // if src is a url that already contains query params then replace '?' with '&'\\n\\n        src += src.indexOf('?') > -1 ? queryString.replace('?', '&') : queryString;\\n        return {\\n          type: type,\\n          src: src,\\n          cldSrc: _this2,\\n          isAdaptive: isAdaptive\\n        };\\n      });\\n\\n      if (isIe) {\\n        return srcs.filter(function (s) {\\n          return s.type !== 'video/mp4; codec=\\\"hev1.1.6.L93.B0\\\"';\\n        });\\n      } else if (_video.default.browser.IS_ANY_SAFARI) {\\n        // filter out dash on safari\\n        return srcs.filter(function (s) {\\n          return s.type.indexOf('application/dash+xml') === -1;\\n        });\\n      } else {\\n        return srcs;\\n      }\\n    }\\n  }, {\\n    key: \\\"generateRawSource\\\",\\n    value: function generateRawSource(url, type) {\\n      var t = type || url.split('.').pop();\\n      var isAdaptive = !!CONTAINER_MIME_TYPES[t];\\n\\n      if (isAdaptive) {\\n        type = CONTAINER_MIME_TYPES[t][0];\\n      } else {\\n        type = type ? \\\"video/\\\".concat(type) : null;\\n      }\\n\\n      return {\\n        type: type,\\n        src: url,\\n        cldSrc: this,\\n        isAdaptive: isAdaptive\\n      };\\n    }\\n  }]);\\n\\n  return VideoSource;\\n}(_baseSource.default);\\n\\nvar CONTAINER_MIME_TYPES = {\\n  dash: ['application/dash+xml'],\\n  hls: ['application/x-mpegURL'],\\n  mpd: ['application/dash+xml'],\\n  m3u8: ['application/x-mpegURL']\\n};\\n\\nfunction formatToMimeTypeAndTransformation(format) {\\n  var _format$toLowerCase$s = format.toLowerCase().split('\\\\/'),\\n      _format$toLowerCase$s2 = _slicedToArray(_format$toLowerCase$s, 2),\\n      container = _format$toLowerCase$s2[0],\\n      codec = _format$toLowerCase$s2[1];\\n\\n  var result = CONTAINER_MIME_TYPES[container];\\n  var transformation = null;\\n\\n  if (!result) {\\n    result = [\\\"video/\\\".concat(container), transformation];\\n  }\\n\\n  if (codec) {\\n    transformation = (0, _common.codecToSrcTransformation)(codec);\\n    result = [\\\"\\\".concat(result[0], \\\"; codecs=\\\\\\\"\\\").concat((0, _common.codecShorthandTrans)(codec), \\\"\\\\\\\"\\\"), transformation];\\n  }\\n\\n  return result;\\n}\\n\\nvar FORMAT_MAPPINGS = {\\n  hls: 'm3u8',\\n  dash: 'mpd'\\n};\\n\\nfunction normalizeFormat(format) {\\n  format = format.toLowerCase().split('\\\\/').shift();\\n  var res = FORMAT_MAPPINGS[format];\\n\\n  if (!res) {\\n    res = format.split('\\\\/').shift();\\n  }\\n\\n  return res;\\n}\\n\\nvar _default = VideoSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/video-source.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/colors/index.js\":\n/*!*********************************!*\\\n  !*** ./plugins/colors/index.js ***!\n  \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _cssPrefix = __webpack_require__(/*! utils/css-prefix */ \\\"./utils/css-prefix.js\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar playerColors = \\\"\\\\n  .PLAYER-CLASS-PREFIX {\\\\n    --color-accent: --accent-color;\\\\n    --color-base: --base-color;\\\\n    --color-text: --text-color;\\\\n\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-time-tooltip,\\\\n  .PLAYER-CLASS-PREFIX .vjs-mouse-display:after,\\\\n  .PLAYER-CLASS-PREFIX .vjs-play-progress:after {\\\\n    color: --base-color;\\\\n    background-color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-slider {\\\\n    background-color: rgba(--accent-color, 0.3);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-load-progress,\\\\n  .PLAYER-CLASS-PREFIX .vjs-load-progress div {\\\\n    background: rgba(--accent-color, 0.2);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-level,\\\\n  .PLAYER-CLASS-PREFIX .vjs-play-progress {\\\\n    background: --accent-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-vertical {\\\\n    background-color: rgba(--base-color, 0.7);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-panel-horizontal .vjs-control:before {\\\\n    border-color: transparent transparent rgba(--accent-color, 0.4) transparent;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-panel-horizontal .vjs-volume-level:before {\\\\n    border-color: transparent transparent --accent-color transparent;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay {\\\\n    color: --text-color;\\\\n    background-color: rgba(--base-color, 0.4);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item {\\\\n    box-shadow: 0 0.5em 1.2em 0px --base-color;\\\\n    color: --text-color;\\\\n    border: 1px solid --text-color !important;\\\\n    position: relative;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item:active,\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item:hover {\\\\n    border: 1px solid --accent-color !important;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content .vjs-menu-item:active,\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content .vjs-menu-item:hover {\\\\n    color: --text-color;\\\\n    background-color: --accent-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX.vjs-ad-playing .vjs-progress-control .vjs-play-progress {\\\\n    background: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX.cld-plw-layout {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-plw-item-info-wrap {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-plw-panel-item {\\\\n    border-color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-video-player-floater-close polygon {\\\\n    fill: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-spbl-product-hotspot:after {\\\\n    background: --base-color;\\\\n    box-shadow: 0 0 0 4px --accent-color, 0 0 0 8px rgba(--text-color, 0.24);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-spbl-product-tooltip {\\\\n    color: --base-color;\\\\n    background: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .base-color-semi-bg {\\\\n    background: rgba(--base-color, 0.7);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .text-color-semi-bg {\\\\n    background: rgba(--text-color, 0.7);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .text-color-text {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .base-color-text {\\\\n    color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .accent-color-text {\\\\n    color: --accent-color;\\\\n  }\\\\n\\\";\\nvar darkOnlyColors = \\\"\\\\n\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .base-color-bg,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-control-bar,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-big-play-button,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-menu-button\\\\n  .vjs-menu-content {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar {\\\\n    background-image: linear-gradient(--base-color, rgba(255, 255, 255, 0) 100%);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary .vjs-recommendations-overlay-item-primary-content {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary div {\\\\n    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 80%);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video {\\\\n    border: 1px solid rgba(--text-color, 0.5);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video .vjs-upcoming-video-bar {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\";\\nvar lightOnlyColors = \\\"\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar {\\\\n    flex-direction: row;\\\\n    justify-content: left;\\\\n    height: 3.6em;\\\\n    background: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar div {\\\\n    width: auto;\\\\n    padding: 0 inherit;\\\\n    margin: 0;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .base-color-bg,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-control-bar,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-big-play-button,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-menu-button .vjs-menu-content {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary .vjs-recommendations-overlay-item-primary-content {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary:active .vjs-recommendations-overlay-item-primary-content,\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary:hover .vjs-recommendations-overlay-item-primary-content {\\\\n    color: --base-color;\\\\n    background-color: rgba(--accent-color, 0.8);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary:active div,\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary:hover div {\\\\n    color: --base-color;\\\\n    background-color: rgba(--accent-color, 0.8);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary div {\\\\n    background: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video {\\\\n    border: 1px solid --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video .vjs-upcoming-video-bar {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-plw-item-info-wrap {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  @media only screen and (max-width: 768px) {\\\\n    .PLAYER-CLASS-PREFIX.cld-plw-vertical .cld-plw-item-info-wrap {\\\\n      color: --accent-color;\\\\n    }\\\\n  }\\\\n\\\";\\nvar defaults = {\\n  colorsDark: {\\n    'base': '#000000',\\n    'accent': '#FF620C',\\n    'text': '#FFFFFF'\\n  },\\n  colorsLight: {\\n    'base': '#FFFFFF',\\n    'accent': '#0078FF',\\n    'text': '#0E2F5A'\\n  }\\n};\\n\\nvar Colors = function Colors(player) {\\n  var _this = this;\\n\\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, Colors);\\n\\n  this.player = player;\\n  var skinDefaults = this.player.options_.skin === 'light' ? defaults.colorsLight : defaults.colorsDark;\\n  opts.colors = (0, _assign.assign)({}, skinDefaults, opts.colors);\\n\\n  this.init = function () {\\n    injectCSS(parseStyles(playerColors));\\n\\n    if (_this.player.options_.skin === 'light') {\\n      injectCSS(parseStyles(lightOnlyColors));\\n    } else {\\n      injectCSS(parseStyles(darkOnlyColors));\\n    }\\n  };\\n\\n  var injectCSS = function injectCSS(css) {\\n    var style = document.createElement('style');\\n    style.innerHTML = css;\\n\\n    _this.player.el_.appendChild(style);\\n  };\\n\\n  var hexToRgb = function hexToRgb(hex) {\\n    // Expand shorthand form (e.g. \\\"03F\\\") to full form (e.g. \\\"0033FF\\\")\\n    var shorthandRegex = /^#?([a-f\\\\d])([a-f\\\\d])([a-f\\\\d])$/i;\\n    hex = hex.replace(shorthandRegex, function (m, r, g, b) {\\n      return r + r + g + g + b + b;\\n    }); // '#0080C0' to '0, 128, 192'\\n\\n    var result = /^#?([a-f\\\\d]{2})([a-f\\\\d]{2})([a-f\\\\d]{2})$/i.exec(hex);\\n    return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;\\n  };\\n\\n  var parseStyles = function parseStyles(styles) {\\n    var parsed = styles // wrapper class\\n    .replace(/PLAYER\\\\-CLASS\\\\-PREFIX/g, (0, _cssPrefix.playerClassPrefix)(_this.player)) // rgba first\\n    .replace(/rgba\\\\(\\\\-\\\\-base\\\\-color/g, 'rgba(' + hexToRgb(opts.colors.base)).replace(/rgba\\\\(\\\\-\\\\-accent\\\\-color/g, 'rgba(' + hexToRgb(opts.colors.accent)).replace(/rgba\\\\(\\\\-\\\\-text\\\\-color/g, 'rgba(' + hexToRgb(opts.colors.text)) // solid colors\\n    .replace(/\\\\-\\\\-base\\\\-color/g, opts.colors.base).replace(/\\\\-\\\\-accent\\\\-color/g, opts.colors.accent).replace(/\\\\-\\\\-text\\\\-color/g, opts.colors.text);\\n    return parsed;\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new Colors(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/colors/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/context-menu/components/context-menu-item.js\":\n/*!**************************************************************!*\\\n  !*** ./plugins/context-menu/components/context-menu-item.js ***!\n  \\**************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MenuItem = _video.default.getComponent('MenuItem');\\n\\nvar ContextMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _inherits(ContextMenuItem, _MenuItem);\\n\\n  var _super = _createSuper(ContextMenuItem);\\n\\n  function ContextMenuItem() {\\n    _classCallCheck(this, ContextMenuItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(ContextMenuItem, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(ContextMenuItem.prototype), \\\"handleClick\\\", this).call(this);\\n\\n      this.options_.listener();\\n    }\\n  }]);\\n\\n  return ContextMenuItem;\\n}(MenuItem);\\n\\nvar _default = ContextMenuItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/components/context-menu-item.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/context-menu/components/context-menu.js\":\n/*!*********************************************************!*\\\n  !*** ./plugins/context-menu/components/context-menu.js ***!\n  \\*********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _contextMenuItem = _interopRequireDefault(__webpack_require__(/*! ./context-menu-item */ \\\"./plugins/context-menu/components/context-menu-item.js\\\"));\\n\\nvar _positioning = __webpack_require__(/*! ../../../utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Menu = _video.default.getComponent('Menu'); // support VJS5 & VJS6 at the same time\\n\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ContextMenu = /*#__PURE__*/function (_Menu) {\\n  _inherits(ContextMenu, _Menu);\\n\\n  var _super = _createSuper(ContextMenu);\\n\\n  function ContextMenu(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, ContextMenu);\\n\\n    _this = _super.call(this, player, options); // Each menu component has its own `dispose` method that can be\\n    // safely bound and unbound to events while maintaining its context.\\n\\n    _this.dispose = _video.default.bind(_assertThisInitialized(_this), _this.dispose);\\n    options.content.forEach(function (c) {\\n      var fn = null;\\n\\n      if (typeof c.listener === 'function') {\\n        fn = c.listener;\\n      } else if (typeof c.href === 'string') {\\n        fn = function fn() {\\n          return window.open(c.href);\\n        };\\n      } else {\\n        fn = function fn() {\\n          return true;\\n        };\\n      }\\n\\n      var that = _assertThisInitialized(_this);\\n\\n      _this.addItem(new _contextMenuItem.default(player, {\\n        label: c.label,\\n        listener: _video.default.bind(player, function () {\\n          fn(this);\\n          window.setTimeout(function () {\\n            that.dispose();\\n          }, 1);\\n        })\\n      }));\\n    });\\n    return _this;\\n  }\\n\\n  _createClass(ContextMenu, [{\\n    key: \\\"setPosition\\\",\\n    value: function setPosition(left, top) {\\n      (0, _positioning.setPosition)(this.el(), left, top);\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ContextMenu.prototype), \\\"createEl\\\", this).call(this);\\n\\n      dom.addClass(el, 'vjs-context-menu-ui');\\n\\n      if (this.options_.position) {\\n        var _this$options_$positi = this.options_.position,\\n            left = _this$options_$positi.left,\\n            top = _this$options_$positi.top;\\n        this.setPosition(left, top);\\n      }\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ContextMenu;\\n}(Menu);\\n\\nvar _default = ContextMenu;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/components/context-menu.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/context-menu/context-menu.scss\":\n/*!************************************************!*\\\n  !*** ./plugins/context-menu/context-menu.scss ***!\n  \\************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/context-menu.scss?\");\n\n/***/ }),\n\n/***/ \"./plugins/context-menu/contextMenuContent.js\":\n/*!****************************************************!*\\\n  !*** ./plugins/context-menu/contextMenuContent.js ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar contextMenuContent = function contextMenuContent(player) {\\n  var isLooping = player.loop();\\n  var isPaused = player.paused();\\n  var isMuted = player.muted();\\n  var isFullscreen = player.isFullscreen();\\n  var aboutMenuItem = {\\n    label: '<span class=\\\"player-version\\\">Cloudinary Player v' + \\\"1.5.3\\\" + '</span>'\\n  };\\n\\n  if (!player.controls()) {\\n    return [aboutMenuItem];\\n  }\\n\\n  return [{\\n    label: isLooping ? 'Unloop' : 'Loop',\\n    listener: function listener() {\\n      player.loop(!isLooping);\\n    }\\n  }, {\\n    label: isPaused ? 'Play' : 'Pause',\\n    listener: function listener() {\\n      if (isPaused) {\\n        player.play();\\n      } else {\\n        player.pause();\\n      }\\n    }\\n  }, {\\n    label: isMuted ? 'Unmute' : 'Mute',\\n    listener: function listener() {\\n      player.muted(!isMuted);\\n    }\\n  }, {\\n    label: isFullscreen ? 'Exit Fullscreen' : 'Fullscreen',\\n    listener: function listener() {\\n      if (isFullscreen) {\\n        player.exitFullscreen();\\n      } else {\\n        player.requestFullscreen();\\n      }\\n    }\\n  }, aboutMenuItem];\\n};\\n\\nvar _default = contextMenuContent;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/contextMenuContent.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/context-menu/index.js\":\n/*!***************************************!*\\\n  !*** ./plugins/context-menu/index.js ***!\n  \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! ./context-menu.scss */ \\\"./plugins/context-menu/context-menu.scss\\\");\\n\\n__webpack_require__(/*! videojs-contextmenu */ \\\"../node_modules/videojs-contextmenu/es5/plugin.js\\\");\\n\\nvar _contextMenu2 = _interopRequireDefault(__webpack_require__(/*! ./components/context-menu */ \\\"./plugins/context-menu/components/context-menu.js\\\"));\\n\\nvar _positioning = __webpack_require__(/*! utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar defaults = {\\n  showNativeOnRecurringEvent: false\\n};\\n\\nvar ContextMenuPlugin = function ContextMenuPlugin(player, opts) {\\n  var _this = this;\\n\\n  _classCallCheck(this, ContextMenuPlugin);\\n\\n  if (!Array.isArray(opts.content) && typeof opts.content !== 'function') {\\n    throw new Error('\\\"content\\\" required');\\n  }\\n\\n  opts = (0, _assign.assign)({}, defaults, opts);\\n  this.player = player;\\n\\n  var _options = (0, _slicing.sliceProperties)(opts, 'content', 'showNativeOnRecurringEvent');\\n\\n  this.init = function () {\\n    // If we are not already providing \\\"vjs-contextmenu\\\" events, do so.\\n    _this.player.contextmenu();\\n\\n    _this.player.on('vjs-contextmenu', onContextMenu);\\n\\n    _this.player.ready(function () {\\n      return _this.player.addClass('vjs-context-menu');\\n    });\\n  };\\n\\n  var getMenuPosition = function getMenuPosition(e) {\\n    // Calc menu size\\n    var menuEl = _this.menu.el(); // Must append to element to get bounding rect\\n\\n\\n    menuEl.style.visibility = 'hidden';\\n\\n    _this.player.el().appendChild(menuEl);\\n\\n    var menuSize = menuEl.getBoundingClientRect();\\n\\n    _this.player.el().removeChild(menuEl);\\n\\n    menuEl.style.visibility = 'visible';\\n    var ptrPosition = (0, _positioning.getPointerPosition)(_this.player.el(), e);\\n\\n    var playerSize = _this.player.el().getBoundingClientRect();\\n\\n    var ptrTop = playerSize.height - playerSize.height * ptrPosition.y + 1;\\n    var ptrLeft = Math.round(playerSize.width * ptrPosition.x) + 1;\\n    var top = ptrTop;\\n    var left = ptrLeft; // Correct top when menu can't fit fully height-wise when pointer is at it's top left corner\\n\\n    if (ptrTop + menuSize.height > playerSize.height) {\\n      var difference = ptrTop + menuSize.height - playerSize.height;\\n      top = difference > menuSize.height / 2 ? ptrTop - menuSize.height - 1 : playerSize.height - menuSize.height;\\n    } // Correct left where menu can't fit fully width-wise when pointer is at it's top left corner\\n\\n\\n    if (ptrLeft + menuSize.width > playerSize.width) {\\n      var _difference = ptrLeft + menuSize.width - playerSize.width;\\n\\n      left = _difference > menuSize.width / 2 ? ptrLeft - menuSize.width - 1 : playerSize.width - menuSize.width;\\n    } // Correct top and left in cases that menu is positioned on the pointer\\n\\n\\n    if (top < ptrTop && left < ptrLeft) {\\n      top = ptrTop - menuSize.height - 1;\\n      left = ptrLeft - menuSize.width - 1;\\n    } // Make sure that we're still in bounds after the corrections.\\n\\n\\n    top = Math.max(0, top);\\n    left = Math.max(0, left);\\n    return {\\n      left: left,\\n      top: top\\n    };\\n  };\\n\\n  var onContextMenu = function onContextMenu(e) {\\n    if (_this.menu) {\\n      _this.menu.dispose();\\n\\n      if (_options.showNativeOnRecurringEvent) {\\n        // If this event happens while the custom menu is open, close it and do\\n        // nothing else. This will cause native contextmenu events to be intercepted\\n        // once again; so, the next time a contextmenu event is encountered, we'll\\n        // open the custom menu.\\n        return;\\n      }\\n    } // Stop canceling the native contextmenu event until further notice.\\n\\n\\n    if (_options.showNativeOnRecurringEvent) {\\n      _this.player.contextmenu.options.cancel = false;\\n    }\\n\\n    e.preventDefault(); // Allow dynamically setting the menu labels based on player\\n\\n    var content = _options.content;\\n\\n    if (typeof content === 'function') {\\n      content = content(_this.player);\\n    }\\n\\n    _this.menu = new _contextMenu2.default(_this.player, {\\n      content: content\\n    });\\n\\n    var _getMenuPosition = getMenuPosition(e),\\n        left = _getMenuPosition.left,\\n        top = _getMenuPosition.top;\\n\\n    _this.menu.setPosition(left, top); // This is to handle a bug where firefox triggers both 'contextmenu' and 'click'\\n    // events on rightclick, causing menu to open and then immediately close.\\n\\n\\n    var clickHandler = function clickHandler(_e) {\\n      if (!(_e.type === 'click' && (_e.which === 3 || _e.button === 2))) {\\n        _this.menu.dispose();\\n      }\\n    };\\n\\n    _this.menu.on('dispose', function () {\\n      // Begin canceling contextmenu events again, so subsequent events will\\n      // cause the custom menu to be displayed again.\\n      _this.player.contextmenu.options.cancel = true;\\n\\n      _this.player.removeChild(_this.menu);\\n\\n      _video.default.off(document, ['click', 'tap'], clickHandler);\\n\\n      delete _this.menu;\\n    });\\n\\n    _this.player.addChild(_this.menu);\\n\\n    _video.default.on(document, ['click', 'tap'], clickHandler);\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new ContextMenuPlugin(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/dash/index.js\":\n/*!*******************************!*\\\n  !*** ./plugins/dash/index.js ***!\n  \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = dashPlugin;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\nvar _videojsDash = _interopRequireDefault(__webpack_require__(/*! plugins/dash/videojs-dash */ \\\"./plugins/dash/videojs-dash.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// eslint-disable-next-line no-unused-vars\\nfunction dashPlugin() {\\n  var dashInit = function dashInit(player, mediaPlayer) {\\n    // eslint-disable-next-line new-cap\\n    mediaPlayer = _dashjs.default.MediaPlayer().create();\\n    var settings = {\\n      streaming: {\\n        liveDelayFragmentCount: null\\n      }\\n    };\\n    mediaPlayer.updateSettings(settings);\\n    mediaPlayer.on(_dashjs.default.MediaPlayer.events.PLAYBACK_STALLED, function (a) {\\n      console.log(a);\\n      console.log('stalled');\\n    });\\n  }; // Triggered on 'beforeinitialize'\\n\\n\\n  _video.default.Html5DashJS.hook('beforeinitialize', dashInit);\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/dash/setup-audio-tracks.js\":\n/*!********************************************!*\\\n  !*** ./plugins/dash/setup-audio-tracks.js ***!\n  \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = setupAudioTracks;\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n/**\\n * Setup audio tracks. Take the tracks from dash and add the tracks to videojs. Listen for when\\n * videojs changes tracks and apply that to the dash player because videojs doesn't do this\\n * natively.\\n *\\n * @private\\n * @param {videojs} player the videojs player instance\\n * @param {videojs.tech} tech the videojs tech being used\\n */\\nfunction handlePlaybackMetadataLoaded(player, tech) {\\n  var mediaPlayer = player.dash.mediaPlayer;\\n  var dashAudioTracks = mediaPlayer.getTracksFor('audio');\\n  var videojsAudioTracks = player.audioTracks();\\n\\n  function generateIdFromTrackIndex(index) {\\n    return \\\"dash-audio-\\\".concat(index);\\n  }\\n\\n  function findDashAudioTrack(subDashAudioTracks, videojsAudioTrack) {\\n    return (0, _find.find)(subDashAudioTracks, function (track) {\\n      return generateIdFromTrackIndex(track.index) === videojsAudioTrack.id;\\n    });\\n  } // Safari creates a single native `AudioTrack` (not `videojs.AudioTrack`) when loading. Clear all\\n  // automatically generated audio tracks so we can create them all ourself.\\n\\n\\n  if (videojsAudioTracks.length) {\\n    tech.clearTracks(['audio']);\\n  }\\n\\n  var currentAudioTrack = mediaPlayer.getCurrentTrackFor('audio');\\n  dashAudioTracks.forEach(function (dashTrack) {\\n    var localizedLabel = null;\\n\\n    if (Array.isArray(dashTrack.labels)) {\\n      for (var i = 0; i < dashTrack.labels.length; i++) {\\n        if (dashTrack.labels[i].lang && player.language().indexOf(dashTrack.labels[i].lang.toLowerCase()) !== -1) {\\n          localizedLabel = dashTrack.labels[i];\\n          break;\\n        }\\n      }\\n    }\\n\\n    var label = null;\\n\\n    if (localizedLabel) {\\n      label = localizedLabel.text;\\n    } else if (Array.isArray(dashTrack.labels) && dashTrack.labels.length === 1) {\\n      label = dashTrack.labels[0].text;\\n    } else {\\n      label = dashTrack.lang;\\n\\n      if (dashTrack.roles && dashTrack.roles.length) {\\n        label += ' (' + dashTrack.roles.join(', ') + ')';\\n      }\\n    } // Add the track to the player's audio track list.\\n\\n\\n    videojsAudioTracks.addTrack(new _video.default.AudioTrack({\\n      enabled: dashTrack === currentAudioTrack,\\n      id: generateIdFromTrackIndex(dashTrack.index),\\n      kind: dashTrack.kind || 'main',\\n      label: label,\\n      language: dashTrack.lang\\n    }));\\n  });\\n\\n  var audioTracksChangeHandler = function audioTracksChangeHandler() {\\n    for (var i = 0; i < videojsAudioTracks.length; i++) {\\n      var track = videojsAudioTracks[i];\\n\\n      if (track.enabled) {\\n        // Find the audio track we just selected by the id\\n        var dashAudioTrack = findDashAudioTrack(dashAudioTracks, track); // Set is as the current track\\n\\n        mediaPlayer.setCurrentTrack(dashAudioTrack); // Stop looping\\n        // eslint-disable-next-line no-continue\\n\\n        continue;\\n      }\\n    }\\n  };\\n\\n  videojsAudioTracks.addEventListener('change', audioTracksChangeHandler);\\n  player.dash.mediaPlayer.on(_dashjs.default.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE, function () {\\n    videojsAudioTracks.removeEventListener('change', audioTracksChangeHandler);\\n  });\\n}\\n/*\\n * Call `handlePlaybackMetadataLoaded` when `mediaPlayer` emits\\n * `dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED`.\\n */\\n\\n\\nfunction setupAudioTracks(player, tech) {\\n  // When `dashjs` finishes loading metadata, create audio tracks for `video.js`.\\n  player.dash.mediaPlayer.on(_dashjs.default.MediaPlayer.events.PLAYBACK_METADATA_LOADED, handlePlaybackMetadataLoaded.bind(null, player, tech));\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/setup-audio-tracks.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/dash/setup-text-tracks.js\":\n/*!*******************************************!*\\\n  !*** ./plugins/dash/setup-text-tracks.js ***!\n  \\*******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = setupTextTracks;\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _window = _interopRequireDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction find(l, f) {\\n  for (var i = 0; i < l.length; i++) {\\n    if (f(l[i])) {\\n      return l[i];\\n    }\\n  }\\n}\\n/*\\n * Attach text tracks from dash.js to videojs\\n *\\n * @param {videojs} player the videojs player instance\\n * @param {array} tracks the tracks loaded by dash.js to attach to videojs\\n *\\n * @private\\n */\\n\\n\\nfunction attachDashTextTracksToVideojs(player, tech, tracks) {\\n  var trackDictionary = []; // Add remote tracks\\n\\n  var tracksAttached = tracks // Map input data to match HTMLTrackElement spec\\n  // https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement\\n  .map(function (track) {\\n    var localizedLabel = null;\\n\\n    if (Array.isArray(track.labels)) {\\n      for (var i = 0; i < track.labels.length; i++) {\\n        if (track.labels[i].lang && player.language().indexOf(track.labels[i].lang.toLowerCase()) !== -1) {\\n          localizedLabel = track.labels[i];\\n          break;\\n        }\\n      }\\n    }\\n\\n    var label = null;\\n\\n    if (localizedLabel) {\\n      label = localizedLabel.text;\\n    } else if (Array.isArray(track.labels) && track.labels.length === 1) {\\n      label = track.labels[0].text;\\n    } else {\\n      label = track.lang || track.label;\\n    }\\n\\n    return {\\n      dashTrack: track,\\n      trackConfig: {\\n        label: label,\\n        language: track.lang,\\n        srclang: track.lang,\\n        kind: track.kind\\n      }\\n    };\\n  }) // Add track to videojs track list\\n  .map(function (_ref) {\\n    var trackConfig = _ref.trackConfig,\\n        dashTrack = _ref.dashTrack;\\n    var remoteTextTrack = player.addRemoteTextTrack(trackConfig, false);\\n    trackDictionary.push({\\n      textTrack: remoteTextTrack.track,\\n      dashTrack: dashTrack\\n    }); // Don't add the cues becuase we're going to let dash handle it natively. This will ensure\\n    // that dash handle external time text files and fragmented text tracks.\\n    //\\n    // Example file with external time text files:\\n    // https://storage.googleapis.com/shaka-demo-assets/sintel-mp4-wvtt/dash.mpd\\n\\n    return remoteTextTrack;\\n  });\\n  /*\\n   * Scan `videojs.textTracks()` to find one that is showing. Set the dash text track.\\n   */\\n\\n  function updateActiveDashTextTrack() {\\n    var dashMediaPlayer = player.dash.mediaPlayer;\\n    var textTracks = player.textTracks();\\n    var activeTextTrackIndex = -1; // Iterate through the tracks and find the one marked as showing. If none are showing,\\n    // `activeTextTrackIndex` will be set to `-1`, disabling text tracks.\\n\\n    var _loop = function _loop(i) {\\n      var textTrack = textTracks[i];\\n\\n      if (textTrack.mode === 'showing') {\\n        // Find the dash track we want to use\\n\\n        /* jshint loopfunc: true */\\n        var dictionaryLookupResult = find(trackDictionary, function (track) {\\n          return track.textTrack === textTrack;\\n        });\\n        /* jshint loopfunc: false */\\n\\n        var dashTrackToActivate = dictionaryLookupResult ? dictionaryLookupResult.dashTrack : null; // If we found a track, get it's index.\\n\\n        if (dashTrackToActivate) {\\n          activeTextTrackIndex = tracks.indexOf(dashTrackToActivate);\\n        }\\n      }\\n    };\\n\\n    for (var i = 0; i < textTracks.length; i += 1) {\\n      _loop(i);\\n    } // If the text track has changed, then set it in dash\\n\\n\\n    if (activeTextTrackIndex !== dashMediaPlayer.getCurrentTextTrackIndex()) {\\n      dashMediaPlayer.setTextTrack(activeTextTrackIndex);\\n    }\\n  } // Update dash when videojs's selected text track changes.\\n\\n\\n  player.textTracks().on('change', updateActiveDashTextTrack); // Cleanup event listeners whenever we start loading a new source\\n\\n  player.dash.mediaPlayer.on(_dashjs.default.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE, function () {\\n    player.textTracks().off('change', updateActiveDashTextTrack);\\n  }); // Initialize the text track on our first run-through\\n\\n  updateActiveDashTextTrack();\\n  return tracksAttached;\\n}\\n/*\\n * Wait for dash to emit `TEXT_TRACKS_ADDED` and then attach the text tracks loaded by dash if\\n * we're not using native text tracks.\\n *\\n * @param {videojs} player the videojs player instance\\n * @private\\n */\\n\\n\\nfunction setupTextTracks(player, tech, options) {\\n  // Clear VTTCue if it was shimmed by vttjs and let dash.js use TextTrackCue.\\n  // This is necessary because dash.js creates text tracks\\n  // using addTextTrack which is incompatible with vttjs.VTTCue in IE11\\n  if (_window.default.VTTCue && !/\\\\[native code\\\\]/.test(_window.default.VTTCue.toString())) {\\n    _window.default.VTTCue = false;\\n  } // Store the tracks that we've added so we can remove them later.\\n\\n\\n  var dashTracksAttachedToVideoJs = []; // We're relying on the user to disable native captions. Show an error if they didn't do so.\\n\\n  if (tech.featuresNativeTextTracks) {\\n    _video.default.log.error('You must pass {html: {nativeCaptions: false}} in the videojs constructor ' + 'to use text tracks in videojs-contrib-dash');\\n\\n    return;\\n  }\\n\\n  var mediaPlayer = player.dash.mediaPlayer; // Clear the tracks that we added. We don't clear them all because someone else can add tracks.\\n\\n  function clearDashTracks() {\\n    dashTracksAttachedToVideoJs.forEach(player.removeRemoteTextTrack.bind(player));\\n    dashTracksAttachedToVideoJs = [];\\n  } // eslint-disable-next-line no-unused-vars\\n\\n\\n  function handleTextTracksAdded(_ref2) {\\n    var index = _ref2.index,\\n        tracks = _ref2.tracks;\\n    // Stop listening for this event. We only want to hear it once.\\n    mediaPlayer.off(_dashjs.default.MediaPlayer.events.TEXT_TRACKS_ADDED, handleTextTracksAdded); // Cleanup old tracks\\n\\n    clearDashTracks();\\n\\n    if (!tracks.length) {\\n      // Don't try to add text tracks if there aren't any\\n      return;\\n    } // Save the tracks so we can remove them later\\n\\n\\n    dashTracksAttachedToVideoJs = attachDashTextTracksToVideojs(player, tech, tracks, options);\\n  } // Attach dash text tracks whenever we dash emits `TEXT_TRACKS_ADDED`.\\n\\n\\n  mediaPlayer.on(_dashjs.default.MediaPlayer.events.TEXT_TRACKS_ADDED, handleTextTracksAdded); // When the player can play, remove the initialization events. We might not have received\\n  // TEXT_TRACKS_ADDED` so we have to stop listening for it or we'll get errors when we load new\\n  // videos and are listening for the same event in multiple places, including cleaned up\\n  // mediaPlayers.\\n\\n  mediaPlayer.on(_dashjs.default.MediaPlayer.events.CAN_PLAY, function () {\\n    mediaPlayer.off(_dashjs.default.MediaPlayer.events.TEXT_TRACKS_ADDED, handleTextTracksAdded);\\n  });\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/setup-text-tracks.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/dash/videojs-dash.js\":\n/*!**************************************!*\\\n  !*** ./plugins/dash/videojs-dash.js ***!\n  \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _window = _interopRequireDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\nvar _setupAudioTracks = _interopRequireDefault(__webpack_require__(/*! ./setup-audio-tracks */ \\\"./plugins/dash/setup-audio-tracks.js\\\"));\\n\\nvar _setupTextTracks = _interopRequireDefault(__webpack_require__(/*! ./setup-text-tracks */ \\\"./plugins/dash/setup-text-tracks.js\\\"));\\n\\nvar _document = _interopRequireDefault(__webpack_require__(/*! global/document */ \\\"../node_modules/global/document.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\\n\\nfunction _nonIterableSpread() { throw new TypeError(\\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _iterableToArray(iter) { if (typeof Symbol !== \\\"undefined\\\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\\n\\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n/**\\n * videojs-contrib-dash\\n *\\n * Use Dash.js to playback DASH content inside of Video.js via a SourceHandler\\n */\\n\\n\\nvar Html5DashJS = /*#__PURE__*/function (_Component) {\\n  _inherits(Html5DashJS, _Component);\\n\\n  var _super = _createSuper(Html5DashJS);\\n\\n  function Html5DashJS(source, tech, options) {\\n    var _this;\\n\\n    _classCallCheck(this, Html5DashJS);\\n\\n    _this = _super.call(this, source, tech, options); // Get options from tech if not provided for backwards compatibility\\n\\n    options = options || tech.options_;\\n    _this.player = (0, _video.default)(options.playerId);\\n    _this.player.dash = _this.player.dash || {};\\n    _this.tech_ = tech;\\n    _this.el_ = tech.el();\\n    _this.elParent_ = _this.el_.parentNode;\\n    _this.hasFiniteDuration_ = false; // Do nothing if the src is falsey\\n\\n    if (!source.src) {\\n      return _possibleConstructorReturn(_this);\\n    } // While the manifest is loading and Dash.js has not finished initializing\\n    // we must defer events and functions calls with isReady_ and then `triggerReady`\\n    // again later once everything is setup\\n\\n\\n    tech.isReady_ = false;\\n\\n    if (Html5DashJS.updateSourceData) {\\n      _video.default.log.warn('updateSourceData has been deprecated.' + ' Please switch to using hook(\\\"updatesource\\\", callback).');\\n\\n      source = Html5DashJS.updateSourceData(source);\\n    } // call updatesource hooks\\n\\n\\n    Html5DashJS.hooks('updatesource').forEach(function (hook) {\\n      source = hook(source);\\n    });\\n    var manifestSource = source.src;\\n    _this.keySystemOptions_ = Html5DashJS.buildDashJSProtData(source.keySystemOptions); // eslint-disable-next-line new-cap\\n\\n    _this.player.dash.mediaPlayer = _dashjs.default.MediaPlayer().create();\\n    _this.mediaPlayer_ = _this.player.dash.mediaPlayer; // For whatever reason, we need to call setTextDefaultEnabled(false) to get\\n    // VTT captions to show, even though we're doing virtually the same thing\\n    // in setup-text-tracks.js\\n\\n    _this.mediaPlayer_.setTextDefaultEnabled(false); // Log MedaPlayer messages through video.js\\n\\n\\n    if (Html5DashJS.useVideoJSDebug) {\\n      _video.default.log.warn('useVideoJSDebug has been deprecated.' + ' Please switch to using hook(\\\"beforeinitialize\\\", callback).');\\n\\n      Html5DashJS.useVideoJSDebug(_this.mediaPlayer_);\\n    }\\n\\n    if (Html5DashJS.beforeInitialize) {\\n      _video.default.log.warn('beforeInitialize has been deprecated.' + ' Please switch to using hook(\\\"beforeinitialize\\\", callback).');\\n\\n      Html5DashJS.beforeInitialize(_this.player, _this.mediaPlayer_);\\n    }\\n\\n    Html5DashJS.hooks('beforeinitialize').forEach(function (hook) {\\n      hook(_this.player, _this.mediaPlayer_);\\n    }); // Must run controller before these two lines or else there is no\\n    // element to bind to.\\n\\n    _this.mediaPlayer_.initialize(); // Retrigger a dash.js-specific error event as a player error\\n    // See src/streaming/utils/ErrorHandler.js in dash.js code\\n    // Handled with error (playback is stopped):\\n    // - capabilityError\\n    // - downloadError\\n    // - manifestError\\n    // - mediaSourceError\\n    // - mediaKeySessionError\\n    // Not handled:\\n    // - timedTextError (video can still play)\\n    // - mediaKeyMessageError (only fires under 'might not work' circumstances)\\n    // eslint-disable-next-line complexity\\n\\n\\n    _this.retriggerError_ = function (event) {\\n      if (event.type === 'error') {\\n        /* initialize errros for ref https://cdn.dashjs.org/latest/jsdoc/core_errors_Errors.js.html\\n          map to general init error\\n        */\\n        if (event.error.code >= 10 && event.error.code <= 35) {\\n          _this.player.error({\\n            code: 4,\\n            dashjsErrorCode: event.error.code,\\n            message: event.error.message\\n          });\\n        } else if (event.error.code < 10) {\\n          // network errors\\n          _this.player.error({\\n            code: event.error.code,\\n            dashjsErrorCode: event.error.code,\\n            message: event.error.message\\n          });\\n        } else if (event.error.code >= 100 && event.error.code <= 114) {\\n          // Protection Errors  https://cdn.dashjs.org/latest/jsdoc/streaming_protection_errors_ProtectionErrors.js.html\\n          _this.player.error({\\n            code: 5,\\n            dashjsErrorCode: event.error.code,\\n            message: event.error.message\\n          });\\n        } else {\\n          _this.player.error({\\n            code: event.error.code,\\n            message: event.error.message\\n          });\\n        }\\n      } // only reset the dash player in 10ms async, so that the rest of the\\n      // calling function finishes\\n\\n\\n      setTimeout(function () {\\n        _this.mediaPlayer_.reset();\\n      }, 10);\\n    };\\n\\n    _this.mediaPlayer_.on(_dashjs.default.MediaPlayer.events.ERROR, _this.retriggerError_);\\n\\n    _this.getDuration_ = function (event) {\\n      var periods = event.data.Period_asArray;\\n      var oldHasFiniteDuration = _this.hasFiniteDuration_;\\n\\n      if (event.data.mediaPresentationDuration || periods[periods.length - 1].duration) {\\n        _this.hasFiniteDuration_ = true;\\n      } else {\\n        // in case we run into a weird situation where we're VOD but then\\n        // switch to live\\n        _this.hasFiniteDuration_ = false;\\n      }\\n\\n      if (_this.hasFiniteDuration_ !== oldHasFiniteDuration) {\\n        _this.player.trigger('durationchange');\\n      }\\n    };\\n\\n    _this.mediaPlayer_.on(_dashjs.default.MediaPlayer.events.MANIFEST_LOADED, _this.getDuration_); // Apply all dash options that are set\\n\\n\\n    if (options.dash) {\\n      Object.keys(options.dash).forEach(function (key) {\\n        var _this$mediaPlayer_;\\n\\n        var dashOptionsKey = 'set' + key.charAt(0).toUpperCase() + key.slice(1);\\n        var value = options.dash[key]; // eslint-disable-next-line no-prototype-builtins\\n\\n        if (_this.mediaPlayer_.hasOwnProperty(dashOptionsKey)) {\\n          // Providing a key without `set` prefix is now deprecated.\\n          _video.default.log.warn('Using dash options in videojs-contrib-dash without the set prefix ' + \\\"has been deprecated. Change '\\\".concat(key, \\\"' to '\\\").concat(dashOptionsKey, \\\"'\\\")); // Set key so it will still work\\n\\n\\n          key = dashOptionsKey;\\n        } // eslint-disable-next-line no-prototype-builtins\\n\\n\\n        if (!_this.mediaPlayer_.hasOwnProperty(key)) {\\n          _video.default.log.warn(\\\"Warning: dash configuration option unrecognized: \\\".concat(key));\\n\\n          return;\\n        } // Guarantee `value` is an array\\n\\n\\n        if (!Array.isArray(value)) {\\n          value = [value];\\n        }\\n\\n        (_this$mediaPlayer_ = _this.mediaPlayer_)[key].apply(_this$mediaPlayer_, _toConsumableArray(value));\\n      });\\n    }\\n\\n    _this.mediaPlayer_.attachView(_this.el_); // Dash.js autoplays by default, video.js will handle autoplay\\n\\n\\n    _this.mediaPlayer_.setAutoPlay(false); // Setup audio tracks\\n    // eslint-disable-next-line no-useless-call\\n\\n\\n    _setupAudioTracks.default.call(null, _this.player, tech); // Setup text tracks\\n    // eslint-disable-next-line no-useless-call\\n\\n\\n    _setupTextTracks.default.call(null, _this.player, tech, options); // Attach the source with any protection data\\n\\n\\n    _this.mediaPlayer_.setProtectionData(_this.keySystemOptions_);\\n\\n    _this.mediaPlayer_.attachSource(manifestSource);\\n\\n    _this.tech_.triggerReady(); // map videojs seek\\n\\n\\n    _this.on(_this.tech_, 'seeking', function () {\\n      // handle seek the same way as in dash.js\\n      _this.mediaPlayer_.seek((_this.tech_.currentTime() - 8).toFixed(2));\\n    });\\n\\n    return _this;\\n  }\\n  /*\\n   * Iterate over the `keySystemOptions` array and convert each object into\\n   * the type of object Dash.js expects in the `protData` argument.\\n   *\\n   * Also rename 'licenseUrl' property in the options to an 'serverURL' property\\n   */\\n\\n\\n  _createClass(Html5DashJS, [{\\n    key: \\\"dispose\\\",\\n    value: function dispose() {\\n      if (this.mediaPlayer_) {\\n        this.mediaPlayer_.off(_dashjs.default.MediaPlayer.events.ERROR, this.retriggerError_);\\n        this.mediaPlayer_.off(_dashjs.default.MediaPlayer.events.MANIFEST_LOADED, this.getDuration_);\\n        this.mediaPlayer_.reset();\\n      }\\n\\n      if (this.player.dash) {\\n        delete this.player.dash;\\n      }\\n    }\\n  }, {\\n    key: \\\"duration\\\",\\n    value: function duration() {\\n      if (this.mediaPlayer_.isDynamic() && !this.hasFiniteDuration_) {\\n        return Infinity;\\n      }\\n\\n      return this.mediaPlayer_.duration();\\n    }\\n    /**\\n     * Get a list of hooks for a specific lifecycle\\n     *\\n     * @param {string} type the lifecycle to get hooks from\\n     * @param {Function=|Function[]=} hook Optionally add a hook tothe lifecycle\\n     * @return {Array} an array of hooks or epty if none\\n     * @method hooks\\n     */\\n\\n  }], [{\\n    key: \\\"buildDashJSProtData\\\",\\n    value: function buildDashJSProtData(keySystemOptions) {\\n      var output = {};\\n\\n      if (!keySystemOptions || !Array.isArray(keySystemOptions)) {\\n        return null;\\n      }\\n\\n      for (var i = 0; i < keySystemOptions.length; i++) {\\n        var keySystem = keySystemOptions[i];\\n\\n        var options = _video.default.mergeOptions({}, keySystem.options);\\n\\n        if (options.licenseUrl) {\\n          options.serverURL = options.licenseUrl;\\n          delete options.licenseUrl;\\n        }\\n\\n        output[keySystem.name] = options;\\n      }\\n\\n      return output;\\n    }\\n  }, {\\n    key: \\\"hooks\\\",\\n    value: function hooks(type, hook) {\\n      Html5DashJS.hooks_[type] = Html5DashJS.hooks_[type] || [];\\n\\n      if (hook) {\\n        Html5DashJS.hooks_[type] = Html5DashJS.hooks_[type].concat(hook);\\n      }\\n\\n      return Html5DashJS.hooks_[type];\\n    }\\n    /**\\n     * Add a function hook to a specific dash lifecycle\\n     *\\n     * @param {string} type the lifecycle to hook the function to\\n     * @param {Function|Function[]} hook the function or array of functions to attach\\n     * @method hook\\n     */\\n\\n  }, {\\n    key: \\\"hook\\\",\\n    value: function hook(type, _hook) {\\n      Html5DashJS.hooks(type, _hook);\\n    }\\n    /**\\n     * Remove a hook from a specific dash lifecycle.\\n     *\\n     * @param {string} type the lifecycle that the function hooked to\\n     * @param {Function} hook The hooked function to remove\\n     * @return {boolean} True if the function was removed, false if not found\\n     * @method removeHook\\n     */\\n\\n  }, {\\n    key: \\\"removeHook\\\",\\n    value: function removeHook(type, hook) {\\n      var index = Html5DashJS.hooks(type).indexOf(hook);\\n\\n      if (index === -1) {\\n        return false;\\n      }\\n\\n      Html5DashJS.hooks_[type] = Html5DashJS.hooks_[type].slice();\\n      Html5DashJS.hooks_[type].splice(index, 1);\\n      return true;\\n    }\\n  }]);\\n\\n  return Html5DashJS;\\n}(Component);\\n\\nHtml5DashJS.hooks_ = {};\\n\\nvar canHandleKeySystems = function canHandleKeySystems(source) {\\n  // copy the source\\n  source = JSON.parse(JSON.stringify(source));\\n\\n  if (Html5DashJS.updateSourceData) {\\n    _video.default.log.warn('updateSourceData has been deprecated.' + ' Please switch to using hook(\\\"updatesource\\\", callback).');\\n\\n    source = Html5DashJS.updateSourceData(source);\\n  } // call updatesource hooks\\n\\n\\n  Html5DashJS.hooks('updatesource').forEach(function (hook) {\\n    source = hook(source);\\n  });\\n\\n  var videoEl = _document.default.createElement('video');\\n\\n  if (source.keySystemOptions && !(_window.default.navigator.requestMediaKeySystemAccess || // IE11 Win 8.1\\n  videoEl.msSetMediaKeys)) {\\n    return false;\\n  }\\n\\n  return true;\\n};\\n\\n_video.default.DashSourceHandler = function () {\\n  return {\\n    canHandleSource: function canHandleSource(source) {\\n      var dashExtRE = /\\\\.mpd/i;\\n\\n      if (!canHandleKeySystems(source)) {\\n        return '';\\n      }\\n\\n      if (_video.default.DashSourceHandler.canPlayType(source.type)) {\\n        return 'probably';\\n      } else if (dashExtRE.test(source.src)) {\\n        return 'maybe';\\n      }\\n\\n      return '';\\n    },\\n    handleSource: function handleSource(source, tech, options) {\\n      return new Html5DashJS(source, tech, options);\\n    },\\n    canPlayType: function canPlayType(type) {\\n      return _video.default.DashSourceHandler.canPlayType(type);\\n    }\\n  };\\n};\\n\\n_video.default.DashSourceHandler.canPlayType = function (type) {\\n  var dashTypeRE = /^application\\\\/dash\\\\+xml/i;\\n\\n  if (dashTypeRE.test(type)) {\\n    return 'probably';\\n  }\\n\\n  return '';\\n}; // Only add the SourceHandler if the browser supports MediaSourceExtensions\\n\\n\\nif (_window.default.MediaSource) {\\n  // eslint-disable-next-line new-cap\\n  _video.default.getTech('Html5').registerSourceHandler(_video.default.DashSourceHandler(), 0);\\n}\\n\\n_video.default.Html5DashJS = Html5DashJS;\\nvar _default = Html5DashJS;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/videojs-dash.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/floating-player/floating-player.scss\":\n/*!******************************************************!*\\\n  !*** ./plugins/floating-player/floating-player.scss ***!\n  \\******************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/floating-player/floating-player.scss?\");\n\n/***/ }),\n\n/***/ \"./plugins/floating-player/index.js\":\n/*!******************************************!*\\\n  !*** ./plugins/floating-player/index.js ***!\n  \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _positioning = __webpack_require__(/*! utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\n__webpack_require__(/*! ./floating-player.scss */ \\\"./plugins/floating-player/floating-player.scss\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar defaults = {\\n  fraction: 0.5,\\n  collapsedWidth: 300,\\n  floatTo: 'right'\\n};\\n\\nvar FloatingPlayer = function FloatingPlayer(player) {\\n  var _this = this;\\n\\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, FloatingPlayer);\\n\\n  opts = (0, _assign.assign)({}, defaults, opts); // Handle non left-right values.\\n\\n  if (opts.floatTo && opts.floatTo !== 'left' && opts.floatTo !== 'right') {\\n    opts.floatTo = defaults.floatTo;\\n  }\\n\\n  this.player = player;\\n\\n  var _options = (0, _slicing.sliceProperties)(opts, 'fraction');\\n\\n  var _floater = null;\\n  var _floated = false;\\n  var _wrapped = false;\\n\\n  this.init = function () {\\n    registerEventHandlers();\\n  };\\n\\n  var wrapInner = function wrapInner(parent) {\\n    var wrapper = document.createElement('div');\\n    parent.appendChild(wrapper);\\n\\n    while (parent.firstChild !== wrapper) {\\n      wrapper.appendChild(parent.firstChild);\\n    }\\n\\n    return wrapper;\\n  };\\n\\n  var removeWindowEventHandlers = function removeWindowEventHandlers() {\\n    window.removeEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.removeEventListener('load', checkViewportState, false);\\n    window.removeEventListener('scroll', checkViewportState, false);\\n    window.removeEventListener('resize', checkViewportState, false);\\n  };\\n\\n  var addWindowEventHandlers = function addWindowEventHandlers() {\\n    window.addEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.addEventListener('load', checkViewportState, false);\\n    window.addEventListener('scroll', checkViewportState, false);\\n    window.addEventListener('resize', checkViewportState, false);\\n  };\\n\\n  var registerEventHandlers = function registerEventHandlers() {\\n    _this.player.on('play', checkViewportState);\\n\\n    _this.player.on('play', addWindowEventHandlers); // this.player.on('pause', removeWindowEventHandlers);\\n\\n\\n    _this.player.on('dispose', removeWindowEventHandlers);\\n  };\\n\\n  var float = function float() {\\n    var el = _this.player.el();\\n\\n    var elRect = el.getBoundingClientRect();\\n\\n    if (!_wrapped) {\\n      // Create floater element\\n      _floater = wrapInner(el);\\n\\n      _floater.setAttribute('class', 'cld-video-player-floater cld-video-player-floater-bottom-' + opts.floatTo);\\n\\n      _floater.setAttribute('style', ['width: ' + opts.collapsedWidth + 'px;', 'top: ' + elRect.top + 'px;', 'left: ' + elRect.left + 'px;', 'right: ' + (document.documentElement.clientWidth - elRect.right) + 'px;', 'bottom: ' + (document.documentElement.clientHeight - elRect.bottom) + 'px;'].join('')); // Create inner element\\n\\n\\n      var inner = wrapInner(_floater);\\n      inner.setAttribute('class', 'cld-video-player-floater-inner');\\n      inner.setAttribute('style', 'padding-bottom: ' + 100 * elRect.height / elRect.width + '%;');\\n      var close = document.createElement('button');\\n      close.setAttribute('class', 'cld-video-player-floater-close');\\n      close.innerHTML = '<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 12 12\\\"><polygon fill-rule=\\\"evenodd\\\" points=\\\"370 7.41 368.59 6 364 10.59 359.41 6 358 7.41 362.59 12 358 16.59 359.41 18 364 13.41 368.59 18 370 16.59 365.41 12\\\" transform=\\\"translate(-358 -6)\\\"/></svg>';\\n\\n      close.onclick = function () {\\n        unfloat();\\n        disable();\\n      };\\n\\n      _floater.appendChild(close);\\n\\n      _wrapped = true;\\n    }\\n\\n    setTimeout(function () {\\n      _floater.classList.add('cld-video-player-floating');\\n    });\\n    _floated = true;\\n  };\\n\\n  var unfloat = function unfloat() {\\n    _floater.classList.remove('cld-video-player-floating');\\n\\n    _floated = false;\\n  };\\n\\n  var disable = function disable() {\\n    removeWindowEventHandlers();\\n\\n    _this.player.off('play', checkViewportState);\\n\\n    _this.player.off('play', addWindowEventHandlers);\\n  };\\n\\n  var checkViewportState = function checkViewportState() {\\n    var visible = (0, _positioning.isElementInViewport)(_this.player.el(), {\\n      fraction: _options.fraction\\n    });\\n\\n    if (visible) {\\n      if (_floated) {\\n        unfloat();\\n      }\\n    } else if (!_floated) {\\n      float();\\n    }\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new FloatingPlayer(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/floating-player/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/ima/index.js\":\n/*!******************************!*\\\n  !*** ./plugins/ima/index.js ***!\n  \\******************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\n/* eslint-disable */\\n\\n/**\\n * Copyright 2014 Google Inc.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *     http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n *\\n * IMA SDK integration plugin for Video.js. For more information see\\n * https://www.github.com/googleads/videojs-ima\\n */\\n(function (factory) {\\n  if (true) {\\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"), __webpack_require__(/*! videojs-contrib-ads */ \\\"../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js\\\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (videojs) {\\n      factory(window, document, videojs.default || videojs);\\n    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n  } else { var vjs; }\\n})(function (window, document, videojs) {\\n  \\\"use strict\\\";\\n\\n  var extend = function extend(obj) {\\n    var arg;\\n    var index;\\n    var key;\\n\\n    for (index = 1; index < arguments.length; index++) {\\n      arg = arguments[index];\\n\\n      for (key in arg) {\\n        if (arg.hasOwnProperty(key)) {\\n          obj[key] = arg[key];\\n        }\\n      }\\n    }\\n\\n    return obj;\\n  };\\n\\n  var ima_defaults = {\\n    debug: false,\\n    timeout: 5000,\\n    prerollTimeout: 100,\\n    adLabel: 'Advertisement',\\n    showControlsForAds: true,\\n    showControlsForJSAds: true,\\n    adsRenderingSettings: {\\n      uiElements: []\\n    }\\n  };\\n  var eventTypes = videojs.browser.IS_ANDROID || videojs.browser.IS_IOS ? {\\n    click: 'touchend',\\n    mousedown: 'touchstart',\\n    mouseup: 'touchend',\\n    mousemove: 'touchmove'\\n  } : {\\n    click: 'click',\\n    mousedown: 'mousedown',\\n    mouseup: 'mouseup',\\n    mousemove: 'mousemove'\\n  };\\n\\n  var init = function init(options, readyCallback) {\\n    this.ima = new ImaPlugin(this, options, readyCallback);\\n  };\\n\\n  var ImaPlugin = function ImaPlugin(player, options, readyCallback) {\\n    this.player = player;\\n    /**\\n     * Assigns the unique id and class names to the given element as well as the style class\\n     * @param element\\n     * @param controlName\\n     * @private\\n     */\\n\\n    var assignControlAttributes_ = function (element, controlName) {\\n      element.id = this.controlPrefix + controlName;\\n      element.className = this.controlPrefix + controlName + ' ' + controlName;\\n    }.bind(this);\\n    /**\\n     * Returns a regular expression to test a string for the given className\\n     * @param className\\n     * @returns {RegExp}\\n     * @private\\n     */\\n\\n\\n    var getClassRegexp_ = function getClassRegexp_(className) {\\n      // Matches on\\n      // (beginning of string OR NOT word char)\\n      // classname\\n      // (negative lookahead word char OR end of string)\\n      return new RegExp('(^|[^A-Za-z-])' + className + '((?![A-Za-z-])|$)', 'gi');\\n    };\\n    /**\\n     * Adds a class to the given element if it doesn't already have the class\\n     * @param element\\n     * @param classToAdd\\n     * @private\\n     */\\n\\n\\n    var addClass_ = function addClass_(element, classToAdd) {\\n      if (getClassRegexp_(classToAdd).test(element.className)) {\\n        return element;\\n      }\\n\\n      return element.className = element.className.trim() + ' ' + classToAdd;\\n    };\\n    /**\\n     * Removes a class from the given element if it has the given class\\n     * @param element\\n     * @param classToRemove\\n     * @private\\n     */\\n\\n\\n    var removeClass_ = function removeClass_(element, classToRemove) {\\n      var classRegexp = getClassRegexp_(classToRemove);\\n\\n      if (!classRegexp.test(element.className)) {\\n        return element;\\n      }\\n\\n      return element.className = element.className.trim().replace(classRegexp, '');\\n    };\\n    /**\\n     * Creates the ad container passed to the IMA SDK.\\n     * @private\\n     */\\n\\n\\n    var createAdContainer_ = function () {\\n      // The adContainerDiv is the DOM of the element that will house\\n      // the ads and ad controls.\\n      this.vjsControls = this.player.getChild('controlBar');\\n      this.adContainerDiv = this.vjsControls.el().parentNode.appendChild(document.createElement('div'));\\n      assignControlAttributes_(this.adContainerDiv, 'ima-ad-container');\\n      this.adContainerDiv.style.position = \\\"absolute\\\";\\n      this.adContainerDiv.addEventListener('mouseenter', showAdControls_, false);\\n      this.adContainerDiv.addEventListener('mouseleave', hideAdControls_, false);\\n      createControls_();\\n      this.adDisplayContainer = new google.ima.AdDisplayContainer(this.adContainerDiv, this.contentPlayer);\\n      this.showAdContainer(!this.settings.manual);\\n    }.bind(this);\\n    /**\\n     * Creates the controls for the ad.\\n     * @private\\n     */\\n\\n\\n    var createControls_ = function () {\\n      this.controlsDiv = document.createElement('div');\\n      assignControlAttributes_(this.controlsDiv, 'ima-controls-div');\\n      this.controlsDiv.style.width = '100%';\\n      this.countdownDiv = document.createElement('div');\\n      assignControlAttributes_(this.countdownDiv, 'ima-countdown-div');\\n      this.countdownDiv.innerHTML = this.settings.adLabel;\\n      this.countdownDiv.style.display = this.showCountdown ? '' : 'none';\\n      this.seekBarDiv = document.createElement('div');\\n      assignControlAttributes_(this.seekBarDiv, 'ima-seek-bar-div');\\n      this.seekBarDiv.style.width = '100%';\\n      this.progressDiv = document.createElement('div');\\n      assignControlAttributes_(this.progressDiv, 'ima-progress-div');\\n      this.playPauseDiv = document.createElement('div');\\n      assignControlAttributes_(this.playPauseDiv, 'ima-play-pause-div');\\n      addClass_(this.playPauseDiv, 'ima-playing');\\n      this.playPauseDiv.addEventListener(eventTypes.click, onAdPlayPauseClick_, false);\\n      this.muteDiv = document.createElement('div');\\n      assignControlAttributes_(this.muteDiv, 'ima-mute-div');\\n      addClass_(this.muteDiv, 'ima-non-muted');\\n      this.muteDiv.addEventListener(eventTypes.click, onAdMuteClick_, false);\\n      this.sliderDiv = document.createElement('div');\\n      assignControlAttributes_(this.sliderDiv, 'ima-slider-div');\\n      this.sliderDiv.addEventListener(eventTypes.mousedown, onAdVolumeSliderMouseDown_, false);\\n      this.sliderLevelDiv = document.createElement('div');\\n      assignControlAttributes_(this.sliderLevelDiv, 'ima-slider-level-div');\\n      this.fullscreenDiv = document.createElement('div');\\n      assignControlAttributes_(this.fullscreenDiv, 'ima-fullscreen-div');\\n      addClass_(this.fullscreenDiv, 'ima-non-fullscreen');\\n      this.fullscreenDiv.addEventListener(eventTypes.click, onAdFullscreenClick_, false);\\n      this.adContainerDiv.appendChild(this.controlsDiv);\\n      this.controlsDiv.appendChild(this.seekBarDiv);\\n      this.controlsDiv.appendChild(this.playPauseDiv);\\n      this.controlsDiv.appendChild(this.muteDiv);\\n      this.controlsDiv.appendChild(this.sliderDiv);\\n      this.controlsDiv.appendChild(this.fullscreenDiv);\\n      this.seekBarDiv.appendChild(this.progressDiv);\\n      this.sliderDiv.appendChild(this.sliderLevelDiv);\\n\\n      if (this.settings.vjsControls) {\\n        this.initVjsControls();\\n        this.controlsDiv.style.display = 'none';\\n        this.vjsControls.el().appendChild(this.countdownDiv);\\n      } else {\\n        this.controlsDiv.appendChild(this.countdownDiv);\\n      }\\n    }.bind(this);\\n\\n    this.showAdContainer = function (show) {\\n      this.adContainerDiv.style.display = show ? 'block' : 'none';\\n      this.player.toggleClass('vjs-ima-ad', show);\\n    }.bind(this);\\n    /**\\n     * Initializes the AdDisplayContainer. On mobile, this must be done as a\\n     * result of user action.\\n     */\\n\\n\\n    this.initializeAdDisplayContainer = function () {\\n      this.adDisplayContainerInitialized = true;\\n      this.adDisplayContainer.initialize();\\n    }.bind(this);\\n    /**\\n     * Creates the AdsRequest and request ads through the AdsLoader.\\n     */\\n\\n\\n    this.requestAds = function () {\\n      if (!this.adDisplayContainerInitialized) {\\n        this.adDisplayContainer.initialize();\\n      }\\n\\n      var adsRequest = new google.ima.AdsRequest();\\n\\n      if (this.settings.adTagUrl) {\\n        adsRequest.adTagUrl = this.settings.adTagUrl;\\n      } else {\\n        adsRequest.adsResponse = this.settings.adsResponse;\\n      }\\n\\n      if (this.settings.forceNonLinearFullSlot) {\\n        adsRequest.forceNonLinearFullSlot = true;\\n      }\\n\\n      adsRequest.linearAdSlotWidth = this.getPlayerWidth();\\n      adsRequest.linearAdSlotHeight = this.getPlayerHeight();\\n      adsRequest.nonLinearAdSlotWidth = this.settings.nonLinearWidth || this.getPlayerWidth();\\n      adsRequest.nonLinearAdSlotHeight = this.settings.nonLinearHeight || this.getPlayerHeight() / 3;\\n      adsRequest.vastLoadTimeout = Math.max(this.settings.prerollTimeout, this.settings.postrollTimeout);\\n      this.adsLoader.requestAds(adsRequest);\\n    }.bind(this);\\n    /**\\n     * Listener for the ADS_MANAGER_LOADED event. Creates the AdsManager,\\n     * sets up event listeners, and triggers the 'adsready' event for\\n     * videojs-ads-contrib.\\n     * @private\\n     */\\n\\n\\n    var onAdsManagerLoaded_ = function (adsManagerLoadedEvent) {\\n      this.adsManager = adsManagerLoadedEvent.getAdsManager(this.contentPlayheadTracker, this.adsRenderingSettings);\\n      this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, onAdError_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY, onAdBreakReady_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED, onAllAdsCompleted_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED, onAdLoaded_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED, onAdStarted_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK, onAdPlayPauseClick_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE, this.onAdComplete_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED, this.onAdComplete_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED, this.onAdPaused_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED, this.onAdResumed_);\\n      var eventsMap = {\\n        'load': google.ima.AdEvent.Type.LOADED,\\n        'ad-started': google.ima.AdEvent.Type.STARTED,\\n        'click': google.ima.AdEvent.Type.CLICK,\\n        'ad-ended': google.ima.AdEvent.Type.COMPLETE,\\n        'ad-skipped': google.ima.AdEvent.Type.SKIPPED,\\n        'first-quartile': google.ima.AdEvent.Type.FIRST_QUARTILE,\\n        'midpoint': google.ima.AdEvent.Type.MIDPOINT,\\n        'third-quartile': google.ima.AdEvent.Type.THIRD_QUARTILE,\\n        'impression': google.ima.AdEvent.Type.IMPRESSION,\\n        'pause': google.ima.AdEvent.Type.PAUSED,\\n        'play': google.ima.AdEvent.Type.RESUMED,\\n        'mute': google.ima.AdEvent.Type.VOLUME_MUTED,\\n        'allpods-completed': google.ima.AdEvent.Type.ALL_ADS_COMPLETED\\n      };\\n      Object.keys(eventsMap).forEach(function (event) {\\n        this.adsManager.addEventListener(eventsMap[event], function () {\\n          this.player.trigger('ads-' + event);\\n        }.bind(this));\\n      }.bind(this));\\n      setAdMuted(this.player.muted());\\n\\n      if (!this.autoPlayAdBreaks) {\\n        try {\\n          var initWidth = this.getPlayerWidth();\\n          var initHeight = this.getPlayerHeight();\\n          this.adsManagerDimensions.width = initWidth;\\n          this.adsManagerDimensions.height = initHeight;\\n          this.adsManager.init(initWidth, initHeight, google.ima.ViewMode.NORMAL);\\n          this.adsManager.setVolume(this.player.muted() ? 0 : this.player.volume());\\n        } catch (adError) {\\n          onAdError_(adError);\\n        }\\n      }\\n\\n      var cuepoints = this.adsManager.getCuePoints();\\n      var foundpreroll = !cuepoints.length; // no playlist, just preroll\\n\\n      var foundpostroll = false;\\n      ;\\n      cuepoints.forEach(function (offset) {\\n        if (!offset) foundpreroll = true;else if (offset == -1) foundpostroll = true;\\n      });\\n      if (!foundpreroll) this.player.trigger('nopreroll');\\n      if (!foundpostroll) this.player.trigger('nopostroll');\\n      if (cuepoints.length) this.player.trigger('ads-cuepoints', cuepoints);\\n      this.player.trigger('adsready');\\n    }.bind(this);\\n    /**\\n     * DEPRECATED: Use startFromReadyCallback\\n     * Start ad playback, or content video playback in the absence of a\\n     * pre-roll.\\n     */\\n\\n\\n    this.start = function () {\\n      window.console.log('WARNING: player.ima.start is deprecated. Use ' + 'player.ima.startFromReadyCallback instead.');\\n    };\\n    /**\\n     * Start ad playback, or content video playback in the absence of a\\n     * pre-roll. **NOTE**: This method only needs to be called if you provide\\n     * your own readyCallback as the second parameter to player.ima(). If you\\n     * only provide options and do not provide your own readyCallback,\\n     * **DO NOT** call this method. If you do provide your own readyCallback,\\n     * you should call this method in the last line of that callback. For more\\n     * info, see this method's usage in our advanced and playlist examples.\\n     */\\n\\n\\n    this.startFromReadyCallback = function () {\\n      if (this.autoPlayAdBreaks && this.adsManager) {\\n        try {\\n          this.adsManager.init(this.getPlayerWidth(), this.getPlayerHeight(), google.ima.ViewMode.NORMAL);\\n          this.adsManager.setVolume(this.player.muted() ? 0 : this.player.volume());\\n          this.adsManager.start();\\n        } catch (adError) {\\n          onAdError_(adError);\\n        }\\n      }\\n    }.bind(this);\\n    /**\\n     * Listener for errors fired by the AdsLoader.\\n     * @param {google.ima.AdErrorEvent} event The error event thrown by the\\n     *     AdsLoader. See\\n     *     https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdError.Type\\n     * @private\\n     */\\n\\n\\n    var onAdsLoaderError_ = function (event) {\\n      console.log('AdsLoader error: ' + event.getError());\\n      this.showAdContainer(false);\\n\\n      if (this.adsManager) {\\n        this.adsManager.destroy();\\n      }\\n\\n      this.player.trigger({\\n        type: 'adserror',\\n        data: {\\n          AdError: event.getError(),\\n          AdErrorEvent: event\\n        }\\n      });\\n    }.bind(this);\\n    /**\\n     * Listener for errors thrown by the AdsManager.\\n     * @param {google.ima.AdErrorEvent} adErrorEvent The error event thrown by\\n     *     the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdError_ = function (adErrorEvent) {\\n      var errorMessage = adErrorEvent.getError !== undefined ? adErrorEvent.getError() : adErrorEvent.stack;\\n      console.log('Ad error: ' + errorMessage);\\n      this.adsActive = false;\\n      this.adPlaying = false;\\n      this.restoreLoop();\\n      this.vjsControls.show();\\n      this.adsManager.destroy();\\n      this.showAdContainer(false);\\n      this.updateVjsControls();\\n      this.player.trigger({\\n        type: 'adserror',\\n        data: {\\n          AdError: errorMessage,\\n          AdErrorEvent: adErrorEvent\\n        }\\n      });\\n    }.bind(this);\\n    /**\\n     * Listener for AD_BREAK_READY. Passes event on to publisher's listener.\\n     * @param {google.ima.AdEvent} adEvent AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdBreakReady_ = function (adEvent) {\\n      this.adBreakReadyListener(adEvent);\\n    }.bind(this);\\n    /**\\n     * Called by publishers in manual ad break playback mode to start an ad\\n     * break.\\n     */\\n\\n\\n    this.playAdBreak = function () {\\n      if (!this.autoPlayAdBreaks) {\\n        this.adsManager.start();\\n      }\\n    }.bind(this);\\n\\n    this.resetLoop = function () {\\n      this.contentLoop = this.contentPlayer && this.contentPlayer.loop;\\n\\n      if (this.contentLoop) {\\n        this.contentPlayer.loop = false;\\n      }\\n    }.bind(this);\\n\\n    this.restoreLoop = function () {\\n      if (this.contentLoop) {\\n        this.contentPlayer.loop = true;\\n        this.contentLoop = false;\\n      }\\n    }.bind(this);\\n    /**\\n     * Pauses the content video and displays the ad container so ads can play.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    this.onContentPauseRequested_ = function (adEvent) {\\n      this.contentSource = this.player.currentSrc();\\n      this.resetLoop();\\n      this.player.off('contentended', this.localContentEndedListener);\\n      this.player.ads.startLinearAdMode();\\n      this.showAdContainer(true);\\n      var contentType = adEvent.getAd().getContentType();\\n\\n      if (!this.settings.vjsControls || !this.settings.showControlsForAds) {\\n        if (!this.settings.showControlsForAds || contentType === 'application/javascript' && !this.settings.showControlsForJSAds) {\\n          this.controlsDiv.style.display = 'none';\\n        } else {\\n          this.controlsDiv.style.display = 'block';\\n        }\\n\\n        this.vjsControls.hide();\\n      }\\n\\n      showPlayButton();\\n      this.player.pause();\\n      this.adsActive = true;\\n      this.adPlaying = true;\\n      this.updateVjsControls();\\n    }.bind(this);\\n    /**\\n     * Resumes content video and hides the ad container.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    this.onContentResumeRequested_ = function (adEvent) {\\n      this.contentResumeTimer = clearTimeout(this.contentResumeTimer);\\n      this.restoreLoop();\\n      this.adsActive = false;\\n      this.adPlaying = false;\\n      this.player.on('contentended', this.localContentEndedListener);\\n\\n      if (this.currentAd == null || // hide for post-roll only playlist\\n      this.currentAd.isLinear()) {\\n        // don't hide for non-linear ads\\n        this.showAdContainer(false);\\n      }\\n\\n      this.vjsControls.show();\\n      this.player.ads.endLinearAdMode();\\n      this.countdownDiv.innerHTML = '';\\n      this.updateVjsControls();\\n    }.bind(this);\\n    /**\\n     * Records that ads have completed and calls contentAndAdsEndedListeners\\n     * if content is also complete.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAllAdsCompleted_ = function (adEvent) {\\n      this.allAdsCompleted = true;\\n      this.showAdContainer(false);\\n\\n      if (this.contentComplete == true) {\\n        if (this.contentPlayer.src && !/^blob:/.test(this.contentPlayer.src) && this.contentSource && this.contentPlayer.src != this.contentSource) {\\n          this.player.src(this.contentSource);\\n        }\\n\\n        this.player.trigger('');\\n\\n        for (var index in this.contentAndAdsEndedListeners) {\\n          this.contentAndAdsEndedListeners[index]();\\n        }\\n      }\\n    }.bind(this);\\n    /**\\n     * Starts the content video when a non-linear ad is loaded.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdLoaded_ = function (adEvent) {\\n      if (!adEvent.getAd().isLinear() && !this.player.ended()) {\\n        this.player.ads.endLinearAdMode();\\n        this.player.play();\\n      }\\n    }.bind(this);\\n    /**\\n     * Starts the interval timer to check the current ad time when an ad starts\\n     * playing.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdStarted_ = function (adEvent) {\\n      this.currentAd = adEvent.getAd();\\n\\n      if (this.currentAd.isLinear()) {\\n        this.adTrackingTimer = setInterval(onAdPlayheadTrackerInterval_, 250); // Don't bump container when controls are shown\\n\\n        removeClass_(this.adContainerDiv, 'bumpable-ima-ad-container');\\n      } else {\\n        // Bump container when controls are shown\\n        addClass_(this.adContainerDiv, 'bumpable-ima-ad-container');\\n        this.player.addClass('vjs-ima-non-linear');\\n        this.showAdContainer(true);\\n      }\\n    }.bind(this);\\n    /**\\n     * Clears the interval timer for current ad time when an ad completes.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    this.onAdComplete_ = function (adEvent) {\\n      if (this.currentAd.isLinear()) {\\n        clearInterval(this.adTrackingTimer);\\n        var pod = this.currentAd.getAdPodInfo();\\n\\n        if (pod && pod.getAdPosition() < pod.getTotalAds()) {\\n          this.player.trigger('ads-pod-ended');\\n          return;\\n        } // this is the final ad so we excpect ima sdk to trigger\\n        // CONTENT_RESUME_REQUESTED, but for some reason it isn't triggered\\n        // reliably on iOS, so we fake it\\n\\n\\n        this.contentResumeTimer = setTimeout(function () {\\n          this.onContentResumeRequested_(null);\\n        }.bind(this), 1000);\\n      } else {\\n        this.player.removeClass('vjs-ima-non-linear');\\n      }\\n    }.bind(this);\\n\\n    this.onAdPaused_ = function (adEvent) {\\n      showPauseButton();\\n      this.adPlaying = false;\\n    }.bind(this);\\n\\n    this.onAdResumed_ = function (adEvent) {\\n      showPlayButton();\\n      this.adPlaying = true;\\n    }.bind(this);\\n\\n    var formatTime = function formatTime(time) {\\n      var m = Math.floor(time / 60);\\n      var s = Math.floor(time % 60);\\n\\n      if (s.toString().length < 2) {\\n        s = '0' + s;\\n      }\\n\\n      return m + ':' + s;\\n    };\\n    /**\\n     * Gets the current time and duration of the ad and calls the method to\\n     * update the ad UI.\\n     * @private\\n     */\\n\\n\\n    var onAdPlayheadTrackerInterval_ = function () {\\n      var remainingTime = this.adsManager.getRemainingTime();\\n      var duration = this.currentAd.getDuration();\\n      var currentTime = duration - remainingTime;\\n      currentTime = currentTime > 0 ? currentTime : 0;\\n      var isPod = false;\\n      var totalAds = 0;\\n      var adPosition;\\n\\n      if (this.currentAd.getAdPodInfo()) {\\n        isPod = true;\\n        adPosition = this.currentAd.getAdPodInfo().getAdPosition();\\n        totalAds = this.currentAd.getAdPodInfo().getTotalAds();\\n      } // Update countdown timer data\\n\\n\\n      var podCount = ': ';\\n\\n      if (isPod && totalAds > 1) {\\n        podCount = ' (' + adPosition + ' of ' + totalAds + '): ';\\n      }\\n\\n      this.countdownDiv.innerHTML = this.settings.adLabel + podCount + formatTime(remainingTime); // Update UI\\n\\n      var playProgressRatio = currentTime / duration;\\n      var playProgressPercent = playProgressRatio * 100;\\n      this.progressDiv.style.width = playProgressPercent + '%';\\n      this.updateVjsControls();\\n    }.bind(this);\\n\\n    this.getPlayerWidth = function () {\\n      var retVal = parseInt(getComputedStyle(this.player.el()).width, 10) || this.player.width();\\n      return retVal;\\n    }.bind(this);\\n\\n    this.getPlayerHeight = function () {\\n      var retVal = parseInt(getComputedStyle(this.player.el()).height, 10) || this.player.height();\\n      return retVal;\\n    }.bind(this);\\n    /**\\n     * Hides the ad controls on mouseout.\\n     * @private\\n     */\\n\\n\\n    var hideAdControls_ = function () {\\n      this.controlsDiv.style.height = '14px';\\n      this.playPauseDiv.style.display = 'none';\\n      this.muteDiv.style.display = 'none';\\n      this.sliderDiv.style.display = 'none';\\n      this.fullscreenDiv.style.display = 'none';\\n    }.bind(this);\\n    /**\\n     * Shows ad controls on mouseover.\\n     * @private\\n     */\\n\\n\\n    var showAdControls_ = function () {\\n      this.controlsDiv.style.height = '37px';\\n      this.playPauseDiv.style.display = 'block';\\n      this.muteDiv.style.display = 'block';\\n      this.sliderDiv.style.display = 'block';\\n      this.fullscreenDiv.style.display = 'block';\\n    }.bind(this);\\n    /**\\n     * Show pause and hide play button\\n     */\\n\\n\\n    var showPauseButton = function () {\\n      addClass_(this.playPauseDiv, 'ima-paused');\\n      removeClass_(this.playPauseDiv, 'ima-playing');\\n    }.bind(this);\\n    /**\\n     * Show play and hide pause button\\n     */\\n\\n\\n    var showPlayButton = function () {\\n      addClass_(this.playPauseDiv, 'ima-playing');\\n      removeClass_(this.playPauseDiv, 'ima-paused');\\n    }.bind(this);\\n    /**\\n     * Listener for clicks on the play/pause button during ad playback.\\n     * @private\\n     */\\n\\n\\n    var onAdPlayPauseClick_ = function () {\\n      if (this.adPlaying) {\\n        showPauseButton();\\n        this.adsManager.pause();\\n        this.adPlaying = false;\\n      } else {\\n        showPlayButton();\\n        this.adsManager.resume();\\n        this.adPlaying = true;\\n      }\\n    }.bind(this);\\n    /**\\n     * Listener for clicks on the mute button during ad playback.\\n     * @private\\n     */\\n\\n\\n    var onAdMuteClick_ = function () {\\n      setAdMuted(!this.adMuted);\\n    }.bind(this);\\n    /* Listener for mouse down events during ad playback. Used for volume.\\n     * @private\\n     */\\n\\n\\n    var onAdVolumeSliderMouseDown_ = function onAdVolumeSliderMouseDown_() {\\n      document.addEventListener(eventTypes.mouseup, onMouseUp_, false);\\n      document.addEventListener(eventTypes.mousemove, onMouseMove_, false);\\n    };\\n    /* Mouse movement listener used for volume slider.\\n     * @private\\n     */\\n\\n\\n    var onMouseMove_ = function onMouseMove_(event) {\\n      setVolumeSlider_(event);\\n    };\\n    /* Mouse release listener used for volume slider.\\n     * @private\\n     */\\n\\n\\n    var onMouseUp_ = function onMouseUp_(event) {\\n      setVolumeSlider_(event);\\n      document.removeEventListener(eventTypes.mousemove, onMouseMove_);\\n      document.removeEventListener(eventTypes.mouseup, onMouseUp_);\\n    };\\n    /* Utility function to set volume and associated UI\\n     * @private\\n     */\\n\\n\\n    var setVolumeSlider_ = function (event) {\\n      var clientX = event.changedTouches ? event.changedTouches[0].clientX : event.clientX;\\n      var percent = (clientX - this.sliderDiv.getBoundingClientRect().left) / this.sliderDiv.offsetWidth;\\n      percent *= 100; //Bounds value 0-100 if mouse is outside slider region.\\n\\n      percent = Math.min(Math.max(percent, 0), 100);\\n      this.sliderLevelDiv.style.width = percent + \\\"%\\\";\\n      this.player.volume(percent / 100); //0-1\\n\\n      this.adsManager.setVolume(percent / 100);\\n\\n      if (this.player.volume() == 0) {\\n        addClass_(this.muteDiv, 'ima-muted');\\n        removeClass_(this.muteDiv, 'ima-non-muted');\\n        this.player.muted(true);\\n        this.adMuted = true;\\n      } else {\\n        addClass_(this.muteDiv, 'ima-non-muted');\\n        removeClass_(this.muteDiv, 'ima-muted');\\n        this.player.muted(false);\\n        this.adMuted = false;\\n      }\\n    }.bind(this);\\n    /**\\n     * Listener for clicks on the fullscreen button during ad playback.\\n     * @private\\n     */\\n\\n\\n    var onAdFullscreenClick_ = function () {\\n      if (this.player.isFullscreen()) {\\n        this.player.exitFullscreen();\\n      } else {\\n        this.player.requestFullscreen();\\n      }\\n    }.bind(this);\\n    /**\\n     * Listens for the video.js player to change its fullscreen status. This\\n     * keeps the fullscreen-ness of the AdContainer in sync with the player.\\n     * @private\\n     */\\n\\n\\n    var onFullscreenChange_ = function () {\\n      if (this.player.isFullscreen()) {\\n        addClass_(this.fullscreenDiv, 'ima-fullscreen');\\n        removeClass_(this.fullscreenDiv, 'ima-non-fullscreen');\\n\\n        if (this.adsManager) {\\n          this.adsManager.resize(window.screen.width, window.screen.height, google.ima.ViewMode.FULLSCREEN);\\n        }\\n      } else {\\n        addClass_(this.fullscreenDiv, 'ima-non-fullscreen');\\n        removeClass_(this.fullscreenDiv, 'ima-fullscreen');\\n\\n        if (this.adsManager) {\\n          this.adsManager.resize(this.getPlayerWidth(), this.getPlayerHeight(), google.ima.ViewMode.NORMAL);\\n        }\\n      }\\n    }.bind(this);\\n    /**\\n     * Listens for the video.js player to change its volume. This keeps the ad\\n     * volume in sync with the content volume if the volume of the player is\\n     * changed while content is playing\\n     * @private\\n     */\\n\\n\\n    var onVolumeChange_ = function () {\\n      var newVolume = this.player.muted() ? 0 : this.player.volume();\\n\\n      if (this.adsManager) {\\n        this.adsManager.setVolume(newVolume);\\n      } // Update UI\\n\\n\\n      if (newVolume == 0) {\\n        this.adMuted = true;\\n        addClass_(this.muteDiv, 'ima-muted');\\n        removeClass_(this.muteDiv, 'ima-non-muted');\\n        this.sliderLevelDiv.style.width = '0%';\\n      } else {\\n        this.adMuted = false;\\n        addClass_(this.muteDiv, 'ima-non-muted');\\n        removeClass_(this.muteDiv, 'ima-muted');\\n        this.sliderLevelDiv.style.width = newVolume * 100 + '%';\\n      }\\n    }.bind(this);\\n    /**\\n     * Seeks content to 00:00:00. This is used as an event handler for the\\n     * loadedmetadata event, since seeking is not possible until that event has\\n     * fired.\\n     * @private\\n     */\\n\\n\\n    var seekContentToZero_ = function () {\\n      this.player.off('loadedmetadata', seekContentToZero_);\\n      this.player.currentTime(0);\\n    }.bind(this);\\n    /**\\n     * Seeks content to 00:00:00 and starts playback. This is used as an event\\n     * handler for the loadedmetadata event, since seeking is not possible until\\n     * that event has fired.\\n     * @private\\n     */\\n\\n\\n    var playContentFromZero_ = function () {\\n      this.player.off('loadedmetadata', playContentFromZero_);\\n      this.player.currentTime(0);\\n      this.player.play();\\n    }.bind(this);\\n    /**\\n     * Destroys the AdsManager, sets it to null, and calls contentComplete to\\n     * reset correlators. Once this is done it requests ads again to keep the\\n     * inventory available.\\n     * @private\\n     */\\n\\n\\n    var resetIMA_ = function () {\\n      this.adsActive = false;\\n      this.adPlaying = false;\\n      this.restoreLoop();\\n      this.player.on('contentended', this.localContentEndedListener);\\n\\n      if (this.currentAd && this.currentAd.isLinear()) {\\n        this.showAdContainer(false);\\n      }\\n\\n      this.vjsControls.show();\\n      this.player.ads.endLinearAdMode();\\n      this.contentPlayheadTracker.currentTime = 0;\\n      this.countdownDiv.innerHTML = '';\\n      this.updateVjsControls();\\n\\n      if (this.adTrackingTimer) {\\n        // If this is called while an ad is playing, stop trying to get that\\n        // ad's current time.\\n        clearInterval(this.adTrackingTimer);\\n      }\\n\\n      if (this.adsManager) {\\n        this.adsManager.destroy();\\n        this.adsManager = null;\\n      }\\n\\n      if (this.adsLoader && !this.contentComplete) {\\n        this.adsLoader.contentComplete();\\n      }\\n\\n      this.contentComplete = false;\\n      this.allAdsCompleted = false;\\n    }.bind(this);\\n    /**\\n     * Ads an EventListener to the AdsManager. For a list of available events,\\n     * see\\n     * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\\n     * @param {google.ima.AdEvent.Type} event The AdEvent.Type for which to listen.\\n     * @param {function} callback The method to call when the event is fired.\\n     */\\n\\n\\n    this.addEventListener = function (event, callback) {\\n      if (this.adsManager) {\\n        this.adsManager.addEventListener(event, callback);\\n      }\\n    }.bind(this);\\n    /**\\n     * Returns the instance of the AdsManager.\\n     * @return {google.ima.AdsManager} The AdsManager being used by the plugin.\\n     */\\n\\n\\n    this.getAdsManager = function () {\\n      return this.adsManager;\\n    }.bind(this);\\n    /**\\n     * DEPRECATED: Use setContentWithAdTag.\\n     * Sets the content of the video player. You should use this method instead\\n     * of setting the content src directly to ensure the proper ad tag is\\n     * requested when the video content is loaded.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?string} adTag The ad tag to be requested when the content loads.\\n     *     Leave blank to use the existing ad tag.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     */\\n\\n\\n    this.setContent = function (contentSrc, adTag, playOnLoad) {\\n      window.console.log('WARNING: player.ima.setContent is deprecated. Use ' + 'player.ima.setContentWithAdTag instead.');\\n      this.setContentWithAdTag(contentSrc, adTag, playOnLoad);\\n    }.bind(this);\\n    /**\\n     * Sets the content of the video player. You should use this method instead\\n     * of setting the content src directly to ensure the proper ad tag is\\n     * requested when the video content is loaded.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?string} adTag The ad tag to be requested when the content loads.\\n     *     Leave blank to use the existing ad tag.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     */\\n\\n\\n    this.setContentWithAdTag = function (contentSrc, adTag, playOnLoad) {\\n      resetIMA_();\\n      this.settings.adTagUrl = adTag ? adTag : this.settings.adTagUrl;\\n      changeSource_(contentSrc, playOnLoad);\\n    }.bind(this);\\n    /**\\n     * Sets the content of the video player. You should use this method instead\\n     * of setting the content src directly to ensure the proper ads response is\\n     * used when the video content is loaded.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?string} adsResponse The ads response to be requested when the\\n     *     content loads. Leave blank to use the existing ads response.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     */\\n\\n\\n    this.setContentWithAdsResponse = function (contentSrc, adsResponse, playOnLoad) {\\n      resetIMA_();\\n      this.settings.adsResponse = adsResponse ? adsResponse : this.settings.adsResponse;\\n      changeSource_(contentSrc, playOnLoad);\\n    }.bind(this);\\n    /**\\n     * Plays an ad immediately\\n     * @param {?string} adTag The ad tag to be requested.\\n     *     Leave blank to use the existing ad tag.\\n     */\\n\\n\\n    this.playAd = function (adTag) {\\n      resetIMA_();\\n      this.settings.adTagUrl = adTag ? adTag : this.settings.adTagUrl; // this.showAdContainer(true);\\n      // this.vjsControls.hide();\\n\\n      this.requestAds();\\n    }.bind(this);\\n    /**\\n     * Changes the player source.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     * @private\\n     */\\n\\n\\n    var changeSource_ = function (contentSrc, playOnLoad) {\\n      // Only try to pause the player when initialised with a source already\\n      if (!!this.player.currentSrc()) {\\n        this.player.currentTime(0);\\n        this.player.pause();\\n      }\\n\\n      if (contentSrc) {\\n        this.player.src(contentSrc);\\n      }\\n\\n      if (playOnLoad) {\\n        this.player.on('loadedmetadata', playContentFromZero_);\\n      } else {\\n        this.player.on('loadedmetadata', seekContentToZero_);\\n      }\\n    }.bind(this);\\n\\n    var setAdMuted = function (mute) {\\n      if (mute) {\\n        addClass_(this.muteDiv, 'ima-muted');\\n        removeClass_(this.muteDiv, 'ima-non-muted');\\n        this.adsManager.setVolume(0); // Bubble down to content player\\n\\n        this.player.muted(true);\\n        this.adMuted = true;\\n        this.sliderLevelDiv.style.width = \\\"0%\\\";\\n      } else {\\n        addClass_(this.muteDiv, 'ima-non-muted');\\n        removeClass_(this.muteDiv, 'ima-muted');\\n        this.adsManager.setVolume(this.player.volume()); // Bubble down to content player\\n\\n        this.player.muted(false);\\n        this.adMuted = false;\\n        this.sliderLevelDiv.style.width = this.player.volume() * 100 + \\\"%\\\";\\n      }\\n    }.bind(this);\\n    /**\\n     * Adds a listener for the 'contentended' event of the video player. This should be\\n     * used instead of setting an 'contentended' listener directly to ensure that the\\n     * ima can do proper cleanup of the SDK before other event listeners\\n     * are called.\\n     * @param {function} listener The listener to be called when content completes.\\n     */\\n\\n\\n    this.addContentEndedListener = function (listener) {\\n      this.contentEndedListeners.push(listener);\\n    }.bind(this);\\n    /**\\n     * Adds a listener that will be called when content and all ads have\\n     * finished playing.\\n     * @param {function} listener The listener to be called when content and ads complete.\\n     */\\n\\n\\n    this.addContentAndAdsEndedListener = function (listener) {\\n      this.contentAndAdsEndedListeners.push(listener);\\n    }.bind(this);\\n    /**\\n     * Sets the listener to be called to trigger manual ad break playback.\\n     * @param {function} listener The listener to be called to trigger manual ad break playback.\\n     */\\n\\n\\n    this.setAdBreakReadyListener = function (listener) {\\n      this.adBreakReadyListener = listener;\\n    }.bind(this);\\n    /**\\n     * Pauses the ad.\\n     */\\n\\n\\n    this.pauseAd = function () {\\n      if (this.adsActive && this.adPlaying) {\\n        showPauseButton();\\n        this.adsManager.pause();\\n        this.adPlaying = false;\\n      }\\n    }.bind(this);\\n    /**\\n     * Resumes the ad.\\n     */\\n\\n\\n    this.resumeAd = function () {\\n      if (this.adsActive && !this.adPlaying) {\\n        showPlayButton();\\n        this.adsManager.resume();\\n        this.adPlaying = true;\\n      }\\n    }.bind(this);\\n    /**\\n     * Set up intervals to check for seeking and update current video time.\\n     * @private\\n     */\\n\\n\\n    var setUpPlayerIntervals_ = function () {\\n      this.updateTimeIntervalHandle = setInterval(updateCurrentTime_, this.seekCheckInterval);\\n      this.seekCheckIntervalHandle = setInterval(checkForSeeking_, this.seekCheckInterval);\\n      this.resizeCheckIntervalHandle = setInterval(checkForResize_, this.resizeCheckInterval);\\n    }.bind(this);\\n    /**\\n     * Updates the start time of the video\\n     * @private\\n     */\\n\\n\\n    var updateStartTime_ = function () {\\n      var cur = this.player.currentTime();\\n      if (!cur || this.player.ads.state != 'content-playback') return; // first time that isn't zero is our start time, but only if it's\\n      // more than the 1sec\\n\\n      if (cur < 1) cur = 0;\\n      this.contentPlayheadTracker.startTime = cur;\\n      this.player.off('timeupdate', updateStartTime_);\\n    }.bind(this);\\n    /**\\n     * Updates the current time of the video\\n     * @private\\n     */\\n\\n\\n    var updateCurrentTime_ = function () {\\n      if (this.player.ads.state == 'content-playback' && !this.contentPlayheadTracker.seeking && this.contentPlayheadTracker.startTime >= 0) {\\n        this.contentPlayheadTracker.currentTime = this.player.currentTime() - this.contentPlayheadTracker.startTime;\\n      }\\n    }.bind(this);\\n    /**\\n     * Detects when the user is seeking through a video.\\n     * This is used to prevent mid-rolls from playing while a user is seeking.\\n     *\\n     * There *is* a seeking property of the HTML5 video element, but it's not\\n     * properly implemented on all platforms (e.g. mobile safari), so we have to\\n     * check ourselves to be sure.\\n     *\\n     * @private\\n     */\\n\\n\\n    var checkForSeeking_ = function () {\\n      if (this.player.ads.state != 'content-playback') return;\\n      var tempCurrentTime = this.player.currentTime();\\n      var diff = (tempCurrentTime - this.contentPlayheadTracker.previousTime) * 1000;\\n\\n      if (Math.abs(diff) > this.seekCheckInterval + this.seekThreshold) {\\n        this.contentPlayheadTracker.seeking = true;\\n      } else {\\n        this.contentPlayheadTracker.seeking = false;\\n      }\\n\\n      this.contentPlayheadTracker.previousTime = this.player.currentTime();\\n    }.bind(this);\\n    /**\\n     * Detects when the player is resized (for fluid support) and resizes the\\n     * ads manager to match.\\n     *\\n     * @private\\n     */\\n\\n\\n    var checkForResize_ = function () {\\n      var currentWidth = this.getPlayerWidth();\\n      var currentHeight = this.getPlayerHeight();\\n\\n      if (this.adsManager && (currentWidth != this.adsManagerDimensions.width || currentHeight != this.adsManagerDimensions.height)) {\\n        this.adsManagerDimensions.width = currentWidth;\\n        this.adsManagerDimensions.height = currentHeight;\\n        this.adsManager.resize(currentWidth, currentHeight, google.ima.ViewMode.NORMAL);\\n      }\\n    }.bind(this);\\n    /**\\n     * Changes the flag to show or hide the ad countdown timer.\\n     *\\n     * @param {boolean} showCountdownIn Show or hide the countdown timer.\\n     */\\n\\n\\n    this.setShowCountdown = function (showCountdownIn) {\\n      this.showCountdown = showCountdownIn;\\n      this.countdownDiv.style.display = this.showCountdown ? '' : 'none';\\n    }.bind(this);\\n    /**\\n     * Current plugin version.\\n     */\\n\\n\\n    this.VERSION = '0.2.0';\\n    /**\\n     * Stores user-provided settings.\\n     */\\n\\n    this.settings;\\n    /**\\n     * Used to prefix videojs ima\\n     */\\n\\n    this.controlPrefix;\\n    /**\\n     * Video element playing content.\\n     */\\n\\n    this.contentPlayer;\\n    /**\\n     * Boolean flag to show or hide the ad countdown timer.\\n     */\\n\\n    this.showCountdown;\\n    /**\\n     * Boolena flag to enable manual ad break playback.\\n     */\\n\\n    this.autoPlayAdBreaks;\\n    /**\\n     * Video.js control bar.\\n     */\\n\\n    this.vjsControls;\\n    /**\\n     * Div used as an ad container.\\n     */\\n\\n    this.adContainerDiv;\\n    /**\\n     * Div used to display ad controls.\\n     */\\n\\n    this.controlsDiv;\\n    /**\\n     * Div used to display ad countdown timer.\\n     */\\n\\n    this.countdownDiv;\\n    /**\\n     * Div used to display add seek bar.\\n     */\\n\\n    this.seekBarDiv;\\n    /**\\n     * Div used to display ad progress (in seek bar).\\n     */\\n\\n    this.progressDiv;\\n    /**\\n     * Div used to display ad play/pause button.\\n     */\\n\\n    this.playPauseDiv;\\n    /**\\n     * Div used to display ad mute button.\\n     */\\n\\n    this.muteDiv;\\n    /**\\n     * Div used by the volume slider.\\n     */\\n\\n    this.sliderDiv;\\n    /**\\n     * Volume slider level visuals\\n     */\\n\\n    this.sliderLevelDiv;\\n    /**\\n     * Div used to display ad fullscreen button.\\n     */\\n\\n    this.fullscreenDiv;\\n    /**\\n     * IMA SDK AdDisplayContainer.\\n     */\\n\\n    this.adDisplayContainer;\\n    /**\\n     * True if the AdDisplayContainer has been initialized. False otherwise.\\n     */\\n\\n    this.adDisplayContainerInitialized = false;\\n    /**\\n     * IMA SDK AdsLoader\\n     */\\n\\n    this.adsLoader;\\n    /**\\n     * IMA SDK AdsManager\\n     */\\n\\n    this.adsManager;\\n    /**\\n     * IMA SDK AdsRenderingSettings.\\n     */\\n\\n    this.adsRenderingSettings = null;\\n    /**\\n     * Ad tag URL. Should return VAST, VMAP, or ad rules.\\n     */\\n\\n    this.adTagUrl;\\n    /**\\n     * VAST, VMAP, or ad rules response. Used in lieu of fetching a response\\n     * from an ad tag URL.\\n     */\\n\\n    this.adsResponse;\\n    /**\\n     * Current IMA SDK Ad.\\n     */\\n\\n    this.currentAd;\\n    /**\\n     * Timer used to track content progress.\\n     */\\n\\n    this.contentTrackingTimer;\\n    /**\\n     * Timer used to track ad progress.\\n     */\\n\\n    this.adTrackingTimer;\\n    /**\\n     * True if ads are currently displayed, false otherwise.\\n     * True regardless of ad pause state if an ad is currently being displayed.\\n     */\\n\\n    this.adsActive = false;\\n    /**\\n     * True if ad is currently playing, false if ad is paused or ads are not\\n     * currently displayed.\\n     */\\n\\n    this.adPlaying = false;\\n    /**\\n     * True if the ad is muted, false otherwise.\\n     */\\n\\n    this.adMuted = false;\\n    /**\\n     * True if our content video has completed, false otherwise.\\n     */\\n\\n    this.contentComplete = false;\\n    /**\\n     * True if ALL_ADS_COMPLETED has fired, false until then.\\n     */\\n\\n    this.allAdsCompleted = false;\\n    /**\\n     * Handle to interval that repeatedly updates current time.\\n     */\\n\\n    this.updateTimeIntervalHandle;\\n    /**\\n     * Handle to interval that repeatedly checks for seeking.\\n     */\\n\\n    this.seekCheckIntervalHandle;\\n    /**\\n     * Interval (ms) on which to check if the user is seeking through the\\n     * content.\\n     */\\n\\n    this.seekCheckInterval = 1000;\\n    /**\\n     * Handle to interval that repeatedly checks for player resize.\\n     */\\n\\n    this.resizeCheckIntervalHandle;\\n    /**\\n     * Interval (ms) to check for player resize for fluid support.\\n     */\\n\\n    this.resizeCheckInterval = 250;\\n    /**\\n     * Threshold by which to judge user seeking. We check every 1000 ms to see\\n     * if the user is seeking. In order for us to decide that they are *not*\\n     * seeking, the content video playhead must only change by 900-1100 ms\\n     * between checks. Any greater change and we assume the user is seeking\\n     * through the video.\\n     */\\n\\n    this.seekThreshold = 100;\\n    /**\\n     * Stores data for the content playhead tracker.\\n     */\\n\\n    this.contentPlayheadTracker = {\\n      currentTime: 0,\\n      previousTime: 0,\\n      seeking: false,\\n      duration: 0,\\n      startTime: -1\\n    };\\n    /**\\n     * Stores data for the ad playhead tracker.\\n     */\\n\\n    this.adPlayheadTracker = {\\n      currentTime: 0,\\n      duration: 0,\\n      isPod: false,\\n      adPosition: 0,\\n      totalAds: 0\\n    };\\n    /**\\n     * Stores the dimensions for the ads manager.\\n     */\\n\\n    this.adsManagerDimensions = {\\n      width: 0,\\n      height: 0\\n    };\\n    /**\\n     * Content ended listeners passed by the publisher to the plugin. Publishers\\n     * should allow the plugin to handle content ended to ensure proper support\\n     * of custom ad playback.\\n     */\\n\\n    this.contentEndedListeners = [];\\n    /**\\n     * Content and ads ended listeners passed by the publisher to the plugin.\\n     * These will be called when the plugin detects that content *and all\\n     * ads* have completed. This differs from the contentEndedListeners in that\\n     * contentEndedListeners will fire between content ending and a post-roll\\n     * playing, whereas the contentAndAdsEndedListeners will fire after the\\n     * post-roll completes.\\n     */\\n\\n    this.contentAndAdsEndedListeners = [];\\n    /**\\n     * Listener to be called to trigger manual ad break playback.\\n     */\\n\\n    this.adBreakReadyListener = function () {\\n      console.log('Please set adBreakReadyListener');\\n    };\\n    /**\\n     * Stores the content source so we can re-populate it manually after a\\n     * post-roll on iOS.\\n     */\\n\\n\\n    this.contentSource = '';\\n    /**\\n     * Local content ended listener for contentComplete.\\n     */\\n\\n    this.localContentEndedListener = function () {\\n      if (this.adsLoader && !this.contentComplete) {\\n        this.adsLoader.contentComplete();\\n        this.contentComplete = true;\\n      }\\n\\n      for (var index in this.contentEndedListeners) {\\n        this.contentEndedListeners[index]();\\n      }\\n\\n      if (this.allAdsCompleted) {\\n        for (var index in this.contentAndAdsEndedListeners) {\\n          this.contentAndAdsEndedListeners[index]();\\n        }\\n      }\\n\\n      clearInterval(this.updateTimeIntervalHandle);\\n      clearInterval(this.seekCheckIntervalHandle);\\n      clearInterval(this.resizeCheckIntervalHandle);\\n\\n      if (this.player.el()) {\\n        this.player.one('play', setUpPlayerIntervals_);\\n      }\\n    }.bind(this);\\n\\n    this.playerDisposedListener = function () {\\n      this.contentEndedListeners, this.contentAndAdsEndedListeners = [], [];\\n      this.contentComplete = true;\\n      this.player.off('contentended', this.localContentEndedListener);\\n      this.player.off('timeupdate', updateStartTime_); // Bug fix: https://github.com/googleads/videojs-ima/issues/306\\n\\n      if (this.player.ads.adTimeoutTimeout) {\\n        clearTimeout(this.player.ads.adTimeoutTimeout);\\n      }\\n\\n      var intervalsToClear = [this.updateTimeIntervalHandle, this.seekCheckIntervalHandle, this.adTrackingTimer, this.resizeCheckIntervalHandle];\\n\\n      for (var index in intervalsToClear) {\\n        var interval = intervalsToClear[index];\\n\\n        if (interval) {\\n          clearInterval(interval);\\n        }\\n      }\\n\\n      if (this.adsManager) {\\n        this.adsManager.destroy();\\n        this.adsManager = null;\\n      }\\n    }.bind(this);\\n\\n    this.initVjsControls = function () {\\n      var _this = this;\\n\\n      var override = function override(cls, obj, method, fn, always) {\\n        var orig = cls.prototype[method];\\n        return obj[method] = function () {\\n          return _this.adsActive || always ? fn && fn.apply(this, arguments) : orig && orig.apply(this, arguments);\\n        };\\n      };\\n\\n      var overrideHandler = function overrideHandler(cls, obj, target, event, method, fn, always) {\\n        var orig = cls.prototype[method];\\n        var handler = override(cls, obj, method, fn);\\n\\n        if (target) {\\n          obj.off(target, event, orig);\\n          obj.on(target, event, handler);\\n        } else {\\n          obj.off(event, orig);\\n          obj.on(event, handler);\\n        }\\n      };\\n\\n      var PlayToggle = videojs.getComponent('PlayToggle');\\n      var playToggle = this.vjsControls.playToggle;\\n      overrideHandler(PlayToggle, playToggle, null, ['tap', 'click'], 'handleClick', function () {\\n        onAdPlayPauseClick_();\\n\\n        if (_this.adPlaying) {\\n          this.handlePlay();\\n        } else {\\n          this.handlePause();\\n        }\\n      });\\n      override(PlayToggle, playToggle, 'update', function () {\\n        var paused = _this.adsActive ? !_this.adPlaying : player.paused();\\n        this.toggleClass('vjs-play-control-ad', _this.adsActive);\\n        this.toggleClass('vjs-paused', paused);\\n        this.toggleClass('vjs-playing', !paused);\\n        var text = paused ? 'Play' : 'Pause';\\n        if (text != this.controlText()) this.controlText(text);\\n      }, true);\\n      overrideHandler(PlayToggle, playToggle, player, 'play', 'handlePlay', function () {\\n        this.update();\\n      }, true);\\n      overrideHandler(PlayToggle, playToggle, player, 'pause', 'handlePause', function () {\\n        this.update();\\n      }, true);\\n      var SeekBar = videojs.getComponent('SeekBar');\\n      var DvrSeekBar = videojs.getComponent('DvrSeekBar');\\n      var seekBar = this.vjsControls.progressControl.seekBar;\\n\\n      var getPercent = function getPercent() {\\n        var duration = _this.currentAd && _this.currentAd.getDuration();\\n\\n        if (!duration || duration < 0) {\\n          return 0;\\n        }\\n\\n        var remainingTime = _this.adsManager.getRemainingTime();\\n\\n        var currentTime = Math.max(duration - remainingTime, 0);\\n        return currentTime / duration;\\n      };\\n\\n      override(SeekBar, seekBar, 'getPercent', getPercent);\\n\\n      if (DvrSeekBar) {\\n        override(DvrSeekBar, seekBar, 'getPercent', getPercent);\\n      }\\n\\n      overrideHandler(SeekBar, seekBar, null, ['mousedown', 'touchstart'], 'handleMouseDown', null);\\n      overrideHandler(SeekBar, seekBar, null, 'focus', 'handleFocus', null);\\n      var DurationDisplay = videojs.getComponent('DurationDisplay');\\n      var durationDisplay = this.vjsControls.durationDisplay;\\n      overrideHandler(DurationDisplay, durationDisplay, player, ['timeupdate', 'loadedmetadata'], 'updateContent', function () {\\n        var duration = _this.currentAd && _this.currentAd.getDuration();\\n\\n        if (duration && duration != this.duration_) {\\n          this.duration_ = duration;\\n          this.contentEl_.innerHTML = '<span class=\\\"vjs-control-text\\\">' + this.localize('Duration Time') + '</span> ' + formatTime(duration);\\n        }\\n      });\\n      var CurrentTimeDisplay = videojs.getComponent('CurrentTimeDisplay');\\n      var currentTimeDisplay = this.vjsControls.currentTimeDisplay;\\n      overrideHandler(CurrentTimeDisplay, currentTimeDisplay, player, ['timeupdate', 'loadedmetadata'], 'updateContent', function () {\\n        var duration = _this.currentAd && _this.currentAd.getDuration();\\n\\n        if (!duration) {\\n          return;\\n        }\\n\\n        var time = duration - _this.adsManager.getRemainingTime();\\n\\n        var formattedTime = formatTime(time);\\n\\n        if (formattedTime !== this.formattedTime_) {\\n          this.formattedTime_ = formattedTime;\\n          this.contentEl_.innerHTML = '<span class=\\\"vjs-control-text\\\">' + this.localize('Current Time') + '</span> ' + formattedTime;\\n        }\\n      });\\n    }.bind(this);\\n\\n    this.updateVjsControls = function () {\\n      if (!this.settings.vjsControls) {\\n        return;\\n      }\\n\\n      this.player.toggleClass('vjs-ad-paused', this.adsActive && !this.adPlaying);\\n      var controls = this.vjsControls;\\n      controls.playToggle.update();\\n      controls.progressControl.seekBar.update();\\n      controls.durationDisplay.updateContent();\\n      controls.currentTimeDisplay.updateContent();\\n      var duration = this.currentAd && this.currentAd.getDuration();\\n      var display = !this.adsActive || duration && duration >= 0 ? '' : 'none';\\n      controls.durationDisplay.el().style.display = display;\\n      controls.currentTimeDisplay.el().style.display = display;\\n      controls.timeDivider.el().style.display = display;\\n    }.bind(this);\\n\\n    var getPosition = function getPosition(el) {\\n      var box = el.getBoundingClientRect();\\n      var docEl = document.documentElement;\\n      var body = document.body;\\n      var clientLeft = docEl.clientLeft || body.clientLeft || 0;\\n      var scrollLeft = window.pageXOffset || body.scrollLeft;\\n      var left = box.left + scrollLeft - clientLeft;\\n      var clientTop = docEl.clientTop || body.clientTop || 0;\\n      var scrollTop = window.pageYOffset || body.scrollTop;\\n      var top = box.top + scrollTop - clientTop;\\n      return {\\n        left: left,\\n        top: top,\\n        width: box.width,\\n        height: box.height\\n      };\\n    }; // proxy click events to the video element when non-linear ad is active\\n\\n\\n    this.proxyClickEvents = function () {\\n      var events = videojs && videojs.browser && videojs.browser.IS_ANDROID || videojs.browser.IS_IOS ? ['touchstart', 'touchend'] : ['click', 'dblclick', 'mousedown', 'mouseup'];\\n\\n      var player = this.player,\\n          el = player.el(),\\n          _this = this;\\n\\n      events.forEach(function (eventName) {\\n        el.addEventListener(eventName, function (e) {\\n          var ad = _this.currentAd,\\n              t = e.target;\\n\\n          if (!ad || ad.isLinear() || t.nodeName != 'IFRAME' || e.isTrusted) {\\n            return;\\n          } // ignore clicks on ad ui elements\\n\\n\\n          var adWidth = ad.getWidth() || ad.getVastMediaWidth();\\n          var adHeight = ad.getHeight() || ad.getVastMediaHeight();\\n          var pos = getPosition(t);\\n          var touch = e.touches && e.touches[0];\\n          var x = touch ? touch.pageX : e.clientX;\\n          var y = touch ? touch.pageY : e.clientY;\\n          var adRight = pos.left + pos.width - (pos.width - adWidth) / 2;\\n          var adTop = pos.top + pos.height - adHeight - 4; // click on close button\\n\\n          if (x < adRight && x > adRight - 40 && y > adTop && y < adTop + 30) {\\n            return;\\n          } // click on recall button\\n\\n\\n          if (x > pos.left + pos.width / 2 - 15 && x < pos.left + pos.width / 2 + 15 && y > pos.top + pos.height - 15) {\\n            return;\\n          }\\n\\n          var newEvent;\\n          var opt = {};\\n\\n          for (var key in e) {\\n            opt[key] = e[key];\\n          }\\n\\n          opt.bubbles = false;\\n\\n          try {\\n            newEvent = new e.constructor(e.type, opt);\\n          } catch (err) {\\n            // special case for IE11\\n            newEvent = document.createEvent('MouseEvent');\\n            newEvent.initMouseEvent(e.type, opt.bubbles, opt.cancelable, opt.view, opt.detail, opt.screenX, opt.screenY, opt.clientX, opt.clientY, opt.ctrlKey, opt.altKey, opt.shiftKey, opt.metaKey, opt.button, null);\\n          }\\n\\n          newEvent.stopPropagation();\\n          player.tech_.trigger(newEvent);\\n        });\\n      });\\n    }.bind(this);\\n\\n    this.settings = extend({}, ima_defaults, options || {});\\n    this.settings.adLabel = this.player.localize(this.settings.adLabel); // Currently this isn't used but I can see it being needed in the future, so\\n    // to avoid implementation problems with later updates I'm requiring it.\\n\\n    if (!this.settings['id']) {\\n      window.console.log('Error: must provide id of video.js div');\\n      return;\\n    }\\n\\n    this.controlPrefix = this.settings.id + '_' || false;\\n    this.contentPlayer = this.player.$('.vjs-tech'); // Default showing countdown timer to true.\\n\\n    this.showCountdown = true;\\n\\n    if (this.settings['showCountdown'] === false) {\\n      this.showCountdown = false;\\n    }\\n\\n    this.autoPlayAdBreaks = true;\\n\\n    if (this.settings['autoPlayAdBreaks'] === false) {\\n      this.autoPlayAdBreaks = false;\\n    }\\n\\n    var contrib_ads_defaults = {\\n      debug: this.settings.debug,\\n      timeout: this.settings.timeout,\\n      prerollTimeout: this.settings.prerollTimeout,\\n      postrollTimeout: this.settings.postrollTimeout\\n    };\\n    var ads_plugin_settings = extend({}, contrib_ads_defaults, options['contribAdsSettings'] || {});\\n    player.ads(ads_plugin_settings);\\n    player.one('play', setUpPlayerIntervals_);\\n    player.on('contentended', this.localContentEndedListener);\\n    player.on('dispose', this.playerDisposedListener);\\n    player.on('timeupdate', updateStartTime_);\\n    this.adsRenderingSettings = new google.ima.AdsRenderingSettings();\\n    this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;\\n\\n    if (this.settings['adsRenderingSettings']) {\\n      for (var setting in this.settings['adsRenderingSettings']) {\\n        this.adsRenderingSettings[setting] = this.settings['adsRenderingSettings'][setting];\\n      }\\n    }\\n\\n    if (this.settings['locale']) {\\n      google.ima.settings.setLocale(this.settings['locale']);\\n    }\\n\\n    createAdContainer_();\\n    this.adsLoader = new google.ima.AdsLoader(this.adDisplayContainer);\\n    this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED);\\n\\n    if (this.settings.vpaidAllowed == false) {\\n      this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED);\\n    }\\n\\n    if (this.settings.vpaidMode) {\\n      this.adsLoader.getSettings().setVpaidMode(this.settings.vpaidMode);\\n    }\\n\\n    if (this.settings.locale) {\\n      this.adsLoader.getSettings().setLocale(this.settings.locale);\\n    }\\n\\n    if (this.settings.numRedirects) {\\n      this.adsLoader.getSettings().setNumRedirects(this.settings.numRedirects);\\n    }\\n\\n    this.adsLoader.getSettings().setPlayerType('videojs-ima');\\n    this.adsLoader.getSettings().setPlayerVersion(this.VERSION);\\n    this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks);\\n    this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, onAdsManagerLoaded_, false);\\n    this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, onAdsLoaderError_, false);\\n\\n    if (!readyCallback) {\\n      readyCallback = this.startFromReadyCallback;\\n    }\\n\\n    player.on('readyforpreroll', readyCallback);\\n    player.ready(function () {\\n      player.on('fullscreenchange', onFullscreenChange_);\\n      player.on('volumechange', onVolumeChange_);\\n    });\\n    this.proxyClickEvents();\\n  };\\n\\n  videojs.registerPlugin('ima', init);\\n});\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/ima/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/index.js\":\n/*!**************************!*\\\n  !*** ./plugins/index.js ***!\n  \\**************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\n__webpack_require__(/*! videojs-contrib-ads */ \\\"../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js\\\");\\n\\n__webpack_require__(/*! ./ima */ \\\"./plugins/ima/index.js\\\");\\n\\nvar _dash = _interopRequireDefault(__webpack_require__(/*! ./dash */ \\\"./plugins/dash/index.js\\\"));\\n\\nvar _interactivePlugin = _interopRequireDefault(__webpack_require__(/*! ./interactive-plugin */ \\\"./plugins/interactive-plugin/index.js\\\"));\\n\\n__webpack_require__(/*! ./videojs-http-source-selector/plugin */ \\\"./plugins/videojs-http-source-selector/plugin.js\\\");\\n\\nvar _autoplayOnScroll = _interopRequireDefault(__webpack_require__(/*! ./autoplay-on-scroll */ \\\"./plugins/autoplay-on-scroll/index.js\\\"));\\n\\nvar _floatingPlayer = _interopRequireDefault(__webpack_require__(/*! ./floating-player */ \\\"./plugins/floating-player/index.js\\\"));\\n\\nvar _colors = _interopRequireDefault(__webpack_require__(/*! ./colors */ \\\"./plugins/colors/index.js\\\"));\\n\\nvar _contextMenu = _interopRequireDefault(__webpack_require__(/*! ./context-menu */ \\\"./plugins/context-menu/index.js\\\"));\\n\\nvar _cloudinary = _interopRequireDefault(__webpack_require__(/*! ./cloudinary */ \\\"./plugins/cloudinary/index.js\\\"));\\n\\nvar _analytics = _interopRequireDefault(__webpack_require__(/*! ./analytics */ \\\"./plugins/analytics/index.js\\\"));\\n\\nvar _vttThumbnails = _interopRequireDefault(__webpack_require__(/*! ./vtt-thumbnails */ \\\"./plugins/vtt-thumbnails/index.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// #if (!process.env.WEBPACK_BUILD_LIGHT)\\n// #endif\\nvar plugins = {\\n  autoplayOnScroll: _autoplayOnScroll.default,\\n  floatingPlayer: _floatingPlayer.default,\\n  colors: _colors.default,\\n  contextMenu: _contextMenu.default,\\n  cloudinary: _cloudinary.default,\\n  analytics: _analytics.default,\\n  vttThumbnails: _vttThumbnails.default,\\n  // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n  interactive: _interactivePlugin.default,\\n  dashPlugin: _dash.default // #endif\\n\\n};\\nvar _default = plugins;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/interactive-plugin/index.js\":\n/*!*********************************************!*\\\n  !*** ./plugins/interactive-plugin/index.js ***!\n  \\*********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = interactivePlugin;\\n\\nvar _shoppableWidget = _interopRequireDefault(__webpack_require__(/*! ../../components/shoppable-bar/shoppable-widget */ \\\"./components/shoppable-bar/shoppable-widget.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction interactivePlugin(player, options) {\\n  // Shoppable Video\\n  if (options.shoppable) {\\n    new _shoppableWidget.default(player, options.shoppable).init();\\n  }\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/interactive-plugin/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/videojs-http-source-selector/components/SourceMenuButton.js\":\n/*!*****************************************************************************!*\\\n  !*** ./plugins/videojs-http-source-selector/components/SourceMenuButton.js ***!\n  \\*****************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _SourceMenuItem = _interopRequireDefault(__webpack_require__(/*! ./SourceMenuItem */ \\\"./plugins/videojs-http-source-selector/components/SourceMenuItem.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MenuButton = _video.default.getComponent('MenuButton');\\n\\nvar SourceMenuButton = /*#__PURE__*/function (_MenuButton) {\\n  _inherits(SourceMenuButton, _MenuButton);\\n\\n  var _super = _createSuper(SourceMenuButton);\\n\\n  function SourceMenuButton(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, SourceMenuButton);\\n\\n    _this = _super.call(this, player, options); // eslint-disable-next-line prefer-rest-params\\n\\n    MenuButton.apply(_assertThisInitialized(_this), arguments);\\n\\n    var qualityLevels = _this.player().qualityLevels(); // Handle options: We accept an options.default value of ( high || low )\\n    // This determines a bias to set initial resolution selection.\\n\\n\\n    if (options && options.default) {\\n      if (options.default === 'low') {\\n        for (var i = 0; i < qualityLevels.length; i++) {\\n          qualityLevels[i].enabled = i === 0;\\n        }\\n      } else if (options.default === 'high') {\\n        for (var _i = 0; _i < qualityLevels.length; _i++) {\\n          qualityLevels[_i].enabled = _i === qualityLevels.length - 1;\\n        }\\n      }\\n    } // Bind update to qualityLevels changes\\n\\n\\n    _this.player().qualityLevels().on(['addqualitylevel'], _video.default.bind(_assertThisInitialized(_this), _this.update));\\n\\n    return _this;\\n  }\\n\\n  _createClass(SourceMenuButton, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      return _video.default.dom.createEl('div', {\\n        className: 'vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button'\\n      });\\n    }\\n  }, {\\n    key: \\\"buildCSSClass\\\",\\n    value: function buildCSSClass() {\\n      return MenuButton.prototype.buildCSSClass.call(this) + ' vjs-icon-cog';\\n    }\\n  }, {\\n    key: \\\"update\\\",\\n    value: function update() {\\n      return MenuButton.prototype.update.call(this);\\n    }\\n  }, {\\n    key: \\\"createItems\\\",\\n    value: function createItems() {\\n      var menuItems = [];\\n      var levels = this.player().qualityLevels();\\n      var labels = [];\\n\\n      for (var i = 0; i < levels.length; i++) {\\n        var index = levels.length - (i + 1);\\n        var selected = index === levels.selectedIndex; // Display height if height metadata is provided with the stream, else use bitrate\\n\\n        var label = \\\"\\\".concat(index);\\n        var sortVal = index;\\n\\n        if (levels[index].height) {\\n          label = \\\"\\\".concat(levels[index].height, \\\"p\\\");\\n          sortVal = parseInt(levels[index].height, 10);\\n        } else if (levels[index].bitrate) {\\n          label = \\\"\\\".concat(Math.floor(levels[index].bitrate / 1e3), \\\" kbps\\\");\\n          sortVal = parseInt(levels[index].bitrate, 10);\\n        } // Skip duplicate labels\\n\\n\\n        if (labels.indexOf(label) >= 0) {\\n          // eslint-disable-next-line no-continue\\n          continue;\\n        }\\n\\n        labels.push(label);\\n        menuItems.push(new _SourceMenuItem.default(this.player_, {\\n          label: label,\\n          index: index,\\n          selected: selected,\\n          sortVal: sortVal\\n        }));\\n      } // If there are multiple quality levels, offer an 'auto' option\\n\\n\\n      if (levels.length > 1) {\\n        menuItems.push(new _SourceMenuItem.default(this.player_, {\\n          label: 'Auto',\\n          index: levels.length,\\n          selected: false,\\n          sortVal: 99999\\n        }));\\n      } // Sort menu items by their label name with Auto always first\\n\\n\\n      menuItems.sort(function (a, b) {\\n        if (a.options_.sortVal < b.options_.sortVal) {\\n          return 1;\\n        } else if (a.options_.sortVal > b.options_.sortVal) {\\n          return -1;\\n        } else {\\n          return 0;\\n        }\\n      });\\n      return menuItems;\\n    }\\n  }]);\\n\\n  return SourceMenuButton;\\n}(MenuButton);\\n\\nvar _default = SourceMenuButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/videojs-http-source-selector/components/SourceMenuButton.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/videojs-http-source-selector/components/SourceMenuItem.js\":\n/*!***************************************************************************!*\\\n  !*** ./plugins/videojs-http-source-selector/components/SourceMenuItem.js ***!\n  \\***************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MenuItem = _video.default.getComponent('MenuItem');\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar SourceMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _inherits(SourceMenuItem, _MenuItem);\\n\\n  var _super = _createSuper(SourceMenuItem);\\n\\n  function SourceMenuItem(player, options) {\\n    _classCallCheck(this, SourceMenuItem);\\n\\n    options.selectable = true;\\n    options.multiSelectable = false;\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(SourceMenuItem, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      var selected = this.options_;\\n      console.log('Changing quality to:', selected.label);\\n\\n      _get(_getPrototypeOf(SourceMenuItem.prototype), \\\"handleClick\\\", this).call(this);\\n\\n      var levels = this.player().qualityLevels();\\n      var isAuto = selected.index === levels.length;\\n\\n      for (var i = 0; i < levels.length; i++) {\\n        if (isAuto) {\\n          // If this is the Auto option, enable all renditions for adaptive selection\\n          levels[i].enabled = true;\\n        } else if (selected.index === i) {\\n          levels[i].enabled = true;\\n        } else {\\n          levels[i].enabled = false;\\n        }\\n      }\\n\\n      if (isAuto) {\\n        this.deselectRest(6);\\n      } else {\\n        this.deselectRest(selected.index);\\n      }\\n    }\\n  }, {\\n    key: \\\"deselectRest\\\",\\n    value: function deselectRest(idx) {\\n      if (this.parentComponent_) {\\n        this.parentComponent_.children().forEach(function (item) {\\n          item.selected(idx === item.options_.index);\\n        });\\n      }\\n    }\\n  }, {\\n    key: \\\"update\\\",\\n    value: function update() {\\n      var selectedIndex = this.player().qualityLevels().selectedIndex;\\n      this.selected(this.options_.index === selectedIndex);\\n    }\\n  }]);\\n\\n  return SourceMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('SourceMenuItem', SourceMenuItem);\\nvar _default = SourceMenuItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/videojs-http-source-selector/components/SourceMenuItem.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/videojs-http-source-selector/plugin.js\":\n/*!********************************************************!*\\\n  !*** ./plugins/videojs-http-source-selector/plugin.js ***!\n  \\********************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _SourceMenuButton = _interopRequireDefault(__webpack_require__(/*! ./components/SourceMenuButton */ \\\"./plugins/videojs-http-source-selector/components/SourceMenuButton.js\\\"));\\n\\nvar _SourceMenuItem = _interopRequireDefault(__webpack_require__(/*! ./components/SourceMenuItem */ \\\"./plugins/videojs-http-source-selector/components/SourceMenuItem.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// Default options for the plugin.\\nvar defaults = {}; // Cross-compatibility for Video.js 5 and 6.\\n\\nvar registerPlugin = _video.default.registerPlugin || _video.default.plugin; // const dom = videojs.dom || videojs;\\n\\n/**\\n* Function to invoke when the player is ready.\\n*\\n* This is a great place for your plugin to initialize itself. When this\\n* function is called, the player will have its DOM and child components\\n* in place.\\n*\\n* @function onPlayerReady\\n* @param    {Player} player\\n*           A Video.js player object.\\n*\\n* @param    {Object} [options={}]\\n*           A plain object containing options for the plugin.\\n*/\\n\\nvar onPlayerReady = function onPlayerReady(player) {\\n  player.addClass('vjs-http-source-selector');\\n  console.log('videojs-http-source-selector initialized!');\\n  console.log('player.techName_:' + player.techName_); // This plugin only supports level selection for HLS playback\\n\\n  if (player.techName_ !== 'Html5') {\\n    return false;\\n  }\\n  /**\\n  *\\n  * We have to wait for the manifest to load before we can scan renditions for resolutions/bitrates to populate selections\\n  *\\n  **/\\n\\n\\n  player.on(['loadedmetadata'], function () {\\n    _video.default.log('loadmetadata event'); // hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.httpSourceSelector() functions called.\\n\\n\\n    if (player.videojs_http_source_selector_initialized === 'undefined' || player.videojs_http_source_selector_initialized === true) {\\n      console.log('player.videojs_http_source_selector_initialized == true');\\n    } else {\\n      console.log('player.videojs_http_source_selector_initialized == false');\\n      player.videojs_http_source_selector_initialized = true;\\n      var controlBar = player.controlBar,\\n          fullscreenToggle = controlBar.getChild('fullscreenToggle').el();\\n      controlBar.el().insertBefore(controlBar.addChild('SourceMenuButton').el(), fullscreenToggle);\\n    }\\n  });\\n};\\n/**\\n  * A video.js plugin.\\n  *\\n  * In the plugin function, the value of `this` is a video.js `Player`\\n  * instance. You cannot rely on the player being in a \\\"ready\\\" state here,\\n  * depending on how the plugin is invoked. This may or may not be important\\n  * to you; if not, remove the wait for \\\"ready\\\"!\\n  *\\n  * @function httpSourceSelector\\n  * @param    {Object} [options={}]\\n  *           An object of options left to the plugin author to define.\\n  */\\n\\n\\nvar httpSourceSelector = function httpSourceSelector(options) {\\n  var _this = this;\\n\\n  this.ready(function () {\\n    onPlayerReady(_this, _video.default.mergeOptions(defaults, options)); // this.getChild('controlBar').addChild('SourceMenuButton', {});\\n  });\\n\\n  _video.default.registerComponent('SourceMenuButton', _SourceMenuButton.default);\\n\\n  _video.default.registerComponent('SourceMenuItem', _SourceMenuItem.default);\\n}; // Register the plugin with video.js.\\n\\n\\nregisterPlugin('httpSourceSelector', httpSourceSelector);\\nvar _default = httpSourceSelector;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/videojs-http-source-selector/plugin.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/vtt-thumbnails/index.js\":\n/*!*****************************************!*\\\n  !*** ./plugins/vtt-thumbnails/index.js ***!\n  \\*****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _promisePolyfill = _interopRequireDefault(__webpack_require__(/*! promise-polyfill */ \\\"../node_modules/promise-polyfill/promise.js\\\"));\\n\\n__webpack_require__(/*! ./vtt-thumbnails.scss */ \\\"./plugins/vtt-thumbnails/vtt-thumbnails.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// Default options for the plugin.\\nvar defaults = {}; // Cache for image elements\\n\\nvar cache = {};\\n/**\\n * Function to invoke when the player is ready.\\n *\\n * This is a great place for your plugin to initialize itself. When this\\n * function is called, the player will have its DOM and child components\\n * in place.\\n *\\n * @function onPlayerReady\\n * @param    {Player} player\\n *           A Video.js player object.\\n *\\n * @param    {Object} [options={}]\\n *           A plain object containing options for the plugin.\\n */\\n\\nvar onPlayerReady = function onPlayerReady(player, options) {\\n  player.addClass('vjs-vtt-thumbnails');\\n  player.vttThumbnails = new VttThumbnailsPlugin(player, options);\\n};\\n/**\\n * A video.js plugin.\\n *\\n * In the plugin function, the value of `this` is a video.js `Player`\\n * instance. You cannot rely on the player being in a \\\"ready\\\" state here,\\n * depending on how the plugin is invoked. This may or may not be important\\n * to you; if not, remove the wait for \\\"ready\\\"!\\n *\\n * @function vttThumbnails\\n * @param    {Object} [options={}]\\n *           An object of options left to the plugin author to define.\\n */\\n\\n\\nvar vttThumbnails = function vttThumbnails(options) {\\n  var _this = this;\\n\\n  this.ready(function () {\\n    onPlayerReady(_this, _video.default.mergeOptions(defaults, options));\\n  });\\n};\\n/**\\n * VTT Thumbnails class.\\n *\\n * This class performs all functions related to displaying the vtt\\n * thumbnails.\\n */\\n\\n\\nvar VttThumbnailsPlugin = function () {\\n  /**\\n   * Plugin class constructor, called by videojs on\\n   * ready event.\\n   *\\n   * @function  constructor\\n   * @param    {Player} player\\n   *           A Video.js player object.\\n   *\\n   * @param    {Object} [options={}]\\n   *           A plain object containing options for the plugin.\\n   */\\n  function VttThumbnailsPlugin(player, options) {\\n    this.player = player;\\n    this.options = options;\\n    this.listenForDurationChange();\\n    this.initializeThumbnails();\\n    this.registeredEvents = {};\\n    return this;\\n  }\\n\\n  VttThumbnailsPlugin.prototype.src = function src(source) {\\n    this.resetPlugin();\\n    this.options.src = source;\\n    this.initializeThumbnails();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.detach = function detach() {\\n    this.resetPlugin();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.resetPlugin = function resetPlugin() {\\n    if (this.thumbnailHolder) {\\n      this.thumbnailHolder.parentNode.removeChild(this.thumbnailHolder);\\n    }\\n\\n    if (this.progressBar) {\\n      this.progressBar.removeEventListener('mouseenter', this.registeredEvents.progressBarMouseEnter);\\n      this.progressBar.removeEventListener('mouseleave', this.registeredEvents.progressBarMouseLeave);\\n      this.progressBar.removeEventListener('mousemove', this.registeredEvents.progressBarMouseMove);\\n    }\\n\\n    delete this.registeredEvents.progressBarMouseEnter;\\n    delete this.registeredEvents.progressBarMouseLeave;\\n    delete this.registeredEvents.progressBarMouseMove;\\n    delete this.progressBar;\\n    delete this.vttData;\\n    delete this.thumbnailHolder;\\n    delete this.lastStyle;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.listenForDurationChange = function listenForDurationChange() {\\n    this.player.on('durationchange', function () {// ToDo\\n    });\\n  };\\n  /**\\n   * Bootstrap the plugin.\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.initializeThumbnails = function initializeThumbnails() {\\n    var _this2 = this;\\n\\n    if (!this.options.src) {\\n      return;\\n    }\\n\\n    var baseUrl = this.getBaseUrl();\\n    var url = this.getFullyQualifiedUrl(this.options.src, baseUrl);\\n    this.getVttFile(url).then(function (data) {\\n      _this2.vttData = _this2.processVtt(data);\\n\\n      _this2.setupThumbnailElement();\\n    });\\n  };\\n  /**\\n   * Builds a base URL should we require one.\\n   *\\n   * @returns {string}\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.getBaseUrl = function getBaseUrl() {\\n    return [window.location.protocol, '//', window.location.hostname, window.location.port ? ':' + window.location.port : '', window.location.pathname].join('').split(/([^\\\\/]*)$/gi).shift();\\n  };\\n  /**\\n   * Grabs the contents of the VTT file.\\n   *\\n   * @param url\\n   * @returns {Promise}\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.getVttFile = function getVttFile(url) {\\n    var _this3 = this;\\n\\n    return new _promisePolyfill.default(function (resolve) {\\n      var req = new XMLHttpRequest();\\n      req.data = {\\n        resolve: resolve\\n      };\\n      req.addEventListener('load', _this3.vttFileLoaded);\\n      req.open('GET', url);\\n      req.send();\\n    });\\n  };\\n  /**\\n   * Callback for loaded VTT file.\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.vttFileLoaded = function vttFileLoaded() {\\n    this.data.resolve(this.responseText);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.setupThumbnailElement = function setupThumbnailElement() {\\n    var _this4 = this;\\n\\n    var mouseDisplay = this.player.$('.vjs-mouse-display');\\n    this.progressBar = this.player.$('.vjs-progress-control');\\n    var thumbHolder = document.createElement('div');\\n    thumbHolder.setAttribute('class', 'vjs-vtt-thumbnail-display');\\n    this.progressBar.appendChild(thumbHolder);\\n    this.thumbnailHolder = thumbHolder;\\n    var timeHolder = document.createElement('div');\\n    timeHolder.setAttribute('class', 'vjs-vtt-time-display');\\n    this.thumbnailHolder.appendChild(timeHolder);\\n    this.timeHolder = timeHolder;\\n\\n    if (mouseDisplay) {\\n      mouseDisplay.classList.add('vjs-hidden');\\n    }\\n\\n    this.registeredEvents.progressBarMouseEnter = function () {\\n      return _this4.onBarMouseenter();\\n    };\\n\\n    this.registeredEvents.progressBarMouseLeave = function () {\\n      return _this4.onBarMouseleave();\\n    };\\n\\n    this.progressBar.addEventListener('mouseenter', this.registeredEvents.progressBarMouseEnter);\\n    this.progressBar.addEventListener('mouseleave', this.registeredEvents.progressBarMouseLeave);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.onBarMouseenter = function onBarMouseenter() {\\n    var _this5 = this;\\n\\n    if (this.progressBar.offsetWidth < 400) {\\n      // Don't show in small players\\n      return;\\n    }\\n\\n    this.mouseMoveCallback = function (e) {\\n      _this5.onBarMousemove(e);\\n    };\\n\\n    this.registeredEvents.progressBarMouseMove = this.mouseMoveCallback;\\n    this.progressBar.addEventListener('mousemove', this.registeredEvents.progressBarMouseMove);\\n    this.showThumbnailHolder();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.onBarMouseleave = function onBarMouseleave() {\\n    if (this.registeredEvents.progressBarMouseMove) {\\n      this.progressBar.removeEventListener('mousemove', this.registeredEvents.progressBarMouseMove);\\n    }\\n\\n    this.hideThumbnailHolder();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getXCoord = function getXCoord(bar, mouseX) {\\n    var rect = bar.getBoundingClientRect();\\n    var docEl = document.documentElement;\\n    return mouseX - (rect.left + (window.pageXOffset || docEl.scrollLeft || 0));\\n  };\\n\\n  VttThumbnailsPlugin.prototype.onBarMousemove = function onBarMousemove(event) {\\n    this.updateThumbnailStyle(_video.default.dom.getPointerPosition(this.progressBar, event).x, this.progressBar.offsetWidth);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getStyleForTime = function getStyleForTime(time) {\\n    for (var i = 0; i < this.vttData.length; ++i) {\\n      var item = this.vttData[i];\\n\\n      if (time >= item.start && time < item.end) {\\n        // Cache miss\\n        if (item.css.url && !cache[item.css.url]) {\\n          var image = new Image();\\n          image.src = item.css.url;\\n          cache[item.css.url] = image;\\n        }\\n\\n        return item.css;\\n      }\\n    }\\n  };\\n\\n  VttThumbnailsPlugin.prototype.showThumbnailHolder = function showThumbnailHolder() {\\n    this.thumbnailHolder.style.opacity = '1';\\n  };\\n\\n  VttThumbnailsPlugin.prototype.hideThumbnailHolder = function hideThumbnailHolder() {\\n    this.thumbnailHolder.style.opacity = '0';\\n  };\\n\\n  VttThumbnailsPlugin.prototype.updateThumbnailStyle = function updateThumbnailStyle(percent, width) {\\n    var duration = this.player.duration();\\n    var time = percent * duration;\\n    var currentStyle = this.getStyleForTime(time);\\n\\n    if (!currentStyle) {\\n      return this.hideThumbnailHolder();\\n    }\\n\\n    var xPos = percent * width;\\n    var thumbnailWidth = parseInt(currentStyle.width, 10);\\n    var halfthumbnailWidth = thumbnailWidth / 2;\\n    var marginRight = width - (xPos + halfthumbnailWidth);\\n    var marginLeft = xPos - halfthumbnailWidth;\\n\\n    if (marginLeft > 0 && marginRight > 0) {\\n      this.thumbnailHolder.style.transform = 'translateX(' + (xPos - halfthumbnailWidth) + 'px)';\\n    } else if (marginLeft <= 0) {\\n      this.thumbnailHolder.style.transform = 'translateX(' + 0 + 'px)';\\n    } else if (marginRight <= 0) {\\n      this.thumbnailHolder.style.transform = 'translateX(' + (width - thumbnailWidth) + 'px)';\\n    }\\n\\n    this.timeHolder.innerHTML = this.getTimestampFromSeconds(time);\\n\\n    if (this.lastStyle && this.lastStyle === currentStyle) {\\n      return;\\n    }\\n\\n    this.lastStyle = currentStyle;\\n\\n    for (var style in currentStyle) {\\n      if (Object.prototype.hasOwnProperty.call(currentStyle, style)) {\\n        this.thumbnailHolder.style[style] = currentStyle[style];\\n      }\\n    }\\n  };\\n\\n  VttThumbnailsPlugin.prototype.processVtt = function processVtt(data) {\\n    var _this6 = this;\\n\\n    var processedVtts = [];\\n    var vttDefinitions = data.split(/[\\\\r\\\\n][\\\\r\\\\n]/i);\\n    vttDefinitions.forEach(function (vttDef) {\\n      if (vttDef.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--> ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?[\\\\r\\\\n]{1}.*/gi)) {\\n        var vttDefSplit = vttDef.split(/[\\\\r\\\\n]/i);\\n        var vttTiming = vttDefSplit[0];\\n        var vttTimingSplit = vttTiming.split(/ ?--> ?/i);\\n        var vttTimeStart = vttTimingSplit[0];\\n        var vttTimeEnd = vttTimingSplit[1];\\n        var vttImageFullPath = vttDefSplit[1];\\n        var vttImageDef = vttImageFullPath.split('\\\\/').pop();\\n\\n        var vttCssDef = _this6.getVttCss(vttImageDef);\\n\\n        processedVtts.push({\\n          start: _this6.getSecondsFromTimestamp(vttTimeStart),\\n          end: _this6.getSecondsFromTimestamp(vttTimeEnd),\\n          css: vttCssDef\\n        });\\n      }\\n    });\\n    return processedVtts;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getFullyQualifiedUrl = function getFullyQualifiedUrl(path, base) {\\n    // ToDo: remove this? also remove trim?\\n    if (path.indexOf('//') >= 0) {\\n      // We have a fully qualified path.\\n      return path;\\n    } else if (base.indexOf('//') === 0) {\\n      // We don't have a fully qualified path, but need to\\n      // be careful with trimming.\\n      return [base.replace(/\\\\/$/gi, ''), this.trim(path, '/')].join('/');\\n    } else if (base.indexOf('//') > 0) {\\n      // We don't have a fully qualified path, and should\\n      // trim both sides of base and path.\\n      return [this.trim(base, '/'), this.trim(path, '/')].join('/');\\n    } // If all else fails.\\n\\n\\n    return path;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getPropsFromDef = function getPropsFromDef(def) {\\n    var imageDefSplit = def.split(/#xywh=/i);\\n    var imageUrl = imageDefSplit[0];\\n    var imageCoords = imageDefSplit[1];\\n    var splitCoords = imageCoords.match(/[0-9]+/gi);\\n    return {\\n      x: splitCoords[0],\\n      y: splitCoords[1],\\n      w: splitCoords[2],\\n      h: splitCoords[3],\\n      image: imageUrl\\n    };\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getVttCss = function getVttCss(vttImageDef) {\\n    var cssObj = {}; // If there isn't a protocol, use the VTT source URL.\\n\\n    var baseSplit = '';\\n\\n    if (this.options.src.indexOf('//') >= 0) {\\n      baseSplit = this.options.src.split(/([^\\\\/]*)$/gi).shift();\\n    } else {\\n      baseSplit = this.getBaseUrl() + this.options.src.split(/([^\\\\/]*)$/gi).shift();\\n    }\\n\\n    vttImageDef = this.getFullyQualifiedUrl(vttImageDef, baseSplit);\\n\\n    if (!vttImageDef.match(/#xywh=/i)) {\\n      cssObj.background = 'url(\\\"' + vttImageDef + '\\\")';\\n      return cssObj;\\n    }\\n\\n    var imageProps = this.getPropsFromDef(vttImageDef);\\n    cssObj.background = 'url(\\\"' + imageProps.image + '\\\") no-repeat -' + imageProps.x + 'px -' + imageProps.y + 'px';\\n    cssObj.width = imageProps.w + 'px';\\n    cssObj.height = imageProps.h + 'px';\\n    cssObj.url = imageProps.image;\\n    return cssObj;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.doconstructTimestamp = function doconstructTimestamp(timestamp) {\\n    var splitStampMilliseconds = timestamp.split('.');\\n    var timeParts = splitStampMilliseconds[0];\\n    var timePartsSplit = timeParts.split(':');\\n    return {\\n      milliseconds: parseInt(splitStampMilliseconds[1], 10) || 0,\\n      seconds: parseInt(timePartsSplit.pop(), 10) || 0,\\n      minutes: parseInt(timePartsSplit.pop(), 10) || 0,\\n      hours: parseInt(timePartsSplit.pop(), 10) || 0\\n    };\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getSecondsFromTimestamp = function getSecondsFromTimestamp(timestamp) {\\n    var timestampParts = this.doconstructTimestamp(timestamp);\\n    return parseInt(timestampParts.hours * (60 * 60) + timestampParts.minutes * 60 + timestampParts.seconds + timestampParts.milliseconds / 1000, 10);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getTimestampFromSeconds = function getTimestampFromSeconds(totalSeconds) {\\n    var minutes = Math.floor(totalSeconds / 60);\\n    var seconds = Math.floor(totalSeconds % 60);\\n\\n    if (seconds < 10) {\\n      seconds = '0' + seconds;\\n    }\\n\\n    return minutes + ':' + seconds;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.trim = function trim(str, charlist) {\\n    var whitespace = [' ', '\\\\n', '\\\\r', '\\\\t', '\\\\f', '\\\\x0b', '\\\\xa0', \\\"\\\\u2000\\\", \\\"\\\\u2001\\\", \\\"\\\\u2002\\\", \\\"\\\\u2003\\\", \\\"\\\\u2004\\\", \\\"\\\\u2005\\\", \\\"\\\\u2006\\\", \\\"\\\\u2007\\\", \\\"\\\\u2008\\\", \\\"\\\\u2009\\\", \\\"\\\\u200A\\\", \\\"\\\\u200B\\\", \\\"\\\\u2028\\\", \\\"\\\\u2029\\\", \\\"\\\\u3000\\\"].join('');\\n    var l = 0;\\n    var i = 0;\\n    str += '';\\n\\n    if (charlist) {\\n      whitespace = (charlist + '').replace(/([[\\\\]().?/*{}+$^:])/g, '$1');\\n    }\\n\\n    l = str.length;\\n\\n    for (i = 0; i < l; i++) {\\n      if (whitespace.indexOf(str.charAt(i)) === -1) {\\n        str = str.substring(i);\\n        break;\\n      }\\n    }\\n\\n    l = str.length;\\n\\n    for (i = l - 1; i >= 0; i--) {\\n      if (whitespace.indexOf(str.charAt(i)) === -1) {\\n        str = str.substring(0, i + 1);\\n        break;\\n      }\\n    }\\n\\n    return whitespace.indexOf(str.charAt(0)) === -1 ? str : '';\\n  };\\n\\n  return VttThumbnailsPlugin;\\n}();\\n\\nvar _default = vttThumbnails;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/vtt-thumbnails/index.js?\");\n\n/***/ }),\n\n/***/ \"./plugins/vtt-thumbnails/vtt-thumbnails.scss\":\n/*!****************************************************!*\\\n  !*** ./plugins/vtt-thumbnails/vtt-thumbnails.scss ***!\n  \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\neval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/vtt-thumbnails/vtt-thumbnails.scss?\");\n\n/***/ }),\n\n/***/ \"./utils/api.js\":\n/*!**********************!*\\\n  !*** ./utils/api.js ***!\n  \\**********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.normalizeJsonResponse = void 0;\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \\\"./utils/type-inference.js\\\");\\n\\nvar _string = __webpack_require__(/*! utils/string */ \\\"./utils/string.js\\\");\\n\\nvar _time = __webpack_require__(/*! utils/time */ \\\"./utils/time.js\\\");\\n\\nvar TIME_FIELDS = ['created_at', 'updated_at'];\\n\\nvar normalizeJsonResponse = function normalizeJsonResponse(obj) {\\n  var agg = {};\\n\\n  if ((0, _typeInference.isPlainObject)(obj)) {\\n    Object.keys(obj).reduce(function (agg, key) {\\n      var newKey = (0, _string.camelize)(key);\\n\\n      if (TIME_FIELDS.indexOf(key) !== -1) {\\n        agg[newKey] = new Date((0, _time.parseISO8601)(obj[key]));\\n      } else {\\n        agg[newKey] = normalizeJsonResponse(obj[key]);\\n      }\\n\\n      return agg;\\n    }, agg);\\n    return agg;\\n  } else if (Array.isArray(obj)) {\\n    return obj.map(function (item) {\\n      return normalizeJsonResponse(item);\\n    });\\n  } else {\\n    return obj;\\n  }\\n};\\n\\nexports.normalizeJsonResponse = normalizeJsonResponse;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/api.js?\");\n\n/***/ }),\n\n/***/ \"./utils/apply-with-props.js\":\n/*!***********************************!*\\\n  !*** ./utils/apply-with-props.js ***!\n  \\***********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.applyWithProps = applyWithProps;\\n\\nvar _assign = __webpack_require__(/*! ./assign */ \\\"./utils/assign.js\\\");\\n\\nfunction applyWithProps(context, obj) {\\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\\n      _ref$order = _ref.order,\\n      order = _ref$order === void 0 ? null : _ref$order;\\n\\n  var _obj = obj;\\n\\n  var apply = function apply(key) {\\n    var value = obj[key];\\n\\n    if (value === undefined) {\\n      return;\\n    }\\n\\n    if (context[key] && typeof context[key] === 'function') {\\n      context[key](value);\\n    }\\n  };\\n\\n  if (order) {\\n    _obj = (0, _assign.assign)({}, obj);\\n    order.forEach(function (key) {\\n      apply(key);\\n      delete _obj[key];\\n    });\\n  }\\n\\n  Object.keys(_obj).forEach(function (key) {\\n    apply(key);\\n  });\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/apply-with-props.js?\");\n\n/***/ }),\n\n/***/ \"./utils/assign.js\":\n/*!*************************!*\\\n  !*** ./utils/assign.js ***!\n  \\*************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.assign = assign;\\n\\n/**\\n * Object.assign-style object shallow merge/extend.\\n *\\n * @param  {Object} target\\n * @param  {Object} ...sources\\n * @return {Object}\\n */\\nfunction assign(target) {\\n  for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n    sources[_key - 1] = arguments[_key];\\n  }\\n\\n  if (Object.assign) {\\n    return Object.assign.apply(Object, [target].concat(sources));\\n  }\\n\\n  sources.forEach(function (source) {\\n    if (!source) {\\n      return;\\n    }\\n\\n    Object.keys(source).forEach(function (key) {\\n      var value = source[key];\\n      target[key] = value;\\n    });\\n  });\\n  return target;\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/assign.js?\");\n\n/***/ }),\n\n/***/ \"./utils/attributes-normalizer.js\":\n/*!****************************************!*\\\n  !*** ./utils/attributes-normalizer.js ***!\n  \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.normalizeAttributes = void 0;\\n\\nvar _string = __webpack_require__(/*! ./string */ \\\"./utils/string.js\\\");\\n\\nvar CLD_ATTR_REGEX = /^(data-cld-)(\\\\w+)/;\\nvar normalizers = {};\\n\\nfunction coerce(string) {\\n  var val = null; // Boolean\\n\\n  if (string === '') {\\n    return true;\\n  } // Complex object\\n\\n\\n  try {\\n    val = JSON.parse(string);\\n  } catch (e) {// Continue execution in case str is not parsable\\n  }\\n\\n  if (val) {\\n    return val;\\n  } // Number\\n\\n\\n  val = Number(string);\\n\\n  if (val) {\\n    return val;\\n  } // TODO: Parse date?\\n  //\\n\\n\\n  return string;\\n}\\n\\nvar normalizeDefault = function normalizeDefault(value) {\\n  return coerce(value);\\n};\\n\\nvar normalizeAttributes = function normalizeAttributes(elem) {\\n  var obj = {};\\n\\n  if (elem && elem.attributes && elem.attributes.length > 0) {\\n    var attrs = elem.attributes;\\n\\n    for (var i = attrs.length - 1; i >= 0; i--) {\\n      var attrName = attrs[i].name;\\n      var attrVal = attrs[i].value;\\n\\n      if (attrName.match(CLD_ATTR_REGEX)) {\\n        attrName = (0, _string.camelize)(attrName.replace(CLD_ATTR_REGEX, '$2'));\\n      } // check for known booleans\\n      // the matching element property will return a value for typeof\\n      // if (typeof elem[attrName] === 'boolean' || KNOWN_BOOLEANS[attrName]) {\\n\\n\\n      if (typeof elem[attrName] === 'boolean') {\\n        // the value of an included boolean attribute is typically an empty\\n        // string ('') which would equal false if we just check for a false value.\\n        // we also don't want support bad code like autoplay='false'\\n        attrVal = attrVal !== null;\\n      } else {\\n        var normalizer = normalizers[attrName] || normalizeDefault;\\n        attrVal = normalizer(attrVal);\\n      }\\n\\n      obj[attrName] = attrVal;\\n    }\\n  }\\n\\n  return obj;\\n};\\n\\nexports.normalizeAttributes = normalizeAttributes;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/attributes-normalizer.js?\");\n\n/***/ }),\n\n/***/ \"./utils/cloudinary.js\":\n/*!*****************************!*\\\n  !*** ./utils/cloudinary.js ***!\n  \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.getCloudinaryInstanceOf = getCloudinaryInstanceOf;\\nexports.filterAndAddTextTracks = exports.isKeyInTransformation = exports.handleCldError = void 0;\\n\\nvar _promisePolyfill = _interopRequireDefault(__webpack_require__(/*! promise-polyfill */ \\\"../node_modules/promise-polyfill/promise.js\\\"));\\n\\nvar _fetchBrowser = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill/build/fetch-browser */ \\\"../node_modules/fetch-ponyfill/build/fetch-browser.js\\\"));\\n\\nvar _common = __webpack_require__(/*! ../plugins/cloudinary/common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar _fetchPF = (0, _fetchBrowser.default)({\\n  Promise: _promisePolyfill.default\\n}),\\n    fetch = _fetchPF.fetch;\\n\\nvar GET_ERROR_DEFAULT_REQUEST = {\\n  method: 'head'\\n};\\nvar ERROR_WITH_GET_REQUEST = {\\n  method: 'get',\\n  credentials: 'include',\\n  headers: {\\n    'Content-Range': 'bytes=0-0'\\n  }\\n};\\n\\nvar handleCldError = function handleCldError(that, options) {\\n  var cloudName = that.cloudinaryConfig().config().cloud_name;\\n  var opts = options.fetchErrorUsingGet ? ERROR_WITH_GET_REQUEST : GET_ERROR_DEFAULT_REQUEST;\\n  var srcs = that.videojs.cloudinary.getCurrentSources();\\n\\n  if (srcs.length > 1) {\\n    _promisePolyfill.default.all(srcs.map(function (s) {\\n      return fetch(s.src, opts);\\n    })).then(function (res) {\\n      var filtered = [];\\n      res.forEach(function (r) {\\n        if (r.status >= 200 && r.status < 399 && r.url !== '') {\\n          var parsedUri = parseUri(r.url);\\n          filtered.push(parsedUri.host + parsedUri.path);\\n        }\\n      });\\n\\n      if (filtered.length === 0) {\\n        var errorMsg = res[0].headers.get('x-cld-error') || '';\\n        that.videojs.error((0, _common.cloudinaryErrorsConverter)({\\n          errorMsg: errorMsg,\\n          publicId: that.currentPublicId(),\\n          cloudName: cloudName,\\n          error: res[0],\\n          statusCode: res[0].status\\n        }));\\n      } else {\\n        var goodSrcs = srcs.filter(function (s) {\\n          var origUrl = parseUri(s.src);\\n          return filtered.indexOf(origUrl.host + origUrl.path) !== -1 && s.try !== true;\\n        });\\n\\n        if (goodSrcs && goodSrcs.length) {\\n          console.log('Trying urls: ' + JSON.stringify(goodSrcs));\\n          goodSrcs.forEach(function (s) {\\n            s.try = true;\\n          });\\n          that.videojs.autoplay(that.videojs.autoplay() || that.playWasCalled);\\n          that.videojs.src(goodSrcs);\\n        } else {\\n          console.log('No urls left to try so stopping');\\n          that.videojs.error({\\n            code: 6,\\n            message: 'No supported media sources'\\n          });\\n        }\\n      }\\n    }).catch(function (error) {\\n      return that.videojs.error({\\n        code: 7,\\n        message: error && error.message ? error.message : 'Failed to test sources'\\n      });\\n    });\\n  } else {\\n    that.videojs.error({\\n      code: 6,\\n      message: 'No supported media sources'\\n    });\\n  }\\n}; // for IE 11\\n\\n\\nexports.handleCldError = handleCldError;\\n\\nfunction parseUri(str) {\\n  var o = {\\n    strictMode: false,\\n    key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'],\\n    q: {\\n      name: 'queryKey',\\n      parser: /(?:^|&)([^&=]*)=?([^&]*)/g\\n    },\\n    parser: {\\n      strict: /^(?:([^:\\\\/?#]+):)?(?:\\\\/\\\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\\\/?#]*)(?::(\\\\d*))?))?((((?:[^?#\\\\/]*\\\\/)*)([^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)/,\\n      loose: /^(?:(?![^:@]+:[^:@\\\\/]*@)([^:\\\\/?#.]+):)?(?:\\\\/\\\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\\\/?#]*)(?::(\\\\d*))?)(((\\\\/(?:[^?#](?![^?#\\\\/]*\\\\.[^?#\\\\/.]+(?:[?#]|$)))*\\\\/?)?([^?#\\\\/]*))(?:\\\\?([^#]*))?(?:#(.*))?)/\\n    }\\n  };\\n  var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\\n  var uri = {};\\n  var i = 14;\\n\\n  while (i--) {\\n    uri[o.key[i]] = m[i] || '';\\n  }\\n\\n  uri[o.q.name] = {};\\n  uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\\n    if ($1) {\\n      uri[o.q.name][$1] = $2;\\n    }\\n  });\\n  return uri;\\n}\\n\\nfunction getCloudinaryInstanceOf(Klass, obj) {\\n  if (Array.isArray(obj)) {\\n    return obj.map(function (e) {\\n      return getCloudinaryInstanceOf(Klass, e);\\n    });\\n  }\\n\\n  if (obj instanceof Klass) {\\n    return obj;\\n  } else {\\n    return new Klass(obj);\\n  }\\n}\\n/**\\n * Check if key exist in transformation\\n * @param transformation\\n * @param key\\n * @returns true if key exists in transformation, false otherwise\\n */\\n\\n\\nvar isKeyInTransformation = function isKeyInTransformation(transformation, key) {\\n  if (!transformation || !key) {\\n    return false;\\n  } // transformation is an array so run this function for each item\\n\\n\\n  if (Array.isArray(transformation)) {\\n    return !!(0, _find.find)(transformation, function (t) {\\n      return isKeyInTransformation(t, key);\\n    });\\n  } // transformation is a Transformation object so use getValue() to check key\\n\\n\\n  if (transformation.getValue) {\\n    return !!transformation.getValue(key);\\n  } // transformation is an Object so just check for key existence in object\\n\\n\\n  return !!transformation[key];\\n};\\n\\nexports.isKeyInTransformation = isKeyInTransformation;\\n\\nvar filterAndAddTextTracks = function filterAndAddTextTracks(tracks, videojs) {\\n  tracks.forEach(function (track) {\\n    fetch(track.src, GET_ERROR_DEFAULT_REQUEST).then(function (r) {\\n      if (r.status >= 200 && r.status <= 399) {\\n        videojs.addRemoteTextTrack(track, true);\\n      }\\n    });\\n  });\\n};\\n\\nexports.filterAndAddTextTracks = filterAndAddTextTracks;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/cloudinary.js?\");\n\n/***/ }),\n\n/***/ \"./utils/css-prefix.js\":\n/*!*****************************!*\\\n  !*** ./utils/css-prefix.js ***!\n  \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.setSkinClassPrefix = exports.skinClass = exports.skinClassPrefix = exports.playerClassPrefix = exports.CLASS_PREFIX = void 0;\\n\\nvar _string = __webpack_require__(/*! ./string */ \\\"./utils/string.js\\\");\\n\\nvar _defaults = _interopRequireDefault(__webpack_require__(/*! ../config/defaults */ \\\"./config/defaults.js\\\"));\\n\\nvar _find = __webpack_require__(/*! ./find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar CLASS_PREFIX = 'cld-video-player';\\nexports.CLASS_PREFIX = CLASS_PREFIX;\\nvar SKIN_CLASS_PREFIX = \\\"\\\".concat(CLASS_PREFIX, \\\"-skin-\\\");\\n\\nvar playerClassPrefix = function playerClassPrefix(componentInstance) {\\n  return \\\"\\\".concat(CLASS_PREFIX, \\\"-\\\").concat(componentInstance.id_);\\n};\\n\\nexports.playerClassPrefix = playerClassPrefix;\\n\\nvar skinClass = function skinClass(skin) {\\n  return \\\"\\\".concat(SKIN_CLASS_PREFIX).concat(skin);\\n};\\n\\nexports.skinClass = skinClass;\\n\\nvar skinClassPrefix = function skinClassPrefix(componentInstance) {\\n  var currentSkin = (0, _find.find)(componentInstance.el().classList, function (cls) {\\n    return (0, _string.startsWith)(cls, SKIN_CLASS_PREFIX);\\n  });\\n  return currentSkin;\\n};\\n\\nexports.skinClassPrefix = skinClassPrefix;\\n\\nvar setSkinClassPrefix = function setSkinClassPrefix(componentInstance, name) {\\n  var currentSkinPrefix = skinClassPrefix(componentInstance);\\n  var skinName = name ? name.replace(SKIN_CLASS_PREFIX, '') : false;\\n  var newSkinPrefix = '';\\n\\n  if (skinName) {\\n    // From html class\\n    newSkinPrefix = skinClass(skinName);\\n  } else if (componentInstance.options_.skin) {\\n    // From JS config\\n    newSkinPrefix = skinClass(componentInstance.options_.skin);\\n  } else {\\n    // Defult\\n    newSkinPrefix = skinClass(_defaults.default.skin);\\n  }\\n\\n  if (newSkinPrefix !== currentSkinPrefix) {\\n    if (currentSkinPrefix) {\\n      componentInstance.removeClass(currentSkinPrefix);\\n    }\\n\\n    componentInstance.addClass(newSkinPrefix);\\n  }\\n\\n  if (skinName && componentInstance.options_.skin !== skinName) {\\n    componentInstance.options_.skin = skinName;\\n  }\\n};\\n\\nexports.setSkinClassPrefix = setSkinClassPrefix;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/css-prefix.js?\");\n\n/***/ }),\n\n/***/ \"./utils/dom.js\":\n/*!**********************!*\\\n  !*** ./utils/dom.js ***!\n  \\**********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.wrap = void 0;\\n\\nvar wrap = function wrap(el, wrapper) {\\n  el.parentNode.insertBefore(wrapper, el);\\n  wrapper.appendChild(el);\\n  return wrapper;\\n};\\n\\nexports.wrap = wrap;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/dom.js?\");\n\n/***/ }),\n\n/***/ \"./utils/find.js\":\n/*!***********************!*\\\n  !*** ./utils/find.js ***!\n  \\***********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.find = find;\\nexports.findIndex = findIndex;\\nexports.findElementAndIndex = findElementAndIndex;\\n\\nfunction find(list, callback) {\\n  if (Array.prototype.find && Array.isArray(list)) {\\n    return list.find(callback);\\n  }\\n\\n  return findElementAndIndex(list, callback)[0];\\n}\\n\\nfunction findIndex(list, callback) {\\n  if (Array.prototype.findIndex) {\\n    return list.findIndex(callback);\\n  }\\n\\n  return findElementAndIndex(list, callback)[1];\\n}\\n\\nfunction findElementAndIndex(list, callback) {\\n  for (var i = 0; i < list.length; i++) {\\n    var element = list[i];\\n\\n    if (callback(element, i, list)) {\\n      return [element, i];\\n    }\\n  }\\n\\n  return [undefined, -1];\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/find.js?\");\n\n/***/ }),\n\n/***/ \"./utils/fontFace.js\":\n/*!***************************!*\\\n  !*** ./utils/fontFace.js ***!\n  \\***************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.fontFace = void 0;\\n\\nvar _webfontloader = _interopRequireDefault(__webpack_require__(/*! webfontloader */ \\\"../node_modules/webfontloader/webfontloader.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar FONT_FAMILY = 'Fira Sans';\\n\\nvar fontFace = function fontFace(elem, options) {\\n  var fontFace = options.cloudinary.fontFace; // Default font-face is \\\"Fira sans\\\"\\n\\n  if (typeof fontFace === 'undefined') {\\n    fontFace = FONT_FAMILY;\\n  }\\n\\n  if (fontFace && fontFace !== 'inherit') {\\n    _webfontloader.default.load({\\n      google: {\\n        families: [fontFace]\\n      }\\n    });\\n\\n    elem.style.fontFamily = fontFace;\\n  } else if (fontFace === 'inherit') {\\n    elem.style.fontFamily = 'inherit';\\n  }\\n};\\n\\nexports.fontFace = fontFace;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/fontFace.js?\");\n\n/***/ }),\n\n/***/ \"./utils/groupBy.js\":\n/*!**************************!*\\\n  !*** ./utils/groupBy.js ***!\n  \\**************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.groupBy = void 0;\\n\\nvar groupBy = function groupBy(collection, iteratee) {\\n  return collection.reduce(function (result, value, key) {\\n    key = iteratee(value);\\n\\n    if (Object.prototype.hasOwnProperty.call(result, key)) {\\n      result[key].push(value);\\n    } else {\\n      result[key] = [value];\\n    }\\n\\n    return result;\\n  }, {});\\n};\\n\\nexports.groupBy = groupBy;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/groupBy.js?\");\n\n/***/ }),\n\n/***/ \"./utils/index.js\":\n/*!************************!*\\\n  !*** ./utils/index.js ***!\n  \\************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar assign = _interopRequireWildcard(__webpack_require__(/*! ./assign */ \\\"./utils/assign.js\\\"));\\n\\nvar slicing = _interopRequireWildcard(__webpack_require__(/*! ./slicing */ \\\"./utils/slicing.js\\\"));\\n\\nvar positioning = _interopRequireWildcard(__webpack_require__(/*! ./positioning */ \\\"./utils/positioning.js\\\"));\\n\\nvar string = _interopRequireWildcard(__webpack_require__(/*! ./string */ \\\"./utils/string.js\\\"));\\n\\nvar cloudinaryUtils = _interopRequireWildcard(__webpack_require__(/*! ./cloudinary */ \\\"./utils/cloudinary.js\\\"));\\n\\nvar applyWithProps = _interopRequireWildcard(__webpack_require__(/*! ./apply-with-props */ \\\"./utils/apply-with-props.js\\\"));\\n\\nvar groupBy = _interopRequireWildcard(__webpack_require__(/*! ./groupBy */ \\\"./utils/groupBy.js\\\"));\\n\\nvar mixin = _interopRequireWildcard(__webpack_require__(/*! ./mixin */ \\\"./utils/mixin.js\\\"));\\n\\nvar fontFace = _interopRequireWildcard(__webpack_require__(/*! ./fontFace */ \\\"./utils/fontFace.js\\\"));\\n\\nvar playButton = _interopRequireWildcard(__webpack_require__(/*! ./playButton */ \\\"./utils/playButton.js\\\"));\\n\\nvar cssPrefix = _interopRequireWildcard(__webpack_require__(/*! ./css-prefix */ \\\"./utils/css-prefix.js\\\"));\\n\\nvar normalizeAttributes = _interopRequireWildcard(__webpack_require__(/*! ./attributes-normalizer */ \\\"./utils/attributes-normalizer.js\\\"));\\n\\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \\\"function\\\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\\n\\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \\\"object\\\" && typeof obj !== \\\"function\\\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\\n\\nvar Utils = assign.assign({}, assign, slicing, positioning, string, cloudinaryUtils, fontFace, playButton, groupBy, applyWithProps, mixin, cssPrefix, normalizeAttributes);\\nvar _default = Utils;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/index.js?\");\n\n/***/ }),\n\n/***/ \"./utils/matches.js\":\n/*!**************************!*\\\n  !*** ./utils/matches.js ***!\n  \\**************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.elMatches = void 0;\\n\\n// Test for matches()/\\nvar elMatches = function elMatches(el, selector) {\\n  var p = Element.prototype;\\n\\n  var f = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || function (s) {\\n    return [].indexOf.call(document.querySelectorAll(s), this) !== -1;\\n  };\\n\\n  return f.call(el, selector);\\n};\\n\\nexports.elMatches = elMatches;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/matches.js?\");\n\n/***/ }),\n\n/***/ \"./utils/mixin.js\":\n/*!************************!*\\\n  !*** ./utils/mixin.js ***!\n  \\************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.mixin = mixin;\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction mixin() {\\n  for (var _len = arguments.length, mixins = new Array(_len), _key = 0; _key < _len; _key++) {\\n    mixins[_key] = arguments[_key];\\n  }\\n\\n  return mixins.reduce(function (c, mixin) {\\n    return mixin(c);\\n  }, function Blank() {\\n    _classCallCheck(this, Blank);\\n  });\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/mixin.js?\");\n\n/***/ }),\n\n/***/ \"./utils/playButton.js\":\n/*!*****************************!*\\\n  !*** ./utils/playButton.js ***!\n  \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.playButton = void 0;\\n\\nvar playButton = function playButton(elem, options) {\\n  if (options.bigPlayButton === 'init') {\\n    elem.classList.add('vjs-big-play-button-init-only');\\n    options.bigPlayButton = true;\\n  }\\n};\\n\\nexports.playButton = playButton;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/playButton.js?\");\n\n/***/ }),\n\n/***/ \"./utils/positioning.js\":\n/*!******************************!*\\\n  !*** ./utils/positioning.js ***!\n  \\******************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.getElementPosition = getElementPosition;\\nexports.getPointerPosition = getPointerPosition;\\nexports.isElementInViewport = isElementInViewport;\\nexports.setPosition = setPosition;\\n\\nfunction getElementPosition(el) {\\n  var box = el.getBoundingClientRect();\\n  var body = document.body;\\n  var docEl = document.documentElement;\\n  var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\\n  var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\\n  var clientTop = docEl.clientTop || body.clientTop || 0;\\n  var clientLeft = docEl.clientLeft || body.clientLeft || 0;\\n  var top = box.top + scrollTop - clientTop;\\n  var left = box.left + scrollLeft - clientLeft;\\n  return {\\n    top: Math.round(top),\\n    left: Math.round(left)\\n  };\\n}\\n/**\\n * Get pointer position in element\\n * Returns an object with x and y coordinates.\\n * The base on the coordinates are the bottom left of the element.\\n *\\n * @function getPointerPosition\\n * @param {Element} el Element on which to get the pointer position on\\n * @param {Event} event Event object\\n * @return {Object}\\n *         This object will have x and y coordinates corresponding to the\\n *         mouse position\\n */\\n\\n\\nfunction getPointerPosition(el, event) {\\n  var position = {};\\n  var box = getElementPosition(el);\\n  var boxW = el.offsetWidth;\\n  var boxH = el.offsetHeight;\\n  var boxY = box.top;\\n  var boxX = box.left;\\n  var pageY = event.pageY;\\n  var pageX = event.pageX;\\n\\n  if (event.changedTouches) {\\n    pageX = event.changedTouches[0].pageX;\\n    pageY = event.changedTouches[0].pageY;\\n  }\\n\\n  position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));\\n  position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\\n  return position;\\n}\\n\\nfunction isElementInViewport(el, _ref) {\\n  var fraction = _ref.fraction;\\n  var topLeft = getElementPosition(el);\\n  var x = topLeft.left;\\n  var y = topLeft.top;\\n  var h = el.offsetHeight;\\n  var w = el.offsetWidth;\\n  var r = x + w;\\n  var b = y + h;\\n  var visibleX = Math.max(0, Math.min(w, window.pageXOffset + window.innerWidth - x, r - window.pageXOffset));\\n  var visibleY = Math.max(0, Math.min(w, window.pageYOffset + window.innerHeight - y, b - window.pageYOffset));\\n  var visible = visibleX * visibleY / (w * h);\\n  return visible > fraction;\\n}\\n\\nfunction setPosition(el, left, top) {\\n  el.style.left = \\\"\\\".concat(left, \\\"px\\\");\\n  el.style.top = \\\"\\\".concat(top, \\\"px\\\");\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/positioning.js?\");\n\n/***/ }),\n\n/***/ \"./utils/querystring.js\":\n/*!******************************!*\\\n  !*** ./utils/querystring.js ***!\n  \\******************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.objectToQuerystring = void 0;\\n\\nvar objectToQuerystring = function objectToQuerystring(obj) {\\n  var keys = Object.keys(obj);\\n\\n  if (!keys.length) {\\n    return '';\\n  }\\n\\n  var query = keys.map(function (key) {\\n    return \\\"\\\".concat(key, \\\"=\\\").concat(obj[key]);\\n  }).join('&');\\n  return \\\"?\\\".concat(query);\\n};\\n\\nexports.objectToQuerystring = objectToQuerystring;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/querystring.js?\");\n\n/***/ }),\n\n/***/ \"./utils/slicing.js\":\n/*!**************************!*\\\n  !*** ./utils/slicing.js ***!\n  \\**************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.sliceProperties = sliceProperties;\\nexports.sliceAndUnsetProperties = sliceAndUnsetProperties;\\n\\nfunction _sliceProperties(obj, isUnset) {\\n  for (var _len = arguments.length, props = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\\n    props[_key - 2] = arguments[_key];\\n  }\\n\\n  return props.reduce(function (acc, prop) {\\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) {\\n      acc[prop] = obj[prop];\\n\\n      if (isUnset) {\\n        delete obj[prop];\\n      }\\n    }\\n\\n    return acc;\\n  }, {});\\n}\\n\\nfunction sliceProperties(obj) {\\n  for (var _len2 = arguments.length, props = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n    props[_key2 - 1] = arguments[_key2];\\n  }\\n\\n  return _sliceProperties.apply(void 0, [obj, false].concat(props));\\n}\\n\\nfunction sliceAndUnsetProperties(obj) {\\n  for (var _len3 = arguments.length, props = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\\n    props[_key3 - 1] = arguments[_key3];\\n  }\\n\\n  return _sliceProperties.apply(void 0, [obj, true].concat(props));\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/slicing.js?\");\n\n/***/ }),\n\n/***/ \"./utils/string.js\":\n/*!*************************!*\\\n  !*** ./utils/string.js ***!\n  \\*************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.camelize = camelize;\\nexports.startsWith = startsWith;\\n\\nfunction camelize(str) {\\n  return str.replace(/[_.-](\\\\w|$)/g, function (_, x) {\\n    return x.toUpperCase();\\n  });\\n}\\n\\nfunction startsWith(str, searchStr, position) {\\n  if (String.prototype.startsWith) {\\n    return str.startsWith(searchStr, position);\\n  } else {\\n    var _position = _position || 0;\\n\\n    return str.indexOf(searchStr, _position) === _position;\\n  }\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/string.js?\");\n\n/***/ }),\n\n/***/ \"./utils/throttle.js\":\n/*!***************************!*\\\n  !*** ./utils/throttle.js ***!\n  \\***************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.throttle = throttle;\\n\\n/**\\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\\n * at most once per every `wait` milliseconds.\\n *\\n * @function\\n * @param    {Function} fn\\n *           The function to be throttled.\\n *\\n * @param    {number}   wait\\n *           The number of milliseconds by which to throttle.\\n *\\n * @return   {Function}\\n */\\nfunction throttle(fn, wait) {\\n  var last = window.performance.now();\\n\\n  var throttled = function throttled() {\\n    var now = window.performance.now();\\n\\n    if (now - last >= wait) {\\n      fn.apply(void 0, arguments);\\n      last = now;\\n    }\\n  };\\n\\n  return throttled;\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/throttle.js?\");\n\n/***/ }),\n\n/***/ \"./utils/time.js\":\n/*!***********************!*\\\n  !*** ./utils/time.js ***!\n  \\***********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.parseTime = exports.parseISO8601 = void 0;\\n\\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\\n\\nfunction _nonIterableRest() { throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \\\"undefined\\\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\\\"return\\\"] != null) _i[\\\"return\\\"](); } finally { if (_d) throw _e; } } return _arr; }\\n\\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\\n\\n// https://github.com/csnover/js-iso8601/blob/master/iso8601.js\\nvar numericKeys = [1, 4, 5, 6, 7, 10, 11];\\n\\nvar parseISO8601 = function parseISO8601(date) {\\n  var timestamp = 0;\\n  var struct = 0;\\n  var minutesOffset = 0; // ES5 §15.9.4.2 states that the string should attempt to be parsed as a Date Time String Format string\\n  // before falling back to any implementation-specific date parsing, so that’s what we do, even if native\\n  // implementations could be faster\\n  //              1 YYYY                2 MM       3 DD           4 HH    5 mm       6 ss        7 msec        8 Z 9 ±    10 tzHH    11 tzmm\\n\\n  if (struct = /^(\\\\d{4}|[+\\\\-]\\\\d{6})(?:-(\\\\d{2})(?:-(\\\\d{2}))?)?(?:T(\\\\d{2}):(\\\\d{2})(?::(\\\\d{2})(?:\\\\.(\\\\d{3}))?)?(?:(Z)|([+\\\\-])(\\\\d{2})(?::(\\\\d{2}))?)?)?$/.exec(date)) {\\n    // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\\n    for (var i = 0, k; k = numericKeys[i]; ++i) {\\n      struct[k] = +struct[k] || 0;\\n    } // allow undefined days and months\\n\\n\\n    struct[2] = (+struct[2] || 1) - 1;\\n    struct[3] = +struct[3] || 1;\\n\\n    if (struct[8] !== 'Z' && struct[9] !== undefined) {\\n      minutesOffset = struct[10] * 60 + struct[11];\\n\\n      if (struct[9] === '+') {\\n        minutesOffset = 0 - minutesOffset;\\n      }\\n    }\\n\\n    timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\\n  } else {\\n    timestamp = NaN;\\n  }\\n\\n  return timestamp;\\n}; // Convert time string i.e. '2:40' to seconds number (160)\\n// Also allows h:m:s format and mm:ss, m:s etc.\\n\\n\\nexports.parseISO8601 = parseISO8601;\\n\\nvar parseTime = function parseTime(hms) {\\n  var _hms$split$reverse = hms.split(':').reverse(),\\n      _hms$split$reverse2 = _slicedToArray(_hms$split$reverse, 3),\\n      seconds = _hms$split$reverse2[0],\\n      minutes = _hms$split$reverse2[1],\\n      hours = _hms$split$reverse2[2];\\n\\n  var sum = null;\\n\\n  if (!isNaN(seconds)) {\\n    sum = (+hours || 0) * 60 * 60 + (+minutes || 0) * 60 + +seconds;\\n  }\\n\\n  return sum;\\n};\\n\\nexports.parseTime = parseTime;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/time.js?\");\n\n/***/ }),\n\n/***/ \"./utils/type-inference.js\":\n/*!*********************************!*\\\n  !*** ./utils/type-inference.js ***!\n  \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.isPlainObject = isPlainObject;\\nexports.isString = isString;\\nexports.isInteger = isInteger;\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction isPlainObject(obj) {\\n  return obj !== null && _typeof(obj) === 'object' && Object.prototype.toString.call(obj) === '[object Object]';\\n}\\n\\nfunction isString(obj) {\\n  return obj instanceof String || typeof obj === 'string';\\n}\\n\\nfunction isInteger(data) {\\n  return typeof data === 'number' && data % 1 === 0;\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/type-inference.js?\");\n\n/***/ }),\n\n/***/ \"./video-player.js\":\n/*!*************************!*\\\n  !*** ./video-player.js ***!\n  \\*************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _isObj = _interopRequireDefault(__webpack_require__(/*! is-obj */ \\\"../node_modules/is-obj/index.js\\\"));\\n\\n__webpack_require__(/*! ./components */ \\\"./components/index.js\\\");\\n\\nvar _plugins = _interopRequireDefault(__webpack_require__(/*! plugins */ \\\"./plugins/index.js\\\"));\\n\\nvar _utils = _interopRequireDefault(__webpack_require__(/*! utils */ \\\"./utils/index.js\\\"));\\n\\nvar _defaults = _interopRequireDefault(__webpack_require__(/*! config/defaults */ \\\"./config/defaults.js\\\"));\\n\\nvar _eventable = _interopRequireDefault(__webpack_require__(/*! mixins/eventable */ \\\"./mixins/eventable.js\\\"));\\n\\nvar _extendedEvents = _interopRequireDefault(__webpack_require__(/*! extended-events */ \\\"./extended-events.js\\\"));\\n\\nvar _playlistWidget2 = _interopRequireDefault(__webpack_require__(/*! ./components/playlist/playlist-widget */ \\\"./components/playlist/playlist-widget.js\\\"));\\n\\nvar _qualitySelector = _interopRequireDefault(__webpack_require__(/*! ./components/qualitySelector/qualitySelector.js */ \\\"./components/qualitySelector/qualitySelector.js\\\"));\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! ./plugins/cloudinary/models/video-source */ \\\"./plugins/cloudinary/models/video-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\\n\\nfunction _nonIterableSpread() { throw new TypeError(\\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _iterableToArray(iter) { if (typeof Symbol !== \\\"undefined\\\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\\n\\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nvar CLOUDINARY_PARAMS = ['cloudinaryConfig', 'transformation', 'sourceTypes', 'sourceTransformation', 'posterOptions', 'autoShowRecommendations', 'fontFace', 'secure'];\\nvar PLAYER_PARAMS = CLOUDINARY_PARAMS.concat(['publicId', 'source', 'autoplayMode', 'playedEventPercents', 'playedEventTimes', 'analytics', 'fluid', 'ima', 'playlistWidget', 'hideContextMenu', 'colors', 'floatingWhenNotVisible', 'ads', 'showJumpControls', 'textTracks', 'qualitySelector', 'fetchErrorUsingGet', 'seekThumbnails']);\\nvar DEFAULT_HLS_OPTIONS = {\\n  html5: {\\n    handlePartialData: false,\\n    hls: {\\n      overrideNative: _video.default && _video.default.browser ? !_video.default.browser.IS_IOS && !_video.default.browser.IS_SAFARI : true\\n    }\\n  }\\n}; // Register all plugins\\n\\nObject.keys(_plugins.default).forEach(function (key) {\\n  _video.default.registerPlugin(key, _plugins.default[key]);\\n});\\n\\nvar normalizeAutoplay = function normalizeAutoplay(options) {\\n  var autoplayMode = options.autoplayMode;\\n\\n  if (autoplayMode) {\\n    switch (autoplayMode) {\\n      case 'always':\\n        options.autoplay = true;\\n        break;\\n\\n      case 'on-scroll':\\n      case 'never':\\n      default:\\n        options.autoplay = false;\\n    }\\n  }\\n};\\n\\nvar resolveVideoElement = function resolveVideoElement(elem) {\\n  if (typeof elem === 'string') {\\n    var id = elem; // Adjust for jQuery ID syntax\\n\\n    if (id.indexOf('#') === 0) {\\n      id = id.slice(1);\\n    }\\n\\n    try {\\n      elem = document.querySelector(\\\"#\\\".concat(id)) || _video.default.getPlayer(id);\\n    } catch (e) {\\n      elem = null;\\n    }\\n\\n    if (!elem) {\\n      throw new Error(\\\"Could not find element with id \\\".concat(id));\\n    }\\n  }\\n\\n  if (!elem.tagName) {\\n    throw new Error('Must specify either an element or an element id.');\\n  } else if (elem.tagName !== 'VIDEO') {\\n    throw new Error('Element is not a video tag.');\\n  }\\n\\n  return elem;\\n};\\n\\nvar extractOptions = function extractOptions(elem, options) {\\n  var elemOptions = _utils.default.normalizeAttributes(elem);\\n\\n  if (_video.default.dom.hasClass(elem, 'cld-fluid') || _video.default.dom.hasClass(elem, 'vjs-fluid')) {\\n    options.fluid = true;\\n  } // Default HLS options < Default options < Markup options < Player options\\n\\n\\n  options = _utils.default.assign({}, DEFAULT_HLS_OPTIONS, _defaults.default, elemOptions, options); // In case of 'autoplay on scroll', we need to make sure normal HTML5 autoplay is off\\n\\n  normalizeAutoplay(options); // VideoPlayer specific options\\n\\n  var playerOptions = _utils.default.sliceAndUnsetProperties.apply(_utils.default, [options].concat(_toConsumableArray(PLAYER_PARAMS))); // Cloudinary plugin specific options\\n\\n\\n  playerOptions.cloudinary = _utils.default.sliceAndUnsetProperties.apply(_utils.default, [playerOptions].concat(CLOUDINARY_PARAMS)); // Allow explicitly passing options to videojs using the `videojs` namespace, in order\\n  // to avoid param name conflicts:\\n  // VideoPlayer.new({ controls: true, videojs: { controls: false })\\n\\n  if (options.videojs) {\\n    _utils.default.assign(options, options.videojs);\\n\\n    delete options.videojs;\\n  }\\n\\n  return {\\n    playerOptions: playerOptions,\\n    videojsOptions: options\\n  };\\n};\\n\\nvar overrideDefaultVideojsComponents = function overrideDefaultVideojsComponents() {\\n  var Player = _video.default.getComponent('Player');\\n\\n  var children = Player.prototype.options_.children; // Add TitleBar as default\\n\\n  children.push('titleBar');\\n  children.push('upcomingVideoOverlay');\\n  children.push('recommendationsOverlay');\\n\\n  var ControlBar = _video.default.getComponent('ControlBar');\\n\\n  if (ControlBar) {\\n    children = ControlBar.prototype.options_.children; // Add space instead of the progress control (which we deattached from the controlBar, and absolutely positioned it above it)\\n    // Also add a blank div underneath the progress control to stop bubbling up pointer events.\\n\\n    children.splice(children.indexOf('progressControl'), 0, 'spacer', 'progressControlEventsBlocker'); // Add 'play-previous' and 'play-next' buttons around the 'play-toggle'\\n\\n    children.splice(children.indexOf('playToggle'), 1, 'playlistPreviousButton', 'JumpBackButton', 'playToggle', 'JumpForwardButton', 'playlistNextButton'); // Position the 'logo-button' button right next to 'fullscreenToggle'\\n\\n    children.splice(children.indexOf('fullscreenToggle'), 1, 'logoButton', 'fullscreenToggle');\\n  }\\n};\\n\\noverrideDefaultVideojsComponents();\\nvar _allowUsageReport = true;\\n\\nvar VideoPlayer = /*#__PURE__*/function (_Utils$mixin) {\\n  _inherits(VideoPlayer, _Utils$mixin);\\n\\n  var _super = _createSuper(VideoPlayer);\\n\\n  function VideoPlayer(elem, options, ready) {\\n    var _this;\\n\\n    _classCallCheck(this, VideoPlayer);\\n\\n    _this = _super.call(this);\\n    elem = resolveVideoElement(elem);\\n    options = extractOptions(elem, options);\\n\\n    var onReady = function onReady() {\\n      setExtendedEvents(); // Load first video (mainly to support video tag 'source' and 'public-id' attributes)\\n\\n      var source = _options.source || _options.publicId;\\n\\n      if (source) {\\n        _this.source(source, _options);\\n      }\\n    };\\n\\n    var setExtendedEvents = function setExtendedEvents() {\\n      var events = [];\\n\\n      if (_options.playedEventPercents) {\\n        var percentsplayed = {\\n          type: 'percentsplayed',\\n          percents: _options.playedEventPercents\\n        };\\n        events.push(percentsplayed);\\n      }\\n\\n      if (_options.playedEventTimes) {\\n        var timeplayed = {\\n          type: 'timeplayed',\\n          times: _options.playedEventTimes\\n        };\\n        events.push(timeplayed);\\n      }\\n\\n      events.push.apply(events, ['seek', 'mute', 'unmute', 'qualitychanged']);\\n      var extendedEvents = new _extendedEvents.default(_this.videojs, {\\n        events: events\\n      });\\n      var normalizedEvents = extendedEvents.events;\\n      Object.keys(normalizedEvents).forEach(function (_event) {\\n        var handler = function handler(event, data) {\\n          _this.videojs.trigger({\\n            type: _event,\\n            eventData: data\\n          });\\n        };\\n\\n        extendedEvents.on(_event, handler);\\n      });\\n    };\\n\\n    var setCssClasses = function setCssClasses() {\\n      _this.videojs.addClass(_utils.default.CLASS_PREFIX);\\n\\n      _this.videojs.addClass(_utils.default.playerClassPrefix(_this.videojs));\\n\\n      _utils.default.setSkinClassPrefix(_this.videojs, _utils.default.skinClassPrefix(_this.videojs));\\n\\n      if (_video.default.browser.IE_VERSION === 11) {\\n        _this.videojs.addClass('cld-ie11');\\n      }\\n    };\\n\\n    var initPlugins = function initPlugins(loaded) {\\n      // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n      _this.adsEnabled = initIma(loaded); // #endif\\n\\n      initAutoplay();\\n      initContextMenu();\\n      initPerSrcBehaviors();\\n      initCloudinary();\\n      initAnalytics();\\n      initFloatingPlayer();\\n      initColors();\\n      initTextTracks();\\n      initSeekThumbs();\\n    };\\n\\n    var initIma = function initIma(loaded) {\\n      if (!loaded.contribAdsLoaded || !loaded.imaAdsLoaded) {\\n        if (_options.ads) {\\n          if (!loaded.contribAdsLoaded) {\\n            console.log('contribAds is not loaded');\\n          }\\n\\n          if (!loaded.imaAdsLoaded) {\\n            console.log('imaSdk is not loaded');\\n          }\\n        }\\n\\n        return false;\\n      }\\n\\n      if (!_options.ads) {\\n        _options.ads = {};\\n      }\\n\\n      var opts = _options.ads;\\n\\n      if (Object.keys(opts).length === 0) {\\n        return false;\\n      }\\n\\n      var adTagUrl = opts.adTagUrl,\\n          prerollTimeout = opts.prerollTimeout,\\n          postrollTimeout = opts.postrollTimeout,\\n          showCountdown = opts.showCountdown,\\n          adLabel = opts.adLabel,\\n          autoPlayAdBreaks = opts.autoPlayAdBreaks,\\n          locale = opts.locale;\\n\\n      _this.videojs.ima({\\n        id: _this.el().id,\\n        adTagUrl: adTagUrl,\\n        disableFlashAds: true,\\n        prerollTimeout: prerollTimeout || 5000,\\n        postrollTimeout: postrollTimeout || 5000,\\n        showCountdown: showCountdown !== false,\\n        adLabel: adLabel || 'Advertisement',\\n        locale: locale || 'en',\\n        autoPlayAdBreaks: autoPlayAdBreaks !== false,\\n        debug: true\\n      });\\n\\n      return true;\\n    };\\n\\n    var initAutoplay = function initAutoplay() {\\n      var autoplayMode = _options.autoplayMode;\\n\\n      if (autoplayMode === 'on-scroll') {\\n        _this.videojs.autoplayOnScroll();\\n      }\\n    };\\n\\n    var initContextMenu = function initContextMenu() {\\n      if (!options.playerOptions.hideContextMenu) {\\n        _this.videojs.contextMenu(_defaults.default.contextMenu);\\n      }\\n    };\\n\\n    var initFloatingPlayer = function initFloatingPlayer() {\\n      if (options.playerOptions.floatingWhenNotVisible) {\\n        _this.videojs.floatingPlayer({\\n          'floatTo': options.playerOptions.floatingWhenNotVisible\\n        });\\n      }\\n    };\\n\\n    var initColors = function initColors() {\\n      _this.videojs.colors(options.playerOptions.colors ? {\\n        'colors': options.playerOptions.colors\\n      } : {});\\n    };\\n\\n    var initPerSrcBehaviors = function initPerSrcBehaviors() {\\n      if (_this.videojs.perSourceBehaviors) {\\n        _this.videojs.perSourceBehaviors();\\n      }\\n    };\\n\\n    var initCloudinary = function initCloudinary() {\\n      var opts = _options.cloudinary;\\n      opts.chainTarget = _assertThisInitialized(_this);\\n\\n      if (opts.secure !== false) {\\n        _options.cloudinary.cloudinaryConfig.config('secure', true);\\n      }\\n\\n      _this.videojs.cloudinary(_options.cloudinary);\\n    };\\n\\n    var initAnalytics = function initAnalytics() {\\n      var analyticsOpts = _options.analytics;\\n\\n      if (analyticsOpts) {\\n        var opts = _typeof(analyticsOpts) === 'object' ? analyticsOpts : {};\\n\\n        _this.videojs.analytics(opts);\\n      }\\n    };\\n\\n    var _playlistWidget = null;\\n\\n    var initPlaylistWidget = function initPlaylistWidget() {\\n      _this.videojs.on('playlistcreated', function () {\\n        if (_playlistWidget) {\\n          _playlistWidget.dispose();\\n        }\\n\\n        var plwOptions = _options.playlistWidget;\\n\\n        if ((0, _isObj.default)(plwOptions)) {\\n          if (_options.fluid) {\\n            plwOptions.fluid = true;\\n          }\\n\\n          if (_options.cloudinary.fontFace) {\\n            plwOptions.fontFace = _options.cloudinary.fontFace;\\n          }\\n\\n          _playlistWidget = new _playlistWidget2.default(_this.videojs, plwOptions);\\n        }\\n      });\\n    };\\n\\n    var initJumpButtons = function initJumpButtons() {\\n      if (!_options.showJumpControls && _this.videojs.controlBar) {\\n        _this.videojs.controlBar.removeChild('JumpForwardButton');\\n\\n        _this.videojs.controlBar.removeChild('JumpBackButton');\\n      }\\n    }; // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n\\n\\n    _this.initQualitySelector = function () {\\n      if (_options.qualitySelector !== false) {\\n        if (_video.default.browser.IE_VERSION === null) {\\n          _this.videojs.httpSourceSelector({\\n            default: 'auto'\\n          });\\n        }\\n\\n        _this.videojs.on('loadedmetadata', function () {\\n          _qualitySelector.default.init(_this.videojs);\\n        }); // Show only if more then one option available\\n\\n\\n        _this.videojs.on('loadeddata', function () {\\n          _qualitySelector.default.setVisibility(_this.videojs);\\n        });\\n      }\\n    }; // #endif\\n\\n\\n    var initTextTracks = function initTextTracks() {\\n      _this.videojs.on('refreshTextTracks', function (e, tracks) {\\n        _this.setTextTracks(tracks);\\n      });\\n    };\\n\\n    _this.setTextTracks = function (conf) {\\n      // remove current text tracks\\n      var currentTracks = _this.videojs.remoteTextTracks();\\n\\n      if (currentTracks) {\\n        for (var i = currentTracks.tracks_.length - 1; i >= 0; i--) {\\n          _this.videojs.removeRemoteTextTrack(currentTracks.tracks_[i]);\\n        }\\n      }\\n\\n      if (conf) {\\n        var tracks = Object.keys(conf);\\n        var allTracks = [];\\n\\n        for (var _i = 0, _tracks = tracks; _i < _tracks.length; _i++) {\\n          var track = _tracks[_i];\\n\\n          if (Array.isArray(conf[track])) {\\n            var trks = conf[track];\\n\\n            for (var _i2 = 0; _i2 < trks.length; _i2++) {\\n              var cnf = trks[_i2];\\n              allTracks.push(buildTextTrackObj(track, cnf));\\n            }\\n          } else {\\n            allTracks.push(buildTextTrackObj(track, conf[track]));\\n          }\\n        }\\n\\n        _utils.default.filterAndAddTextTracks(allTracks, _this.videojs);\\n      }\\n    };\\n\\n    var initSeekThumbs = function initSeekThumbs() {\\n      if (_options.seekThumbnails) {\\n        _this.videojs.on('cldsourcechanged', function (e, _ref) {\\n          var source = _ref.source;\\n\\n          if ( // Bail if...\\n          source.getType() === 'AudioSource' || // it's an audio player\\n          _this.videojs && _this.videojs.activePlugins_ && _this.videojs.activePlugins_.vr // It's a VR (i.e. 360) video\\n          ) {\\n              return;\\n            }\\n\\n          var cloudinaryConfig = source.cloudinaryConfig();\\n          var publicId = source.publicId();\\n          var transformations = source.transformation().toOptions();\\n\\n          if (transformations && transformations.streaming_profile) {\\n            delete transformations.streaming_profile;\\n          }\\n\\n          transformations.flags = transformations.flags || [];\\n          transformations.flags.push('sprite'); // build VTT url\\n\\n          var vttSrc = cloudinaryConfig.video_url(publicId + '.vtt', {\\n            transformation: transformations\\n          }); // vttThumbnails must be called differently on init and on source update.\\n\\n          if (typeof _this.videojs.vttThumbnails === 'function') {\\n            _this.videojs.vttThumbnails({\\n              src: vttSrc\\n            });\\n          } else {\\n            _this.videojs.vttThumbnails.src(vttSrc);\\n          }\\n        });\\n      }\\n    };\\n\\n    var buildTextTrackObj = function buildTextTrackObj(type, conf) {\\n      return {\\n        kind: type,\\n        label: conf.label,\\n        srclang: conf.language,\\n        default: !!conf.default,\\n        src: conf.url\\n      };\\n    };\\n\\n    var _options = options.playerOptions;\\n    var _vjs_options = options.videojsOptions; // Make sure to add 'video-js' class before creating videojs instance\\n\\n    elem.classList.add('video-js'); // Handle WebFont loading\\n\\n    _utils.default.fontFace(elem, _options); // Handle play button options\\n\\n\\n    _utils.default.playButton(elem, _vjs_options); // Dash plugin - available in full (not light) build only\\n\\n\\n    if (_plugins.default.dashPlugin) {\\n      _plugins.default.dashPlugin();\\n    }\\n\\n    _this.videojs = (0, _video.default)(elem, _vjs_options);\\n\\n    if (_vjs_options.muted) {\\n      _this.videojs.volume(0.4);\\n    }\\n\\n    if (_options.fluid) {\\n      _this.fluid(_options.fluid);\\n    }\\n    /* global google */\\n\\n\\n    var loaded = {\\n      contribAdsLoaded: typeof _this.videojs.ads === 'function',\\n      imaAdsLoaded: (typeof google === \\\"undefined\\\" ? \\\"undefined\\\" : _typeof(google)) === 'object' && _typeof(google.ima) === 'object'\\n    };\\n    setCssClasses();\\n    initPlugins(loaded);\\n    initPlaylistWidget();\\n    initJumpButtons();\\n\\n    _this.videojs.on('error', function () {\\n      var error = _this.videojs.error();\\n\\n      if (error) {\\n        var type = _this.videojs.cloudinary.currentSourceType();\\n\\n        if (error.code === 4 && (type === 'VideoSource' || type === 'AudioSource')) {\\n          _this.videojs.error(null);\\n\\n          _utils.default.handleCldError(_assertThisInitialized(_this), _options);\\n        } else {\\n          _this.videojs.clearTimeout(_this.reTryId);\\n        }\\n      }\\n    });\\n\\n    _this.videojs.ready(function () {\\n      onReady();\\n\\n      if (ready) {\\n        ready(_assertThisInitialized(_this));\\n      }\\n    });\\n\\n    if (_this.adsEnabled) {\\n      if (Object.keys(options.playerOptions.ads).length > 0 && _typeof(_this.videojs.ima) === 'object') {\\n        if (options.playerOptions.ads.adsInPlaylist === 'first-video') {\\n          _this.videojs.one('sourcechanged', function () {\\n            _this.videojs.ima.playAd();\\n          });\\n        } else {\\n          _this.videojs.on('sourcechanged', function () {\\n            _this.videojs.ima.playAd();\\n          });\\n        }\\n      }\\n    }\\n\\n    _this.nbCalls = 0;\\n\\n    _this.reTryVideo = function (maxNumberOfCalls, timeout) {\\n      if (!_this.isVideoReady()) {\\n        if (_this.nbCalls < maxNumberOfCalls) {\\n          _this.nbCalls++;\\n          _this.reTryId = _this.videojs.setTimeout(_this.reTryVideo, timeout);\\n        } else {\\n          var e = new Error('Video is not ready please try later');\\n\\n          _this.videojs.trigger('error', e);\\n        }\\n      }\\n    };\\n\\n    _this.isVideoReady = function () {\\n      var s = _this.videojs.readyState();\\n\\n      if (s >= (/iPad|iPhone|iPod/.test(navigator.userAgent) ? 1 : 4)) {\\n        _this.nbCalls = 0;\\n        return true;\\n      }\\n\\n      return false;\\n    };\\n\\n    _this.playlistWidget = function (options) {\\n      if (!options && !_playlistWidget) {\\n        return false;\\n      }\\n\\n      if (!options && _playlistWidget) {\\n        return _playlistWidget;\\n      }\\n\\n      if ((0, _isObj.default)(options)) {\\n        _playlistWidget.options(options);\\n      }\\n\\n      return _playlistWidget;\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(VideoPlayer, [{\\n    key: \\\"cloudinaryConfig\\\",\\n    value: function cloudinaryConfig(config) {\\n      return this.videojs.cloudinary.cloudinaryConfig(config);\\n    }\\n  }, {\\n    key: \\\"currentPublicId\\\",\\n    value: function currentPublicId() {\\n      return this.videojs.cloudinary.currentPublicId();\\n    }\\n  }, {\\n    key: \\\"currentSourceUrl\\\",\\n    value: function currentSourceUrl() {\\n      return this.videojs.currentSource().src;\\n    }\\n  }, {\\n    key: \\\"currentPoster\\\",\\n    value: function currentPoster() {\\n      return this.videojs.cloudinary.currentPoster();\\n    }\\n  }, {\\n    key: \\\"source\\\",\\n    value: function source(publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (publicId instanceof _videoSource.default) {\\n        return this.videojs.cloudinary.source(publicId, options);\\n      } // Interactive plugin - available in full (not light) build only\\n\\n\\n      if (this.videojs.interactive) {\\n        this.videojs.interactive(this.videojs, options);\\n      }\\n\\n      if (VideoPlayer.allowUsageReport()) {\\n        options.usageReport = true;\\n      }\\n\\n      this.setTextTracks(options.textTracks); // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n\\n      this.initQualitySelector(); // #endif\\n\\n      clearTimeout(this.reTryVideo);\\n      this.nbCalls = 0;\\n      var maxTries = this.videojs.options_.maxTries || 3;\\n      var videoReadyTimeout = this.videojs.options_.videoTimeout || 55000;\\n      this.reTryVideo(maxTries, videoReadyTimeout);\\n      return this.videojs.cloudinary.source(publicId, options);\\n    }\\n  }, {\\n    key: \\\"posterOptions\\\",\\n    value: function posterOptions(options) {\\n      return this.videojs.cloudinary.posterOptions(options);\\n    }\\n  }, {\\n    key: \\\"skin\\\",\\n    value: function skin(name) {\\n      if (name !== undefined && typeof name === 'string') {\\n        _utils.default.setSkinClassPrefix(this.videojs, name);\\n\\n        if (this.playlistWidget()) {\\n          this.playlistWidget().setSkin();\\n        }\\n      }\\n\\n      return _utils.default.skinClassPrefix(this.videojs);\\n    }\\n  }, {\\n    key: \\\"playlist\\\",\\n    value: function playlist(sources) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return this.videojs.cloudinary.playlist(sources, options);\\n    }\\n  }, {\\n    key: \\\"playlistByTag\\\",\\n    value: function playlistByTag(tag) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return this.videojs.cloudinary.playlistByTag(tag, options);\\n    }\\n  }, {\\n    key: \\\"sourcesByTag\\\",\\n    value: function sourcesByTag(tag) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return this.videojs.cloudinary.sourcesByTag(tag, options);\\n    }\\n  }, {\\n    key: \\\"fluid\\\",\\n    value: function fluid(bool) {\\n      if (bool === undefined) {\\n        return this.videojs.fluid();\\n      }\\n\\n      if (bool) {\\n        this.videojs.addClass('cld-fluid');\\n      } else {\\n        this.videojs.removeClass('cld-fluid');\\n      }\\n\\n      this.videojs.fluid(bool);\\n      this.videojs.trigger('fluid', bool);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"play\\\",\\n    value: function play() {\\n      this.playWasCalled = true;\\n      this.videojs.play();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"stop\\\",\\n    value: function stop() {\\n      this.pause();\\n      this.currentTime(0);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"playPrevious\\\",\\n    value: function playPrevious() {\\n      this.playlist().playPrevious();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"playNext\\\",\\n    value: function playNext() {\\n      this.playlist().playNext();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"transformation\\\",\\n    value: function transformation(trans) {\\n      return this.videojs.cloudinary.transformation(trans);\\n    }\\n  }, {\\n    key: \\\"sourceTypes\\\",\\n    value: function sourceTypes(types) {\\n      return this.videojs.cloudinary.sourceTypes(types);\\n    }\\n  }, {\\n    key: \\\"sourceTransformation\\\",\\n    value: function sourceTransformation(trans) {\\n      return this.videojs.cloudinary.sourceTransformation(trans);\\n    }\\n  }, {\\n    key: \\\"autoShowRecommendations\\\",\\n    value: function autoShowRecommendations(autoShow) {\\n      return this.videojs.cloudinary.autoShowRecommendations(autoShow);\\n    }\\n  }, {\\n    key: \\\"duration\\\",\\n    value: function duration() {\\n      return this.videojs.duration();\\n    }\\n  }, {\\n    key: \\\"height\\\",\\n    value: function height(dimension) {\\n      if (!dimension) {\\n        return this.videojs.height();\\n      }\\n\\n      this.videojs.height(dimension);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"width\\\",\\n    value: function width(dimension) {\\n      if (!dimension) {\\n        return this.videojs.width();\\n      }\\n\\n      this.videojs.width(dimension);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"volume\\\",\\n    value: function volume(_volume) {\\n      if (!_volume) {\\n        return this.videojs.volume();\\n      }\\n\\n      this.videojs.volume(_volume);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"mute\\\",\\n    value: function mute() {\\n      if (!this.isMuted()) {\\n        this.videojs.muted(true);\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"unmute\\\",\\n    value: function unmute() {\\n      if (this.isMuted()) {\\n        this.videojs.muted(false);\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"isMuted\\\",\\n    value: function isMuted() {\\n      return this.videojs.muted();\\n    }\\n  }, {\\n    key: \\\"pause\\\",\\n    value: function pause() {\\n      this.videojs.pause();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"currentTime\\\",\\n    value: function currentTime(offsetSeconds) {\\n      if (!offsetSeconds && offsetSeconds !== 0) {\\n        return this.videojs.currentTime();\\n      }\\n\\n      this.videojs.currentTime(offsetSeconds);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"maximize\\\",\\n    value: function maximize() {\\n      if (!this.isMaximized()) {\\n        this.videojs.requestFullscreen();\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"exitMaximize\\\",\\n    value: function exitMaximize() {\\n      if (this.isMaximized()) {\\n        this.videojs.exitFullscreen();\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"isMaximized\\\",\\n    value: function isMaximized() {\\n      return this.videojs.isFullscreen();\\n    }\\n  }, {\\n    key: \\\"dispose\\\",\\n    value: function dispose() {\\n      this.videojs.dispose();\\n    }\\n  }, {\\n    key: \\\"controls\\\",\\n    value: function controls(bool) {\\n      if (bool === undefined) {\\n        return this.videojs.controls();\\n      }\\n\\n      this.videojs.controls(bool);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"ima\\\",\\n    value: function ima() {\\n      return {\\n        playAd: this.videojs.ima.playAd\\n      };\\n    }\\n  }, {\\n    key: \\\"loop\\\",\\n    value: function loop(bool) {\\n      if (bool === undefined) {\\n        return this.videojs.loop();\\n      }\\n\\n      this.videojs.loop(bool);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"el\\\",\\n    value: function el() {\\n      return this.videojs.el();\\n    }\\n  }], [{\\n    key: \\\"all\\\",\\n    value: function all(selector) {\\n      var nodeList = document.querySelectorAll(selector);\\n      var players = [];\\n\\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n        args[_key - 1] = arguments[_key];\\n      }\\n\\n      for (var i = 0; i < nodeList.length; i++) {\\n        players.push(_construct(VideoPlayer, [nodeList[i]].concat(args)));\\n      }\\n\\n      return players;\\n    }\\n  }, {\\n    key: \\\"allowUsageReport\\\",\\n    value: function allowUsageReport(bool) {\\n      if (bool === undefined) {\\n        return _allowUsageReport;\\n      }\\n\\n      _allowUsageReport = !!bool;\\n      return _allowUsageReport;\\n    }\\n  }]);\\n\\n  return VideoPlayer;\\n}(_utils.default.mixin(_eventable.default));\\n\\nvar _default = VideoPlayer;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./video-player.js?\");\n\n/***/ }),\n\n/***/ 0:\n/*!******************************!*\\\n  !*** min-document (ignored) ***!\n  \\******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/min-document_(ignored)?\");\n\n/***/ }),\n\n/***/ 1:\n/*!******************************!*\\\n  !*** min-document (ignored) ***!\n  \\******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/min-document_(ignored)?\");\n\n/***/ }),\n\n/***/ 2:\n/*!**********************!*\\\n  !*** util (ignored) ***!\n  \\**********************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/util_(ignored)?\");\n\n/***/ }),\n\n/***/ 3:\n/*!**********************!*\\\n  !*** util (ignored) ***!\n  \\**********************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/util_(ignored)?\");\n\n/***/ }),\n\n/***/ \"cloudinary-core\":\n/*!*************************************************************************************************************************!*\\\n  !*** external {\"commonjs\":\"cloudinary-core\",\"commonjs2\":\"cloudinary-core\",\"amd\":\"cloudinary-core\",\"root\":\"cloudinary\"} ***!\n  \\*************************************************************************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\neval(\"module.exports = __WEBPACK_EXTERNAL_MODULE_cloudinary_core__;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/external_%7B%22commonjs%22:%22cloudinary-core%22,%22commonjs2%22:%22cloudinary-core%22,%22amd%22:%22cloudinary-core%22,%22root%22:%22cloudinary%22%7D?\");\n\n/***/ })\n\n/******/ });\n});","/*! For license information please see 3c706662-f6b89a47e4eebc4e.js.LICENSE */\n(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{14060:function(module,__unused_webpack_exports,__webpack_require__){var factory;window,factory=function(__WEBPACK_EXTERNAL_MODULE_cloudinary_core__){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&n&&\"string\"!=typeof e)for(var a in e)t.d(r,a,function(n){return e[n]}.bind(null,a));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p=\"\",t(t.s=\"./index.js\")}({\"../node_modules/@babel/runtime/helpers/extends.js\":function(module,exports){eval(\"function _extends() {\\n  module.exports = _extends = Object.assign || function (target) {\\n    for (var i = 1; i < arguments.length; i++) {\\n      var source = arguments[i];\\n\\n      for (var key in source) {\\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\\n          target[key] = source[key];\\n        }\\n      }\\n    }\\n\\n    return target;\\n  };\\n\\n  return _extends.apply(this, arguments);\\n}\\n\\nmodule.exports = _extends;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@babel/runtime/helpers/extends.js?\")},\"../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/* WEBPACK VAR INJECTION */(function(Buffer) {/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */\\n\\n\\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\\n\\nvar window = _interopDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nvar atob = function atob(s) {\\n  return window.atob ? window.atob(s) : Buffer.from(s, 'base64').toString('binary');\\n};\\n\\nfunction decodeB64ToUint8Array(b64Text) {\\n  var decodedString = atob(b64Text);\\n  var array = new Uint8Array(decodedString.length);\\n\\n  for (var i = 0; i < decodedString.length; i++) {\\n    array[i] = decodedString.charCodeAt(i);\\n  }\\n\\n  return array;\\n}\\n\\nmodule.exports = decodeB64ToUint8Array;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node-libs-browser/node_modules/buffer/index.js */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js?\")},\"../node_modules/@videojs/vhs-utils/dist/resolve-url.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */\\n\\n\\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\\n\\nvar URLToolkit = _interopDefault(__webpack_require__(/*! url-toolkit */ \\\"../node_modules/url-toolkit/src/url-toolkit.js\\\"));\\nvar window = _interopDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nvar resolveUrl = function resolveUrl(baseUrl, relativeUrl) {\\n  // return early if we don't need to resolve\\n  if (/^[a-z]+:/i.test(relativeUrl)) {\\n    return relativeUrl;\\n  } // if the base URL is relative then combine with the current location\\n\\n\\n  if (!/\\\\/\\\\//i.test(baseUrl)) {\\n    baseUrl = URLToolkit.buildAbsoluteURL(window.location && window.location.href || '', baseUrl);\\n  }\\n\\n  return URLToolkit.buildAbsoluteURL(baseUrl, relativeUrl);\\n};\\n\\nmodule.exports = resolveUrl;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@videojs/vhs-utils/dist/resolve-url.js?\")},\"../node_modules/@videojs/xhr/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\nvar window = __webpack_require__(/*! global/window */ \"../node_modules/global/window.js\")\\nvar _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"../node_modules/@babel/runtime/helpers/extends.js\");\\nvar isFunction = __webpack_require__(/*! is-function */ \"../node_modules/is-function/index.js\");\\n\\n/**\\n * @license\\n * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>\\n * Copyright (c) 2014 David Björklund\\n * Available under the MIT license\\n * <https://github.com/kesla/parse-headers/blob/master/LICENCE>\\n */\\n\\nvar parseHeaders = function(headers) {\\n    var result = {};\\n\\n    if (!headers) {\\n        return result;\\n    }\\n\\n    headers.trim().split(\\'\\\\n\\').forEach(function(row) {\\n        var index = row.indexOf(\\':\\');\\n        var key = row.slice(0, index).trim().toLowerCase();\\n        var value = row.slice(index + 1).trim();\\n\\n        if (typeof(result[key]) === \\'undefined\\') {\\n          result[key] = value\\n        } else if (Array.isArray(result[key])) {\\n          result[key].push(value)\\n        } else {\\n          result[key] = [ result[key], value ]\\n        }\\n    });\\n\\n    return result;\\n};\\n\\nmodule.exports = createXHR\\n// Allow use of default import syntax in TypeScript\\nmodule.exports.default = createXHR;\\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\\n\\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\\n    createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\\n        options = initParams(uri, options, callback)\\n        options.method = method.toUpperCase()\\n        return _createXHR(options)\\n    }\\n})\\n\\nfunction forEachArray(array, iterator) {\\n    for (var i = 0; i < array.length; i++) {\\n        iterator(array[i])\\n    }\\n}\\n\\nfunction isEmpty(obj){\\n    for(var i in obj){\\n        if(obj.hasOwnProperty(i)) return false\\n    }\\n    return true\\n}\\n\\nfunction initParams(uri, options, callback) {\\n    var params = uri\\n\\n    if (isFunction(options)) {\\n        callback = options\\n        if (typeof uri === \"string\") {\\n            params = {uri:uri}\\n        }\\n    } else {\\n        params = _extends({}, options, {uri: uri})\\n    }\\n\\n    params.callback = callback\\n    return params\\n}\\n\\nfunction createXHR(uri, options, callback) {\\n    options = initParams(uri, options, callback)\\n    return _createXHR(options)\\n}\\n\\nfunction _createXHR(options) {\\n    if(typeof options.callback === \"undefined\"){\\n        throw new Error(\"callback argument missing\")\\n    }\\n\\n    var called = false\\n    var callback = function cbOnce(err, response, body){\\n        if(!called){\\n            called = true\\n            options.callback(err, response, body)\\n        }\\n    }\\n\\n    function readystatechange() {\\n        if (xhr.readyState === 4) {\\n            setTimeout(loadFunc, 0)\\n        }\\n    }\\n\\n    function getBody() {\\n        // Chrome with requestType=blob throws errors arround when even testing access to responseText\\n        var body = undefined\\n\\n        if (xhr.response) {\\n            body = xhr.response\\n        } else {\\n            body = xhr.responseText || getXml(xhr)\\n        }\\n\\n        if (isJson) {\\n            try {\\n                body = JSON.parse(body)\\n            } catch (e) {}\\n        }\\n\\n        return body\\n    }\\n\\n    function errorFunc(evt) {\\n        clearTimeout(timeoutTimer)\\n        if(!(evt instanceof Error)){\\n            evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\\n        }\\n        evt.statusCode = 0\\n        return callback(evt, failureResponse)\\n    }\\n\\n    // will load the data & process the response in a special response object\\n    function loadFunc() {\\n        if (aborted) return\\n        var status\\n        clearTimeout(timeoutTimer)\\n        if(options.useXDR && xhr.status===undefined) {\\n            //IE8 CORS GET successful response doesn\\'t have a status field, but body is fine\\n            status = 200\\n        } else {\\n            status = (xhr.status === 1223 ? 204 : xhr.status)\\n        }\\n        var response = failureResponse\\n        var err = null\\n\\n        if (status !== 0){\\n            response = {\\n                body: getBody(),\\n                statusCode: status,\\n                method: method,\\n                headers: {},\\n                url: uri,\\n                rawRequest: xhr\\n            }\\n            if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\\n                response.headers = parseHeaders(xhr.getAllResponseHeaders())\\n            }\\n        } else {\\n            err = new Error(\"Internal XMLHttpRequest Error\")\\n        }\\n        return callback(err, response, response.body)\\n    }\\n\\n    var xhr = options.xhr || null\\n\\n    if (!xhr) {\\n        if (options.cors || options.useXDR) {\\n            xhr = new createXHR.XDomainRequest()\\n        }else{\\n            xhr = new createXHR.XMLHttpRequest()\\n        }\\n    }\\n\\n    var key\\n    var aborted\\n    var uri = xhr.url = options.uri || options.url\\n    var method = xhr.method = options.method || \"GET\"\\n    var body = options.body || options.data\\n    var headers = xhr.headers = options.headers || {}\\n    var sync = !!options.sync\\n    var isJson = false\\n    var timeoutTimer\\n    var failureResponse = {\\n        body: undefined,\\n        headers: {},\\n        statusCode: 0,\\n        method: method,\\n        url: uri,\\n        rawRequest: xhr\\n    }\\n\\n    if (\"json\" in options && options.json !== false) {\\n        isJson = true\\n        headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don\\'t override existing accept header declared by user\\n        if (method !== \"GET\" && method !== \"HEAD\") {\\n            headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don\\'t override existing accept header declared by user\\n            body = JSON.stringify(options.json === true ? body : options.json)\\n        }\\n    }\\n\\n    xhr.onreadystatechange = readystatechange\\n    xhr.onload = loadFunc\\n    xhr.onerror = errorFunc\\n    // IE9 must have onprogress be set to a unique function.\\n    xhr.onprogress = function () {\\n        // IE must die\\n    }\\n    xhr.onabort = function(){\\n        aborted = true;\\n    }\\n    xhr.ontimeout = errorFunc\\n    xhr.open(method, uri, !sync, options.username, options.password)\\n    //has to be after open\\n    if(!sync) {\\n        xhr.withCredentials = !!options.withCredentials\\n    }\\n    // Cannot set timeout with sync request\\n    // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\\n    // both npm\\'s request and jquery 1.x use this kind of timeout, so this is being consistent\\n    if (!sync && options.timeout > 0 ) {\\n        timeoutTimer = setTimeout(function(){\\n            if (aborted) return\\n            aborted = true//IE9 may still call readystatechange\\n            xhr.abort(\"timeout\")\\n            var e = new Error(\"XMLHttpRequest timeout\")\\n            e.code = \"ETIMEDOUT\"\\n            errorFunc(e)\\n        }, options.timeout )\\n    }\\n\\n    if (xhr.setRequestHeader) {\\n        for(key in headers){\\n            if(headers.hasOwnProperty(key)){\\n                xhr.setRequestHeader(key, headers[key])\\n            }\\n        }\\n    } else if (options.headers && !isEmpty(options.headers)) {\\n        throw new Error(\"Headers cannot be set on an XDomainRequest object\")\\n    }\\n\\n    if (\"responseType\" in options) {\\n        xhr.responseType = options.responseType\\n    }\\n\\n    if (\"beforeSend\" in options &&\\n        typeof options.beforeSend === \"function\"\\n    ) {\\n        options.beforeSend(xhr)\\n    }\\n\\n    // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\\n    // XMLHttpRequest spec says to pass null as body to indicate no body\\n    // See https://github.com/naugtur/xhr/issues/100.\\n    xhr.send(body || null)\\n\\n    return xhr\\n\\n\\n}\\n\\nfunction getXml(xhr) {\\n    // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\\n    // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\\n    try {\\n        if (xhr.responseType === \"document\") {\\n            return xhr.responseXML\\n        }\\n        var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\"\\n        if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\\n            return xhr.responseXML\\n        }\\n    } catch (e) {}\\n\\n    return null\\n}\\n\\nfunction noop() {}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/@videojs/xhr/index.js?')},\"../node_modules/aes-decrypter/dist/aes-decrypter.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval('__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"decrypt\", function() { return decrypt; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Decrypter\", function() { return Decrypter; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AsyncStream\", function() { return AsyncStream; });\\n/* harmony import */ var pkcs7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! pkcs7 */ \"../node_modules/pkcs7/dist/pkcs7.es.js\");\\n\\n\\nvar classCallCheck = function (instance, Constructor) {\\n  if (!(instance instanceof Constructor)) {\\n    throw new TypeError(\"Cannot call a class as a function\");\\n  }\\n};\\n\\nvar createClass = function () {\\n  function defineProperties(target, props) {\\n    for (var i = 0; i < props.length; i++) {\\n      var descriptor = props[i];\\n      descriptor.enumerable = descriptor.enumerable || false;\\n      descriptor.configurable = true;\\n      if (\"value\" in descriptor) descriptor.writable = true;\\n      Object.defineProperty(target, descriptor.key, descriptor);\\n    }\\n  }\\n\\n  return function (Constructor, protoProps, staticProps) {\\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n    if (staticProps) defineProperties(Constructor, staticProps);\\n    return Constructor;\\n  };\\n}();\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar inherits = function (subClass, superClass) {\\n  if (typeof superClass !== \"function\" && superClass !== null) {\\n    throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\\n  }\\n\\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\\n    constructor: {\\n      value: subClass,\\n      enumerable: false,\\n      writable: true,\\n      configurable: true\\n    }\\n  });\\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\\n};\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar possibleConstructorReturn = function (self, call) {\\n  if (!self) {\\n    throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");\\n  }\\n\\n  return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\\n};\\n\\n/**\\n * @file aes.js\\n *\\n * This file contains an adaptation of the AES decryption algorithm\\n * from the Standford Javascript Cryptography Library. That work is\\n * covered by the following copyright and permissions notice:\\n *\\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without\\n * modification, are permitted provided that the following conditions are\\n * met:\\n *\\n * 1. Redistributions of source code must retain the above copyright\\n *    notice, this list of conditions and the following disclaimer.\\n *\\n * 2. Redistributions in binary form must reproduce the above\\n *    copyright notice, this list of conditions and the following\\n *    disclaimer in the documentation and/or other materials provided\\n *    with the distribution.\\n *\\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS\\'\\' AND ANY EXPRESS OR\\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n *\\n * The views and conclusions contained in the software and documentation\\n * are those of the authors and should not be interpreted as representing\\n * official policies, either expressed or implied, of the authors.\\n */\\n\\n/**\\n * Expand the S-box tables.\\n *\\n * @private\\n */\\nvar precompute = function precompute() {\\n  var tables = [[[], [], [], [], []], [[], [], [], [], []]];\\n  var encTable = tables[0];\\n  var decTable = tables[1];\\n  var sbox = encTable[4];\\n  var sboxInv = decTable[4];\\n  var i = void 0;\\n  var x = void 0;\\n  var xInv = void 0;\\n  var d = [];\\n  var th = [];\\n  var x2 = void 0;\\n  var x4 = void 0;\\n  var x8 = void 0;\\n  var s = void 0;\\n  var tEnc = void 0;\\n  var tDec = void 0;\\n\\n  // Compute double and third tables\\n  for (i = 0; i < 256; i++) {\\n    th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\\n  }\\n\\n  for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\\n    // Compute sbox\\n    s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\\n    s = s >> 8 ^ s & 255 ^ 99;\\n    sbox[x] = s;\\n    sboxInv[s] = x;\\n\\n    // Compute MixColumns\\n    x8 = d[x4 = d[x2 = d[x]]];\\n    tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\\n    tEnc = d[s] * 0x101 ^ s * 0x1010100;\\n\\n    for (i = 0; i < 4; i++) {\\n      encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\\n      decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\\n    }\\n  }\\n\\n  // Compactify. Considerable speedup on Firefox.\\n  for (i = 0; i < 5; i++) {\\n    encTable[i] = encTable[i].slice(0);\\n    decTable[i] = decTable[i].slice(0);\\n  }\\n  return tables;\\n};\\nvar aesTables = null;\\n\\n/**\\n * Schedule out an AES key for both encryption and decryption. This\\n * is a low-level class. Use a cipher mode to do bulk encryption.\\n *\\n * @class AES\\n * @param key {Array} The key as an array of 4, 6 or 8 words.\\n */\\n\\nvar AES = function () {\\n  function AES(key) {\\n    classCallCheck(this, AES);\\n\\n    /**\\n     * The expanded S-box and inverse S-box tables. These will be computed\\n     * on the client so that we don\\'t have to send them down the wire.\\n     *\\n     * There are two tables, _tables[0] is for encryption and\\n     * _tables[1] is for decryption.\\n     *\\n     * The first 4 sub-tables are the expanded S-box with MixColumns. The\\n     * last (_tables[01][4]) is the S-box itself.\\n     *\\n     * @private\\n     */\\n    // if we have yet to precompute the S-box tables\\n    // do so now\\n    if (!aesTables) {\\n      aesTables = precompute();\\n    }\\n    // then make a copy of that object for use\\n    this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\\n    var i = void 0;\\n    var j = void 0;\\n    var tmp = void 0;\\n    var encKey = void 0;\\n    var decKey = void 0;\\n    var sbox = this._tables[0][4];\\n    var decTable = this._tables[1];\\n    var keyLen = key.length;\\n    var rcon = 1;\\n\\n    if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\\n      throw new Error(\\'Invalid aes key size\\');\\n    }\\n\\n    encKey = key.slice(0);\\n    decKey = [];\\n    this._key = [encKey, decKey];\\n\\n    // schedule encryption keys\\n    for (i = keyLen; i < 4 * keyLen + 28; i++) {\\n      tmp = encKey[i - 1];\\n\\n      // apply sbox\\n      if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\\n        tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\\n\\n        // shift rows and add rcon\\n        if (i % keyLen === 0) {\\n          tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\\n          rcon = rcon << 1 ^ (rcon >> 7) * 283;\\n        }\\n      }\\n\\n      encKey[i] = encKey[i - keyLen] ^ tmp;\\n    }\\n\\n    // schedule decryption keys\\n    for (j = 0; i; j++, i--) {\\n      tmp = encKey[j & 3 ? i : i - 4];\\n      if (i <= 4 || j < 4) {\\n        decKey[j] = tmp;\\n      } else {\\n        decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\\n      }\\n    }\\n  }\\n\\n  /**\\n   * Decrypt 16 bytes, specified as four 32-bit words.\\n   *\\n   * @param {Number} encrypted0 the first word to decrypt\\n   * @param {Number} encrypted1 the second word to decrypt\\n   * @param {Number} encrypted2 the third word to decrypt\\n   * @param {Number} encrypted3 the fourth word to decrypt\\n   * @param {Int32Array} out the array to write the decrypted words\\n   * into\\n   * @param {Number} offset the offset into the output array to start\\n   * writing results\\n   * @return {Array} The plaintext.\\n   */\\n\\n\\n  AES.prototype.decrypt = function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\\n    var key = this._key[1];\\n    // state variables a,b,c,d are loaded with pre-whitened data\\n    var a = encrypted0 ^ key[0];\\n    var b = encrypted3 ^ key[1];\\n    var c = encrypted2 ^ key[2];\\n    var d = encrypted1 ^ key[3];\\n    var a2 = void 0;\\n    var b2 = void 0;\\n    var c2 = void 0;\\n\\n    // key.length === 2 ?\\n    var nInnerRounds = key.length / 4 - 2;\\n    var i = void 0;\\n    var kIndex = 4;\\n    var table = this._tables[1];\\n\\n    // load up the tables\\n    var table0 = table[0];\\n    var table1 = table[1];\\n    var table2 = table[2];\\n    var table3 = table[3];\\n    var sbox = table[4];\\n\\n    // Inner rounds. Cribbed from OpenSSL.\\n    for (i = 0; i < nInnerRounds; i++) {\\n      a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\\n      b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\\n      c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\\n      d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\\n      kIndex += 4;\\n      a = a2;b = b2;c = c2;\\n    }\\n\\n    // Last round.\\n    for (i = 0; i < 4; i++) {\\n      out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\\n      a2 = a;a = b;b = c;c = d;d = a2;\\n    }\\n  };\\n\\n  return AES;\\n}();\\n\\n/**\\n * @file stream.js\\n */\\n/**\\n * A lightweight readable stream implemention that handles event dispatching.\\n *\\n * @class Stream\\n */\\nvar Stream = function () {\\n  function Stream() {\\n    classCallCheck(this, Stream);\\n\\n    this.listeners = {};\\n  }\\n\\n  /**\\n   * Add a listener for a specified event type.\\n   *\\n   * @param {String} type the event name\\n   * @param {Function} listener the callback to be invoked when an event of\\n   * the specified type occurs\\n   */\\n\\n\\n  Stream.prototype.on = function on(type, listener) {\\n    if (!this.listeners[type]) {\\n      this.listeners[type] = [];\\n    }\\n    this.listeners[type].push(listener);\\n  };\\n\\n  /**\\n   * Remove a listener for a specified event type.\\n   *\\n   * @param {String} type the event name\\n   * @param {Function} listener  a function previously registered for this\\n   * type of event through `on`\\n   * @return {Boolean} if we could turn it off or not\\n   */\\n\\n\\n  Stream.prototype.off = function off(type, listener) {\\n    if (!this.listeners[type]) {\\n      return false;\\n    }\\n\\n    var index = this.listeners[type].indexOf(listener);\\n\\n    this.listeners[type].splice(index, 1);\\n    return index > -1;\\n  };\\n\\n  /**\\n   * Trigger an event of the specified type on this stream. Any additional\\n   * arguments to this function are passed as parameters to event listeners.\\n   *\\n   * @param {String} type the event name\\n   */\\n\\n\\n  Stream.prototype.trigger = function trigger(type) {\\n    var callbacks = this.listeners[type];\\n\\n    if (!callbacks) {\\n      return;\\n    }\\n\\n    // Slicing the arguments on every invocation of this method\\n    // can add a significant amount of overhead. Avoid the\\n    // intermediate object creation for the common case of a\\n    // single callback argument\\n    if (arguments.length === 2) {\\n      var length = callbacks.length;\\n\\n      for (var i = 0; i < length; ++i) {\\n        callbacks[i].call(this, arguments[1]);\\n      }\\n    } else {\\n      var args = Array.prototype.slice.call(arguments, 1);\\n      var _length = callbacks.length;\\n\\n      for (var _i = 0; _i < _length; ++_i) {\\n        callbacks[_i].apply(this, args);\\n      }\\n    }\\n  };\\n\\n  /**\\n   * Destroys the stream and cleans up.\\n   */\\n\\n\\n  Stream.prototype.dispose = function dispose() {\\n    this.listeners = {};\\n  };\\n  /**\\n   * Forwards all `data` events on this stream to the destination stream. The\\n   * destination stream should provide a method `push` to receive the data\\n   * events as they arrive.\\n   *\\n   * @param {Stream} destination the stream that will receive all `data` events\\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n   */\\n\\n\\n  Stream.prototype.pipe = function pipe(destination) {\\n    this.on(\\'data\\', function (data) {\\n      destination.push(data);\\n    });\\n  };\\n\\n  return Stream;\\n}();\\n\\n/**\\n * @file async-stream.js\\n */\\n/**\\n * A wrapper around the Stream class to use setTiemout\\n * and run stream \"jobs\" Asynchronously\\n *\\n * @class AsyncStream\\n * @extends Stream\\n */\\n\\nvar AsyncStream = function (_Stream) {\\n  inherits(AsyncStream, _Stream);\\n\\n  function AsyncStream() {\\n    classCallCheck(this, AsyncStream);\\n\\n    var _this = possibleConstructorReturn(this, _Stream.call(this, Stream));\\n\\n    _this.jobs = [];\\n    _this.delay = 1;\\n    _this.timeout_ = null;\\n    return _this;\\n  }\\n\\n  /**\\n   * process an async job\\n   *\\n   * @private\\n   */\\n\\n\\n  AsyncStream.prototype.processJob_ = function processJob_() {\\n    this.jobs.shift()();\\n    if (this.jobs.length) {\\n      this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n    } else {\\n      this.timeout_ = null;\\n    }\\n  };\\n\\n  /**\\n   * push a job into the stream\\n   *\\n   * @param {Function} job the job to push into the stream\\n   */\\n\\n\\n  AsyncStream.prototype.push = function push(job) {\\n    this.jobs.push(job);\\n    if (!this.timeout_) {\\n      this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n    }\\n  };\\n\\n  return AsyncStream;\\n}(Stream);\\n\\n/**\\n * @file decrypter.js\\n *\\n * An asynchronous implementation of AES-128 CBC decryption with\\n * PKCS#7 padding.\\n */\\n\\n/**\\n * Convert network-order (big-endian) bytes into their little-endian\\n * representation.\\n */\\nvar ntoh = function ntoh(word) {\\n  return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\\n};\\n\\n/**\\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\\n *\\n * @param {Uint8Array} encrypted the encrypted bytes\\n * @param {Uint32Array} key the bytes of the decryption key\\n * @param {Uint32Array} initVector the initialization vector (IV) to\\n * use for the first round of CBC.\\n * @return {Uint8Array} the decrypted bytes\\n *\\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\\n * @see https://tools.ietf.org/html/rfc2315\\n */\\nvar decrypt = function decrypt(encrypted, key, initVector) {\\n  // word-level access to the encrypted bytes\\n  var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\\n\\n  var decipher = new AES(Array.prototype.slice.call(key));\\n\\n  // byte and word-level access for the decrypted output\\n  var decrypted = new Uint8Array(encrypted.byteLength);\\n  var decrypted32 = new Int32Array(decrypted.buffer);\\n\\n  // temporary variables for working with the IV, encrypted, and\\n  // decrypted data\\n  var init0 = void 0;\\n  var init1 = void 0;\\n  var init2 = void 0;\\n  var init3 = void 0;\\n  var encrypted0 = void 0;\\n  var encrypted1 = void 0;\\n  var encrypted2 = void 0;\\n  var encrypted3 = void 0;\\n\\n  // iteration variable\\n  var wordIx = void 0;\\n\\n  // pull out the words of the IV to ensure we don\\'t modify the\\n  // passed-in reference and easier access\\n  init0 = initVector[0];\\n  init1 = initVector[1];\\n  init2 = initVector[2];\\n  init3 = initVector[3];\\n\\n  // decrypt four word sequences, applying cipher-block chaining (CBC)\\n  // to each decrypted block\\n  for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\\n    // convert big-endian (network order) words into little-endian\\n    // (javascript order)\\n    encrypted0 = ntoh(encrypted32[wordIx]);\\n    encrypted1 = ntoh(encrypted32[wordIx + 1]);\\n    encrypted2 = ntoh(encrypted32[wordIx + 2]);\\n    encrypted3 = ntoh(encrypted32[wordIx + 3]);\\n\\n    // decrypt the block\\n    decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx);\\n\\n    // XOR with the IV, and restore network byte-order to obtain the\\n    // plaintext\\n    decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\\n    decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\\n    decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\\n    decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3);\\n\\n    // setup the IV for the next round\\n    init0 = encrypted0;\\n    init1 = encrypted1;\\n    init2 = encrypted2;\\n    init3 = encrypted3;\\n  }\\n\\n  return decrypted;\\n};\\n\\n/**\\n * The `Decrypter` class that manages decryption of AES\\n * data through `AsyncStream` objects and the `decrypt`\\n * function\\n *\\n * @param {Uint8Array} encrypted the encrypted bytes\\n * @param {Uint32Array} key the bytes of the decryption key\\n * @param {Uint32Array} initVector the initialization vector (IV) to\\n * @param {Function} done the function to run when done\\n * @class Decrypter\\n */\\n\\nvar Decrypter = function () {\\n  function Decrypter(encrypted, key, initVector, done) {\\n    classCallCheck(this, Decrypter);\\n\\n    var step = Decrypter.STEP;\\n    var encrypted32 = new Int32Array(encrypted.buffer);\\n    var decrypted = new Uint8Array(encrypted.byteLength);\\n    var i = 0;\\n\\n    this.asyncStream_ = new AsyncStream();\\n\\n    // split up the encryption job and do the individual chunks asynchronously\\n    this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n    for (i = step; i < encrypted32.length; i += step) {\\n      initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\\n      this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n    }\\n    // invoke the done() callback when everything is finished\\n    this.asyncStream_.push(function () {\\n      // remove pkcs#7 padding from the decrypted bytes\\n      done(null, Object(pkcs7__WEBPACK_IMPORTED_MODULE_0__[\"unpad\"])(decrypted));\\n    });\\n  }\\n\\n  /**\\n   * a getter for step the maximum number of bytes to process at one time\\n   *\\n   * @return {Number} the value of step 32000\\n   */\\n\\n\\n  /**\\n   * @private\\n   */\\n  Decrypter.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\\n    return function () {\\n      var bytes = decrypt(encrypted, key, initVector);\\n\\n      decrypted.set(bytes, encrypted.byteOffset);\\n    };\\n  };\\n\\n  createClass(Decrypter, null, [{\\n    key: \\'STEP\\',\\n    get: function get$$1() {\\n      // 4 * 8000;\\n      return 32000;\\n    }\\n  }]);\\n  return Decrypter;\\n}();\\n\\n/**\\n * @file index.js\\n *\\n * Index module to easily import the primary components of AES-128\\n * decryption. Like this:\\n *\\n * ```js\\n * import {Decrypter, decrypt, AsyncStream} from \\'aes-decrypter\\';\\n * ```\\n */\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/aes-decrypter/dist/aes-decrypter.es.js?')},\"../node_modules/base64-js/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nexports.byteLength = byteLength\\nexports.toByteArray = toByteArray\\nexports.fromByteArray = fromByteArray\\n\\nvar lookup = []\\nvar revLookup = []\\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\\n\\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\\nfor (var i = 0, len = code.length; i < len; ++i) {\\n  lookup[i] = code[i]\\n  revLookup[code.charCodeAt(i)] = i\\n}\\n\\n// Support decoding URL-safe base64 strings, as Node.js does.\\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\\nrevLookup['-'.charCodeAt(0)] = 62\\nrevLookup['_'.charCodeAt(0)] = 63\\n\\nfunction getLens (b64) {\\n  var len = b64.length\\n\\n  if (len % 4 > 0) {\\n    throw new Error('Invalid string. Length must be a multiple of 4')\\n  }\\n\\n  // Trim off extra bytes after placeholder bytes are found\\n  // See: https://github.com/beatgammit/base64-js/issues/42\\n  var validLen = b64.indexOf('=')\\n  if (validLen === -1) validLen = len\\n\\n  var placeHoldersLen = validLen === len\\n    ? 0\\n    : 4 - (validLen % 4)\\n\\n  return [validLen, placeHoldersLen]\\n}\\n\\n// base64 is 4/3 + up to two characters of the original data\\nfunction byteLength (b64) {\\n  var lens = getLens(b64)\\n  var validLen = lens[0]\\n  var placeHoldersLen = lens[1]\\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\n}\\n\\nfunction _byteLength (b64, validLen, placeHoldersLen) {\\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\\n}\\n\\nfunction toByteArray (b64) {\\n  var tmp\\n  var lens = getLens(b64)\\n  var validLen = lens[0]\\n  var placeHoldersLen = lens[1]\\n\\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\\n\\n  var curByte = 0\\n\\n  // if there are placeholders, only get up to the last complete 4 chars\\n  var len = placeHoldersLen > 0\\n    ? validLen - 4\\n    : validLen\\n\\n  var i\\n  for (i = 0; i < len; i += 4) {\\n    tmp =\\n      (revLookup[b64.charCodeAt(i)] << 18) |\\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\\n      revLookup[b64.charCodeAt(i + 3)]\\n    arr[curByte++] = (tmp >> 16) & 0xFF\\n    arr[curByte++] = (tmp >> 8) & 0xFF\\n    arr[curByte++] = tmp & 0xFF\\n  }\\n\\n  if (placeHoldersLen === 2) {\\n    tmp =\\n      (revLookup[b64.charCodeAt(i)] << 2) |\\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\\n    arr[curByte++] = tmp & 0xFF\\n  }\\n\\n  if (placeHoldersLen === 1) {\\n    tmp =\\n      (revLookup[b64.charCodeAt(i)] << 10) |\\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\\n    arr[curByte++] = (tmp >> 8) & 0xFF\\n    arr[curByte++] = tmp & 0xFF\\n  }\\n\\n  return arr\\n}\\n\\nfunction tripletToBase64 (num) {\\n  return lookup[num >> 18 & 0x3F] +\\n    lookup[num >> 12 & 0x3F] +\\n    lookup[num >> 6 & 0x3F] +\\n    lookup[num & 0x3F]\\n}\\n\\nfunction encodeChunk (uint8, start, end) {\\n  var tmp\\n  var output = []\\n  for (var i = start; i < end; i += 3) {\\n    tmp =\\n      ((uint8[i] << 16) & 0xFF0000) +\\n      ((uint8[i + 1] << 8) & 0xFF00) +\\n      (uint8[i + 2] & 0xFF)\\n    output.push(tripletToBase64(tmp))\\n  }\\n  return output.join('')\\n}\\n\\nfunction fromByteArray (uint8) {\\n  var tmp\\n  var len = uint8.length\\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\\n  var parts = []\\n  var maxChunkLength = 16383 // must be multiple of 3\\n\\n  // go through the array every three bytes, we'll deal with trailing stuff later\\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\\n    parts.push(encodeChunk(\\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\\n    ))\\n  }\\n\\n  // pad the end with zeros, but make sure to not forget the extra bytes\\n  if (extraBytes === 1) {\\n    tmp = uint8[len - 1]\\n    parts.push(\\n      lookup[tmp >> 2] +\\n      lookup[(tmp << 4) & 0x3F] +\\n      '=='\\n    )\\n  } else if (extraBytes === 2) {\\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\\n    parts.push(\\n      lookup[tmp >> 10] +\\n      lookup[(tmp >> 4) & 0x3F] +\\n      lookup[(tmp << 2) & 0x3F] +\\n      '='\\n    )\\n  }\\n\\n  return parts.join('')\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/base64-js/index.js?\")},\"../node_modules/codem-isoboxer/dist/iso_boxer.js\":function(module,exports,__webpack_require__){eval(\"/*! codem-isoboxer v0.3.6 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */\\nvar ISOBoxer = {};\\n\\nISOBoxer.parseBuffer = function(arrayBuffer) {\\n  return new ISOFile(arrayBuffer).parse();\\n};\\n\\nISOBoxer.addBoxProcessor = function(type, parser) {\\n  if (typeof type !== 'string' || typeof parser !== 'function') {\\n    return;\\n  }\\n  ISOBox.prototype._boxProcessors[type] = parser;\\n};\\n\\nISOBoxer.createFile = function() {\\n  return new ISOFile();\\n};\\n\\n// See ISOBoxer.append() for 'pos' parameter syntax\\nISOBoxer.createBox = function(type, parent, pos) {\\n  var newBox = ISOBox.create(type);\\n  if (parent) {\\n    parent.append(newBox, pos);\\n  }\\n  return newBox;\\n};\\n\\n// See ISOBoxer.append() for 'pos' parameter syntax\\nISOBoxer.createFullBox = function(type, parent, pos) {\\n  var newBox = ISOBoxer.createBox(type, parent, pos);\\n  newBox.version = 0;\\n  newBox.flags = 0;\\n  return newBox;\\n};\\n\\nISOBoxer.Utils = {};\\nISOBoxer.Utils.dataViewToString = function(dataView, encoding) {\\n  var impliedEncoding = encoding || 'utf-8';\\n  if (typeof TextDecoder !== 'undefined') {\\n    return new TextDecoder(impliedEncoding).decode(dataView);\\n  }\\n  var a = [];\\n  var i = 0;\\n\\n  if (impliedEncoding === 'utf-8') {\\n    /* The following algorithm is essentially a rewrite of the UTF8.decode at\\n    http://bannister.us/weblog/2007/simple-base64-encodedecode-javascript/\\n    */\\n\\n    while (i < dataView.byteLength) {\\n      var c = dataView.getUint8(i++);\\n      if (c < 0x80) {\\n        // 1-byte character (7 bits)\\n      } else if (c < 0xe0) {\\n        // 2-byte character (11 bits)\\n        c = (c & 0x1f) << 6;\\n        c |= (dataView.getUint8(i++) & 0x3f);\\n      } else if (c < 0xf0) {\\n        // 3-byte character (16 bits)\\n        c = (c & 0xf) << 12;\\n        c |= (dataView.getUint8(i++) & 0x3f) << 6;\\n        c |= (dataView.getUint8(i++) & 0x3f);\\n      } else {\\n        // 4-byte character (21 bits)\\n        c = (c & 0x7) << 18;\\n        c |= (dataView.getUint8(i++) & 0x3f) << 12;\\n        c |= (dataView.getUint8(i++) & 0x3f) << 6;\\n        c |= (dataView.getUint8(i++) & 0x3f);\\n      }\\n      a.push(String.fromCharCode(c));\\n    }\\n  } else { // Just map byte-by-byte (probably wrong)\\n    while (i < dataView.byteLength) {\\n      a.push(String.fromCharCode(dataView.getUint8(i++)));\\n    }\\n  }\\n  return a.join('');\\n};\\n\\nISOBoxer.Utils.utf8ToByteArray = function(string) {\\n  // Only UTF-8 encoding is supported by TextEncoder\\n  var u, i;\\n  if (typeof TextEncoder !== 'undefined') {\\n    u = new TextEncoder().encode(string);\\n  } else {\\n    u = [];\\n    for (i = 0; i < string.length; ++i) {\\n      var c = string.charCodeAt(i);\\n      if (c < 0x80) {\\n        u.push(c);\\n      } else if (c < 0x800) {\\n        u.push(0xC0 | (c >> 6));\\n        u.push(0x80 | (63 & c));\\n      } else if (c < 0x10000) {\\n        u.push(0xE0 | (c >> 12));\\n        u.push(0x80 | (63 & (c >> 6)));\\n        u.push(0x80 | (63 & c));\\n      } else {\\n        u.push(0xF0 | (c >> 18));\\n        u.push(0x80 | (63 & (c >> 12)));\\n        u.push(0x80 | (63 & (c >> 6)));\\n        u.push(0x80 | (63 & c));\\n      }\\n    }\\n  }\\n  return u;\\n};\\n\\n// Method to append a box in the list of child boxes\\n// The 'pos' parameter can be either:\\n//   - (number) a position index at which to insert the new box\\n//   - (string) the type of the box after which to insert the new box\\n//   - (object) the box after which to insert the new box\\nISOBoxer.Utils.appendBox = function(parent, box, pos) {\\n  box._offset = parent._cursor.offset;\\n  box._root = (parent._root ? parent._root : parent);\\n  box._raw = parent._raw;\\n  box._parent = parent;\\n\\n  if (pos === -1) {\\n    // The new box is a sub-box of the parent but not added in boxes array,\\n    // for example when the new box is set as an entry (see dref and stsd for example)\\n    return;\\n  }\\n\\n  if (pos === undefined || pos === null) {\\n    parent.boxes.push(box);\\n    return;\\n  }\\n\\n  var index = -1,\\n      type;\\n\\n  if (typeof pos === \\\"number\\\") {\\n    index = pos;\\n  } else {\\n    if (typeof pos === \\\"string\\\") {\\n      type = pos;\\n    } else if (typeof pos === \\\"object\\\" && pos.type) {\\n      type = pos.type;\\n    } else {\\n      parent.boxes.push(box);\\n      return;\\n    }\\n\\n    for (var i = 0; i < parent.boxes.length; i++) {\\n      if (type === parent.boxes[i].type) {\\n        index = i + 1;\\n        break;\\n      }\\n    }\\n  }\\n  parent.boxes.splice(index, 0, box);\\n};\\n\\nif (true) {\\n  exports.parseBuffer     = ISOBoxer.parseBuffer;\\n  exports.addBoxProcessor = ISOBoxer.addBoxProcessor;\\n  exports.createFile      = ISOBoxer.createFile;\\n  exports.createBox       = ISOBoxer.createBox;\\n  exports.createFullBox   = ISOBoxer.createFullBox;\\n  exports.Utils           = ISOBoxer.Utils;\\n}\\n\\nISOBoxer.Cursor = function(initialOffset) {\\n  this.offset = (typeof initialOffset == 'undefined' ? 0 : initialOffset);\\n};\\n\\nvar ISOFile = function(arrayBuffer) {\\n  this._cursor = new ISOBoxer.Cursor();\\n  this.boxes = [];\\n  if (arrayBuffer) {\\n    this._raw = new DataView(arrayBuffer);\\n  }\\n};\\n\\nISOFile.prototype.fetch = function(type) {\\n  var result = this.fetchAll(type, true);\\n  return (result.length ? result[0] : null);\\n};\\n\\nISOFile.prototype.fetchAll = function(type, returnEarly) {\\n  var result = [];\\n  ISOFile._sweep.call(this, type, result, returnEarly);\\n  return result;\\n};\\n\\nISOFile.prototype.parse = function() {\\n  this._cursor.offset = 0;\\n  this.boxes = [];\\n  while (this._cursor.offset < this._raw.byteLength) {\\n    var box = ISOBox.parse(this);\\n\\n    // Box could not be parsed\\n    if (typeof box.type === 'undefined') break;\\n\\n    this.boxes.push(box);\\n  }\\n  return this;\\n};\\n\\nISOFile._sweep = function(type, result, returnEarly) {\\n  if (this.type && this.type == type) result.push(this);\\n  for (var box in this.boxes) {\\n    if (result.length && returnEarly) return;\\n    ISOFile._sweep.call(this.boxes[box], type, result, returnEarly);\\n  }\\n};\\n\\nISOFile.prototype.write = function() {\\n\\n  var length = 0,\\n      i;\\n\\n  for (i = 0; i < this.boxes.length; i++) {\\n    length += this.boxes[i].getLength(false);\\n  }\\n\\n  var bytes = new Uint8Array(length);\\n  this._rawo = new DataView(bytes.buffer);\\n  this.bytes = bytes;\\n  this._cursor.offset = 0;\\n\\n  for (i = 0; i < this.boxes.length; i++) {\\n    this.boxes[i].write();\\n  }\\n\\n  return bytes.buffer;\\n};\\n\\nISOFile.prototype.append = function(box, pos) {\\n  ISOBoxer.Utils.appendBox(this, box, pos);\\n};\\nvar ISOBox = function() {\\n  this._cursor = new ISOBoxer.Cursor();\\n};\\n\\nISOBox.parse = function(parent) {\\n  var newBox = new ISOBox();\\n  newBox._offset = parent._cursor.offset;\\n  newBox._root = (parent._root ? parent._root : parent);\\n  newBox._raw = parent._raw;\\n  newBox._parent = parent;\\n  newBox._parseBox();\\n  parent._cursor.offset = newBox._raw.byteOffset + newBox._raw.byteLength;\\n  return newBox;\\n};\\n\\nISOBox.create = function(type) {\\n  var newBox = new ISOBox();\\n  newBox.type = type;\\n  newBox.boxes = [];\\n  return newBox;\\n};\\n\\nISOBox.prototype._boxContainers = ['dinf', 'edts', 'mdia', 'meco', 'mfra', 'minf', 'moof', 'moov', 'mvex', 'stbl', 'strk', 'traf', 'trak', 'tref', 'udta', 'vttc', 'sinf', 'schi', 'encv', 'enca'];\\n\\nISOBox.prototype._boxProcessors = {};\\n\\n///////////////////////////////////////////////////////////////////////////////////////////////////\\n// Generic read/write functions\\n\\nISOBox.prototype._procField = function (name, type, size) {\\n  if (this._parsing) {\\n    this[name] = this._readField(type, size);\\n  }\\n  else {\\n    this._writeField(type, size, this[name]);\\n  }\\n};\\n\\nISOBox.prototype._procFieldArray = function (name, length, type, size) {\\n  var i;\\n  if (this._parsing) {\\n    this[name] = [];\\n    for (i = 0; i < length; i++) {\\n      this[name][i] = this._readField(type, size);\\n    }\\n  }\\n  else {\\n    for (i = 0; i < this[name].length; i++) {\\n      this._writeField(type, size, this[name][i]);\\n    }\\n  }\\n};\\n\\nISOBox.prototype._procFullBox = function() {\\n  this._procField('version', 'uint', 8);\\n  this._procField('flags', 'uint', 24);\\n};\\n\\nISOBox.prototype._procEntries = function(name, length, fn) {\\n  var i;\\n  if (this._parsing) {\\n    this[name] = [];\\n    for (i = 0; i < length; i++) {\\n      this[name].push({});\\n      fn.call(this, this[name][i]);\\n    }\\n  }\\n  else {\\n    for (i = 0; i < length; i++) {\\n      fn.call(this, this[name][i]);\\n    }\\n  }\\n};\\n\\nISOBox.prototype._procSubEntries = function(entry, name, length, fn) {\\n  var i;\\n  if (this._parsing) {\\n    entry[name] = [];\\n    for (i = 0; i < length; i++) {\\n      entry[name].push({});\\n      fn.call(this, entry[name][i]);\\n    }\\n  }\\n  else {\\n    for (i = 0; i < length; i++) {\\n      fn.call(this, entry[name][i]);\\n    }\\n  }\\n};\\n\\nISOBox.prototype._procEntryField = function (entry, name, type, size) {\\n  if (this._parsing) {\\n    entry[name] = this._readField(type, size);\\n  }\\n  else {\\n    this._writeField(type, size, entry[name]);\\n  }\\n};\\n\\nISOBox.prototype._procSubBoxes = function(name, length) {\\n  var i;\\n  if (this._parsing) {\\n    this[name] = [];\\n    for (i = 0; i < length; i++) {\\n      this[name].push(ISOBox.parse(this));\\n    }\\n  }\\n  else {\\n    for (i = 0; i < length; i++) {\\n      if (this._rawo) {\\n        this[name][i].write();\\n      } else {\\n        this.size += this[name][i].getLength();\\n      }\\n    }\\n  }\\n};\\n\\n///////////////////////////////////////////////////////////////////////////////////////////////////\\n// Read/parse functions\\n\\nISOBox.prototype._readField = function(type, size) {\\n  switch (type) {\\n    case 'uint':\\n      return this._readUint(size);\\n    case 'int':\\n      return this._readInt(size);\\n    case 'template':\\n      return this._readTemplate(size);\\n    case 'string':\\n      return (size === -1) ? this._readTerminatedString() : this._readString(size);\\n    case 'data':\\n      return this._readData(size);\\n    case 'utf8':\\n      return this._readUTF8String();\\n    default:\\n      return -1;\\n  }\\n};\\n\\nISOBox.prototype._readInt = function(size) {\\n  var result = null,\\n      offset = this._cursor.offset - this._raw.byteOffset;\\n  switch(size) {\\n  case 8:\\n    result = this._raw.getInt8(offset);\\n    break;\\n  case 16:\\n    result = this._raw.getInt16(offset);\\n    break;\\n  case 32:\\n    result = this._raw.getInt32(offset);\\n    break;\\n  case 64:\\n    // Warning: JavaScript cannot handle 64-bit integers natively.\\n    // This will give unexpected results for integers >= 2^53\\n    var s1 = this._raw.getInt32(offset);\\n    var s2 = this._raw.getInt32(offset + 4);\\n    result = (s1 * Math.pow(2,32)) + s2;\\n    break;\\n  }\\n  this._cursor.offset += (size >> 3);\\n  return result;\\n};\\n\\nISOBox.prototype._readUint = function(size) {\\n  var result = null,\\n      offset = this._cursor.offset - this._raw.byteOffset,\\n      s1, s2;\\n  switch(size) {\\n  case 8:\\n    result = this._raw.getUint8(offset);\\n    break;\\n  case 16:\\n    result = this._raw.getUint16(offset);\\n    break;\\n  case 24:\\n    s1 = this._raw.getUint16(offset);\\n    s2 = this._raw.getUint8(offset + 2);\\n    result = (s1 << 8) + s2;\\n    break;\\n  case 32:\\n    result = this._raw.getUint32(offset);\\n    break;\\n  case 64:\\n    // Warning: JavaScript cannot handle 64-bit integers natively.\\n    // This will give unexpected results for integers >= 2^53\\n    s1 = this._raw.getUint32(offset);\\n    s2 = this._raw.getUint32(offset + 4);\\n    result = (s1 * Math.pow(2,32)) + s2;\\n    break;\\n  }\\n  this._cursor.offset += (size >> 3);\\n  return result;\\n};\\n\\nISOBox.prototype._readString = function(length) {\\n  var str = '';\\n  for (var c = 0; c < length; c++) {\\n    var char = this._readUint(8);\\n    str += String.fromCharCode(char);\\n  }\\n  return str;\\n};\\n\\nISOBox.prototype._readTemplate = function(size) {\\n  var pre = this._readUint(size / 2);\\n  var post = this._readUint(size / 2);\\n  return pre + (post / Math.pow(2, size / 2));\\n};\\n\\nISOBox.prototype._readTerminatedString = function() {\\n  var str = '';\\n  while (this._cursor.offset - this._offset < this._raw.byteLength) {\\n    var char = this._readUint(8);\\n    if (char === 0) break;\\n    str += String.fromCharCode(char);\\n  }\\n  return str;\\n};\\n\\nISOBox.prototype._readData = function(size) {\\n  var length = (size > 0) ? size : (this._raw.byteLength - (this._cursor.offset - this._offset));\\n  if (length > 0) {\\n    var data = new Uint8Array(this._raw.buffer, this._cursor.offset, length);\\n\\n    this._cursor.offset += length;\\n    return data;\\n  }\\n  else {\\n    return null;\\n  }\\n};\\n\\nISOBox.prototype._readUTF8String = function() {\\n  var length = this._raw.byteLength - (this._cursor.offset - this._offset);\\n  var data = null;\\n  if (length > 0) {\\n    data = new DataView(this._raw.buffer, this._cursor.offset, length);\\n    this._cursor.offset += length;\\n  }\\n \\n  return data ? ISOBoxer.Utils.dataViewToString(data) : data;\\n};\\n\\nISOBox.prototype._parseBox = function() {\\n  this._parsing = true;\\n  this._cursor.offset = this._offset;\\n\\n  // return immediately if there are not enough bytes to read the header\\n  if (this._offset + 8 > this._raw.buffer.byteLength) {\\n    this._root._incomplete = true;\\n    return;\\n  }\\n\\n  this._procField('size', 'uint', 32);\\n  this._procField('type', 'string', 4);\\n\\n  if (this.size === 1)      { this._procField('largesize', 'uint', 64); }\\n  if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\\n\\n  switch(this.size) {\\n  case 0:\\n    this._raw = new DataView(this._raw.buffer, this._offset, (this._raw.byteLength - this._cursor.offset + 8));\\n    break;\\n  case 1:\\n    if (this._offset + this.size > this._raw.buffer.byteLength) {\\n      this._incomplete = true;\\n      this._root._incomplete = true;\\n    } else {\\n      this._raw = new DataView(this._raw.buffer, this._offset, this.largesize);\\n    }\\n    break;\\n  default:\\n    if (this._offset + this.size > this._raw.buffer.byteLength) {\\n      this._incomplete = true;\\n      this._root._incomplete = true;\\n    } else {\\n      this._raw = new DataView(this._raw.buffer, this._offset, this.size);\\n    }\\n  }\\n\\n  // additional parsing\\n  if (!this._incomplete) {\\n    if (this._boxProcessors[this.type]) {\\n      this._boxProcessors[this.type].call(this);\\n    }\\n    if (this._boxContainers.indexOf(this.type) !== -1) {\\n      this._parseContainerBox();\\n    } else{\\n      // Unknown box => read and store box content\\n      this._data = this._readData();\\n    }\\n  }\\n};\\n\\nISOBox.prototype._parseFullBox = function() {\\n  this.version = this._readUint(8);\\n  this.flags = this._readUint(24);\\n};\\n\\nISOBox.prototype._parseContainerBox = function() {\\n  this.boxes = [];\\n  while (this._cursor.offset - this._raw.byteOffset < this._raw.byteLength) {\\n    this.boxes.push(ISOBox.parse(this));\\n  }\\n};\\n\\n///////////////////////////////////////////////////////////////////////////////////////////////////\\n// Write functions\\n\\nISOBox.prototype.append = function(box, pos) {\\n  ISOBoxer.Utils.appendBox(this, box, pos);\\n};\\n\\nISOBox.prototype.getLength = function() {\\n  this._parsing = false;\\n  this._rawo = null;\\n\\n  this.size = 0;\\n  this._procField('size', 'uint', 32);\\n  this._procField('type', 'string', 4);\\n\\n  if (this.size === 1)      { this._procField('largesize', 'uint', 64); }\\n  if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\\n\\n  if (this._boxProcessors[this.type]) {\\n    this._boxProcessors[this.type].call(this);\\n  }\\n\\n  if (this._boxContainers.indexOf(this.type) !== -1) {\\n    for (var i = 0; i < this.boxes.length; i++) {\\n      this.size += this.boxes[i].getLength();\\n    }\\n  } \\n\\n  if (this._data) {\\n    this._writeData(this._data);\\n  }\\n\\n  return this.size;\\n};\\n\\nISOBox.prototype.write = function() {\\n  this._parsing = false;\\n  this._cursor.offset = this._parent._cursor.offset;\\n\\n  switch(this.size) {\\n  case 0:\\n    this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, (this.parent._rawo.byteLength - this._cursor.offset));\\n    break;\\n  case 1:\\n      this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, this.largesize);\\n    break;\\n  default:\\n      this._rawo = new DataView(this._parent._rawo.buffer, this._cursor.offset, this.size);\\n  }\\n\\n  this._procField('size', 'uint', 32);\\n  this._procField('type', 'string', 4);\\n\\n  if (this.size === 1)      { this._procField('largesize', 'uint', 64); }\\n  if (this.type === 'uuid') { this._procFieldArray('usertype', 16, 'uint', 8); }\\n\\n  if (this._boxProcessors[this.type]) {\\n    this._boxProcessors[this.type].call(this);\\n  }\\n\\n  if (this._boxContainers.indexOf(this.type) !== -1) {\\n    for (var i = 0; i < this.boxes.length; i++) {\\n      this.boxes[i].write();\\n    }\\n  } \\n\\n  if (this._data) {\\n    this._writeData(this._data);\\n  }\\n\\n  this._parent._cursor.offset += this.size;\\n\\n  return this.size;\\n};\\n\\nISOBox.prototype._writeInt = function(size, value) {\\n  if (this._rawo) {\\n    var offset = this._cursor.offset - this._rawo.byteOffset;\\n    switch(size) {\\n    case 8:\\n      this._rawo.setInt8(offset, value);\\n      break;\\n    case 16:\\n      this._rawo.setInt16(offset, value);\\n      break;\\n    case 32:\\n      this._rawo.setInt32(offset, value);\\n      break;\\n    case 64:\\n      // Warning: JavaScript cannot handle 64-bit integers natively.\\n      // This will give unexpected results for integers >= 2^53\\n      var s1 = Math.floor(value / Math.pow(2,32));\\n      var s2 = value - (s1 * Math.pow(2,32));\\n      this._rawo.setUint32(offset, s1);\\n      this._rawo.setUint32(offset + 4, s2);\\n      break;\\n    }\\n    this._cursor.offset += (size >> 3);\\n  } else {\\n    this.size += (size >> 3);\\n  }\\n};\\n\\nISOBox.prototype._writeUint = function(size, value) {\\n\\n  if (this._rawo) {\\n    var offset = this._cursor.offset - this._rawo.byteOffset,\\n        s1, s2;\\n    switch(size) {\\n    case 8:\\n      this._rawo.setUint8(offset, value);\\n      break;\\n    case 16:\\n      this._rawo.setUint16(offset, value);\\n      break;\\n    case 24:\\n      s1 = (value & 0xFFFF00) >> 8;\\n      s2 = (value & 0x0000FF);\\n      this._rawo.setUint16(offset, s1);\\n      this._rawo.setUint8(offset + 2, s2);\\n      break;\\n    case 32:\\n      this._rawo.setUint32(offset, value);\\n      break;\\n    case 64:\\n      // Warning: JavaScript cannot handle 64-bit integers natively.\\n      // This will give unexpected results for integers >= 2^53\\n      s1 = Math.floor(value / Math.pow(2,32));\\n      s2 = value - (s1 * Math.pow(2,32));\\n      this._rawo.setUint32(offset, s1);\\n      this._rawo.setUint32(offset + 4, s2);\\n      break;\\n    }\\n    this._cursor.offset += (size >> 3);\\n  } else {\\n    this.size += (size >> 3);\\n  }\\n};\\n\\nISOBox.prototype._writeString = function(size, str) {\\n  for (var c = 0; c < size; c++) {\\n    this._writeUint(8, str.charCodeAt(c));\\n  }\\n};\\n\\nISOBox.prototype._writeTerminatedString = function(str) {\\n  if (str.length === 0) {\\n    return;\\n  }\\n  for (var c = 0; c < str.length; c++) {\\n    this._writeUint(8, str.charCodeAt(c));\\n  }\\n  this._writeUint(8, 0);\\n};\\n\\nISOBox.prototype._writeTemplate = function(size, value) {\\n  var pre = Math.floor(value);\\n  var post = (value - pre) * Math.pow(2, size / 2);\\n  this._writeUint(size / 2, pre);\\n  this._writeUint(size / 2, post);\\n};\\n\\nISOBox.prototype._writeData = function(data) {\\n  var i;\\n  //data to copy\\n  if (data) {\\n    if (this._rawo) {\\n      //Array and Uint8Array has also to be managed\\n      if (data instanceof Array) {\\n        var offset = this._cursor.offset - this._rawo.byteOffset;\\n        for (var i = 0; i < data.length; i++) {\\n          this._rawo.setInt8(offset + i, data[i]);\\n        }\\n        this._cursor.offset += data.length;\\n      } \\n\\n      if (data instanceof Uint8Array) {\\n        this._root.bytes.set(data, this._cursor.offset);\\n        this._cursor.offset += data.length;\\n      }\\n\\n    } else {\\n      //nothing to copy only size to compute\\n      this.size += data.length;\\n    }\\n  }\\n};\\n\\nISOBox.prototype._writeUTF8String = function(string) {\\n  var u = ISOBoxer.Utils.utf8ToByteArray(string);\\n  if (this._rawo) {\\n    var dataView = new DataView(this._rawo.buffer, this._cursor.offset, u.length);\\n    for (var i = 0; i < u.length; i++) {\\n      dataView.setUint8(i, u[i]);\\n    }\\n  } else {\\n    this.size += u.length;\\n  }\\n};\\n\\nISOBox.prototype._writeField = function(type, size, value) {\\n  switch (type) {\\n  case 'uint':\\n    this._writeUint(size, value);\\n    break;\\n  case 'int':\\n    this._writeInt(size, value);\\n    break;\\n  case 'template':\\n    this._writeTemplate(size, value);\\n    break;\\n  case 'string':\\n      if (size == -1) {\\n        this._writeTerminatedString(value);\\n      } else {\\n        this._writeString(size, value);\\n      }\\n      break;\\n  case 'data':\\n    this._writeData(value);\\n    break;\\n  case 'utf8':\\n    this._writeUTF8String(value);\\n    break;\\n  default:\\n    break;\\n  }\\n};\\n\\n// ISO/IEC 14496-15:2014 - avc1 box\\nISOBox.prototype._boxProcessors['avc1'] = ISOBox.prototype._boxProcessors['encv'] = function() {\\n  // SampleEntry fields\\n  this._procFieldArray('reserved1', 6,    'uint', 8);\\n  this._procField('data_reference_index', 'uint', 16);\\n  // VisualSampleEntry fields\\n  this._procField('pre_defined1',         'uint',     16);\\n  this._procField('reserved2',            'uint',     16);\\n  this._procFieldArray('pre_defined2', 3, 'uint',     32);\\n  this._procField('width',                'uint',     16);\\n  this._procField('height',               'uint',     16);\\n  this._procField('horizresolution',      'template', 32);\\n  this._procField('vertresolution',       'template', 32);\\n  this._procField('reserved3',            'uint',     32);\\n  this._procField('frame_count',          'uint',     16);\\n  this._procFieldArray('compressorname', 32,'uint',    8);\\n  this._procField('depth',                'uint',     16);\\n  this._procField('pre_defined3',         'int',      16);\\n  // AVCSampleEntry fields\\n  this._procField('config', 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box\\nISOBox.prototype._boxProcessors['dref'] = function() {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procSubBoxes('entries', this.entry_count);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.6.6 Edit List Box\\nISOBox.prototype._boxProcessors['elst'] = function() {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procEntries('entries', this.entry_count, function(entry) {\\n    this._procEntryField(entry, 'segment_duration',     'uint', (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'media_time',           'int',  (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'media_rate_integer',   'int',  16);\\n    this._procEntryField(entry, 'media_rate_fraction',  'int',  16);\\n  });\\n};\\n\\n// ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box\\nISOBox.prototype._boxProcessors['emsg'] = function() {\\n  this._procFullBox();\\n  if (this.version == 1) {\\n    this._procField('timescale',                'uint',   32);\\n    this._procField('presentation_time',        'uint',   64);\\n    this._procField('event_duration',           'uint',   32);\\n    this._procField('id',                       'uint',   32);\\n    this._procField('scheme_id_uri',            'string', -1);\\n    this._procField('value',                    'string', -1);\\n  } else {\\n    this._procField('scheme_id_uri',            'string', -1);\\n    this._procField('value',                    'string', -1);\\n    this._procField('timescale',                'uint',   32);\\n    this._procField('presentation_time_delta',  'uint',   32);\\n    this._procField('event_duration',           'uint',   32);\\n    this._procField('id',                       'uint',   32);\\n  }\\n  this._procField('message_data',             'data',   -1);\\n};\\n// ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box\\nISOBox.prototype._boxProcessors['free'] = ISOBox.prototype._boxProcessors['skip'] = function() {\\n  this._procField('data', 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.12.2 Original Format Box\\nISOBox.prototype._boxProcessors['frma'] = function() {\\n  this._procField('data_format', 'uint', 32);\\n};\\n// ISO/IEC 14496-12:2012 - 4.3 File Type Box / 8.16.2 Segment Type Box\\nISOBox.prototype._boxProcessors['ftyp'] =\\nISOBox.prototype._boxProcessors['styp'] = function() {\\n  this._procField('major_brand', 'string', 4);\\n  this._procField('minor_version', 'uint', 32);\\n  var nbCompatibleBrands = -1;\\n  if (this._parsing) {\\n    nbCompatibleBrands = (this._raw.byteLength - (this._cursor.offset - this._raw.byteOffset)) / 4;\\n  }\\n  this._procFieldArray('compatible_brands', nbCompatibleBrands, 'string', 4);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.3 Handler Reference Box\\nISOBox.prototype._boxProcessors['hdlr'] = function() {\\n  this._procFullBox();\\n  this._procField('pre_defined',      'uint',   32);\\n  this._procField('handler_type',     'string', 4);\\n  this._procFieldArray('reserved', 3, 'uint', 32);\\n  this._procField('name',             'string', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box\\nISOBox.prototype._boxProcessors['mdat'] = function() {\\n  this._procField('data', 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box\\nISOBox.prototype._boxProcessors['mdhd'] = function() {\\n  this._procFullBox();\\n  this._procField('creation_time',      'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('modification_time',  'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('timescale',          'uint', 32);\\n  this._procField('duration',           'uint', (this.version == 1) ? 64 : 32);\\n  if (!this._parsing && typeof this.language === 'string') {\\n    // In case of writing and language has been set as a string, then convert it into char codes array\\n    this.language = ((this.language.charCodeAt(0) - 0x60) << 10) |\\n                    ((this.language.charCodeAt(1) - 0x60) << 5) |\\n                    ((this.language.charCodeAt(2) - 0x60));\\n  }\\n  this._procField('language',           'uint', 16);\\n  if (this._parsing) {\\n    this.language = String.fromCharCode(((this.language >> 10) & 0x1F) + 0x60,\\n                                        ((this.language >> 5) & 0x1F) + 0x60,\\n                                        (this.language & 0x1F) + 0x60);\\n  }\\n  this._procField('pre_defined',        'uint', 16);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box\\nISOBox.prototype._boxProcessors['mehd'] = function() {\\n  this._procFullBox();\\n  this._procField('fragment_duration', 'uint', (this.version == 1) ? 64 : 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box\\nISOBox.prototype._boxProcessors['mfhd'] = function() {\\n  this._procFullBox();\\n  this._procField('sequence_number', 'uint', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Box\\nISOBox.prototype._boxProcessors['mfro'] = function() {\\n  this._procFullBox();\\n  this._procField('mfra_size', 'uint', 32); // Called mfra_size to distinguish from the normal \\\"size\\\" attribute of a box\\n};\\n\\n\\n// ISO/IEC 14496-12:2012 - 8.5.2.2 mp4a box (use AudioSampleEntry definition and naming)\\nISOBox.prototype._boxProcessors['mp4a'] = ISOBox.prototype._boxProcessors['enca'] = function() {\\n  // SampleEntry fields\\n  this._procFieldArray('reserved1', 6,    'uint', 8);\\n  this._procField('data_reference_index', 'uint', 16);\\n  // AudioSampleEntry fields\\n  this._procFieldArray('reserved2', 2,    'uint', 32);\\n  this._procField('channelcount',         'uint', 16);\\n  this._procField('samplesize',           'uint', 16);\\n  this._procField('pre_defined',          'uint', 16);\\n  this._procField('reserved3',            'uint', 16);\\n  this._procField('samplerate',           'template', 32);\\n  // ESDescriptor fields\\n  this._procField('esds',                 'data', -1);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box\\nISOBox.prototype._boxProcessors['mvhd'] = function() {\\n  this._procFullBox();\\n  this._procField('creation_time',      'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('modification_time',  'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('timescale',          'uint',     32);\\n  this._procField('duration',           'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('rate',               'template', 32);\\n  this._procField('volume',             'template', 16);\\n  this._procField('reserved1',          'uint',  16);\\n  this._procFieldArray('reserved2', 2,  'uint',     32);\\n  this._procFieldArray('matrix', 9,     'template', 32);\\n  this._procFieldArray('pre_defined', 6,'uint',   32);\\n  this._procField('next_track_ID',      'uint',     32);\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Cue Payload Box.\\nISOBox.prototype._boxProcessors['payl'] = function() {\\n  this._procField('cue_text', 'utf8');\\n};\\n\\n//ISO/IEC 23001-7:2011 - 8.1 Protection System Specific Header Box\\nISOBox.prototype._boxProcessors['pssh'] = function() {\\n  this._procFullBox();\\n  \\n  this._procFieldArray('SystemID', 16, 'uint', 8);\\n  this._procField('DataSize', 'uint', 32);\\n  this._procFieldArray('Data', this.DataSize, 'uint', 8);\\n};\\n// ISO/IEC 14496-12:2012 - 8.12.5 Scheme Type Box\\nISOBox.prototype._boxProcessors['schm'] = function() {\\n    this._procFullBox();\\n    \\n    this._procField('scheme_type', 'uint', 32);\\n    this._procField('scheme_version', 'uint', 32);\\n\\n    if (this.flags & 0x000001) {\\n        this._procField('scheme_uri', 'string', -1);\\n    }\\n};\\n// ISO/IEC 14496-12:2012 - 8.6.4.1 sdtp box \\nISOBox.prototype._boxProcessors['sdtp'] = function() {\\n  this._procFullBox();\\n\\n  var sample_count = -1;\\n  if (this._parsing) {\\n    sample_count = (this._raw.byteLength - (this._cursor.offset - this._raw.byteOffset));\\n  }\\n\\n  this._procFieldArray('sample_dependency_table', sample_count, 'uint', 8);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box\\nISOBox.prototype._boxProcessors['sidx'] = function() {\\n  this._procFullBox();\\n  this._procField('reference_ID', 'uint', 32);\\n  this._procField('timescale', 'uint', 32);\\n  this._procField('earliest_presentation_time', 'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('first_offset', 'uint', (this.version == 1) ? 64 : 32);\\n  this._procField('reserved', 'uint', 16);\\n  this._procField('reference_count', 'uint', 16);\\n  this._procEntries('references', this.reference_count, function(entry) {\\n    if (!this._parsing) {\\n      entry.reference  = (entry.reference_type  & 0x00000001) << 31;\\n      entry.reference |= (entry.referenced_size & 0x7FFFFFFF);\\n      entry.sap  = (entry.starts_with_SAP & 0x00000001) << 31;\\n      entry.sap |= (entry.SAP_type        & 0x00000003) << 28;\\n      entry.sap |= (entry.SAP_delta_time  & 0x0FFFFFFF);\\n    }\\n    this._procEntryField(entry, 'reference', 'uint', 32);\\n    this._procEntryField(entry, 'subsegment_duration', 'uint', 32);\\n    this._procEntryField(entry, 'sap', 'uint', 32);\\n    if (this._parsing) {\\n      entry.reference_type = (entry.reference >> 31) & 0x00000001;\\n      entry.referenced_size = entry.reference & 0x7FFFFFFF;\\n      entry.starts_with_SAP  = (entry.sap >> 31) & 0x00000001;\\n      entry.SAP_type = (entry.sap >> 28) & 0x00000007;\\n      entry.SAP_delta_time = (entry.sap  & 0x0FFFFFFF);\\n    }\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.5.3 Sound Media Header Box\\nISOBox.prototype._boxProcessors['smhd'] = function() {\\n  this._procFullBox();\\n  this._procField('balance',  'uint', 16);\\n  this._procField('reserved', 'uint', 16);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box\\nISOBox.prototype._boxProcessors['ssix'] = function() {\\n  this._procFullBox();\\n  this._procField('subsegment_count', 'uint', 32);\\n  this._procEntries('subsegments', this.subsegment_count, function(subsegment) {\\n    this._procEntryField(subsegment, 'ranges_count', 'uint', 32);\\n    this._procSubEntries(subsegment, 'ranges', subsegment.ranges_count, function(range) {\\n      this._procEntryField(range, 'level', 'uint', 8);\\n      this._procEntryField(range, 'range_size', 'uint', 24);\\n    });\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.5.2 Sample Description Box\\nISOBox.prototype._boxProcessors['stsd'] = function() {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procSubBoxes('entries', this.entry_count);\\n};\\n\\n// ISO/IEC 14496-12:2015 - 8.7.7 Sub-Sample Information Box\\nISOBox.prototype._boxProcessors['subs'] = function () {\\n  this._procFullBox();\\n  this._procField('entry_count', 'uint', 32);\\n  this._procEntries('entries', this.entry_count, function(entry) {\\n    this._procEntryField(entry, 'sample_delta', 'uint', 32);\\n    this._procEntryField(entry, 'subsample_count', 'uint', 16);\\n    this._procSubEntries(entry, 'subsamples', entry.subsample_count, function(subsample) {\\n      this._procEntryField(subsample, 'subsample_size', 'uint', (this.version === 1) ? 32 : 16);\\n      this._procEntryField(subsample, 'subsample_priority', 'uint', 8);\\n      this._procEntryField(subsample, 'discardable', 'uint', 8);\\n      this._procEntryField(subsample, 'codec_specific_parameters', 'uint', 32);\\n    });\\n  });\\n};\\n\\n//ISO/IEC 23001-7:2011 - 8.2 Track Encryption Box\\nISOBox.prototype._boxProcessors['tenc'] = function() {\\n    this._procFullBox();\\n\\n    this._procField('default_IsEncrypted', 'uint', 24);\\n    this._procField('default_IV_size', 'uint', 8);\\n    this._procFieldArray('default_KID', 16,    'uint', 8);\\n };\\n\\n// ISO/IEC 14496-12:2012 - 8.8.12 Track Fragmnent Decode Time\\nISOBox.prototype._boxProcessors['tfdt'] = function() {\\n  this._procFullBox();\\n  this._procField('baseMediaDecodeTime', 'uint', (this.version == 1) ? 64 : 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box\\nISOBox.prototype._boxProcessors['tfhd'] = function() {\\n  this._procFullBox();\\n  this._procField('track_ID', 'uint', 32);\\n  if (this.flags & 0x01) this._procField('base_data_offset',          'uint', 64);\\n  if (this.flags & 0x02) this._procField('sample_description_offset', 'uint', 32);\\n  if (this.flags & 0x08) this._procField('default_sample_duration',   'uint', 32);\\n  if (this.flags & 0x10) this._procField('default_sample_size',       'uint', 32);\\n  if (this.flags & 0x20) this._procField('default_sample_flags',      'uint', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box\\nISOBox.prototype._boxProcessors['tfra'] = function() {\\n  this._procFullBox();\\n  this._procField('track_ID', 'uint', 32);\\n  if (!this._parsing) {\\n    this.reserved = 0;\\n    this.reserved |= (this.length_size_of_traf_num  & 0x00000030) << 4;\\n    this.reserved |= (this.length_size_of_trun_num  & 0x0000000C) << 2;\\n    this.reserved |= (this.length_size_of_sample_num  & 0x00000003);\\n  }\\n  this._procField('reserved', 'uint', 32);\\n  if (this._parsing) {\\n    this.length_size_of_traf_num = (this.reserved & 0x00000030) >> 4;\\n    this.length_size_of_trun_num = (this.reserved & 0x0000000C) >> 2;\\n    this.length_size_of_sample_num = (this.reserved & 0x00000003);\\n  }\\n  this._procField('number_of_entry', 'uint', 32);\\n  this._procEntries('entries', this.number_of_entry, function(entry) {\\n    this._procEntryField(entry, 'time', 'uint', (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'moof_offset', 'uint', (this.version === 1) ? 64 : 32);\\n    this._procEntryField(entry, 'traf_number', 'uint', (this.length_size_of_traf_num + 1) * 8);\\n    this._procEntryField(entry, 'trun_number', 'uint', (this.length_size_of_trun_num + 1) * 8);\\n    this._procEntryField(entry, 'sample_number', 'uint', (this.length_size_of_sample_num + 1) * 8);\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.3.2 Track Header Box\\nISOBox.prototype._boxProcessors['tkhd'] = function() {\\n  this._procFullBox();\\n  this._procField('creation_time',      'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('modification_time',  'uint',     (this.version == 1) ? 64 : 32);\\n  this._procField('track_ID',           'uint',     32);\\n  this._procField('reserved1',          'uint',     32);\\n  this._procField('duration',           'uint',     (this.version == 1) ? 64 : 32);\\n  this._procFieldArray('reserved2', 2,  'uint',     32);\\n  this._procField('layer',              'uint',     16);\\n  this._procField('alternate_group',    'uint',     16);\\n  this._procField('volume',             'template', 16);\\n  this._procField('reserved3',          'uint',     16);\\n  this._procFieldArray('matrix', 9,     'template', 32);\\n  this._procField('width',              'template', 32);\\n  this._procField('height',             'template', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.3 Track Extends Box\\nISOBox.prototype._boxProcessors['trex'] = function() {\\n  this._procFullBox();\\n  this._procField('track_ID',                         'uint', 32);\\n  this._procField('default_sample_description_index', 'uint', 32);\\n  this._procField('default_sample_duration',          'uint', 32);\\n  this._procField('default_sample_size',              'uint', 32);\\n  this._procField('default_sample_flags',             'uint', 32);\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box\\n// Note: the 'trun' box has a direct relation to the 'tfhd' box for defaults.\\n// These defaults are not set explicitly here, but are left to resolve for the user.\\nISOBox.prototype._boxProcessors['trun'] = function() {\\n  this._procFullBox();\\n  this._procField('sample_count', 'uint', 32);\\n  if (this.flags & 0x1) this._procField('data_offset', 'int', 32);\\n  if (this.flags & 0x4) this._procField('first_sample_flags', 'uint', 32);\\n  this._procEntries('samples', this.sample_count, function(sample) {\\n    if (this.flags & 0x100) this._procEntryField(sample, 'sample_duration', 'uint', 32);\\n    if (this.flags & 0x200) this._procEntryField(sample, 'sample_size', 'uint', 32);\\n    if (this.flags & 0x400) this._procEntryField(sample, 'sample_flags', 'uint', 32);\\n    if (this.flags & 0x800) this._procEntryField(sample, 'sample_composition_time_offset', (this.version === 1) ? 'int' : 'uint',  32);\\n  });\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.7.2 Data Reference Box\\nISOBox.prototype._boxProcessors['url '] = ISOBox.prototype._boxProcessors['urn '] = function() {\\n  this._procFullBox();\\n  if (this.type === 'urn ') {\\n    this._procField('name', 'string', -1);\\n  }\\n  this._procField('location', 'string', -1);\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Source Label Box\\nISOBox.prototype._boxProcessors['vlab'] = function() {\\n  this._procField('source_label', 'utf8');\\n};\\n\\n// ISO/IEC 14496-12:2012 - 8.4.5.2 Video Media Header Box\\nISOBox.prototype._boxProcessors['vmhd'] = function() {\\n  this._procFullBox();\\n  this._procField('graphicsmode', 'uint', 16);\\n  this._procFieldArray('opcolor', 3, 'uint', 16);\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Configuration Box\\nISOBox.prototype._boxProcessors['vttC'] = function() {\\n  this._procField('config', 'utf8');\\n};\\n\\n// ISO/IEC 14496-30:2014 - WebVTT Empty Sample Box\\nISOBox.prototype._boxProcessors['vtte'] = function() {\\n  // Nothing should happen here.\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/codem-isoboxer/dist/iso_boxer.js?\")},\"../node_modules/core-util-is/lib/util.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// NOTE: These type checking functions intentionally don't use `instanceof`\\n// because it is fragile and can be easily faked with `Object.create()`.\\n\\nfunction isArray(arg) {\\n  if (Array.isArray) {\\n    return Array.isArray(arg);\\n  }\\n  return objectToString(arg) === '[object Array]';\\n}\\nexports.isArray = isArray;\\n\\nfunction isBoolean(arg) {\\n  return typeof arg === 'boolean';\\n}\\nexports.isBoolean = isBoolean;\\n\\nfunction isNull(arg) {\\n  return arg === null;\\n}\\nexports.isNull = isNull;\\n\\nfunction isNullOrUndefined(arg) {\\n  return arg == null;\\n}\\nexports.isNullOrUndefined = isNullOrUndefined;\\n\\nfunction isNumber(arg) {\\n  return typeof arg === 'number';\\n}\\nexports.isNumber = isNumber;\\n\\nfunction isString(arg) {\\n  return typeof arg === 'string';\\n}\\nexports.isString = isString;\\n\\nfunction isSymbol(arg) {\\n  return typeof arg === 'symbol';\\n}\\nexports.isSymbol = isSymbol;\\n\\nfunction isUndefined(arg) {\\n  return arg === void 0;\\n}\\nexports.isUndefined = isUndefined;\\n\\nfunction isRegExp(re) {\\n  return objectToString(re) === '[object RegExp]';\\n}\\nexports.isRegExp = isRegExp;\\n\\nfunction isObject(arg) {\\n  return typeof arg === 'object' && arg !== null;\\n}\\nexports.isObject = isObject;\\n\\nfunction isDate(d) {\\n  return objectToString(d) === '[object Date]';\\n}\\nexports.isDate = isDate;\\n\\nfunction isError(e) {\\n  return (objectToString(e) === '[object Error]' || e instanceof Error);\\n}\\nexports.isError = isError;\\n\\nfunction isFunction(arg) {\\n  return typeof arg === 'function';\\n}\\nexports.isFunction = isFunction;\\n\\nfunction isPrimitive(arg) {\\n  return arg === null ||\\n         typeof arg === 'boolean' ||\\n         typeof arg === 'number' ||\\n         typeof arg === 'string' ||\\n         typeof arg === 'symbol' ||  // ES6 symbol\\n         typeof arg === 'undefined';\\n}\\nexports.isPrimitive = isPrimitive;\\n\\nexports.isBuffer = Buffer.isBuffer;\\n\\nfunction objectToString(o) {\\n  return Object.prototype.toString.call(o);\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/node_modules/buffer/index.js */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/core-util-is/lib/util.js?\")},\"../node_modules/dashjs/build/es5/externals/base64.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/* $Date: 2007-06-12 18:02:31 $ */// from: http://bannister.us/weblog/2007/06/09/simple-base64-encodedecode-javascript/\\n// Handles encode/decode of ASCII and Unicode strings.\\nvar UTF8={};UTF8.encode=function(s){var u=[];for(var i=0;i<s.length;++i){var c=s.charCodeAt(i);if(c<0x80){u.push(c);}else if(c<0x800){u.push(0xC0|c>>6);u.push(0x80|63&c);}else if(c<0x10000){u.push(0xE0|c>>12);u.push(0x80|63&c>>6);u.push(0x80|63&c);}else{u.push(0xF0|c>>18);u.push(0x80|63&c>>12);u.push(0x80|63&c>>6);u.push(0x80|63&c);}}return u;};UTF8.decode=function(u){var a=[];var i=0;while(i<u.length){var v=u[i++];if(v<0x80){// no need to mask byte\\n}else if(v<0xE0){v=(31&v)<<6;v|=63&u[i++];}else if(v<0xF0){v=(15&v)<<12;v|=(63&u[i++])<<6;v|=63&u[i++];}else{v=(7&v)<<18;v|=(63&u[i++])<<12;v|=(63&u[i++])<<6;v|=63&u[i++];}a.push(String.fromCharCode(v));}return a.join('');};var BASE64={};(function(T){var encodeArray=function encodeArray(u){var i=0;var a=[];var n=0|u.length/3;while(0<n--){var v=(u[i]<<16)+(u[i+1]<<8)+u[i+2];i+=3;a.push(T.charAt(63&v>>18));a.push(T.charAt(63&v>>12));a.push(T.charAt(63&v>>6));a.push(T.charAt(63&v));}if(2==u.length-i){var v=(u[i]<<16)+(u[i+1]<<8);a.push(T.charAt(63&v>>18));a.push(T.charAt(63&v>>12));a.push(T.charAt(63&v>>6));a.push('=');}else if(1==u.length-i){var v=u[i]<<16;a.push(T.charAt(63&v>>18));a.push(T.charAt(63&v>>12));a.push('==');}return a.join('');};var R=function(){var a=[];for(var i=0;i<T.length;++i){a[T.charCodeAt(i)]=i;}a['='.charCodeAt(0)]=0;return a;}();var decodeArray=function decodeArray(s){var i=0;var u=[];var n=0|s.length/4;while(0<n--){var v=(R[s.charCodeAt(i)]<<18)+(R[s.charCodeAt(i+1)]<<12)+(R[s.charCodeAt(i+2)]<<6)+R[s.charCodeAt(i+3)];u.push(255&v>>16);u.push(255&v>>8);u.push(255&v);i+=4;}if(u){if('='==s.charAt(i-2)){u.pop();u.pop();}else if('='==s.charAt(i-1)){u.pop();}}return u;};var ASCII={};ASCII.encode=function(s){var u=[];for(var i=0;i<s.length;++i){u.push(s.charCodeAt(i));}return u;};ASCII.decode=function(u){for(var i=0;i<s.length;++i){a[i]=String.fromCharCode(a[i]);}return a.join('');};BASE64.decodeArray=function(s){var u=decodeArray(s);return new Uint8Array(u);};BASE64.encodeASCII=function(s){var u=ASCII.encode(s);return encodeArray(u);};BASE64.decodeASCII=function(s){var a=decodeArray(s);return ASCII.decode(a);};BASE64.encode=function(s){var u=UTF8.encode(s);return encodeArray(u);};BASE64.decode=function(s){var u=decodeArray(s);return UTF8.decode(u);};})(\\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\");/*The following polyfills are not used in dash.js but have caused multiplayer integration issues.\\n Therefore commenting them out.\\nif (undefined === btoa) {\\n    var btoa = BASE64.encode;\\n}\\nif (undefined === atob) {\\n    var atob = BASE64.decode;\\n}\\n*/if(true){exports.decode=BASE64.decode;exports.decodeArray=BASE64.decodeArray;exports.encode=BASE64.encode;exports.encodeASCII=BASE64.encodeASCII;}\\n//# sourceMappingURL=base64.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/externals/base64.js?\")},\"../node_modules/dashjs/build/es5/externals/cea608-parser.js\":function(module,exports,__webpack_require__){\"use strict\";eval('/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2015-2016, DASH Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  1. Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  2. Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */(function(exports){\"use strict\";/**\\n     *  Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\\n     */var specialCea608CharsCodes={0x2a:0xe1,// lowercase a, acute accent\\n0x5c:0xe9,// lowercase e, acute accent\\n0x5e:0xed,// lowercase i, acute accent\\n0x5f:0xf3,// lowercase o, acute accent\\n0x60:0xfa,// lowercase u, acute accent\\n0x7b:0xe7,// lowercase c with cedilla\\n0x7c:0xf7,// division symbol\\n0x7d:0xd1,// uppercase N tilde\\n0x7e:0xf1,// lowercase n tilde\\n0x7f:0x2588,// Full block\\n// THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\\n// THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\\n// THIS MEANS THAT \\\\x50 MUST BE ADDED TO THE VALUES\\n0x80:0xae,// Registered symbol (R)\\n0x81:0xb0,// degree sign\\n0x82:0xbd,// 1/2 symbol\\n0x83:0xbf,// Inverted (open) question mark\\n0x84:0x2122,// Trademark symbol (TM)\\n0x85:0xa2,// Cents symbol\\n0x86:0xa3,// Pounds sterling\\n0x87:0x266a,// Music 8\\'th note\\n0x88:0xe0,// lowercase a, grave accent\\n0x89:0x20,// transparent space (regular)\\n0x8a:0xe8,// lowercase e, grave accent\\n0x8b:0xe2,// lowercase a, circumflex accent\\n0x8c:0xea,// lowercase e, circumflex accent\\n0x8d:0xee,// lowercase i, circumflex accent\\n0x8e:0xf4,// lowercase o, circumflex accent\\n0x8f:0xfb,// lowercase u, circumflex accent\\n// THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\\n// THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\\n0x90:0xc1,// capital letter A with acute\\n0x91:0xc9,// capital letter E with acute\\n0x92:0xd3,// capital letter O with acute\\n0x93:0xda,// capital letter U with acute\\n0x94:0xdc,// capital letter U with diaresis\\n0x95:0xfc,// lowercase letter U with diaeresis\\n0x96:0x2018,// opening single quote\\n0x97:0xa1,// inverted exclamation mark\\n0x98:0x2a,// asterisk\\n0x99:0x2019,// closing single quote\\n0x9a:0x2501,// box drawings heavy horizontal\\n0x9b:0xa9,// copyright sign\\n0x9c:0x2120,// Service mark\\n0x9d:0x2022,// (round) bullet\\n0x9e:0x201c,// Left double quotation mark\\n0x9f:0x201d,// Right double quotation mark\\n0xa0:0xc0,// uppercase A, grave accent\\n0xa1:0xc2,// uppercase A, circumflex\\n0xa2:0xc7,// uppercase C with cedilla\\n0xa3:0xc8,// uppercase E, grave accent\\n0xa4:0xca,// uppercase E, circumflex\\n0xa5:0xcb,// capital letter E with diaresis\\n0xa6:0xeb,// lowercase letter e with diaresis\\n0xa7:0xce,// uppercase I, circumflex\\n0xa8:0xcf,// uppercase I, with diaresis\\n0xa9:0xef,// lowercase i, with diaresis\\n0xaa:0xd4,// uppercase O, circumflex\\n0xab:0xd9,// uppercase U, grave accent\\n0xac:0xf9,// lowercase u, grave accent\\n0xad:0xdb,// uppercase U, circumflex\\n0xae:0xab,// left-pointing double angle quotation mark\\n0xaf:0xbb,// right-pointing double angle quotation mark\\n// THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\\n// THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\\n0xb0:0xc3,// Uppercase A, tilde\\n0xb1:0xe3,// Lowercase a, tilde\\n0xb2:0xcd,// Uppercase I, acute accent\\n0xb3:0xcc,// Uppercase I, grave accent\\n0xb4:0xec,// Lowercase i, grave accent\\n0xb5:0xd2,// Uppercase O, grave accent\\n0xb6:0xf2,// Lowercase o, grave accent\\n0xb7:0xd5,// Uppercase O, tilde\\n0xb8:0xf5,// Lowercase o, tilde\\n0xb9:0x7b,// Open curly brace\\n0xba:0x7d,// Closing curly brace\\n0xbb:0x5c,// Backslash\\n0xbc:0x5e,// Caret\\n0xbd:0x5f,// Underscore\\n0xbe:0x7c,// Pipe (vertical line)\\n0xbf:0x223c,// Tilde operator\\n0xc0:0xc4,// Uppercase A, umlaut\\n0xc1:0xe4,// Lowercase A, umlaut\\n0xc2:0xd6,// Uppercase O, umlaut\\n0xc3:0xf6,// Lowercase o, umlaut\\n0xc4:0xdf,// Esszett (sharp S)\\n0xc5:0xa5,// Yen symbol\\n0xc6:0xa4,// Generic currency sign\\n0xc7:0x2503,// Box drawings heavy vertical\\n0xc8:0xc5,// Uppercase A, ring\\n0xc9:0xe5,// Lowercase A, ring\\n0xca:0xd8,// Uppercase O, stroke\\n0xcb:0xf8,// Lowercase o, strok\\n0xcc:0x250f,// Box drawings heavy down and right\\n0xcd:0x2513,// Box drawings heavy down and left\\n0xce:0x2517,// Box drawings heavy up and right\\n0xcf:0x251b// Box drawings heavy up and left\\n};/**\\n     * Get Unicode Character from CEA-608 byte code\\n     */var getCharForByte=function getCharForByte(byte){var charCode=byte;if(specialCea608CharsCodes.hasOwnProperty(byte)){charCode=specialCea608CharsCodes[byte];}return String.fromCharCode(charCode);};var NR_ROWS=15,NR_COLS=32;// Tables to look up row from PAC data\\nvar rowsLowCh1={0x11:1,0x12:3,0x15:5,0x16:7,0x17:9,0x10:11,0x13:12,0x14:14};var rowsHighCh1={0x11:2,0x12:4,0x15:6,0x16:8,0x17:10,0x13:13,0x14:15};var rowsLowCh2={0x19:1,0x1A:3,0x1D:5,0x1E:7,0x1F:9,0x18:11,0x1B:12,0x1C:14};var rowsHighCh2={0x19:2,0x1A:4,0x1D:6,0x1E:8,0x1F:10,0x1B:13,0x1C:15};var backgroundColors=[\\'white\\',\\'green\\',\\'blue\\',\\'cyan\\',\\'red\\',\\'yellow\\',\\'magenta\\',\\'black\\',\\'transparent\\'];/**\\n     * Simple logger class to be able to write with time-stamps and filter on level.\\n     */var logger={verboseFilter:{\\'DATA\\':3,\\'DEBUG\\':3,\\'INFO\\':2,\\'WARNING\\':2,\\'TEXT\\':1,\\'ERROR\\':0},time:null,verboseLevel:0,// Only write errors\\nsetTime:function setTime(newTime){this.time=newTime;},log:function log(severity,msg){var minLevel=this.verboseFilter[severity];if(this.verboseLevel>=minLevel){console.log(this.time+\" [\"+severity+\"] \"+msg);}}};var numArrayToHexArray=function numArrayToHexArray(numArray){var hexArray=[];for(var j=0;j<numArray.length;j++){hexArray.push(numArray[j].toString(16));}return hexArray;};/**\\n     * State of CEA-608 pen or character\\n     * @constructor\\n     */var PenState=function PenState(foreground,underline,italics,background,flash){this.foreground=foreground||\"white\";this.underline=underline||false;this.italics=italics||false;this.background=background||\"black\";this.flash=flash||false;};PenState.prototype={reset:function reset(){this.foreground=\"white\";this.underline=false;this.italics=false;this.background=\"black\";this.flash=false;},setStyles:function setStyles(styles){var attribs=[\"foreground\",\"underline\",\"italics\",\"background\",\"flash\"];for(var i=0;i<attribs.length;i++){var style=attribs[i];if(styles.hasOwnProperty(style)){this[style]=styles[style];}}},isDefault:function isDefault(){return this.foreground===\"white\"&&!this.underline&&!this.italics&&this.background===\"black\"&&!this.flash;},equals:function equals(other){return this.foreground===other.foreground&&this.underline===other.underline&&this.italics===other.italics&&this.background===other.background&&this.flash===other.flash;},copy:function copy(newPenState){this.foreground=newPenState.foreground;this.underline=newPenState.underline;this.italics=newPenState.italics;this.background=newPenState.background;this.flash=newPenState.flash;},toString:function toString(){return\"color=\"+this.foreground+\", underline=\"+this.underline+\", italics=\"+this.italics+\", background=\"+this.background+\", flash=\"+this.flash;}};/**\\n     * Unicode character with styling and background.\\n     * @constructor\\n     */var StyledUnicodeChar=function StyledUnicodeChar(uchar,foreground,underline,italics,background,flash){this.uchar=uchar||\\' \\';// unicode character\\nthis.penState=new PenState(foreground,underline,italics,background,flash);};StyledUnicodeChar.prototype={reset:function reset(){this.uchar=\\' \\';this.penState.reset();},setChar:function setChar(uchar,newPenState){this.uchar=uchar;this.penState.copy(newPenState);},setPenState:function setPenState(newPenState){this.penState.copy(newPenState);},equals:function equals(other){return this.uchar===other.uchar&&this.penState.equals(other.penState);},copy:function copy(newChar){this.uchar=newChar.uchar;this.penState.copy(newChar.penState);},isEmpty:function isEmpty(){return this.uchar===\\' \\'&&this.penState.isDefault();}};/**\\n     * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\\n     * @constructor\\n     */var Row=function Row(){this.chars=[];for(var i=0;i<NR_COLS;i++){this.chars.push(new StyledUnicodeChar());}this.pos=0;this.currPenState=new PenState();};Row.prototype={equals:function equals(other){var equal=true;for(var i=0;i<NR_COLS;i++){if(!this.chars[i].equals(other.chars[i])){equal=false;break;}}return equal;},copy:function copy(other){for(var i=0;i<NR_COLS;i++){this.chars[i].copy(other.chars[i]);}},isEmpty:function isEmpty(){var empty=true;for(var i=0;i<NR_COLS;i++){if(!this.chars[i].isEmpty()){empty=false;break;}}return empty;},/**\\n         *  Set the cursor to a valid column.\\n         */setCursor:function setCursor(absPos){if(this.pos!==absPos){this.pos=absPos;}if(this.pos<0){logger.log(\"ERROR\",\"Negative cursor position \"+this.pos);this.pos=0;}else if(this.pos>NR_COLS){logger.log(\"ERROR\",\"Too large cursor position \"+this.pos);this.pos=NR_COLS;}},/** \\n         * Move the cursor relative to current position.\\n         */moveCursor:function moveCursor(relPos){var newPos=this.pos+relPos;if(relPos>1){for(var i=this.pos+1;i<newPos+1;i++){this.chars[i].setPenState(this.currPenState);}}this.setCursor(newPos);},/**\\n         * Backspace, move one step back and clear character.\\n         */backSpace:function backSpace(){this.moveCursor(-1);this.chars[this.pos].setChar(\\' \\',this.currPenState);},insertChar:function insertChar(byte){if(byte>=0x90){//Extended char\\nthis.backSpace();}var char=getCharForByte(byte);if(this.pos>=NR_COLS){logger.log(\"ERROR\",\"Cannot insert \"+byte.toString(16)+\" (\"+char+\") at position \"+this.pos+\". Skipping it!\");return;}this.chars[this.pos].setChar(char,this.currPenState);this.moveCursor(1);},clearFromPos:function clearFromPos(startPos){var i;for(i=startPos;i<NR_COLS;i++){this.chars[i].reset();}},clear:function clear(){this.clearFromPos(0);this.pos=0;this.currPenState.reset();},clearToEndOfRow:function clearToEndOfRow(){this.clearFromPos(this.pos);},getTextString:function getTextString(){var chars=[];var empty=true;for(var i=0;i<NR_COLS;i++){var char=this.chars[i].uchar;if(char!==\" \"){empty=false;}chars.push(char);}if(empty){return\"\";}else{return chars.join(\"\");}},setPenStyles:function setPenStyles(styles){this.currPenState.setStyles(styles);var currChar=this.chars[this.pos];currChar.setPenState(this.currPenState);}};/**\\n     * Keep a CEA-608 screen of 32x15 styled characters\\n     * @constructor\\n    */var CaptionScreen=function CaptionScreen(){this.rows=[];for(var i=0;i<NR_ROWS;i++){this.rows.push(new Row());// Note that we use zero-based numbering (0-14)\\n}this.currRow=NR_ROWS-1;this.nrRollUpRows=null;this.reset();};CaptionScreen.prototype={reset:function reset(){for(var i=0;i<NR_ROWS;i++){this.rows[i].clear();}this.currRow=NR_ROWS-1;},equals:function equals(other){var equal=true;for(var i=0;i<NR_ROWS;i++){if(!this.rows[i].equals(other.rows[i])){equal=false;break;}}return equal;},copy:function copy(other){for(var i=0;i<NR_ROWS;i++){this.rows[i].copy(other.rows[i]);}},isEmpty:function isEmpty(){var empty=true;for(var i=0;i<NR_ROWS;i++){if(!this.rows[i].isEmpty()){empty=false;break;}}return empty;},backSpace:function backSpace(){var row=this.rows[this.currRow];row.backSpace();},clearToEndOfRow:function clearToEndOfRow(){var row=this.rows[this.currRow];row.clearToEndOfRow();},/**\\n         * Insert a character (without styling) in the current row.\\n         */insertChar:function insertChar(char){var row=this.rows[this.currRow];row.insertChar(char);},setPen:function setPen(styles){var row=this.rows[this.currRow];row.setPenStyles(styles);},moveCursor:function moveCursor(relPos){var row=this.rows[this.currRow];row.moveCursor(relPos);},setCursor:function setCursor(absPos){logger.log(\"INFO\",\"setCursor: \"+absPos);var row=this.rows[this.currRow];row.setCursor(absPos);},setPAC:function setPAC(pacData){logger.log(\"INFO\",\"pacData = \"+JSON.stringify(pacData));var newRow=pacData.row-1;if(this.nrRollUpRows&&newRow<this.nrRollUpRows-1){newRow=this.nrRollUpRows-1;}this.currRow=newRow;var row=this.rows[this.currRow];if(pacData.indent!==null){var indent=pacData.indent;var prevPos=Math.max(indent-1,0);row.setCursor(pacData.indent);pacData.color=row.chars[prevPos].penState.foreground;}var styles={foreground:pacData.color,underline:pacData.underline,italics:pacData.italics,background:\\'black\\',flash:false};this.setPen(styles);},/**\\n         * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\\n         */setBkgData:function setBkgData(bkgData){logger.log(\"INFO\",\"bkgData = \"+JSON.stringify(bkgData));this.backSpace();this.setPen(bkgData);this.insertChar(0x20);//Space\\n},setRollUpRows:function setRollUpRows(nrRows){this.nrRollUpRows=nrRows;},rollUp:function rollUp(){if(this.nrRollUpRows===null){logger.log(\"DEBUG\",\"roll_up but nrRollUpRows not set yet\");return;//Not properly setup\\n}logger.log(\"TEXT\",this.getDisplayText());var topRowIndex=this.currRow+1-this.nrRollUpRows;var topRow=this.rows.splice(topRowIndex,1)[0];topRow.clear();this.rows.splice(this.currRow,0,topRow);logger.log(\"INFO\",\"Rolling up\");//logger.log(\"TEXT\", this.get_display_text())\\n},/**\\n        * Get all non-empty rows with as unicode text. \\n        */getDisplayText:function getDisplayText(asOneRow){asOneRow=asOneRow||false;var displayText=[];var text=\"\";var rowNr=-1;for(var i=0;i<NR_ROWS;i++){var rowText=this.rows[i].getTextString();if(rowText){rowNr=i+1;if(asOneRow){displayText.push(\"Row \"+rowNr+\\': \"\\'+rowText+\\'\"\\');}else{displayText.push(rowText.trim());}}}if(displayText.length>0){if(asOneRow){text=\"[\"+displayText.join(\" | \")+\"]\";}else{text=displayText.join(\"\\\\n\");}}return text;},getTextAndFormat:function getTextAndFormat(){return this.rows;}};/**\\n     * Handle a CEA-608 channel and send decoded data to outputFilter\\n     * @constructor\\n     * @param {Number} channelNumber (1 or 2)\\n     * @param {CueHandler} outputFilter Output from channel1 newCue(startTime, endTime, captionScreen)\\n    */var Cea608Channel=function Cea608Channel(channelNumber,outputFilter){this.chNr=channelNumber;this.outputFilter=outputFilter;this.mode=null;this.verbose=0;this.displayedMemory=new CaptionScreen();this.nonDisplayedMemory=new CaptionScreen();this.lastOutputScreen=new CaptionScreen();this.currRollUpRow=this.displayedMemory.rows[NR_ROWS-1];this.writeScreen=this.displayedMemory;this.mode=null;this.cueStartTime=null;// Keeps track of where a cue started.\\n};Cea608Channel.prototype={modes:[\"MODE_ROLL-UP\",\"MODE_POP-ON\",\"MODE_PAINT-ON\",\"MODE_TEXT\"],reset:function reset(){this.mode=null;this.displayedMemory.reset();this.nonDisplayedMemory.reset();this.lastOutputScreen.reset();this.currRollUpRow=this.displayedMemory.rows[NR_ROWS-1];this.writeScreen=this.displayedMemory;this.mode=null;this.cueStartTime=null;this.lastCueEndTime=null;},getHandler:function getHandler(){return this.outputFilter;},setHandler:function setHandler(newHandler){this.outputFilter=newHandler;},setPAC:function setPAC(pacData){this.writeScreen.setPAC(pacData);},setBkgData:function setBkgData(bkgData){this.writeScreen.setBkgData(bkgData);},setMode:function setMode(newMode){if(newMode===this.mode){return;}this.mode=newMode;logger.log(\"INFO\",\"MODE=\"+newMode);if(this.mode==\"MODE_POP-ON\"){this.writeScreen=this.nonDisplayedMemory;}else{this.writeScreen=this.displayedMemory;this.writeScreen.reset();}if(this.mode!==\"MODE_ROLL-UP\"){this.displayedMemory.nrRollUpRows=null;this.nonDisplayedMemory.nrRollUpRows=null;}this.mode=newMode;},insertChars:function insertChars(chars){for(var i=0;i<chars.length;i++){this.writeScreen.insertChar(chars[i]);}var screen=this.writeScreen===this.displayedMemory?\"DISP\":\"NON_DISP\";logger.log(\"INFO\",screen+\": \"+this.writeScreen.getDisplayText(true));if(this.mode===\"MODE_PAINT-ON\"||this.mode===\"MODE_ROLL-UP\"){logger.log(\"TEXT\",\"DISPLAYED: \"+this.displayedMemory.getDisplayText(true));this.outputDataUpdate();}},cc_RCL:function cc_RCL(){// Resume Caption Loading (switch mode to Pop On)\\nlogger.log(\"INFO\",\"RCL - Resume Caption Loading\");this.setMode(\"MODE_POP-ON\");},cc_BS:function cc_BS(){// BackSpace\\nlogger.log(\"INFO\",\"BS - BackSpace\");if(this.mode===\"MODE_TEXT\"){return;}this.writeScreen.backSpace();if(this.writeScreen===this.displayedMemory){this.outputDataUpdate();}},cc_AOF:function cc_AOF(){// Reserved (formerly Alarm Off)\\nreturn;},cc_AON:function cc_AON(){// Reserved (formerly Alarm On)\\nreturn;},cc_DER:function cc_DER(){// Delete to End of Row\\nlogger.log(\"INFO\",\"DER- Delete to End of Row\");this.writeScreen.clearToEndOfRow();this.outputDataUpdate();},cc_RU:function cc_RU(nrRows){//Roll-Up Captions-2,3,or 4 Rows\\nlogger.log(\"INFO\",\"RU(\"+nrRows+\") - Roll Up\");this.writeScreen=this.displayedMemory;this.setMode(\"MODE_ROLL-UP\");this.writeScreen.setRollUpRows(nrRows);},cc_FON:function cc_FON(){//Flash On\\nlogger.log(\"INFO\",\"FON - Flash On\");this.writeScreen.setPen({flash:true});},cc_RDC:function cc_RDC(){// Resume Direct Captioning (switch mode to PaintOn)\\nlogger.log(\"INFO\",\"RDC - Resume Direct Captioning\");this.setMode(\"MODE_PAINT-ON\");},cc_TR:function cc_TR(){// Text Restart in text mode (not supported, however)\\nlogger.log(\"INFO\",\"TR\");this.setMode(\"MODE_TEXT\");},cc_RTD:function cc_RTD(){// Resume Text Display in Text mode (not supported, however)\\nlogger.log(\"INFO\",\"RTD\");this.setMode(\"MODE_TEXT\");},cc_EDM:function cc_EDM(){// Erase Displayed Memory\\nlogger.log(\"INFO\",\"EDM - Erase Displayed Memory\");this.displayedMemory.reset();this.outputDataUpdate();},cc_CR:function cc_CR(){// Carriage Return\\nlogger.log(\"CR - Carriage Return\");this.writeScreen.rollUp();this.outputDataUpdate();},cc_ENM:function cc_ENM(){//Erase Non-Displayed Memory\\nlogger.log(\"INFO\",\"ENM - Erase Non-displayed Memory\");this.nonDisplayedMemory.reset();},cc_EOC:function cc_EOC(){//End of Caption (Flip Memories)\\nlogger.log(\"INFO\",\"EOC - End Of Caption\");if(this.mode===\"MODE_POP-ON\"){var tmp=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory;this.nonDisplayedMemory=tmp;this.writeScreen=this.nonDisplayedMemory;logger.log(\"TEXT\",\"DISP: \"+this.displayedMemory.getDisplayText());}this.outputDataUpdate();},cc_TO:function cc_TO(nrCols){// Tab Offset 1,2, or 3 columns\\nlogger.log(\"INFO\",\"TO(\"+nrCols+\") - Tab Offset\");this.writeScreen.moveCursor(nrCols);},cc_MIDROW:function cc_MIDROW(secondByte){// Parse MIDROW command\\nvar styles={flash:false};styles.underline=secondByte%2===1;styles.italics=secondByte>=0x2e;if(!styles.italics){var colorIndex=Math.floor(secondByte/2)-0x10;var colors=[\"white\",\"green\",\"blue\",\"cyan\",\"red\",\"yellow\",\"magenta\"];styles.foreground=colors[colorIndex];}else{styles.foreground=\"white\";}logger.log(\"INFO\",\"MIDROW: \"+JSON.stringify(styles));this.writeScreen.setPen(styles);},outputDataUpdate:function outputDataUpdate(){var t=logger.time;if(t===null){return;}if(this.outputFilter){if(this.outputFilter.updateData){this.outputFilter.updateData(t,this.displayedMemory);}if(this.cueStartTime===null&&!this.displayedMemory.isEmpty()){// Start of a new cue\\nthis.cueStartTime=t;}else{if(!this.displayedMemory.equals(this.lastOutputScreen)){if(this.outputFilter.newCue){this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen);}this.cueStartTime=this.displayedMemory.isEmpty()?null:t;}}this.lastOutputScreen.copy(this.displayedMemory);}},cueSplitAtTime:function cueSplitAtTime(t){if(this.outputFilter){if(!this.displayedMemory.isEmpty()){if(this.outputFilter.newCue){this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory);}this.cueStartTime=t;}}}};/**\\n     * Parse CEA-608 data and send decoded data to out1 and out2.\\n     * @constructor\\n     * @param {Number} field  CEA-608 field (1 or 2)\\n     * @param {CueHandler} out1 Output from channel1 newCue(startTime, endTime, captionScreen)\\n     * @param {CueHandler} out2 Output from channel2 newCue(startTime, endTime, captionScreen)\\n     */var Cea608Parser=function Cea608Parser(field,out1,out2){this.field=field||1;this.outputs=[out1,out2];this.channels=[new Cea608Channel(1,out1),new Cea608Channel(2,out2)];this.currChNr=-1;// Will be 1 or 2\\nthis.lastCmdA=null;// First byte of last command\\nthis.lastCmdB=null;// Second byte of last command\\nthis.bufferedData=[];this.startTime=null;this.lastTime=null;this.dataCounters={\\'padding\\':0,\\'char\\':0,\\'cmd\\':0,\\'other\\':0};};Cea608Parser.prototype={getHandler:function getHandler(index){return this.channels[index].getHandler();},setHandler:function setHandler(index,newHandler){this.channels[index].setHandler(newHandler);},/**\\n         * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\\n         */addData:function addData(t,byteList){var cmdFound,a,b,charsFound=false;this.lastTime=t;logger.setTime(t);for(var i=0;i<byteList.length;i+=2){a=byteList[i]&0x7f;b=byteList[i+1]&0x7f;if(a>=0x10&&a<=0x1f&&a===this.lastCmdA&&b===this.lastCmdB){this.lastCmdA=null;this.lastCmdB=null;logger.log(\"DEBUG\",\"Repeated command (\"+numArrayToHexArray([a,b])+\") is dropped\");continue;// Repeated commands are dropped (once)\\n}if(a===0&&b===0){this.dataCounters.padding+=2;continue;}else{logger.log(\"DATA\",\"[\"+numArrayToHexArray([byteList[i],byteList[i+1]])+\"] -> (\"+numArrayToHexArray([a,b])+\")\");}cmdFound=this.parseCmd(a,b);if(!cmdFound){cmdFound=this.parseMidrow(a,b);}if(!cmdFound){cmdFound=this.parsePAC(a,b);}if(!cmdFound){cmdFound=this.parseBackgroundAttributes(a,b);}if(!cmdFound){charsFound=this.parseChars(a,b);if(charsFound){if(this.currChNr&&this.currChNr>=0){var channel=this.channels[this.currChNr-1];channel.insertChars(charsFound);}else{logger.log(\"WARNING\",\"No channel found yet. TEXT-MODE?\");}}}if(cmdFound){this.dataCounters.cmd+=2;}else if(charsFound){this.dataCounters.char+=2;}else{this.dataCounters.other+=2;logger.log(\"WARNING\",\"Couldn\\'t parse cleaned data \"+numArrayToHexArray([a,b])+\" orig: \"+numArrayToHexArray([byteList[i],byteList[i+1]]));}}},/**\\n         * Parse Command.\\n         * @returns {Boolean} Tells if a command was found\\n         */parseCmd:function parseCmd(a,b){var chNr=null;var cond1=(a===0x14||a===0x15||a===0x1C||a===0x1D)&&0x20<=b&&b<=0x2F;var cond2=(a===0x17||a===0x1F)&&0x21<=b&&b<=0x23;if(!(cond1||cond2)){return false;}if(a===0x14||a===0x15||a===0x17){chNr=1;}else{chNr=2;// (a === 0x1C || a === 0x1D || a=== 0x1f)\\n}var channel=this.channels[chNr-1];if(a===0x14||a===0x15||a===0x1C||a===0x1D){if(b===0x20){channel.cc_RCL();}else if(b===0x21){channel.cc_BS();}else if(b===0x22){channel.cc_AOF();}else if(b===0x23){channel.cc_AON();}else if(b===0x24){channel.cc_DER();}else if(b===0x25){channel.cc_RU(2);}else if(b===0x26){channel.cc_RU(3);}else if(b===0x27){channel.cc_RU(4);}else if(b===0x28){channel.cc_FON();}else if(b===0x29){channel.cc_RDC();}else if(b===0x2A){channel.cc_TR();}else if(b===0x2B){channel.cc_RTD();}else if(b===0x2C){channel.cc_EDM();}else if(b===0x2D){channel.cc_CR();}else if(b===0x2E){channel.cc_ENM();}else if(b===0x2F){channel.cc_EOC();}}else{//a == 0x17 || a == 0x1F\\nchannel.cc_TO(b-0x20);}this.lastCmdA=a;this.lastCmdB=b;this.currChNr=chNr;return true;},/**\\n         * Parse midrow styling command\\n         * @returns {Boolean}\\n         */parseMidrow:function parseMidrow(a,b){var chNr=null;if((a===0x11||a===0x19)&&0x20<=b&&b<=0x2f){if(a===0x11){chNr=1;}else{chNr=2;}if(chNr!==this.currChNr){logger.log(\"ERROR\",\"Mismatch channel in midrow parsing\");return false;}var channel=this.channels[chNr-1];// cea608 spec says midrow codes should inject a space\\nchannel.insertChars([0x20]);channel.cc_MIDROW(b);logger.log(\"DEBUG\",\"MIDROW (\"+numArrayToHexArray([a,b])+\")\");this.lastCmdA=a;this.lastCmdB=b;return true;}return false;},/**\\n         * Parse Preable Access Codes (Table 53).\\n         * @returns {Boolean} Tells if PAC found\\n         */parsePAC:function parsePAC(a,b){var chNr=null;var row=null;var case1=(0x11<=a&&a<=0x17||0x19<=a&&a<=0x1F)&&0x40<=b&&b<=0x7F;var case2=(a===0x10||a===0x18)&&0x40<=b&&b<=0x5F;if(!(case1||case2)){return false;}chNr=a<=0x17?1:2;if(0x40<=b&&b<=0x5F){row=chNr===1?rowsLowCh1[a]:rowsLowCh2[a];}else{// 0x60 <= b <= 0x7F\\nrow=chNr===1?rowsHighCh1[a]:rowsHighCh2[a];}var pacData=this.interpretPAC(row,b);var channel=this.channels[chNr-1];channel.setPAC(pacData);this.lastCmdA=a;this.lastCmdB=b;this.currChNr=chNr;return true;},/**\\n         * Interpret the second byte of the pac, and return the information.\\n         * @returns {Object} pacData with style parameters.\\n         */interpretPAC:function interpretPAC(row,byte){var pacIndex=byte;var pacData={color:null,italics:false,indent:null,underline:false,row:row};if(byte>0x5F){pacIndex=byte-0x60;}else{pacIndex=byte-0x40;}pacData.underline=(pacIndex&1)===1;if(pacIndex<=0xd){pacData.color=[\\'white\\',\\'green\\',\\'blue\\',\\'cyan\\',\\'red\\',\\'yellow\\',\\'magenta\\',\\'white\\'][Math.floor(pacIndex/2)];}else if(pacIndex<=0xf){pacData.italics=true;pacData.color=\\'white\\';}else{pacData.indent=Math.floor((pacIndex-0x10)/2)*4;}return pacData;// Note that row has zero offset. The spec uses 1.\\n},/**\\n         * Parse characters.\\n         * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\\n         */parseChars:function parseChars(a,b){var channelNr=null,charCodes=null,charCode1=null,charCode2=null;if(a>=0x19){channelNr=2;charCode1=a-8;}else{channelNr=1;charCode1=a;}if(0x11<=charCode1&&charCode1<=0x13){// Special character\\nvar oneCode=b;if(charCode1===0x11){oneCode=b+0x50;}else if(charCode1===0x12){oneCode=b+0x70;}else{oneCode=b+0x90;}logger.log(\"INFO\",\"Special char \\'\"+getCharForByte(oneCode)+\"\\' in channel \"+channelNr);charCodes=[oneCode];this.lastCmdA=a;this.lastCmdB=b;}else if(0x20<=a&&a<=0x7f){charCodes=b===0?[a]:[a,b];this.lastCmdA=null;this.lastCmdB=null;}if(charCodes){var hexCodes=numArrayToHexArray(charCodes);logger.log(\"DEBUG\",\"Char codes =  \"+hexCodes.join(\",\"));}return charCodes;},/**\\n        * Parse extended background attributes as well as new foreground color black.\\n        * @returns{Boolean} Tells if background attributes are found\\n        */parseBackgroundAttributes:function parseBackgroundAttributes(a,b){var bkgData,index,chNr,channel;var case1=(a===0x10||a===0x18)&&0x20<=b&&b<=0x2f;var case2=(a===0x17||a===0x1f)&&0x2d<=b&&b<=0x2f;if(!(case1||case2)){return false;}bkgData={};if(a===0x10||a===0x18){index=Math.floor((b-0x20)/2);bkgData.background=backgroundColors[index];if(b%2===1){bkgData.background=bkgData.background+\"_semi\";}}else if(b===0x2d){bkgData.background=\"transparent\";}else{bkgData.foreground=\"black\";if(b===0x2f){bkgData.underline=true;}}chNr=a<0x18?1:2;channel=this.channels[chNr-1];channel.setBkgData(bkgData);this.lastCmdA=a;this.lastCmdB=b;return true;},/**\\n         * Reset state of parser and its channels.\\n         */reset:function reset(){for(var i=0;i<this.channels.length;i++){if(this.channels[i]){this.channels[i].reset();}}this.lastCmdA=null;this.lastCmdB=null;},/**\\n         * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\\n         */cueSplitAtTime:function cueSplitAtTime(t){for(var i=0;i<this.channels.length;i++){if(this.channels[i]){this.channels[i].cueSplitAtTime(t);}}}};/**\\n     * Find ranges corresponding to SEA CEA-608 NALUS in sizeprepended NALU array.\\n     * @param {raw} dataView of binary data\\n     * @param {startPos} start position in raw\\n     * @param {size} total size of data in raw to consider\\n     * @returns \\n     */var findCea608Nalus=function findCea608Nalus(raw,startPos,size){var nalSize=0,cursor=startPos,nalType=0,cea608NaluRanges=[],// Check SEI data according to ANSI-SCTE 128\\nisCEA608SEI=function isCEA608SEI(payloadType,payloadSize,raw,pos){if(payloadType!==4||payloadSize<8){return null;}var countryCode=raw.getUint8(pos);var providerCode=raw.getUint16(pos+1);var userIdentifier=raw.getUint32(pos+3);var userDataTypeCode=raw.getUint8(pos+7);return countryCode==0xB5&&providerCode==0x31&&userIdentifier==0x47413934&&userDataTypeCode==0x3;};while(cursor<startPos+size){nalSize=raw.getUint32(cursor);nalType=raw.getUint8(cursor+4)&0x1F;//console.log(time + \"  NAL \" + nalType);\\nif(nalType===6){// SEI NAL Unit. The NAL header is the first byte\\n//console.log(\"SEI NALU of size \" + nalSize + \" at time \" + time);\\nvar pos=cursor+5;var payloadType=-1;while(pos<cursor+4+nalSize-1){// The last byte should be rbsp_trailing_bits\\npayloadType=0;var b=0xFF;while(b===0xFF){b=raw.getUint8(pos);payloadType+=b;pos++;}var payloadSize=0;b=0xFF;while(b===0xFF){b=raw.getUint8(pos);payloadSize+=b;pos++;}if(isCEA608SEI(payloadType,payloadSize,raw,pos)){//console.log(\"CEA608 SEI \" + time + \" \" + payloadSize);\\ncea608NaluRanges.push([pos,payloadSize]);}pos+=payloadSize;}}cursor+=nalSize+4;}return cea608NaluRanges;};var extractCea608DataFromRange=function extractCea608DataFromRange(raw,cea608Range){var pos=cea608Range[0];var fieldData=[[],[]];pos+=8;// Skip the identifier up to userDataTypeCode\\nvar ccCount=raw.getUint8(pos)&0x1f;pos+=2;// Advance 1 and skip reserved byte\\nfor(var i=0;i<ccCount;i++){var byte=raw.getUint8(pos);var ccValid=byte&0x4;var ccType=byte&0x3;pos++;var ccData1=raw.getUint8(pos);// Keep parity bit\\npos++;var ccData2=raw.getUint8(pos);// Keep parity bit\\npos++;if(ccValid&&(ccData1&0x7f)+(ccData2&0x7f)!==0){//Check validity and non-empty data\\nif(ccType===0){fieldData[0].push(ccData1);fieldData[0].push(ccData2);}else if(ccType===1){fieldData[1].push(ccData1);fieldData[1].push(ccData2);}}}return fieldData;};exports.logger=logger;exports.PenState=PenState;exports.CaptionScreen=CaptionScreen;exports.Cea608Parser=Cea608Parser;exports.findCea608Nalus=findCea608Nalus;exports.extractCea608DataFromRange=extractCea608DataFromRange;})( false?undefined:exports);\\n//# sourceMappingURL=cea608-parser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/externals/cea608-parser.js?')},\"../node_modules/dashjs/build/es5/externals/xml2json.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});/*\\n Copyright 2011-2013 Abdulla Abdurakhmanov\\n Original sources are available at https://code.google.com/p/x2js/\\n\\n Licensed under the Apache License, Version 2.0 (the \"License\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \"AS IS\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n *//*\\n  Further modified for dashjs to:\\n  - keep track of children nodes in order in attribute __children.\\n  - add type conversion matchers\\n  - re-add ignoreRoot\\n  - allow zero-length attributePrefix\\n  - don\\'t add white-space text nodes\\n  - remove explicit RequireJS support\\n*/function X2JS(config){\\'use strict\\';var VERSION=\"1.2.0\";config=config||{};initConfigDefaults();initRequiredPolyfills();function initConfigDefaults(){if(config.escapeMode===undefined){config.escapeMode=true;}if(config.attributePrefix===undefined){config.attributePrefix=\"_\";}config.arrayAccessForm=config.arrayAccessForm||\"none\";config.emptyNodeForm=config.emptyNodeForm||\"text\";if(config.enableToStringFunc===undefined){config.enableToStringFunc=true;}config.arrayAccessFormPaths=config.arrayAccessFormPaths||[];if(config.skipEmptyTextNodesForObj===undefined){config.skipEmptyTextNodesForObj=true;}if(config.stripWhitespaces===undefined){config.stripWhitespaces=true;}config.datetimeAccessFormPaths=config.datetimeAccessFormPaths||[];if(config.useDoubleQuotes===undefined){config.useDoubleQuotes=false;}config.xmlElementsFilter=config.xmlElementsFilter||[];config.jsonPropertiesFilter=config.jsonPropertiesFilter||[];if(config.keepCData===undefined){config.keepCData=false;}if(config.ignoreRoot===undefined){config.ignoreRoot=false;}}var DOMNodeTypes={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function initRequiredPolyfills(){}function getNodeLocalName(node){var nodeLocalName=node.localName;if(nodeLocalName==null)// Yeah, this is IE!!\\nnodeLocalName=node.baseName;if(nodeLocalName==null||nodeLocalName==\"\")// ==\"\" is IE too\\nnodeLocalName=node.nodeName;return nodeLocalName;}function getNodePrefix(node){return node.prefix;}function escapeXmlChars(str){if(typeof str==\"string\")return str.replace(/&/g,\\'&amp;\\').replace(/</g,\\'&lt;\\').replace(/>/g,\\'&gt;\\').replace(/\"/g,\\'&quot;\\').replace(/\\'/g,\\'&apos;\\');else return str;}function unescapeXmlChars(str){return str.replace(/&lt;/g,\\'<\\').replace(/&gt;/g,\\'>\\').replace(/&quot;/g,\\'\"\\').replace(/&apos;/g,\"\\'\").replace(/&amp;/g,\\'&\\');}function checkInStdFiltersArrayForm(stdFiltersArrayForm,obj,name,path){var idx=0;for(;idx<stdFiltersArrayForm.length;idx++){var filterPath=stdFiltersArrayForm[idx];if(typeof filterPath===\"string\"){if(filterPath==path)break;}else if(filterPath instanceof RegExp){if(filterPath.test(path))break;}else if(typeof filterPath===\"function\"){if(filterPath(obj,name,path))break;}}return idx!=stdFiltersArrayForm.length;}function toArrayAccessForm(obj,childName,path){switch(config.arrayAccessForm){case\"property\":if(!(obj[childName]instanceof Array))obj[childName+\"_asArray\"]=[obj[childName]];else obj[childName+\"_asArray\"]=obj[childName];break;/*case \"none\":\\n                break;*/}if(!(obj[childName]instanceof Array)&&config.arrayAccessFormPaths.length>0){if(checkInStdFiltersArrayForm(config.arrayAccessFormPaths,obj,childName,path)){obj[childName]=[obj[childName]];}}}function fromXmlDateTime(prop){// Implementation based up on http://stackoverflow.com/questions/8178598/xml-datetime-to-javascript-date-object\\n// Improved to support full spec and optional parts\\nvar bits=prop.split(/[-T:+Z]/g);var d=new Date(bits[0],bits[1]-1,bits[2]);var secondBits=bits[5].split(\"\\\\.\");d.setHours(bits[3],bits[4],secondBits[0]);if(secondBits.length>1)d.setMilliseconds(secondBits[1]);// Get supplied time zone offset in minutes\\nif(bits[6]&&bits[7]){var offsetMinutes=bits[6]*60+Number(bits[7]);var sign=/\\\\d\\\\d-\\\\d\\\\d:\\\\d\\\\d$/.test(prop)?\\'-\\':\\'+\\';// Apply the sign\\noffsetMinutes=0+(sign==\\'-\\'?-1*offsetMinutes:offsetMinutes);// Apply offset and local timezone\\nd.setMinutes(d.getMinutes()-offsetMinutes-d.getTimezoneOffset());}else if(prop.indexOf(\"Z\",prop.length-1)!==-1){d=new Date(Date.UTC(d.getFullYear(),d.getMonth(),d.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()));}// d is now a local time equivalent to the supplied time\\nreturn d;}function checkFromXmlDateTimePaths(value,childName,fullPath){if(config.datetimeAccessFormPaths.length>0){var path=fullPath.split(\"\\\\.#\")[0];if(checkInStdFiltersArrayForm(config.datetimeAccessFormPaths,value,childName,path)){return fromXmlDateTime(value);}else return value;}else return value;}function checkXmlElementsFilter(obj,childType,childName,childPath){if(childType==DOMNodeTypes.ELEMENT_NODE&&config.xmlElementsFilter.length>0){return checkInStdFiltersArrayForm(config.xmlElementsFilter,obj,childName,childPath);}else return true;}function parseDOMChildren(node,path){if(node.nodeType==DOMNodeTypes.DOCUMENT_NODE){var result=new Object();var nodeChildren=node.childNodes;// Alternative for firstElementChild which is not supported in some environments\\nfor(var cidx=0;cidx<nodeChildren.length;cidx++){var child=nodeChildren[cidx];if(child.nodeType==DOMNodeTypes.ELEMENT_NODE){if(config.ignoreRoot){result=parseDOMChildren(child);}else{result={};var childName=getNodeLocalName(child);result[childName]=parseDOMChildren(child);}}}return result;}else if(node.nodeType==DOMNodeTypes.ELEMENT_NODE){var result=new Object();result.__cnt=0;var children=[];var nodeChildren=node.childNodes;// Children nodes\\nfor(var cidx=0;cidx<nodeChildren.length;cidx++){var child=nodeChildren[cidx];var childName=getNodeLocalName(child);if(child.nodeType!=DOMNodeTypes.COMMENT_NODE){var childPath=path+\".\"+childName;if(checkXmlElementsFilter(result,child.nodeType,childName,childPath)){result.__cnt++;if(result[childName]==null){var c=parseDOMChildren(child,childPath);if(childName!=\"#text\"||/[^\\\\s]/.test(c)){var o={};o[childName]=c;children.push(o);}result[childName]=c;toArrayAccessForm(result,childName,childPath);}else{if(result[childName]!=null){if(!(result[childName]instanceof Array)){result[childName]=[result[childName]];toArrayAccessForm(result,childName,childPath);}}var c=parseDOMChildren(child,childPath);if(childName!=\"#text\"||/[^\\\\s]/.test(c)){// Don\\'t add white-space text nodes\\nvar o={};o[childName]=c;children.push(o);}result[childName][result[childName].length]=c;}}}}result.__children=children;// Attributes\\nvar nodeLocalName=getNodeLocalName(node);for(var aidx=0;aidx<node.attributes.length;aidx++){var attr=node.attributes[aidx];result.__cnt++;var value2=attr.value;for(var m=0,ml=config.matchers.length;m<ml;m++){var matchobj=config.matchers[m];if(matchobj.test(attr,nodeLocalName))value2=matchobj.converter(attr.value);}result[config.attributePrefix+attr.name]=value2;}// Node namespace prefix\\nvar nodePrefix=getNodePrefix(node);if(nodePrefix!=null&&nodePrefix!=\"\"){result.__cnt++;result.__prefix=nodePrefix;}if(result[\"#text\"]!=null){result.__text=result[\"#text\"];if(result.__text instanceof Array){result.__text=result.__text.join(\"\\\\n\");}//if(config.escapeMode)\\n//\\tresult.__text = unescapeXmlChars(result.__text);\\nif(config.stripWhitespaces)result.__text=result.__text.trim();delete result[\"#text\"];if(config.arrayAccessForm==\"property\")delete result[\"#text_asArray\"];result.__text=checkFromXmlDateTimePaths(result.__text,childName,path+\".\"+childName);}if(result[\"#cdata-section\"]!=null){result.__cdata=result[\"#cdata-section\"];delete result[\"#cdata-section\"];if(config.arrayAccessForm==\"property\")delete result[\"#cdata-section_asArray\"];}if(result.__cnt==0&&config.emptyNodeForm==\"text\"){result=\\'\\';}else if(result.__cnt==1&&result.__text!=null){result=result.__text;}else if(result.__cnt==1&&result.__cdata!=null&&!config.keepCData){result=result.__cdata;}else if(result.__cnt>1&&result.__text!=null&&config.skipEmptyTextNodesForObj){if(config.stripWhitespaces&&result.__text==\"\"||result.__text.trim()==\"\"){delete result.__text;}}delete result.__cnt;if(config.enableToStringFunc&&(result.__text!=null||result.__cdata!=null)){result.toString=function(){return(this.__text!=null?this.__text:\\'\\')+(this.__cdata!=null?this.__cdata:\\'\\');};}return result;}else if(node.nodeType==DOMNodeTypes.TEXT_NODE||node.nodeType==DOMNodeTypes.CDATA_SECTION_NODE){return node.nodeValue;}}function startTag(jsonObj,element,attrList,closed){var resultStr=\"<\"+(jsonObj!=null&&jsonObj.__prefix!=null?jsonObj.__prefix+\":\":\"\")+element;if(attrList!=null){for(var aidx=0;aidx<attrList.length;aidx++){var attrName=attrList[aidx];var attrVal=jsonObj[attrName];if(config.escapeMode)attrVal=escapeXmlChars(attrVal);resultStr+=\" \"+attrName.substr(config.attributePrefix.length)+\"=\";if(config.useDoubleQuotes)resultStr+=\\'\"\\'+attrVal+\\'\"\\';else resultStr+=\"\\'\"+attrVal+\"\\'\";}}if(!closed)resultStr+=\">\";else resultStr+=\"/>\";return resultStr;}function endTag(jsonObj,elementName){return\"</\"+(jsonObj.__prefix!=null?jsonObj.__prefix+\":\":\"\")+elementName+\">\";}function endsWith(str,suffix){return str.indexOf(suffix,str.length-suffix.length)!==-1;}function jsonXmlSpecialElem(jsonObj,jsonObjField){if(config.arrayAccessForm==\"property\"&&endsWith(jsonObjField.toString(),\"_asArray\")||jsonObjField.toString().indexOf(config.attributePrefix)==0||jsonObjField.toString().indexOf(\"__\")==0||jsonObj[jsonObjField]instanceof Function)return true;else return false;}function jsonXmlElemCount(jsonObj){var elementsCnt=0;if(jsonObj instanceof Object){for(var it in jsonObj){if(jsonXmlSpecialElem(jsonObj,it))continue;elementsCnt++;}}return elementsCnt;}function checkJsonObjPropertiesFilter(jsonObj,propertyName,jsonObjPath){return config.jsonPropertiesFilter.length==0||jsonObjPath==\"\"||checkInStdFiltersArrayForm(config.jsonPropertiesFilter,jsonObj,propertyName,jsonObjPath);}function parseJSONAttributes(jsonObj){var attrList=[];if(jsonObj instanceof Object){for(var ait in jsonObj){if(ait.toString().indexOf(\"__\")==-1&&ait.toString().indexOf(config.attributePrefix)==0){attrList.push(ait);}}}return attrList;}function parseJSONTextAttrs(jsonTxtObj){var result=\"\";if(jsonTxtObj.__cdata!=null){result+=\"<![CDATA[\"+jsonTxtObj.__cdata+\"]]>\";}if(jsonTxtObj.__text!=null){if(config.escapeMode)result+=escapeXmlChars(jsonTxtObj.__text);else result+=jsonTxtObj.__text;}return result;}function parseJSONTextObject(jsonTxtObj){var result=\"\";if(jsonTxtObj instanceof Object){result+=parseJSONTextAttrs(jsonTxtObj);}else if(jsonTxtObj!=null){if(config.escapeMode)result+=escapeXmlChars(jsonTxtObj);else result+=jsonTxtObj;}return result;}function getJsonPropertyPath(jsonObjPath,jsonPropName){if(jsonObjPath===\"\"){return jsonPropName;}else return jsonObjPath+\".\"+jsonPropName;}function parseJSONArray(jsonArrRoot,jsonArrObj,attrList,jsonObjPath){var result=\"\";if(jsonArrRoot.length==0){result+=startTag(jsonArrRoot,jsonArrObj,attrList,true);}else{for(var arIdx=0;arIdx<jsonArrRoot.length;arIdx++){result+=startTag(jsonArrRoot[arIdx],jsonArrObj,parseJSONAttributes(jsonArrRoot[arIdx]),false);result+=parseJSONObject(jsonArrRoot[arIdx],getJsonPropertyPath(jsonObjPath,jsonArrObj));result+=endTag(jsonArrRoot[arIdx],jsonArrObj);}}return result;}function parseJSONObject(jsonObj,jsonObjPath){var result=\"\";var elementsCnt=jsonXmlElemCount(jsonObj);if(elementsCnt>0){for(var it in jsonObj){if(jsonXmlSpecialElem(jsonObj,it)||jsonObjPath!=\"\"&&!checkJsonObjPropertiesFilter(jsonObj,it,getJsonPropertyPath(jsonObjPath,it)))continue;var subObj=jsonObj[it];var attrList=parseJSONAttributes(subObj);if(subObj==null||subObj==undefined){result+=startTag(subObj,it,attrList,true);}else if(subObj instanceof Object){if(subObj instanceof Array){result+=parseJSONArray(subObj,it,attrList,jsonObjPath);}else if(subObj instanceof Date){result+=startTag(subObj,it,attrList,false);result+=subObj.toISOString();result+=endTag(subObj,it);}else{var subObjElementsCnt=jsonXmlElemCount(subObj);if(subObjElementsCnt>0||subObj.__text!=null||subObj.__cdata!=null){result+=startTag(subObj,it,attrList,false);result+=parseJSONObject(subObj,getJsonPropertyPath(jsonObjPath,it));result+=endTag(subObj,it);}else{result+=startTag(subObj,it,attrList,true);}}}else{result+=startTag(subObj,it,attrList,false);result+=parseJSONTextObject(subObj);result+=endTag(subObj,it);}}}result+=parseJSONTextObject(jsonObj);return result;}this.parseXmlString=function(xmlDocStr){var isIEParser=window.ActiveXObject||\"ActiveXObject\"in window;if(xmlDocStr===undefined){return null;}var xmlDoc;if(window.DOMParser){var parser=new window.DOMParser();var parsererrorNS=null;try{xmlDoc=parser.parseFromString(xmlDocStr,\"text/xml\");if(xmlDoc.getElementsByTagNameNS(\"*\",\"parsererror\").length>0){xmlDoc=null;}}catch(err){xmlDoc=null;}}else{// IE :(\\nif(xmlDocStr.indexOf(\"<?\")==0){xmlDocStr=xmlDocStr.substr(xmlDocStr.indexOf(\"?>\")+2);}xmlDoc=new ActiveXObject(\"Microsoft.XMLDOM\");xmlDoc.async=\"false\";xmlDoc.loadXML(xmlDocStr);}return xmlDoc;};this.asArray=function(prop){if(prop===undefined||prop==null)return[];else if(prop instanceof Array)return prop;else return[prop];};this.toXmlDateTime=function(dt){if(dt instanceof Date)return dt.toISOString();else if(typeof dt===\\'number\\')return new Date(dt).toISOString();else return null;};this.asDateTime=function(prop){if(typeof prop==\"string\"){return fromXmlDateTime(prop);}else return prop;};this.xml2json=function(xmlDoc){return parseDOMChildren(xmlDoc);};this.xml_str2json=function(xmlDocStr){var xmlDoc=this.parseXmlString(xmlDocStr);if(xmlDoc!=null)return this.xml2json(xmlDoc);else return null;};this.json2xml_str=function(jsonObj){return parseJSONObject(jsonObj,\"\");};this.json2xml=function(jsonObj){var xmlDocStr=this.json2xml_str(jsonObj);return this.parseXmlString(xmlDocStr);};this.getVersion=function(){return VERSION;};}exports.default=X2JS;\\n//# sourceMappingURL=xml2json.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/externals/xml2json.js?')},\"../node_modules/dashjs/build/es5/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});exports.supportsMediaSource=exports.Debug=exports.MediaPlayerFactory=exports.MetricsReporting=exports.Protection=exports.MediaPlayer=undefined;var _index_mediaplayerOnly=__webpack_require__(/*! ./index_mediaplayerOnly */ \"../node_modules/dashjs/build/es5/index_mediaplayerOnly.js\");var _Capabilities=__webpack_require__(/*! ./src/streaming/utils/Capabilities */ \"../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js\");var _MetricsReporting=__webpack_require__(/*! ./src/streaming/metrics/MetricsReporting */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js\");var _MetricsReporting2=_interopRequireDefault(_MetricsReporting);var _Protection=__webpack_require__(/*! ./src/streaming/protection/Protection */ \"../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js\");var _Protection2=_interopRequireDefault(_Protection);var _MediaPlayerFactory=__webpack_require__(/*! ./src/streaming/MediaPlayerFactory */ \"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js\");var _MediaPlayerFactory2=_interopRequireDefault(_MediaPlayerFactory);var _Debug=__webpack_require__(/*! ./src/core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */dashjs.Protection=_Protection2.default;dashjs.MetricsReporting=_MetricsReporting2.default;dashjs.MediaPlayerFactory=_MediaPlayerFactory2.default;dashjs.Debug=_Debug2.default;dashjs.supportsMediaSource=_Capabilities.supportsMediaSource;exports.default=dashjs;exports.MediaPlayer=_index_mediaplayerOnly.MediaPlayer;exports.Protection=_Protection2.default;exports.MetricsReporting=_MetricsReporting2.default;exports.MediaPlayerFactory=_MediaPlayerFactory2.default;exports.Debug=_Debug2.default;exports.supportsMediaSource=_Capabilities.supportsMediaSource;\\n//# sourceMappingURL=index.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/index.js?')},\"../node_modules/dashjs/build/es5/index_mediaplayerOnly.js\":function(module,exports,__webpack_require__){\"use strict\";eval('/* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports,\"__esModule\",{value:true});exports.Debug=exports.FactoryMaker=exports.MediaPlayer=undefined;var _MediaPlayer=__webpack_require__(/*! ./src/streaming/MediaPlayer */ \"../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js\");var _MediaPlayer2=_interopRequireDefault(_MediaPlayer);var _FactoryMaker=__webpack_require__(/*! ./src/core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ./src/core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _Version=__webpack_require__(/*! ./src/core/Version */ \"../node_modules/dashjs/build/es5/src/core/Version.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// Shove both of these into the global scope\\n/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var context=typeof window!==\\'undefined\\'&&window||global;var dashjs=context.dashjs;if(!dashjs){dashjs=context.dashjs={};}dashjs.MediaPlayer=_MediaPlayer2.default;dashjs.FactoryMaker=_FactoryMaker2.default;dashjs.Debug=_Debug2.default;dashjs.Version=(0,_Version.getVersionString)();exports.default=dashjs;exports.MediaPlayer=_MediaPlayer2.default;exports.FactoryMaker=_FactoryMaker2.default;exports.Debug=_Debug2.default;\\n//# sourceMappingURL=index_mediaplayerOnly.js.map\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/index_mediaplayerOnly.js?')},\"../node_modules/dashjs/build/es5/src/core/Debug.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ./EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ./events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ./FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var LOG_LEVEL_NONE=0;/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var LOG_LEVEL_FATAL=1;var LOG_LEVEL_ERROR=2;var LOG_LEVEL_WARNING=3;var LOG_LEVEL_INFO=4;var LOG_LEVEL_DEBUG=5;/**\\n * @module Debug\\n * @param {object} config\\n * @ignore\\n */function Debug(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=config.settings;var logFn=[];var instance=void 0,showLogTimestamp=void 0,showCalleeName=void 0,startTime=void 0;function setup(){showLogTimestamp=true;showCalleeName=true;startTime=new Date().getTime();if(typeof window!=='undefined'&&window.console){logFn[LOG_LEVEL_FATAL]=getLogFn(window.console.error);logFn[LOG_LEVEL_ERROR]=getLogFn(window.console.error);logFn[LOG_LEVEL_WARNING]=getLogFn(window.console.warn);logFn[LOG_LEVEL_INFO]=getLogFn(window.console.info);logFn[LOG_LEVEL_DEBUG]=getLogFn(window.console.debug);}}function getLogFn(fn){if(fn&&fn.bind){return fn.bind(window.console);}// if not define, return the default function for reporting logs\\nreturn window.console.log.bind(window.console);}/**\\n     * Retrieves a logger which can be used to write logging information in browser console.\\n     * @param {object} instance Object for which the logger is created. It is used\\n     * to include calle object information in log messages.\\n     * @memberof module:Debug\\n     * @returns {Logger}\\n     * @instance\\n     */function getLogger(instance){return{fatal:fatal.bind(instance),error:error.bind(instance),warn:warn.bind(instance),info:info.bind(instance),debug:debug.bind(instance)};}/**\\n     * Prepends a timestamp in milliseconds to each log message.\\n     * @param {boolean} value Set to true if you want to see a timestamp in each log message.\\n     * @default LOG_LEVEL_WARNING\\n     * @memberof module:Debug\\n     * @instance\\n     */function setLogTimestampVisible(value){showLogTimestamp=value;}/**\\n     * Prepends the callee object name, and media type if available, to each log message.\\n     * @param {boolean} value Set to true if you want to see the callee object name and media type in each log message.\\n     * @default true\\n     * @memberof module:Debug\\n     * @instance\\n     */function setCalleeNameVisible(value){showCalleeName=value;}function fatal(){for(var _len=arguments.length,params=Array(_len),_key=0;_key<_len;_key++){params[_key]=arguments[_key];}doLog.apply(undefined,[LOG_LEVEL_FATAL,this].concat(params));}function error(){for(var _len2=arguments.length,params=Array(_len2),_key2=0;_key2<_len2;_key2++){params[_key2]=arguments[_key2];}doLog.apply(undefined,[LOG_LEVEL_ERROR,this].concat(params));}function warn(){for(var _len3=arguments.length,params=Array(_len3),_key3=0;_key3<_len3;_key3++){params[_key3]=arguments[_key3];}doLog.apply(undefined,[LOG_LEVEL_WARNING,this].concat(params));}function info(){for(var _len4=arguments.length,params=Array(_len4),_key4=0;_key4<_len4;_key4++){params[_key4]=arguments[_key4];}doLog.apply(undefined,[LOG_LEVEL_INFO,this].concat(params));}function debug(){for(var _len5=arguments.length,params=Array(_len5),_key5=0;_key5<_len5;_key5++){params[_key5]=arguments[_key5];}doLog.apply(undefined,[LOG_LEVEL_DEBUG,this].concat(params));}function doLog(level,_this){var message='';var logTime=null;if(showLogTimestamp){logTime=new Date().getTime();message+='['+(logTime-startTime)+']';}if(showCalleeName&&_this&&_this.getClassName){message+='['+_this.getClassName()+']';if(_this.getType){message+='['+_this.getType()+']';}}if(message.length>0){message+=' ';}for(var _len6=arguments.length,params=Array(_len6>2?_len6-2:0),_key6=2;_key6<_len6;_key6++){params[_key6-2]=arguments[_key6];}Array.apply(null,params).forEach(function(item){message+=item+' ';});// log to console if the log level is high enough\\nif(logFn[level]&&settings.get().debug.logLevel>=level){logFn[level](message);}// send log event regardless of log level\\nif(settings&&settings.get().debug.dispatchEvent){eventBus.trigger(_Events2.default.LOG,{message:message,level:level});}}instance={getLogger:getLogger,setLogTimestampVisible:setLogTimestampVisible,setCalleeNameVisible:setCalleeNameVisible};setup();return instance;}Debug.__dashjs_factory_name='Debug';var factory=_FactoryMaker2.default.getSingletonFactory(Debug);factory.LOG_LEVEL_NONE=LOG_LEVEL_NONE;factory.LOG_LEVEL_FATAL=LOG_LEVEL_FATAL;factory.LOG_LEVEL_ERROR=LOG_LEVEL_ERROR;factory.LOG_LEVEL_WARNING=LOG_LEVEL_WARNING;factory.LOG_LEVEL_INFO=LOG_LEVEL_INFO;factory.LOG_LEVEL_DEBUG=LOG_LEVEL_DEBUG;_FactoryMaker2.default.updateSingletonFactory(Debug.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=Debug.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Debug.js?\")},\"../node_modules/dashjs/build/es5/src/core/EventBus.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ./FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _MediaPlayerEvents=__webpack_require__(/*! ../streaming/MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var EVENT_PRIORITY_LOW=0;var EVENT_PRIORITY_HIGH=5000;function EventBus(){var handlers={};function on(type,listener,scope){var options=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!type){throw new Error('event type cannot be null or undefined');}if(!listener||typeof listener!=='function'){throw new Error('listener must be a function: '+listener);}var priority=options.priority||EVENT_PRIORITY_LOW;if(getHandlerIdx(type,listener,scope)>=0)return;handlers[type]=handlers[type]||[];var handler={callback:listener,scope:scope,priority:priority};if(scope&&scope.getStreamId){handler.streamId=scope.getStreamId();}if(scope&&scope.getType){handler.mediaType=scope.getType();}if(options&&options.mode){handler.mode=options.mode;}var inserted=handlers[type].some(function(item,idx){if(item&&priority>item.priority){handlers[type].splice(idx,0,handler);return true;}});if(!inserted){handlers[type].push(handler);}}function off(type,listener,scope){if(!type||!listener||!handlers[type])return;var idx=getHandlerIdx(type,listener,scope);if(idx<0)return;handlers[type][idx]=null;}function trigger(type){var payload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var filters=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!type||!handlers[type])return;payload=payload||{};if(payload.hasOwnProperty('type'))throw new Error('\\\\'type\\\\' is a reserved word for event dispatching');payload.type=type;if(filters.streamId){payload.streamId=filters.streamId;}if(filters.mediaType){payload.mediaType=filters.mediaType;}handlers[type].filter(function(handler){if(!handler){return false;}if(filters.streamId&&handler.streamId&&handler.streamId!==filters.streamId){return false;}if(filters.mediaType&&handler.mediaType&&handler.mediaType!==filters.mediaType){return false;}// This is used for dispatching DASH events. By default we use the onStart mode. Consequently we filter everything that has a non matching mode and the onReceive events for handlers that did not specify a mode.\\nif(filters.mode&&handler.mode&&handler.mode!==filters.mode||!handler.mode&&filters.mode&&filters.mode===_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE){return false;}return true;}).forEach(function(handler){return handler&&handler.callback.call(handler.scope,payload);});}function getHandlerIdx(type,listener,scope){var idx=-1;if(!handlers[type])return idx;handlers[type].some(function(item,index){if(item&&item.callback===listener&&(!scope||scope===item.scope)){idx=index;return true;}});return idx;}function reset(){handlers={};}var instance={on:on,off:off,trigger:trigger,reset:reset};return instance;}EventBus.__dashjs_factory_name='EventBus';var factory=_FactoryMaker2.default.getSingletonFactory(EventBus);factory.EVENT_PRIORITY_LOW=EVENT_PRIORITY_LOW;factory.EVENT_PRIORITY_HIGH=EVENT_PRIORITY_HIGH;_FactoryMaker2.default.updateSingletonFactory(EventBus.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=EventBus.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/EventBus.js?\")},\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @module FactoryMaker\\n * @ignore\\n */var FactoryMaker=function(){var instance=void 0;var singletonContexts=[];var singletonFactories={};var classFactories={};function extend(name,childInstance,override,context){if(!context[name]&&childInstance){context[name]={instance:childInstance,override:override};}}/**\\n     * Use this method from your extended object.  this.factory is injected into your object.\\n     * this.factory.getSingletonInstance(this.context, 'VideoModel')\\n     * will return the video model for use in the extended object.\\n     *\\n     * @param {Object} context - injected into extended object as this.context\\n     * @param {string} className - string name found in all dash.js objects\\n     * with name __dashjs_factory_name Will be at the bottom. Will be the same as the object's name.\\n     * @returns {*} Context aware instance of specified singleton name.\\n     * @memberof module:FactoryMaker\\n     * @instance\\n     */function getSingletonInstance(context,className){for(var i in singletonContexts){var obj=singletonContexts[i];if(obj.context===context&&obj.name===className){return obj.instance;}}return null;}/**\\n     * Use this method to add an singleton instance to the system.  Useful for unit testing to mock objects etc.\\n     *\\n     * @param {Object} context\\n     * @param {string} className\\n     * @param {Object} instance\\n     * @memberof module:FactoryMaker\\n     * @instance\\n     */function setSingletonInstance(context,className,instance){for(var i in singletonContexts){var obj=singletonContexts[i];if(obj.context===context&&obj.name===className){singletonContexts[i].instance=instance;return;}}singletonContexts.push({name:className,context:context,instance:instance});}/**\\n     * Use this method to remove all singleton instances associated with a particular context.\\n     *\\n     * @param {Object} context\\n     * @memberof module:FactoryMaker\\n     * @instance\\n     */function deleteSingletonInstances(context){singletonContexts=singletonContexts.filter(function(x){return x.context!==context;});}/*------------------------------------------------------------------------------------------*/// Factories storage Management\\n/*------------------------------------------------------------------------------------------*/function getFactoryByName(name,factoriesArray){return factoriesArray[name];}function updateFactory(name,factory,factoriesArray){if(name in factoriesArray){factoriesArray[name]=factory;}}/*------------------------------------------------------------------------------------------*/// Class Factories Management\\n/*------------------------------------------------------------------------------------------*/function updateClassFactory(name,factory){updateFactory(name,factory,classFactories);}function getClassFactoryByName(name){return getFactoryByName(name,classFactories);}function getClassFactory(classConstructor){var factory=getFactoryByName(classConstructor.__dashjs_factory_name,classFactories);if(!factory){factory=function factory(context){if(context===undefined){context={};}return{create:function create(){return merge(classConstructor,context,arguments);}};};classFactories[classConstructor.__dashjs_factory_name]=factory;// store factory\\n}return factory;}/*------------------------------------------------------------------------------------------*/// Singleton Factory MAangement\\n/*------------------------------------------------------------------------------------------*/function updateSingletonFactory(name,factory){updateFactory(name,factory,singletonFactories);}function getSingletonFactoryByName(name){return getFactoryByName(name,singletonFactories);}function getSingletonFactory(classConstructor){var factory=getFactoryByName(classConstructor.__dashjs_factory_name,singletonFactories);if(!factory){factory=function factory(context){var instance=void 0;if(context===undefined){context={};}return{getInstance:function getInstance(){// If we don't have an instance yet check for one on the context\\nif(!instance){instance=getSingletonInstance(context,classConstructor.__dashjs_factory_name);}// If there's no instance on the context then create one\\nif(!instance){instance=merge(classConstructor,context,arguments);singletonContexts.push({name:classConstructor.__dashjs_factory_name,context:context,instance:instance});}return instance;}};};singletonFactories[classConstructor.__dashjs_factory_name]=factory;// store factory\\n}return factory;}function merge(classConstructor,context,args){var classInstance=void 0;var className=classConstructor.__dashjs_factory_name;var extensionObject=context[className];if(extensionObject){var extension=extensionObject.instance;if(extensionObject.override){//Override public methods in parent but keep parent.\\nclassInstance=classConstructor.apply({context:context},args);extension=extension.apply({context:context,factory:instance,parent:classInstance},args);for(var prop in extension){if(classInstance.hasOwnProperty(prop)){classInstance[prop]=extension[prop];}}}else{//replace parent object completely with new object. Same as dijon.\\nreturn extension.apply({context:context,factory:instance},args);}}else{// Create new instance of the class\\nclassInstance=classConstructor.apply({context:context},args);}// Add getClassName function to class instance prototype (used by Debug)\\nclassInstance.getClassName=function(){return className;};return classInstance;}instance={extend:extend,getSingletonInstance:getSingletonInstance,setSingletonInstance:setSingletonInstance,deleteSingletonInstances:deleteSingletonInstances,getSingletonFactory:getSingletonFactory,getSingletonFactoryByName:getSingletonFactoryByName,updateSingletonFactory:updateSingletonFactory,getClassFactory:getClassFactory,getClassFactoryByName:getClassFactoryByName,updateClassFactory:updateClassFactory};return instance;}();exports.default=FactoryMaker;\\n//# sourceMappingURL=FactoryMaker.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/FactoryMaker.js?\")},\"../node_modules/dashjs/build/es5/src/core/Settings.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _typeof=typeof Symbol===\"function\"&&typeof Symbol.iterator===\"symbol\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\"function\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\"symbol\":typeof obj;};var _FactoryMaker=__webpack_require__(/*! ./FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Utils=__webpack_require__(/*! ./Utils.js */ \"../node_modules/dashjs/build/es5/src/core/Utils.js\");var _Utils2=_interopRequireDefault(_Utils);var _Debug=__webpack_require__(/*! ../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../streaming/constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../streaming/vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//** @module Settings\\n * @description Define the configuration parameters of Dash.js MediaPlayer.\\n * @see {@link module:Settings~PlayerSettings PlayerSettings} for further information about the supported configuration properties.\\n *//**\\n * @typedef {Object} PlayerSettings\\n * @property {module:Settings~DebugSettings} [debug]\\n * Debug related settings.\\n * @property {module:Settings~StreamingSettings} [streaming]\\n * Streaming related settings.\\n * @example\\n *\\n * // Full settings object\\n * settings = {\\n *      debug: {\\n *          logLevel: Debug.LOG_LEVEL_WARNING,\\n *          dispatchEvent: false\\n *      },\\n *      streaming: {\\n *          metricsMaxListDepth: 1000,\\n *          abandonLoadTimeout: 10000,\\n *          liveDelayFragmentCount: NaN,\\n *          liveDelay: null,\\n *          scheduleWhilePaused: true,\\n *          fastSwitchEnabled: false,\\n *          flushBufferAtTrackSwitch: false,\\n *          calcSegmentAvailabilityRangeFromTimeline: false,\\n *          reuseExistingSourceBuffers: true,\\n *          bufferPruningInterval: 10,\\n *          bufferToKeep: 20,\\n *          jumpGaps: true,\\n *          jumpLargeGaps: true,\\n *          smallGapLimit: 1.5,\\n *          stableBufferTime: 12,\\n *          bufferTimeAtTopQuality: 30,\\n *          bufferTimeAtTopQualityLongForm: 60,\\n *          longFormContentDurationThreshold: 600,\\n *          wallclockTimeUpdateInterval: 50,\\n *          lowLatencyEnabled: false,\\n *          keepProtectionMediaKeys: false,\\n *          useManifestDateHeaderTimeSource: true,\\n *          useSuggestedPresentationDelay: true,\\n *          useAppendWindow: true,\\n *          manifestUpdateRetryInterval: 100,\\n *          stallThreshold: 0.5,\\n *          filterUnsupportedEssentialProperties: true,\\n *          utcSynchronization: {\\n *              backgroundAttempts: 2,\\n *              timeBetweenSyncAttempts: 30,\\n *              maximumTimeBetweenSyncAttempts: 600,\\n *              minimumTimeBetweenSyncAttempts: 2,\\n *              timeBetweenSyncAttemptsAdjustmentFactor: 2,\\n *              maximumAllowedDrift: 100,\\n *              enableBackgroundSyncAfterSegmentDownloadError: true,\\n *              defaultTimingSource: {\\n *                   scheme: \\'urn:mpeg:dash:utc:http-xsdate:2014\\',\\n *                   value: \\'http://time.akamai.com/?iso&ms\\'\\n *               }\\n *          },\\n *          liveCatchup: {\\n *              minDrift: 0.02,\\n *              maxDrift: 0,\\n *              playbackRate: 0.5,\\n *              latencyThreshold: NaN,\\n *              playbackBufferMin: NaN,\\n *              enabled: false,\\n *              mode: Constants.LIVE_CATCHUP_MODE_DEFAULT\\n *           },\\n *          lastBitrateCachingInfo: { enabled: true, ttl: 360000 },\\n *          lastMediaSettingsCachingInfo: { enabled: true, ttl: 360000 },\\n *          cacheLoadThresholds: { video: 50, audio: 5 },\\n *          trackSwitchMode: {\\n *              audio: Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE,\\n *              video: Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\\n *          },\\n *          selectionModeForInitialTrack: Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE,\\n *          fragmentRequestTimeout: 0,\\n *          retryIntervals: {\\n *              MPD: 500,\\n *              XLinkExpansion: 500,\\n *              InitializationSegment: 1000,\\n *              IndexSegment: 1000,\\n *              MediaSegment: 1000,\\n *              BitstreamSwitchingSegment: 1000,\\n *              other: 1000,\\n *              lowLatencyReductionFactor: 10\\n *          },\\n *          retryAttempts: {\\n *              MPD: 3,\\n *              XLinkExpansion: 1,\\n *              InitializationSegment: 3,\\n *              IndexSegment: 3,\\n *              MediaSegment: 3,\\n *              BitstreamSwitchingSegment: 3,\\n *              other: 3,\\n *              lowLatencyMultiplyFactor: 5\\n *          },\\n *          abr: {\\n *              movingAverageMethod: Constants.MOVING_AVERAGE_SLIDING_WINDOW,\\n *              ABRStrategy: Constants.ABR_STRATEGY_DYNAMIC,\\n *              bandwidthSafetyFactor: 0.9,\\n *              useDefaultABRRules: true,\\n *              useDeadTimeLatency: true,\\n *              limitBitrateByPortal: false,\\n *              usePixelRatioInLimitBitrateByPortal: false,\\n *              maxBitrate: { audio: -1, video: -1 },\\n *              minBitrate: { audio: -1, video: -1 },\\n *              maxRepresentationRatio: { audio: 1, video: 1 },\\n *              initialBitrate: { audio: -1, video: -1 },\\n *              initialRepresentationRatio: { audio: -1, video: -1 },\\n *              autoSwitchBitrate: { audio: true, video: true },\\n *              fetchThroughputCalculationMode: Constants.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA\\n *          },\\n *          cmcd: {\\n *              enabled: false,\\n *              sid: null,\\n *              cid: null,\\n *              rtp: null,\\n *              rtpSafetyFactor: 5\\n *          }\\n *      }\\n * }\\n *//**\\n * @typedef {Object} DebugSettings\\n * @property {number} [logLevel=dashjs.Debug.LOG_LEVEL_WARNING]\\n * Sets up the log level. The levels are cumulative.\\n *\\n * For example, if you set the log level to dashjs.Debug.LOG_LEVEL_WARNING all warnings, errors and fatals will be logged.\\n *\\n * Possible values.\\n *\\n * - dashjs.Debug.LOG_LEVEL_NONE\\n * No message is written in the browser console.\\n *\\n * - dashjs.Debug.LOG_LEVEL_FATAL\\n * Log fatal errors.\\n * An error is considered fatal when it causes playback to fail completely.\\n *\\n * - dashjs.Debug.LOG_LEVEL_ERROR\\n * Log error messages.\\n *\\n * - dashjs.Debug.LOG_LEVEL_WARNING\\n * Log warning messages.\\n *\\n * - dashjs.Debug.LOG_LEVEL_INFO\\n * Log info messages.\\n *\\n * - dashjs.Debug.LOG_LEVEL_DEBUG\\n * Log debug messages.\\n * @property {boolean} [dispatchEvent=false]\\n * Enable to trigger a Events.LOG event whenever log output is generated.\\n *\\n * Note this will be dispatched regardless of log level.\\n *//**\\n * @typedef {Object} AbrSettings\\n * @property {string} [movingAverageMethod=\"slidingWindow\"]\\n * Sets the moving average method used for smoothing throughput estimates.\\n *\\n * Valid methods are \"slidingWindow\" and \"ewma\".\\n *\\n * The call has no effect if an invalid method is passed.\\n *\\n * The sliding window moving average method computes the average throughput using the last four segments downloaded.\\n *\\n * If the stream is live (as opposed to VOD), then only the last three segments are used.\\n *\\n * If wide variations in throughput are detected, the number of segments can be dynamically increased to avoid oscillations.\\n *\\n * The exponentially weighted moving average (EWMA) method computes the average using exponential smoothing.\\n *\\n * Two separate estimates are maintained, a fast one with a three-second half life and a slow one with an eight-second half life.\\n *\\n * The throughput estimate at any time is the minimum of the fast and slow estimates.\\n *\\n * This allows a fast reaction to a bandwidth drop and prevents oscillations on bandwidth spikes.\\n * @property {string} [ABRStrategy=\"abrDynamic\"]\\n * Returns the current ABR strategy being used: \"abrDynamic\", \"abrBola\" or \"abrThroughput\".\\n * @property {number} [bandwidthSafetyFactor=0.9]\\n * Standard ABR throughput rules multiply the throughput by this value.\\n *\\n * It should be between 0 and 1, with lower values giving less rebuffering (but also lower quality).\\n * @property {boolean} [useDefaultABRRules=true]\\n * Should the default ABR rules be used, or the custom ones added.\\n * @property {boolean} [useDeadTimeLatency=true]\\n * If true, only the download portion will be considered part of the download bitrate and latency will be regarded as static.\\n *\\n * If false, the reciprocal of the whole transfer time will be used.\\n * @property {boolean} [limitBitrateByPortal=false]\\n * If true, the size of the video portal will limit the max chosen video resolution.\\n * @property {boolean} [usePixelRatioInLimitBitrateByPortal=false]\\n * Sets whether to take into account the device\\'s pixel ratio when defining the portal dimensions.\\n *\\n * Useful on, for example, retina displays.\\n * @property {module:Settings~AudioVideoSettings} [maxBitrate={audio: -1, video: -1}]\\n * The maximum bitrate that the ABR algorithms will choose.\\n *\\n * Use NaN for no limit.\\n * @property {module:Settings~AudioVideoSettings} [minBitrate={audio: -1, video: -1}]\\n * The minimum bitrate that the ABR algorithms will choose.\\n *\\n * Use NaN for no limit.\\n * @property {module:Settings~AudioVideoSettings} [maxRepresentationRatio={audio: 1, video: 1}]\\n * When switching multi-bitrate content (auto or manual mode) this property specifies the maximum representation allowed, as a proportion of the size of the representation set.\\n *\\n * You can set or remove this cap at anytime before or during playback.\\n *\\n * To clear this setting you set the value to 1.\\n *\\n * If both this and maxAllowedBitrate are defined, maxAllowedBitrate is evaluated first, then maxAllowedRepresentation, i.e. the lowest value from executing these rules is used.\\n *\\n * This feature is typically used to reserve higher representations for playback only when connected over a fast connection.\\n * @property {module:Settings~AudioVideoSettings} [initialBitrate={audio: -1, video: -1}]\\n * Explicitly set the starting bitrate for audio or video.\\n * @property {module:Settings~AudioVideoSettings} [initialRepresentationRatio={audio: -1, video: -1}]\\n * Explicitly set the initial representation ratio.\\n *\\n * If initalBitrate is specified, this is ignored.\\n * @property {module:Settings~AudioVideoSettings} [autoSwitchBitrate={audio: true, video: true}]\\n * Indicates whether the player should enable ABR algorithms to switch the bitrate.\\n *\\n * @property {string} [fetchThroughputCalculationMode=\"abrFetchThroughputCalculationDownloadedData\"]\\n * Algorithm to determine the throughput in case the Fetch API is used for low latency streaming.\\n *\\n * For details please check the samples section and FetchLoader.js.\\n *//**\\n * @typedef {Object} StreamingSettings\\n * @property {number} [metricsMaxListDepth=1000]\\n * Maximum list depth of metrics.\\n * @property {number} [abandonLoadTimeout=10000]\\n * A timeout value in seconds, which during the ABRController will block switch-up events.\\n *\\n * This will only take effect after an abandoned fragment event occurs.\\n * @property {number} [liveDelayFragmentCount=NaN]\\n * Changing this value will lower or increase live stream latency.\\n *\\n * The detected segment duration will be multiplied by this value to define a time in seconds to delay a live stream from the live edge.\\n *\\n * Lowering this value will lower latency but may decrease the player\\'s ability to build a stable buffer.\\n * @property {number} [liveDelay]\\n * Equivalent in seconds of setLiveDelayFragmentCount.\\n *\\n * Lowering this value will lower latency but may decrease the player\\'s ability to build a stable buffer.\\n *\\n * This value should be less than the manifest duration by a couple of segment durations to avoid playback issues.\\n *\\n * If set, this parameter will take precedence over setLiveDelayFragmentCount and manifest info.\\n * @property {boolean} [scheduleWhilePaused=true]\\n * Set to true if you would like dash.js to keep downloading fragments in the background when the video element is paused.\\n * @property {boolean} [fastSwitchEnabled=false]\\n * When enabled, after an ABR up-switch in quality, instead of requesting and appending the next fragment at the end of the current buffer range it is requested and appended closer to the current time.\\n *\\n * When enabled, The maximum time to render a higher quality is current time + (1.5 * fragment duration).\\n *\\n * Note, When ABR down-switch is detected, we appended the lower quality at the end of the buffer range to preserve the\\n * higher quality media for as long as possible.\\n *\\n * If enabled, it should be noted there are a few cases when the client will not replace inside buffer range but rather just append at the end.\\n * 1. When the buffer level is less than one fragment duration.\\n * 2. The client is in an Abandonment State due to recent fragment abandonment event.\\n *\\n * Known issues:\\n * 1. In IE11 with auto switching off, if a user switches to a quality they can not download in time the fragment may be appended in the same range as the playhead or even in the past, in IE11 it may cause a stutter or stall in playback.\\n * @property {boolean} [flushBufferAtTrackSwitch=false]\\n * When enabled, after a track switch and in case buffer is being replaced (see MediaPlayer.setTrackSwitchModeFor(Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE)), the video element is flushed (seek at current playback time) once a segment of the new track is appended in buffer in order to force video decoder to play new track.\\n *\\n * This can be required on some devices like GoogleCast devices to make track switching functional.\\n *\\n * Otherwise track switching will be effective only once after previous buffered track is fully consumed.\\n * @property {boolean} [calcSegmentAvailabilityRangeFromTimeline=false]\\n * Enable calculation of the DVR window for SegmentTimeline manifests based on the entries in \\\\<SegmentTimeline\\\\>.\\n * @property {boolean} [reuseExistingSourceBuffers=true]\\n * Enable reuse of existing MediaSource Sourcebuffers during period transition.\\n * @property {number} [bufferPruningInterval=10]\\n * The interval of pruning buffer in seconds.\\n * @property {number} [bufferToKeep=20]\\n * This value influences the buffer pruning logic.\\n *\\n * Allows you to modify the buffer that is kept in source buffer in seconds.\\n * 0|-----------bufferToPrune-----------|-----bufferToKeep-----|currentTime|\\n * @property {boolean} [jumpGaps=true]\\n * Sets whether player should jump small gaps (discontinuities) in the buffer.\\n * @property {boolean} [jumpLargeGaps=true]\\n * Sets whether player should jump large gaps (discontinuities) in the buffer.\\n * @property {number} [smallGapLimit=1.8]\\n * Time in seconds for a gap to be considered small.\\n * @property {number} [stableBufferTime=12]\\n * The time that the internal buffer target will be set to post startup/seeks (NOT top quality).\\n *\\n * When the time is set higher than the default you will have to wait longer to see automatic bitrate switches but will have a larger buffer which will increase stability.\\n * @property {number} [bufferTimeAtTopQuality=30]\\n * The time that the internal buffer target will be set to once playing the top quality.\\n *\\n * If there are multiple bitrates in your adaptation, and the media is playing at the highest bitrate, then we try to build a larger buffer at the top quality to increase stability and to maintain media quality.\\n * @property {number} [bufferTimeAtTopQualityLongForm=60]\\n * The time that the internal buffer target will be set to once playing the top quality for long form content.\\n * @property {number} [longFormContentDurationThreshold=600]\\n * The threshold which defines if the media is considered long form content.\\n *\\n * This will directly affect the buffer targets when playing back at the top quality.\\n * @property {number} [wallclockTimeUpdateInterval=50]\\n * How frequently the wallclockTimeUpdated internal event is triggered (in milliseconds).\\n * @property {boolean} [lowLatencyEnabled=false]\\n * Enable or disable low latency mode.\\n * @property {boolean} [keepProtectionMediaKeys=false]\\n * Set the value for the ProtectionController and MediaKeys life cycle.\\n *\\n * If true, the ProtectionController and then created MediaKeys and MediaKeySessions will be preserved during the MediaPlayer lifetime.\\n * @property {boolean} [useManifestDateHeaderTimeSource=true]\\n * Allows you to enable the use of the Date Header, if exposed with CORS, as a timing source for live edge detection.\\n *\\n * The use of the date header will happen only after the other timing source that take precedence fail or are omitted as described.\\n * @property {boolean} [useSuggestedPresentationDelay=true]\\n * Set to true if you would like to override the default live delay and honor the SuggestedPresentationDelay attribute in by the manifest.\\n * @property {boolean} [useAppendWindow=true]\\n * Specifies if the appendWindow attributes of the MSE SourceBuffers should be set according to content duration from manifest.\\n * @property {number} [manifestUpdateRetryInterval=100]\\n * For live streams, set the interval-frequency in milliseconds at which dash.js will check if the current manifest is still processed before downloading the next manifest once the minimumUpdatePeriod time has.\\n * @property {number} [stallThreshold=0.5]\\n * Stall threshold used in BufferController.js to determine whether a track should still be changed and which buffer range to prune.\\n * @property {boolean} [filterUnsupportedEssentialProperties=true]\\n * Enable to filter all the AdaptationSets and Representations which contain an unsupported \\\\<EssentialProperty\\\\> element.\\n * @property {module:Settings~UtcSynchronizationSettings} utcSynchronization Settings related to UTC clock synchronization\\n * @property {module:Settings~LiveCatchupSettings} liveCatchup  Settings related to live catchup.\\n * @property {module:Settings~CachingInfoSettings} [lastBitrateCachingInfo={enabled: true, ttl: 360000}]\\n * Set to false if you would like to disable the last known bit rate from being stored during playback and used to set the initial bit rate for subsequent playback within the expiration window.\\n *\\n * The default expiration is one hour, defined in milliseconds.\\n *\\n * If expired, the default initial bit rate (closest to 1000 kbps) will be used for that session and a new bit rate will be stored during that session.\\n * @property {module:Settings~CachingInfoSettings} [lastMediaSettingsCachingInfo={enabled: true, ttl: 360000}]\\n * Set to false if you would like to disable the last known lang for audio (or camera angle for video) from being stored during playback and used to set the initial settings for subsequent playback within the expiration window.\\n *\\n * The default expiration is one hour, defined in milliseconds.\\n *\\n * If expired, the default settings will be used for that session and a new settings will be stored during that session.\\n * @property {module:Settings~AudioVideoSettings} [cacheLoadThresholds={video: 50, audio: 5}]\\n * For a given media type, the threshold which defines if the response to a fragment request is coming from browser cache or not.\\n * @property {module:Settings~AudioVideoSettings} [trackSwitchMode={video: \"neverReplace\", audio: \"alwaysReplace\"}]\\n * For a given media type defines if existing segments in the buffer should be overwritten once the track is switched. For instance if the user switches the audio language the existing segments in the audio buffer will be replaced when setting this value to \"alwaysReplace\".\\n *\\n * Possible values\\n *\\n * - Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE\\n * Replace existing segments in the buffer\\n *\\n * - Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\\n * Do not replace existing segments in the buffer\\n *\\n * @property {string} [selectionModeForInitialTrack=\"highestBitrate\"]\\n * Sets the selection mode for the initial track. This mode defines how the initial track will be selected if no initial media settings are set. If initial media settings are set this parameter will be ignored. Available options are:\\n *\\n * Possible values\\n *\\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE\\n * This mode makes the player select the track with a highest bitrate. This mode is a default mode.\\n *\\n * - Constants.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY\\n * This mode makes the player select the track with the lowest bitrate per pixel average.\\n *\\n * - Constants.TRACK_SELECTION_MODE_WIDEST_RANGE\\n * This mode makes the player select the track with a widest range of bitrates.\\n *\\n *\\n * @property {number} [fragmentRequestTimeout=0]\\n * Time in milliseconds before timing out on loading a media fragment.\\n *\\n * Fragments that timeout are retried as if they failed.\\n * @property {module:Settings~RequestTypeSettings} [retryIntervals]\\n * Time in milliseconds of which to reload a failed file load attempt.\\n *\\n * For low latency mode these values are divided by lowLatencyReductionFactor.\\n * @property {module:Settings~RequestTypeSettings} [retryAttempts]\\n * Total number of retry attempts that will occur on a file load before it fails.\\n *\\n * For low latency mode these values are multiplied by lowLatencyMultiplyFactor.\\n * @property {module:Settings~AbrSettings} abr\\n * Adaptive Bitrate algorithm related settings.\\n * @property {module:Settings~CmcdSettings} cmcd\\n * Settings related to Common Media Client Data reporting.\\n *//**\\n * @typedef {Object} CachingInfoSettings\\n * @property {boolean} [enable]\\n * Enable or disable the caching feature.\\n * @property {number} [ttl]\\n * Time to live.\\n *\\n * A value defined in milliseconds representing how log to cache the settings for.\\n *//**\\n * @typedef {Object} module:Settings~AudioVideoSettings\\n * @property {number|boolean|string} [audio]\\n * Configuration for audio media type of tracks.\\n * @property {number|boolean|string} [video]\\n * Configuration for video media type of tracks.\\n *//**\\n * @typedef {Object} RequestTypeSettings\\n * @property {number} [MPD]\\n * Manifest type of requests.\\n * @property {number} [XLinkExpansion]\\n * XLink expansion type of requests.\\n * @property {number} [InitializationSegment]\\n * Request to retrieve an initialization segment.\\n * @property {number} [IndexSegment]\\n * Request to retrieve an index segment (SegmentBase).\\n * @property {number} [MediaSegment]\\n * Request to retrieve a media segment (video/audio/image/text chunk).\\n * @property {number} [BitstreamSwitchingSegment]\\n * Bitrate stream switching type of request.\\n * @property {number} [other]\\n * Other type of request.\\n * @property {number} [lowLatencyReductionFactor]\\n * For low latency mode, values of type of request are divided by lowLatencyReductionFactor.\\n *\\n * Note: It\\'s not type of request.\\n * @property {number} [lowLatencyMultiplyFactor]\\n * For low latency mode, values of type of request are multiplied by lowLatencyMultiplyFactor.\\n *\\n * Note: It\\'s not type of request.\\n *//**\\n * @typedef {Object} module:Settings~CmcdSettings\\n * @property {boolean} [enable=false]\\n * Enable or disable the CMCD reporting.\\n * @property {string} [sid]\\n * GUID identifying the current playback session.\\n *\\n * Should be in UUID format.\\n *\\n * If not specified a UUID will be automatically generated.\\n * @property {string} [cid]\\n * A unique string to identify the current content.\\n *\\n * If not specified it will be a hash of the MPD url.\\n * @property {number} [rtp]\\n * The requested maximum throughput that the client considers sufficient for delivery of the asset.\\n *\\n * If not specified this value will be dynamically calculated in the CMCDModel based on the current buffer level.\\n * @property {number} [rtpSafetyFactor]\\n * This value is used as a factor for the rtp value calculation: rtp = minBandwidth * rtpSafetyFactor\\n *\\n * If not specified this value defaults to 5. Note that this value is only used when no static rtp value is defined.\\n *//**\\n * @typedef {Object} module:Settings~UtcSynchronizationSettings\\n * @property {number} [backgroundAttempts=2]\\n * Number of synchronization attempts to perform in the background after an initial synchronization request has been done. This is used to verify that the derived client-server offset is correct.\\n *\\n * The background requests are async and done in parallel to the start of the playback.\\n *\\n * This value is also used to perform a resync after 404 errors on segments.\\n * @property {number} [timeBetweenSyncAttempts=30]\\n * The time in seconds between two consecutive sync attempts.\\n *\\n * Note: This value is used as an initial starting value. The internal value of the TimeSyncController is adjusted during playback based on the drift between two consecutive synchronization attempts.\\n *\\n * Note: A sync is only performed after an MPD update. In case the @minimumUpdatePeriod is larger than this value the sync will be delayed until the next MPD update.\\n * @property {number} [maximumTimeBetweenSyncAttempts=600]\\n * The maximum time in seconds between two consecutive sync attempts.\\n *\\n * @property {number} [minimumTimeBetweenSyncAttempts=2]\\n * The minimum time in seconds between two consecutive sync attempts.\\n *\\n * @property {number} [timeBetweenSyncAttemptsAdjustmentFactor=2]\\n * The factor used to multiply or divide the timeBetweenSyncAttempts parameter after a sync. The maximumAllowedDrift defines whether this value is used as a factor or a dividend.\\n *\\n * @property {number} [maximumAllowedDrift=100]\\n * The maximum allowed drift specified in milliseconds between two consecutive synchronization attempts.\\n *\\n * @property {boolean} [enableBackgroundSyncAfterSegmentDownloadError=true]\\n * Enables or disables the background sync after the player ran into a segment download error.\\n *\\n * @property {object} [defaultTimingSource={scheme:\\'urn:mpeg:dash:utc:http-xsdate:2014\\',value: \\'http://time.akamai.com/?iso&ms\\'}]\\n * The default timing source to be used. The timing sources in the MPD take precedence over this one.\\n *//**\\n * @typedef {Object} module:Settings~LiveCatchupSettings\\n * @property {number} [minDrift=0.02]\\n * Use this method to set the minimum latency deviation allowed before activating catch-up mechanism.\\n *\\n * In low latency mode, when the difference between the measured latency and the target one, as an absolute number, is higher than the one sets with this method, then dash.js increases/decreases playback rate until target latency is reached.\\n *\\n * LowLatencyMinDrift should be provided in seconds, and it uses values between 0.0 and 0.5.\\n *\\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\\n * @property {number} [maxDrift=0]\\n * Use this method to set the maximum latency deviation allowed before dash.js to do a seeking to live position.\\n *\\n * In low latency mode, when the difference between the measured latency and the target one, as an absolute number, is higher than the one sets with this method, then dash.js does a seek to live edge position minus the target live delay.\\n *\\n * LowLatencyMaxDriftBeforeSeeking should be provided in seconds.\\n *\\n * If 0, then seeking operations won\\'t be used for fixing latency deviations.\\n *\\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\\n * @property {number} [playbackRate=0.5]\\n * Use this parameter to set the maximum catch up rate, as a percentage, for low latency live streams.\\n *\\n * In low latency mode, when measured latency is higher/lower than the target one, dash.js increases/decreases playback rate respectively up to (+/-) the percentage defined with this method until target is reached.\\n *\\n * Valid values for catch up rate are in range 0-0.5 (0-50%).\\n *\\n * Set it to 0 to turn off live catch up feature.\\n *\\n * Note: Catch-up mechanism is only applied when playing low latency live streams.\\n * @property {number} [latencyThreshold=NaN]\\n * Use this parameter to set the maximum threshold for which live catch up is applied.\\n *\\n * For instance, if this value is set to 8 seconds, then live catchup is only applied if the current live latency is equal or below 8 seconds.\\n *\\n * The reason behind this parameter is to avoid an increase of the playback rate if the user seeks within the DVR window.\\n *\\n * If no value is specified this will be twice the maximum live delay.\\n *\\n * The maximum live delay is either specified in the manifest as part of a ServiceDescriptor or calculated the following:\\n * maximumLiveDelay = targetDelay + liveCatchupMinDrift.\\n *\\n * @property {number} [playbackBufferMin=NaN]\\n * Use this parameter to specify the minimum buffer which is used for LoL+ based playback rate reduction.\\n *\\n *\\n * @property {boolean} [enabled=false]\\n * Use this parameter to enable the catchup mode for non low-latency streams.\\n *\\n * @property {string} [mode=\"liveCatchupModeDefault\"]\\n * Use this parameter to switch between different catchup modes.\\n *\\n * Options: \"liveCatchupModeDefault\" or \"liveCatchupModeLOLP\".\\n *\\n * Note: Catch-up mechanism is automatically applied when playing low latency live streams.\\n *//**\\n * @class\\n * @ignore\\n */function Settings(){var _retryIntervals,_retryAttempts;var instance=void 0;/**\\n     * @const {PlayerSettings} defaultSettings\\n     * @ignore\\n     */var defaultSettings={debug:{logLevel:_Debug2.default.LOG_LEVEL_WARNING,dispatchEvent:false},streaming:{metricsMaxListDepth:1000,abandonLoadTimeout:10000,liveDelayFragmentCount:NaN,liveDelay:null,scheduleWhilePaused:true,fastSwitchEnabled:false,flushBufferAtTrackSwitch:false,calcSegmentAvailabilityRangeFromTimeline:false,reuseExistingSourceBuffers:true,bufferPruningInterval:10,bufferToKeep:20,jumpGaps:true,jumpLargeGaps:true,smallGapLimit:1.5,stableBufferTime:12,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,longFormContentDurationThreshold:600,wallclockTimeUpdateInterval:50,lowLatencyEnabled:false,keepProtectionMediaKeys:false,useManifestDateHeaderTimeSource:true,useSuggestedPresentationDelay:true,useAppendWindow:true,manifestUpdateRetryInterval:100,stallThreshold:0.5,filterUnsupportedEssentialProperties:true,utcSynchronization:{backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:true,defaultTimingSource:{scheme:\\'urn:mpeg:dash:utc:http-xsdate:2014\\',value:\\'http://time.akamai.com/?iso&ms\\'}},liveCatchup:{minDrift:0.02,maxDrift:0,playbackRate:0.5,latencyThreshold:60,playbackBufferMin:0.5,enabled:false,mode:_Constants2.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:true,ttl:360000},lastMediaSettingsCachingInfo:{enabled:true,ttl:360000},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:_Constants2.default.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:_Constants2.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,fragmentRequestTimeout:0,retryIntervals:(_retryIntervals={},_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.MPD_TYPE,500),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE,500),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.INDEX_SEGMENT_TYPE,1000),_defineProperty(_retryIntervals,_HTTPRequest.HTTPRequest.OTHER_TYPE,1000),_defineProperty(_retryIntervals,\\'lowLatencyReductionFactor\\',10),_retryIntervals),retryAttempts:(_retryAttempts={},_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.MPD_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE,1),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.INDEX_SEGMENT_TYPE,3),_defineProperty(_retryAttempts,_HTTPRequest.HTTPRequest.OTHER_TYPE,3),_defineProperty(_retryAttempts,\\'lowLatencyMultiplyFactor\\',5),_retryAttempts),abr:{movingAverageMethod:_Constants2.default.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:_Constants2.default.ABR_STRATEGY_DYNAMIC,bandwidthSafetyFactor:0.9,useDefaultABRRules:true,useDeadTimeLatency:true,limitBitrateByPortal:false,usePixelRatioInLimitBitrateByPortal:false,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:true,video:true},fetchThroughputCalculationMode:_Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA},cmcd:{enabled:false,sid:null,cid:null,rtp:null,rtpSafetyFactor:5}}};var settings=_Utils2.default.clone(defaultSettings);//Merge in the settings. If something exists in the new config that doesn\\'t match the schema of the default config,\\n//regard it as an error and log it.\\nfunction mixinSettings(source,dest,path){for(var n in source){if(source.hasOwnProperty(n)){if(dest.hasOwnProperty(n)){if(_typeof(source[n])===\\'object\\'&&source[n]!==null){mixinSettings(source[n],dest[n],path.slice()+n+\\'.\\');}else{dest[n]=_Utils2.default.clone(source[n]);}}}}}/**\\n     * Return the settings object. Don\\'t copy/store this object, you won\\'t get updates.\\n     * @func\\n     * @instance\\n     */function get(){return settings;}/**\\n     * @func\\n     * @instance\\n     * @param {object} settingsObj - This should be a partial object of the Settings.Schema type. That is, fields defined should match the path (e.g.\\n     * settingsObj.streaming.abr.autoSwitchBitrate.audio -> defaultSettings.streaming.abr.autoSwitchBitrate.audio). Where an element\\'s path does\\n     * not match it is ignored, and a warning is logged.\\n     *\\n     * Use to change the settings object. Any new values defined will overwrite the settings and anything undefined will not change.\\n     * Implementers of new settings should add it in an approriate namespace to the defaultSettings object and give it a default value (that is not undefined).\\n     *\\n     */function update(settingsObj){if((typeof settingsObj===\\'undefined\\'?\\'undefined\\':_typeof(settingsObj))===\\'object\\'){mixinSettings(settingsObj,settings,\\'\\');}}/**\\n     * Resets the settings object. Everything is set to its default value.\\n     * @func\\n     * @instance\\n     *\\n     */function reset(){settings=_Utils2.default.clone(defaultSettings);}instance={get:get,update:update,reset:reset};return instance;}Settings.__dashjs_factory_name=\\'Settings\\';var factory=_FactoryMaker2.default.getSingletonFactory(Settings);exports.default=factory;\\n//# sourceMappingURL=Settings.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Settings.js?')},\"../node_modules/dashjs/build/es5/src/core/Utils.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Utils=function(){function Utils(){_classCallCheck(this,Utils);}_createClass(Utils,null,[{key:'mixin',value:function mixin(dest,source,copy){var s=void 0;var empty={};if(dest){for(var name in source){if(source.hasOwnProperty(name)){s=source[name];if(!(name in dest)||dest[name]!==s&&(!(name in empty)||empty[name]!==s)){if(_typeof(dest[name])==='object'&&dest[name]!==null){dest[name]=Utils.mixin(dest[name],s,copy);}else{dest[name]=copy(s);}}}}}return dest;}},{key:'clone',value:function clone(src){if(!src||(typeof src==='undefined'?'undefined':_typeof(src))!=='object'){return src;// anything\\n}var r=void 0;if(src instanceof Array){// array\\nr=[];for(var i=0,l=src.length;i<l;++i){if(i in src){r.push(Utils.clone(src[i]));}}}else{r={};}return Utils.mixin(r,src,Utils.clone);}},{key:'addAditionalQueryParameterToUrl',value:function addAditionalQueryParameterToUrl(url,params){try{if(!params||params.length===0){return url;}var modifiedUrl=new URL(url);params.forEach(function(param){if(param.key&&param.value){modifiedUrl.searchParams.set(param.key,param.value);}});return modifiedUrl.href;}catch(e){return url;}}},{key:'parseHttpHeaders',value:function parseHttpHeaders(headerStr){var headers={};if(!headerStr){return headers;}// Trim headerStr to fix a MS Edge bug with xhr.getAllResponseHeaders method\\n// which send a string starting with a \\\"\\\\n\\\" character\\nvar headerPairs=headerStr.trim().split('\\\\r\\\\n');for(var i=0,ilen=headerPairs.length;i<ilen;i++){var headerPair=headerPairs[i];var index=headerPair.indexOf(': ');if(index>0){headers[headerPair.substring(0,index)]=headerPair.substring(index+2);}}return headers;}},{key:'generateUuid',value:function generateUuid(){var dt=new Date().getTime();var uuid='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=(dt+Math.random()*16)%16|0;dt=Math.floor(dt/16);return(c=='x'?r:r&0x3|0x8).toString(16);});return uuid;}},{key:'generateHashCode',value:function generateHashCode(string){var hash=0;if(string.length===0){return hash;}for(var i=0;i<string.length;i++){var chr=string.charCodeAt(i);hash=(hash<<5)-hash+chr;hash|=0;}return hash;}}]);return Utils;}();exports.default=Utils;\\n//# sourceMappingURL=Utils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Utils.js?\")},\"../node_modules/dashjs/build/es5/src/core/Version.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.getVersionString=getVersionString;var VERSION='3.2.1';function getVersionString(){return VERSION;}\\n//# sourceMappingURL=Version.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/Version.js?\")},\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ErrorsBase2=__webpack_require__(/*! ./ErrorsBase */ \\\"../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js\\\");var _ErrorsBase3=_interopRequireDefault(_ErrorsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Errors declaration\\n * @class\\n */var Errors=function(_ErrorsBase){_inherits(Errors,_ErrorsBase);function Errors(){_classCallCheck(this,Errors);/**\\n         * Error code returned when a manifest parsing error occurs\\n         */var _this=_possibleConstructorReturn(this,(Errors.__proto__||Object.getPrototypeOf(Errors)).call(this));_this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10;/**\\n         * Error code returned when a manifest loading error occurs\\n         */_this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11;/**\\n         * Error code returned when a xlink loading error occurs\\n         */_this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12;/**\\n         * Error code returned when the update of segments list has failed\\n         */_this.SEGMENTS_UPDATE_FAILED_ERROR_CODE=13;_this.SEGMENTS_UNAVAILABLE_ERROR_CODE=14;_this.SEGMENT_BASE_LOADER_ERROR_CODE=15;_this.TIME_SYNC_FAILED_ERROR_CODE=16;_this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17;_this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18;_this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19;_this.APPEND_ERROR_CODE=20;_this.REMOVE_ERROR_CODE=21;_this.DATA_UPDATE_FAILED_ERROR_CODE=22;/**\\n         * Error code returned when MediaSource is not supported by the browser\\n         */_this.CAPABILITY_MEDIASOURCE_ERROR_CODE=23;/**\\n         * Error code returned when Protected contents are not supported\\n         */_this.CAPABILITY_MEDIAKEYS_ERROR_CODE=24;_this.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25;_this.DOWNLOAD_ERROR_ID_SIDX_CODE=26;_this.DOWNLOAD_ERROR_ID_CONTENT_CODE=27;_this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28;_this.DOWNLOAD_ERROR_ID_XLINK_CODE=29;_this.MANIFEST_ERROR_ID_CODEC_CODE=30;_this.MANIFEST_ERROR_ID_PARSE_CODE=31;/**\\n         * Error code returned when no stream (period) has been detected in the manifest\\n         */_this.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32;/**\\n         * Error code returned when something wrong has append during subtitles parsing (TTML or VTT)\\n         */_this.TIMED_TEXT_ERROR_ID_PARSE_CODE=33;/**\\n         * Error code returned when a 'muxed' media type has been detected in the manifest. This type is not supported\\n         */_this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34;/**\\n         * Error code returned when a media source type is not supported\\n         */_this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35;_this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE='parsing failed for ';_this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE='Failed loading manifest: ';_this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE='Failed loading Xlink element: ';_this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE='Segments update failed';_this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE='no segments are available yet';_this.SEGMENT_BASE_LOADER_ERROR_MESSAGE='error loading segments';_this.TIME_SYNC_FAILED_ERROR_MESSAGE='Failed to synchronize time';_this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE='request is null';_this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE='Failed to resolve a valid URL';_this.APPEND_ERROR_MESSAGE='chunk is not defined';_this.REMOVE_ERROR_MESSAGE='buffer is not defined';_this.DATA_UPDATE_FAILED_ERROR_MESSAGE='Data update failed';_this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE='mediasource is not supported';_this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE='mediakeys is not supported';_this.TIMED_TEXT_ERROR_MESSAGE_PARSE='parsing error :';_this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE='Error creating source buffer of type : ';return _this;}return Errors;}(_ErrorsBase3.default);var errors=new Errors();exports.default=errors;\\n//# sourceMappingURL=Errors.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/errors/Errors.js?\")},\"../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\"value\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var ErrorsBase=function(){function ErrorsBase(){_classCallCheck(this,ErrorsBase);}_createClass(ErrorsBase,[{key:\\'extend\\',value:function extend(errors,config){if(!errors)return;var override=config?config.override:false;var publicOnly=config?config.publicOnly:false;for(var err in errors){if(!errors.hasOwnProperty(err)||this[err]&&!override)continue;if(publicOnly&&errors[err].indexOf(\\'public_\\')===-1)continue;this[err]=errors[err];}}}]);return ErrorsBase;}();exports.default=ErrorsBase;\\n//# sourceMappingURL=ErrorsBase.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js?')},\"../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ./EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * These are internal events that should not be needed at the player level.\\n * If you find and event in here that you would like access to from MediaPlayer level\\n * please add an issue at https://github.com/Dash-Industry-Forum/dash.js/issues/new\\n * @class\\n * @ignore\\n */var CoreEvents=function(_EventsBase){_inherits(CoreEvents,_EventsBase);function CoreEvents(){_classCallCheck(this,CoreEvents);var _this=_possibleConstructorReturn(this,(CoreEvents.__proto__||Object.getPrototypeOf(CoreEvents)).call(this));_this.ATTEMPT_BACKGROUND_SYNC='attemptBackgroundSync';_this.BUFFERING_COMPLETED='bufferingCompleted';_this.BUFFER_CLEARED='bufferCleared';_this.BUFFER_LEVEL_UPDATED='bufferLevelUpdated';_this.BYTES_APPENDED='bytesAppended';_this.BYTES_APPENDED_END_FRAGMENT='bytesAppendedEndFragment';_this.CHECK_FOR_EXISTENCE_COMPLETED='checkForExistenceCompleted';_this.CURRENT_TRACK_CHANGED='currentTrackChanged';_this.DATA_UPDATE_COMPLETED='dataUpdateCompleted';_this.DATA_UPDATE_STARTED='dataUpdateStarted';_this.INBAND_EVENTS='inbandEvents';_this.INITIALIZATION_LOADED='initializationLoaded';_this.INIT_FRAGMENT_LOADED='initFragmentLoaded';_this.INIT_FRAGMENT_NEEDED='initFragmentNeeded';_this.INTERNAL_MANIFEST_LOADED='internalManifestLoaded';_this.ORIGINAL_MANIFEST_LOADED='originalManifestLoaded';_this.LIVE_EDGE_SEARCH_COMPLETED='liveEdgeSearchCompleted';_this.LOADING_COMPLETED='loadingCompleted';_this.LOADING_PROGRESS='loadingProgress';_this.LOADING_DATA_PROGRESS='loadingDataProgress';_this.LOADING_ABANDONED='loadingAborted';_this.MANIFEST_UPDATED='manifestUpdated';_this.MEDIA_FRAGMENT_LOADED='mediaFragmentLoaded';_this.MEDIA_FRAGMENT_NEEDED='mediaFragmentNeeded';_this.QUOTA_EXCEEDED='quotaExceeded';_this.REPRESENTATION_UPDATE_STARTED='representationUpdateStarted';_this.REPRESENTATION_UPDATE_COMPLETED='representationUpdateCompleted';_this.SEGMENTS_LOADED='segmentsLoaded';_this.SERVICE_LOCATION_BLACKLIST_ADD='serviceLocationBlacklistAdd';_this.SERVICE_LOCATION_BLACKLIST_CHANGED='serviceLocationBlacklistChanged';_this.SOURCEBUFFER_REMOVE_COMPLETED='sourceBufferRemoveCompleted';_this.STREAMS_COMPOSED='streamsComposed';_this.STREAM_BUFFERING_COMPLETED='streamBufferingCompleted';_this.STREAM_COMPLETED='streamCompleted';_this.TEXT_TRACKS_QUEUE_INITIALIZED='textTracksQueueInitialized';_this.TIME_SYNCHRONIZATION_COMPLETED='timeSynchronizationComplete';_this.UPDATE_TIME_SYNC_OFFSET='updateTimeSyncOffset';_this.URL_RESOLUTION_FAILED='urlResolutionFailed';_this.VIDEO_CHUNK_RECEIVED='videoChunkReceived';_this.WALLCLOCK_TIME_UPDATED='wallclockTimeUpdated';_this.XLINK_ELEMENT_LOADED='xlinkElementLoaded';_this.XLINK_READY='xlinkReady';_this.SEGMENTBASE_INIT_REQUEST_NEEDED='segmentBaseInitRequestNeeded';_this.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED='segmentBaseSegmentsListRequestNeeded';_this.SEEK_TARGET='seekTarget';return _this;}return CoreEvents;}(_EventsBase3.default);exports.default=CoreEvents;\\n//# sourceMappingURL=CoreEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js?\")},\"../node_modules/dashjs/build/es5/src/core/events/Events.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _CoreEvents2=__webpack_require__(/*! ./CoreEvents */ \"../node_modules/dashjs/build/es5/src/core/events/CoreEvents.js\");var _CoreEvents3=_interopRequireDefault(_CoreEvents2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Events=function(_CoreEvents){_inherits(Events,_CoreEvents);function Events(){_classCallCheck(this,Events);return _possibleConstructorReturn(this,(Events.__proto__||Object.getPrototypeOf(Events)).apply(this,arguments));}return Events;}(_CoreEvents3.default);var events=new Events();exports.default=events;\\n//# sourceMappingURL=Events.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/events/Events.js?')},\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\"value\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var EventsBase=function(){function EventsBase(){_classCallCheck(this,EventsBase);}_createClass(EventsBase,[{key:\\'extend\\',value:function extend(events,config){if(!events)return;var override=config?config.override:false;var publicOnly=config?config.publicOnly:false;for(var evt in events){if(!events.hasOwnProperty(evt)||this[evt]&&!override)continue;if(publicOnly&&events[evt].indexOf(\\'public_\\')===-1)continue;this[evt]=events[evt];}}}]);return EventsBase;}();exports.default=EventsBase;\\n//# sourceMappingURL=EventsBase.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/core/events/EventsBase.js?')},\"../node_modules/dashjs/build/es5/src/dash/DashAdapter.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashConstants=__webpack_require__(/*! ./constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _RepresentationInfo=__webpack_require__(/*! ./vo/RepresentationInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js\\\");var _RepresentationInfo2=_interopRequireDefault(_RepresentationInfo);var _MediaInfo=__webpack_require__(/*! ./vo/MediaInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js\\\");var _MediaInfo2=_interopRequireDefault(_MediaInfo);var _StreamInfo=__webpack_require__(/*! ./vo/StreamInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js\\\");var _StreamInfo2=_interopRequireDefault(_StreamInfo);var _ManifestInfo=__webpack_require__(/*! ./vo/ManifestInfo */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js\\\");var _ManifestInfo2=_interopRequireDefault(_ManifestInfo);var _Event=__webpack_require__(/*! ./vo/Event */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Event.js\\\");var _Event2=_interopRequireDefault(_Event);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashManifestModel=__webpack_require__(/*! ./models/DashManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\\\");var _DashManifestModel2=_interopRequireDefault(_DashManifestModel);var _PatchManifestModel=__webpack_require__(/*! ./models/PatchManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js\\\");var _PatchManifestModel2=_interopRequireDefault(_PatchManifestModel);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module DashAdapter\\n */function DashAdapter(){var instance=void 0,dashManifestModel=void 0,patchManifestModel=void 0,voPeriods=void 0,voAdaptations=void 0,currentMediaInfo=void 0,constants=void 0,cea608parser=void 0;var context=this.context;var PROFILE_DVB='urn:dvb:dash:profile:dvb-dash:2014';function setup(){dashManifestModel=(0,_DashManifestModel2.default)(context).getInstance();patchManifestModel=(0,_PatchManifestModel2.default)(context).getInstance();reset();}// #region PUBLIC FUNCTIONS\\n// --------------------------------------------------\\nfunction getVoAdaptations(){return voAdaptations;}function getVoPeriods(){return voPeriods;}function setConfig(config){if(!config)return;if(config.constants){constants=config.constants;}if(config.cea608parser){cea608parser=config.cea608parser;}if(config.errHandler){dashManifestModel.setConfig({errHandler:config.errHandler});}if(config.BASE64){dashManifestModel.setConfig({BASE64:config.BASE64});}}/**\\n     * Creates an instance of RepresentationInfo based on a representation value object\\n     * @param {object} voRepresentation\\n     * @returns {RepresentationInfo|null} representationInfo\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function convertRepresentationToRepresentationInfo(voRepresentation){if(voRepresentation){var representationInfo=new _RepresentationInfo2.default();var realAdaptation=voRepresentation.adaptation.period.mpd.manifest.Period_asArray[voRepresentation.adaptation.period.index].AdaptationSet_asArray[voRepresentation.adaptation.index];var realRepresentation=dashManifestModel.getRepresentationFor(voRepresentation.index,realAdaptation);representationInfo.id=voRepresentation.id;representationInfo.quality=voRepresentation.index;representationInfo.bandwidth=dashManifestModel.getBandwidth(realRepresentation);representationInfo.DVRWindow=voRepresentation.segmentAvailabilityRange;representationInfo.fragmentDuration=voRepresentation.segmentDuration||(voRepresentation.segments&&voRepresentation.segments.length>0?voRepresentation.segments[0].duration:NaN);representationInfo.MSETimeOffset=voRepresentation.MSETimeOffset;representationInfo.mediaInfo=convertAdaptationToMediaInfo(voRepresentation.adaptation);return representationInfo;}else{return null;}}/**\\n     * Returns a MediaInfo object for a given media type.\\n     * @param {object} streamInfo\\n     * @param {MediaType }type\\n     * @returns {null|MediaInfo} mediaInfo\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getMediaInfoForType(streamInfo,type){if(voPeriods.length===0||!streamInfo){return null;}var selectedVoPeriod=getPeriodForStreamInfo(streamInfo,voPeriods);if(!selectedVoPeriod)return null;var periodId=selectedVoPeriod.id;voAdaptations[periodId]=voAdaptations[periodId]||dashManifestModel.getAdaptationsForPeriod(selectedVoPeriod);var realAdaptation=getAdaptationForType(streamInfo.index,type,streamInfo);if(!realAdaptation)return null;var idx=dashManifestModel.getIndexForAdaptation(realAdaptation,voPeriods[0].mpd.manifest,streamInfo.index);return convertAdaptationToMediaInfo(voAdaptations[periodId][idx]);}/**\\n     * Checks if the role of the specified AdaptationSet is set to main\\n     * @param {object} adaptation\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getIsMain(adaptation){return dashManifestModel.getRolesForAdaptation(adaptation).filter(function(role){return role.value===_DashConstants2.default.MAIN;})[0];}/**\\n     * Returns the AdaptationSet for a given period and a given mediaType.\\n     * @param {number} periodIndex\\n     * @param {MediaType} type\\n     * @param {object} streamInfo\\n     * @returns {null|object} adaptation\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getAdaptationForType(periodIndex,type,streamInfo){var adaptations=dashManifestModel.getAdaptationsForType(voPeriods[0].mpd.manifest,periodIndex,type);if(!adaptations||adaptations.length===0)return null;if(adaptations.length>1&&streamInfo){var allMediaInfoForType=getAllMediaInfoForType(streamInfo,type);if(currentMediaInfo[streamInfo.id]&&currentMediaInfo[streamInfo.id][type]){for(var i=0,ln=adaptations.length;i<ln;i++){if(areMediaInfosEqual(currentMediaInfo[streamInfo.id][type],allMediaInfoForType[i])){return adaptations[i];}}}for(var _i=0,_ln=adaptations.length;_i<_ln;_i++){if(getIsMain(adaptations[_i])){return adaptations[_i];}}}return adaptations[0];}/**\\n     * Compares two mediaInfo objects\\n     * @param {MediaInfo} mInfoOne\\n     * @param {MediaInfo} mInfoTwo\\n     * @returns {boolean}\\n     */function areMediaInfosEqual(mInfoOne,mInfoTwo){if(!mInfoOne||!mInfoTwo){return false;}var sameId=mInfoOne.id===mInfoTwo.id;var sameViewpoint=mInfoOne.viewpoint===mInfoTwo.viewpoint;var sameLang=mInfoOne.lang===mInfoTwo.lang;var sameRoles=mInfoOne.roles.toString()===mInfoTwo.roles.toString();var sameAccessibility=mInfoOne.accessibility.toString()===mInfoTwo.accessibility.toString();var sameAudioChannelConfiguration=mInfoOne.audioChannelConfiguration.toString()===mInfoTwo.audioChannelConfiguration.toString();return sameId&&sameViewpoint&&sameLang&&sameRoles&&sameAccessibility&&sameAudioChannelConfiguration;}/**\\n     * Returns the mediaInfo for a given mediaType\\n     * @param {object} streamInfo\\n     * @param {MediaType} type\\n     * @param {object} externalManifest Set to null or undefined if no external manifest is to be used\\n     * @returns {Array} mediaArr\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getAllMediaInfoForType(streamInfo,type,externalManifest){var voLocalPeriods=voPeriods;var manifest=externalManifest;var mediaArr=[];var data=void 0,media=void 0,idx=void 0,i=void 0,j=void 0,ln=void 0,periodId=void 0;if(manifest){checkConfig();voLocalPeriods=getRegularPeriods(manifest);}else{if(voPeriods.length>0){manifest=voPeriods[0].mpd.manifest;}else{return mediaArr;}}var selectedVoPeriod=getPeriodForStreamInfo(streamInfo,voLocalPeriods);if(selectedVoPeriod){periodId=selectedVoPeriod.id;}var adaptationsForType=dashManifestModel.getAdaptationsForType(manifest,streamInfo?streamInfo.index:null,type!==constants.EMBEDDED_TEXT?type:constants.VIDEO);if(!adaptationsForType||adaptationsForType.length===0)return mediaArr;voAdaptations[periodId]=voAdaptations[periodId]||dashManifestModel.getAdaptationsForPeriod(selectedVoPeriod);for(i=0,ln=adaptationsForType.length;i<ln;i++){data=adaptationsForType[i];idx=dashManifestModel.getIndexForAdaptation(data,manifest,streamInfo.index);media=convertAdaptationToMediaInfo(voAdaptations[periodId][idx]);if(type===constants.EMBEDDED_TEXT){var accessibilityLength=media.accessibility.length;for(j=0;j<accessibilityLength;j++){if(!media){continue;}var accessibility=media.accessibility[j];if(accessibility.indexOf('cea-608:')===0){var value=accessibility.substring(8);var parts=value.split(';');if(parts[0].substring(0,2)==='CC'){for(j=0;j<parts.length;j++){if(!media){media=convertAdaptationToMediaInfo.call(this,voAdaptations[periodId][idx]);}convertVideoInfoToEmbeddedTextInfo(media,parts[j].substring(0,3),parts[j].substring(4));mediaArr.push(media);media=null;}}else{for(j=0;j<parts.length;j++){// Only languages for CC1, CC2, ...\\nif(!media){media=convertAdaptationToMediaInfo.call(this,voAdaptations[periodId][idx]);}convertVideoInfoToEmbeddedTextInfo(media,'CC'+(j+1),parts[j]);mediaArr.push(media);media=null;}}}else if(accessibility.indexOf('cea-608')===0){// Nothing known. We interpret it as CC1=eng\\nconvertVideoInfoToEmbeddedTextInfo(media,constants.CC1,'eng');mediaArr.push(media);media=null;}}}else if(type===constants.IMAGE){convertVideoInfoToThumbnailInfo(media);mediaArr.push(media);media=null;}else if(media){mediaArr.push(media);}}return mediaArr;}/**\\n     * @param {object} newManifest\\n     * @returns {*}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function updatePeriods(newManifest){if(!newManifest)return null;checkConfig();voPeriods=getRegularPeriods(newManifest);voAdaptations={};}/**\\n     * @param {object} externalManifest\\n     * @param {number} maxStreamsInfo\\n     * @returns {Array} streams\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getStreamsInfo(externalManifest,maxStreamsInfo){var streams=[];var voLocalPeriods=voPeriods;//if manifest is defined, getStreamsInfo is for an outside manifest, not the current one\\nif(externalManifest){checkConfig();voLocalPeriods=getRegularPeriods(externalManifest);}if(voLocalPeriods.length>0){if(!maxStreamsInfo||maxStreamsInfo>voLocalPeriods.length){maxStreamsInfo=voLocalPeriods.length;}for(var i=0;i<maxStreamsInfo;i++){streams.push(convertPeriodToStreamInfo(voLocalPeriods[i]));}}return streams;}/**\\n     *\\n     * @param {object} streamInfo\\n     * @param {object} mediaInfo\\n     * @returns {object} realAdaptation\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getRealAdaptation(streamInfo,mediaInfo){var id=void 0,realAdaptation=void 0;var selectedVoPeriod=getPeriodForStreamInfo(streamInfo,voPeriods);id=mediaInfo?mediaInfo.id:null;if(voPeriods.length>0&&selectedVoPeriod){realAdaptation=id?dashManifestModel.getAdaptationForId(id,voPeriods[0].mpd.manifest,selectedVoPeriod.index):dashManifestModel.getAdaptationForIndex(mediaInfo?mediaInfo.index:null,voPeriods[0].mpd.manifest,selectedVoPeriod.index);}return realAdaptation;}/**\\n     * Return all EssentialProperties of a Representation\\n     * @param {object} representation\\n     * @return {array}\\n     */function getEssentialPropertiesForRepresentation(representation){try{return dashManifestModel.getEssentialPropertiesForRepresentation(representation);}catch(e){return[];}}/**\\n     * Returns the period by index\\n     * @param {number} index\\n     * @return {object}\\n     */function getRealPeriodByIndex(index){return dashManifestModel.getRealPeriodForIndex(index,voPeriods[0].mpd.manifest);}/**\\n     * Returns all voRepresentations for a given mediaInfo\\n     * @param {object} mediaInfo\\n     * @returns {Array} voReps\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getVoRepresentations(mediaInfo){var voReps=void 0;var voAdaptation=getAdaptationForMediaInfo(mediaInfo);voReps=dashManifestModel.getRepresentationsForAdaptation(voAdaptation);return voReps;}/**\\n     *\\n     * @param {object} eventBox\\n     * @param {object} eventStreams\\n     * @param {number} mediaStartTime\\n     * @param {object} voRepresentation\\n     * @returns {null|Event}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getEvent(eventBox,eventStreams,mediaStartTime,voRepresentation){try{if(!eventBox||!eventStreams||isNaN(mediaStartTime)||!voRepresentation){return null;}var schemeIdUri=eventBox.scheme_id_uri;var value=eventBox.value;if(!eventStreams[schemeIdUri+'/'+value]){return null;}var event=new _Event2.default();var timescale=eventBox.timescale||1;var periodStart=voRepresentation.adaptation.period.start;var eventStream=eventStreams[schemeIdUri+'/'+value];var presentationTimeOffset=!isNaN(voRepresentation.presentationTimeOffset)?voRepresentation.presentationTimeOffset:!isNaN(eventStream.presentationTimeOffset)?eventStream.presentationTimeOffset:0;var presentationTimeDelta=eventBox.presentation_time_delta/timescale;// In case of version 1 events the presentation_time is parsed as presentation_time_delta\\nvar calculatedPresentationTime=void 0;if(eventBox.version===0){calculatedPresentationTime=periodStart+mediaStartTime-presentationTimeOffset+presentationTimeDelta;}else{calculatedPresentationTime=periodStart-presentationTimeOffset+presentationTimeDelta;}var duration=eventBox.event_duration;var id=eventBox.id;var messageData=eventBox.message_data;event.eventStream=eventStream;event.eventStream.value=value;event.eventStream.timescale=timescale;event.duration=duration;event.id=id;event.calculatedPresentationTime=calculatedPresentationTime;event.messageData=messageData;event.presentationTimeDelta=presentationTimeDelta;return event;}catch(e){return null;}}/**\\n     *\\n     * @param {object} info\\n     * @param {object} voRepresentation\\n     * @returns {Array}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getEventsFor(info,voRepresentation){var events=[];if(voPeriods.length>0){var manifest=voPeriods[0].mpd.manifest;if(info instanceof _StreamInfo2.default){events=dashManifestModel.getEventsForPeriod(getPeriodForStreamInfo(info,voPeriods));}else if(info instanceof _MediaInfo2.default){events=dashManifestModel.getEventStreamForAdaptationSet(manifest,getAdaptationForMediaInfo(info));}else if(info instanceof _RepresentationInfo2.default){events=dashManifestModel.getEventStreamForRepresentation(manifest,voRepresentation);}}return events;}/**\\n     *\\n     * @param {number} streamId\\n     * @param {MediaType} type\\n     * @param {object} mediaInfo\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function setCurrentMediaInfo(streamId,type,mediaInfo){currentMediaInfo[streamId]=currentMediaInfo[streamId]||{};currentMediaInfo[streamId][type]=currentMediaInfo[streamId][type]||{};currentMediaInfo[streamId][type]=mediaInfo;}/**\\n     *\\n     * @param {String} type\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getIsTextTrack(type){return dashManifestModel.getIsTextTrack(type);}/**\\n     * Returns the UTC Timing Sources specified in the manifest\\n     * @returns {Array} utcTimingSources\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getUTCTimingSources(){var manifest=getManifest();return dashManifestModel.getUTCTimingSources(manifest);}/**\\n     * Returns the suggestedPresentationDelay as specified in the manifest\\n     * @returns {String} suggestedPresentationDelay\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getSuggestedPresentationDelay(){var mpd=voPeriods.length>0?voPeriods[0].mpd:null;return dashManifestModel.getSuggestedPresentationDelay(mpd);}/**\\n     * Returns the availabilityStartTime as specified in the manifest\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {string} availabilityStartTime\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getAvailabilityStartTime(externalManifest){var mpd=getMpd(externalManifest);return dashManifestModel.getAvailabilityStartTime(mpd);}/**\\n     * Returns a boolean indicating if the manifest is dynamic or not\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getIsDynamic(externalManifest){var manifest=getManifest(externalManifest);return dashManifestModel.getIsDynamic(manifest);}/**\\n     * Returns the duration of the MPD\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {number} duration\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getDuration(externalManifest){var manifest=getManifest(externalManifest);return dashManifestModel.getDuration(manifest);}/**\\n     * Returns all periods of the MPD\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {Array} periods\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getRegularPeriods(externalManifest){var mpd=getMpd(externalManifest);return dashManifestModel.getRegularPeriods(mpd);}/**\\n     * Returns an MPD object\\n     * @param {object} externalManifest Omit this value if no external manifest should be used\\n     * @returns {object} MPD\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getMpd(externalManifest){var manifest=getManifest(externalManifest);return dashManifestModel.getMpd(manifest);}/**\\n     * Returns the location element of the MPD\\n     * @param {object} manifest\\n     * @returns {String} location\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getLocation(manifest){return dashManifestModel.getLocation(manifest);}/**\\n     * Returns the manifest update period used for dynamic manifests\\n     * @param {object} manifest\\n     * @param {number} latencyOfLastUpdate\\n     * @returns {NaN|number} manifestUpdatePeriod\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getManifestUpdatePeriod(manifest){var latencyOfLastUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;return dashManifestModel.getManifestUpdatePeriod(manifest,latencyOfLastUpdate);}/**\\n     * Returns the publish time from the manifest\\n     * @param {object} manifest\\n     * @returns {Date|null} publishTime\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getPublishTime(manifest){return dashManifestModel.getPublishTime(manifest);}/**\\n     * Returns the patch location of the MPD if one exists and it is still valid\\n     * @param {object} manifest\\n     * @returns {(String|null)} patch location\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getPatchLocation(manifest){var patchLocation=dashManifestModel.getPatchLocation(manifest);var publishTime=dashManifestModel.getPublishTime(manifest);// short-circuit when no patch location or publish time exists\\nif(!patchLocation||!publishTime){return null;}// if a ttl is provided, ensure patch location has not expired\\nif(patchLocation.hasOwnProperty('ttl')&&publishTime){// attribute describes number of seconds as a double\\nvar ttl=parseFloat(patchLocation.ttl)*1000;// check if the patch location has expired, if so do not consider it\\nif(publishTime.getTime()+ttl<=new Date().getTime()){return null;}}// the patch location exists and, if a ttl applies, has not expired\\nreturn patchLocation.__text;}/**\\n     * Checks if the manifest has a DVB profile\\n     * @param {object} manifest\\n     * @returns {boolean}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getIsDVB(manifest){return dashManifestModel.hasProfile(manifest,PROFILE_DVB);}/**\\n     * Checks if the manifest is actually just a patch manifest\\n     * @param  {object} manifest\\n     * @return {boolean}\\n     */function getIsPatch(manifest){return patchManifestModel.getIsPatch(manifest);}/**\\n     *\\n     * @param {object} node\\n     * @returns {Array}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getBaseURLsFromElement(node){return dashManifestModel.getBaseURLsFromElement(node);}/**\\n     *\\n     * @returns {*}\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     * @ignore\\n     */function getRepresentationSortFunction(){return dashManifestModel.getRepresentationSortFunction();}/**\\n     * Returns the codec for a given adaptation set and a given representation id.\\n     * @param {object} adaptation\\n     * @param {number} representationId\\n     * @param {boolean} addResolutionInfo Defines whether to include resolution information in the output\\n     * @returns {String} codec\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getCodec(adaptation,representationId,addResolutionInfo){return dashManifestModel.getCodec(adaptation,representationId,addResolutionInfo);}/**\\n     * Returns the bandwidth for a given representation id\\n     * @param {number} representationId\\n     * @param {number} periodIdx\\n     * @returns {number} bandwidth\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getBandwidthForRepresentation(representationId,periodIdx){var representation=void 0;var period=getPeriod(periodIdx);representation=findRepresentation(period,representationId);return representation?representation.bandwidth:null;}/**\\n     * Returns the index for a given representation id\\n     * @param {string} representationId\\n     * @param {number} periodIdx\\n     * @returns {number} index\\n     * @memberOf module:DashAdapter\\n     * @instance\\n     */function getIndexForRepresentation(representationId,periodIdx){var period=getPeriod(periodIdx);return findRepresentationIndex(period,representationId);}/**\\n     * This method returns the current max index based on what is defined in the MPD.\\n     *\\n     * @param {string} bufferType - String 'audio' or 'video',\\n     * @param {number} periodIdx - Make sure this is the period index not id\\n     * @return {number}\\n     * @memberof module:DashAdapter\\n     * @instance\\n     */function getMaxIndexForBufferType(bufferType,periodIdx){var period=getPeriod(periodIdx);return findMaxBufferIndex(period,bufferType);}/**\\n     * Returns the voPeriod object for a given id\\n     * @param {String} id\\n     * @returns {object|null}\\n     */function getPeriodById(id){if(!id||voPeriods.length===0){return null;}var periods=voPeriods.filter(function(p){return p.id===id;});if(periods&&periods.length>0){return periods[0];}return null;}function getIsTypeOf(adaptation,type){return dashManifestModel.getIsTypeOf(adaptation,type);}function reset(){voPeriods=[];voAdaptations={};currentMediaInfo={};}/**\\n     * Checks if the supplied manifest is compatible for application of the supplied patch\\n     * @param  {object}  manifest\\n     * @param  {object}  patch\\n     * @return {boolean}\\n     */function isPatchValid(manifest,patch){var manifestId=dashManifestModel.getId(manifest);var patchManifestId=patchManifestModel.getMpdId(patch);var manifestPublishTime=dashManifestModel.getPublishTime(manifest);var patchPublishTime=patchManifestModel.getPublishTime(patch);var originalManifestPublishTime=patchManifestModel.getOriginalPublishTime(patch);// Patches are considered compatible if the following are true\\n// - MPD@id == Patch@mpdId\\n// - MPD@publishTime == Patch@originalPublishTime\\n// - MPD@publishTime < Patch@publishTime\\n// - All values in comparison exist\\nreturn!!(manifestId&&patchManifestId&&manifestId==patchManifestId&&manifestPublishTime&&originalManifestPublishTime&&manifestPublishTime.getTime()==originalManifestPublishTime.getTime()&&patchPublishTime&&manifestPublishTime.getTime()<patchPublishTime.getTime());}/**\\n     * Takes a given patch and applies it to the provided manifest, assumes patch is valid for manifest\\n     * @param  {object} manifest\\n     * @param  {object} patch\\n     */function applyPatchToManifest(manifest,patch){// get all operations from the patch and apply them in document order\\npatchManifestModel.getPatchOperations(patch).forEach(function(operation){var result=operation.getMpdTarget(manifest);// operation supplies a path that doesn't match mpd, skip\\nif(result===null){return;}var name=result.name,target=result.target,leaf=result.leaf;// short circuit for attribute selectors\\nif(operation.xpath.findsAttribute()){switch(operation.action){case'add':case'replace':// add and replace are just setting the value\\ntarget[name]=operation.value;break;case'remove':// remove is deleting the value\\ndelete target[name];break;}return;}// determine the relative insert position prior to possible removal\\nvar relativePosition=(target[name+'_asArray']||[]).indexOf(leaf);var insertBefore=operation.position==='prepend'||operation.position==='before';// perform removal operation first, we have already capture the appropriate relative position\\nif(operation.action==='remove'||operation.action==='replace'){// note that we ignore the 'ws' attribute of patch operations as it does not effect parsed mpd operations\\n// purge the directly named entity\\ndelete target[name];// if we did have a positional reference we need to purge from array set and restore X2JS proper semantics\\nif(relativePosition!=-1){var targetArray=target[name+'_asArray'];targetArray.splice(relativePosition,1);if(targetArray.length>1){target[name]=targetArray;}else if(targetArray.length==1){// xml parsing semantics, singular asArray must be non-array in the unsuffixed key\\ntarget[name]=targetArray[0];}else{// all nodes of this type deleted, remove entry\\ndelete target[name+'_asArray'];}}}// Perform any add/replace operations now, technically RFC5261 only allows a single element to take the\\n// place of a replaced element while the add case allows an arbitrary number of children.\\n// Due to the both operations requiring the same insertion logic they have been combined here and we will\\n// not enforce single child operations for replace, assertions should be made at patch parse time if necessary\\nif(operation.action==='add'||operation.action==='replace'){// value will be an object with element name keys pointing to arrays of objects\\nObject.keys(operation.value).forEach(function(insert){var insertNodes=operation.value[insert];var updatedNodes=target[insert+'_asArray']||[];if(updatedNodes.length===0&&target[insert]){updatedNodes.push(target[insert]);}if(updatedNodes.length===0){// no original nodes for this element type\\nupdatedNodes=insertNodes;}else{// compute the position we need to insert at, default to end of set\\nvar position=updatedNodes.length;if(insert==name&&relativePosition!=-1){// if the inserted element matches the operation target (not leaf) and there is a relative position we\\n// want the inserted position to be set such that our insertion is relative to original position\\n// since replace has modified the array length we reduce the insert point by 1\\nposition=relativePosition+(insertBefore?0:1)+(operation.action=='replace'?-1:0);}else{// otherwise we are in an add append/prepend case or replace case that removed the target name completely\\nposition=insertBefore?0:updatedNodes.length;}// we dont have to perform element removal for the replace case as that was done above\\nupdatedNodes.splice.apply(updatedNodes,[position,0].concat(insertNodes));}// now we properly reset the element keys on the target to match parsing semantics\\ntarget[insert+'_asArray']=updatedNodes;target[insert]=updatedNodes.length==1?updatedNodes[0]:updatedNodes;});}});}// #endregion PUBLIC FUNCTIONS\\n// #region PRIVATE FUNCTIONS\\n// --------------------------------------------------\\nfunction getManifest(externalManifest){return externalManifest?externalManifest:voPeriods.length>0?voPeriods[0].mpd.manifest:null;}function getAdaptationForMediaInfo(mediaInfo){if(!mediaInfo||!mediaInfo.streamInfo||mediaInfo.streamInfo.id===undefined||!voAdaptations[mediaInfo.streamInfo.id])return null;return voAdaptations[mediaInfo.streamInfo.id][mediaInfo.index];}function getPeriodForStreamInfo(streamInfo,voPeriodsArray){var ln=voPeriodsArray.length;for(var i=0;i<ln;i++){var voPeriod=voPeriodsArray[i];if(streamInfo&&streamInfo.id===voPeriod.id)return voPeriod;}return null;}function convertAdaptationToMediaInfo(adaptation){if(!adaptation){return null;}var mediaInfo=new _MediaInfo2.default();var realAdaptation=adaptation.period.mpd.manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index];var viewpoint=void 0;mediaInfo.id=adaptation.id;mediaInfo.index=adaptation.index;mediaInfo.type=adaptation.type;mediaInfo.streamInfo=convertPeriodToStreamInfo(adaptation.period);mediaInfo.representationCount=dashManifestModel.getRepresentationCount(realAdaptation);mediaInfo.labels=dashManifestModel.getLabelsForAdaptation(realAdaptation);mediaInfo.lang=dashManifestModel.getLanguageForAdaptation(realAdaptation);viewpoint=dashManifestModel.getViewpointForAdaptation(realAdaptation);mediaInfo.viewpoint=viewpoint?viewpoint.value:undefined;mediaInfo.accessibility=dashManifestModel.getAccessibilityForAdaptation(realAdaptation).map(function(accessibility){var accessibilityValue=accessibility.value;var accessibilityData=accessibilityValue;if(accessibility.schemeIdUri&&accessibility.schemeIdUri.search('cea-608')>=0&&typeof cea608parser!=='undefined'){if(accessibilityValue){accessibilityData='cea-608:'+accessibilityValue;}else{accessibilityData='cea-608';}mediaInfo.embeddedCaptions=true;}return accessibilityData;});mediaInfo.audioChannelConfiguration=dashManifestModel.getAudioChannelConfigurationForAdaptation(realAdaptation).map(function(audioChannelConfiguration){return audioChannelConfiguration.value;});if(mediaInfo.audioChannelConfiguration.length===0&&Array.isArray(realAdaptation.Representation_asArray)&&realAdaptation.Representation_asArray.length>0){mediaInfo.audioChannelConfiguration=dashManifestModel.getAudioChannelConfigurationForRepresentation(realAdaptation.Representation_asArray[0]).map(function(audioChannelConfiguration){return audioChannelConfiguration.value;});}mediaInfo.roles=dashManifestModel.getRolesForAdaptation(realAdaptation).map(function(role){return role.value;});mediaInfo.codec=dashManifestModel.getCodec(realAdaptation);mediaInfo.mimeType=dashManifestModel.getMimeType(realAdaptation);mediaInfo.contentProtection=dashManifestModel.getContentProtectionData(realAdaptation);mediaInfo.bitrateList=dashManifestModel.getBitrateListForAdaptation(realAdaptation);if(mediaInfo.contentProtection){mediaInfo.contentProtection.forEach(function(item){item.KID=dashManifestModel.getKID(item);});}mediaInfo.isText=dashManifestModel.getIsTextTrack(mediaInfo.mimeType);mediaInfo.supplementalProperties=dashManifestModel.getSupplementalPropperties(realAdaptation);return mediaInfo;}function convertVideoInfoToEmbeddedTextInfo(mediaInfo,channel,lang){mediaInfo.id=channel;// CC1, CC2, CC3, or CC4\\nmediaInfo.index=100+parseInt(channel.substring(2,3));mediaInfo.type=constants.EMBEDDED_TEXT;mediaInfo.codec='cea-608-in-SEI';mediaInfo.isText=true;mediaInfo.isEmbedded=true;mediaInfo.lang=lang;mediaInfo.roles=['caption'];}function convertVideoInfoToThumbnailInfo(mediaInfo){mediaInfo.type=constants.IMAGE;}function convertPeriodToStreamInfo(period){var streamInfo=new _StreamInfo2.default();var THRESHOLD=1;streamInfo.id=period.id;streamInfo.index=period.index;streamInfo.start=period.start;streamInfo.duration=period.duration;streamInfo.manifestInfo=convertMpdToManifestInfo(period.mpd);streamInfo.isLast=period.mpd.manifest.Period_asArray.length===1||Math.abs(streamInfo.start+streamInfo.duration-streamInfo.manifestInfo.duration)<THRESHOLD;return streamInfo;}function convertMpdToManifestInfo(mpd){var manifestInfo=new _ManifestInfo2.default();manifestInfo.DVRWindowSize=mpd.timeShiftBufferDepth;manifestInfo.loadedTime=mpd.manifest.loadedTime;manifestInfo.availableFrom=mpd.availabilityStartTime;manifestInfo.minBufferTime=mpd.manifest.minBufferTime;manifestInfo.maxFragmentDuration=mpd.maxSegmentDuration;manifestInfo.duration=dashManifestModel.getDuration(mpd.manifest);manifestInfo.isDynamic=dashManifestModel.getIsDynamic(mpd.manifest);manifestInfo.serviceDescriptions=dashManifestModel.getServiceDescriptions(mpd.manifest);manifestInfo.protocol=mpd.manifest.protocol;return manifestInfo;}function checkConfig(){if(!constants){throw new Error('setConfig function has to be called previously');}}function getPeriod(periodIdx){return voPeriods.length>0?voPeriods[0].mpd.manifest.Period_asArray[periodIdx]:null;}function findRepresentationIndex(period,representationId){var index=findRepresentation(period,representationId,true);return index!==null?index:-1;}function findRepresentation(period,representationId,returnIndex){var adaptationSet=void 0,adaptationSetArray=void 0,representation=void 0,representationArray=void 0,adaptationSetArrayIndex=void 0,representationArrayIndex=void 0;if(period){adaptationSetArray=period.AdaptationSet_asArray;for(adaptationSetArrayIndex=0;adaptationSetArrayIndex<adaptationSetArray.length;adaptationSetArrayIndex=adaptationSetArrayIndex+1){adaptationSet=adaptationSetArray[adaptationSetArrayIndex];representationArray=adaptationSet.Representation_asArray;for(representationArrayIndex=0;representationArrayIndex<representationArray.length;representationArrayIndex=representationArrayIndex+1){representation=representationArray[representationArrayIndex];if(representationId===representation.id){if(returnIndex){return representationArrayIndex;}else{return representation;}}}}}return null;}function findMaxBufferIndex(period,bufferType){var adaptationSet=void 0,adaptationSetArray=void 0,representationArray=void 0,adaptationSetArrayIndex=void 0;if(!period||!bufferType)return-1;adaptationSetArray=period.AdaptationSet_asArray;for(adaptationSetArrayIndex=0;adaptationSetArrayIndex<adaptationSetArray.length;adaptationSetArrayIndex=adaptationSetArrayIndex+1){adaptationSet=adaptationSetArray[adaptationSetArrayIndex];representationArray=adaptationSet.Representation_asArray;if(dashManifestModel.getIsTypeOf(adaptationSet,bufferType)){return representationArray.length;}}return-1;}// #endregion PRIVATE FUNCTIONS\\ninstance={getBandwidthForRepresentation:getBandwidthForRepresentation,getIndexForRepresentation:getIndexForRepresentation,getMaxIndexForBufferType:getMaxIndexForBufferType,convertDataToRepresentationInfo:convertRepresentationToRepresentationInfo,getDataForMedia:getAdaptationForMediaInfo,getStreamsInfo:getStreamsInfo,getMediaInfoForType:getMediaInfoForType,getAllMediaInfoForType:getAllMediaInfoForType,getAdaptationForType:getAdaptationForType,getRealAdaptation:getRealAdaptation,getRealPeriodByIndex:getRealPeriodByIndex,getEssentialPropertiesForRepresentation:getEssentialPropertiesForRepresentation,getVoRepresentations:getVoRepresentations,getEventsFor:getEventsFor,getEvent:getEvent,getMpd:getMpd,setConfig:setConfig,updatePeriods:updatePeriods,getIsTextTrack:getIsTextTrack,getUTCTimingSources:getUTCTimingSources,getSuggestedPresentationDelay:getSuggestedPresentationDelay,getAvailabilityStartTime:getAvailabilityStartTime,getIsTypeOf:getIsTypeOf,getIsDynamic:getIsDynamic,getDuration:getDuration,getRegularPeriods:getRegularPeriods,getLocation:getLocation,getPatchLocation:getPatchLocation,getManifestUpdatePeriod:getManifestUpdatePeriod,getPublishTime:getPublishTime,getIsDVB:getIsDVB,getIsPatch:getIsPatch,getBaseURLsFromElement:getBaseURLsFromElement,getRepresentationSortFunction:getRepresentationSortFunction,getCodec:getCodec,getVoAdaptations:getVoAdaptations,getVoPeriods:getVoPeriods,getPeriodById:getPeriodById,setCurrentMediaInfo:setCurrentMediaInfo,isPatchValid:isPatchValid,applyPatchToManifest:applyPatchToManifest,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashAdapter.__dashjs_factory_name='DashAdapter';exports.default=_FactoryMaker2.default.getSingletonFactory(DashAdapter);\\n//# sourceMappingURL=DashAdapter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/DashAdapter.js?\")},\"../node_modules/dashjs/build/es5/src/dash/DashHandler.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FragmentRequest=__webpack_require__(/*! ../streaming/vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _HTTPRequest=__webpack_require__(/*! ../streaming/vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SegmentsUtils=__webpack_require__(/*! ./utils/SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");var _SegmentsController=__webpack_require__(/*! ./controllers/SegmentsController */ \\\"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js\\\");var _SegmentsController2=_interopRequireDefault(_SegmentsController);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DashHandler(config){config=config||{};var context=this.context;var eventBus=config.eventBus;var events=config.events;var debug=config.debug;var dashConstants=config.dashConstants;var urlUtils=config.urlUtils;var type=config.type;var streamInfo=config.streamInfo;var timelineConverter=config.timelineConverter;var dashMetrics=config.dashMetrics;var baseURLController=config.baseURLController;var instance=void 0,logger=void 0,segmentIndex=void 0,lastSegment=void 0,requestedTime=void 0,isDynamicManifest=void 0,dynamicStreamCompleted=void 0,selectedMimeType=void 0,segmentsController=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();segmentsController=(0,_SegmentsController2.default)(context).create(config);eventBus.on(events.INITIALIZATION_LOADED,onInitializationLoaded,instance);eventBus.on(events.SEGMENTS_LOADED,onSegmentsLoaded,instance);eventBus.on(events.REPRESENTATION_UPDATE_STARTED,onRepresentationUpdateStarted,instance);eventBus.on(events.DYNAMIC_TO_STATIC,onDynamicToStatic,instance);}function initialize(isDynamic){isDynamicManifest=isDynamic;dynamicStreamCompleted=false;segmentsController.initialize(isDynamic);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function getStreamInfo(){return streamInfo;}function setCurrentIndex(value){segmentIndex=value;}function getCurrentIndex(){return segmentIndex;}function resetIndex(){segmentIndex=-1;lastSegment=null;}function resetInitialSettings(){resetIndex();requestedTime=null;segmentsController=null;selectedMimeType=null;}function reset(){resetInitialSettings();eventBus.off(events.INITIALIZATION_LOADED,onInitializationLoaded,instance);eventBus.off(events.SEGMENTS_LOADED,onSegmentsLoaded,instance);eventBus.off(events.REPRESENTATION_UPDATE_STARTED,onRepresentationUpdateStarted,instance);eventBus.off(events.DYNAMIC_TO_STATIC,onDynamicToStatic,instance);}function setRequestUrl(request,destination,representation){var baseURL=baseURLController.resolve(representation.path);var url=void 0,serviceLocation=void 0;if(!baseURL||destination===baseURL.url||!urlUtils.isRelative(destination)){url=destination;}else{url=baseURL.url;serviceLocation=baseURL.serviceLocation;if(destination){url=urlUtils.resolve(destination,url);}}if(urlUtils.isRelative(url)){return false;}request.url=url;request.serviceLocation=serviceLocation;return true;}function generateInitRequest(mediaInfo,representation,mediaType){var request=new _FragmentRequest2.default();var period=representation.adaptation.period;var presentationStartTime=period.start;request.mediaType=mediaType;request.type=_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE;request.range=representation.range;request.availabilityStartTime=timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime,period.mpd,isDynamicManifest);request.availabilityEndTime=timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationStartTime+period.duration,period.mpd,isDynamicManifest);request.quality=representation.index;request.mediaInfo=mediaInfo;request.representationId=representation.id;if(setRequestUrl(request,representation.initialization,representation)){request.url=(0,_SegmentsUtils.replaceTokenForTemplate)(request.url,'Bandwidth',representation.bandwidth);return request;}}function getInitRequest(mediaInfo,representation){if(!representation)return null;var request=generateInitRequest(mediaInfo,representation,getType());return request;}function setMimeType(newMimeType){selectedMimeType=newMimeType;}function setExpectedLiveEdge(liveEdge){timelineConverter.setExpectedLiveEdge(liveEdge);dashMetrics.updateManifestUpdateInfo({presentationStartTime:liveEdge});}function onRepresentationUpdateStarted(e){processRepresentation(e.representation);}function processRepresentation(voRepresentation){var hasInitialization=voRepresentation.hasInitialization();var hasSegments=voRepresentation.hasSegments();// If representation has initialization and segments information, REPRESENTATION_UPDATE_COMPLETED can be triggered immediately\\n// otherwise, it means that a request has to be made to get initialization and/or segments informations\\nif(hasInitialization&&hasSegments){eventBus.trigger(events.REPRESENTATION_UPDATE_COMPLETED,{representation:voRepresentation},{streamId:streamInfo.id,mediaType:type});}else{segmentsController.update(voRepresentation,selectedMimeType,hasInitialization,hasSegments);}}function getRequestForSegment(mediaInfo,segment){if(segment===null||segment===undefined){return null;}var request=new _FragmentRequest2.default();var representation=segment.representation;var bandwidth=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].bandwidth;var url=segment.media;url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Number',segment.replacementNumber);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Time',segment.replacementTime);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Bandwidth',bandwidth);url=(0,_SegmentsUtils.replaceIDForTemplate)(url,representation.id);url=(0,_SegmentsUtils.unescapeDollarsInTemplate)(url);request.mediaType=getType();request.type=_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE;request.range=segment.mediaRange;request.startTime=segment.presentationStartTime;request.mediaStartTime=segment.mediaStartTime;request.duration=segment.duration;request.timescale=representation.timescale;request.availabilityStartTime=segment.availabilityStartTime;request.availabilityEndTime=segment.availabilityEndTime;request.wallStartTime=segment.wallStartTime;request.quality=representation.index;request.index=segment.availabilityIdx;request.mediaInfo=mediaInfo;request.adaptationIndex=representation.adaptation.index;request.representationId=representation.id;if(setRequestUrl(request,url,representation)){return request;}}function isMediaFinished(representation){var isFinished=false;if(!representation)return isFinished;if(!isDynamicManifest){if(segmentIndex>=representation.availableSegmentsNumber){isFinished=true;}}else{if(dynamicStreamCompleted){isFinished=true;}else if(lastSegment){var time=parseFloat((lastSegment.presentationStartTime-representation.adaptation.period.start).toFixed(5));var endTime=lastSegment.duration>0?time+1.5*lastSegment.duration:time;var duration=representation.adaptation.period.duration;isFinished=endTime>=duration;}}return isFinished;}function getSegmentRequestForTime(mediaInfo,representation,time,options){var request=null;if(!representation||!representation.segmentInfoType){return request;}var idx=segmentIndex;var keepIdx=options?options.keepIdx:false;var ignoreIsFinished=options&&options.ignoreIsFinished?true:false;if(requestedTime!==time){// When playing at live edge with 0 delay we may loop back with same time and index until it is available. Reduces verboseness of logs.\\nrequestedTime=time;logger.debug('Getting the request for time : '+time);}var segment=segmentsController.getSegmentByTime(representation,time);if(segment){segmentIndex=segment.availabilityIdx;lastSegment=segment;logger.debug('Index for time '+time+' is '+segmentIndex);request=getRequestForSegment(mediaInfo,segment);}else{var finished=!ignoreIsFinished?isMediaFinished(representation):false;if(finished){request=new _FragmentRequest2.default();request.action=_FragmentRequest2.default.ACTION_COMPLETE;request.index=segmentIndex-1;request.mediaType=type;request.mediaInfo=mediaInfo;logger.debug('Signal complete in getSegmentRequestForTime');}}if(keepIdx&&idx>=0){segmentIndex=representation.segmentInfoType===dashConstants.SEGMENT_TIMELINE&&isDynamicManifest?segmentIndex:idx;}return request;}/**\\n     * This function returns the next segment request without modifying any internal variables. Any class (e.g CMCD Model) that needs information about the upcoming request should use this method.\\n     * @param {object} mediaInfo\\n     * @param {object} representation\\n     * @return {FragmentRequest|null}\\n     */function getNextSegmentRequestIdempotent(mediaInfo,representation){var request=null;var indexToRequest=segmentIndex+1;var segment=segmentsController.getSegmentByIndex(representation,indexToRequest,lastSegment?lastSegment.mediaStartTime:-1);if(!segment)return null;request=getRequestForSegment(mediaInfo,segment);return request;}/**\\n     * Main function to get the next segment request.\\n     * @param {object} mediaInfo\\n     * @param {object} representation\\n     * @return {FragmentRequest|null}\\n     */function getNextSegmentRequest(mediaInfo,representation){var request=null;if(!representation||!representation.segmentInfoType){return null;}requestedTime=null;var indexToRequest=segmentIndex+1;logger.debug('Getting the next request at index: '+indexToRequest);// check that there is a segment in this index\\nvar segment=segmentsController.getSegmentByIndex(representation,indexToRequest,lastSegment?lastSegment.mediaStartTime:-1);if(!segment&&isEndlessMedia(representation)&&!dynamicStreamCompleted){logger.debug(getType()+' No segment found at index: '+indexToRequest+'. Wait for next loop');return null;}else{if(segment){request=getRequestForSegment(mediaInfo,segment);segmentIndex=segment.availabilityIdx;}else{if(isDynamicManifest){segmentIndex=indexToRequest-1;}else{segmentIndex=indexToRequest;}}}if(segment){lastSegment=segment;}else{var finished=isMediaFinished(representation,segment);if(finished){request=new _FragmentRequest2.default();request.action=_FragmentRequest2.default.ACTION_COMPLETE;request.index=segmentIndex-1;request.mediaType=getType();request.mediaInfo=mediaInfo;logger.debug('Signal complete');}}return request;}function isEndlessMedia(representation){return!isFinite(representation.adaptation.period.duration);}function onInitializationLoaded(e){var representation=e.representation;if(!representation.segments)return;eventBus.trigger(events.REPRESENTATION_UPDATE_COMPLETED,{representation:representation},{streamId:streamInfo.id,mediaType:type});}function onSegmentsLoaded(e){if(e.error)return;var fragments=e.segments;var representation=e.representation;var segments=[];var count=0;var i=void 0,len=void 0,s=void 0,seg=void 0;for(i=0,len=fragments?fragments.length:0;i<len;i++){s=fragments[i];seg=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,isDynamicManifest,representation,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,count);if(seg){segments.push(seg);seg=null;count++;}}if(segments.length>0){representation.segmentAvailabilityRange={start:segments[0].presentationStartTime,end:segments[segments.length-1].presentationStartTime};representation.availableSegmentsNumber=segments.length;representation.segments=segments;if(isDynamicManifest){var _lastSegment=segments[segments.length-1];var liveEdge=_lastSegment.presentationStartTime-8;// the last segment is the Expected, not calculated, live edge.\\nsetExpectedLiveEdge(liveEdge);}}if(!representation.hasInitialization()){return;}eventBus.trigger(events.REPRESENTATION_UPDATE_COMPLETED,{representation:representation},{streamId:streamInfo.id,mediaType:type});}function onDynamicToStatic(){logger.debug('Dynamic stream complete');dynamicStreamCompleted=true;}instance={initialize:initialize,getStreamId:getStreamId,getType:getType,getStreamInfo:getStreamInfo,getInitRequest:getInitRequest,getRequestForSegment:getRequestForSegment,getSegmentRequestForTime:getSegmentRequestForTime,getNextSegmentRequest:getNextSegmentRequest,setCurrentIndex:setCurrentIndex,getCurrentIndex:getCurrentIndex,isMediaFinished:isMediaFinished,reset:reset,resetIndex:resetIndex,setMimeType:setMimeType,getNextSegmentRequestIdempotent:getNextSegmentRequestIdempotent};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashHandler.__dashjs_factory_name='DashHandler';exports.default=_FactoryMaker2.default.getClassFactory(DashHandler);\\n//# sourceMappingURL=DashHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/DashHandler.js?\")},\"../node_modules/dashjs/build/es5/src/dash/DashMetrics.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../streaming/constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../streaming/vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _MetricsConstants=__webpack_require__(/*! ../streaming/constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _Round=__webpack_require__(/*! ./utils/Round10 */ \"../node_modules/dashjs/build/es5/src/dash/utils/Round10.js\");var _Round2=_interopRequireDefault(_Round);var _MetricsModel=__webpack_require__(/*! ../streaming/models/MetricsModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js\");var _MetricsModel2=_interopRequireDefault(_MetricsModel);var _Utils=__webpack_require__(/*! ../core/Utils */ \"../node_modules/dashjs/build/es5/src/core/Utils.js\");var _Utils2=_interopRequireDefault(_Utils);var _PlayList=__webpack_require__(/*! ../streaming/vo/metrics/PlayList */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module DashMetrics\\n * @param {object} config\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function DashMetrics(config){config=config||{};var context=this.context;var instance=void 0,playListTraceMetricsClosed=void 0,playListTraceMetrics=void 0,playListMetrics=void 0;var metricsModel=config.metricsModel;function setup(){metricsModel=metricsModel||(0,_MetricsModel2.default)(context).getInstance({settings:config.settings});resetInitialSettings();}function resetInitialSettings(){playListTraceMetricsClosed=true;playListTraceMetrics=null;playListMetrics=null;}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentRepresentationSwitch(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);return getCurrent(metrics,_MetricsConstants2.default.TRACK_SWITCH);}/**\\n     * @param {MediaType} mediaType\\n     * @param {Date} t time of the switch event\\n     * @param {Date} mt media presentation time\\n     * @param {string} to id of representation\\n     * @param {string} lto if present, subrepresentation reference\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addRepresentationSwitch(mediaType,t,mt,to,lto){metricsModel.addRepresentationSwitch(mediaType,t,mt,to,lto);}/**\\n     * @param {MediaType} type\\n     * @returns {number}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentBufferState(type){var metrics=metricsModel.getMetricsFor(type,true);return getCurrent(metrics,_MetricsConstants2.default.BUFFER_STATE);}/**\\n     * @param {MediaType} type\\n     * @returns {number}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentBufferLevel(type){var metrics=metricsModel.getMetricsFor(type,true);var metric=getCurrent(metrics,_MetricsConstants2.default.BUFFER_LEVEL);if(metric){return _Round2.default.round10(metric.level/1000,-3);}return 0;}/**\\n     * @param {MediaType} mediaType\\n     * @param {number} t\\n     * @param {number} level\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addBufferLevel(mediaType,t,level){metricsModel.addBufferLevel(mediaType,t,level);}/**\\n     * @param {MediaType} mediaType\\n     * @param {string} state\\n     * @param {number} target\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addBufferState(mediaType,state,target){metricsModel.addBufferState(mediaType,state,target);}/**\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function clearAllCurrentMetrics(){metricsModel.clearAllCurrentMetrics();}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentHttpRequest(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);if(!metrics){return null;}var httpList=metrics.HttpList;var currentHttpList=null;var httpListLastIndex=void 0;if(!httpList||httpList.length<=0){return null;}httpListLastIndex=httpList.length-1;while(httpListLastIndex>=0){if(httpList[httpListLastIndex].responsecode){currentHttpList=httpList[httpListLastIndex];break;}httpListLastIndex--;}return currentHttpList;}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getHttpRequests(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);if(!metrics){return[];}return!!metrics.HttpList?metrics.HttpList:[];}/**\\n     * @param {MediaType} mediaType\\n     * @param {Array} loadingRequests\\n     * @param {Array} executedRequests\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addRequestsQueue(mediaType,loadingRequests,executedRequests){metricsModel.addRequestsQueue(mediaType,loadingRequests,executedRequests);}/**\\n     * @param {MetricsList} metrics\\n     * @param {string} metricName\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrent(metrics,metricName){if(!metrics){return null;}var list=metrics[metricName];return!list||list.length===0?null:list[list.length-1];}/**\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function getCurrentDroppedFrames(){var metrics=metricsModel.getMetricsFor(_Constants2.default.VIDEO,true);return getCurrent(metrics,_MetricsConstants2.default.DROPPED_FRAMES);}/**\\n     * @param {number} quality\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addDroppedFrames(quality){metricsModel.addDroppedFrames(_Constants2.default.VIDEO,quality);}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentSchedulingInfo(mediaType){var metrics=metricsModel.getMetricsFor(mediaType,true);return getCurrent(metrics,_MetricsConstants2.default.SCHEDULING_INFO);}/**\\n     * @param {object} request\\n     * @param {string} state\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addSchedulingInfo(request,state){metricsModel.addSchedulingInfo(request.mediaType,new Date(),request.type,request.startTime,request.availabilityStartTime,request.duration,request.quality,request.range,state);}/**\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentManifestUpdate(){var streamMetrics=metricsModel.getMetricsFor(_Constants2.default.STREAM);return getCurrent(streamMetrics,_MetricsConstants2.default.MANIFEST_UPDATE);}/**\\n     * @param {object} updatedFields fields to be updated\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function updateManifestUpdateInfo(updatedFields){var manifestUpdate=this.getCurrentManifestUpdate();metricsModel.updateManifestUpdateInfo(manifestUpdate,updatedFields);}/**\\n     * @param {object} streamInfo\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addManifestUpdateStreamInfo(streamInfo){if(streamInfo){var manifestUpdate=this.getCurrentManifestUpdate();metricsModel.addManifestUpdateStreamInfo(manifestUpdate,streamInfo.id,streamInfo.index,streamInfo.start,streamInfo.duration);}}/**\\n     * @param {object} request\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addManifestUpdate(request){metricsModel.addManifestUpdate(_Constants2.default.STREAM,request.type,request.requestStartDate,request.requestEndDate);}/**\\n     * @param {object} request\\n     * @param {string} responseURL\\n     * @param {number} responseStatus\\n     * @param {object} responseHeaders\\n     * @param {object} traces\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addHttpRequest(request,responseURL,responseStatus,responseHeaders,traces){metricsModel.addHttpRequest(request.mediaType,null,request.type,request.url,request.quality,responseURL,request.serviceLocation||null,request.range||null,request.requestStartDate,request.firstByteDate,request.requestEndDate,responseStatus,request.duration,responseHeaders,traces);}/**\\n     * @param {object} representation\\n     * @param {MediaType} mediaType\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addManifestUpdateRepresentationInfo(representation,mediaType){if(representation){var manifestUpdateInfo=this.getCurrentManifestUpdate();metricsModel.addManifestUpdateRepresentationInfo(manifestUpdateInfo,representation.id,representation.index,representation.streamIndex,mediaType,representation.presentationTimeOffset,representation.startNumber,representation.fragmentInfoType);}}/**\\n     * @param {MediaType} mediaType\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getCurrentDVRInfo(mediaType){var metrics=mediaType?metricsModel.getMetricsFor(mediaType,true):metricsModel.getMetricsFor(_Constants2.default.VIDEO,true)||metricsModel.getMetricsFor(_Constants2.default.AUDIO,true);return getCurrent(metrics,_MetricsConstants2.default.DVR_INFO);}/**\\n     * @param {MediaType} mediaType\\n     * @param {Date} currentTime time of the switch event\\n     * @param {object} mpd mpd reference\\n     * @param {object} range range of the dvr info\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addDVRInfo(mediaType,currentTime,mpd,range){metricsModel.addDVRInfo(mediaType,currentTime,mpd,range);}/**\\n     * @param {string} id\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getLatestMPDRequestHeaderValueByID(id){var headers={};var httpRequestList=void 0,httpRequest=void 0,i=void 0;httpRequestList=getHttpRequests(_Constants2.default.STREAM);for(i=httpRequestList.length-1;i>=0;i--){httpRequest=httpRequestList[i];if(httpRequest.type===_HTTPRequest.HTTPRequest.MPD_TYPE){headers=_Utils2.default.parseHttpHeaders(httpRequest._responseHeaders);break;}}return headers[id]===undefined?null:headers[id];}/**\\n     * @param {string} type\\n     * @param {string} id\\n     * @returns {*}\\n     * @memberof module:DashMetrics\\n     * @instance\\n     */function getLatestFragmentRequestHeaderValueByID(type,id){var headers={};var httpRequest=getCurrentHttpRequest(type,true);if(httpRequest){headers=_Utils2.default.parseHttpHeaders(httpRequest._responseHeaders);}return headers[id]===undefined?null:headers[id];}/**\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addPlayList(){if(playListMetrics){metricsModel.addPlayList(playListMetrics);playListMetrics=null;}}function createPlaylistMetrics(mediaStartTime,startReason){playListMetrics=new _PlayList.PlayList();playListMetrics.start=new Date();playListMetrics.mstart=mediaStartTime;playListMetrics.starttype=startReason;}function createPlaylistTraceMetrics(representationId,mediaStartTime,speed){if(playListTraceMetricsClosed===true){playListTraceMetricsClosed=false;playListTraceMetrics=new _PlayList.PlayListTrace();playListTraceMetrics.representationid=representationId;playListTraceMetrics.start=new Date();playListTraceMetrics.mstart=mediaStartTime;playListTraceMetrics.playbackspeed=speed!==null?speed.toString():null;}}function updatePlayListTraceMetrics(traceToUpdate){if(playListTraceMetrics){for(var field in playListTraceMetrics){playListTraceMetrics[field]=traceToUpdate[field];}}}function pushPlayListTraceMetrics(endTime,reason){if(playListTraceMetricsClosed===false&&playListMetrics&&playListTraceMetrics&&playListTraceMetrics.start){var startTime=playListTraceMetrics.start;var duration=endTime.getTime()-startTime.getTime();playListTraceMetrics.duration=duration;playListTraceMetrics.stopreason=reason;playListMetrics.trace.push(playListTraceMetrics);playListTraceMetricsClosed=true;}}/**\\n     * @param {object} errors\\n     * @memberof module:DashMetrics\\n     * @instance\\n     * @ignore\\n     */function addDVBErrors(errors){metricsModel.addDVBErrors(errors);}instance={getCurrentRepresentationSwitch:getCurrentRepresentationSwitch,getCurrentBufferState:getCurrentBufferState,getCurrentBufferLevel:getCurrentBufferLevel,getCurrentHttpRequest:getCurrentHttpRequest,getHttpRequests:getHttpRequests,getCurrentDroppedFrames:getCurrentDroppedFrames,getCurrentSchedulingInfo:getCurrentSchedulingInfo,getCurrentDVRInfo:getCurrentDVRInfo,getCurrentManifestUpdate:getCurrentManifestUpdate,getLatestFragmentRequestHeaderValueByID:getLatestFragmentRequestHeaderValueByID,getLatestMPDRequestHeaderValueByID:getLatestMPDRequestHeaderValueByID,addRepresentationSwitch:addRepresentationSwitch,addDVRInfo:addDVRInfo,updateManifestUpdateInfo:updateManifestUpdateInfo,addManifestUpdateStreamInfo:addManifestUpdateStreamInfo,addManifestUpdateRepresentationInfo:addManifestUpdateRepresentationInfo,addManifestUpdate:addManifestUpdate,addHttpRequest:addHttpRequest,addSchedulingInfo:addSchedulingInfo,addRequestsQueue:addRequestsQueue,addBufferLevel:addBufferLevel,addBufferState:addBufferState,addDroppedFrames:addDroppedFrames,addPlayList:addPlayList,addDVBErrors:addDVBErrors,createPlaylistMetrics:createPlaylistMetrics,createPlaylistTraceMetrics:createPlaylistTraceMetrics,updatePlayListTraceMetrics:updatePlayListTraceMetrics,pushPlayListTraceMetrics:pushPlayListTraceMetrics,clearAllCurrentMetrics:clearAllCurrentMetrics};setup();return instance;}DashMetrics.__dashjs_factory_name=\\'DashMetrics\\';exports.default=_FactoryMaker2.default.getSingletonFactory(DashMetrics);\\n//# sourceMappingURL=DashMetrics.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/DashMetrics.js?')},\"../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Segment=__webpack_require__(/*! ./vo/Segment */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\\\");var _Segment2=_interopRequireDefault(_Segment);var _DashJSError=__webpack_require__(/*! ../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _FragmentRequest=__webpack_require__(/*! ../streaming/vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _URLLoader=__webpack_require__(/*! ../streaming/net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SegmentBaseLoader(){var context=this.context;var instance=void 0,logger=void 0,errHandler=void 0,boxParser=void 0,requestModifier=void 0,dashMetrics=void 0,settings=void 0,mediaPlayerModel=void 0,urlLoader=void 0,events=void 0,eventBus=void 0,errors=void 0,constants=void 0,dashConstants=void 0,urlUtils=void 0,baseURLController=void 0;function setup(){}function initialize(){urlLoader=(0,_URLLoader2.default)(context).create({errHandler:errHandler,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,requestModifier:requestModifier,useFetch:settings?settings.get().streaming.lowLatencyEnabled:null,boxParser:boxParser,errors:errors,urlUtils:urlUtils,constants:constants,dashConstants:dashConstants});}function setConfig(config){if(config.baseURLController){baseURLController=config.baseURLController;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.errHandler){errHandler=config.errHandler;}if(config.settings){settings=config.settings;}if(config.boxParser){boxParser=config.boxParser;}if(config.events){events=config.events;}if(config.eventBus){eventBus=config.eventBus;}if(config.debug){logger=config.debug.getLogger(instance);}if(config.requestModifier){requestModifier=config.requestModifier;}if(config.errors){errors=config.errors;}if(config.urlUtils){urlUtils=config.urlUtils;}if(config.constants){constants=config.constants;}if(config.dashConstants){dashConstants=config.dashConstants;}}function checkConfig(){if(!baseURLController||!baseURLController.hasOwnProperty('resolve')){throw new Error('setConfig function has to be called previously');}}function loadInitialization(streamId,mediaType,representation,loadingInfo){checkConfig();var initRange=null;var baseUrl=representation?baseURLController.resolve(representation.path):null;var info=loadingInfo||{init:true,url:baseUrl?baseUrl.url:undefined,range:{start:0,end:1500},searching:false,bytesLoaded:0,bytesToLoad:1500,mediaType:mediaType};logger.debug('Start searching for initialization.');var request=getFragmentRequest(info);var onload=function onload(response){info.bytesLoaded=info.range.end;initRange=boxParser.findInitRange(response);if(initRange){representation.range=initRange;// note that we don't explicitly set rep.initialization as this\\n// will be computed when all BaseURLs are resolved later\\neventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});}else{info.range.end=info.bytesLoaded+info.bytesToLoad;loadInitialization(streamId,mediaType,representation,info);}};var onerror=function onerror(){eventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});};urlLoader.load({request:request,success:onload,error:onerror});logger.debug('Perform init search: '+info.url);}function loadSegments(streamId,mediaType,representation,range,callback,loadingInfo){checkConfig();if(range&&(range.start===undefined||range.end===undefined)){var parts=range?range.toString().split('-'):null;range=parts?{start:parseFloat(parts[0]),end:parseFloat(parts[1])}:null;}callback=!callback?onLoaded:callback;var isoFile=null;var sidx=null;var hasRange=!!range;var baseUrl=representation?baseURLController.resolve(representation.path):null;var info={init:false,url:baseUrl?baseUrl.url:undefined,range:hasRange?range:{start:0,end:1500},searching:!hasRange,bytesLoaded:loadingInfo?loadingInfo.bytesLoaded:0,bytesToLoad:1500,mediaType:mediaType};var request=getFragmentRequest(info);var onload=function onload(response){var extraBytes=info.bytesToLoad;var loadedLength=response.byteLength;info.bytesLoaded=info.range.end-info.range.start;isoFile=boxParser.parse(response);sidx=isoFile.getBox('sidx');if(!sidx||!sidx.isComplete){if(sidx){info.range.start=sidx.offset||info.range.start;info.range.end=info.range.start+(sidx.size||extraBytes);}else if(loadedLength<info.bytesLoaded){// if we have reached a search limit or if we have reached the end of the file we have to stop trying to find sidx\\ncallback(streamId,mediaType,null,representation);return;}else{var lastBox=isoFile.getLastBox();if(lastBox&&lastBox.size){info.range.start=lastBox.offset+lastBox.size;info.range.end=info.range.start+extraBytes;}else{info.range.end+=extraBytes;}}loadSegments(streamId,mediaType,representation,info.range,callback,info);}else{var ref=sidx.references;var loadMultiSidx=void 0,segments=void 0;if(ref!==null&&ref!==undefined&&ref.length>0){loadMultiSidx=ref[0].reference_type===1;}if(loadMultiSidx){logger.debug('Initiate multiple SIDX load.');info.range.end=info.range.start+sidx.size;var j=void 0,len=void 0,ss=void 0,se=void 0,r=void 0;var segs=[];var count=0;var offset=(sidx.offset||info.range.start)+sidx.size;var tmpCallback=function tmpCallback(streamId,mediaType,result){if(result){segs=segs.concat(result);count++;if(count>=len){// http requests can be processed in a wrong order, so, we have to reorder segments with an ascending start Time order\\nsegs.sort(function(a,b){return a.startTime-b.startTime<0?-1:0;});callback(streamId,mediaType,segs,representation);}}else{callback(streamId,mediaType,null,representation);}};for(j=0,len=ref.length;j<len;j++){ss=offset;se=offset+ref[j].referenced_size-1;offset=offset+ref[j].referenced_size;r={start:ss,end:se};loadSegments(streamId,mediaType,representation,r,tmpCallback,info);}}else{logger.debug('Parsing segments from SIDX. representation '+mediaType+' - id: '+representation.id+' for range : '+info.range.start+' - '+info.range.end);segments=getSegmentsForSidx(sidx,info);callback(streamId,mediaType,segments,representation);}}};var onerror=function onerror(){callback(streamId,mediaType,null,representation);};urlLoader.load({request:request,success:onload,error:onerror});logger.debug('Perform SIDX load: '+info.url+' with range : '+info.range.start+' - '+info.range.end);}function reset(){urlLoader.abort();urlLoader=null;errHandler=null;boxParser=null;requestModifier=null;}function getSegmentsForSidx(sidx,info){var refs=sidx.references;var len=refs.length;var timescale=sidx.timescale;var time=sidx.earliest_presentation_time;var start=info.range.start+sidx.offset+sidx.first_offset+sidx.size;var segments=[];var segment=void 0,end=void 0,duration=void 0,size=void 0;for(var i=0;i<len;i++){duration=refs[i].subsegment_duration;size=refs[i].referenced_size;segment=new _Segment2.default();// note that we don't explicitly set segment.media as this will be\\n// computed when all BaseURLs are resolved later\\nsegment.duration=duration;segment.startTime=time;segment.timescale=timescale;end=start+size-1;segment.mediaRange=start+'-'+end;segments.push(segment);time+=duration;start+=size;}return segments;}function getFragmentRequest(info){if(!info.url){return;}var request=new _FragmentRequest2.default();request.setInfo(info);return request;}function onLoaded(streamId,mediaType,segments,representation){eventBus.trigger(events.SEGMENTS_LOADED,{segments:segments,representation:representation,error:segments?undefined:new _DashJSError2.default(errors.SEGMENT_BASE_LOADER_ERROR_CODE,errors.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:streamId,mediaType:mediaType});}instance={setConfig:setConfig,initialize:initialize,loadInitialization:loadInitialization,loadSegments:loadSegments,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */SegmentBaseLoader.__dashjs_factory_name='SegmentBaseLoader';exports.default=_FactoryMaker2.default.getSingletonFactory(SegmentBaseLoader);\\n//# sourceMappingURL=SegmentBaseLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js?\")},\"../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EBMLParser=__webpack_require__(/*! ../streaming/utils/EBMLParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js\\\");var _EBMLParser2=_interopRequireDefault(_EBMLParser);var _Constants=__webpack_require__(/*! ../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Segment=__webpack_require__(/*! ./vo/Segment */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\\\");var _Segment2=_interopRequireDefault(_Segment);var _FragmentRequest=__webpack_require__(/*! ../streaming/vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _URLLoader=__webpack_require__(/*! ../streaming/net/URLLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\\\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _DashJSError=__webpack_require__(/*! ../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function WebmSegmentBaseLoader(){var context=this.context;var instance=void 0,logger=void 0,WebM=void 0,errHandler=void 0,requestModifier=void 0,dashMetrics=void 0,mediaPlayerModel=void 0,urlLoader=void 0,settings=void 0,eventBus=void 0,events=void 0,errors=void 0,baseURLController=void 0;function setup(){WebM={EBML:{tag:0x1A45DFA3,required:true},Segment:{tag:0x18538067,required:true,SeekHead:{tag:0x114D9B74,required:true},Info:{tag:0x1549A966,required:true,TimecodeScale:{tag:0x2AD7B1,required:true,parse:'getMatroskaUint'},Duration:{tag:0x4489,required:true,parse:'getMatroskaFloat'}},Tracks:{tag:0x1654AE6B,required:true},Cues:{tag:0x1C53BB6B,required:true,CuePoint:{tag:0xBB,required:true,CueTime:{tag:0xB3,required:true,parse:'getMatroskaUint'},CueTrackPositions:{tag:0xB7,required:true,CueTrack:{tag:0xF7,required:true,parse:'getMatroskaUint'},CueClusterPosition:{tag:0xF1,required:true,parse:'getMatroskaUint'}}}}},Void:{tag:0xEC,required:true}};}function initialize(){urlLoader=(0,_URLLoader2.default)(context).create({errHandler:errHandler,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,requestModifier:requestModifier,useFetch:settings?settings.get().streaming.lowLatencyEnabled:null,errors:errors});}function setConfig(config){if(!config.baseURLController||!config.dashMetrics||!config.mediaPlayerModel||!config.errHandler){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}baseURLController=config.baseURLController;dashMetrics=config.dashMetrics;mediaPlayerModel=config.mediaPlayerModel;errHandler=config.errHandler;settings=config.settings;events=config.events;eventBus=config.eventBus;errors=config.errors;logger=config.debug.getLogger(instance);requestModifier=config.requestModifier;}function parseCues(ab){var cues=[];var ebmlParser=(0,_EBMLParser2.default)(context).create({data:ab});var cue=void 0,cueTrack=void 0;ebmlParser.consumeTagAndSize(WebM.Segment.Cues);while(ebmlParser.moreData()&&ebmlParser.consumeTagAndSize(WebM.Segment.Cues.CuePoint,true)){cue={};cue.CueTime=ebmlParser.parseTag(WebM.Segment.Cues.CuePoint.CueTime);cue.CueTracks=[];while(ebmlParser.moreData()&&ebmlParser.consumeTag(WebM.Segment.Cues.CuePoint.CueTrackPositions,true)){var cueTrackPositionSize=ebmlParser.getMatroskaCodedNum();var startPos=ebmlParser.getPos();cueTrack={};cueTrack.Track=ebmlParser.parseTag(WebM.Segment.Cues.CuePoint.CueTrackPositions.CueTrack);if(cueTrack.Track===0){throw new Error('Cue track cannot be 0');}cueTrack.ClusterPosition=ebmlParser.parseTag(WebM.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition);cue.CueTracks.push(cueTrack);// we're not interested any other elements - skip remaining bytes\\nebmlParser.setPos(startPos+cueTrackPositionSize);}if(cue.CueTracks.length===0){throw new Error('Mandatory cuetrack not found');}cues.push(cue);}if(cues.length===0){throw new Error('mandatory cuepoint not found');}return cues;}function parseSegments(data,segmentStart,segmentEnd,segmentDuration){var duration=void 0,parsed=void 0,segments=void 0,segment=void 0,i=void 0,len=void 0,start=void 0,end=void 0;parsed=parseCues(data);segments=[];// we are assuming one cue track per cue point\\n// both duration and media range require the i + 1 segment\\n// the final segment has to use global segment parameters\\nfor(i=0,len=parsed.length;i<len;i+=1){segment=new _Segment2.default();duration=0;if(i<parsed.length-1){duration=parsed[i+1].CueTime-parsed[i].CueTime;}else{duration=segmentDuration-parsed[i].CueTime;}// note that we don't explicitly set segment.media as this will be\\n// computed when all BaseURLs are resolved later\\nsegment.duration=duration;segment.startTime=parsed[i].CueTime;segment.timescale=1000;// hardcoded for ms\\nstart=parsed[i].CueTracks[0].ClusterPosition+segmentStart;if(i<parsed.length-1){end=parsed[i+1].CueTracks[0].ClusterPosition+segmentStart-1;}else{end=segmentEnd-1;}segment.mediaRange=start+'-'+end;segments.push(segment);}logger.debug('Parsed cues: '+segments.length+' cues.');return segments;}function parseEbmlHeader(data,media,theRange,callback){if(!data||data.byteLength===0){callback(null);return;}var ebmlParser=(0,_EBMLParser2.default)(context).create({data:data});var duration=void 0,segments=void 0,segmentEnd=void 0,segmentStart=void 0;var parts=theRange?theRange.split('-'):null;var request=null;var info={url:media,range:{start:parts?parseFloat(parts[0]):null,end:parts?parseFloat(parts[1]):null},request:request};logger.debug('Parse EBML header: '+info.url);// skip over the header itself\\nebmlParser.skipOverElement(WebM.EBML);ebmlParser.consumeTag(WebM.Segment);// segments start here\\nsegmentEnd=ebmlParser.getMatroskaCodedNum();segmentEnd+=ebmlParser.getPos();segmentStart=ebmlParser.getPos();// skip over any top level elements to get to the segment info\\nwhile(ebmlParser.moreData()&&!ebmlParser.consumeTagAndSize(WebM.Segment.Info,true)){if(!(ebmlParser.skipOverElement(WebM.Segment.SeekHead,true)||ebmlParser.skipOverElement(WebM.Segment.Tracks,true)||ebmlParser.skipOverElement(WebM.Segment.Cues,true)||ebmlParser.skipOverElement(WebM.Void,true))){throw new Error('no valid top level element found');}}// we only need one thing in segment info, duration\\nwhile(duration===undefined){var infoTag=ebmlParser.getMatroskaCodedNum(true);var infoElementSize=ebmlParser.getMatroskaCodedNum();switch(infoTag){case WebM.Segment.Info.Duration.tag:duration=ebmlParser[WebM.Segment.Info.Duration.parse](infoElementSize);break;default:ebmlParser.setPos(ebmlParser.getPos()+infoElementSize);break;}}// once we have what we need from segment info, we jump right to the\\n// cues\\nrequest=getFragmentRequest(info);var onload=function onload(response){segments=parseSegments(response,segmentStart,segmentEnd,duration);callback(segments);};var onloadend=function onloadend(){logger.error('Download Error: Cues '+info.url);callback(null);};urlLoader.load({request:request,success:onload,error:onloadend});logger.debug('Perform cues load: '+info.url+' bytes='+info.range.start+'-'+info.range.end);}function checkConfig(){if(!baseURLController||!baseURLController.hasOwnProperty('resolve')){throw new Error('setConfig function has to be called previously');}}function loadInitialization(streamId,mediaType,representation,loadingInfo){checkConfig();var request=null;var baseUrl=representation?baseURLController.resolve(representation.path):null;var initRange=representation?representation.range.split('-'):null;var info=loadingInfo||{range:{start:initRange?parseFloat(initRange[0]):null,end:initRange?parseFloat(initRange[1]):null},request:request,url:baseUrl?baseUrl.url:undefined,init:true,mediaType:mediaType};logger.info('Start loading initialization.');request=getFragmentRequest(info);var onload=function onload(){// note that we don't explicitly set rep.initialization as this\\n// will be computed when all BaseURLs are resolved later\\neventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});};var onloadend=function onloadend(){eventBus.trigger(events.INITIALIZATION_LOADED,{representation:representation},{streamId:streamId,mediaType:mediaType});};urlLoader.load({request:request,success:onload,error:onloadend});logger.debug('Perform init load: '+info.url);}function loadSegments(streamId,mediaType,representation,theRange,callback){checkConfig();var request=null;var baseUrl=representation?baseURLController.resolve(representation.path):null;var media=baseUrl?baseUrl.url:undefined;var bytesToLoad=8192;var info={bytesLoaded:0,bytesToLoad:bytesToLoad,range:{start:0,end:bytesToLoad},request:request,url:media,init:false,mediaType:mediaType};callback=!callback?onLoaded:callback;request=getFragmentRequest(info);// first load the header, but preserve the manifest range so we can\\n// load the cues after parsing the header\\n// NOTE: we expect segment info to appear in the first 8192 bytes\\nlogger.debug('Parsing ebml header');var onload=function onload(response){parseEbmlHeader(response,media,theRange,function(segments){callback(streamId,mediaType,segments,representation);});};var onloadend=function onloadend(){callback(streamId,mediaType,null,representation);};urlLoader.load({request:request,success:onload,error:onloadend});}function onLoaded(streamId,mediaType,segments,representation){eventBus.trigger(events.SEGMENTS_LOADED,{segments:segments,representation:representation,error:segments?undefined:new _DashJSError2.default(errors.SEGMENT_BASE_LOADER_ERROR_CODE,errors.SEGMENT_BASE_LOADER_ERROR_MESSAGE)},{streamId:streamId,mediaType:mediaType});}function getFragmentRequest(info){var request=new _FragmentRequest2.default();request.setInfo(info);return request;}function reset(){errHandler=null;requestModifier=null;}instance={setConfig:setConfig,initialize:initialize,loadInitialization:loadInitialization,loadSegments:loadSegments,reset:reset};setup();return instance;}WebmSegmentBaseLoader.__dashjs_factory_name='WebmSegmentBaseLoader';exports.default=_FactoryMaker2.default.getSingletonFactory(WebmSegmentBaseLoader);\\n//# sourceMappingURL=WebmSegmentBaseLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js?\")},\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Dash constants declaration\\n * @class\\n * @ignore\\n */var DashConstants=function(){_createClass(DashConstants,[{key:'init',value:function init(){this.BASE_URL='BaseURL';this.SEGMENT_BASE='SegmentBase';this.SEGMENT_TEMPLATE='SegmentTemplate';this.SEGMENT_LIST='SegmentList';this.SEGMENT_URL='SegmentURL';this.SEGMENT_TIMELINE='SegmentTimeline';this.SEGMENT_PROFILES='segmentProfiles';this.ADAPTATION_SET='AdaptationSet';this.REPRESENTATION='Representation';this.REPRESENTATION_INDEX='RepresentationIndex';this.SUB_REPRESENTATION='SubRepresentation';this.INITIALIZATION='Initialization';this.INITIALIZATION_MINUS='initialization';this.MPD='MPD';this.PERIOD='Period';this.ASSET_IDENTIFIER='AssetIdentifier';this.EVENT_STREAM='EventStream';this.ID='id';this.PROFILES='profiles';this.SERVICE_LOCATION='serviceLocation';this.RANGE='range';this.INDEX='index';this.MEDIA='media';this.BYTE_RANGE='byteRange';this.INDEX_RANGE='indexRange';this.MEDIA_RANGE='mediaRange';this.VALUE='value';this.CONTENT_TYPE='contentType';this.MIME_TYPE='mimeType';this.BITSTREAM_SWITCHING='BitstreamSwitching';this.BITSTREAM_SWITCHING_MINUS='bitstreamSwitching';this.CODECS='codecs';this.DEPENDENCY_ID='dependencyId';this.MEDIA_STREAM_STRUCTURE_ID='mediaStreamStructureId';this.METRICS='Metrics';this.METRICS_MINUS='metrics';this.REPORTING='Reporting';this.WIDTH='width';this.HEIGHT='height';this.SAR='sar';this.FRAMERATE='frameRate';this.AUDIO_SAMPLING_RATE='audioSamplingRate';this.MAXIMUM_SAP_PERIOD='maximumSAPPeriod';this.START_WITH_SAP='startWithSAP';this.MAX_PLAYOUT_RATE='maxPlayoutRate';this.CODING_DEPENDENCY='codingDependency';this.SCAN_TYPE='scanType';this.FRAME_PACKING='FramePacking';this.AUDIO_CHANNEL_CONFIGURATION='AudioChannelConfiguration';this.CONTENT_PROTECTION='ContentProtection';this.ESSENTIAL_PROPERTY='EssentialProperty';this.SUPPLEMENTAL_PROPERTY='SupplementalProperty';this.INBAND_EVENT_STREAM='InbandEventStream';this.ACCESSIBILITY='Accessibility';this.ROLE='Role';this.RATING='Rating';this.CONTENT_COMPONENT='ContentComponent';this.SUBSET='Subset';this.LANG='lang';this.VIEWPOINT='Viewpoint';this.ROLE_ASARRAY='Role_asArray';this.ACCESSIBILITY_ASARRAY='Accessibility_asArray';this.AUDIOCHANNELCONFIGURATION_ASARRAY='AudioChannelConfiguration_asArray';this.CONTENTPROTECTION_ASARRAY='ContentProtection_asArray';this.MAIN='main';this.DYNAMIC='dynamic';this.STATIC='static';this.MEDIA_PRESENTATION_DURATION='mediaPresentationDuration';this.MINIMUM_UPDATE_PERIOD='minimumUpdatePeriod';this.CODEC_PRIVATE_DATA='codecPrivateData';this.BANDWITH='bandwidth';this.SOURCE_URL='sourceURL';this.TIMESCALE='timescale';this.DURATION='duration';this.START_NUMBER='startNumber';this.PRESENTATION_TIME_OFFSET='presentationTimeOffset';this.AVAILABILITY_START_TIME='availabilityStartTime';this.AVAILABILITY_END_TIME='availabilityEndTime';this.TIMESHIFT_BUFFER_DEPTH='timeShiftBufferDepth';this.MAX_SEGMENT_DURATION='maxSegmentDuration';this.PRESENTATION_TIME='presentationTime';this.MIN_BUFFER_TIME='minBufferTime';this.MAX_SUBSEGMENT_DURATION='maxSubsegmentDuration';this.START='start';this.AVAILABILITY_TIME_OFFSET='availabilityTimeOffset';this.AVAILABILITY_TIME_COMPLETE='availabilityTimeComplete';this.CENC_DEFAULT_KID='cenc:default_KID';this.DVB_PRIORITY='dvb:priority';this.DVB_WEIGHT='dvb:weight';this.SUGGESTED_PRESENTATION_DELAY='suggestedPresentationDelay';this.SERVICE_DESCRIPTION='ServiceDescription';this.SERVICE_DESCRIPTION_SCOPE='Scope';this.SERVICE_DESCRIPTION_LATENCY='Latency';this.SERVICE_DESCRIPTION_PLAYBACK_RATE='PlaybackRate';this.PATCH_LOCATION='PatchLocation';this.PUBLISH_TIME='publishTime';this.ORIGINAL_PUBLISH_TIME='originalPublishTime';this.ORIGINAL_MPD_ID='mpdId';}}]);function DashConstants(){_classCallCheck(this,DashConstants);this.init();}return DashConstants;}();var constants=new DashConstants();exports.default=constants;\\n//# sourceMappingURL=DashConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js?\")},\"../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DashJSError=__webpack_require__(/*! ../../streaming/vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RepresentationController(config){config=config||{};var eventBus=config.eventBus;var events=config.events;var errors=config.errors;var abrController=config.abrController;var dashMetrics=config.dashMetrics;var playbackController=config.playbackController;var timelineConverter=config.timelineConverter;var type=config.type;var streamInfo=config.streamInfo;var dashConstants=config.dashConstants;var instance=void 0,realAdaptation=void 0,updating=void 0,voAvailableRepresentations=void 0,currentVoRepresentation=void 0;function setup(){resetInitialSettings();eventBus.on(events.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.on(events.REPRESENTATION_UPDATE_COMPLETED,onRepresentationUpdated,instance);eventBus.on(events.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,instance);eventBus.on(events.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function checkConfig(){if(!abrController||!dashMetrics||!playbackController||!timelineConverter){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getData(){return realAdaptation;}function isUpdating(){return updating;}function getCurrentRepresentation(){return currentVoRepresentation;}function resetInitialSettings(){realAdaptation=null;updating=true;voAvailableRepresentations=[];}function reset(){eventBus.off(events.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.off(events.REPRESENTATION_UPDATE_COMPLETED,onRepresentationUpdated,instance);eventBus.off(events.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,instance);eventBus.off(events.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);resetInitialSettings();}function updateData(newRealAdaptation,availableRepresentations,type,quality){checkConfig();startDataUpdate();voAvailableRepresentations=availableRepresentations;currentVoRepresentation=getRepresentationForQuality(quality);realAdaptation=newRealAdaptation;if(type!==_Constants2.default.VIDEO&&type!==_Constants2.default.AUDIO&&type!==_Constants2.default.FRAGMENTED_TEXT){endDataUpdate();return;}updateAvailabilityWindow(playbackController.getIsDynamic(),true);}function addRepresentationSwitch(){checkConfig();var now=new Date();var currentRepresentation=getCurrentRepresentation();var currentVideoTimeMs=playbackController.getTime()*1000;if(currentRepresentation){dashMetrics.addRepresentationSwitch(currentRepresentation.adaptation.type,now,currentVideoTimeMs,currentRepresentation.id);}}function getRepresentationForQuality(quality){return quality===null||quality===undefined||quality>=voAvailableRepresentations.length?null:voAvailableRepresentations[quality];}function getQualityForRepresentation(voRepresentation){return voAvailableRepresentations.indexOf(voRepresentation);}function isAllRepresentationsUpdated(){for(var i=0,ln=voAvailableRepresentations.length;i<ln;i++){var segmentInfoType=voAvailableRepresentations[i].segmentInfoType;if(voAvailableRepresentations[i].segmentAvailabilityRange===null||!voAvailableRepresentations[i].hasInitialization()||(segmentInfoType===dashConstants.SEGMENT_BASE||segmentInfoType===dashConstants.BASE_URL)&&!voAvailableRepresentations[i].segments){return false;}}return true;}function setExpectedLiveEdge(liveEdge){timelineConverter.setExpectedLiveEdge(liveEdge);dashMetrics.updateManifestUpdateInfo({presentationStartTime:liveEdge});}function updateRepresentation(representation,isDynamic){representation.segmentAvailabilityRange=timelineConverter.calcSegmentAvailabilityRange(representation,isDynamic);if(representation.segmentAvailabilityRange.end<representation.segmentAvailabilityRange.start){var error=new _DashJSError2.default(errors.SEGMENTS_UNAVAILABLE_ERROR_CODE,errors.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE,{availabilityDelay:representation.segmentAvailabilityRange.start-representation.segmentAvailabilityRange.end});endDataUpdate(error);return;}if(isDynamic){setExpectedLiveEdge(representation.segmentAvailabilityRange.end);}}function updateAvailabilityWindow(isDynamic,notifyUpdate){checkConfig();for(var i=0,ln=voAvailableRepresentations.length;i<ln;i++){updateRepresentation(voAvailableRepresentations[i],isDynamic);if(notifyUpdate){eventBus.trigger(events.REPRESENTATION_UPDATE_STARTED,{representation:voAvailableRepresentations[i]},{streamId:streamInfo.id,mediaType:type});}}}function resetAvailabilityWindow(){voAvailableRepresentations.forEach(function(rep){rep.segmentAvailabilityRange=null;});}function startDataUpdate(){updating=true;eventBus.trigger(events.DATA_UPDATE_STARTED,{},{streamId:streamInfo.id,mediaType:type});}function endDataUpdate(error){updating=false;eventBus.trigger(events.DATA_UPDATE_COMPLETED,{data:realAdaptation,currentRepresentation:currentVoRepresentation,error:error},{streamId:streamInfo.id,mediaType:type});}function postponeUpdate(postponeTimePeriod){var delay=postponeTimePeriod;var update=function update(){if(isUpdating())return;startDataUpdate();// clear the segmentAvailabilityRange for all reps.\\n// this ensures all are updated before the live edge search starts\\nresetAvailabilityWindow();updateAvailabilityWindow(playbackController.getIsDynamic(),true);};eventBus.trigger(events.AST_IN_FUTURE,{delay:delay});setTimeout(update,delay);}function onRepresentationUpdated(e){if(!isUpdating())return;if(e.error){endDataUpdate(e.error);return;}var r=e.representation;var manifestUpdateInfo=dashMetrics.getCurrentManifestUpdate();var alreadyAdded=false;var postponeTimePeriod=0;var repInfo=void 0,err=void 0,repSwitch=void 0;if(r.adaptation.period.mpd.manifest.type===dashConstants.DYNAMIC&&!r.adaptation.period.mpd.manifest.ignorePostponeTimePeriod&&playbackController.getStreamController().getStreams().length<=1){// We must put things to sleep unless till e.g. the startTime calculation in ScheduleController.onLiveEdgeSearchCompleted fall after the segmentAvailabilityRange.start\\npostponeTimePeriod=getRepresentationUpdatePostponeTimePeriod(r);}if(postponeTimePeriod>0){postponeUpdate(postponeTimePeriod);err=new _DashJSError2.default(errors.SEGMENTS_UPDATE_FAILED_ERROR_CODE,errors.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE);endDataUpdate(err);return;}if(manifestUpdateInfo){for(var i=0;i<manifestUpdateInfo.representationInfo.length;i++){repInfo=manifestUpdateInfo.representationInfo[i];if(repInfo.index===r.index&&repInfo.mediaType===getType()){alreadyAdded=true;break;}}if(!alreadyAdded){dashMetrics.addManifestUpdateRepresentationInfo(r,getType());}}if(isAllRepresentationsUpdated()){abrController.setPlaybackQuality(getType(),streamInfo,getQualityForRepresentation(currentVoRepresentation));dashMetrics.updateManifestUpdateInfo({latency:currentVoRepresentation.segmentAvailabilityRange.end-playbackController.getTime()});repSwitch=dashMetrics.getCurrentRepresentationSwitch(getCurrentRepresentation().adaptation.type);if(!repSwitch){addRepresentationSwitch();}endDataUpdate();}}function getRepresentationUpdatePostponeTimePeriod(representation){try{var streamController=playbackController.getStreamController();var activeStreamInfo=streamController.getActiveStreamInfo();var startTimeAnchor=representation.segmentAvailabilityRange.start;if(activeStreamInfo&&activeStreamInfo.id&&activeStreamInfo.id!==streamInfo.id){// We need to consider the currently playing period if a period switch is performed.\\nstartTimeAnchor=Math.min(playbackController.getTime(),startTimeAnchor);}var segmentAvailabilityTimePeriod=representation.segmentAvailabilityRange.end-startTimeAnchor;var liveDelay=playbackController.getLiveDelay();return(liveDelay-segmentAvailabilityTimePeriod)*1000;}catch(e){return 0;}}function onWallclockTimeUpdated(e){if(e.isDynamic){updateAvailabilityWindow(e.isDynamic);}}function onQualityChanged(e){currentVoRepresentation=getRepresentationForQuality(e.newQuality);addRepresentationSwitch();}function onManifestValidityChanged(e){if(e.newDuration){var representation=getCurrentRepresentation();if(representation&&representation.adaptation.period){var period=representation.adaptation.period;period.duration=e.newDuration;}}}instance={getStreamId:getStreamId,getType:getType,getData:getData,isUpdating:isUpdating,updateData:updateData,updateRepresentation:updateRepresentation,getCurrentRepresentation:getCurrentRepresentation,getRepresentationForQuality:getRepresentationForQuality,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RepresentationController.__dashjs_factory_name=\\'RepresentationController\\';exports.default=_FactoryMaker2.default.getClassFactory(RepresentationController);\\n//# sourceMappingURL=RepresentationController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js?')},\"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SegmentBaseLoader=__webpack_require__(/*! ../SegmentBaseLoader */ \\\"../node_modules/dashjs/build/es5/src/dash/SegmentBaseLoader.js\\\");var _SegmentBaseLoader2=_interopRequireDefault(_SegmentBaseLoader);var _WebmSegmentBaseLoader=__webpack_require__(/*! ../WebmSegmentBaseLoader */ \\\"../node_modules/dashjs/build/es5/src/dash/WebmSegmentBaseLoader.js\\\");var _WebmSegmentBaseLoader2=_interopRequireDefault(_WebmSegmentBaseLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SegmentBaseController(config){config=config||{};var context=this.context;var eventBus=config.eventBus;var events=config.events;var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var errHandler=config.errHandler;var baseURLController=config.baseURLController;var debug=config.debug;var boxParser=config.boxParser;var requestModifier=config.requestModifier;var errors=config.errors;var instance=void 0,segmentBaseLoader=void 0,webmSegmentBaseLoader=void 0;function setup(){segmentBaseLoader=(0,_SegmentBaseLoader2.default)(context).getInstance();webmSegmentBaseLoader=(0,_WebmSegmentBaseLoader2.default)(context).getInstance();segmentBaseLoader.setConfig({baseURLController:baseURLController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,eventBus:eventBus,events:events,errors:errors,debug:debug,boxParser:boxParser,requestModifier:requestModifier});webmSegmentBaseLoader.setConfig({baseURLController:baseURLController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,eventBus:eventBus,events:events,errors:errors,debug:debug,requestModifier:requestModifier});}function isWebM(mimeType){var type=mimeType?mimeType.split('/')[1]:'';return'webm'===type.toLowerCase();}function initialize(){eventBus.on(events.SEGMENTBASE_INIT_REQUEST_NEEDED,onInitSegmentBaseNeeded,instance);eventBus.on(events.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,onSegmentsListSegmentBaseNeeded,instance);segmentBaseLoader.initialize();webmSegmentBaseLoader.initialize();}function onInitSegmentBaseNeeded(e){if(isWebM(e.mimeType)){webmSegmentBaseLoader.loadInitialization(e.streamId,e.mediaType,e.representation);}else{segmentBaseLoader.loadInitialization(e.streamId,e.mediaType,e.representation);}}function onSegmentsListSegmentBaseNeeded(e){if(isWebM(e.mimeType)){webmSegmentBaseLoader.loadSegments(e.streamId,e.mediaType,e.representation,e.representation?e.representation.indexRange:null,e.callback);}else{segmentBaseLoader.loadSegments(e.streamId,e.mediaType,e.representation,e.representation?e.representation.indexRange:null,e.callback);}}function reset(){eventBus.off(events.SEGMENTBASE_INIT_REQUEST_NEEDED,onInitSegmentBaseNeeded,instance);eventBus.off(events.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,onSegmentsListSegmentBaseNeeded,instance);}instance={initialize:initialize,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */SegmentBaseController.__dashjs_factory_name='SegmentBaseController';var factory=_FactoryMaker2.default.getSingletonFactory(SegmentBaseController);exports.default=factory;\\n//# sourceMappingURL=SegmentBaseController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js?\")},\"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _TimelineSegmentsGetter=__webpack_require__(/*! ../utils/TimelineSegmentsGetter */ \"../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js\");var _TimelineSegmentsGetter2=_interopRequireDefault(_TimelineSegmentsGetter);var _TemplateSegmentsGetter=__webpack_require__(/*! ../utils/TemplateSegmentsGetter */ \"../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js\");var _TemplateSegmentsGetter2=_interopRequireDefault(_TemplateSegmentsGetter);var _ListSegmentsGetter=__webpack_require__(/*! ../utils/ListSegmentsGetter */ \"../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js\");var _ListSegmentsGetter2=_interopRequireDefault(_ListSegmentsGetter);var _SegmentBaseGetter=__webpack_require__(/*! ../utils/SegmentBaseGetter */ \"../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js\");var _SegmentBaseGetter2=_interopRequireDefault(_SegmentBaseGetter);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SegmentsController(config){config=config||{};var context=this.context;var events=config.events;var eventBus=config.eventBus;var dashConstants=config.dashConstants;var streamInfo=config.streamInfo;var type=config.type;var instance=void 0,getters=void 0;function setup(){getters={};}function initialize(isDynamic){getters[dashConstants.SEGMENT_TIMELINE]=(0,_TimelineSegmentsGetter2.default)(context).create(config,isDynamic);getters[dashConstants.SEGMENT_TEMPLATE]=(0,_TemplateSegmentsGetter2.default)(context).create(config,isDynamic);getters[dashConstants.SEGMENT_LIST]=(0,_ListSegmentsGetter2.default)(context).create(config,isDynamic);getters[dashConstants.SEGMENT_BASE]=(0,_SegmentBaseGetter2.default)(context).create(config,isDynamic);}function update(voRepresentation,mimeType,hasInitialization,hasSegments){if(!hasInitialization){eventBus.trigger(events.SEGMENTBASE_INIT_REQUEST_NEEDED,{streamId:streamInfo.id,mediaType:type,mimeType:mimeType,representation:voRepresentation});}if(!hasSegments){eventBus.trigger(events.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:streamInfo.id,mediaType:type,mimeType:mimeType,representation:voRepresentation});}}function getSegmentsGetter(representation){return representation?representation.segments?getters[dashConstants.SEGMENT_BASE]:getters[representation.segmentInfoType]:null;}function getSegmentByIndex(representation,index,lastSegmentTime){var getter=getSegmentsGetter(representation);return getter?getter.getSegmentByIndex(representation,index,lastSegmentTime):null;}function getSegmentByTime(representation,time){var getter=getSegmentsGetter(representation);return getter?getter.getSegmentByTime(representation,time):null;}instance={initialize:initialize,update:update,getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */SegmentsController.__dashjs_factory_name=\\'SegmentsController\\';var factory=_FactoryMaker2.default.getClassFactory(SegmentsController);exports.default=factory;\\n//# sourceMappingURL=SegmentsController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/controllers/SegmentsController.js?')},\"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _Representation=__webpack_require__(/*! ../vo/Representation */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Representation.js\\\");var _Representation2=_interopRequireDefault(_Representation);var _AdaptationSet=__webpack_require__(/*! ../vo/AdaptationSet */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js\\\");var _AdaptationSet2=_interopRequireDefault(_AdaptationSet);var _Period=__webpack_require__(/*! ../vo/Period */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Period.js\\\");var _Period2=_interopRequireDefault(_Period);var _Mpd=__webpack_require__(/*! ../vo/Mpd */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js\\\");var _Mpd2=_interopRequireDefault(_Mpd);var _UTCTiming=__webpack_require__(/*! ../vo/UTCTiming */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js\\\");var _UTCTiming2=_interopRequireDefault(_UTCTiming);var _Event=__webpack_require__(/*! ../vo/Event */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Event.js\\\");var _Event2=_interopRequireDefault(_Event);var _BaseURL=__webpack_require__(/*! ../vo/BaseURL */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js\\\");var _BaseURL2=_interopRequireDefault(_BaseURL);var _EventStream=__webpack_require__(/*! ../vo/EventStream */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js\\\");var _EventStream2=_interopRequireDefault(_EventStream);var _ObjectUtils=__webpack_require__(/*! ../../streaming/utils/ObjectUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js\\\");var _ObjectUtils2=_interopRequireDefault(_ObjectUtils);var _URLUtils=__webpack_require__(/*! ../../streaming/utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _DashJSError=__webpack_require__(/*! ../../streaming/vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _ThumbnailTracks=__webpack_require__(/*! ../../streaming/thumbnail/ThumbnailTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DashManifestModel(){var instance=void 0,logger=void 0,errHandler=void 0,BASE64=void 0;var context=this.context;var urlUtils=(0,_URLUtils2.default)(context).getInstance();var isInteger=Number.isInteger||function(value){return typeof value==='number'&&isFinite(value)&&Math.floor(value)===value;};function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getIsTypeOf(adaptation,type){var i=void 0,len=void 0,representation=void 0,col=void 0,mimeTypeRegEx=void 0,codecs=void 0;var result=false;var found=false;if(!adaptation){throw new Error('adaptation is not defined');}if(!type){throw new Error('type is not defined');}if(adaptation.hasOwnProperty('ContentComponent_asArray')){col=adaptation.ContentComponent_asArray;}mimeTypeRegEx=type!==_Constants2.default.TEXT?new RegExp(type):new RegExp('(vtt|ttml)');if(adaptation.Representation_asArray&&adaptation.Representation_asArray.length&&adaptation.Representation_asArray.length>0){var essentialProperties=getEssentialPropertiesForRepresentation(adaptation.Representation_asArray[0]);if(essentialProperties&&essentialProperties.length>0&&_ThumbnailTracks.THUMBNAILS_SCHEME_ID_URIS.indexOf(essentialProperties[0].schemeIdUri)>=0){return type===_Constants2.default.IMAGE;}if(adaptation.Representation_asArray[0].hasOwnProperty(_DashConstants2.default.CODECS)){// Just check the start of the codecs string\\ncodecs=adaptation.Representation_asArray[0].codecs;if(codecs.search(_Constants2.default.STPP)===0||codecs.search(_Constants2.default.WVTT)===0){return type===_Constants2.default.FRAGMENTED_TEXT;}}}if(col){if(col.length>1){return type===_Constants2.default.MUXED;}else if(col[0]&&col[0].contentType===type){result=true;found=true;}}if(adaptation.hasOwnProperty(_DashConstants2.default.MIME_TYPE)){result=mimeTypeRegEx.test(adaptation.mimeType);found=true;}// couldn't find on adaptationset, so check a representation\\nif(!found){i=0;len=adaptation.Representation_asArray&&adaptation.Representation_asArray.length?adaptation.Representation_asArray.length:0;while(!found&&i<len){representation=adaptation.Representation_asArray[i];if(representation.hasOwnProperty(_DashConstants2.default.MIME_TYPE)){result=mimeTypeRegEx.test(representation.mimeType);found=true;}i++;}}return result;}function getIsAudio(adaptation){return getIsTypeOf(adaptation,_Constants2.default.AUDIO);}function getIsVideo(adaptation){return getIsTypeOf(adaptation,_Constants2.default.VIDEO);}function getIsFragmentedText(adaptation){return getIsTypeOf(adaptation,_Constants2.default.FRAGMENTED_TEXT);}function getIsMuxed(adaptation){return getIsTypeOf(adaptation,_Constants2.default.MUXED);}function getIsImage(adaptation){return getIsTypeOf(adaptation,_Constants2.default.IMAGE);}function getIsTextTrack(type){return type==='text/vtt'||type==='application/ttml+xml';}function getLanguageForAdaptation(adaptation){var lang='';if(adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.LANG)){//Filter out any other characters not allowed according to RFC5646\\nlang=adaptation.lang.replace(/[^A-Za-z0-9-]/g,'');}return lang;}function getViewpointForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.VIEWPOINT)?adaptation.Viewpoint:null;}function getRolesForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.ROLE_ASARRAY)?adaptation.Role_asArray:[];}function getAccessibilityForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.ACCESSIBILITY_ASARRAY)?adaptation.Accessibility_asArray:[];}function getAudioChannelConfigurationForAdaptation(adaptation){return adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?adaptation.AudioChannelConfiguration_asArray:[];}function getAudioChannelConfigurationForRepresentation(representation){return representation&&representation.hasOwnProperty(_DashConstants2.default.AUDIOCHANNELCONFIGURATION_ASARRAY)?representation.AudioChannelConfiguration_asArray:[];}function getRepresentationSortFunction(){return function(a,b){return a.bandwidth-b.bandwidth;};}function processAdaptation(realAdaptation){if(realAdaptation&&Array.isArray(realAdaptation.Representation_asArray)){realAdaptation.Representation_asArray.sort(getRepresentationSortFunction());}return realAdaptation;}function getRealAdaptations(manifest,periodIndex){return manifest&&manifest.Period_asArray&&isInteger(periodIndex)?manifest.Period_asArray[periodIndex]?manifest.Period_asArray[periodIndex].AdaptationSet_asArray:[]:[];}function getRealPeriods(manifest){return manifest&&manifest.Period_asArray?manifest.Period_asArray:[];}function getRealPeriodForIndex(index,manifest){var realPeriods=getRealPeriods(manifest);if(realPeriods.length>0&&isInteger(index)){return realPeriods[index];}else{return null;}}function getAdaptationForId(id,manifest,periodIndex){var realAdaptations=getRealAdaptations(manifest,periodIndex);var i=void 0,len=void 0;for(i=0,len=realAdaptations.length;i<len;i++){if(realAdaptations[i].hasOwnProperty(_DashConstants2.default.ID)&&realAdaptations[i].id===id){return realAdaptations[i];}}return null;}function getAdaptationForIndex(index,manifest,periodIndex){var realAdaptations=getRealAdaptations(manifest,periodIndex);if(realAdaptations.length>0&&isInteger(index)){return realAdaptations[index];}else{return null;}}function getIndexForAdaptation(realAdaptation,manifest,periodIndex){if(!realAdaptation){return-1;}var realAdaptations=getRealAdaptations(manifest,periodIndex);for(var i=0;i<realAdaptations.length;i++){var objectUtils=(0,_ObjectUtils2.default)(context).getInstance();if(objectUtils.areEqual(realAdaptations[i],realAdaptation)){return i;}}return-1;}function getAdaptationsForType(manifest,periodIndex,type){var realAdaptations=getRealAdaptations(manifest,periodIndex);var i=void 0,len=void 0;var adaptations=[];for(i=0,len=realAdaptations.length;i<len;i++){if(getIsTypeOf(realAdaptations[i],type)){adaptations.push(processAdaptation(realAdaptations[i]));}}return adaptations;}function getCodec(adaptation,representationId,addResolutionInfo){var codec=null;if(adaptation&&adaptation.Representation_asArray&&adaptation.Representation_asArray.length>0){var representation=isInteger(representationId)&&representationId>=0&&representationId<adaptation.Representation_asArray.length?adaptation.Representation_asArray[representationId]:adaptation.Representation_asArray[0];if(representation){codec=representation.mimeType+';codecs=\\\"'+representation.codecs+'\\\"';if(addResolutionInfo&&representation.width!==undefined){codec+=';width=\\\"'+representation.width+'\\\";height=\\\"'+representation.height+'\\\"';}}}// If the codec contains a profiles parameter we remove it. Otherwise it will cause problems when checking for codec capabilities of the platform\\nif(codec){codec=codec.replace(/\\\\sprofiles=[^;]*/g,'');}return codec;}function getMimeType(adaptation){return adaptation&&adaptation.Representation_asArray&&adaptation.Representation_asArray.length>0?adaptation.Representation_asArray[0].mimeType:null;}function getKID(adaptation){if(!adaptation||!adaptation.hasOwnProperty(_DashConstants2.default.CENC_DEFAULT_KID)){return null;}return adaptation[_DashConstants2.default.CENC_DEFAULT_KID];}function getLabelsForAdaptation(adaptation){if(!adaptation||!Array.isArray(adaptation.Label_asArray)){return[];}var labelArray=[];for(var i=0;i<adaptation.Label_asArray.length;i++){labelArray.push({lang:adaptation.Label_asArray[i].lang,text:adaptation.Label_asArray[i].__text||adaptation.Label_asArray[i]});}return labelArray;}function getContentProtectionData(adaptation){if(!adaptation||!adaptation.hasOwnProperty(_DashConstants2.default.CONTENTPROTECTION_ASARRAY)||adaptation.ContentProtection_asArray.length===0){return null;}return adaptation.ContentProtection_asArray;}function getIsDynamic(manifest){var isDynamic=false;if(manifest&&manifest.hasOwnProperty('type')){isDynamic=manifest.type===_DashConstants2.default.DYNAMIC;}return isDynamic;}function getId(manifest){return manifest&&manifest[_DashConstants2.default.ID]||null;}function hasProfile(manifest,profile){var has=false;if(manifest&&manifest.profiles&&manifest.profiles.length>0){has=manifest.profiles.indexOf(profile)!==-1;}return has;}function getDuration(manifest){var mpdDuration=void 0;//@mediaPresentationDuration specifies the duration of the entire Media Presentation.\\n//If the attribute is not present, the duration of the Media Presentation is unknown.\\nif(manifest&&manifest.hasOwnProperty(_DashConstants2.default.MEDIA_PRESENTATION_DURATION)){mpdDuration=manifest.mediaPresentationDuration;}else if(manifest&&manifest.type=='dynamic'){mpdDuration=Number.POSITIVE_INFINITY;}else{mpdDuration=Number.MAX_SAFE_INTEGER||Number.MAX_VALUE;}return mpdDuration;}function getBandwidth(representation){return representation&&representation.bandwidth?representation.bandwidth:NaN;}function getManifestUpdatePeriod(manifest){var latencyOfLastUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var delay=NaN;if(manifest&&manifest.hasOwnProperty(_DashConstants2.default.MINIMUM_UPDATE_PERIOD)){delay=manifest.minimumUpdatePeriod;}return isNaN(delay)?delay:Math.max(delay-latencyOfLastUpdate,1);}function getPublishTime(manifest){return manifest&&manifest.hasOwnProperty(_DashConstants2.default.PUBLISH_TIME)?new Date(manifest[_DashConstants2.default.PUBLISH_TIME]):null;}function getRepresentationCount(adaptation){return adaptation&&Array.isArray(adaptation.Representation_asArray)?adaptation.Representation_asArray.length:0;}function getBitrateListForAdaptation(realAdaptation){var processedRealAdaptation=processAdaptation(realAdaptation);var realRepresentations=processedRealAdaptation&&Array.isArray(processedRealAdaptation.Representation_asArray)?processedRealAdaptation.Representation_asArray:[];return realRepresentations.map(function(realRepresentation){return{bandwidth:realRepresentation.bandwidth,width:realRepresentation.width||0,height:realRepresentation.height||0,scanType:realRepresentation.scanType||null,id:realRepresentation.id||null};});}function getEssentialPropertiesForRepresentation(realRepresentation){if(!realRepresentation||!realRepresentation.EssentialProperty_asArray||!realRepresentation.EssentialProperty_asArray.length)return null;return realRepresentation.EssentialProperty_asArray.map(function(prop){return{schemeIdUri:prop.schemeIdUri,value:prop.value};});}function getRepresentationFor(index,adaptation){return adaptation&&adaptation.Representation_asArray&&adaptation.Representation_asArray.length>0&&isInteger(index)?adaptation.Representation_asArray[index]:null;}function getRealAdaptationFor(voAdaptation){if(voAdaptation&&voAdaptation.period&&isInteger(voAdaptation.period.index)){var periodArray=voAdaptation.period.mpd.manifest.Period_asArray[voAdaptation.period.index];if(periodArray&&periodArray.AdaptationSet_asArray&&isInteger(voAdaptation.index)){return processAdaptation(periodArray.AdaptationSet_asArray[voAdaptation.index]);}}}function getRepresentationsForAdaptation(voAdaptation){var voRepresentations=[];var processedRealAdaptation=getRealAdaptationFor(voAdaptation);var segmentInfo=void 0,baseUrl=void 0;if(processedRealAdaptation&&processedRealAdaptation.Representation_asArray){// TODO: TO BE REMOVED. We should get just the baseUrl elements that affects to the representations\\n// that we are processing. Making it works properly will require much further changes and given\\n// parsing base Urls parameters is needed for our ultra low latency examples, we will\\n// keep this \\\"tricky\\\" code until the real (and good) solution comes\\nif(voAdaptation&&voAdaptation.period&&isInteger(voAdaptation.period.index)){var baseUrls=getBaseURLsFromElement(voAdaptation.period.mpd.manifest);if(baseUrls){baseUrl=baseUrls[0];}}for(var i=0,len=processedRealAdaptation.Representation_asArray.length;i<len;++i){var realRepresentation=processedRealAdaptation.Representation_asArray[i];var voRepresentation=new _Representation2.default();voRepresentation.index=i;voRepresentation.adaptation=voAdaptation;if(realRepresentation.hasOwnProperty(_DashConstants2.default.ID)){voRepresentation.id=realRepresentation.id;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.CODECS)){voRepresentation.codecs=realRepresentation.codecs;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.CODEC_PRIVATE_DATA)){voRepresentation.codecPrivateData=realRepresentation.codecPrivateData;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.BANDWITH)){voRepresentation.bandwidth=realRepresentation.bandwidth;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.WIDTH)){voRepresentation.width=realRepresentation.width;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.HEIGHT)){voRepresentation.height=realRepresentation.height;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.SCAN_TYPE)){voRepresentation.scanType=realRepresentation.scanType;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.MAX_PLAYOUT_RATE)){voRepresentation.maxPlayoutRate=realRepresentation.maxPlayoutRate;}if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_BASE)){segmentInfo=realRepresentation.SegmentBase;voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_BASE;}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_LIST)){segmentInfo=realRepresentation.SegmentList;if(segmentInfo.hasOwnProperty(_DashConstants2.default.SEGMENT_TIMELINE)){voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_TIMELINE;}else{voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_LIST;}}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_TEMPLATE)){segmentInfo=realRepresentation.SegmentTemplate;if(segmentInfo.hasOwnProperty(_DashConstants2.default.SEGMENT_TIMELINE)){voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_TIMELINE;}else{voRepresentation.segmentInfoType=_DashConstants2.default.SEGMENT_TEMPLATE;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.INITIALIZATION_MINUS)){voRepresentation.initialization=segmentInfo.initialization.split('$Bandwidth$').join(realRepresentation.bandwidth).split('$RepresentationID$').join(realRepresentation.id);}}else{voRepresentation.segmentInfoType=_DashConstants2.default.BASE_URL;}voRepresentation.essentialProperties=getEssentialPropertiesForRepresentation(realRepresentation);if(segmentInfo){if(segmentInfo.hasOwnProperty(_DashConstants2.default.INITIALIZATION)){var initialization=segmentInfo.Initialization;if(initialization.hasOwnProperty(_DashConstants2.default.SOURCE_URL)){voRepresentation.initialization=initialization.sourceURL;}if(initialization.hasOwnProperty(_DashConstants2.default.RANGE)){voRepresentation.range=initialization.range;// initialization source url will be determined from\\n// BaseURL when resolved at load time.\\n}}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.MIME_TYPE)&&getIsTextTrack(realRepresentation.mimeType)){voRepresentation.range=0;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.TIMESCALE)){voRepresentation.timescale=segmentInfo.timescale;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.DURATION)){// TODO according to the spec @maxSegmentDuration specifies the maximum duration of any Segment in any Representation in the Media Presentation\\n// It is also said that for a SegmentTimeline any @d value shall not exceed the value of MPD@maxSegmentDuration, but nothing is said about\\n// SegmentTemplate @duration attribute. We need to find out if @maxSegmentDuration should be used instead of calculated duration if the the duration\\n// exceeds @maxSegmentDuration\\nvoRepresentation.segmentDuration=segmentInfo.duration/voRepresentation.timescale;}else if(realRepresentation.hasOwnProperty(_DashConstants2.default.SEGMENT_TEMPLATE)){segmentInfo=realRepresentation.SegmentTemplate;if(segmentInfo.hasOwnProperty(_DashConstants2.default.SEGMENT_TIMELINE)){voRepresentation.segmentDuration=calcSegmentDuration(segmentInfo.SegmentTimeline)/voRepresentation.timescale;}}if(segmentInfo.hasOwnProperty(_DashConstants2.default.MEDIA)){voRepresentation.media=segmentInfo.media;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.START_NUMBER)){voRepresentation.startNumber=segmentInfo.startNumber;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.INDEX_RANGE)){voRepresentation.indexRange=segmentInfo.indexRange;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.PRESENTATION_TIME_OFFSET)){voRepresentation.presentationTimeOffset=segmentInfo.presentationTimeOffset/voRepresentation.timescale;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_OFFSET)){voRepresentation.availabilityTimeOffset=segmentInfo.availabilityTimeOffset;}else if(baseUrl&&baseUrl.availabilityTimeOffset!==undefined){voRepresentation.availabilityTimeOffset=baseUrl.availabilityTimeOffset;}if(segmentInfo.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_COMPLETE)){voRepresentation.availabilityTimeComplete=segmentInfo.availabilityTimeComplete!=='false';}else if(baseUrl&&baseUrl.availabilityTimeComplete!==undefined){voRepresentation.availabilityTimeComplete=baseUrl.availabilityTimeComplete;}}voRepresentation.MSETimeOffset=calcMSETimeOffset(voRepresentation);voRepresentation.path=[voAdaptation.period.index,voAdaptation.index,i];voRepresentations.push(voRepresentation);}}return voRepresentations;}function calcSegmentDuration(segmentTimeline){var s0=segmentTimeline.S_asArray[0];var s1=segmentTimeline.S_asArray[1];return s0.hasOwnProperty('d')?s0.d:s1.t-s0.t;}function calcMSETimeOffset(representation){// The MSEOffset is offset from AST for media. It is Period@start - presentationTimeOffset\\nvar presentationOffset=representation.presentationTimeOffset;var periodStart=representation.adaptation.period.start;return periodStart-presentationOffset;}function getAdaptationsForPeriod(voPeriod){var realPeriod=voPeriod&&isInteger(voPeriod.index)?voPeriod.mpd.manifest.Period_asArray[voPeriod.index]:null;var voAdaptations=[];var voAdaptationSet=void 0,realAdaptationSet=void 0,i=void 0;if(realPeriod&&realPeriod.AdaptationSet_asArray){for(i=0;i<realPeriod.AdaptationSet_asArray.length;i++){realAdaptationSet=realPeriod.AdaptationSet_asArray[i];voAdaptationSet=new _AdaptationSet2.default();if(realAdaptationSet.hasOwnProperty(_DashConstants2.default.ID)){voAdaptationSet.id=realAdaptationSet.id;}voAdaptationSet.index=i;voAdaptationSet.period=voPeriod;if(getIsMuxed(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.MUXED;}else if(getIsAudio(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.AUDIO;}else if(getIsVideo(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.VIDEO;}else if(getIsFragmentedText(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.FRAGMENTED_TEXT;}else if(getIsImage(realAdaptationSet)){voAdaptationSet.type=_Constants2.default.IMAGE;}else{voAdaptationSet.type=_Constants2.default.TEXT;}voAdaptations.push(voAdaptationSet);}}return voAdaptations;}function getRegularPeriods(mpd){var isDynamic=mpd?getIsDynamic(mpd.manifest):false;var voPeriods=[];var realPreviousPeriod=null;var realPeriod=null;var voPreviousPeriod=null;var voPeriod=null;var len=void 0,i=void 0;for(i=0,len=mpd&&mpd.manifest&&mpd.manifest.Period_asArray?mpd.manifest.Period_asArray.length:0;i<len;i++){realPeriod=mpd.manifest.Period_asArray[i];// If the attribute @start is present in the Period, then the\\n// Period is a regular Period and the PeriodStart is equal\\n// to the value of this attribute.\\nif(realPeriod.hasOwnProperty(_DashConstants2.default.START)){voPeriod=new _Period2.default();voPeriod.start=realPeriod.start;}// If the @start attribute is absent, but the previous Period\\n// element contains a @duration attribute then then this new\\n// Period is also a regular Period. The start time of the new\\n// Period PeriodStart is the sum of the start time of the previous\\n// Period PeriodStart and the value of the attribute @duration\\n// of the previous Period.\\nelse if(realPreviousPeriod!==null&&realPreviousPeriod.hasOwnProperty(_DashConstants2.default.DURATION)&&voPreviousPeriod!==null){voPeriod=new _Period2.default();voPeriod.start=parseFloat((voPreviousPeriod.start+voPreviousPeriod.duration).toFixed(5));}// If (i) @start attribute is absent, and (ii) the Period element\\n// is the first in the MPD, and (iii) the MPD@type is 'static',\\n// then the PeriodStart time shall be set to zero.\\nelse if(i===0&&!isDynamic){voPeriod=new _Period2.default();voPeriod.start=0;}// The Period extends until the PeriodStart of the next Period.\\n// The difference between the PeriodStart time of a Period and\\n// the PeriodStart time of the following Period.\\nif(voPreviousPeriod!==null&&isNaN(voPreviousPeriod.duration)){if(voPeriod!==null){voPreviousPeriod.duration=parseFloat((voPeriod.start-voPreviousPeriod.start).toFixed(5));}else{logger.warn('First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback');}}if(voPeriod!==null){voPeriod.id=getPeriodId(realPeriod,i);voPeriod.index=i;voPeriod.mpd=mpd;if(realPeriod.hasOwnProperty(_DashConstants2.default.DURATION)){voPeriod.duration=realPeriod.duration;}voPeriods.push(voPeriod);realPreviousPeriod=realPeriod;voPreviousPeriod=voPeriod;}realPeriod=null;voPeriod=null;}if(voPeriods.length===0){return voPeriods;}// The last Period extends until the end of the Media Presentation.\\n// The difference between the PeriodStart time of the last Period\\n// and the mpd duration\\nif(voPreviousPeriod!==null&&isNaN(voPreviousPeriod.duration)){voPreviousPeriod.duration=parseFloat((getEndTimeForLastPeriod(voPreviousPeriod)-voPreviousPeriod.start).toFixed(5));}return voPeriods;}function getPeriodId(realPeriod,i){if(!realPeriod){throw new Error('Period cannot be null or undefined');}var id=_Period2.default.DEFAULT_ID+'_'+i;if(realPeriod.hasOwnProperty(_DashConstants2.default.ID)&&realPeriod.id.length>0&&realPeriod.id!=='__proto__'){id=realPeriod.id;}return id;}function getMpd(manifest){var mpd=new _Mpd2.default();if(manifest){mpd.manifest=manifest;if(manifest.hasOwnProperty(_DashConstants2.default.AVAILABILITY_START_TIME)){mpd.availabilityStartTime=new Date(manifest.availabilityStartTime.getTime());}else{if(manifest.loadedTime){mpd.availabilityStartTime=new Date(manifest.loadedTime.getTime());}}if(manifest.hasOwnProperty(_DashConstants2.default.AVAILABILITY_END_TIME)){mpd.availabilityEndTime=new Date(manifest.availabilityEndTime.getTime());}if(manifest.hasOwnProperty(_DashConstants2.default.MINIMUM_UPDATE_PERIOD)){mpd.minimumUpdatePeriod=manifest.minimumUpdatePeriod;}if(manifest.hasOwnProperty(_DashConstants2.default.MEDIA_PRESENTATION_DURATION)){mpd.mediaPresentationDuration=manifest.mediaPresentationDuration;}if(manifest.hasOwnProperty(_DashConstants2.default.SUGGESTED_PRESENTATION_DELAY)){mpd.suggestedPresentationDelay=manifest.suggestedPresentationDelay;}if(manifest.hasOwnProperty(_DashConstants2.default.TIMESHIFT_BUFFER_DEPTH)){mpd.timeShiftBufferDepth=manifest.timeShiftBufferDepth;}if(manifest.hasOwnProperty(_DashConstants2.default.MAX_SEGMENT_DURATION)){mpd.maxSegmentDuration=manifest.maxSegmentDuration;}if(manifest.hasOwnProperty(_DashConstants2.default.PUBLISH_TIME)){mpd.publishTime=new Date(manifest.publishTime);}}return mpd;}function checkConfig(){if(!errHandler||!errHandler.hasOwnProperty('error')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getEndTimeForLastPeriod(voPeriod){checkConfig();var isDynamic=getIsDynamic(voPeriod.mpd.manifest);var periodEnd=void 0;if(voPeriod.mpd.manifest.mediaPresentationDuration){periodEnd=voPeriod.mpd.manifest.mediaPresentationDuration;}else if(voPeriod.duration){periodEnd=voPeriod.duration;}else if(isDynamic){periodEnd=Number.POSITIVE_INFINITY;}else{errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_PARSE_CODE,'Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.',voPeriod));}return periodEnd;}function getEventsForPeriod(period){var manifest=period&&period.mpd&&period.mpd.manifest?period.mpd.manifest:null;var periodArray=manifest?manifest.Period_asArray:null;var eventStreams=periodArray&&period&&isInteger(period.index)?periodArray[period.index].EventStream_asArray:null;var events=[];var i=void 0,j=void 0;if(eventStreams){for(i=0;i<eventStreams.length;i++){var eventStream=new _EventStream2.default();eventStream.period=period;eventStream.timescale=1;if(eventStreams[i].hasOwnProperty(_Constants2.default.SCHEME_ID_URI)){eventStream.schemeIdUri=eventStreams[i][_Constants2.default.SCHEME_ID_URI];}else{throw new Error('Invalid EventStream. SchemeIdUri has to be set');}if(eventStreams[i].hasOwnProperty(_DashConstants2.default.TIMESCALE)){eventStream.timescale=eventStreams[i][_DashConstants2.default.TIMESCALE];}if(eventStreams[i].hasOwnProperty(_DashConstants2.default.VALUE)){eventStream.value=eventStreams[i][_DashConstants2.default.VALUE];}if(eventStreams[i].hasOwnProperty(_DashConstants2.default.PRESENTATION_TIME_OFFSET)){eventStream.presentationTimeOffset=eventStreams[i][_DashConstants2.default.PRESENTATION_TIME_OFFSET];}for(j=0;eventStreams[i].Event_asArray&&j<eventStreams[i].Event_asArray.length;j++){var currentMpdEvent=eventStreams[i].Event_asArray[j];var event=new _Event2.default();event.presentationTime=0;event.eventStream=eventStream;if(currentMpdEvent.hasOwnProperty(_DashConstants2.default.PRESENTATION_TIME)){event.presentationTime=currentMpdEvent.presentationTime;var presentationTimeOffset=eventStream.presentationTimeOffset?eventStream.presentationTimeOffset/eventStream.timescale:0;event.calculatedPresentationTime=event.presentationTime/eventStream.timescale+period.start-presentationTimeOffset;}if(currentMpdEvent.hasOwnProperty(_DashConstants2.default.DURATION)){event.duration=currentMpdEvent.duration/eventStream.timescale;}if(currentMpdEvent.hasOwnProperty(_DashConstants2.default.ID)){event.id=currentMpdEvent.id;}if(currentMpdEvent.Signal&&currentMpdEvent.Signal.Binary){// toString is used to manage both regular and namespaced tags\\nevent.messageData=BASE64.decodeArray(currentMpdEvent.Signal.Binary.toString());}else{// From Cor.1: 'NOTE: this attribute is an alternative\\n// to specifying a complete XML element(s) in the Event.\\n// It is useful when an event leans itself to a compact\\n// string representation'.\\nevent.messageData=currentMpdEvent.messageData||currentMpdEvent.__text;}events.push(event);}}}return events;}function getEventStreams(inbandStreams,representation){var eventStreams=[];var i=void 0;if(!inbandStreams)return eventStreams;for(i=0;i<inbandStreams.length;i++){var eventStream=new _EventStream2.default();eventStream.timescale=1;eventStream.representation=representation;if(inbandStreams[i].hasOwnProperty(_Constants2.default.SCHEME_ID_URI)){eventStream.schemeIdUri=inbandStreams[i].schemeIdUri;}else{throw new Error('Invalid EventStream. SchemeIdUri has to be set');}if(inbandStreams[i].hasOwnProperty(_DashConstants2.default.TIMESCALE)){eventStream.timescale=inbandStreams[i].timescale;}if(inbandStreams[i].hasOwnProperty(_DashConstants2.default.VALUE)){eventStream.value=inbandStreams[i].value;}eventStreams.push(eventStream);}return eventStreams;}function getEventStreamForAdaptationSet(manifest,adaptation){var inbandStreams=void 0,periodArray=void 0,adaptationArray=void 0;if(manifest&&manifest.Period_asArray&&adaptation&&adaptation.period&&isInteger(adaptation.period.index)){periodArray=manifest.Period_asArray[adaptation.period.index];if(periodArray&&periodArray.AdaptationSet_asArray&&isInteger(adaptation.index)){adaptationArray=periodArray.AdaptationSet_asArray[adaptation.index];if(adaptationArray){inbandStreams=adaptationArray.InbandEventStream_asArray;}}}return getEventStreams(inbandStreams,null);}function getEventStreamForRepresentation(manifest,representation){var inbandStreams=void 0,periodArray=void 0,adaptationArray=void 0,representationArray=void 0;if(manifest&&manifest.Period_asArray&&representation&&representation.adaptation&&representation.adaptation.period&&isInteger(representation.adaptation.period.index)){periodArray=manifest.Period_asArray[representation.adaptation.period.index];if(periodArray&&periodArray.AdaptationSet_asArray&&isInteger(representation.adaptation.index)){adaptationArray=periodArray.AdaptationSet_asArray[representation.adaptation.index];if(adaptationArray&&adaptationArray.Representation_asArray&&isInteger(representation.index)){representationArray=adaptationArray.Representation_asArray[representation.index];if(representationArray){inbandStreams=representationArray.InbandEventStream_asArray;}}}}return getEventStreams(inbandStreams,representation);}function getUTCTimingSources(manifest){var isDynamic=getIsDynamic(manifest);var hasAST=manifest?manifest.hasOwnProperty(_DashConstants2.default.AVAILABILITY_START_TIME):false;var utcTimingsArray=manifest?manifest.UTCTiming_asArray:null;var utcTimingEntries=[];// do not bother synchronizing the clock unless MPD is live,\\n// or it is static and has availabilityStartTime attribute\\nif(isDynamic||hasAST){if(utcTimingsArray){// the order is important here - 23009-1 states that the order\\n// in the manifest \\\"indicates relative preference, first having\\n// the highest, and the last the lowest priority\\\".\\nutcTimingsArray.forEach(function(utcTiming){var entry=new _UTCTiming2.default();if(utcTiming.hasOwnProperty(_Constants2.default.SCHEME_ID_URI)){entry.schemeIdUri=utcTiming.schemeIdUri;}else{// entries of type DescriptorType with no schemeIdUri\\n// are meaningless. let's just ignore this entry and\\n// move on.\\nreturn;}// this is (incorrectly) interpreted as a number - schema\\n// defines it as a string\\nif(utcTiming.hasOwnProperty(_DashConstants2.default.VALUE)){entry.value=utcTiming.value.toString();}else{// without a value, there's not a lot we can do with\\n// this entry. let's just ignore this one and move on\\nreturn;}// we're not interested in the optional id or any other\\n// attributes which might be attached to the entry\\nutcTimingEntries.push(entry);});}}return utcTimingEntries;}function getBaseURLsFromElement(node){var baseUrls=[];// if node.BaseURL_asArray and node.baseUri are undefined entries\\n// will be [undefined] which entries.some will just skip\\nvar entries=node.BaseURL_asArray||[node.baseUri];var earlyReturn=false;entries.some(function(entry){if(entry){var baseUrl=new _BaseURL2.default();var text=entry.__text||entry;if(urlUtils.isRelative(text)){// it doesn't really make sense to have relative and\\n// absolute URLs at the same level, or multiple\\n// relative URLs at the same level, so assume we are\\n// done from this level of the MPD\\nearlyReturn=true;// deal with the specific case where the MPD@BaseURL\\n// is specified and is relative. when no MPD@BaseURL\\n// entries exist, that case is handled by the\\n// [node.baseUri] in the entries definition.\\nif(node.baseUri){text=urlUtils.resolve(text,node.baseUri);}}baseUrl.url=text;// serviceLocation is optional, but we need it in order\\n// to blacklist correctly. if it's not available, use\\n// anything unique since there's no relationship to any\\n// other BaseURL and, in theory, the url should be\\n// unique so use this instead.\\nif(entry.hasOwnProperty(_DashConstants2.default.SERVICE_LOCATION)&&entry.serviceLocation.length){baseUrl.serviceLocation=entry.serviceLocation;}else{baseUrl.serviceLocation=text;}if(entry.hasOwnProperty(_DashConstants2.default.DVB_PRIORITY)){baseUrl.dvb_priority=entry[_DashConstants2.default.DVB_PRIORITY];}if(entry.hasOwnProperty(_DashConstants2.default.DVB_WEIGHT)){baseUrl.dvb_weight=entry[_DashConstants2.default.DVB_WEIGHT];}if(entry.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_OFFSET)){baseUrl.availabilityTimeOffset=entry[_DashConstants2.default.AVAILABILITY_TIME_OFFSET];}if(entry.hasOwnProperty(_DashConstants2.default.AVAILABILITY_TIME_COMPLETE)){baseUrl.availabilityTimeComplete=entry[_DashConstants2.default.AVAILABILITY_TIME_COMPLETE]!=='false';}/* NOTE: byteRange currently unused\\n                 */baseUrls.push(baseUrl);return earlyReturn;}});return baseUrls;}function getLocation(manifest){if(manifest&&manifest.hasOwnProperty(_Constants2.default.LOCATION)){// for now, do not support multiple Locations -\\n// just set Location to the first Location.\\nmanifest.Location=manifest.Location_asArray[0];return manifest.Location;}// may well be undefined\\nreturn undefined;}function getPatchLocation(manifest){if(manifest&&manifest.hasOwnProperty(_DashConstants2.default.PATCH_LOCATION)){// only include support for single patch location currently\\nmanifest.PatchLocation=manifest.PatchLocation_asArray[0];return manifest.PatchLocation;}// no patch location provided\\nreturn undefined;}function getSuggestedPresentationDelay(mpd){return mpd&&mpd.hasOwnProperty(_DashConstants2.default.SUGGESTED_PRESENTATION_DELAY)?mpd.suggestedPresentationDelay:null;}function getAvailabilityStartTime(mpd){return mpd&&mpd.hasOwnProperty(_DashConstants2.default.AVAILABILITY_START_TIME)&&mpd.availabilityStartTime!==null?mpd.availabilityStartTime.getTime():null;}function getServiceDescriptions(manifest){var serviceDescriptions=[];if(manifest&&manifest.hasOwnProperty(_DashConstants2.default.SERVICE_DESCRIPTION)){var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=manifest.ServiceDescription_asArray[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var sd=_step.value;// Convert each of the properties defined in\\nvar id=void 0,schemeIdUri=void 0,latency=void 0,playbackRate=void 0;for(var prop in sd){if(sd.hasOwnProperty(prop)){if(prop===_DashConstants2.default.ID){id=sd[prop];}else if(prop===_DashConstants2.default.SERVICE_DESCRIPTION_SCOPE){schemeIdUri=sd[prop].schemeIdUri;}else if(prop===_DashConstants2.default.SERVICE_DESCRIPTION_LATENCY){latency={target:sd[prop].target,max:sd[prop].max,min:sd[prop].min};}else if(prop===_DashConstants2.default.SERVICE_DESCRIPTION_PLAYBACK_RATE){playbackRate={max:sd[prop].max,min:sd[prop].min};}}}// we have a ServiceDescription for low latency. Add it if it really has parameters defined\\nif(schemeIdUri===_Constants2.default.SERVICE_DESCRIPTION_LL_SCHEME&&(latency||playbackRate)){serviceDescriptions.push({id:id,schemeIdUri:schemeIdUri,latency:latency,playbackRate:playbackRate});}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}}return serviceDescriptions;}function getSupplementalPropperties(adaptation){var supplementalProperties={};if(adaptation&&adaptation.hasOwnProperty(_DashConstants2.default.SUPPLEMENTAL_PROPERTY)){var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=adaptation.SupplementalProperty_asArray[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var sp=_step2.value;if(sp.hasOwnProperty(_Constants2.default.SCHEME_ID_URI)&&sp.hasOwnProperty(_DashConstants2.default.VALUE)){supplementalProperties[sp[_Constants2.default.SCHEME_ID_URI]]=sp[_DashConstants2.default.VALUE];}}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return();}}finally{if(_didIteratorError2){throw _iteratorError2;}}}}return supplementalProperties;}function setConfig(config){if(!config)return;if(config.errHandler){errHandler=config.errHandler;}if(config.BASE64){BASE64=config.BASE64;}}instance={getIsTypeOf:getIsTypeOf,getIsTextTrack:getIsTextTrack,getLanguageForAdaptation:getLanguageForAdaptation,getViewpointForAdaptation:getViewpointForAdaptation,getRolesForAdaptation:getRolesForAdaptation,getAccessibilityForAdaptation:getAccessibilityForAdaptation,getAudioChannelConfigurationForAdaptation:getAudioChannelConfigurationForAdaptation,getAudioChannelConfigurationForRepresentation:getAudioChannelConfigurationForRepresentation,getAdaptationForIndex:getAdaptationForIndex,getIndexForAdaptation:getIndexForAdaptation,getAdaptationForId:getAdaptationForId,getAdaptationsForType:getAdaptationsForType,getRealPeriods:getRealPeriods,getRealPeriodForIndex:getRealPeriodForIndex,getCodec:getCodec,getMimeType:getMimeType,getKID:getKID,getLabelsForAdaptation:getLabelsForAdaptation,getContentProtectionData:getContentProtectionData,getIsDynamic:getIsDynamic,getId:getId,hasProfile:hasProfile,getDuration:getDuration,getBandwidth:getBandwidth,getManifestUpdatePeriod:getManifestUpdatePeriod,getPublishTime:getPublishTime,getRepresentationCount:getRepresentationCount,getBitrateListForAdaptation:getBitrateListForAdaptation,getRepresentationFor:getRepresentationFor,getRepresentationsForAdaptation:getRepresentationsForAdaptation,getAdaptationsForPeriod:getAdaptationsForPeriod,getRegularPeriods:getRegularPeriods,getMpd:getMpd,getEventsForPeriod:getEventsForPeriod,getEssentialPropertiesForRepresentation:getEssentialPropertiesForRepresentation,getEventStreamForAdaptationSet:getEventStreamForAdaptationSet,getEventStreamForRepresentation:getEventStreamForRepresentation,getUTCTimingSources:getUTCTimingSources,getBaseURLsFromElement:getBaseURLsFromElement,getRepresentationSortFunction:getRepresentationSortFunction,getLocation:getLocation,getPatchLocation:getPatchLocation,getSuggestedPresentationDelay:getSuggestedPresentationDelay,getAvailabilityStartTime:getAvailabilityStartTime,getServiceDescriptions:getServiceDescriptions,getSupplementalPropperties:getSupplementalPropperties,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashManifestModel.__dashjs_factory_name='DashManifestModel';exports.default=_FactoryMaker2.default.getSingletonFactory(DashManifestModel);\\n//# sourceMappingURL=DashManifestModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js?\")},\"../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SimpleXPath=__webpack_require__(/*! ../vo/SimpleXPath */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js\\\");var _SimpleXPath2=_interopRequireDefault(_SimpleXPath);var _PatchOperation=__webpack_require__(/*! ../vo/PatchOperation */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js\\\");var _PatchOperation2=_interopRequireDefault(_PatchOperation);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PatchManifestModel(){var instance=void 0,logger=void 0;var context=this.context;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getIsPatch(patch){return patch&&patch.hasOwnProperty(_DashConstants2.default.ORIGINAL_MPD_ID)||false;}function getPublishTime(patch){return patch&&patch.hasOwnProperty(_DashConstants2.default.PUBLISH_TIME)?new Date(patch[_DashConstants2.default.PUBLISH_TIME]):null;}function getOriginalPublishTime(patch){return patch&&patch.hasOwnProperty(_DashConstants2.default.ORIGINAL_PUBLISH_TIME)?new Date(patch[_DashConstants2.default.ORIGINAL_PUBLISH_TIME]):null;}function getMpdId(patch){return patch&&patch[_DashConstants2.default.ORIGINAL_MPD_ID]||null;}function getPatchOperations(patch){if(!patch){return[];}// Go through the patch operations in order and parse their actions out for usage\\nreturn(patch.__children||[]).map(function(nodeContainer){var action=Object.keys(nodeContainer)[0];// we only look add add/remove/replace actions\\nif(action!=='add'&&action!=='remove'&&action!=='replace'){logger.warn('Ignoring node of invalid action: '+action);return null;}var node=nodeContainer[action];var selector=node.sel;// add action can have special targeting via the 'type' attribute\\nif(action==='add'&&node.type){if(!node.type.startsWith('@')){logger.warn('Ignoring add action for prefixed namespace declaration: '+node.type+'='+node.__text);return null;}// for our purposes adding/replacing attribute are equivalent and we can normalize\\n// our processing logic by appending the attribute to the selector path\\nselector=selector+'/'+node.type;}var xpath=new _SimpleXPath2.default(selector);if(!xpath.isValid()){logger.warn('Ignoring action with invalid selector: '+action+' - '+selector);return null;}var value=null;if(xpath.findsAttribute()){value=node.__text||'';}else if(action!=='remove'){value=node.__children.reduce(function(groups,child){// note that this is informed by xml2js parse structure for the __children array\\n// which will be something like this for each child:\\n// {\\n//     \\\"<node-name>\\\": { <xml2js-node-object> }\\n// }\\nvar key=Object.keys(child)[0];// we also ignore\\nif(key!=='#text'){groups[key]=groups[key]||[];groups[key].push(child[key]);}return groups;},{});}var operation=new _PatchOperation2.default(action,xpath,value);if(action==='add'){operation.position=node.pos;}return operation;}).filter(function(operation){return!!operation;});}instance={getIsPatch:getIsPatch,getPublishTime:getPublishTime,getOriginalPublishTime:getOriginalPublishTime,getMpdId:getMpdId,getPatchOperations:getPatchOperations};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */PatchManifestModel.__dashjs_factory_name='PatchManifestModel';exports.default=_FactoryMaker2.default.getSingletonFactory(PatchManifestModel);\\n//# sourceMappingURL=PatchManifestModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/models/PatchManifestModel.js?\")},\"../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _objectiron=__webpack_require__(/*! ./objectiron */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js\\\");var _objectiron2=_interopRequireDefault(_objectiron);var _xml2json=__webpack_require__(/*! ../../../externals/xml2json */ \\\"../node_modules/dashjs/build/es5/externals/xml2json.js\\\");var _xml2json2=_interopRequireDefault(_xml2json);var _StringMatcher=__webpack_require__(/*! ./matchers/StringMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js\\\");var _StringMatcher2=_interopRequireDefault(_StringMatcher);var _DurationMatcher=__webpack_require__(/*! ./matchers/DurationMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js\\\");var _DurationMatcher2=_interopRequireDefault(_DurationMatcher);var _DateTimeMatcher=__webpack_require__(/*! ./matchers/DateTimeMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js\\\");var _DateTimeMatcher2=_interopRequireDefault(_DateTimeMatcher);var _NumericMatcher=__webpack_require__(/*! ./matchers/NumericMatcher */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js\\\");var _NumericMatcher2=_interopRequireDefault(_NumericMatcher);var _RepresentationBaseValuesMap=__webpack_require__(/*! ./maps/RepresentationBaseValuesMap */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js\\\");var _RepresentationBaseValuesMap2=_interopRequireDefault(_RepresentationBaseValuesMap);var _SegmentValuesMap=__webpack_require__(/*! ./maps/SegmentValuesMap */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js\\\");var _SegmentValuesMap2=_interopRequireDefault(_SegmentValuesMap);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DashParser(config){config=config||{};var context=this.context;var debug=config.debug;var instance=void 0,logger=void 0,matchers=void 0,converter=void 0,objectIron=void 0;function setup(){logger=debug.getLogger(instance);matchers=[new _DurationMatcher2.default(),new _DateTimeMatcher2.default(),new _NumericMatcher2.default(),new _StringMatcher2.default()// last in list to take precedence over NumericMatcher\\n];converter=new _xml2json2.default({escapeMode:false,attributePrefix:'',arrayAccessForm:'property',emptyNodeForm:'object',stripWhitespaces:false,enableToStringFunc:true,ignoreRoot:false,matchers:matchers});objectIron=(0,_objectiron2.default)(context).create({adaptationset:new _RepresentationBaseValuesMap2.default(),period:new _SegmentValuesMap2.default()});}function getMatchers(){return matchers;}function getIron(){return objectIron;}function parse(data){var manifest=void 0;var startTime=window.performance.now();manifest=converter.xml_str2json(data);if(!manifest){throw new Error('parsing the manifest failed');}var jsonTime=window.performance.now();// handle full MPD and Patch ironing separately\\nif(manifest.Patch){manifest=manifest.Patch;// drop root reference\\n// apply iron to patch operations individually\\nif(manifest.add_asArray){manifest.add_asArray.forEach(function(operand){return objectIron.run(operand);});}if(manifest.replace_asArray){manifest.replace_asArray.forEach(function(operand){return objectIron.run(operand);});}// note that we don't need to iron remove as they contain no children\\n}else{manifest=manifest.MPD;// drop root reference\\nobjectIron.run(manifest);}var ironedTime=window.performance.now();logger.info('Parsing complete: ( xml2json: '+(jsonTime-startTime).toPrecision(3)+'ms, objectiron: '+(ironedTime-jsonTime).toPrecision(3)+'ms, total: '+((ironedTime-startTime)/1000).toPrecision(3)+'s)');manifest.protocol='DASH';return manifest;}instance={parse:parse,getMatchers:getMatchers,getIron:getIron};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DashParser.__dashjs_factory_name='DashParser';exports.default=_FactoryMaker2.default.getClassFactory(DashParser);\\n//# sourceMappingURL=DashParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js?\")},\"../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\"value\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a property belonging to a MapNode\\n * @ignore\\n */var CommonProperty=function(){function CommonProperty(name){_classCallCheck(this,CommonProperty);var getDefaultMergeForName=function getDefaultMergeForName(n){return n&&n.length&&n.charAt(0)===n.charAt(0).toUpperCase();};this._name=name;this._merge=getDefaultMergeForName(name);}_createClass(CommonProperty,[{key:\"name\",get:function get(){return this._name;}},{key:\"merge\",get:function get(){return this._merge;}}]);return CommonProperty;}();exports.default=CommonProperty;\\n//# sourceMappingURL=CommonProperty.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a node at some level in a ValueMap\\n */var _CommonProperty=__webpack_require__(/*! ./CommonProperty */ \\\"../node_modules/dashjs/build/es5/src/dash/parser/maps/CommonProperty.js\\\");var _CommonProperty2=_interopRequireDefault(_CommonProperty);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}var MapNode=function(){function MapNode(name,properties,children){var _this=this;_classCallCheck(this,MapNode);this._name=name||'';this._properties=[];this._children=children||[];if(Array.isArray(properties)){properties.forEach(function(p){_this._properties.push(new _CommonProperty2.default(p));});}}_createClass(MapNode,[{key:'name',get:function get(){return this._name;}},{key:'children',get:function get(){return this._children;}},{key:'properties',get:function get(){return this._properties;}}]);return MapNode;}();exports.default=MapNode;\\n//# sourceMappingURL=MapNode.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js?\")},\"../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _MapNode2=__webpack_require__(/*! ./MapNode */ \"../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js\");var _MapNode3=_interopRequireDefault(_MapNode2);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a RepresentationBaseValuesMap type for input to objectiron\\n */var RepresentationBaseValuesMap=function(_MapNode){_inherits(RepresentationBaseValuesMap,_MapNode);function RepresentationBaseValuesMap(){_classCallCheck(this,RepresentationBaseValuesMap);var commonProperties=[_DashConstants2.default.PROFILES,_DashConstants2.default.WIDTH,_DashConstants2.default.HEIGHT,_DashConstants2.default.SAR,_DashConstants2.default.FRAMERATE,_DashConstants2.default.AUDIO_SAMPLING_RATE,_DashConstants2.default.MIME_TYPE,_DashConstants2.default.SEGMENT_PROFILES,_DashConstants2.default.CODECS,_DashConstants2.default.MAXIMUM_SAP_PERIOD,_DashConstants2.default.START_WITH_SAP,_DashConstants2.default.MAX_PLAYOUT_RATE,_DashConstants2.default.CODING_DEPENDENCY,_DashConstants2.default.SCAN_TYPE,_DashConstants2.default.FRAME_PACKING,_DashConstants2.default.AUDIO_CHANNEL_CONFIGURATION,_DashConstants2.default.CONTENT_PROTECTION,_DashConstants2.default.ESSENTIAL_PROPERTY,_DashConstants2.default.SUPPLEMENTAL_PROPERTY,_DashConstants2.default.INBAND_EVENT_STREAM];return _possibleConstructorReturn(this,(RepresentationBaseValuesMap.__proto__||Object.getPrototypeOf(RepresentationBaseValuesMap)).call(this,_DashConstants2.default.ADAPTATION_SET,commonProperties,[new _MapNode3.default(_DashConstants2.default.REPRESENTATION,commonProperties,[new _MapNode3.default(_DashConstants2.default.SUB_REPRESENTATION,commonProperties)])]));}return RepresentationBaseValuesMap;}(_MapNode3.default);exports.default=RepresentationBaseValuesMap;\\n//# sourceMappingURL=RepresentationBaseValuesMap.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/RepresentationBaseValuesMap.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _MapNode2=__webpack_require__(/*! ./MapNode */ \"../node_modules/dashjs/build/es5/src/dash/parser/maps/MapNode.js\");var _MapNode3=_interopRequireDefault(_MapNode2);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a SegmentValuesMap type for input to objectiron\\n */var SegmentValuesMap=function(_MapNode){_inherits(SegmentValuesMap,_MapNode);function SegmentValuesMap(){_classCallCheck(this,SegmentValuesMap);var commonProperties=[_DashConstants2.default.SEGMENT_BASE,_DashConstants2.default.SEGMENT_TEMPLATE,_DashConstants2.default.SEGMENT_LIST];return _possibleConstructorReturn(this,(SegmentValuesMap.__proto__||Object.getPrototypeOf(SegmentValuesMap)).call(this,_DashConstants2.default.PERIOD,commonProperties,[new _MapNode3.default(_DashConstants2.default.ADAPTATION_SET,commonProperties,[new _MapNode3.default(_DashConstants2.default.REPRESENTATION,commonProperties)])]));}return SegmentValuesMap;}(_MapNode3.default);exports.default=SegmentValuesMap;\\n//# sourceMappingURL=SegmentValuesMap.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/maps/SegmentValuesMap.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\"value\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a base type for matching and converting types in manifest to\\n * something more useful\\n * @ignore\\n */var BaseMatcher=function(){function BaseMatcher(test,converter){_classCallCheck(this,BaseMatcher);this._test=test;this._converter=converter;}_createClass(BaseMatcher,[{key:\"test\",get:function get(){return this._test;}},{key:\"converter\",get:function get(){return this._converter;}}]);return BaseMatcher;}();exports.default=BaseMatcher;\\n//# sourceMappingURL=BaseMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc matches and converts xs:datetime to Date\\n */var SECONDS_IN_MIN=60;var MINUTES_IN_HOUR=60;var MILLISECONDS_IN_SECONDS=1000;var datetimeRegex=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\\\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/;var DateTimeMatcher=function(_BaseMatcher){_inherits(DateTimeMatcher,_BaseMatcher);function DateTimeMatcher(){_classCallCheck(this,DateTimeMatcher);return _possibleConstructorReturn(this,(DateTimeMatcher.__proto__||Object.getPrototypeOf(DateTimeMatcher)).call(this,function(attr){return datetimeRegex.test(attr.value);},function(str){var match=datetimeRegex.exec(str);var utcDate=void 0;// If the string does not contain a timezone offset different browsers can interpret it either\\n// as UTC or as a local time so we have to parse the string manually to normalize the given date value for\\n// all browsers\\nutcDate=Date.UTC(parseInt(match[1],10),parseInt(match[2],10)-1,// months start from zero\\nparseInt(match[3],10),parseInt(match[4],10),parseInt(match[5],10),match[6]&&parseInt(match[6],10)||0,match[7]&&parseFloat(match[7])*MILLISECONDS_IN_SECONDS||0);// If the date has timezone offset take it into account as well\\nif(match[9]&&match[10]){var timezoneOffset=parseInt(match[9],10)*MINUTES_IN_HOUR+parseInt(match[10],10);utcDate+=(match[8]===\\'+\\'?-1:+1)*timezoneOffset*SECONDS_IN_MIN*MILLISECONDS_IN_SECONDS;}return new Date(utcDate);}));}return DateTimeMatcher;}(_BaseMatcher3.default);exports.default=DateTimeMatcher;\\n//# sourceMappingURL=DateTimeMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/DateTimeMatcher.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);var _Constants=__webpack_require__(/*! ../../../streaming/constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc matches and converts xs:duration to seconds\\n */var durationRegex=/^([-])?P(([\\\\d.]*)Y)?(([\\\\d.]*)M)?(([\\\\d.]*)D)?T?(([\\\\d.]*)H)?(([\\\\d.]*)M)?(([\\\\d.]*)S)?/;var SECONDS_IN_YEAR=365*24*60*60;var SECONDS_IN_MONTH=30*24*60*60;var SECONDS_IN_DAY=24*60*60;var SECONDS_IN_HOUR=60*60;var SECONDS_IN_MIN=60;var DurationMatcher=function(_BaseMatcher){_inherits(DurationMatcher,_BaseMatcher);function DurationMatcher(){_classCallCheck(this,DurationMatcher);return _possibleConstructorReturn(this,(DurationMatcher.__proto__||Object.getPrototypeOf(DurationMatcher)).call(this,function(attr){var attributeList=[_DashConstants2.default.MIN_BUFFER_TIME,_DashConstants2.default.MEDIA_PRESENTATION_DURATION,_DashConstants2.default.MINIMUM_UPDATE_PERIOD,_DashConstants2.default.TIMESHIFT_BUFFER_DEPTH,_DashConstants2.default.MAX_SEGMENT_DURATION,_DashConstants2.default.MAX_SUBSEGMENT_DURATION,_DashConstants2.default.SUGGESTED_PRESENTATION_DELAY,_DashConstants2.default.START,_Constants2.default.START_TIME,_DashConstants2.default.DURATION];var len=attributeList.length;for(var i=0;i<len;i++){if(attr.nodeName===attributeList[i]){return durationRegex.test(attr.value);}}return false;},function(str){//str = \"P10Y10M10DT10H10M10.1S\";\\nvar match=durationRegex.exec(str);var result=parseFloat(match[3]||0)*SECONDS_IN_YEAR+parseFloat(match[5]||0)*SECONDS_IN_MONTH+parseFloat(match[7]||0)*SECONDS_IN_DAY+parseFloat(match[9]||0)*SECONDS_IN_HOUR+parseFloat(match[11]||0)*SECONDS_IN_MIN+parseFloat(match[13]||0);if(match[1]!==undefined){result=-result;}return result;}));}return DurationMatcher;}(_BaseMatcher3.default);exports.default=DurationMatcher;\\n//# sourceMappingURL=DurationMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/DurationMatcher.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Matches and converts xs:numeric to float\\n */var numericRegex=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/;var NumericMatcher=function(_BaseMatcher){_inherits(NumericMatcher,_BaseMatcher);function NumericMatcher(){_classCallCheck(this,NumericMatcher);return _possibleConstructorReturn(this,(NumericMatcher.__proto__||Object.getPrototypeOf(NumericMatcher)).call(this,function(attr){return numericRegex.test(attr.value);},function(str){return parseFloat(str);}));}return NumericMatcher;}(_BaseMatcher3.default);exports.default=NumericMatcher;\\n//# sourceMappingURL=NumericMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/NumericMatcher.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _BaseMatcher2=__webpack_require__(/*! ./BaseMatcher */ \"../node_modules/dashjs/build/es5/src/dash/parser/matchers/BaseMatcher.js\");var _BaseMatcher3=_interopRequireDefault(_BaseMatcher2);var _DashConstants=__webpack_require__(/*! ../../constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Matches and converts xs:string to string, but only for specific attributes on specific nodes\\n */var StringMatcher=function(_BaseMatcher){_inherits(StringMatcher,_BaseMatcher);function StringMatcher(){_classCallCheck(this,StringMatcher);return _possibleConstructorReturn(this,(StringMatcher.__proto__||Object.getPrototypeOf(StringMatcher)).call(this,function(attr,nodeName){var _stringAttrsInElement;var stringAttrsInElements=(_stringAttrsInElement={},_defineProperty(_stringAttrsInElement,_DashConstants2.default.MPD,[_DashConstants2.default.ID,_DashConstants2.default.PROFILES]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.PERIOD,[_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.BASE_URL,[_DashConstants2.default.SERVICE_LOCATION,_DashConstants2.default.BYTE_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_BASE,[_DashConstants2.default.INDEX_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.INITIALIZATION,[_DashConstants2.default.RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.REPRESENTATION_INDEX,[_DashConstants2.default.RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_LIST,[_DashConstants2.default.INDEX_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.BITSTREAM_SWITCHING,[_DashConstants2.default.RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_URL,[_DashConstants2.default.MEDIA_RANGE,_DashConstants2.default.INDEX_RANGE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SEGMENT_TEMPLATE,[_DashConstants2.default.INDEX_RANGE,_DashConstants2.default.MEDIA,_DashConstants2.default.INDEX,_DashConstants2.default.INITIALIZATION_MINUS,_DashConstants2.default.BITSTREAM_SWITCHING_MINUS]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ASSET_IDENTIFIER,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.EVENT_STREAM,[_DashConstants2.default.VALUE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ADAPTATION_SET,[_DashConstants2.default.PROFILES,_DashConstants2.default.MIME_TYPE,_DashConstants2.default.SEGMENT_PROFILES,_DashConstants2.default.CODECS,_DashConstants2.default.CONTENT_TYPE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.FRAME_PACKING,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.AUDIO_CHANNEL_CONFIGURATION,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.CONTENT_PROTECTION,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ESSENTIAL_PROPERTY,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SUPPLEMENTAL_PROPERTY,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.INBAND_EVENT_STREAM,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ACCESSIBILITY,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.ROLE,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.RATING,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.VIEWPOINT,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.CONTENT_COMPONENT,[_DashConstants2.default.CONTENT_TYPE]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.REPRESENTATION,[_DashConstants2.default.ID,_DashConstants2.default.DEPENDENCY_ID,_DashConstants2.default.MEDIA_STREAM_STRUCTURE_ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.SUBSET,[_DashConstants2.default.ID]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.METRICS,[_DashConstants2.default.METRICS_MINUS]),_defineProperty(_stringAttrsInElement,_DashConstants2.default.REPORTING,[_DashConstants2.default.VALUE,_DashConstants2.default.ID]),_stringAttrsInElement);if(stringAttrsInElements.hasOwnProperty(nodeName)){var attrNames=stringAttrsInElements[nodeName];if(attrNames!==undefined){return attrNames.indexOf(attr.name)>=0;}else{return false;}}return false;},function(str){return String(str);}));}return StringMatcher;}(_BaseMatcher3.default);exports.default=StringMatcher;\\n//# sourceMappingURL=StringMatcher.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/matchers/StringMatcher.js?')},\"../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ObjectIron(mappers){function mergeValues(parentItem,childItem){for(var name in parentItem){if(!childItem.hasOwnProperty(name)){childItem[name]=parentItem[name];}}}function mapProperties(properties,parent,child){for(var i=0,len=properties.length;i<len;++i){var property=properties[i];if(parent[property.name]){if(child[property.name]){// check to see if we should merge\\nif(property.merge){var parentValue=parent[property.name];var childValue=child[property.name];// complex objects; merge properties\\nif((typeof parentValue==='undefined'?'undefined':_typeof(parentValue))==='object'&&(typeof childValue==='undefined'?'undefined':_typeof(childValue))==='object'){mergeValues(parentValue,childValue);}// simple objects; merge them together\\nelse{child[property.name]=parentValue+childValue;}}}else{// just add the property\\nchild[property.name]=parent[property.name];}}}}function mapItem(item,node){for(var i=0,len=item.children.length;i<len;++i){var childItem=item.children[i];var array=node[childItem.name+'_asArray'];if(array){for(var v=0,len2=array.length;v<len2;++v){var childNode=array[v];mapProperties(item.properties,node,childNode);mapItem(childItem,childNode);}}}}function run(source){if(source===null||(typeof source==='undefined'?'undefined':_typeof(source))!=='object'){return source;}if(source.Period_asArray&&'period'in mappers){var periodMapper=mappers.period;var periods=source.Period_asArray;for(var i=0,len=periods.length;i<len;++i){var period=periods[i];mapItem(periodMapper,period);if('adaptationset'in mappers){var adaptationSets=period.AdaptationSet_asArray;if(adaptationSets){var adaptationSetMapper=mappers.adaptationset;for(var _i=0,_len=adaptationSets.length;_i<_len;++_i){mapItem(adaptationSetMapper,adaptationSets[_i]);}}}}}return source;}return{run:run};}ObjectIron.__dashjs_factory_name='ObjectIron';var factory=_FactoryMaker2.default.getClassFactory(ObjectIron);exports.default=factory;\\n//# sourceMappingURL=objectiron.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/parser/objectiron.js?\")},\"../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _SegmentsUtils=__webpack_require__(/*! ./SegmentsUtils */ \"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ListSegmentsGetter(config,isDynamic){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty(\\'calcPeriodRelativeTimeFromMpdRelativeTime\\')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSegmentByIndex(representation,index){checkConfig();if(!representation){return null;}var list=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;var len=list.SegmentURL_asArray.length;var startNumber=representation&&!isNaN(representation.startNumber)?representation.startNumber:1;var offsetToSubtract=Math.max(startNumber-1,0);var relativeIndex=Math.max(index-offsetToSubtract,0);var segment=null;if(relativeIndex<len){var s=list.SegmentURL_asArray[relativeIndex];segment=(0,_SegmentsUtils.getIndexBasedSegment)(timelineConverter,isDynamic,representation,index);if(segment){segment.replacementTime=(startNumber+index-1)*representation.segmentDuration;segment.media=s.media?s.media:\\'\\';segment.mediaRange=s.mediaRange;segment.index=index;segment.indexRange=s.indexRange;}}representation.availableSegmentsNumber=len;return segment;}function getSegmentByTime(representation,requestedTime){checkConfig();if(!representation){return null;}var duration=representation.segmentDuration;if(isNaN(duration)){return null;}var periodTime=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,requestedTime);var index=Math.floor(periodTime/duration);return getSegmentByIndex(representation,index);}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ListSegmentsGetter.__dashjs_factory_name=\\'ListSegmentsGetter\\';var factory=_FactoryMaker2.default.getClassFactory(ListSegmentsGetter);exports.default=factory;\\n//# sourceMappingURL=ListSegmentsGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/ListSegmentsGetter.js?')},\"../node_modules/dashjs/build/es5/src/dash/utils/Round10.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Static methods for rounding decimals\\n *\\n * Modified version of the CC0-licenced example at:\\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\\n *\\n * @export\\n * @class Round10\\n * @ignore\\n */var Round10=function(){function Round10(){_classCallCheck(this,Round10);}_createClass(Round10,null,[{key:'round10',/**\\n    * Decimal round.\\n    *\\n    * @param {Number}  value The number.\\n    * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).\\n    * @returns {Number} The adjusted value.\\n    * @ignore\\n    */value:function round10(value,exp){return _decimalAdjust('round',value,exp);}}]);return Round10;}();/**\\n * Decimal adjustment of a number.\\n *\\n * @param {String}  type  The type of adjustment.\\n * @param {Number}  value The number.\\n * @param {Integer} exp   The exponent (the 10 logarithm of the adjustment base).\\n * @returns {Number} The adjusted value.\\n * @ignore\\n */exports.default=Round10;function _decimalAdjust(type,value,exp){// If the exp is undefined or zero...\\nif(typeof exp==='undefined'||+exp===0){return Math[type](value);}value=+value;exp=+exp;// If the value is not a number or the exp is not an integer...\\nif(value===null||isNaN(value)||!(typeof exp==='number'&&exp%1===0)){return NaN;}// Shift\\nvalue=value.toString().split('e');value=Math[type](+(value[0]+'e'+(value[1]?+value[1]-exp:-exp)));// Shift back\\nvalue=value.toString().split('e');return+(value[0]+'e'+(value[1]?+value[1]+exp:exp));}\\n//# sourceMappingURL=Round10.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/Round10.js?\")},\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function SegmentBaseGetter(config){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty(\\'calcPeriodRelativeTimeFromMpdRelativeTime\\')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSegmentByIndex(representation,index){checkConfig();if(!representation){return null;}var len=representation.segments?representation.segments.length:-1;var seg=void 0;if(index<len){seg=representation.segments[index];if(seg&&seg.availabilityIdx===index){return seg;}}for(var i=0;i<len;i++){seg=representation.segments[i];if(seg&&seg.availabilityIdx===index){return seg;}}return null;}function getSegmentByTime(representation,requestedTime){checkConfig();var index=getIndexByTime(representation,requestedTime);return getSegmentByIndex(representation,index);}function getIndexByTime(representation,time){if(!representation){return-1;}var segments=representation.segments;var ln=segments?segments.length:null;var idx=-1;var epsilon=void 0,frag=void 0,ft=void 0,fd=void 0,i=void 0;if(segments&&ln>0){for(i=0;i<ln;i++){frag=segments[i];ft=frag.presentationStartTime;fd=frag.duration;epsilon=fd/2;if(time+epsilon>=ft&&time-epsilon<ft+fd){idx=frag.availabilityIdx;break;}}}return idx;}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}SegmentBaseGetter.__dashjs_factory_name=\\'SegmentBaseGetter\\';var factory=_FactoryMaker2.default.getClassFactory(SegmentBaseGetter);exports.default=factory;\\n//# sourceMappingURL=SegmentBaseGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/SegmentBaseGetter.js?')},\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.unescapeDollarsInTemplate=unescapeDollarsInTemplate;exports.replaceIDForTemplate=replaceIDForTemplate;exports.replaceTokenForTemplate=replaceTokenForTemplate;exports.getIndexBasedSegment=getIndexBasedSegment;exports.getTimeBasedSegment=getTimeBasedSegment;var _Segment=__webpack_require__(/*! ./../vo/Segment */ \\\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\\\");var _Segment2=_interopRequireDefault(_Segment);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function zeroPadToLength(numStr,minStrLength){while(numStr.length<minStrLength){numStr='0'+numStr;}return numStr;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function getNumberForSegment(segment,segmentIndex){return segment.representation.startNumber+segmentIndex;}function unescapeDollarsInTemplate(url){return url?url.split('$$').join('$'):url;}function replaceIDForTemplate(url,value){if(!value||!url||url.indexOf('$RepresentationID$')===-1){return url;}var v=value.toString();return url.split('$RepresentationID$').join(v);}function replaceTokenForTemplate(url,token,value){var formatTag='%0';var startPos=void 0,endPos=void 0,formatTagPos=void 0,specifier=void 0,width=void 0,paddedValue=void 0;var tokenLen=token.length;var formatTagLen=formatTag.length;if(!url){return url;}// keep looping round until all instances of <token> have been\\n// replaced. once that has happened, startPos below will be -1\\n// and the completed url will be returned.\\nwhile(true){// check if there is a valid $<token>...$ identifier\\n// if not, return the url as is.\\nstartPos=url.indexOf('$'+token);if(startPos<0){return url;}// the next '$' must be the end of the identifier\\n// if there isn't one, return the url as is.\\nendPos=url.indexOf('$',startPos+tokenLen);if(endPos<0){return url;}// now see if there is an additional format tag suffixed to\\n// the identifier within the enclosing '$' characters\\nformatTagPos=url.indexOf(formatTag,startPos+tokenLen);if(formatTagPos>startPos&&formatTagPos<endPos){specifier=url.charAt(endPos-1);width=parseInt(url.substring(formatTagPos+formatTagLen,endPos-1),10);// support the minimum specifiers required by IEEE 1003.1\\n// (d, i , o, u, x, and X) for completeness\\nswitch(specifier){// treat all int types as uint,\\n// hence deliberate fallthrough\\ncase'd':case'i':case'u':paddedValue=zeroPadToLength(value.toString(),width);break;case'x':paddedValue=zeroPadToLength(value.toString(16),width);break;case'X':paddedValue=zeroPadToLength(value.toString(16),width).toUpperCase();break;case'o':paddedValue=zeroPadToLength(value.toString(8),width);break;default:return url;}}else{paddedValue=value;}url=url.substring(0,startPos)+paddedValue+url.substring(endPos+1);}}function getSegment(representation,duration,presentationStartTime,mediaStartTime,availabilityStartTime,timelineConverter,presentationEndTime,isDynamic,index){var seg=new _Segment2.default();seg.representation=representation;seg.duration=duration;seg.presentationStartTime=presentationStartTime;seg.mediaStartTime=mediaStartTime;seg.availabilityStartTime=availabilityStartTime;seg.availabilityEndTime=timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime,representation.adaptation.period.mpd,isDynamic);seg.wallStartTime=timelineConverter.calcWallTimeForSegment(seg,isDynamic);seg.replacementNumber=getNumberForSegment(seg,index);seg.availabilityIdx=index;return seg;}function isSegmentAvailable(timelineConverter,representation,segment,isDynamic){var periodEnd=timelineConverter.getPeriodEnd(representation,isDynamic);var periodRelativeEnd=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,periodEnd);var segmentTime=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,segment.presentationStartTime);if(segmentTime>=periodRelativeEnd){if(isDynamic){// segment is not available in current period, but it may be segment available in another period that current one (in DVR window)\\n// if not (time > segmentAvailabilityRange.end), then return false\\nif(representation.segmentAvailabilityRange&&segment.presentationStartTime>=representation.segmentAvailabilityRange.end){return false;}}else{return false;}}return true;}function getIndexBasedSegment(timelineConverter,isDynamic,representation,index){var duration=void 0,presentationStartTime=void 0,presentationEndTime=void 0;duration=representation.segmentDuration;/*\\n     * From spec - If neither @duration attribute nor SegmentTimeline element is present, then the Representation\\n     * shall contain exactly one Media Segment. The MPD start time is 0 and the MPD duration is obtained\\n     * in the same way as for the last Media Segment in the Representation.\\n     */if(isNaN(duration)){duration=representation.adaptation.period.duration;}presentationStartTime=parseFloat((representation.adaptation.period.start+index*duration).toFixed(5));presentationEndTime=parseFloat((presentationStartTime+duration).toFixed(5));var segment=getSegment(representation,duration,presentationStartTime,timelineConverter.calcMediaTimeFromPresentationTime(presentationStartTime,representation),timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime,representation.adaptation.period.mpd,isDynamic),timelineConverter,presentationEndTime,isDynamic,index);if(!isSegmentAvailable(timelineConverter,representation,segment,isDynamic)){return null;}return segment;}function getTimeBasedSegment(timelineConverter,isDynamic,representation,time,duration,fTimescale,url,range,index,tManifest){var scaledTime=time/fTimescale;var scaledDuration=Math.min(duration/fTimescale,representation.adaptation.period.mpd.maxSegmentDuration);var presentationStartTime=void 0,presentationEndTime=void 0,seg=void 0;presentationStartTime=timelineConverter.calcPresentationTimeFromMediaTime(scaledTime,representation);presentationEndTime=presentationStartTime+scaledDuration;seg=getSegment(representation,scaledDuration,presentationStartTime,scaledTime,representation.adaptation.period.mpd.manifest.loadedTime,timelineConverter,presentationEndTime,isDynamic,index);if(!isSegmentAvailable(timelineConverter,representation,seg,isDynamic)){return null;}seg.replacementTime=tManifest?tManifest:time;url=replaceTokenForTemplate(url,'Number',seg.replacementNumber);url=replaceTokenForTemplate(url,'Time',seg.replacementTime);seg.media=url;seg.mediaRange=range;return seg;}\\n//# sourceMappingURL=SegmentsUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js?\")},\"../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _SegmentsUtils=__webpack_require__(/*! ./SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TemplateSegmentsGetter(config,isDynamic){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('calcPeriodRelativeTimeFromMpdRelativeTime')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSegmentByIndex(representation,index){checkConfig();if(!representation){return null;}var template=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate;index=Math.max(index,0);var seg=(0,_SegmentsUtils.getIndexBasedSegment)(timelineConverter,isDynamic,representation,index);if(seg){seg.replacementTime=Math.round((index-1)*representation.segmentDuration*representation.timescale,10);var url=template.media;url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Number',seg.replacementNumber);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,'Time',seg.replacementTime);seg.media=url;}var duration=representation.segmentDuration;var availabilityWindow=representation.segmentAvailabilityRange;if(isNaN(duration)){representation.availableSegmentsNumber=1;}else{representation.availableSegmentsNumber=Math.ceil((availabilityWindow.end-availabilityWindow.start)/duration);}return seg;}function getSegmentByTime(representation,requestedTime){checkConfig();if(!representation){return null;}var duration=representation.segmentDuration;if(isNaN(duration)){return null;}var periodTime=timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation,requestedTime);var index=Math.floor(periodTime/duration);return getSegmentByIndex(representation,index);}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TemplateSegmentsGetter.__dashjs_factory_name='TemplateSegmentsGetter';var factory=_FactoryMaker2.default.getClassFactory(TemplateSegmentsGetter);exports.default=factory;\\n//# sourceMappingURL=TemplateSegmentsGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/TemplateSegmentsGetter.js?\")},\"../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _DashManifestModel=__webpack_require__(/*! ../models/DashManifestModel */ \"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\");var _DashManifestModel2=_interopRequireDefault(_DashManifestModel);var _Settings=__webpack_require__(/*! ../../core/Settings */ \"../node_modules/dashjs/build/es5/src/core/Settings.js\");var _Settings2=_interopRequireDefault(_Settings);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function TimelineConverter(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();var instance=void 0,dashManifestModel=void 0,clientServerTimeShift=void 0,isClientServerTimeSyncCompleted=void 0,expectedLiveEdge=void 0;function setup(){dashManifestModel=(0,_DashManifestModel2.default)(context).getInstance();reset();}function initialize(){resetInitialSettings();eventBus.on(_Events2.default.UPDATE_TIME_SYNC_OFFSET,_onUpdateTimeSyncOffset,this);}function getClientTimeOffset(){return clientServerTimeShift;}function setClientTimeOffset(value){clientServerTimeShift=value;}function getExpectedLiveEdge(){return expectedLiveEdge;}function setExpectedLiveEdge(value){expectedLiveEdge=value;}function calcAvailabilityTimeFromPresentationTime(presentationTime,mpd,isDynamic,calculateEnd){var availabilityTime=NaN;if(calculateEnd){//@timeShiftBufferDepth specifies the duration of the time shifting buffer that is guaranteed\\n// to be available for a Media Presentation with type \\'dynamic\\'.\\n// When not present, the value is infinite.\\nif(isDynamic&&mpd.timeShiftBufferDepth!=Number.POSITIVE_INFINITY){availabilityTime=new Date(mpd.availabilityStartTime.getTime()+(presentationTime+mpd.timeShiftBufferDepth)*1000);}else{availabilityTime=mpd.availabilityEndTime;}}else{if(isDynamic){availabilityTime=new Date(mpd.availabilityStartTime.getTime()+(presentationTime-clientServerTimeShift)*1000);}else{// in static mpd, all segments are available at the same time\\navailabilityTime=mpd.availabilityStartTime;}}return availabilityTime;}function calcAvailabilityStartTimeFromPresentationTime(presentationTime,mpd,isDynamic){return calcAvailabilityTimeFromPresentationTime.call(this,presentationTime,mpd,isDynamic);}function calcAvailabilityEndTimeFromPresentationTime(presentationTime,mpd,isDynamic){return calcAvailabilityTimeFromPresentationTime.call(this,presentationTime,mpd,isDynamic,true);}function calcPresentationTimeFromWallTime(wallTime,period){return(wallTime.getTime()-period.mpd.availabilityStartTime.getTime()+clientServerTimeShift*1000)/1000;}function calcPresentationTimeFromMediaTime(mediaTime,representation){var periodStart=representation.adaptation.period.start;var presentationOffset=representation.presentationTimeOffset;return mediaTime+(periodStart-presentationOffset);}function calcMediaTimeFromPresentationTime(presentationTime,representation){var periodStart=representation.adaptation.period.start;var presentationOffset=representation.presentationTimeOffset;return presentationTime-periodStart+presentationOffset;}function calcWallTimeForSegment(segment,isDynamic){var suggestedPresentationDelay=void 0,displayStartTime=void 0,wallTime=void 0;if(isDynamic){suggestedPresentationDelay=segment.representation.adaptation.period.mpd.suggestedPresentationDelay;displayStartTime=segment.presentationStartTime+suggestedPresentationDelay;wallTime=new Date(segment.availabilityStartTime.getTime()+displayStartTime*1000);}return wallTime;}function calcSegmentAvailabilityRange(voRepresentation,isDynamic){// Static Range Finder\\nvar voPeriod=voRepresentation.adaptation.period;var range={start:voPeriod.start,end:voPeriod.start+voPeriod.duration};if(!isDynamic)return range;if(!isClientServerTimeSyncCompleted&&voRepresentation.segmentAvailabilityRange){return voRepresentation.segmentAvailabilityRange;}// Dynamic Range Finder\\nvar d=voRepresentation.segmentDuration||(voRepresentation.segments&&voRepresentation.segments.length?voRepresentation.segments[voRepresentation.segments.length-1].duration:0);// Specific use case of SegmentTimeline without timeShiftBufferDepth\\nif(voRepresentation.segmentInfoType===_DashConstants2.default.SEGMENT_TIMELINE&&settings.get().streaming.calcSegmentAvailabilityRangeFromTimeline){return calcSegmentAvailabilityRangeFromTimeline(voRepresentation);}var now=calcPresentationTimeFromWallTime(new Date(),voPeriod);var periodEnd=voPeriod.start+voPeriod.duration;range.start=Math.max(now-voPeriod.mpd.timeShiftBufferDepth,voPeriod.start);var endOffset=voRepresentation.availabilityTimeOffset!==undefined&&voRepresentation.availabilityTimeOffset<d?d-voRepresentation.availabilityTimeOffset:d;range.end=now>=periodEnd&&now-endOffset<periodEnd?periodEnd:now-endOffset;return range;}function calcSegmentAvailabilityRangeFromTimeline(voRepresentation){var adaptation=voRepresentation.adaptation.period.mpd.manifest.Period_asArray[voRepresentation.adaptation.period.index].AdaptationSet_asArray[voRepresentation.adaptation.index];var representation=dashManifestModel.getRepresentationFor(voRepresentation.index,adaptation);var timeline=representation.SegmentTemplate.SegmentTimeline;var timescale=representation.SegmentTemplate.timescale;var segments=timeline.S_asArray;var range={start:0,end:0};var d=0;var segment=void 0,repeat=void 0,i=void 0,len=void 0;range.start=calcPresentationTimeFromMediaTime(segments[0].t/timescale,voRepresentation);for(i=0,len=segments.length;i<len;i++){segment=segments[i];repeat=0;if(segment.hasOwnProperty(\\'r\\')){repeat=segment.r;}d+=segment.d/timescale*(1+repeat);}range.end=range.start+d;return range;}function getPeriodEnd(voRepresentation,isDynamic){// Static Range Finder\\nvar voPeriod=voRepresentation.adaptation.period;if(!isDynamic){return voPeriod.start+voPeriod.duration;}if(!isClientServerTimeSyncCompleted&&voRepresentation.segmentAvailabilityRange){return voRepresentation.segmentAvailabilityRange;}// Dynamic Range Finder\\nvar d=voRepresentation.segmentDuration||(voRepresentation.segments&&voRepresentation.segments.length?voRepresentation.segments[voRepresentation.segments.length-1].duration:0);var now=calcPresentationTimeFromWallTime(new Date(),voPeriod);var periodEnd=voPeriod.start+voPeriod.duration;var endOffset=voRepresentation.availabilityTimeOffset!==undefined&&voRepresentation.availabilityTimeOffset<d?d-voRepresentation.availabilityTimeOffset:d;return Math.min(now-endOffset,periodEnd);}function calcPeriodRelativeTimeFromMpdRelativeTime(representation,mpdRelativeTime){var periodStartTime=representation.adaptation.period.start;return mpdRelativeTime-periodStartTime;}/*\\n    * We need to figure out if we want to timesync for segmentTimeine where useCalculatedLiveEdge = true\\n    * seems we figure out client offset based on logic in liveEdgeFinder getLiveEdge timelineConverter.setClientTimeOffset(liveEdge - representationInfo.DVRWindow.end);\\n    * FYI StreamController\\'s onManifestUpdated entry point to timeSync\\n    * */function _onUpdateTimeSyncOffset(e){if(e.offset!==undefined){setClientTimeOffset(e.offset/1000);isClientServerTimeSyncCompleted=true;}}function resetInitialSettings(){clientServerTimeShift=0;isClientServerTimeSyncCompleted=false;expectedLiveEdge=NaN;}function reset(){eventBus.off(_Events2.default.UPDATE_TIME_SYNC_OFFSET,_onUpdateTimeSyncOffset,this);resetInitialSettings();}instance={initialize:initialize,getClientTimeOffset:getClientTimeOffset,setClientTimeOffset:setClientTimeOffset,getExpectedLiveEdge:getExpectedLiveEdge,setExpectedLiveEdge:setExpectedLiveEdge,calcAvailabilityStartTimeFromPresentationTime:calcAvailabilityStartTimeFromPresentationTime,calcAvailabilityEndTimeFromPresentationTime:calcAvailabilityEndTimeFromPresentationTime,calcPresentationTimeFromWallTime:calcPresentationTimeFromWallTime,calcPresentationTimeFromMediaTime:calcPresentationTimeFromMediaTime,calcPeriodRelativeTimeFromMpdRelativeTime:calcPeriodRelativeTimeFromMpdRelativeTime,calcMediaTimeFromPresentationTime:calcMediaTimeFromPresentationTime,calcSegmentAvailabilityRange:calcSegmentAvailabilityRange,getPeriodEnd:getPeriodEnd,calcWallTimeForSegment:calcWallTimeForSegment,reset:reset};setup();return instance;}TimelineConverter.__dashjs_factory_name=\\'TimelineConverter\\';exports.default=_FactoryMaker2.default.getSingletonFactory(TimelineConverter);\\n//# sourceMappingURL=TimelineConverter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js?')},\"../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _SegmentsUtils=__webpack_require__(/*! ./SegmentsUtils */ \\\"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TimelineSegmentsGetter(config,isDynamic){config=config||{};var timelineConverter=config.timelineConverter;var instance=void 0;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty('calcMediaTimeFromPresentationTime')||!timelineConverter.hasOwnProperty('calcSegmentAvailabilityRange')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function iterateSegments(representation,iterFunc){var base=representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate||representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;var timeline=base.SegmentTimeline;var list=base.SegmentURL_asArray;var time=0;var scaledTime=0;var availabilityIdx=-1;var fragments=void 0,frag=void 0,i=void 0,len=void 0,j=void 0,repeat=void 0,repeatEndTime=void 0,nextFrag=void 0,fTimescale=void 0;fTimescale=representation.timescale;fragments=timeline.S_asArray;var breakIterator=false;for(i=0,len=fragments.length;i<len&&!breakIterator;i++){frag=fragments[i];repeat=0;if(frag.hasOwnProperty('r')){repeat=frag.r;}// For a repeated S element, t belongs only to the first segment\\nif(frag.hasOwnProperty('t')){time=frag.t;scaledTime=time/fTimescale;}// This is a special case: \\\"A negative value of the @r attribute of the S element indicates that the duration indicated in @d attribute repeats until the start of the next S element, the end of the Period or until the\\n// next MPD update.\\\"\\nif(repeat<0){nextFrag=fragments[i+1];if(nextFrag&&nextFrag.hasOwnProperty('t')){repeatEndTime=nextFrag.t/fTimescale;}else{var availabilityEnd=representation.segmentAvailabilityRange?representation.segmentAvailabilityRange.end:timelineConverter.calcSegmentAvailabilityRange(representation,isDynamic).end;repeatEndTime=timelineConverter.calcMediaTimeFromPresentationTime(availabilityEnd,representation);representation.segmentDuration=frag.d/fTimescale;}repeat=Math.ceil((repeatEndTime-scaledTime)/(frag.d/fTimescale))-1;}for(j=0;j<=repeat&&!breakIterator;j++){availabilityIdx++;breakIterator=iterFunc(time,scaledTime,base,list,frag,fTimescale,availabilityIdx,i);if(breakIterator){representation.segmentDuration=frag.d/fTimescale;// check if there is at least one more segment\\nif(j<repeat-1||i<len-1){availabilityIdx++;}}time+=frag.d;scaledTime=time/fTimescale;}}representation.availableSegmentsNumber=availabilityIdx;}function getSegmentByIndex(representation,index,lastSegmentTime){checkConfig();if(!representation){return null;}var segment=null;var found=false;iterateSegments(representation,function(time,scaledTime,base,list,frag,fTimescale,availabilityIdx,i){if(found||lastSegmentTime<0){var media=base.media;var mediaRange=frag.mediaRange;if(list){media=list[i].media||'';mediaRange=list[i].mediaRange;}segment=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,isDynamic,representation,time,frag.d,fTimescale,media,mediaRange,availabilityIdx,frag.tManifest);return true;}else if(scaledTime>=lastSegmentTime-frag.d*0.5/fTimescale){// same logic, if deviation is\\n// 50% of segment duration, segment is found if scaledTime is greater than or equal to (startTime of previous segment - half of the previous segment duration)\\nfound=true;}return false;});return segment;}function getSegmentByTime(representation,requestedTime){checkConfig();if(!representation){return null;}if(requestedTime===undefined){requestedTime=null;}var segment=null;var requiredMediaTime=timelineConverter.calcMediaTimeFromPresentationTime(requestedTime,representation);iterateSegments(representation,function(time,scaledTime,base,list,frag,fTimescale,availabilityIdx,i){// In some cases when requiredMediaTime = actual end time of the last segment\\n// it is possible that this time a bit exceeds the declared end time of the last segment.\\n// in this case we still need to include the last segment in the segment list.\\nif(requiredMediaTime<scaledTime+frag.d/fTimescale){var media=base.media;var mediaRange=frag.mediaRange;if(list){media=list[i].media||'';mediaRange=list[i].mediaRange;}segment=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,isDynamic,representation,time,frag.d,fTimescale,media,mediaRange,availabilityIdx,frag.tManifest);return true;}return false;});return segment;}instance={getSegmentByIndex:getSegmentByIndex,getSegmentByTime:getSegmentByTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TimelineSegmentsGetter.__dashjs_factory_name='TimelineSegmentsGetter';var factory=_FactoryMaker2.default.getClassFactory(TimelineSegmentsGetter);exports.default=factory;\\n//# sourceMappingURL=TimelineSegmentsGetter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/utils/TimelineSegmentsGetter.js?\")},\"../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var AdaptationSet=function AdaptationSet(){_classCallCheck(this,AdaptationSet);this.period=null;this.index=-1;this.type=null;};exports.default=AdaptationSet;\\n//# sourceMappingURL=AdaptationSet.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/AdaptationSet.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DEFAULT_DVB_PRIORITY=1;var DEFAULT_DVB_WEIGHT=1;var BaseURL=function BaseURL(url,serviceLocation,priority,weight){_classCallCheck(this,BaseURL);this.url=url||'';this.serviceLocation=serviceLocation||url||'';// DVB extensions\\nthis.dvb_priority=priority||DEFAULT_DVB_PRIORITY;this.dvb_weight=weight||DEFAULT_DVB_WEIGHT;this.availabilityTimeOffset=0;this.availabilityTimeComplete=true;/* currently unused:\\n         * byteRange,\\n         */};BaseURL.DEFAULT_DVB_PRIORITY=DEFAULT_DVB_PRIORITY;BaseURL.DEFAULT_DVB_WEIGHT=DEFAULT_DVB_WEIGHT;exports.default=BaseURL;\\n//# sourceMappingURL=BaseURL.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js?\")},\"../node_modules/dashjs/build/es5/src/dash/vo/Event.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Event=function Event(){_classCallCheck(this,Event);this.duration=NaN;this.presentationTime=NaN;this.id=NaN;this.messageData=\\'\\';this.eventStream=null;this.presentationTimeDelta=NaN;// Specific EMSG Box parameter\\n};exports.default=Event;\\n//# sourceMappingURL=Event.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Event.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var EventStream=function EventStream(){_classCallCheck(this,EventStream);this.adaptionSet=null;this.representation=null;this.period=null;this.timescale=1;this.value='';this.schemeIdUri='';this.presentationTimeOffset=0;};exports.default=EventStream;\\n//# sourceMappingURL=EventStream.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/EventStream.js?\")},\"../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var ManifestInfo=function ManifestInfo(){_classCallCheck(this,ManifestInfo);this.DVRWindowSize=NaN;this.loadedTime=null;this.availableFrom=null;this.minBufferTime=NaN;this.duration=NaN;this.isDynamic=false;this.maxFragmentDuration=null;};exports.default=ManifestInfo;\\n//# sourceMappingURL=ManifestInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/ManifestInfo.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var MediaInfo=function MediaInfo(){_classCallCheck(this,MediaInfo);this.id=null;this.index=null;this.type=null;this.streamInfo=null;this.representationCount=0;this.lang=null;this.viewpoint=null;this.accessibility=null;this.audioChannelConfiguration=null;this.roles=null;this.codec=null;this.mimeType=null;this.contentProtection=null;this.isText=false;this.KID=null;this.bitrateList=null;};exports.default=MediaInfo;\\n//# sourceMappingURL=MediaInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/MediaInfo.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Mpd=function Mpd(){_classCallCheck(this,Mpd);this.manifest=null;this.suggestedPresentationDelay=0;this.availabilityStartTime=null;this.availabilityEndTime=Number.POSITIVE_INFINITY;this.timeShiftBufferDepth=Number.POSITIVE_INFINITY;this.maxSegmentDuration=Number.POSITIVE_INFINITY;this.publishTime=null;this.minimumUpdatePeriod=NaN;this.mediaPresentationDuration=NaN;};exports.default=Mpd;\\n//# sourceMappingURL=Mpd.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Mpd.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var PatchOperation=function(){function PatchOperation(action,xpath,value){_classCallCheck(this,PatchOperation);this.action=action;this.xpath=xpath;this.value=value;this.position=null;}_createClass(PatchOperation,[{key:'getMpdTarget',value:function getMpdTarget(root){var isSiblingOperation=this.action==='remove'||this.action==='replace'||this.position==='before'||this.position==='after';return this.xpath.getMpdTarget(root,isSiblingOperation);}}]);return PatchOperation;}();exports.default=PatchOperation;\\n//# sourceMappingURL=PatchOperation.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/PatchOperation.js?\")},\"../node_modules/dashjs/build/es5/src/dash/vo/Period.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Period=function Period(){_classCallCheck(this,Period);this.id=null;this.index=-1;this.duration=NaN;this.start=NaN;this.mpd=null;};Period.DEFAULT_ID=\\'defaultId\\';exports.default=Period;\\n//# sourceMappingURL=Period.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Period.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/Representation.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\"value\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var _DashConstants=__webpack_require__(/*! ../constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}var Representation=function(){function Representation(){_classCallCheck(this,Representation);this.id=null;this.index=-1;this.adaptation=null;this.segmentInfoType=null;this.initialization=null;this.codecs=null;this.codecPrivateData=null;this.segmentDuration=NaN;this.timescale=1;this.startNumber=1;this.indexRange=null;this.range=null;this.presentationTimeOffset=0;// Set the source buffer timeOffset to this\\nthis.MSETimeOffset=NaN;this.segmentAvailabilityRange=null;this.availableSegmentsNumber=0;this.bandwidth=NaN;this.width=NaN;this.height=NaN;this.scanType=null;this.maxPlayoutRate=NaN;this.availabilityTimeOffset=0;this.availabilityTimeComplete=true;}_createClass(Representation,[{key:\\'hasInitialization\\',value:function hasInitialization(){return this.initialization!==null||this.range!==null;}},{key:\\'hasSegments\\',value:function hasSegments(){return this.segmentInfoType!==_DashConstants2.default.BASE_URL&&this.segmentInfoType!==_DashConstants2.default.SEGMENT_BASE&&!this.indexRange;}}]);return Representation;}();exports.default=Representation;\\n//# sourceMappingURL=Representation.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Representation.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var RepresentationInfo=function RepresentationInfo(){_classCallCheck(this,RepresentationInfo);this.id=null;this.quality=null;this.DVRWindow=null;this.fragmentDuration=null;this.mediaInfo=null;this.MSETimeOffset=null;};exports.default=RepresentationInfo;\\n//# sourceMappingURL=RepresentationInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/RepresentationInfo.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/Segment.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Segment=function Segment(){_classCallCheck(this,Segment);this.indexRange=null;this.index=null;this.mediaRange=null;this.media=null;this.duration=NaN;// this is the time that should be inserted into the media url\\nthis.replacementTime=null;// this is the number that should be inserted into the media url\\nthis.replacementNumber=NaN;// This is supposed to match the time encoded in the media Segment\\nthis.mediaStartTime=NaN;// When the source buffer timeOffset is set to MSETimeOffset this is the\\n// time that will match the seekTarget and video.currentTime\\nthis.presentationStartTime=NaN;// Do not schedule this segment until\\nthis.availabilityStartTime=NaN;// Ignore and  discard this segment after\\nthis.availabilityEndTime=NaN;// The index of the segment inside the availability window\\nthis.availabilityIdx=NaN;// For dynamic mpd\\'s, this is the wall clock time that the video\\n// element currentTime should be presentationStartTime\\nthis.wallStartTime=NaN;this.representation=null;};exports.default=Segment;\\n//# sourceMappingURL=Segment.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/Segment.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var SimpleXPath=function(){function SimpleXPath(selector){var _this=this;_classCallCheck(this,SimpleXPath);// establish validation of the path, to catch unsupported cases\\nthis.valid=selector[0]=='/';// first check, we only support absolute addressing\\n// establish parsed path, example:\\n// /MPD/Period[@id=\\\"foobar\\\"]/AdaptationSet[@id=\\\"2\\\"]/SegmentTemplate/SegmentTimeline\\nthis.path=selector.split('/').filter(function(component){return component.length!==0;})// remove excess empty components\\n.map(function(component){var parsed={name:component};var qualifierPoint=component.indexOf('[');if(qualifierPoint!=-1){parsed.name=component.substring(0,qualifierPoint);var qualifier=component.substring(qualifierPoint+1,component.length-1);// quick sanity check are there additional qualifiers making this invalid\\n_this.valid=_this.valid&&qualifier.indexOf('[')==-1;var equalityPoint=qualifier.indexOf('=');if(equalityPoint!=-1){parsed.attribute={name:qualifier.substring(1,equalityPoint),// skip the @\\nvalue:qualifier.substring(equalityPoint+1)};// check for single and double quoted attribute values\\nif(['\\\\'','\\\"'].indexOf(parsed.attribute.value[0])!=-1){parsed.attribute.value=parsed.attribute.value.substring(1,parsed.attribute.value.length-1);}}else{// positional access in xpath is 1-based index\\n// internal processes will assume 0-based so we normalize that here\\nparsed.position=parseInt(qualifier,10)-1;}}return parsed;});}_createClass(SimpleXPath,[{key:'isValid',value:function isValid(){return this.valid;}},{key:'findsElement',value:function findsElement(){return!this.findsAttribute();}},{key:'findsAttribute',value:function findsAttribute(){return this.path[this.path.length-1].name.startsWith('@');}},{key:'getMpdTarget',value:function getMpdTarget(root,isSiblingOperation){var parent=null;var leaf=root;// assume root is MPD and we start at next level match\\nvar level=1;var name='MPD';while(level<this.path.length&&leaf!==null){// set parent to current\\nparent=leaf;// select next leaf based on component\\nvar component=this.path[level];name=component.name;// stop one early if this is the last element and an attribute\\nif(level!==this.path.length-1||!name.startsWith('@')){var children=parent[name+'_asArray']||[];if(children.length===0&&parent[name]){children.push(parent[name]);}if(component.position){leaf=children[component.position]||null;}else if(component.attribute){(function(){var attr=component.attribute;leaf=children.filter(function(elm){return elm[attr.name]==attr.value;})[0]||null;})();}else{// default case, select first\\nleaf=children[0]||null;}}level++;}if(leaf===null){// given path not found in root\\nreturn null;}// attributes the target is the leaf node, the name is the attribute\\nif(name.startsWith('@')){return{name:name.substring(1),leaf:leaf,target:leaf};}// otherwise we target the parent for sibling operations and leaf for child operations\\nreturn{name:name,leaf:leaf,target:isSiblingOperation?parent:leaf};}}]);return SimpleXPath;}();exports.default=SimpleXPath;\\n//# sourceMappingURL=SimpleXPath.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/SimpleXPath.js?\")},\"../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var StreamInfo=function StreamInfo(){_classCallCheck(this,StreamInfo);this.id=null;this.index=null;this.start=NaN;this.duration=NaN;this.manifestInfo=null;this.isLast=true;};exports.default=StreamInfo;\\n//# sourceMappingURL=StreamInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/StreamInfo.js?')},\"../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var UTCTiming=function UTCTiming(){_classCallCheck(this,UTCTiming);// UTCTiming is a DescriptorType and doesn't have any additional fields\\nthis.schemeIdUri='';this.value='';};exports.default=UTCTiming;\\n//# sourceMappingURL=UTCTiming.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _URLLoader=__webpack_require__(/*! ./net/URLLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _HeadRequest=__webpack_require__(/*! ./vo/HeadRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js\");var _HeadRequest2=_interopRequireDefault(_HeadRequest);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function FragmentLoader(config){config=config||{};var context=this.context;var eventBus=config.eventBus;var events=config.events;var urlUtils=config.urlUtils;var errors=config.errors;var instance=void 0,urlLoader=void 0;function setup(){urlLoader=(0,_URLLoader2.default)(context).create({errHandler:config.errHandler,errors:errors,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,useFetch:config.settings.get().streaming.lowLatencyEnabled,urlUtils:urlUtils,constants:_Constants2.default,boxParser:config.boxParser,dashConstants:config.dashConstants,requestTimeout:config.settings.get().streaming.fragmentRequestTimeout});}function checkForExistence(request){var report=function report(success){eventBus.trigger(events.CHECK_FOR_EXISTENCE_COMPLETED,{request:request,exists:success});};if(request){var headRequest=new _HeadRequest2.default(request.url);urlLoader.load({request:headRequest,success:function success(){report(true);},error:function error(){report(false);}});}else{report(false);}}function load(request){var report=function report(data,error){eventBus.trigger(events.LOADING_COMPLETED,{request:request,response:data||null,error:error||null,sender:instance});};if(request){urlLoader.load({request:request,progress:function progress(event){eventBus.trigger(events.LOADING_PROGRESS,{request:request,stream:event.stream});if(event.data){eventBus.trigger(events.LOADING_DATA_PROGRESS,{request:request,response:event.data||null,error:null,sender:instance});}},success:function success(data){report(data);},error:function error(request,statusText,errorText){report(undefined,new _DashJSError2.default(errors.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,errorText,statusText));},abort:function abort(request){if(request){eventBus.trigger(events.LOADING_ABANDONED,{mediaType:request.mediaType,request:request,sender:instance});}}});}else{report(undefined,new _DashJSError2.default(errors.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,errors.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE));}}function abort(){if(urlLoader){urlLoader.abort();}}function reset(){if(urlLoader){urlLoader.abort();urlLoader=null;}}instance={checkForExistence:checkForExistence,load:load,abort:abort,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */FragmentLoader.__dashjs_factory_name=\\'FragmentLoader\\';exports.default=_FactoryMaker2.default.getClassFactory(FragmentLoader);\\n//# sourceMappingURL=FragmentLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js?')},\"../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _XlinkController=__webpack_require__(/*! ./controllers/XlinkController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js\");var _XlinkController2=_interopRequireDefault(_XlinkController);var _URLLoader=__webpack_require__(/*! ./net/URLLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _URLUtils=__webpack_require__(/*! ./utils/URLUtils */ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _TextRequest=__webpack_require__(/*! ./vo/TextRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js\");var _TextRequest2=_interopRequireDefault(_TextRequest);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _HTTPRequest=__webpack_require__(/*! ./vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _EventBus=__webpack_require__(/*! ../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashParser=__webpack_require__(/*! ../dash/parser/DashParser */ \"../node_modules/dashjs/build/es5/src/dash/parser/DashParser.js\");var _DashParser2=_interopRequireDefault(_DashParser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestLoader(config){config=config||{};var context=this.context;var debug=config.debug;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,logger=void 0,urlLoader=void 0,xlinkController=void 0,parser=void 0;var mssHandler=config.mssHandler;var errHandler=config.errHandler;function setup(){logger=debug.getLogger(instance);eventBus.on(_Events2.default.XLINK_READY,onXlinkReady,instance);urlLoader=(0,_URLLoader2.default)(context).create({errHandler:config.errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,useFetch:config.settings.get().streaming.lowLatencyEnabled,urlUtils:urlUtils,constants:_Constants2.default,dashConstants:_DashConstants2.default,errors:_Errors2.default});xlinkController=(0,_XlinkController2.default)(context).create({errHandler:errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,settings:config.settings});parser=null;}function onXlinkReady(event){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:event.manifest});}function createParser(data){var parser=null;// Analyze manifest content to detect protocol and select appropriate parser\\nif(data.indexOf(\\'SmoothStreamingMedia\\')>-1){//do some business to transform it into a Dash Manifest\\nif(mssHandler){parser=mssHandler.createMssParser();mssHandler.registerEvents();}return parser;}else if(data.indexOf(\\'MPD\\')>-1||data.indexOf(\\'Patch\\')>-1){return(0,_DashParser2.default)(context).create({debug:debug});}else{return parser;}}function load(url){var request=new _TextRequest2.default(url,_HTTPRequest.HTTPRequest.MPD_TYPE);urlLoader.load({request:request,success:function success(data,textStatus,responseURL){// Manage situations in which success is called after calling reset\\nif(!xlinkController)return;var actualUrl=void 0,baseUri=void 0,manifest=void 0;// Handle redirects for the MPD - as per RFC3986 Section 5.1.3\\n// also handily resolves relative MPD URLs to absolute\\nif(responseURL&&responseURL!==url){baseUri=urlUtils.parseBaseUrl(responseURL);actualUrl=responseURL;}else{// usually this case will be caught and resolved by\\n// responseURL above but it is not available for IE11 and Edge/12 and Edge/13\\n// baseUri must be absolute for BaseURL resolution later\\nif(urlUtils.isRelative(url)){url=urlUtils.resolve(url,window.location.href);}baseUri=urlUtils.parseBaseUrl(url);}// A response of no content implies in-memory is properly up to date\\nif(textStatus==\\'No Content\\'){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null});return;}// Create parser according to manifest type\\nif(parser===null){parser=createParser(data);}if(parser===null){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(\\'\\'+url))});return;}// init xlinkcontroller with matchers and iron object from created parser\\nxlinkController.setMatchers(parser.getMatchers());xlinkController.setIron(parser.getIron());try{manifest=parser.parse(data);}catch(e){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(\\'\\'+url))});return;}if(manifest){manifest.url=actualUrl||url;// URL from which the MPD was originally retrieved (MPD updates will not change this value)\\nif(!manifest.originalUrl){manifest.originalUrl=manifest.url;}// In the following, we only use the first Location entry even if many are available\\n// Compare with ManifestUpdater/DashManifestModel\\nif(manifest.hasOwnProperty(_Constants2.default.LOCATION)){baseUri=urlUtils.parseBaseUrl(manifest.Location_asArray[0]);logger.debug(\\'BaseURI set by Location to: \\'+baseUri);}manifest.baseUri=baseUri;manifest.loadedTime=new Date();xlinkController.resolveManifestOnLoad(manifest);eventBus.trigger(_Events2.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:data});}else{eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+(\\'\\'+url))});}},error:function error(request,statusText,errorText){eventBus.trigger(_Events2.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new _DashJSError2.default(_Errors2.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,_Errors2.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+(url+\\', \\'+errorText))});}});}function reset(){eventBus.off(_Events2.default.XLINK_READY,onXlinkReady,instance);if(xlinkController){xlinkController.reset();xlinkController=null;}if(urlLoader){urlLoader.abort();urlLoader=null;}if(mssHandler){mssHandler.reset();}}instance={load:load,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ManifestLoader.__dashjs_factory_name=\\'ManifestLoader\\';var factory=_FactoryMaker2.default.getClassFactory(ManifestLoader);exports.default=factory;\\n//# sourceMappingURL=ManifestLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js?')},\"../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _EventBus=__webpack_require__(/*! ../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _URLUtils=__webpack_require__(/*! ./utils/URLUtils */ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\");var _URLUtils2=_interopRequireDefault(_URLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestUpdater(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,logger=void 0,refreshDelay=void 0,refreshTimer=void 0,isPaused=void 0,isStopped=void 0,isUpdating=void 0,manifestLoader=void 0,manifestModel=void 0,adapter=void 0,errHandler=void 0,settings=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function setConfig(config){if(!config)return;if(config.manifestModel){manifestModel=config.manifestModel;}if(config.adapter){adapter=config.adapter;}if(config.manifestLoader){manifestLoader=config.manifestLoader;}if(config.errHandler){errHandler=config.errHandler;}if(config.settings){settings=config.settings;}}function initialize(){resetInitialSettings();eventBus.on(_Events2.default.STREAMS_COMPOSED,onStreamsComposed,this);eventBus.on(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.on(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,this);eventBus.on(_Events2.default.INTERNAL_MANIFEST_LOADED,onManifestLoaded,this);}function setManifest(manifest){update(manifest);}function resetInitialSettings(){refreshDelay=NaN;isUpdating=false;isPaused=true;isStopped=false;stopManifestRefreshTimer();}function reset(){eventBus.off(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.off(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,this);eventBus.off(_Events2.default.STREAMS_COMPOSED,onStreamsComposed,this);eventBus.off(_Events2.default.INTERNAL_MANIFEST_LOADED,onManifestLoaded,this);resetInitialSettings();}function stopManifestRefreshTimer(){if(refreshTimer!==null){clearTimeout(refreshTimer);refreshTimer=null;}}function startManifestRefreshTimer(delay){stopManifestRefreshTimer();if(isStopped){return;}if(isNaN(delay)&&!isNaN(refreshDelay)){delay=refreshDelay*1000;}if(!isNaN(delay)){logger.debug(\\'Refresh manifest in \\'+delay+\\' milliseconds.\\');refreshTimer=setTimeout(onRefreshTimer,delay);}}function refreshManifest(){var ignorePatch=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;isUpdating=true;var manifest=manifestModel.getValue();// default to the original url in the manifest\\nvar url=manifest.url;// Check for PatchLocation and Location alternatives\\nvar patchLocation=adapter.getPatchLocation(manifest);var location=adapter.getLocation(manifest);if(patchLocation&&!ignorePatch){url=patchLocation;}else if(location){url=location;}// if one of the alternatives was relative, convert to absolute\\nif(urlUtils.isRelative(url)){url=urlUtils.resolve(url,manifest.url);}manifestLoader.load(url);}function update(manifest){if(!manifest){// successful update with no content implies existing manifest remains valid\\nmanifest=manifestModel.getValue();// override load time to avoid invalid latency tracking and ensure update cadence\\nmanifest.loadedTime=new Date();}else if(adapter.getIsPatch(manifest)){// with patches the in-memory manifest is our base\\nvar patch=manifest;manifest=manifestModel.getValue();// check for patch validity\\nvar isPatchValid=adapter.isPatchValid(manifest,patch);var patchSuccessful=isPatchValid;if(isPatchValid){// grab publish time before update\\nvar publishTime=adapter.getPublishTime(manifest);// apply validated patch to manifest\\npatchSuccessful=adapter.applyPatchToManifest(manifest,patch);// get the updated publish time\\nvar updatedPublishTime=adapter.getPublishTime(manifest);// ensure the patch properly updated the in-memory publish time\\npatchSuccessful=publishTime.getTime()!=updatedPublishTime.getTime();}// if the patch failed to apply, force a full manifest refresh\\nif(!patchSuccessful){logger.debug(\\'Patch provided is invalid, performing full manifest refresh\\');refreshManifest(true);return;}// override load time to avoid invalid latency tracking and ensure update cadence\\nmanifest.loadedTime=new Date();}// See DASH-IF IOP v4.3 section 4.6.4 \"Transition Phase between Live and On-Demand\"\\n// Stop manifest update, ignore static manifest and signal end of dynamic stream to detect end of stream\\nif(manifestModel.getValue()&&manifestModel.getValue().type===_DashConstants2.default.DYNAMIC&&manifest.type===_DashConstants2.default.STATIC){eventBus.trigger(_Events2.default.DYNAMIC_TO_STATIC);isUpdating=false;isStopped=true;return;}manifestModel.setValue(manifest);var date=new Date();var latencyOfLastUpdate=(date.getTime()-manifest.loadedTime.getTime())/1000;refreshDelay=adapter.getManifestUpdatePeriod(manifest,latencyOfLastUpdate);// setTimeout uses a 32 bit number to store the delay. Any number greater than it\\n// will cause event associated with setTimeout to trigger immediately\\nif(refreshDelay*1000>0x7FFFFFFF){refreshDelay=0x7FFFFFFF/1000;}eventBus.trigger(_Events2.default.MANIFEST_UPDATED,{manifest:manifest});logger.info(\\'Manifest has been refreshed at \\'+date+\\'[\\'+date.getTime()/1000+\\'] \\');if(!isPaused){startManifestRefreshTimer();}}function onRefreshTimer(){if(isPaused){return;}if(isUpdating){startManifestRefreshTimer(settings.get().streaming.manifestUpdateRetryInterval);return;}refreshManifest();}function onManifestLoaded(e){if(!e.error){update(e.manifest);}else if(e.error.code===_Errors2.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE){errHandler.error(e.error);}}function onPlaybackStarted()/*e*/{isPaused=false;startManifestRefreshTimer();}function onPlaybackPaused()/*e*/{isPaused=!settings.get().streaming.scheduleWhilePaused;if(isPaused){stopManifestRefreshTimer();}}function onStreamsComposed()/*e*/{// When streams are ready we can consider manifest update completed. Resolve the update promise.\\nisUpdating=false;}instance={initialize:initialize,setManifest:setManifest,refreshManifest:refreshManifest,setConfig:setConfig,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ManifestUpdater.__dashjs_factory_name=\\'ManifestUpdater\\';exports.default=_FactoryMaker2.default.getClassFactory(ManifestUpdater);\\n//# sourceMappingURL=ManifestUpdater.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js?')},\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _cea608Parser=__webpack_require__(/*! ../../externals/cea608-parser */ \"../node_modules/dashjs/build/es5/externals/cea608-parser.js\");var _cea608Parser2=_interopRequireDefault(_cea608Parser);var _Constants=__webpack_require__(/*! ./constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _MetricsConstants=__webpack_require__(/*! ./constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _PlaybackController=__webpack_require__(/*! ./controllers/PlaybackController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js\");var _PlaybackController2=_interopRequireDefault(_PlaybackController);var _StreamController=__webpack_require__(/*! ./controllers/StreamController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js\");var _StreamController2=_interopRequireDefault(_StreamController);var _GapController=__webpack_require__(/*! ./controllers/GapController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js\");var _GapController2=_interopRequireDefault(_GapController);var _MediaController=__webpack_require__(/*! ./controllers/MediaController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js\");var _MediaController2=_interopRequireDefault(_MediaController);var _BaseURLController=__webpack_require__(/*! ./controllers/BaseURLController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js\");var _BaseURLController2=_interopRequireDefault(_BaseURLController);var _ManifestLoader=__webpack_require__(/*! ./ManifestLoader */ \"../node_modules/dashjs/build/es5/src/streaming/ManifestLoader.js\");var _ManifestLoader2=_interopRequireDefault(_ManifestLoader);var _ErrorHandler=__webpack_require__(/*! ./utils/ErrorHandler */ \"../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js\");var _ErrorHandler2=_interopRequireDefault(_ErrorHandler);var _Capabilities=__webpack_require__(/*! ./utils/Capabilities */ \"../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js\");var _Capabilities2=_interopRequireDefault(_Capabilities);var _CapabilitiesFilter=__webpack_require__(/*! ./utils/CapabilitiesFilter */ \"../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js\");var _CapabilitiesFilter2=_interopRequireDefault(_CapabilitiesFilter);var _TextTracks=__webpack_require__(/*! ./text/TextTracks */ \"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\");var _TextTracks2=_interopRequireDefault(_TextTracks);var _RequestModifier=__webpack_require__(/*! ./utils/RequestModifier */ \"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\");var _RequestModifier2=_interopRequireDefault(_RequestModifier);var _TextController=__webpack_require__(/*! ./text/TextController */ \"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\");var _TextController2=_interopRequireDefault(_TextController);var _URIFragmentModel=__webpack_require__(/*! ./models/URIFragmentModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js\");var _URIFragmentModel2=_interopRequireDefault(_URIFragmentModel);var _ManifestModel=__webpack_require__(/*! ./models/ManifestModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js\");var _ManifestModel2=_interopRequireDefault(_ManifestModel);var _MediaPlayerModel=__webpack_require__(/*! ./models/MediaPlayerModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js\");var _MediaPlayerModel2=_interopRequireDefault(_MediaPlayerModel);var _AbrController=__webpack_require__(/*! ./controllers/AbrController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js\");var _AbrController2=_interopRequireDefault(_AbrController);var _SchemeLoaderFactory=__webpack_require__(/*! ./net/SchemeLoaderFactory */ \"../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js\");var _SchemeLoaderFactory2=_interopRequireDefault(_SchemeLoaderFactory);var _VideoModel=__webpack_require__(/*! ./models/VideoModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js\");var _VideoModel2=_interopRequireDefault(_VideoModel);var _CmcdModel=__webpack_require__(/*! ./models/CmcdModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js\");var _CmcdModel2=_interopRequireDefault(_CmcdModel);var _DOMStorage=__webpack_require__(/*! ./utils/DOMStorage */ \"../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js\");var _DOMStorage2=_interopRequireDefault(_DOMStorage);var _Debug=__webpack_require__(/*! ./../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _Errors=__webpack_require__(/*! ./../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);var _EventBus=__webpack_require__(/*! ./../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ./../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _MediaPlayerEvents=__webpack_require__(/*! ./MediaPlayerEvents */ \"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Settings=__webpack_require__(/*! ../core/Settings */ \"../node_modules/dashjs/build/es5/src/core/Settings.js\");var _Settings2=_interopRequireDefault(_Settings);var _Version=__webpack_require__(/*! ./../core/Version */ \"../node_modules/dashjs/build/es5/src/core/Version.js\");var _SegmentBaseController=__webpack_require__(/*! ../dash/controllers/SegmentBaseController */ \"../node_modules/dashjs/build/es5/src/dash/controllers/SegmentBaseController.js\");var _SegmentBaseController2=_interopRequireDefault(_SegmentBaseController);var _DashAdapter=__webpack_require__(/*! ../dash/DashAdapter */ \"../node_modules/dashjs/build/es5/src/dash/DashAdapter.js\");var _DashAdapter2=_interopRequireDefault(_DashAdapter);var _DashMetrics=__webpack_require__(/*! ../dash/DashMetrics */ \"../node_modules/dashjs/build/es5/src/dash/DashMetrics.js\");var _DashMetrics2=_interopRequireDefault(_DashMetrics);var _TimelineConverter=__webpack_require__(/*! ../dash/utils/TimelineConverter */ \"../node_modules/dashjs/build/es5/src/dash/utils/TimelineConverter.js\");var _TimelineConverter2=_interopRequireDefault(_TimelineConverter);var _HTTPRequest=__webpack_require__(/*! ./vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _base=__webpack_require__(/*! ../../externals/base64 */ \"../node_modules/dashjs/build/es5/externals/base64.js\");var _base2=_interopRequireDefault(_base);var _codemIsoboxer=__webpack_require__(/*! codem-isoboxer */ \"../node_modules/codem-isoboxer/dist/iso_boxer.js\");var _codemIsoboxer2=_interopRequireDefault(_codemIsoboxer);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _SupervisorTools=__webpack_require__(/*! ./utils/SupervisorTools */ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\");var _ManifestUpdater=__webpack_require__(/*! ./ManifestUpdater */ \"../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js\");var _ManifestUpdater2=_interopRequireDefault(_ManifestUpdater);var _URLUtils=__webpack_require__(/*! ../streaming/utils/URLUtils */ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _BoxParser=__webpack_require__(/*! ./utils/BoxParser */ \"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\");var _BoxParser2=_interopRequireDefault(_BoxParser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/* jscs:disable *//**\\n * The media types\\n * @typedef {(\"video\" | \"audio\" | \"text\" | \"fragmentedText\" | \"embeddedText\" | \"image\")} MediaType\\n *//* jscs:enable *//**\\n * @module MediaPlayer\\n * @description The MediaPlayer is the primary dash.js Module and a Facade to build your player around.\\n * It will allow you access to all the important dash.js properties/methods via the public API and all the\\n * events to build a robust DASH media player.\\n *///Dash\\n/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function MediaPlayer(){/**\\n     * @constant {string} STREAMING_NOT_INITIALIZED_ERROR error string thrown when a function is called before the dash.js has been fully initialized\\n     * @inner\\n     */var STREAMING_NOT_INITIALIZED_ERROR=\\'You must first call initialize() and set a source before calling this method\\';/**\\n     * @constant {string} PLAYBACK_NOT_INITIALIZED_ERROR error string thrown when a function is called before the dash.js has been fully initialized\\n     * @inner\\n     */var PLAYBACK_NOT_INITIALIZED_ERROR=\\'You must first call initialize() and set a valid source and view before calling this method\\';/**\\n     * @constant {string} ELEMENT_NOT_ATTACHED_ERROR error string thrown when a function is called before the dash.js has received a reference of an HTML5 video element\\n     * @inner\\n     */var ELEMENT_NOT_ATTACHED_ERROR=\\'You must first call attachView() to set the video element before calling this method\\';/**\\n     * @constant {string} SOURCE_NOT_ATTACHED_ERROR error string thrown when a function is called before the dash.js has received a valid source stream.\\n     * @inner\\n     */var SOURCE_NOT_ATTACHED_ERROR=\\'You must first call attachSource() with a valid source before calling this method\\';/**\\n     * @constant {string} MEDIA_PLAYER_NOT_INITIALIZED_ERROR error string thrown when a function is called before the dash.js has been fully initialized.\\n     * @inner\\n     */var MEDIA_PLAYER_NOT_INITIALIZED_ERROR=\\'MediaPlayer not initialized!\\';var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();var debug=(0,_Debug2.default)(context).getInstance({settings:settings});var instance=void 0,logger=void 0,source=void 0,protectionData=void 0,mediaPlayerInitialized=void 0,streamingInitialized=void 0,playbackInitialized=void 0,autoPlay=void 0,abrController=void 0,schemeLoaderFactory=void 0,timelineConverter=void 0,mediaController=void 0,protectionController=void 0,metricsReportingController=void 0,mssHandler=void 0,offlineController=void 0,adapter=void 0,mediaPlayerModel=void 0,errHandler=void 0,baseURLController=void 0,capabilities=void 0,capabilitiesFilter=void 0,streamController=void 0,gapController=void 0,playbackController=void 0,dashMetrics=void 0,manifestModel=void 0,cmcdModel=void 0,videoModel=void 0,textController=void 0,uriFragmentModel=void 0,domStorage=void 0,segmentBaseController=void 0,licenseRequestFilters=void 0,licenseResponseFilters=void 0;/*\\n    ---------------------------------------------------------------------------\\n\\n        INIT FUNCTIONS\\n\\n    ---------------------------------------------------------------------------\\n    */function setup(){logger=debug.getLogger(instance);mediaPlayerInitialized=false;playbackInitialized=false;streamingInitialized=false;autoPlay=true;protectionController=null;offlineController=null;protectionData=null;adapter=null;segmentBaseController=null;_Events2.default.extend(_MediaPlayerEvents2.default);mediaPlayerModel=(0,_MediaPlayerModel2.default)(context).getInstance();videoModel=(0,_VideoModel2.default)(context).getInstance();uriFragmentModel=(0,_URIFragmentModel2.default)(context).getInstance();licenseRequestFilters=[];licenseResponseFilters=[];}/**\\n     * Configure media player with customs controllers. Helpful for tests\\n     *\\n     * @param {object=} config controllers configuration\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setConfig(config){if(!config){return;}if(config.capabilities){capabilities=config.capabilities;}if(config.capabilitiesFilter){capabilitiesFilter=config.capabilitiesFilter;}if(config.streamController){streamController=config.streamController;}if(config.gapController){gapController=config.gapController;}if(config.playbackController){playbackController=config.playbackController;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.abrController){abrController=config.abrController;}if(config.schemeLoaderFactory){schemeLoaderFactory=config.schemeLoaderFactory;}if(config.mediaController){mediaController=config.mediaController;}if(config.settings){settings=config.settings;}}/**\\n     * Upon creating the MediaPlayer you must call initialize before you call anything else.\\n     * There is one exception to this rule. It is crucial to call {@link module:MediaPlayer#extend extend()}\\n     * with all your extensions prior to calling initialize.\\n     *\\n     * ALL arguments are optional and there are individual methods to set each argument later on.\\n     * The args in this method are just for convenience and should only be used for a simple player setup.\\n     *\\n     * @param {HTML5MediaElement=} view - Optional arg to set the video element. {@link module:MediaPlayer#attachView attachView()}\\n     * @param {string=} source - Optional arg to set the media source. {@link module:MediaPlayer#attachSource attachSource()}\\n     * @param {boolean=} AutoPlay - Optional arg to set auto play. {@link module:MediaPlayer#setAutoPlay setAutoPlay()}\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @see {@link module:MediaPlayer#setAutoPlay setAutoPlay()}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function initialize(view,source,AutoPlay){if(!capabilities){capabilities=(0,_Capabilities2.default)(context).getInstance();}errHandler=(0,_ErrorHandler2.default)(context).getInstance();if(!capabilities.supportsMediaSource()){errHandler.error(new _DashJSError2.default(_Errors2.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,_Errors2.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE));return;}if(mediaPlayerInitialized)return;mediaPlayerInitialized=true;// init some controllers and models\\ntimelineConverter=(0,_TimelineConverter2.default)(context).getInstance();if(!abrController){abrController=(0,_AbrController2.default)(context).getInstance();abrController.setConfig({settings:settings});}if(!schemeLoaderFactory){schemeLoaderFactory=(0,_SchemeLoaderFactory2.default)(context).getInstance();}if(!playbackController){playbackController=(0,_PlaybackController2.default)(context).getInstance();}if(!mediaController){mediaController=(0,_MediaController2.default)(context).getInstance();}if(!streamController){streamController=(0,_StreamController2.default)(context).getInstance();}if(!gapController){gapController=(0,_GapController2.default)(context).getInstance();}if(!capabilitiesFilter){capabilitiesFilter=(0,_CapabilitiesFilter2.default)(context).getInstance();}adapter=(0,_DashAdapter2.default)(context).getInstance();manifestModel=(0,_ManifestModel2.default)(context).getInstance();cmcdModel=(0,_CmcdModel2.default)(context).getInstance();dashMetrics=(0,_DashMetrics2.default)(context).getInstance({settings:settings});textController=(0,_TextController2.default)(context).getInstance();domStorage=(0,_DOMStorage2.default)(context).getInstance({settings:settings});adapter.setConfig({constants:_Constants2.default,cea608parser:_cea608Parser2.default,errHandler:errHandler,BASE64:_base2.default});if(!baseURLController){baseURLController=(0,_BaseURLController2.default)(context).create();}baseURLController.setConfig({adapter:adapter});segmentBaseController=(0,_SegmentBaseController2.default)(context).getInstance({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,baseURLController:baseURLController,events:_Events2.default,eventBus:eventBus,debug:debug,boxParser:(0,_BoxParser2.default)(context).getInstance(),requestModifier:(0,_RequestModifier2.default)(context).getInstance(),errors:_Errors2.default});segmentBaseController.initialize();// configure controllers\\nmediaController.setConfig({domStorage:domStorage,settings:settings});restoreDefaultUTCTimingSources();setAutoPlay(AutoPlay!==undefined?AutoPlay:true);// Detect and initialize offline module to support offline contents playback\\ndetectOffline();if(view){attachView(view);}if(source){attachSource(source);}logger.info(\\'[dash.js \\'+getVersion()+\\'] \\'+\\'MediaPlayer has been initialized\\');}/**\\n     * Sets the MPD source and the video element to null. You can also reset the MediaPlayer by\\n     * calling attachSource with a new source file.\\n     *\\n     * This call does not destroy the MediaPlayer. To destroy the MediaPlayer and free all of its\\n     * memory, call destroy().\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function reset(){attachSource(null);attachView(null);protectionData=null;if(protectionController){protectionController.reset();protectionController=null;}if(metricsReportingController){metricsReportingController.reset();metricsReportingController=null;}segmentBaseController.reset();settings.reset();if(offlineController){offlineController.reset();offlineController=null;}}/**\\n     * Completely destroys the media player and frees all memory.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function destroy(){reset();licenseRequestFilters=[];licenseResponseFilters=[];_FactoryMaker2.default.deleteSingletonInstances(context);}/**\\n     * The ready state of the MediaPlayer based on both the video element and MPD source being defined.\\n     *\\n     * @returns {boolean} The current ready state of the MediaPlayer\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isReady(){return!!source&&!!videoModel.getElement();}/**\\n     * Use the on method to listen for public events found in MediaPlayer.events. {@link MediaPlayerEvents}\\n     *\\n     * @param {string} type - {@link MediaPlayerEvents}\\n     * @param {Function} listener - callback method when the event fires.\\n     * @param {Object} scope - context of the listener so it can be removed properly.\\n     * @param {Object} options - object to define various options such as priority and mode\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function on(type,listener,scope,options){eventBus.on(type,listener,scope,options);}/**\\n     * Use the off method to remove listeners for public events found in MediaPlayer.events. {@link MediaPlayerEvents}\\n     *\\n     * @param {string} type - {@link MediaPlayerEvents}\\n     * @param {Function} listener - callback method when the event fires.\\n     * @param {Object} scope - context of the listener so it can be removed properly.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function off(type,listener,scope){eventBus.off(type,listener,scope);}/**\\n     * Current version of Dash.js\\n     * @returns {string} the current dash.js version string.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getVersion(){return(0,_Version.getVersionString)();}/**\\n     * Use this method to access the dash.js logging class.\\n     *\\n     * @returns {Debug}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDebug(){return debug;}/*\\n    ---------------------------------------------------------------------------\\n\\n        PLAYBACK FUNCTIONS\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Causes the player to begin streaming the media as set by the {@link module:MediaPlayer#attachSource attachSource()}\\n     * method in preparation for playing. It specifically does not require a view to be attached with {@link module:MediaPlayer#attachSource attachView()} to begin preloading.\\n     * When a view is attached after preloading, the buffered data is transferred to the attached mediaSource buffers.\\n     *\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~SOURCE_NOT_ATTACHED_ERROR SOURCE_NOT_ATTACHED_ERROR} if called before attachSource function\\n     * @instance\\n     */function preload(){if(videoModel.getElement()||streamingInitialized){return false;}if(source){initializePlayback();}else{throw SOURCE_NOT_ATTACHED_ERROR;}}/**\\n     * The play method initiates playback of the media defined by the {@link module:MediaPlayer#attachSource attachSource()} method.\\n     * This method will call play on the native Video Element.\\n     *\\n     * @see {@link module:MediaPlayer#attachSource attachSource()}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function play(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}if(!autoPlay||isPaused()&&playbackInitialized){playbackController.play();}}/**\\n     * This method will call pause on the native Video Element.\\n     *\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function pause(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}playbackController.pause();}/**\\n     * Returns a Boolean that indicates whether the Video Element is paused.\\n     * @return {boolean}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isPaused(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return playbackController.isPaused();}/**\\n     * Sets the currentTime property of the attached video element.  If it is a live stream with a\\n     * timeShiftBufferLength, then the DVR window offset will be automatically calculated.\\n     *\\n     * @param {number} value - A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected\\n     * @see {@link module:MediaPlayer#getDVRSeekOffset getDVRSeekOffset()}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not number type or is NaN.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function seek(value){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}(0,_SupervisorTools.checkParameterType)(value,\\'number\\');if(isNaN(value)){throw _Constants2.default.BAD_ARGUMENT_ERROR;}var s=playbackController.getIsDynamic()?getDVRSeekOffset(value):value;playbackController.seek(s);}/**\\n     * Returns a Boolean that indicates whether the media is in the process of seeking to a new position.\\n     * @return {boolean}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isSeeking(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return playbackController.isSeeking();}/**\\n     * Returns a Boolean that indicates whether the media is in the process of dynamic.\\n     * @return {boolean}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isDynamic(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return playbackController.getIsDynamic();}/**\\n     * Use this method to set the native Video Element\\'s playback rate.\\n     * @param {number} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setPlaybackRate(value){getVideoElement().playbackRate=value;}/**\\n     * Returns the current playback rate.\\n     * @returns {number}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getPlaybackRate(){return getVideoElement().playbackRate;}/**\\n     * Use this method to set the native Video Element\\'s muted state. Takes a Boolean that determines whether audio is muted. true if the audio is muted and false otherwise.\\n     * @param {boolean} value\\n     * @memberof module:MediaPlayer\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not boolean type.\\n     * @instance\\n     */function setMute(value){(0,_SupervisorTools.checkParameterType)(value,\\'boolean\\');getVideoElement().muted=value;}/**\\n     * A Boolean that determines whether audio is muted.\\n     * @returns {boolean}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isMuted(){return getVideoElement().muted;}/**\\n     * A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).\\n     * @param {number} value\\n     * @memberof module:MediaPlayer\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not number type, or is NaN or not between 0 and 1.\\n     * @instance\\n     */function setVolume(value){if(typeof value!==\\'number\\'||isNaN(value)||value<0.0||value>1.0){throw _Constants2.default.BAD_ARGUMENT_ERROR;}getVideoElement().volume=value;}/**\\n     * Returns the current audio volume, from 0.0 (silent) to 1.0 (loudest).\\n     * @returns {number}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getVolume(){return getVideoElement().volume;}/**\\n     * The length of the buffer for a given media type, in seconds. Valid media\\n     * types are \"video\", \"audio\" and \"fragmentedText\". If no type is passed\\n     * in, then the minimum of video, audio and fragmentedText buffer length is\\n     * returned. NaN is returned if an invalid type is requested, the\\n     * presentation does not contain that type, or if no arguments are passed\\n     * and the presentation does not include any adaption sets of valid media\\n     * type.\\n     *\\n     * @param {MediaType} type - \\'video\\', \\'audio\\' or \\'fragmentedText\\'\\n     * @returns {number} The length of the buffer for the given media type, in\\n     *  seconds, or NaN\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getBufferLength(type){var types=[_Constants2.default.VIDEO,_Constants2.default.AUDIO,_Constants2.default.FRAGMENTED_TEXT];if(!type){var buffer=types.map(function(t){return getTracksFor(t).length>0?getDashMetrics().getCurrentBufferLevel(t):Number.MAX_VALUE;}).reduce(function(p,c){return Math.min(p,c);});return buffer===Number.MAX_VALUE?NaN:buffer;}else{if(types.indexOf(type)!==-1){var _buffer=getDashMetrics().getCurrentBufferLevel(type);return _buffer?_buffer:NaN;}else{logger.warn(\\'getBufferLength requested for invalid type\\');return NaN;}}}/**\\n     * The timeShiftBufferLength (DVR Window), in seconds.\\n     *\\n     * @returns {number} The window of allowable play time behind the live point of a live stream.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDVRWindowSize(){var metric=dashMetrics.getCurrentDVRInfo();if(!metric){return 0;}return metric.manifestInfo.DVRWindowSize;}/**\\n     * This method should only be used with a live stream that has a valid timeShiftBufferLength (DVR Window).\\n     * NOTE - If you do not need the raw offset value (i.e. media analytics, tracking, etc) consider using the {@link module:MediaPlayer#seek seek()} method\\n     * which will calculate this value for you and set the video element\\'s currentTime property all in one simple call.\\n     *\\n     * @param {number} value - A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected.\\n     * @returns {number} A value that is relative the available range within the timeShiftBufferLength (DVR Window).\\n     * @see {@link module:MediaPlayer#seek seek()}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDVRSeekOffset(value){var metric=dashMetrics.getCurrentDVRInfo();if(!metric){return 0;}var liveDelay=playbackController.getLiveDelay();var val=metric.range.start+value;if(val>metric.range.end-liveDelay){val=metric.range.end-liveDelay;}return val;}/**\\n     * Current time of the playhead, in seconds.\\n     *\\n     * If called with no arguments then the returned time value is time elapsed since the start point of the first stream, or if it is a live stream, then the time will be based on the return value of the {@link module:MediaPlayer#duration duration()} method.\\n     * However if a stream ID is supplied then time is relative to the start of that stream, or is null if there is no such stream id in the manifest.\\n     *\\n     * @param {string} streamId - The ID of a stream that the returned playhead time must be relative to the start of. If undefined, then playhead time is relative to the first stream.\\n     * @returns {number} The current playhead time of the media, or null.\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function time(streamId){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}var t=getVideoElement().currentTime;if(streamId!==undefined){t=streamController.getTimeRelativeToStreamId(t,streamId);}else if(playbackController.getIsDynamic()){var metric=dashMetrics.getCurrentDVRInfo();t=metric===null?0:duration()-(metric.range.end-metric.time);}return t;}/**\\n     * Duration of the media\\'s playback, in seconds.\\n     *\\n     * @returns {number} The current duration of the media.\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function duration(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}var d=getVideoElement().duration;if(playbackController.getIsDynamic()){var metric=dashMetrics.getCurrentDVRInfo();var range=void 0;if(!metric){return 0;}range=metric.range.end-metric.range.start;d=range<metric.manifestInfo.DVRWindowSize?range:metric.manifestInfo.DVRWindowSize;}return d;}/**\\n     * Use this method to get the current playhead time as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.\\n     * Note - this property only has meaning for live streams. If called before play() has begun, it will return a value of NaN.\\n     *\\n     * @returns {number} The current playhead time as UTC timestamp.\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function timeAsUTC(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}if(time()<0){return NaN;}return getAsUTC(time());}/**\\n     * Use this method to get the current duration as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.\\n     * Note - this property only has meaning for live streams.\\n     *\\n     * @returns {number} The current duration as UTC timestamp.\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function durationAsUTC(){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}return getAsUTC(duration());}/*\\n    ---------------------------------------------------------------------------\\n\\n        AUTO BITRATE\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Gets the top quality BitrateInfo checking portal limit and max allowed.\\n     * It calls getTopQualityIndexFor internally\\n     *\\n     * @param {MediaType} type - \\'video\\' or \\'audio\\'\\n     * @memberof module:MediaPlayer\\n     * @returns {BitrateInfo | null}\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getTopBitrateInfoFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}return abrController.getTopBitrateInfoFor(type);}/**\\n     * Gets the current download quality for media type video, audio or images. For video and audio types the ABR\\n     * rules update this value before every new download unless setAutoSwitchQualityFor(type, false) is called. For \\'image\\'\\n     * type, thumbnails, there is no ABR algorithm and quality is set manually.\\n     *\\n     * @param {MediaType} type - \\'video\\', \\'audio\\' or \\'image\\' (thumbnails)\\n     * @returns {number} the quality index, 0 corresponding to the lowest bitrate\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#setAutoSwitchQualityFor setAutoSwitchQualityFor()}\\n     * @see {@link module:MediaPlayer#setQualityFor setQualityFor()}\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getQualityFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}if(type===_Constants2.default.IMAGE){var activeStream=getActiveStream();if(!activeStream){return-1;}var thumbnailController=activeStream.getThumbnailController();return!thumbnailController?-1:thumbnailController.getCurrentTrackIndex();}return abrController.getQualityFor(type);}/**\\n     * Sets the current quality for media type instead of letting the ABR Heuristics automatically selecting it.\\n     * This value will be overwritten by the ABR rules unless setAutoSwitchQualityFor(type, false) is called.\\n     *\\n     * @param {MediaType} type - \\'video\\', \\'audio\\' or \\'image\\'\\n     * @param {number} value - the quality index, 0 corresponding to the lowest bitrate\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#setAutoSwitchQualityFor setAutoSwitchQualityFor()}\\n     * @see {@link module:MediaPlayer#getQualityFor getQualityFor()}\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function setQualityFor(type,value){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}if(type===_Constants2.default.IMAGE){var activeStream=getActiveStream();if(!activeStream){return;}var thumbnailController=activeStream.getThumbnailController();if(thumbnailController){thumbnailController.setTrackByIndex(value);}}abrController.setPlaybackQuality(type,streamController.getActiveStreamInfo(),value);}/**\\n     * Update the video element size variables\\n     * Should be called on window resize (or any other time player is resized). Fullscreen does trigger a window resize event.\\n     *\\n     * Once windowResizeEventCalled = true, abrController.checkPortalSize() will use element size variables rather than querying clientWidth every time.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function updatePortalSize(){abrController.setElementSize();abrController.setWindowResizeEventCalled(true);}/*\\n    ---------------------------------------------------------------------------\\n\\n        MEDIA PLAYER CONFIGURATION\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * <p>Set to false to prevent stream from auto-playing when the view is attached.</p>\\n     *\\n     * @param {boolean} value\\n     * @default true\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#attachView attachView()}\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with an invalid argument, not boolean type.\\n     * @instance\\n     *\\n     */function setAutoPlay(value){(0,_SupervisorTools.checkParameterType)(value,\\'boolean\\');autoPlay=value;}/**\\n     * @returns {boolean} The current autoPlay state.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getAutoPlay(){return autoPlay;}/**\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     * @returns {number|NaN} Current live stream latency in seconds. It is the difference between current time and time position at the playback head.\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     */function getCurrentLiveLatency(){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}if(!playbackInitialized){return NaN;}return playbackController.getCurrentLiveLatency();}/**\\n     * Add a custom ABR Rule\\n     * Rule will be apply on next stream if a stream is being played\\n     *\\n     * @param {string} type - rule type (one of [\\'qualitySwitchRules\\',\\'abandonFragmentRules\\'])\\n     * @param {string} rulename - name of rule (used to identify custom rule). If one rule of same name has been added, then existing rule will be updated\\n     * @param {object} rule - the rule object instance\\n     * @memberof module:MediaPlayer\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with invalid arguments.\\n     * @instance\\n     */function addABRCustomRule(type,rulename,rule){mediaPlayerModel.addABRCustomRule(type,rulename,rule);}/**\\n     * Remove a custom ABR Rule\\n     *\\n     * @param {string} rulename - name of the rule to be removed\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function removeABRCustomRule(rulename){mediaPlayerModel.removeABRCustomRule(rulename);}/**\\n     * Remove all custom rules\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function removeAllABRCustomRule(){mediaPlayerModel.removeABRCustomRule();}/**\\n     * <p>Allows you to set a scheme and server source for UTC live edge detection for dynamic streams.\\n     * If UTCTiming is defined in the manifest, it will take precedence over any time source manually added.</p>\\n     * <p>If you have exposed the Date header, use the method {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}.\\n     * This will allow the date header on the manifest to be used instead of a time server</p>\\n     * @param {string} schemeIdUri - <ul>\\n     * <li>urn:mpeg:dash:utc:http-head:2014</li>\\n     * <li>urn:mpeg:dash:utc:http-xsdate:2014</li>\\n     * <li>urn:mpeg:dash:utc:http-iso:2014</li>\\n     * <li>urn:mpeg:dash:utc:direct:2014</li>\\n     * </ul>\\n     * <p>Some specs referencing early ISO23009-1 drafts incorrectly use\\n     * 2012 in the URI, rather than 2014. support these for now.</p>\\n     * <ul>\\n     * <li>urn:mpeg:dash:utc:http-head:2012</li>\\n     * <li>urn:mpeg:dash:utc:http-xsdate:2012</li>\\n     * <li>urn:mpeg:dash:utc:http-iso:2012</li>\\n     * <li>urn:mpeg:dash:utc:direct:2012</li>\\n     * </ul>\\n     * @param {string} value - Path to a time source.\\n     * @default\\n     * <ul>\\n     *     <li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li>\\n     *     <li>value:http://time.akamai.com/?iso&ms/li>\\n     * </ul>\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#removeUTCTimingSource removeUTCTimingSource()}\\n     * @instance\\n     */function addUTCTimingSource(schemeIdUri,value){mediaPlayerModel.addUTCTimingSource(schemeIdUri,value);}/**\\n     * <p>Allows you to remove a UTC time source. Both schemeIdUri and value need to match the Dash.vo.UTCTiming properties in order for the\\n     * entry to be removed from the array</p>\\n     * @param {string} schemeIdUri - see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\\n     * @param {string} value - see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}\\n     * @throws {@link Constants#BAD_ARGUMENT_ERROR BAD_ARGUMENT_ERROR} if called with invalid arguments, schemeIdUri and value are not string type.\\n     * @instance\\n     */function removeUTCTimingSource(schemeIdUri,value){mediaPlayerModel.removeUTCTimingSource(schemeIdUri,value);}/**\\n     * <p>Allows you to clear the stored array of time sources.</p>\\n     * <p>Example use: If you have exposed the Date header, calling this method\\n     * will allow the date header on the manifest to be used instead of the time server.</p>\\n     * <p>Example use: Calling this method, assuming there is not an exposed date header on the manifest,  will default back\\n     * to using a binary search to discover the live edge</p>\\n     *\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#restoreDefaultUTCTimingSources restoreDefaultUTCTimingSources()}\\n     * @instance\\n     */function clearDefaultUTCTimingSources(){mediaPlayerModel.clearDefaultUTCTimingSources();}/**\\n     * <p>Allows you to restore the default time sources after calling {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}</p>\\n     *\\n     * @default\\n     * <ul>\\n     *     <li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li>\\n     *     <li>value:http://time.akamai.com/?iso&ms</li>\\n     * </ul>\\n     *\\n     * @memberof module:MediaPlayer\\n     * @see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\\n     * @instance\\n     */function restoreDefaultUTCTimingSources(){mediaPlayerModel.restoreDefaultUTCTimingSources();}/**\\n     * Returns the average throughput computed in the ABR logic\\n     *\\n     * @param {MediaType} type\\n     * @return {number} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getAverageThroughput(type){var throughputHistory=abrController.getThroughputHistory();return throughputHistory?throughputHistory.getAverageThroughput(type):0;}/**\\n     * Sets whether withCredentials on XHR requests for a particular request\\n     * type is true or false\\n     *\\n     * @default false\\n     * @param {string} type - one of HTTPRequest.*_TYPE\\n     * @param {boolean} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setXHRWithCredentialsForType(type,value){mediaPlayerModel.setXHRWithCredentialsForType(type,value);}/**\\n     * Gets whether withCredentials on XHR requests for a particular request\\n     * type is true or false\\n     *\\n     * @param {string} type - one of HTTPRequest.*_TYPE\\n     * @return {boolean}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getXHRWithCredentialsForType(type){return mediaPlayerModel.getXHRWithCredentialsForType(type);}/*\\n    ---------------------------------------------------------------------------\\n\\n        OFFLINE\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Detects if Offline is included and returns an instance of OfflineController.js\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getOfflineController(){return detectOffline();}/*\\n    ---------------------------------------------------------------------------\\n\\n        METRICS\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Returns the DashMetrics.js Module. You use this Module to get access to all the public metrics\\n     * stored in dash.js\\n     *\\n     * @see {@link module:DashMetrics}\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDashMetrics(){return dashMetrics;}/*\\n    ---------------------------------------------------------------------------\\n\\n        TEXT MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Set default language for text. If default language is not one of text tracks, dash will choose the first one.\\n     *\\n     * @param {string} lang - default language\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     * @deprecated will be removed in version 3.2.0. Please use setInitialMediaSettingsFor(\"fragmentedText\", { lang: lang }) instead\\n     */function setTextDefaultLanguage(lang){logger.warn(\\'setTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use setInitialMediaSettingsFor(\"fragmentedText\", { lang: lang }) instead\\');if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.setTextDefaultLanguage(lang);}/**\\n     * Get default language for text.\\n     *\\n     * @return {string} the default language if it has been set using setTextDefaultLanguage\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     * @deprecated will be removed in version 3.2.0. Please use getInitialMediaSettingsFor(\"fragmentedText\").lang instead\\n     */function getTextDefaultLanguage(){logger.warn(\\'getTextDefaultLanguage is deprecated and will be removed in version 3.2.0. Please use getInitialMediaSettingsFor(\"fragmentedText\").lang instead\\');if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}return textController.getTextDefaultLanguage();}/**\\n     * Set enabled default state.\\n     * This is used to enable/disable text when a file is loaded.\\n     * During playback, use enableText to enable text for the file\\n     *\\n     * @param {boolean} enable - true to enable text, false otherwise\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setTextDefaultEnabled(enable){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.setTextDefaultEnabled(enable);}/**\\n     * Get enabled default state.\\n     *\\n     * @return {boolean}  default enable state\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getTextDefaultEnabled(){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}return textController.getTextDefaultEnabled();}/**\\n     * Enable/disable text\\n     * When enabling text, dash will choose the previous selected text track\\n     *\\n     * @param {boolean} enable - true to enable text, false otherwise (same as setTextTrack(-1))\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function enableText(enable){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.enableText(enable);}/**\\n     * Enable/disable text\\n     * When enabling dash will keep downloading and process fragmented text tracks even if all tracks are in mode \"hidden\"\\n     *\\n     * @param {boolean} enable - true to enable text streaming even if all text tracks are hidden.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function enableForcedTextStreaming(enable){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.enableForcedTextStreaming(enable);}/**\\n     * Return if text is enabled\\n     *\\n     * @return {boolean} return true if text is enabled, false otherwise\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function isTextEnabled(){if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}return textController.isTextEnabled();}/**\\n     * Use this method to change the current text track for both external time text files and fragmented text tracks. There is no need to\\n     * set the track mode on the video object to switch a track when using this method.\\n     * @param {number} idx - Index of track based on the order of the order the tracks are added Use -1 to disable all tracks. (turn captions off).  Use module:MediaPlayer#dashjs.MediaPlayer.events.TEXT_TRACK_ADDED.\\n     * @see {@link MediaPlayerEvents#event:TEXT_TRACK_ADDED dashjs.MediaPlayer.events.TEXT_TRACK_ADDED}\\n     * @throws {@link module:MediaPlayer~PLAYBACK_NOT_INITIALIZED_ERROR PLAYBACK_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setTextTrack(idx){if(!playbackInitialized){throw PLAYBACK_NOT_INITIALIZED_ERROR;}if(textController===undefined){textController=(0,_TextController2.default)(context).getInstance();}textController.setTextTrack(idx);}function getCurrentTextTrackIndex(){var idx=NaN;if(textController){idx=textController.getCurrentTrackIdx();}return idx;}/**\\n     * This method serves to control captions z-index value. If \\'true\\' is passed, the captions will have the highest z-index and be\\n     * displayed on top of other html elements. Default value is \\'false\\' (z-index is not set).\\n     * @param {boolean} value\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function displayCaptionsOnTop(value){var textTracks=(0,_TextTracks2.default)(context).getInstance();textTracks.setConfig({videoModel:videoModel});textTracks.initialize();textTracks.setDisplayCConTop(value);}/*\\n    ---------------------------------------------------------------------------\\n\\n        VIDEO ELEMENT MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Returns instance of Video Element that was attached by calling attachView()\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~ELEMENT_NOT_ATTACHED_ERROR ELEMENT_NOT_ATTACHED_ERROR} if called before attachView function\\n     * @instance\\n     */function getVideoElement(){if(!videoModel.getElement()){throw ELEMENT_NOT_ATTACHED_ERROR;}return videoModel.getElement();}/**\\n     * Use this method to attach an HTML5 VideoElement for dash.js to operate upon.\\n     *\\n     * @param {Object} element - An HTMLMediaElement that has already been defined in the DOM (or equivalent stub).\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function attachView(element){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}videoModel.setElement(element);if(element){detectProtection();detectMetricsReporting();detectMss();if(streamController){streamController.switchToVideoElement();}}if(playbackInitialized){//Reset if we have been playing before, so this is a new element.\\nresetPlaybackControllers();}initializePlayback();}/**\\n     * Returns instance of Div that was attached by calling attachTTMLRenderingDiv()\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getTTMLRenderingDiv(){return videoModel?videoModel.getTTMLRenderingDiv():null;}/**\\n     * Use this method to attach an HTML5 div for dash.js to render rich TTML subtitles.\\n     *\\n     * @param {HTMLDivElement} div - An unstyled div placed after the video element. It will be styled to match the video size and overlay z-order.\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~ELEMENT_NOT_ATTACHED_ERROR ELEMENT_NOT_ATTACHED_ERROR} if called before attachView function\\n     * @instance\\n     */function attachTTMLRenderingDiv(div){if(!videoModel.getElement()){throw ELEMENT_NOT_ATTACHED_ERROR;}videoModel.setTTMLRenderingDiv(div);}/*\\n    ---------------------------------------------------------------------------\\n\\n        STREAM AND TRACK MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * @param {MediaType} type\\n     * @returns {Array}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getBitrateInfoListFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var stream=getActiveStream();return stream?stream.getBitrateListFor(type):[];}/**\\n     * This method returns the list of all available streams from a given manifest\\n     * @param {Object} manifest\\n     * @returns {Array} list of {@link StreamInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getStreamsFromManifest(manifest){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}return adapter.getStreamsInfo(manifest);}/**\\n     * This method returns the list of all available tracks for a given media type\\n     * @param {MediaType} type\\n     * @returns {Array} list of {@link MediaInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getTracksFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var streamInfo=streamController.getActiveStreamInfo();return mediaController.getTracksFor(type,streamInfo);}/**\\n     * This method returns the list of all available tracks for a given media type and streamInfo from a given manifest\\n     * @param {MediaType} type\\n     * @param {Object} manifest\\n     * @param {Object} streamInfo\\n     * @returns {Array}  list of {@link MediaInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getTracksForTypeFromManifest(type,manifest,streamInfo){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}streamInfo=streamInfo||adapter.getStreamsInfo(manifest,1)[0];return streamInfo?adapter.getAllMediaInfoForType(streamInfo,type,manifest):[];}/**\\n     * @param {MediaType} type\\n     * @returns {Object|null} {@link MediaInfo}\\n     *\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function getCurrentTrackFor(type){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var streamInfo=streamController.getActiveStreamInfo();return mediaController.getCurrentTrackFor(type,streamInfo);}/**\\n     * This method allows to set media settings that will be used to pick the initial track. Format of the settings\\n     * is following: <br />\\n     * {lang: langValue (can be either a string or a regex to match),\\n     *  index: indexValue,\\n     *  viewpoint: viewpointValue,\\n     *  audioChannelConfiguration: audioChannelConfigurationValue,\\n     *  accessibility: accessibilityValue,\\n     *  role: roleValue}\\n     *\\n     * @param {MediaType} type\\n     * @param {Object} value\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function setInitialMediaSettingsFor(type,value){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}mediaController.setInitialSettings(type,value);if(type===_Constants2.default.FRAGMENTED_TEXT){textController.setInitialSettings(value);}}/**\\n     * This method returns media settings that is used to pick the initial track. Format of the settings\\n     * is following:\\n     * {lang: langValue,\\n     *  index: indexValue,\\n     *  viewpoint: viewpointValue,\\n     *  audioChannelConfiguration: audioChannelConfigurationValue,\\n     *  accessibility: accessibilityValue,\\n     *  role: roleValue}\\n     * @param {MediaType} type\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function getInitialMediaSettingsFor(type){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}return mediaController.getInitialSettings(type);}/**\\n     * @param {MediaInfo} track - instance of {@link MediaInfo}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @instance\\n     */function setCurrentTrack(track){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}mediaController.setTrack(track);}/**\\n     * This method returns the current track switch mode.\\n     *\\n     * @param {MediaType} type\\n     * @returns {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function getTrackSwitchModeFor(type){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}return mediaController.getSwitchMode(type);}/**\\n     * This method sets the current track switch mode. Available options are:\\n     *\\n     * Constants.TRACK_SWITCH_MODE_NEVER_REPLACE\\n     * (used to forbid clearing the buffered data (prior to current playback position) after track switch.\\n     * Defers to fastSwitchEnabled for placement of new data. Default for video)\\n     *\\n     * Constants.TRACK_SWITCH_MODE_ALWAYS_REPLACE\\n     * (used to clear the buffered data (prior to current playback position) after track switch. Default for audio)\\n     *\\n     * @param {MediaType} type\\n     * @param {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function setTrackSwitchModeFor(type,mode){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}mediaController.setSwitchMode(type,mode);}/**\\n     * This method sets the selection mode for the initial track. This mode defines how the initial track will be selected\\n     * if no initial media settings are set. If initial media settings are set this parameter will be ignored. Available options are:\\n     *\\n     * Constants.TRACK_SELECTION_MODE_HIGHEST_BITRATE\\n     * This mode makes the player select the track with a highest bitrate. This mode is a default mode.\\n     *\\n     * Constants.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY\\n     * This mode makes the player select the track with the lowest bitrate per pixel average.\\n     *\\n     * Constants.TRACK_SELECTION_MODE_WIDEST_RANGE\\n     * This mode makes the player select the track with a widest range of bitrates.\\n     *\\n     * @param {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function setSelectionModeForInitialTrack(mode){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}mediaController.setSelectionModeForInitialTrack(mode);}/**\\n     * This method returns the track selection mode.\\n     *\\n     * @returns {string} mode\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     * @instance\\n     */function getSelectionModeForInitialTrack(){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}return mediaController.getSelectionModeForInitialTrack();}/*\\n    ---------------------------------------------------------------------------\\n\\n        PROTECTION MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Detects if Protection is included and returns an instance of ProtectionController.js\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getProtectionController(){return detectProtection();}/**\\n     * Will override dash.js protection controller.\\n     * @param {ProtectionController} value - valid protection controller instance.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function attachProtectionController(value){protectionController=value;}/**\\n     * Sets Protection Data required to setup the Protection Module (DRM). Protection Data must\\n     * be set before initializing MediaPlayer or, once initialized, before PROTECTION_CREATED event is fired.\\n     * @see {@link module:MediaPlayer#initialize initialize()}\\n     * @see {@link ProtectionEvents#event:PROTECTION_CREATED dashjs.Protection.events.PROTECTION_CREATED}\\n     * @param {ProtectionDataSet} value - object containing\\n     * property names corresponding to key system name strings and associated\\n     * values being instances of.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function setProtectionData(value){protectionData=value;// Propagate changes in case StreamController is already created\\nif(streamController){streamController.setProtectionData(protectionData);}}/**\\n     * Registers a license request filter. This enables application to manipulate/overwrite any request parameter and/or request data.\\n     * The provided callback function shall return a promise that shall be resolved once the filter process is completed.\\n     * The filters are applied in the order they are registered.\\n     * @param {function} filter - the license request filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function registerLicenseRequestFilter(filter){licenseRequestFilters.push(filter);if(protectionController){protectionController.setLicenseRequestFilters(licenseRequestFilters);}}/**\\n     * Registers a license response filter. This enables application to manipulate/overwrite the response data\\n     * The provided callback function shall return a promise that shall be resolved once the filter process is completed.\\n     * The filters are applied in the order they are registered.\\n     * @param {function} filter - the license response filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function registerLicenseResponseFilter(filter){licenseResponseFilters.push(filter);if(protectionController){protectionController.setLicenseResponseFilters(licenseResponseFilters);}}/**\\n     * Unregisters a license request filter.\\n     * @param {function} filter - the license request filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function unregisterLicenseRequestFilter(filter){unregisterFilter(licenseRequestFilters,filter);if(protectionController){protectionController.setLicenseRequestFilters(licenseRequestFilters);}}/**\\n     * Unregisters a license response filter.\\n     * @param {function} filter - the license response filter callback\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function unregisterLicenseResponseFilter(filter){unregisterFilter(licenseResponseFilters,filter);if(protectionController){protectionController.setLicenseResponseFilters(licenseResponseFilters);}}function unregisterFilter(filters,filter){var index=-1;filters.some(function(item,i){if(item===filter){index=i;return true;}});if(index<0)return;filters.splice(index,1);}/*\\n    ---------------------------------------------------------------------------\\n\\n        THUMBNAILS MANAGEMENT\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Provide the thumbnail at time position. This can be asynchronous, so you must provide a callback ro retrieve thumbnails informations\\n     * @param {number} time - A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected\\n     * @param {function} callback - A Callback function provided when retrieving thumbnail the given time position. Thumbnail object is null in case there are is not a thumbnails representation or\\n     * if it doesn\\'t contain a thumbnail for the given time position.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function provideThumbnail(time,callback){if(typeof callback!==\\'function\\'){return;}if(time<0){callback(null);return;}var s=playbackController.getIsDynamic()?getDVRSeekOffset(time):time;var stream=streamController.getStreamForTime(s);if(stream===null){callback(null);return;}var thumbnailController=stream.getThumbnailController();if(!thumbnailController){callback(null);return;}var timeInPeriod=streamController.getTimeRelativeToStreamId(s,stream.getId());return thumbnailController.provide(timeInPeriod,callback);}/*\\n    ---------------------------------------------------------------------------\\n\\n        TOOLS AND OTHERS FUNCTIONS\\n\\n    ---------------------------------------------------------------------------\\n    *//**\\n     * Allows application to retrieve a manifest.  Manifest loading is asynchro\\n     * nous and\\n     * requires the app-provided callback function\\n     *\\n     * @param {string} url - url the manifest url\\n     * @param {function} callback - A Callback function provided when retrieving manifests\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function retrieveManifest(url,callback){var manifestLoader=createManifestLoader();var self=this;var handler=function handler(e){if(!e.error){callback(e.manifest);}else{callback(null,e.error);}eventBus.off(_Events2.default.INTERNAL_MANIFEST_LOADED,handler,self);manifestLoader.reset();};eventBus.on(_Events2.default.INTERNAL_MANIFEST_LOADED,handler,self);uriFragmentModel.initialize(url);manifestLoader.load(url);}/**\\n     * Returns the source string or manifest that was attached by calling attachSource()\\n     * @returns {string | manifest}\\n     * @memberof module:MediaPlayer\\n     * @throws {@link module:MediaPlayer~SOURCE_NOT_ATTACHED_ERROR SOURCE_NOT_ATTACHED_ERROR} if called before attachSource function\\n     * @instance\\n     */function getSource(){if(!source){throw SOURCE_NOT_ATTACHED_ERROR;}return source;}/**\\n     * Use this method to set a source URL to a valid MPD manifest file OR\\n     * a previously downloaded and parsed manifest object.  Optionally, can\\n     * also provide protection information\\n     *\\n     * @param {string|Object} urlOrManifest - A URL to a valid MPD manifest file, or a\\n     * parsed manifest object.\\n     *\\n     *\\n     * @throws {@link module:MediaPlayer~MEDIA_PLAYER_NOT_INITIALIZED_ERROR MEDIA_PLAYER_NOT_INITIALIZED_ERROR} if called before initialize function\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function attachSource(urlOrManifest){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}if(typeof urlOrManifest===\\'string\\'){uriFragmentModel.initialize(urlOrManifest);}source=urlOrManifest;if(streamingInitialized||playbackInitialized){resetPlaybackControllers();}if(isReady()){initializePlayback();}}/**\\n     * Get the current settings object being used on the player.\\n     * @returns {PlayerSettings} The settings object being used.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getSettings(){return settings.get();}/**\\n     * @summary Update the current settings object being used on the player. Anything left unspecified is not modified.\\n     * @param {PlayerSettings} settingsObj - An object corresponding to the settings definition.\\n     * @description This function does not update the entire object, only properties in the passed in object are updated.\\n     *\\n     * This means that updateSettings({a: x}) and updateSettings({b: y}) are functionally equivalent to\\n     * updateSettings({a: x, b: y}). If the default values are required again, @see{@link resetSettings}.\\n     * @example\\n     * player.updateSettings({\\n     *      streaming: {\\n     *          liveDelayFragmentCount: 8\\n     *          abr: {\\n     *              maxBitrate: { audio: 100, video: 1000 }\\n     *          }\\n     *      }\\n     *  });\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function updateSettings(settingsObj){settings.update(settingsObj);}/**\\n     * Resets the settings object back to the default.\\n     *\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function resetSettings(){settings.reset();}/**\\n     * A utility methods which converts UTC timestamp value into a valid time and date string.\\n     *\\n     * @param {number} time - UTC timestamp to be converted into date and time.\\n     * @param {string} locales - a region identifier (i.e. en_US).\\n     * @param {boolean} hour12 - 12 vs 24 hour. Set to true for 12 hour time formatting.\\n     * @param {boolean} withDate - default is false. Set to true to append current date to UTC time format.\\n     * @returns {string} A formatted time and date string.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function formatUTC(time,locales,hour12){var withDate=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var dt=new Date(time*1000);var d=dt.toLocaleDateString(locales);var t=dt.toLocaleTimeString(locales,{hour12:hour12});return withDate?t+\\' \\'+d:t;}/**\\n     * A utility method which converts seconds into TimeCode (i.e. 300 --\\x3e 05:00).\\n     *\\n     * @param {number} value - A number in seconds to be converted into a formatted time code.\\n     * @returns {string} A formatted time code string.\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function convertToTimeCode(value){value=Math.max(value,0);var h=Math.floor(value/3600);var m=Math.floor(value%3600/60);var s=Math.floor(value%3600%60);return(h===0?\\'\\':h<10?\\'0\\'+h.toString()+\\':\\':h.toString()+\\':\\')+(m<10?\\'0\\'+m.toString():m.toString())+\\':\\'+(s<10?\\'0\\'+s.toString():s.toString());}/**\\n     * This method should be used to extend or replace internal dash.js objects.\\n     * There are two ways to extend dash.js (determined by the override argument):\\n     * <ol>\\n     * <li>If you set override to true any public method or property in your custom object will\\n     * override the dash.js parent object\\'s property(ies) and will be used instead but the\\n     * dash.js parent module will still be created.</li>\\n     *\\n     * <li>If you set override to false your object will completely replace the dash.js object.\\n     * (Note: This is how it was in 1.x of Dash.js with Dijon).</li>\\n     * </ol>\\n     * <b>When you extend you get access to this.context, this.factory and this.parent to operate with in your custom object.</b>\\n     * <ul>\\n     * <li><b>this.context</b> - can be used to pass context for singleton access.</li>\\n     * <li><b>this.factory</b> - can be used to call factory.getSingletonInstance().</li>\\n     * <li><b>this.parent</b> - is the reference of the parent object to call other public methods. (this.parent is excluded if you extend with override set to false or option 2)</li>\\n     * </ul>\\n     * <b>You must call extend before you call initialize</b>\\n     * @see {@link module:MediaPlayer#initialize initialize()}\\n     * @param {string} parentNameString - name of parent module\\n     * @param {Object} childInstance - overriding object\\n     * @param {boolean} override - replace only some methods (true) or the whole object (false)\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function extend(parentNameString,childInstance,override){_FactoryMaker2.default.extend(parentNameString,childInstance,override,context);}/**\\n     * This method returns the active stream\\n     *\\n     * @throws {@link module:MediaPlayer~STREAMING_NOT_INITIALIZED_ERROR STREAMING_NOT_INITIALIZED_ERROR} if called before initializePlayback function\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getActiveStream(){if(!streamingInitialized){throw STREAMING_NOT_INITIALIZED_ERROR;}var streamInfo=streamController.getActiveStreamInfo();return streamInfo?streamController.getStreamById(streamInfo.id):null;}//***********************************\\n// PRIVATE METHODS\\n//***********************************\\nfunction resetPlaybackControllers(){playbackInitialized=false;streamingInitialized=false;adapter.reset();streamController.reset();gapController.reset();playbackController.reset();abrController.reset();mediaController.reset();textController.reset();if(protectionController){if(settings.get().streaming.keepProtectionMediaKeys){protectionController.stop();}else{protectionController.reset();protectionController=null;detectProtection();}}cmcdModel.reset();}function createPlaybackControllers(){// creates or get objects instances\\nvar manifestLoader=createManifestLoader();if(!streamController){streamController=(0,_StreamController2.default)(context).getInstance();}capabilitiesFilter.setConfig({capabilities:capabilities,adapter:adapter,settings:settings});streamController.setConfig({capabilities:capabilities,capabilitiesFilter:capabilitiesFilter,manifestLoader:manifestLoader,manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,protectionController:protectionController,adapter:adapter,dashMetrics:dashMetrics,errHandler:errHandler,timelineConverter:timelineConverter,videoModel:videoModel,playbackController:playbackController,abrController:abrController,mediaController:mediaController,textController:textController,settings:settings,baseURLController:baseURLController});gapController.setConfig({settings:settings,playbackController:playbackController,streamController:streamController,videoModel:videoModel,timelineConverter:timelineConverter,adapter:adapter});playbackController.setConfig({streamController:streamController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,adapter:adapter,videoModel:videoModel,timelineConverter:timelineConverter,uriFragmentModel:uriFragmentModel,settings:settings});abrController.setConfig({streamController:streamController,domStorage:domStorage,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,adapter:adapter,videoModel:videoModel,settings:settings});textController.setConfig({errHandler:errHandler,manifestModel:manifestModel,adapter:adapter,mediaController:mediaController,streamController:streamController,videoModel:videoModel});cmcdModel.setConfig({abrController:abrController,dashMetrics:dashMetrics,playbackController:playbackController});// initialises controller\\nstreamController.initialize(autoPlay,protectionData);gapController.initialize();cmcdModel.initialize();}function createManifestLoader(){return(0,_ManifestLoader2.default)(context).create({debug:debug,errHandler:errHandler,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,requestModifier:(0,_RequestModifier2.default)(context).getInstance(),mssHandler:mssHandler,settings:settings});}function detectProtection(){if(protectionController){return protectionController;}// do not require Protection as dependencies as this is optional and intended to be loaded separately\\nvar Protection=dashjs.Protection;/* jshint ignore:line */if(typeof Protection===\\'function\\'){//TODO need a better way to register/detect plugin components\\nvar protection=Protection(context).create();_Events2.default.extend(Protection.events);_MediaPlayerEvents2.default.extend(Protection.events,{publicOnly:true});_Errors2.default.extend(Protection.errors);if(!capabilities){capabilities=(0,_Capabilities2.default)(context).getInstance();}protectionController=protection.createProtectionSystem({debug:debug,errHandler:errHandler,videoModel:videoModel,capabilities:capabilities,eventBus:eventBus,events:_Events2.default,BASE64:_base2.default,constants:_Constants2.default,cmcdModel:cmcdModel});if(protectionController){protectionController.setLicenseRequestFilters(licenseRequestFilters);protectionController.setLicenseResponseFilters(licenseResponseFilters);}return protectionController;}return null;}function detectMetricsReporting(){if(metricsReportingController){return;}// do not require MetricsReporting as dependencies as this is optional and intended to be loaded separately\\nvar MetricsReporting=dashjs.MetricsReporting;/* jshint ignore:line */if(typeof MetricsReporting===\\'function\\'){//TODO need a better way to register/detect plugin components\\nvar metricsReporting=MetricsReporting(context).create();metricsReportingController=metricsReporting.createMetricsReporting({debug:debug,eventBus:eventBus,mediaElement:getVideoElement(),adapter:adapter,dashMetrics:dashMetrics,events:_Events2.default,constants:_Constants2.default,metricsConstants:_MetricsConstants2.default});}}function detectMss(){if(mssHandler){return;}// do not require MssHandler as dependencies as this is optional and intended to be loaded separately\\nvar MssHandler=dashjs.MssHandler;/* jshint ignore:line */if(typeof MssHandler===\\'function\\'){//TODO need a better way to register/detect plugin components\\n_Errors2.default.extend(MssHandler.errors);mssHandler=MssHandler(context).create({eventBus:eventBus,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,manifestModel:manifestModel,playbackController:playbackController,streamController:streamController,protectionController:protectionController,baseURLController:baseURLController,errHandler:errHandler,events:_Events2.default,constants:_Constants2.default,debug:debug,initSegmentType:_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:_base2.default,ISOBoxer:_codemIsoboxer2.default,settings:settings});}}function detectOffline(){if(!mediaPlayerInitialized){throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;}if(offlineController){return offlineController;}// do not require Offline as dependencies as this is optional and intended to be loaded separately\\nvar OfflineController=dashjs.OfflineController;/* jshint ignore:line */if(typeof OfflineController===\\'function\\'){//TODO need a better way to register/detect plugin components\\n_Events2.default.extend(OfflineController.events);_MediaPlayerEvents2.default.extend(OfflineController.events,{publicOnly:true});_Errors2.default.extend(OfflineController.errors);var manifestLoader=createManifestLoader();var manifestUpdater=(0,_ManifestUpdater2.default)(context).create();manifestUpdater.setConfig({manifestModel:manifestModel,adapter:adapter,manifestLoader:manifestLoader,errHandler:errHandler});offlineController=OfflineController(context).create({debug:debug,manifestUpdater:manifestUpdater,baseURLController:baseURLController,manifestLoader:manifestLoader,manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,abrController:abrController,playbackController:playbackController,adapter:adapter,errHandler:errHandler,dashMetrics:dashMetrics,timelineConverter:timelineConverter,schemeLoaderFactory:schemeLoaderFactory,eventBus:eventBus,events:_Events2.default,errors:_Errors2.default,constants:_Constants2.default,settings:settings,dashConstants:_DashConstants2.default,urlUtils:(0,_URLUtils2.default)(context).getInstance()});return offlineController;}return null;}function getAsUTC(valToConvert){var metric=dashMetrics.getCurrentDVRInfo();var availableFrom=void 0,utcValue=void 0;if(!metric){return 0;}availableFrom=metric.manifestInfo.availableFrom.getTime()/1000;utcValue=valToConvert+(availableFrom+metric.range.start);return utcValue;}function initializePlayback(){if(offlineController){offlineController.resetRecords();}if(!streamingInitialized&&source){streamingInitialized=true;logger.info(\\'Streaming Initialized\\');createPlaybackControllers();if(typeof source===\\'string\\'){streamController.load(source);}else{streamController.loadWithManifest(source);}}if(!playbackInitialized&&isReady()){playbackInitialized=true;logger.info(\\'Playback Initialized\\');}}/**\\n     * Returns the DashAdapter.js Module.\\n     *\\n     * @see {@link module:DashAdapter}\\n     * @returns {Object}\\n     * @memberof module:MediaPlayer\\n     * @instance\\n     */function getDashAdapter(){return adapter;}instance={initialize:initialize,setConfig:setConfig,on:on,off:off,extend:extend,attachView:attachView,attachSource:attachSource,isReady:isReady,preload:preload,play:play,isPaused:isPaused,pause:pause,isSeeking:isSeeking,isDynamic:isDynamic,seek:seek,setPlaybackRate:setPlaybackRate,getPlaybackRate:getPlaybackRate,setMute:setMute,isMuted:isMuted,setVolume:setVolume,getVolume:getVolume,time:time,duration:duration,timeAsUTC:timeAsUTC,durationAsUTC:durationAsUTC,getActiveStream:getActiveStream,getDVRWindowSize:getDVRWindowSize,getDVRSeekOffset:getDVRSeekOffset,convertToTimeCode:convertToTimeCode,formatUTC:formatUTC,getVersion:getVersion,getDebug:getDebug,getBufferLength:getBufferLength,getTTMLRenderingDiv:getTTMLRenderingDiv,getVideoElement:getVideoElement,getSource:getSource,getCurrentLiveLatency:getCurrentLiveLatency,getTopBitrateInfoFor:getTopBitrateInfoFor,setAutoPlay:setAutoPlay,getAutoPlay:getAutoPlay,getDashMetrics:getDashMetrics,getQualityFor:getQualityFor,setQualityFor:setQualityFor,updatePortalSize:updatePortalSize,setTextDefaultLanguage:setTextDefaultLanguage,getTextDefaultLanguage:getTextDefaultLanguage,setTextDefaultEnabled:setTextDefaultEnabled,getTextDefaultEnabled:getTextDefaultEnabled,enableText:enableText,enableForcedTextStreaming:enableForcedTextStreaming,isTextEnabled:isTextEnabled,setTextTrack:setTextTrack,getBitrateInfoListFor:getBitrateInfoListFor,getStreamsFromManifest:getStreamsFromManifest,getTracksFor:getTracksFor,getTracksForTypeFromManifest:getTracksForTypeFromManifest,getCurrentTrackFor:getCurrentTrackFor,setInitialMediaSettingsFor:setInitialMediaSettingsFor,getInitialMediaSettingsFor:getInitialMediaSettingsFor,setCurrentTrack:setCurrentTrack,getTrackSwitchModeFor:getTrackSwitchModeFor,setTrackSwitchModeFor:setTrackSwitchModeFor,setSelectionModeForInitialTrack:setSelectionModeForInitialTrack,getSelectionModeForInitialTrack:getSelectionModeForInitialTrack,addABRCustomRule:addABRCustomRule,removeABRCustomRule:removeABRCustomRule,removeAllABRCustomRule:removeAllABRCustomRule,getAverageThroughput:getAverageThroughput,retrieveManifest:retrieveManifest,addUTCTimingSource:addUTCTimingSource,removeUTCTimingSource:removeUTCTimingSource,clearDefaultUTCTimingSources:clearDefaultUTCTimingSources,restoreDefaultUTCTimingSources:restoreDefaultUTCTimingSources,setXHRWithCredentialsForType:setXHRWithCredentialsForType,getXHRWithCredentialsForType:getXHRWithCredentialsForType,getProtectionController:getProtectionController,attachProtectionController:attachProtectionController,setProtectionData:setProtectionData,registerLicenseRequestFilter:registerLicenseRequestFilter,registerLicenseResponseFilter:registerLicenseResponseFilter,unregisterLicenseRequestFilter:unregisterLicenseRequestFilter,unregisterLicenseResponseFilter:unregisterLicenseResponseFilter,displayCaptionsOnTop:displayCaptionsOnTop,attachTTMLRenderingDiv:attachTTMLRenderingDiv,getCurrentTextTrackIndex:getCurrentTextTrackIndex,provideThumbnail:provideThumbnail,getDashAdapter:getDashAdapter,getOfflineController:getOfflineController,getSettings:getSettings,updateSettings:updateSettings,resetSettings:resetSettings,reset:reset,destroy:destroy};setup();return instance;}MediaPlayer.__dashjs_factory_name=\\'MediaPlayer\\';var factory=_FactoryMaker2.default.getClassFactory(MediaPlayer);factory.events=_MediaPlayerEvents2.default;factory.errors=_Errors2.default;_FactoryMaker2.default.updateClassFactory(MediaPlayer.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=MediaPlayer.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js?')},\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ../core/events/EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @implements EventsBase\\n */var MediaPlayerEvents=function(_EventsBase){_inherits(MediaPlayerEvents,_EventsBase);/**\\n     * @description Public facing external events to be used when developing a player that implements dash.js.\\n     */function MediaPlayerEvents(){_classCallCheck(this,MediaPlayerEvents);/**\\n         * Triggered when playback will not start yet\\n         * as the MPD's availabilityStartTime is in the future.\\n         * Check delay property in payload to determine time before playback will start.\\n         * @event MediaPlayerEvents#AST_IN_FUTURE\\n         */var _this=_possibleConstructorReturn(this,(MediaPlayerEvents.__proto__||Object.getPrototypeOf(MediaPlayerEvents)).call(this));_this.AST_IN_FUTURE='astInFuture';/**\\n         * Triggered when the video element's buffer state changes to stalled.\\n         * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\\n         * @event MediaPlayerEvents#BUFFER_EMPTY\\n         */_this.BUFFER_EMPTY='bufferStalled';/**\\n         * Triggered when the video element's buffer state changes to loaded.\\n         * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\\n         * @event MediaPlayerEvents#BUFFER_LOADED\\n         */_this.BUFFER_LOADED='bufferLoaded';/**\\n         * Triggered when the video element's buffer state changes, either stalled or loaded. Check payload for state.\\n         * @event MediaPlayerEvents#BUFFER_LEVEL_STATE_CHANGED\\n         */_this.BUFFER_LEVEL_STATE_CHANGED='bufferStateChanged';/**\\n         * Triggered when a dynamic stream changed to static (transition phase between Live and On-Demand).\\n         * @event MediaPlayerEvents#DYNAMIC_TO_STATIC\\n         */_this.DYNAMIC_TO_STATIC='dynamicToStatic';/**\\n         * Triggered when there is an error from the element or MSE source buffer.\\n         * @event MediaPlayerEvents#ERROR\\n         */_this.ERROR='error';/**\\n         * Triggered when a fragment download has completed.\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_COMPLETED\\n         */_this.FRAGMENT_LOADING_COMPLETED='fragmentLoadingCompleted';/**\\n         * Triggered when a partial fragment download has completed.\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_PROGRESS\\n         */_this.FRAGMENT_LOADING_PROGRESS='fragmentLoadingProgress';/**\\n         * Triggered when a fragment download has started.\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_STARTED\\n         */_this.FRAGMENT_LOADING_STARTED='fragmentLoadingStarted';/**\\n         * Triggered when a fragment download is abandoned due to detection of slow download base on the ABR abandon rule..\\n         * @event MediaPlayerEvents#FRAGMENT_LOADING_ABANDONED\\n         */_this.FRAGMENT_LOADING_ABANDONED='fragmentLoadingAbandoned';/**\\n         * Triggered when {@link module:Debug} logger methods are called.\\n         * @event MediaPlayerEvents#LOG\\n         */_this.LOG='log';//TODO refactor with internal event\\n/**\\n         * Triggered when the manifest load is complete\\n         * @event MediaPlayerEvents#MANIFEST_LOADED\\n         */_this.MANIFEST_LOADED='manifestLoaded';/**\\n         * Triggered anytime there is a change to the overall metrics.\\n         * @event MediaPlayerEvents#METRICS_CHANGED\\n         */_this.METRICS_CHANGED='metricsChanged';/**\\n         * Triggered when an individual metric is added, updated or cleared.\\n         * @event MediaPlayerEvents#METRIC_CHANGED\\n         */_this.METRIC_CHANGED='metricChanged';/**\\n         * Triggered every time a new metric is added.\\n         * @event MediaPlayerEvents#METRIC_ADDED\\n         */_this.METRIC_ADDED='metricAdded';/**\\n         * Triggered every time a metric is updated.\\n         * @event MediaPlayerEvents#METRIC_UPDATED\\n         */_this.METRIC_UPDATED='metricUpdated';/**\\n         * Triggered at the stream end of a period.\\n         * @event MediaPlayerEvents#PERIOD_SWITCH_COMPLETED\\n         */_this.PERIOD_SWITCH_COMPLETED='periodSwitchCompleted';/**\\n         * Triggered when a new period starts.\\n         * @event MediaPlayerEvents#PERIOD_SWITCH_STARTED\\n         */_this.PERIOD_SWITCH_STARTED='periodSwitchStarted';/**\\n         * Triggered when an ABR up /down switch is initiated; either by user in manual mode or auto mode via ABR rules.\\n         * @event MediaPlayerEvents#QUALITY_CHANGE_REQUESTED\\n         */_this.QUALITY_CHANGE_REQUESTED='qualityChangeRequested';/**\\n         * Triggered when the new ABR quality is being rendered on-screen.\\n         * @event MediaPlayerEvents#QUALITY_CHANGE_RENDERED\\n         */_this.QUALITY_CHANGE_RENDERED='qualityChangeRendered';/**\\n         * Triggered when the new track is being rendered.\\n         * @event MediaPlayerEvents#TRACK_CHANGE_RENDERED\\n         */_this.TRACK_CHANGE_RENDERED='trackChangeRendered';/**\\n         * Triggered when the source is setup and ready.\\n         * @event MediaPlayerEvents#SOURCE_INITIALIZED\\n         */_this.SOURCE_INITIALIZED='sourceInitialized';/**\\n         * Triggered when a stream (period) is being loaded\\n         * @event MediaPlayerEvents#STREAM_INITIALIZING\\n         */_this.STREAM_INITIALIZING='streamInitializing';/**\\n         * Triggered when a stream (period) is loaded\\n         * @event MediaPlayerEvents#STREAM_UPDATED\\n         */_this.STREAM_UPDATED='streamUpdated';/**\\n         * Triggered when a stream (period) is updated\\n         * @event MediaPlayerEvents#STREAM_INITIALIZED\\n         */_this.STREAM_INITIALIZED='streamInitialized';/**\\n         * Triggered when the player has been reset.\\n         * @event MediaPlayerEvents#STREAM_TEARDOWN_COMPLETE\\n         */_this.STREAM_TEARDOWN_COMPLETE='streamTeardownComplete';/**\\n         * Triggered once all text tracks detected in the MPD are added to the video element.\\n         * @event MediaPlayerEvents#TEXT_TRACKS_ADDED\\n         */_this.TEXT_TRACKS_ADDED='allTextTracksAdded';/**\\n         * Triggered when a text track is added to the video element's TextTrackList\\n         * @event MediaPlayerEvents#TEXT_TRACK_ADDED\\n         */_this.TEXT_TRACK_ADDED='textTrackAdded';/**\\n         * Triggered when a ttml chunk is parsed.\\n         * @event MediaPlayerEvents#TTML_PARSED\\n         */_this.TTML_PARSED='ttmlParsed';/**\\n         * Triggered when a ttml chunk has to be parsed.\\n         * @event MediaPlayerEvents#TTML_TO_PARSE\\n         */_this.TTML_TO_PARSE='ttmlToParse';/**\\n         * Triggered when a caption is rendered.\\n         * @event MediaPlayerEvents#CAPTION_RENDERED\\n         */_this.CAPTION_RENDERED='captionRendered';/**\\n         * Triggered when the caption container is resized.\\n         * @event MediaPlayerEvents#CAPTION_CONTAINER_RESIZE\\n         */_this.CAPTION_CONTAINER_RESIZE='captionContainerResize';/**\\n         * Sent when enough data is available that the media can be played,\\n         * at least for a couple of frames.  This corresponds to the\\n         * HAVE_ENOUGH_DATA readyState.\\n         * @event MediaPlayerEvents#CAN_PLAY\\n         */_this.CAN_PLAY='canPlay';/**\\n         * Sent when playback completes.\\n         * @event MediaPlayerEvents#PLAYBACK_ENDED\\n         */_this.PLAYBACK_ENDED='playbackEnded';/**\\n         * Sent when an error occurs.  The element's error\\n         * attribute contains more information.\\n         * @event MediaPlayerEvents#PLAYBACK_ERROR\\n         */_this.PLAYBACK_ERROR='playbackError';/**\\n         * Sent when playback is not allowed (for example if user gesture is needed).\\n         * @event MediaPlayerEvents#PLAYBACK_NOT_ALLOWED\\n         */_this.PLAYBACK_NOT_ALLOWED='playbackNotAllowed';/**\\n         * The media's metadata has finished loading; all attributes now\\n         * contain as much useful information as they're going to.\\n         * @event MediaPlayerEvents#PLAYBACK_METADATA_LOADED\\n         */_this.PLAYBACK_METADATA_LOADED='playbackMetaDataLoaded';/**\\n         * Sent when playback is paused.\\n         * @event MediaPlayerEvents#PLAYBACK_PAUSED\\n         */_this.PLAYBACK_PAUSED='playbackPaused';/**\\n         * Sent when the media begins to play (either for the first time, after having been paused,\\n         * or after ending and then restarting).\\n         *\\n         * @event MediaPlayerEvents#PLAYBACK_PLAYING\\n         */_this.PLAYBACK_PLAYING='playbackPlaying';/**\\n         * Sent periodically to inform interested parties of progress downloading\\n         * the media. Information about the current amount of the media that has\\n         * been downloaded is available in the media element's buffered attribute.\\n         * @event MediaPlayerEvents#PLAYBACK_PROGRESS\\n         */_this.PLAYBACK_PROGRESS='playbackProgress';/**\\n         * Sent when the playback speed changes.\\n         * @event MediaPlayerEvents#PLAYBACK_RATE_CHANGED\\n         */_this.PLAYBACK_RATE_CHANGED='playbackRateChanged';/**\\n         * Sent when a seek operation completes.\\n         * @event MediaPlayerEvents#PLAYBACK_SEEKED\\n         */_this.PLAYBACK_SEEKED='playbackSeeked';/**\\n         * Sent when a seek operation begins.\\n         * @event MediaPlayerEvents#PLAYBACK_SEEKING\\n         */_this.PLAYBACK_SEEKING='playbackSeeking';/**\\n         * Sent when a seek operation has been asked.\\n         * @event MediaPlayerEvents#PLAYBACK_SEEK_ASKED\\n         */_this.PLAYBACK_SEEK_ASKED='playbackSeekAsked';/**\\n         * Sent when the video element reports stalled\\n         * @event MediaPlayerEvents#PLAYBACK_STALLED\\n         */_this.PLAYBACK_STALLED='playbackStalled';/**\\n         * Sent when playback of the media starts after having been paused;\\n         * that is, when playback is resumed after a prior pause event.\\n         *\\n         * @event MediaPlayerEvents#PLAYBACK_STARTED\\n         */_this.PLAYBACK_STARTED='playbackStarted';/**\\n         * The time indicated by the element's currentTime attribute has changed.\\n         * @event MediaPlayerEvents#PLAYBACK_TIME_UPDATED\\n         */_this.PLAYBACK_TIME_UPDATED='playbackTimeUpdated';/**\\n         * Sent when the media playback has stopped because of a temporary lack of data.\\n         *\\n         * @event MediaPlayerEvents#PLAYBACK_WAITING\\n         */_this.PLAYBACK_WAITING='playbackWaiting';/**\\n         * Manifest validity changed - As a result of an MPD validity expiration event.\\n         * @event MediaPlayerEvents#MANIFEST_VALIDITY_CHANGED\\n         */_this.MANIFEST_VALIDITY_CHANGED='manifestValidityChanged';/**\\n         * A gap occured in the timeline which requires a seek to the next period\\n         * @event MediaPlayerEvents#GAP_CAUSED_SEEK_TO_PERIOD_END\\n         */_this.GAP_CAUSED_SEEK_TO_PERIOD_END='gapCausedSeekToPeriodEnd';/**\\n         * A gap occured in the timeline which requires an internal seek\\n         * @event MediaPlayerEvents#GAP_CAUSED_INTERNAL_SEEK\\n         */_this.GAP_CAUSED_INTERNAL_SEEK='gapCausedInternalSeek';/**\\n         * Dash events are triggered at their respective start points on the timeline.\\n         * @event MediaPlayerEvents#EVENT_MODE_ON_START\\n         */_this.EVENT_MODE_ON_START='eventModeOnStart';/**\\n         * Dash events are triggered as soon as they were parsed.\\n         * @event MediaPlayerEvents#EVENT_MODE_ON_RECEIVE\\n         */_this.EVENT_MODE_ON_RECEIVE='eventModeOnReceive';/**\\n         * Event that is dispatched whenever the player encounters a potential conformance validation that might lead to unexpected/not optimal behavior\\n         * @event MediaPlayerEvents#CONFORMANCE_VIOLATION\\n         */_this.CONFORMANCE_VIOLATION='conformanceViolation';return _this;}return MediaPlayerEvents;}(_EventsBase3.default);var mediaPlayerEvents=new MediaPlayerEvents();exports.default=mediaPlayerEvents;\\n//# sourceMappingURL=MediaPlayerEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MediaPlayer=__webpack_require__(/*! ./MediaPlayer */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayer.js\\\");var _MediaPlayer2=_interopRequireDefault(_MediaPlayer);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MediaPlayerFactory(){/**\\n     * mime-type identifier for any source content to be accepted as a dash manifest by the create() method.\\n     * @type {string}\\n     */var SUPPORTED_MIME_TYPE='application/dash+xml';var logger=void 0;/**\\n     *  A new MediaPlayer is instantiated for the supplied videoElement and optional source and context.  If no context is provided,\\n     *  a default DashContext is used. If no source is provided, the videoElement is interrogated to extract the first source whose\\n     *  type is application/dash+xml.\\n     * The autoplay property of the videoElement is preserved. Any preload attribute is ignored. This method should be called after the page onLoad event is dispatched.\\n     * @param {HTMLMediaElement} video\\n     * @param {HTMLSourceElement} source\\n     * @param {Object} context\\n     * @returns {MediaPlayer|null}\\n     */function create(video,source,context){if(!video||!/^VIDEO$/i.test(video.nodeName))return null;if(video._dashjs_player)return video._dashjs_player;var player=void 0;var videoID=video.id||video.name||'video element';source=source||[].slice.call(video.querySelectorAll('source')).filter(function(s){return s.type==SUPPORTED_MIME_TYPE;})[0];if(!source&&video.src){source=document.createElement('source');source.src=video.src;}else if(!source&&!video.src){return null;}context=context||{};player=(0,_MediaPlayer2.default)(context).create();player.initialize(video,source.src,video.autoplay);if(!logger){logger=player.getDebug().getLogger();}logger.debug('Converted '+videoID+' to dash.js player and added content: '+source.src);// Store a reference to the player on the video element so it can be gotten at for debugging and so we know its\\n// already been setup.\\nvideo._dashjs_player=player;return player;}/**\\n     * Searches the provided scope for all instances of the indicated selector. If no scope is provided, document is used. If no selector is\\n     * specified, [data-dashjs-player] is used. The declarative setup also looks for source elements with the type attribute set to 'application/dash+xml'.\\n     * It then looks for those video elements which have a source element defined with a type matching 'application/dash+xml'.\\n     * A new MediaPlayer is instantiated for each matching video element and the appropriate source is assigned.\\n     * The autoplay property of the video element is preserved. Any preload attribute is ignored. This method should be called after the page onLoad event is dispatched.\\n     * Returns an array holding all the MediaPlayer instances that were added by this method.\\n     * @param {string} selector - CSS selector\\n     * @param {Object} scope\\n     * @returns {Array} an array of MediaPlayer objects\\n     */function createAll(selector,scope){var aPlayers=[];selector=selector||'[data-dashjs-player]';scope=scope||document;var videos=scope.querySelectorAll(selector);for(var i=0;i<videos.length;i++){var player=create(videos[i],null);aPlayers.push(player);}var sources=scope.querySelectorAll('source[type=\\\"'+SUPPORTED_MIME_TYPE+'\\\"]');for(var _i=0;_i<sources.length;_i++){var video=findVideo(sources[_i]);var _player=create(video,null);aPlayers.push(_player);}return aPlayers;}function findVideo(el){if(/^VIDEO$/i.test(el.nodeName)){return el;}else{return findVideo(el.parentNode);}}return{create:create,createAll:createAll};}var instance=MediaPlayerFactory();var loadInterval=void 0;function loadHandler(){window.removeEventListener('load',loadHandler);instance.createAll();}function loadIntervalHandler(){if(window.dashjs){window.clearInterval(loadInterval);instance.createAll();}}var avoidAutoCreate=typeof window!=='undefined'&&window&&window.dashjs&&window.dashjs.skipAutoCreate;if(!avoidAutoCreate&&typeof window!=='undefined'&&window&&window.addEventListener){if(window.document.readyState==='complete'){if(window.dashjs){instance.createAll();}else{// If loaded asynchronously, window.readyState may be 'complete' even if dashjs hasn't loaded yet\\nloadInterval=window.setInterval(loadIntervalHandler,500);}}else{window.addEventListener('load',loadHandler);}}exports.default=instance;\\n//# sourceMappingURL=MediaPlayerFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/MediaPlayerFactory.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * This is a sink that is used to temporarily hold onto media chunks before a video element is added.\\n * The discharge() function is used to get the chunks out of the PreBuffer for adding to a real SourceBuffer.\\n *\\n * @class PreBufferSink\\n * @ignore\\n * @implements FragmentSink\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function PreBufferSink(onAppendedCallback){var context=this.context;var instance=void 0,logger=void 0,outstandingInit=void 0;var chunks=[];var onAppended=onAppendedCallback;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function reset(){chunks=[];outstandingInit=null;onAppended=null;}function append(chunk){if(chunk.segmentType!=='InitializationSegment'){//Init segments are stored in the initCache.\\nchunks.push(chunk);chunks.sort(function(a,b){return a.start-b.start;});outstandingInit=null;}else{//We need to hold an init chunk for when a corresponding media segment is being downloaded when the discharge happens.\\noutstandingInit=chunk;}logger.debug('PreBufferSink appended chunk s: '+chunk.start+'; e: '+chunk.end);if(onAppended){onAppended({chunk:chunk});}}function remove(start,end){chunks=chunks.filter(function(a){return!((isNaN(end)||a.start<end)&&(isNaN(start)||a.end>start));});//The opposite of the getChunks predicate.\\n}//Nothing async, nothing to abort.\\nfunction abort(){}function getAllBufferRanges(){var ranges=[];for(var i=0;i<chunks.length;i++){var chunk=chunks[i];if(ranges.length===0||chunk.start>ranges[ranges.length-1].end){ranges.push({start:chunk.start,end:chunk.end});}else{ranges[ranges.length-1].end=chunk.end;}}//Implements TimeRanges interface. So acts just like sourceBuffer.buffered.\\nvar timeranges={start:function start(n){return ranges[n].start;},end:function end(n){return ranges[n].end;}};Object.defineProperty(timeranges,'length',{get:function get(){return ranges.length;}});return timeranges;}function hasDiscontinuitiesAfter(){return false;}function updateTimestampOffset(){// Nothing to do\\n}function getBuffer(){return this;}/**\\n     * Return the all chunks in the buffer the lie between times start and end.\\n     * Because a chunk cannot be split, this returns the full chunk if any part of its time lies in the requested range.\\n     * Chunks are removed from the buffer when they are discharged.\\n     * @function PreBufferSink#discharge\\n     * @param {?Number} start The start time from which to discharge from the buffer. If NaN, it is regarded as unbounded.\\n     * @param {?Number} end The end time from which to discharge from the buffer. If NaN, it is regarded as unbounded.\\n     * @returns {Array} The set of chunks from the buffer within the time ranges.\\n     */function discharge(start,end){var result=getChunksAt(start,end);if(outstandingInit){result.push(outstandingInit);outstandingInit=null;}remove(start,end);return result;}function getChunksAt(start,end){return chunks.filter(function(a){return(isNaN(end)||a.start<end)&&(isNaN(start)||a.end>start);});}function waitForUpdateEnd(callback){callback();}instance={getAllBufferRanges:getAllBufferRanges,append:append,remove:remove,abort:abort,discharge:discharge,reset:reset,updateTimestampOffset:updateTimestampOffset,hasDiscontinuitiesAfter:hasDiscontinuitiesAfter,waitForUpdateEnd:waitForUpdateEnd,getBuffer:getBuffer};setup();return instance;}PreBufferSink.__dashjs_factory_name='PreBufferSink';var factory=_FactoryMaker2.default.getClassFactory(PreBufferSink);exports.default=factory;\\n//# sourceMappingURL=PreBufferSink.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _TextController=__webpack_require__(/*! ./text/TextController */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\\\");var _TextController2=_interopRequireDefault(_TextController);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var MAX_ALLOWED_DISCONTINUITY=0.1;// 100 milliseconds\\n/**\\n * @class SourceBufferSink\\n * @ignore\\n * @implements FragmentSink\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function SourceBufferSink(mediaSource,mediaInfo,onAppendedCallback,oldBuffer){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,type=void 0,logger=void 0,buffer=void 0,isAppendingInProgress=void 0,intervalId=void 0;var callbacks=[];var appendQueue=[];var onAppended=onAppendedCallback;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);isAppendingInProgress=false;type=mediaInfo.type;var codec=mediaInfo.codec;try{// Safari claims to support anything starting 'application/mp4'.\\n// it definitely doesn't understand 'application/mp4;codecs=\\\"stpp\\\"'\\n// - currently no browser does, so check for it and use our own\\n// implementation. The same is true for codecs=\\\"wvtt\\\".\\nif(codec.match(/application\\\\/mp4;\\\\s*codecs=\\\"(stpp|wvtt).*\\\"/i)){throw new Error('not really supported');}buffer=oldBuffer?oldBuffer:mediaSource.addSourceBuffer(codec);if(buffer.changeType&&oldBuffer){logger.debug('Doing period transition with changeType');buffer.changeType(codec);}updateAppendWindow();var CHECK_INTERVAL=50;// use updateend event if possible\\nif(typeof buffer.addEventListener==='function'){try{buffer.addEventListener('updateend',updateEndHandler,false);buffer.addEventListener('error',errHandler,false);buffer.addEventListener('abort',errHandler,false);}catch(err){// use setInterval to periodically check if updating has been completed\\nintervalId=setInterval(checkIsUpdateEnded,CHECK_INTERVAL);}}else{// use setInterval to periodically check if updating has been completed\\nintervalId=setInterval(checkIsUpdateEnded,CHECK_INTERVAL);}}catch(ex){// Note that in the following, the quotes are open to allow for extra text after stpp and wvtt\\nif(mediaInfo.isText||codec.indexOf('codecs=\\\"stpp')!==-1||codec.indexOf('codecs=\\\"wvtt')!==-1){var textController=(0,_TextController2.default)(context).getInstance();buffer=textController.getTextSourceBuffer();}else{throw ex;}}}function getType(){return type;}function reset(keepBuffer){if(buffer){if(typeof buffer.removeEventListener==='function'){buffer.removeEventListener('updateend',updateEndHandler,false);buffer.removeEventListener('error',errHandler,false);buffer.removeEventListener('abort',errHandler,false);}clearInterval(intervalId);callbacks=[];if(!keepBuffer){try{if(!buffer.getClassName||buffer.getClassName()!=='TextSourceBuffer'){logger.debug('Removing sourcebuffer from media source');mediaSource.removeSourceBuffer(buffer);}}catch(e){logger.error('Failed to remove source buffer from media source.');}buffer=null;}isAppendingInProgress=false;}appendQueue=[];onAppended=null;}function getBuffer(){return buffer;}function getAllBufferRanges(){try{return buffer.buffered;}catch(e){logger.error('getAllBufferRanges exception: '+e.message);return null;}}function hasDiscontinuitiesAfter(time){try{var ranges=getAllBufferRanges();if(ranges&&ranges.length>1){for(var i=0,len=ranges.length;i<len;i++){if(i>0){if(time<ranges.start(i)&&ranges.start(i)>ranges.end(i-1)+MAX_ALLOWED_DISCONTINUITY){return true;}}}}}catch(e){logger.error('hasDiscontinuities exception: '+e.message);}return false;}function append(chunk){if(!chunk){onAppended({chunk:chunk,error:new _DashJSError2.default(_Errors2.default.APPEND_ERROR_CODE,_Errors2.default.APPEND_ERROR_MESSAGE)});return;}appendQueue.push(chunk);if(!isAppendingInProgress){waitForUpdateEnd(appendNextInQueue.bind(this));}}function updateTimestampOffset(MSETimeOffset){if(buffer.timestampOffset!==MSETimeOffset&&!isNaN(MSETimeOffset)){waitForUpdateEnd(function(){if(MSETimeOffset<0){MSETimeOffset+=0.001;}buffer.timestampOffset=MSETimeOffset;});}}function updateAppendWindow(sInfo){if(!buffer){return;}waitForUpdateEnd(function(){try{var appendWindowEnd=mediaSource.duration;var appendWindowStart=0;if(sInfo&&!isNaN(sInfo.start)&&!isNaN(sInfo.duration)&&isFinite(sInfo.duration)){appendWindowEnd=sInfo.start+sInfo.duration;}if(sInfo&&!isNaN(sInfo.start)){appendWindowStart=sInfo.start;}buffer.appendWindowStart=0;buffer.appendWindowEnd=appendWindowEnd;buffer.appendWindowStart=appendWindowStart;logger.debug('Updated append window. Set start to '+buffer.appendWindowStart+' and end to '+buffer.appendWindowEnd);}catch(e){logger.warn('Failed to set append window');}});}function remove(start,end,forceRemoval){var sourceBufferSink=this;// make sure that the given time range is correct. Otherwise we will get InvalidAccessError\\nwaitForUpdateEnd(function(){try{if(start>=0&&end>start&&(forceRemoval||mediaSource.readyState!=='ended')){buffer.remove(start,end);}// updating is in progress, we should wait for it to complete before signaling that this operation is done\\nwaitForUpdateEnd(function(){eventBus.trigger(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:sourceBufferSink,from:start,to:end,unintended:false});});}catch(err){eventBus.trigger(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:sourceBufferSink,from:start,to:end,unintended:false,error:new _DashJSError2.default(err.code,err.message)});}});}function appendNextInQueue(){var sourceBufferSink=this;if(appendQueue.length>0){isAppendingInProgress=true;var nextChunk=appendQueue[0];appendQueue.splice(0,1);var oldRanges=[];var afterSuccess=function afterSuccess(){// Safari sometimes drops a portion of a buffer after appending. Handle these situations here\\nvar newRanges=getAllBufferRanges();checkBufferGapsAfterAppend(sourceBufferSink,oldRanges,newRanges,nextChunk);if(appendQueue.length>0){appendNextInQueue.call(this);}else{isAppendingInProgress=false;if(onAppended){onAppended({chunk:nextChunk});}}};try{if(nextChunk.bytes.length===0){afterSuccess.call(this);}else{oldRanges=getAllBufferRanges();if(buffer.appendBuffer){buffer.appendBuffer(nextChunk.bytes);}else{buffer.append(nextChunk.bytes,nextChunk);}// updating is in progress, we should wait for it to complete before signaling that this operation is done\\nwaitForUpdateEnd(afterSuccess.bind(this));}}catch(err){logger.fatal('SourceBuffer append failed \\\"'+err+'\\\"');if(appendQueue.length>0){appendNextInQueue();}else{isAppendingInProgress=false;}if(onAppended){onAppended({chunk:nextChunk,error:new _DashJSError2.default(err.code,err.message)});}}}}function checkBufferGapsAfterAppend(buffer,oldRanges,newRanges,chunk){if(oldRanges&&oldRanges.length>0&&oldRanges.length<newRanges.length&&isChunkAlignedWithRange(oldRanges,chunk)){// A split in the range was created while appending\\neventBus.trigger(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,{buffer:buffer,from:newRanges.end(newRanges.length-2),to:newRanges.start(newRanges.length-1),unintended:true});}}function isChunkAlignedWithRange(oldRanges,chunk){for(var i=0;i<oldRanges.length;i++){var start=Math.round(oldRanges.start(i));var end=Math.round(oldRanges.end(i));if(end===chunk.start||start===chunk.end||chunk.start>=start&&chunk.end<=end){return true;}}return false;}function abort(){try{if(mediaSource.readyState==='open'){buffer.abort();}else if(buffer.setTextTrack&&mediaSource.readyState==='ended'){buffer.abort();//The cues need to be removed from the TextSourceBuffer via a call to abort()\\n}}catch(ex){logger.error('SourceBuffer append abort failed: \\\"'+ex+'\\\"');}appendQueue=[];}function executeCallback(){if(callbacks.length>0){var cb=callbacks.shift();if(buffer.updating){waitForUpdateEnd(cb);}else{cb();// Try to execute next callback if still not updating\\nexecuteCallback();}}}function checkIsUpdateEnded(){// if updating is still in progress do nothing and wait for the next check again.\\nif(buffer.updating)return;// updating is completed, now we can stop checking and resolve the promise\\nexecuteCallback();}function updateEndHandler(){if(buffer.updating)return;executeCallback();}function errHandler(){logger.error('SourceBufferSink error');}function waitForUpdateEnd(callback){callbacks.push(callback);if(!buffer.updating){executeCallback();}}instance={getType:getType,getAllBufferRanges:getAllBufferRanges,getBuffer:getBuffer,append:append,remove:remove,abort:abort,reset:reset,updateTimestampOffset:updateTimestampOffset,hasDiscontinuitiesAfter:hasDiscontinuitiesAfter,waitForUpdateEnd:waitForUpdateEnd,updateAppendWindow:updateAppendWindow};setup();return instance;}SourceBufferSink.__dashjs_factory_name='SourceBufferSink';var factory=_FactoryMaker2.default.getClassFactory(SourceBufferSink);exports.default=factory;\\n//# sourceMappingURL=SourceBufferSink.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/Stream.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _StreamProcessor=__webpack_require__(/*! ./StreamProcessor */ \\\"../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js\\\");var _StreamProcessor2=_interopRequireDefault(_StreamProcessor);var _FragmentController=__webpack_require__(/*! ./controllers/FragmentController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js\\\");var _FragmentController2=_interopRequireDefault(_FragmentController);var _ThumbnailController=__webpack_require__(/*! ./thumbnail/ThumbnailController */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js\\\");var _ThumbnailController2=_interopRequireDefault(_ThumbnailController);var _EventBus=__webpack_require__(/*! ../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _BoxParser=__webpack_require__(/*! ./utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _URLUtils=__webpack_require__(/*! ./utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Stream(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var manifestModel=config.manifestModel;var mediaPlayerModel=config.mediaPlayerModel;var manifestUpdater=config.manifestUpdater;var adapter=config.adapter;var capabilities=config.capabilities;var capabilitiesFilter=config.capabilitiesFilter;var errHandler=config.errHandler;var timelineConverter=config.timelineConverter;var dashMetrics=config.dashMetrics;var abrController=config.abrController;var playbackController=config.playbackController;var eventController=config.eventController;var mediaController=config.mediaController;var textController=config.textController;var protectionController=config.protectionController;var videoModel=config.videoModel;var settings=config.settings;var streamInfo=config.streamInfo;var instance=void 0,logger=void 0,streamProcessors=void 0,isStreamInitialized=void 0,isStreamActivated=void 0,isMediaInitialized=void 0,hasVideoTrack=void 0,hasAudioTrack=void 0,updateError=void 0,isUpdating=void 0,fragmentController=void 0,thumbnailController=void 0,preloaded=void 0,boxParser=void 0,preloadingScheduled=void 0,debug=void 0,isEndedEventSignaled=void 0,trackChangedEvent=void 0;function setup(){debug=(0,_Debug2.default)(context).getInstance();logger=debug.getLogger(instance);resetInitialSettings();boxParser=(0,_BoxParser2.default)(context).getInstance();fragmentController=(0,_FragmentController2.default)(context).create({streamInfo:streamInfo,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,errHandler:errHandler,settings:settings,boxParser:boxParser,dashConstants:_DashConstants2.default,urlUtils:urlUtils});}function initialize(){registerEvents();registerProtectionEvents();eventBus.trigger(_Events2.default.STREAM_UPDATED,{streamInfo:streamInfo});}function registerEvents(){eventBus.on(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,instance);eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.on(_Events2.default.INBAND_EVENTS,onInbandEvents,instance);}function unRegisterEvents(){eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.off(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,instance);eventBus.off(_Events2.default.INBAND_EVENTS,onInbandEvents,instance);}function registerProtectionEvents(){if(protectionController){eventBus.on(_Events2.default.KEY_ERROR,onProtectionError,instance);eventBus.on(_Events2.default.SERVER_CERTIFICATE_UPDATED,onProtectionError,instance);eventBus.on(_Events2.default.LICENSE_REQUEST_COMPLETE,onProtectionError,instance);eventBus.on(_Events2.default.KEY_SYSTEM_SELECTED,onProtectionError,instance);eventBus.on(_Events2.default.KEY_SESSION_CREATED,onProtectionError,instance);eventBus.on(_Events2.default.KEY_STATUSES_CHANGED,onProtectionError,instance);}}function unRegisterProtectionEvents(){if(protectionController){eventBus.off(_Events2.default.KEY_ERROR,onProtectionError,instance);eventBus.off(_Events2.default.SERVER_CERTIFICATE_UPDATED,onProtectionError,instance);eventBus.off(_Events2.default.LICENSE_REQUEST_COMPLETE,onProtectionError,instance);eventBus.off(_Events2.default.KEY_SYSTEM_SELECTED,onProtectionError,instance);eventBus.off(_Events2.default.KEY_SESSION_CREATED,onProtectionError,instance);eventBus.off(_Events2.default.KEY_STATUSES_CHANGED,onProtectionError,instance);}}function getStreamId(){return streamInfo?streamInfo.id:null;}/**\\n     * Activates Stream by re-initializing some of its components\\n     * @param {MediaSource} mediaSource\\n     * @memberof Stream#\\n     * @param {SourceBuffer} previousBuffers\\n     */function activate(mediaSource,previousBuffers){if(!isStreamActivated){var result=void 0;eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);if(!getPreloaded()){result=initializeMedia(mediaSource,previousBuffers);}else{initializeAfterPreload();result=previousBuffers;}isStreamActivated=true;return result;}return previousBuffers;}/**\\n     * Partially resets some of the Stream elements\\n     * @memberof Stream#\\n     * @param {boolean} keepBuffers\\n     */function deactivate(keepBuffers){var ln=streamProcessors?streamProcessors.length:0;var errored=false;for(var i=0;i<ln;i++){var fragmentModel=streamProcessors[i].getFragmentModel();fragmentModel.removeExecutedRequestsBeforeTime(getStartTime()+getDuration());streamProcessors[i].reset(errored,keepBuffers);}streamProcessors=[];isStreamActivated=false;isMediaInitialized=false;setPreloaded(false);eventBus.off(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);}function isActive(){return isStreamActivated;}function setMediaSource(mediaSource){for(var i=0;i<streamProcessors.length;){if(isMediaSupported(streamProcessors[i].getMediaInfo())){streamProcessors[i].setMediaSource(mediaSource);i++;}else{streamProcessors[i].reset();streamProcessors.splice(i,1);}}for(var _i=0;_i<streamProcessors.length;_i++){//Adding of new tracks to a stream processor isn't guaranteed by the spec after the METADATA_LOADED state\\n//so do this after the buffers are created above.\\nstreamProcessors[_i].dischargePreBuffer();}if(streamProcessors.length===0){var msg='No streams to play.';errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,msg+'nostreams',manifestModel.getValue()));logger.fatal(msg);}}function resetInitialSettings(){deactivate();isStreamInitialized=false;hasVideoTrack=false;hasAudioTrack=false;updateError={};isUpdating=false;preloadingScheduled=false;isEndedEventSignaled=false;}function reset(){if(playbackController){playbackController.pause();}if(fragmentController){fragmentController.reset();fragmentController=null;}streamInfo=null;resetInitialSettings();unRegisterEvents();unRegisterProtectionEvents();setPreloaded(false);}function getDuration(){return streamInfo?streamInfo.duration:NaN;}function getIsEndedEventSignaled(){return isEndedEventSignaled;}function setIsEndedEventSignaled(value){isEndedEventSignaled=value;}function getStartTime(){return streamInfo?streamInfo.start:NaN;}function getPreloadingScheduled(){return preloadingScheduled;}function setPreloadingScheduled(value){preloadingScheduled=value;}function getLiveStartTime(){if(!streamInfo.manifestInfo.isDynamic)return NaN;// Get live start time of the video stream (1st in array of streams)\\n// or audio if no video stream\\nfor(var i=0;i<streamProcessors.length;i++){if(streamProcessors[i].getType()===_Constants2.default.AUDIO||streamProcessors[i].getType()===_Constants2.default.VIDEO){return streamProcessors[i].getLiveStartTime();}}return NaN;}function getId(){return streamInfo?streamInfo.id:null;}function getStreamInfo(){return streamInfo;}function getHasAudioTrack(){return hasAudioTrack;}function getHasVideoTrack(){return hasVideoTrack;}function getThumbnailController(){return thumbnailController;}function checkConfig(){if(!videoModel||!abrController||!abrController.hasOwnProperty('getBitrateList')||!adapter||!adapter.hasOwnProperty('getAllMediaInfoForType')||!adapter.hasOwnProperty('getEventsFor')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}/**\\n     * @param {string} type\\n     * @returns {Array}\\n     * @memberof Stream#\\n     */function getBitrateListFor(type){checkConfig();if(type===_Constants2.default.IMAGE){if(!thumbnailController){return[];}return thumbnailController.getBitrateList();}var mediaInfo=getMediaInfo(type);return abrController.getBitrateList(mediaInfo);}function onProtectionError(event){if(event.error){errHandler.error(event.error);logger.fatal(event.error.message);reset();}}function isMediaSupported(mediaInfo){var type=mediaInfo?mediaInfo.type:null;var codec=void 0,msg=void 0;if(type===_Constants2.default.MUXED){msg='Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines';logger.fatal(msg);errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,msg,manifestModel.getValue()));return false;}if(type===_Constants2.default.TEXT||type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.EMBEDDED_TEXT||type===_Constants2.default.IMAGE){return true;}codec=mediaInfo.codec;logger.debug(type+' codec: '+codec);if(!!mediaInfo.contentProtection&&!capabilities.supportsEncryptedMedia()){errHandler.error(new _DashJSError2.default(_Errors2.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,_Errors2.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE));}else if(!capabilities.supportsCodec(codec)){msg=type+'Codec ('+codec+') is not supported.';logger.error(msg);return false;}return true;}function onCurrentTrackChanged(e){if(!streamInfo||e.newMediaInfo.streamInfo.id!==streamInfo.id)return;var mediaInfo=e.newMediaInfo;var manifest=manifestModel.getValue();adapter.setCurrentMediaInfo(streamInfo.id,mediaInfo.type,mediaInfo);var processor=getProcessorForMediaInfo(mediaInfo);if(!processor)return;var currentTime=playbackController.getTime();logger.info('Stream -  Process track changed at current time '+currentTime);logger.debug('Stream -  Update stream controller');if(manifest.refreshManifestOnSwitchTrack){// Applies only for MSS streams\\nlogger.debug('Stream -  Refreshing manifest for switch track');trackChangedEvent=e;manifestUpdater.refreshManifest();}else{processor.selectMediaInfo(mediaInfo);if(mediaInfo.type!==_Constants2.default.FRAGMENTED_TEXT){abrController.updateTopQualityIndex(mediaInfo);processor.switchTrackAsked();processor.getFragmentModel().abortRequests();}else{processor.getScheduleController().setSeekTarget(currentTime);processor.setBufferingTime(currentTime);processor.resetIndexHandler();}}}function createStreamProcessor(mediaInfo,allMediaForType,mediaSource,optionalSettings){var fragmentModel=fragmentController.getModel(mediaInfo?mediaInfo.type:null);var streamProcessor=(0,_StreamProcessor2.default)(context).create({streamInfo:streamInfo,type:mediaInfo?mediaInfo.type:null,mimeType:mediaInfo?mediaInfo.mimeType:null,timelineConverter:timelineConverter,adapter:adapter,manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,fragmentModel:fragmentModel,dashMetrics:config.dashMetrics,baseURLController:config.baseURLController,abrController:abrController,playbackController:playbackController,mediaController:mediaController,textController:textController,errHandler:errHandler,settings:settings,boxParser:boxParser});streamProcessor.initialize(mediaSource,hasVideoTrack);abrController.updateTopQualityIndex(mediaInfo);if(optionalSettings){streamProcessor.setBuffer(optionalSettings.buffer);streamProcessor.setBufferingTime(optionalSettings.currentTime);streamProcessors[optionalSettings.replaceIdx]=streamProcessor;}else{streamProcessors.push(streamProcessor);}if(optionalSettings&&optionalSettings.ignoreMediaInfo){return;}if(mediaInfo&&(mediaInfo.type===_Constants2.default.TEXT||mediaInfo.type===_Constants2.default.FRAGMENTED_TEXT)){var idx=void 0;for(var i=0;i<allMediaForType.length;i++){if(allMediaForType[i].index===mediaInfo.index){idx=i;}streamProcessor.addMediaInfo(allMediaForType[i]);//creates text tracks for all adaptations in one stream processor\\n}streamProcessor.selectMediaInfo(allMediaForType[idx]);//sets the initial media info\\n}else{streamProcessor.addMediaInfo(mediaInfo,true);}}function initializeMediaForType(type,mediaSource){var allMediaForType=adapter.getAllMediaInfoForType(streamInfo,type);var mediaInfo=null;var initialMediaInfo=void 0;if(!allMediaForType||allMediaForType.length===0){logger.info('No '+type+' data.');return;}if(type===_Constants2.default.VIDEO){hasVideoTrack=true;}if(type===_Constants2.default.AUDIO){hasAudioTrack=true;}for(var i=0,ln=allMediaForType.length;i<ln;i++){mediaInfo=allMediaForType[i];if(type===_Constants2.default.EMBEDDED_TEXT){textController.addEmbeddedTrack(mediaInfo);}else{if(!isMediaSupported(mediaInfo))continue;mediaController.addTrack(mediaInfo);}}if(type===_Constants2.default.EMBEDDED_TEXT||mediaController.getTracksFor(type,streamInfo).length===0){return;}if(type===_Constants2.default.IMAGE){thumbnailController=(0,_ThumbnailController2.default)(context).create({streamInfo:streamInfo,adapter:adapter,baseURLController:config.baseURLController,timelineConverter:config.timelineConverter,debug:debug,eventBus:eventBus,events:_Events2.default,dashConstants:_DashConstants2.default});return;}mediaController.checkInitialMediaSettingsForType(type,streamInfo);initialMediaInfo=mediaController.getCurrentTrackFor(type,streamInfo);eventBus.trigger(_Events2.default.STREAM_INITIALIZING,{streamInfo:streamInfo,mediaInfo:mediaInfo});// TODO : How to tell index handler live/duration?\\n// TODO : Pass to controller and then pass to each method on handler?\\ncreateStreamProcessor(initialMediaInfo,allMediaForType,mediaSource);}function addInlineEvents(){if(eventController){var events=adapter.getEventsFor(streamInfo);eventController.addInlineEvents(events);}}function addInbandEvents(events){if(eventController){eventController.addInbandEvents(events);}}function initializeMedia(mediaSource,previousBuffers){checkConfig();var element=videoModel.getElement();addInlineEvents();isUpdating=true;capabilitiesFilter.filterUnsupportedFeaturesOfPeriod(streamInfo);if(!element||element&&/^VIDEO$/i.test(element.nodeName)){initializeMediaForType(_Constants2.default.VIDEO,mediaSource);}initializeMediaForType(_Constants2.default.AUDIO,mediaSource);initializeMediaForType(_Constants2.default.TEXT,mediaSource);initializeMediaForType(_Constants2.default.FRAGMENTED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.EMBEDDED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.MUXED,mediaSource);initializeMediaForType(_Constants2.default.IMAGE,mediaSource);//TODO. Consider initialization of TextSourceBuffer here if embeddedText, but no sideloadedText.\\nvar buffers=createBuffers(previousBuffers);isMediaInitialized=true;isUpdating=false;if(streamProcessors.length===0){var msg='No streams to play.';errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,msg,manifestModel.getValue()));logger.fatal(msg);}else{checkIfInitializationCompleted();}return buffers;}function initializeAfterPreload(){isUpdating=true;checkConfig();capabilitiesFilter.filterUnsupportedFeaturesOfPeriod(streamInfo);isMediaInitialized=true;isUpdating=false;if(streamProcessors.length===0){var msg='No streams to play.';errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,msg,manifestModel.getValue()));logger.debug(msg);}else{checkIfInitializationCompleted();}}function checkIfInitializationCompleted(){var ln=streamProcessors.length;var hasError=!!updateError.audio||!!updateError.video;var error=hasError?new _DashJSError2.default(_Errors2.default.DATA_UPDATE_FAILED_ERROR_CODE,_Errors2.default.DATA_UPDATE_FAILED_ERROR_MESSAGE):null;for(var i=0;i<ln;i++){if(streamProcessors[i].isUpdating()||isUpdating){return;}}if(!isMediaInitialized){return;}if(protectionController){// Need to check if streamProcessors exists because streamProcessors\\n// could be cleared in case an error is detected while initializing DRM keysystem\\nprotectionController.clearMediaInfoArrayByStreamId(getId());for(var _i2=0;_i2<ln&&streamProcessors[_i2];_i2++){var type=streamProcessors[_i2].getType();if(type===_Constants2.default.AUDIO||type===_Constants2.default.VIDEO||type===_Constants2.default.FRAGMENTED_TEXT){var mediaInfo=streamProcessors[_i2].getMediaInfo();if(mediaInfo){protectionController.initializeForMedia(mediaInfo);}}}}if(error){errHandler.error(error);}else if(!isStreamInitialized){isStreamInitialized=true;eventBus.trigger(_Events2.default.STREAM_INITIALIZED,{streamInfo:streamInfo,liveStartTime:!preloaded?getLiveStartTime():NaN});}// (Re)start ScheduleController:\\n// - in case stream initialization has been completed after 'play' event (case for SegmentBase streams)\\n// - in case stream is complete but a track switch has been requested\\nfor(var _i3=0;_i3<ln&&streamProcessors[_i3];_i3++){streamProcessors[_i3].getScheduleController().start();}}function getMediaInfo(type){var streamProcessor=null;for(var i=0;i<streamProcessors.length;i++){streamProcessor=streamProcessors[i];if(streamProcessor.getType()===type){return streamProcessor.getMediaInfo();}}return null;}function createBuffers(previousBuffers){var buffers={};for(var i=0,ln=streamProcessors.length;i<ln;i++){var buffer=streamProcessors[i].createBuffer(previousBuffers);if(buffer){buffers[streamProcessors[i].getType()]=buffer.getBuffer();}}return buffers;}function onBufferingCompleted(){var processors=getProcessors();var ln=processors.length;if(ln===0){logger.warn('onBufferingCompleted - can\\\\'t trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined');return;}// if there is at least one buffer controller that has not completed buffering yet do nothing\\nfor(var i=0;i<ln;i++){//if audio or video buffer is not buffering completed state, do not send STREAM_BUFFERING_COMPLETED\\nif(!processors[i].isBufferingCompleted()&&(processors[i].getType()===_Constants2.default.AUDIO||processors[i].getType()===_Constants2.default.VIDEO)){logger.warn('onBufferingCompleted - One streamProcessor has finished but',processors[i].getType(),'one is not buffering completed');return;}}logger.debug('onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED');eventBus.trigger(_Events2.default.STREAM_BUFFERING_COMPLETED,{streamInfo:streamInfo});}function onDataUpdateCompleted(e){updateError[e.mediaType]=e.error;checkIfInitializationCompleted();}function onInbandEvents(e){addInbandEvents(e.events);}function getProcessorForMediaInfo(mediaInfo){if(!mediaInfo){return null;}var processors=getProcessors();return processors.filter(function(processor){return processor.getType()===mediaInfo.type;})[0];}function getProcessors(){var arr=[];var type=void 0,streamProcessor=void 0;for(var i=0;i<streamProcessors.length;i++){streamProcessor=streamProcessors[i];type=streamProcessor.getType();if(type===_Constants2.default.AUDIO||type===_Constants2.default.VIDEO||type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.TEXT){arr.push(streamProcessor);}}return arr;}function updateData(updatedStreamInfo){logger.info('Manifest updated... updating data system wide.');isStreamActivated=false;isUpdating=true;streamInfo=updatedStreamInfo;eventBus.trigger(_Events2.default.STREAM_UPDATED,{streamInfo:streamInfo});if(eventController){addInlineEvents();}capabilitiesFilter.filterUnsupportedFeaturesOfPeriod(streamInfo);for(var i=0,ln=streamProcessors.length;i<ln;i++){var streamProcessor=streamProcessors[i];streamProcessor.updateStreamInfo(streamInfo);var mediaInfo=adapter.getMediaInfoForType(streamInfo,streamProcessor.getType());// Check if AdaptationSet has not been removed in MPD update\\nif(mediaInfo){abrController.updateTopQualityIndex(mediaInfo);streamProcessor.addMediaInfo(mediaInfo,true);}}if(trackChangedEvent){var _mediaInfo=trackChangedEvent.newMediaInfo;if(_mediaInfo.type!==_Constants2.default.FRAGMENTED_TEXT){var processor=getProcessorForMediaInfo(trackChangedEvent.oldMediaInfo);if(!processor)return;processor.switchTrackAsked();trackChangedEvent=undefined;}}isUpdating=false;checkIfInitializationCompleted();}function isMediaCodecCompatible(newStream){var previousStream=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return compareCodecs(newStream,_Constants2.default.VIDEO,previousStream)&&compareCodecs(newStream,_Constants2.default.AUDIO,previousStream);}function isProtectionCompatible(stream){var previousStream=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return compareProtectionConfig(stream,_Constants2.default.VIDEO,previousStream)&&compareProtectionConfig(stream,_Constants2.default.AUDIO,previousStream);}function compareProtectionConfig(stream,type){var previousStream=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!stream){return false;}var newStreamInfo=stream.getStreamInfo();var currentStreamInfo=previousStream?previousStream.getStreamInfo():getStreamInfo();if(!newStreamInfo||!currentStreamInfo){return false;}var newAdaptation=adapter.getAdaptationForType(newStreamInfo.index,type,newStreamInfo);var currentAdaptation=adapter.getAdaptationForType(currentStreamInfo.index,type,currentStreamInfo);if(!newAdaptation||!currentAdaptation){// If there is no adaptation for neither the old or the new stream they're compatible\\nreturn!newAdaptation&&!currentAdaptation;}// If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers.\\nreturn!(!isAdaptationDrmProtected(currentAdaptation)&&isAdaptationDrmProtected(newAdaptation));}function isAdaptationDrmProtected(adaptation){if(!adaptation){// If there is no adaptation for neither the old or the new stream they're compatible\\nreturn false;}// If the current period is unencrypted and the upcoming one is encrypted we need to reset sourcebuffers.\\nreturn!!(adaptation.ContentProtection||adaptation.Representation&&adaptation.Representation.length>0&&adaptation.Representation[0].ContentProtection);}function compareCodecs(newStream,type){var previousStream=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!newStream||!newStream.hasOwnProperty('getStreamInfo')){return false;}var newStreamInfo=newStream.getStreamInfo();var currentStreamInfo=previousStream?previousStream.getStreamInfo():getStreamInfo();if(!newStreamInfo||!currentStreamInfo){return false;}var newAdaptation=adapter.getAdaptationForType(newStreamInfo.index,type,newStreamInfo);var currentAdaptation=adapter.getAdaptationForType(currentStreamInfo.index,type,currentStreamInfo);if(!newAdaptation||!currentAdaptation){// If there is no adaptation for neither the old or the new stream they're compatible\\nreturn!newAdaptation&&!currentAdaptation;}var sameMimeType=newAdaptation&&currentAdaptation&&newAdaptation.mimeType===currentAdaptation.mimeType;var oldCodecs=currentAdaptation.Representation_asArray.map(function(representation){return representation.codecs;});var newCodecs=newAdaptation.Representation_asArray.map(function(representation){return representation.codecs;});var codecMatch=newCodecs.some(function(newCodec){return oldCodecs.indexOf(newCodec)>-1;});var partialCodecMatch=newCodecs.some(function(newCodec){return oldCodecs.some(function(oldCodec){return capabilities.codecRootCompatibleWithCodec(oldCodec,newCodec);});});return codecMatch||partialCodecMatch&&sameMimeType;}function setPreloaded(value){preloaded=value;}function getPreloaded(){return preloaded;}function preload(mediaSource,previousBuffers){if(!getPreloaded()){addInlineEvents();initializeMediaForType(_Constants2.default.VIDEO,mediaSource);initializeMediaForType(_Constants2.default.AUDIO,mediaSource);initializeMediaForType(_Constants2.default.TEXT,mediaSource);initializeMediaForType(_Constants2.default.FRAGMENTED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.EMBEDDED_TEXT,mediaSource);initializeMediaForType(_Constants2.default.MUXED,mediaSource);initializeMediaForType(_Constants2.default.IMAGE,mediaSource);createBuffers(previousBuffers);eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);for(var i=0;i<streamProcessors.length&&streamProcessors[i];i++){streamProcessors[i].getScheduleController().start();}setPreloaded(true);}}instance={initialize:initialize,getStreamId:getStreamId,activate:activate,deactivate:deactivate,isActive:isActive,getDuration:getDuration,getStartTime:getStartTime,getId:getId,getStreamInfo:getStreamInfo,getHasAudioTrack:getHasAudioTrack,getHasVideoTrack:getHasVideoTrack,preload:preload,getThumbnailController:getThumbnailController,getBitrateListFor:getBitrateListFor,updateData:updateData,reset:reset,getProcessors:getProcessors,setMediaSource:setMediaSource,isMediaCodecCompatible:isMediaCodecCompatible,isProtectionCompatible:isProtectionCompatible,getPreloaded:getPreloaded,getPreloadingScheduled:getPreloadingScheduled,setPreloadingScheduled:setPreloadingScheduled,getIsEndedEventSignaled:getIsEndedEventSignaled,setIsEndedEventSignaled:setIsEndedEventSignaled};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */Stream.__dashjs_factory_name='Stream';exports.default=_FactoryMaker2.default.getClassFactory(Stream);\\n//# sourceMappingURL=Stream.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/Stream.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ./constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../dash/constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _MetricsConstants=__webpack_require__(/*! ./constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _FragmentModel=__webpack_require__(/*! ./models/FragmentModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _BufferController=__webpack_require__(/*! ./controllers/BufferController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js\");var _BufferController2=_interopRequireDefault(_BufferController);var _TextBufferController=__webpack_require__(/*! ./text/TextBufferController */ \"../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js\");var _TextBufferController2=_interopRequireDefault(_TextBufferController);var _ScheduleController=__webpack_require__(/*! ./controllers/ScheduleController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js\");var _ScheduleController2=_interopRequireDefault(_ScheduleController);var _RepresentationController=__webpack_require__(/*! ../dash/controllers/RepresentationController */ \"../node_modules/dashjs/build/es5/src/dash/controllers/RepresentationController.js\");var _RepresentationController2=_interopRequireDefault(_RepresentationController);var _LiveEdgeFinder=__webpack_require__(/*! ./utils/LiveEdgeFinder */ \"../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js\");var _LiveEdgeFinder2=_interopRequireDefault(_LiveEdgeFinder);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SupervisorTools=__webpack_require__(/*! ./utils/SupervisorTools */ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\");var _EventBus=__webpack_require__(/*! ../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _DashHandler=__webpack_require__(/*! ../dash/DashHandler */ \"../node_modules/dashjs/build/es5/src/dash/DashHandler.js\");var _DashHandler2=_interopRequireDefault(_DashHandler);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Debug=__webpack_require__(/*! ../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _RequestModifier=__webpack_require__(/*! ./utils/RequestModifier */ \"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\");var _RequestModifier2=_interopRequireDefault(_RequestModifier);var _URLUtils=__webpack_require__(/*! ../streaming/utils/URLUtils */ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _BoxParser=__webpack_require__(/*! ./utils/BoxParser */ \"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _FragmentRequest=__webpack_require__(/*! ./vo/FragmentRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);var _PlayList=__webpack_require__(/*! ./vo/metrics/PlayList */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function StreamProcessor(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var streamInfo=config.streamInfo;var type=config.type;var errHandler=config.errHandler;var mimeType=config.mimeType;var timelineConverter=config.timelineConverter;var adapter=config.adapter;var manifestModel=config.manifestModel;var mediaPlayerModel=config.mediaPlayerModel;var fragmentModel=config.fragmentModel;var abrController=config.abrController;var playbackController=config.playbackController;var mediaController=config.mediaController;var textController=config.textController;var dashMetrics=config.dashMetrics;var settings=config.settings;var boxParser=config.boxParser;var instance=void 0,logger=void 0,isDynamic=void 0,mediaInfo=void 0,mediaInfoArr=void 0,bufferController=void 0,scheduleController=void 0,representationController=void 0,liveEdgeFinder=void 0,indexHandler=void 0,bufferingTime=void 0,bufferPruned=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});// High priority to be notified before Stream\\neventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.on(_Events2.default.INIT_FRAGMENT_NEEDED,onInitFragmentNeeded,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_NEEDED,onMediaFragmentNeeded,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.on(_Events2.default.BUFFER_LEVEL_UPDATED,onBufferLevelUpdated,instance);eventBus.on(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,instance);eventBus.on(_Events2.default.BUFFER_CLEARED,onBufferCleared,instance);eventBus.on(_Events2.default.SEEK_TARGET,onSeekTarget,instance);}function initialize(mediaSource,hasVideoTrack){indexHandler=(0,_DashHandler2.default)(context).create({streamInfo:streamInfo,type:type,timelineConverter:timelineConverter,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,baseURLController:config.baseURLController,errHandler:errHandler,settings:settings,boxParser:boxParser,events:_Events2.default,eventBus:eventBus,errors:_Errors2.default,debug:(0,_Debug2.default)(context).getInstance(),requestModifier:(0,_RequestModifier2.default)(context).getInstance(),dashConstants:_DashConstants2.default,constants:_Constants2.default,urlUtils:(0,_URLUtils2.default)(context).getInstance()});// Create live edge finder for dynamic streams\\nisDynamic=streamInfo.manifestInfo.isDynamic;if(isDynamic){liveEdgeFinder=(0,_LiveEdgeFinder2.default)(context).create({timelineConverter:timelineConverter});}// Create/initialize controllers\\nindexHandler.initialize(isDynamic);abrController.registerStreamType(type,instance);representationController=(0,_RepresentationController2.default)(context).create({streamInfo:streamInfo,type:type,abrController:abrController,dashMetrics:dashMetrics,playbackController:playbackController,timelineConverter:timelineConverter,dashConstants:_DashConstants2.default,events:_Events2.default,eventBus:eventBus,errors:_Errors2.default});bufferController=createBufferControllerForType(type);if(bufferController){bufferController.initialize(mediaSource);}scheduleController=(0,_ScheduleController2.default)(context).create({streamInfo:streamInfo,type:type,mimeType:mimeType,adapter:adapter,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,fragmentModel:fragmentModel,abrController:abrController,playbackController:playbackController,textController:textController,mediaController:mediaController,bufferController:bufferController,settings:settings});scheduleController.initialize(hasVideoTrack);bufferingTime=0;bufferPruned=false;}function getStreamId(){return streamInfo.id;}function getType(){return type;}function resetInitialSettings(){mediaInfoArr=[];mediaInfo=null;bufferingTime=0;}function reset(errored,keepBuffers){if(indexHandler){indexHandler.reset();}if(bufferController){bufferController.reset(errored,keepBuffers);bufferController=null;}if(scheduleController){scheduleController.reset();scheduleController=null;}if(representationController){representationController.reset();representationController=null;}if(liveEdgeFinder){liveEdgeFinder.reset();liveEdgeFinder=null;}if(abrController&&!keepBuffers){abrController.unRegisterStreamType(type);}eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,instance);eventBus.off(_Events2.default.INIT_FRAGMENT_NEEDED,onInitFragmentNeeded,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_NEEDED,onMediaFragmentNeeded,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.off(_Events2.default.BUFFER_LEVEL_UPDATED,onBufferLevelUpdated,instance);eventBus.off(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,instance);eventBus.off(_Events2.default.BUFFER_CLEARED,onBufferCleared,instance);eventBus.off(_Events2.default.SEEK_TARGET,onSeekTarget,instance);resetInitialSettings();type=null;streamInfo=null;}function isUpdating(){return representationController?representationController.isUpdating():false;}function onDataUpdateCompleted(e){if(!e.error){// Update representation if no error\\nscheduleController.setCurrentRepresentation(adapter.convertDataToRepresentationInfo(e.currentRepresentation));}if(!e.error||e.error.code===_Errors2.default.SEGMENTS_UPDATE_FAILED_ERROR_CODE){// Update has been postponed, update nevertheless DVR info\\nvar activeStreamId=playbackController.getStreamController().getActiveStreamInfo().id;if(activeStreamId===streamInfo.id){addDVRMetric();}}}function onQualityChanged(e){var representationInfo=getRepresentationInfo(e.newQuality);scheduleController.setCurrentRepresentation(representationInfo);dashMetrics.pushPlayListTraceMetrics(new Date(),_PlayList.PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON);dashMetrics.createPlaylistTraceMetrics(representationInfo.id,playbackController.getTime()*1000,playbackController.getPlaybackRate());}function onBufferLevelUpdated(e){dashMetrics.addBufferLevel(type,new Date(),e.bufferLevel*1000);var activeStreamId=playbackController.getStreamController().getActiveStreamInfo().id;if(!manifestModel.getValue().doNotUpdateDVRWindowOnBufferUpdated&&streamInfo.id===activeStreamId){addDVRMetric();}}function onBufferLevelStateChanged(e){dashMetrics.addBufferState(type,e.state,scheduleController.getBufferTarget());if(e.state===_MetricsConstants2.default.BUFFER_EMPTY&&!playbackController.isSeeking()){// logger.info(\\'Buffer is empty! Stalling!\\');\\ndashMetrics.pushPlayListTraceMetrics(new Date(),_PlayList.PlayListTrace.REBUFFERING_REASON);}}function onBufferCleared(e){// Remove executed requests not buffered anymore\\nfragmentModel.syncExecutedRequestsWithBufferedRange(bufferController.getBuffer().getAllBufferRanges(),streamInfo.duration);// If buffer removed ahead current time (QuotaExceededError or automatic buffer pruning) then adjust current index handler time\\nif(e.from>playbackController.getTime()){bufferingTime=e.from;bufferPruned=true;}}function addDVRMetric(){var manifestInfo=streamInfo.manifestInfo;var isDynamic=manifestInfo.isDynamic;var range=timelineConverter.calcSegmentAvailabilityRange(representationController.getCurrentRepresentation(),isDynamic);dashMetrics.addDVRInfo(getType(),playbackController.getTime(),manifestInfo,range);}function getRepresentationController(){return representationController;}function getBuffer(){return bufferController?bufferController.getBuffer():null;}function setBuffer(buffer){bufferController.setBuffer(buffer);}function getBufferController(){return bufferController;}function getFragmentModel(){return fragmentModel;}function updateStreamInfo(newStreamInfo){streamInfo=newStreamInfo;if(settings.get().streaming.useAppendWindow){bufferController.updateAppendWindow();}}function getStreamInfo(){return streamInfo;}function selectMediaInfo(newMediaInfo){if(newMediaInfo!==mediaInfo&&(!newMediaInfo||!mediaInfo||newMediaInfo.type===mediaInfo.type)){mediaInfo=newMediaInfo;}var newRealAdaptation=adapter.getRealAdaptation(streamInfo,mediaInfo);var voRepresentations=adapter.getVoRepresentations(mediaInfo);if(representationController){var realAdaptation=representationController.getData();var maxQuality=abrController.getTopQualityIndexFor(type,streamInfo.id);var minIdx=abrController.getMinAllowedIndexFor(type);var quality=void 0,averageThroughput=void 0;var bitrate=null;if((realAdaptation===null||realAdaptation.id!=newRealAdaptation.id)&&type!==_Constants2.default.FRAGMENTED_TEXT){averageThroughput=abrController.getThroughputHistory().getAverageThroughput(type);bitrate=averageThroughput||abrController.getInitialBitrateFor(type);quality=abrController.getQualityForBitrate(mediaInfo,bitrate);}else{quality=abrController.getQualityFor(type);}if(minIdx!==undefined&&quality<minIdx){quality=minIdx;}if(quality>maxQuality){quality=maxQuality;}indexHandler.setMimeType(mediaInfo?mediaInfo.mimeType:null);representationController.updateData(newRealAdaptation,voRepresentations,type,quality);}}function addMediaInfo(newMediaInfo,selectNewMediaInfo){if(mediaInfoArr.indexOf(newMediaInfo)===-1){mediaInfoArr.push(newMediaInfo);}if(selectNewMediaInfo){this.selectMediaInfo(newMediaInfo);}}function getMediaInfoArr(){return mediaInfoArr;}function getMediaInfo(){return mediaInfo;}function getMediaSource(){return bufferController.getMediaSource();}function setMediaSource(mediaSource){bufferController.setMediaSource(mediaSource,getMediaInfoArr());}function dischargePreBuffer(){bufferController.dischargePreBuffer();}function getScheduleController(){return scheduleController;}/**\\n     * Get a specific voRepresentation. If quality parameter is defined, this function will return the voRepresentation for this quality.\\n     * Otherwise, this function will return the current voRepresentation used by the representationController.\\n     * @param {number} quality - quality index of the voRepresentaion expected.\\n     */function getRepresentationInfo(quality){var voRepresentation=void 0;if(quality!==undefined){(0,_SupervisorTools.checkInteger)(quality);voRepresentation=representationController?representationController.getRepresentationForQuality(quality):null;}else{voRepresentation=representationController?representationController.getCurrentRepresentation():null;}return adapter.convertDataToRepresentationInfo(voRepresentation);}function isBufferingCompleted(){return bufferController?bufferController.getIsBufferingCompleted():false;}function getBufferLevel(){return bufferController?bufferController.getBufferLevel():0;}function onInitFragmentNeeded(e){// Event propagation may have been stopped (see MssHandler)\\nif(!e.sender)return;if(adapter.getIsTextTrack(mimeType)&&!textController.isTextEnabled())return;if(bufferController&&e.representationId){if(!bufferController.appendInitSegment(e.representationId)){// Init segment not in cache, send new request\\nvar request=indexHandler?indexHandler.getInitRequest(getMediaInfo(),representationController.getCurrentRepresentation()):null;scheduleController.processInitRequest(request);}}}function onMediaFragmentNeeded(e){var request=void 0;// Don\\'t schedule next fragments while pruning to avoid buffer inconsistencies\\nif(!bufferController.getIsPruningInProgress()){request=findNextRequest(e.seekTarget,e.replacement);if(request){scheduleController.setSeekTarget(NaN);if(!e.replacement){if(!isNaN(request.startTime+request.duration)){bufferingTime=request.startTime+request.duration;}request.delayLoadingTime=new Date().getTime()+scheduleController.getTimeToLoadDelay();scheduleController.setTimeToLoadDelay(0);}}}scheduleController.processMediaRequest(request);}/**\\n     * Probe the next request. This is used in the CMCD model to get information about the upcoming request. Note: No actual request is performed here.\\n     * @return {FragmentRequest|null}\\n     */function probeNextRequest(){var representationInfo=getRepresentationInfo();var representation=representationController&&representationInfo?representationController.getRepresentationForQuality(representationInfo.quality):null;var request=indexHandler.getNextSegmentRequestIdempotent(getMediaInfo(),representation);return request;}function findNextRequest(seekTarget,requestToReplace){var representationInfo=getRepresentationInfo();var hasSeekTarget=!isNaN(seekTarget);var currentTime=playbackController.getNormalizedTime();var time=hasSeekTarget?seekTarget:bufferingTime;var bufferIsDivided=false;var request=void 0;if(isNaN(time)||getType()===_Constants2.default.FRAGMENTED_TEXT&&!textController.isTextEnabled()){return null;}/**\\n         * This is critical for IE/Safari/EDGE\\n         * */if(bufferController){var range=bufferController.getRangeAt(time);var playingRange=bufferController.getRangeAt(currentTime);if((range!==null||playingRange!==null)&&!hasSeekTarget){if(!range||playingRange&&playingRange.start!=range.start&&playingRange.end!=range.end){var hasDiscontinuities=bufferController.getBuffer().hasDiscontinuitiesAfter(currentTime);if(hasDiscontinuities&&getType()!==_Constants2.default.FRAGMENTED_TEXT){fragmentModel.removeExecutedRequestsAfterTime(playingRange.end);bufferIsDivided=true;}}}}if(requestToReplace){time=requestToReplace.startTime+requestToReplace.duration/2;request=getFragmentRequest(representationInfo,time,{timeThreshold:0,ignoreIsFinished:true});}else{// Use time just whenever is strictly needed\\nvar useTime=hasSeekTarget||bufferPruned||bufferIsDivided;request=getFragmentRequest(representationInfo,useTime?time:undefined,{keepIdx:!useTime});bufferPruned=false;// Then, check if this request was downloaded or not\\nwhile(request&&request.action!==_FragmentRequest2.default.ACTION_COMPLETE&&fragmentModel.isFragmentLoaded(request)){// loop until we found not loaded fragment, or no fragment\\nrequest=getFragmentRequest(representationInfo);}}return request;}function onMediaFragmentLoaded(e){var chunk=e.chunk;var bytes=chunk.bytes;var quality=chunk.quality;var currentRepresentation=getRepresentationInfo(quality);var voRepresentation=representationController&&currentRepresentation?representationController.getRepresentationForQuality(currentRepresentation.quality):null;var eventStreamMedia=adapter.getEventsFor(currentRepresentation.mediaInfo);var eventStreamTrack=adapter.getEventsFor(currentRepresentation,voRepresentation);if(eventStreamMedia&&eventStreamMedia.length>0||eventStreamTrack&&eventStreamTrack.length>0){var request=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,quality:quality,index:chunk.index})[0];var events=handleInbandEvents(bytes,request,eventStreamMedia,eventStreamTrack);eventBus.trigger(_Events2.default.INBAND_EVENTS,{events:events},{streamId:streamInfo.id});}}function handleInbandEvents(data,request,mediaInbandEvents,trackInbandEvents){try{var eventStreams={};var events=[];/* Extract the possible schemeIdUri : If a DASH client detects an event message box with a scheme that is not defined in MPD, the client is expected to ignore it */var inbandEvents=mediaInbandEvents.concat(trackInbandEvents);for(var i=0,ln=inbandEvents.length;i<ln;i++){eventStreams[inbandEvents[i].schemeIdUri+\\'/\\'+inbandEvents[i].value]=inbandEvents[i];}var isoFile=(0,_BoxParser2.default)(context).getInstance().parse(data);var eventBoxes=isoFile.getBoxes(\\'emsg\\');if(!eventBoxes||eventBoxes.length===0){return events;}var sidx=isoFile.getBox(\\'sidx\\');var mediaAnchorTime=sidx&&!isNaN(sidx.earliest_presentation_time)&&!isNaN(sidx.timescale)?sidx.earliest_presentation_time/sidx.timescale:request&&!isNaN(request.mediaStartTime)?request.mediaStartTime:0;var fragmentMediaStartTime=Math.max(mediaAnchorTime,0);var voRepresentation=representationController.getCurrentRepresentation();for(var _i=0,_ln=eventBoxes.length;_i<_ln;_i++){var event=adapter.getEvent(eventBoxes[_i],eventStreams,fragmentMediaStartTime,voRepresentation);if(event){events.push(event);}}return events;}catch(e){return[];}}function createBuffer(previousBuffers){return getBuffer()||bufferController?bufferController.createBuffer(mediaInfoArr,previousBuffers):null;}function switchTrackAsked(){scheduleController.switchTrackAsked();}function createBufferControllerForType(type){var controller=null;if(!type){errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+\\'not properly defined\\'));return null;}if(type===_Constants2.default.VIDEO||type===_Constants2.default.AUDIO){controller=(0,_BufferController2.default)(context).create({streamInfo:streamInfo,type:type,mediaPlayerModel:mediaPlayerModel,manifestModel:manifestModel,fragmentModel:fragmentModel,errHandler:errHandler,mediaController:mediaController,representationController:representationController,adapter:adapter,textController:textController,abrController:abrController,playbackController:playbackController,settings:settings});}else{controller=(0,_TextBufferController2.default)(context).create({streamInfo:streamInfo,type:type,mimeType:mimeType,mediaPlayerModel:mediaPlayerModel,manifestModel:manifestModel,fragmentModel:fragmentModel,errHandler:errHandler,mediaController:mediaController,representationController:representationController,adapter:adapter,textController:textController,abrController:abrController,playbackController:playbackController,settings:settings});}return controller;}function getLiveStartTime(){if(!isDynamic)return NaN;if(!liveEdgeFinder)return NaN;var liveStartTime=NaN;var currentRepresentationInfo=getRepresentationInfo();var liveEdge=liveEdgeFinder.getLiveEdge(currentRepresentationInfo);if(isNaN(liveEdge)){return NaN;}var request=findRequestForLiveEdge(liveEdge,currentRepresentationInfo);if(request){// When low latency mode is selected but browser doesn\\'t support fetch\\n// start at the beginning of the segment to avoid consuming the whole buffer\\nif(settings.get().streaming.lowLatencyEnabled){liveStartTime=request.duration<mediaPlayerModel.getLiveDelay()?request.startTime:request.startTime+request.duration-mediaPlayerModel.getLiveDelay();}else{liveStartTime=request.startTime;}}return liveStartTime;}function findRequestForLiveEdge(liveEdge,currentRepresentationInfo){try{var request=null;var liveDelay=playbackController.getLiveDelay();var dvrWindowSize=!isNaN(streamInfo.manifestInfo.DVRWindowSize)?streamInfo.manifestInfo.DVRWindowSize:liveDelay;var dvrWindowSafetyMargin=0.1*dvrWindowSize;var startTime=void 0;// Make sure that we have at least a valid request for the end of the DVR window, otherwise we might try forever\\nif(!isFinite(dvrWindowSize)||getFragmentRequest(currentRepresentationInfo,liveEdge-dvrWindowSize+dvrWindowSafetyMargin,{ignoreIsFinished:true})){// Try to find a request as close as possible to the targeted live edge\\nwhile(!request&&liveDelay<=dvrWindowSize){startTime=liveEdge-liveDelay;request=getFragmentRequest(currentRepresentationInfo,startTime,{ignoreIsFinished:true});if(!request){liveDelay+=1;// Increase by one second for each iteration\\n}}}if(request){playbackController.setLiveDelay(liveDelay,true);}logger.debug(\\'live edge: \\'+liveEdge+\\', live delay: \\'+liveDelay+\\', live target: \\'+startTime);return request;}catch(e){return null;}}function onSeekTarget(e){bufferingTime=e.time;scheduleController.setSeekTarget(e.time);}function setBufferingTime(value){bufferingTime=value;}function resetIndexHandler(){if(indexHandler){indexHandler.resetIndex();}}function getInitRequest(quality){(0,_SupervisorTools.checkInteger)(quality);var representation=representationController?representationController.getRepresentationForQuality(quality):null;return indexHandler?indexHandler.getInitRequest(getMediaInfo(),representation):null;}function getFragmentRequest(representationInfo,time,options){var fragRequest=null;if(indexHandler){var representation=representationController&&representationInfo?representationController.getRepresentationForQuality(representationInfo.quality):null;// if time and options are undefined, it means the next segment is requested\\n// otherwise, the segment at this specific time is requested.\\nif(time!==undefined&&options!==undefined){fragRequest=indexHandler.getSegmentRequestForTime(getMediaInfo(),representation,time,options);}else{fragRequest=indexHandler.getNextSegmentRequest(getMediaInfo(),representation);}}return fragRequest;}function finalisePlayList(time,reason){dashMetrics.pushPlayListTraceMetrics(time,reason);}instance={initialize:initialize,getStreamId:getStreamId,getType:getType,isUpdating:isUpdating,getBufferController:getBufferController,getFragmentModel:getFragmentModel,getScheduleController:getScheduleController,getRepresentationController:getRepresentationController,getRepresentationInfo:getRepresentationInfo,getBufferLevel:getBufferLevel,isBufferingCompleted:isBufferingCompleted,createBuffer:createBuffer,updateStreamInfo:updateStreamInfo,getStreamInfo:getStreamInfo,selectMediaInfo:selectMediaInfo,addMediaInfo:addMediaInfo,getLiveStartTime:getLiveStartTime,switchTrackAsked:switchTrackAsked,getMediaInfoArr:getMediaInfoArr,getMediaInfo:getMediaInfo,getMediaSource:getMediaSource,setMediaSource:setMediaSource,dischargePreBuffer:dischargePreBuffer,getBuffer:getBuffer,setBuffer:setBuffer,setBufferingTime:setBufferingTime,resetIndexHandler:resetIndexHandler,getInitRequest:getInitRequest,getFragmentRequest:getFragmentRequest,finalisePlayList:finalisePlayList,probeNextRequest:probeNextRequest,reset:reset};setup();return instance;}StreamProcessor.__dashjs_factory_name=\\'StreamProcessor\\';exports.default=_FactoryMaker2.default.getClassFactory(StreamProcessor);\\n//# sourceMappingURL=StreamProcessor.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/StreamProcessor.js?')},\"../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _DashJSError=__webpack_require__(/*! ./vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _URLLoader=__webpack_require__(/*! ./net/URLLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\");var _URLLoader2=_interopRequireDefault(_URLLoader);var _HTTPRequest=__webpack_require__(/*! ./vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _TextRequest=__webpack_require__(/*! ./vo/TextRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js\");var _TextRequest2=_interopRequireDefault(_TextRequest);var _EventBus=__webpack_require__(/*! ../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Errors=__webpack_require__(/*! ../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function XlinkLoader(config){config=config||{};var RESOLVE_TO_ZERO=\\'urn:mpeg:dash:resolve-to-zero:2013\\';var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlLoader=(0,_URLLoader2.default)(context).create({errHandler:config.errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,useFetch:config.settings?config.settings.get().streaming.lowLatencyEnabled:null,errors:_Errors2.default});var instance=void 0;function load(url,element,resolveObject){var report=function report(content,resolveToZero){element.resolved=true;element.resolvedContent=content?content:null;eventBus.trigger(_Events2.default.XLINK_ELEMENT_LOADED,{element:element,resolveObject:resolveObject,error:content||resolveToZero?null:new _DashJSError2.default(_Errors2.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,_Errors2.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+url)});};if(url===RESOLVE_TO_ZERO){report(null,true);}else{var request=new _TextRequest2.default(url,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE);urlLoader.load({request:request,success:function success(data){report(data);},error:function error(){report(null);}});}}function reset(){if(urlLoader){urlLoader.abort();urlLoader=null;}}instance={load:load,reset:reset};return instance;}XlinkLoader.__dashjs_factory_name=\\'XlinkLoader\\';exports.default=_FactoryMaker2.default.getClassFactory(XlinkLoader);\\n//# sourceMappingURL=XlinkLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js?')},\"../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */exports.default={LEVELS:{SUGGESTION:'Suggestion',WARNING:'Warning',ERROR:'Error'},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:'NO_UTC_TIMING_ELEMENT',message:'No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/'},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:'NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE',message:'SMPTE 2052-1:2013 defines the attribute name as \\\"imageType\\\" and does not define \\\"imagetype\\\"'}}};\\n//# sourceMappingURL=ConformanceViolationConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Constants declaration\\n * @class\\n * @ignore\\n * @hideconstructor\\n */var Constants=function(){_createClass(Constants,[{key:'init',value:function init(){/**\\n         *  @constant {string} STREAM Stream media type. Mainly used to report metrics relative to the full stream\\n         *  @memberof Constants#\\n         *  @static\\n         */this.STREAM='stream';/**\\n         *  @constant {string} VIDEO Video media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.VIDEO='video';/**\\n         *  @constant {string} AUDIO Audio media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.AUDIO='audio';/**\\n         *  @constant {string} TEXT Text media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TEXT='text';/**\\n         *  @constant {string} FRAGMENTED_TEXT Fragmented text media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.FRAGMENTED_TEXT='fragmentedText';/**\\n         *  @constant {string} EMBEDDED_TEXT Embedded text media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.EMBEDDED_TEXT='embeddedText';/**\\n         *  @constant {string} MUXED Muxed (video/audio in the same chunk) media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MUXED='muxed';/**\\n         *  @constant {string} IMAGE Image media type\\n         *  @memberof Constants#\\n         *  @static\\n         */this.IMAGE='image';/**\\n         *  @constant {string} STPP STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.STPP='stpp';/**\\n         *  @constant {string} TTML STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TTML='ttml';/**\\n         *  @constant {string} VTT STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.VTT='vtt';/**\\n         *  @constant {string} WVTT STTP Subtitles format\\n         *  @memberof Constants#\\n         *  @static\\n         */this.WVTT='wvtt';/**\\n         *  @constant {string} ABR_STRATEGY_DYNAMIC Dynamic Adaptive bitrate algorithm\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_DYNAMIC='abrDynamic';/**\\n         *  @constant {string} ABR_STRATEGY_BOLA Adaptive bitrate algorithm based on Bola (buffer level)\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_BOLA='abrBola';/**\\n         *  @constant {string} ABR_STRATEGY_L2A Adaptive bitrate algorithm based on L2A (online learning)\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_L2A='abrL2A';/**\\n         *  @constant {string} ABR_STRATEGY_LoLP Adaptive bitrate algorithm based on LoL+\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_LoLP='abrLoLP';/**\\n         *  @constant {string} ABR_STRATEGY_THROUGHPUT Adaptive bitrate algorithm based on throughput\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_STRATEGY_THROUGHPUT='abrThroughput';/**\\n         *  @constant {string} ABR_FETCH_THROUGHPUT_CALUCUALTION_DOWNLOADED_DATA Throughput calculation based on downloaded data array\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA='abrFetchThroughputCalculationDownloadedData';/**\\n         *  @constant {string} ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING Throughput calculation based on moof parsing\\n         *  @memberof Constants#\\n         *  @static\\n         */this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING='abrFetchThroughputCalculationMoofParsing';/**\\n         *  @constant {string} LIVE_CATCHUP_MODE_DEFAULT Throughput calculation based on moof parsing\\n         *  @memberof Constants#\\n         *  @static\\n         */this.LIVE_CATCHUP_MODE_DEFAULT='liveCatchupModeDefault';/**\\n         *  @constant {string} LIVE_CATCHUP_MODE_LOLP Throughput calculation based on moof parsing\\n         *  @memberof Constants#\\n         *  @static\\n         */this.LIVE_CATCHUP_MODE_LOLP='liveCatchupModeLoLP';/**\\n         *  @constant {string} MOVING_AVERAGE_SLIDING_WINDOW Moving average sliding window\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MOVING_AVERAGE_SLIDING_WINDOW='slidingWindow';/**\\n         *  @constant {string} EWMA Exponential moving average\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MOVING_AVERAGE_EWMA='ewma';/**\\n         *  @constant {string} BAD_ARGUMENT_ERROR Invalid Arguments type of error\\n         *  @memberof Constants#\\n         *  @static\\n         */this.BAD_ARGUMENT_ERROR='Invalid Arguments';/**\\n         *  @constant {string} MISSING_CONFIG_ERROR Missing configuration parameters type of error\\n         *  @memberof Constants#\\n         *  @static\\n         */this.MISSING_CONFIG_ERROR='Missing config parameter(s)';/**\\n         *  @constant {string} TRACK_SWITCH_MODE_ALWAYS_REPLACE used to clear the buffered data (prior to current playback position) after track switch. Default for audio\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SWITCH_MODE_ALWAYS_REPLACE='alwaysReplace';/**\\n         *  @constant {string} TRACK_SWITCH_MODE_NEVER_REPLACE used to forbid clearing the buffered data (prior to current playback position) after track switch. Defers to fastSwitchEnabled for placement of new data. Default for video\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SWITCH_MODE_NEVER_REPLACE='neverReplace';/**\\n         *  @constant {string} TRACK_SELECTION_MODE_HIGHEST_BITRATE makes the player select the track with a highest bitrate. This mode is a default mode.\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SELECTION_MODE_HIGHEST_BITRATE='highestBitrate';/**\\n         *  @constant {string} TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY makes the player select the track with the lowest bitrate per pixel average.\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY='highestEfficiency';/**\\n         *  @constant {string} TRACK_SELECTION_MODE_WIDEST_RANGE makes the player select the track with a widest range of bitrates.\\n         *  @memberof Constants#\\n         *  @static\\n         */this.TRACK_SELECTION_MODE_WIDEST_RANGE='widestRange';this.LOCATION='Location';this.INITIALIZE='initialize';this.TEXT_SHOWING='showing';this.TEXT_HIDDEN='hidden';this.CC1='CC1';this.CC3='CC3';this.UTF8='utf-8';this.SCHEME_ID_URI='schemeIdUri';this.START_TIME='starttime';this.SERVICE_DESCRIPTION_LL_SCHEME='urn:dvb:dash:lowlatency:scope:2019';this.SUPPLEMENTAL_PROPERTY_LL_SCHEME='urn:dvb:dash:lowlatency:critical:2019';this.XML='XML';this.ARRAY_BUFFER='ArrayBuffer';this.DVB_REPORTING_URL='dvb:reportingUrl';this.DVB_PROBABILITY='dvb:probability';}}]);function Constants(){_classCallCheck(this,Constants);this.init();}return Constants;}();var constants=new Constants();exports.default=constants;\\n//# sourceMappingURL=Constants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Metrics Constants declaration\\n * @class\\n * @ignore\\n */var MetricsConstants=function(){_createClass(MetricsConstants,[{key:'init',value:function init(){this.TCP_CONNECTION='TcpList';this.HTTP_REQUEST='HttpList';this.TRACK_SWITCH='RepSwitchList';this.BUFFER_LEVEL='BufferLevel';this.BUFFER_LOADED='bufferLoaded';this.ABANDON_LOAD='abandonload';this.ALLOW_LOAD='allowload';this.BUFFER_EMPTY='bufferStalled';this.BUFFER_STATE='BufferState';this.DVR_INFO='DVRInfo';this.DROPPED_FRAMES='DroppedFrames';this.SCHEDULING_INFO='SchedulingInfo';this.REQUESTS_QUEUE='RequestsQueue';this.MANIFEST_UPDATE='ManifestUpdate';this.MANIFEST_UPDATE_STREAM_INFO='ManifestUpdatePeriodInfo';this.MANIFEST_UPDATE_TRACK_INFO='ManifestUpdateRepresentationInfo';this.PLAY_LIST='PlayList';this.DVB_ERRORS='DVBErrors';}}]);function MetricsConstants(){_classCallCheck(this,MetricsConstants);this.init();}return MetricsConstants;}();var constants=new MetricsConstants();exports.default=constants;\\n//# sourceMappingURL=MetricsConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Protection Constants declaration\\n * @class\\n * @ignore\\n */var ProtectionConstants=function(){_createClass(ProtectionConstants,[{key:'init',value:function init(){this.CLEARKEY_KEYSTEM_STRING='org.w3.clearkey';this.WIDEVINE_KEYSTEM_STRING='com.widevine.alpha';this.PLAYREADY_KEYSTEM_STRING='com.microsoft.playready';}}]);function ProtectionConstants(){_classCallCheck(this,ProtectionConstants);this.init();}return ProtectionConstants;}();var constants=new ProtectionConstants();exports.default=constants;\\n//# sourceMappingURL=ProtectionConstants.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ABRRulesCollection=__webpack_require__(/*! ../rules/abr/ABRRulesCollection */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js\\\");var _ABRRulesCollection2=_interopRequireDefault(_ABRRulesCollection);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _BitrateInfo=__webpack_require__(/*! ../vo/BitrateInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js\\\");var _BitrateInfo2=_interopRequireDefault(_BitrateInfo);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _RulesContext=__webpack_require__(/*! ../rules/RulesContext */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js\\\");var _RulesContext2=_interopRequireDefault(_RulesContext);var _SwitchRequest=__webpack_require__(/*! ../rules/SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _SwitchRequestHistory=__webpack_require__(/*! ../rules/SwitchRequestHistory */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js\\\");var _SwitchRequestHistory2=_interopRequireDefault(_SwitchRequestHistory);var _DroppedFramesHistory=__webpack_require__(/*! ../rules/DroppedFramesHistory */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js\\\");var _DroppedFramesHistory2=_interopRequireDefault(_DroppedFramesHistory);var _ThroughputHistory=__webpack_require__(/*! ../rules/ThroughputHistory */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js\\\");var _ThroughputHistory2=_interopRequireDefault(_ThroughputHistory);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var DEFAULT_VIDEO_BITRATE=1000;var DEFAULT_AUDIO_BITRATE=100;var QUALITY_DEFAULT=0;function AbrController(){var context=this.context;var debug=(0,_Debug2.default)(context).getInstance();var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,abrRulesCollection=void 0,streamController=void 0,topQualities=void 0,qualityDict=void 0,streamProcessorDict=void 0,abandonmentStateDict=void 0,abandonmentTimeout=void 0,windowResizeEventCalled=void 0,elementWidth=void 0,elementHeight=void 0,adapter=void 0,videoModel=void 0,mediaPlayerModel=void 0,domStorage=void 0,playbackIndex=void 0,switchHistoryDict=void 0,droppedFramesHistory=void 0,throughputHistory=void 0,isUsingBufferOccupancyABRDict=void 0,isUsingL2AABRDict=void 0,isUsingLoLPBRDict=void 0,dashMetrics=void 0,settings=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();}function registerStreamType(type,streamProcessor){switchHistoryDict[type]=switchHistoryDict[type]||(0,_SwitchRequestHistory2.default)(context).create();streamProcessorDict[type]=streamProcessor;abandonmentStateDict[type]=abandonmentStateDict[type]||{};abandonmentStateDict[type].state=_MetricsConstants2.default.ALLOW_LOAD;isUsingBufferOccupancyABRDict[type]=false;isUsingL2AABRDict[type]=false;isUsingLoLPBRDict[type]=false;eventBus.on(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,instance);if(type===_Constants2.default.VIDEO){eventBus.on(_Events2.default.QUALITY_CHANGE_RENDERED,onQualityChangeRendered,instance);droppedFramesHistory=droppedFramesHistory||(0,_DroppedFramesHistory2.default)(context).create();setElementSize();}eventBus.on(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.on(_Events2.default.PERIOD_SWITCH_COMPLETED,createAbrRulesCollection,instance);throughputHistory=throughputHistory||(0,_ThroughputHistory2.default)(context).create({settings:settings});}function unRegisterStreamType(type){delete streamProcessorDict[type];}function createAbrRulesCollection(){abrRulesCollection=(0,_ABRRulesCollection2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings});abrRulesCollection.initialize();}function resetInitialSettings(){topQualities={};qualityDict={};abandonmentStateDict={};streamProcessorDict={};switchHistoryDict={};isUsingBufferOccupancyABRDict={};isUsingL2AABRDict={};isUsingLoLPBRDict={};if(windowResizeEventCalled===undefined){windowResizeEventCalled=false;}playbackIndex=undefined;droppedFramesHistory=undefined;throughputHistory=undefined;clearTimeout(abandonmentTimeout);abandonmentTimeout=null;}function reset(){resetInitialSettings();eventBus.off(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_RENDERED,onQualityChangeRendered,instance);eventBus.off(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.off(_Events2.default.PERIOD_SWITCH_COMPLETED,createAbrRulesCollection,instance);if(abrRulesCollection){abrRulesCollection.reset();}}function setConfig(config){if(!config)return;if(config.streamController){streamController=config.streamController;}if(config.domStorage){domStorage=config.domStorage;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.adapter){adapter=config.adapter;}if(config.videoModel){videoModel=config.videoModel;}if(config.settings){settings=config.settings;}}function checkConfig(){if(!domStorage||!domStorage.hasOwnProperty('getSavedBitrateSettings')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function onQualityChangeRendered(e){if(e.mediaType===_Constants2.default.VIDEO){if(playbackIndex!==undefined){droppedFramesHistory.push(playbackIndex,videoModel.getPlaybackQuality());}playbackIndex=e.newQuality;}}function onMetricAdded(e){if(e.metric===_MetricsConstants2.default.HTTP_REQUEST&&e.value&&e.value.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE&&(e.mediaType===_Constants2.default.AUDIO||e.mediaType===_Constants2.default.VIDEO)){throughputHistory.push(e.mediaType,e.value,settings.get().streaming.abr.useDeadTimeLatency);}if(e.metric===_MetricsConstants2.default.BUFFER_LEVEL&&(e.mediaType===_Constants2.default.AUDIO||e.mediaType===_Constants2.default.VIDEO)){_updateAbrStrategy(e.mediaType,0.001*e.value.level);}}function getTopQualityIndexFor(type,id){var idx=void 0;topQualities[id]=topQualities[id]||{};if(!topQualities[id].hasOwnProperty(type)){topQualities[id][type]=0;}idx=checkMaxBitrate(topQualities[id][type],type);idx=checkMaxRepresentationRatio(idx,type,topQualities[id][type]);idx=checkPortalSize(idx,type);return idx;}/**\\n     * Gets top BitrateInfo for the player\\n     * @param {string} type - 'video' or 'audio' are the type options.\\n     * @returns {BitrateInfo | null}\\n     */function getTopBitrateInfoFor(type){if(type&&streamProcessorDict&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();if(streamInfo&&streamInfo.id){var idx=getTopQualityIndexFor(type,streamInfo.id);var bitrates=getBitrateList(streamProcessorDict[type].getMediaInfo());return bitrates[idx]?bitrates[idx]:null;}}return null;}/**\\n     * @param {string} type\\n     * @returns {number} A value of the initial bitrate, kbps\\n     * @memberof AbrController#\\n     */function getInitialBitrateFor(type){checkConfig();if(type===_Constants2.default.TEXT||type===_Constants2.default.FRAGMENTED_TEXT){return NaN;}var savedBitrate=domStorage.getSavedBitrateSettings(type);var configBitrate=settings.get().streaming.abr.initialBitrate[type];var configRatio=settings.get().streaming.abr.initialRepresentationRatio[type];if(configBitrate===-1){if(configRatio>-1){var representation=adapter.getAdaptationForType(0,type).Representation;if(Array.isArray(representation)){var repIdx=Math.max(Math.round(representation.length*configRatio)-1,0);configBitrate=representation[repIdx].bandwidth;}else{configBitrate=0;}}else if(!isNaN(savedBitrate)){configBitrate=savedBitrate;}else{configBitrate=type===_Constants2.default.VIDEO?DEFAULT_VIDEO_BITRATE:DEFAULT_AUDIO_BITRATE;}}return configBitrate;}function getMaxAllowedBitrateFor(type){return settings.get().streaming.abr.maxBitrate[type];}function getMinAllowedBitrateFor(type){return settings.get().streaming.abr.minBitrate[type];}function getMaxAllowedIndexFor(type){var maxBitrate=getMaxAllowedBitrateFor(type);if(maxBitrate>-1){return getQualityForBitrate(streamProcessorDict[type].getMediaInfo(),maxBitrate);}else{return undefined;}}function getMinAllowedIndexFor(type){var minBitrate=getMinAllowedBitrateFor(type);if(minBitrate>-1){var mediaInfo=streamProcessorDict[type].getMediaInfo();var bitrateList=getBitrateList(mediaInfo);// This returns the quality index <= for the given bitrate\\nvar minIdx=getQualityForBitrate(mediaInfo,minBitrate);if(bitrateList[minIdx]&&minIdx<bitrateList.length-1&&bitrateList[minIdx].bitrate<minBitrate*1000){minIdx++;// Go to the next bitrate\\n}return minIdx;}else{return undefined;}}function checkPlaybackQuality(type){if(type&&streamProcessorDict&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();var streamId=streamInfo?streamInfo.id:null;var oldQuality=getQualityFor(type);var rulesContext=(0,_RulesContext2.default)(context).create({abrController:instance,streamProcessor:streamProcessorDict[type],currentValue:oldQuality,switchHistory:switchHistoryDict[type],droppedFramesHistory:droppedFramesHistory,useBufferOccupancyABR:useBufferOccupancyABR(type),useL2AABR:useL2AABR(type),useLoLPABR:useLoLPABR(type),videoModel:videoModel});if(droppedFramesHistory){var playbackQuality=videoModel.getPlaybackQuality();if(playbackQuality){droppedFramesHistory.push(playbackIndex,playbackQuality);}}if(!!settings.get().streaming.abr.autoSwitchBitrate[type]){var minIdx=getMinAllowedIndexFor(type);var topQualityIdx=getTopQualityIndexFor(type,streamId);var switchRequest=abrRulesCollection.getMaxQuality(rulesContext);var newQuality=switchRequest.quality;if(minIdx!==undefined&&(newQuality>_SwitchRequest2.default.NO_CHANGE?newQuality:oldQuality)<minIdx){newQuality=minIdx;}if(newQuality>topQualityIdx){newQuality=topQualityIdx;}switchHistoryDict[type].push({oldValue:oldQuality,newValue:newQuality});if(newQuality>_SwitchRequest2.default.NO_CHANGE&&newQuality!=oldQuality){if(abandonmentStateDict[type].state===_MetricsConstants2.default.ALLOW_LOAD||newQuality>oldQuality){changeQuality(type,oldQuality,newQuality,topQualityIdx,switchRequest.reason);}}else if(settings.get().debug.logLevel===_Debug2.default.LOG_LEVEL_DEBUG){var bufferLevel=dashMetrics.getCurrentBufferLevel(type,true);logger.debug('['+type+'] stay on '+oldQuality+'/'+topQualityIdx+' (buffer: '+bufferLevel+')');}}}}function setPlaybackQuality(type,streamInfo,newQuality,reason){var id=streamInfo.id;var oldQuality=getQualityFor(type);(0,_SupervisorTools.checkInteger)(newQuality);var topQualityIdx=getTopQualityIndexFor(type,id);if(newQuality!==oldQuality&&newQuality>=0&&newQuality<=topQualityIdx){changeQuality(type,oldQuality,newQuality,topQualityIdx,reason);}}function changeQuality(type,oldQuality,newQuality,topQualityIdx,reason){if(type&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();var id=streamInfo?streamInfo.id:null;if(settings.get().debug.logLevel===_Debug2.default.LOG_LEVEL_DEBUG){var bufferLevel=dashMetrics.getCurrentBufferLevel(type);logger.info('['+type+'] switch from '+oldQuality+' to '+newQuality+'/'+topQualityIdx+' (buffer: '+bufferLevel+') '+(reason?JSON.stringify(reason):'.'));}setQualityFor(type,id,newQuality);eventBus.trigger(_Events2.default.QUALITY_CHANGE_REQUESTED,{oldQuality:oldQuality,newQuality:newQuality,reason:reason},{streamId:streamInfo.id,mediaType:type});var bitrate=throughputHistory.getAverageThroughput(type);if(!isNaN(bitrate)){domStorage.setSavedBitrateSettings(type,bitrate);}}}function setAbandonmentStateFor(type,state){abandonmentStateDict[type].state=state;}function getAbandonmentStateFor(type){return abandonmentStateDict[type]?abandonmentStateDict[type].state:null;}/**\\n     * @param {MediaInfo} mediaInfo\\n     * @param {number} bitrate A bitrate value, kbps\\n     * @param {number} latency Expected latency of connection, ms\\n     * @returns {number} A quality index <= for the given bitrate\\n     * @memberof AbrController#\\n     */function getQualityForBitrate(mediaInfo,bitrate,latency){var voRepresentation=mediaInfo&&mediaInfo.type?streamProcessorDict[mediaInfo.type].getRepresentationInfo():null;if(settings.get().streaming.abr.useDeadTimeLatency&&latency&&voRepresentation&&voRepresentation.fragmentDuration){latency=latency/1000;var fragmentDuration=voRepresentation.fragmentDuration;if(latency>fragmentDuration){return 0;}else{var deadTimeRatio=latency/fragmentDuration;bitrate=bitrate*(1-deadTimeRatio);}}var bitrateList=getBitrateList(mediaInfo);for(var i=bitrateList.length-1;i>=0;i--){var bitrateInfo=bitrateList[i];if(bitrate*1000>=bitrateInfo.bitrate){return i;}}return QUALITY_DEFAULT;}/**\\n     * @param {MediaInfo} mediaInfo\\n     * @returns {Array|null} A list of {@link BitrateInfo} objects\\n     * @memberof AbrController#\\n     */function getBitrateList(mediaInfo){var infoList=[];if(!mediaInfo||!mediaInfo.bitrateList)return infoList;var bitrateList=mediaInfo.bitrateList;var type=mediaInfo.type;var bitrateInfo=void 0;for(var i=0,ln=bitrateList.length;i<ln;i++){bitrateInfo=new _BitrateInfo2.default();bitrateInfo.mediaType=type;bitrateInfo.qualityIndex=i;bitrateInfo.bitrate=bitrateList[i].bandwidth;bitrateInfo.width=bitrateList[i].width;bitrateInfo.height=bitrateList[i].height;bitrateInfo.scanType=bitrateList[i].scanType;infoList.push(bitrateInfo);}return infoList;}function _updateAbrStrategy(mediaType,bufferLevel){var strategy=settings.get().streaming.abr.ABRStrategy;if(strategy===_Constants2.default.ABR_STRATEGY_L2A){isUsingBufferOccupancyABRDict[mediaType]=false;isUsingLoLPBRDict[mediaType]=false;isUsingL2AABRDict[mediaType]=true;return;}if(strategy===_Constants2.default.ABR_STRATEGY_LoLP){isUsingBufferOccupancyABRDict[mediaType]=false;isUsingLoLPBRDict[mediaType]=true;isUsingL2AABRDict[mediaType]=false;return;}else if(strategy===_Constants2.default.ABR_STRATEGY_BOLA){isUsingBufferOccupancyABRDict[mediaType]=true;isUsingLoLPBRDict[mediaType]=false;isUsingL2AABRDict[mediaType]=false;return;}else if(strategy===_Constants2.default.ABR_STRATEGY_THROUGHPUT){isUsingBufferOccupancyABRDict[mediaType]=false;isUsingLoLPBRDict[mediaType]=false;isUsingL2AABRDict[mediaType]=false;return;}// else ABR_STRATEGY_DYNAMIC\\n_updateDynamicAbrStrategy(mediaType,bufferLevel);}function _updateDynamicAbrStrategy(mediaType,bufferLevel){var stableBufferTime=mediaPlayerModel.getStableBufferTime();var switchOnThreshold=stableBufferTime;var switchOffThreshold=0.5*stableBufferTime;var useBufferABR=isUsingBufferOccupancyABRDict[mediaType];var newUseBufferABR=bufferLevel>(useBufferABR?switchOffThreshold:switchOnThreshold);// use hysteresis to avoid oscillating rules\\nisUsingBufferOccupancyABRDict[mediaType]=newUseBufferABR;if(newUseBufferABR!==useBufferABR){if(newUseBufferABR){logger.info('['+mediaType+'] switching from throughput to buffer occupancy ABR rule (buffer: '+bufferLevel.toFixed(3)+').');}else{logger.info('['+mediaType+'] switching from buffer occupancy to throughput ABR rule (buffer: '+bufferLevel.toFixed(3)+').');}}}function useBufferOccupancyABR(mediaType){return isUsingBufferOccupancyABRDict[mediaType];}function useL2AABR(mediaType){return isUsingL2AABRDict[mediaType];}function useLoLPABR(mediaType){return isUsingLoLPBRDict[mediaType];}function getThroughputHistory(){return throughputHistory;}function updateTopQualityIndex(mediaInfo){var type=mediaInfo.type;var streamId=mediaInfo.streamInfo.id;var max=mediaInfo.representationCount-1;setTopQualityIndex(type,streamId,max);return max;}function isPlayingAtTopQuality(streamInfo){var streamId=streamInfo?streamInfo.id:null;var audioQuality=getQualityFor(_Constants2.default.AUDIO);var videoQuality=getQualityFor(_Constants2.default.VIDEO);var isAtTop=audioQuality===getTopQualityIndexFor(_Constants2.default.AUDIO,streamId)&&videoQuality===getTopQualityIndexFor(_Constants2.default.VIDEO,streamId);return isAtTop;}function getQualityFor(type){if(type&&streamProcessorDict[type]){var streamInfo=streamProcessorDict[type].getStreamInfo();var id=streamInfo?streamInfo.id:null;var quality=void 0;if(id){qualityDict[id]=qualityDict[id]||{};if(!qualityDict[id].hasOwnProperty(type)){qualityDict[id][type]=QUALITY_DEFAULT;}quality=qualityDict[id][type];return quality;}}return QUALITY_DEFAULT;}function setQualityFor(type,id,value){qualityDict[id]=qualityDict[id]||{};qualityDict[id][type]=value;}function setTopQualityIndex(type,id,value){topQualities[id]=topQualities[id]||{};topQualities[id][type]=value;}function checkMaxBitrate(idx,type){var newIdx=idx;if(!streamProcessorDict[type]){return newIdx;}var minIdx=getMinAllowedIndexFor(type);if(minIdx!==undefined){newIdx=Math.max(idx,minIdx);}var maxIdx=getMaxAllowedIndexFor(type);if(maxIdx!==undefined){newIdx=Math.min(newIdx,maxIdx);}return newIdx;}function checkMaxRepresentationRatio(idx,type,maxIdx){var maxRepresentationRatio=settings.get().streaming.abr.maxRepresentationRatio[type];if(isNaN(maxRepresentationRatio)||maxRepresentationRatio>=1||maxRepresentationRatio<0){return idx;}return Math.min(idx,Math.round(maxIdx*maxRepresentationRatio));}function setWindowResizeEventCalled(value){windowResizeEventCalled=value;}function setElementSize(){if(videoModel){var hasPixelRatio=settings.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty('devicePixelRatio');var pixelRatio=hasPixelRatio?window.devicePixelRatio:1;elementWidth=videoModel.getClientWidth()*pixelRatio;elementHeight=videoModel.getClientHeight()*pixelRatio;}}function checkPortalSize(idx,type){if(type!==_Constants2.default.VIDEO||!settings.get().streaming.abr.limitBitrateByPortal||!streamProcessorDict[type]){return idx;}if(!windowResizeEventCalled){setElementSize();}var representation=adapter.getAdaptationForType(0,type).Representation;var newIdx=idx;if(elementWidth>0&&elementHeight>0){while(newIdx>0&&representation[newIdx]&&elementWidth<representation[newIdx].width&&elementWidth-representation[newIdx-1].width<representation[newIdx].width-elementWidth){newIdx=newIdx-1;}// Make sure that in case of multiple representation elements have same\\n// resolution, every such element is included\\nwhile(newIdx<representation.length-1&&representation[newIdx].width===representation[newIdx+1].width){newIdx=newIdx+1;}}return newIdx;}function onFragmentLoadProgress(e){var type=e.request.mediaType;if(!!settings.get().streaming.abr.autoSwitchBitrate[type]){var streamProcessor=streamProcessorDict[type];if(!streamProcessor)return;// There may be a fragment load in progress when we switch periods and recreated some controllers.\\nvar rulesContext=(0,_RulesContext2.default)(context).create({abrController:instance,streamProcessor:streamProcessor,currentRequest:e.request,useBufferOccupancyABR:useBufferOccupancyABR(type),useL2AABR:useL2AABR(type),useLoLPABR:useLoLPABR(type),videoModel:videoModel});var switchRequest=abrRulesCollection.shouldAbandonFragment(rulesContext);if(switchRequest.quality>_SwitchRequest2.default.NO_CHANGE){var fragmentModel=streamProcessor.getFragmentModel();var request=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_LOADING,index:e.request.index})[0];if(request){//TODO Check if we should abort or if better to finish download. check bytesLoaded/Total\\nfragmentModel.abortRequests();setAbandonmentStateFor(type,_MetricsConstants2.default.ABANDON_LOAD);switchHistoryDict[type].reset();switchHistoryDict[type].push({oldValue:getQualityFor(type),newValue:switchRequest.quality,confidence:1,reason:switchRequest.reason});setPlaybackQuality(type,streamController.getActiveStreamInfo(),switchRequest.quality,switchRequest.reason);clearTimeout(abandonmentTimeout);abandonmentTimeout=setTimeout(function(){setAbandonmentStateFor(type,_MetricsConstants2.default.ALLOW_LOAD);abandonmentTimeout=null;},settings.get().streaming.abandonLoadTimeout);}}}}instance={isPlayingAtTopQuality:isPlayingAtTopQuality,updateTopQualityIndex:updateTopQualityIndex,getThroughputHistory:getThroughputHistory,getBitrateList:getBitrateList,getQualityForBitrate:getQualityForBitrate,getTopBitrateInfoFor:getTopBitrateInfoFor,getMaxAllowedIndexFor:getMaxAllowedIndexFor,getMinAllowedIndexFor:getMinAllowedIndexFor,getInitialBitrateFor:getInitialBitrateFor,getQualityFor:getQualityFor,getAbandonmentStateFor:getAbandonmentStateFor,setPlaybackQuality:setPlaybackQuality,checkPlaybackQuality:checkPlaybackQuality,getTopQualityIndexFor:getTopQualityIndexFor,setElementSize:setElementSize,setWindowResizeEventCalled:setWindowResizeEventCalled,createAbrRulesCollection:createAbrRulesCollection,registerStreamType:registerStreamType,unRegisterStreamType:unRegisterStreamType,setConfig:setConfig,reset:reset};setup();return instance;}AbrController.__dashjs_factory_name='AbrController';var factory=_FactoryMaker2.default.getSingletonFactory(AbrController);factory.QUALITY_DEFAULT=QUALITY_DEFAULT;_FactoryMaker2.default.updateSingletonFactory(AbrController.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=AbrController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _BaseURLTreeModel=__webpack_require__(/*! ../models/BaseURLTreeModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js\");var _BaseURLTreeModel2=_interopRequireDefault(_BaseURLTreeModel);var _BaseURLSelector=__webpack_require__(/*! ../utils/BaseURLSelector */ \"../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js\");var _BaseURLSelector2=_interopRequireDefault(_BaseURLSelector);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _BaseURL=__webpack_require__(/*! ../../dash/vo/BaseURL */ \"../node_modules/dashjs/build/es5/src/dash/vo/BaseURL.js\");var _BaseURL2=_interopRequireDefault(_BaseURL);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BaseURLController(){var instance=void 0,adapter=void 0;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var baseURLTreeModel=void 0,baseURLSelector=void 0;function onBlackListChanged(e){baseURLTreeModel.invalidateSelectedIndexes(e.entry);}function setup(){baseURLTreeModel=(0,_BaseURLTreeModel2.default)(context).create();baseURLSelector=(0,_BaseURLSelector2.default)(context).create();eventBus.on(_Events2.default.SERVICE_LOCATION_BLACKLIST_CHANGED,onBlackListChanged,instance);}function setConfig(config){if(config.baseURLTreeModel){baseURLTreeModel=config.baseURLTreeModel;}if(config.baseURLSelector){baseURLSelector=config.baseURLSelector;}if(config.adapter){adapter=config.adapter;}}function update(manifest){baseURLTreeModel.update(manifest);baseURLSelector.chooseSelector(adapter.getIsDVB(manifest));}function resolve(path){var baseUrls=baseURLTreeModel.getForPath(path);var baseUrl=baseUrls.reduce(function(p,c){var b=baseURLSelector.select(c);if(b){if(!urlUtils.isRelative(b.url)){p.url=b.url;p.serviceLocation=b.serviceLocation;}else{p.url=urlUtils.resolve(b.url,p.url);}p.availabilityTimeOffset=b.availabilityTimeOffset;p.availabilityTimeComplete=b.availabilityTimeComplete;}else{return new _BaseURL2.default();}return p;},new _BaseURL2.default());if(!urlUtils.isRelative(baseUrl.url)){return baseUrl;}}function reset(){baseURLTreeModel.reset();baseURLSelector.reset();}function initialize(data){// report config to baseURLTreeModel and baseURLSelector\\nbaseURLTreeModel.setConfig({adapter:adapter});update(data);}instance={reset:reset,initialize:initialize,resolve:resolve,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BaseURLController.__dashjs_factory_name=\\'BaseURLController\\';exports.default=_FactoryMaker2.default.getClassFactory(BaseURLController);\\n//# sourceMappingURL=BaseURLController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/BaseURLController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function BlackListController(config){config=config||{};var instance=void 0;var blacklist=[];var eventBus=(0,_EventBus2.default)(this.context).getInstance();var updateEventName=config.updateEventName;var addBlacklistEventName=config.addBlacklistEventName;function contains(query){if(!blacklist.length||!query||!query.length){return false;}return blacklist.indexOf(query)!==-1;}function add(entry){if(blacklist.indexOf(entry)!==-1){return;}blacklist.push(entry);eventBus.trigger(updateEventName,{entry:entry});}function onAddBlackList(e){add(e.entry);}function setup(){if(addBlacklistEventName){eventBus.on(addBlacklistEventName,onAddBlackList,instance);}}function reset(){blacklist=[];}instance={add:add,contains:contains,reset:reset};setup();return instance;}BlackListController.__dashjs_factory_name=\\'BlackListController\\';exports.default=_FactoryMaker2.default.getClassFactory(BlackListController);\\n//# sourceMappingURL=BlacklistController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _SourceBufferSink=__webpack_require__(/*! ../SourceBufferSink */ \\\"../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js\\\");var _SourceBufferSink2=_interopRequireDefault(_SourceBufferSink);var _PreBufferSink=__webpack_require__(/*! ../PreBufferSink */ \\\"../node_modules/dashjs/build/es5/src/streaming/PreBufferSink.js\\\");var _PreBufferSink2=_interopRequireDefault(_PreBufferSink);var _AbrController=__webpack_require__(/*! ./AbrController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/AbrController.js\\\");var _AbrController2=_interopRequireDefault(_AbrController);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _InitCache=__webpack_require__(/*! ../utils/InitCache */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\\\");var _InitCache2=_interopRequireDefault(_InitCache);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var BUFFERING_COMPLETED_THRESHOLD=0.1;var BUFFER_END_THRESHOLD=0.5;var BUFFER_RANGE_CALCULATION_THRESHOLD=0.01;var QUOTA_EXCEEDED_ERROR_CODE=22;var BUFFER_CONTROLLER_TYPE='BufferController';function BufferController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var errHandler=config.errHandler;var fragmentModel=config.fragmentModel;var representationController=config.representationController;var mediaController=config.mediaController;var adapter=config.adapter;var textController=config.textController;var abrController=config.abrController;var playbackController=config.playbackController;var streamInfo=config.streamInfo;var type=config.type;var settings=config.settings;var instance=void 0,logger=void 0,requiredQuality=void 0,isBufferingCompleted=void 0,bufferLevel=void 0,criticalBufferLevel=void 0,mediaSource=void 0,maxAppendedIndex=void 0,lastIndex=void 0,buffer=void 0,dischargeBuffer=void 0,dischargeFragments=void 0,bufferState=void 0,appendedBytesInfo=void 0,wallclockTicked=void 0,isPruningInProgress=void 0,isQuotaExceeded=void 0,initCache=void 0,seekTarget=void 0,seekClearedBufferingCompleted=void 0,pendingPruningRanges=void 0,replacingBuffer=void 0,mediaChunk=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);initCache=(0,_InitCache2.default)(context).getInstance();resetInitialSettings();}function getBufferControllerType(){return BUFFER_CONTROLLER_TYPE;}function initialize(Source){setMediaSource(Source);requiredQuality=abrController.getQualityFor(type);eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.on(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,this);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,this);eventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,this);eventBus.on(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.on(_Events2.default.PLAYBACK_PLAYING,onPlaybackPlaying,this);eventBus.on(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.on(_Events2.default.PLAYBACK_SEEKED,onPlaybackSeeked,this);eventBus.on(_Events2.default.PLAYBACK_STALLED,onPlaybackStalled,this);eventBus.on(_Events2.default.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,this);eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,this,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});eventBus.on(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,onRemoved,this);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function getRepresentationInfo(quality){return adapter.convertDataToRepresentationInfo(representationController.getRepresentationForQuality(quality));}function createBuffer(mediaInfoArr,oldBuffers){if(!initCache||!mediaInfoArr)return null;var mediaInfo=mediaInfoArr[0];if(mediaSource){try{if(oldBuffers&&oldBuffers[type]){buffer=(0,_SourceBufferSink2.default)(context).create(mediaSource,mediaInfo,onAppended.bind(this),oldBuffers[type]);}else{buffer=(0,_SourceBufferSink2.default)(context).create(mediaSource,mediaInfo,onAppended.bind(this),null);}if(settings.get().streaming.useAppendWindow){buffer.updateAppendWindow(streamInfo);}if(typeof buffer.getBuffer().initialize==='function'){buffer.getBuffer().initialize(type,streamInfo,mediaInfoArr,fragmentModel);}}catch(e){logger.fatal('Caught error on create SourceBuffer: '+e);errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+type));}}else{buffer=(0,_PreBufferSink2.default)(context).create(onAppended.bind(this));}updateBufferTimestampOffset(getRepresentationInfo(requiredQuality));return buffer;}function dischargePreBuffer(){if(buffer&&dischargeBuffer&&typeof dischargeBuffer.discharge==='function'){var ranges=dischargeBuffer.getAllBufferRanges();if(ranges.length>0){var rangeStr='Beginning '+type+'PreBuffer discharge, adding buffer for:';for(var i=0;i<ranges.length;i++){rangeStr+=' start: '+ranges.start(i)+', end: '+ranges.end(i)+';';}logger.debug(rangeStr);}else{logger.debug('PreBuffer discharge requested, but there were no media segments in the PreBuffer.');}//A list of fragments to supress bytesAppended events for. This makes transferring from a prebuffer to a sourcebuffer silent.\\ndischargeFragments=[];var chunks=dischargeBuffer.discharge();var lastInit=null;for(var j=0;j<chunks.length;j++){var chunk=chunks[j];if(chunk.segmentType!=='InitializationSegment'){var initChunk=initCache.extract(chunk.streamId,chunk.representationId);if(initChunk){if(lastInit!==initChunk){dischargeFragments.push(initChunk);buffer.append(initChunk);lastInit=initChunk;}}}dischargeFragments.push(chunk);buffer.append(chunk);}dischargeBuffer.reset();dischargeBuffer=null;}}function onInitFragmentLoaded(e){logger.info('Init fragment finished loading saving to',type+'\\\\'s init cache');initCache.save(e.chunk);logger.debug('Append Init fragment',type,' with representationId:',e.chunk.representationId,' and quality:',e.chunk.quality,', data size:',e.chunk.bytes.byteLength);appendToBuffer(e.chunk);}function appendInitSegment(representationId){// Get init segment from cache\\nvar chunk=initCache.extract(streamInfo.id,representationId);if(!chunk){// Init segment not in cache, shall be requested\\nreturn false;}// Append init segment into buffer\\nlogger.info('Append Init fragment',type,' with representationId:',chunk.representationId,' and quality:',chunk.quality,', data size:',chunk.bytes.byteLength);appendToBuffer(chunk);return true;}function onMediaFragmentLoaded(e){var chunk=e.chunk;if(replacingBuffer){mediaChunk=chunk;var ranges=buffer&&buffer.getAllBufferRanges();if(ranges&&ranges.length>0&&playbackController.getTimeToStreamEnd()>settings.get().streaming.stallThreshold){logger.debug('Clearing buffer because track changed - '+(ranges.end(ranges.length-1)+BUFFER_END_THRESHOLD));clearBuffers([{start:0,end:ranges.end(ranges.length-1)+BUFFER_END_THRESHOLD,force:true// Force buffer removal even when buffering is completed and MediaSource is ended\\n}]);}}else{appendToBuffer(chunk);}}function appendToBuffer(chunk){buffer.append(chunk);if(chunk.mediaInfo.type===_Constants2.default.VIDEO){triggerEvent(_Events2.default.VIDEO_CHUNK_RECEIVED,{chunk:chunk});}}function showBufferRanges(ranges){if(ranges&&ranges.length>0){for(var i=0,len=ranges.length;i<len;i++){logger.debug('Buffered range: '+ranges.start(i)+' - '+ranges.end(i)+', currentTime = ',playbackController.getTime());}}}function onAppended(e){if(e.error){if(e.error.code===QUOTA_EXCEEDED_ERROR_CODE){isQuotaExceeded=true;criticalBufferLevel=getTotalBufferedTime()*0.8;logger.warn('Quota exceeded, Critical Buffer: '+criticalBufferLevel);if(criticalBufferLevel>0){// recalculate buffer lengths according to criticalBufferLevel\\nvar bufferToKeep=Math.max(0.2*criticalBufferLevel,1);var bufferAhead=criticalBufferLevel-bufferToKeep;var bufferTimeAtTopQuality=Math.min(settings.get().streaming.bufferTimeAtTopQuality,bufferAhead*0.9);var bufferTimeAtTopQualityLongForm=Math.min(settings.get().streaming.bufferTimeAtTopQualityLongForm,bufferAhead*0.9);var s={streaming:{bufferToKeep:parseFloat(bufferToKeep.toFixed(5)),bufferTimeAtTopQuality:parseFloat(bufferTimeAtTopQuality.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(bufferTimeAtTopQualityLongForm.toFixed(5))}};settings.update(s);}}if(e.error.code===QUOTA_EXCEEDED_ERROR_CODE||!hasEnoughSpaceToAppend()){logger.warn('Clearing playback buffer to overcome quota exceed situation');// Notify Schedulecontroller to stop scheduling until buffer has been pruned\\ntriggerEvent(_Events2.default.QUOTA_EXCEEDED,{criticalBufferLevel:criticalBufferLevel});clearBuffers(getClearRanges());}return;}isQuotaExceeded=false;appendedBytesInfo=e.chunk;if(appendedBytesInfo&&!isNaN(appendedBytesInfo.index)){maxAppendedIndex=Math.max(appendedBytesInfo.index,maxAppendedIndex);checkIfBufferingCompleted();}var ranges=buffer.getAllBufferRanges();if(appendedBytesInfo.segmentType===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){showBufferRanges(ranges);onPlaybackProgression();adjustSeekTarget();}else if(replacingBuffer){// When replacing buffer due to switch track, and once new initialization segment has been appended\\n// (and previous buffered data removed) then seek stream to current time\\nvar currentTime=playbackController.getTime();logger.debug('AppendToBuffer seek target should be '+currentTime);triggerEvent(_Events2.default.SEEK_TARGET,{time:currentTime});}var suppressAppendedEvent=false;if(dischargeFragments){if(dischargeFragments.indexOf(appendedBytesInfo)>0){suppressAppendedEvent=true;}dischargeFragments=null;}if(appendedBytesInfo&&!suppressAppendedEvent){triggerEvent(appendedBytesInfo.endFragment?_Events2.default.BYTES_APPENDED_END_FRAGMENT:_Events2.default.BYTES_APPENDED,{quality:appendedBytesInfo.quality,startTime:appendedBytesInfo.start,index:appendedBytesInfo.index,bufferedRanges:ranges,mediaType:type});}}function adjustSeekTarget(){// Check buffered data only for audio and video\\nif(type!==_Constants2.default.AUDIO&&type!==_Constants2.default.VIDEO)return;if(isNaN(seekTarget))return;// Check if current buffered range already contains seek target (and current video element time)\\nvar currentTime=playbackController.getTime();var range=getRangeAt(seekTarget,0);if(currentTime===seekTarget&&range)return;// Get buffered range corresponding to the seek target\\nvar segmentDuration=representationController.getCurrentRepresentation().segmentDuration;range=getRangeAt(seekTarget,segmentDuration);if(!range)return;if(Math.abs(currentTime-seekTarget)>segmentDuration){// If current video model time is decorrelated from seek target (and appended buffer) then seek video element\\n// (in case of live streams on some browsers/devices for which we can't set video element time at unavalaible range)\\n// Check if appended segment is not anterior from seek target (segments timeline/template tolerance)\\nif(seekTarget<=range.end){// Seek video element to seek target or range start if appended buffer starts after seek target (segments timeline/template tolerance)\\nplaybackController.seek(Math.max(seekTarget,range.start),false,true);seekTarget=NaN;}}else if(currentTime<range.start){// If appended buffer starts after seek target (segments timeline/template tolerance) then seek to range start\\nplaybackController.seek(range.start,false,true);seekTarget=NaN;}}function onQualityChanged(e){if(requiredQuality===e.newQuality)return;updateBufferTimestampOffset(this.getRepresentationInfo(e.newQuality));requiredQuality=e.newQuality;}//**********************************************************************\\n// START Buffer Level, State & Sufficiency Handling.\\n//**********************************************************************\\nfunction onPlaybackSeeking(e){seekTarget=e.seekTime;if(isBufferingCompleted){seekClearedBufferingCompleted=true;isBufferingCompleted=false;//a seek command has occured, reset lastIndex value, it will be set next time that onStreamCompleted will be called.\\nlastIndex=Number.POSITIVE_INFINITY;}if(type!==_Constants2.default.FRAGMENTED_TEXT){// remove buffer after seeking operations\\npruneAllSafely();}else{onPlaybackProgression();}}function onPlaybackSeeked(){seekTarget=NaN;}// Prune full buffer but what is around current time position\\nfunction pruneAllSafely(){buffer.waitForUpdateEnd(function(){var ranges=getAllRangesWithSafetyFactor();if(!ranges||ranges.length===0){onPlaybackProgression();}clearBuffers(ranges);});}// Get all buffer ranges but a range around current time position\\nfunction getAllRangesWithSafetyFactor(){var clearRanges=[];var ranges=buffer.getAllBufferRanges();if(!ranges||ranges.length===0){return clearRanges;}var currentTime=playbackController.getTime();var endOfBuffer=ranges.end(ranges.length-1)+BUFFER_END_THRESHOLD;var currentTimeRequest=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTime,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];// There is no request in current time position yet. Let's remove everything\\nif(!currentTimeRequest){logger.debug('getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 -',endOfBuffer);clearRanges.push({start:0,end:endOfBuffer});}else{// Build buffer behind range. To avoid pruning time around current time position,\\n// we include fragment right behind the one in current time position\\nvar behindRange={start:0,end:currentTimeRequest.startTime-settings.get().streaming.stallThreshold};var prevReq=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTimeRequest.startTime-currentTimeRequest.duration/2,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];if(prevReq&&prevReq.startTime!=currentTimeRequest.startTime){behindRange.end=prevReq.startTime;}if(behindRange.start<behindRange.end&&behindRange.end>ranges.start(0)){clearRanges.push(behindRange);}// Build buffer ahead range. To avoid pruning time around current time position,\\n// we include fragment right after the one in current time position\\nvar aheadRange={start:currentTimeRequest.startTime+currentTimeRequest.duration+settings.get().streaming.stallThreshold,end:endOfBuffer};var nextReq=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTimeRequest.startTime+currentTimeRequest.duration+settings.get().streaming.stallThreshold,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];if(nextReq&&nextReq.startTime!==currentTimeRequest.startTime){aheadRange.start=nextReq.startTime+nextReq.duration+settings.get().streaming.stallThreshold;}if(aheadRange.start<aheadRange.end&&aheadRange.start<endOfBuffer){clearRanges.push(aheadRange);}}return clearRanges;}function getWorkingTime(){return isNaN(seekTarget)?playbackController.getTime():seekTarget;}function onPlaybackProgression(){if(!replacingBuffer||type===_Constants2.default.FRAGMENTED_TEXT&&textController.isTextEnabled()){updateBufferLevel();}}function onPlaybackStalled(){checkIfSufficientBuffer();}function onPlaybackPlaying(){seekTarget=NaN;checkIfSufficientBuffer();}function getRangeAt(time,tolerance){var ranges=buffer.getAllBufferRanges();var start=0;var end=0;var firstStart=null;var lastEnd=null;var gap=0;var len=void 0,i=void 0;var toler=!isNaN(tolerance)?tolerance:0.15;if(ranges!==null&&ranges!==undefined){for(i=0,len=ranges.length;i<len;i++){start=ranges.start(i);end=ranges.end(i);if(firstStart===null){gap=Math.abs(start-time);if(time>=start&&time<end){// start the range\\nfirstStart=start;lastEnd=end;}else if(gap<=toler){// start the range even though the buffer does not contain time 0\\nfirstStart=start;lastEnd=end;}}else{gap=start-lastEnd;if(gap<=toler){// the discontinuity is smaller than the tolerance, combine the ranges\\nlastEnd=end;}else{break;}}}if(firstStart!==null){return{start:firstStart,end:lastEnd};}}return null;}function getBufferLength(time,tolerance){var range=void 0,length=void 0;// Consider gap/discontinuity limit as tolerance\\nif(settings.get().streaming.jumpGaps){tolerance=settings.get().streaming.smallGapLimit;}range=getRangeAt(time,tolerance);if(range===null){length=0;}else{length=range.end-time;}return length;}function updateBufferLevel(){if(playbackController){bufferLevel=getBufferLength(getWorkingTime()||0);triggerEvent(_Events2.default.BUFFER_LEVEL_UPDATED,{bufferLevel:bufferLevel});checkIfSufficientBuffer();}}function checkIfBufferingCompleted(){var isLastIdxAppended=maxAppendedIndex>=lastIndex-1;// Handles 0 and non 0 based request index\\nif(isLastIdxAppended&&!isBufferingCompleted&&buffer.discharge===undefined){isBufferingCompleted=true;logger.debug('checkIfBufferingCompleted trigger BUFFERING_COMPLETED for '+type);triggerEvent(_Events2.default.BUFFERING_COMPLETED);}}function checkIfSufficientBuffer(){// No need to check buffer if type is not audio or video (for example if several errors occur during text parsing, so that the buffer cannot be filled, no error must occur on video playback)\\nif(type!==_Constants2.default.AUDIO&&type!==_Constants2.default.VIDEO)return;if(seekClearedBufferingCompleted&&!isBufferingCompleted&&bufferLevel>0&&playbackController&&playbackController.getTimeToStreamEnd()-bufferLevel<BUFFERING_COMPLETED_THRESHOLD){seekClearedBufferingCompleted=false;isBufferingCompleted=true;logger.debug('checkIfSufficientBuffer trigger BUFFERING_COMPLETED for type '+type);triggerEvent(_Events2.default.BUFFERING_COMPLETED);}// When the player is working in low latency mode, the buffer is often below settings.get().streaming.stallThreshold.\\n// So, when in low latency mode, change dash.js behavior so it notifies a stall just when\\n// buffer reach 0 seconds\\nif((!settings.get().streaming.lowLatencyEnabled&&bufferLevel<settings.get().streaming.stallThreshold||bufferLevel===0)&&!isBufferingCompleted){notifyBufferStateChanged(_MetricsConstants2.default.BUFFER_EMPTY);}else{if(isBufferingCompleted||bufferLevel>=streamInfo.manifestInfo.minBufferTime){notifyBufferStateChanged(_MetricsConstants2.default.BUFFER_LOADED);}}}function notifyBufferStateChanged(state){if(bufferState===state||state===_MetricsConstants2.default.BUFFER_EMPTY&&playbackController.getTime()===0||// Don't trigger BUFFER_EMPTY if it's initial loading\\ntype===_Constants2.default.FRAGMENTED_TEXT&&!textController.isTextEnabled()){return;}bufferState=state;triggerEvent(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,{state:state});triggerEvent(state===_MetricsConstants2.default.BUFFER_LOADED?_Events2.default.BUFFER_LOADED:_Events2.default.BUFFER_EMPTY);logger.debug(state===_MetricsConstants2.default.BUFFER_LOADED?'Got enough buffer to start':'Waiting for more buffer before starting playback');}/* prune buffer on our own in background to avoid browsers pruning buffer silently */function pruneBuffer(){if(!buffer||type===_Constants2.default.FRAGMENTED_TEXT){return;}if(!isBufferingCompleted){clearBuffers(getClearRanges());}}function getClearRanges(){var clearRanges=[];var ranges=buffer.getAllBufferRanges();if(!ranges||ranges.length===0){return clearRanges;}var currentTime=playbackController.getTime();var startRangeToKeep=Math.max(0,currentTime-settings.get().streaming.bufferToKeep);var currentTimeRequest=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:currentTime,threshold:BUFFER_RANGE_CALCULATION_THRESHOLD})[0];// Ensure we keep full range of current fragment\\nif(currentTimeRequest){startRangeToKeep=Math.min(currentTimeRequest.startTime,startRangeToKeep);}else if(currentTime===0&&playbackController.getIsDynamic()){// Don't prune before the live stream starts, it messes with low latency\\nreturn[];}if(ranges.start(0)<=startRangeToKeep){var behindRange={start:0,end:startRangeToKeep};for(var i=0;i<ranges.length&&ranges.end(i)<=startRangeToKeep;i++){behindRange.end=ranges.end(i);}if(behindRange.start<behindRange.end){clearRanges.push(behindRange);}}return clearRanges;}function clearBuffers(ranges){if(!ranges||!buffer||ranges.length===0)return;pendingPruningRanges.push.apply(pendingPruningRanges,ranges);if(isPruningInProgress){return;}clearNextRange();}function clearNextRange(){// If there's nothing to prune reset state\\nif(pendingPruningRanges.length===0||!buffer){logger.debug('Nothing to prune, halt pruning');pendingPruningRanges=[];isPruningInProgress=false;return;}var sourceBuffer=buffer.getBuffer();// If there's nothing buffered any pruning is invalid, so reset our state\\nif(!sourceBuffer||!sourceBuffer.buffered||sourceBuffer.buffered.length===0){logger.debug('SourceBuffer is empty (or does not exist), halt pruning');pendingPruningRanges=[];isPruningInProgress=false;return;}var range=pendingPruningRanges.shift();logger.debug('Removing buffer from:',range.start,'to',range.end);isPruningInProgress=true;// If removing buffer ahead current playback position, update maxAppendedIndex\\nvar currentTime=playbackController.getTime();if(currentTime<range.end){isBufferingCompleted=false;maxAppendedIndex=0;}buffer.remove(range.start,range.end,range.force);}function onRemoved(e){if(buffer!==e.buffer)return;logger.debug('onRemoved buffer from:',e.from,'to',e.to);var ranges=buffer.getAllBufferRanges();showBufferRanges(ranges);if(pendingPruningRanges.length===0){isPruningInProgress=false;}if(e.unintended){logger.warn('Detected unintended removal from:',e.from,'to',e.to,'setting index handler time to',e.from);triggerEvent(_Events2.default.SEEK_TARGET,{time:e.from,mediaType:type,streamId:streamInfo.id});}if(isPruningInProgress){clearNextRange();}else{if(!replacingBuffer){updateBufferLevel();}else{replacingBuffer=false;if(mediaChunk){appendToBuffer(mediaChunk);}}triggerEvent(_Events2.default.BUFFER_CLEARED,{from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:hasEnoughSpaceToAppend(),quotaExceeded:isQuotaExceeded});}}function updateBufferTimestampOffset(representationInfo){if(!representationInfo||representationInfo.MSETimeOffset===undefined)return;// Each track can have its own @presentationTimeOffset, so we should set the offset\\n// if it has changed after switching the quality or updating an mpd\\nif(buffer&&buffer.updateTimestampOffset){buffer.updateTimestampOffset(representationInfo.MSETimeOffset);}}function updateAppendWindow(){if(buffer&&!isBufferingCompleted){buffer.updateAppendWindow(streamInfo);}}function onDataUpdateCompleted(e){if(e.error||isBufferingCompleted)return;updateBufferTimestampOffset(e.currentRepresentation);}function onStreamCompleted(e){lastIndex=e.request.index;checkIfBufferingCompleted();}function onCurrentTrackChanged(e){if(e.newMediaInfo.streamInfo.id!==streamInfo.id||e.newMediaInfo.type!==type)return;var ranges=buffer&&buffer.getAllBufferRanges();if(!ranges)return;logger.info('Track change asked');if(mediaController.getSwitchMode(type)===_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE){if(ranges&&ranges.length>0&&playbackController.getTimeToStreamEnd()>settings.get().streaming.stallThreshold){isBufferingCompleted=false;lastIndex=Number.POSITIVE_INFINITY;}}}function onWallclockTimeUpdated(){wallclockTicked++;var secondsElapsed=wallclockTicked*(settings.get().streaming.wallclockTimeUpdateInterval/1000);if(secondsElapsed>=settings.get().streaming.bufferPruningInterval){wallclockTicked=0;pruneBuffer();}}function onPlaybackRateChanged(){checkIfSufficientBuffer();}function getBuffer(){return buffer;}function setBuffer(newBuffer){buffer=newBuffer;}function getBufferLevel(){return bufferLevel;}function setMediaSource(value,mediaInfo){mediaSource=value;if(buffer&&mediaInfo){//if we have a prebuffer, we should prepare to discharge it, and make a new sourceBuffer ready\\nif(typeof buffer.discharge==='function'){dischargeBuffer=buffer;createBuffer(mediaInfo);}}}function getMediaSource(){return mediaSource;}function replaceBuffer(){replacingBuffer=true;}function getIsBufferingCompleted(){return isBufferingCompleted;}function getIsPruningInProgress(){return isPruningInProgress;}function getTotalBufferedTime(){var ranges=buffer.getAllBufferRanges();var totalBufferedTime=0;var ln=void 0,i=void 0;if(!ranges)return totalBufferedTime;for(i=0,ln=ranges.length;i<ln;i++){totalBufferedTime+=ranges.end(i)-ranges.start(i);}return totalBufferedTime;}function hasEnoughSpaceToAppend(){var totalBufferedTime=getTotalBufferedTime();return totalBufferedTime<criticalBufferLevel;}function triggerEvent(eventType,data){var payload=data||{};eventBus.trigger(eventType,payload,{streamId:streamInfo.id,mediaType:type});}function resetInitialSettings(errored,keepBuffers){criticalBufferLevel=Number.POSITIVE_INFINITY;bufferState=undefined;requiredQuality=_AbrController2.default.QUALITY_DEFAULT;lastIndex=Number.POSITIVE_INFINITY;maxAppendedIndex=0;appendedBytesInfo=null;isBufferingCompleted=false;isPruningInProgress=false;isQuotaExceeded=false;seekClearedBufferingCompleted=false;bufferLevel=0;wallclockTicked=0;pendingPruningRanges=[];seekTarget=NaN;if(buffer){if(!errored){buffer.abort();}buffer.reset(keepBuffers);buffer=null;}replacingBuffer=false;}function reset(errored,keepBuffers){eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.off(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,this);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,this);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChanged,this);eventBus.off(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.off(_Events2.default.PLAYBACK_PLAYING,onPlaybackPlaying,this);eventBus.off(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.off(_Events2.default.PLAYBACK_SEEKED,onPlaybackSeeked,this);eventBus.off(_Events2.default.PLAYBACK_STALLED,onPlaybackStalled,this);eventBus.off(_Events2.default.WALLCLOCK_TIME_UPDATED,onWallclockTimeUpdated,this);eventBus.off(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,this);eventBus.off(_Events2.default.SOURCEBUFFER_REMOVE_COMPLETED,onRemoved,this);resetInitialSettings(errored,keepBuffers);}instance={initialize:initialize,getStreamId:getStreamId,getType:getType,getBufferControllerType:getBufferControllerType,getRepresentationInfo:getRepresentationInfo,createBuffer:createBuffer,dischargePreBuffer:dischargePreBuffer,getBuffer:getBuffer,setBuffer:setBuffer,getBufferLevel:getBufferLevel,getRangeAt:getRangeAt,setMediaSource:setMediaSource,getMediaSource:getMediaSource,appendInitSegment:appendInitSegment,replaceBuffer:replaceBuffer,getIsBufferingCompleted:getIsBufferingCompleted,getIsPruningInProgress:getIsPruningInProgress,reset:reset,updateAppendWindow:updateAppendWindow};setup();return instance;}BufferController.__dashjs_factory_name=BUFFER_CONTROLLER_TYPE;exports.default=_FactoryMaker2.default.getClassFactory(BufferController);\\n//# sourceMappingURL=BufferController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _MediaPlayerEvents=__webpack_require__(/*! ../../streaming/MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _XHRLoader=__webpack_require__(/*! ../net/XHRLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\\\");var _XHRLoader2=_interopRequireDefault(_XHRLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function EventController(){var MPD_RELOAD_SCHEME='urn:mpeg:dash:event:2012';var MPD_RELOAD_VALUE=1;var MPD_CALLBACK_SCHEME='urn:mpeg:dash:event:callback:2015';var MPD_CALLBACK_VALUE=1;var REFRESH_DELAY=100;var REMAINING_EVENTS_THRESHOLD=300;var EVENT_HANDLED_STATES={DISCARDED:'discarded',UPDATED:'updated',ADDED:'added'};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,inlineEvents=void 0,// Holds all Inline Events not triggered yet\\ninbandEvents=void 0,// Holds all Inband Events not triggered yet\\neventInterval=void 0,// variable holding the setInterval\\nlastEventTimerCall=void 0,manifestUpdater=void 0,playbackController=void 0,eventHandlingInProgress=void 0,isStarted=void 0;/**\\n     * Internal setup when class is instanced\\n     */function _setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);_resetInitialSettings();}/**\\n     * Checks if the provded configuration is valid\\n     */function checkConfig(){if(!manifestUpdater||!playbackController){throw new Error('setConfig function has to be called previously');}}/**\\n     * Reset to initial settings\\n     */function _resetInitialSettings(){isStarted=false;inlineEvents={};// Format inlineEvents[schemeIdUri]\\ninbandEvents={};// Format inlineEvents[schemeIdUri]\\neventInterval=null;eventHandlingInProgress=false;lastEventTimerCall=Date.now()/1000;}/**\\n     * Stops the EventController by clearing the event interval\\n     */function _stop(){try{if(eventInterval!==null&&isStarted){clearInterval(eventInterval);eventInterval=null;isStarted=false;_onStopEventController();}}catch(e){throw e;}}/**\\n     * Starts the interval function of the EventController\\n     */function start(){try{checkConfig();logger.debug('Start Event Controller');if(!isStarted&&!isNaN(REFRESH_DELAY)){isStarted=true;eventInterval=setInterval(_onEventTimer,REFRESH_DELAY);}}catch(e){throw e;}}/**\\n     * Add MPD events to the list of events.\\n     * Events that are not in the MPD anymore but not triggered yet will still be deleted.\\n     * Existing events might get updated.\\n     * @param {Array.<Object>} values\\n     */function addInlineEvents(values){try{checkConfig();if(values){for(var i=0;i<values.length;i++){var event=values[i];var result=_addOrUpdateEvent(event,inlineEvents,true);if(result===EVENT_HANDLED_STATES.ADDED){logger.debug('Added inline event with id '+event.id);// If we see the event for the first time we trigger it in onReceive mode\\n_startEvent(event,values,_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE);}else if(result===EVENT_HANDLED_STATES.UPDATED){logger.debug('Updated inline event with id '+event.id);}}}logger.debug('Added '+values.length+' inline events');}catch(e){throw e;}}/**\\n     * Add EMSG events to the list of events\\n     * Messages with the same id within the scope of the same scheme_id_uri and value pair are equivalent , i.e. processing of any one event message box with the same id is sufficient.\\n     * @param {Array.<Object>} values\\n     */function addInbandEvents(values){try{checkConfig();for(var i=0;i<values.length;i++){var event=values[i];var result=_addOrUpdateEvent(event,inbandEvents,false);if(result===EVENT_HANDLED_STATES.ADDED){if(event.eventStream.schemeIdUri===MPD_RELOAD_SCHEME&&inbandEvents[event.id]===undefined){_handleManifestReloadEvent(event);}logger.debug('Added inband event with id '+event.id);_startEvent(event,values,_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE);}else{logger.debug('Inband event with scheme_id_uri '+event.eventStream.schemeIdUri+', value '+event.eventStream.value+' and id '+event.id+' was ignored because it has been added before.');}}_onEventTimer();}catch(e){throw e;}}/**\\n     * Adds or updates an event to/in the list of events\\n     * @param {object} event\\n     * @param {object} events\\n     * @param {boolean} shouldOverwriteExistingEvents\\n     * @return {string}\\n     * @private\\n     */function _addOrUpdateEvent(event,events){var shouldOverwriteExistingEvents=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var schemeIdUri=event.eventStream.schemeIdUri;var value=event.eventStream.value;var id=event.id;var eventState=EVENT_HANDLED_STATES.DISCARDED;if(!events[schemeIdUri]){events[schemeIdUri]=[];}var indexOfExistingEvent=events[schemeIdUri].findIndex(function(e){return(!value||e.eventStream.value&&e.eventStream.value===value)&&e.id===id;});if(indexOfExistingEvent===-1){events[schemeIdUri].push(event);eventState=EVENT_HANDLED_STATES.ADDED;}else if(shouldOverwriteExistingEvents){events[schemeIdUri][indexOfExistingEvent]=event;eventState=EVENT_HANDLED_STATES.UPDATED;}return eventState;}/**\\n     * Triggers an MPD reload\\n     * @param {object} event\\n     * @private\\n     */function _handleManifestReloadEvent(event){try{if(event.eventStream.value==MPD_RELOAD_VALUE){var validUntil=event.calculatedPresentationTime;var newDuration=void 0;if(event.calculatedPresentationTime==0xFFFFFFFF){//0xFF... means remaining duration unknown\\nnewDuration=NaN;}else{newDuration=event.calculatedPresentationTime+event.duration;}//logger.info('Manifest validity changed: Valid until: ' + validUntil + '; remaining duration: ' + newDuration);\\neventBus.trigger(_MediaPlayerEvents2.default.MANIFEST_VALIDITY_CHANGED,{id:event.id,validUntil:validUntil,newDuration:newDuration,newManifestValidAfter:NaN//event.message_data - this is an arraybuffer with a timestring in it, but not used yet\\n},{mode:_MediaPlayerEvents2.default.EVENT_MODE_ON_START});}}catch(e){}}/**\\n     * Iterate through the eventList and trigger the events\\n     */function _onEventTimer(){try{if(!eventHandlingInProgress){eventHandlingInProgress=true;var currentVideoTime=playbackController.getTime();var presentationTimeThreshold=currentVideoTime-lastEventTimerCall;// For dynamic streams lastEventTimeCall will be large in the first iteration. Avoid firing all events at once.\\npresentationTimeThreshold=lastEventTimerCall>0?Math.max(0,presentationTimeThreshold):0;_triggerEvents(inbandEvents,presentationTimeThreshold,currentVideoTime);_triggerEvents(inlineEvents,presentationTimeThreshold,currentVideoTime);lastEventTimerCall=currentVideoTime;eventHandlingInProgress=false;}}catch(e){eventHandlingInProgress=false;}}/**\\n     * When the EventController is stopped this callback is triggered. Starts the remaining events.\\n     * @private\\n     */function _onStopEventController(){try{// EventController might be stopped before the period is over. Before we stop the event controller we check for events that needs to be triggered at the period boundary.\\n_triggerRemainingEvents(inbandEvents);_triggerRemainingEvents(inlineEvents);}catch(e){}}/**\\n     * Iterate over a list of events and trigger the ones for which the presentation time is within the current timing interval\\n     * @param {object} events\\n     * @param {number} presentationTimeThreshold\\n     * @param {number} currentVideoTime\\n     * @private\\n     */function _triggerEvents(events,presentationTimeThreshold,currentVideoTime){try{var callback=function callback(event){if(event!==undefined){var duration=!isNaN(event.duration)?event.duration:0;// The event is either about to start or has already been started and we are within its duration\\nif(event.calculatedPresentationTime<=currentVideoTime&&event.calculatedPresentationTime+presentationTimeThreshold+duration>=currentVideoTime){_startEvent(event,events,_MediaPlayerEvents2.default.EVENT_MODE_ON_START);}else if(_eventHasExpired(currentVideoTime,duration+presentationTimeThreshold,event.calculatedPresentationTime)||_eventIsInvalid(event)){logger.debug('Deleting event '+event.id+' as it is expired or invalid');_removeEvent(events,event);}}};_iterateAndTriggerCallback(events,callback);}catch(e){}}/**\\n     * Triggers the remaining events after the EventController has been stopped\\n     * @param {object} events\\n     * @private\\n     */function _triggerRemainingEvents(events){try{var currentTime=playbackController.getTime();var callback=function callback(event){var periodDuration=event.eventStream&&event.eventStream.period&&!isNaN(event.eventStream.period.duration)?event.eventStream.period.duration:NaN;var periodStart=event.eventStream&&event.eventStream.period&&!isNaN(event.eventStream.period.start)?event.eventStream.period.start:NaN;if(isNaN(periodDuration)||isNaN(periodStart)){return;}var calculatedPresentationTimeInSeconds=event.calculatedPresentationTime;if(Math.abs(calculatedPresentationTimeInSeconds-currentTime)<REMAINING_EVENTS_THRESHOLD){_startEvent(event,events,_MediaPlayerEvents2.default.EVENT_MODE_ON_START);}};_iterateAndTriggerCallback(events,callback());}catch(e){}}/**\\n     * Iterates over the inline/inband event object and triggers a callback for each event\\n     * @param {object} events\\n     * @param {function} callback\\n     * @private\\n     */function _iterateAndTriggerCallback(events,callback){try{if(events){var schemeIdUris=Object.keys(events);for(var i=0;i<schemeIdUris.length;i++){var schemeIdEvents=events[schemeIdUris[i]];schemeIdEvents.forEach(function(event){if(event!==undefined){callback(event);}});}}}catch(e){}}/**\\n     * Checks if an event is expired. For instance if the presentationTime + the duration of an event are smaller than the current video time.\\n     * @param {number} currentVideoTime\\n     * @param {number} threshold\\n     * @param {number} calculatedPresentationTimeInSeconds\\n     * @return {boolean}\\n     * @private\\n     */function _eventHasExpired(currentVideoTime,threshold,calculatedPresentationTimeInSeconds){try{return currentVideoTime-threshold>calculatedPresentationTimeInSeconds;}catch(e){return false;}}/**\\n     * Checks if an event is invalid. This is the case if the end time of the parent period is smaller than the presentation time of the event.\\n     * @param {object} event\\n     * @return {boolean}\\n     * @private\\n     */function _eventIsInvalid(event){try{var periodEndTime=event.eventStream.period.start+event.eventStream.period.duration;return event.calculatedPresentationTime>periodEndTime;}catch(e){return false;}}/**\\n     * Starts an event. Depending on the schemeIdUri we distinguis between\\n     * - MPD Reload events\\n     * - MPD Callback events\\n     * - Events to be dispatched to the application\\n     * Events should be removed from the list before beeing triggered. Otherwise the event handler might cause an error and the remove function will not be called.\\n     * @param {object} event\\n     * @param {object} events\\n     * @param {String} mode\\n     * @private\\n     */function _startEvent(event,events,mode){try{var currentVideoTime=playbackController.getTime();var eventId=event.id;if(mode===_MediaPlayerEvents2.default.EVENT_MODE_ON_RECEIVE){logger.debug('Received event '+eventId);eventBus.trigger(event.eventStream.schemeIdUri,{event:event},{mode:mode});return;}if(event.eventStream.schemeIdUri===MPD_RELOAD_SCHEME&&event.eventStream.value===MPD_RELOAD_VALUE){if(event.duration!==0||event.presentationTimeDelta!==0){//If both are set to zero, it indicates the media is over at this point. Don't reload the manifest.\\nlogger.debug('Starting manifest refresh event '+eventId+' at '+currentVideoTime);_removeEvent(events,event);_refreshManifest();}}else if(event.eventStream.schemeIdUri===MPD_CALLBACK_SCHEME&&event.eventStream.value===MPD_CALLBACK_VALUE){logger.debug('Starting callback event '+eventId+' at '+currentVideoTime);_removeEvent(events,event);_sendCallbackRequest(event.messageData);}else{logger.debug('Starting event '+eventId+' at '+currentVideoTime);_removeEvent(events,event);eventBus.trigger(event.eventStream.schemeIdUri,{event:event},{mode:mode});}}catch(e){}}/**\\n     * Removes an event from the list. If this is the last event of type \\\"schemeIdUri\\\"  the corresponding schemeIdUri Object in the list of events is deleted.\\n     * @param {object} events\\n     * @param {object} event\\n     * @private\\n     */function _removeEvent(events,event){var schemeIdUri=event.eventStream.schemeIdUri;var value=event.eventStream.value;var id=event.id;events[schemeIdUri]=events[schemeIdUri].filter(function(e){return value&&e.eventStream.value&&e.eventStream.value!==value||e.id!==id;});if(events[schemeIdUri].length===0){delete events[schemeIdUri];}}/**\\n     * Refresh the manifest\\n     * @private\\n     */function _refreshManifest(){try{checkConfig();manifestUpdater.refreshManifest();}catch(e){}}/**\\n     * Send a callback request\\n     * @param {String} url\\n     * @private\\n     */function _sendCallbackRequest(url){try{var loader=(0,_XHRLoader2.default)(context).create({});loader.load({method:'get',url:url,request:{responseType:'arraybuffer'}});}catch(e){throw e;}}/**\\n     * Set the config of the EventController\\n     * @param {object} config\\n     */function setConfig(config){try{if(!config){return;}if(config.manifestUpdater){manifestUpdater=config.manifestUpdater;}if(config.playbackController){playbackController=config.playbackController;}}catch(e){throw e;}}/**\\n     * Returns all inline events that have not been triggered yet\\n     * @return {object}\\n     */function getInlineEvents(){return inlineEvents;}/**\\n     * Returns all inband events that have not been triggered yet\\n     * @return {object}\\n     */function getInbandEvents(){return inbandEvents;}/**\\n     * Stop the EventController and reset all initial settings\\n     */function reset(){_stop();_resetInitialSettings();}instance={addInlineEvents:addInlineEvents,addInbandEvents:addInbandEvents,getInbandEvents:getInbandEvents,getInlineEvents:getInlineEvents,start:start,setConfig:setConfig,reset:reset};_setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */EventController.__dashjs_factory_name='EventController';exports.default=_FactoryMaker2.default.getSingletonFactory(EventController);\\n//# sourceMappingURL=EventController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DataChunk=__webpack_require__(/*! ../vo/DataChunk */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js\");var _DataChunk2=_interopRequireDefault(_DataChunk);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _FragmentLoader=__webpack_require__(/*! ../FragmentLoader */ \"../node_modules/dashjs/build/es5/src/streaming/FragmentLoader.js\");var _FragmentLoader2=_interopRequireDefault(_FragmentLoader);var _RequestModifier=__webpack_require__(/*! ../utils/RequestModifier */ \"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\");var _RequestModifier2=_interopRequireDefault(_RequestModifier);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function FragmentController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var errHandler=config.errHandler;var mediaPlayerModel=config.mediaPlayerModel;var dashMetrics=config.dashMetrics;var debug=(0,_Debug2.default)(context).getInstance();var streamInfo=config.streamInfo;var instance=void 0,logger=void 0,fragmentModels=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,instance);eventBus.on(_Events2.default.FRAGMENT_LOADING_PROGRESS,onFragmentLoadingCompleted,instance);}function getStreamId(){return streamInfo.id;}function getModel(type){var model=fragmentModels[type];if(!model){model=(0,_FragmentModel2.default)(context).create({streamInfo:streamInfo,type:type,dashMetrics:dashMetrics,fragmentLoader:(0,_FragmentLoader2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,errHandler:errHandler,requestModifier:(0,_RequestModifier2.default)(context).getInstance(),settings:config.settings,boxParser:config.boxParser,eventBus:eventBus,events:_Events2.default,errors:_Errors2.default,dashConstants:config.dashConstants,urlUtils:config.urlUtils}),debug:debug,eventBus:eventBus,events:_Events2.default});fragmentModels[type]=model;}return model;}function resetInitialSettings(){for(var model in fragmentModels){fragmentModels[model].reset();}fragmentModels={};}function reset(){eventBus.off(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,this);eventBus.off(_Events2.default.FRAGMENT_LOADING_PROGRESS,onFragmentLoadingCompleted,this);resetInitialSettings();}function createDataChunk(bytes,request,streamId,endFragment){var chunk=new _DataChunk2.default();chunk.streamId=streamId;chunk.mediaInfo=request.mediaInfo;chunk.segmentType=request.type;chunk.start=request.startTime;chunk.duration=request.duration;chunk.end=chunk.start+chunk.duration;chunk.bytes=bytes;chunk.index=request.index;chunk.quality=request.quality;chunk.representationId=request.representationId;chunk.endFragment=endFragment;return chunk;}function onFragmentLoadingCompleted(e){// Event propagation may have been stopped (see MssHandler)\\nif(!e.sender)return;var request=e.request;var bytes=e.response;var isInit=request.isInitializationRequest();var strInfo=request.mediaInfo.streamInfo;if(e.error){if(request.mediaType===_Constants2.default.AUDIO||request.mediaType===_Constants2.default.VIDEO||request.mediaType===_Constants2.default.FRAGMENTED_TEXT){// add service location to blacklist controller - only for audio or video. text should not set errors\\neventBus.trigger(_Events2.default.SERVICE_LOCATION_BLACKLIST_ADD,{entry:e.request.serviceLocation});}}if(!bytes||!strInfo){logger.warn(\\'No \\'+request.mediaType+\\' bytes to push or stream is inactive.\\');return;}var chunk=createDataChunk(bytes,request,streamInfo.id,e.type!==_Events2.default.FRAGMENT_LOADING_PROGRESS);eventBus.trigger(isInit?_Events2.default.INIT_FRAGMENT_LOADED:_Events2.default.MEDIA_FRAGMENT_LOADED,{chunk:chunk,request:request},{streamId:strInfo.id,mediaType:request.mediaType});}instance={getStreamId:getStreamId,getModel:getModel,reset:reset};setup();return instance;}FragmentController.__dashjs_factory_name=\\'FragmentController\\';exports.default=_FactoryMaker2.default.getClassFactory(FragmentController);\\n//# sourceMappingURL=FragmentController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/FragmentController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var GAP_HANDLER_INTERVAL=100;var THRESHOLD_TO_STALLS=30;var GAP_THRESHOLD=0.1;function GapController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,lastPlaybackTime=void 0,settings=void 0,wallclockTicked=void 0,gapHandlerInterval=void 0,lastGapJumpPosition=void 0,playbackController=void 0,streamController=void 0,videoModel=void 0,timelineConverter=void 0,adapter=void 0,jumpTimeoutHandler=void 0,logger=void 0;function initialize(){registerEvents();}function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}function reset(){stopGapHandler();unregisterEvents();resetInitialSettings();}function resetInitialSettings(){gapHandlerInterval=null;lastGapJumpPosition=NaN;wallclockTicked=0;jumpTimeoutHandler=null;}function setConfig(config){if(!config){return;}if(config.settings){settings=config.settings;}if(config.playbackController){playbackController=config.playbackController;}if(config.streamController){streamController=config.streamController;}if(config.videoModel){videoModel=config.videoModel;}if(config.timelineConverter){timelineConverter=config.timelineConverter;}if(config.adapter){adapter=config.adapter;}}function registerEvents(){eventBus.on(_Events2.default.WALLCLOCK_TIME_UPDATED,_onWallclockTimeUpdated,this);eventBus.on(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,this);eventBus.on(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,instance);}function unregisterEvents(){eventBus.off(_Events2.default.WALLCLOCK_TIME_UPDATED,_onWallclockTimeUpdated,this);eventBus.off(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,this);eventBus.off(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,instance);}function onBytesAppended(){if(!gapHandlerInterval){startGapHandler();}}function _onPlaybackSeeking(){if(jumpTimeoutHandler){clearTimeout(jumpTimeoutHandler);jumpTimeoutHandler=null;}}function _onWallclockTimeUpdated()/*e*/{if(!_shouldCheckForGaps()){return;}wallclockTicked++;if(wallclockTicked>=THRESHOLD_TO_STALLS){var currentTime=playbackController.getTime();if(lastPlaybackTime===currentTime){jumpGap(currentTime,true);}else{lastPlaybackTime=currentTime;lastGapJumpPosition=NaN;}wallclockTicked=0;}}function _shouldCheckForGaps(){return settings.get().streaming.jumpGaps&&streamController.getActiveStreamProcessors().length>0&&(!playbackController.isSeeking()||streamController.hasStreamFinishedBuffering(streamController.getActiveStream()))&&!playbackController.isPaused()&&!streamController.getIsStreamSwitchInProgress()&&!streamController.getHasMediaOrIntialisationError();}function getNextRangeIndex(ranges,currentTime){try{if(!ranges||ranges.length<=1&&currentTime>0){return NaN;}var nextRangeIndex=NaN;var j=0;while(isNaN(nextRangeIndex)&&j<ranges.length){var rangeEnd=j>0?ranges.end(j-1):0;if(currentTime<ranges.start(j)&&rangeEnd-currentTime<GAP_THRESHOLD){nextRangeIndex=j;}j+=1;}return nextRangeIndex;}catch(e){return null;}}function startGapHandler(){try{if(!gapHandlerInterval){logger.debug('Starting the gap controller');gapHandlerInterval=setInterval(function(){if(!_shouldCheckForGaps()){return;}var currentTime=playbackController.getTime();jumpGap(currentTime);},GAP_HANDLER_INTERVAL);}}catch(e){}}function stopGapHandler(){logger.debug('Stopping the gap controller');if(gapHandlerInterval){clearInterval(gapHandlerInterval);gapHandlerInterval=null;}}function jumpGap(currentTime){var playbackStalled=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var smallGapLimit=settings.get().streaming.smallGapLimit;var jumpLargeGaps=settings.get().streaming.jumpLargeGaps;var ranges=videoModel.getBufferRange();var nextRangeIndex=void 0;var seekToPosition=NaN;var jumpToStreamEnd=false;// Get the range just after current time position\\nnextRangeIndex=getNextRangeIndex(ranges,currentTime);if(!isNaN(nextRangeIndex)){var start=ranges.start(nextRangeIndex);var gap=start-currentTime;if(gap>0&&(gap<=smallGapLimit||jumpLargeGaps)){seekToPosition=start;}}// Playback has stalled before period end. We seek to the end of the period\\nvar timeToStreamEnd=playbackController.getTimeToStreamEnd();if(isNaN(seekToPosition)&&playbackStalled&&isFinite(timeToStreamEnd)&&!isNaN(timeToStreamEnd)&&timeToStreamEnd<smallGapLimit){seekToPosition=parseFloat(playbackController.getStreamEndTime().toFixed(5));jumpToStreamEnd=true;}if(seekToPosition>0&&lastGapJumpPosition!==seekToPosition&&seekToPosition>currentTime&&!jumpTimeoutHandler){var timeUntilGapEnd=seekToPosition-currentTime;if(jumpToStreamEnd){logger.warn('Jumping to end of stream because of gap from '+currentTime+' to '+seekToPosition+'. Gap duration: '+timeUntilGapEnd);eventBus.trigger(_Events2.default.GAP_CAUSED_SEEK_TO_PERIOD_END,{seekTime:seekToPosition,duration:timeUntilGapEnd});}else{var isDynamic=playbackController.getIsDynamic();var _start=nextRangeIndex>0?ranges.end(nextRangeIndex-1):currentTime;var timeToWait=!isDynamic?0:timeUntilGapEnd*1000;jumpTimeoutHandler=window.setTimeout(function(){playbackController.seek(seekToPosition,true,true);logger.warn('Jumping gap starting at '+_start+' and ending at '+seekToPosition+'. Jumping by: '+timeUntilGapEnd);eventBus.trigger(_Events2.default.GAP_CAUSED_INTERNAL_SEEK,{seekTime:seekToPosition,duration:timeUntilGapEnd});jumpTimeoutHandler=null;},timeToWait);}lastGapJumpPosition=seekToPosition;}}instance={reset:reset,setConfig:setConfig,initialize:initialize};setup();return instance;}GapController.__dashjs_factory_name='GapController';exports.default=_FactoryMaker2.default.getSingletonFactory(GapController);\\n//# sourceMappingURL=GapController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/GapController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MediaController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,tracks=void 0,settings=void 0,initialSettings=void 0,domStorage=void 0;var validTrackSwitchModes=[_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,_Constants2.default.TRACK_SWITCH_MODE_NEVER_REPLACE];var validTrackSelectionModes=[_Constants2.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE,_Constants2.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY,_Constants2.default.TRACK_SELECTION_MODE_WIDEST_RANGE];function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}/**\\n     * @param {string} type\\n     * @param {StreamInfo} streamInfo\\n     * @memberof MediaController#\\n     */function checkInitialMediaSettingsForType(type,streamInfo){var settings=getInitialSettings(type);var tracksForType=getTracksFor(type,streamInfo);var tracks=[];if(!settings){settings=domStorage.getSavedMediaSettings(type);setInitialSettings(type,settings);}if(!tracksForType||tracksForType.length===0)return;if(settings){tracksForType.forEach(function(track){if(matchSettings(settings,track)){tracks.push(track);}});}if(tracks.length===0){setTrack(this.selectInitialTrack(type,tracksForType),true);}else{if(tracks.length>1){setTrack(this.selectInitialTrack(type,tracks));}else{setTrack(tracks[0]);}}}/**\\n     * @param {MediaInfo} track\\n     * @memberof MediaController#\\n     */function addTrack(track){if(!track)return;var mediaType=track.type;if(!isMultiTrackSupportedByType(mediaType))return;var streamId=track.streamInfo.id;if(!tracks[streamId]){tracks[streamId]=createTrackInfo();}var mediaTracks=tracks[streamId][mediaType].list;for(var i=0,len=mediaTracks.length;i<len;++i){//track is already set.\\nif(isTracksEqual(mediaTracks[i],track)){return;}}mediaTracks.push(track);var initSettings=getInitialSettings(mediaType);if(initSettings&&matchSettings(initSettings,track)&&!getCurrentTrackFor(mediaType,track.streamInfo)){setTrack(track);}}/**\\n     * @param {string} type\\n     * @param {StreamInfo} streamInfo\\n     * @returns {Array}\\n     * @memberof MediaController#\\n     */function getTracksFor(type,streamInfo){if(!type||!streamInfo)return[];var id=streamInfo.id;if(!tracks[id]||!tracks[id][type])return[];return tracks[id][type].list;}/**\\n     * @param {string} type\\n     * @param {StreamInfo} streamInfo\\n     * @returns {Object|null}\\n     * @memberof MediaController#\\n     */function getCurrentTrackFor(type,streamInfo){if(!type||!streamInfo||streamInfo&&!tracks[streamInfo.id])return null;return tracks[streamInfo.id][type].current;}/**\\n     * @param {MediaInfo} track\\n     * @returns {boolean}\\n     * @memberof MediaController#\\n     */function isCurrentTrack(track){if(!track){return false;}var type=track.type;var id=track.streamInfo.id;return tracks[id]&&tracks[id][type]&&isTracksEqual(tracks[id][type].current,track);}/**\\n     * @param {MediaInfo} track\\n     * @param {boolean} noSettingsSave specify if settings must be not be saved\\n     * @memberof MediaController#\\n     */function setTrack(track,noSettingsSave){if(!track||!track.streamInfo)return;var type=track.type;var streamInfo=track.streamInfo;var id=streamInfo.id;var current=getCurrentTrackFor(type,streamInfo);if(!tracks[id]||!tracks[id][type]||isTracksEqual(track,current))return;tracks[id][type].current=track;if(tracks[id][type].current&&!(noSettingsSave&&type===_Constants2.default.FRAGMENTED_TEXT)){eventBus.trigger(_Events2.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:current,newMediaInfo:track,switchMode:getSwitchMode(type)});}if(!noSettingsSave){var _settings=extractSettings(track);if(!_settings||!tracks[id][type].storeLastSettings)return;if(_settings.roles){_settings.role=_settings.roles[0];delete _settings.roles;}if(_settings.accessibility){_settings.accessibility=_settings.accessibility[0];}if(_settings.audioChannelConfiguration){_settings.audioChannelConfiguration=_settings.audioChannelConfiguration[0];}domStorage.setSavedMediaSettings(type,_settings);}}/**\\n     * @param {string} type\\n     * @param {Object} value\\n     * @memberof MediaController#\\n     */function setInitialSettings(type,value){if(!type||!value)return;initialSettings[type]=value;}/**\\n     * @param {string} type\\n     * @returns {Object|null}\\n     * @memberof MediaController#\\n     */function getInitialSettings(type){if(!type)return null;return initialSettings[type];}/**\\n     * @memberof MediaController#\\n     */function saveTextSettingsDisabled(){domStorage.setSavedMediaSettings(_Constants2.default.FRAGMENTED_TEXT,null);}/**\\n     * @param {string} type\\n     * @param {string} mode\\n     * @memberof MediaController#\\n     * @deprecated Please use updateSettings({streaming: { trackSwitchMode: mode } }) instead\\n     */function setSwitchMode(type,mode){logger.warn('deprecated: Please use updateSettings({streaming: { trackSwitchMode: mode } }) instead');var isModeSupported=validTrackSwitchModes.indexOf(mode)!==-1;if(!isModeSupported){logger.warn('Track switch mode is not supported: '+mode);return;}var switchMode={};switchMode[type]=mode;settings.update({streaming:{trackSwitchMode:switchMode}});}/**\\n     * @param {string} type\\n     * @returns {string} mode\\n     * @memberof MediaController#\\n     */function getSwitchMode(type){return settings.get().streaming.trackSwitchMode[type];}/**\\n     * @param {string} mode\\n     * @memberof MediaController#\\n     * @deprecated Please use updateSettings({streaming: { selectionModeForInitialTrack: mode } }) instead\\n     */function setSelectionModeForInitialTrack(mode){logger.warn('deprecated: Please use updateSettings({streaming: { selectionModeForInitialTrack: mode } }) instead');var isModeSupported=validTrackSelectionModes.indexOf(mode)!==-1;if(!isModeSupported){logger.warn('Track selection mode is not supported: '+mode);return;}settings.update({streaming:{selectionModeForInitialTrack:mode}});}/**\\n     * @returns {string} mode\\n     * @memberof MediaController#\\n     */function getSelectionModeForInitialTrack(){return settings.get().streaming.selectionModeForInitialTrack;}/**\\n     * @param {string} type\\n     * @returns {boolean}\\n     * @memberof MediaController#\\n     */function isMultiTrackSupportedByType(type){return type===_Constants2.default.AUDIO||type===_Constants2.default.VIDEO||type===_Constants2.default.TEXT||type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.IMAGE;}/**\\n     * @param {MediaInfo} t1 - first track to compare\\n     * @param {MediaInfo} t2 - second track to compare\\n     * @returns {boolean}\\n     * @memberof MediaController#\\n     */function isTracksEqual(t1,t2){if(!t1&&!t2){return true;}if(!t1||!t2){return false;}var sameId=t1.id===t2.id;var sameViewpoint=t1.viewpoint===t2.viewpoint;var sameLang=t1.lang===t2.lang;var sameRoles=t1.roles.toString()===t2.roles.toString();var sameAccessibility=t1.accessibility.toString()===t2.accessibility.toString();var sameAudioChannelConfiguration=t1.audioChannelConfiguration.toString()===t2.audioChannelConfiguration.toString();return sameId&&sameViewpoint&&sameLang&&sameRoles&&sameAccessibility&&sameAudioChannelConfiguration;}function setConfig(config){if(!config)return;if(config.domStorage){domStorage=config.domStorage;}if(config.settings){settings=config.settings;}}/**\\n     * @memberof MediaController#\\n     */function reset(){tracks={};resetInitialSettings();}function extractSettings(mediaInfo){var settings={lang:mediaInfo.lang,viewpoint:mediaInfo.viewpoint,roles:mediaInfo.roles,accessibility:mediaInfo.accessibility,audioChannelConfiguration:mediaInfo.audioChannelConfiguration};var notEmpty=settings.lang||settings.viewpoint||settings.role&&settings.role.length>0||settings.accessibility&&settings.accessibility.length>0||settings.audioChannelConfiguration&&settings.audioChannelConfiguration.length>0;return notEmpty?settings:null;}function matchSettings(settings,track){var matchLang=!settings.lang||track.lang.match(settings.lang);var matchIndex=settings.index===undefined||settings.index===null||track.index===settings.index;var matchViewPoint=!settings.viewpoint||settings.viewpoint===track.viewpoint;var matchRole=!settings.role||!!track.roles.filter(function(item){return item===settings.role;})[0];var matchAccessibility=!settings.accessibility||!!track.accessibility.filter(function(item){return item===settings.accessibility;})[0];var matchAudioChannelConfiguration=!settings.audioChannelConfiguration||!!track.audioChannelConfiguration.filter(function(item){return item===settings.audioChannelConfiguration;})[0];return matchLang&&matchIndex&&matchViewPoint&&matchRole&&matchAccessibility&&matchAudioChannelConfiguration;}function resetInitialSettings(){initialSettings={audio:null,video:null,fragmentedText:null};}function getTracksWithHighestBitrate(trackArr){var max=0;var result=[];var tmp=void 0;trackArr.forEach(function(track){tmp=Math.max.apply(Math,track.bitrateList.map(function(obj){return obj.bandwidth;}));if(tmp>max){max=tmp;result=[track];}else if(tmp===max){result.push(track);}});return result;}function getTracksWithHighestEfficiency(trackArr){var min=Infinity;var result=[];var tmp=void 0;trackArr.forEach(function(track){var sum=track.bitrateList.reduce(function(acc,obj){var resolution=Math.max(1,obj.width*obj.height);var efficiency=obj.bandwidth/resolution;return acc+efficiency;},0);tmp=sum/track.bitrateList.length;if(tmp<min){min=tmp;result=[track];}else if(tmp===min){result.push(track);}});return result;}function getTracksWithWidestRange(trackArr){var max=0;var result=[];var tmp=void 0;trackArr.forEach(function(track){tmp=track.representationCount;if(tmp>max){max=tmp;result=[track];}else if(tmp===max){result.push(track);}});return result;}function selectInitialTrack(type,tracks){if(type===_Constants2.default.FRAGMENTED_TEXT)return tracks[0];var mode=getSelectionModeForInitialTrack();var tmpArr=[];switch(mode){case _Constants2.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:tmpArr=getTracksWithHighestBitrate(tracks);if(tmpArr.length>1){tmpArr=getTracksWithWidestRange(tmpArr);}break;case _Constants2.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:tmpArr=getTracksWithHighestEfficiency(tracks);if(tmpArr.length>1){tmpArr=getTracksWithHighestBitrate(tmpArr);}break;case _Constants2.default.TRACK_SELECTION_MODE_WIDEST_RANGE:tmpArr=getTracksWithWidestRange(tracks);if(tmpArr.length>1){tmpArr=getTracksWithHighestBitrate(tracks);}break;default:logger.warn('Track selection mode is not supported: '+mode);break;}return tmpArr[0];}function createTrackInfo(){return{audio:{list:[],storeLastSettings:true,current:null},video:{list:[],storeLastSettings:true,current:null},text:{list:[],storeLastSettings:true,current:null},fragmentedText:{list:[],storeLastSettings:true,current:null},image:{list:[],storeLastSettings:true,current:null}};}instance={checkInitialMediaSettingsForType:checkInitialMediaSettingsForType,addTrack:addTrack,getTracksFor:getTracksFor,getCurrentTrackFor:getCurrentTrackFor,isCurrentTrack:isCurrentTrack,setTrack:setTrack,setInitialSettings:setInitialSettings,getInitialSettings:getInitialSettings,setSwitchMode:setSwitchMode,getSwitchMode:getSwitchMode,selectInitialTrack:selectInitialTrack,getTracksWithHighestBitrate:getTracksWithHighestBitrate,getTracksWithHighestEfficiency:getTracksWithHighestEfficiency,getTracksWithWidestRange:getTracksWithWidestRange,setSelectionModeForInitialTrack:setSelectionModeForInitialTrack,getSelectionModeForInitialTrack:getSelectionModeForInitialTrack,isMultiTrackSupportedByType:isMultiTrackSupportedByType,isTracksEqual:isTracksEqual,matchSettings:matchSettings,saveTextSettingsDisabled:saveTextSettingsDisabled,setConfig:setConfig,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MediaController.__dashjs_factory_name='MediaController';var factory=_FactoryMaker2.default.getSingletonFactory(MediaController);_FactoryMaker2.default.updateSingletonFactory(MediaController.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=MediaController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/MediaController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function MediaSourceController(){var instance=void 0,logger=void 0;var context=this.context;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function createMediaSource(){var hasWebKit='WebKitMediaSource'in window;var hasMediaSource='MediaSource'in window;if(hasMediaSource){return new MediaSource();}else if(hasWebKit){return new WebKitMediaSource();}return null;}function attachMediaSource(source,videoModel){var objectURL=window.URL.createObjectURL(source);videoModel.setSource(objectURL);return objectURL;}function detachMediaSource(videoModel){videoModel.setSource(null);}function setDuration(source,value){if(!source||source.readyState!=='open')return;if(value===null&&isNaN(value))return;if(source.duration===value)return;if(!isBufferUpdating(source)){logger.info('Set MediaSource duration:'+value);source.duration=value;}else{setTimeout(setDuration.bind(null,source,value),50);}}function setSeekable(source,start,end){if(source&&typeof source.setLiveSeekableRange==='function'&&typeof source.clearLiveSeekableRange==='function'&&source.readyState==='open'&&start>=0&&start<end){source.clearLiveSeekableRange();source.setLiveSeekableRange(start,end);}}function signalEndOfStream(source){if(!source||source.readyState!=='open'){return;}var buffers=source.sourceBuffers;for(var i=0;i<buffers.length;i++){if(buffers[i].updating){return;}if(buffers[i].buffered.length===0){return;}}logger.info('call to mediaSource endOfStream');source.endOfStream();}function isBufferUpdating(source){var buffers=source.sourceBuffers;for(var i=0;i<buffers.length;i++){if(buffers[i].updating){return true;}}return false;}instance={createMediaSource:createMediaSource,attachMediaSource:attachMediaSource,detachMediaSource:detachMediaSource,setDuration:setDuration,setSeekable:setSeekable,signalEndOfStream:signalEndOfStream};setup();return instance;}MediaSourceController.__dashjs_factory_name='MediaSourceController';exports.default=_FactoryMaker2.default.getSingletonFactory(MediaSourceController);\\n//# sourceMappingURL=MediaSourceController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var LIVE_UPDATE_PLAYBACK_TIME_INTERVAL_MS=500;function PlaybackController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,streamController=void 0,dashMetrics=void 0,adapter=void 0,videoModel=void 0,timelineConverter=void 0,streamSwitch=void 0,streamSeekTime=void 0,wallclockTimeIntervalId=void 0,liveDelay=void 0,streamInfo=void 0,isDynamic=void 0,mediaPlayerModel=void 0,playOnceInitialized=void 0,lastLivePlaybackTime=void 0,availabilityStartTime=void 0,seekTarget=void 0,isLowLatencySeekingInProgress=void 0,playbackStalled=void 0,minPlaybackRateChange=void 0,uriFragmentModel=void 0,settings=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}function initialize(sInfo,periodSwitch,seekTime){streamInfo=sInfo;addAllListeners();isDynamic=streamInfo.manifestInfo.isDynamic;isLowLatencySeekingInProgress=false;playbackStalled=false;streamSwitch=periodSwitch===true;streamSeekTime=seekTime;var ua=typeof navigator!=='undefined'?navigator.userAgent.toLowerCase():'';// Detect safari browser (special behavior for low latency streams)\\nvar isSafari=/safari/.test(ua)&&!/chrome/.test(ua);minPlaybackRateChange=isSafari?0.25:0.02;eventBus.on(_Events2.default.STREAM_INITIALIZED,onStreamInitialized,this);eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.on(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,this);eventBus.on(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,this);eventBus.on(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.on(_Events2.default.PLAYBACK_ENDED,onPlaybackEnded,this,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});eventBus.on(_Events2.default.STREAM_INITIALIZING,onStreamInitializing,this);if(playOnceInitialized){playOnceInitialized=false;play();}}function onStreamInitialized(e){// Seamless period switch\\nif(streamSwitch&&isNaN(streamSeekTime))return;// Seek new stream in priority order:\\n// - at seek time (streamSeekTime) when switching period\\n// - at start time provided in URI parameters\\n// - at stream/period start time (for static streams) or live start time (for dynamic streams)\\nvar startTime=streamSeekTime;if(isNaN(startTime)){if(isDynamic){// For dynamic stream, start by default at (live edge - live delay)\\nstartTime=e.liveStartTime;// If start time in URI, take min value between live edge time and time from URI (capped by DVR window range)\\nvar dvrInfo=dashMetrics.getCurrentDVRInfo();var dvrWindow=dvrInfo?dvrInfo.range:null;if(dvrWindow){// #t shall be relative to period start\\nvar startTimeFromUri=getStartTimeFromUriParameters(true);if(!isNaN(startTimeFromUri)){logger.info('Start time from URI parameters: '+startTimeFromUri);startTime=Math.max(Math.min(startTime,startTimeFromUri),dvrWindow.start);}}}else{// For static stream, start by default at period start\\nstartTime=streamInfo.start;// If start time in URI, take max value between period start and time from URI (if in period range)\\nvar _startTimeFromUri=getStartTimeFromUriParameters(false);if(!isNaN(_startTimeFromUri)&&_startTimeFromUri<startTime+streamInfo.duration){logger.info('Start time from URI parameters: '+_startTimeFromUri);startTime=Math.max(startTime,_startTimeFromUri);}}}if(!isNaN(startTime)&&startTime!==videoModel.getTime()){// Trigger PLAYBACK_SEEKING event for controllers\\neventBus.trigger(_Events2.default.PLAYBACK_SEEKING,{seekTime:startTime});// Seek video model\\nseek(startTime,false,true);}}function getTimeToStreamEnd(){return parseFloat((getStreamEndTime()-getTime()).toFixed(5));}function getStreamEndTime(){return streamInfo.start+streamInfo.duration;}function play(){if(streamInfo&&videoModel&&videoModel.getElement()){videoModel.play();}else{playOnceInitialized=true;}}function isPaused(){return streamInfo&&videoModel?videoModel.isPaused():null;}function pause(){if(streamInfo&&videoModel){videoModel.pause();}}function isSeeking(){return streamInfo&&videoModel?videoModel.isSeeking():null;}function seek(time,stickToBuffered,internalSeek){if(!streamInfo||!videoModel)return;var currentTime=!isNaN(seekTarget)?seekTarget:videoModel.getTime();if(time===currentTime)return;if(internalSeek===true){// Internal seek = seek video model only (disable 'seeking' listener)\\n// buffer(s) are already appended at requested time\\nvideoModel.removeEventListener('seeking',onPlaybackSeeking);logger.info('Requesting internal seek to time: '+time);videoModel.setCurrentTime(time,stickToBuffered);}else{seekTarget=time;eventBus.trigger(_Events2.default.PLAYBACK_SEEK_ASKED);logger.info('Requesting seek to time: '+time);videoModel.setCurrentTime(time,stickToBuffered);}}function seekToLive(){var DVRMetrics=dashMetrics.getCurrentDVRInfo();var DVRWindow=DVRMetrics?DVRMetrics.range:null;seek(DVRWindow.end-mediaPlayerModel.getLiveDelay(),true,false);}function getTime(){return streamInfo&&videoModel?videoModel.getTime():null;}function getNormalizedTime(){var t=getTime();if(isDynamic&&!isNaN(availabilityStartTime)){var timeOffset=availabilityStartTime/1000;// Fix current time for firefox and safari (returned as an absolute time)\\nif(t>timeOffset){t-=timeOffset;}}return t;}function getPlaybackRate(){return streamInfo&&videoModel?videoModel.getPlaybackRate():null;}function getPlayedRanges(){return streamInfo&&videoModel?videoModel.getPlayedRanges():null;}function getEnded(){return streamInfo&&videoModel?videoModel.getEnded():null;}function getIsDynamic(){return isDynamic;}function getStreamController(){return streamController;}/**\\n     * Computes the desirable delay for the live edge to avoid a risk of getting 404 when playing at the bleeding edge\\n     * @param {number} fragmentDuration - seconds?\\n     * @param {number} dvrWindowSize - seconds?\\n     * @param {number} minBufferTime - seconds?\\n     * @returns {number} object\\n     * @memberof PlaybackController#\\n     */function computeAndSetLiveDelay(fragmentDuration,dvrWindowSize,minBufferTime){var delay=void 0,ret=void 0,startTime=void 0;var END_OF_PLAYLIST_PADDING=10;var MIN_BUFFER_TIME_FACTOR=4;var FRAGMENT_DURATION_FACTOR=4;var adjustedFragmentDuration=!isNaN(fragmentDuration)&&isFinite(fragmentDuration)?fragmentDuration:NaN;var suggestedPresentationDelay=adapter.getSuggestedPresentationDelay();if(settings.get().streaming.lowLatencyEnabled){delay=0;}else if(mediaPlayerModel.getLiveDelay()){delay=mediaPlayerModel.getLiveDelay();// If set by user, this value takes precedence\\n}else if(settings.get().streaming.liveDelayFragmentCount!==null&&!isNaN(settings.get().streaming.liveDelayFragmentCount)&&!isNaN(adjustedFragmentDuration)){delay=adjustedFragmentDuration*settings.get().streaming.liveDelayFragmentCount;}else if(settings.get().streaming.useSuggestedPresentationDelay===true&&suggestedPresentationDelay!==null&&!isNaN(suggestedPresentationDelay)&&suggestedPresentationDelay>0){delay=suggestedPresentationDelay;}else if(!isNaN(adjustedFragmentDuration)){delay=adjustedFragmentDuration*FRAGMENT_DURATION_FACTOR;}else{delay=!isNaN(minBufferTime)?minBufferTime*MIN_BUFFER_TIME_FACTOR:streamInfo.manifestInfo.minBufferTime*MIN_BUFFER_TIME_FACTOR;}startTime=adapter.getAvailabilityStartTime();if(startTime!==null){availabilityStartTime=startTime;}if(dvrWindowSize>0){// cap target latency to:\\n// - dvrWindowSize / 2 for short playlists\\n// - dvrWindowSize - END_OF_PLAYLIST_PADDING for longer playlists\\nvar targetDelayCapping=Math.max(dvrWindowSize-END_OF_PLAYLIST_PADDING,dvrWindowSize/2);ret=Math.min(delay,targetDelayCapping);}else{ret=delay;}liveDelay=ret;return ret;}function getLiveDelay(){return liveDelay;}function setLiveDelay(value){var useMaxValue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(useMaxValue&&value<liveDelay){return;}liveDelay=value;}function getCurrentLiveLatency(){if(!isDynamic||isNaN(availabilityStartTime)){return NaN;}var currentTime=getNormalizedTime();if(isNaN(currentTime)||currentTime===0){return 0;}var now=new Date().getTime()+timelineConverter.getClientTimeOffset()*1000;return Math.max(((now-availabilityStartTime-currentTime*1000)/1000).toFixed(3),0);}function reset(){playOnceInitialized=false;streamSwitch=false;streamSeekTime=NaN;liveDelay=0;availabilityStartTime=0;seekTarget=NaN;if(videoModel){eventBus.off(_Events2.default.STREAM_INITIALIZED,onStreamInitialized,this);eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,this);eventBus.off(_Events2.default.BUFFER_LEVEL_STATE_CHANGED,onBufferLevelStateChanged,this);eventBus.off(_Events2.default.LOADING_PROGRESS,onFragmentLoadProgress,this);eventBus.off(_Events2.default.PLAYBACK_PROGRESS,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackProgression,this);eventBus.off(_Events2.default.PLAYBACK_ENDED,onPlaybackEnded,this);eventBus.off(_Events2.default.STREAM_INITIALIZING,onStreamInitializing,this);stopUpdatingWallclockTime();removeAllListeners();}wallclockTimeIntervalId=null;videoModel=null;streamInfo=null;isDynamic=null;}function setConfig(config){if(!config)return;if(config.streamController){streamController=config.streamController;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.adapter){adapter=config.adapter;}if(config.videoModel){videoModel=config.videoModel;}if(config.timelineConverter){timelineConverter=config.timelineConverter;}if(config.uriFragmentModel){uriFragmentModel=config.uriFragmentModel;}if(config.settings){settings=config.settings;}}function getStartTimeFromUriParameters(isDynamic){var fragData=uriFragmentModel.getURIFragmentData();if(!fragData||!fragData.t){return NaN;}var refStream=streamController.getStreams()[0];var refStreamStartTime=refStream.getStreamInfo().start;// Consider only start time of MediaRange\\n// TODO: consider end time of MediaRange to stop playback at provided end time\\nfragData.t=fragData.t.split(',')[0];// \\\"t=<time>\\\" : time is relative to 1st period start\\n// \\\"t=posix:<time>\\\" : time is absolute start time as number of seconds since 01-01-1970\\nvar posix=fragData.t.indexOf('posix:')!==-1?fragData.t.substring(6)==='now'?Date.now()/1000:parseInt(fragData.t.substring(6)):NaN;var startTime=isDynamic&&!isNaN(posix)?posix-availabilityStartTime/1000:parseInt(fragData.t)+refStreamStartTime;return startTime;}function getActualPresentationTime(currentTime){var DVRMetrics=dashMetrics.getCurrentDVRInfo();var DVRWindow=DVRMetrics?DVRMetrics.range:null;var actualTime=void 0;if(!DVRWindow){return NaN;}logger.debug('Checking DVR window for at '+currentTime+' with DVR window range '+DVRWindow.start+' - '+DVRWindow.end);if(currentTime>DVRWindow.end){actualTime=Math.max(DVRWindow.end-liveDelay,DVRWindow.start);}else if(currentTime>0&&currentTime+0.250<DVRWindow.start&&Math.abs(currentTime-DVRWindow.start)<315360000){// Checking currentTime plus 250ms as the 'timeupdate' is fired with a frequency between 4Hz and 66Hz\\n// https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate\\n// http://w3c.github.io/html/single-page.html#offsets-into-the-media-resource\\n// Checking also duration of the DVR makes sense. We detected temporary situations in which currentTime\\n// is bad reported by the browser which causes playback to jump to start (315360000 = 1 year)\\n//actualTime = DVRWindow.start;\\nactualTime=DVRWindow.start;}else{actualTime=currentTime;}return actualTime;}function startUpdatingWallclockTime(){if(wallclockTimeIntervalId!==null)return;var tick=function tick(){onWallclockTime();};wallclockTimeIntervalId=setInterval(tick,settings.get().streaming.wallclockTimeUpdateInterval);}function stopUpdatingWallclockTime(){clearInterval(wallclockTimeIntervalId);wallclockTimeIntervalId=null;}function updateCurrentTime(){if(isPaused()||!isDynamic||videoModel.getReadyState()===0)return;var currentTime=getNormalizedTime();var actualTime=getActualPresentationTime(currentTime);var timeChanged=!isNaN(actualTime)&&actualTime!==currentTime;if(timeChanged){logger.debug('UpdateCurrentTime: Seek to actual time: '+actualTime+' from currentTime: '+currentTime);seek(actualTime);}}function onDataUpdateCompleted(e){if(e.error)return;var representationInfo=adapter.convertDataToRepresentationInfo(e.currentRepresentation);var info=representationInfo?representationInfo.mediaInfo.streamInfo:null;if(info===null||streamInfo.id!==info.id)return;streamInfo=info;updateCurrentTime();}function onCanPlay(){eventBus.trigger(_Events2.default.CAN_PLAY);}function onPlaybackStart(){logger.info('Native video element event: play');updateCurrentTime();startUpdatingWallclockTime();eventBus.trigger(_Events2.default.PLAYBACK_STARTED,{startTime:getTime()});}function onPlaybackWaiting(){logger.info('Native video element event: waiting');eventBus.trigger(_Events2.default.PLAYBACK_WAITING,{playingTime:getTime()});}function onPlaybackPlaying(){logger.info('Native video element event: playing');eventBus.trigger(_Events2.default.PLAYBACK_PLAYING,{playingTime:getTime()});}function onPlaybackPaused(){logger.info('Native video element event: pause');eventBus.trigger(_Events2.default.PLAYBACK_PAUSED,{ended:getEnded()});}function onPlaybackSeeking(){var seekTime=getTime();// On some browsers/devices, in case of live streams, setting current time on video element fails when there is no buffered data at requested time\\n// Then re-set seek target time and video element will be seeked afterwhile once data is buffered (see BufferContoller)\\nif(!isNaN(seekTarget)&&seekTarget!==seekTime){seekTime=seekTarget;}seekTarget=NaN;logger.info('Seeking to: '+seekTime);startUpdatingWallclockTime();eventBus.trigger(_Events2.default.PLAYBACK_SEEKING,{seekTime:seekTime});}function onPlaybackSeeked(){logger.info('Native video element event: seeked');eventBus.trigger(_Events2.default.PLAYBACK_SEEKED);// Reactivate 'seeking' event listener (see seek())\\nvideoModel.addEventListener('seeking',onPlaybackSeeking);}function onPlaybackTimeUpdated(){if(streamInfo){eventBus.trigger(_Events2.default.PLAYBACK_TIME_UPDATED,{timeToEnd:getTimeToStreamEnd(),time:getTime()});}}function updateLivePlaybackTime(){var now=Date.now();if(!lastLivePlaybackTime||now>lastLivePlaybackTime+LIVE_UPDATE_PLAYBACK_TIME_INTERVAL_MS){lastLivePlaybackTime=now;onPlaybackTimeUpdated();}}function onPlaybackProgress(){eventBus.trigger(_Events2.default.PLAYBACK_PROGRESS);}function onPlaybackRateChanged(){var rate=getPlaybackRate();logger.info('Native video element event: ratechange: ',rate);eventBus.trigger(_Events2.default.PLAYBACK_RATE_CHANGED,{playbackRate:rate});}function onPlaybackMetaDataLoaded(){logger.info('Native video element event: loadedmetadata');eventBus.trigger(_Events2.default.PLAYBACK_METADATA_LOADED);startUpdatingWallclockTime();}// Event to handle the native video element ended event\\nfunction onNativePlaybackEnded(){logger.info('Native video element event: ended');pause();stopUpdatingWallclockTime();eventBus.trigger(_Events2.default.PLAYBACK_ENDED,{'isLast':streamController.getActiveStreamInfo().isLast});}// Handle DASH PLAYBACK_ENDED event\\nfunction onPlaybackEnded(e){if(wallclockTimeIntervalId&&e.isLast){// PLAYBACK_ENDED was triggered elsewhere, react.\\nlogger.info('onPlaybackEnded -- PLAYBACK_ENDED but native video element didn\\\\'t fire ended');var seekTime=e.seekTime?e.seekTime:getStreamEndTime();videoModel.setCurrentTime(seekTime);pause();stopUpdatingWallclockTime();}}function onPlaybackError(event){var target=event.target||event.srcElement;eventBus.trigger(_Events2.default.PLAYBACK_ERROR,{error:target.error});}function onWallclockTime(){eventBus.trigger(_Events2.default.WALLCLOCK_TIME_UPDATED,{isDynamic:isDynamic,time:new Date()});// Updates playback time for paused dynamic streams\\n// (video element doesn't call timeupdate when the playback is paused)\\nif(getIsDynamic()&&isPaused()){updateLivePlaybackTime();}}function onPlaybackProgression(){if(isDynamic&&_isCatchupEnabled()&&settings.get().streaming.liveCatchup.playbackRate>0&&!isPaused()&&!isSeeking()){if(_needToCatchUp()){startPlaybackCatchUp();}else{stopPlaybackCatchUp();}}}function _isCatchupEnabled(){return settings.get().streaming.liveCatchup.enabled||settings.get().streaming.lowLatencyEnabled;}function getBufferLevel(){var bufferLevel=null;streamController.getActiveStreamProcessors().forEach(function(p){var bl=p.getBufferLevel();if(bufferLevel===null){bufferLevel=bl;}else{bufferLevel=Math.min(bufferLevel,bl);}});return bufferLevel;}/**\\n     * Returns the mode for live playback catchup.\\n     * @return {String}\\n     * @private\\n     */function _getCatchupMode(){var playbackBufferMin=settings.get().streaming.liveCatchup.playbackBufferMin;return settings.get().streaming.liveCatchup.mode===_Constants2.default.LIVE_CATCHUP_MODE_LOLP&&playbackBufferMin!==null&&!isNaN(playbackBufferMin)?_Constants2.default.LIVE_CATCHUP_MODE_LOLP:_Constants2.default.LIVE_CATCHUP_MODE_DEFAULT;}/**\\n     * Checks whether the catchup mechanism should be enabled\\n     * @return {boolean}\\n     */function _needToCatchUp(){try{if(_isCatchupEnabled()&&settings.get().streaming.liveCatchup.playbackRate>0&&getTime()>0){var catchupMode=_getCatchupMode();var currentLiveLatency=getCurrentLiveLatency();var _liveDelay=mediaPlayerModel.getLiveDelay();var liveCatchupLatencyThreshold=mediaPlayerModel.getLiveCatchupLatencyThreshold();var liveCatchUpMinDrift=settings.get().streaming.liveCatchup.minDrift;if(catchupMode===_Constants2.default.LIVE_CATCHUP_MODE_LOLP){var currentBuffer=getBufferLevel();var playbackBufferMin=settings.get().streaming.liveCatchup.playbackBufferMin;return _lolpNeedToCatchUpCustom(currentLiveLatency,_liveDelay,liveCatchUpMinDrift,currentBuffer,playbackBufferMin,liveCatchupLatencyThreshold);}else{return _defaultNeedToCatchUp(currentLiveLatency,_liveDelay,liveCatchupLatencyThreshold,liveCatchUpMinDrift);}}}catch(e){return false;}}/**\\n     * Default algorithm to determine if catchup mode should be enabled\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} liveCatchupLatencyThreshold\\n     * @param {number} minDrift\\n     * @return {boolean}\\n     * @private\\n     */function _defaultNeedToCatchUp(currentLiveLatency,liveDelay,liveCatchupLatencyThreshold,minDrift){try{var latencyDrift=Math.abs(currentLiveLatency-liveDelay);return latencyDrift>minDrift&&(isNaN(liveCatchupLatencyThreshold)||currentLiveLatency<=liveCatchupLatencyThreshold);}catch(e){return false;}}/**\\n     * LoL+ logic to determine if catchup mode should be enabled\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} minDrift\\n     * @param {number} currentBuffer\\n     * @param {number} playbackBufferMin\\n     * @param {number} liveCatchupLatencyThreshold\\n     * @return {boolean}\\n     * @private\\n     */function _lolpNeedToCatchUpCustom(currentLiveLatency,liveDelay,minDrift,currentBuffer,playbackBufferMin,liveCatchupLatencyThreshold){try{var latencyDrift=Math.abs(currentLiveLatency-liveDelay);return(isNaN(liveCatchupLatencyThreshold)||currentLiveLatency<=liveCatchupLatencyThreshold)&&(latencyDrift>minDrift||currentBuffer<playbackBufferMin);}catch(e){return false;}}/**\\n     * Apply catchup mode\\n     */function startPlaybackCatchUp(){if(videoModel){var results=void 0;var currentPlaybackRate=videoModel.getPlaybackRate();var liveCatchupPlaybackRate=settings.get().streaming.liveCatchup.playbackRate;var currentLiveLatency=getCurrentLiveLatency();var _liveDelay2=mediaPlayerModel.getLiveDelay();var bufferLevel=getBufferLevel();// Custom playback control: Based on buffer level\\nif(_getCatchupMode()===_Constants2.default.LIVE_CATCHUP_MODE_LOLP){var liveCatchUpMinDrift=settings.get().streaming.liveCatchup.minDrift;var playbackBufferMin=settings.get().streaming.liveCatchup.playbackBufferMin;results=_calculateNewPlaybackRateLolP(liveCatchupPlaybackRate,currentLiveLatency,_liveDelay2,liveCatchUpMinDrift,playbackBufferMin,bufferLevel,currentPlaybackRate);}else{// Default playback control: Based on target and current latency\\nresults=_calculateNewPlaybackRateDefault(liveCatchupPlaybackRate,currentLiveLatency,_liveDelay2,bufferLevel,currentPlaybackRate);}// Obtain newRate and apply to video model\\nvar newRate=results.newRate;if(newRate){// non-null\\nvideoModel.setPlaybackRate(newRate);}var deltaLatency=currentLiveLatency-_liveDelay2;if(settings.get().streaming.liveCatchup.maxDrift>0&&!isLowLatencySeekingInProgress&&deltaLatency>settings.get().streaming.liveCatchup.maxDrift){logger.info('Low Latency catchup mechanism. Latency too high, doing a seek to live point');isLowLatencySeekingInProgress=true;seekToLive();}else{isLowLatencySeekingInProgress=false;}}}/**\\n     * Default algorithm to calculate the new playback rate\\n     * @param {number} liveCatchUpPlaybackRate\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} bufferLevel\\n     * @param {number} currentPlaybackRate\\n     * @return {{newRate: number}}\\n     * @private\\n     */function _calculateNewPlaybackRateDefault(liveCatchUpPlaybackRate,currentLiveLatency,liveDelay,bufferLevel,currentPlaybackRate){var cpr=liveCatchUpPlaybackRate;var deltaLatency=currentLiveLatency-liveDelay;var d=deltaLatency*5;// Playback rate must be between (1 - cpr) - (1 + cpr)\\n// ex: if cpr is 0.5, it can have values between 0.5 - 1.5\\nvar s=cpr*2/(1+Math.pow(Math.E,-d));var newRate=1-cpr+s;// take into account situations in which there are buffer stalls,\\n// in which increasing playbackRate to reach target latency will\\n// just cause more and more stall situations\\nif(playbackStalled){// const bufferLevel = getBufferLevel();\\nif(bufferLevel>liveDelay/2){// playbackStalled = false;\\nplaybackStalled=false;}else if(deltaLatency>0){newRate=1.0;}}// don't change playbackrate for small variations (don't overload element with playbackrate changes)\\nif(Math.abs(currentPlaybackRate-newRate)<=minPlaybackRateChange){newRate=null;}return{newRate:newRate};}/**\\n     * Lol+ algorithm to calculate the new playback rate\\n     * @param {number} liveCatchUpPlaybackRate\\n     * @param {number} currentLiveLatency\\n     * @param {number} liveDelay\\n     * @param {number} minDrift\\n     * @param {number} playbackBufferMin\\n     * @param {number} bufferLevel\\n     * @param {number} currentPlaybackRate\\n     * @return {{newRate: number}}\\n     * @private\\n     */function _calculateNewPlaybackRateLolP(liveCatchUpPlaybackRate,currentLiveLatency,liveDelay,minDrift,playbackBufferMin,bufferLevel,currentPlaybackRate){var cpr=liveCatchUpPlaybackRate;var newRate=void 0;// Hybrid: Buffer-based\\nif(bufferLevel<playbackBufferMin){// Buffer in danger, slow down\\nvar deltaBuffer=bufferLevel-playbackBufferMin;// -ve value\\nvar d=deltaBuffer*5;// Playback rate must be between (1 - cpr) - (1 + cpr)\\n// ex: if cpr is 0.5, it can have values between 0.5 - 1.5\\nvar s=cpr*2/(1+Math.pow(Math.E,-d));newRate=1-cpr+s;logger.debug('[LoL+ playback control_buffer-based] bufferLevel: '+bufferLevel+', newRate: '+newRate);}else{// Hybrid: Latency-based\\n// Buffer is safe, vary playback rate based on latency\\n// Check if latency is within range of target latency\\nvar minDifference=0.02;if(Math.abs(currentLiveLatency-liveDelay)<=minDifference*liveDelay){newRate=1;}else{var deltaLatency=currentLiveLatency-liveDelay;var _d=deltaLatency*5;// Playback rate must be between (1 - cpr) - (1 + cpr)\\n// ex: if cpr is 0.5, it can have values between 0.5 - 1.5\\nvar _s=cpr*2/(1+Math.pow(Math.E,-_d));newRate=1-cpr+_s;}logger.debug('[LoL+ playback control_latency-based] latency: '+currentLiveLatency+', newRate: '+newRate);}if(playbackStalled){if(bufferLevel>liveDelay/2){playbackStalled=false;}}// don't change playbackrate for small variations (don't overload element with playbackrate changes)\\nif(Math.abs(currentPlaybackRate-newRate)<=minPlaybackRateChange){newRate=null;}return{newRate:newRate};}function stopPlaybackCatchUp(){if(videoModel){videoModel.setPlaybackRate(1.0);}}function onFragmentLoadProgress(e){// If using fetch and stream mode is not available, readjust live latency so it is 20% higher than segment duration\\nif(e.stream===false&&settings.get().streaming.lowLatencyEnabled&&!isNaN(e.request.duration)){var minDelay=1.2*e.request.duration;if(minDelay>mediaPlayerModel.getLiveDelay()){logger.warn('Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:',minDelay.toFixed(2));var s={streaming:{liveDelay:minDelay}};settings.update(s);}}}function onBufferLevelStateChanged(e){// do not stall playback when get an event from Stream that is not active\\nif(e.streamId!==streamInfo.id)return;if(_isCatchupEnabled()){if(e.state===_MetricsConstants2.default.BUFFER_EMPTY&&!isSeeking()){if(!playbackStalled){playbackStalled=true;stopPlaybackCatchUp();}}}else{videoModel.setStallState(e.mediaType,e.state===_MetricsConstants2.default.BUFFER_EMPTY);}}function onPlaybackStalled(e){eventBus.trigger(_Events2.default.PLAYBACK_STALLED,{e:e});}function onStreamInitializing(e){applyServiceDescription(e.streamInfo,e.mediaInfo);}function applyServiceDescription(streamInfo,mediaInfo){if(streamInfo&&streamInfo.manifestInfo&&streamInfo.manifestInfo.serviceDescriptions){// is there a service description for low latency defined?\\nvar llsd=void 0;for(var i=0;i<streamInfo.manifestInfo.serviceDescriptions.length;i++){var sd=streamInfo.manifestInfo.serviceDescriptions[i];if(sd.schemeIdUri===_Constants2.default.SERVICE_DESCRIPTION_LL_SCHEME){llsd=sd;break;}}if(llsd){if(mediaInfo&&mediaInfo.supplementalProperties&&mediaInfo.supplementalProperties[_Constants2.default.SUPPLEMENTAL_PROPERTY_LL_SCHEME]==='true'){if(llsd.latency&&llsd.latency.target>0){logger.debug('Apply LL properties coming from service description. Target Latency (ms):',llsd.latency.target);settings.update({streaming:{lowLatencyEnabled:true,liveDelay:llsd.latency.target/1000,liveCatchup:{minDrift:llsd.latency.max>llsd.latency.target?(llsd.latency.max-llsd.latency.target)/1000:undefined}}});}if(llsd.playbackRate&&llsd.playbackRate.max>1.0){logger.debug('Apply LL properties coming from service description. Max PlaybackRate:',llsd.playbackRate.max);settings.update({streaming:{lowLatencyEnabled:true,liveCatchup:{playbackRate:llsd.playbackRate.max-1.0}}});}}}}}function addAllListeners(){videoModel.addEventListener('canplay',onCanPlay);videoModel.addEventListener('play',onPlaybackStart);videoModel.addEventListener('waiting',onPlaybackWaiting);videoModel.addEventListener('playing',onPlaybackPlaying);videoModel.addEventListener('pause',onPlaybackPaused);videoModel.addEventListener('error',onPlaybackError);videoModel.addEventListener('seeking',onPlaybackSeeking);videoModel.addEventListener('seeked',onPlaybackSeeked);videoModel.addEventListener('timeupdate',onPlaybackTimeUpdated);videoModel.addEventListener('progress',onPlaybackProgress);videoModel.addEventListener('ratechange',onPlaybackRateChanged);videoModel.addEventListener('loadedmetadata',onPlaybackMetaDataLoaded);videoModel.addEventListener('stalled',onPlaybackStalled);videoModel.addEventListener('ended',onNativePlaybackEnded);}function removeAllListeners(){videoModel.removeEventListener('canplay',onCanPlay);videoModel.removeEventListener('play',onPlaybackStart);videoModel.removeEventListener('waiting',onPlaybackWaiting);videoModel.removeEventListener('playing',onPlaybackPlaying);videoModel.removeEventListener('pause',onPlaybackPaused);videoModel.removeEventListener('error',onPlaybackError);videoModel.removeEventListener('seeking',onPlaybackSeeking);videoModel.removeEventListener('seeked',onPlaybackSeeked);videoModel.removeEventListener('timeupdate',onPlaybackTimeUpdated);videoModel.removeEventListener('progress',onPlaybackProgress);videoModel.removeEventListener('ratechange',onPlaybackRateChanged);videoModel.removeEventListener('loadedmetadata',onPlaybackMetaDataLoaded);videoModel.removeEventListener('stalled',onPlaybackStalled);videoModel.removeEventListener('ended',onNativePlaybackEnded);}instance={initialize:initialize,setConfig:setConfig,getStartTimeFromUriParameters:getStartTimeFromUriParameters,getTimeToStreamEnd:getTimeToStreamEnd,getTime:getTime,getNormalizedTime:getNormalizedTime,getPlaybackRate:getPlaybackRate,getPlayedRanges:getPlayedRanges,getEnded:getEnded,getIsDynamic:getIsDynamic,getStreamController:getStreamController,computeAndSetLiveDelay:computeAndSetLiveDelay,getLiveDelay:getLiveDelay,setLiveDelay:setLiveDelay,getCurrentLiveLatency:getCurrentLiveLatency,play:play,isPaused:isPaused,pause:pause,isSeeking:isSeeking,getStreamEndTime:getStreamEndTime,seek:seek,reset:reset};setup();return instance;}PlaybackController.__dashjs_factory_name='PlaybackController';exports.default=_FactoryMaker2.default.getSingletonFactory(PlaybackController);\\n//# sourceMappingURL=PlaybackController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/PlaybackController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _BufferLevelRule=__webpack_require__(/*! ../rules/scheduling/BufferLevelRule */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js\\\");var _BufferLevelRule2=_interopRequireDefault(_BufferLevelRule);var _FragmentModel=__webpack_require__(/*! ../models/FragmentModel */ \\\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\\\");var _FragmentModel2=_interopRequireDefault(_FragmentModel);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ScheduleController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var adapter=config.adapter;var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var fragmentModel=config.fragmentModel;var abrController=config.abrController;var playbackController=config.playbackController;var textController=config.textController;var streamInfo=config.streamInfo;var type=config.type;var mimeType=config.mimeType;var mediaController=config.mediaController;var bufferController=config.bufferController;var settings=config.settings;var instance=void 0,logger=void 0,currentRepresentationInfo=void 0,initialRequest=void 0,isStopped=void 0,isFragmentProcessingInProgress=void 0,timeToLoadDelay=void 0,scheduleTimeout=void 0,seekTarget=void 0,hasVideoTrack=void 0,bufferLevelRule=void 0,lastFragmentRequest=void 0,topQualityIndex=void 0,lastInitQuality=void 0,replaceRequestArray=void 0,switchTrack=void 0,replacingBuffer=void 0,mediaRequest=void 0,checkPlaybackQuality=void 0,isReplacementRequest=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();}function initialize(_hasVideoTrack){hasVideoTrack=_hasVideoTrack;bufferLevelRule=(0,_BufferLevelRule2.default)(context).create({abrController:abrController,dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,textController:textController,settings:settings});//eventBus.on(Events.LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\\neventBus.on(_Events2.default.DATA_UPDATE_STARTED,onDataUpdateStarted,this);eventBus.on(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,this);eventBus.on(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.on(_Events2.default.BUFFER_CLEARED,onBufferCleared,this);eventBus.on(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,this);eventBus.on(_Events2.default.QUOTA_EXCEEDED,onQuotaExceeded,this);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.on(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.on(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,this);eventBus.on(_Events2.default.URL_RESOLUTION_FAILED,onURLResolutionFailed,this);eventBus.on(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,this);eventBus.on(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,this);}function getType(){return type;}function getStreamId(){return streamInfo.id;}function setCurrentRepresentation(representationInfo){currentRepresentationInfo=representationInfo;}function isStarted(){return isStopped===false;}function start(){if(isStarted())return;if(!currentRepresentationInfo||bufferController.getIsBufferingCompleted())return;logger.debug('Schedule Controller starts');isStopped=false;dashMetrics.createPlaylistTraceMetrics(currentRepresentationInfo.id,playbackController.getTime()*1000,playbackController.getPlaybackRate());if(initialRequest){initialRequest=false;}startScheduleTimer(0);}function stop(){if(isStopped)return;logger.debug('Schedule Controller stops');logger.debug(type+' Schedule Controller stops');isStopped=true;clearTimeout(scheduleTimeout);}function hasTopQualityChanged(type,id){topQualityIndex[id]=topQualityIndex[id]||{};var newTopQualityIndex=abrController.getTopQualityIndexFor(type,id);if(topQualityIndex[id][type]!=newTopQualityIndex){logger.info('Top quality '+type+' index has changed from '+topQualityIndex[id][type]+' to '+newTopQualityIndex);topQualityIndex[id][type]=newTopQualityIndex;return true;}return false;}function schedule(){if(isStopped||isFragmentProcessingInProgress||playbackController.isPaused()&&!settings.get().streaming.scheduleWhilePaused||(type===_Constants2.default.FRAGMENTED_TEXT||type===_Constants2.default.TEXT)&&!textController.isTextEnabled()||bufferController.getIsBufferingCompleted()){stop();return;}validateExecutedFragmentRequest();var isReplacement=replaceRequestArray.length>0;if(replacingBuffer||isNaN(lastInitQuality)||switchTrack||isReplacement||hasTopQualityChanged(type,streamInfo.id)||bufferLevelRule.execute(type,currentRepresentationInfo,hasVideoTrack)){var getNextFragment=function getNextFragment(){if((currentRepresentationInfo.quality!==lastInitQuality||switchTrack)&&!replacingBuffer){if(switchTrack){logger.debug('Switch track for '+type+', representation id = '+currentRepresentationInfo.id);replacingBuffer=mediaController.getSwitchMode(type)===_Constants2.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE;if(replacingBuffer&&bufferController.replaceBuffer){bufferController.replaceBuffer();}switchTrack=false;}else{logger.debug('Quality has changed, get init request for representationid = '+currentRepresentationInfo.id);}eventBus.trigger(_Events2.default.INIT_FRAGMENT_NEEDED,{representationId:currentRepresentationInfo.id,sender:instance},{streamId:streamInfo.id,mediaType:type});lastInitQuality=currentRepresentationInfo.quality;checkPlaybackQuality=false;}else{var replacement=replaceRequestArray.shift();if(replacement&&replacement.isInitializationRequest()){// To be sure the specific init segment had not already been loaded\\neventBus.trigger(_Events2.default.INIT_FRAGMENT_NEEDED,{representationId:replacement.representationId,sender:instance},{streamId:streamInfo.id,mediaType:type});checkPlaybackQuality=false;}else{eventBus.trigger(_Events2.default.MEDIA_FRAGMENT_NEEDED,{seekTarget:seekTarget,replacement:replacement},{streamId:streamInfo.id,mediaType:type});checkPlaybackQuality=true;}}};setFragmentProcessState(true);if(!isReplacement&&checkPlaybackQuality){abrController.checkPlaybackQuality(type);}getNextFragment();}else{startScheduleTimer(500);}}function validateExecutedFragmentRequest(){// Validate that the fragment request executed and appended into the source buffer is as\\n// good of quality as the current quality and is the correct media track.\\nvar time=playbackController.getTime();var safeBufferLevel=1.5;if(isNaN(currentRepresentationInfo.fragmentDuration)){//fragmentDuration of representationInfo is not defined,\\n// call metrics function to have data in the latest scheduling info...\\n// if no metric, returns 0. In this case, rule will return false.\\nvar schedulingInfo=dashMetrics.getCurrentSchedulingInfo(currentRepresentationInfo.mediaInfo.type);safeBufferLevel=schedulingInfo?schedulingInfo.duration*1.5:1.5;}var request=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:time+safeBufferLevel,threshold:0})[0];if(request&&replaceRequestArray.indexOf(request)===-1&&!adapter.getIsTextTrack(mimeType)){var fastSwitchModeEnabled=settings.get().streaming.fastSwitchEnabled;var bufferLevel=bufferController.getBufferLevel();var abandonmentState=abrController.getAbandonmentStateFor(type);// Only replace on track switch when NEVER_REPLACE\\nvar trackChanged=!mediaController.isCurrentTrack(request.mediaInfo)&&mediaController.getSwitchMode(request.mediaInfo.type)===_Constants2.default.TRACK_SWITCH_MODE_NEVER_REPLACE;var qualityChanged=request.quality<currentRepresentationInfo.quality;if(fastSwitchModeEnabled&&(trackChanged||qualityChanged)&&bufferLevel>=safeBufferLevel&&abandonmentState!==_MetricsConstants2.default.ABANDON_LOAD){replaceRequest(request);isReplacementRequest=true;logger.debug('Reloading outdated fragment at index: ',request.index);}else if(request.quality>currentRepresentationInfo.quality&&!replacingBuffer){// The buffer has better quality it in then what we would request so set append point to end of buffer!!\\nsetSeekTarget(playbackController.getTime()+bufferLevel);}}}function startScheduleTimer(value){clearTimeout(scheduleTimeout);scheduleTimeout=setTimeout(schedule,value);}function setFragmentProcessState(state){if(isFragmentProcessingInProgress!==state){isFragmentProcessingInProgress=state;}else{logger.debug('isFragmentProcessingInProgress is already equal to',state);}}function processInitRequest(request){if(request){setFragmentProcessState(true);fragmentModel.executeRequest(request);}}function processMediaRequest(request){if(request){logger.debug('Next fragment request url is '+request.url);fragmentModel.executeRequest(request);}else{// Use case - Playing at the bleeding live edge and frag is not available yet. Cycle back around.\\nif(playbackController.getIsDynamic()){logger.debug('Next fragment seems to be at the bleeding live edge and is not available yet. Rescheduling.');}setFragmentProcessState(false);startScheduleTimer(settings.get().streaming.lowLatencyEnabled?100:500);}}function switchTrackAsked(){switchTrack=true;}function replaceRequest(request){replaceRequestArray.push(request);}function completeQualityChange(trigger){if(playbackController&&fragmentModel){var item=fragmentModel.getRequests({state:_FragmentModel2.default.FRAGMENT_MODEL_EXECUTED,time:playbackController.getTime(),threshold:0})[0];if(item&&playbackController.getTime()>=item.startTime){if((!lastFragmentRequest.mediaInfo||item.mediaInfo.type===lastFragmentRequest.mediaInfo.type&&item.mediaInfo.id!==lastFragmentRequest.mediaInfo.id)&&trigger){eventBus.trigger(_Events2.default.TRACK_CHANGE_RENDERED,{mediaType:type,oldMediaInfo:lastFragmentRequest.mediaInfo,newMediaInfo:item.mediaInfo});}if((item.quality!==lastFragmentRequest.quality||item.adaptationIndex!==lastFragmentRequest.adaptationIndex)&&trigger){eventBus.trigger(_Events2.default.QUALITY_CHANGE_RENDERED,{mediaType:type,oldQuality:lastFragmentRequest.quality,newQuality:item.quality});}lastFragmentRequest={mediaInfo:item.mediaInfo,quality:item.quality,adaptationIndex:item.adaptationIndex};}}}function onStreamCompleted(){stop();setFragmentProcessState(false);logger.info('Stream '+streamInfo.id+' is complete');}function onFragmentLoadingCompleted(e){if(e.request.mediaInfo.streamInfo.id!==streamInfo.id||e.request.mediaType!==type)return;logger.info('OnFragmentLoadingCompleted - Url:',e.request?e.request.url:'undefined',e.request.range?', Range:'+e.request.range:'');if(adapter.getIsTextTrack(mimeType)){setFragmentProcessState(false);}if(e.error&&e.request.serviceLocation&&!isStopped){replaceRequest(e.request);setFragmentProcessState(false);startScheduleTimer(0);}if(replacingBuffer){mediaRequest=e.request;}}function onPlaybackTimeUpdated(){completeQualityChange(true);}function onBytesAppended(e){if(replacingBuffer&&!isNaN(e.startTime)){replacingBuffer=false;fragmentModel.addExecutedRequest(mediaRequest);}setFragmentProcessState(false);if(isReplacementRequest&&!isNaN(e.startTime)){//replace requests process is in progress, call schedule in n seconds.\\n//it is done in order to not add a fragment at the new quality at the end of the buffer before replace process is over.\\n//Indeed, if schedule is called too early, the executed request tested is the same that the one tested during previous schedule (at the new quality).\\nvar currentTime=playbackController.getTime();var fragEndTime=e.startTime+currentRepresentationInfo.fragmentDuration;var safeBufferLevel=currentRepresentationInfo.fragmentDuration*1.5;if(currentTime+safeBufferLevel>=fragEndTime){startScheduleTimer(0);}else{startScheduleTimer((fragEndTime-(currentTime+safeBufferLevel))*1000);}isReplacementRequest=false;}else{startScheduleTimer(0);}}function onFragmentLoadingAbandoned(e){logger.info('onFragmentLoadingAbandoned request: '+e.request.url+' has been aborted');if(!playbackController.isSeeking()&&!switchTrack){logger.info('onFragmentLoadingAbandoned request: '+e.request.url+' has to be downloaded again, origin is not seeking process or switch track call');replaceRequest(e.request);}setFragmentProcessState(false);startScheduleTimer(0);}function onDataUpdateStarted()/*e*/{// stop();\\n}function onBufferingCompleted()/*e*/{stop();}function onBufferCleared(e){if(replacingBuffer&&settings.get().streaming.flushBufferAtTrackSwitch){// For some devices (like chromecast) it is necessary to seek the video element to reset the internal decoding buffer,\\n// otherwise audio track switch will be effective only once after previous buffered track is consumed\\nplaybackController.seek(playbackController.getTime()+0.001,false,true);}// (Re)start schedule once buffer has been pruned after a QuotaExceededError\\nif(e.hasEnoughSpaceToAppend&&e.quotaExceeded){start();}}function onQuotaExceeded()/*e*/{// Stop scheduler (will be restarted once buffer is pruned)\\nstop();setFragmentProcessState(false);}function onURLResolutionFailed(){fragmentModel.abortRequests();stop();}function onPlaybackStarted(){if(isStopped||!settings.get().streaming.scheduleWhilePaused){start();}}function onPlaybackSeeking(e){setSeekTarget(e.seekTime);setTimeToLoadDelay(0);if(isStopped){start();}var latency=currentRepresentationInfo.DVRWindow&&playbackController?currentRepresentationInfo.DVRWindow.end-playbackController.getTime():NaN;dashMetrics.updateManifestUpdateInfo({latency:latency});if(!isFragmentProcessingInProgress){// No pending request, request next segment at seek target\\nstartScheduleTimer(0);}else{// Abort current request\\nfragmentModel.abortRequests();}}function onPlaybackRateChanged(e){dashMetrics.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()});}function setSeekTarget(value){seekTarget=value;}function setTimeToLoadDelay(value){timeToLoadDelay=value;}function getTimeToLoadDelay(){return timeToLoadDelay;}function getBufferTarget(){return bufferLevelRule.getBufferTarget(type,currentRepresentationInfo,hasVideoTrack);}function resetInitialSettings(){checkPlaybackQuality=true;isFragmentProcessingInProgress=false;timeToLoadDelay=0;seekTarget=NaN;initialRequest=true;lastInitQuality=NaN;lastFragmentRequest={mediaInfo:undefined,quality:NaN,adaptationIndex:NaN};topQualityIndex={};replaceRequestArray=[];isStopped=true;switchTrack=false;replacingBuffer=false;mediaRequest=null;isReplacementRequest=false;}function reset(){//eventBus.off(Events.LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\\neventBus.off(_Events2.default.DATA_UPDATE_STARTED,onDataUpdateStarted,this);eventBus.off(_Events2.default.FRAGMENT_LOADING_COMPLETED,onFragmentLoadingCompleted,this);eventBus.off(_Events2.default.STREAM_COMPLETED,onStreamCompleted,this);eventBus.off(_Events2.default.BUFFER_CLEARED,onBufferCleared,this);eventBus.off(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onBytesAppended,this);eventBus.off(_Events2.default.QUOTA_EXCEEDED,onQuotaExceeded,this);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,this);eventBus.off(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,this);eventBus.off(_Events2.default.PLAYBACK_RATE_CHANGED,onPlaybackRateChanged,this);eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,this);eventBus.off(_Events2.default.URL_RESOLUTION_FAILED,onURLResolutionFailed,this);eventBus.off(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,this);eventBus.off(_Events2.default.BUFFERING_COMPLETED,onBufferingCompleted,this);stop();completeQualityChange(false);resetInitialSettings();}function getPlaybackController(){return playbackController;}instance={initialize:initialize,getType:getType,getStreamId:getStreamId,setCurrentRepresentation:setCurrentRepresentation,setSeekTarget:setSeekTarget,setTimeToLoadDelay:setTimeToLoadDelay,getTimeToLoadDelay:getTimeToLoadDelay,switchTrackAsked:switchTrackAsked,isStarted:isStarted,start:start,stop:stop,reset:reset,getBufferTarget:getBufferTarget,processInitRequest:processInitRequest,processMediaRequest:processMediaRequest,getPlaybackController:getPlaybackController};setup();return instance;}ScheduleController.__dashjs_factory_name='ScheduleController';exports.default=_FactoryMaker2.default.getClassFactory(ScheduleController);\\n//# sourceMappingURL=ScheduleController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/ScheduleController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _Stream=__webpack_require__(/*! ../Stream */ \\\"../node_modules/dashjs/build/es5/src/streaming/Stream.js\\\");var _Stream2=_interopRequireDefault(_Stream);var _ManifestUpdater=__webpack_require__(/*! ../ManifestUpdater */ \\\"../node_modules/dashjs/build/es5/src/streaming/ManifestUpdater.js\\\");var _ManifestUpdater2=_interopRequireDefault(_ManifestUpdater);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _PlayList=__webpack_require__(/*! ../vo/metrics/PlayList */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\\\");var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _InitCache=__webpack_require__(/*! ../utils/InitCache */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\\\");var _InitCache2=_interopRequireDefault(_InitCache);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _MediaPlayerEvents=__webpack_require__(/*! ../MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _TimeSyncController=__webpack_require__(/*! ./TimeSyncController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js\\\");var _TimeSyncController2=_interopRequireDefault(_TimeSyncController);var _MediaSourceController=__webpack_require__(/*! ./MediaSourceController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/MediaSourceController.js\\\");var _MediaSourceController2=_interopRequireDefault(_MediaSourceController);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _EventController=__webpack_require__(/*! ./EventController */ \\\"../node_modules/dashjs/build/es5/src/streaming/controllers/EventController.js\\\");var _EventController2=_interopRequireDefault(_EventController);var _ConformanceViolationConstants=__webpack_require__(/*! ../constants/ConformanceViolationConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js\\\");var _ConformanceViolationConstants2=_interopRequireDefault(_ConformanceViolationConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var PLAYBACK_ENDED_TIMER_INTERVAL=200;var PREBUFFERING_CAN_START_INTERVAL=500;function StreamController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,capabilities=void 0,capabilitiesFilter=void 0,manifestUpdater=void 0,manifestLoader=void 0,manifestModel=void 0,adapter=void 0,dashMetrics=void 0,mediaSourceController=void 0,timeSyncController=void 0,baseURLController=void 0,abrController=void 0,mediaController=void 0,eventController=void 0,textController=void 0,initCache=void 0,urlUtils=void 0,errHandler=void 0,timelineConverter=void 0,streams=void 0,activeStream=void 0,protectionController=void 0,protectionData=void 0,autoPlay=void 0,isStreamSwitchingInProgress=void 0,hasMediaError=void 0,hasInitialisationError=void 0,mediaSource=void 0,videoModel=void 0,playbackController=void 0,mediaPlayerModel=void 0,isPaused=void 0,initialPlayback=void 0,isPeriodSwitchInProgress=void 0,playbackEndedTimerInterval=void 0,prebufferingCanStartInterval=void 0,buffers=void 0,preloadingStreams=void 0,supportsChangeType=void 0,settings=void 0,preBufferingCheckInProgress=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);timeSyncController=(0,_TimeSyncController2.default)(context).getInstance();mediaSourceController=(0,_MediaSourceController2.default)(context).getInstance();initCache=(0,_InitCache2.default)(context).getInstance();urlUtils=(0,_URLUtils2.default)(context).getInstance();resetInitialSettings();}function initialize(autoPl,protData){checkConfig();autoPlay=autoPl;protectionData=protData;timelineConverter.initialize();manifestUpdater=(0,_ManifestUpdater2.default)(context).create();manifestUpdater.setConfig({manifestModel:manifestModel,adapter:adapter,manifestLoader:manifestLoader,errHandler:errHandler,settings:settings});manifestUpdater.initialize();eventController=(0,_EventController2.default)(context).getInstance();eventController.setConfig({manifestUpdater:manifestUpdater,playbackController:playbackController});eventController.start();timeSyncController.setConfig({dashMetrics:dashMetrics,baseURLController:baseURLController,settings:settings});timeSyncController.initialize();registerEvents();}function registerEvents(){eventBus.on(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,instance);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.on(_Events2.default.GAP_CAUSED_SEEK_TO_PERIOD_END,onGapCausedPlaybackSeek,instance);eventBus.on(_Events2.default.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.on(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,instance);eventBus.on(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,instance);eventBus.on(_Events2.default.PLAYBACK_ENDED,onEnded,instance,{priority:_EventBus2.default.EVENT_PRIORITY_HIGH});eventBus.on(_Events2.default.MANIFEST_UPDATED,onManifestUpdated,instance);eventBus.on(_Events2.default.STREAM_BUFFERING_COMPLETED,onStreamBufferingCompleted,instance);eventBus.on(_Events2.default.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);eventBus.on(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED,onTimeSyncCompleted,instance);eventBus.on(_MediaPlayerEvents2.default.METRIC_ADDED,onMetricAdded,instance);}function unRegisterEvents(){eventBus.off(_Events2.default.PLAYBACK_TIME_UPDATED,onPlaybackTimeUpdated,instance);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.off(_Events2.default.GAP_CAUSED_SEEK_TO_PERIOD_END,onGapCausedPlaybackSeek,instance);eventBus.off(_Events2.default.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.off(_Events2.default.PLAYBACK_STARTED,onPlaybackStarted,instance);eventBus.off(_Events2.default.PLAYBACK_PAUSED,onPlaybackPaused,instance);eventBus.off(_Events2.default.PLAYBACK_ENDED,onEnded,instance);eventBus.off(_Events2.default.MANIFEST_UPDATED,onManifestUpdated,instance);eventBus.off(_Events2.default.STREAM_BUFFERING_COMPLETED,onStreamBufferingCompleted,instance);eventBus.off(_Events2.default.MANIFEST_VALIDITY_CHANGED,onManifestValidityChanged,instance);eventBus.off(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED,onTimeSyncCompleted,instance);eventBus.off(_MediaPlayerEvents2.default.METRIC_ADDED,onMetricAdded,instance);}/*\\n     * Called when current playback position is changed.\\n     * Used to determine the time current stream is finished and we should switch to the next stream.\\n     */function onPlaybackTimeUpdated()/*e*/{if(hasVideoTrack()){var playbackQuality=videoModel.getPlaybackQuality();if(playbackQuality){dashMetrics.addDroppedFrames(playbackQuality);}}}function onPlaybackSeeking(e){var seekingStream=getStreamForTime(e.seekTime);if(seekingStream===activeStream&&preloadingStreams&&preloadingStreams.length>0){// Seeking to the current period was requested while preloading the next one, deactivate preloading one\\npreloadingStreams.forEach(function(s){s.deactivate(true);});}if(seekingStream&&seekingStream!==activeStream){// If we're preloading other stream, the active one was deactivated and we need to switch back\\nflushPlaylistMetrics(_PlayList.PlayListTrace.END_OF_PERIOD_STOP_REASON);switchStream(seekingStream,activeStream,e.seekTime);}else{flushPlaylistMetrics(_PlayList.PlayListTrace.USER_REQUEST_STOP_REASON);}createPlaylistMetrics(_PlayList.PlayList.SEEK_START_REASON);}function onGapCausedPlaybackSeek(e){var nextStream=getNextStream();flushPlaylistMetrics(_PlayList.PlayListTrace.END_OF_PERIOD_STOP_REASON);switchStream(nextStream,activeStream,e.seekTime);createPlaylistMetrics(_PlayList.PlayList.SEEK_START_REASON);}function onPlaybackStarted()/*e*/{logger.debug('[onPlaybackStarted]');if(initialPlayback){initialPlayback=false;createPlaylistMetrics(_PlayList.PlayList.INITIAL_PLAYOUT_START_REASON);}else{if(isPaused){isPaused=false;createPlaylistMetrics(_PlayList.PlayList.RESUME_FROM_PAUSE_START_REASON);}}}function onPlaybackPaused(e){logger.debug('[onPlaybackPaused]');if(!e.ended){isPaused=true;flushPlaylistMetrics(_PlayList.PlayListTrace.USER_REQUEST_STOP_REASON);}}function startPlaybackEndedTimerInterval(){if(!playbackEndedTimerInterval){playbackEndedTimerInterval=setInterval(function(){if(!isStreamSwitchingInProgress&&playbackController.getTimeToStreamEnd()<=0){eventBus.trigger(_Events2.default.PLAYBACK_ENDED,{'isLast':getActiveStreamInfo().isLast});}},PLAYBACK_ENDED_TIMER_INTERVAL);}}function stopPlaybackEndedTimerInterval(){if(playbackEndedTimerInterval){clearInterval(playbackEndedTimerInterval);playbackEndedTimerInterval=null;}}function startCheckIfPrebufferingCanStartInterval(){if(!prebufferingCanStartInterval){prebufferingCanStartInterval=setInterval(function(){checkIfPrebufferingCanStart();},PREBUFFERING_CAN_START_INTERVAL);}}function stopCheckIfPrebufferingCanStartInterval(){clearInterval(prebufferingCanStartInterval);prebufferingCanStartInterval=null;}function checkIfPrebufferingCanStart(){// In multiperiod situations, we constantly check if the streams have finished buffering so we can immediately start buffering the next stream\\nif(!activeStream||!hasStreamFinishedBuffering(activeStream)){return;}var upcomingStreams=getNextStreams(activeStream);var i=0;var _loop=function _loop(){var stream=upcomingStreams[i];var previousStream=i===0?activeStream:upcomingStreams[i-1];// If the preloading for the current stream is not scheduled, but its predecessor has finished buffering we can start prebuffering this stream\\nif(!stream.getPreloadingScheduled()&&hasStreamFinishedBuffering(previousStream)){if(mediaSource){// We can not start prebuffering if the start of the next period is in the future. This will cause problems when calculating the segmentAvailabilityRange and updating the representations in the RepresentationController\\n// As long as the timeline converter returns an invalid range we do not start the prebuffering\\nvar mediaTypes=[_Constants2.default.VIDEO,_Constants2.default.AUDIO];var segmentAvailabilityRangeIsOk=true;mediaTypes.forEach(function(mediaType){var mediaInfo=adapter.getMediaInfoForType(stream.getStreamInfo(),mediaType);var voRepresentations=adapter.getVoRepresentations(mediaInfo);voRepresentations.forEach(function(voRep){var isDynamic=adapter.getIsDynamic();var range=timelineConverter.calcSegmentAvailabilityRange(voRep,isDynamic);if(range.end<range.start){segmentAvailabilityRangeIsOk=false;}});});if(segmentAvailabilityRangeIsOk){onStreamCanLoadNext(stream,previousStream);}}}i+=1;};while(i<upcomingStreams.length){_loop();}}function hasStreamFinishedBuffering(stream){try{if(!stream){return false;}var streamProcessors=stream.getProcessors().filter(function(sp){return sp.getType()===_Constants2.default.AUDIO||sp.getType()===_Constants2.default.VIDEO;});if(!streamProcessors||streamProcessors.length===0){return false;}var unfinishedStreamProcessors=streamProcessors.filter(function(sp){return!sp.isBufferingCompleted();});return unfinishedStreamProcessors&&unfinishedStreamProcessors.length===0;}catch(e){return false;}}function onStreamBufferingCompleted(){var isLast=getActiveStreamInfo().isLast;if(mediaSource&&isLast){logger.info('[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController.');mediaSourceController.signalEndOfStream(mediaSource);}}function canSourceBuffersBeReused(nextStream,previousStream){try{return settings.get().streaming.reuseExistingSourceBuffers&&previousStream.isProtectionCompatible(nextStream,previousStream)&&(supportsChangeType||previousStream.isMediaCodecCompatible(nextStream,previousStream))&&!hasCriticalTexttracks(nextStream);}catch(e){return false;}}function onStreamCanLoadNext(nextStream){var previousStream=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(mediaSource&&!nextStream.getPreloaded()){// Seamless period switch allowed only if:\\n// - none of the periods uses contentProtection.\\n// - AND changeType method implemented by browser or periods use the same codec.\\nvar seamlessPeriodSwitch=canSourceBuffersBeReused(nextStream,previousStream);if(seamlessPeriodSwitch){nextStream.setPreloadingScheduled(true);logger.info('[onStreamCanLoadNext] Preloading next stream with id '+nextStream.getId());isPeriodSwitchInProgress=true;nextStream.preload(mediaSource,buffers);preloadingStreams.push(nextStream);nextStream.getProcessors().forEach(function(p){p.setBufferingTime(nextStream.getStartTime());});}}}function hasCriticalTexttracks(stream){try{// if the upcoming stream has stpp or wvtt texttracks we need to reset the sourcebuffers and can not prebuffer\\nvar streamInfo=stream.getStreamInfo();var as=adapter.getAdaptationForType(streamInfo.index,_Constants2.default.FRAGMENTED_TEXT,streamInfo);if(!as){return false;}return as.codecs.indexOf('stpp')!==-1||as.codecs.indexOf('wvtt')!==-1;}catch(e){return false;}}function getStreamForTime(time){if(isNaN(time)){return null;}var streamDuration=0;var stream=null;var ln=streams.length;if(ln>0){streamDuration+=streams[0].getStartTime();}for(var i=0;i<ln;i++){stream=streams[i];streamDuration=parseFloat((streamDuration+stream.getDuration()).toFixed(5));if(time<streamDuration){return stream;}}return null;}/**\\n     * Returns a playhead time, in seconds, converted to be relative\\n     * to the start of an identified stream/period or null if no such stream\\n     * @param {number} time\\n     * @param {string} id\\n     * @returns {number|null}\\n     */function getTimeRelativeToStreamId(time,id){var stream=null;var baseStart=0;var streamStart=0;var streamDur=null;for(var i=0;i<streams.length;i++){stream=streams[i];streamStart=stream.getStartTime();streamDur=stream.getDuration();// use start time, if not undefined or NaN or similar\\nif(Number.isFinite(streamStart)){baseStart=streamStart;}if(stream.getId()===id){return time-baseStart;}else{// use duration if not undefined or NaN or similar\\nif(Number.isFinite(streamDur)){baseStart+=streamDur;}}}return null;}function getActiveStreamProcessors(){return activeStream?activeStream.getProcessors():[];}function onEnded(e){if(!activeStream.getIsEndedEventSignaled()){activeStream.setIsEndedEventSignaled(true);var nextStream=getNextStream();if(nextStream){logger.debug('StreamController onEnded, found next stream with id '+nextStream.getStreamInfo().id);switchStream(nextStream,activeStream,NaN);}else{logger.debug('StreamController no next stream found');activeStream.setIsEndedEventSignaled(false);}flushPlaylistMetrics(nextStream?_PlayList.PlayListTrace.END_OF_PERIOD_STOP_REASON:_PlayList.PlayListTrace.END_OF_CONTENT_STOP_REASON);isPeriodSwitchInProgress=false;}if(e&&e.isLast){stopPlaybackEndedTimerInterval();}}function getNextStream(){var stream=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var refStream=stream?stream:activeStream?activeStream:null;if(refStream){var start=refStream.getStreamInfo().start;var duration=refStream.getStreamInfo().duration;var streamEnd=parseFloat((start+duration).toFixed(5));var i=0;var targetIndex=-1;var lastDiff=NaN;while(i<streams.length){var s=streams[i];var diff=s.getStreamInfo().start-streamEnd;if(diff>=0&&(isNaN(lastDiff)||diff<lastDiff)){lastDiff=diff;targetIndex=i;}i+=1;}if(targetIndex>=0){return streams[targetIndex];}return null;}return null;}function getNextStreams(stream){try{var refStream=stream?stream:activeStream?activeStream:null;if(refStream){var start=refStream.getStreamInfo().start;return streams.filter(function(stream){return stream.getStreamInfo().start>start;});}}catch(e){return[];}}function switchStream(stream,previousStream,seekTime){if(isStreamSwitchingInProgress||!stream||previousStream===stream&&stream.isActive())return;isStreamSwitchingInProgress=true;eventBus.trigger(_Events2.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:previousStream?previousStream.getStreamInfo():null,toStreamInfo:stream.getStreamInfo()});var seamlessPeriodSwitch=false;if(previousStream){seamlessPeriodSwitch=canSourceBuffersBeReused(stream,previousStream);previousStream.deactivate(seamlessPeriodSwitch);}// Determine seek time when switching to new period\\n// - seek at given seek time\\n// - or seek at period start if upcoming period is not prebuffered\\nseekTime=!isNaN(seekTime)?seekTime:!seamlessPeriodSwitch&&previousStream?stream.getStreamInfo().start:NaN;logger.info('Switch to stream '+stream.getId()+'. Seektime is '+seekTime+', current playback time is '+playbackController.getTime());logger.info('Seamless period switch is set to '+seamlessPeriodSwitch);activeStream=stream;preloadingStreams=preloadingStreams.filter(function(s){return s.getId()!==activeStream.getId();});playbackController.initialize(getActiveStreamInfo(),!!previousStream,seekTime);if(videoModel.getElement()){openMediaSource(seekTime,previousStream===null,false,seamlessPeriodSwitch);}else{activateStream(seekTime,seamlessPeriodSwitch);}isPeriodSwitchInProgress=false;}function switchToVideoElement(seekTime){if(activeStream){playbackController.initialize(getActiveStreamInfo());openMediaSource(seekTime,false,true,false);}}function openMediaSource(seekTime,sourceInitialized,streamActivated,keepBuffers){var sourceUrl=void 0;function onMediaSourceOpen(){// Manage situations in which a call to reset happens while MediaSource is being opened\\nif(!mediaSource||mediaSource.readyState!=='open')return;logger.debug('MediaSource is open!');window.URL.revokeObjectURL(sourceUrl);mediaSource.removeEventListener('sourceopen',onMediaSourceOpen);mediaSource.removeEventListener('webkitsourceopen',onMediaSourceOpen);setMediaDuration();if(!sourceInitialized){eventBus.trigger(_Events2.default.SOURCE_INITIALIZED);}if(streamActivated){activeStream.setMediaSource(mediaSource);}else{activateStream(seekTime,keepBuffers);}}if(!mediaSource){mediaSource=mediaSourceController.createMediaSource();mediaSource.addEventListener('sourceopen',onMediaSourceOpen,false);mediaSource.addEventListener('webkitsourceopen',onMediaSourceOpen,false);sourceUrl=mediaSourceController.attachMediaSource(mediaSource,videoModel);logger.debug('MediaSource attached to element.  Waiting on open...');}else{if(keepBuffers){activateStream(seekTime,keepBuffers);if(!sourceInitialized){eventBus.trigger(_Events2.default.SOURCE_INITIALIZED);}}else{mediaSourceController.detachMediaSource(videoModel);mediaSource.addEventListener('sourceopen',onMediaSourceOpen,false);mediaSource.addEventListener('webkitsourceopen',onMediaSourceOpen,false);sourceUrl=mediaSourceController.attachMediaSource(mediaSource,videoModel);logger.debug('MediaSource attached to element.  Waiting on open...');}}}function getActiveStream(){return activeStream;}function activateStream(seekTime,keepBuffers){buffers=activeStream.activate(mediaSource,keepBuffers?buffers:undefined);// check if change type is supported by the browser\\nif(buffers){var keys=Object.keys(buffers);if(keys.length>0&&buffers[keys[0]].changeType){supportsChangeType=true;}}if(!initialPlayback){if(!isNaN(seekTime)){// If the streamswitch has been triggered by a seek command there is no need to seek again. Still we need to trigger the seeking event in order for the controllers to adjust the new time\\nif(seekTime===playbackController.getTime()){eventBus.trigger(_Events2.default.SEEK_TARGET,{time:seekTime},{streamId:activeStream.getId()});}else{playbackController.seek(seekTime);}}}if(autoPlay||!initialPlayback){playbackController.play();}isStreamSwitchingInProgress=false;eventBus.trigger(_Events2.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:getActiveStreamInfo()});}function setMediaDuration(duration){var manifestDuration=duration?duration:getActiveStreamInfo().manifestInfo.duration;mediaSourceController.setDuration(mediaSource,manifestDuration);}function getComposedStream(streamInfo){for(var i=0,ln=streams.length;i<ln;i++){if(streams[i].getId()===streamInfo.id){return streams[i];}}return null;}function composeStreams(){try{var streamsInfo=adapter.getStreamsInfo();if(streamsInfo.length===0){throw new Error('There are no streams');}dashMetrics.updateManifestUpdateInfo({currentTime:playbackController.getTime(),buffered:videoModel.getBufferRange(),presentationStartTime:streamsInfo[0].start,clientTimeOffset:timelineConverter.getClientTimeOffset()});// Filter streams that are outdated and not included in the MPD anymore\\nif(streams.length>0){streams=streams.filter(function(stream){var isStillIncluded=streamsInfo.filter(function(sInfo){return sInfo.id===stream.getId();}).length>0;var shouldKeepStream=isStillIncluded||stream.getId()===activeStream.getId();if(!shouldKeepStream){logger.debug('Removing stream '+stream.getId());}return shouldKeepStream;});}for(var i=0,ln=streamsInfo.length;i<ln;i++){// If the Stream object does not exist we probably loaded the manifest the first time or it was\\n// introduced in the updated manifest, so we need to create a new Stream and perform all the initialization operations\\nvar streamInfo=streamsInfo[i];var _stream=getComposedStream(streamInfo);if(!_stream){_stream=(0,_Stream2.default)(context).create({manifestModel:manifestModel,mediaPlayerModel:mediaPlayerModel,dashMetrics:dashMetrics,manifestUpdater:manifestUpdater,adapter:adapter,timelineConverter:timelineConverter,capabilities:capabilities,capabilitiesFilter:capabilitiesFilter,errHandler:errHandler,baseURLController:baseURLController,abrController:abrController,playbackController:playbackController,eventController:eventController,mediaController:mediaController,textController:textController,protectionController:protectionController,videoModel:videoModel,streamInfo:streamInfo,settings:settings});streams.push(_stream);_stream.initialize();}else{_stream.updateData(streamInfo);}dashMetrics.addManifestUpdateStreamInfo(streamInfo);}if(!activeStream){if(adapter.getIsDynamic()&&streams.length){// Compute and set live delay\\nvar manifestInfo=streamsInfo[0].manifestInfo;var fragmentDuration=getFragmentDurationForLiveDelayCalculation(streamsInfo,manifestInfo);playbackController.computeAndSetLiveDelay(fragmentDuration,manifestInfo.DVRWindowSize,manifestInfo.minBufferTime);}// we need to figure out what the correct starting period is\\nvar initialStream=null;var startTimeFromUri=playbackController.getStartTimeFromUriParameters(adapter.getIsDynamic());initialStream=getStreamForTime(startTimeFromUri);// For multiperiod streams we should avoid a switch of streams after the seek to the live edge. So we do a calculation of the expected seek time to find the right stream object.\\nif(!initialStream&&adapter.getIsDynamic()&&streams.length){logger.debug('Dynamic stream: Trying to find the correct starting period');initialStream=getInitialStream();}var startStream=initialStream!==null?initialStream:streams[0];switchStream(startStream,null,NaN);startPlaybackEndedTimerInterval();startCheckIfPrebufferingCanStartInterval();}eventBus.trigger(_Events2.default.STREAMS_COMPOSED);}catch(e){errHandler.error(new _DashJSError2.default(_Errors2.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+'nostreamscomposed',manifestModel.getValue()));hasInitialisationError=true;reset();}}function getInitialStream(){try{var liveEdge=timelineConverter.calcPresentationTimeFromWallTime(new Date(),adapter.getRegularPeriods()[0]);var targetDelay=playbackController.getLiveDelay();var targetTime=liveEdge-targetDelay;return getStreamForTime(targetTime);}catch(e){return null;}}function getFragmentDurationForLiveDelayCalculation(streamInfos,manifestInfo){try{var fragmentDuration=NaN;//  We use the maxFragmentDuration attribute if present\\nif(manifestInfo&&!isNaN(manifestInfo.maxFragmentDuration)&&isFinite(manifestInfo.maxFragmentDuration)){return manifestInfo.maxFragmentDuration;}// For single period manifests we can iterate over all AS and use the maximum segment length\\nif(streamInfos&&streamInfos.length===1){var streamInfo=streamInfos[0];var mediaTypes=[_Constants2.default.VIDEO,_Constants2.default.AUDIO,_Constants2.default.FRAGMENTED_TEXT];var fragmentDurations=mediaTypes.reduce(function(acc,mediaType){var mediaInfo=adapter.getMediaInfoForType(streamInfo,mediaType);if(mediaInfo){acc.push(mediaInfo);}return acc;},[]).reduce(function(acc,mediaInfo){var voRepresentations=adapter.getVoRepresentations(mediaInfo);if(voRepresentations&&voRepresentations.length>0){voRepresentations.forEach(function(voRepresentation){if(voRepresentation){acc.push(voRepresentation);}});}return acc;},[]).reduce(function(acc,voRepresentation){var representation=adapter.convertDataToRepresentationInfo(voRepresentation);if(representation&&representation.fragmentDuration&&!isNaN(representation.fragmentDuration)){acc.push(representation.fragmentDuration);}return acc;},[]);fragmentDuration=Math.max.apply(Math,_toConsumableArray(fragmentDurations));}return isFinite(fragmentDuration)?fragmentDuration:NaN;}catch(e){return NaN;}}function onTimeSyncCompleted()/*e*/{var manifest=manifestModel.getValue();//TODO check if we can move this to initialize??\\nif(protectionController){eventBus.trigger(_Events2.default.PROTECTION_CREATED,{controller:protectionController,manifest:manifest});protectionController.setMediaElement(videoModel.getElement());if(protectionData){protectionController.setProtectionData(protectionData);}}composeStreams();}function onManifestUpdated(e){if(!e.error){//Since streams are not composed yet , need to manually look up useCalculatedLiveEdgeTime to detect if stream\\n//is SegmentTimeline to avoid using time source\\nvar manifest=e.manifest;adapter.updatePeriods(manifest);var manifestUTCTimingSources=adapter.getUTCTimingSources();if(adapter.getIsDynamic()&&(!manifestUTCTimingSources||manifestUTCTimingSources.length===0)){eventBus.trigger(_MediaPlayerEvents2.default.CONFORMANCE_VIOLATION,{level:_ConformanceViolationConstants2.default.LEVELS.WARNING,event:_ConformanceViolationConstants2.default.EVENTS.NO_UTC_TIMING_ELEMENT});}var allUTCTimingSources=!adapter.getIsDynamic()?manifestUTCTimingSources:manifestUTCTimingSources.concat(mediaPlayerModel.getUTCTimingSources());var isHTTPS=urlUtils.isHTTPS(e.manifest.url);//If https is detected on manifest then lets apply that protocol to only the default time source(s). In the future we may find the need to apply this to more then just default so left code at this level instead of in MediaPlayer.\\nallUTCTimingSources.forEach(function(item){if(item.value.replace(/.*?:\\\\/\\\\//g,'')===mediaPlayerModel.getDefaultUtcTimingSource().value.replace(/.*?:\\\\/\\\\//g,'')){item.value=item.value.replace(isHTTPS?new RegExp(/^(http:)?\\\\/\\\\//i):new RegExp(/^(https:)?\\\\/\\\\//i),isHTTPS?'https://':'http://');logger.debug('Matching default timing source protocol to manifest protocol: ',item.value);}});baseURLController.initialize(manifest);timeSyncController.attemptSync(allUTCTimingSources);}else{hasInitialisationError=true;reset();}}function hasVideoTrack(){return activeStream?activeStream.getHasVideoTrack():false;}function hasAudioTrack(){return activeStream?activeStream.getHasAudioTrack():false;}function flushPlaylistMetrics(reason,time){time=time||new Date();getActiveStreamProcessors().forEach(function(p){p.finalisePlayList(time,reason);});dashMetrics.addPlayList();}function createPlaylistMetrics(startReason){dashMetrics.createPlaylistMetrics(playbackController.getTime()*1000,startReason);}function onPlaybackError(e){if(!e.error)return;var msg='';switch(e.error.code){case 1:msg='MEDIA_ERR_ABORTED';break;case 2:msg='MEDIA_ERR_NETWORK';break;case 3:msg='MEDIA_ERR_DECODE';break;case 4:msg='MEDIA_ERR_SRC_NOT_SUPPORTED';break;case 5:msg='MEDIA_ERR_ENCRYPTED';break;default:msg='UNKNOWN';break;}hasMediaError=true;if(e.error.message){msg+=' ('+e.error.message+')';}if(e.error.msExtendedCode){msg+=' (0x'+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+')';}logger.fatal('Video Element Error: '+msg);if(e.error){logger.fatal(e.error);}errHandler.error(new _DashJSError2.default(e.error.code,msg));reset();}function getActiveStreamInfo(){return activeStream?activeStream.getStreamInfo():null;}function getIsStreamSwitchInProgress(){return isStreamSwitchingInProgress;}function getHasMediaOrIntialisationError(){return hasMediaError||hasInitialisationError;}function getStreamById(id){return streams.filter(function(item){return item.getId()===id;})[0];}function checkConfig(){if(!manifestLoader||!manifestLoader.hasOwnProperty('load')||!timelineConverter||!timelineConverter.hasOwnProperty('initialize')||!timelineConverter.hasOwnProperty('reset')||!timelineConverter.hasOwnProperty('getClientTimeOffset')||!manifestModel||!errHandler||!dashMetrics||!playbackController){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function checkInitialize(){if(!manifestUpdater||!manifestUpdater.hasOwnProperty('setManifest')){throw new Error('initialize function has to be called previously');}}function load(url){checkConfig();manifestLoader.load(url);}function loadWithManifest(manifest){checkInitialize();manifestUpdater.setManifest(manifest);}function onManifestValidityChanged(e){if(!isNaN(e.newDuration)){setMediaDuration(e.newDuration);}}function setConfig(config){if(!config)return;if(config.capabilities){capabilities=config.capabilities;}if(config.capabilitiesFilter){capabilitiesFilter=config.capabilitiesFilter;}if(config.manifestLoader){manifestLoader=config.manifestLoader;}if(config.manifestModel){manifestModel=config.manifestModel;}if(config.mediaPlayerModel){mediaPlayerModel=config.mediaPlayerModel;}if(config.protectionController){protectionController=config.protectionController;}if(config.adapter){adapter=config.adapter;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.errHandler){errHandler=config.errHandler;}if(config.timelineConverter){timelineConverter=config.timelineConverter;}if(config.videoModel){videoModel=config.videoModel;}if(config.playbackController){playbackController=config.playbackController;}if(config.abrController){abrController=config.abrController;}if(config.mediaController){mediaController=config.mediaController;}if(config.textController){textController=config.textController;}if(config.settings){settings=config.settings;}if(config.baseURLController){baseURLController=config.baseURLController;}}function setProtectionData(protData){protectionData=protData;}function resetInitialSettings(){streams=[];protectionController=null;isStreamSwitchingInProgress=false;activeStream=null;hasMediaError=false;hasInitialisationError=false;initialPlayback=true;isPaused=false;autoPlay=true;playbackEndedTimerInterval=null;isPeriodSwitchInProgress=false;prebufferingCanStartInterval=null;preBufferingCheckInProgress=false;preloadingStreams=[];}function reset(){checkConfig();timeSyncController.reset();flushPlaylistMetrics(hasMediaError||hasInitialisationError?_PlayList.PlayListTrace.FAILURE_STOP_REASON:_PlayList.PlayListTrace.USER_REQUEST_STOP_REASON);for(var i=0,ln=streams?streams.length:0;i<ln;i++){var _stream2=streams[i];_stream2.reset(hasMediaError);}unRegisterEvents();baseURLController.reset();manifestUpdater.reset();eventController.reset();dashMetrics.clearAllCurrentMetrics();manifestModel.setValue(null);manifestLoader.reset();timelineConverter.reset();initCache.reset();if(mediaSource){mediaSourceController.detachMediaSource(videoModel);mediaSource=null;}videoModel=null;if(protectionController){protectionController.setMediaElement(null);protectionController=null;protectionData=null;if(manifestModel.getValue()){eventBus.trigger(_Events2.default.PROTECTION_DESTROYED,{data:manifestModel.getValue().url});}}stopPlaybackEndedTimerInterval();stopCheckIfPrebufferingCanStartInterval();eventBus.trigger(_Events2.default.STREAM_TEARDOWN_COMPLETE);resetInitialSettings();}function onMetricAdded(e){if(e.metric===_MetricsConstants2.default.DVR_INFO){//Match media type? How can DVR window be different for media types?\\n//Should we normalize and union the two?\\nvar targetMediaType=hasAudioTrack()?_Constants2.default.AUDIO:_Constants2.default.VIDEO;if(e.mediaType===targetMediaType){mediaSourceController.setSeekable(mediaSource,e.value.range.start,e.value.range.end);}}}function getStreams(){return streams;}instance={initialize:initialize,getActiveStreamInfo:getActiveStreamInfo,hasVideoTrack:hasVideoTrack,hasAudioTrack:hasAudioTrack,switchToVideoElement:switchToVideoElement,getStreamById:getStreamById,getStreamForTime:getStreamForTime,getTimeRelativeToStreamId:getTimeRelativeToStreamId,load:load,loadWithManifest:loadWithManifest,getActiveStreamProcessors:getActiveStreamProcessors,setConfig:setConfig,setProtectionData:setProtectionData,getIsStreamSwitchInProgress:getIsStreamSwitchInProgress,getHasMediaOrIntialisationError:getHasMediaOrIntialisationError,hasStreamFinishedBuffering:hasStreamFinishedBuffering,getStreams:getStreams,getActiveStream:getActiveStream,reset:reset};setup();return instance;}StreamController.__dashjs_factory_name='StreamController';exports.default=_FactoryMaker2.default.getSingletonFactory(StreamController);\\n//# sourceMappingURL=StreamController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/StreamController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DashJSError=__webpack_require__(/*! ./../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _EventBus=__webpack_require__(/*! ./../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ./../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Errors=__webpack_require__(/*! ./../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var HTTP_TIMEOUT_MS=5000;var DEFAULT_MAXIMUM_ALLOWED_DRIFT=100;var DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS_ADJUSTMENT_FACTOR=2;var DEFAULT_BACKGROUND_ATTEMPTS=2;var DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS=30;var DEFAULT_MINIMUM_TIME_BETWEEN_BACKGROUND_SYNC_ATTEMPTS=30;var DEFAULT_MAXIMUM_TIME_BETWEEN_SYNC=600;var DEFAULT_MINIMUM_TIME_BETWEEN_SYNC=2;function TimeSyncController(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,logger=void 0,isSynchronizing=void 0,isBackgroundSynchronizing=void 0,settings=void 0,handlers=void 0,dashMetrics=void 0,backgroundSyncTimeOffsets=void 0,timingSources=void 0,timeOfLastSync=void 0,timeOfLastBackgroundSync=void 0,lastOffset=void 0,lastTimingSource=void 0,internalTimeBetweenSyncAttempts=void 0,baseURLController=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);eventBus.on(_Events2.default.ATTEMPT_BACKGROUND_SYNC,_onAttemptBackgroundSync,instance);}function setConfig(config){if(!config)return;if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.baseURLController){baseURLController=config.baseURLController;}if(config.settings){settings=config.settings;}}function _resetInitialSettings(){backgroundSyncTimeOffsets=[];timingSources=[];timeOfLastSync=null;timeOfLastBackgroundSync=null;lastTimingSource=null;lastOffset=NaN;isSynchronizing=false;isBackgroundSynchronizing=false;internalTimeBetweenSyncAttempts=settings.get().streaming.utcSynchronization.timeBetweenSyncAttempts;}/**\\n     * Register the timing handler depending on the schemeIdUris. This method is called once when the StreamController is initialized\\n     */function initialize(){_resetInitialSettings();// a list of known schemeIdUris and a method to call with @value\\nhandlers={'urn:mpeg:dash:utc:http-head:2014':_httpHeadHandler,'urn:mpeg:dash:utc:http-xsdate:2014':_httpHandler.bind(null,_xsdatetimeDecoder),'urn:mpeg:dash:utc:http-iso:2014':_httpHandler.bind(null,_iso8601Decoder),'urn:mpeg:dash:utc:direct:2014':_directHandler,// some specs referencing early ISO23009-1 drafts incorrectly use\\n// 2012 in the URI, rather than 2014. support these for now.\\n'urn:mpeg:dash:utc:http-head:2012':_httpHeadHandler,'urn:mpeg:dash:utc:http-xsdate:2012':_httpHandler.bind(null,_xsdatetimeDecoder),'urn:mpeg:dash:utc:http-iso:2012':_httpHandler.bind(null,_iso8601Decoder),'urn:mpeg:dash:utc:direct:2012':_directHandler,// it isn't clear how the data returned would be formatted, and\\n// no public examples available so http-ntp not supported for now.\\n// presumably you would do an arraybuffer type xhr and decode the\\n// binary data returned but I would want to see a sample first.\\n'urn:mpeg:dash:utc:http-ntp:2014':_notSupportedHandler,// not clear how this would be supported in javascript (in browser)\\n'urn:mpeg:dash:utc:ntp:2014':_notSupportedHandler,'urn:mpeg:dash:utc:sntp:2014':_notSupportedHandler};}/**\\n     * Sync against a timing source. T\\n     * @param {array} tSources\\n     */function attemptSync(tSources){timingSources=tSources;// Stop if we are already synchronizing\\nif(isSynchronizing){return;}// No synchronization required we can signal the completion immediately\\nif(!_shouldPerformSynchronization()){eventBus.trigger(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED);return;}isSynchronizing=true;_attemptRecursiveSync();}/**\\n     * Does a synchronization in the background in case the last offset should be verified or a 404 occurs\\n     */function _onAttemptBackgroundSync(){if(isSynchronizing||isBackgroundSynchronizing||!lastTimingSource||!lastTimingSource.value||!lastTimingSource.schemeIdUri||isNaN(lastOffset)||isNaN(settings.get().streaming.utcSynchronization.backgroundAttempts)){return;}if(timeOfLastBackgroundSync&&(Date.now()-timeOfLastBackgroundSync)/1000<DEFAULT_MINIMUM_TIME_BETWEEN_BACKGROUND_SYNC_ATTEMPTS){return;}backgroundSyncTimeOffsets=[];isBackgroundSynchronizing=true;var backgroundAttempts=!isNaN(settings.get().streaming.utcSynchronization.backgroundAttempts)?settings.get().streaming.utcSynchronization.backgroundAttempts:DEFAULT_BACKGROUND_ATTEMPTS;_attemptBackgroundSync(backgroundAttempts);}/**\\n     * Perform a defined number of background attempts\\n     * @param {number} attempts\\n     * @private\\n     */function _attemptBackgroundSync(attempts){try{if(attempts<=0){_completeBackgroundTimeSyncSequence();return;}var deviceTimeBeforeSync=Date.now();handlers[lastTimingSource.schemeIdUri](lastTimingSource.value,function(serverTime){// the timing source returned something useful\\nvar deviceTimeAfterSync=Date.now();var offset=_calculateOffset(deviceTimeBeforeSync,deviceTimeAfterSync,serverTime);backgroundSyncTimeOffsets.push(offset);_attemptBackgroundSync(attempts-1);},function(){_completeBackgroundTimeSyncSequence();});}catch(e){_completeBackgroundTimeSyncSequence();}}/**\\n     * Sync against a timing source. This method is called recursively if the time sync for the first entry in timingSources fails.\\n     * @param {number} sourceIndex\\n     */function _attemptRecursiveSync(){var sourceIndex=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;// if called with no sourceIndex, use zero (highest priority)\\nvar index=sourceIndex||0;// the sources should be ordered in priority from the manifest.\\n// try each in turn, from the top, until either something\\n// sensible happens, or we run out of sources to try.\\nif(!timingSources||timingSources.length===0||index>=timingSources.length){_onComplete();return;}var source=timingSources[index];if(source){// check if there is a handler for this @schemeIdUri\\nif(handlers.hasOwnProperty(source.schemeIdUri)){// if so, call it with its @value\\nvar deviceTimeBeforeSync=new Date().getTime();handlers[source.schemeIdUri](source.value,function(serverTime){// the timing source returned something useful\\nvar deviceTimeAfterSync=new Date().getTime();var offset=_calculateOffset(deviceTimeBeforeSync,deviceTimeAfterSync,serverTime);lastTimingSource=source;_onComplete(offset);},function(){// the timing source was probably uncontactable\\n// or returned something we can't use - try again\\n// with the remaining sources\\n_attemptRecursiveSync(index+1);});}else{// an unknown schemeIdUri must have been found\\n// try again with the remaining sources\\n_attemptRecursiveSync(index+1);}}else{// no valid time source could be found, just use device time\\n_onComplete();}}/**\\n     * Calculate the offset between client and server. Account for the roundtrip time\\n     * @param {number} deviceTimeBeforeSync\\n     * @param {number} deviceTimeAfterSync\\n     * @param {number} serverTime\\n     * @return {number}\\n     * @private\\n     */function _calculateOffset(deviceTimeBeforeSync,deviceTimeAfterSync,serverTime){var deviceReferenceTime=deviceTimeAfterSync-(deviceTimeAfterSync-deviceTimeBeforeSync)/2;return serverTime-deviceReferenceTime;}/**\\n     * Checks if a synchronization is required\\n     * @return {boolean}\\n     * @private\\n     */function _shouldPerformSynchronization(){try{var timeBetweenSyncAttempts=!isNaN(internalTimeBetweenSyncAttempts)?internalTimeBetweenSyncAttempts:DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS;if(!timeOfLastSync||!timeBetweenSyncAttempts||isNaN(timeBetweenSyncAttempts)){return true;}return(Date.now()-timeOfLastSync)/1000>=timeBetweenSyncAttempts;}catch(e){return true;}}/**\\n     * Callback after sync has been completed\\n     * @param {number} offset\\n     * @private\\n     */function _onComplete(){var offset=arguments.length>0&&arguments[0]!==undefined?arguments[0]:NaN;var failed=isNaN(offset);if(failed&&settings.get().streaming.useManifestDateHeaderTimeSource){//Before falling back to binary search , check if date header exists on MPD. if so, use for a time source.\\n_checkForDateHeader();}else{_completeTimeSyncSequence(failed,offset);}}/**\\n     * Takes xsdatetime and returns milliseconds since UNIX epoch. May not be necessary as xsdatetime is very similar to ISO 8601 which is natively understood by javascript Date parser\\n     * @param {string} xsdatetimeStr\\n     * @return {number}\\n     * @private\\n     */function _alternateXsdatetimeDecoder(xsdatetimeStr){// taken from DashParser - should probably refactor both uses\\nvar SECONDS_IN_MIN=60;var MINUTES_IN_HOUR=60;var MILLISECONDS_IN_SECONDS=1000;var datetimeRegex=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\\\.[0-9]*)?)?(?:([+\\\\-])([0-9]{2})([0-9]{2}))?/;var utcDate=void 0,timezoneOffset=void 0;var match=datetimeRegex.exec(xsdatetimeStr);// If the string does not contain a timezone offset different browsers can interpret it either\\n// as UTC or as a local time so we have to parse the string manually to normalize the given date value for\\n// all browsers\\nutcDate=Date.UTC(parseInt(match[1],10),parseInt(match[2],10)-1,// months start from zero\\nparseInt(match[3],10),parseInt(match[4],10),parseInt(match[5],10),match[6]&&(parseInt(match[6],10)||0),match[7]&&parseFloat(match[7])*MILLISECONDS_IN_SECONDS||0);// If the date has timezone offset take it into account as well\\nif(match[9]&&match[10]){timezoneOffset=parseInt(match[9],10)*MINUTES_IN_HOUR+parseInt(match[10],10);utcDate+=(match[8]==='+'?-1:+1)*timezoneOffset*SECONDS_IN_MIN*MILLISECONDS_IN_SECONDS;}return new Date(utcDate).getTime();}/**\\n     * Try to use the built in parser, since xsdate is a constrained ISO8601 which is supported natively by Date.parse. if that fails, try a regex-based version used elsewhere in this application.\\n     * @param {string} xsdatetimeStr\\n     * @return {number}\\n     */function _xsdatetimeDecoder(xsdatetimeStr){var parsedDate=Date.parse(xsdatetimeStr);if(isNaN(parsedDate)){parsedDate=_alternateXsdatetimeDecoder(xsdatetimeStr);}return parsedDate;}/**\\n     * Takes ISO 8601 timestamp and returns milliseconds since UNIX epoch\\n     * @param {string} isoStr\\n     * @return {number}\\n     */function _iso8601Decoder(isoStr){return Date.parse(isoStr);}/**\\n     * Takes RFC 1123 timestamp (which is same as ISO8601) and returns milliseconds since UNIX epoch\\n     * @param {string} dateStr\\n     * @return {number}\\n     */function _rfc1123Decoder(dateStr){return Date.parse(dateStr);}/**\\n     * Handler for unsupported scheme ids.\\n     * @param {string} url\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     * @private\\n     */function _notSupportedHandler(url,onSuccessCB,onFailureCB){onFailureCB();}/**\\n     * Direct handler\\n     * @param {string} xsdatetimeStr\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     */function _directHandler(xsdatetimeStr,onSuccessCB,onFailureCB){var time=_xsdatetimeDecoder(xsdatetimeStr);if(!isNaN(time)){onSuccessCB(time);return;}onFailureCB();}/**\\n     * Generic http handler\\n     * @param {function} decoder\\n     * @param {string} url\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     * @param {boolean} isHeadRequest\\n     * @private\\n     */function _httpHandler(decoder,url,onSuccessCB,onFailureCB,isHeadRequest){var oncomplete=void 0,onload=void 0;var complete=false;var req=new XMLHttpRequest();var verb=isHeadRequest?_HTTPRequest.HTTPRequest.HEAD:_HTTPRequest.HTTPRequest.GET;var urls=url.match(/\\\\S+/g);// according to ISO 23009-1, url could be a white-space\\n// separated list of URLs. just handle one at a time.\\nurl=urls.shift();oncomplete=function oncomplete(){if(complete){return;}// we only want to pass through here once per xhr,\\n// regardless of whether the load was successful.\\ncomplete=true;// if there are more urls to try, call self.\\nif(urls.length){_httpHandler(decoder,urls.join(' '),onSuccessCB,onFailureCB,isHeadRequest);}else{onFailureCB();}};onload=function onload(){var time=void 0,result=void 0;if(req.status===200){time=isHeadRequest?req.getResponseHeader('Date'):req.response;result=decoder(time);// decoder returns NaN if non-standard input\\nif(!isNaN(result)){onSuccessCB(result);complete=true;}}};if(urlUtils.isRelative(url)){// passing no path to resolve will return just MPD BaseURL/baseUri\\nvar baseUrl=baseURLController.resolve();if(baseUrl){url=urlUtils.resolve(url,baseUrl.url);}}req.open(verb,url);req.timeout=HTTP_TIMEOUT_MS||0;req.onload=onload;req.onloadend=oncomplete;req.send();}/**\\n     * Handler for http-head schemeIdUri\\n     * @param {string} url\\n     * @param {function} onSuccessCB\\n     * @param {function} onFailureCB\\n     * @private\\n     */function _httpHeadHandler(url,onSuccessCB,onFailureCB){_httpHandler(_rfc1123Decoder,url,onSuccessCB,onFailureCB,true);}/**\\n     * Checks if a date header is present in the MPD response and calculates the offset based on the header\\n     * @private\\n     */function _checkForDateHeader(){var dateHeaderValue=dashMetrics.getLatestMPDRequestHeaderValueByID('Date');var dateHeaderTime=dateHeaderValue!==null?new Date(dateHeaderValue).getTime():Number.NaN;if(!isNaN(dateHeaderTime)){var offsetToDeviceTimeMs=dateHeaderTime-Date.now();_completeTimeSyncSequence(false,offsetToDeviceTimeMs);}else{_completeTimeSyncSequence(true);}}/**\\n     * Triggers the event to signal that the time synchronization was completed\\n     * @param {boolean} failed\\n     * @param {number} offset\\n     * @private\\n     */function _completeTimeSyncSequence(failed,offset){// Adjust the time of the next sync based on the drift between current offset and last offset\\nif(!isNaN(lastOffset)&&!isNaN(offset)&&!failed){_adjustTimeBetweenSyncAttempts(offset);}// Update the internal data\\nif(!failed&&!isNaN(offset)){timeOfLastSync=Date.now();isSynchronizing=false;// if this is the first sync we are doing perform background syncs as well to confirm current offset\\nvar shouldAttemptBackgroundSync=isNaN(lastOffset);lastOffset=offset;if(shouldAttemptBackgroundSync){_onAttemptBackgroundSync();}logger.debug('Completed UTC sync. Setting client - server offset to '+offset);}if(failed){lastTimingSource=null;}// Notify other classes\\neventBus.trigger(_Events2.default.UPDATE_TIME_SYNC_OFFSET,{offset:offset,error:failed?new _DashJSError2.default(_Errors2.default.TIME_SYNC_FAILED_ERROR_CODE,_Errors2.default.TIME_SYNC_FAILED_ERROR_MESSAGE):null});eventBus.trigger(_Events2.default.TIME_SYNCHRONIZATION_COMPLETED);}function _adjustTimeBetweenSyncAttempts(offset){try{var isOffsetDriftWithinThreshold=_isOffsetDriftWithinThreshold(offset);var timeBetweenSyncAttempts=!isNaN(internalTimeBetweenSyncAttempts)?internalTimeBetweenSyncAttempts:DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS;var timeBetweenSyncAttemptsAdjustmentFactor=!isNaN(settings.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?settings.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor:DEFAULT_TIME_BETWEEN_SYNC_ATTEMPTS_ADJUSTMENT_FACTOR;var maximumTimeBetweenSyncAttempts=!isNaN(settings.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?settings.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts:DEFAULT_MAXIMUM_TIME_BETWEEN_SYNC;var minimumTimeBetweenSyncAttempts=!isNaN(settings.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?settings.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts:DEFAULT_MINIMUM_TIME_BETWEEN_SYNC;var adjustedTimeBetweenSyncAttempts=void 0;if(isOffsetDriftWithinThreshold){// The drift between the current offset and the last offset is within the allowed threshold. Increase sync time\\nadjustedTimeBetweenSyncAttempts=Math.min(timeBetweenSyncAttempts*timeBetweenSyncAttemptsAdjustmentFactor,maximumTimeBetweenSyncAttempts);logger.debug('Increasing timeBetweenSyncAttempts to '+adjustedTimeBetweenSyncAttempts);}else{// Drift between the current offset and the last offset is not within the allowed threshold. Decrease sync time\\nadjustedTimeBetweenSyncAttempts=Math.max(timeBetweenSyncAttempts/timeBetweenSyncAttemptsAdjustmentFactor,minimumTimeBetweenSyncAttempts);logger.debug('Decreasing timeBetweenSyncAttempts to '+adjustedTimeBetweenSyncAttempts);}internalTimeBetweenSyncAttempts=adjustedTimeBetweenSyncAttempts;}catch(e){}}/**\\n     * Callback after all background syncs have been completed.\\n     * @private\\n     */function _completeBackgroundTimeSyncSequence(){if(!backgroundSyncTimeOffsets||backgroundSyncTimeOffsets.length===0){return;}var averageOffset=backgroundSyncTimeOffsets.reduce(function(acc,curr){return acc+curr;},0)/backgroundSyncTimeOffsets.length;if(!_isOffsetDriftWithinThreshold(averageOffset)){logger.debug('Completed background UTC sync. Setting client - server offset to '+averageOffset);lastOffset=averageOffset;eventBus.trigger(_Events2.default.UPDATE_TIME_SYNC_OFFSET,{offset:lastOffset});}else{logger.debug('Completed background UTC sync. Offset is within allowed threshold and is not adjusted.');}isBackgroundSynchronizing=false;timeOfLastBackgroundSync=Date.now();}function _isOffsetDriftWithinThreshold(offset){try{if(isNaN(lastOffset)){return true;}var maxAllowedDrift=settings.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(settings.get().streaming.utcSynchronization.maximumAllowedDrift)?settings.get().streaming.utcSynchronization.maximumAllowedDrift:DEFAULT_MAXIMUM_ALLOWED_DRIFT;var lowerBound=lastOffset-maxAllowedDrift;var upperBound=lastOffset+maxAllowedDrift;return offset>=lowerBound&&offset<=upperBound;}catch(e){return true;}}function reset(){_resetInitialSettings();eventBus.off(_Events2.default.ATTEMPT_BACKGROUND_SYNC,_onAttemptBackgroundSync,instance);}instance={initialize:initialize,attemptSync:attemptSync,setConfig:setConfig,reset:reset};setup();return instance;}TimeSyncController.__dashjs_factory_name='TimeSyncController';var factory=_FactoryMaker2.default.getSingletonFactory(TimeSyncController);factory.HTTP_TIMEOUT_MS=HTTP_TIMEOUT_MS;_FactoryMaker2.default.updateSingletonFactory(TimeSyncController.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=TimeSyncController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/TimeSyncController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _XlinkLoader=__webpack_require__(/*! ../XlinkLoader */ \\\"../node_modules/dashjs/build/es5/src/streaming/XlinkLoader.js\\\");var _XlinkLoader2=_interopRequireDefault(_XlinkLoader);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _xml2json=__webpack_require__(/*! ../../../externals/xml2json */ \\\"../node_modules/dashjs/build/es5/externals/xml2json.js\\\");var _xml2json2=_interopRequireDefault(_xml2json);var _URLUtils=__webpack_require__(/*! ../utils/URLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\\\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _DashConstants=__webpack_require__(/*! ../../dash/constants/DashConstants */ \\\"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\\\");var _DashConstants2=_interopRequireDefault(_DashConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var RESOLVE_TYPE_ONLOAD='onLoad';/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var RESOLVE_TYPE_ONACTUATE='onActuate';var RESOLVE_TO_ZERO='urn:mpeg:dash:resolve-to-zero:2013';function XlinkController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,matchers=void 0,iron=void 0,manifest=void 0,converter=void 0,xlinkLoader=void 0;function setup(){eventBus.on(_Events2.default.XLINK_ELEMENT_LOADED,onXlinkElementLoaded,instance);xlinkLoader=(0,_XlinkLoader2.default)(context).create({errHandler:config.errHandler,dashMetrics:config.dashMetrics,mediaPlayerModel:config.mediaPlayerModel,requestModifier:config.requestModifier,settings:config.settings});}function setMatchers(value){if(value){matchers=value;}}function setIron(value){if(value){iron=value;}}/**\\n     * <p>Triggers the resolution of the xlink.onLoad attributes in the manifest file </p>\\n     * @param {Object} mpd - the manifest\\n     */function resolveManifestOnLoad(mpd){var elements=void 0;// First resolve all periods, so unnecessary requests inside onLoad Periods with Default content are avoided\\nconverter=new _xml2json2.default({escapeMode:false,attributePrefix:'',arrayAccessForm:'property',emptyNodeForm:'object',stripWhitespaces:false,enableToStringFunc:false,ignoreRoot:true,matchers:matchers});manifest=mpd;if(manifest.Period_asArray){elements=getElementsToResolve(manifest.Period_asArray,manifest,_DashConstants2.default.PERIOD,RESOLVE_TYPE_ONLOAD);resolve(elements,_DashConstants2.default.PERIOD,RESOLVE_TYPE_ONLOAD);}else{eventBus.trigger(_Events2.default.XLINK_READY,{manifest:manifest});}}function reset(){eventBus.off(_Events2.default.XLINK_ELEMENT_LOADED,onXlinkElementLoaded,instance);if(xlinkLoader){xlinkLoader.reset();xlinkLoader=null;}}function resolve(elements,type,resolveType){var resolveObject={};var element=void 0,url=void 0;resolveObject.elements=elements;resolveObject.type=type;resolveObject.resolveType=resolveType;// If nothing to resolve, directly call allElementsLoaded\\nif(resolveObject.elements.length===0){onXlinkAllElementsLoaded(resolveObject);}for(var i=0;i<resolveObject.elements.length;i++){element=resolveObject.elements[i];if(urlUtils.isHTTPURL(element.url)){url=element.url;}else{url=element.originalContent.BaseURL+element.url;}xlinkLoader.load(url,element,resolveObject);}}function onXlinkElementLoaded(event){var element=void 0,resolveObject=void 0;var openingTag='<response>';var closingTag='</response>';var mergedContent='';element=event.element;resolveObject=event.resolveObject;// if the element resolved into content parse the content\\nif(element.resolvedContent){var index=0;// we add a parent elements so the converter is able to parse multiple elements of the same type which are not wrapped inside a container\\nif(element.resolvedContent.indexOf('<?xml')===0){index=element.resolvedContent.indexOf('?>')+2;//find the closing position of the xml declaration, if it exists.\\n}mergedContent=element.resolvedContent.substr(0,index)+openingTag+element.resolvedContent.substr(index)+closingTag;element.resolvedContent=converter.xml_str2json(mergedContent);}if(isResolvingFinished(resolveObject)){onXlinkAllElementsLoaded(resolveObject);}}// We got to wait till all elements of the current queue are resolved before merging back\\nfunction onXlinkAllElementsLoaded(resolveObject){var elements=[];var i=void 0,obj=void 0;mergeElementsBack(resolveObject);if(resolveObject.resolveType===RESOLVE_TYPE_ONACTUATE){eventBus.trigger(_Events2.default.XLINK_READY,{manifest:manifest});}if(resolveObject.resolveType===RESOLVE_TYPE_ONLOAD){switch(resolveObject.type){// Start resolving the other elements. We can do Adaptation Set and EventStream in parallel\\ncase _DashConstants2.default.PERIOD:for(i=0;i<manifest[_DashConstants2.default.PERIOD+'_asArray'].length;i++){obj=manifest[_DashConstants2.default.PERIOD+'_asArray'][i];if(obj.hasOwnProperty(_DashConstants2.default.ADAPTATION_SET+'_asArray')){elements=elements.concat(getElementsToResolve(obj[_DashConstants2.default.ADAPTATION_SET+'_asArray'],obj,_DashConstants2.default.ADAPTATION_SET,RESOLVE_TYPE_ONLOAD));}if(obj.hasOwnProperty(_DashConstants2.default.EVENT_STREAM+'_asArray')){elements=elements.concat(getElementsToResolve(obj[_DashConstants2.default.EVENT_STREAM+'_asArray'],obj,_DashConstants2.default.EVENT_STREAM,RESOLVE_TYPE_ONLOAD));}}resolve(elements,_DashConstants2.default.ADAPTATION_SET,RESOLVE_TYPE_ONLOAD);break;case _DashConstants2.default.ADAPTATION_SET:// TODO: Resolve SegmentList here\\neventBus.trigger(_Events2.default.XLINK_READY,{manifest:manifest});break;}}}// Returns the elements with the specific resolve Type\\nfunction getElementsToResolve(elements,parentElement,type,resolveType){var toResolve=[];var element=void 0,i=void 0,xlinkObject=void 0;// first remove all the resolve-to-zero elements\\nfor(i=elements.length-1;i>=0;i--){element=elements[i];if(element.hasOwnProperty('xlink:href')&&element['xlink:href']===RESOLVE_TO_ZERO){elements.splice(i,1);}}// now get the elements with the right resolve type\\nfor(i=0;i<elements.length;i++){element=elements[i];if(element.hasOwnProperty('xlink:href')&&element.hasOwnProperty('xlink:actuate')&&element['xlink:actuate']===resolveType){xlinkObject=createXlinkObject(element['xlink:href'],parentElement,type,i,resolveType,element);toResolve.push(xlinkObject);}}return toResolve;}function mergeElementsBack(resolveObject){var resolvedElements=[];var element=void 0,type=void 0,obj=void 0,i=void 0,j=void 0,k=void 0;// Start merging back from the end because of index shifting. Note that the elements with the same parent have to be ordered by index ascending\\nfor(i=resolveObject.elements.length-1;i>=0;i--){element=resolveObject.elements[i];type=element.type+'_asArray';// Element couldn't be resolved or is TODO Inappropriate target: Remove all Xlink attributes\\nif(!element.resolvedContent||isInappropriateTarget()){delete element.originalContent['xlink:actuate'];delete element.originalContent['xlink:href'];resolvedElements.push(element.originalContent);}// Element was successfully resolved\\nelse if(element.resolvedContent){for(j=0;j<element.resolvedContent[type].length;j++){//TODO Contains another Xlink attribute with xlink:actuate set to onload. Remove all xLink attributes\\nobj=element.resolvedContent[type][j];resolvedElements.push(obj);}}// Replace the old elements in the parent with the resolved ones\\nelement.parentElement[type].splice(element.index,1);for(k=0;k<resolvedElements.length;k++){element.parentElement[type].splice(element.index+k,0,resolvedElements[k]);}resolvedElements=[];}if(resolveObject.elements.length>0){iron.run(manifest);}}function createXlinkObject(url,parentElement,type,index,resolveType,originalContent){return{url:url,parentElement:parentElement,type:type,index:index,resolveType:resolveType,originalContent:originalContent,resolvedContent:null,resolved:false};}// Check if all pending requests are finished\\nfunction isResolvingFinished(elementsToResolve){var i=void 0,obj=void 0;for(i=0;i<elementsToResolve.elements.length;i++){obj=elementsToResolve.elements[i];if(obj.resolved===false){return false;}}return true;}// TODO : Do some syntax check here if the target is valid or not\\nfunction isInappropriateTarget(){return false;}instance={resolveManifestOnLoad:resolveManifestOnLoad,setMatchers:setMatchers,setIron:setIron,reset:reset};setup();return instance;}XlinkController.__dashjs_factory_name='XlinkController';exports.default=_FactoryMaker2.default.getClassFactory(XlinkController);\\n//# sourceMappingURL=XlinkController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/controllers/XlinkController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _DVBErrorsTranslator=__webpack_require__(/*! ./utils/DVBErrorsTranslator */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js\");var _DVBErrorsTranslator2=_interopRequireDefault(_DVBErrorsTranslator);var _MetricsReportingEvents=__webpack_require__(/*! ./MetricsReportingEvents */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);var _MetricsCollectionController=__webpack_require__(/*! ./controllers/MetricsCollectionController */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js\");var _MetricsCollectionController2=_interopRequireDefault(_MetricsCollectionController);var _MetricsHandlerFactory=__webpack_require__(/*! ./metrics/MetricsHandlerFactory */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js\");var _MetricsHandlerFactory2=_interopRequireDefault(_MetricsHandlerFactory);var _ReportingFactory=__webpack_require__(/*! ./reporting/ReportingFactory */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js\");var _ReportingFactory2=_interopRequireDefault(_ReportingFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsReporting(){var context=this.context;var instance=void 0,dvbErrorsTranslator=void 0;/**\\n     * Create a MetricsCollectionController, and a DVBErrorsTranslator\\n     * @param {Object} config - dependancies from owner\\n     * @return {MetricsCollectionController} Metrics Collection Controller\\n     */function createMetricsReporting(config){dvbErrorsTranslator=(0,_DVBErrorsTranslator2.default)(context).getInstance({eventBus:config.eventBus,dashMetrics:config.dashMetrics,metricsConstants:config.metricsConstants,events:config.events});return(0,_MetricsCollectionController2.default)(context).create(config);}/**\\n     * Get the ReportingFactory to allow new reporters to be registered\\n     * @return {ReportingFactory} Reporting Factory\\n     */function getReportingFactory(){return(0,_ReportingFactory2.default)(context).getInstance();}/**\\n     * Get the MetricsHandlerFactory to allow new handlers to be registered\\n     * @return {MetricsHandlerFactory} Metrics Handler Factory\\n     */function getMetricsHandlerFactory(){return(0,_MetricsHandlerFactory2.default)(context).getInstance();}instance={createMetricsReporting:createMetricsReporting,getReportingFactory:getReportingFactory,getMetricsHandlerFactory:getMetricsHandlerFactory};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsReporting.__dashjs_factory_name=\\'MetricsReporting\\';var factory=dashjs.FactoryMaker.getClassFactory(MetricsReporting);/* jshint ignore:line */factory.events=_MetricsReportingEvents2.default;dashjs.FactoryMaker.updateClassFactory(MetricsReporting.__dashjs_factory_name,factory);/* jshint ignore:line */exports.default=factory;\\n//# sourceMappingURL=MetricsReporting.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReporting.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _EventsBase2=__webpack_require__(/*! ../../core/events/EventsBase */ \"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var MetricsReportingEvents=function(_EventsBase){_inherits(MetricsReportingEvents,_EventsBase);function MetricsReportingEvents(){_classCallCheck(this,MetricsReportingEvents);var _this=_possibleConstructorReturn(this,(MetricsReportingEvents.__proto__||Object.getPrototypeOf(MetricsReportingEvents)).call(this));_this.METRICS_INITIALISATION_COMPLETE=\\'internal_metricsReportingInitialized\\';_this.BECAME_REPORTING_PLAYER=\\'internal_becameReportingPlayer\\';/**\\n         * Triggered when CMCD data was generated for a HTTP request\\n         * @event MetricsReportingEvents#CMCD_DATA_GENERATED\\n         */_this.CMCD_DATA_GENERATED=\\'cmcdDataGenerated\\';return _this;}return MetricsReportingEvents;}(_EventsBase3.default);var metricsReportingEvents=new MetricsReportingEvents();exports.default=metricsReportingEvents;\\n//# sourceMappingURL=MetricsReportingEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _MetricsController=__webpack_require__(/*! ./MetricsController */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js\");var _MetricsController2=_interopRequireDefault(_MetricsController);var _ManifestParsing=__webpack_require__(/*! ../utils/ManifestParsing */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js\");var _ManifestParsing2=_interopRequireDefault(_ManifestParsing);var _MetricsReportingEvents=__webpack_require__(/*! ../MetricsReportingEvents */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsCollectionController(config){config=config||{};var instance=void 0;var metricsControllers={};var context=this.context;var eventBus=config.eventBus;var events=config.events;function update(e){if(e.error){return;}// start by assuming all existing controllers need removing\\nvar controllersToRemove=Object.keys(metricsControllers);var metrics=(0,_ManifestParsing2.default)(context).getInstance({adapter:config.adapter,constants:config.constants}).getMetrics(e.manifest);metrics.forEach(function(m){var key=JSON.stringify(m);if(!metricsControllers.hasOwnProperty(key)){try{var controller=(0,_MetricsController2.default)(context).create(config);controller.initialize(m);metricsControllers[key]=controller;}catch(e){// fail quietly\\n}}else{// we still need this controller - delete from removal list\\ncontrollersToRemove.splice(key,1);}});// now remove the unwanted controllers\\ncontrollersToRemove.forEach(function(c){metricsControllers[c].reset();delete metricsControllers[c];});eventBus.trigger(_MetricsReportingEvents2.default.METRICS_INITIALISATION_COMPLETE);}function resetMetricsControllers(){Object.keys(metricsControllers).forEach(function(key){metricsControllers[key].reset();});metricsControllers={};}function setup(){eventBus.on(events.MANIFEST_UPDATED,update,instance);eventBus.on(events.STREAM_TEARDOWN_COMPLETE,resetMetricsControllers,instance);}function reset(){eventBus.off(events.MANIFEST_UPDATED,update,instance);eventBus.off(events.STREAM_TEARDOWN_COMPLETE,resetMetricsControllers,instance);}instance={reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsCollectionController.__dashjs_factory_name=\\'MetricsCollectionController\\';exports.default=dashjs.FactoryMaker.getClassFactory(MetricsCollectionController);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsCollectionController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsCollectionController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _RangeController=__webpack_require__(/*! ./RangeController */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js\");var _RangeController2=_interopRequireDefault(_RangeController);var _ReportingController=__webpack_require__(/*! ./ReportingController */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js\");var _ReportingController2=_interopRequireDefault(_ReportingController);var _MetricsHandlersController=__webpack_require__(/*! ./MetricsHandlersController */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js\");var _MetricsHandlersController2=_interopRequireDefault(_MetricsHandlersController);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsController(config){config=config||{};var metricsHandlersController=void 0,reportingController=void 0,rangeController=void 0,instance=void 0;var context=this.context;function initialize(metricsEntry){try{rangeController=(0,_RangeController2.default)(context).create({mediaElement:config.mediaElement});rangeController.initialize(metricsEntry.Range);reportingController=(0,_ReportingController2.default)(context).create({debug:config.debug,metricsConstants:config.metricsConstants});reportingController.initialize(metricsEntry.Reporting,rangeController);metricsHandlersController=(0,_MetricsHandlersController2.default)(context).create({debug:config.debug,eventBus:config.eventBus,metricsConstants:config.metricsConstants,events:config.events});metricsHandlersController.initialize(metricsEntry.metrics,reportingController);}catch(e){reset();throw e;}}function reset(){if(metricsHandlersController){metricsHandlersController.reset();}if(reportingController){reportingController.reset();}if(rangeController){rangeController.reset();}}instance={initialize:initialize,reset:reset};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsController.__dashjs_factory_name=\\'MetricsController\\';exports.default=dashjs.FactoryMaker.getClassFactory(MetricsController);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsHandlerFactory=__webpack_require__(/*! ../metrics/MetricsHandlerFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js\\\");var _MetricsHandlerFactory2=_interopRequireDefault(_MetricsHandlerFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsHandlersController(config){config=config||{};var handlers=[];var instance=void 0;var context=this.context;var eventBus=config.eventBus;var Events=config.events;var metricsHandlerFactory=(0,_MetricsHandlerFactory2.default)(context).getInstance({debug:config.debug,eventBus:config.eventBus,metricsConstants:config.metricsConstants});function handle(e){handlers.forEach(function(handler){handler.handleNewMetric(e.metric,e.value,e.mediaType);});}function initialize(metrics,reportingController){metrics.split(',').forEach(function(m,midx,ms){var handler=void 0;// there is a bug in ISO23009-1 where the metrics attribute\\n// is a comma-separated list but HttpList key can contain a\\n// comma enclosed by ().\\nif(m.indexOf('(')!==-1&&m.indexOf(')')===-1){var nextm=ms[midx+1];if(nextm&&nextm.indexOf('(')===-1&&nextm.indexOf(')')!==-1){m+=','+nextm;// delete the next metric so forEach does not visit.\\ndelete ms[midx+1];}}handler=metricsHandlerFactory.create(m,reportingController);if(handler){handlers.push(handler);}});eventBus.on(Events.METRIC_ADDED,handle,instance);eventBus.on(Events.METRIC_UPDATED,handle,instance);}function reset(){eventBus.off(Events.METRIC_ADDED,handle,instance);eventBus.off(Events.METRIC_UPDATED,handle,instance);handlers.forEach(function(handler){return handler.reset();});handlers=[];}instance={initialize:initialize,reset:reset};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsHandlersController.__dashjs_factory_name='MetricsHandlersController';exports.default=dashjs.FactoryMaker.getClassFactory(MetricsHandlersController);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsHandlersController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/MetricsHandlersController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _CustomTimeRanges=__webpack_require__(/*! ../../utils/CustomTimeRanges */ \"../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js\");var _CustomTimeRanges2=_interopRequireDefault(_CustomTimeRanges);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RangeController(config){config=config||{};var useWallClockTime=false;var context=this.context;var instance=void 0,ranges=void 0;var mediaElement=config.mediaElement;function initialize(rs){if(rs&&rs.length){rs.forEach(function(r){var start=r.starttime;var end=start+r.duration;ranges.add(start,end);});useWallClockTime=!!rs[0]._useWallClockTime;}}function reset(){ranges.clear();}function setup(){ranges=(0,_CustomTimeRanges2.default)(context).create();}function isEnabled(){var numRanges=ranges.length;var time=void 0;if(!numRanges){return true;}// When not present, DASH Metrics reporting is requested\\n// for the whole duration of the content.\\ntime=useWallClockTime?new Date().getTime()/1000:mediaElement.currentTime;for(var i=0;i<numRanges;i+=1){var start=ranges.start(i);var end=ranges.end(i);if(start<=time&&time<end){return true;}}return false;}instance={initialize:initialize,reset:reset,isEnabled:isEnabled};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RangeController.__dashjs_factory_name=\\'RangeController\\';exports.default=dashjs.FactoryMaker.getClassFactory(RangeController);/* jshint ignore:line */\\n//# sourceMappingURL=RangeController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/RangeController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ReportingFactory=__webpack_require__(/*! ../reporting/ReportingFactory */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js\\\");var _ReportingFactory2=_interopRequireDefault(_ReportingFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReportingController(config){var reporters=[];var instance=void 0;var reportingFactory=(0,_ReportingFactory2.default)(this.context).getInstance(config);function initialize(reporting,rangeController){// \\\"if multiple Reporting elements are present, it is expected that\\n// the client processes one of the recognized reporting schemes.\\\"\\n// to ignore this, and support multiple Reporting per Metric,\\n// simply change the 'some' below to 'forEach'\\nreporting.some(function(r){var reporter=reportingFactory.create(r,rangeController);if(reporter){reporters.push(reporter);return true;}});}function reset(){reporters.forEach(function(r){return r.reset();});reporters=[];}function report(type,vos){reporters.forEach(function(r){return r.report(type,vos);});}instance={initialize:initialize,reset:reset,report:report};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ReportingController.__dashjs_factory_name='ReportingController';exports.default=dashjs.FactoryMaker.getClassFactory(ReportingController);/* jshint ignore:line */\\n//# sourceMappingURL=ReportingController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/controllers/ReportingController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _BufferLevelHandler=__webpack_require__(/*! ./handlers/BufferLevelHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js\\\");var _BufferLevelHandler2=_interopRequireDefault(_BufferLevelHandler);var _DVBErrorsHandler=__webpack_require__(/*! ./handlers/DVBErrorsHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js\\\");var _DVBErrorsHandler2=_interopRequireDefault(_DVBErrorsHandler);var _HttpListHandler=__webpack_require__(/*! ./handlers/HttpListHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js\\\");var _HttpListHandler2=_interopRequireDefault(_HttpListHandler);var _GenericMetricHandler=__webpack_require__(/*! ./handlers/GenericMetricHandler */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js\\\");var _GenericMetricHandler2=_interopRequireDefault(_GenericMetricHandler);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function MetricsHandlerFactory(config){config=config||{};var instance=void 0;var logger=config.debug?config.debug.getLogger(instance):{};// group 1: key, [group 3: n [, group 5: type]]\\nvar keyRegex=/([a-zA-Z]*)(\\\\(([0-9]*)(\\\\,\\\\s*([a-zA-Z]*))?\\\\))?/;var context=this.context;var knownFactoryProducts={BufferLevel:_BufferLevelHandler2.default,DVBErrors:_DVBErrorsHandler2.default,HttpList:_HttpListHandler2.default,PlayList:_GenericMetricHandler2.default,RepSwitchList:_GenericMetricHandler2.default,TcpList:_GenericMetricHandler2.default};function create(listType,reportingController){var matches=listType.match(keyRegex);var handler;if(!matches){return;}try{handler=knownFactoryProducts[matches[1]](context).create({eventBus:config.eventBus,metricsConstants:config.metricsConstants});handler.initialize(matches[1],reportingController,matches[3],matches[5]);}catch(e){handler=null;logger.error('MetricsHandlerFactory: Could not create handler for type '+matches[1]+' with args '+matches[3]+', '+matches[5]+' ('+e.message+')');}return handler;}function register(key,handler){knownFactoryProducts[key]=handler;}function unregister(key){delete knownFactoryProducts[key];}instance={create:create,register:register,unregister:unregister};return instance;}MetricsHandlerFactory.__dashjs_factory_name='MetricsHandlerFactory';exports.default=dashjs.FactoryMaker.getSingletonFactory(MetricsHandlerFactory);/* jshint ignore:line */\\n//# sourceMappingURL=MetricsHandlerFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/MetricsHandlerFactory.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _HandlerHelpers=__webpack_require__(/*! ../../utils/HandlerHelpers */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js\");var _HandlerHelpers2=_interopRequireDefault(_HandlerHelpers);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BufferLevelHandler(config){config=config||{};var instance=void 0,reportingController=void 0,n=void 0,name=void 0,interval=void 0,lastReportedTime=void 0;var context=this.context;var handlerHelpers=(0,_HandlerHelpers2.default)(context).getInstance();var storedVOs=[];var metricsConstants=config.metricsConstants;function getLowestBufferLevelVO(){try{return Object.keys(storedVOs).map(function(key){return storedVOs[key];}).reduce(function(a,b){return a.level<b.level?a:b;});}catch(e){return;}}function intervalCallback(){var vo=getLowestBufferLevelVO();if(vo){if(lastReportedTime!==vo.t){lastReportedTime=vo.t;reportingController.report(name,vo);}}}function initialize(basename,rc,n_ms){if(rc){// this will throw if n is invalid, to be\\n// caught by the initialize caller.\\nn=handlerHelpers.validateN(n_ms);reportingController=rc;name=handlerHelpers.reconstructFullMetricName(basename,n_ms);interval=setInterval(intervalCallback,n);}}function reset(){clearInterval(interval);interval=null;n=0;reportingController=null;lastReportedTime=null;}function handleNewMetric(metric,vo,type){if(metric===metricsConstants.BUFFER_LEVEL){storedVOs[type]=vo;}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BufferLevelHandler.__dashjs_factory_name=\\'BufferLevelHandler\\';exports.default=dashjs.FactoryMaker.getClassFactory(BufferLevelHandler);/* jshint ignore:line */\\n//# sourceMappingURL=BufferLevelHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/BufferLevelHandler.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _MetricsReportingEvents=__webpack_require__(/*! ../../MetricsReportingEvents */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DVBErrorsHandler(config){config=config||{};var instance=void 0,reportingController=void 0;var eventBus=config.eventBus;var metricsConstants=config.metricsConstants;function onInitialisationComplete(){// we only want to report this once per call to initialize\\neventBus.off(_MetricsReportingEvents2.default.METRICS_INITIALISATION_COMPLETE,onInitialisationComplete,this);// Note: A Player becoming a reporting Player is itself\\n// something which is recorded by the DVBErrors metric.\\neventBus.trigger(_MetricsReportingEvents2.default.BECAME_REPORTING_PLAYER);}function initialize(unused,rc){if(rc){reportingController=rc;eventBus.on(_MetricsReportingEvents2.default.METRICS_INITIALISATION_COMPLETE,onInitialisationComplete,this);}}function reset(){reportingController=null;}function handleNewMetric(metric,vo){// simply pass metric straight through\\nif(metric===metricsConstants.DVB_ERRORS){if(reportingController){reportingController.report(metric,vo);}}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */exports.default=dashjs.FactoryMaker.getClassFactory(DVBErrorsHandler);/* jshint ignore:line */\\n//# sourceMappingURL=DVBErrorsHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/DVBErrorsHandler.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n  * @ignore\\n  */function GenericMetricHandler(){var instance=void 0,metricName=void 0,reportingController=void 0;function initialize(name,rc){metricName=name;reportingController=rc;}function reset(){reportingController=null;metricName=undefined;}function handleNewMetric(metric,vo){// simply pass metric straight through\\nif(metric===metricName){if(reportingController){reportingController.report(metricName,vo);}}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}GenericMetricHandler.__dashjs_factory_name='GenericMetricHandler';exports.default=dashjs.FactoryMaker.getClassFactory(GenericMetricHandler);/* jshint ignore:line */\\n//# sourceMappingURL=GenericMetricHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/GenericMetricHandler.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _HandlerHelpers=__webpack_require__(/*! ../../utils/HandlerHelpers */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js\");var _HandlerHelpers2=_interopRequireDefault(_HandlerHelpers);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function HttpListHandler(config){config=config||{};var instance=void 0,reportingController=void 0,n=void 0,type=void 0,name=void 0,interval=void 0;var storedVos=[];var handlerHelpers=(0,_HandlerHelpers2.default)(this.context).getInstance();var metricsConstants=config.metricsConstants;function intervalCallback(){var vos=storedVos;if(vos.length){if(reportingController){reportingController.report(name,vos);}}storedVos=[];}function initialize(basename,rc,n_ms,requestType){if(rc){// this will throw if n is invalid, to be\\n// caught by the initialize caller.\\nn=handlerHelpers.validateN(n_ms);reportingController=rc;if(requestType&&requestType.length){type=requestType;}name=handlerHelpers.reconstructFullMetricName(basename,n_ms,requestType);interval=setInterval(intervalCallback,n);}}function reset(){clearInterval(interval);interval=null;n=null;type=null;storedVos=[];reportingController=null;}function handleNewMetric(metric,vo){if(metric===metricsConstants.HTTP_REQUEST){if(!type||type===vo.type){storedVos.push(vo);}}}instance={initialize:initialize,reset:reset,handleNewMetric:handleNewMetric};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */HttpListHandler.__dashjs_factory_name=\\'HttpListHandler\\';exports.default=dashjs.FactoryMaker.getClassFactory(HttpListHandler);/* jshint ignore:line */\\n//# sourceMappingURL=HttpListHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/metrics/handlers/HttpListHandler.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _DVBReporting=__webpack_require__(/*! ./reporters/DVBReporting */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js\\\");var _DVBReporting2=_interopRequireDefault(_DVBReporting);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReportingFactory(config){config=config||{};var knownReportingSchemeIdUris={'urn:dvb:dash:reporting:2014':_DVBReporting2.default};var context=this.context;var instance=void 0;var logger=config.debug?config.debug.getLogger(instance):{};var metricsConstants=config.metricsConstants;function create(entry,rangeController){var reporting=void 0;try{reporting=knownReportingSchemeIdUris[entry.schemeIdUri](context).create({metricsConstants:metricsConstants});reporting.initialize(entry,rangeController);}catch(e){reporting=null;logger.error('ReportingFactory: could not create Reporting with schemeIdUri '+entry.schemeIdUri+' ('+e.message+')');}return reporting;}function register(schemeIdUri,moduleName){knownReportingSchemeIdUris[schemeIdUri]=moduleName;}function unregister(schemeIdUri){delete knownReportingSchemeIdUris[schemeIdUri];}instance={create:create,register:register,unregister:unregister};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ReportingFactory.__dashjs_factory_name='ReportingFactory';exports.default=dashjs.FactoryMaker.getSingletonFactory(ReportingFactory);/* jshint ignore:line */\\n//# sourceMappingURL=ReportingFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/ReportingFactory.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricSerialiser=__webpack_require__(/*! ../../utils/MetricSerialiser */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js\\\");var _MetricSerialiser2=_interopRequireDefault(_MetricSerialiser);var _RNG=__webpack_require__(/*! ../../utils/RNG */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js\\\");var _RNG2=_interopRequireDefault(_RNG);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function DVBReporting(config){config=config||{};var instance=void 0;var context=this.context;var metricSerialiser=void 0,randomNumberGenerator=void 0,reportingPlayerStatusDecided=void 0,isReportingPlayer=void 0,reportingUrl=void 0,rangeController=void 0;var USE_DRAFT_DVB_SPEC=true;var allowPendingRequestsToCompleteOnReset=true;var pendingRequests=[];var metricsConstants=config.metricsConstants;function setup(){metricSerialiser=(0,_MetricSerialiser2.default)(context).getInstance();randomNumberGenerator=(0,_RNG2.default)(context).getInstance();resetInitialSettings();}function doGetRequest(url,successCB,failureCB){var req=new XMLHttpRequest();var oncomplete=function oncomplete(){var reqIndex=pendingRequests.indexOf(req);if(reqIndex===-1){return;}else{pendingRequests.splice(reqIndex,1);}if(req.status>=200&&req.status<300){if(successCB){successCB();}}else{if(failureCB){failureCB();}}};pendingRequests.push(req);try{req.open('GET',url);req.onloadend=oncomplete;req.onerror=oncomplete;req.send();}catch(e){req.onerror();}}function report(type,vos){if(!Array.isArray(vos)){vos=[vos];}// If the Player is not a reporting Player, then the Player shall\\n// not report any errors.\\n// ... In addition to any time restrictions specified by a Range\\n// element within the Metrics element.\\nif(isReportingPlayer&&rangeController.isEnabled()){// This reporting mechanism operates by creating one HTTP GET\\n// request for every entry in the top level list of the metric.\\nvos.forEach(function(vo){var url=metricSerialiser.serialise(vo);// this has been proposed for errata\\nif(USE_DRAFT_DVB_SPEC&&type!==metricsConstants.DVB_ERRORS){url='metricname='+type+'&'+url;}// Take the value of the @reportingUrl attribute, append a\\n// question mark ('?') character and then append the string\\n// created in the previous step.\\nurl=reportingUrl+'?'+url;// Make an HTTP GET request to the URL contained within the\\n// string created in the previous step.\\ndoGetRequest(url,null,function(){// If the Player is unable to make the report, for\\n// example because the @reportingUrl is invalid, the\\n// host cannot be reached, or an HTTP status code other\\n// than one in the 200 series is received, the Player\\n// shall cease being a reporting Player for the\\n// duration of the MPD.\\nisReportingPlayer=false;});});}}function initialize(entry,rc){var probability=void 0;rangeController=rc;reportingUrl=entry.dvb_reportingUrl;// If a required attribute is missing, the Reporting descriptor may\\n// be ignored by the Player\\nif(!reportingUrl){throw new Error('required parameter missing (dvb:reportingUrl)');}// A Player's status, as a reporting Player or not, shall remain\\n// static for the duration of the MPD, regardless of MPD updates.\\n// (i.e. only calling reset (or failure) changes this state)\\nif(!reportingPlayerStatusDecided){probability=entry.dvb_probability;// TS 103 285 Clause 10.12.3.4\\n// If the @probability attribute is set to 1000, it shall be a reporting Player.\\n// If the @probability attribute is absent it will take the default value of 1000.\\n// For any other value of the @probability attribute, it shall decide at random whether to be a\\n// reporting Player, such that the probability of being one is @probability/1000.\\nif(probability&&(probability===1000||probability/1000>=randomNumberGenerator.random())){isReportingPlayer=true;}reportingPlayerStatusDecided=true;}}function resetInitialSettings(){reportingPlayerStatusDecided=false;isReportingPlayer=false;reportingUrl=null;rangeController=null;}function reset(){if(!allowPendingRequestsToCompleteOnReset){pendingRequests.forEach(function(req){return req.abort();});pendingRequests=[];}resetInitialSettings();}instance={report:report,initialize:initialize,reset:reset};setup();return instance;}DVBReporting.__dashjs_factory_name='DVBReporting';exports.default=dashjs.FactoryMaker.getClassFactory(DVBReporting);/* jshint ignore:line */\\n//# sourceMappingURL=DVBReporting.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/reporting/reporters/DVBReporting.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _DVBErrors=__webpack_require__(/*! ../vo/DVBErrors */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js\");var _DVBErrors2=_interopRequireDefault(_DVBErrors);var _MetricsReportingEvents=__webpack_require__(/*! ../MetricsReportingEvents */ \"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function DVBErrorsTranslator(config){config=config||{};var instance=void 0,mpd=void 0;var eventBus=config.eventBus;var dashMetrics=config.dashMetrics;var metricsConstants=config.metricsConstants;//MediaPlayerEvents have been added to Events in MediaPlayer class\\nvar Events=config.events;function report(vo){var o=new _DVBErrors2.default();if(!mpd){return;}for(var key in vo){if(vo.hasOwnProperty(key)){o[key]=vo[key];}}if(!o.mpdurl){o.mpdurl=mpd.originalUrl||mpd.url;}if(!o.terror){o.terror=new Date();}dashMetrics.addDVBErrors(o);}function onManifestUpdate(e){if(e.error){return;}mpd=e.manifest;}function onServiceLocationChanged(e){report({errorcode:_DVBErrors2.default.BASE_URL_CHANGED,servicelocation:e.entry});}function onBecameReporter(){report({errorcode:_DVBErrors2.default.BECAME_REPORTER});}function handleHttpMetric(vo){if(vo.responsecode===0||// connection failure - unknown\\nvo.responsecode>=400||// HTTP error status code\\nvo.responsecode<100||// unknown status codes\\nvo.responsecode>=600){// unknown status codes\\nreport({errorcode:vo.responsecode||_DVBErrors2.default.CONNECTION_ERROR,url:vo.url,terror:vo.tresponse,servicelocation:vo._serviceLocation});}}function onMetricEvent(e){switch(e.metric){case metricsConstants.HTTP_REQUEST:handleHttpMetric(e.value);break;default:break;}}function onPlaybackError(e){var reason=e.error?e.error.code:0;var errorcode=void 0;switch(reason){case MediaError.MEDIA_ERR_NETWORK:errorcode=_DVBErrors2.default.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:errorcode=_DVBErrors2.default.CORRUPT_MEDIA_OTHER;break;default:return;}report({errorcode:errorcode});}function initialise(){eventBus.on(Events.MANIFEST_UPDATED,onManifestUpdate,instance);eventBus.on(Events.SERVICE_LOCATION_BLACKLIST_CHANGED,onServiceLocationChanged,instance);eventBus.on(Events.METRIC_ADDED,onMetricEvent,instance);eventBus.on(Events.METRIC_UPDATED,onMetricEvent,instance);eventBus.on(Events.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.on(_MetricsReportingEvents2.default.BECAME_REPORTING_PLAYER,onBecameReporter,instance);}function reset(){eventBus.off(Events.MANIFEST_UPDATED,onManifestUpdate,instance);eventBus.off(Events.SERVICE_LOCATION_BLACKLIST_CHANGED,onServiceLocationChanged,instance);eventBus.off(Events.METRIC_ADDED,onMetricEvent,instance);eventBus.off(Events.METRIC_UPDATED,onMetricEvent,instance);eventBus.off(Events.PLAYBACK_ERROR,onPlaybackError,instance);eventBus.off(_MetricsReportingEvents2.default.BECAME_REPORTING_PLAYER,onBecameReporter,instance);}instance={initialise:initialise,reset:reset};initialise();return instance;}DVBErrorsTranslator.__dashjs_factory_name=\\'DVBErrorsTranslator\\';exports.default=dashjs.FactoryMaker.getSingletonFactory(DVBErrorsTranslator);/* jshint ignore:line */\\n//# sourceMappingURL=DVBErrorsTranslator.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/DVBErrorsTranslator.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n  * @ignore\\n  */function HandlerHelpers(){return{reconstructFullMetricName:function reconstructFullMetricName(key,n,type){var mn=key;if(n){mn+='('+n;if(type&&type.length){mn+=','+type;}mn+=')';}return mn;},validateN:function validateN(n_ms){if(!n_ms){throw new Error('missing n');}if(isNaN(n_ms)){throw new Error('n is NaN');}// n is a positive integer is defined to refer to the metric\\n// in which the buffer level is recorded every n ms.\\nif(n_ms<0){throw new Error('n must be positive');}return n_ms;}};}HandlerHelpers.__dashjs_factory_name='HandlerHelpers';exports.default=dashjs.FactoryMaker.getSingletonFactory(HandlerHelpers);/* jshint ignore:line */\\n//# sourceMappingURL=HandlerHelpers.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/HandlerHelpers.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Metrics=__webpack_require__(/*! ../vo/Metrics */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js\\\");var _Metrics2=_interopRequireDefault(_Metrics);var _Range=__webpack_require__(/*! ../vo/Range */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js\\\");var _Range2=_interopRequireDefault(_Range);var _Reporting=__webpack_require__(/*! ../vo/Reporting */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js\\\");var _Reporting2=_interopRequireDefault(_Reporting);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestParsing(config){config=config||{};var instance=void 0;var adapter=config.adapter;var constants=config.constants;function getMetricsRangeStartTime(manifest,dynamic,range){var voPeriods=void 0,reportingStartTime=void 0;var presentationStartTime=0;if(dynamic){// For services with MPD@type='dynamic', the start time is\\n// indicated in wall clock time by adding the value of this\\n// attribute to the value of the MPD@availabilityStartTime\\n// attribute.\\npresentationStartTime=adapter.getAvailabilityStartTime(manifest)/1000;}else{// For services with MPD@type='static', the start time is indicated\\n// in Media Presentation time and is relative to the PeriodStart\\n// time of the first Period in this MPD.\\nvoPeriods=adapter.getRegularPeriods(manifest);if(voPeriods.length){presentationStartTime=voPeriods[0].start;}}// When not present, DASH Metrics collection is\\n// requested from the beginning of content\\n// consumption.\\nreportingStartTime=presentationStartTime;if(range&&range.hasOwnProperty(constants.START_TIME)){reportingStartTime+=range.starttime;}return reportingStartTime;}function getMetrics(manifest){var metrics=[];if(manifest&&manifest.Metrics_asArray){manifest.Metrics_asArray.forEach(function(metric){var metricEntry=new _Metrics2.default();var isDynamic=adapter.getIsDynamic(manifest);if(metric.hasOwnProperty('metrics')){metricEntry.metrics=metric.metrics;}else{return;}if(metric.Range_asArray){metric.Range_asArray.forEach(function(range){var rangeEntry=new _Range2.default();rangeEntry.starttime=getMetricsRangeStartTime(manifest,isDynamic,range);if(range.hasOwnProperty('duration')){rangeEntry.duration=range.duration;}else{// if not present, the value is identical to the\\n// Media Presentation duration.\\nrangeEntry.duration=adapter.getDuration(manifest);}rangeEntry._useWallClockTime=isDynamic;metricEntry.Range.push(rangeEntry);});}if(metric.Reporting_asArray){metric.Reporting_asArray.forEach(function(reporting){var reportingEntry=new _Reporting2.default();if(reporting.hasOwnProperty(constants.SCHEME_ID_URI)){reportingEntry.schemeIdUri=reporting.schemeIdUri;}else{// Invalid Reporting. schemeIdUri must be set. Ignore.\\nreturn;}if(reporting.hasOwnProperty('value')){reportingEntry.value=reporting.value;}if(reporting.hasOwnProperty(constants.DVB_REPORTING_URL)){reportingEntry.dvb_reportingUrl=reporting[constants.DVB_REPORTING_URL];}if(reporting.hasOwnProperty(constants.DVB_PROBABILITY)){reportingEntry.dvb_probability=reporting[constants.DVB_PROBABILITY];}metricEntry.Reporting.push(reportingEntry);});}else{// Invalid Metrics. At least one reporting must be present. Ignore\\nreturn;}metrics.push(metricEntry);});}return metrics;}instance={getMetrics:getMetrics};return instance;}ManifestParsing.__dashjs_factory_name='ManifestParsing';exports.default=dashjs.FactoryMaker.getSingletonFactory(ManifestParsing);/* jshint ignore:line */\\n//# sourceMappingURL=ManifestParsing.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/ManifestParsing.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @ignore\\n */function MetricSerialiser(){// For each entry in the top level list within the metric (in the case\\n// of the DVBErrors metric each entry corresponds to an \\\"error event\\\"\\n// described in clause 10.8.4) the Player shall:\\nfunction serialise(metric){var pairs=[];var obj=[];var key=void 0,value=void 0;// Take each (key, value) pair from the metric entry and create a\\n// string consisting of the name of the key, followed by an equals\\n// ('=') character, followed by the string representation of the\\n// value. The string representation of the value is created based\\n// on the type of the value following the instructions in Table 22.\\nfor(key in metric){if(metric.hasOwnProperty(key)&&key.indexOf('_')!==0){value=metric[key];// we want to ensure that keys still end up in the report\\n// even if there is no value\\nif(value===undefined||value===null){value='';}// DVB A168 10.12.4 Table 22\\nif(Array.isArray(value)){// if trace or similar is null, do not include in output\\nif(!value.length){continue;}obj=[];value.forEach(function(v){var isBuiltIn=Object.prototype.toString.call(v).slice(8,-1)!=='Object';obj.push(isBuiltIn?v:serialise(v));});value=obj.map(encodeURIComponent).join(',');}else if(typeof value==='string'){value=encodeURIComponent(value);}else if(value instanceof Date){value=value.toISOString();}else if(typeof value==='number'){value=Math.round(value);}pairs.push(key+'='+value);}}// Concatenate the strings created in the previous step with an\\n// ampersand ('&') character between each one.\\nreturn pairs.join('&');}return{serialise:serialise};}MetricSerialiser.__dashjs_factory_name='MetricSerialiser';exports.default=dashjs.FactoryMaker.getSingletonFactory(MetricSerialiser);/* jshint ignore:line */\\n//# sourceMappingURL=MetricSerialiser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/MetricSerialiser.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n  * @ignore\\n  */function RNG(){// check whether secure random numbers are available. if not, revert to\\n// using Math.random\\nvar crypto=window.crypto||window.msCrypto;// could just as easily use any other array type by changing line below\\nvar ArrayType=Uint32Array;var MAX_VALUE=Math.pow(2,ArrayType.BYTES_PER_ELEMENT*8)-1;// currently there is only one client for this code, and that only uses\\n// a single random number per initialisation. may want to increase this\\n// number if more consumers in the future\\nvar NUM_RANDOM_NUMBERS=10;var randomNumbers=void 0,index=void 0,instance=void 0;function initialise(){if(crypto){if(!randomNumbers){randomNumbers=new ArrayType(NUM_RANDOM_NUMBERS);}crypto.getRandomValues(randomNumbers);index=0;}}function rand(min,max){var r=void 0;if(!min){min=0;}if(!max){max=1;}if(crypto){if(index===randomNumbers.length){initialise();}r=randomNumbers[index]/MAX_VALUE;index+=1;}else{r=Math.random();}return r*(max-min)+min;}instance={random:rand};initialise();return instance;}RNG.__dashjs_factory_name='RNG';exports.default=dashjs.FactoryMaker.getSingletonFactory(RNG);/* jshint ignore:line */\\n//# sourceMappingURL=RNG.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/utils/RNG.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DVBErrors=function DVBErrors(){_classCallCheck(this,DVBErrors);this.mpdurl=null;// String - Absolute URL from which the MPD was originally\\n// retrieved (MPD updates will not change this value).\\nthis.errorcode=null;// String - The value of errorcode depends upon the type\\n// of error being reported. For an error listed in the\\n// ErrorType column below the value is as described in the\\n// Value column.\\n//\\n// ErrorType                                            Value\\n// ---------                                            -----\\n// HTTP error status code                               HTTP status code\\n// Unknown HTTP status code                             HTTP status code\\n// SSL connection failed                                \"SSL\" followed by SSL alert value\\n// DNS resolution failed                                \"C00\"\\n// Host unreachable                                     \"C01\"\\n// Connection refused                                   \"C02\"\\n// Connection error – Not otherwise specified           \"C03\"\\n// Corrupt media – ISO BMFF container cannot be parsed  \"M00\"\\n// Corrupt media – Not otherwise specified              \"M01\"\\n// Changing Base URL in use due to errors               \"F00\"\\n// Becoming an error reporting Player                   \"S00\"\\nthis.terror=null;// Real-Time - Date and time at which error occurred in UTC,\\n// formatted as a combined date and time according to ISO 8601.\\nthis.url=null;// String - Absolute URL from which data was being requested\\n// when this error occurred. If the error report is in relation\\n// to corrupt media or changing BaseURL, this may be a null\\n// string if the URL from which the media was obtained or\\n// which led to the change of BaseURL is no longer known.\\nthis.ipaddress=null;// String - IP Address which the host name in \"url\" resolved to.\\n// If the error report is in relation to corrupt media or\\n// changing BaseURL, this may be a null string if the URL\\n// from which the media was obtained or which led to the\\n// change of BaseURL is no longer known.\\nthis.servicelocation=null;// String - The value of the serviceLocation field in the\\n// BaseURL being used. In the event of this report indicating\\n// a change of BaseURL this is the value from the BaseURL\\n// being moved from.\\n};DVBErrors.SSL_CONNECTION_FAILED_PREFIX=\\'SSL\\';DVBErrors.DNS_RESOLUTION_FAILED=\\'C00\\';DVBErrors.HOST_UNREACHABLE=\\'C01\\';DVBErrors.CONNECTION_REFUSED=\\'C02\\';DVBErrors.CONNECTION_ERROR=\\'C03\\';DVBErrors.CORRUPT_MEDIA_ISOBMFF=\\'M00\\';DVBErrors.CORRUPT_MEDIA_OTHER=\\'M01\\';DVBErrors.BASE_URL_CHANGED=\\'F00\\';DVBErrors.BECAME_REPORTER=\\'S00\\';exports.default=DVBErrors;\\n//# sourceMappingURL=DVBErrors.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/DVBErrors.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Metrics=function Metrics(){_classCallCheck(this,Metrics);this.metrics=\\'\\';this.Range=[];this.Reporting=[];};exports.default=Metrics;\\n//# sourceMappingURL=Metrics.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Metrics.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Range=function Range(){_classCallCheck(this,Range);// as defined in ISO23009-1\\nthis.starttime=0;this.duration=Infinity;// for internal use\\nthis._useWallClockTime=false;};exports.default=Range;\\n//# sourceMappingURL=Range.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Range.js?')},\"../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */// TS 103 285 Clause 10.12.3.3\\nvar DEFAULT_DVB_PROBABILITY=1000;var Reporting=function Reporting(){_classCallCheck(this,Reporting);this.schemeIdUri='';this.value='';// DVB Extensions\\nthis.dvb_reportingUrl='';this.dvb_probability=DEFAULT_DVB_PROBABILITY;};exports.default=Reporting;\\n//# sourceMappingURL=Reporting.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/metrics/vo/Reporting.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ObjectUtils=__webpack_require__(/*! ../utils/ObjectUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js\\\");var _ObjectUtils2=_interopRequireDefault(_ObjectUtils);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var DEFAULT_INDEX=NaN;var Node=function Node(_baseUrls,_selectedIdx){_classCallCheck(this,Node);this.data={baseUrls:_baseUrls||null,selectedIdx:_selectedIdx||DEFAULT_INDEX};this.children=[];};function BaseURLTreeModel(){var instance=void 0,root=void 0,adapter=void 0;var context=this.context;var objectUtils=(0,_ObjectUtils2.default)(context).getInstance();function setup(){reset();}function setConfig(config){if(config.adapter){adapter=config.adapter;}}function checkConfig(){if(!adapter||!adapter.hasOwnProperty('getBaseURLsFromElement')||!adapter.hasOwnProperty('getRepresentationSortFunction')){throw new Error('setConfig function has to be called previously');}}function updateChildData(node,index,element){var baseUrls=adapter.getBaseURLsFromElement(element);if(!node[index]){node[index]=new Node(baseUrls);}else{if(!objectUtils.areEqual(baseUrls,node[index].data.baseUrls)){node[index].data.baseUrls=baseUrls;node[index].data.selectedIdx=DEFAULT_INDEX;}}}function getBaseURLCollectionsFromManifest(manifest){checkConfig();var baseUrls=adapter.getBaseURLsFromElement(manifest);if(!objectUtils.areEqual(baseUrls,root.data.baseUrls)){root.data.baseUrls=baseUrls;root.data.selectedIdx=DEFAULT_INDEX;}if(manifest&&manifest.Period_asArray){manifest.Period_asArray.forEach(function(p,pi){updateChildData(root.children,pi,p);if(p.AdaptationSet_asArray){p.AdaptationSet_asArray.forEach(function(a,ai){updateChildData(root.children[pi].children,ai,a);if(a.Representation_asArray){a.Representation_asArray.sort(adapter.getRepresentationSortFunction()).forEach(function(r,ri){updateChildData(root.children[pi].children[ai].children,ri,r);});}});}});}}function walk(callback,node){var target=node||root;callback(target.data);if(target.children){target.children.forEach(function(child){return walk(callback,child);});}}function invalidateSelectedIndexes(serviceLocation){walk(function(data){if(!isNaN(data.selectedIdx)){if(serviceLocation===data.baseUrls[data.selectedIdx].serviceLocation){data.selectedIdx=DEFAULT_INDEX;}}});}function update(manifest){getBaseURLCollectionsFromManifest(manifest);}function reset(){root=new Node();}function getForPath(path){var target=root;var nodes=[target.data];if(path){path.forEach(function(p){target=target.children[p];if(target){nodes.push(target.data);}});}return nodes.filter(function(n){return n.baseUrls.length;});}instance={reset:reset,update:update,getForPath:getForPath,invalidateSelectedIndexes:invalidateSelectedIndexes,setConfig:setConfig};setup();return instance;}BaseURLTreeModel.__dashjs_factory_name='BaseURLTreeModel';exports.default=_FactoryMaker2.default.getClassFactory(BaseURLTreeModel);\\n//# sourceMappingURL=BaseURLTreeModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/BaseURLTreeModel.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _MediaPlayerEvents=__webpack_require__(/*! ../MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _MetricsReportingEvents=__webpack_require__(/*! ../metrics/MetricsReportingEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/metrics/MetricsReportingEvents.js\\\");var _MetricsReportingEvents2=_interopRequireDefault(_MetricsReportingEvents);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);var _Constants=__webpack_require__(/*! ../../streaming/constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _DashManifestModel=__webpack_require__(/*! ../../dash/models/DashManifestModel */ \\\"../node_modules/dashjs/build/es5/src/dash/models/DashManifestModel.js\\\");var _DashManifestModel2=_interopRequireDefault(_DashManifestModel);var _Utils=__webpack_require__(/*! ../../core/Utils */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var CMCD_REQUEST_FIELD_NAME='CMCD';var CMCD_VERSION=1;var OBJECT_TYPES={MANIFEST:'m',AUDIO:'a',VIDEO:'v',INIT:'i',CAPTION:'c',ISOBMFF_TEXT_TRACK:'tt',ENCRYPTION_KEY:'k',OTHER:'o'};var STREAMING_FORMATS={DASH:'d',MSS:'s'};var STREAM_TYPES={VOD:'v',LIVE:'l'};var RTP_SAFETY_FACTOR=5;function CmcdModel(){var logger=void 0,dashManifestModel=void 0,instance=void 0,internalData=void 0,abrController=void 0,dashMetrics=void 0,playbackController=void 0,streamProcessors=void 0,_isStartup=void 0,_bufferLevelStarved=void 0,_initialMediaRequestsDone=void 0;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);dashManifestModel=(0,_DashManifestModel2.default)(context).getInstance();_resetInitialSettings();}function initialize(){eventBus.on(_MediaPlayerEvents2.default.PLAYBACK_RATE_CHANGED,_onPlaybackRateChanged,instance);eventBus.on(_MediaPlayerEvents2.default.MANIFEST_LOADED,_onManifestLoaded,instance);eventBus.on(_MediaPlayerEvents2.default.BUFFER_LEVEL_STATE_CHANGED,_onBufferLevelStateChanged,instance);eventBus.on(_MediaPlayerEvents2.default.PLAYBACK_SEEKED,_onPlaybackSeeked,instance);eventBus.on(_MediaPlayerEvents2.default.PERIOD_SWITCH_COMPLETED,_onPeriodSwitchComplete,instance);}function setConfig(config){if(!config)return;if(config.abrController){abrController=config.abrController;}if(config.dashMetrics){dashMetrics=config.dashMetrics;}if(config.playbackController){playbackController=config.playbackController;}}function _resetInitialSettings(){internalData={pr:1,nor:null,st:null,sf:null,sid:''+_Utils2.default.generateUuid(),cid:null};_bufferLevelStarved={};_isStartup={};_initialMediaRequestsDone={};_updateStreamProcessors();}function _onPeriodSwitchComplete(){_updateStreamProcessors();}function _updateStreamProcessors(){if(!playbackController)return;var streamController=playbackController.getStreamController();if(!streamController)return;if(typeof streamController.getActiveStream!=='function')return;var activeStream=streamController.getActiveStream();if(!activeStream)return;streamProcessors=activeStream.getProcessors();}function getQueryParameter(request){try{if(settings.get().streaming.cmcd&&settings.get().streaming.cmcd.enabled){var cmcdData=_getCmcdData(request);var finalPayloadString=_buildFinalString(cmcdData);eventBus.trigger(_MetricsReportingEvents2.default.CMCD_DATA_GENERATED,{url:request.url,mediaType:request.mediaType,cmcdData:cmcdData,cmcdString:finalPayloadString});return{key:CMCD_REQUEST_FIELD_NAME,value:finalPayloadString};}return null;}catch(e){return null;}}function _getCmcdData(request){try{var cmcdData=null;if(request.type===_HTTPRequest.HTTPRequest.MPD_TYPE){return _getCmcdDataForMpd(request);}else if(request.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){_initForMediaType(request.mediaType);return _getCmcdDataForMediaSegment(request);}else if(request.type===_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE){return _getCmcdDataForInitSegment(request);}else if(request.type===_HTTPRequest.HTTPRequest.OTHER_TYPE||request.type===_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE){return _getCmcdDataForOther(request);}else if(request.type===_HTTPRequest.HTTPRequest.LICENSE){return _getCmcdDataForLicense(request);}return cmcdData;}catch(e){return null;}}function _getCmcdDataForLicense(request){var data=_getGenericCmcdData(request);data.ot=OBJECT_TYPES.ENCRYPTION_KEY;return data;}function _getCmcdDataForMpd(){var data=_getGenericCmcdData();data.ot=''+OBJECT_TYPES.MANIFEST;return data;}function _getCmcdDataForMediaSegment(request){var data=_getGenericCmcdData();var encodedBitrate=_getBitrateByRequest(request);var d=_getObjectDurationByRequest(request);var mtp=_getMeasuredThroughputByType(request.mediaType);var dl=_getDeadlineByType(request.mediaType);var bl=_getBufferLevelByType(request.mediaType);var tb=_getTopBitrateByType(request.mediaType);var pr=internalData.pr;var nextRequest=_probeNextRequest(request.mediaType);var ot=void 0;if(request.mediaType===_Constants2.default.VIDEO)ot=OBJECT_TYPES.VIDEO;if(request.mediaType===_Constants2.default.AUDIO)ot=OBJECT_TYPES.AUDIO;if(request.mediaType===_Constants2.default.FRAGMENTED_TEXT){if(request.mediaInfo.mimeType==='application/mp4'){ot=OBJECT_TYPES.ISOBMFF_TEXT_TRACK;}else{ot=OBJECT_TYPES.CAPTION;}}var rtp=settings.get().streaming.cmcd.rtp;if(!rtp){rtp=_calculateRtp(request);}data.rtp=rtp;if(nextRequest){if(request.url!==nextRequest.url){var url=new URL(nextRequest.url);data.nor=url.pathname;}else if(nextRequest.range){data.nrr=nextRequest.range;}}if(encodedBitrate){data.br=encodedBitrate;}if(ot){data.ot=ot;}if(!isNaN(d)){data.d=d;}if(!isNaN(mtp)){data.mtp=mtp;}if(!isNaN(dl)){data.dl=dl;}if(!isNaN(bl)){data.bl=bl;}if(!isNaN(tb)){data.tb=tb;}if(!isNaN(pr)&&pr!==1){data.pr=pr;}if(_bufferLevelStarved[request.mediaType]){data.bs=true;_bufferLevelStarved[request.mediaType]=false;}if(_isStartup[request.mediaType]||!_initialMediaRequestsDone[request.mediaType]){data.su=true;_isStartup[request.mediaType]=false;_initialMediaRequestsDone[request.mediaType]=true;}return data;}function _initForMediaType(mediaType){if(!_initialMediaRequestsDone.hasOwnProperty(mediaType)){_initialMediaRequestsDone[mediaType]=false;}if(!_isStartup.hasOwnProperty(mediaType)){_isStartup[mediaType]=false;}if(!_bufferLevelStarved.hasOwnProperty(mediaType)){_bufferLevelStarved[mediaType]=false;}}function _getCmcdDataForInitSegment(){var data=_getGenericCmcdData();data.ot=''+OBJECT_TYPES.INIT;data.su=true;return data;}function _getCmcdDataForOther(){var data=_getGenericCmcdData();data.ot=''+OBJECT_TYPES.OTHER;return data;}function _getGenericCmcdData(){var data={};var cid=settings.get().streaming.cmcd.cid?settings.get().streaming.cmcd.cid:internalData.cid;data.v=CMCD_VERSION;data.sid=settings.get().streaming.cmcd.sid?settings.get().streaming.cmcd.sid:internalData.sid;data.sid=''+data.sid;if(cid){data.cid=''+cid;}if(!isNaN(internalData.pr)&&internalData.pr!==1&&internalData.pr!==null){data.pr=internalData.pr;}if(internalData.st){data.st=internalData.st;}if(internalData.sf){data.sf=internalData.sf;}return data;}function _getBitrateByRequest(request){try{var quality=request.quality;var bitrateList=request.mediaInfo.bitrateList;return parseInt(bitrateList[quality].bandwidth/1000);}catch(e){return null;}}function _getTopBitrateByType(mediaType){try{var info=abrController.getTopBitrateInfoFor(mediaType);return Math.round(info.bitrate/1000);}catch(e){return null;}}function _getObjectDurationByRequest(request){try{return!isNaN(request.duration)?Math.round(request.duration*1000):null;}catch(e){return null;}}function _getMeasuredThroughputByType(mediaType){try{return parseInt(abrController.getThroughputHistory().getSafeAverageThroughput(mediaType)/100)*100;}catch(e){return null;}}function _getDeadlineByType(mediaType){try{var playbackRate=internalData.pr;var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);if(!isNaN(playbackRate)&&!isNaN(bufferLevel)){return parseInt(bufferLevel/playbackRate*10)*100;}return null;}catch(e){return null;}}function _getBufferLevelByType(mediaType){try{var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);if(!isNaN(bufferLevel)){return parseInt(bufferLevel*10)*100;}return null;}catch(e){return null;}}function _onPlaybackRateChanged(data){try{internalData.pr=data.playbackRate;}catch(e){}}function _onManifestLoaded(data){try{var isDynamic=dashManifestModel.getIsDynamic(data.data);var st=isDynamic?''+STREAM_TYPES.LIVE:''+STREAM_TYPES.VOD;var sf=data.protocol&&data.protocol==='MSS'?''+STREAMING_FORMATS.MSS:''+STREAMING_FORMATS.DASH;internalData.st=''+st;internalData.sf=''+sf;}catch(e){}}function _onBufferLevelStateChanged(data){try{if(data.state&&data.mediaType){if(data.state===_MediaPlayerEvents2.default.BUFFER_EMPTY){if(!_bufferLevelStarved[data.mediaType]){_bufferLevelStarved[data.mediaType]=true;}if(!_isStartup[data.mediaType]){_isStartup[data.mediaType]=true;}}}}catch(e){}}function _onPlaybackSeeked(){for(var key in _bufferLevelStarved){if(_bufferLevelStarved.hasOwnProperty(key)){_bufferLevelStarved[key]=true;}}for(var _key in _isStartup){if(_isStartup.hasOwnProperty(_key)){_isStartup[_key]=true;}}}function _buildFinalString(cmcdData){try{if(!cmcdData){return null;}var keys=Object.keys(cmcdData).sort(function(a,b){return a.localeCompare(b);});var length=keys.length;var cmcdString=keys.reduce(function(acc,key,index){if(key==='v'&&cmcdData[key]===1)return acc;// Version key should only be reported if it is != 1\\nif(typeof cmcdData[key]==='string'&&(key!=='ot'||key!=='sf'||key!=='st')){var string=cmcdData[key].replace(/\\\"/g,'\\\\\\\"');acc+=key+'=\\\"'+string+'\\\"';}else{acc+=key+'='+cmcdData[key];}if(index<length-1){acc+=',';}return acc;},'');cmcdString=cmcdString.replace(/=true/g,'');return cmcdString;}catch(e){return null;}}function _probeNextRequest(mediaType){if(!streamProcessors||streamProcessors.length===0)return;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=streamProcessors[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var streamProcessor=_step.value;if(streamProcessor.getType()===mediaType){return streamProcessor.probeNextRequest();}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}}function _calculateRtp(request){// Get the values we need\\nvar playbackRate=playbackController.getPlaybackRate();if(!playbackRate)playbackRate=1;var quality=request.quality,mediaType=request.mediaType,mediaInfo=request.mediaInfo,duration=request.duration;var currentBufferLevel=_getBufferLevelByType(mediaType);if(currentBufferLevel===0)currentBufferLevel=500;var bitrate=mediaInfo.bitrateList[quality].bandwidth;// Calculate RTP\\nvar segmentSize=bitrate*duration/1000;// Calculate file size in kilobits\\nvar timeToLoad=currentBufferLevel/playbackRate/1000;// Calculate time available to load file in seconds\\nvar minBandwidth=segmentSize/timeToLoad;// Calculate the exact bandwidth required\\nvar rtpSafetyFactor=settings.get().streaming.cmcd.rtpSafetyFactor&&!isNaN(settings.get().streaming.cmcd.rtpSafetyFactor)?settings.get().streaming.cmcd.rtpSafetyFactor:RTP_SAFETY_FACTOR;var maxBandwidth=minBandwidth*rtpSafetyFactor;// Include a safety buffer\\nvar rtp=(parseInt(maxBandwidth/100)+1)*100;// Round to the next multiple of 100\\nreturn rtp;}function reset(){eventBus.off(_MediaPlayerEvents2.default.PLAYBACK_RATE_CHANGED,_onPlaybackRateChanged,this);eventBus.off(_MediaPlayerEvents2.default.MANIFEST_LOADED,_onManifestLoaded,this);eventBus.off(_MediaPlayerEvents2.default.BUFFER_LEVEL_STATE_CHANGED,_onBufferLevelStateChanged,instance);eventBus.off(_MediaPlayerEvents2.default.PLAYBACK_SEEKED,_onPlaybackSeeked,instance);_resetInitialSettings();}instance={getQueryParameter:getQueryParameter,setConfig:setConfig,reset:reset,initialize:initialize};setup();return instance;}CmcdModel.__dashjs_factory_name='CmcdModel';exports.default=_FactoryMaker2.default.getSingletonFactory(CmcdModel);\\n//# sourceMappingURL=CmcdModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _FragmentRequest=__webpack_require__(/*! ../vo/FragmentRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\\\");var _FragmentRequest2=_interopRequireDefault(_FragmentRequest);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var FRAGMENT_MODEL_LOADING='loading';var FRAGMENT_MODEL_EXECUTED='executed';var FRAGMENT_MODEL_CANCELED='canceled';var FRAGMENT_MODEL_FAILED='failed';function FragmentModel(config){config=config||{};var eventBus=config.eventBus;var events=config.events;var dashMetrics=config.dashMetrics;var fragmentLoader=config.fragmentLoader;var debug=config.debug;var streamInfo=config.streamInfo;var type=config.type;var instance=void 0,logger=void 0,executedRequests=void 0,loadingRequests=void 0;function setup(){logger=debug.getLogger(instance);resetInitialSettings();eventBus.on(events.LOADING_COMPLETED,onLoadingCompleted,instance);eventBus.on(events.LOADING_DATA_PROGRESS,onLoadingInProgress,instance);eventBus.on(events.LOADING_ABANDONED,onLoadingAborted,instance);}function getStreamId(){return streamInfo.id;}function getType(){return type;}function isFragmentLoaded(request){var isEqualComplete=function isEqualComplete(req1,req2){return req1.action===_FragmentRequest2.default.ACTION_COMPLETE&&req1.action===req2.action;};var isEqualMedia=function isEqualMedia(req1,req2){return!isNaN(req1.index)&&req1.startTime===req2.startTime&&req1.adaptationIndex===req2.adaptationIndex&&req1.type===req2.type;};var isEqualInit=function isEqualInit(req1,req2){return isNaN(req1.index)&&isNaN(req2.index)&&req1.quality===req2.quality;};var check=function check(requests){var isLoaded=false;requests.some(function(req){if(isEqualMedia(request,req)||isEqualInit(request,req)||isEqualComplete(request,req)){isLoaded=true;return isLoaded;}});return isLoaded;};if(!request){return false;}return check(executedRequests);}function isFragmentLoadedOrPending(request){var isLoaded=false;var i=0;var req=void 0;// First, check if the fragment has already been loaded\\nisLoaded=isFragmentLoaded(request);// Then, check if the fragment is about to be loeaded\\nif(!isLoaded){for(i=0;i<loadingRequests.length;i++){req=loadingRequests[i];if(request.url===req.url&&request.startTime===req.startTime){isLoaded=true;}}}return isLoaded;}/**\\n     *\\n     * Gets an array of {@link FragmentRequest} objects\\n     *\\n     * @param {Object} filter The object with properties by which the method filters the requests to be returned.\\n     *  the only mandatory property is state, which must be a value from\\n     *  other properties should match the properties of {@link FragmentRequest}. E.g.:\\n     *  getRequests({state: FragmentModel.FRAGMENT_MODEL_EXECUTED, quality: 0}) - returns\\n     *  all the requests from executedRequests array where requests.quality = filter.quality\\n     *\\n     * @returns {Array}\\n     * @memberof FragmentModel#\\n     */function getRequests(filter){var states=filter?filter.state instanceof Array?filter.state:[filter.state]:[];var filteredRequests=[];states.forEach(function(state){var requests=getRequestsForState(state);filteredRequests=filteredRequests.concat(filterRequests(requests,filter));});return filteredRequests;}function getRequestThreshold(req){return isNaN(req.duration)?0.25:Math.min(req.duration/8,0.5);}function removeExecutedRequestsBeforeTime(time){executedRequests=executedRequests.filter(function(req){var threshold=getRequestThreshold(req);return isNaN(req.startTime)||(time!==undefined?req.startTime>=time-threshold:false);});}function removeExecutedRequestsAfterTime(time){executedRequests=executedRequests.filter(function(req){return isNaN(req.startTime)||(time!==undefined?req.startTime<time:false);});}function removeExecutedRequestsInTimeRange(start,end){if(end<=start+0.5){return;}executedRequests=executedRequests.filter(function(req){var threshold=getRequestThreshold(req);return isNaN(req.startTime)||req.startTime>=end-threshold||isNaN(req.duration)||req.startTime+req.duration<=start+threshold;});}// Remove requests that are not \\\"represented\\\" by any of buffered ranges\\nfunction syncExecutedRequestsWithBufferedRange(bufferedRanges,streamDuration){if(!bufferedRanges||bufferedRanges.length===0){removeExecutedRequestsBeforeTime();return;}var start=0;for(var i=0,ln=bufferedRanges.length;i<ln;i++){removeExecutedRequestsInTimeRange(start,bufferedRanges.start(i));start=bufferedRanges.end(i);}if(streamDuration>0){removeExecutedRequestsInTimeRange(start,streamDuration);}}function abortRequests(){logger.debug('abort requests');fragmentLoader.abort();loadingRequests=[];}function executeRequest(request){switch(request.action){case _FragmentRequest2.default.ACTION_COMPLETE:executedRequests.push(request);addSchedulingInfoMetrics(request,FRAGMENT_MODEL_EXECUTED);logger.debug('STREAM_COMPLETED');eventBus.trigger(events.STREAM_COMPLETED,{request:request},{streamId:request.mediaInfo.streamInfo.id,mediaType:request.mediaType});break;case _FragmentRequest2.default.ACTION_DOWNLOAD:addSchedulingInfoMetrics(request,FRAGMENT_MODEL_LOADING);loadingRequests.push(request);loadCurrentFragment(request);break;default:logger.warn('Unknown request action.');}}function loadCurrentFragment(request){eventBus.trigger(events.FRAGMENT_LOADING_STARTED,{request:request},{streamId:streamInfo.id,mediaType:type});fragmentLoader.load(request);}function getRequestForTime(arr,time,threshold){// loop through the executed requests and pick the one for which the playback interval matches the given time\\nvar lastIdx=arr.length-1;for(var i=lastIdx;i>=0;i--){var req=arr[i];var start=req.startTime;var end=start+req.duration;threshold=!isNaN(threshold)?threshold:getRequestThreshold(req);if(!isNaN(start)&&!isNaN(end)&&time+threshold>=start&&time-threshold<end||isNaN(start)&&isNaN(time)){return req;}}return null;}function filterRequests(arr,filter){// for time use a specific filtration function\\nif(filter.hasOwnProperty('time')){return[getRequestForTime(arr,filter.time,filter.threshold)];}return arr.filter(function(request){for(var prop in filter){if(prop==='state')continue;if(filter.hasOwnProperty(prop)&&request[prop]!=filter[prop])return false;}return true;});}function getRequestsForState(state){var requests=void 0;switch(state){case FRAGMENT_MODEL_LOADING:requests=loadingRequests;break;case FRAGMENT_MODEL_EXECUTED:requests=executedRequests;break;default:requests=[];}return requests;}function addSchedulingInfoMetrics(request,state){dashMetrics.addSchedulingInfo(request,state);dashMetrics.addRequestsQueue(request.mediaType,loadingRequests,executedRequests);}function onLoadingCompleted(e){if(e.sender!==fragmentLoader)return;loadingRequests.splice(loadingRequests.indexOf(e.request),1);if(e.response&&!e.error){executedRequests.push(e.request);}addSchedulingInfoMetrics(e.request,e.error?FRAGMENT_MODEL_FAILED:FRAGMENT_MODEL_EXECUTED);eventBus.trigger(events.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:streamInfo.id,mediaType:type});}function onLoadingInProgress(e){if(e.sender!==fragmentLoader)return;eventBus.trigger(events.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:streamInfo.id,mediaType:type});}function onLoadingAborted(e){if(e.sender!==fragmentLoader)return;eventBus.trigger(events.FRAGMENT_LOADING_ABANDONED,{request:e.request},{streamId:streamInfo.id,mediaType:type});}function resetInitialSettings(){executedRequests=[];loadingRequests=[];}function reset(){eventBus.off(events.LOADING_COMPLETED,onLoadingCompleted,this);eventBus.off(events.LOADING_DATA_PROGRESS,onLoadingInProgress,this);eventBus.off(events.LOADING_ABANDONED,onLoadingAborted,this);if(fragmentLoader){fragmentLoader.reset();}resetInitialSettings();}function addExecutedRequest(request){executedRequests.push(request);}instance={getStreamId:getStreamId,getType:getType,getRequests:getRequests,isFragmentLoaded:isFragmentLoaded,isFragmentLoadedOrPending:isFragmentLoadedOrPending,removeExecutedRequestsBeforeTime:removeExecutedRequestsBeforeTime,removeExecutedRequestsAfterTime:removeExecutedRequestsAfterTime,syncExecutedRequestsWithBufferedRange:syncExecutedRequestsWithBufferedRange,abortRequests:abortRequests,executeRequest:executeRequest,reset:reset,addExecutedRequest:addExecutedRequest};setup();return instance;}FragmentModel.__dashjs_factory_name='FragmentModel';var factory=_FactoryMaker2.default.getClassFactory(FragmentModel);factory.FRAGMENT_MODEL_LOADING=FRAGMENT_MODEL_LOADING;factory.FRAGMENT_MODEL_EXECUTED=FRAGMENT_MODEL_EXECUTED;factory.FRAGMENT_MODEL_CANCELED=FRAGMENT_MODEL_CANCELED;factory.FRAGMENT_MODEL_FAILED=FRAGMENT_MODEL_FAILED;_FactoryMaker2.default.updateClassFactory(FragmentModel.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=FragmentModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/FragmentModel.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ManifestModel(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,manifest=void 0;function getValue(){return manifest;}function setValue(value){manifest=value;if(value){eventBus.trigger(_Events2.default.MANIFEST_LOADED,{data:value});}}instance={getValue:getValue,setValue:setValue};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ManifestModel.__dashjs_factory_name=\\'ManifestModel\\';exports.default=_FactoryMaker2.default.getSingletonFactory(ManifestModel);\\n//# sourceMappingURL=ManifestModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/ManifestModel.js?')},\"../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _UTCTiming=__webpack_require__(/*! ../../dash/vo/UTCTiming */ \"../node_modules/dashjs/build/es5/src/dash/vo/UTCTiming.js\");var _UTCTiming2=_interopRequireDefault(_UTCTiming);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _ABRRulesCollection=__webpack_require__(/*! ../rules/abr/ABRRulesCollection */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js\");var _ABRRulesCollection2=_interopRequireDefault(_ABRRulesCollection);var _Settings=__webpack_require__(/*! ../../core/Settings */ \"../node_modules/dashjs/build/es5/src/core/Settings.js\");var _Settings2=_interopRequireDefault(_Settings);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var DEFAULT_MIN_BUFFER_TIME=12;var DEFAULT_MIN_BUFFER_TIME_FAST_SWITCH=20;var DEFAULT_LOW_LATENCY_LIVE_DELAY=3.0;var LOW_LATENCY_REDUCTION_FACTOR=10;var LOW_LATENCY_MULTIPLY_FACTOR=5;var DEFAULT_LIVE_LATENCY_CATCHUP_THRESHOLD_FACTOR=4;var MINIMUM_LIVE_LATENCY_CATCHUP=5;var DEFAULT_XHR_WITH_CREDENTIALS=false;function MediaPlayerModel(){var instance=void 0,UTCTimingSources=void 0,xhrWithCredentials=void 0,customABRRule=void 0;var context=this.context;var settings=(0,_Settings2.default)(context).getInstance();function setup(){UTCTimingSources=[];xhrWithCredentials={default:DEFAULT_XHR_WITH_CREDENTIALS};customABRRule=[];}//TODO Should we use Object.define to have setters/getters? makes more readable code on other side.\\nfunction findABRCustomRuleIndex(rulename){var i=void 0;for(i=0;i<customABRRule.length;i++){if(customABRRule[i].rulename===rulename){return i;}}return-1;}function getABRCustomRules(){return customABRRule;}function addABRCustomRule(type,rulename,rule){if(typeof type!==\\'string\\'||type!==_ABRRulesCollection2.default.ABANDON_FRAGMENT_RULES&&type!==_ABRRulesCollection2.default.QUALITY_SWITCH_RULES||typeof rulename!==\\'string\\'){throw _Constants2.default.BAD_ARGUMENT_ERROR;}var index=findABRCustomRuleIndex(rulename);if(index===-1){// add rule\\ncustomABRRule.push({type:type,rulename:rulename,rule:rule});}else{// update rule\\ncustomABRRule[index].type=type;customABRRule[index].rule=rule;}}function removeABRCustomRule(rulename){if(rulename){var index=findABRCustomRuleIndex(rulename);//if no rulename custom rule has been found, do nothing\\nif(index!==-1){// remove rule\\ncustomABRRule.splice(index,1);}}else{//if no rulename is defined, remove all ABR custome rules\\ncustomABRRule=[];}}function getStableBufferTime(){if(settings.get().streaming.lowLatencyEnabled){return getLiveDelay()*0.6;}var stableBufferTime=settings.get().streaming.stableBufferTime;return stableBufferTime>-1?stableBufferTime:settings.get().streaming.fastSwitchEnabled?DEFAULT_MIN_BUFFER_TIME_FAST_SWITCH:DEFAULT_MIN_BUFFER_TIME;}function getRetryAttemptsForType(type){var lowLatencyMultiplyFactor=!isNaN(settings.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?settings.get().streaming.retryAttempts.lowLatencyMultiplyFactor:LOW_LATENCY_MULTIPLY_FACTOR;return settings.get().streaming.lowLatencyEnabled?settings.get().streaming.retryAttempts[type]*lowLatencyMultiplyFactor:settings.get().streaming.retryAttempts[type];}function getRetryIntervalsForType(type){var lowLatencyReductionFactor=!isNaN(settings.get().streaming.retryIntervals.lowLatencyReductionFactor)?settings.get().streaming.retryIntervals.lowLatencyReductionFactor:LOW_LATENCY_REDUCTION_FACTOR;return settings.get().streaming.lowLatencyEnabled?settings.get().streaming.retryIntervals[type]/lowLatencyReductionFactor:settings.get().streaming.retryIntervals[type];}function getLiveDelay(){if(settings.get().streaming.lowLatencyEnabled){return settings.get().streaming.liveDelay||DEFAULT_LOW_LATENCY_LIVE_DELAY;}return settings.get().streaming.liveDelay;}function getLiveCatchupLatencyThreshold(){try{var liveCatchupLatencyThreshold=settings.get().streaming.liveCatchup.latencyThreshold;var liveDelay=getLiveDelay();if(liveCatchupLatencyThreshold!==null&&!isNaN(liveCatchupLatencyThreshold)){return Math.max(liveCatchupLatencyThreshold,liveDelay);}var liveCatchupMinDrift=settings.get().streaming.liveCatchup.minDrift;var maximumLiveDelay=!isNaN(liveDelay)&&liveDelay?!isNaN(liveCatchupMinDrift)?settings.get().streaming.liveCatchup.minDrift+getLiveDelay():getLiveDelay():NaN;if(maximumLiveDelay&&!isNaN(maximumLiveDelay)){return Math.max(maximumLiveDelay*DEFAULT_LIVE_LATENCY_CATCHUP_THRESHOLD_FACTOR,MINIMUM_LIVE_LATENCY_CATCHUP);}return NaN;}catch(e){return NaN;}}function addUTCTimingSource(schemeIdUri,value){removeUTCTimingSource(schemeIdUri,value);//check if it already exists and remove if so.\\nvar vo=new _UTCTiming2.default();vo.schemeIdUri=schemeIdUri;vo.value=value;UTCTimingSources.push(vo);}function getUTCTimingSources(){return UTCTimingSources;}function removeUTCTimingSource(schemeIdUri,value){(0,_SupervisorTools.checkParameterType)(schemeIdUri,\\'string\\');(0,_SupervisorTools.checkParameterType)(value,\\'string\\');UTCTimingSources.forEach(function(obj,idx){if(obj.schemeIdUri===schemeIdUri&&obj.value===value){UTCTimingSources.splice(idx,1);}});}function clearDefaultUTCTimingSources(){UTCTimingSources=[];}function restoreDefaultUTCTimingSources(){var defaultUtcTimingSource=settings.get().streaming.utcSynchronization.defaultTimingSource;addUTCTimingSource(defaultUtcTimingSource.scheme,defaultUtcTimingSource.value);}function setXHRWithCredentialsForType(type,value){if(!type){Object.keys(xhrWithCredentials).forEach(function(key){setXHRWithCredentialsForType(key,value);});}else{xhrWithCredentials[type]=!!value;}}function getXHRWithCredentialsForType(type){var useCreds=xhrWithCredentials[type];return useCreds===undefined?xhrWithCredentials.default:useCreds;}function getDefaultUtcTimingSource(){return settings.get().streaming.utcSynchronization.defaultTimingSource;}function reset(){//TODO need to figure out what props to persist across sessions and which to reset if any.\\n//setup();\\n}instance={getABRCustomRules:getABRCustomRules,addABRCustomRule:addABRCustomRule,removeABRCustomRule:removeABRCustomRule,getStableBufferTime:getStableBufferTime,getRetryAttemptsForType:getRetryAttemptsForType,getRetryIntervalsForType:getRetryIntervalsForType,getLiveDelay:getLiveDelay,getLiveCatchupLatencyThreshold:getLiveCatchupLatencyThreshold,addUTCTimingSource:addUTCTimingSource,removeUTCTimingSource:removeUTCTimingSource,getUTCTimingSources:getUTCTimingSources,clearDefaultUTCTimingSources:clearDefaultUTCTimingSources,restoreDefaultUTCTimingSources:restoreDefaultUTCTimingSources,setXHRWithCredentialsForType:setXHRWithCredentialsForType,getXHRWithCredentialsForType:getXHRWithCredentialsForType,getDefaultUtcTimingSource:getDefaultUtcTimingSource,reset:reset};setup();return instance;}//TODO see if you can move this and not export and just getter to get default value.\\nMediaPlayerModel.__dashjs_factory_name=\\'MediaPlayerModel\\';exports.default=_FactoryMaker2.default.getSingletonFactory(MediaPlayerModel);\\n//# sourceMappingURL=MediaPlayerModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/MediaPlayerModel.js?')},\"../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _MetricsList=__webpack_require__(/*! ../vo/MetricsList */ \"../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js\");var _MetricsList2=_interopRequireDefault(_MetricsList);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _RepresentationSwitch=__webpack_require__(/*! ../vo/metrics/RepresentationSwitch */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js\");var _RepresentationSwitch2=_interopRequireDefault(_RepresentationSwitch);var _BufferLevel=__webpack_require__(/*! ../vo/metrics/BufferLevel */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js\");var _BufferLevel2=_interopRequireDefault(_BufferLevel);var _BufferState=__webpack_require__(/*! ../vo/metrics/BufferState */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js\");var _BufferState2=_interopRequireDefault(_BufferState);var _DVRInfo=__webpack_require__(/*! ../vo/metrics/DVRInfo */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js\");var _DVRInfo2=_interopRequireDefault(_DVRInfo);var _DroppedFrames=__webpack_require__(/*! ../vo/metrics/DroppedFrames */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js\");var _DroppedFrames2=_interopRequireDefault(_DroppedFrames);var _ManifestUpdate=__webpack_require__(/*! ../vo/metrics/ManifestUpdate */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js\");var _SchedulingInfo=__webpack_require__(/*! ../vo/metrics/SchedulingInfo */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js\");var _SchedulingInfo2=_interopRequireDefault(_SchedulingInfo);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _RequestsQueue=__webpack_require__(/*! ../vo/metrics/RequestsQueue */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js\");var _RequestsQueue2=_interopRequireDefault(_RequestsQueue);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MetricsModel(config){config=config||{};var settings=config.settings;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,streamMetrics=void 0;function setup(){streamMetrics={};}function metricsChanged(){eventBus.trigger(_Events2.default.METRICS_CHANGED);}function metricChanged(mediaType){eventBus.trigger(_Events2.default.METRIC_CHANGED,{mediaType:mediaType});metricsChanged();}function metricUpdated(mediaType,metricType,vo){eventBus.trigger(_Events2.default.METRIC_UPDATED,{mediaType:mediaType,metric:metricType,value:vo});metricChanged(mediaType);}function metricAdded(mediaType,metricType,vo){eventBus.trigger(_Events2.default.METRIC_ADDED,{mediaType:mediaType,metric:metricType,value:vo});metricChanged(mediaType);}function clearCurrentMetricsForType(type){delete streamMetrics[type];metricChanged(type);}function clearAllCurrentMetrics(){streamMetrics={};metricsChanged();}function getMetricsFor(type,readOnly){var metrics=null;if(!type){return metrics;}if(streamMetrics.hasOwnProperty(type)){metrics=streamMetrics[type];}else if(!readOnly){metrics=new _MetricsList2.default();streamMetrics[type]=metrics;}return metrics;}function pushMetrics(type,list,value){var metrics=getMetricsFor(type);if(metrics!==null){metrics[list].push(value);if(metrics[list].length>settings.get().streaming.metricsMaxListDepth){metrics[list].shift();}}}function appendHttpTrace(httpRequest,s,d,b){var vo=new _HTTPRequest.HTTPRequestTrace();vo.s=s;vo.d=d;vo.b=b;httpRequest.trace.push(vo);if(!httpRequest.interval){httpRequest.interval=0;}httpRequest.interval+=d;return vo;}function addHttpRequest(mediaType,tcpid,type,url,quality,actualurl,serviceLocation,range,trequest,tresponse,tfinish,responsecode,mediaduration,responseHeaders,traces){var vo=new _HTTPRequest.HTTPRequest();// ISO 23009-1 D.4.3 NOTE 2:\\n// All entries for a given object will have the same URL and range\\n// and so can easily be correlated. If there were redirects or\\n// failures there will be one entry for each redirect/failure.\\n// The redirect-to URL or alternative url (where multiple have been\\n// provided in the MPD) will appear as the actualurl of the next\\n// entry with the same url value.\\nif(actualurl&&actualurl!==url){// given the above, add an entry for the original request\\naddHttpRequest(mediaType,null,type,url,quality,null,null,range,trequest,null,// unknown\\nnull,// unknown\\nnull,// unknown, probably a 302\\nmediaduration,null,null);vo.actualurl=actualurl;}vo.tcpid=tcpid;vo.type=type;vo.url=url;vo.range=range;vo.trequest=trequest;vo.tresponse=tresponse;vo.responsecode=responsecode;vo._tfinish=tfinish;vo._stream=mediaType;vo._mediaduration=mediaduration;vo._quality=quality;vo._responseHeaders=responseHeaders;vo._serviceLocation=serviceLocation;if(traces){traces.forEach(function(trace){appendHttpTrace(vo,trace.s,trace.d,trace.b);});}else{// The interval and trace shall be absent for redirect and failure records.\\ndelete vo.interval;delete vo.trace;}pushAndNotify(mediaType,_MetricsConstants2.default.HTTP_REQUEST,vo);}function addRepresentationSwitch(mediaType,t,mt,to,lto){var vo=new _RepresentationSwitch2.default();vo.t=t;vo.mt=mt;vo.to=to;if(lto){vo.lto=lto;}else{delete vo.lto;}pushAndNotify(mediaType,_MetricsConstants2.default.TRACK_SWITCH,vo);}function pushAndNotify(mediaType,metricType,metricObject){pushMetrics(mediaType,metricType,metricObject);metricAdded(mediaType,metricType,metricObject);}function addBufferLevel(mediaType,t,level){var vo=new _BufferLevel2.default();vo.t=t;vo.level=level;pushAndNotify(mediaType,_MetricsConstants2.default.BUFFER_LEVEL,vo);}function addBufferState(mediaType,state,target){var vo=new _BufferState2.default();vo.target=target;vo.state=state;pushAndNotify(mediaType,_MetricsConstants2.default.BUFFER_STATE,vo);}function addDVRInfo(mediaType,currentTime,mpd,range){var vo=new _DVRInfo2.default();vo.time=currentTime;vo.range=range;vo.manifestInfo=mpd;pushAndNotify(mediaType,_MetricsConstants2.default.DVR_INFO,vo);}function addDroppedFrames(mediaType,quality){var vo=new _DroppedFrames2.default();var list=getMetricsFor(mediaType).DroppedFrames;if(!quality){return;}vo.time=quality.creationTime;vo.droppedFrames=quality.droppedVideoFrames;if(list.length>0&&list[list.length-1]==vo){return;}pushAndNotify(mediaType,_MetricsConstants2.default.DROPPED_FRAMES,vo);}function addSchedulingInfo(mediaType,t,type,startTime,availabilityStartTime,duration,quality,range,state){var vo=new _SchedulingInfo2.default();vo.mediaType=mediaType;vo.t=t;vo.type=type;vo.startTime=startTime;vo.availabilityStartTime=availabilityStartTime;vo.duration=duration;vo.quality=quality;vo.range=range;vo.state=state;pushAndNotify(mediaType,_MetricsConstants2.default.SCHEDULING_INFO,vo);}function addRequestsQueue(mediaType,loadingRequests,executedRequests){var vo=new _RequestsQueue2.default();vo.loadingRequests=loadingRequests;vo.executedRequests=executedRequests;getMetricsFor(mediaType).RequestsQueue=vo;metricAdded(mediaType,_MetricsConstants2.default.REQUESTS_QUEUE,vo);}function addManifestUpdate(mediaType,type,requestTime,fetchTime,availabilityStartTime,presentationStartTime,clientTimeOffset,currentTime,buffered,latency){var vo=new _ManifestUpdate.ManifestUpdate();vo.mediaType=mediaType;vo.type=type;vo.requestTime=requestTime;// when this manifest update was requested\\nvo.fetchTime=fetchTime;// when this manifest update was received\\nvo.availabilityStartTime=availabilityStartTime;vo.presentationStartTime=presentationStartTime;// the seek point (liveEdge for dynamic, Stream[0].startTime for static)\\nvo.clientTimeOffset=clientTimeOffset;// the calculated difference between the server and client wall clock time\\nvo.currentTime=currentTime;// actual element.currentTime\\nvo.buffered=buffered;// actual element.ranges\\nvo.latency=latency;// (static is fixed value of zero. dynamic should be ((Now-@availabilityStartTime) - currentTime)\\npushMetrics(_Constants2.default.STREAM,_MetricsConstants2.default.MANIFEST_UPDATE,vo);metricAdded(mediaType,_MetricsConstants2.default.MANIFEST_UPDATE,vo);}function updateManifestUpdateInfo(manifestUpdate,updatedFields){if(manifestUpdate){for(var field in updatedFields){manifestUpdate[field]=updatedFields[field];}metricUpdated(manifestUpdate.mediaType,_MetricsConstants2.default.MANIFEST_UPDATE,manifestUpdate);}}function addManifestUpdateStreamInfo(manifestUpdate,id,index,start,duration){if(manifestUpdate){var vo=new _ManifestUpdate.ManifestUpdateStreamInfo();vo.id=id;vo.index=index;vo.start=start;vo.duration=duration;manifestUpdate.streamInfo.push(vo);metricUpdated(manifestUpdate.mediaType,_MetricsConstants2.default.MANIFEST_UPDATE_STREAM_INFO,manifestUpdate);}}function addManifestUpdateRepresentationInfo(manifestUpdate,id,index,streamIndex,mediaType,presentationTimeOffset,startNumber,fragmentInfoType){if(manifestUpdate&&manifestUpdate.representationInfo){var vo=new _ManifestUpdate.ManifestUpdateRepresentationInfo();vo.id=id;vo.index=index;vo.streamIndex=streamIndex;vo.mediaType=mediaType;vo.startNumber=startNumber;vo.fragmentInfoType=fragmentInfoType;vo.presentationTimeOffset=presentationTimeOffset;manifestUpdate.representationInfo.push(vo);metricUpdated(manifestUpdate.mediaType,_MetricsConstants2.default.MANIFEST_UPDATE_TRACK_INFO,manifestUpdate);}}function addPlayList(vo){if(vo.trace&&Array.isArray(vo.trace)){vo.trace.forEach(function(trace){if(trace.hasOwnProperty(\\'subreplevel\\')&&!trace.subreplevel){delete trace.subreplevel;}});}else{delete vo.trace;}pushAndNotify(_Constants2.default.STREAM,_MetricsConstants2.default.PLAY_LIST,vo);}function addDVBErrors(vo){pushAndNotify(_Constants2.default.STREAM,_MetricsConstants2.default.DVB_ERRORS,vo);}instance={clearCurrentMetricsForType:clearCurrentMetricsForType,clearAllCurrentMetrics:clearAllCurrentMetrics,getMetricsFor:getMetricsFor,addHttpRequest:addHttpRequest,addRepresentationSwitch:addRepresentationSwitch,addBufferLevel:addBufferLevel,addBufferState:addBufferState,addDVRInfo:addDVRInfo,addDroppedFrames:addDroppedFrames,addSchedulingInfo:addSchedulingInfo,addRequestsQueue:addRequestsQueue,addManifestUpdate:addManifestUpdate,updateManifestUpdateInfo:updateManifestUpdateInfo,addManifestUpdateStreamInfo:addManifestUpdateStreamInfo,addManifestUpdateRepresentationInfo:addManifestUpdateRepresentationInfo,addPlayList:addPlayList,addDVBErrors:addDVBErrors};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */MetricsModel.__dashjs_factory_name=\\'MetricsModel\\';exports.default=_FactoryMaker2.default.getSingletonFactory(MetricsModel);\\n//# sourceMappingURL=MetricsModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/MetricsModel.js?')},\"../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _URIFragmentData=__webpack_require__(/*! ../vo/URIFragmentData */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js\\\");var _URIFragmentData2=_interopRequireDefault(_URIFragmentData);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * Model class managing URI fragments.\\n * @ignore\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function URIFragmentModel(){var instance=void 0,URIFragmentDataVO=void 0;/**\\n     * @param {string} uri The URI to parse for fragment extraction\\n     * @memberof module:URIFragmentModel\\n     * @instance\\n     */function initialize(uri){URIFragmentDataVO=new _URIFragmentData2.default();if(!uri)return null;var hashIndex=uri.indexOf('#');if(hashIndex!==-1){var fragments=uri.substr(hashIndex+1).split('&');for(var i=0,len=fragments.length;i<len;++i){var fragment=fragments[i];var equalIndex=fragment.indexOf('=');if(equalIndex!==-1){var key=fragment.substring(0,equalIndex);if(URIFragmentDataVO.hasOwnProperty(key)){URIFragmentDataVO[key]=fragment.substr(equalIndex+1);}}}}}/**\\n     * @returns {URIFragmentData} Object containing supported URI fragments\\n     * @memberof module:URIFragmentModel\\n     * @instance\\n     */function getURIFragmentData(){return URIFragmentDataVO;}instance={initialize:initialize,getURIFragmentData:getURIFragmentData};return instance;}URIFragmentModel.__dashjs_factory_name='URIFragmentModel';exports.default=_FactoryMaker2.default.getSingletonFactory(URIFragmentModel);\\n//# sourceMappingURL=URIFragmentModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/URIFragmentModel.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function VideoModel(){var instance=void 0,logger=void 0,element=void 0,TTMLRenderingDiv=void 0,previousPlaybackRate=void 0;var VIDEO_MODEL_WRONG_ELEMENT_TYPE='element is not video or audio DOM type!';var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var stalledStreams=[];function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function initialize(){eventBus.on(_Events2.default.PLAYBACK_PLAYING,onPlaying,this);}function reset(){eventBus.off(_Events2.default.PLAYBACK_PLAYING,onPlaying,this);}function onPlaybackCanPlay(){if(element){element.playbackRate=previousPlaybackRate||1;element.removeEventListener('canplay',onPlaybackCanPlay);}}function setPlaybackRate(value){if(!element)return;if(element.readyState<=2&&value>0){// If media element hasn't loaded enough data to play yet, wait until it has\\nelement.addEventListener('canplay',onPlaybackCanPlay);}else{element.playbackRate=value;}}//TODO Move the DVR window calculations from MediaPlayer to Here.\\nfunction setCurrentTime(currentTime,stickToBuffered){if(element){//_currentTime = currentTime;\\n// We don't set the same currentTime because it can cause firing unexpected Pause event in IE11\\n// providing playbackRate property equals to zero.\\nif(element.currentTime==currentTime)return;// TODO Despite the fact that MediaSource 'open' event has been fired IE11 cannot set videoElement.currentTime\\n// immediately (it throws InvalidStateError). It seems that this is related to videoElement.readyState property\\n// Initially it is 0, but soon after 'open' event it goes to 1 and setting currentTime is allowed. Chrome allows to\\n// set currentTime even if readyState = 0.\\n// setTimeout is used to workaround InvalidStateError in IE11\\ntry{currentTime=stickToBuffered?stickTimeToBuffered(currentTime):currentTime;element.currentTime=currentTime;}catch(e){if(element.readyState===0&&e.code===e.INVALID_STATE_ERR){setTimeout(function(){element.currentTime=currentTime;},400);}}}}function stickTimeToBuffered(time){var buffered=getBufferRange();var closestTime=time;var closestDistance=9999999999;if(buffered){for(var i=0;i<buffered.length;i++){var start=buffered.start(i);var end=buffered.end(i);var distanceToStart=Math.abs(start-time);var distanceToEnd=Math.abs(end-time);if(time>=start&&time<=end){return time;}if(distanceToStart<closestDistance){closestDistance=distanceToStart;closestTime=start;}if(distanceToEnd<closestDistance){closestDistance=distanceToEnd;closestTime=end;}}}return closestTime;}function getElement(){return element;}function setElement(value){//add check of value type\\nif(value===null||value===undefined||value&&/^(VIDEO|AUDIO)$/i.test(value.nodeName)){element=value;// Workaround to force Firefox to fire the canplay event.\\nif(element){element.preload='auto';}}else{throw VIDEO_MODEL_WRONG_ELEMENT_TYPE;}}function setSource(source){if(element){if(source){element.src=source;}else{element.removeAttribute('src');element.load();}}}function getSource(){return element?element.src:null;}function getTTMLRenderingDiv(){return TTMLRenderingDiv;}function setTTMLRenderingDiv(div){TTMLRenderingDiv=div;// The styling will allow the captions to match the video window size and position.\\nTTMLRenderingDiv.style.position='absolute';TTMLRenderingDiv.style.display='flex';TTMLRenderingDiv.style.overflow='hidden';TTMLRenderingDiv.style.pointerEvents='none';TTMLRenderingDiv.style.top=0;TTMLRenderingDiv.style.left=0;}function setStallState(type,state){stallStream(type,state);}function isStalled(){return stalledStreams.length>0;}function addStalledStream(type){var event=void 0;if(type===null||!element||element.seeking||stalledStreams.indexOf(type)!==-1){return;}stalledStreams.push(type);if(element&&stalledStreams.length===1){// Halt playback until nothing is stalled.\\nevent=document.createEvent('Event');event.initEvent('waiting',true,false);previousPlaybackRate=element.playbackRate;setPlaybackRate(0);element.dispatchEvent(event);}}function removeStalledStream(type){var index=stalledStreams.indexOf(type);var event=void 0;if(type===null){return;}if(index!==-1){stalledStreams.splice(index,1);}// If nothing is stalled resume playback.\\nif(element&&isStalled()===false&&element.playbackRate===0){setPlaybackRate(previousPlaybackRate||1);if(!element.paused){event=document.createEvent('Event');event.initEvent('playing',true,false);element.dispatchEvent(event);}}}function stallStream(type,isStalled){if(isStalled){addStalledStream(type);}else{removeStalledStream(type);}}//Calling play on the element will emit playing - even if the stream is stalled. If the stream is stalled, emit a waiting event.\\nfunction onPlaying(){if(element&&isStalled()&&element.playbackRate===0){var event=document.createEvent('Event');event.initEvent('waiting',true,false);element.dispatchEvent(event);}}function getPlaybackQuality(){if(!element){return null;}var hasWebKit='webkitDroppedFrameCount'in element&&'webkitDecodedFrameCount'in element;var hasQuality='getVideoPlaybackQuality'in element;var result=null;if(hasQuality){result=element.getVideoPlaybackQuality();}else if(hasWebKit){result={droppedVideoFrames:element.webkitDroppedFrameCount,totalVideoFrames:element.webkitDroppedFrameCount+element.webkitDecodedFrameCount,creationTime:new Date()};}return result;}function play(){if(element){element.autoplay=true;var p=element.play();if(p&&p.catch&&typeof Promise!=='undefined'){p.catch(function(e){if(e.name==='NotAllowedError'){eventBus.trigger(_Events2.default.PLAYBACK_NOT_ALLOWED);}logger.warn('Caught pending play exception - continuing ('+e+')');});}}}function isPaused(){return element?element.paused:null;}function pause(){if(element){element.pause();element.autoplay=false;}}function isSeeking(){return element?element.seeking:null;}function getTime(){return element?element.currentTime:null;}function getPlaybackRate(){return element?element.playbackRate:null;}function getPlayedRanges(){return element?element.played:null;}function getEnded(){return element?element.ended:null;}function addEventListener(eventName,eventCallBack){if(element){element.addEventListener(eventName,eventCallBack);}}function removeEventListener(eventName,eventCallBack){if(element){element.removeEventListener(eventName,eventCallBack);}}function getReadyState(){return element?element.readyState:NaN;}function getBufferRange(){return element?element.buffered:null;}function getClientWidth(){return element?element.clientWidth:NaN;}function getClientHeight(){return element?element.clientHeight:NaN;}function getVideoWidth(){return element?element.videoWidth:NaN;}function getVideoHeight(){return element?element.videoHeight:NaN;}function getVideoRelativeOffsetTop(){var parentElement=element.parentNode.host||element.parentNode;return parentElement?element.getBoundingClientRect().top-parentElement.getBoundingClientRect().top:NaN;}function getVideoRelativeOffsetLeft(){var parentElement=element.parentNode.host||element.parentNode;return parentElement?element.getBoundingClientRect().left-parentElement.getBoundingClientRect().left:NaN;}function getTextTracks(){return element?element.textTracks:[];}function getTextTrack(kind,label,lang,isTTML,isEmbedded){if(element){for(var i=0;i<element.textTracks.length;i++){//label parameter could be a number (due to adaptationSet), but label, the attribute of textTrack, is a string => to modify...\\n//label could also be undefined (due to adaptationSet)\\nif(element.textTracks[i].kind===kind&&(label?element.textTracks[i].label==label:true)&&element.textTracks[i].language===lang&&element.textTracks[i].isTTML===isTTML&&element.textTracks[i].isEmbedded===isEmbedded){return element.textTracks[i];}}}return null;}function addTextTrack(kind,label,lang,isTTML,isEmbedded){if(!element){return null;}// check if track of same type has not been already created for previous stream\\n// then use it (no way to remove existing text track from video element)\\nvar track=getTextTrack(kind,label,lang,isTTML,isEmbedded);if(!track){track=element.addTextTrack(kind,label,lang);track.isEmbedded=isEmbedded;track.isTTML=isTTML;}return track;}function appendChild(childElement){if(element){element.appendChild(childElement);//in Chrome, we need to differenciate textTrack with same lang, kind and label but different format (vtt, ttml, etc...)\\nif(childElement.isTTML!==undefined){element.textTracks[element.textTracks.length-1].isTTML=childElement.isTTML;element.textTracks[element.textTracks.length-1].isEmbedded=childElement.isEmbedded;}}}function removeChild(childElement){if(element){element.removeChild(childElement);}}instance={initialize:initialize,setCurrentTime:setCurrentTime,play:play,isPaused:isPaused,pause:pause,isStalled:isStalled,isSeeking:isSeeking,getTime:getTime,getPlaybackRate:getPlaybackRate,setPlaybackRate:setPlaybackRate,getPlayedRanges:getPlayedRanges,getEnded:getEnded,setStallState:setStallState,getElement:getElement,setElement:setElement,setSource:setSource,getSource:getSource,getTTMLRenderingDiv:getTTMLRenderingDiv,setTTMLRenderingDiv:setTTMLRenderingDiv,getPlaybackQuality:getPlaybackQuality,addEventListener:addEventListener,removeEventListener:removeEventListener,getReadyState:getReadyState,getBufferRange:getBufferRange,getClientWidth:getClientWidth,getClientHeight:getClientHeight,getTextTracks:getTextTracks,getTextTrack:getTextTrack,addTextTrack:addTextTrack,appendChild:appendChild,removeChild:removeChild,getVideoWidth:getVideoWidth,getVideoHeight:getVideoHeight,getVideoRelativeOffsetTop:getVideoRelativeOffsetTop,getVideoRelativeOffsetLeft:getVideoRelativeOffsetLeft,reset:reset};setup();return instance;}VideoModel.__dashjs_factory_name='VideoModel';exports.default=_FactoryMaker2.default.getSingletonFactory(VideoModel);\\n//# sourceMappingURL=VideoModel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/models/VideoModel.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Settings=__webpack_require__(/*! ../../core/Settings */ \\\"../node_modules/dashjs/build/es5/src/core/Settings.js\\\");var _Settings2=_interopRequireDefault(_Settings);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module FetchLoader\\n * @ignore\\n * @description Manages download of resources via HTTP using fetch.\\n * @param {Object} cfg - dependencies from parent\\n */function FetchLoader(cfg){cfg=cfg||{};var context=this.context;var requestModifier=cfg.requestModifier;var boxParser=cfg.boxParser;var settings=(0,_Settings2.default)(context).getInstance();var instance=void 0;function load(httpRequest){// Variables will be used in the callback functions\\nvar requestStartTime=new Date();var request=httpRequest.request;var headers=new Headers();/*jshint ignore:line*/if(request.range){headers.append('Range','bytes='+request.range);}if(!request.requestStartDate){request.requestStartDate=requestStartTime;}if(requestModifier){// modifyRequestHeader expects a XMLHttpRequest object so,\\n// to keep backward compatibility, we should expose a setRequestHeader method\\n// TODO: Remove RequestModifier dependency on XMLHttpRequest object and define\\n// a more generic way to intercept/modify requests\\nrequestModifier.modifyRequestHeader({setRequestHeader:function setRequestHeader(header,value){headers.append(header,value);}});}var abortController=void 0;if(typeof window.AbortController==='function'){abortController=new AbortController();/*jshint ignore:line*/httpRequest.abortController=abortController;abortController.signal.onabort=httpRequest.onabort;}var reqOptions={method:httpRequest.method,headers:headers,credentials:httpRequest.withCredentials?'include':undefined,signal:abortController?abortController.signal:undefined};fetch(httpRequest.url,reqOptions).then(function(response){if(!httpRequest.response){httpRequest.response={};}httpRequest.response.status=response.status;httpRequest.response.statusText=response.statusText;httpRequest.response.responseURL=response.url;if(!response.ok){httpRequest.onerror();}var responseHeaders='';var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=response.headers.keys()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var key=_step.value;responseHeaders+=key+': '+response.headers.get(key)+'\\\\r\\\\n';}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError;}}}httpRequest.response.responseHeaders=responseHeaders;if(!response.body){// Fetch returning a ReadableStream response body is not currently supported by all browsers.\\n// Browser compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\\n// If it is not supported, returning the whole segment when it's ready (as xhr)\\nreturn response.arrayBuffer().then(function(buffer){httpRequest.response.response=buffer;var event={loaded:buffer.byteLength,total:buffer.byteLength,stream:false};httpRequest.progress(event);httpRequest.onload();httpRequest.onend();return;});}var totalBytes=parseInt(response.headers.get('Content-Length'),10);var bytesReceived=0;var signaledFirstByte=false;var remaining=new Uint8Array();var offset=0;httpRequest.reader=response.body.getReader();var downloadedData=[];var startTimeData=[];var endTimeData=[];var lastChunkWasFinished=true;var calculationMode=settings.get().streaming.abr.fetchThroughputCalculationMode;var processResult=function processResult(_ref){var value=_ref.value,done=_ref.done;// Bug fix Parse whenever data is coming [value] better than 1ms looking that increase CPU\\nif(done){if(remaining){// If there is pending data, call progress so network metrics\\n// are correctly generated\\n// Same structure as https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget/\\nhttpRequest.progress({loaded:bytesReceived,total:isNaN(totalBytes)?bytesReceived:totalBytes,lengthComputable:true,time:calculateDownloadedTime(calculationMode,startTimeData,endTimeData,downloadedData,bytesReceived),stream:true});httpRequest.response.response=remaining.buffer;}httpRequest.onload();httpRequest.onend();return;}if(value&&value.length>0){remaining=concatTypedArray(remaining,value);bytesReceived+=value.length;downloadedData.push({ts:Date.now(),bytes:value.length});if(calculationMode===_Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&lastChunkWasFinished){// Parse the payload and capture the the 'moof' box\\nvar _boxesInfo=boxParser.findLastTopIsoBoxCompleted(['moof'],remaining,offset);if(_boxesInfo.found){// Store the beginning time of each chunk download in array StartTimeData\\nlastChunkWasFinished=false;startTimeData.push({ts:performance.now(),/* jshint ignore:line */bytes:value.length});}}var boxesInfo=boxParser.findLastTopIsoBoxCompleted(['moov','mdat'],remaining,offset);if(boxesInfo.found){var end=boxesInfo.lastCompletedOffset+boxesInfo.size;// Store the end time of each chunk download  with its size in array EndTimeData\\nif(calculationMode===_Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING){lastChunkWasFinished=true;endTimeData.push({ts:performance.now(),/* jshint ignore:line */bytes:remaining.length});}// If we are going to pass full buffer, avoid copying it and pass\\n// complete buffer. Otherwise clone the part of the buffer that is completed\\n// and adjust remaining buffer. A clone is needed because ArrayBuffer of a typed-array\\n// keeps a reference to the original data\\nvar data=void 0;if(end===remaining.length){data=remaining;remaining=new Uint8Array();}else{data=new Uint8Array(remaining.subarray(0,end));remaining=remaining.subarray(end);}// Announce progress but don't track traces. Throughput measures are quite unstable\\n// when they are based in small amount of data\\nhttpRequest.progress({data:data.buffer,lengthComputable:false,noTrace:true});offset=0;}else{offset=boxesInfo.lastCompletedOffset;// Call progress so it generates traces that will be later used to know when the first byte\\n// were received\\nif(!signaledFirstByte){httpRequest.progress({lengthComputable:false,noTrace:true});signaledFirstByte=true;}}}read(httpRequest,processResult);};read(httpRequest,processResult);}).catch(function(e){if(httpRequest.onerror){httpRequest.onerror(e);}});}function read(httpRequest,processResult){httpRequest.reader.read().then(processResult).catch(function(e){if(httpRequest.onerror&&httpRequest.response.status===200){// Error, but response code is 200, trigger error\\nhttpRequest.onerror(e);}});}function concatTypedArray(remaining,data){if(remaining.length===0){return data;}var result=new Uint8Array(remaining.length+data.length);result.set(remaining);result.set(data,remaining.length);return result;}function abort(request){if(request.abortController){// For firefox and edge\\nrequest.abortController.abort();}else if(request.reader){// For Chrome\\ntry{request.reader.cancel();request.onabort();}catch(e){// throw exceptions (TypeError) when reader was previously closed,\\n// for example, because a network issue\\n}}}// Compute the download time of a segment\\nfunction calculateDownloadedTime(calculationMode,startTimeData,endTimeData,downloadedData,bytesReceived){switch(calculationMode){case _Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING:return _calculateDownloadedTimeByMoofParsing(startTimeData,endTimeData);case _Constants2.default.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA:return _calculateDownloadedTimeByBytesReceived(downloadedData,bytesReceived);default:return _calculateDownloadedTimeByBytesReceived(downloadedData,bytesReceived);}}function _calculateDownloadedTimeByMoofParsing(startTimeData,endTimeData){try{var datum=void 0,datumE=void 0;// Filter the first and last chunks in a segment in both arrays [StartTimeData and EndTimeData]\\ndatum=startTimeData.filter(function(data,i){return i>0&&i<startTimeData.length-1;});datumE=endTimeData.filter(function(dataE,i){return i>0&&i<endTimeData.length-1;});// Compute the download time of a segment based on the filtered data [last chunk end time - first chunk beginning time]\\nvar segDownloadTime=0;if(datum.length>1){for(var i=0;i<datum.length;i++){if(datum[i]&&datumE[i]){var chunkDownladTime=datumE[i].ts-datum[i].ts;segDownloadTime+=chunkDownladTime;}}return segDownloadTime;}return null;}catch(e){return null;}}function _calculateDownloadedTimeByBytesReceived(downloadedData,bytesReceived){try{downloadedData=downloadedData.filter(function(data){return data.bytes>bytesReceived/4/downloadedData.length;});if(downloadedData.length>1){var time=0;var avgTimeDistance=(downloadedData[downloadedData.length-1].ts-downloadedData[0].ts)/downloadedData.length;downloadedData.forEach(function(data,index){// To be counted the data has to be over a threshold\\nvar next=downloadedData[index+1];if(next){var distance=next.ts-data.ts;time+=distance<avgTimeDistance?distance:0;}});return time;}return null;}catch(e){return null;}}instance={load:load,abort:abort,calculateDownloadedTime:calculateDownloadedTime};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */FetchLoader.__dashjs_factory_name='FetchLoader';var factory=_FactoryMaker2.default.getClassFactory(FetchLoader);exports.default=factory;\\n//# sourceMappingURL=FetchLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _XHRLoader=__webpack_require__(/*! ./XHRLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\");var _XHRLoader2=_interopRequireDefault(_XHRLoader);var _FetchLoader=__webpack_require__(/*! ./FetchLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/FetchLoader.js\");var _FetchLoader2=_interopRequireDefault(_FetchLoader);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _CmcdModel=__webpack_require__(/*! ../models/CmcdModel */ \"../node_modules/dashjs/build/es5/src/streaming/models/CmcdModel.js\");var _CmcdModel2=_interopRequireDefault(_CmcdModel);var _Utils=__webpack_require__(/*! ../../core/Utils */ \"../node_modules/dashjs/build/es5/src/core/Utils.js\");var _Utils2=_interopRequireDefault(_Utils);var _Debug=__webpack_require__(/*! ../../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _Settings=__webpack_require__(/*! ../../core/Settings */ \"../node_modules/dashjs/build/es5/src/core/Settings.js\");var _Settings2=_interopRequireDefault(_Settings);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @module HTTPLoader\\n * @ignore\\n * @description Manages download of resources via HTTP.\\n * @param {Object} cfg - dependancies from parent\\n */function HTTPLoader(cfg){cfg=cfg||{};var context=this.context;var errHandler=cfg.errHandler;var dashMetrics=cfg.dashMetrics;var mediaPlayerModel=cfg.mediaPlayerModel;var requestModifier=cfg.requestModifier;var boxParser=cfg.boxParser;var useFetch=cfg.useFetch||false;var errors=cfg.errors;var requestTimeout=cfg.requestTimeout||0;var eventBus=(0,_EventBus2.default)(context).getInstance();var settings=(0,_Settings2.default)(context).getInstance();var instance=void 0,requests=void 0,delayedRequests=void 0,retryRequests=void 0,downloadErrorToRequestTypeMap=void 0,cmcdModel=void 0,logger=void 0;function setup(){var _downloadErrorToReque;logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);requests=[];delayedRequests=[];retryRequests=[];cmcdModel=(0,_CmcdModel2.default)(context).getInstance();downloadErrorToRequestTypeMap=(_downloadErrorToReque={},_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.MPD_TYPE,errors.DOWNLOAD_ERROR_ID_MANIFEST_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.XLINK_EXPANSION_TYPE,errors.DOWNLOAD_ERROR_ID_XLINK_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.INDEX_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_defineProperty(_downloadErrorToReque,_HTTPRequest.HTTPRequest.OTHER_TYPE,errors.DOWNLOAD_ERROR_ID_CONTENT_CODE),_downloadErrorToReque);}function internalLoad(config,remainingAttempts){var request=config.request;var traces=[];var firstProgress=true;var needFailureReport=true;var requestStartTime=new Date();var lastTraceTime=requestStartTime;var lastTraceReceivedCount=0;var httpRequest=void 0;if(!requestModifier||!dashMetrics||!errHandler){throw new Error(\\'config object is not correct or missing\\');}var handleLoaded=function handleLoaded(success){needFailureReport=false;request.requestStartDate=requestStartTime;request.requestEndDate=new Date();request.firstByteDate=request.firstByteDate||requestStartTime;if(!request.checkExistenceOnly){dashMetrics.addHttpRequest(request,httpRequest.response?httpRequest.response.responseURL:null,httpRequest.response?httpRequest.response.status:null,httpRequest.response&&httpRequest.response.getAllResponseHeaders?httpRequest.response.getAllResponseHeaders():httpRequest.response?httpRequest.response.responseHeaders:[],success?traces:null);if(request.type===_HTTPRequest.HTTPRequest.MPD_TYPE){dashMetrics.addManifestUpdate(request);}}};var onloadend=function onloadend(){if(requests.indexOf(httpRequest)===-1){return;}else{requests.splice(requests.indexOf(httpRequest),1);}if(needFailureReport){handleLoaded(false);if(remainingAttempts>0){// If we get a 404 to a media segment we should check the client clock again and perform a UTC sync in the background.\\ntry{if(settings.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&request.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){// Only trigger a sync if the loading failed for the first time\\nvar initialNumberOfAttempts=mediaPlayerModel.getRetryAttemptsForType(_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE);if(initialNumberOfAttempts===remainingAttempts){eventBus.trigger(_Events2.default.ATTEMPT_BACKGROUND_SYNC);}}}catch(e){}remainingAttempts--;var retryRequest={config:config};retryRequests.push(retryRequest);retryRequest.timeout=setTimeout(function(){if(retryRequests.indexOf(retryRequest)===-1){return;}else{retryRequests.splice(retryRequests.indexOf(retryRequest),1);}internalLoad(config,remainingAttempts);},mediaPlayerModel.getRetryIntervalsForType(request.type));}else{errHandler.error(new _DashJSError2.default(downloadErrorToRequestTypeMap[request.type],request.url+\\' is not available\\',{request:request,response:httpRequest.response}));if(config.error){config.error(request,\\'error\\',httpRequest.response.statusText);}if(config.complete){config.complete(request,httpRequest.response.statusText);}}}};var progress=function progress(event){var currentTime=new Date();if(firstProgress){firstProgress=false;if(!event.lengthComputable||event.lengthComputable&&event.total!==event.loaded){request.firstByteDate=currentTime;}}if(event.lengthComputable){request.bytesLoaded=event.loaded;request.bytesTotal=event.total;}if(!event.noTrace){traces.push({s:lastTraceTime,d:event.time?event.time:currentTime.getTime()-lastTraceTime.getTime(),b:[event.loaded?event.loaded-lastTraceReceivedCount:0]});lastTraceTime=currentTime;lastTraceReceivedCount=event.loaded;}if(config.progress&&event){config.progress(event);}};var onload=function onload(){if(httpRequest.response.status>=200&&httpRequest.response.status<=299){handleLoaded(true);if(config.success){config.success(httpRequest.response.response,httpRequest.response.statusText,httpRequest.response.responseURL);}if(config.complete){config.complete(request,httpRequest.response.statusText);}}};var onabort=function onabort(){if(config.abort){config.abort(request);}};var ontimeout=function ontimeout(event){var timeoutMessage=void 0;if(event.lengthComputable){var percentageComplete=event.loaded/event.total*100;timeoutMessage=\\'Request timeout: loaded: \\'+event.loaded+\\', out of: \\'+event.total+\\' : \\'+percentageComplete.toFixed(3)+\\'% Completed\\';}else{timeoutMessage=\\'Request timeout: non-computable download size\\';}logger.warn(timeoutMessage);};var loader=void 0;if(useFetch&&window.fetch&&request.responseType===\\'arraybuffer\\'&&request.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE){loader=(0,_FetchLoader2.default)(context).create({requestModifier:requestModifier,boxParser:boxParser});}else{loader=(0,_XHRLoader2.default)(context).create({requestModifier:requestModifier});}var modifiedUrl=requestModifier.modifyRequestURL(request.url);var additionalQueryParameter=_getAdditionalQueryParameter(request);modifiedUrl=_Utils2.default.addAditionalQueryParameterToUrl(modifiedUrl,additionalQueryParameter);var verb=request.checkExistenceOnly?_HTTPRequest.HTTPRequest.HEAD:_HTTPRequest.HTTPRequest.GET;var withCredentials=mediaPlayerModel.getXHRWithCredentialsForType(request.type);httpRequest={url:modifiedUrl,method:verb,withCredentials:withCredentials,request:request,onload:onload,onend:onloadend,onerror:onloadend,progress:progress,onabort:onabort,ontimeout:ontimeout,loader:loader,timeout:requestTimeout};// Adds the ability to delay single fragment loading time to control buffer.\\nvar now=new Date().getTime();if(isNaN(request.delayLoadingTime)||now>=request.delayLoadingTime){// no delay - just send\\nrequests.push(httpRequest);loader.load(httpRequest);}else{// delay\\nvar delayedRequest={httpRequest:httpRequest};delayedRequests.push(delayedRequest);delayedRequest.delayTimeout=setTimeout(function(){if(delayedRequests.indexOf(delayedRequest)===-1){return;}else{delayedRequests.splice(delayedRequests.indexOf(delayedRequest),1);}try{requestStartTime=new Date();lastTraceTime=requestStartTime;requests.push(delayedRequest.httpRequest);loader.load(delayedRequest.httpRequest);}catch(e){delayedRequest.httpRequest.onerror();}},request.delayLoadingTime-now);}}function _getAdditionalQueryParameter(request){try{var additionalQueryParameter=[];var cmcdQueryParameter=cmcdModel.getQueryParameter(request);if(cmcdQueryParameter){additionalQueryParameter.push(cmcdQueryParameter);}return additionalQueryParameter;}catch(e){return[];}}/**\\n     * Initiates a download of the resource described by config.request\\n     * @param {Object} config - contains request (FragmentRequest or derived type), and callbacks\\n     * @memberof module:HTTPLoader\\n     * @instance\\n     */function load(config){if(config.request){internalLoad(config,mediaPlayerModel.getRetryAttemptsForType(config.request.type));}else{if(config.error){config.error(config.request,\\'error\\');}}}/**\\n     * Aborts any inflight downloads\\n     * @memberof module:HTTPLoader\\n     * @instance\\n     */function abort(){retryRequests.forEach(function(t){clearTimeout(t.timeout);// abort request in order to trigger LOADING_ABANDONED event\\nif(t.config.request&&t.config.abort){t.config.abort(t.config.request);}});retryRequests=[];delayedRequests.forEach(function(x){return clearTimeout(x.delayTimeout);});delayedRequests=[];requests.forEach(function(x){// abort will trigger onloadend which we don\\'t want\\n// when deliberately aborting inflight requests -\\n// set them to undefined so they are not called\\nx.onloadend=x.onerror=x.onprogress=undefined;x.loader.abort(x);});requests=[];}instance={load:load,abort:abort};setup();return instance;}HTTPLoader.__dashjs_factory_name=\\'HTTPLoader\\';var factory=_FactoryMaker2.default.getClassFactory(HTTPLoader);exports.default=factory;\\n//# sourceMappingURL=HTTPLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js?')},\"../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _HTTPLoader=__webpack_require__(/*! ../../streaming/net/HTTPLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/HTTPLoader.js\");var _HTTPLoader2=_interopRequireDefault(_HTTPLoader);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module\\n * @description Choose right url loader for scheme\\n * @ignore\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function SchemeLoaderFactory(){var instance=void 0;var schemeLoaderMap=void 0;function registerLoader(scheme,loader){schemeLoaderMap[scheme]=loader;}function unregisterLoader(scheme){if(schemeLoaderMap[scheme]){delete schemeLoaderMap[scheme];}}function unregisterAllLoader(){schemeLoaderMap={};}function getLoader(url){// iterates through schemeLoaderMap to find a loader for the scheme\\nfor(var scheme in schemeLoaderMap){if(schemeLoaderMap.hasOwnProperty(scheme)&&url.startsWith(scheme)){return schemeLoaderMap[scheme];}}return _HTTPLoader2.default;}function reset(){unregisterAllLoader();}function setup(){reset();}setup();instance={getLoader:getLoader,registerLoader:registerLoader,unregisterLoader:unregisterLoader,unregisterAllLoader:unregisterAllLoader,reset:reset};return instance;}SchemeLoaderFactory.__dashjs_factory_name=\\'SchemeLoaderFactory\\';var factory=_FactoryMaker2.default.getSingletonFactory(SchemeLoaderFactory);exports.default=factory;\\n//# sourceMappingURL=SchemeLoaderFactory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js?')},\"../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SchemeLoaderFactory=__webpack_require__(/*! ../../streaming/net/SchemeLoaderFactory */ \"../node_modules/dashjs/build/es5/src/streaming/net/SchemeLoaderFactory.js\");var _SchemeLoaderFactory2=_interopRequireDefault(_SchemeLoaderFactory);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @class URLLoader\\n * @description  Call Offline Loader or Online Loader dependaing on URL\\n * @param {Object} cfg - dependances\\n * @ignore\\n*//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function URLLoader(cfg){cfg=cfg||{};var context=this.context;var instance=void 0,schemeLoaderFactory=void 0,loader=void 0;schemeLoaderFactory=(0,_SchemeLoaderFactory2.default)(context).getInstance();function load(config){var loaderFactory=schemeLoaderFactory.getLoader(config&&config.request?config.request.url:null);loader=loaderFactory(context).create({errHandler:cfg.errHandler,mediaPlayerModel:cfg.mediaPlayerModel,requestModifier:cfg.requestModifier,useFetch:cfg.useFetch||null,dashMetrics:cfg.dashMetrics,boxParser:cfg.boxParser?cfg.boxParser:null,constants:cfg.constants?cfg.constants:null,dashConstants:cfg.dashConstants?cfg.dashConstants:null,urlUtils:cfg.urlUtils?cfg.urlUtils:null,requestTimeout:!isNaN(cfg.requestTimeout)?cfg.requestTimeout:0,errors:cfg.errors});loader.load(config);}function abort(){if(loader){loader.abort();}}instance={load:load,abort:abort};return instance;}URLLoader.__dashjs_factory_name=\\'URLLoader\\';var factory=_FactoryMaker2.default.getClassFactory(URLLoader);exports.default=factory;\\n//# sourceMappingURL=URLLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/URLLoader.js?')},\"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module XHRLoader\\n * @ignore\\n * @description Manages download of resources via HTTP.\\n * @param {Object} cfg - dependencies from parent\\n */function XHRLoader(cfg){cfg=cfg||{};var requestModifier=cfg.requestModifier;var instance=void 0;function load(httpRequest){// Variables will be used in the callback functions\\nvar requestStartTime=new Date();var request=httpRequest.request;var xhr=new XMLHttpRequest();xhr.open(httpRequest.method,httpRequest.url,true);if(request.responseType){xhr.responseType=request.responseType;}if(request.range){xhr.setRequestHeader('Range','bytes='+request.range);}if(!request.requestStartDate){request.requestStartDate=requestStartTime;}if(requestModifier){xhr=requestModifier.modifyRequestHeader(xhr);}xhr.withCredentials=httpRequest.withCredentials;xhr.onload=httpRequest.onload;xhr.onloadend=httpRequest.onend;xhr.onerror=httpRequest.onerror;xhr.onprogress=httpRequest.progress;xhr.onabort=httpRequest.onabort;xhr.ontimeout=httpRequest.ontimeout;xhr.timeout=httpRequest.timeout;xhr.send();httpRequest.response=xhr;}function abort(request){var x=request.response;x.onloadend=x.onerror=x.onprogress=undefined;//Ignore events from aborted requests.\\nx.abort();}instance={load:load,abort:abort};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */XHRLoader.__dashjs_factory_name='XHRLoader';var factory=_FactoryMaker2.default.getClassFactory(XHRLoader);exports.default=factory;\\n//# sourceMappingURL=XHRLoader.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var CommonEncryption=function(){function CommonEncryption(){_classCallCheck(this,CommonEncryption);}_createClass(CommonEncryption,null,[{key:'findCencContentProtection',/**\\n     * Find and return the ContentProtection element in the given array\\n     * that indicates support for MPEG Common Encryption\\n     *\\n     * @param {Array} cpArray array of content protection elements\\n     * @returns {Object|null} the Common Encryption content protection element or\\n     * null if one was not found\\n     */value:function findCencContentProtection(cpArray){var retVal=null;for(var i=0;i<cpArray.length;++i){var cp=cpArray[i];if(cp.schemeIdUri.toLowerCase()==='urn:mpeg:dash:mp4protection:2011'&&(cp.value.toLowerCase()==='cenc'||cp.value.toLowerCase()==='cbcs'))retVal=cp;}return retVal;}/**\\n     * Returns just the data portion of a single PSSH\\n     *\\n     * @param {ArrayBuffer} pssh - the PSSH\\n     * @return {ArrayBuffer} data portion of the PSSH\\n     */},{key:'getPSSHData',value:function getPSSHData(pssh){var offset=8;// Box size and type fields\\nvar view=new DataView(pssh);// Read version\\nvar version=view.getUint8(offset);offset+=20;// Version (1), flags (3), system ID (16)\\nif(version>0){offset+=4+16*view.getUint32(offset);// Key ID count (4) and All key IDs (16*count)\\n}offset+=4;// Data size\\nreturn pssh.slice(offset);}/**\\n     * Returns the PSSH associated with the given key system from the concatenated\\n     * list of PSSH boxes in the given initData\\n     *\\n     * @param {KeySystem} keySystem the desired\\n     * key system\\n     * @param {ArrayBuffer} initData 'cenc' initialization data.  Concatenated list of PSSH.\\n     * @returns {ArrayBuffer|null} The PSSH box data corresponding to the given key system, null if not found\\n     * or null if a valid association could not be found.\\n     */},{key:'getPSSHForKeySystem',value:function getPSSHForKeySystem(keySystem,initData){var psshList=CommonEncryption.parsePSSHList(initData);if(keySystem&&psshList.hasOwnProperty(keySystem.uuid.toLowerCase())){return psshList[keySystem.uuid.toLowerCase()];}return null;}/**\\n     * Parse a standard common encryption PSSH which contains a simple\\n     * base64-encoding of the init data\\n     *\\n     * @param {Object} cpData the ContentProtection element\\n     * @param {BASE64} BASE64 reference\\n     * @returns {ArrayBuffer|null} the init data or null if not found\\n     */},{key:'parseInitDataFromContentProtection',value:function parseInitDataFromContentProtection(cpData,BASE64){if('pssh'in cpData){// Remove whitespaces and newlines from pssh text\\ncpData.pssh.__text=cpData.pssh.__text.replace(/\\\\r?\\\\n|\\\\r/g,'').replace(/\\\\s+/g,'');return BASE64.decodeArray(cpData.pssh.__text).buffer;}return null;}/**\\n     * Parses list of PSSH boxes into keysystem-specific PSSH data\\n     *\\n     * @param {ArrayBuffer} data - the concatenated list of PSSH boxes as provided by\\n     * CDM as initialization data when CommonEncryption content is detected\\n     * @returns {Object|Array} an object that has a property named according to each of\\n     * the detected key system UUIDs (e.g. 00000000-0000-0000-0000-0000000000)\\n     * and a ArrayBuffer (the entire PSSH box) as the property value\\n     */},{key:'parsePSSHList',value:function parsePSSHList(data){if(data===null||data===undefined)return[];var dv=new DataView(data.buffer||data);// data.buffer first for Uint8Array support\\nvar done=false;var pssh={};// TODO: Need to check every data read for end of buffer\\nvar byteCursor=0;while(!done){var size=void 0,nextBox=void 0,version=void 0,systemID=void 0,psshDataSize=void 0;var boxStart=byteCursor;if(byteCursor>=dv.buffer.byteLength)break;/* Box size */size=dv.getUint32(byteCursor);nextBox=byteCursor+size;byteCursor+=4;/* Verify PSSH */if(dv.getUint32(byteCursor)!==0x70737368){byteCursor=nextBox;continue;}byteCursor+=4;/* Version must be 0 or 1 */version=dv.getUint8(byteCursor);if(version!==0&&version!==1){byteCursor=nextBox;continue;}byteCursor++;byteCursor+=3;/* skip flags */// 16-byte UUID/SystemID\\nsystemID='';var i=void 0,val=void 0;for(i=0;i<4;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=4;systemID+='-';for(i=0;i<2;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=2;systemID+='-';for(i=0;i<2;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=2;systemID+='-';for(i=0;i<2;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=2;systemID+='-';for(i=0;i<6;i++){val=dv.getUint8(byteCursor+i).toString(16);systemID+=val.length===1?'0'+val:val;}byteCursor+=6;systemID=systemID.toLowerCase();/* PSSH Data Size */psshDataSize=dv.getUint32(byteCursor);byteCursor+=4;/* PSSH Data */pssh[systemID]=dv.buffer.slice(boxStart,nextBox);byteCursor=nextBox;}return pssh;}}]);return CommonEncryption;}();exports.default=CommonEncryption;\\n//# sourceMappingURL=CommonEncryption.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionController=__webpack_require__(/*! ./controllers/ProtectionController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js\\\");var _ProtectionController2=_interopRequireDefault(_ProtectionController);var _ProtectionKeyController=__webpack_require__(/*! ./controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _ProtectionEvents=__webpack_require__(/*! ./ProtectionEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js\\\");var _ProtectionEvents2=_interopRequireDefault(_ProtectionEvents);var _ProtectionErrors=__webpack_require__(/*! ./errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _ProtectionModel_21Jan=__webpack_require__(/*! ./models/ProtectionModel_21Jan2015 */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js\\\");var _ProtectionModel_21Jan2=_interopRequireDefault(_ProtectionModel_21Jan);var _ProtectionModel_3Feb=__webpack_require__(/*! ./models/ProtectionModel_3Feb2014 */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js\\\");var _ProtectionModel_3Feb2=_interopRequireDefault(_ProtectionModel_3Feb);var _ProtectionModel_01b=__webpack_require__(/*! ./models/ProtectionModel_01b */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js\\\");var _ProtectionModel_01b2=_interopRequireDefault(_ProtectionModel_01b);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var APIS_ProtectionModel_01b=[// Un-prefixed as per spec\\n{// Video Element\\ngenerateKeyRequest:'generateKeyRequest',addKey:'addKey',cancelKeyRequest:'cancelKeyRequest',// Events\\nneedkey:'needkey',keyerror:'keyerror',keyadded:'keyadded',keymessage:'keymessage'},// Webkit-prefixed (early Chrome versions and Chrome with EME disabled in chrome://flags)\\n{// Video Element\\ngenerateKeyRequest:'webkitGenerateKeyRequest',addKey:'webkitAddKey',cancelKeyRequest:'webkitCancelKeyRequest',// Events\\nneedkey:'webkitneedkey',keyerror:'webkitkeyerror',keyadded:'webkitkeyadded',keymessage:'webkitkeymessage'}];/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var APIS_ProtectionModel_3Feb2014=[// Un-prefixed as per spec\\n// Chrome 38-39 (and some earlier versions) with chrome://flags -- Enable Encrypted Media Extensions\\n{// Video Element\\nsetMediaKeys:'setMediaKeys',// MediaKeys\\nMediaKeys:'MediaKeys',// MediaKeySession\\nrelease:'close',// Events\\nneedkey:'needkey',error:'keyerror',message:'keymessage',ready:'keyadded',close:'keyclose'},// MS-prefixed (IE11, Windows 8.1)\\n{// Video Element\\nsetMediaKeys:'msSetMediaKeys',// MediaKeys\\nMediaKeys:'MSMediaKeys',// MediaKeySession\\nrelease:'close',// Events\\nneedkey:'msneedkey',error:'mskeyerror',message:'mskeymessage',ready:'mskeyadded',close:'mskeyclose'}];function Protection(){var instance=void 0;var context=this.context;/**\\n     * Create a ProtectionController and associated ProtectionModel for use with\\n     * a single piece of content.\\n     *\\n     * @param {Object} config\\n     * @return {ProtectionController} protection controller\\n     *\\n     */function createProtectionSystem(config){var controller=null;var protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();protectionKeyController.setConfig({debug:config.debug,BASE64:config.BASE64});protectionKeyController.initialize();var protectionModel=getProtectionModel(config);if(!controller&&protectionModel){//TODO add ability to set external controller if still needed at all?\\ncontroller=(0,_ProtectionController2.default)(context).create({protectionModel:protectionModel,protectionKeyController:protectionKeyController,eventBus:config.eventBus,debug:config.debug,events:config.events,BASE64:config.BASE64,constants:config.constants,cmcdModel:config.cmcdModel});config.capabilities.setEncryptedMediaSupported(true);}return controller;}function getProtectionModel(config){var debug=config.debug;var logger=debug.getLogger(instance);var eventBus=config.eventBus;var errHandler=config.errHandler;var videoElement=config.videoModel?config.videoModel.getElement():null;if((!videoElement||videoElement.onencrypted!==undefined)&&(!videoElement||videoElement.mediaKeys!==undefined)){logger.info('EME detected on this user agent! (ProtectionModel_21Jan2015)');return(0,_ProtectionModel_21Jan2.default)(context).create({debug:debug,eventBus:eventBus,events:config.events});}else if(getAPI(videoElement,APIS_ProtectionModel_3Feb2014)){logger.info('EME detected on this user agent! (ProtectionModel_3Feb2014)');return(0,_ProtectionModel_3Feb2.default)(context).create({debug:debug,eventBus:eventBus,events:config.events,api:getAPI(videoElement,APIS_ProtectionModel_3Feb2014)});}else if(getAPI(videoElement,APIS_ProtectionModel_01b)){logger.info('EME detected on this user agent! (ProtectionModel_01b)');return(0,_ProtectionModel_01b2.default)(context).create({debug:debug,eventBus:eventBus,errHandler:errHandler,events:config.events,api:getAPI(videoElement,APIS_ProtectionModel_01b)});}else{logger.warn('No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!');return null;}}function getAPI(videoElement,apis){for(var i=0;i<apis.length;i++){var api=apis[i];// detect if api is supported by browser\\n// check only first function in api -> should be fine\\nif(typeof videoElement[api[Object.keys(api)[0]]]!=='function'){continue;}return api;}return null;}instance={createProtectionSystem:createProtectionSystem};return instance;}Protection.__dashjs_factory_name='Protection';var factory=dashjs.FactoryMaker.getClassFactory(Protection);/* jshint ignore:line */factory.events=_ProtectionEvents2.default;factory.errors=_ProtectionErrors2.default;dashjs.FactoryMaker.updateClassFactory(Protection.__dashjs_factory_name,factory);/* jshint ignore:line */exports.default=factory;\\n//# sourceMappingURL=Protection.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/Protection.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventsBase2=__webpack_require__(/*! ../../core/events/EventsBase */ \\\"../node_modules/dashjs/build/es5/src/core/events/EventsBase.js\\\");var _EventsBase3=_interopRequireDefault(_EventsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n  */var ProtectionEvents=function(_EventsBase){_inherits(ProtectionEvents,_EventsBase);/**\\n     * @description Public facing external events to be used when including protection package.\\n     * All public events will be aggregated into the MediaPlayerEvents Class and can be accessed\\n     * via MediaPlayer.events.  public_ is the prefix that we use to move event names to MediaPlayerEvents.\\n     */function ProtectionEvents(){_classCallCheck(this,ProtectionEvents);/**\\n         * Event ID for events delivered when the protection set receives\\n         * a key message from the CDM\\n         *\\n         * @ignore\\n         */var _this=_possibleConstructorReturn(this,(ProtectionEvents.__proto__||Object.getPrototypeOf(ProtectionEvents)).call(this));_this.INTERNAL_KEY_MESSAGE='internalKeyMessage';/**\\n         * Event ID for events delivered when a key system selection procedure\\n         * completes\\n         * @ignore\\n         */_this.INTERNAL_KEY_SYSTEM_SELECTED='internalKeySystemSelected';/**\\n         * Event ID for events delivered when the status of one decryption keys has changed\\n         * @ignore\\n         */_this.INTERNAL_KEY_STATUS_CHANGED='internalkeyStatusChanged';/**\\n         * Event ID for events delivered when a new key has been added\\n         *\\n         * @constant\\n         * @deprecated The latest versions of the EME specification no longer\\n         * use this event.  {@MediaPlayer.models.protectionModel.eventList.KEY_STATUSES_CHANGED}\\n         * is preferred.\\n         * @event ProtectionEvents#KEY_ADDED\\n         */_this.KEY_ADDED='public_keyAdded';/**\\n         * Event ID for events delivered when an error is encountered by the CDM\\n         * while processing a license server response message\\n         * @event ProtectionEvents#KEY_ERROR\\n         */_this.KEY_ERROR='public_keyError';/**\\n         * Event ID for events delivered when the protection set receives\\n         * a key message from the CDM\\n         * @event ProtectionEvents#KEY_MESSAGE\\n         */_this.KEY_MESSAGE='public_keyMessage';/**\\n         * Event ID for events delivered when a key session close\\n         * process has completed\\n         * @event ProtectionEvents#KEY_SESSION_CLOSED\\n         */_this.KEY_SESSION_CLOSED='public_keySessionClosed';/**\\n         * Event ID for events delivered when a new key sessions creation\\n         * process has completed\\n         * @event ProtectionEvents#KEY_SESSION_CREATED\\n         */_this.KEY_SESSION_CREATED='public_keySessionCreated';/**\\n         * Event ID for events delivered when a key session removal\\n         * process has completed\\n         * @event ProtectionEvents#KEY_SESSION_REMOVED\\n         */_this.KEY_SESSION_REMOVED='public_keySessionRemoved';/**\\n         * Event ID for events delivered when the status of one or more\\n         * decryption keys has changed\\n         * @event ProtectionEvents#KEY_STATUSES_CHANGED\\n         */_this.KEY_STATUSES_CHANGED='public_keyStatusesChanged';/**\\n         * Event ID for events delivered when a key system access procedure\\n         * has completed\\n         * @ignore\\n         */_this.KEY_SYSTEM_ACCESS_COMPLETE='public_keySystemAccessComplete';/**\\n         * Event ID for events delivered when a key system selection procedure\\n         * completes\\n         * @event ProtectionEvents#KEY_SYSTEM_SELECTED\\n         */_this.KEY_SYSTEM_SELECTED='public_keySystemSelected';/**\\n         * Event ID for events delivered when a license request procedure\\n         * has completed\\n         * @event ProtectionEvents#LICENSE_REQUEST_COMPLETE\\n         */_this.LICENSE_REQUEST_COMPLETE='public_licenseRequestComplete';/**\\n         * Sending a license rquest\\n         * @event ProtectionEvents#LICENSE_REQUEST_SENDING\\n         */_this.LICENSE_REQUEST_SENDING='public_licenseRequestSending';/**\\n         * Event ID for needkey/encrypted events\\n         * @ignore\\n         */_this.NEED_KEY='needkey';/**\\n         * Event ID for events delivered when the Protection system is detected and created.\\n         * @event ProtectionEvents#PROTECTION_CREATED\\n         */_this.PROTECTION_CREATED='public_protectioncreated';/**\\n         * Event ID for events delivered when the Protection system is destroyed.\\n         * @event ProtectionEvents#PROTECTION_DESTROYED\\n         */_this.PROTECTION_DESTROYED='public_protectiondestroyed';/**\\n         * Event ID for events delivered when a new server certificate has\\n         * been delivered to the CDM\\n         * @ignore\\n         */_this.SERVER_CERTIFICATE_UPDATED='serverCertificateUpdated';/**\\n         * Event ID for events delivered when the process of shutting down\\n         * a protection set has completed\\n         * @ignore\\n         */_this.TEARDOWN_COMPLETE='protectionTeardownComplete';/**\\n         * Event ID for events delivered when a HTMLMediaElement has been\\n         * associated with the protection set\\n         * @ignore\\n         */_this.VIDEO_ELEMENT_SELECTED='videoElementSelected';return _this;}return ProtectionEvents;}(_EventsBase3.default);var protectionEvents=new ProtectionEvents();exports.default=protectionEvents;\\n//# sourceMappingURL=ProtectionEvents.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/ProtectionEvents.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _typeof=typeof Symbol===\\\"function\\\"&&typeof Symbol.iterator===\\\"symbol\\\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\\\"function\\\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\\\"symbol\\\":typeof obj;};/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _MediaCapability=__webpack_require__(/*! ../vo/MediaCapability */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js\\\");var _MediaCapability2=_interopRequireDefault(_MediaCapability);var _KeySystemConfiguration=__webpack_require__(/*! ../vo/KeySystemConfiguration */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\\\");var _KeySystemConfiguration2=_interopRequireDefault(_KeySystemConfiguration);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _LicenseRequest=__webpack_require__(/*! ../vo/LicenseRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js\\\");var _LicenseRequest2=_interopRequireDefault(_LicenseRequest);var _LicenseResponse=__webpack_require__(/*! ../vo/LicenseResponse */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js\\\");var _LicenseResponse2=_interopRequireDefault(_LicenseResponse);var _HTTPRequest=__webpack_require__(/*! ../../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _Utils=__webpack_require__(/*! ../../../core/Utils */ \\\"../node_modules/dashjs/build/es5/src/core/Utils.js\\\");var _Utils2=_interopRequireDefault(_Utils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var NEEDKEY_BEFORE_INITIALIZE_RETRIES=5;var NEEDKEY_BEFORE_INITIALIZE_TIMEOUT=500;var LICENSE_SERVER_REQUEST_RETRIES=3;var LICENSE_SERVER_REQUEST_RETRY_INTERVAL=1000;var LICENSE_SERVER_REQUEST_DEFAULT_TIMEOUT=8000;/**\\n * @module ProtectionController\\n * @description Provides access to media protection information and functionality.  Each\\n * ProtectionController manages a single {@link MediaPlayer.models.ProtectionModel}\\n * which encapsulates a set of protection information (EME APIs, selected key system,\\n * key sessions).  The APIs of ProtectionController mostly align with the latest EME\\n * APIs.  Key system selection is mostly automated when combined with app-overrideable\\n * functionality provided in {@link ProtectionKeyController}.\\n * @todo ProtectionController does almost all of its tasks automatically after init() is\\n * called.  Applications might want more control over this process and want to go through\\n * each step manually (key system selection, session creation, session maintenance).\\n * @param {Object} config\\n */function ProtectionController(config){config=config||{};var protectionKeyController=config.protectionKeyController;var protectionModel=config.protectionModel;var eventBus=config.eventBus;var events=config.events;var debug=config.debug;var BASE64=config.BASE64;var constants=config.constants;var needkeyRetries=[];var cmcdModel=config.cmcdModel;var instance=void 0,logger=void 0,pendingNeedKeyData=void 0,mediaInfoArr=void 0,protDataSet=void 0,sessionType=void 0,robustnessLevel=void 0,keySystem=void 0,licenseRequestFilters=void 0,licenseResponseFilters=void 0;function setup(){logger=debug.getLogger(instance);pendingNeedKeyData=[];mediaInfoArr=[];sessionType='temporary';robustnessLevel='';licenseRequestFilters=[];licenseResponseFilters=[];}function checkConfig(){if(!eventBus||!eventBus.hasOwnProperty('on')||!protectionKeyController||!protectionKeyController.hasOwnProperty('getSupportedKeySystemsFromContentProtection')){throw new Error('Missing config parameter(s)');}}/**\\n     * Initialize this protection system with a given audio\\n     * or video stream information.\\n     *\\n     * @param {StreamInfo} [mediaInfo] Media information\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @todo This API will change when we have better support for allowing applications\\n     * to select different adaptation sets for playback.  Right now it is clunky for\\n     * applications to create {@link StreamInfo} with the right information,\\n     * @ignore\\n     */function initializeForMedia(mediaInfo){// Not checking here if a session for similar KS/KID combination is already created\\n// because still don't know which keysystem will be selected.\\n// Once Keysystem is selected and before creating the session, we will do that check\\n// so we create the strictly necessary DRM sessions\\nif(!mediaInfo){throw new Error('mediaInfo can not be null or undefined');}checkConfig();eventBus.on(events.INTERNAL_KEY_MESSAGE,onKeyMessage,this);eventBus.on(events.INTERNAL_KEY_STATUS_CHANGED,onKeyStatusChanged,this);mediaInfoArr.push(mediaInfo);// ContentProtection elements are specified at the AdaptationSet level, so the CP for audio\\n// and video will be the same.  Just use one valid MediaInfo object\\nvar supportedKS=protectionKeyController.getSupportedKeySystemsFromContentProtection(mediaInfo.contentProtection);if(supportedKS&&supportedKS.length>0){selectKeySystem(supportedKS,true);}}/**\\n     * Removes all entries from the mediaInfoArr array for a specific stream id\\n     * @param {String} streamId\\n     */function clearMediaInfoArrayByStreamId(streamId){mediaInfoArr=mediaInfoArr.filter(function(mediaInfo){return mediaInfo.streamInfo.id!==streamId;});}/**\\n     * Returns a set of supported key systems and CENC initialization data\\n     * from the given array of ContentProtection elements.  Only\\n     * key systems that are supported by this player will be returned.\\n     * Key systems are returned in priority order (highest first).\\n     *\\n     * @param {Array.<Object>} cps - array of content protection elements parsed\\n     * from the manifest\\n     * @returns {Array.<Object>} array of objects indicating which supported key\\n     * systems were found.  Empty array is returned if no\\n     * supported key systems were found\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     * @ignore\\n     */function getSupportedKeySystemsFromContentProtection(cps){checkConfig();return protectionKeyController.getSupportedKeySystemsFromContentProtection(cps);}/**\\n     * Create a new key session associated with the given initialization data from\\n     * the MPD or from the PSSH box in the media\\n     *\\n     * @param {ArrayBuffer} initData the initialization data\\n     * @param {Uint8Array} cdmData the custom data to provide to licenser\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionCreated\\n     * @todo In older versions of the EME spec, there was a one-to-one relationship between\\n     * initialization data and key sessions.  That is no longer true in the latest APIs.  This\\n     * API will need to modified (and a new \\\"generateRequest(keySession, initData)\\\" API created)\\n     * to come up to speed with the latest EME standard\\n     * @ignore\\n     */function createKeySession(initData,cdmData){var initDataForKS=_CommonEncryption2.default.getPSSHForKeySystem(keySystem,initData);var protData=getProtData(keySystem);if(initDataForKS){// Check for duplicate initData\\nif(_isInitDataDuplicate(initDataForKS)){return;}try{protectionModel.createKeySession(initDataForKS,protData,getSessionType(keySystem),cdmData);}catch(error){eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+error.message)});}}else if(initData){protectionModel.createKeySession(initData,protData,getSessionType(keySystem),cdmData);}else{eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Selected key system is '+(keySystem?keySystem.systemString:null)+'.  needkey/encrypted event contains no initData corresponding to that key system!')});}}/**\\n     * Checks if the provided init data is equal to one of the existing init data values\\n     * @param {any} initDataForKS\\n     * @return {boolean}\\n     * @private\\n     */function _isInitDataDuplicate(initDataForKS){if(!initDataForKS){return false;}try{var currentInitData=protectionModel.getAllInitData();for(var i=0;i<currentInitData.length;i++){if(protectionKeyController.initDataEquals(initDataForKS,currentInitData[i])){logger.debug('DRM: Ignoring initData because we have already seen it!');return true;}}return false;}catch(e){return false;}}/**\\n     * Loads a key session with the given session ID from persistent storage.  This\\n     * essentially creates a new key session\\n     *\\n     * @param {string} sessionID\\n     * @param {string} initData\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionCreated\\n     * @ignore\\n     */function loadKeySession(sessionID,initData){checkConfig();protectionModel.loadKeySession(sessionID,initData,getSessionType(keySystem));}/**\\n     * Removes the given key session from persistent storage and closes the session\\n     * as if {@link ProtectionController#closeKeySession}\\n     * was called\\n     *\\n     * @param {SessionToken} sessionToken the session\\n     * token\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionRemoved\\n     * @fires ProtectionController#KeySessionClosed\\n     * @ignore\\n     */function removeKeySession(sessionToken){checkConfig();protectionModel.removeKeySession(sessionToken);}/**\\n     * Closes the key session and releases all associated decryption keys.  These\\n     * keys will no longer be available for decrypting media\\n     *\\n     * @param {SessionToken} sessionToken the session\\n     * token\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#KeySessionClosed\\n     * @ignore\\n     */function closeKeySession(sessionToken){checkConfig();protectionModel.closeKeySession(sessionToken);}/**\\n     * Sets a server certificate for use by the CDM when signing key messages\\n     * intended for a particular license server.  This will fire\\n     * an error event if a key system has not yet been selected.\\n     *\\n     * @param {ArrayBuffer} serverCertificate a CDM-specific license server\\n     * certificate\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @fires ProtectionController#ServerCertificateUpdated\\n     */function setServerCertificate(serverCertificate){checkConfig();protectionModel.setServerCertificate(serverCertificate);}/**\\n     * Associate this protection system with the given HTMLMediaElement.  This\\n     * causes the system to register for needkey/encrypted events from the given\\n     * element and provides a destination for setting of MediaKeys\\n     *\\n     * @param {HTMLMediaElement} element the media element to which the protection\\n     * system should be associated\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function setMediaElement(element){checkConfig();if(element){protectionModel.setMediaElement(element);eventBus.on(events.NEED_KEY,onNeedKey,this);}else if(element===null){protectionModel.setMediaElement(element);eventBus.off(events.NEED_KEY,onNeedKey,this);}}/**\\n     * Sets the session type to use when creating key sessions.  Either \\\"temporary\\\" or\\n     * \\\"persistent-license\\\".  Default is \\\"temporary\\\".\\n     *\\n     * @param {string} value the session type\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function setSessionType(value){sessionType=value;}/**\\n     * Sets the robustness level for video and audio capabilities. Optional to remove Chrome warnings.\\n     * Possible values are SW_SECURE_CRYPTO, SW_SECURE_DECODE, HW_SECURE_CRYPTO, HW_SECURE_CRYPTO, HW_SECURE_DECODE, HW_SECURE_ALL.\\n     *\\n     * @param {string} level the robustness level\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function setRobustnessLevel(level){robustnessLevel=level;}/**\\n     * Attach KeySystem-specific data to use for license acquisition with EME\\n     *\\n     * @param {Object} data an object containing property names corresponding to\\n     * key system name strings (e.g. \\\"org.w3.clearkey\\\") and associated values\\n     * being instances of {@link ProtectionData}\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @ignore\\n     */function setProtectionData(data){protDataSet=data;protectionKeyController.setProtectionData(data);}/**\\n     * Stop method is called when current playback is stopped/resetted.\\n     *\\n     * @memberof module:ProtectionController\\n     * @instance\\n     */function stop(){if(protectionModel){protectionModel.stop();}}/**\\n     * Destroys all protection data associated with this protection set.  This includes\\n     * deleting all key sessions. In the case of persistent key sessions, the sessions\\n     * will simply be unloaded and not deleted.  Additionally, if this protection set is\\n     * associated with a HTMLMediaElement, it will be detached from that element.\\n     *\\n     * @memberof module:ProtectionController\\n     * @instance\\n     * @ignore\\n     */function reset(){checkConfig();licenseRequestFilters=[];licenseResponseFilters=[];eventBus.off(events.INTERNAL_KEY_MESSAGE,onKeyMessage,this);eventBus.off(events.INTERNAL_KEY_STATUS_CHANGED,onKeyStatusChanged,this);setMediaElement(null);keySystem=undefined;if(protectionModel){protectionModel.reset();protectionModel=null;}needkeyRetries.forEach(function(retryTimeout){return clearTimeout(retryTimeout);});needkeyRetries=[];mediaInfoArr=[];}///////////////\\n// Private\\n///////////////\\nfunction getProtData(keySystem){var protData=null;if(keySystem){var keySystemString=keySystem.systemString;if(protDataSet){protData=keySystemString in protDataSet?protDataSet[keySystemString]:null;}}return protData;}function getKeySystemConfiguration(keySystem){var protData=getProtData(keySystem);var audioCapabilities=[];var videoCapabilities=[];var audioRobustness=protData&&protData.audioRobustness&&protData.audioRobustness.length>0?protData.audioRobustness:robustnessLevel;var videoRobustness=protData&&protData.videoRobustness&&protData.videoRobustness.length>0?protData.videoRobustness:robustnessLevel;var ksSessionType=getSessionType(keySystem);var distinctiveIdentifier=protData&&protData.distinctiveIdentifier?protData.distinctiveIdentifier:'optional';var persistentState=protData&&protData.persistentState?protData.persistentState:ksSessionType==='temporary'?'optional':'required';mediaInfoArr.forEach(function(media){if(media.type===constants.AUDIO){audioCapabilities.push(new _MediaCapability2.default(media.codec,audioRobustness));}else if(media.type===constants.VIDEO){videoCapabilities.push(new _MediaCapability2.default(media.codec,videoRobustness));}});return new _KeySystemConfiguration2.default(audioCapabilities,videoCapabilities,distinctiveIdentifier,persistentState,[ksSessionType]);}function getSessionType(keySystem){var protData=getProtData(keySystem);var ksSessionType=protData&&protData.sessionType?protData.sessionType:sessionType;return ksSessionType;}function selectKeySystem(supportedKS,fromManifest){// Reorder key systems according to priority order provided in protectionData\\nsupportedKS=supportedKS.sort(function(ksA,ksB){var indexA=protDataSet&&protDataSet[ksA.ks.systemString]&&protDataSet[ksA.ks.systemString].priority>=0?protDataSet[ksA.ks.systemString].priority:supportedKS.length;var indexB=protDataSet&&protDataSet[ksB.ks.systemString]&&protDataSet[ksB.ks.systemString].priority>=0?protDataSet[ksB.ks.systemString].priority:supportedKS.length;return indexA-indexB;});// First time, so we need to select a key system\\nif(keySystem===undefined){_selectInitialKeySystem(supportedKS,fromManifest);}// We already selected a key system. we only need to trigger a new license exchange if the init data has changed\\nelse if(keySystem){_selectWithExistingKeySystem(supportedKS,fromManifest);}// We are in the process of selecting a key system, so just save the data which might be coming from additional AdaptationSets.\\nelse{pendingNeedKeyData.push(supportedKS);}}function _selectWithExistingKeySystem(supportedKS,fromManifest){var self=this;var requestedKeySystems=[];var ksIdx=supportedKS.findIndex(function(entry){return entry.ks===keySystem;});if(ksIdx===-1||!supportedKS[ksIdx].initData){return;}//  we only need to call this if the init data has changed\\nvar initDataForKs=_CommonEncryption2.default.getPSSHForKeySystem(keySystem,supportedKS[ksIdx].initData);if(_isInitDataDuplicate(initDataForKs)){return;}requestedKeySystems.push({ks:supportedKS[ksIdx].ks,configs:[getKeySystemConfiguration(keySystem)]});// Ensure that we would be granted key system access using the key\\n// system and codec information\\nvar onKeySystemAccessComplete=function onKeySystemAccessComplete(event){eventBus.off(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);if(event.error){if(!fromManifest){eventBus.trigger(events.KEY_SYSTEM_SELECTED,{error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+event.error)});}}else{logger.info('DRM: KeySystem Access Granted');eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:event.data});var protData=getProtData(keySystem);if(protectionKeyController.isClearKey(keySystem)){// For Clearkey: if parameters for generating init data was provided by the user, use them for generating\\n// initData and overwrite possible initData indicated in encrypted event (EME)\\nif(protData&&protData.hasOwnProperty('clearkeys')){var initData={kids:Object.keys(protData.clearkeys)};supportedKS[ksIdx].initData=new TextEncoder().encode(JSON.stringify(initData));}}if(supportedKS[ksIdx].sessionId){// Load MediaKeySession with sessionId\\nloadKeySession(supportedKS[ksIdx].sessionId,supportedKS[ksIdx].initData);}else if(supportedKS[ksIdx].initData){// Create new MediaKeySession with initData\\ncreateKeySession(supportedKS[ksIdx].initData,supportedKS[ksIdx].cdmData);}}};eventBus.on(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);protectionModel.requestKeySystemAccess(requestedKeySystems);}function _selectInitialKeySystem(supportedKS,fromManifest){var self=this;var requestedKeySystems=[];var ksIdx=void 0;// First time through, so we need to select a key system\\nkeySystem=null;pendingNeedKeyData.push(supportedKS);// Add all key systems to our request list since we have yet to select a key system\\nfor(var i=0;i<supportedKS.length;i++){requestedKeySystems.push({ks:supportedKS[i].ks,configs:[getKeySystemConfiguration(supportedKS[i].ks)]});}var keySystemAccess=void 0;var onKeySystemAccessComplete=function onKeySystemAccessComplete(event){eventBus.off(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);if(event.error){keySystem=undefined;eventBus.off(events.INTERNAL_KEY_SYSTEM_SELECTED,onKeySystemSelected,self);if(!fromManifest){eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+event.error)});}}else{keySystemAccess=event.data;logger.info('DRM: KeySystem Access Granted ('+keySystemAccess.keySystem.systemString+')!  Selecting key system...');protectionModel.selectKeySystem(keySystemAccess);}};var onKeySystemSelected=function onKeySystemSelected(event){eventBus.off(events.INTERNAL_KEY_SYSTEM_SELECTED,onKeySystemSelected,self);eventBus.off(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);if(!event.error){if(!protectionModel){return;}keySystem=protectionModel.getKeySystem();eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:keySystemAccess});// Set server certificate from protData\\nvar protData=getProtData(keySystem);if(protData&&protData.serverCertificate&&protData.serverCertificate.length>0){protectionModel.setServerCertificate(BASE64.decodeArray(protData.serverCertificate).buffer);}// Create key session for the remaining AdaptationSets which have been added to pendingNeedKeyData\\nfor(var _i=0;_i<pendingNeedKeyData.length;_i++){for(ksIdx=0;ksIdx<pendingNeedKeyData[_i].length;ksIdx++){if(keySystem===pendingNeedKeyData[_i][ksIdx].ks){if(protectionKeyController.isClearKey(keySystem)){// For Clearkey: if parameters for generating init data was provided by the user, use them for generating\\n// initData and overwrite possible initData indicated in encrypted event (EME)\\nif(protData&&protData.hasOwnProperty('clearkeys')){var initData={kids:Object.keys(protData.clearkeys)};pendingNeedKeyData[_i][ksIdx].initData=new TextEncoder().encode(JSON.stringify(initData));}}if(pendingNeedKeyData[_i][ksIdx].sessionId){// Load MediaKeySession with sessionId\\nloadKeySession(pendingNeedKeyData[_i][ksIdx].sessionId,pendingNeedKeyData[_i][ksIdx].initData);}else if(pendingNeedKeyData[_i][ksIdx].initData!==null){// Create new MediaKeySession with initData\\ncreateKeySession(pendingNeedKeyData[_i][ksIdx].initData,pendingNeedKeyData[_i][ksIdx].cdmData);}break;}}}}else{keySystem=undefined;if(!fromManifest){eventBus.trigger(events.KEY_SYSTEM_SELECTED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,_ProtectionErrors2.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+'Error selecting key system! -- '+event.error)});}}};eventBus.on(events.INTERNAL_KEY_SYSTEM_SELECTED,onKeySystemSelected,self);eventBus.on(events.KEY_SYSTEM_ACCESS_COMPLETE,onKeySystemAccessComplete,self);protectionModel.requestKeySystemAccess(requestedKeySystems);}function sendLicenseRequestCompleteEvent(data,error){eventBus.trigger(events.LICENSE_REQUEST_COMPLETE,{data:data,error:error});}function onKeyStatusChanged(e){if(e.error){eventBus.trigger(events.KEY_STATUSES_CHANGED,{data:null,error:e.error});}else{logger.debug('DRM: key status = '+e.status);}}function onKeyMessage(e){logger.debug('DRM: onKeyMessage');// Dispatch event to applications indicating we received a key message\\nvar keyMessage=e.data;eventBus.trigger(events.KEY_MESSAGE,{data:keyMessage});var messageType=keyMessage.messageType?keyMessage.messageType:'license-request';var message=keyMessage.message;var sessionToken=keyMessage.sessionToken;var protData=getProtData(keySystem);var keySystemString=keySystem?keySystem.systemString:null;var licenseServerData=protectionKeyController.getLicenseServer(keySystem,protData,messageType);var eventData={sessionToken:sessionToken,messageType:messageType};// Ensure message from CDM is not empty\\nif(!message||message.byteLength===0){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE));return;}// Message not destined for license server\\nif(!licenseServerData){logger.debug('DRM: License server request not required for this message (type = '+e.data.messageType+').  Session ID = '+sessionToken.getSessionID());sendLicenseRequestCompleteEvent(eventData);return;}// Perform any special handling for ClearKey\\nif(protectionKeyController.isClearKey(keySystem)){var clearkeys=protectionKeyController.processClearKeyLicenseRequest(keySystem,protData,message);if(clearkeys){logger.debug('DRM: ClearKey license request handled by application!');sendLicenseRequestCompleteEvent(eventData);protectionModel.updateKeySession(sessionToken,clearkeys);return;}}// All remaining key system scenarios require a request to a remote license server\\n// Determine license server URL\\nvar url=null;if(protData&&protData.serverURL){var serverURL=protData.serverURL;if(typeof serverURL==='string'&&serverURL!==''){url=serverURL;}else if((typeof serverURL==='undefined'?'undefined':_typeof(serverURL))==='object'&&serverURL.hasOwnProperty(messageType)){url=serverURL[messageType];}}else if(protData&&protData.laURL&&protData.laURL!==''){// TODO: Deprecated!\\nurl=protData.laURL;}else{// For clearkey use the url defined in the manifest\\nif(protectionKeyController.isClearKey(keySystem)){url=keySystem.getLicenseServerUrlFromMediaInfo(mediaInfoArr);}else{var psshData=_CommonEncryption2.default.getPSSHData(sessionToken.initData);url=keySystem.getLicenseServerURLFromInitData(psshData);if(!url){url=e.data.laURL;}}}// Possibly update or override the URL based on the message\\nurl=licenseServerData.getServerURLFromMessage(url,message,messageType);// Ensure valid license server URL\\nif(!url){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));return;}// Set optional XMLHttpRequest headers from protection data and message\\nvar reqHeaders={};var withCredentials=false;var updateHeaders=function updateHeaders(headers){if(headers){for(var key in headers){if('authorization'===key.toLowerCase()){withCredentials=true;}reqHeaders[key]=headers[key];}}};if(protData){updateHeaders(protData.httpRequestHeaders);}updateHeaders(keySystem.getRequestHeadersFromMessage(message));// Overwrite withCredentials property from protData if present\\nif(protData&&typeof protData.withCredentials=='boolean'){withCredentials=protData.withCredentials;}var reportError=function reportError(xhr,eventData,keySystemString,messageType){var errorMsg=xhr.response?licenseServerData.getErrorResponse(xhr.response,keySystemString,messageType):'NONE';sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+keySystemString+' update, XHR complete. status is \\\"'+xhr.statusText+'\\\" ('+xhr.status+'), readyState is '+xhr.readyState+'.  Response is '+errorMsg));};var onLoad=function onLoad(xhr){if(!protectionModel){return;}if(xhr.status===200){var licenseResponse=new _LicenseResponse2.default(xhr.responseURL,_Utils2.default.parseHttpHeaders(xhr.getAllResponseHeaders?xhr.getAllResponseHeaders():null),xhr.response);applyFilters(licenseResponseFilters,licenseResponse).then(function(){var licenseMessage=licenseServerData.getLicenseMessage(licenseResponse.data,keySystemString,messageType);if(licenseMessage!==null){sendLicenseRequestCompleteEvent(eventData);protectionModel.updateKeySession(sessionToken,licenseMessage);}else{reportError(xhr,eventData,keySystemString,messageType);}});}else{reportError(xhr,eventData,keySystemString,messageType);}};var onAbort=function onAbort(xhr){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+keySystemString+' update, XHR aborted. status is \\\"'+xhr.statusText+'\\\" ('+xhr.status+'), readyState is '+xhr.readyState));};var onError=function onError(xhr){sendLicenseRequestCompleteEvent(eventData,new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+keySystemString+' update, XHR error. status is \\\"'+xhr.statusText+'\\\" ('+xhr.status+'), readyState is '+xhr.readyState));};var reqPayload=keySystem.getLicenseRequestFromMessage(message);var reqMethod=licenseServerData.getHTTPMethod(messageType);var responseType=licenseServerData.getResponseType(keySystemString,messageType);var timeout=protData&&!isNaN(protData.httpTimeout)?protData.httpTimeout:LICENSE_SERVER_REQUEST_DEFAULT_TIMEOUT;var sessionId=sessionToken.getSessionID()||null;var licenseRequest=new _LicenseRequest2.default(url,reqMethod,responseType,reqHeaders,withCredentials,messageType,sessionId,reqPayload);applyFilters(licenseRequestFilters,licenseRequest).then(function(){doLicenseRequest(licenseRequest,LICENSE_SERVER_REQUEST_RETRIES,timeout,onLoad,onAbort,onError);});}// Implement license requests with a retry mechanism to avoid temporary network issues to affect playback experience\\nfunction doLicenseRequest(request,retriesCount,timeout,onLoad,onAbort,onError){var xhr=new XMLHttpRequest();var cmcdParams=cmcdModel.getQueryParameter({url:request.url,type:_HTTPRequest.HTTPRequest.LICENSE});if(cmcdParams){request.url=_Utils2.default.addAditionalQueryParameterToUrl(request.url,[cmcdParams]);}xhr.open(request.method,request.url,true);xhr.responseType=request.responseType;xhr.withCredentials=request.withCredentials;if(timeout>0){xhr.timeout=timeout;}for(var key in request.headers){xhr.setRequestHeader(key,request.headers[key]);}var retryRequest=function retryRequest(){// fail silently and retry\\nretriesCount--;setTimeout(function(){doLicenseRequest(request,retriesCount,timeout,onLoad,onAbort,onError);},LICENSE_SERVER_REQUEST_RETRY_INTERVAL);};xhr.onload=function(){if(this.status===200||retriesCount<=0){onLoad(this);}else{logger.warn('License request failed ('+this.status+'). Retrying it... Pending retries: '+retriesCount);retryRequest();}};xhr.ontimeout=xhr.onerror=function(){if(retriesCount<=0){onError(this);}else{logger.warn('License request network request failed . Retrying it... Pending retries: '+retriesCount);retryRequest();}};xhr.onabort=function(){onAbort(this);};// deprecated, to be removed\\neventBus.trigger(events.LICENSE_REQUEST_SENDING,{url:request.url,headers:request.headers,payload:request.data,sessionId:request.sessionId});xhr.send(request.data);}function onNeedKey(event,retry){logger.debug('DRM: onNeedKey');// Ignore non-cenc initData\\nif(event.key.initDataType!=='cenc'){logger.warn('DRM:  Only \\\\'cenc\\\\' initData is supported!  Ignoring initData of type: '+event.key.initDataType);return;}if(mediaInfoArr.length===0){logger.warn('DRM: onNeedKey called before initializeForMedia, wait until initialized');retry=typeof retry==='undefined'?1:retry+1;if(retry<NEEDKEY_BEFORE_INITIALIZE_RETRIES){needkeyRetries.push(setTimeout(function(){onNeedKey(event,retry);},NEEDKEY_BEFORE_INITIALIZE_TIMEOUT));return;}}// Some browsers return initData as Uint8Array (IE), some as ArrayBuffer (Chrome).\\n// Convert to ArrayBuffer\\nvar abInitData=event.key.initData;if(ArrayBuffer.isView(abInitData)){abInitData=abInitData.buffer;}// If key system has already been selected and initData already seen, then do nothing\\nif(keySystem){var initDataForKS=_CommonEncryption2.default.getPSSHForKeySystem(keySystem,abInitData);if(initDataForKS){// Check for duplicate initData\\nif(_isInitDataDuplicate(initDataForKS)){return;}}}logger.debug('DRM: initData:',String.fromCharCode.apply(null,new Uint8Array(abInitData)));var supportedKS=protectionKeyController.getSupportedKeySystems(abInitData,protDataSet);if(supportedKS.length===0){logger.debug('DRM: Received needkey event with initData, but we don\\\\'t support any of the key systems!');return;}selectKeySystem(supportedKS,false);}function getKeySystems(){return protectionKeyController?protectionKeyController.getKeySystems():[];}function setKeySystems(keySystems){if(protectionKeyController){protectionKeyController.setKeySystems(keySystems);}}function setLicenseRequestFilters(filters){licenseRequestFilters=filters;}function setLicenseResponseFilters(filters){licenseResponseFilters=filters;}function applyFilters(filters,param){if(!filters)return Promise.resolve();return filters.reduce(function(prev,next){return prev.then(function(){return next(param);});},Promise.resolve());}instance={initializeForMedia:initializeForMedia,clearMediaInfoArrayByStreamId:clearMediaInfoArrayByStreamId,createKeySession:createKeySession,loadKeySession:loadKeySession,removeKeySession:removeKeySession,closeKeySession:closeKeySession,setServerCertificate:setServerCertificate,setMediaElement:setMediaElement,setSessionType:setSessionType,setRobustnessLevel:setRobustnessLevel,setProtectionData:setProtectionData,getSupportedKeySystemsFromContentProtection:getSupportedKeySystemsFromContentProtection,getKeySystems:getKeySystems,setKeySystems:setKeySystems,setLicenseRequestFilters:setLicenseRequestFilters,setLicenseResponseFilters:setLicenseResponseFilters,stop:stop,reset:reset};setup();return instance;}ProtectionController.__dashjs_factory_name='ProtectionController';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionController);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _CommonEncryption=__webpack_require__(/*! ./../CommonEncryption */ \"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _KeySystemClearKey=__webpack_require__(/*! ./../drm/KeySystemClearKey */ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js\");var _KeySystemClearKey2=_interopRequireDefault(_KeySystemClearKey);var _KeySystemW3CClearKey=__webpack_require__(/*! ./../drm/KeySystemW3CClearKey */ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js\");var _KeySystemW3CClearKey2=_interopRequireDefault(_KeySystemW3CClearKey);var _KeySystemWidevine=__webpack_require__(/*! ./../drm/KeySystemWidevine */ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js\");var _KeySystemWidevine2=_interopRequireDefault(_KeySystemWidevine);var _KeySystemPlayReady=__webpack_require__(/*! ./../drm/KeySystemPlayReady */ \"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js\");var _KeySystemPlayReady2=_interopRequireDefault(_KeySystemPlayReady);var _DRMToday=__webpack_require__(/*! ./../servers/DRMToday */ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js\");var _DRMToday2=_interopRequireDefault(_DRMToday);var _PlayReady=__webpack_require__(/*! ./../servers/PlayReady */ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js\");var _PlayReady2=_interopRequireDefault(_PlayReady);var _Widevine=__webpack_require__(/*! ./../servers/Widevine */ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js\");var _Widevine2=_interopRequireDefault(_Widevine);var _ClearKey=__webpack_require__(/*! ./../servers/ClearKey */ \"../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js\");var _ClearKey2=_interopRequireDefault(_ClearKey);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module ProtectionKeyController\\n * @ignore\\n * @description Media protection key system functionality that can be modified/overridden by applications\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ProtectionKeyController(){var context=this.context;var instance=void 0,debug=void 0,logger=void 0,keySystems=void 0,BASE64=void 0,clearkeyKeySystem=void 0,clearkeyW3CKeySystem=void 0;function setConfig(config){if(!config)return;if(config.debug){debug=config.debug;logger=debug.getLogger(instance);}if(config.BASE64){BASE64=config.BASE64;}}function initialize(){keySystems=[];var keySystem=void 0;// PlayReady\\nkeySystem=(0,_KeySystemPlayReady2.default)(context).getInstance({BASE64:BASE64});keySystems.push(keySystem);// Widevine\\nkeySystem=(0,_KeySystemWidevine2.default)(context).getInstance({BASE64:BASE64});keySystems.push(keySystem);// ClearKey\\nkeySystem=(0,_KeySystemClearKey2.default)(context).getInstance({BASE64:BASE64});keySystems.push(keySystem);clearkeyKeySystem=keySystem;// W3C ClearKey\\nkeySystem=(0,_KeySystemW3CClearKey2.default)(context).getInstance({BASE64:BASE64,debug:debug});keySystems.push(keySystem);clearkeyW3CKeySystem=keySystem;}/**\\n     * Returns a prioritized list of key systems supported\\n     * by this player (not necessarily those supported by the\\n     * user agent)\\n     *\\n     * @returns {Array.<KeySystem>} a prioritized\\n     * list of key systems\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getKeySystems(){return keySystems;}/**\\n     * Sets the prioritized list of key systems to be supported\\n     * by this player.\\n     *\\n     * @param {Array.<KeySystem>} newKeySystems the new prioritized\\n     * list of key systems\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function setKeySystems(newKeySystems){keySystems=newKeySystems;}/**\\n     * Returns the key system associated with the given key system string\\n     * name (i.e. \\'org.w3.clearkey\\')\\n     *\\n     * @param {string} systemString the system string\\n     * @returns {KeySystem|null} the key system\\n     * or null if no supported key system is associated with the given key\\n     * system string\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getKeySystemBySystemString(systemString){for(var i=0;i<keySystems.length;i++){if(keySystems[i].systemString===systemString){return keySystems[i];}}return null;}/**\\n     * Determines whether the given key system is ClearKey.  This is\\n     * necessary because the EME spec defines ClearKey and its method\\n     * for providing keys to the key session; and this method has changed\\n     * between the various API versions.  Our EME-specific ProtectionModels\\n     * must know if the system is ClearKey so that it can format the keys\\n     * according to the particular spec version.\\n     *\\n     * @param {Object} keySystem the key\\n     * @returns {boolean} true if this is the ClearKey key system, false\\n     * otherwise\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function isClearKey(keySystem){return keySystem===clearkeyKeySystem||keySystem===clearkeyW3CKeySystem;}/**\\n     * Check equality of initData array buffers.\\n     *\\n     * @param {ArrayBuffer} initData1 - first initData\\n     * @param {ArrayBuffer} initData2 - second initData\\n     * @returns {boolean} true if the initData arrays are equal in size and\\n     * contents, false otherwise\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function initDataEquals(initData1,initData2){if(initData1.byteLength===initData2.byteLength){var data1=new Uint8Array(initData1);var data2=new Uint8Array(initData2);for(var j=0;j<data1.length;j++){if(data1[j]!==data2[j]){return false;}}return true;}return false;}/**\\n     * Returns a set of supported key systems and CENC initialization data\\n     * from the given array of ContentProtection elements.  Only\\n     * key systems that are supported by this player will be returned.\\n     * Key systems are returned in priority order (highest first).\\n     *\\n     * @param {Array.<Object>} cps - array of content protection elements parsed\\n     * from the manifest\\n     * @returns {Array.<Object>} array of objects indicating which supported key\\n     * systems were found.  Empty array is returned if no\\n     * supported key systems were found\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getSupportedKeySystemsFromContentProtection(cps){var cp=void 0,ks=void 0,ksIdx=void 0,cpIdx=void 0;var supportedKS=[];if(cps){var cencContentProtection=_CommonEncryption2.default.findCencContentProtection(cps);for(ksIdx=0;ksIdx<keySystems.length;++ksIdx){ks=keySystems[ksIdx];for(cpIdx=0;cpIdx<cps.length;++cpIdx){cp=cps[cpIdx];if(cp.schemeIdUri.toLowerCase()===ks.schemeIdURI){// Look for DRM-specific ContentProtection\\nvar initData=ks.getInitData(cp,cencContentProtection);supportedKS.push({ks:keySystems[ksIdx],initData:initData,cdmData:ks.getCDMData(),sessionId:ks.getSessionId(cp)});}}}}return supportedKS;}/**\\n     * Returns key systems supported by this player for the given PSSH\\n     * initializationData. Only key systems supported by this player\\n     * that have protection data present will be returned.  Key systems are returned in priority order\\n     * (highest priority first)\\n     *\\n     * @param {ArrayBuffer} initData Concatenated PSSH data for all DRMs\\n     * supported by the content\\n     * @param {ProtectionData} protDataSet user specified protection data - license server url etc\\n     * supported by the content\\n     * @returns {Array.<Object>} array of objects indicating which supported key\\n     * systems were found.  Empty array is returned if no\\n     * supported key systems were found\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function getSupportedKeySystems(initData,protDataSet){var supportedKS=[];var pssh=_CommonEncryption2.default.parsePSSHList(initData);var ks=void 0,keySystemString=void 0,shouldNotFilterOutKeySystem=void 0;for(var ksIdx=0;ksIdx<keySystems.length;++ksIdx){ks=keySystems[ksIdx];keySystemString=ks.systemString;shouldNotFilterOutKeySystem=protDataSet?keySystemString in protDataSet:true;if(ks.uuid in pssh&&shouldNotFilterOutKeySystem){supportedKS.push({ks:ks,initData:pssh[ks.uuid],cdmData:ks.getCDMData(),sessionId:ks.getSessionId()});}}return supportedKS;}/**\\n     * Returns the license server implementation data that should be used for this request.\\n     *\\n     * @param {KeySystem} keySystem the key system\\n     * associated with this license request\\n     * @param {ProtectionData} protData protection data to use for the\\n     * request\\n     * @param {string} [messageType=\"license-request\"] the message type associated with this\\n     * request.  Supported message types can be found\\n     * {@link https://w3c.github.io/encrypted-media/#idl-def-MediaKeyMessageType|here}.\\n     * @returns {LicenseServer|null} the license server\\n     * implementation that should be used for this request or null if the player should not\\n     * pass messages of the given type to a license server\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     *\\n     */function getLicenseServer(keySystem,protData,messageType){// Our default server implementations do not do anything with \"license-release\" or\\n// \"individualization-request\" messages, so we just send a success event\\nif(messageType===\\'license-release\\'||messageType===\\'individualization-request\\'){return null;}var licenseServerData=null;if(protData&&protData.hasOwnProperty(\\'drmtoday\\')){licenseServerData=(0,_DRMToday2.default)(context).getInstance({BASE64:BASE64});}else if(keySystem.systemString===_ProtectionConstants2.default.WIDEVINE_KEYSTEM_STRING){licenseServerData=(0,_Widevine2.default)(context).getInstance();}else if(keySystem.systemString===_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING){licenseServerData=(0,_PlayReady2.default)(context).getInstance();}else if(keySystem.systemString===_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING){licenseServerData=(0,_ClearKey2.default)(context).getInstance();}return licenseServerData;}/**\\n     * Allows application-specific retrieval of ClearKey keys.\\n     *\\n     * @param {KeySystem} clearkeyKeySystem They exact ClearKey System to be used\\n     * @param {ProtectionData} protData protection data to use for the\\n     * request\\n     * @param {ArrayBuffer} message the key message from the CDM\\n     * @return {ClearKeyKeySet|null} the clear keys associated with\\n     * the request or null if no keys can be returned by this function\\n     * @memberof module:ProtectionKeyController\\n     * @instance\\n     */function processClearKeyLicenseRequest(clearkeyKeySystem,protData,message){try{return clearkeyKeySystem.getClearKeysFromProtectionData(protData,message);}catch(error){logger.error(\\'Failed to retrieve clearkeys from ProtectionData\\');return null;}}function setProtectionData(protectionDataSet){var getProtectionData=function getProtectionData(keySystemString){var protData=null;if(protectionDataSet){protData=keySystemString in protectionDataSet?protectionDataSet[keySystemString]:null;}return protData;};for(var i=0;i<keySystems.length;i++){var keySystem=keySystems[i];if(keySystem.hasOwnProperty(\\'init\\')){keySystem.init(getProtectionData(keySystem.systemString));}}}instance={initialize:initialize,setProtectionData:setProtectionData,isClearKey:isClearKey,initDataEquals:initDataEquals,getKeySystems:getKeySystems,setKeySystems:setKeySystems,getKeySystemBySystemString:getKeySystemBySystemString,getSupportedKeySystemsFromContentProtection:getSupportedKeySystemsFromContentProtection,getSupportedKeySystems:getSupportedKeySystems,getLicenseServer:getLicenseServer,processClearKeyLicenseRequest:processClearKeyLicenseRequest,setConfig:setConfig};return instance;}ProtectionKeyController.__dashjs_factory_name=\\'ProtectionKeyController\\';exports.default=dashjs.FactoryMaker.getSingletonFactory(ProtectionKeyController);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionKeyController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _KeyPair=__webpack_require__(/*! ../vo/KeyPair */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\\\");var _KeyPair2=_interopRequireDefault(_KeyPair);var _ClearKeyKeySet=__webpack_require__(/*! ../vo/ClearKeyKeySet */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\\\");var _ClearKeyKeySet2=_interopRequireDefault(_ClearKeyKeySet);var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var uuid='e2719d58-a985-b3c9-781a-b030af78d30e';var systemString=_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;function KeySystemClearKey(config){config=config||{};var instance=void 0;var BASE64=config.BASE64;var LICENSE_SERVER_MANIFEST_CONFIGURATIONS={attributes:['Laurl','laurl'],prefixes:['clearkey','dashif']};/**\\n     * Returns desired clearkeys (as specified in the CDM message) from protection data\\n     *\\n     * @param {ProtectionData} protectionData the protection data\\n     * @param {ArrayBuffer} message the ClearKey CDM message\\n     * @returns {ClearKeyKeySet} the key set or null if none found\\n     * @throws {Error} if a keyID specified in the CDM message was not found in the\\n     * protection data\\n     * @memberof KeySystemClearKey\\n     */function getClearKeysFromProtectionData(protectionData,message){var clearkeySet=null;if(protectionData){// ClearKey is the only system that does not require a license server URL, so we\\n// handle it here when keys are specified in protection data\\nvar jsonMsg=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(message)));var keyPairs=[];for(var i=0;i<jsonMsg.kids.length;i++){var clearkeyID=jsonMsg.kids[i];var clearkey=protectionData.clearkeys&&protectionData.clearkeys.hasOwnProperty(clearkeyID)?protectionData.clearkeys[clearkeyID]:null;if(!clearkey){throw new Error('DRM: ClearKey keyID ('+clearkeyID+') is not known!');}// KeyIDs from CDM are not base64 padded.  Keys may or may not be padded\\nkeyPairs.push(new _KeyPair2.default(clearkeyID,clearkey));}clearkeySet=new _ClearKeyKeySet2.default(keyPairs);}return clearkeySet;}function getInitData(cp,cencContentProtection){try{var initData=_CommonEncryption2.default.parseInitDataFromContentProtection(cp,BASE64);if(!initData&&cencContentProtection){var cencDefaultKid=cencDefaultKidToBase64Representation(cencContentProtection['cenc:default_KID']);var data={kids:[cencDefaultKid]};initData=new TextEncoder().encode(JSON.stringify(data));}return initData;}catch(e){return null;}}function cencDefaultKidToBase64Representation(cencDefaultKid){try{var kid=cencDefaultKid.replace(/-/g,'');kid=btoa(kid.match(/\\\\w{2}/g).map(function(a){return String.fromCharCode(parseInt(a,16));}).join(''));return kid.replace(/=/g,'');}catch(e){return null;}}function getRequestHeadersFromMessage()/*message*/{// Set content type to application/json by default\\nreturn{'Content-Type':'application/json'};}function getLicenseRequestFromMessage(message){return JSON.parse(String.fromCharCode.apply(null,new Uint8Array(message)));}function getLicenseServerURLFromInitData()/*initData*/{return null;}function getLicenseServerUrlFromMediaInfo(mediaInfo){try{if(!mediaInfo||mediaInfo.length===0){return null;}var i=0;var licenseServer=null;while(i<mediaInfo.length&&!licenseServer){var info=mediaInfo[i];if(info&&info.contentProtection&&info.contentProtection.length>0){var clearkeyProtData=info.contentProtection.filter(function(cp){return cp.schemeIdUri&&cp.schemeIdUri===schemeIdURI;});if(clearkeyProtData&&clearkeyProtData.length>0){var j=0;while(j<clearkeyProtData.length&&!licenseServer){var ckData=clearkeyProtData[j];var k=0;while(k<LICENSE_SERVER_MANIFEST_CONFIGURATIONS.attributes.length&&!licenseServer){var l=0;var attribute=LICENSE_SERVER_MANIFEST_CONFIGURATIONS.attributes[k];while(l<LICENSE_SERVER_MANIFEST_CONFIGURATIONS.prefixes.length&&!licenseServer){var prefix=LICENSE_SERVER_MANIFEST_CONFIGURATIONS.prefixes[l];if(ckData[attribute]&&ckData[attribute].__prefix&&ckData[attribute].__prefix===prefix&&ckData[attribute].__text){licenseServer=ckData[attribute].__text;}l+=1;}k+=1;}j+=1;}}}i+=1;}return licenseServer;}catch(e){return null;}}function getCDMData(){return null;}function getSessionId()/*cp*/{return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId,getLicenseServerUrlFromMediaInfo:getLicenseServerUrlFromMediaInfo,getClearKeysFromProtectionData:getClearKeysFromProtectionData};return instance;}KeySystemClearKey.__dashjs_factory_name='KeySystemClearKey';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemClearKey);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemClearKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemClearKey.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Microsoft PlayReady DRM\\n *\\n * @class\\n * @implements KeySystem\\n */var uuid='9a04f079-9840-4286-ab92-e65be0885f95';var systemString=_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;var PRCDMData='<PlayReadyCDMData type=\\\"LicenseAcquisition\\\"><LicenseAcquisition version=\\\"1.0\\\" Proactive=\\\"false\\\"><CustomData encoding=\\\"base64encoded\\\">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>';var protData=void 0;function KeySystemPlayReady(config){config=config||{};var instance=void 0;var messageFormat='utf-16';var BASE64=config.BASE64;function checkConfig(){if(!BASE64||!BASE64.hasOwnProperty('decodeArray')||!BASE64.hasOwnProperty('decodeArray')){throw new Error('Missing config parameter(s)');}}function getRequestHeadersFromMessage(message){var msg=void 0,xmlDoc=void 0;var headers={};var parser=new DOMParser();var dataview=messageFormat==='utf-16'?new Uint16Array(message):new Uint8Array(message);msg=String.fromCharCode.apply(null,dataview);xmlDoc=parser.parseFromString(msg,'application/xml');var headerNameList=xmlDoc.getElementsByTagName('name');var headerValueList=xmlDoc.getElementsByTagName('value');for(var i=0;i<headerNameList.length;i++){headers[headerNameList[i].childNodes[0].nodeValue]=headerValueList[i].childNodes[0].nodeValue;}// Some versions of the PlayReady CDM return 'Content' instead of 'Content-Type'.\\n// this is NOT w3c conform and license servers may reject the request!\\n// -> rename it to proper w3c definition!\\nif(headers.hasOwnProperty('Content')){headers['Content-Type']=headers.Content;delete headers.Content;}// Set Content-Type header by default if not provided in the the CDM message (<PlayReadyKeyMessage/>)\\n// or if the message contains directly the challenge itself (Ex: LG SmartTVs)\\nif(!headers.hasOwnProperty('Content-Type')){headers['Content-Type']='text/xml; charset=utf-8';}return headers;}function getLicenseRequestFromMessage(message){var licenseRequest=null;var parser=new DOMParser();var dataview=messageFormat==='utf-16'?new Uint16Array(message):new Uint8Array(message);checkConfig();var msg=String.fromCharCode.apply(null,dataview);var xmlDoc=parser.parseFromString(msg,'application/xml');if(xmlDoc.getElementsByTagName('PlayReadyKeyMessage')[0]){var Challenge=xmlDoc.getElementsByTagName('Challenge')[0].childNodes[0].nodeValue;if(Challenge){licenseRequest=BASE64.decode(Challenge);}}else{// The message from CDM is not a wrapped message as on IE11 and Edge,\\n// thus it contains direclty the challenge itself\\n// (note that the xmlDoc at this point may be unreadable since it may have been interpreted as UTF-16)\\nreturn message;}return licenseRequest;}function getLicenseServerURLFromInitData(initData){if(initData){var data=new DataView(initData);var numRecords=data.getUint16(4,true);var offset=6;var parser=new DOMParser();for(var i=0;i<numRecords;i++){// Parse the PlayReady Record header\\nvar recordType=data.getUint16(offset,true);offset+=2;var recordLength=data.getUint16(offset,true);offset+=2;if(recordType!==0x0001){offset+=recordLength;continue;}var recordData=initData.slice(offset,offset+recordLength);var record=String.fromCharCode.apply(null,new Uint16Array(recordData));var xmlDoc=parser.parseFromString(record,'application/xml');// First try <LA_URL>\\nif(xmlDoc.getElementsByTagName('LA_URL')[0]){var laurl=xmlDoc.getElementsByTagName('LA_URL')[0].childNodes[0].nodeValue;if(laurl){return laurl;}}// Optionally, try <LUI_URL>\\nif(xmlDoc.getElementsByTagName('LUI_URL')[0]){var luiurl=xmlDoc.getElementsByTagName('LUI_URL')[0].childNodes[0].nodeValue;if(luiurl){return luiurl;}}}}return null;}function getInitData(cpData){// * desc@ getInitData\\n// *   generate PSSH data from PROHeader defined in MPD file\\n// *   PSSH format:\\n// *   size (4)\\n// *   box type(PSSH) (8)\\n// *   Protection SystemID (16)\\n// *   protection system data size (4) - length of decoded PROHeader\\n// *   decoded PROHeader data from MPD file\\nvar PSSHBoxType=new Uint8Array([0x70,0x73,0x73,0x68,0x00,0x00,0x00,0x00]);//'PSSH' 8 bytes\\nvar playreadySystemID=new Uint8Array([0x9a,0x04,0xf0,0x79,0x98,0x40,0x42,0x86,0xab,0x92,0xe6,0x5b,0xe0,0x88,0x5f,0x95]);var byteCursor=0;var uint8arraydecodedPROHeader=null;var PROSize=void 0,PSSHSize=void 0,PSSHBoxBuffer=void 0,PSSHBox=void 0,PSSHData=void 0;checkConfig();if(!cpData){return null;}// Handle common encryption PSSH\\nif('pssh'in cpData){return _CommonEncryption2.default.parseInitDataFromContentProtection(cpData,BASE64);}// Handle native MS PlayReady ContentProtection elements\\nif('pro'in cpData){uint8arraydecodedPROHeader=BASE64.decodeArray(cpData.pro.__text);}else if('prheader'in cpData){uint8arraydecodedPROHeader=BASE64.decodeArray(cpData.prheader.__text);}else{return null;}PROSize=uint8arraydecodedPROHeader.length;PSSHSize=0x4+PSSHBoxType.length+playreadySystemID.length+0x4+PROSize;PSSHBoxBuffer=new ArrayBuffer(PSSHSize);PSSHBox=new Uint8Array(PSSHBoxBuffer);PSSHData=new DataView(PSSHBoxBuffer);PSSHData.setUint32(byteCursor,PSSHSize);byteCursor+=0x4;PSSHBox.set(PSSHBoxType,byteCursor);byteCursor+=PSSHBoxType.length;PSSHBox.set(playreadySystemID,byteCursor);byteCursor+=playreadySystemID.length;PSSHData.setUint32(byteCursor,PROSize);byteCursor+=0x4;PSSHBox.set(uint8arraydecodedPROHeader,byteCursor);byteCursor+=PROSize;return PSSHBox.buffer;}/**\\n     * It seems that some PlayReady implementations return their XML-based CDM\\n     * messages using UTF16, while others return them as UTF8.  Use this function\\n     * to modify the message format to expect when parsing CDM messages.\\n     *\\n     * @param {string} format the expected message format.  Either \\\"utf-8\\\" or \\\"utf-16\\\".\\n     * @throws {Error} Specified message format is not one of \\\"utf8\\\" or \\\"utf16\\\"\\n     */function setPlayReadyMessageFormat(format){if(format!=='utf-8'&&format!=='utf-16'){throw new Error('Specified message format is not one of \\\"utf-8\\\" or \\\"utf-16\\\"');}messageFormat=format;}/**\\n     * Initialize the Key system with protection data\\n     * @param {Object} protectionData the protection data\\n     */function init(protectionData){if(protectionData){protData=protectionData;}}/**\\n     * Get Playready Custom data\\n     */function getCDMData(){var customData=void 0,cdmData=void 0,cdmDataBytes=void 0,i=void 0;checkConfig();if(protData&&protData.cdmData){// Convert custom data into multibyte string\\ncustomData=[];for(i=0;i<protData.cdmData.length;++i){customData.push(protData.cdmData.charCodeAt(i));customData.push(0);}customData=String.fromCharCode.apply(null,customData);// Encode in Base 64 the custom data string\\ncustomData=BASE64.encode(customData);// Initialize CDM data with Base 64 encoded custom data\\n// (see https://msdn.microsoft.com/en-us/library/dn457361.aspx)\\ncdmData=PRCDMData.replace('%CUSTOMDATA%',customData);// Convert CDM data into multibyte characters\\ncdmDataBytes=[];for(i=0;i<cdmData.length;++i){cdmDataBytes.push(cdmData.charCodeAt(i));cdmDataBytes.push(0);}return new Uint8Array(cdmDataBytes).buffer;}return null;}function getSessionId(cp){// Get sessionId from protectionData or from manifest\\nif(protData&&protData.sessionId){return protData.sessionId;}else if(cp&&cp.sessionId){return cp.sessionId;}return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId,setPlayReadyMessageFormat:setPlayReadyMessageFormat,init:init};return instance;}KeySystemPlayReady.__dashjs_factory_name='KeySystemPlayReady';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemPlayReady);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemPlayReady.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemPlayReady.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _KeyPair=__webpack_require__(/*! ../vo/KeyPair */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\\\");var _KeyPair2=_interopRequireDefault(_KeyPair);var _ClearKeyKeySet=__webpack_require__(/*! ../vo/ClearKeyKeySet */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\\\");var _ClearKeyKeySet2=_interopRequireDefault(_ClearKeyKeySet);var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var uuid='1077efec-c0b2-4d02-ace3-3c1e52e2fb4b';var systemString=_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;function KeySystemW3CClearKey(config){var instance=void 0;var BASE64=config.BASE64;var logger=config.debug.getLogger(instance);/**\\n     * Returns desired clearkeys (as specified in the CDM message) from protection data\\n     *\\n     * @param {ProtectionDataSet} protectionData the protection data\\n     * @param {ArrayBuffer} message the ClearKey CDM message\\n     * @returns {ClearKeyKeySet} the key set or null if none found\\n     * @throws {Error} if a keyID specified in the CDM message was not found in the\\n     * protection data\\n     * @memberof KeySystemClearKey\\n     */function getClearKeysFromProtectionData(protectionData,message){var clearkeySet=null;if(protectionData){// ClearKey is the only system that does not require a license server URL, so we\\n// handle it here when keys are specified in protection data\\nvar jsonMsg=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(message)));var keyPairs=[];for(var i=0;i<jsonMsg.kids.length;i++){var clearkeyID=jsonMsg.kids[i];var clearkey=protectionData.clearkeys&&protectionData.clearkeys.hasOwnProperty(clearkeyID)?protectionData.clearkeys[clearkeyID]:null;if(!clearkey){throw new Error('DRM: ClearKey keyID ('+clearkeyID+') is not known!');}// KeyIDs from CDM are not base64 padded.  Keys may or may not be padded\\nkeyPairs.push(new _KeyPair2.default(clearkeyID,clearkey));}clearkeySet=new _ClearKeyKeySet2.default(keyPairs);logger.warn('ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4');}return clearkeySet;}function getInitData(cp){return _CommonEncryption2.default.parseInitDataFromContentProtection(cp,BASE64);}function getRequestHeadersFromMessage()/*message*/{return null;}function getLicenseRequestFromMessage(message){return new Uint8Array(message);}function getLicenseServerURLFromInitData()/*initData*/{return null;}function getCDMData(){return null;}function getSessionId()/*cp*/{return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId,getClearKeysFromProtectionData:getClearKeysFromProtectionData};return instance;}KeySystemW3CClearKey.__dashjs_factory_name='KeySystemW3CClearKey';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemW3CClearKey);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemW3CClearKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemW3CClearKey.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _CommonEncryption=__webpack_require__(/*! ../CommonEncryption */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/CommonEncryption.js\\\");var _CommonEncryption2=_interopRequireDefault(_CommonEncryption);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Google Widevine DRM\\n *\\n * @class\\n * @implements MediaPlayer.dependencies.protection.KeySystem\\n */var uuid='edef8ba9-79d6-4ace-a3c8-27dcd51d21ed';var systemString=_ProtectionConstants2.default.WIDEVINE_KEYSTEM_STRING;var schemeIdURI='urn:uuid:'+uuid;function KeySystemWidevine(config){config=config||{};var instance=void 0;var protData=null;var BASE64=config.BASE64;function init(protectionData){if(protectionData){protData=protectionData;}}function getInitData(cp){return _CommonEncryption2.default.parseInitDataFromContentProtection(cp,BASE64);}function getRequestHeadersFromMessage()/*message*/{return null;}function getLicenseRequestFromMessage(message){return new Uint8Array(message);}function getLicenseServerURLFromInitData()/*initData*/{return null;}function getCDMData(){return null;}function getSessionId(cp){// Get sessionId from protectionData or from manifest\\nif(protData&&protData.sessionId){return protData.sessionId;}else if(cp&&cp.sessionId){return cp.sessionId;}return null;}instance={uuid:uuid,schemeIdURI:schemeIdURI,systemString:systemString,init:init,getInitData:getInitData,getRequestHeadersFromMessage:getRequestHeadersFromMessage,getLicenseRequestFromMessage:getLicenseRequestFromMessage,getLicenseServerURLFromInitData:getLicenseServerURLFromInitData,getCDMData:getCDMData,getSessionId:getSessionId};return instance;}KeySystemWidevine.__dashjs_factory_name='KeySystemWidevine';exports.default=dashjs.FactoryMaker.getSingletonFactory(KeySystemWidevine);/* jshint ignore:line */\\n//# sourceMappingURL=KeySystemWidevine.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/drm/KeySystemWidevine.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ErrorsBase2=__webpack_require__(/*! ../../../core/errors/ErrorsBase */ \\\"../node_modules/dashjs/build/es5/src/core/errors/ErrorsBase.js\\\");var _ErrorsBase3=_interopRequireDefault(_ErrorsBase2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");}return call&&(typeof call===\\\"object\\\"||typeof call===\\\"function\\\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\\\"function\\\"&&superClass!==null){throw new TypeError(\\\"Super expression must either be null or a function, not \\\"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n */var ProtectionErrors=function(_ErrorsBase){_inherits(ProtectionErrors,_ErrorsBase);function ProtectionErrors(){_classCallCheck(this,ProtectionErrors);/**\\n         *  Generid key Error code\\n         */var _this=_possibleConstructorReturn(this,(ProtectionErrors.__proto__||Object.getPrototypeOf(ProtectionErrors)).call(this));_this.MEDIA_KEYERR_CODE=100;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_UNKNOWN_CODE=101;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_CLIENT_CODE=102;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_SERVICE_CODE=103;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_OUTPUT_CODE=104;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105;/**\\n         *  Error code returned by keyerror api for ProtectionModel_01b\\n         */_this.MEDIA_KEYERR_DOMAIN_CODE=106;/**\\n         *  Error code returned when an error occured in keymessage event for ProtectionModel_01b\\n         */_this.MEDIA_KEY_MESSAGE_ERROR_CODE=107;/**\\n         *  Error code returned when challenge is invalid in keymessage event (event triggered by CDM)\\n         */_this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108;/**\\n         *  Error code returned when License server certificate has not been successfully updated\\n         */_this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109;/**\\n         *  Error code returned when license validity has expired\\n         */_this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110;/**\\n         *  Error code returned when no licenser url is defined\\n         */_this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111;/**\\n         *  Error code returned when key system access is denied\\n         */_this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112;/**\\n         *  Error code returned when key session has not been successfully created\\n         */_this.KEY_SESSION_CREATED_ERROR_CODE=113;/**\\n         *  Error code returned when license request failed after a keymessage event has been triggered\\n         */_this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114;_this.MEDIA_KEYERR_UNKNOWN_MESSAGE='An unspecified error occurred. This value is used for errors that don\\\\'t match any of the other codes.';_this.MEDIA_KEYERR_CLIENT_MESSAGE='The Key System could not be installed or updated.';_this.MEDIA_KEYERR_SERVICE_MESSAGE='The message passed into update indicated an error from the license service.';_this.MEDIA_KEYERR_OUTPUT_MESSAGE='There is no available output device with the required characteristics for the content protection system.';_this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE='A hardware configuration change caused a content protection error.';_this.MEDIA_KEYERR_DOMAIN_MESSAGE='An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.';_this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE='Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!';_this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE='DRM: Empty key message from CDM';_this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE='Error updating server certificate -- ';_this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE='DRM: KeyStatusChange error! -- License has expired';_this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE='DRM: No license server URL specified!';_this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE='DRM: KeySystem Access Denied! -- ';_this.KEY_SESSION_CREATED_ERROR_MESSAGE='DRM: unable to create session! --';_this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE='DRM: licenser error! --';return _this;}return ProtectionErrors;}(_ErrorsBase3.default);var protectionErrors=new ProtectionErrors();exports.default=protectionErrors;\\n//# sourceMappingURL=ProtectionErrors.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionKeyController=__webpack_require__(/*! ../controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _NeedKey=__webpack_require__(/*! ../vo/NeedKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\\\");var _NeedKey2=_interopRequireDefault(_NeedKey);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _KeyMessage=__webpack_require__(/*! ../vo/KeyMessage */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\\\");var _KeyMessage2=_interopRequireDefault(_KeyMessage);var _KeySystemConfiguration=__webpack_require__(/*! ../vo/KeySystemConfiguration */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\\\");var _KeySystemConfiguration2=_interopRequireDefault(_KeySystemConfiguration);var _KeySystemAccess=__webpack_require__(/*! ../vo/KeySystemAccess */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\\\");var _KeySystemAccess2=_interopRequireDefault(_KeySystemAccess);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ProtectionModel_01b(config){config=config||{};var context=this.context;var eventBus=config.eventBus;//Need to pass in here so we can use same instance since this is optional module\\nvar events=config.events;var debug=config.debug;var api=config.api;var errHandler=config.errHandler;var instance=void 0,logger=void 0,videoElement=void 0,keySystem=void 0,protectionKeyController=void 0,// With this version of the EME APIs, sessionIDs are not assigned to\\n// sessions until the first key message is received.  We are assuming\\n// that in the case of multiple sessions, key messages will be received\\n// in the order that generateKeyRequest() is called.\\n// Holding spot for newly-created sessions until we determine whether or\\n// not the CDM supports sessionIDs\\npendingSessions=void 0,// List of sessions that have been initialized.  Only the first position will\\n// be used in the case that the CDM does not support sessionIDs\\nsessions=void 0,// Not all CDMs support the notion of sessionIDs.  Without sessionIDs\\n// there is no way for us to differentiate between sessions, therefore\\n// we must only allow a single session.  Once we receive the first key\\n// message we can set this flag to determine if more sessions are allowed\\nmoreSessionsAllowed=void 0,// This is our main event handler for all desired HTMLMediaElement events\\n// related to EME.  These events are translated into our API-independent\\n// versions of the same events\\neventHandler=void 0;function setup(){logger=debug.getLogger(instance);videoElement=null;keySystem=null;pendingSessions=[];sessions=[];protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();eventHandler=createEventHandler();}function reset(){if(videoElement){removeEventListeners();}for(var i=0;i<sessions.length;i++){closeKeySession(sessions[i]);}eventBus.trigger(events.TEARDOWN_COMPLETE);}function getKeySystem(){return keySystem;}function getAllInitData(){var retVal=[];for(var i=0;i<pendingSessions.length;i++){retVal.push(pendingSessions[i].initData);}for(var _i=0;_i<sessions.length;_i++){retVal.push(sessions[_i].initData);}return retVal;}function requestKeySystemAccess(ksConfigurations){var ve=videoElement;if(!ve){// Must have a video element to do this capability tests\\nve=document.createElement('video');}// Try key systems in order, first one with supported key system configuration\\n// is used\\nvar found=false;for(var ksIdx=0;ksIdx<ksConfigurations.length;ksIdx++){var systemString=ksConfigurations[ksIdx].ks.systemString;var configs=ksConfigurations[ksIdx].configs;var supportedAudio=null;var supportedVideo=null;// Try key system configs in order, first one with supported audio/video\\n// is used\\nfor(var configIdx=0;configIdx<configs.length;configIdx++){//let audios = configs[configIdx].audioCapabilities;\\nvar videos=configs[configIdx].videoCapabilities;// Look for supported video container/codecs\\nif(videos&&videos.length!==0){supportedVideo=[];// Indicates that we have a requested video config\\nfor(var videoIdx=0;videoIdx<videos.length;videoIdx++){if(ve.canPlayType(videos[videoIdx].contentType,systemString)!==''){supportedVideo.push(videos[videoIdx]);}}}// No supported audio or video in this configuration OR we have\\n// requested audio or video configuration that is not supported\\nif(!supportedAudio&&!supportedVideo||supportedAudio&&supportedAudio.length===0||supportedVideo&&supportedVideo.length===0){continue;}// This configuration is supported\\nfound=true;var ksConfig=new _KeySystemConfiguration2.default(supportedAudio,supportedVideo);var ks=protectionKeyController.getKeySystemBySystemString(systemString);eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{data:new _KeySystemAccess2.default(ks,ksConfig)});break;}}if(!found){eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Key system access denied! -- No valid audio/video content configurations detected!'});}}function selectKeySystem(keySystemAccess){keySystem=keySystemAccess.keySystem;eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);}function setMediaElement(mediaElement){if(videoElement===mediaElement){return;}// Replacing the previous element\\nif(videoElement){removeEventListeners();// Close any open sessions - avoids memory leak on LG webOS 2016/2017 TVs\\nfor(var i=0;i<sessions.length;i++){closeKeySession(sessions[i]);}sessions=[];}videoElement=mediaElement;// Only if we are not detaching from the existing element\\nif(videoElement){videoElement.addEventListener(api.keyerror,eventHandler);videoElement.addEventListener(api.needkey,eventHandler);videoElement.addEventListener(api.keymessage,eventHandler);videoElement.addEventListener(api.keyadded,eventHandler);eventBus.trigger(events.VIDEO_ELEMENT_SELECTED);}}function createKeySession(initData/*, protData, keySystemType */){if(!keySystem){throw new Error('Can not create sessions until you have selected a key system');}// Determine if creating a new session is allowed\\nif(moreSessionsAllowed||sessions.length===0){var newSession={// Implements SessionToken\\nsessionID:null,initData:initData,getSessionID:function getSessionID(){return this.sessionID;},getExpirationTime:function getExpirationTime(){return NaN;},getSessionType:function getSessionType(){return'temporary';}};pendingSessions.push(newSession);// Send our request to the CDM\\nvideoElement[api.generateKeyRequest](keySystem.systemString,new Uint8Array(initData));return newSession;}else{throw new Error('Multiple sessions not allowed!');}}function updateKeySession(sessionToken,message){var sessionID=sessionToken.sessionID;if(!protectionKeyController.isClearKey(keySystem)){// Send our request to the CDM\\nvideoElement[api.addKey](keySystem.systemString,new Uint8Array(message),new Uint8Array(sessionToken.initData),sessionID);}else{// For clearkey, message is a ClearKeyKeySet\\nfor(var i=0;i<message.keyPairs.length;i++){videoElement[api.addKey](keySystem.systemString,message.keyPairs[i].key,message.keyPairs[i].keyID,sessionID);}}}function closeKeySession(sessionToken){// Send our request to the CDM\\ntry{videoElement[api.cancelKeyRequest](keySystem.systemString,sessionToken.sessionID);}catch(error){eventBus.trigger(events.KEY_SESSION_CLOSED,{data:null,error:'Error closing session ('+sessionToken.sessionID+') '+error.message});}}function setServerCertificate()/*serverCertificate*/{/* Not supported */}function loadKeySession()/*sessionID*/{/* Not supported */}function removeKeySession()/*sessionToken*/{/* Not supported */}function createEventHandler(){return{handleEvent:function handleEvent(event){var sessionToken=null;switch(event.type){case api.needkey:var initData=ArrayBuffer.isView(event.initData)?event.initData.buffer:event.initData;eventBus.trigger(events.NEED_KEY,{key:new _NeedKey2.default(initData,'cenc')});break;case api.keyerror:sessionToken=findSessionByID(sessions,event.sessionId);if(!sessionToken){sessionToken=findSessionByID(pendingSessions,event.sessionId);}if(sessionToken){var code=_ProtectionErrors2.default.MEDIA_KEYERR_CODE;var msg='';switch(event.errorCode.code){case 1:code=_ProtectionErrors2.default.MEDIA_KEYERR_UNKNOWN_CODE;msg+='MEDIA_KEYERR_UNKNOWN - '+_ProtectionErrors2.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:code=_ProtectionErrors2.default.MEDIA_KEYERR_CLIENT_CODE;msg+='MEDIA_KEYERR_CLIENT - '+_ProtectionErrors2.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:code=_ProtectionErrors2.default.MEDIA_KEYERR_SERVICE_CODE;msg+='MEDIA_KEYERR_SERVICE - '+_ProtectionErrors2.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:code=_ProtectionErrors2.default.MEDIA_KEYERR_OUTPUT_CODE;msg+='MEDIA_KEYERR_OUTPUT - '+_ProtectionErrors2.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:code=_ProtectionErrors2.default.MEDIA_KEYERR_HARDWARECHANGE_CODE;msg+='MEDIA_KEYERR_HARDWARECHANGE - '+_ProtectionErrors2.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:code=_ProtectionErrors2.default.MEDIA_KEYERR_DOMAIN_CODE;msg+='MEDIA_KEYERR_DOMAIN - '+_ProtectionErrors2.default.MEDIA_KEYERR_DOMAIN_MESSAGE;break;}msg+='  System Code = '+event.systemCode;// TODO: Build error string based on key error\\neventBus.trigger(events.KEY_ERROR,{data:new _DashJSError2.default(code,msg,sessionToken)});}else{logger.error('No session token found for key error');}break;case api.keyadded:sessionToken=findSessionByID(sessions,event.sessionId);if(!sessionToken){sessionToken=findSessionByID(pendingSessions,event.sessionId);}if(sessionToken){logger.debug('DRM: Key added.');eventBus.trigger(events.KEY_ADDED,{data:sessionToken});//TODO not sure anything is using sessionToken? why there?\\n}else{logger.debug('No session token found for key added');}break;case api.keymessage:// If this CDM does not support session IDs, we will be limited\\n// to a single session\\nmoreSessionsAllowed=event.sessionId!==null&&event.sessionId!==undefined;// SessionIDs supported\\nif(moreSessionsAllowed){// Attempt to find an uninitialized token with this sessionID\\nsessionToken=findSessionByID(sessions,event.sessionId);if(!sessionToken&&pendingSessions.length>0){// This is the first message for our latest session, so set the\\n// sessionID and add it to our list\\nsessionToken=pendingSessions.shift();sessions.push(sessionToken);sessionToken.sessionID=event.sessionId;eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}}else if(pendingSessions.length>0){// SessionIDs not supported\\nsessionToken=pendingSessions.shift();sessions.push(sessionToken);if(pendingSessions.length!==0){errHandler.error(new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_ERROR_CODE,_ProtectionErrors2.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE));}}if(sessionToken){var message=ArrayBuffer.isView(event.message)?event.message.buffer:event.message;// For ClearKey, the spec mandates that you pass this message to the\\n// addKey method, so we always save it to the token since there is no\\n// way to tell which key system is in use\\nsessionToken.keyMessage=message;eventBus.trigger(events.INTERNAL_KEY_MESSAGE,{data:new _KeyMessage2.default(sessionToken,message,event.defaultURL)});}else{logger.warn('No session token found for key message');}break;}}};}/**\\n     * Helper function to retrieve the stored session token based on a given\\n     * sessionID value\\n     *\\n     * @param {Array} sessionArray - the array of sessions to search\\n     * @param {*} sessionID - the sessionID to search for\\n     * @returns {*} the session token with the given sessionID\\n     */function findSessionByID(sessionArray,sessionID){if(!sessionID||!sessionArray){return null;}else{var len=sessionArray.length;for(var i=0;i<len;i++){if(sessionArray[i].sessionID==sessionID){return sessionArray[i];}}return null;}}function removeEventListeners(){videoElement.removeEventListener(api.keyerror,eventHandler);videoElement.removeEventListener(api.needkey,eventHandler);videoElement.removeEventListener(api.keymessage,eventHandler);videoElement.removeEventListener(api.keyadded,eventHandler);}instance={getAllInitData:getAllInitData,requestKeySystemAccess:requestKeySystemAccess,getKeySystem:getKeySystem,selectKeySystem:selectKeySystem,setMediaElement:setMediaElement,createKeySession:createKeySession,updateKeySession:updateKeySession,closeKeySession:closeKeySession,setServerCertificate:setServerCertificate,loadKeySession:loadKeySession,removeKeySession:removeKeySession,stop:reset,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Initial implementation of EME\\n *\\n * Implemented by Google Chrome prior to v36\\n *\\n * @implements ProtectionModel\\n * @class\\n */ProtectionModel_01b.__dashjs_factory_name='ProtectionModel_01b';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionModel_01b);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionModel_01b.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_01b.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionKeyController=__webpack_require__(/*! ../controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _NeedKey=__webpack_require__(/*! ../vo/NeedKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\\\");var _NeedKey2=_interopRequireDefault(_NeedKey);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _KeyMessage=__webpack_require__(/*! ../vo/KeyMessage */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\\\");var _KeyMessage2=_interopRequireDefault(_KeyMessage);var _KeySystemAccess=__webpack_require__(/*! ../vo/KeySystemAccess */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\\\");var _KeySystemAccess2=_interopRequireDefault(_KeySystemAccess);var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ProtectionModel_21Jan2015(config){config=config||{};var context=this.context;var eventBus=config.eventBus;//Need to pass in here so we can use same instance since this is optional module\\nvar events=config.events;var debug=config.debug;var instance=void 0,logger=void 0,keySystem=void 0,videoElement=void 0,mediaKeys=void 0,sessions=void 0,eventHandler=void 0,protectionKeyController=void 0;function setup(){logger=debug.getLogger(instance);keySystem=null;videoElement=null;mediaKeys=null;sessions=[];protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();eventHandler=createEventHandler();}function reset(){var numSessions=sessions.length;var session=void 0;if(numSessions!==0){(function(){// Called when we are done closing a session.  Success or fail\\nvar done=function done(session){removeSession(session);if(sessions.length===0){if(videoElement){videoElement.removeEventListener('encrypted',eventHandler);videoElement.setMediaKeys(null).then(function(){eventBus.trigger(events.TEARDOWN_COMPLETE);});}else{eventBus.trigger(events.TEARDOWN_COMPLETE);}}};for(var i=0;i<numSessions;i++){session=sessions[i];(function(s){// Override closed promise resolver\\nsession.session.closed.then(function(){done(s);});// Close the session and handle errors, otherwise promise\\n// resolver above will be called\\ncloseKeySessionInternal(session).catch(function(){done(s);});})(session);}})();}else{eventBus.trigger(events.TEARDOWN_COMPLETE);}}function stop(){// Close and remove not usable sessions\\nvar session=void 0;for(var i=0;i<sessions.length;i++){session=sessions[i];if(!session.getUsable()){closeKeySessionInternal(session).catch(function(){removeSession(session);});}}}function getKeySystem(){return keySystem;}function getAllInitData(){var retVal=[];for(var i=0;i<sessions.length;i++){if(sessions[i].initData){retVal.push(sessions[i].initData);}}return retVal;}function requestKeySystemAccess(ksConfigurations){requestKeySystemAccessInternal(ksConfigurations,0);}function selectKeySystem(keySystemAccess){keySystemAccess.mksa.createMediaKeys().then(function(mkeys){keySystem=keySystemAccess.keySystem;mediaKeys=mkeys;if(videoElement){videoElement.setMediaKeys(mediaKeys).then(function(){eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);});}else{eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);}}).catch(function(){eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED,{error:'Error selecting keys system ('+keySystemAccess.keySystem.systemString+')! Could not create MediaKeys -- TODO'});});}function setMediaElement(mediaElement){if(videoElement===mediaElement)return;// Replacing the previous element\\nif(videoElement){videoElement.removeEventListener('encrypted',eventHandler);if(videoElement.setMediaKeys){videoElement.setMediaKeys(null);}}videoElement=mediaElement;// Only if we are not detaching from the existing element\\nif(videoElement){videoElement.addEventListener('encrypted',eventHandler);if(videoElement.setMediaKeys&&mediaKeys){videoElement.setMediaKeys(mediaKeys);}}}function setServerCertificate(serverCertificate){if(!keySystem||!mediaKeys){throw new Error('Can not set server certificate until you have selected a key system');}mediaKeys.setServerCertificate(serverCertificate).then(function(){logger.info('DRM: License server certificate successfully updated.');eventBus.trigger(events.SERVER_CERTIFICATE_UPDATED);}).catch(function(error){eventBus.trigger(events.SERVER_CERTIFICATE_UPDATED,{error:new _DashJSError2.default(_ProtectionErrors2.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,_ProtectionErrors2.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+error.name)});});}function createKeySession(initData,protData,sessionType){if(!keySystem||!mediaKeys){throw new Error('Can not create sessions until you have selected a key system');}var session=mediaKeys.createSession(sessionType);var sessionToken=createSessionToken(session,initData,sessionType);var ks=this.getKeySystem();// Generate initial key request.\\n// keyids type is used for clearkey when keys are provided directly in the protection data and then request to a license server is not needed\\nvar dataType=ks.systemString===_ProtectionConstants2.default.CLEARKEY_KEYSTEM_STRING&&(initData||protData&&protData.clearkeys)?'keyids':'cenc';session.generateRequest(dataType,initData).then(function(){logger.debug('DRM: Session created.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}).catch(function(error){// TODO: Better error string\\nremoveSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Error generating key request -- '+error.name)});});}function updateKeySession(sessionToken,message){var session=sessionToken.session;// Send our request to the key session\\nif(protectionKeyController.isClearKey(keySystem)){message=message.toJWK();}session.update(message).catch(function(error){eventBus.trigger(events.KEY_ERROR,{data:new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEYERR_CODE,'Error sending update() message! '+error.name,sessionToken)});});}function loadKeySession(sessionID,initData,sessionType){if(!keySystem||!mediaKeys){throw new Error('Can not load sessions until you have selected a key system');}// Check if session Id is not already loaded or loading\\nfor(var i=0;i<sessions.length;i++){if(sessionID===sessions[i].sessionId){logger.warn('DRM: Ignoring session ID because we have already seen it!');return;}}var session=mediaKeys.createSession(sessionType);var sessionToken=createSessionToken(session,initData,sessionType,sessionID);// Load persisted session data into our newly created session object\\nsession.load(sessionID).then(function(success){if(success){logger.debug('DRM: Session loaded.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}else{removeSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Could not load session! Invalid Session ID ('+sessionID+')')});}}).catch(function(error){removeSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CREATED,{data:null,error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_CODE,_ProtectionErrors2.default.KEY_SESSION_CREATED_ERROR_MESSAGE+'Could not load session ('+sessionID+')! '+error.name)});});}function removeKeySession(sessionToken){var session=sessionToken.session;session.remove().then(function(){logger.debug('DRM: Session removed.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_REMOVED,{data:sessionToken.getSessionID()});},function(error){eventBus.trigger(events.KEY_SESSION_REMOVED,{data:null,error:'Error removing session ('+sessionToken.getSessionID()+'). '+error.name});});}function closeKeySession(sessionToken){// Send our request to the key session\\ncloseKeySessionInternal(sessionToken).catch(function(error){removeSession(sessionToken);eventBus.trigger(events.KEY_SESSION_CLOSED,{data:null,error:'Error closing session ('+sessionToken.getSessionID()+') '+error.name});});}function requestKeySystemAccessInternal(ksConfigurations,idx){if(navigator.requestMediaKeySystemAccess===undefined||typeof navigator.requestMediaKeySystemAccess!=='function'){eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Insecure origins are not allowed'});return;}(function(i){var keySystem=ksConfigurations[i].ks;var configs=ksConfigurations[i].configs;var systemString=keySystem.systemString;// PATCH to support persistent licenses on Edge browser (see issue #2658)\\nif(systemString===_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING&&configs[0].persistentState==='required'){systemString+='.recommendation';}navigator.requestMediaKeySystemAccess(systemString,configs).then(function(mediaKeySystemAccess){// Chrome 40 does not currently implement MediaKeySystemAccess.getConfiguration()\\nvar configuration=typeof mediaKeySystemAccess.getConfiguration==='function'?mediaKeySystemAccess.getConfiguration():null;var keySystemAccess=new _KeySystemAccess2.default(keySystem,configuration);keySystemAccess.mksa=mediaKeySystemAccess;eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{data:keySystemAccess});}).catch(function(error){if(++i<ksConfigurations.length){requestKeySystemAccessInternal(ksConfigurations,i);}else{eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Key system access denied! '+error.message});}});})(idx);}function closeKeySessionInternal(sessionToken){var session=sessionToken.session;// Remove event listeners\\nsession.removeEventListener('keystatuseschange',sessionToken);session.removeEventListener('message',sessionToken);// Send our request to the key session\\nreturn session.close();}// This is our main event handler for all desired HTMLMediaElement events\\n// related to EME.  These events are translated into our API-independent\\n// versions of the same events\\nfunction createEventHandler(){return{handleEvent:function handleEvent(event){switch(event.type){case'encrypted':if(event.initData){var initData=ArrayBuffer.isView(event.initData)?event.initData.buffer:event.initData;eventBus.trigger(events.NEED_KEY,{key:new _NeedKey2.default(initData,event.initDataType)});}break;}}};}function removeSession(token){// Remove from our session list\\nfor(var i=0;i<sessions.length;i++){if(sessions[i]===token){sessions.splice(i,1);break;}}}function parseKeyStatus(args){// Edge and Chrome implement different version of keystatues, param are not on same order\\nvar status=void 0,keyId=void 0;if(args&&args.length>0){if(args[0]){if(typeof args[0]==='string'){status=args[0];}else{keyId=args[0];}}if(args[1]){if(typeof args[1]==='string'){status=args[1];}else{keyId=args[1];}}}return{status:status,keyId:keyId};}// Function to create our session token objects which manage the EME\\n// MediaKeySession and session-specific event handler\\nfunction createSessionToken(session,initData,sessionType,sessionID){var token={// Implements SessionToken\\nsession:session,initData:initData,sessionId:sessionID,// This is our main event handler for all desired MediaKeySession events\\n// These events are translated into our API-independent versions of the\\n// same events\\nhandleEvent:function handleEvent(event){switch(event.type){case'keystatuseschange':eventBus.trigger(events.KEY_STATUSES_CHANGED,{data:this});event.target.keyStatuses.forEach(function(){var keyStatus=parseKeyStatus(arguments);switch(keyStatus.status){case'expired':eventBus.trigger(events.INTERNAL_KEY_STATUS_CHANGED,{error:new _DashJSError2.default(_ProtectionErrors2.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,_ProtectionErrors2.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)});break;default:eventBus.trigger(events.INTERNAL_KEY_STATUS_CHANGED,keyStatus);break;}});break;case'message':var message=ArrayBuffer.isView(event.message)?event.message.buffer:event.message;eventBus.trigger(events.INTERNAL_KEY_MESSAGE,{data:new _KeyMessage2.default(this,message,undefined,event.messageType)});break;}},getSessionID:function getSessionID(){return session.sessionId;},getExpirationTime:function getExpirationTime(){return session.expiration;},getKeyStatuses:function getKeyStatuses(){return session.keyStatuses;},getUsable:function getUsable(){var usable=false;session.keyStatuses.forEach(function(){var keyStatus=parseKeyStatus(arguments);if(keyStatus.status==='usable'){usable=true;}});return usable;},getSessionType:function getSessionType(){return sessionType;}};// Add all event listeners\\nsession.addEventListener('keystatuseschange',token);session.addEventListener('message',token);// Register callback for session closed Promise\\nsession.closed.then(function(){removeSession(token);logger.debug('DRM: Session closed.  SessionID = '+token.getSessionID());eventBus.trigger(events.KEY_SESSION_CLOSED,{data:token.getSessionID()});});// Add to our session list\\nsessions.push(token);return token;}instance={getAllInitData:getAllInitData,requestKeySystemAccess:requestKeySystemAccess,getKeySystem:getKeySystem,selectKeySystem:selectKeySystem,setMediaElement:setMediaElement,setServerCertificate:setServerCertificate,createKeySession:createKeySession,updateKeySession:updateKeySession,loadKeySession:loadKeySession,removeKeySession:removeKeySession,closeKeySession:closeKeySession,stop:stop,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Most recent EME implementation\\n *\\n * Implemented by Google Chrome v36+ (Windows, OSX, Linux)\\n *\\n * @implements ProtectionModel\\n * @class\\n */ProtectionModel_21Jan2015.__dashjs_factory_name='ProtectionModel_21Jan2015';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionModel_21Jan2015);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionModel_21Jan2015.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_21Jan2015.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionKeyController=__webpack_require__(/*! ../controllers/ProtectionKeyController */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/controllers/ProtectionKeyController.js\\\");var _ProtectionKeyController2=_interopRequireDefault(_ProtectionKeyController);var _NeedKey=__webpack_require__(/*! ../vo/NeedKey */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\\\");var _NeedKey2=_interopRequireDefault(_NeedKey);var _DashJSError=__webpack_require__(/*! ../../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _ProtectionErrors=__webpack_require__(/*! ../errors/ProtectionErrors */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/errors/ProtectionErrors.js\\\");var _ProtectionErrors2=_interopRequireDefault(_ProtectionErrors);var _KeyMessage=__webpack_require__(/*! ../vo/KeyMessage */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\\\");var _KeyMessage2=_interopRequireDefault(_KeyMessage);var _KeySystemConfiguration=__webpack_require__(/*! ../vo/KeySystemConfiguration */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\\\");var _KeySystemConfiguration2=_interopRequireDefault(_KeySystemConfiguration);var _KeySystemAccess=__webpack_require__(/*! ../vo/KeySystemAccess */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\\\");var _KeySystemAccess2=_interopRequireDefault(_KeySystemAccess);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ProtectionModel_3Feb2014(config){config=config||{};var context=this.context;var eventBus=config.eventBus;//Need to pass in here so we can use same instance since this is optional module\\nvar events=config.events;var debug=config.debug;var api=config.api;var instance=void 0,logger=void 0,videoElement=void 0,keySystem=void 0,mediaKeys=void 0,keySystemAccess=void 0,sessions=void 0,eventHandler=void 0,protectionKeyController=void 0;function setup(){logger=debug.getLogger(instance);videoElement=null;keySystem=null;mediaKeys=null;keySystemAccess=null;sessions=[];protectionKeyController=(0,_ProtectionKeyController2.default)(context).getInstance();eventHandler=createEventHandler();}function reset(){try{for(var i=0;i<sessions.length;i++){closeKeySession(sessions[i]);}if(videoElement){videoElement.removeEventListener(api.needkey,eventHandler);}eventBus.trigger(events.TEARDOWN_COMPLETE);}catch(error){eventBus.trigger(events.TEARDOWN_COMPLETE,{error:'Error tearing down key sessions and MediaKeys! -- '+error.message});}}function getKeySystem(){return keySystem;}function getAllInitData(){var retVal=[];for(var i=0;i<sessions.length;i++){retVal.push(sessions[i].initData);}return retVal;}function requestKeySystemAccess(ksConfigurations){// Try key systems in order, first one with supported key system configuration\\n// is used\\nvar found=false;for(var ksIdx=0;ksIdx<ksConfigurations.length;ksIdx++){var systemString=ksConfigurations[ksIdx].ks.systemString;var configs=ksConfigurations[ksIdx].configs;var supportedAudio=null;var supportedVideo=null;// Try key system configs in order, first one with supported audio/video\\n// is used\\nfor(var configIdx=0;configIdx<configs.length;configIdx++){var audios=configs[configIdx].audioCapabilities;var videos=configs[configIdx].videoCapabilities;// Look for supported audio container/codecs\\nif(audios&&audios.length!==0){supportedAudio=[];// Indicates that we have a requested audio config\\nfor(var audioIdx=0;audioIdx<audios.length;audioIdx++){if(window[api.MediaKeys].isTypeSupported(systemString,audios[audioIdx].contentType)){supportedAudio.push(audios[audioIdx]);}}}// Look for supported video container/codecs\\nif(videos&&videos.length!==0){supportedVideo=[];// Indicates that we have a requested video config\\nfor(var videoIdx=0;videoIdx<videos.length;videoIdx++){if(window[api.MediaKeys].isTypeSupported(systemString,videos[videoIdx].contentType)){supportedVideo.push(videos[videoIdx]);}}}// No supported audio or video in this configuration OR we have\\n// requested audio or video configuration that is not supported\\nif(!supportedAudio&&!supportedVideo||supportedAudio&&supportedAudio.length===0||supportedVideo&&supportedVideo.length===0){continue;}// This configuration is supported\\nfound=true;var ksConfig=new _KeySystemConfiguration2.default(supportedAudio,supportedVideo);var ks=protectionKeyController.getKeySystemBySystemString(systemString);eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{data:new _KeySystemAccess2.default(ks,ksConfig)});break;}}if(!found){eventBus.trigger(events.KEY_SYSTEM_ACCESS_COMPLETE,{error:'Key system access denied! -- No valid audio/video content configurations detected!'});}}function selectKeySystem(ksAccess){try{mediaKeys=ksAccess.mediaKeys=new window[api.MediaKeys](ksAccess.keySystem.systemString);keySystem=ksAccess.keySystem;keySystemAccess=ksAccess;if(videoElement){setMediaKeys();}eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED);}catch(error){eventBus.trigger(events.INTERNAL_KEY_SYSTEM_SELECTED,{error:'Error selecting keys system ('+keySystem.systemString+')! Could not create MediaKeys -- TODO'});}}function setMediaElement(mediaElement){if(videoElement===mediaElement)return;// Replacing the previous element\\nif(videoElement){videoElement.removeEventListener(api.needkey,eventHandler);}videoElement=mediaElement;// Only if we are not detaching from the existing element\\nif(videoElement){videoElement.addEventListener(api.needkey,eventHandler);if(mediaKeys){setMediaKeys();}}}function createKeySession(initData,protData,sessionType,cdmData){if(!keySystem||!mediaKeys||!keySystemAccess){throw new Error('Can not create sessions until you have selected a key system');}// Use the first video capability for the contentType.\\n// TODO:  Not sure if there is a way to concatenate all capability data into a RFC6386-compatible format\\n// If player is trying to playback Audio only stream - don't error out.\\nvar capabilities=null;if(keySystemAccess.ksConfiguration.videoCapabilities&&keySystemAccess.ksConfiguration.videoCapabilities.length>0){capabilities=keySystemAccess.ksConfiguration.videoCapabilities[0];}if(capabilities===null&&keySystemAccess.ksConfiguration.audioCapabilities&&keySystemAccess.ksConfiguration.audioCapabilities.length>0){capabilities=keySystemAccess.ksConfiguration.audioCapabilities[0];}if(capabilities===null){throw new Error('Can not create sessions for unknown content types.');}var contentType=capabilities.contentType;var session=mediaKeys.createSession(contentType,new Uint8Array(initData),cdmData?new Uint8Array(cdmData):null);var sessionToken=createSessionToken(session,initData);// Add all event listeners\\nsession.addEventListener(api.error,sessionToken);session.addEventListener(api.message,sessionToken);session.addEventListener(api.ready,sessionToken);session.addEventListener(api.close,sessionToken);// Add to our session list\\nsessions.push(sessionToken);logger.debug('DRM: Session created.  SessionID = '+sessionToken.getSessionID());eventBus.trigger(events.KEY_SESSION_CREATED,{data:sessionToken});}function updateKeySession(sessionToken,message){var session=sessionToken.session;if(!protectionKeyController.isClearKey(keySystem)){// Send our request to the key session\\nsession.update(new Uint8Array(message));}else{// For clearkey, message is a ClearKeyKeySet\\nsession.update(new Uint8Array(message.toJWK()));}}/**\\n     * Close the given session and release all associated keys.  Following\\n     * this call, the sessionToken becomes invalid\\n     *\\n     * @param {Object} sessionToken - the session token\\n     */function closeKeySession(sessionToken){var session=sessionToken.session;// Remove event listeners\\nsession.removeEventListener(api.error,sessionToken);session.removeEventListener(api.message,sessionToken);session.removeEventListener(api.ready,sessionToken);session.removeEventListener(api.close,sessionToken);// Remove from our session list\\nfor(var i=0;i<sessions.length;i++){if(sessions[i]===sessionToken){sessions.splice(i,1);break;}}// Send our request to the key session\\nsession[api.release]();}function setServerCertificate()/*serverCertificate*/{/* Not supported */}function loadKeySession()/*sessionID*/{/* Not supported */}function removeKeySession()/*sessionToken*/{/* Not supported */}function createEventHandler(){return{handleEvent:function handleEvent(event){switch(event.type){case api.needkey:if(event.initData){var initData=ArrayBuffer.isView(event.initData)?event.initData.buffer:event.initData;eventBus.trigger(events.NEED_KEY,{key:new _NeedKey2.default(initData,'cenc')});}break;}}};}// IE11 does not let you set MediaKeys until it has entered a certain\\n// readyState, so we need this logic to ensure we don't set the keys\\n// too early\\nfunction setMediaKeys(){var boundDoSetKeys=null;var doSetKeys=function doSetKeys(){videoElement.removeEventListener('loadedmetadata',boundDoSetKeys);videoElement[api.setMediaKeys](mediaKeys);eventBus.trigger(events.VIDEO_ELEMENT_SELECTED);};if(videoElement.readyState>=1){doSetKeys();}else{boundDoSetKeys=doSetKeys.bind(this);videoElement.addEventListener('loadedmetadata',boundDoSetKeys);}}// Function to create our session token objects which manage the EME\\n// MediaKeySession and session-specific event handler\\nfunction createSessionToken(keySession,initData){return{// Implements SessionToken\\nsession:keySession,initData:initData,getSessionID:function getSessionID(){return this.session.sessionId;},getExpirationTime:function getExpirationTime(){return NaN;},getSessionType:function getSessionType(){return'temporary';},// This is our main event handler for all desired MediaKeySession events\\n// These events are translated into our API-independent versions of the\\n// same events\\nhandleEvent:function handleEvent(event){switch(event.type){case api.error:var errorStr='KeyError';// TODO: Make better string from event\\neventBus.trigger(events.KEY_ERROR,{data:new _DashJSError2.default(_ProtectionErrors2.default.MEDIA_KEYERR_CODE,errorStr,this)});break;case api.message:var message=ArrayBuffer.isView(event.message)?event.message.buffer:event.message;eventBus.trigger(events.INTERNAL_KEY_MESSAGE,{data:new _KeyMessage2.default(this,message,event.destinationURL)});break;case api.ready:logger.debug('DRM: Key added.');eventBus.trigger(events.KEY_ADDED);break;case api.close:logger.debug('DRM: Session closed.  SessionID = '+this.getSessionID());eventBus.trigger(events.KEY_SESSION_CLOSED,{data:this.getSessionID()});break;}}};}instance={getAllInitData:getAllInitData,requestKeySystemAccess:requestKeySystemAccess,getKeySystem:getKeySystem,selectKeySystem:selectKeySystem,setMediaElement:setMediaElement,createKeySession:createKeySession,updateKeySession:updateKeySession,closeKeySession:closeKeySession,setServerCertificate:setServerCertificate,loadKeySession:loadKeySession,removeKeySession:removeKeySession,stop:reset,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Implementation of the EME APIs as of the 3 Feb 2014 state of the specification.\\n *\\n * Implemented by Internet Explorer 11 (Windows 8.1)\\n *\\n * @implements ProtectionModel\\n * @class\\n */ProtectionModel_3Feb2014.__dashjs_factory_name='ProtectionModel_3Feb2014';exports.default=dashjs.FactoryMaker.getClassFactory(ProtectionModel_3Feb2014);/* jshint ignore:line */\\n//# sourceMappingURL=ProtectionModel_3Feb2014.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/models/ProtectionModel_3Feb2014.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _KeyPair=__webpack_require__(/*! ../vo/KeyPair */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\\\");var _KeyPair2=_interopRequireDefault(_KeyPair);var _ClearKeyKeySet=__webpack_require__(/*! ../vo/ClearKeyKeySet */ \\\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\\\");var _ClearKeyKeySet2=_interopRequireDefault(_ClearKeyKeySet);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * CableLabs ClearKey license server implementation\\n *\\n * For testing purposes and evaluating potential uses for ClearKey, we have developed\\n * a dirt-simple API for requesting ClearKey licenses from a remote server.\\n *\\n * @implements LicenseServer\\n * @class\\n */function ClearKey(){var instance=void 0;function getServerURLFromMessage(url/* message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType()/*keySystemStr*/{return'json';}function getLicenseMessage(serverResponse/*, keySystemStr, messageType*/){if(!serverResponse.hasOwnProperty('keys')){return null;}var keyPairs=[];for(var i=0;i<serverResponse.keys.length;i++){var keypair=serverResponse.keys[i];var keyid=keypair.kid.replace(/=/g,'');var key=keypair.k.replace(/=/g,'');keyPairs.push(new _KeyPair2.default(keyid,key));}return new _ClearKeyKeySet2.default(keyPairs);}function getErrorResponse(serverResponse/*, keySystemStr, messageType*/){return String.fromCharCode.apply(null,new Uint8Array(serverResponse));}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}ClearKey.__dashjs_factory_name='ClearKey';exports.default=dashjs.FactoryMaker.getSingletonFactory(ClearKey);/* jshint ignore:line */\\n//# sourceMappingURL=ClearKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/ClearKey.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _ProtectionConstants=__webpack_require__(/*! ../../constants/ProtectionConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ProtectionConstants.js\\\");var _ProtectionConstants2=_interopRequireDefault(_ProtectionConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DRMToday(config){config=config||{};var BASE64=config.BASE64;var keySystems={};keySystems[_ProtectionConstants2.default.WIDEVINE_KEYSTEM_STRING]={responseType:'json',getLicenseMessage:function getLicenseMessage(response){return BASE64.decodeArray(response.license);},getErrorResponse:function getErrorResponse(response){return response;}};keySystems[_ProtectionConstants2.default.PLAYREADY_KEYSTEM_STRING]={responseType:'arraybuffer',getLicenseMessage:function getLicenseMessage(response){return response;},getErrorResponse:function getErrorResponse(response){return String.fromCharCode.apply(null,new Uint8Array(response));}};var instance=void 0;function checkConfig(){if(!BASE64||!BASE64.hasOwnProperty('decodeArray')){throw new Error('Missing config parameter(s)');}}function getServerURLFromMessage(url/*, message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType(keySystemStr/*, messageType*/){return keySystems[keySystemStr].responseType;}function getLicenseMessage(serverResponse,keySystemStr/*, messageType*/){checkConfig();return keySystems[keySystemStr].getLicenseMessage(serverResponse);}function getErrorResponse(serverResponse,keySystemStr/*, messageType*/){return keySystems[keySystemStr].getErrorResponse(serverResponse);}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * CastLabs DRMToday License Server implementation\\n *\\n * @implements LicenseServer\\n * @class\\n */DRMToday.__dashjs_factory_name='DRMToday';exports.default=dashjs.FactoryMaker.getSingletonFactory(DRMToday);/* jshint ignore:line */\\n//# sourceMappingURL=DRMToday.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/DRMToday.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//* global escape: true *//**\\n * Microsoft PlayReady Test License Server\\n *\\n * For testing content that uses the PlayReady test server at\\n *\\n * @implements LicenseServer\\n * @class\\n * @ignore\\n */function PlayReady(){var instance=void 0;var soap='http://schemas.xmlsoap.org/soap/envelope/';function uintToString(arrayBuffer){var encodedString=String.fromCharCode.apply(null,new Uint8Array(arrayBuffer));var decodedString=decodeURIComponent(escape(encodedString));return decodedString;}function parseServerResponse(serverResponse){if(window.DOMParser){var stringResponse=uintToString(serverResponse);var parser=new window.DOMParser();var xmlDoc=parser.parseFromString(stringResponse,'text/xml');var envelope=xmlDoc?xmlDoc.getElementsByTagNameNS(soap,'Envelope')[0]:null;var body=envelope?envelope.getElementsByTagNameNS(soap,'Body')[0]:null;var fault=body?body.getElementsByTagNameNS(soap,'Fault')[0]:null;if(fault){return null;}}return serverResponse;}function parseErrorResponse(serverResponse){var faultstring='';var statusCode='';var message='';var idStart=-1;var idEnd=-1;if(window.DOMParser){var stringResponse=uintToString(serverResponse);var parser=new window.DOMParser();var xmlDoc=parser.parseFromString(stringResponse,'text/xml');var envelope=xmlDoc?xmlDoc.getElementsByTagNameNS(soap,'Envelope')[0]:null;var body=envelope?envelope.getElementsByTagNameNS(soap,'Body')[0]:null;var fault=body?body.getElementsByTagNameNS(soap,'Fault')[0]:null;var detail=fault?fault.getElementsByTagName('detail')[0]:null;var exception=detail?detail.getElementsByTagName('Exception')[0]:null;var node=null;if(fault===null){return stringResponse;}node=fault.getElementsByTagName('faultstring')[0].firstChild;faultstring=node?node.nodeValue:null;if(exception!==null){node=exception.getElementsByTagName('StatusCode')[0];statusCode=node?node.firstChild.nodeValue:null;node=exception.getElementsByTagName('Message')[0];message=node?node.firstChild.nodeValue:null;idStart=message?message.lastIndexOf('[')+1:-1;idEnd=message?message.indexOf(']'):-1;message=message?message.substring(idStart,idEnd):'';}}var errorString='code: '+statusCode+', name: '+faultstring;if(message){errorString+=', message: '+message;}return errorString;}function getServerURLFromMessage(url/*, message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType()/*keySystemStr, messageType*/{return'arraybuffer';}function getLicenseMessage(serverResponse/*, keySystemStr, messageType*/){return parseServerResponse.call(this,serverResponse);}function getErrorResponse(serverResponse/*, keySystemStr, messageType*/){return parseErrorResponse.call(this,serverResponse);}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}PlayReady.__dashjs_factory_name='PlayReady';exports.default=dashjs.FactoryMaker.getSingletonFactory(PlayReady);/* jshint ignore:line */\\n//# sourceMappingURL=PlayReady.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/PlayReady.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @ignore\\n */function Widevine(){var instance=void 0;function getServerURLFromMessage(url/*, message, messageType*/){return url;}function getHTTPMethod()/*messageType*/{return'POST';}function getResponseType()/*keySystemStr, messageType*/{return'arraybuffer';}function getLicenseMessage(serverResponse/*, keySystemStr, messageType*/){return serverResponse;}function getErrorResponse(serverResponse/*, keySystemStr, messageType*/){return String.fromCharCode.apply(null,new Uint8Array(serverResponse));}instance={getServerURLFromMessage:getServerURLFromMessage,getHTTPMethod:getHTTPMethod,getResponseType:getResponseType,getLicenseMessage:getLicenseMessage,getErrorResponse:getErrorResponse};return instance;}Widevine.__dashjs_factory_name='Widevine';exports.default=dashjs.FactoryMaker.getSingletonFactory(Widevine);/* jshint ignore:line */\\n//# sourceMappingURL=Widevine.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/servers/Widevine.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc A collection of ClearKey encryption keys with an (optional) associated\\n *  type\\n * @ignore\\n */var ClearKeyKeySet=function(){/**\\n     * @param {Array.<KeyPair>} keyPairs\\n     * @param {string} type the type of keys in this set.  One of either 'persistent'\\n     * or 'temporary'.  Can also be null or undefined.\\n     * @class\\n     * @ignore\\n     */function ClearKeyKeySet(keyPairs,type){_classCallCheck(this,ClearKeyKeySet);if(type&&type!=='persistent'&&type!=='temporary')throw new Error('Invalid ClearKey key set type!  Must be one of \\\\'persistent\\\\' or \\\\'temporary\\\\'');this.keyPairs=keyPairs;this.type=type;}/**\\n     * Convert this key set to its JSON Web Key (JWK) representation\\n     *\\n     * @return {ArrayBuffer} JWK object UTF-8 encoded as ArrayBuffer\\n     */_createClass(ClearKeyKeySet,[{key:'toJWK',value:function toJWK(){var i=void 0;var numKeys=this.keyPairs.length;var jwk={keys:[]};for(i=0;i<numKeys;i++){var key={kty:'oct',alg:'A128KW',kid:this.keyPairs[i].keyID,k:this.keyPairs[i].key};jwk.keys.push(key);}if(this.type){jwk.type=this.type;}var jwkString=JSON.stringify(jwk);var len=jwkString.length;// Convert JSON string to ArrayBuffer\\nvar buf=new ArrayBuffer(len);var bView=new Uint8Array(buf);for(i=0;i<len;i++){bView[i]=jwkString.charCodeAt(i);}return buf;}}]);return ClearKeyKeySet;}();exports.default=ClearKeyKeySet;\\n//# sourceMappingURL=ClearKeyKeySet.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/ClearKeyKeySet.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc EME-independent KeyMessage\\n * @ignore\\n */var KeyMessage=/**\\n     * @param {SessionToken} sessionToken the session\\n     * to which the key message is associated\\n     * @param {ArrayBuffer} message the key message\\n     * @param {string} defaultURL license acquisition URL provided by the CDM\\n     * @param {string} messageType Supported message types can be found\\n     * {@link https://w3c.github.io/encrypted-media/#idl-def-MediaKeyMessageType|here}.\\n     * @class\\n     */function KeyMessage(sessionToken,message,defaultURL,messageType){_classCallCheck(this,KeyMessage);this.sessionToken=sessionToken;this.message=message;this.defaultURL=defaultURL;this.messageType=messageType?messageType:\\'license-request\\';};exports.default=KeyMessage;\\n//# sourceMappingURL=KeyMessage.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyMessage.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Represents a 128-bit keyID and 128-bit encryption key\\n * @ignore\\n */var KeyPair=/**\\n     * @param {string} keyID 128-bit key ID, base64 encoded, with no padding\\n     * @param {string} key 128-bit encryption key, base64 encoded, with no padding\\n     * @class\\n     * @ignore\\n     */function KeyPair(keyID,key){_classCallCheck(this,KeyPair);this.keyID=keyID;this.key=key;};exports.default=KeyPair;\\n//# sourceMappingURL=KeyPair.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeyPair.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Creates a new key system access token.  Represents a valid key system for\\n * given piece of content and key system requirements.  Used to initialize license\\n * acquisition operations.\\n * @ignore\\n */var KeySystemAccess=/**\\n     * @param {MediaPlayer.dependencies.protection.KeySystem} keySystem the key system\\n     * @param {KeySystemConfiguration} ksConfiguration the\\n     * subset of configurations passed to the key system access request that are supported\\n     * by this user agent\\n     * @class\\n     * @ignore\\n     */function KeySystemAccess(keySystem,ksConfiguration){_classCallCheck(this,KeySystemAccess);this.keySystem=keySystem;this.ksConfiguration=ksConfiguration;};exports.default=KeySystemAccess;\\n//# sourceMappingURL=KeySystemAccess.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemAccess.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Represents a set of configurations that describe the capabilities desired for\\n *  support by a given CDM\\n * @ignore\\n */var KeySystemConfiguration=/**\\n     * @param {Array.<MediaCapability>} audioCapabilities array of\\n     * desired audio capabilities.  Higher preference capabilities should be placed earlier\\n     * in the array.\\n     * @param {Array.<MediaCapability>} videoCapabilities array of\\n     * desired video capabilities.  Higher preference capabilities should be placed earlier\\n     * in the array.\\n     * @param {string} distinctiveIdentifier desired use of distinctive identifiers.\\n     * One of \"required\", \"optional\", or \"not-allowed\"\\n     * @param {string} persistentState desired support for persistent storage of\\n     * key systems.  One of \"required\", \"optional\", or \"not-allowed\"\\n     * @param {Array.<string>} sessionTypes List of session types that must\\n     * be supported by the key system\\n     * @class\\n     */function KeySystemConfiguration(audioCapabilities,videoCapabilities,distinctiveIdentifier,persistentState,sessionTypes){_classCallCheck(this,KeySystemConfiguration);this.initDataTypes=[\\'cenc\\'];if(audioCapabilities&&audioCapabilities.length){this.audioCapabilities=audioCapabilities;}if(videoCapabilities&&videoCapabilities.length){this.videoCapabilities=videoCapabilities;}this.distinctiveIdentifier=distinctiveIdentifier;this.persistentState=persistentState;this.sessionTypes=sessionTypes;};exports.default=KeySystemConfiguration;\\n//# sourceMappingURL=KeySystemConfiguration.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/KeySystemConfiguration.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Defines a license request\\n * @ignore\\n */var LicenseRequest=/**\\n     * Defines a license request\\n     *\\n     * @class\\n     */function LicenseRequest(url,method,responseType,headers,withCredentials,messageType,sessionId,data){_classCallCheck(this,LicenseRequest);/**\\n         * The license request url\\n         */this.url=url;/**\\n         * The HTTP method\\n         */this.method=method;/**\\n         * The HTTP response type\\n         */this.responseType=responseType;/**\\n         * The HTP request headers\\n         */this.headers=headers;/**\\n         * Wether request is done using credentials (cross-site cookies)\\n         */this.withCredentials=withCredentials;/**\\n         * The license request message type (see https://www.w3.org/TR/encrypted-media/#dom-mediakeymessagetype)\\n         */this.messageType=messageType;/**\\n         * The corresponding EME session ID\\n         */this.sessionId=sessionId;/**\\n         * The license request data\\n         */this.data=data;};exports.default=LicenseRequest;\\n//# sourceMappingURL=LicenseRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseRequest.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc Defines a license response\\n */var LicenseResponse=/**\\n     * Defines a license request\\n     *\\n     * @class\\n     * @ignore\\n     */function LicenseResponse(url,headers,data){_classCallCheck(this,LicenseResponse);/**\\n         * The url that was loaded, that can be redirected from original request url\\n         */this.url=url;/**\\n         * The HTP response headers\\n         */this.headers=headers;/**\\n         * The license response data\\n         */this.data=data;};exports.default=LicenseResponse;\\n//# sourceMappingURL=LicenseResponse.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/LicenseResponse.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc A media capability\\n * @ignore\\n */var MediaCapability=/**\\n     * @param {string} contentType MIME type and codecs (RFC6386)\\n     * @param {string} robustness\\n     * @class\\n     * @ignore\\n     */function MediaCapability(contentType,robustness){_classCallCheck(this,MediaCapability);this.contentType=contentType;this.robustness=robustness;};exports.default=MediaCapability;\\n//# sourceMappingURL=MediaCapability.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/MediaCapability.js?')},\"../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc NeedKey\\n * @ignore\\n */var NeedKey=/**\\n     * @param {ArrayBuffer} initData the initialization data\\n     * @param {string} initDataType initialization data type\\n     * @class\\n     */function NeedKey(initData,initDataType){_classCallCheck(this,NeedKey);this.initData=initData;this.initDataType=initDataType;};exports.default=NeedKey;\\n//# sourceMappingURL=NeedKey.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/protection/vo/NeedKey.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DroppedFramesHistory(){var values=[];var lastDroppedFrames=0;var lastTotalFrames=0;function push(index,playbackQuality){var droppedVideoFrames=playbackQuality&&playbackQuality.droppedVideoFrames?playbackQuality.droppedVideoFrames:0;var totalVideoFrames=playbackQuality&&playbackQuality.totalVideoFrames?playbackQuality.totalVideoFrames:0;var intervalDroppedFrames=droppedVideoFrames-lastDroppedFrames;lastDroppedFrames=droppedVideoFrames;var intervalTotalFrames=totalVideoFrames-lastTotalFrames;lastTotalFrames=totalVideoFrames;if(!isNaN(index)){if(!values[index]){values[index]={droppedVideoFrames:intervalDroppedFrames,totalVideoFrames:intervalTotalFrames};}else{values[index].droppedVideoFrames+=intervalDroppedFrames;values[index].totalVideoFrames+=intervalTotalFrames;}}}function getDroppedFrameHistory(){return values;}function reset(playbackQuality){values=[];lastDroppedFrames=playbackQuality.droppedVideoFrames;lastTotalFrames=playbackQuality.totalVideoFrames;}return{push:push,getFrameHistory:getDroppedFrameHistory,reset:reset};}DroppedFramesHistory.__dashjs_factory_name=\\'DroppedFramesHistory\\';var factory=_FactoryMaker2.default.getClassFactory(DroppedFramesHistory);exports.default=factory;\\n//# sourceMappingURL=DroppedFramesHistory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/DroppedFramesHistory.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RulesContext(config){config=config||{};var instance=void 0;var abrController=config.abrController;var switchHistory=config.switchHistory;var droppedFramesHistory=config.droppedFramesHistory;var currentRequest=config.currentRequest;var bufferOccupancyABR=config.useBufferOccupancyABR;var l2AABR=config.useL2AABR;var loLP=config.useLoLPABR;var scheduleController=config.streamProcessor?config.streamProcessor.getScheduleController():null;var representationInfo=config.streamProcessor?config.streamProcessor.getRepresentationInfo():null;var videoModel=config.videoModel?config.videoModel:null;function getMediaType(){var mediaInfo=getMediaInfo();return mediaInfo?mediaInfo.type:null;}function getStreamInfo(){var mediaInfo=getMediaInfo();return mediaInfo?mediaInfo.streamInfo:null;}function getMediaInfo(){return representationInfo?representationInfo.mediaInfo:null;}function getRepresentationInfo(){return representationInfo;}function getScheduleController(){return scheduleController;}function getAbrController(){return abrController;}function getSwitchHistory(){return switchHistory;}function getVideoModel(){return videoModel;}function getDroppedFramesHistory(){return droppedFramesHistory;}function getCurrentRequest(){return currentRequest;}function useBufferOccupancyABR(){return bufferOccupancyABR;}function useL2AABR(){return l2AABR;}function useLoLPABR(){return loLP;}instance={getMediaType:getMediaType,getMediaInfo:getMediaInfo,getDroppedFramesHistory:getDroppedFramesHistory,getCurrentRequest:getCurrentRequest,getSwitchHistory:getSwitchHistory,getStreamInfo:getStreamInfo,getScheduleController:getScheduleController,getAbrController:getAbrController,getRepresentationInfo:getRepresentationInfo,useBufferOccupancyABR:useBufferOccupancyABR,useL2AABR:useL2AABR,useLoLPABR:useLoLPABR,getVideoModel:getVideoModel};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RulesContext.__dashjs_factory_name=\\'RulesContext\\';exports.default=_FactoryMaker2.default.getClassFactory(RulesContext);\\n//# sourceMappingURL=RulesContext.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/RulesContext.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var NO_CHANGE=-1;/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var PRIORITY={DEFAULT:0.5,STRONG:1,WEAK:0};function SwitchRequest(q,r,p){//TODO refactor all the calls to this to use config to be like everything else.\\nvar instance=void 0,quality=void 0,priority=void 0,reason=void 0;// check priority value\\nfunction getPriority(p){var ret=PRIORITY.DEFAULT;// check that p is one of declared priority value\\nif(p===PRIORITY.DEFAULT||p===PRIORITY.STRONG||p===PRIORITY.WEAK){ret=p;}return ret;}// init attributes\\nquality=q===undefined?NO_CHANGE:q;priority=getPriority(p);reason=r===undefined?null:r;instance={quality:quality,reason:reason,priority:priority};return instance;}SwitchRequest.__dashjs_factory_name=\\'SwitchRequest\\';var factory=_FactoryMaker2.default.getClassFactory(SwitchRequest);factory.NO_CHANGE=NO_CHANGE;factory.PRIORITY=PRIORITY;_FactoryMaker2.default.updateClassFactory(SwitchRequest.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=SwitchRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SwitchRequest=__webpack_require__(/*! ./SwitchRequest */ \"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var SWITCH_REQUEST_HISTORY_DEPTH=8;// must be > SwitchHistoryRule SAMPLE_SIZE to enable rule\\nfunction SwitchRequestHistory(){var switchRequests=[];// running total\\nvar srHistory=[];// history of each switch\\nfunction push(switchRequest){if(switchRequest.newValue===_SwitchRequest2.default.NO_CHANGE){switchRequest.newValue=switchRequest.oldValue;}if(!switchRequests[switchRequest.oldValue]){switchRequests[switchRequest.oldValue]={noDrops:0,drops:0,dropSize:0};}// Set switch details\\nvar indexDiff=switchRequest.newValue-switchRequest.oldValue;var drop=indexDiff<0?1:0;var dropSize=drop?-indexDiff:0;var noDrop=drop?0:1;// Update running totals\\nswitchRequests[switchRequest.oldValue].drops+=drop;switchRequests[switchRequest.oldValue].dropSize+=dropSize;switchRequests[switchRequest.oldValue].noDrops+=noDrop;// Save to history\\nsrHistory.push({idx:switchRequest.oldValue,noDrop:noDrop,drop:drop,dropSize:dropSize});// Shift earliest switch off srHistory and readjust to keep depth of running totals constant\\nif(srHistory.length>SWITCH_REQUEST_HISTORY_DEPTH){var srHistoryFirst=srHistory.shift();switchRequests[srHistoryFirst.idx].drops-=srHistoryFirst.drop;switchRequests[srHistoryFirst.idx].dropSize-=srHistoryFirst.dropSize;switchRequests[srHistoryFirst.idx].noDrops-=srHistoryFirst.noDrop;}}function getSwitchRequests(){return switchRequests;}function reset(){switchRequests=[];srHistory=[];}return{push:push,getSwitchRequests:getSwitchRequests,reset:reset};}SwitchRequestHistory.__dashjs_factory_name=\\'SwitchRequestHistory\\';var factory=_FactoryMaker2.default.getClassFactory(SwitchRequestHistory);exports.default=factory;\\n//# sourceMappingURL=SwitchRequestHistory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequestHistory.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// throughput generally stored in kbit/s\\n// latency generally stored in ms\\n/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2017, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ThroughputHistory(config){config=config||{};// sliding window constants\\nvar MAX_MEASUREMENTS_TO_KEEP=20;var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE=3;var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD=4;var AVERAGE_LATENCY_SAMPLE_AMOUNT=4;var THROUGHPUT_DECREASE_SCALE=1.3;var THROUGHPUT_INCREASE_SCALE=1.3;// EWMA constants\\nvar EWMA_THROUGHPUT_SLOW_HALF_LIFE_SECONDS=8;var EWMA_THROUGHPUT_FAST_HALF_LIFE_SECONDS=3;var EWMA_LATENCY_SLOW_HALF_LIFE_COUNT=2;var EWMA_LATENCY_FAST_HALF_LIFE_COUNT=1;var settings=config.settings;var throughputDict=void 0,latencyDict=void 0,ewmaThroughputDict=void 0,ewmaLatencyDict=void 0,ewmaHalfLife=void 0;function setup(){ewmaHalfLife={throughputHalfLife:{fast:EWMA_THROUGHPUT_FAST_HALF_LIFE_SECONDS,slow:EWMA_THROUGHPUT_SLOW_HALF_LIFE_SECONDS},latencyHalfLife:{fast:EWMA_LATENCY_FAST_HALF_LIFE_COUNT,slow:EWMA_LATENCY_SLOW_HALF_LIFE_COUNT}};reset();}function isCachedResponse(mediaType,latencyMs,downloadTimeMs){if(mediaType===_Constants2.default.VIDEO){return downloadTimeMs<settings.get().streaming.cacheLoadThresholds[_Constants2.default.VIDEO];}else if(mediaType===_Constants2.default.AUDIO){return downloadTimeMs<settings.get().streaming.cacheLoadThresholds[_Constants2.default.AUDIO];}}function push(mediaType,httpRequest,useDeadTimeLatency){if(!httpRequest.trace||!httpRequest.trace.length){return;}var latencyTimeInMilliseconds=httpRequest.tresponse.getTime()-httpRequest.trequest.getTime()||1;var downloadTimeInMilliseconds=httpRequest._tfinish.getTime()-httpRequest.tresponse.getTime()||1;//Make sure never 0 we divide by this value. Avoid infinity!\\nvar downloadBytes=httpRequest.trace.reduce(function(a,b){return a+b.b[0];},0);var throughputMeasureTime=void 0;if(settings.get().streaming.lowLatencyEnabled){throughputMeasureTime=httpRequest.trace.reduce(function(a,b){return a+b.d;},0);}else{throughputMeasureTime=useDeadTimeLatency?downloadTimeInMilliseconds:latencyTimeInMilliseconds+downloadTimeInMilliseconds;}var throughput=Math.round(8*downloadBytes/throughputMeasureTime);// bits/ms = kbits/s\\ncheckSettingsForMediaType(mediaType);if(isCachedResponse(mediaType,latencyTimeInMilliseconds,downloadTimeInMilliseconds)){if(throughputDict[mediaType].length>0&&!throughputDict[mediaType].hasCachedEntries){// already have some entries which are not cached entries\\n// prevent cached fragment loads from skewing the average values\\nreturn;}else{// have no entries || have cached entries\\n// no uncached entries yet, rely on cached entries because ABR rules need something to go by\\nthroughputDict[mediaType].hasCachedEntries=true;}}else if(throughputDict[mediaType]&&throughputDict[mediaType].hasCachedEntries){// if we are here then we have some entries already, but they are cached, and now we have a new uncached entry\\nclearSettingsForMediaType(mediaType);}throughputDict[mediaType].push(throughput);if(throughputDict[mediaType].length>MAX_MEASUREMENTS_TO_KEEP){throughputDict[mediaType].shift();}latencyDict[mediaType].push(latencyTimeInMilliseconds);if(latencyDict[mediaType].length>MAX_MEASUREMENTS_TO_KEEP){latencyDict[mediaType].shift();}updateEwmaEstimate(ewmaThroughputDict[mediaType],throughput,0.001*downloadTimeInMilliseconds,ewmaHalfLife.throughputHalfLife);updateEwmaEstimate(ewmaLatencyDict[mediaType],latencyTimeInMilliseconds,1,ewmaHalfLife.latencyHalfLife);}function updateEwmaEstimate(ewmaObj,value,weight,halfLife){// Note about startup:\\n// Estimates start at 0, so early values are underestimated.\\n// This effect is countered in getAverageEwma() by dividing the estimates by:\\n//     1 - Math.pow(0.5, ewmaObj.totalWeight / halfLife)\\nvar fastAlpha=Math.pow(0.5,weight/halfLife.fast);ewmaObj.fastEstimate=(1-fastAlpha)*value+fastAlpha*ewmaObj.fastEstimate;var slowAlpha=Math.pow(0.5,weight/halfLife.slow);ewmaObj.slowEstimate=(1-slowAlpha)*value+slowAlpha*ewmaObj.slowEstimate;ewmaObj.totalWeight+=weight;}function getSampleSize(isThroughput,mediaType,isLive){var arr=void 0,sampleSize=void 0;if(isThroughput){arr=throughputDict[mediaType];sampleSize=isLive?AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE:AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD;}else{arr=latencyDict[mediaType];sampleSize=AVERAGE_LATENCY_SAMPLE_AMOUNT;}if(!arr){sampleSize=0;}else if(sampleSize>=arr.length){sampleSize=arr.length;}else if(isThroughput){// if throughput samples vary a lot, average over a wider sample\\nfor(var i=1;i<sampleSize;++i){var ratio=arr[arr.length-i]/arr[arr.length-i-1];if(ratio>=THROUGHPUT_INCREASE_SCALE||ratio<=1/THROUGHPUT_DECREASE_SCALE){sampleSize+=1;if(sampleSize===arr.length){// cannot increase sampleSize beyond arr.length\\nbreak;}}}}return sampleSize;}function getAverage(isThroughput,mediaType,isDynamic){// only two moving average methods defined at the moment\\nreturn settings.get().streaming.abr.movingAverageMethod!==_Constants2.default.MOVING_AVERAGE_SLIDING_WINDOW?getAverageEwma(isThroughput,mediaType):getAverageSlidingWindow(isThroughput,mediaType,isDynamic);}function getAverageSlidingWindow(isThroughput,mediaType,isDynamic){var sampleSize=getSampleSize(isThroughput,mediaType,isDynamic);var dict=isThroughput?throughputDict:latencyDict;var arr=dict[mediaType];if(sampleSize===0||!arr||arr.length===0){return NaN;}arr=arr.slice(-sampleSize);// still works if sampleSize too large\\n// arr.length >= 1\\nreturn arr.reduce(function(total,elem){return total+elem;})/arr.length;}function getAverageEwma(isThroughput,mediaType){var halfLife=isThroughput?ewmaHalfLife.throughputHalfLife:ewmaHalfLife.latencyHalfLife;var ewmaObj=isThroughput?ewmaThroughputDict[mediaType]:ewmaLatencyDict[mediaType];if(!ewmaObj||ewmaObj.totalWeight<=0){return NaN;}// to correct for startup, divide by zero factor = 1 - Math.pow(0.5, ewmaObj.totalWeight / halfLife)\\nvar fastEstimate=ewmaObj.fastEstimate/(1-Math.pow(0.5,ewmaObj.totalWeight/halfLife.fast));var slowEstimate=ewmaObj.slowEstimate/(1-Math.pow(0.5,ewmaObj.totalWeight/halfLife.slow));return isThroughput?Math.min(fastEstimate,slowEstimate):Math.max(fastEstimate,slowEstimate);}function getAverageThroughput(mediaType,isDynamic){return getAverage(true,mediaType,isDynamic);}function getSafeAverageThroughput(mediaType,isDynamic){var average=getAverageThroughput(mediaType,isDynamic);if(!isNaN(average)){average*=settings.get().streaming.abr.bandwidthSafetyFactor;}return average;}function getAverageLatency(mediaType){return getAverage(false,mediaType);}function checkSettingsForMediaType(mediaType){throughputDict[mediaType]=throughputDict[mediaType]||[];latencyDict[mediaType]=latencyDict[mediaType]||[];ewmaThroughputDict[mediaType]=ewmaThroughputDict[mediaType]||{fastEstimate:0,slowEstimate:0,totalWeight:0};ewmaLatencyDict[mediaType]=ewmaLatencyDict[mediaType]||{fastEstimate:0,slowEstimate:0,totalWeight:0};}function clearSettingsForMediaType(mediaType){delete throughputDict[mediaType];delete latencyDict[mediaType];delete ewmaThroughputDict[mediaType];delete ewmaLatencyDict[mediaType];checkSettingsForMediaType(mediaType);}function reset(){throughputDict={};latencyDict={};ewmaThroughputDict={};ewmaLatencyDict={};}var instance={push:push,getAverageThroughput:getAverageThroughput,getSafeAverageThroughput:getSafeAverageThroughput,getAverageLatency:getAverageLatency,reset:reset};setup();return instance;}ThroughputHistory.__dashjs_factory_name=\\'ThroughputHistory\\';exports.default=_FactoryMaker2.default.getClassFactory(ThroughputHistory);\\n//# sourceMappingURL=ThroughputHistory.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/ThroughputHistory.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _ThroughputRule=__webpack_require__(/*! ./ThroughputRule */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js\");var _ThroughputRule2=_interopRequireDefault(_ThroughputRule);var _InsufficientBufferRule=__webpack_require__(/*! ./InsufficientBufferRule */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js\");var _InsufficientBufferRule2=_interopRequireDefault(_InsufficientBufferRule);var _AbandonRequestsRule=__webpack_require__(/*! ./AbandonRequestsRule */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js\");var _AbandonRequestsRule2=_interopRequireDefault(_AbandonRequestsRule);var _DroppedFramesRule=__webpack_require__(/*! ./DroppedFramesRule */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js\");var _DroppedFramesRule2=_interopRequireDefault(_DroppedFramesRule);var _SwitchHistoryRule=__webpack_require__(/*! ./SwitchHistoryRule */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js\");var _SwitchHistoryRule2=_interopRequireDefault(_SwitchHistoryRule);var _BolaRule=__webpack_require__(/*! ./BolaRule */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js\");var _BolaRule2=_interopRequireDefault(_BolaRule);var _L2ARule=__webpack_require__(/*! ./L2ARule.js */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js\");var _L2ARule2=_interopRequireDefault(_L2ARule);var _LoLpRule=__webpack_require__(/*! ./lolp/LoLpRule.js */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js\");var _LoLpRule2=_interopRequireDefault(_LoLpRule);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var QUALITY_SWITCH_RULES=\\'qualitySwitchRules\\';/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var ABANDON_FRAGMENT_RULES=\\'abandonFragmentRules\\';function ABRRulesCollection(config){config=config||{};var context=this.context;var mediaPlayerModel=config.mediaPlayerModel;var dashMetrics=config.dashMetrics;var settings=config.settings;var instance=void 0,qualitySwitchRules=void 0,abandonFragmentRules=void 0;function initialize(){qualitySwitchRules=[];abandonFragmentRules=[];if(settings.get().streaming.abr.useDefaultABRRules){// If L2A is used we only need this one rule\\nif(settings.get().streaming.abr.ABRStrategy===_Constants2.default.ABR_STRATEGY_L2A){qualitySwitchRules.push((0,_L2ARule2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings}));}// If LoLP is used we only need this one rule\\nelse if(settings.get().streaming.abr.ABRStrategy===_Constants2.default.ABR_STRATEGY_LoLP){qualitySwitchRules.push((0,_LoLpRule2.default)(context).create({dashMetrics:dashMetrics}));}else{// Only one of BolaRule and ThroughputRule will give a switchRequest.quality !== SwitchRequest.NO_CHANGE.\\n// This is controlled by useBufferOccupancyABR mechanism in AbrController.\\nqualitySwitchRules.push((0,_BolaRule2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings}));qualitySwitchRules.push((0,_ThroughputRule2.default)(context).create({dashMetrics:dashMetrics}));qualitySwitchRules.push((0,_InsufficientBufferRule2.default)(context).create({dashMetrics:dashMetrics}));qualitySwitchRules.push((0,_SwitchHistoryRule2.default)(context).create());qualitySwitchRules.push((0,_DroppedFramesRule2.default)(context).create());abandonFragmentRules.push((0,_AbandonRequestsRule2.default)(context).create({dashMetrics:dashMetrics,mediaPlayerModel:mediaPlayerModel,settings:settings}));}}// add custom ABR rules if any\\nvar customRules=mediaPlayerModel.getABRCustomRules();customRules.forEach(function(rule){if(rule.type===QUALITY_SWITCH_RULES){qualitySwitchRules.push(rule.rule(context).create());}if(rule.type===ABANDON_FRAGMENT_RULES){abandonFragmentRules.push(rule.rule(context).create());}});}function getActiveRules(srArray){return srArray.filter(function(sr){return sr.quality>_SwitchRequest2.default.NO_CHANGE;});}/**\\n     *\\n     * @param {array} srArray\\n     * @return {object} SwitchRequest\\n     */function getMinSwitchRequest(srArray){var values={};var newSwitchReq=null;var i=void 0,len=void 0,req=void 0,quality=void 0,reason=void 0;if(srArray.length===0){return;}values[_SwitchRequest2.default.PRIORITY.STRONG]={quality:_SwitchRequest2.default.NO_CHANGE,reason:null};values[_SwitchRequest2.default.PRIORITY.WEAK]={quality:_SwitchRequest2.default.NO_CHANGE,reason:null};values[_SwitchRequest2.default.PRIORITY.DEFAULT]={quality:_SwitchRequest2.default.NO_CHANGE,reason:null};for(i=0,len=srArray.length;i<len;i+=1){req=srArray[i];if(req.quality!==_SwitchRequest2.default.NO_CHANGE){// We only use the new quality in case it is lower than the already saved one or if no new quality has been selected for the respective priority\\nif(values[req.priority].quality===_SwitchRequest2.default.NO_CHANGE||values[req.priority].quality>req.quality){values[req.priority].quality=req.quality;values[req.priority].reason=req.reason||null;}}}if(values[_SwitchRequest2.default.PRIORITY.WEAK].quality!==_SwitchRequest2.default.NO_CHANGE){newSwitchReq=values[_SwitchRequest2.default.PRIORITY.WEAK];}if(values[_SwitchRequest2.default.PRIORITY.DEFAULT].quality!==_SwitchRequest2.default.NO_CHANGE){newSwitchReq=values[_SwitchRequest2.default.PRIORITY.DEFAULT];}if(values[_SwitchRequest2.default.PRIORITY.STRONG].quality!==_SwitchRequest2.default.NO_CHANGE){newSwitchReq=values[_SwitchRequest2.default.PRIORITY.STRONG];}if(newSwitchReq){quality=newSwitchReq.quality;reason=newSwitchReq.reason;}return(0,_SwitchRequest2.default)(context).create(quality,reason);}function getMaxQuality(rulesContext){var switchRequestArray=qualitySwitchRules.map(function(rule){return rule.getMaxIndex(rulesContext);});var activeRules=getActiveRules(switchRequestArray);var maxQuality=getMinSwitchRequest(activeRules);return maxQuality||(0,_SwitchRequest2.default)(context).create();}function shouldAbandonFragment(rulesContext){var abandonRequestArray=abandonFragmentRules.map(function(rule){return rule.shouldAbandon(rulesContext);});var activeRules=getActiveRules(abandonRequestArray);var shouldAbandon=getMinSwitchRequest(activeRules);return shouldAbandon||(0,_SwitchRequest2.default)(context).create();}function reset(){[qualitySwitchRules,abandonFragmentRules].forEach(function(rules){if(rules&&rules.length){rules.forEach(function(rule){return rule.reset&&rule.reset();});}});qualitySwitchRules=[];abandonFragmentRules=[];}function getQualitySwitchRules(){return qualitySwitchRules;}instance={initialize:initialize,reset:reset,getMaxQuality:getMaxQuality,getMinSwitchRequest:getMinSwitchRequest,shouldAbandonFragment:shouldAbandonFragment,getQualitySwitchRules:getQualitySwitchRules};return instance;}ABRRulesCollection.__dashjs_factory_name=\\'ABRRulesCollection\\';var factory=_FactoryMaker2.default.getClassFactory(ABRRulesCollection);factory.QUALITY_SWITCH_RULES=QUALITY_SWITCH_RULES;factory.ABANDON_FRAGMENT_RULES=ABANDON_FRAGMENT_RULES;_FactoryMaker2.default.updateSingletonFactory(ABRRulesCollection.__dashjs_factory_name,factory);exports.default=factory;\\n//# sourceMappingURL=ABRRulesCollection.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/ABRRulesCollection.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function AbandonRequestsRule(config){config=config||{};var ABANDON_MULTIPLIER=1.8;var GRACE_TIME_THRESHOLD=500;var MIN_LENGTH_TO_AVERAGE=5;var context=this.context;var mediaPlayerModel=config.mediaPlayerModel;var dashMetrics=config.dashMetrics;var settings=config.settings;var instance=void 0,logger=void 0,fragmentDict=void 0,abandonDict=void 0,throughputArray=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);reset();}function setFragmentRequestDict(type,id){fragmentDict[type]=fragmentDict[type]||{};fragmentDict[type][id]=fragmentDict[type][id]||{};}function storeLastRequestThroughputByType(type,throughput){throughputArray[type]=throughputArray[type]||[];throughputArray[type].push(throughput);}function shouldAbandon(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create(_SwitchRequest2.default.NO_CHANGE,{name:AbandonRequestsRule.__dashjs_factory_name});if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('getCurrentRequest')||!rulesContext.hasOwnProperty('getRepresentationInfo')||!rulesContext.hasOwnProperty('getAbrController')){return switchRequest;}var mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var req=rulesContext.getCurrentRequest();if(!isNaN(req.index)){setFragmentRequestDict(mediaType,req.index);var stableBufferTime=mediaPlayerModel.getStableBufferTime();var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);if(bufferLevel>stableBufferTime){return switchRequest;}var fragmentInfo=fragmentDict[mediaType][req.index];if(fragmentInfo===null||req.firstByteDate===null||abandonDict.hasOwnProperty(fragmentInfo.id)){return switchRequest;}//setup some init info based on first progress event\\nif(fragmentInfo.firstByteTime===undefined){throughputArray[mediaType]=[];fragmentInfo.firstByteTime=req.firstByteDate.getTime();fragmentInfo.segmentDuration=req.duration;fragmentInfo.bytesTotal=req.bytesTotal;fragmentInfo.id=req.index;}fragmentInfo.bytesLoaded=req.bytesLoaded;fragmentInfo.elapsedTime=new Date().getTime()-fragmentInfo.firstByteTime;if(fragmentInfo.bytesLoaded>0&&fragmentInfo.elapsedTime>0){storeLastRequestThroughputByType(mediaType,Math.round(fragmentInfo.bytesLoaded*8/fragmentInfo.elapsedTime));}if(throughputArray[mediaType].length>=MIN_LENGTH_TO_AVERAGE&&fragmentInfo.elapsedTime>GRACE_TIME_THRESHOLD&&fragmentInfo.bytesLoaded<fragmentInfo.bytesTotal){var totalSampledValue=throughputArray[mediaType].reduce(function(a,b){return a+b;},0);fragmentInfo.measuredBandwidthInKbps=Math.round(totalSampledValue/throughputArray[mediaType].length);fragmentInfo.estimatedTimeOfDownload=+(fragmentInfo.bytesTotal*8/fragmentInfo.measuredBandwidthInKbps/1000).toFixed(2);if(fragmentInfo.estimatedTimeOfDownload<fragmentInfo.segmentDuration*ABANDON_MULTIPLIER||rulesContext.getRepresentationInfo().quality===0){return switchRequest;}else if(!abandonDict.hasOwnProperty(fragmentInfo.id)){var abrController=rulesContext.getAbrController();var bytesRemaining=fragmentInfo.bytesTotal-fragmentInfo.bytesLoaded;var bitrateList=abrController.getBitrateList(mediaInfo);var quality=abrController.getQualityForBitrate(mediaInfo,fragmentInfo.measuredBandwidthInKbps*settings.get().streaming.abr.bandwidthSafetyFactor);var minQuality=abrController.getMinAllowedIndexFor(mediaType);var newQuality=minQuality!==undefined?Math.max(minQuality,quality):quality;var estimateOtherBytesTotal=fragmentInfo.bytesTotal*bitrateList[newQuality].bitrate/bitrateList[abrController.getQualityFor(mediaType)].bitrate;if(bytesRemaining>estimateOtherBytesTotal){switchRequest.quality=newQuality;switchRequest.reason.throughput=fragmentInfo.measuredBandwidthInKbps;switchRequest.reason.fragmentID=fragmentInfo.id;abandonDict[fragmentInfo.id]=fragmentInfo;logger.debug('['+mediaType+'] frag id',fragmentInfo.id,' is asking to abandon and switch to quality to ',newQuality,' measured bandwidth was',fragmentInfo.measuredBandwidthInKbps);delete fragmentDict[mediaType][fragmentInfo.id];}}}else if(fragmentInfo.bytesLoaded===fragmentInfo.bytesTotal){delete fragmentDict[mediaType][fragmentInfo.id];}}return switchRequest;}function reset(){fragmentDict={};abandonDict={};throughputArray=[];}instance={shouldAbandon:shouldAbandon,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */AbandonRequestsRule.__dashjs_factory_name='AbandonRequestsRule';exports.default=_FactoryMaker2.default.getClassFactory(AbandonRequestsRule);\\n//# sourceMappingURL=AbandonRequestsRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/AbandonRequestsRule.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _HTTPRequest=__webpack_require__(/*! ../../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _EventBus=__webpack_require__(/*! ../../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}// BOLA_STATE_ONE_BITRATE   : If there is only one bitrate (or initialization failed), always return NO_CHANGE.\\n// BOLA_STATE_STARTUP       : Set placeholder buffer such that we download fragments at most recently measured throughput.\\n// BOLA_STATE_STEADY        : Buffer primed, we switch to steady operation.\\n// TODO: add BOLA_STATE_SEEK and tune BOLA behavior on seeking\\nvar BOLA_STATE_ONE_BITRATE=0;/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2016, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */// For a description of the BOLA adaptive bitrate (ABR) algorithm, see http://arxiv.org/abs/1601.06748\\nvar BOLA_STATE_STARTUP=1;var BOLA_STATE_STEADY=2;var MINIMUM_BUFFER_S=10;// BOLA should never add artificial delays if buffer is less than MINIMUM_BUFFER_S.\\nvar MINIMUM_BUFFER_PER_BITRATE_LEVEL_S=2;// E.g. if there are 5 bitrates, BOLA switches to top bitrate at buffer = 10 + 5 * 2 = 20s.\\n// If Schedule Controller does not allow buffer to reach that level, it can be achieved through the placeholder buffer level.\\nvar PLACEHOLDER_BUFFER_DECAY=0.99;// Make sure placeholder buffer does not stick around too long.\\nfunction BolaRule(config){config=config||{};var context=this.context;var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,bolaStateDict=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.BUFFER_EMPTY,onBufferEmpty,instance);eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.on(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChangeRequested,instance);eventBus.on(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,instance);}function utilitiesFromBitrates(bitrates){return bitrates.map(function(b){return Math.log(b);});// no need to worry about offset, utilities will be offset (uniformly) anyway later\\n}// NOTE: in live streaming, the real buffer level can drop below minimumBufferS, but bola should not stick to lowest bitrate by using a placeholder buffer level\\nfunction calculateBolaParameters(stableBufferTime,bitrates,utilities){var highestUtilityIndex=utilities.reduce(function(highestIndex,u,uIndex){return u>utilities[highestIndex]?uIndex:highestIndex;},0);if(highestUtilityIndex===0){// if highestUtilityIndex === 0, then always use lowest bitrate\\nreturn null;}var bufferTime=Math.max(stableBufferTime,MINIMUM_BUFFER_S+MINIMUM_BUFFER_PER_BITRATE_LEVEL_S*bitrates.length);// TODO: Investigate if following can be better if utilities are not the default Math.log utilities.\\n// If using Math.log utilities, we can choose Vp and gp to always prefer bitrates[0] at minimumBufferS and bitrates[max] at bufferTarget.\\n// (Vp * (utility + gp) - bufferLevel) / bitrate has the maxima described when:\\n// Vp * (utilities[0] + gp - 1) === minimumBufferS and Vp * (utilities[max] + gp - 1) === bufferTarget\\n// giving:\\nvar gp=(utilities[highestUtilityIndex]-1)/(bufferTime/MINIMUM_BUFFER_S-1);var Vp=MINIMUM_BUFFER_S/gp;// note that expressions for gp and Vp assume utilities[0] === 1, which is true because of normalization\\nreturn{gp:gp,Vp:Vp};}function getInitialBolaState(rulesContext){var initialState={};var mediaInfo=rulesContext.getMediaInfo();var bitrates=mediaInfo.bitrateList.map(function(b){return b.bandwidth;});var utilities=utilitiesFromBitrates(bitrates);utilities=utilities.map(function(u){return u-utilities[0]+1;});// normalize\\nvar stableBufferTime=mediaPlayerModel.getStableBufferTime();var params=calculateBolaParameters(stableBufferTime,bitrates,utilities);if(!params){// only happens when there is only one bitrate level\\ninitialState.state=BOLA_STATE_ONE_BITRATE;}else{initialState.state=BOLA_STATE_STARTUP;initialState.bitrates=bitrates;initialState.utilities=utilities;initialState.stableBufferTime=stableBufferTime;initialState.Vp=params.Vp;initialState.gp=params.gp;initialState.lastQuality=0;clearBolaStateOnSeek(initialState);}return initialState;}function clearBolaStateOnSeek(bolaState){bolaState.placeholderBuffer=0;bolaState.mostAdvancedSegmentStart=NaN;bolaState.lastSegmentWasReplacement=false;bolaState.lastSegmentStart=NaN;bolaState.lastSegmentDurationS=NaN;bolaState.lastSegmentRequestTimeMs=NaN;bolaState.lastSegmentFinishTimeMs=NaN;}// If the buffer target is changed (can this happen mid-stream?), then adjust BOLA parameters accordingly.\\nfunction checkBolaStateStableBufferTime(bolaState,mediaType){var stableBufferTime=mediaPlayerModel.getStableBufferTime();if(bolaState.stableBufferTime!==stableBufferTime){var params=calculateBolaParameters(stableBufferTime,bolaState.bitrates,bolaState.utilities);if(params.Vp!==bolaState.Vp||params.gp!==bolaState.gp){// correct placeholder buffer using two criteria:\\n// 1. do not change effective buffer level at effectiveBufferLevel === MINIMUM_BUFFER_S ( === Vp * gp )\\n// 2. scale placeholder buffer by Vp subject to offset indicated in 1.\\nvar bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var effectiveBufferLevel=bufferLevel+bolaState.placeholderBuffer;effectiveBufferLevel-=MINIMUM_BUFFER_S;effectiveBufferLevel*=params.Vp/bolaState.Vp;effectiveBufferLevel+=MINIMUM_BUFFER_S;bolaState.stableBufferTime=stableBufferTime;bolaState.Vp=params.Vp;bolaState.gp=params.gp;bolaState.placeholderBuffer=Math.max(0,effectiveBufferLevel-bufferLevel);}}}function getBolaState(rulesContext){var mediaType=rulesContext.getMediaType();var bolaState=bolaStateDict[mediaType];if(!bolaState){bolaState=getInitialBolaState(rulesContext);bolaStateDict[mediaType]=bolaState;}else if(bolaState.state!==BOLA_STATE_ONE_BITRATE){checkBolaStateStableBufferTime(bolaState,mediaType);}return bolaState;}// The core idea of BOLA.\\nfunction getQualityFromBufferLevel(bolaState,bufferLevel){var bitrateCount=bolaState.bitrates.length;var quality=NaN;var score=NaN;for(var i=0;i<bitrateCount;++i){var s=(bolaState.Vp*(bolaState.utilities[i]+bolaState.gp)-bufferLevel)/bolaState.bitrates[i];if(isNaN(score)||s>=score){score=s;quality=i;}}return quality;}// maximum buffer level which prefers to download at quality rather than wait\\nfunction maxBufferLevelForQuality(bolaState,quality){return bolaState.Vp*(bolaState.utilities[quality]+bolaState.gp);}// the minimum buffer level that would cause BOLA to choose quality rather than a lower bitrate\\nfunction minBufferLevelForQuality(bolaState,quality){var qBitrate=bolaState.bitrates[quality];var qUtility=bolaState.utilities[quality];var min=0;for(var i=quality-1;i>=0;--i){// for each bitrate less than bitrates[quality], BOLA should prefer quality (unless other bitrate has higher utility)\\nif(bolaState.utilities[i]<bolaState.utilities[quality]){var iBitrate=bolaState.bitrates[i];var iUtility=bolaState.utilities[i];var level=bolaState.Vp*(bolaState.gp+(qBitrate*iUtility-iBitrate*qUtility)/(qBitrate-iBitrate));min=Math.max(min,level);// we want min to be small but at least level(i) for all i\\n}}return min;}/*\\n     * The placeholder buffer increases the effective buffer that is used to calculate the bitrate.\\n     * There are two main reasons we might want to increase the placeholder buffer:\\n     *\\n     * 1. When a segment finishes downloading, we would expect to get a call on getMaxIndex() regarding the quality for\\n     *    the next segment. However, there might be a delay before the next call. E.g. when streaming live content, the\\n     *    next segment might not be available yet. If the call to getMaxIndex() does happens after a delay, we don't\\n     *    want the delay to change the BOLA decision - we only want to factor download time to decide on bitrate level.\\n     *\\n     * 2. It is possible to get a call to getMaxIndex() without having a segment download. The buffer target in dash.js\\n     *    is different for top-quality segments and lower-quality segments. If getMaxIndex() returns a lower-than-top\\n     *    quality, then the buffer controller might decide not to download a segment. When dash.js is ready for the next\\n     *    segment, getMaxIndex() will be called again. We don't want this extra delay to factor in the bitrate decision.\\n     */function updatePlaceholderBuffer(bolaState,mediaType){var nowMs=Date.now();if(!isNaN(bolaState.lastSegmentFinishTimeMs)){// compensate for non-bandwidth-derived delays, e.g., live streaming availability, buffer controller\\nvar delay=0.001*(nowMs-bolaState.lastSegmentFinishTimeMs);bolaState.placeholderBuffer+=Math.max(0,delay);}else if(!isNaN(bolaState.lastCallTimeMs)){// no download after last call, compensate for delay between calls\\nvar _delay=0.001*(nowMs-bolaState.lastCallTimeMs);bolaState.placeholderBuffer+=Math.max(0,_delay);}bolaState.lastCallTimeMs=nowMs;bolaState.lastSegmentStart=NaN;bolaState.lastSegmentRequestTimeMs=NaN;bolaState.lastSegmentFinishTimeMs=NaN;checkBolaStateStableBufferTime(bolaState,mediaType);}function onBufferEmpty(){// if we rebuffer, we don't want the placeholder buffer to artificially raise BOLA quality\\nfor(var mediaType in bolaStateDict){if(bolaStateDict.hasOwnProperty(mediaType)&&bolaStateDict[mediaType].state===BOLA_STATE_STEADY){bolaStateDict[mediaType].placeholderBuffer=0;}}}function onPlaybackSeeking(){// TODO: 1. Verify what happens if we seek mid-fragment.\\n// TODO: 2. If e.g. we have 10s fragments and seek, we might want to download the first fragment at a lower quality to restart playback quickly.\\nfor(var mediaType in bolaStateDict){if(bolaStateDict.hasOwnProperty(mediaType)){var bolaState=bolaStateDict[mediaType];if(bolaState.state!==BOLA_STATE_ONE_BITRATE){bolaState.state=BOLA_STATE_STARTUP;// TODO: BOLA_STATE_SEEK?\\nclearBolaStateOnSeek(bolaState);}}}}function onMediaFragmentLoaded(e){if(e&&e.chunk&&e.chunk.mediaInfo){var bolaState=bolaStateDict[e.chunk.mediaInfo.type];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){var start=e.chunk.start;if(isNaN(bolaState.mostAdvancedSegmentStart)||start>bolaState.mostAdvancedSegmentStart){bolaState.mostAdvancedSegmentStart=start;bolaState.lastSegmentWasReplacement=false;}else{bolaState.lastSegmentWasReplacement=true;}bolaState.lastSegmentStart=start;bolaState.lastSegmentDurationS=e.chunk.duration;bolaState.lastQuality=e.chunk.quality;checkNewSegment(bolaState,e.chunk.mediaInfo.type);}}}function onMetricAdded(e){if(e&&e.metric===_MetricsConstants2.default.HTTP_REQUEST&&e.value&&e.value.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var bolaState=bolaStateDict[e.mediaType];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){bolaState.lastSegmentRequestTimeMs=e.value.trequest.getTime();bolaState.lastSegmentFinishTimeMs=e.value._tfinish.getTime();checkNewSegment(bolaState,e.mediaType);}}}/*\\n     * When a new segment is downloaded, we get two notifications: onMediaFragmentLoaded() and onMetricAdded(). It is\\n     * possible that the quality for the downloaded segment was lower (not higher) than the quality indicated by BOLA.\\n     * This might happen because of other rules such as the DroppedFramesRule. When this happens, we trim the\\n     * placeholder buffer to make BOLA more stable. This mechanism also avoids inflating the buffer when BOLA itself\\n     * decides not to increase the quality to avoid oscillations.\\n     *\\n     * We should also check for replacement segments (fast switching). In this case, a segment is downloaded but does\\n     * not grow the actual buffer. Fast switching might cause the buffer to deplete, causing BOLA to drop the bitrate.\\n     * We avoid this by growing the placeholder buffer.\\n     */function checkNewSegment(bolaState,mediaType){if(!isNaN(bolaState.lastSegmentStart)&&!isNaN(bolaState.lastSegmentRequestTimeMs)&&!isNaN(bolaState.placeholderBuffer)){bolaState.placeholderBuffer*=PLACEHOLDER_BUFFER_DECAY;// Find what maximum buffer corresponding to last segment was, and ensure placeholder is not relatively larger.\\nif(!isNaN(bolaState.lastSegmentFinishTimeMs)){var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var bufferAtLastSegmentRequest=bufferLevel+0.001*(bolaState.lastSegmentFinishTimeMs-bolaState.lastSegmentRequestTimeMs);// estimate\\nvar maxEffectiveBufferForLastSegment=maxBufferLevelForQuality(bolaState,bolaState.lastQuality);var maxPlaceholderBuffer=Math.max(0,maxEffectiveBufferForLastSegment-bufferAtLastSegmentRequest);bolaState.placeholderBuffer=Math.min(maxPlaceholderBuffer,bolaState.placeholderBuffer);}// then see if we should grow placeholder buffer\\nif(bolaState.lastSegmentWasReplacement&&!isNaN(bolaState.lastSegmentDurationS)){// compensate for segments that were downloaded but did not grow the buffer\\nbolaState.placeholderBuffer+=bolaState.lastSegmentDurationS;}bolaState.lastSegmentStart=NaN;bolaState.lastSegmentRequestTimeMs=NaN;}}function onQualityChangeRequested(e){// Useful to store change requests when abandoning a download.\\nif(e){var bolaState=bolaStateDict[e.mediaType];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){bolaState.abrQuality=e.newQuality;}}}function onFragmentLoadingAbandoned(e){if(e){var bolaState=bolaStateDict[e.mediaType];if(bolaState&&bolaState.state!==BOLA_STATE_ONE_BITRATE){// deflate placeholderBuffer - note that we want to be conservative when abandoning\\nvar bufferLevel=dashMetrics.getCurrentBufferLevel(e.mediaType);var wantEffectiveBufferLevel=void 0;if(bolaState.abrQuality>0){// deflate to point where BOLA just chooses newQuality over newQuality-1\\nwantEffectiveBufferLevel=minBufferLevelForQuality(bolaState,bolaState.abrQuality);}else{wantEffectiveBufferLevel=MINIMUM_BUFFER_S;}var maxPlaceholderBuffer=Math.max(0,wantEffectiveBufferLevel-bufferLevel);bolaState.placeholderBuffer=Math.min(bolaState.placeholderBuffer,maxPlaceholderBuffer);}}}function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('getScheduleController')||!rulesContext.hasOwnProperty('getStreamInfo')||!rulesContext.hasOwnProperty('getAbrController')||!rulesContext.hasOwnProperty('useBufferOccupancyABR')){return switchRequest;}var mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var scheduleController=rulesContext.getScheduleController();var streamInfo=rulesContext.getStreamInfo();var abrController=rulesContext.getAbrController();var throughputHistory=abrController.getThroughputHistory();var streamId=streamInfo?streamInfo.id:null;var isDynamic=streamInfo&&streamInfo.manifestInfo&&streamInfo.manifestInfo.isDynamic;var useBufferOccupancyABR=rulesContext.useBufferOccupancyABR();switchRequest.reason=switchRequest.reason||{};if(!useBufferOccupancyABR){return switchRequest;}scheduleController.setTimeToLoadDelay(0);var bolaState=getBolaState(rulesContext);if(bolaState.state===BOLA_STATE_ONE_BITRATE){// shouldn't even have been called\\nreturn switchRequest;}var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var throughput=throughputHistory.getAverageThroughput(mediaType,isDynamic);var safeThroughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);var latency=throughputHistory.getAverageLatency(mediaType);var quality=void 0;switchRequest.reason.state=bolaState.state;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;if(isNaN(throughput)){// isNaN(throughput) === isNaN(safeThroughput) === isNaN(latency)\\n// still starting up - not enough information\\nreturn switchRequest;}switch(bolaState.state){case BOLA_STATE_STARTUP:quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);switchRequest.quality=quality;switchRequest.reason.throughput=safeThroughput;bolaState.placeholderBuffer=Math.max(0,minBufferLevelForQuality(bolaState,quality)-bufferLevel);bolaState.lastQuality=quality;if(!isNaN(bolaState.lastSegmentDurationS)&&bufferLevel>=bolaState.lastSegmentDurationS){bolaState.state=BOLA_STATE_STEADY;}break;// BOLA_STATE_STARTUP\\ncase BOLA_STATE_STEADY:// NB: The placeholder buffer is added to bufferLevel to come up with a bitrate.\\n//     This might lead BOLA to be too optimistic and to choose a bitrate that would lead to rebuffering -\\n//     if the real buffer bufferLevel runs out, the placeholder buffer cannot prevent rebuffering.\\n//     However, the InsufficientBufferRule takes care of this scenario.\\nupdatePlaceholderBuffer(bolaState,mediaType);quality=getQualityFromBufferLevel(bolaState,bufferLevel+bolaState.placeholderBuffer);// we want to avoid oscillations\\n// We implement the \\\"BOLA-O\\\" variant: when network bandwidth lies between two encoded bitrate levels, stick to the lowest level.\\nvar qualityForThroughput=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);if(quality>bolaState.lastQuality&&quality>qualityForThroughput){// only intervene if we are trying to *increase* quality to an *unsustainable* level\\n// we are only avoid oscillations - do not drop below last quality\\nquality=Math.max(qualityForThroughput,bolaState.lastQuality);}// We do not want to overfill buffer with low quality chunks.\\n// Note that there will be no delay if buffer level is below MINIMUM_BUFFER_S, probably even with some margin higher than MINIMUM_BUFFER_S.\\nvar delayS=Math.max(0,bufferLevel+bolaState.placeholderBuffer-maxBufferLevelForQuality(bolaState,quality));// First reduce placeholder buffer, then tell schedule controller to pause.\\nif(delayS<=bolaState.placeholderBuffer){bolaState.placeholderBuffer-=delayS;delayS=0;}else{delayS-=bolaState.placeholderBuffer;bolaState.placeholderBuffer=0;if(quality<abrController.getTopQualityIndexFor(mediaType,streamId)){// At top quality, allow schedule controller to decide how far to fill buffer.\\nscheduleController.setTimeToLoadDelay(1000*delayS);}else{delayS=0;}}switchRequest.quality=quality;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;switchRequest.reason.bufferLevel=bufferLevel;switchRequest.reason.placeholderBuffer=bolaState.placeholderBuffer;switchRequest.reason.delay=delayS;bolaState.lastQuality=quality;// keep bolaState.state === BOLA_STATE_STEADY\\nbreak;// BOLA_STATE_STEADY\\ndefault:logger.debug('BOLA ABR rule invoked in bad state.');// should not arrive here, try to recover\\nswitchRequest.quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);switchRequest.reason.state=bolaState.state;switchRequest.reason.throughput=safeThroughput;switchRequest.reason.latency=latency;bolaState.state=BOLA_STATE_STARTUP;clearBolaStateOnSeek(bolaState);}return switchRequest;}function resetInitialSettings(){bolaStateDict={};}function reset(){resetInitialSettings();eventBus.off(_Events2.default.BUFFER_EMPTY,onBufferEmpty,instance);eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,onMediaFragmentLoaded,instance);eventBus.off(_Events2.default.METRIC_ADDED,onMetricAdded,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,onQualityChangeRequested,instance);eventBus.off(_Events2.default.FRAGMENT_LOADING_ABANDONED,onFragmentLoadingAbandoned,instance);}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}BolaRule.__dashjs_factory_name='BolaRule';exports.default=_FactoryMaker2.default.getClassFactory(BolaRule);\\n//# sourceMappingURL=BolaRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/BolaRule.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DroppedFramesRule(){var context=this.context;var instance=void 0,logger=void 0;var DROPPED_PERCENTAGE_FORBID=0.15;var GOOD_SAMPLE_SIZE=375;//Don't apply the rule until this many frames have been rendered(and counted under those indices).\\nfunction setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getDroppedFramesHistory')){return switchRequest;}var droppedFramesHistory=rulesContext.getDroppedFramesHistory();if(droppedFramesHistory){var dfh=droppedFramesHistory.getFrameHistory();var droppedFrames=0;var totalFrames=0;var maxIndex=_SwitchRequest2.default.NO_CHANGE;for(var i=1;i<dfh.length;i++){//No point in measuring dropped frames for the zeroeth index.\\nif(dfh[i]){droppedFrames=dfh[i].droppedVideoFrames;totalFrames=dfh[i].totalVideoFrames;if(totalFrames>GOOD_SAMPLE_SIZE&&droppedFrames/totalFrames>DROPPED_PERCENTAGE_FORBID){maxIndex=i-1;logger.debug('index: '+maxIndex+' Dropped Frames: '+droppedFrames+' Total Frames: '+totalFrames);break;}}}return(0,_SwitchRequest2.default)(context).create(maxIndex,{droppedFrames:droppedFrames});}return switchRequest;}instance={getMaxIndex:getMaxIndex};setup();return instance;}DroppedFramesRule.__dashjs_factory_name='DroppedFramesRule';exports.default=_FactoryMaker2.default.getClassFactory(DroppedFramesRule);\\n//# sourceMappingURL=DroppedFramesRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/DroppedFramesRule.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _EventBus=__webpack_require__(/*! ../../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function InsufficientBufferRule(config){config=config||{};var INSUFFICIENT_BUFFER_SAFETY_FACTOR=0.5;var SEGMENT_IGNORE_COUNT=2;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var dashMetrics=config.dashMetrics;var instance=void 0,logger=void 0,bufferStateDict=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();eventBus.on(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.on(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onEndFragment,instance);}function checkConfig(){if(!dashMetrics||!dashMetrics.hasOwnProperty('getCurrentBufferLevel')||!dashMetrics.hasOwnProperty('getCurrentBufferState')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}/*\\n     * InsufficientBufferRule does not kick in before the first BUFFER_LOADED event happens. This is reset at every seek.\\n     *\\n     * If a BUFFER_EMPTY event happens, then InsufficientBufferRule returns switchRequest.quality=0 until BUFFER_LOADED happens.\\n     *\\n     * Otherwise InsufficientBufferRule gives a maximum bitrate depending on throughput and bufferLevel such that\\n     * a whole fragment can be downloaded before the buffer runs out, subject to a conservative safety factor of 0.5.\\n     * If the bufferLevel is low, then InsufficientBufferRule avoids rebuffering risk.\\n     * If the bufferLevel is high, then InsufficientBufferRule give a high MaxIndex allowing other rules to take over.\\n     */function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaType')){return switchRequest;}checkConfig();var mediaType=rulesContext.getMediaType();var currentBufferState=dashMetrics.getCurrentBufferState(mediaType);var representationInfo=rulesContext.getRepresentationInfo();var fragmentDuration=representationInfo.fragmentDuration;// Don't ask for a bitrate change if there is not info about buffer state or if fragmentDuration is not defined\\nif(shouldIgnore(mediaType)||!fragmentDuration){return switchRequest;}if(currentBufferState&&currentBufferState.state===_MetricsConstants2.default.BUFFER_EMPTY){logger.debug('['+mediaType+'] Switch to index 0; buffer is empty.');switchRequest.quality=0;switchRequest.reason='InsufficientBufferRule: Buffer is empty';}else{var mediaInfo=rulesContext.getMediaInfo();var abrController=rulesContext.getAbrController();var throughputHistory=abrController.getThroughputHistory();var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType);var throughput=throughputHistory.getAverageThroughput(mediaType);var latency=throughputHistory.getAverageLatency(mediaType);var bitrate=throughput*(bufferLevel/fragmentDuration)*INSUFFICIENT_BUFFER_SAFETY_FACTOR;switchRequest.quality=abrController.getQualityForBitrate(mediaInfo,bitrate,latency);switchRequest.reason='InsufficientBufferRule: being conservative to avoid immediate rebuffering';}return switchRequest;}function shouldIgnore(mediaType){return bufferStateDict[mediaType].ignoreCount>0;}function resetInitialSettings(){bufferStateDict={};bufferStateDict[_Constants2.default.VIDEO]={ignoreCount:SEGMENT_IGNORE_COUNT};bufferStateDict[_Constants2.default.AUDIO]={ignoreCount:SEGMENT_IGNORE_COUNT};}function onPlaybackSeeking(){resetInitialSettings();}function onEndFragment(e){if(!isNaN(e.startTime)&&(e.mediaType===_Constants2.default.AUDIO||e.mediaType===_Constants2.default.VIDEO)){if(bufferStateDict[e.mediaType].ignoreCount>0){bufferStateDict[e.mediaType].ignoreCount--;}}}function reset(){resetInitialSettings();eventBus.off(_Events2.default.PLAYBACK_SEEKING,onPlaybackSeeking,instance);eventBus.off(_Events2.default.BYTES_APPENDED_END_FRAGMENT,onEndFragment,instance);}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */InsufficientBufferRule.__dashjs_factory_name='InsufficientBufferRule';exports.default=_FactoryMaker2.default.getClassFactory(InsufficientBufferRule);\\n//# sourceMappingURL=InsufficientBufferRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/InsufficientBufferRule.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _HTTPRequest=__webpack_require__(/*! ../../vo/metrics/HTTPRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\");var _EventBus=__webpack_require__(/*! ../../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2020, Unified Streaming.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */// For a description of the Learn2Adapt-LowLatency (L2A-LL) bitrate adaptation algorithm, see https://github.com/unifiedstreaming/Learn2Adapt-LowLatency/blob/master/Online_learning_for_bitrate_adaptation_in_low_latency_live_streaming_CR.pdf\\nvar L2A_STATE_ONE_BITRATE=0;// If there is only one bitrate (or initialization failed), always return NO_CHANGE.\\nvar L2A_STATE_STARTUP=1;// Set placeholder buffer such that we download fragments at most recently measured throughput.\\nvar L2A_STATE_STEADY=2;// Buffer primed, we switch to steady operation.\\nfunction L2ARule(config){config=config||{};var context=this.context;var dashMetrics=config.dashMetrics;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,l2AStateDict=void 0,l2AParameterDict=void 0,logger=void 0;/**\\n     * Setup function to initialize L2ARule\\n     */function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);_resetInitialSettings();eventBus.on(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,instance);eventBus.on(_Events2.default.MEDIA_FRAGMENT_LOADED,_onMediaFragmentLoaded,instance);eventBus.on(_Events2.default.METRIC_ADDED,_onMetricAdded,instance);eventBus.on(_Events2.default.QUALITY_CHANGE_REQUESTED,_onQualityChangeRequested,instance);}/**\\n     * Sets the initial state of the algorithm. Calls the initialize function for the paramteters.\\n     * @param {object} rulesContext\\n     * @return {object} initialState\\n     * @private\\n     */function _getInitialL2AState(rulesContext){var initialState={};var mediaInfo=rulesContext.getMediaInfo();var bitrates=mediaInfo.bitrateList.map(function(b){return b.bandwidth/1000;});initialState.state=L2A_STATE_STARTUP;initialState.bitrates=bitrates;initialState.lastQuality=0;_initializeL2AParameters(mediaInfo);_clearL2AStateOnSeek(initialState);return initialState;}/**\\n     * Initializes the parameters of the algorithm. This will be done once for each media type.\\n     * @param {object} mediaInfo\\n     * @private\\n     */function _initializeL2AParameters(mediaInfo){if(!mediaInfo||!mediaInfo.type){return;}l2AParameterDict[mediaInfo.type]={};l2AParameterDict[mediaInfo.type].w=[];//Vector of probabilities associated with bitrate decisions\\nl2AParameterDict[mediaInfo.type].prev_w=[];//Vector of probabilities associated with bitrate decisions calculated in the previous step\\nl2AParameterDict[mediaInfo.type].Q=0;//Initialization of Lagrangian multiplier (This keeps track of the buffer displacement)\\nl2AParameterDict[mediaInfo.type].segment_request_start_s=0;l2AParameterDict[mediaInfo.type].segment_download_finish_s=0;l2AParameterDict[mediaInfo.type].B_target=1.5;//Target buffer level\\n}/**\\n     * Clears the state object\\n     * @param {object} l2AState\\n     * @private\\n     */function _clearL2AStateOnSeek(l2AState){l2AState.placeholderBuffer=0;l2AState.mostAdvancedSegmentStart=NaN;l2AState.lastSegmentWasReplacement=false;l2AState.lastSegmentStart=NaN;l2AState.lastSegmentDurationS=NaN;l2AState.lastSegmentRequestTimeMs=NaN;l2AState.lastSegmentFinishTimeMs=NaN;}/**\\n     * Returns the state object for a fiven media type. If the state object is not yet defined _getInitialL2AState is called\\n     * @param {object} rulesContext\\n     * @return {object} l2AState\\n     * @private\\n     */function _getL2AState(rulesContext){var mediaType=rulesContext.getMediaType();var l2AState=l2AStateDict[mediaType];if(!l2AState){l2AState=_getInitialL2AState(rulesContext);l2AStateDict[mediaType]=l2AState;}return l2AState;}/**\\n     * Event handler for the seeking event.\\n     * @private\\n     */function _onPlaybackSeeking(){for(var mediaType in l2AStateDict){if(l2AStateDict.hasOwnProperty(mediaType)){var l2aState=l2AStateDict[mediaType];if(l2aState.state!==L2A_STATE_ONE_BITRATE){l2aState.state=L2A_STATE_STARTUP;_clearL2AStateOnSeek(l2aState);}}}}/**\\n     * Event handler for the mediaFragmentLoaded event\\n     * @param {object} e\\n     * @private\\n     */function _onMediaFragmentLoaded(e){if(e&&e.chunk&&e.chunk.mediaInfo){var l2AState=l2AStateDict[e.chunk.mediaInfo.type];var l2AParameters=l2AParameterDict[e.chunk.mediaInfo.type];if(l2AState&&l2AState.state!==L2A_STATE_ONE_BITRATE){var start=e.chunk.start;if(isNaN(l2AState.mostAdvancedSegmentStart)||start>l2AState.mostAdvancedSegmentStart){l2AState.mostAdvancedSegmentStart=start;l2AState.lastSegmentWasReplacement=false;}else{l2AState.lastSegmentWasReplacement=true;}l2AState.lastSegmentStart=start;l2AState.lastSegmentDurationS=e.chunk.duration;l2AState.lastQuality=e.chunk.quality;_checkNewSegment(l2AState,l2AParameters);}}}/**\\n     * Event handler for the metricAdded event\\n     * @param {object} e\\n     * @private\\n     */function _onMetricAdded(e){if(e&&e.metric===_MetricsConstants2.default.HTTP_REQUEST&&e.value&&e.value.type===_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var l2AState=l2AStateDict[e.mediaType];var l2AParameters=l2AParameterDict[e.mediaType];if(l2AState&&l2AState.state!==L2A_STATE_ONE_BITRATE){l2AState.lastSegmentRequestTimeMs=e.value.trequest.getTime();l2AState.lastSegmentFinishTimeMs=e.value._tfinish.getTime();_checkNewSegment(l2AState,l2AParameters);}}}/**\\n     * When a new metric has been added or a media fragment has been loaded the state is adjusted accordingly\\n     * @param {object} L2AState\\n     * @param {object} l2AParameters\\n     * @private\\n     */function _checkNewSegment(L2AState,l2AParameters){if(!isNaN(L2AState.lastSegmentStart)&&!isNaN(L2AState.lastSegmentRequestTimeMs)){l2AParameters.segment_request_start_s=0.001*L2AState.lastSegmentRequestTimeMs;l2AParameters.segment_download_finish_s=0.001*L2AState.lastSegmentFinishTimeMs;L2AState.lastSegmentStart=NaN;L2AState.lastSegmentRequestTimeMs=NaN;}}/**\\n     * Event handler for the qualityChangeRequested event\\n     * @param {object} e\\n     * @private\\n     */function _onQualityChangeRequested(e){// Useful to store change requests when abandoning a download.\\nif(e&&e.mediaType){var L2AState=l2AStateDict[e.mediaType];if(L2AState&&L2AState.state!==L2A_STATE_ONE_BITRATE){L2AState.abrQuality=e.newQuality;}}}/**\\n     * Dot multiplication of two arrays\\n     * @param {array} arr1\\n     * @param {array} arr2\\n     * @return {number} sumdot\\n     * @private\\n     */function _dotmultiplication(arr1,arr2){if(arr1.length!==arr2.length){return-1;}var sumdot=0;for(var i=0;i<arr1.length;i++){sumdot=sumdot+arr1[i]*arr2[i];}return sumdot;}/**\\n     * Project an n-dim vector y to the simplex Dn\\n     * Dn = { x : x n-dim, 1 >= x >= 0, sum(x) = 1}\\n     * Algorithm is explained at http://arxiv.org/abs/1101.6081\\n     * @param {array} arr\\n     * @return {array}\\n     */function euclideanProjection(arr){var m=arr.length;var bget=false;var arr2=[];for(var ii=0;ii<m;++ii){arr2[ii]=arr[ii];}var s=arr.sort(function(a,b){return b-a;});var tmpsum=0;var tmax=0;var x=[];for(var _ii=0;_ii<m-1;++_ii){tmpsum=tmpsum+s[_ii];tmax=(tmpsum-1)/(_ii+1);if(tmax>=s[_ii+1]){bget=true;break;}}if(!bget){tmax=(tmpsum+s[m-1]-1)/m;}for(var _ii2=0;_ii2<m;++_ii2){x[_ii2]=Math.max(arr2[_ii2]-tmax,0);}return x;}/**\\n     * Returns a switch request object indicating which quality is to be played\\n     * @param {object} rulesContext\\n     * @return {object}\\n     */function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();var horizon=4;// Optimization horizon (The amount of steps required to achieve convergence)\\nvar vl=Math.pow(horizon,0.99);// Cautiousness parameter, used to control aggressiveness of the bitrate decision process.\\nvar alpha=Math.max(Math.pow(horizon,1),vl*Math.sqrt(horizon));// Step size, used for gradient descent exploration granularity\\nvar mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var bitrates=mediaInfo.bitrateList.map(function(b){return b.bandwidth;});var bitrateCount=bitrates.length;var scheduleController=rulesContext.getScheduleController();var streamInfo=rulesContext.getStreamInfo();var abrController=rulesContext.getAbrController();var throughputHistory=abrController.getThroughputHistory();var isDynamic=streamInfo&&streamInfo.manifestInfo&&streamInfo.manifestInfo.isDynamic;var useL2AABR=rulesContext.useL2AABR();var bufferLevel=dashMetrics.getCurrentBufferLevel(mediaType,true);var safeThroughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);var throughput=throughputHistory.getAverageThroughput(mediaType,isDynamic);// In kbits/s\\nvar react=2;// Reactiveness to volatility (abrupt throughput drops), used to re-calibrate Lagrangian multiplier Q\\nvar latency=throughputHistory.getAverageLatency(mediaType);var videoModel=rulesContext.getVideoModel();var quality=void 0;var currentPlaybackRate=videoModel.getPlaybackRate();if(!rulesContext||!rulesContext.hasOwnProperty(\\'getMediaInfo\\')||!rulesContext.hasOwnProperty(\\'getMediaType\\')||!rulesContext.hasOwnProperty(\\'getScheduleController\\')||!rulesContext.hasOwnProperty(\\'getStreamInfo\\')||!rulesContext.hasOwnProperty(\\'getAbrController\\')||!rulesContext.hasOwnProperty(\\'useL2AABR\\')){return switchRequest;}switchRequest.reason=switchRequest.reason||{};if(!useL2AABR||mediaType===_Constants2.default.AUDIO){// L2A decides bitrate only for video. Audio to be included in decision process in a later stage\\nreturn switchRequest;}scheduleController.setTimeToLoadDelay(0);var l2AState=_getL2AState(rulesContext);if(l2AState.state===L2A_STATE_ONE_BITRATE){// shouldn\\'t even have been called\\nreturn switchRequest;}var l2AParameter=l2AParameterDict[mediaType];if(!l2AParameter){return switchRequest;}switchRequest.reason.state=l2AState.state;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;if(isNaN(throughput)){// still starting up - not enough information\\nreturn switchRequest;}switch(l2AState.state){case L2A_STATE_STARTUP:quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);//During strat-up phase abr.controller is responsible for bitrate decisions.\\nswitchRequest.quality=quality;switchRequest.reason.throughput=safeThroughput;l2AState.lastQuality=quality;if(!isNaN(l2AState.lastSegmentDurationS)&&bufferLevel>=l2AParameter.B_target){l2AState.state=L2A_STATE_STEADY;l2AParameter.Q=vl;// Initialization of Q langrangian multiplier\\n// Update of probability vector w, to be used in main adaptation logic of L2A below (steady state)\\nfor(var i=0;i<bitrateCount;++i){if(i===l2AState.lastQuality){l2AParameter.prev_w[i]=1;}else{l2AParameter.prev_w[i]=0;}}}break;// L2A_STATE_STARTUP\\ncase L2A_STATE_STEADY:var diff1=[];//Used to calculate the difference between consecutive decisions (w-w_prev)\\n// Manual calculation of latency and throughput during previous request\\nvar throughputMeasureTime=dashMetrics.getCurrentHttpRequest(mediaType).trace.reduce(function(a,b){return a+b.d;},0);var downloadBytes=dashMetrics.getCurrentHttpRequest(mediaType).trace.reduce(function(a,b){return a+b.b[0];},0);var lastthroughput=Math.round(8*downloadBytes/throughputMeasureTime);// bits/ms = kbits/s\\nif(lastthroughput<1){lastthroughput=1;}//To avoid division with 0 (avoid infinity) in case of an absolute network outage\\nvar V=l2AState.lastSegmentDurationS;var sign=1;//Main adaptation logic of L2A-LL\\nfor(var _i=0;_i<bitrateCount;++_i){bitrates[_i]=bitrates[_i]/1000;// Originally in bps, now in Kbps\\nif(currentPlaybackRate*bitrates[_i]>lastthroughput){// In this case buffer would deplete, leading to a stall, which increases latency and thus the particular probability of selsection of bitrate[i] should be decreased.\\nsign=-1;}// The objective of L2A is to minimize the overall latency=request-response time + buffer length after download+ potential stalling (if buffer less than chunk downlad time)\\nl2AParameter.w[_i]=l2AParameter.prev_w[_i]+sign*(V/(2*alpha))*((l2AParameter.Q+vl)*(currentPlaybackRate*bitrates[_i]/lastthroughput));//Lagrangian descent\\n}// Apply euclidean projection on w to ensure w expresses a probability distribution\\nl2AParameter.w=euclideanProjection(l2AParameter.w);for(var _i2=0;_i2<bitrateCount;++_i2){diff1[_i2]=l2AParameter.w[_i2]-l2AParameter.prev_w[_i2];l2AParameter.prev_w[_i2]=l2AParameter.w[_i2];}// Lagrangian multiplier Q calculation:\\nl2AParameter.Q=Math.max(0,l2AParameter.Q-V+V*currentPlaybackRate*((_dotmultiplication(bitrates,l2AParameter.prev_w)+_dotmultiplication(bitrates,diff1))/lastthroughput));// Quality is calculated as argmin of the absolute difference between available bitrates (bitrates[i]) and bitrate estimation (dotmultiplication(w,bitrates)).\\nvar temp=[];for(var _i3=0;_i3<bitrateCount;++_i3){temp[_i3]=Math.abs(bitrates[_i3]-_dotmultiplication(l2AParameter.w,bitrates));}// Quality is calculated based on the probability distribution w (the output of L2A)\\nquality=temp.indexOf(Math.min.apply(Math,temp));// We employ a cautious -stepwise- ascent\\nif(quality>l2AState.lastQuality){if(bitrates[l2AState.lastQuality+1]<=lastthroughput){quality=l2AState.lastQuality+1;}}// Provision against bitrate over-estimation, by re-calibrating the Lagrangian multiplier Q, to be taken into account for the next chunk\\nif(bitrates[quality]>=lastthroughput){l2AParameter.Q=react*Math.max(vl,l2AParameter.Q);}switchRequest.quality=quality;switchRequest.reason.throughput=throughput;switchRequest.reason.latency=latency;switchRequest.reason.bufferLevel=bufferLevel;l2AState.lastQuality=switchRequest.quality;break;default:// should not arrive here, try to recover\\nlogger.debug(\\'L2A ABR rule invoked in bad state.\\');switchRequest.quality=abrController.getQualityForBitrate(mediaInfo,safeThroughput,latency);switchRequest.reason.state=l2AState.state;switchRequest.reason.throughput=safeThroughput;switchRequest.reason.latency=latency;l2AState.state=L2A_STATE_STARTUP;_clearL2AStateOnSeek(l2AState);}return switchRequest;}/**\\n     * Reset objects to their initial state\\n     * @private\\n     */function _resetInitialSettings(){l2AStateDict={};l2AParameterDict={};}/**\\n     * Reset the rule\\n     */function reset(){_resetInitialSettings();eventBus.off(_Events2.default.PLAYBACK_SEEKING,_onPlaybackSeeking,instance);eventBus.off(_Events2.default.MEDIA_FRAGMENT_LOADED,_onMediaFragmentLoaded,instance);eventBus.off(_Events2.default.METRIC_ADDED,_onMetricAdded,instance);eventBus.off(_Events2.default.QUALITY_CHANGE_REQUESTED,_onQualityChangeRequested,instance);}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}L2ARule.__dashjs_factory_name=\\'L2ARule\\';exports.default=_FactoryMaker2.default.getClassFactory(L2ARule);\\n//# sourceMappingURL=L2ARule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/L2ARule.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SwitchHistoryRule(){var context=this.context;var instance=void 0,logger=void 0;//MAX_SWITCH is the number of drops made. It doesn't consider the size of the drop.\\nvar MAX_SWITCH=0.075;//Before this number of switch requests(no switch or actual), don't apply the rule.\\n//must be < SwitchRequestHistory SWITCH_REQUEST_HISTORY_DEPTH to enable rule\\nvar SAMPLE_SIZE=6;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getMaxIndex(rulesContext){var switchRequestHistory=rulesContext?rulesContext.getSwitchHistory():null;var switchRequests=switchRequestHistory?switchRequestHistory.getSwitchRequests():[];var drops=0;var noDrops=0;var dropSize=0;var switchRequest=(0,_SwitchRequest2.default)(context).create();for(var i=0;i<switchRequests.length;i++){if(switchRequests[i]!==undefined){drops+=switchRequests[i].drops;noDrops+=switchRequests[i].noDrops;dropSize+=switchRequests[i].dropSize;if(drops+noDrops>=SAMPLE_SIZE&&drops/noDrops>MAX_SWITCH){switchRequest.quality=i>0&&switchRequests[i].drops>0?i-1:i;switchRequest.reason={index:switchRequest.quality,drops:drops,noDrops:noDrops,dropSize:dropSize};logger.debug('Switch history rule index: '+switchRequest.quality+' samples: '+(drops+noDrops)+' drops: '+drops);break;}}}return switchRequest;}instance={getMaxIndex:getMaxIndex};setup();return instance;}SwitchHistoryRule.__dashjs_factory_name='SwitchHistoryRule';exports.default=_FactoryMaker2.default.getClassFactory(SwitchHistoryRule);\\n//# sourceMappingURL=SwitchHistoryRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/SwitchHistoryRule.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _SwitchRequest=__webpack_require__(/*! ../SwitchRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\\\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _Constants=__webpack_require__(/*! ../../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\\\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ThroughputRule(config){config=config||{};var context=this.context;var dashMetrics=config.dashMetrics;var instance=void 0,logger=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function checkConfig(){if(!dashMetrics||!dashMetrics.hasOwnProperty('getCurrentBufferState')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getMaxIndex(rulesContext){var switchRequest=(0,_SwitchRequest2.default)(context).create();if(!rulesContext||!rulesContext.hasOwnProperty('getMediaInfo')||!rulesContext.hasOwnProperty('getMediaType')||!rulesContext.hasOwnProperty('useBufferOccupancyABR')||!rulesContext.hasOwnProperty('getAbrController')||!rulesContext.hasOwnProperty('getScheduleController')){return switchRequest;}checkConfig();var mediaInfo=rulesContext.getMediaInfo();var mediaType=rulesContext.getMediaType();var currentBufferState=dashMetrics.getCurrentBufferState(mediaType);var scheduleController=rulesContext.getScheduleController();var abrController=rulesContext.getAbrController();var streamInfo=rulesContext.getStreamInfo();var isDynamic=streamInfo&&streamInfo.manifestInfo?streamInfo.manifestInfo.isDynamic:null;var throughputHistory=abrController.getThroughputHistory();var throughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);var latency=throughputHistory.getAverageLatency(mediaType);var useBufferOccupancyABR=rulesContext.useBufferOccupancyABR();if(isNaN(throughput)||!currentBufferState||useBufferOccupancyABR){return switchRequest;}if(abrController.getAbandonmentStateFor(mediaType)!==_MetricsConstants2.default.ABANDON_LOAD){if(currentBufferState.state===_MetricsConstants2.default.BUFFER_LOADED||isDynamic){switchRequest.quality=abrController.getQualityForBitrate(mediaInfo,throughput,latency);scheduleController.setTimeToLoadDelay(0);logger.debug('['+mediaType+'] requesting switch to index: ',switchRequest.quality,'Average throughput',Math.round(throughput),'kbps');switchRequest.reason={throughput:throughput,latency:latency};}}return switchRequest;}function reset(){// no persistent information to reset\\n}instance={getMaxIndex:getMaxIndex,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ThroughputRule.__dashjs_factory_name='ThroughputRule';exports.default=_FactoryMaker2.default.getClassFactory(ThroughputRule);\\n//# sourceMappingURL=ThroughputRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/ThroughputRule.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */var WEIGHT_SELECTION_MODES={MANUAL:'manual_weight_selection',RANDOM:'random_weight_selection',DYNAMIC:'dynamic_weight_selection'};function LearningAbrController(){var context=this.context;var instance=void 0,logger=void 0,somBitrateNeurons=void 0,bitrateNormalizationFactor=void 0,latencyNormalizationFactor=void 0,minBitrate=void 0,minBitrateNeuron=void 0,weights=void 0,sortedCenters=void 0,weightSelectionMode=void 0;/**\\n     * Setup the class\\n     */function _setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);_resetInitialSettings();}/**\\n     * Reset all values\\n     */function reset(){_resetInitialSettings();}/**\\n     * Reset to initial settings\\n     * @private\\n     */function _resetInitialSettings(){somBitrateNeurons=null;bitrateNormalizationFactor=1;latencyNormalizationFactor=100;minBitrate=0;minBitrateNeuron=null;weights=null;sortedCenters=null;weightSelectionMode=WEIGHT_SELECTION_MODES.DYNAMIC;}/**\\n     * Returns the maximum throughput\\n     * @return {number}\\n     * @private\\n     */function _getMaxThroughput(){var maxThroughput=0;if(somBitrateNeurons){for(var i=0;i<somBitrateNeurons.length;i++){var neuron=somBitrateNeurons[i];if(neuron.state.throughput>maxThroughput){maxThroughput=neuron.state.throughput;}}}return maxThroughput;}/**\\n     *\\n     * @param {array} w\\n     * @return {number}\\n     * @private\\n     */function _getMagnitude(w){var magnitude=w.map(function(x){return Math.pow(x,2);}).reduce(function(sum,now){return sum+now;});return Math.sqrt(magnitude);}/**\\n     *\\n     * @param {array} a\\n     * @param {array} b\\n     * @param {array} w\\n     * @return {number}\\n     * @private\\n     */function _getDistance(a,b,w){var sum=a.map(function(x,i){return w[i]*Math.pow(x-b[i],2);})// square the difference*w\\n.reduce(function(sum,now){return sum+now;});// sum\\nvar sign=sum<0?-1:1;return sign*Math.sqrt(Math.abs(sum));}/**\\n     *\\n     * @param {object} a\\n     * @param {object} b\\n     * @return {number}\\n     * @private\\n     */function _getNeuronDistance(a,b){var aState=[a.state.throughput,a.state.latency,a.state.rebuffer,a.state.switch];var bState=[b.state.throughput,b.state.latency,b.state.rebuffer,b.state.switch];return _getDistance(aState,bState,[1,1,1,1]);}/**\\n     *\\n     * @param {object} winnerNeuron\\n     * @param {array} somElements\\n     * @param {array} x\\n     * @private\\n     */function _updateNeurons(winnerNeuron,somElements,x){for(var i=0;i<somElements.length;i++){var somNeuron=somElements[i];var sigma=0.1;var neuronDistance=_getNeuronDistance(somNeuron,winnerNeuron);var neighbourHood=Math.exp(-1*Math.pow(neuronDistance,2)/(2*Math.pow(sigma,2)));_updateNeuronState(somNeuron,x,neighbourHood);}}/**\\n     *\\n     * @param {object} neuron\\n     * @param {array} x\\n     * @param {object} neighbourHood\\n     * @private\\n     */function _updateNeuronState(neuron,x,neighbourHood){var state=neuron.state;var w=[0.01,0.01,0.01,0.01];// learning rate\\nstate.throughput=state.throughput+(x[0]-state.throughput)*w[0]*neighbourHood;state.latency=state.latency+(x[1]-state.latency)*w[1]*neighbourHood;state.rebuffer=state.rebuffer+(x[2]-state.rebuffer)*w[2]*neighbourHood;state.switch=state.switch+(x[3]-state.switch)*w[3]*neighbourHood;}/**\\n     *\\n     * @param {object} currentNeuron\\n     * @param {number} currentThroughput\\n     * @return {object}\\n     * @private\\n     */function _getDownShiftNeuron(currentNeuron,currentThroughput){var maxSuitableBitrate=0;var result=currentNeuron;if(somBitrateNeurons){for(var i=0;i<somBitrateNeurons.length;i++){var n=somBitrateNeurons[i];if(n.bitrate<currentNeuron.bitrate&&n.bitrate>maxSuitableBitrate&&currentThroughput>n.bitrate){// possible downshiftable neuron\\nmaxSuitableBitrate=n.bitrate;result=n;}}}return result;}/**\\n     *\\n     * @param {object} mediaInfo\\n     * @param {number} throughput\\n     * @param {number} latency\\n     * @param {number} bufferSize\\n     * @param {number} playbackRate\\n     * @param {number} currentQualityIndex\\n     * @param {object} dynamicWeightsSelector\\n     * @return {null|*}\\n     */function getNextQuality(mediaInfo,throughput,latency,bufferSize,playbackRate,currentQualityIndex,dynamicWeightsSelector){// For Dynamic Weights Selector\\nvar currentLatency=latency;var currentBuffer=bufferSize;var currentThroughput=throughput;var somElements=_getSomBitrateNeurons(mediaInfo);// normalize throughput\\nvar throughputNormalized=throughput/bitrateNormalizationFactor;// saturate values higher than 1\\nif(throughputNormalized>1){throughputNormalized=_getMaxThroughput();}// normalize latency\\nlatency=latency/latencyNormalizationFactor;var targetLatency=0;var targetRebufferLevel=0;var targetSwitch=0;// 10K + video encoding is the recommended throughput\\nvar throughputDelta=10000;logger.debug('getNextQuality called throughput:'+throughputNormalized+' latency:'+latency+' bufferSize:'+bufferSize+' currentQualityIndex:'+currentQualityIndex+' playbackRate:'+playbackRate);var currentNeuron=somElements[currentQualityIndex];var downloadTime=currentNeuron.bitrate*dynamicWeightsSelector.getSegmentDuration()/currentThroughput;var rebuffer=Math.max(0,downloadTime-currentBuffer);// check buffer for possible stall\\nif(currentBuffer-downloadTime<dynamicWeightsSelector.getMinBuffer()){logger.debug('Buffer is low for bitrate= '+currentNeuron.bitrate+' downloadTime='+downloadTime+' currentBuffer='+currentBuffer+' rebuffer='+rebuffer);return _getDownShiftNeuron(currentNeuron,currentThroughput).qualityIndex;}switch(weightSelectionMode){case WEIGHT_SELECTION_MODES.MANUAL:_manualWeightSelection();break;case WEIGHT_SELECTION_MODES.RANDOM:_randomWeightSelection(somElements);break;case WEIGHT_SELECTION_MODES.DYNAMIC:_dynamicWeightSelection(dynamicWeightsSelector,somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate);break;default:_dynamicWeightSelection(dynamicWeightsSelector,somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate);}var minDistance=null;var minIndex=null;var winnerNeuron=null;var winnerWeights=null;for(var i=0;i<somElements.length;i++){var somNeuron=somElements[i];var somNeuronState=somNeuron.state;var somData=[somNeuronState.throughput,somNeuronState.latency,somNeuronState.rebuffer,somNeuronState.switch];var distanceWeights=weights.slice();var nextBuffer=dynamicWeightsSelector.getNextBufferWithBitrate(somNeuron.bitrate,currentBuffer,currentThroughput);var isBufferLow=nextBuffer<dynamicWeightsSelector.getMinBuffer();if(isBufferLow){logger.debug('Buffer is low for bitrate='+somNeuron.bitrate+' downloadTime='+downloadTime+' currentBuffer='+currentBuffer+' nextBuffer='+nextBuffer);}// special condition downshift immediately\\nif(somNeuron.bitrate>throughput-throughputDelta||isBufferLow){if(somNeuron.bitrate!==minBitrate){// encourage to pick smaller bitrates throughputWeight=100\\ndistanceWeights[0]=100;}}// calculate the distance with the target\\nvar distance=_getDistance(somData,[throughputNormalized,targetLatency,targetRebufferLevel,targetSwitch],distanceWeights);if(minDistance===null||distance<minDistance){minDistance=distance;minIndex=somNeuron.qualityIndex;winnerNeuron=somNeuron;winnerWeights=distanceWeights;}}// update current neuron and the neighbourhood with the calculated QoE\\n// will punish current if it is not picked\\nvar bitrateSwitch=Math.abs(currentNeuron.bitrate-winnerNeuron.bitrate)/bitrateNormalizationFactor;_updateNeurons(currentNeuron,somElements,[throughputNormalized,latency,rebuffer,bitrateSwitch]);// update bmu and  neighbours with targetQoE=1, targetLatency=0\\n_updateNeurons(winnerNeuron,somElements,[throughputNormalized,targetLatency,targetRebufferLevel,bitrateSwitch]);return minIndex;}/**\\n     * Option 1: Manual weights\\n     * @private\\n     */function _manualWeightSelection(){var throughputWeight=0.4;var latencyWeight=0.4;var bufferWeight=0.4;var switchWeight=0.4;weights=[throughputWeight,latencyWeight,bufferWeight,switchWeight];// throughput, latency, buffer, switch\\n}/**\\n     * Option 2: Random (Xavier) weights\\n     * @param {array} somElements\\n     * @private\\n     */function _randomWeightSelection(somElements){weights=_getXavierWeights(somElements.length,4);}/**\\n     * Dynamic Weight Selector weights\\n     * @param {object} dynamicWeightsSelector\\n     * @param {array} somElements\\n     * @param {number} currentLatency\\n     * @param {number} currentBuffer\\n     * @param {number} rebuffer\\n     * @param {number} currentThroughput\\n     * @param {number} playbackRate\\n     * @private\\n     */function _dynamicWeightSelection(dynamicWeightsSelector,somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate){if(!weights){weights=sortedCenters[sortedCenters.length-1];}// Dynamic Weights Selector (step 2/2: find weights)\\nvar weightVector=dynamicWeightsSelector.findWeightVector(somElements,currentLatency,currentBuffer,rebuffer,currentThroughput,playbackRate);if(weightVector!==null&&weightVector!==-1){// null: something went wrong, -1: constraints not met\\nweights=weightVector;}}/**\\n     *\\n     * @param {number }neuronCount\\n     * @param {number }weightCount\\n     * @return {array}\\n     * @private\\n     */function _getXavierWeights(neuronCount,weightCount){var W=[];var upperBound=Math.sqrt(2/neuronCount);for(var i=0;i<weightCount;i++){W.push(Math.random()*upperBound);}weights=W;return weights;}/**\\n     *\\n     * @param {object} mediaInfo\\n     * @return {array}\\n     * @private\\n     */function _getSomBitrateNeurons(mediaInfo){if(!somBitrateNeurons){somBitrateNeurons=[];var bitrateList=mediaInfo.bitrateList;var bitrateVector=[];minBitrate=bitrateList[0].bandwidth;bitrateList.forEach(function(element){bitrateVector.push(element.bandwidth);if(element.bandwidth<minBitrate){minBitrate=element.bandwidth;}});bitrateNormalizationFactor=_getMagnitude(bitrateVector);for(var i=0;i<bitrateList.length;i++){var neuron={qualityIndex:i,bitrate:bitrateList[i].bandwidth,state:{// normalize throughputs\\nthroughput:bitrateList[i].bandwidth/bitrateNormalizationFactor,latency:0,rebuffer:0,switch:0}};somBitrateNeurons.push(neuron);if(neuron.bitrate===minBitrate){minBitrateNeuron=neuron;}}sortedCenters=_getInitialKmeansPlusPlusCenters(somBitrateNeurons);}return somBitrateNeurons;}/**\\n     *\\n     * @param {number} size\\n     * @return {array}\\n     * @private\\n     */function _getRandomData(size){var dataArray=[];for(var i=0;i<size;i++){var data=[Math.random()*_getMaxThroughput(),//throughput\\nMath.random(),//latency\\nMath.random(),//buffersize\\nMath.random()//switch\\n];dataArray.push(data);}return dataArray;}/**\\n     *\\n     * @param {array} somElements\\n     * @return {array}\\n     * @private\\n     */function _getInitialKmeansPlusPlusCenters(somElements){var centers=[];var randomDataSet=_getRandomData(Math.pow(somElements.length,2));centers.push(randomDataSet[0]);var distanceWeights=[1,1,1,1];for(var k=1;k<somElements.length;k++){var nextPoint=null;var _maxDistance=null;for(var i=0;i<randomDataSet.length;i++){var currentPoint=randomDataSet[i];var minDistance=null;for(var j=0;j<centers.length;j++){var distance=_getDistance(currentPoint,centers[j],distanceWeights);if(minDistance===null||distance<minDistance){minDistance=distance;}}if(_maxDistance===null||minDistance>_maxDistance){nextPoint=currentPoint;_maxDistance=minDistance;}}centers.push(nextPoint);}// find the least similar center\\nvar maxDistance=null;var leastSimilarIndex=null;for(var _i=0;_i<centers.length;_i++){var _distance=0;for(var _j=0;_j<centers.length;_j++){if(_i===_j)continue;_distance+=_getDistance(centers[_i],centers[_j],distanceWeights);}if(maxDistance===null||_distance>maxDistance){maxDistance=_distance;leastSimilarIndex=_i;}}// move centers to sortedCenters\\nvar sortedCenters=[];sortedCenters.push(centers[leastSimilarIndex]);centers.splice(leastSimilarIndex,1);while(centers.length>0){var _minDistance=null;var minIndex=null;for(var _i2=0;_i2<centers.length;_i2++){var _distance2=_getDistance(sortedCenters[0],centers[_i2],distanceWeights);if(_minDistance===null||_distance2<_minDistance){_minDistance=_distance2;minIndex=_i2;}}sortedCenters.push(centers[minIndex]);centers.splice(minIndex,1);}return sortedCenters;}instance={getNextQuality:getNextQuality,reset:reset};_setup();return instance;}LearningAbrController.__dashjs_factory_name='LearningAbrController';exports.default=_FactoryMaker2.default.getClassFactory(LearningAbrController);\\n//# sourceMappingURL=LearningAbrController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _QoeInfo=__webpack_require__(/*! ./QoeInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js\\\");var _QoeInfo2=_interopRequireDefault(_QoeInfo);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */function LoLpQoeEvaluator(){var instance=void 0,voPerSegmentQoeInfo=void 0,segmentDuration=void 0,maxBitrateKbps=void 0,minBitrateKbps=void 0;function _setup(){_resetInitialSettings();}function _resetInitialSettings(){voPerSegmentQoeInfo=null;segmentDuration=null;maxBitrateKbps=null;minBitrateKbps=null;}function setupPerSegmentQoe(sDuration,maxBrKbps,minBrKbps){// Set up Per Segment QoeInfo\\nvoPerSegmentQoeInfo=_createQoeInfo('segment',sDuration,maxBrKbps,minBrKbps);segmentDuration=sDuration;maxBitrateKbps=maxBrKbps;minBitrateKbps=minBrKbps;}function _createQoeInfo(fragmentType,fragmentDuration,maxBitrateKbps,minBitrateKbps){/*\\n         * [Weights][Source: Abdelhak Bentaleb, 2020 (last updated: 30 Mar 2020)]\\n         * bitrateReward:           segment duration, e.g. 0.5s\\n         * bitrateSwitchPenalty:    0.02s or 1s if the bitrate switch is too important\\n         * rebufferPenalty:         max encoding bitrate, e.g. 1000kbps\\n         * latencyPenalty:          if L ≤ 1.1 seconds then = min encoding bitrate * 0.05, otherwise = max encoding bitrate * 0.1\\n         * playbackSpeedPenalty:    min encoding bitrate, e.g. 200kbps\\n         */// Create new QoeInfo object\\nvar qoeInfo=new _QoeInfo2.default();qoeInfo.type=fragmentType;// Set weight: bitrateReward\\n// set some safe value, else consider throwing error\\nif(!fragmentDuration){qoeInfo.weights.bitrateReward=1;}else{qoeInfo.weights.bitrateReward=fragmentDuration;}// Set weight: bitrateSwitchPenalty\\n// qoeInfo.weights.bitrateSwitchPenalty = 0.02;\\nqoeInfo.weights.bitrateSwitchPenalty=1;// Set weight: rebufferPenalty\\n// set some safe value, else consider throwing error\\nif(!maxBitrateKbps){qoeInfo.weights.rebufferPenalty=1000;}else{qoeInfo.weights.rebufferPenalty=maxBitrateKbps;}// Set weight: latencyPenalty\\nqoeInfo.weights.latencyPenalty=[];qoeInfo.weights.latencyPenalty.push({threshold:1.1,penalty:minBitrateKbps*0.05});qoeInfo.weights.latencyPenalty.push({threshold:100000000,penalty:maxBitrateKbps*0.1});// Set weight: playbackSpeedPenalty\\nif(!minBitrateKbps)qoeInfo.weights.playbackSpeedPenalty=200;// set some safe value, else consider throwing error\\nelse qoeInfo.weights.playbackSpeedPenalty=minBitrateKbps;return qoeInfo;}function logSegmentMetrics(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed){if(voPerSegmentQoeInfo){_logMetricsInQoeInfo(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed,voPerSegmentQoeInfo);}}function _logMetricsInQoeInfo(bitrate,rebufferTime,latency,playbackSpeed,qoeInfo){// Update: bitrate Weighted Sum value\\nqoeInfo.bitrateWSum+=qoeInfo.weights.bitrateReward*bitrate;// Update: bitrateSwitch Weighted Sum value\\nif(qoeInfo.lastBitrate){qoeInfo.bitrateSwitchWSum+=qoeInfo.weights.bitrateSwitchPenalty*Math.abs(bitrate-qoeInfo.lastBitrate);}qoeInfo.lastBitrate=bitrate;// Update: rebuffer Weighted Sum value\\nqoeInfo.rebufferWSum+=qoeInfo.weights.rebufferPenalty*rebufferTime;// Update: latency Weighted Sum value\\nfor(var i=0;i<qoeInfo.weights.latencyPenalty.length;i++){var latencyRange=qoeInfo.weights.latencyPenalty[i];if(latency<=latencyRange.threshold){qoeInfo.latencyWSum+=latencyRange.penalty*latency;break;}}// Update: playbackSpeed Weighted Sum value\\nqoeInfo.playbackSpeedWSum+=qoeInfo.weights.playbackSpeedPenalty*Math.abs(1-playbackSpeed);// Update: Total Qoe value\\nqoeInfo.totalQoe=qoeInfo.bitrateWSum-qoeInfo.bitrateSwitchWSum-qoeInfo.rebufferWSum-qoeInfo.latencyWSum-qoeInfo.playbackSpeedWSum;}// Returns current Per Segment QoeInfo\\nfunction getPerSegmentQoe(){return voPerSegmentQoeInfo;}// For one-time use only\\n// Returns totalQoe based on a single set of metrics.\\nfunction calculateSingleUseQoe(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed){var singleUseQoeInfo=null;if(segmentDuration&&maxBitrateKbps&&minBitrateKbps){singleUseQoeInfo=_createQoeInfo('segment',segmentDuration,maxBitrateKbps,minBitrateKbps);}if(singleUseQoeInfo){_logMetricsInQoeInfo(segmentBitrate,segmentRebufferTime,currentLatency,currentPlaybackSpeed,singleUseQoeInfo);return singleUseQoeInfo.totalQoe;}else{// Something went wrong..\\nreturn 0;}}function reset(){_resetInitialSettings();}instance={setupPerSegmentQoe:setupPerSegmentQoe,logSegmentMetrics:logSegmentMetrics,getPerSegmentQoe:getPerSegmentQoe,calculateSingleUseQoe:calculateSingleUseQoe,reset:reset};_setup();return instance;}LoLpQoeEvaluator.__dashjs_factory_name='LoLpQoeEvaluator';exports.default=_FactoryMaker2.default.getClassFactory(LoLpQoeEvaluator);\\n//# sourceMappingURL=LoLpQoEEvaluator.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Debug=__webpack_require__(/*! ../../../../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _LearningAbrController=__webpack_require__(/*! ./LearningAbrController */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LearningAbrController.js\");var _LearningAbrController2=_interopRequireDefault(_LearningAbrController);var _LoLpQoEEvaluator=__webpack_require__(/*! ./LoLpQoEEvaluator */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpQoEEvaluator.js\");var _LoLpQoEEvaluator2=_interopRequireDefault(_LoLpQoEEvaluator);var _SwitchRequest=__webpack_require__(/*! ../../SwitchRequest */ \"../node_modules/dashjs/build/es5/src/streaming/rules/SwitchRequest.js\");var _SwitchRequest2=_interopRequireDefault(_SwitchRequest);var _MetricsConstants=__webpack_require__(/*! ../../../constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);var _LoLpWeightSelector=__webpack_require__(/*! ./LoLpWeightSelector */ \"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js\");var _LoLpWeightSelector2=_interopRequireDefault(_LoLpWeightSelector);var _Constants=__webpack_require__(/*! ../../../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */var DWS_TARGET_LATENCY=1.5;var DWS_BUFFER_MIN=0.3;function LoLPRule(config){config=config||{};var dashMetrics=config.dashMetrics;var context=this.context;var logger=void 0,instance=void 0,learningController=void 0,qoeEvaluator=void 0;function _setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);learningController=(0,_LearningAbrController2.default)(context).create();qoeEvaluator=(0,_LoLpQoEEvaluator2.default)(context).create();}function getMaxIndex(rulesContext){try{var switchRequest=(0,_SwitchRequest2.default)(context).create();var mediaType=rulesContext.getMediaInfo().type;var abrController=rulesContext.getAbrController();var streamInfo=rulesContext.getStreamInfo();var currentQuality=abrController.getQualityFor(mediaType,streamInfo);var mediaInfo=rulesContext.getMediaInfo();var bufferStateVO=dashMetrics.getCurrentBufferState(mediaType);var scheduleController=rulesContext.getScheduleController();var currentBufferLevel=dashMetrics.getCurrentBufferLevel(mediaType,true);var isDynamic=streamInfo&&streamInfo.manifestInfo?streamInfo.manifestInfo.isDynamic:null;var playbackController=scheduleController.getPlaybackController();var latency=playbackController.getCurrentLiveLatency();if(!rulesContext.useLoLPABR()||mediaType===_Constants2.default.AUDIO){return switchRequest;}if(!latency){latency=0;}var playbackRate=playbackController.getPlaybackRate();var throughputHistory=abrController.getThroughputHistory();var throughput=throughputHistory.getSafeAverageThroughput(mediaType,isDynamic);logger.debug(\\'Throughput \\'+Math.round(throughput)+\\' kbps\\');if(isNaN(throughput)||!bufferStateVO){return switchRequest;}if(abrController.getAbandonmentStateFor(mediaType)===_MetricsConstants2.default.ABANDON_LOAD){return switchRequest;}// QoE parameters\\nvar bitrateList=mediaInfo.bitrateList;// [{bandwidth: 200000, width: 640, height: 360}, ...]\\nvar segmentDuration=rulesContext.getRepresentationInfo().fragmentDuration;var minBitrateKbps=bitrateList[0].bandwidth/1000.0;// min bitrate level\\nvar maxBitrateKbps=bitrateList[bitrateList.length-1].bandwidth/1000.0;// max bitrate level\\nfor(var i=0;i<bitrateList.length;i++){// in case bitrateList is not sorted as expected\\nvar b=bitrateList[i].bandwidth/1000.0;if(b>maxBitrateKbps)maxBitrateKbps=b;else if(b<minBitrateKbps){minBitrateKbps=b;}}// Learning rule pre-calculations\\nvar currentBitrate=bitrateList[currentQuality].bandwidth;var currentBitrateKbps=currentBitrate/1000.0;var httpRequest=dashMetrics.getCurrentHttpRequest(mediaType,true);var lastFragmentDownloadTime=(httpRequest.tresponse.getTime()-httpRequest.trequest.getTime())/1000;var segmentRebufferTime=lastFragmentDownloadTime>segmentDuration?lastFragmentDownloadTime-segmentDuration:0;qoeEvaluator.setupPerSegmentQoe(segmentDuration,maxBitrateKbps,minBitrateKbps);qoeEvaluator.logSegmentMetrics(currentBitrateKbps,segmentRebufferTime,latency,playbackRate);/*\\n            * Dynamic Weights Selector (step 1/2: initialization)\\n            */var dynamicWeightsSelector=(0,_LoLpWeightSelector2.default)(context).create({targetLatency:DWS_TARGET_LATENCY,bufferMin:DWS_BUFFER_MIN,segmentDuration:segmentDuration,qoeEvaluator:qoeEvaluator});/*\\n             * Select next quality\\n             */switchRequest.quality=learningController.getNextQuality(mediaInfo,throughput*1000,latency,currentBufferLevel,playbackRate,currentQuality,dynamicWeightsSelector);switchRequest.reason={throughput:throughput,latency:latency};switchRequest.priority=_SwitchRequest2.default.PRIORITY.STRONG;scheduleController.setTimeToLoadDelay(0);if(switchRequest.quality!==currentQuality){console.log(\\'[TgcLearningRule][\\'+mediaType+\\'] requesting switch to index: \\',switchRequest.quality,\\'Average throughput\\',Math.round(throughput),\\'kbps\\');}return switchRequest;}catch(e){throw e;}}/**\\n     * Reset objects to their initial state\\n     * @private\\n     */function _resetInitialSettings(){learningController.reset();qoeEvaluator.reset();}/**\\n     * Reset the rule\\n     */function reset(){_resetInitialSettings();}instance={getMaxIndex:getMaxIndex,reset:reset};_setup();return instance;}LoLPRule.__dashjs_factory_name=\\'LoLPRule\\';exports.default=_FactoryMaker2.default.getClassFactory(LoLPRule);\\n//# sourceMappingURL=LoLpRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpRule.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function LoLpWeightSelector(config){var targetLatency=config.targetLatency;var bufferMin=config.bufferMin;var segmentDuration=config.segmentDuration;var qoeEvaluator=config.qoeEvaluator;var instance=void 0,valueList=void 0,weightTypeCount=void 0,weightOptions=void 0,previousLatency=void 0;/**\\n     *\\n     * @private\\n     */function _setup(){_resetInitialSettings();}/**\\n     *\\n     * @private\\n     */function _resetInitialSettings(){valueList=[0.2,0.4,0.6,0.8,1];weightTypeCount=4;weightOptions=_getPermutations(valueList,weightTypeCount);previousLatency=0;}/**\\n     * Next, at each segment boundary, ABR to input current neurons and target state (only used in Method II) to find the desired weight vector\\n     * @param {array} neurons\\n     * @param {number} currentLatency\\n     * @param {number} currentBuffer\\n     * @param {number} currentRebuffer\\n     * @param {number} currentThroughput\\n     * @param {number} playbackRate\\n     * @return {null}\\n     * @private\\n     */function findWeightVector(neurons,currentLatency,currentBuffer,currentRebuffer,currentThroughput,playbackRate){var maxQoE=null;var winnerWeights=null;var winnerBitrate=null;var deltaLatency=Math.abs(currentLatency-previousLatency);// For each neuron, m\\nneurons.forEach(function(neuron){// For each possible weight vector, z\\n// E.g. For [ throughput, latency, buffer, playbackRate, QoE ]\\n//      Possible weightVector = [ 0.2, 0.4, 0.2, 0, 0.2 ]\\nweightOptions.forEach(function(weightVector){// Apply weightVector to neuron, compute utility and determine winnerWeights\\n// Method I: Utility based on QoE given current state\\nvar weightsObj={throughput:weightVector[0],latency:weightVector[1],buffer:weightVector[2],switch:weightVector[3]};var downloadTime=neuron.bitrate*segmentDuration/currentThroughput;var nextBuffer=getNextBuffer(currentBuffer,downloadTime);var rebuffer=Math.max(0.00001,downloadTime-nextBuffer);var wt=void 0;if(weightsObj.buffer===0){wt=10;}else{wt=1/weightsObj.buffer;}var weightedRebuffer=wt*rebuffer;if(weightsObj.latency===0){wt=10;}else{wt=1/weightsObj.latency;// inverse the weight because wt and latency should have positive relationship, i.e., higher latency = higher wt\\n}var weightedLatency=wt*neuron.state.latency;var totalQoE=qoeEvaluator.calculateSingleUseQoe(neuron.bitrate,weightedRebuffer,weightedLatency,playbackRate);if((maxQoE===null||totalQoE>maxQoE)&&_checkConstraints(currentLatency,nextBuffer,deltaLatency)){maxQoE=totalQoE;winnerWeights=weightVector;winnerBitrate=neuron.bitrate;}});});// winnerWeights was found, check if constraints are satisfied\\nif(winnerWeights===null&&winnerBitrate===null){winnerWeights=-1;}previousLatency=currentLatency;return winnerWeights;}/**\\n     *\\n     * @param {number} nextLatency\\n     * @param {number} nextBuffer\\n     * @param {number} deltaLatency\\n     * @return {boolean}\\n     * @private\\n     */function _checkConstraints(nextLatency,nextBuffer,deltaLatency){// A1\\n// disabled till we find a better way of estimating latency\\n// fails for all with current value\\nif(nextLatency>targetLatency+deltaLatency){return false;}return nextBuffer>=bufferMin;}/**\\n     *\\n     * @param {array} list\\n     * @param {number} length\\n     * @return {*}\\n     * @private\\n     */function _getPermutations(list,length){// Copy initial values as arrays\\nvar perm=list.map(function(val){return[val];});// Our permutation generator\\nvar generate=function generate(perm,length,currLen){// Reached desired length\\nif(currLen===length){return perm;}// For each existing permutation\\nvar len=perm.length;for(var i=0;i<len;i++){var currPerm=perm.shift();// Create new permutation\\nfor(var k=0;k<list.length;k++){perm.push(currPerm.concat(list[k]));}}// Recurse\\nreturn generate(perm,length,currLen+1);};// Start with size 1 because of initial values\\nreturn generate(perm,length,1);}/**\\n     *\\n     * @return {number}\\n     */function getMinBuffer(){return bufferMin;}/**\\n     *\\n     * @return {number}\\n     */function getSegmentDuration(){return segmentDuration;}/**\\n     *\\n     * @param {number} bitrateToDownload\\n     * @param {number} currentBuffer\\n     * @param {number} currentThroughput\\n     * @return {number}\\n     */function getNextBufferWithBitrate(bitrateToDownload,currentBuffer,currentThroughput){var downloadTime=bitrateToDownload*segmentDuration/currentThroughput;return getNextBuffer(currentBuffer,downloadTime);}/**\\n     *\\n     * @param {number} currentBuffer\\n     * @param {number} downloadTime\\n     * @return {number}\\n     */function getNextBuffer(currentBuffer,downloadTime){var segmentDuration=getSegmentDuration();var nextBuffer=void 0;if(downloadTime>segmentDuration){nextBuffer=currentBuffer-segmentDuration;}else{nextBuffer=currentBuffer+segmentDuration-downloadTime;}return nextBuffer;}instance={getMinBuffer:getMinBuffer,getSegmentDuration:getSegmentDuration,getNextBufferWithBitrate:getNextBufferWithBitrate,getNextBuffer:getNextBuffer,findWeightVector:findWeightVector};_setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Authors:\\n * Abdelhak Bentaleb | National University of Singapore | bentaleb@comp.nus.edu.sg\\n * Mehmet N. Akcay | Ozyegin University | necmettin.akcay@ozu.edu.tr\\n * May Lim | National University of Singapore | maylim@comp.nus.edu.sg\\n */LoLpWeightSelector.__dashjs_factory_name=\\'LoLpWeightSelector\\';exports.default=_FactoryMaker2.default.getClassFactory(LoLpWeightSelector);\\n//# sourceMappingURL=LoLpWeightSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/LoLpWeightSelector.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var QoeInfo=function QoeInfo(){_classCallCheck(this,QoeInfo);// Type e.g. \\'segment\\'\\nthis.type=null;// Store lastBitrate for calculation of bitrateSwitchWSum\\nthis.lastBitrate=null;// Weights for each Qoe factor\\nthis.weights={};this.weights.bitrateReward=null;this.weights.bitrateSwitchPenalty=null;this.weights.rebufferPenalty=null;this.weights.latencyPenalty=null;this.weights.playbackSpeedPenalty=null;// Weighted Sum for each Qoe factor\\nthis.bitrateWSum=0;// kbps\\nthis.bitrateSwitchWSum=0;// kbps\\nthis.rebufferWSum=0;// seconds\\nthis.latencyWSum=0;// seconds\\nthis.playbackSpeedWSum=0;// e.g. 0.95, 1.0, 1.05\\n// Store total Qoe value based on current Weighted Sum values\\nthis.totalQoe=0;};exports.default=QoeInfo;\\n//# sourceMappingURL=QoeInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/abr/lolp/QoeInfo.js?')},\"../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BufferLevelRule(config){config=config||{};var dashMetrics=config.dashMetrics;var mediaPlayerModel=config.mediaPlayerModel;var textController=config.textController;var abrController=config.abrController;var settings=config.settings;function setup(){}function execute(type,representationInfo,hasVideoTrack){if(!type||!representationInfo){return true;}var bufferLevel=dashMetrics.getCurrentBufferLevel(type);return bufferLevel<getBufferTarget(type,representationInfo,hasVideoTrack);}function getBufferTarget(type,representationInfo,hasVideoTrack){var bufferTarget=NaN;if(!type||!representationInfo){return bufferTarget;}if(type===_Constants2.default.FRAGMENTED_TEXT){if(textController.isTextEnabled()){if(isNaN(representationInfo.fragmentDuration)){//fragmentDuration of representationInfo is not defined,\\n// call metrics function to have data in the latest scheduling info...\\n// if no metric, returns 0. In this case, rule will return false.\\nvar schedulingInfo=dashMetrics.getCurrentSchedulingInfo(_MetricsConstants2.default.SCHEDULING_INFO);bufferTarget=schedulingInfo?schedulingInfo.duration:0;}else{bufferTarget=representationInfo.fragmentDuration;}}else{// text is disabled, rule will return false\\nbufferTarget=0;}}else if(type===_Constants2.default.AUDIO&&hasVideoTrack){var videoBufferLevel=dashMetrics.getCurrentBufferLevel(_Constants2.default.VIDEO);if(isNaN(representationInfo.fragmentDuration)){bufferTarget=videoBufferLevel;}else{bufferTarget=Math.max(videoBufferLevel,representationInfo.fragmentDuration);}}else{var streamInfo=representationInfo.mediaInfo.streamInfo;if(abrController.isPlayingAtTopQuality(streamInfo)){var isLongFormContent=streamInfo.manifestInfo.duration>=settings.get().streaming.longFormContentDurationThreshold;bufferTarget=isLongFormContent?settings.get().streaming.bufferTimeAtTopQualityLongForm:settings.get().streaming.bufferTimeAtTopQuality;}else{bufferTarget=mediaPlayerModel.getStableBufferTime();}}return bufferTarget;}var instance={execute:execute,getBufferTarget:getBufferTarget};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BufferLevelRule.__dashjs_factory_name=\\'BufferLevelRule\\';exports.default=_FactoryMaker2.default.getClassFactory(BufferLevelRule);\\n//# sourceMappingURL=BufferLevelRule.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/rules/scheduling/BufferLevelRule.js?')},\"../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function EmbeddedTextHtmlRender(){var captionId=0;var instance=void 0;/* HTML Rendering functions */function checkIndent(chars){var line='';for(var c=0;c<chars.length;++c){var uc=chars[c];line+=uc.uchar;}var l=line.length;var ll=line.replace(/^\\\\s+/,'').length;return l-ll;}function getRegionProperties(region){return'left: '+region.x*3.125+'%; top: '+region.y1*6.66+'%; width: '+(100-region.x*3.125)+'%; height: '+Math.max(region.y2-1-region.y1,1)*6.66+'%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;';}function createRGB(color){if(color==='red'){return'rgb(255, 0, 0)';}else if(color==='green'){return'rgb(0, 255, 0)';}else if(color==='blue'){return'rgb(0, 0, 255)';}else if(color==='cyan'){return'rgb(0, 255, 255)';}else if(color==='magenta'){return'rgb(255, 0, 255)';}else if(color==='yellow'){return'rgb(255, 255, 0)';}else if(color==='white'){return'rgb(255, 255, 255)';}else if(color==='black'){return'rgb(0, 0, 0)';}return color;}function getStyle(videoElement,style){var fontSize=videoElement.videoHeight/15.0;if(style){return'font-size: '+fontSize+'px; font-family: Menlo, Consolas, \\\\'Cutive Mono\\\\', monospace; color: '+(style.foreground?createRGB(style.foreground):'rgb(255, 255, 255)')+'; font-style: '+(style.italics?'italic':'normal')+'; text-decoration: '+(style.underline?'underline':'none')+'; white-space: pre; background-color: '+(style.background?createRGB(style.background):'transparent')+';';}else{return'font-size: '+fontSize+'px; font-family: Menlo, Consolas, \\\\'Cutive Mono\\\\', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;';}}function ltrim(s){return s.replace(/^\\\\s+/g,'');}function rtrim(s){return s.replace(/\\\\s+$/g,'');}function createHTMLCaptionsFromScreen(videoElement,startTime,endTime,captionScreen){var currRegion=null;var existingRegion=null;var lastRowHasText=false;var lastRowIndentL=-1;var currP={start:startTime,end:endTime,spans:[]};var currentStyle='style_cea608_white_black';var seenRegions={};var styleStates={};var regions=[];var r=void 0,s=void 0;for(r=0;r<15;++r){var row=captionScreen.rows[r];var line='';var prevPenState=null;if(false===row.isEmpty()){/* Row is not empty *//* Get indentation of this row */var rowIndent=checkIndent(row.chars);/* Create a new region is there is none */if(currRegion===null){currRegion={x:rowIndent,y1:r,y2:r+1,p:[]};}/* Check if indentation has changed and we had text of last row */if(rowIndent!==lastRowIndentL&&lastRowHasText){currRegion.p.push(currP);currP={start:startTime,end:endTime,spans:[]};currRegion.y2=r;currRegion.name='region_'+currRegion.x+'_'+currRegion.y1+'_'+currRegion.y2;if(false===seenRegions.hasOwnProperty(currRegion.name)){regions.push(currRegion);seenRegions[currRegion.name]=currRegion;}else{existingRegion=seenRegions[currRegion.name];existingRegion.p.contat(currRegion.p);}currRegion={x:rowIndent,y1:r,y2:r+1,p:[]};}for(var c=0;c<row.chars.length;++c){var uc=row.chars[c];var currPenState=uc.penState;if(prevPenState===null||!currPenState.equals(prevPenState)){if(line.trim().length>0){currP.spans.push({name:currentStyle,line:line,row:r});line='';}var currPenStateString='style_cea608_'+currPenState.foreground+'_'+currPenState.background;if(currPenState.underline){currPenStateString+='_underline';}if(currPenState.italics){currPenStateString+='_italics';}if(!styleStates.hasOwnProperty(currPenStateString)){styleStates[currPenStateString]=JSON.parse(JSON.stringify(currPenState));}prevPenState=currPenState;currentStyle=currPenStateString;}line+=uc.uchar;}if(line.trim().length>0){currP.spans.push({name:currentStyle,line:line,row:r});}lastRowHasText=true;lastRowIndentL=rowIndent;}else{/* Row is empty */lastRowHasText=false;lastRowIndentL=-1;if(currRegion){currRegion.p.push(currP);currP={start:startTime,end:endTime,spans:[]};currRegion.y2=r;currRegion.name='region_'+currRegion.x+'_'+currRegion.y1+'_'+currRegion.y2;if(false===seenRegions.hasOwnProperty(currRegion.name)){regions.push(currRegion);seenRegions[currRegion.name]=currRegion;}else{existingRegion=seenRegions[currRegion.name];existingRegion.p.contat(currRegion.p);}currRegion=null;}}}if(currRegion){currRegion.p.push(currP);currRegion.y2=r+1;currRegion.name='region_'+currRegion.x+'_'+currRegion.y1+'_'+currRegion.y2;if(false===seenRegions.hasOwnProperty(currRegion.name)){regions.push(currRegion);seenRegions[currRegion.name]=currRegion;}else{existingRegion=seenRegions[currRegion.name];existingRegion.p.contat(currRegion.p);}currRegion=null;}var captionsArray=[];/* Loop thru regions */for(r=0;r<regions.length;++r){var region=regions[r];var cueID='sub_cea608_'+captionId++;var finalDiv=document.createElement('div');finalDiv.id=cueID;var cueRegionProperties=getRegionProperties(region);finalDiv.style.cssText='position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;'+cueRegionProperties;var bodyDiv=document.createElement('div');bodyDiv.className='paragraph bodyStyle';bodyDiv.style.cssText=getStyle(videoElement);var cueUniWrapper=document.createElement('div');cueUniWrapper.className='cueUniWrapper';cueUniWrapper.style.cssText='unicode-bidi: normal; direction: ltr;';for(var p=0;p<region.p.length;++p){var ptag=region.p[p];var lastSpanRow=0;for(s=0;s<ptag.spans.length;++s){var span=ptag.spans[s];if(span.line.length>0){if(s!==0&&lastSpanRow!=span.row){var brElement=document.createElement('br');brElement.className='lineBreak';cueUniWrapper.appendChild(brElement);}var sameRow=false;if(lastSpanRow===span.row){sameRow=true;}lastSpanRow=span.row;var spanStyle=styleStates[span.name];var spanElement=document.createElement('span');spanElement.className='spanPadding '+span.name+' customSpanColor';spanElement.style.cssText=getStyle(videoElement,spanStyle);/* If this is not the first span, and it's on the same\\n                         * row as the last one */if(s!==0&&sameRow){/* and it's the last span on this row */if(s===ptag.spans.length-1){/* trim only the right side */spanElement.textContent=rtrim(span.line);}else{/* don't trim at all */spanElement.textContent=span.line;}}else{/* if there is more than 1 span and this isn't the last span */if(ptag.spans.length>1&&s<ptag.spans.length-1){/* Check if next text is on same row */if(span.row===ptag.spans[s+1].row){/* Next element on same row, trim start */spanElement.textContent=ltrim(span.line);}else{/* Different rows, trim both */spanElement.textContent=span.line.trim();}}else{spanElement.textContent=span.line.trim();}}cueUniWrapper.appendChild(spanElement);}}}bodyDiv.appendChild(cueUniWrapper);finalDiv.appendChild(bodyDiv);var fontSize={'bodyStyle':['%',90]};for(var _s in styleStates){if(styleStates.hasOwnProperty(_s)){fontSize[_s]=['%',90];}}captionsArray.push({type:'html',start:startTime,end:endTime,cueHTMLElement:finalDiv,cueID:cueID,cellResolution:[32,15],isFromCEA608:true,fontSize:fontSize,lineHeight:{},linePadding:{}});}return captionsArray;}instance={createHTMLCaptionsFromScreen:createHTMLCaptionsFromScreen};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */EmbeddedTextHtmlRender.__dashjs_factory_name='EmbeddedTextHtmlRender';exports.default=_FactoryMaker2.default.getSingletonFactory(EmbeddedTextHtmlRender);\\n//# sourceMappingURL=EmbeddedTextHtmlRender.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _InitCache=__webpack_require__(/*! ../utils/InitCache */ \"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\");var _InitCache2=_interopRequireDefault(_InitCache);var _SourceBufferSink=__webpack_require__(/*! ../SourceBufferSink */ \"../node_modules/dashjs/build/es5/src/streaming/SourceBufferSink.js\");var _SourceBufferSink2=_interopRequireDefault(_SourceBufferSink);var _TextController=__webpack_require__(/*! ../../streaming/text/TextController */ \"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\");var _TextController2=_interopRequireDefault(_TextController);var _DashJSError=__webpack_require__(/*! ../../streaming/vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var BUFFER_CONTROLLER_TYPE=\\'NotFragmentedTextBufferController\\';/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function NotFragmentedTextBufferController(config){config=config||{};var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var textController=(0,_TextController2.default)(context).getInstance();var errHandler=config.errHandler;var streamInfo=config.streamInfo;var type=config.type;var mimeType=config.mimeType;var fragmentModel=config.fragmentModel;var instance=void 0,isBufferingCompleted=void 0,initialized=void 0,mediaSource=void 0,buffer=void 0,initCache=void 0;function setup(){initialized=false;mediaSource=null;isBufferingCompleted=false;eventBus.on(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.on(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,instance);}function getBufferControllerType(){return BUFFER_CONTROLLER_TYPE;}function initialize(source){setMediaSource(source);initCache=(0,_InitCache2.default)(context).getInstance();}function createBuffer(mediaInfoArr){var mediaInfo=mediaInfoArr[0];try{buffer=(0,_SourceBufferSink2.default)(context).create(mediaSource,mediaInfo);if(!initialized){var textBuffer=buffer.getBuffer();if(textBuffer.hasOwnProperty(_Constants2.default.INITIALIZE)){textBuffer.initialize(mimeType,streamInfo,mediaInfoArr,fragmentModel);}initialized=true;}return buffer;}catch(e){if(mediaInfo&&(mediaInfo.isText||mediaInfo.codec.indexOf(\\'codecs=\"stpp\\')!==-1||mediaInfo.codec.indexOf(\\'codecs=\"wvtt\\')!==-1)){try{buffer=textController.getTextSourceBuffer();}catch(e){errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+type+\\' : \\'+e.message));}}else{errHandler.error(new _DashJSError2.default(_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,_Errors2.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+type));}}}function getStreamId(){return streamInfo.id;}function getType(){return type;}function getBuffer(){return buffer;}function setMediaSource(value){mediaSource=value;}function getMediaSource(){return mediaSource;}function getIsPruningInProgress(){return false;}function dischargePreBuffer(){}function getBufferLevel(){return 0;}function getIsBufferingCompleted(){return isBufferingCompleted;}function reset(errored){eventBus.off(_Events2.default.DATA_UPDATE_COMPLETED,onDataUpdateCompleted,instance);eventBus.off(_Events2.default.INIT_FRAGMENT_LOADED,onInitFragmentLoaded,instance);if(!errored&&buffer){buffer.abort();buffer.reset();buffer=null;}}function onDataUpdateCompleted(e){if(initCache.extract(streamInfo.id,e.currentRepresentation.id)!==null){return;}// Representation has changed, clear buffer\\nisBufferingCompleted=false;// // Text data file is contained in initialization segment\\neventBus.trigger(_Events2.default.INIT_FRAGMENT_NEEDED,{representationId:e.currentRepresentation.id,sender:instance},{streamId:streamInfo.id,mediaType:type});}function appendInitSegment(representationId){// If text data file already in cache then no need to append it again\\nreturn initCache.extract(streamInfo.id,representationId)!==null;}function onInitFragmentLoaded(e){if(!e.chunk.bytes)return;initCache.save(e.chunk);buffer.append(e.chunk);isBufferingCompleted=true;eventBus.trigger(_Events2.default.STREAM_COMPLETED,{request:e.request},{streamId:streamInfo.id,mediaType:type});}function getRangeAt(){return null;}function updateTimestampOffset(MSETimeOffset){if(buffer.timestampOffset!==MSETimeOffset&&!isNaN(MSETimeOffset)){buffer.timestampOffset=MSETimeOffset;}}instance={getBufferControllerType:getBufferControllerType,initialize:initialize,createBuffer:createBuffer,getStreamId:getStreamId,getType:getType,getBuffer:getBuffer,getBufferLevel:getBufferLevel,setMediaSource:setMediaSource,getMediaSource:getMediaSource,getIsBufferingCompleted:getIsBufferingCompleted,getIsPruningInProgress:getIsPruningInProgress,dischargePreBuffer:dischargePreBuffer,appendInitSegment:appendInitSegment,getRangeAt:getRangeAt,reset:reset,updateTimestampOffset:updateTimestampOffset};setup();return instance;}NotFragmentedTextBufferController.__dashjs_factory_name=BUFFER_CONTROLLER_TYPE;exports.default=_FactoryMaker2.default.getClassFactory(NotFragmentedTextBufferController);\\n//# sourceMappingURL=NotFragmentedTextBufferController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _BufferController=__webpack_require__(/*! ./../controllers/BufferController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BufferController.js\");var _BufferController2=_interopRequireDefault(_BufferController);var _NotFragmentedTextBufferController=__webpack_require__(/*! ./NotFragmentedTextBufferController */ \"../node_modules/dashjs/build/es5/src/streaming/text/NotFragmentedTextBufferController.js\");var _NotFragmentedTextBufferController2=_interopRequireDefault(_NotFragmentedTextBufferController);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function TextBufferController(config){config=config||{};var context=this.context;var _BufferControllerImpl=void 0,instance=void 0;function setup(){// according to text type, we create corresponding buffer controller\\nif(config.type===_Constants2.default.FRAGMENTED_TEXT){// in this case, internal buffer ocntroller is a classical BufferController object\\n_BufferControllerImpl=(0,_BufferController2.default)(context).create({streamInfo:config.streamInfo,type:config.type,mediaPlayerModel:config.mediaPlayerModel,manifestModel:config.manifestModel,fragmentModel:config.fragmentModel,errHandler:config.errHandler,mediaController:config.mediaController,representationController:config.representationController,adapter:config.adapter,textController:config.textController,abrController:config.abrController,playbackController:config.playbackController,settings:config.settings});}else{// in this case, internal buffer controller is a not fragmented text controller object\\n_BufferControllerImpl=(0,_NotFragmentedTextBufferController2.default)(context).create({streamInfo:config.streamInfo,type:config.type,mimeType:config.mimeType,fragmentModel:config.fragmentModel,errHandler:config.errHandler});}}function getBufferControllerType(){return _BufferControllerImpl.getBufferControllerType();}function initialize(source,StreamProcessor){return _BufferControllerImpl.initialize(source,StreamProcessor);}function createBuffer(mediaInfoArr,previousBuffers){return _BufferControllerImpl.createBuffer(mediaInfoArr,previousBuffers);}function getType(){return _BufferControllerImpl.getType();}function getBuffer(){return _BufferControllerImpl.getBuffer();}function setBuffer(value){_BufferControllerImpl.setBuffer(value);}function getMediaSource(){return _BufferControllerImpl.getMediaSource();}function setMediaSource(value){_BufferControllerImpl.setMediaSource(value);}function getBufferLevel(){return _BufferControllerImpl.getBufferLevel();}function reset(errored){_BufferControllerImpl.reset(errored);}function getIsBufferingCompleted(){return _BufferControllerImpl.getIsBufferingCompleted();}function appendInitSegment(representationId){_BufferControllerImpl.appendInitSegment(representationId);}function getIsPruningInProgress(){return _BufferControllerImpl.getIsPruningInProgress();}function dischargePreBuffer(){return _BufferControllerImpl.dischargePreBuffer();}function getRangeAt(time){return _BufferControllerImpl.getRangeAt(time);}function updateTimestampOffset(MSETimeOffset){var buffer=getBuffer();if(buffer.timestampOffset!==MSETimeOffset&&!isNaN(MSETimeOffset)){buffer.timestampOffset=MSETimeOffset;}}function updateAppendWindow(){_BufferControllerImpl.updateAppendWindow();}instance={getBufferControllerType:getBufferControllerType,initialize:initialize,createBuffer:createBuffer,getType:getType,getBuffer:getBuffer,setBuffer:setBuffer,getBufferLevel:getBufferLevel,setMediaSource:setMediaSource,getMediaSource:getMediaSource,getIsBufferingCompleted:getIsBufferingCompleted,getIsPruningInProgress:getIsPruningInProgress,dischargePreBuffer:dischargePreBuffer,appendInitSegment:appendInitSegment,getRangeAt:getRangeAt,reset:reset,updateTimestampOffset:updateTimestampOffset,updateAppendWindow:updateAppendWindow};setup();return instance;}TextBufferController.__dashjs_factory_name=\\'TextBufferController\\';exports.default=_FactoryMaker2.default.getClassFactory(TextBufferController);\\n//# sourceMappingURL=TextBufferController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextBufferController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/text/TextController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _TextSourceBuffer=__webpack_require__(/*! ./TextSourceBuffer */ \"../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js\");var _TextSourceBuffer2=_interopRequireDefault(_TextSourceBuffer);var _TextTracks=__webpack_require__(/*! ./TextTracks */ \"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\");var _TextTracks2=_interopRequireDefault(_TextTracks);var _VTTParser=__webpack_require__(/*! ../utils/VTTParser */ \"../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js\");var _VTTParser2=_interopRequireDefault(_VTTParser);var _TTMLParser=__webpack_require__(/*! ../utils/TTMLParser */ \"../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js\");var _TTMLParser2=_interopRequireDefault(_TTMLParser);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TextController(){var context=this.context;var instance=void 0,textSourceBuffer=void 0,errHandler=void 0,adapter=void 0,manifestModel=void 0,mediaController=void 0,videoModel=void 0,streamController=void 0,textTracks=void 0,vttParser=void 0,ttmlParser=void 0,eventBus=void 0,defaultSettings=void 0,initialSettingsSet=void 0,lastEnabledIndex=void 0,textDefaultEnabled=void 0,// this is used for default settings (each time a file is loaded, we check value of this settings )\\nallTracksAreDisabled=void 0,// this is used for one session (when a file has been loaded, we use this settings to enable/disable text)\\nforceTextStreaming=void 0,textTracksAdded=void 0,disableTextBeforeTextTracksAdded=void 0,previousPeriodSelectedTrack=void 0;function setup(){defaultSettings=null;lastEnabledIndex=-1;forceTextStreaming=false;textTracksAdded=false;initialSettingsSet=false;disableTextBeforeTextTracksAdded=false;textTracks=(0,_TextTracks2.default)(context).getInstance();vttParser=(0,_VTTParser2.default)(context).getInstance();ttmlParser=(0,_TTMLParser2.default)(context).getInstance();textSourceBuffer=(0,_TextSourceBuffer2.default)(context).getInstance();eventBus=(0,_EventBus2.default)(context).getInstance();textTracks.initialize();eventBus.on(_Events2.default.TEXT_TRACKS_QUEUE_INITIALIZED,onTextTracksAdded,instance);eventBus.on(_Events2.default.CURRENT_TRACK_CHANGED,onCurrentTrackChanged,instance);/*\\n        * register those event callbacks in order to detect switch of periods and set\\n        * correctly the selected track index in the new period.\\n        * there is different cases :\\n        *   - switch occurs after a seek command from the user\\n        *   - switch occurs but codecs in streams are different\\n        *   - switch occurs and codecs in streams are not different\\n        */eventBus.on(_Events2.default.PERIOD_SWITCH_STARTED,onPeriodSwitchStarted,instance);eventBus.on(_Events2.default.STREAM_COMPLETED,onStreamCompleted,instance);eventBus.on(_Events2.default.PERIOD_SWITCH_COMPLETED,onPeriodSwitchCompleted,instance);resetInitialSettings();}function onPeriodSwitchStarted(e){if(previousPeriodSelectedTrack===undefined&&e.fromStreamInfo!==null/* test if this is the first period */){previousPeriodSelectedTrack=this.getCurrentTrackIdx();}}function onStreamCompleted(){if(previousPeriodSelectedTrack===undefined){previousPeriodSelectedTrack=this.getCurrentTrackIdx();}}function onPeriodSwitchCompleted(){if(previousPeriodSelectedTrack!==undefined){this.setTextTrack(previousPeriodSelectedTrack);previousPeriodSelectedTrack=undefined;}}function setConfig(config){if(!config){return;}if(config.errHandler){errHandler=config.errHandler;}if(config.adapter){adapter=config.adapter;}if(config.manifestModel){manifestModel=config.manifestModel;}if(config.mediaController){mediaController=config.mediaController;}if(config.videoModel){videoModel=config.videoModel;}if(config.streamController){streamController=config.streamController;}if(config.textTracks){textTracks=config.textTracks;}if(config.vttParser){vttParser=config.vttParser;}if(config.ttmlParser){ttmlParser=config.ttmlParser;}// create config for source buffer\\ntextSourceBuffer.setConfig({errHandler:errHandler,adapter:adapter,manifestModel:manifestModel,mediaController:mediaController,videoModel:videoModel,streamController:streamController,textTracks:textTracks,vttParser:vttParser,ttmlParser:ttmlParser});}function getTextSourceBuffer(){return textSourceBuffer;}function getAllTracksAreDisabled(){return allTracksAreDisabled;}function addEmbeddedTrack(mediaInfo){textSourceBuffer.addEmbeddedTrack(mediaInfo);}function setTextDefaultLanguage(lang){(0,_SupervisorTools.checkParameterType)(lang,\\'string\\');if(!defaultSettings){defaultSettings={};}defaultSettings.lang=lang;initialSettingsSet=true;}function setInitialSettings(settings){defaultSettings=settings;initialSettingsSet=true;}function getTextDefaultLanguage(){return defaultSettings&&defaultSettings.lang||\\'\\';}function onTextTracksAdded(e){var _this=this;var tracks=e.tracks;var index=e.index;if(defaultSettings){tracks.some(function(item,idx){// matchSettings is compatible with setTextDefaultLanguage and setInitialSettings\\nif(mediaController.matchSettings(defaultSettings,item)){_this.setTextTrack(idx);index=idx;return true;}});}if(textDefaultEnabled===false||textDefaultEnabled===undefined&&!defaultSettings||disableTextBeforeTextTracksAdded){// disable text at startup if explicitely configured with setTextDefaultEnabled(false) or if there is no defaultSettings (configuration or from domStorage)\\nthis.setTextTrack(-1);}lastEnabledIndex=index;eventBus.trigger(_Events2.default.TEXT_TRACKS_ADDED,{enabled:isTextEnabled(),index:index,tracks:tracks});textTracksAdded=true;}function onCurrentTrackChanged(event){if(!initialSettingsSet&&event&&event.newMediaInfo){var mediaInfo=event.newMediaInfo;if(mediaInfo.type===_Constants2.default.FRAGMENTED_TEXT){defaultSettings={lang:mediaInfo.lang,role:mediaInfo.roles[0],accessibility:mediaInfo.accessibility[0]};}}}function setTextDefaultEnabled(enable){(0,_SupervisorTools.checkParameterType)(enable,\\'boolean\\');textDefaultEnabled=enable;if(!textDefaultEnabled){// disable text at startup\\nthis.setTextTrack(-1);}else{allTracksAreDisabled=false;}}function getTextDefaultEnabled(){return textDefaultEnabled===undefined?false:textDefaultEnabled;}function enableText(enable){(0,_SupervisorTools.checkParameterType)(enable,\\'boolean\\');if(!textDefaultEnabled&&enable){textDefaultEnabled=true;}if(isTextEnabled()!==enable){// change track selection\\nif(enable){// apply last enabled track\\nthis.setTextTrack(lastEnabledIndex);}if(!enable){// keep last index and disable text track\\nlastEnabledIndex=this.getCurrentTrackIdx();if(!textTracksAdded){disableTextBeforeTextTracksAdded=true;}else{this.setTextTrack(-1);}}}}function isTextEnabled(){var enabled=true;if(allTracksAreDisabled&&!forceTextStreaming){enabled=false;}return enabled;}// when set to true ScheduleController will allow schedule of chunks even if tracks are all disabled. Allowing streaming to hidden track for external players to work with.\\nfunction enableForcedTextStreaming(enable){(0,_SupervisorTools.checkParameterType)(enable,\\'boolean\\');forceTextStreaming=enable;}function setTextTrack(idx){//For external time text file, the only action needed to change a track is marking the track mode to showing.\\n// Fragmented text tracks need the additional step of calling TextController.setTextTrack();\\nvar config=textSourceBuffer.getConfig();var fragmentModel=config.fragmentModel;var fragmentedTracks=config.fragmentedTracks;var videoModel=config.videoModel;var mediaInfosArr=void 0,streamProcessor=void 0;allTracksAreDisabled=idx===-1?true:false;var oldTrackIdx=textTracks.getCurrentTrackIdx();if(oldTrackIdx!==idx){if(allTracksAreDisabled&&mediaController){mediaController.saveTextSettingsDisabled();}textTracks.setModeForTrackIdx(oldTrackIdx,_Constants2.default.TEXT_HIDDEN);textTracks.setCurrentTrackIdx(idx);textTracks.setModeForTrackIdx(idx,_Constants2.default.TEXT_SHOWING);var currentTrackInfo=textTracks.getCurrentTrackInfo();if(currentTrackInfo&&currentTrackInfo.isFragmented&&!currentTrackInfo.isEmbedded){for(var i=0;i<fragmentedTracks.length;i++){var mediaInfo=fragmentedTracks[i];if(currentTrackInfo.lang===mediaInfo.lang&&currentTrackInfo.index===mediaInfo.index&&(mediaInfo.id?currentTrackInfo.id===mediaInfo.id:currentTrackInfo.id===mediaInfo.index)){var currentFragTrack=mediaController.getCurrentTrackFor(_Constants2.default.FRAGMENTED_TEXT,streamController.getActiveStreamInfo());if(mediaInfo!==currentFragTrack){fragmentModel.abortRequests();fragmentModel.removeExecutedRequestsBeforeTime();textSourceBuffer.remove();textTracks.deleteCuesFromTrackIdx(oldTrackIdx);mediaController.setTrack(mediaInfo);textSourceBuffer.setCurrentFragmentedTrackIdx(i);}else if(oldTrackIdx===-1){//in fragmented use case, if the user selects the older track (the one selected before disabled text track)\\n//no CURRENT_TRACK_CHANGED event will be trigger, so dashHandler current time has to be updated and the scheduleController\\n//has to be restarted.\\nvar streamProcessors=streamController.getActiveStreamProcessors();for(var _i=0;_i<streamProcessors.length;_i++){if(streamProcessors[_i].getType()===_Constants2.default.FRAGMENTED_TEXT){streamProcessor=streamProcessors[_i];break;}}streamProcessor.setBufferingTime(videoModel.getTime());streamProcessor.getScheduleController().start();}}}}else if(currentTrackInfo&&!currentTrackInfo.isFragmented){var _streamProcessors=streamController.getActiveStreamProcessors();for(var _i2=0;_i2<_streamProcessors.length;_i2++){if(_streamProcessors[_i2].getType()===_Constants2.default.TEXT){streamProcessor=_streamProcessors[_i2];mediaInfosArr=streamProcessor.getMediaInfoArr();break;}}if(streamProcessor&&mediaInfosArr){for(var _i3=0;_i3<mediaInfosArr.length;_i3++){if(mediaInfosArr[_i3].index===currentTrackInfo.index&&mediaInfosArr[_i3].lang===currentTrackInfo.lang){streamProcessor.selectMediaInfo(mediaInfosArr[_i3]);break;}}}}}}function getCurrentTrackIdx(){return textTracks.getCurrentTrackIdx();}function resetInitialSettings(){allTracksAreDisabled=true;textTracksAdded=false;disableTextBeforeTextTracksAdded=false;}function reset(){resetInitialSettings();textSourceBuffer.resetEmbedded();textSourceBuffer.reset();}instance={setConfig:setConfig,getTextSourceBuffer:getTextSourceBuffer,getAllTracksAreDisabled:getAllTracksAreDisabled,addEmbeddedTrack:addEmbeddedTrack,getTextDefaultLanguage:getTextDefaultLanguage,setTextDefaultLanguage:setTextDefaultLanguage,setTextDefaultEnabled:setTextDefaultEnabled,getTextDefaultEnabled:getTextDefaultEnabled,setInitialSettings:setInitialSettings,enableText:enableText,isTextEnabled:isTextEnabled,setTextTrack:setTextTrack,getCurrentTrackIdx:getCurrentTrackIdx,enableForcedTextStreaming:enableForcedTextStreaming,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TextController.__dashjs_factory_name=\\'TextController\\';exports.default=_FactoryMaker2.default.getSingletonFactory(TextController);\\n//# sourceMappingURL=TextController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");var _TextTrackInfo=__webpack_require__(/*! ../vo/TextTrackInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js\\\");var _TextTrackInfo2=_interopRequireDefault(_TextTrackInfo);var _BoxParser=__webpack_require__(/*! ../utils/BoxParser */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\\\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _CustomTimeRanges=__webpack_require__(/*! ../utils/CustomTimeRanges */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js\\\");var _CustomTimeRanges2=_interopRequireDefault(_CustomTimeRanges);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _TextTracks=__webpack_require__(/*! ./TextTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\\\");var _TextTracks2=_interopRequireDefault(_TextTracks);var _EmbeddedTextHtmlRender=__webpack_require__(/*! ./EmbeddedTextHtmlRender */ \\\"../node_modules/dashjs/build/es5/src/streaming/text/EmbeddedTextHtmlRender.js\\\");var _EmbeddedTextHtmlRender2=_interopRequireDefault(_EmbeddedTextHtmlRender);var _codemIsoboxer=__webpack_require__(/*! codem-isoboxer */ \\\"../node_modules/codem-isoboxer/dist/iso_boxer.js\\\");var _codemIsoboxer2=_interopRequireDefault(_codemIsoboxer);var _cea608Parser=__webpack_require__(/*! ../../../externals/cea608-parser */ \\\"../node_modules/dashjs/build/es5/externals/cea608-parser.js\\\");var _cea608Parser2=_interopRequireDefault(_cea608Parser);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\\\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \\\"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\\\");var _Errors2=_interopRequireDefault(_Errors);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TextSourceBuffer(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var embeddedInitialized=false;var instance=void 0,logger=void 0,boxParser=void 0,errHandler=void 0,adapter=void 0,manifestModel=void 0,mediaController=void 0,parser=void 0,vttParser=void 0,ttmlParser=void 0,mediaInfos=void 0,textTracks=void 0,fragmentedFragmentModel=void 0,initializationSegmentReceived=void 0,timescale=void 0,fragmentedTracks=void 0,videoModel=void 0,streamController=void 0,firstFragmentedSubtitleStart=void 0,currFragmentedTrackIdx=void 0,embeddedTracks=void 0,embeddedTimescale=void 0,embeddedLastSequenceNumber=void 0,embeddedCea608FieldParsers=void 0,embeddedTextHtmlRender=void 0,mseTimeOffset=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);resetInitialSettings();}function resetFragmented(){fragmentedFragmentModel=null;timescale=NaN;fragmentedTracks=[];firstFragmentedSubtitleStart=null;initializationSegmentReceived=false;}function resetInitialSettings(){resetFragmented();mediaInfos=[];parser=null;}function initialize(mimeType,streamInfo,mediaInfoArr,fragmentModel){if(!embeddedInitialized){initEmbedded();}textTracks.setConfig({videoModel:videoModel});textTracks.initialize();if(!boxParser){boxParser=(0,_BoxParser2.default)(context).getInstance();}addMediaInfos(mimeType,streamInfo,mediaInfoArr,fragmentModel);}function addMediaInfos(mimeType,streamInfo,mediaInfoArr,fragmentModel){var isFragmented=!adapter.getIsTextTrack(mimeType);mediaInfos=mediaInfos.concat(mediaInfoArr);if(isFragmented){fragmentedFragmentModel=fragmentModel;instance.buffered=(0,_CustomTimeRanges2.default)(context).create();fragmentedTracks=mediaController.getTracksFor(_Constants2.default.FRAGMENTED_TEXT,streamInfo);var currFragTrack=mediaController.getCurrentTrackFor(_Constants2.default.FRAGMENTED_TEXT,streamInfo);for(var i=0;i<fragmentedTracks.length;i++){if(fragmentedTracks[i]===currFragTrack){setCurrentFragmentedTrackIdx(i);break;}}}for(var _i=0;_i<mediaInfos.length;_i++){createTextTrackFromMediaInfo(null,mediaInfos[_i]);}}function abort(){textTracks.deleteAllTextTracks();resetFragmented();boxParser=null;mediaInfos=[];}function reset(){resetInitialSettings();streamController=null;videoModel=null;textTracks=null;}function onVideoChunkReceived(e){var chunk=e.chunk;if(chunk.mediaInfo.embeddedCaptions){append(chunk.bytes,chunk);}}function initEmbedded(){embeddedTracks=[];textTracks=(0,_TextTracks2.default)(context).getInstance();textTracks.setConfig({videoModel:videoModel});textTracks.initialize();boxParser=(0,_BoxParser2.default)(context).getInstance();currFragmentedTrackIdx=null;embeddedTimescale=0;embeddedCea608FieldParsers=[];embeddedLastSequenceNumber=null;embeddedInitialized=true;embeddedTextHtmlRender=(0,_EmbeddedTextHtmlRender2.default)(context).getInstance();var streamProcessors=streamController.getActiveStreamProcessors();for(var i in streamProcessors){if(streamProcessors[i].getType()==='video'){mseTimeOffset=streamProcessors[i].getRepresentationInfo().MSETimeOffset;break;}}eventBus.on(_Events2.default.VIDEO_CHUNK_RECEIVED,onVideoChunkReceived,this);eventBus.on(_Events2.default.BUFFER_CLEARED,onVideoBufferCleared,this);}function resetEmbedded(){eventBus.off(_Events2.default.VIDEO_CHUNK_RECEIVED,onVideoChunkReceived,this);eventBus.off(_Events2.default.BUFFER_CLEARED,onVideoBufferCleared,this);if(textTracks){textTracks.deleteAllTextTracks();}embeddedInitialized=false;embeddedTracks=[];embeddedCea608FieldParsers=[null,null];embeddedLastSequenceNumber=null;}function addEmbeddedTrack(mediaInfo){if(!embeddedInitialized){initEmbedded();}if(mediaInfo){if(mediaInfo.id===_Constants2.default.CC1||mediaInfo.id===_Constants2.default.CC3){for(var i=0;i<embeddedTracks.length;i++){if(embeddedTracks[i].id===mediaInfo.id){return;}}embeddedTracks.push(mediaInfo);}else{logger.warn('Embedded track '+mediaInfo.id+' not supported!');}}}function setConfig(config){if(!config){return;}if(config.errHandler){errHandler=config.errHandler;}if(config.adapter){adapter=config.adapter;}if(config.manifestModel){manifestModel=config.manifestModel;}if(config.mediaController){mediaController=config.mediaController;}if(config.videoModel){videoModel=config.videoModel;}if(config.streamController){streamController=config.streamController;}if(config.textTracks){textTracks=config.textTracks;}if(config.vttParser){vttParser=config.vttParser;}if(config.ttmlParser){ttmlParser=config.ttmlParser;}}function getConfig(){var config={fragmentModel:fragmentedFragmentModel,fragmentedTracks:fragmentedTracks,videoModel:videoModel};return config;}function setCurrentFragmentedTrackIdx(idx){currFragmentedTrackIdx=idx;}function createTextTrackFromMediaInfo(captionData,mediaInfo){var textTrackInfo=new _TextTrackInfo2.default();var trackKindMap={subtitle:'subtitles',caption:'captions'};//Dash Spec has no \\\"s\\\" on end of KIND but HTML needs plural.\\nvar getKind=function getKind(){var kind=mediaInfo.roles.length>0?trackKindMap[mediaInfo.roles[0]]:trackKindMap.caption;kind=kind===trackKindMap.caption||kind===trackKindMap.subtitle?kind:trackKindMap.caption;return kind;};var checkTTML=function checkTTML(){var ttml=false;if(mediaInfo.codec&&mediaInfo.codec.search(_Constants2.default.STPP)>=0){ttml=true;}if(mediaInfo.mimeType&&mediaInfo.mimeType.search(_Constants2.default.TTML)>=0){ttml=true;}return ttml;};textTrackInfo.captionData=captionData;textTrackInfo.lang=mediaInfo.lang;textTrackInfo.labels=mediaInfo.labels;textTrackInfo.id=mediaInfo.id?mediaInfo.id:mediaInfo.index;// AdaptationSet id (an unsigned int) as it's optional parameter, use mediaInfo.index\\ntextTrackInfo.index=mediaInfo.index;// AdaptationSet index in manifest\\ntextTrackInfo.isTTML=checkTTML();textTrackInfo.defaultTrack=getIsDefault(mediaInfo);textTrackInfo.isFragmented=!adapter.getIsTextTrack(mediaInfo.mimeType);textTrackInfo.isEmbedded=mediaInfo.isEmbedded?true:false;textTrackInfo.kind=getKind();textTrackInfo.roles=mediaInfo.roles;textTrackInfo.accessibility=mediaInfo.accessibility;var totalNrTracks=(mediaInfos?mediaInfos.length:0)+embeddedTracks.length;textTracks.addTextTrack(textTrackInfo,totalNrTracks);}function append(bytes,chunk){var result=void 0,sampleList=void 0,i=void 0,j=void 0,k=void 0,samplesInfo=void 0,ccContent=void 0;var mediaInfo=chunk.mediaInfo;var mediaType=mediaInfo.type;var mimeType=mediaInfo.mimeType;var codecType=mediaInfo.codec||mimeType;if(!codecType){logger.error('No text type defined');return;}if(mediaType===_Constants2.default.FRAGMENTED_TEXT){if(!initializationSegmentReceived&&chunk.segmentType==='InitializationSegment'){initializationSegmentReceived=true;timescale=boxParser.getMediaTimescaleFromMoov(bytes);}else{if(!initializationSegmentReceived){return;}samplesInfo=boxParser.getSamplesInfo(bytes);sampleList=samplesInfo.sampleList;if(firstFragmentedSubtitleStart===null&&sampleList.length>0){firstFragmentedSubtitleStart=sampleList[0].cts-chunk.start*timescale;}if(codecType.search(_Constants2.default.STPP)>=0){parser=parser!==null?parser:getParser(codecType);for(i=0;i<sampleList.length;i++){var sample=sampleList[i];var sampleStart=sample.cts;var sampleRelStart=sampleStart-firstFragmentedSubtitleStart;this.buffered.add(sampleRelStart/timescale,(sampleRelStart+sample.duration)/timescale);var dataView=new DataView(bytes,sample.offset,sample.subSizes[0]);ccContent=_codemIsoboxer2.default.Utils.dataViewToString(dataView,_Constants2.default.UTF8);var images=[];var subOffset=sample.offset+sample.subSizes[0];for(j=1;j<sample.subSizes.length;j++){var inData=new Uint8Array(bytes,subOffset,sample.subSizes[j]);var raw=String.fromCharCode.apply(null,inData);images.push(raw);subOffset+=sample.subSizes[j];}try{// Only used for Miscrosoft Smooth Streaming support - caption time is relative to sample time. In this case, we apply an offset.\\nvar manifest=manifestModel.getValue();var offsetTime=manifest.ttmlTimeIsRelative?sampleStart/timescale:0;result=parser.parse(ccContent,offsetTime,sampleStart/timescale,(sampleStart+sample.duration)/timescale,images);textTracks.addCaptions(currFragmentedTrackIdx,firstFragmentedSubtitleStart/timescale,result);}catch(e){fragmentedFragmentModel.removeExecutedRequestsBeforeTime();this.remove();logger.error('TTML parser error: '+e.message);}}}else{// WebVTT case\\nvar captionArray=[];for(i=0;i<sampleList.length;i++){var _sample=sampleList[i];_sample.cts-=firstFragmentedSubtitleStart;this.buffered.add(_sample.cts/timescale,(_sample.cts+_sample.duration)/timescale);var sampleData=bytes.slice(_sample.offset,_sample.offset+_sample.size);// There are boxes inside the sampleData, so we need a ISOBoxer to get at it.\\nvar sampleBoxes=_codemIsoboxer2.default.parseBuffer(sampleData);for(j=0;j<sampleBoxes.boxes.length;j++){var box1=sampleBoxes.boxes[j];logger.debug('VTT box1: '+box1.type);if(box1.type==='vtte'){continue;//Empty box\\n}if(box1.type==='vttc'){logger.debug('VTT vttc boxes.length = '+box1.boxes.length);for(k=0;k<box1.boxes.length;k++){var box2=box1.boxes[k];logger.debug('VTT box2: '+box2.type);if(box2.type==='payl'){var cue_text=box2.cue_text;logger.debug('VTT cue_text = '+cue_text);var start_time=_sample.cts/timescale;var end_time=(_sample.cts+_sample.duration)/timescale;captionArray.push({start:start_time,end:end_time,data:cue_text,styles:{}});logger.debug('VTT '+start_time+'-'+end_time+' : '+cue_text);}}}}}if(captionArray.length>0){textTracks.addCaptions(currFragmentedTrackIdx,0,captionArray);}}}}else if(mediaType===_Constants2.default.TEXT){var _dataView=new DataView(bytes,0,bytes.byteLength);ccContent=_codemIsoboxer2.default.Utils.dataViewToString(_dataView,_Constants2.default.UTF8);try{result=getParser(codecType).parse(ccContent,0);textTracks.addCaptions(textTracks.getCurrentTrackIdx(),0,result);}catch(e){errHandler.error(new _DashJSError2.default(_Errors2.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,_Errors2.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,ccContent));}}else if(mediaType===_Constants2.default.VIDEO){//embedded text\\nif(chunk.segmentType===_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE){if(embeddedTimescale===0){embeddedTimescale=boxParser.getMediaTimescaleFromMoov(bytes);for(i=0;i<embeddedTracks.length;i++){createTextTrackFromMediaInfo(null,embeddedTracks[i]);}}}else{// MediaSegment\\nif(embeddedTimescale===0){logger.warn('CEA-608: No timescale for embeddedTextTrack yet');return;}var makeCueAdderForIndex=function makeCueAdderForIndex(self,trackIndex){function newCue(startTime,endTime,captionScreen){var captionsArray=null;if(videoModel.getTTMLRenderingDiv()){captionsArray=embeddedTextHtmlRender.createHTMLCaptionsFromScreen(videoModel.getElement(),startTime,endTime,captionScreen);}else{var text=captionScreen.getDisplayText();captionsArray=[{start:startTime,end:endTime,data:text,styles:{}}];}if(captionsArray){textTracks.addCaptions(trackIndex,0,captionsArray);}}return newCue;};samplesInfo=boxParser.getSamplesInfo(bytes);var sequenceNumber=samplesInfo.lastSequenceNumber;if(!embeddedCea608FieldParsers[0]&&!embeddedCea608FieldParsers[1]){// Time to setup the CEA-608 parsing\\nvar field=void 0,handler=void 0,trackIdx=void 0;for(i=0;i<embeddedTracks.length;i++){if(embeddedTracks[i].id===_Constants2.default.CC1){field=0;trackIdx=textTracks.getTrackIdxForId(_Constants2.default.CC1);}else if(embeddedTracks[i].id===_Constants2.default.CC3){field=1;trackIdx=textTracks.getTrackIdxForId(_Constants2.default.CC3);}if(trackIdx===-1){logger.warn('CEA-608: data before track is ready.');return;}handler=makeCueAdderForIndex(this,trackIdx);embeddedCea608FieldParsers[i]=new _cea608Parser2.default.Cea608Parser(i+1,{'newCue':handler},null);}}if(embeddedTimescale){if(embeddedLastSequenceNumber!==null&&sequenceNumber!==embeddedLastSequenceNumber+samplesInfo.numSequences){for(i=0;i<embeddedCea608FieldParsers.length;i++){if(embeddedCea608FieldParsers[i]){embeddedCea608FieldParsers[i].reset();}}}var allCcData=extractCea608Data(bytes,samplesInfo.sampleList);for(var fieldNr=0;fieldNr<embeddedCea608FieldParsers.length;fieldNr++){var ccData=allCcData.fields[fieldNr];var fieldParser=embeddedCea608FieldParsers[fieldNr];if(fieldParser){for(i=0;i<ccData.length;i++){fieldParser.addData(ccData[i][0]/embeddedTimescale,ccData[i][1]);}}}embeddedLastSequenceNumber=sequenceNumber;}}}}/**\\n     * Extract CEA-608 data from a buffer of data.\\n     * @param {ArrayBuffer} data\\n     * @param {Array} samples cue information\\n     * @returns {Object|null} ccData corresponding to one segment.\\n     */function extractCea608Data(data,samples){if(samples.length===0){return null;}var allCcData={splits:[],fields:[[],[]]};var raw=new DataView(data);for(var i=0;i<samples.length;i++){var sample=samples[i];var cea608Ranges=_cea608Parser2.default.findCea608Nalus(raw,sample.offset,sample.size);var lastSampleTime=null;var idx=0;for(var j=0;j<cea608Ranges.length;j++){var ccData=_cea608Parser2.default.extractCea608DataFromRange(raw,cea608Ranges[j]);for(var k=0;k<2;k++){if(ccData[k].length>0){if(sample.cts!==lastSampleTime){idx=0;}else{idx+=1;}allCcData.fields[k].push([sample.cts+mseTimeOffset*embeddedTimescale,ccData[k],idx]);lastSampleTime=sample.cts;}}}}// Sort by sampleTime ascending order\\n// If two packets have the same sampleTime, use them in the order\\n// they were received\\nallCcData.fields.forEach(function sortField(field){field.sort(function(a,b){if(a[0]===b[0]){return a[2]-b[2];}return a[0]-b[0];});});return allCcData;}function getIsDefault(mediaInfo){//TODO How to tag default. currently same order as listed in manifest.\\n// Is there a way to mark a text adaptation set as the default one? DASHIF meeting talk about using role which is being used for track KIND\\n// Eg subtitles etc. You can have multiple role tags per adaptation Not defined in the spec yet.\\nvar isDefault=false;if(embeddedTracks.length>1&&mediaInfo.isEmbedded){isDefault=mediaInfo.id&&mediaInfo.id===_Constants2.default.CC1;// CC1 if both CC1 and CC3 exist\\n}else if(embeddedTracks.length===1){if(mediaInfo.id&&typeof mediaInfo.id==='string'&&mediaInfo.id.substring(0,2)==='CC'){// Either CC1 or CC3\\nisDefault=true;}}else if(embeddedTracks.length===0){isDefault=mediaInfo.index===mediaInfos[0].index;}return isDefault;}function getParser(codecType){var parser=void 0;if(codecType.search(_Constants2.default.VTT)>=0){parser=vttParser;}else if(codecType.search(_Constants2.default.TTML)>=0||codecType.search(_Constants2.default.STPP)>=0){parser=ttmlParser;}return parser;}function remove(start,end){//if start and end are not defined, remove all\\nif(start===undefined&&start===end){start=this.buffered.start(0);end=this.buffered.end(this.buffered.length-1);}this.buffered.remove(start,end);}function onVideoBufferCleared(e){embeddedTracks.forEach(function(track){var trackIdx=textTracks.getTrackIdxForId(track.id);if(trackIdx>=0){textTracks.deleteCuesFromTrackIdx(trackIdx,e.from,e.to);}});}instance={initialize:initialize,append:append,abort:abort,addEmbeddedTrack:addEmbeddedTrack,resetEmbedded:resetEmbedded,setConfig:setConfig,getConfig:getConfig,setCurrentFragmentedTrackIdx:setCurrentFragmentedTrackIdx,remove:remove,reset:reset};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TextSourceBuffer.__dashjs_factory_name='TextSourceBuffer';exports.default=_FactoryMaker2.default.getSingletonFactory(TextSourceBuffer);\\n//# sourceMappingURL=TextSourceBuffer.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextSourceBuffer.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _imsc=__webpack_require__(/*! imsc */ \\\"../node_modules/imsc/src/main/js/main.js\\\");var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TextTracks(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,logger=void 0,Cue=void 0,videoModel=void 0,textTrackQueue=void 0,trackElementArr=void 0,currentTrackIdx=void 0,actualVideoLeft=void 0,actualVideoTop=void 0,actualVideoWidth=void 0,actualVideoHeight=void 0,captionContainer=void 0,videoSizeCheckInterval=void 0,fullscreenAttribute=void 0,displayCCOnTop=void 0,previousISDState=void 0,topZIndex=void 0,resizeObserver=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function initialize(){if(typeof window==='undefined'||typeof navigator==='undefined'){return;}Cue=window.VTTCue||window.TextTrackCue;textTrackQueue=[];trackElementArr=[];currentTrackIdx=-1;actualVideoLeft=0;actualVideoTop=0;actualVideoWidth=0;actualVideoHeight=0;captionContainer=null;videoSizeCheckInterval=null;displayCCOnTop=false;topZIndex=2147483647;previousISDState=null;if(document.fullscreenElement!==undefined){fullscreenAttribute='fullscreenElement';// Standard and Edge\\n}else if(document.webkitIsFullScreen!==undefined){fullscreenAttribute='webkitIsFullScreen';// Chrome and Safari (and Edge)\\n}else if(document.msFullscreenElement){// IE11\\nfullscreenAttribute='msFullscreenElement';}else if(document.mozFullScreen){// Firefox\\nfullscreenAttribute='mozFullScreen';}}function createTrackForUserAgent(i){var kind=textTrackQueue[i].kind;var label=textTrackQueue[i].id!==undefined?textTrackQueue[i].id:textTrackQueue[i].lang;var lang=textTrackQueue[i].lang;var isTTML=textTrackQueue[i].isTTML;var isEmbedded=textTrackQueue[i].isEmbedded;var track=videoModel.addTextTrack(kind,label,lang,isTTML,isEmbedded);return track;}function setDisplayCConTop(value){(0,_SupervisorTools.checkParameterType)(value,'boolean');displayCCOnTop=value;if(!captionContainer||document[fullscreenAttribute]){return;}captionContainer.style.zIndex=value?topZIndex:null;}function addTextTrack(textTrackInfoVO,totalTextTracks){if(textTrackQueue.length===totalTextTracks){logger.error('Trying to add too many tracks.');return;}textTrackQueue.push(textTrackInfoVO);if(textTrackQueue.length===totalTextTracks){textTrackQueue.sort(function(a,b){//Sort in same order as in manifest\\nreturn a.index-b.index;});captionContainer=videoModel.getTTMLRenderingDiv();var defaultIndex=-1;for(var i=0;i<textTrackQueue.length;i++){var track=createTrackForUserAgent.call(this,i);trackElementArr.push(track);//used to remove tracks from video element when added manually\\nif(textTrackQueue[i].defaultTrack){// track.default is an object property identifier that is a reserved word\\n// The following jshint directive is used to suppressed the warning \\\"Expected an identifier and instead saw 'default' (a reserved word)\\\"\\n/*jshint -W024 */track.default=true;defaultIndex=i;}var textTrack=getTrackByIdx(i);if(textTrack){//each time a track is created, its mode should be showing by default\\n//sometime, it's not on Chrome\\ntextTrack.mode=_Constants2.default.TEXT_SHOWING;if(captionContainer&&(textTrackQueue[i].isTTML||textTrackQueue[i].isEmbedded)){textTrack.renderingType='html';}else{textTrack.renderingType='default';}}this.addCaptions(i,0,textTrackQueue[i].captionData);eventBus.trigger(_Events2.default.TEXT_TRACK_ADDED);}//set current track index in textTrackQueue array\\nsetCurrentTrackIdx.call(this,defaultIndex);if(defaultIndex>=0){var onMetadataLoaded=function onMetadataLoaded(){var track=getTrackByIdx(defaultIndex);if(track){checkVideoSize.call(this,track,true);}eventBus.off(_Events2.default.PLAYBACK_METADATA_LOADED,onMetadataLoaded,this);};eventBus.on(_Events2.default.PLAYBACK_METADATA_LOADED,onMetadataLoaded,this);for(var idx=0;idx<textTrackQueue.length;idx++){var videoTextTrack=getTrackByIdx(idx);if(videoTextTrack){videoTextTrack.mode=idx===defaultIndex?_Constants2.default.TEXT_SHOWING:_Constants2.default.TEXT_HIDDEN;}}}eventBus.trigger(_Events2.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:currentTrackIdx,tracks:textTrackQueue});//send default idx.\\n}}function getVideoVisibleVideoSize(viewWidth,viewHeight,videoWidth,videoHeight,aspectRatio,use80Percent){var viewAspectRatio=viewWidth/viewHeight;var videoAspectRatio=videoWidth/videoHeight;var videoPictureWidth=0;var videoPictureHeight=0;if(viewAspectRatio>videoAspectRatio){videoPictureHeight=viewHeight;videoPictureWidth=videoPictureHeight/videoHeight*videoWidth;}else{videoPictureWidth=viewWidth;videoPictureHeight=videoPictureWidth/videoWidth*videoHeight;}var videoPictureXAspect=0;var videoPictureYAspect=0;var videoPictureWidthAspect=0;var videoPictureHeightAspect=0;var videoPictureAspect=videoPictureWidth/videoPictureHeight;if(videoPictureAspect>aspectRatio){videoPictureHeightAspect=videoPictureHeight;videoPictureWidthAspect=videoPictureHeight*aspectRatio;}else{videoPictureWidthAspect=videoPictureWidth;videoPictureHeightAspect=videoPictureWidth/aspectRatio;}videoPictureXAspect=(viewWidth-videoPictureWidthAspect)/2;videoPictureYAspect=(viewHeight-videoPictureHeightAspect)/2;if(use80Percent){return{x:videoPictureXAspect+videoPictureWidthAspect*0.1,y:videoPictureYAspect+videoPictureHeightAspect*0.1,w:videoPictureWidthAspect*0.8,h:videoPictureHeightAspect*0.8};/* Maximal picture size in videos aspect ratio */}else{return{x:videoPictureXAspect,y:videoPictureYAspect,w:videoPictureWidthAspect,h:videoPictureHeightAspect};/* Maximal picture size in videos aspect ratio */}}function checkVideoSize(track,forceDrawing){var clientWidth=videoModel.getClientWidth();var clientHeight=videoModel.getClientHeight();var videoWidth=videoModel.getVideoWidth();var videoHeight=videoModel.getVideoHeight();var videoOffsetTop=videoModel.getVideoRelativeOffsetTop();var videoOffsetLeft=videoModel.getVideoRelativeOffsetLeft();if(videoWidth!==0&&videoHeight!==0){var aspectRatio=videoWidth/videoHeight;var use80Percent=false;if(track.isFromCEA608){// If this is CEA608 then use predefined aspect ratio\\naspectRatio=3.5/3.0;use80Percent=true;}var realVideoSize=getVideoVisibleVideoSize.call(this,clientWidth,clientHeight,videoWidth,videoHeight,aspectRatio,use80Percent);var newVideoWidth=realVideoSize.w;var newVideoHeight=realVideoSize.h;var newVideoLeft=realVideoSize.x;var newVideoTop=realVideoSize.y;if(newVideoWidth!=actualVideoWidth||newVideoHeight!=actualVideoHeight||newVideoLeft!=actualVideoLeft||newVideoTop!=actualVideoTop||forceDrawing){actualVideoLeft=newVideoLeft+videoOffsetLeft;actualVideoTop=newVideoTop+videoOffsetTop;actualVideoWidth=newVideoWidth;actualVideoHeight=newVideoHeight;if(captionContainer){var containerStyle=captionContainer.style;if(containerStyle){containerStyle.left=actualVideoLeft+'px';containerStyle.top=actualVideoTop+'px';containerStyle.width=actualVideoWidth+'px';containerStyle.height=actualVideoHeight+'px';containerStyle.zIndex=fullscreenAttribute&&document[fullscreenAttribute]||displayCCOnTop?topZIndex:null;eventBus.trigger(_Events2.default.CAPTION_CONTAINER_RESIZE);}}// Video view has changed size, so resize any active cues\\nvar activeCues=track.activeCues;if(activeCues){var len=activeCues.length;for(var i=0;i<len;++i){var cue=activeCues[i];cue.scaleCue(cue);}}}}}function scaleCue(activeCue){var videoWidth=actualVideoWidth;var videoHeight=actualVideoHeight;var key=void 0,replaceValue=void 0,valueFontSize=void 0,valueLineHeight=void 0,elements=void 0;if(activeCue.cellResolution){var cellUnit=[videoWidth/activeCue.cellResolution[0],videoHeight/activeCue.cellResolution[1]];if(activeCue.linePadding){for(key in activeCue.linePadding){if(activeCue.linePadding.hasOwnProperty(key)){var valueLinePadding=activeCue.linePadding[key];replaceValue=(valueLinePadding*cellUnit[0]).toString();// Compute the CellResolution unit in order to process properties using sizing (fontSize, linePadding, etc).\\nvar elementsSpan=document.getElementsByClassName('spanPadding');for(var i=0;i<elementsSpan.length;i++){elementsSpan[i].style.cssText=elementsSpan[i].style.cssText.replace(/(padding-left\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);elementsSpan[i].style.cssText=elementsSpan[i].style.cssText.replace(/(padding-right\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);}}}}if(activeCue.fontSize){for(key in activeCue.fontSize){if(activeCue.fontSize.hasOwnProperty(key)){if(activeCue.fontSize[key][0]==='%'){valueFontSize=activeCue.fontSize[key][1]/100;}else if(activeCue.fontSize[key][0]==='c'){valueFontSize=activeCue.fontSize[key][1];}replaceValue=(valueFontSize*cellUnit[1]).toString();if(key!=='defaultFontSize'){elements=document.getElementsByClassName(key);}else{elements=document.getElementsByClassName('paragraph');}for(var j=0;j<elements.length;j++){elements[j].style.cssText=elements[j].style.cssText.replace(/(font-size\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);}}}if(activeCue.lineHeight){for(key in activeCue.lineHeight){if(activeCue.lineHeight.hasOwnProperty(key)){if(activeCue.lineHeight[key][0]==='%'){valueLineHeight=activeCue.lineHeight[key][1]/100;}else if(activeCue.fontSize[key][0]==='c'){valueLineHeight=activeCue.lineHeight[key][1];}replaceValue=(valueLineHeight*cellUnit[1]).toString();elements=document.getElementsByClassName(key);for(var k=0;k<elements.length;k++){elements[k].style.cssText=elements[k].style.cssText.replace(/(line-height\\\\s*:\\\\s*)[\\\\d.,]+(?=\\\\s*px)/gi,'$1'+replaceValue);}}}}}}if(activeCue.isd){var htmlCaptionDiv=document.getElementById(activeCue.cueID);if(htmlCaptionDiv){captionContainer.removeChild(htmlCaptionDiv);}renderCaption(activeCue);}}function renderCaption(cue){if(captionContainer){var finalCue=document.createElement('div');captionContainer.appendChild(finalCue);previousISDState=(0,_imsc.renderHTML)(cue.isd,finalCue,function(uri){var imsc1ImgUrnTester=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;var smpteImgUrnTester=/^#(.*)$/;if(imsc1ImgUrnTester.test(uri)){var match=imsc1ImgUrnTester.exec(uri);var imageId=parseInt(match[4],10)-1;var imageData=btoa(cue.images[imageId]);var dataUrl='data:image/png;base64,'+imageData;return dataUrl;}else if(smpteImgUrnTester.test(uri)){var _match=smpteImgUrnTester.exec(uri);var _imageId=_match[1];var _dataUrl='data:image/png;base64,'+cue.embeddedImages[_imageId];return _dataUrl;}else{return null;}},captionContainer.clientHeight,captionContainer.clientWidth,false/*displayForcedOnlyMode*/,function(err){logger.info('renderCaption :',err);//TODO add ErrorHandler management\\n},previousISDState,true/*enableRollUp*/);finalCue.id=cue.cueID;eventBus.trigger(_Events2.default.CAPTION_RENDERED,{captionDiv:finalCue,currentTrackIdx:currentTrackIdx});}}/*\\n     * Add captions to track, store for later adding, or add captions added before\\n     */function addCaptions(trackIdx,timeOffset,captionData){var track=getTrackByIdx(trackIdx);var self=this;if(!track){return;}if(!Array.isArray(captionData)||captionData.length===0){return;}for(var item=0;item<captionData.length;item++){var cue=void 0;var currentItem=captionData[item];track.cellResolution=currentItem.cellResolution;track.isFromCEA608=currentItem.isFromCEA608;if(currentItem.type==='html'&&captionContainer){cue=new Cue(currentItem.start-timeOffset,currentItem.end-timeOffset,'');cue.cueHTMLElement=currentItem.cueHTMLElement;cue.isd=currentItem.isd;cue.images=currentItem.images;cue.embeddedImages=currentItem.embeddedImages;cue.cueID=currentItem.cueID;cue.scaleCue=scaleCue.bind(self);//useful parameters for cea608 subtitles, not for TTML one.\\ncue.cellResolution=currentItem.cellResolution;cue.lineHeight=currentItem.lineHeight;cue.linePadding=currentItem.linePadding;cue.fontSize=currentItem.fontSize;captionContainer.style.left=actualVideoLeft+'px';captionContainer.style.top=actualVideoTop+'px';captionContainer.style.width=actualVideoWidth+'px';captionContainer.style.height=actualVideoHeight+'px';cue.onenter=function(){if(track.mode===_Constants2.default.TEXT_SHOWING){if(this.isd){renderCaption(this);logger.debug('Cue enter id:'+this.cueID);}else{captionContainer.appendChild(this.cueHTMLElement);scaleCue.call(self,this);eventBus.trigger(_Events2.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:currentTrackIdx});}}};cue.onexit=function(){if(captionContainer){var divs=captionContainer.childNodes;for(var i=0;i<divs.length;++i){if(divs[i].id===this.cueID){logger.debug('Cue exit id:'+divs[i].id);captionContainer.removeChild(divs[i]);--i;}}}};}else{if(currentItem.data){cue=new Cue(currentItem.start-timeOffset,currentItem.end-timeOffset,currentItem.data);if(currentItem.styles){if(currentItem.styles.align!==undefined&&'align'in cue){cue.align=currentItem.styles.align;}if(currentItem.styles.line!==undefined&&'line'in cue){cue.line=currentItem.styles.line;}if(currentItem.styles.position!==undefined&&'position'in cue){cue.position=currentItem.styles.position;}if(currentItem.styles.size!==undefined&&'size'in cue){cue.size=currentItem.styles.size;}}cue.onenter=function(){if(track.mode===_Constants2.default.TEXT_SHOWING){eventBus.trigger(_Events2.default.CAPTION_RENDERED,{currentTrackIdx:currentTrackIdx});}};}}try{if(cue){track.addCue(cue);}else{logger.error('impossible to display subtitles.');}}catch(e){// Edge crash, delete everything and start adding again\\n// @see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11979877/\\ndeleteTrackCues(track);track.addCue(cue);throw e;}}}function getTrackByIdx(idx){return idx>=0&&textTrackQueue[idx]?videoModel.getTextTrack(textTrackQueue[idx].kind,textTrackQueue[idx].id,textTrackQueue[idx].lang,textTrackQueue[idx].isTTML,textTrackQueue[idx].isEmbedded):null;}function getCurrentTrackIdx(){return currentTrackIdx;}function getTrackIdxForId(trackId){var idx=-1;for(var i=0;i<textTrackQueue.length;i++){if(textTrackQueue[i].id===trackId){idx=i;break;}}return idx;}function setCurrentTrackIdx(idx){var _this=this;if(idx===currentTrackIdx){return;}currentTrackIdx=idx;var track=getTrackByIdx(currentTrackIdx);setCueStyleOnTrack.call(this,track);if(videoSizeCheckInterval){clearInterval(videoSizeCheckInterval);videoSizeCheckInterval=null;}if(track&&track.renderingType==='html'){checkVideoSize.call(this,track,true);if(window.ResizeObserver){resizeObserver=new window.ResizeObserver(function(){checkVideoSize.call(_this,track,true);});resizeObserver.observe(videoModel.getElement());}else{videoSizeCheckInterval=setInterval(checkVideoSize.bind(this,track),500);}}}function setCueStyleOnTrack(track){clearCaptionContainer.call(this);if(track){if(track.renderingType==='html'){setNativeCueStyle.call(this);}else{removeNativeCueStyle.call(this);}}else{removeNativeCueStyle.call(this);}}function cueInRange(cue,start,end){return(isNaN(start)||cue.startTime>=start)&&(isNaN(end)||cue.endTime<=end);}function deleteTrackCues(track,start,end){if(track.cues){var cues=track.cues;var lastIdx=cues.length-1;for(var r=lastIdx;r>=0;r--){if(cueInRange(cues[r],start,end)){track.removeCue(cues[r]);}}}}function deleteCuesFromTrackIdx(trackIdx,start,end){var track=getTrackByIdx(trackIdx);if(track){deleteTrackCues(track,start,end);}}function deleteAllTextTracks(){var ln=trackElementArr?trackElementArr.length:0;for(var i=0;i<ln;i++){var track=getTrackByIdx(i);if(track){deleteTrackCues.call(this,track);track.mode='disabled';}}trackElementArr=[];textTrackQueue=[];if(videoSizeCheckInterval){clearInterval(videoSizeCheckInterval);videoSizeCheckInterval=null;}if(resizeObserver&&videoModel){resizeObserver.unobserve(videoModel.getElement());resizeObserver=null;}currentTrackIdx=-1;clearCaptionContainer.call(this);}function deleteTextTrack(idx){videoModel.removeChild(trackElementArr[idx]);trackElementArr.splice(idx,1);}/* Set native cue style to transparent background to avoid it being displayed. */function setNativeCueStyle(){var styleElement=document.getElementById('native-cue-style');if(styleElement){return;//Already set\\n}styleElement=document.createElement('style');styleElement.id='native-cue-style';document.head.appendChild(styleElement);var stylesheet=styleElement.sheet;var video=videoModel.getElement();try{if(video){if(video.id){stylesheet.insertRule('#'+video.id+'::cue {background: transparent}',0);}else if(video.classList.length!==0){stylesheet.insertRule('.'+video.className+'::cue {background: transparent}',0);}else{stylesheet.insertRule('video::cue {background: transparent}',0);}}}catch(e){logger.info(''+e.message);}}/* Remove the extra cue style with transparent background for native cues. */function removeNativeCueStyle(){var styleElement=document.getElementById('native-cue-style');if(styleElement){document.head.removeChild(styleElement);}}function clearCaptionContainer(){if(captionContainer){while(captionContainer.firstChild){captionContainer.removeChild(captionContainer.firstChild);}}}function setConfig(config){if(!config){return;}if(config.videoModel){videoModel=config.videoModel;}}function setModeForTrackIdx(idx,mode){var track=getTrackByIdx(idx);if(track&&track.mode!==mode){track.mode=mode;}}function getCurrentTrackInfo(){return textTrackQueue[currentTrackIdx];}instance={initialize:initialize,setDisplayCConTop:setDisplayCConTop,addTextTrack:addTextTrack,addCaptions:addCaptions,getCurrentTrackIdx:getCurrentTrackIdx,setCurrentTrackIdx:setCurrentTrackIdx,getTrackIdxForId:getTrackIdxForId,getCurrentTrackInfo:getCurrentTrackInfo,setModeForTrackIdx:setModeForTrackIdx,deleteCuesFromTrackIdx:deleteCuesFromTrackIdx,deleteAllTextTracks:deleteAllTextTracks,deleteTextTrack:deleteTextTrack,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TextTracks.__dashjs_factory_name='TextTracks';exports.default=_FactoryMaker2.default.getSingletonFactory(TextTracks);\\n//# sourceMappingURL=TextTracks.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/text/TextTracks.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _Thumbnail=__webpack_require__(/*! ../vo/Thumbnail */ \"../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js\");var _Thumbnail2=_interopRequireDefault(_Thumbnail);var _ThumbnailTracks=__webpack_require__(/*! ./ThumbnailTracks */ \"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\");var _ThumbnailTracks2=_interopRequireDefault(_ThumbnailTracks);var _BitrateInfo=__webpack_require__(/*! ../vo/BitrateInfo */ \"../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js\");var _BitrateInfo2=_interopRequireDefault(_BitrateInfo);var _SegmentsUtils=__webpack_require__(/*! ../../dash/utils/SegmentsUtils */ \"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ThumbnailController(config){var context=this.context;var streamInfo=config.streamInfo;var instance=void 0,thumbnailTracks=void 0;function setup(){reset();thumbnailTracks=(0,_ThumbnailTracks2.default)(context).create({streamInfo:streamInfo,adapter:config.adapter,baseURLController:config.baseURLController,timelineConverter:config.timelineConverter,debug:config.debug,eventBus:config.eventBus,events:config.events,dashConstants:config.dashConstants});}function getStreamId(){return streamInfo.id;}function provideThumbnail(time,callback){if(typeof callback!==\\'function\\'){return;}var track=thumbnailTracks.getCurrentTrack();var offset=void 0,request=void 0;if(!track||track.segmentDuration<=0||time===undefined||time===null){callback(null);return;}// Calculate index of the sprite given a time\\nif(isNaN(track.segmentDuration)){request=thumbnailTracks.getThumbnailRequestForTime(time);if(request){track.segmentDuration=request.duration;}}offset=time%track.segmentDuration;var thumbIndex=Math.floor(offset*track.tilesHor*track.tilesVert/track.segmentDuration);// Create and return the thumbnail\\nvar thumbnail=new _Thumbnail2.default();thumbnail.width=Math.floor(track.widthPerTile);thumbnail.height=Math.floor(track.heightPerTile);thumbnail.x=Math.floor(thumbIndex%track.tilesHor)*track.widthPerTile;thumbnail.y=Math.floor(thumbIndex/track.tilesHor)*track.heightPerTile;if(\\'readThumbnail\\'in track){return track.readThumbnail(time,function(url){thumbnail.url=url;callback(thumbnail);});}else{if(!request){var seq=Math.floor(time/track.segmentDuration);thumbnail.url=buildUrlFromTemplate(track,seq);}else{thumbnail.url=request.url;track.segmentDuration=NaN;}callback(thumbnail);}}function buildUrlFromTemplate(track,seq){var seqIdx=seq+track.startNumber;var url=(0,_SegmentsUtils.replaceTokenForTemplate)(track.templateUrl,\\'Number\\',seqIdx);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,\\'Time\\',(seqIdx-1)*track.segmentDuration*track.timescale);url=(0,_SegmentsUtils.replaceTokenForTemplate)(url,\\'Bandwidth\\',track.bandwidth);return(0,_SegmentsUtils.unescapeDollarsInTemplate)(url);}function setTrackByIndex(index){thumbnailTracks.setTrackByIndex(index);}function getCurrentTrackIndex(){return thumbnailTracks.getCurrentTrackIndex();}function getBitrateList(){var tracks=thumbnailTracks.getTracks();var i=0;return tracks.map(function(t){var bitrateInfo=new _BitrateInfo2.default();bitrateInfo.mediaType=_Constants2.default.IMAGE;bitrateInfo.qualityIndex=i++;bitrateInfo.bitrate=t.bitrate;bitrateInfo.width=t.width;bitrateInfo.height=t.height;return bitrateInfo;});}function reset(){if(thumbnailTracks){thumbnailTracks.reset();}}instance={getStreamId:getStreamId,provide:provideThumbnail,setTrackByIndex:setTrackByIndex,getCurrentTrackIndex:getCurrentTrackIndex,getBitrateList:getBitrateList,reset:reset};setup();return instance;}ThumbnailController.__dashjs_factory_name=\\'ThumbnailController\\';exports.default=_FactoryMaker2.default.getClassFactory(ThumbnailController);\\n//# sourceMappingURL=ThumbnailController.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailController.js?')},\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});exports.THUMBNAILS_SCHEME_ID_URIS=undefined;var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _DashConstants=__webpack_require__(/*! ../../dash/constants/DashConstants */ \"../node_modules/dashjs/build/es5/src/dash/constants/DashConstants.js\");var _DashConstants2=_interopRequireDefault(_DashConstants);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _ThumbnailTrackInfo=__webpack_require__(/*! ../vo/ThumbnailTrackInfo */ \"../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js\");var _ThumbnailTrackInfo2=_interopRequireDefault(_ThumbnailTrackInfo);var _URLUtils=__webpack_require__(/*! ../../streaming/utils/URLUtils */ \"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\");var _URLUtils2=_interopRequireDefault(_URLUtils);var _SegmentsUtils=__webpack_require__(/*! ../../dash/utils/SegmentsUtils */ \"../node_modules/dashjs/build/es5/src/dash/utils/SegmentsUtils.js\");var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _BoxParser=__webpack_require__(/*! ../../streaming/utils/BoxParser */ \"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\");var _BoxParser2=_interopRequireDefault(_BoxParser);var _XHRLoader=__webpack_require__(/*! ../../streaming/net/XHRLoader */ \"../node_modules/dashjs/build/es5/src/streaming/net/XHRLoader.js\");var _XHRLoader2=_interopRequireDefault(_XHRLoader);var _DashHandler=__webpack_require__(/*! ../../dash/DashHandler */ \"../node_modules/dashjs/build/es5/src/dash/DashHandler.js\");var _DashHandler2=_interopRequireDefault(_DashHandler);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var THUMBNAILS_SCHEME_ID_URIS=exports.THUMBNAILS_SCHEME_ID_URIS=[\\'http://dashif.org/thumbnail_tile\\',\\'http://dashif.org/guidelines/thumbnail_tile\\'];function ThumbnailTracks(config){var context=this.context;var adapter=config.adapter;var baseURLController=config.baseURLController;var streamInfo=config.streamInfo;var timelineConverter=config.timelineConverter;var debug=config.debug;var eventBus=config.eventBus;var events=config.events;var dashConstants=config.dashConstants;var urlUtils=(0,_URLUtils2.default)(context).getInstance();var instance=void 0,tracks=void 0,indexHandler=void 0,currentTrackIndex=void 0,mediaInfo=void 0,loader=void 0,boxParser=void 0;function initialize(){reset();loader=(0,_XHRLoader2.default)(context).create({});boxParser=(0,_BoxParser2.default)(context).getInstance();indexHandler=(0,_DashHandler2.default)(context).create({streamInfo:streamInfo,timelineConverter:timelineConverter,baseURLController:baseURLController,debug:debug,eventBus:eventBus,events:events,dashConstants:dashConstants,urlUtils:urlUtils});// initialize controllers\\nindexHandler.initialize(adapter?adapter.getIsDynamic():false);// parse representation and create tracks\\naddTracks();}function normalizeSegments(fragments,representation){var segments=[];var count=0;var i=void 0,len=void 0,s=void 0,seg=void 0;for(i=0,len=fragments.length;i<len;i++){s=fragments[i];seg=(0,_SegmentsUtils.getTimeBasedSegment)(timelineConverter,adapter.getIsDynamic(),representation,s.startTime,s.duration,s.timescale,s.media,s.mediaRange,count);if(seg){segments.push(seg);seg=null;count++;}}return segments;}function addTracks(){if(!streamInfo||!adapter){return;}// Extract thumbnail tracks\\nmediaInfo=adapter.getMediaInfoForType(streamInfo,_Constants2.default.IMAGE);if(!mediaInfo){return;}var voReps=adapter.getVoRepresentations(mediaInfo);if(voReps&&voReps.length>0){voReps.forEach(function(rep){if(rep.segmentInfoType===_DashConstants2.default.SEGMENT_TEMPLATE&&rep.segmentDuration>0&&rep.media||rep.segmentInfoType===_DashConstants2.default.SEGMENT_TIMELINE){createTrack(rep);}if(rep.segmentInfoType===_DashConstants2.default.SEGMENT_BASE){createTrack(rep,true);}});}if(tracks.length>0){// Sort bitrates and select the lowest bitrate rendition\\ntracks.sort(function(a,b){return a.bitrate-b.bitrate;});currentTrackIndex=tracks.length-1;}}function createTrack(representation,useSegmentBase){var track=new _ThumbnailTrackInfo2.default();track.id=representation.id;track.bitrate=representation.bandwidth;track.width=representation.width;track.height=representation.height;track.tilesHor=1;track.tilesVert=1;if(representation.essentialProperties){representation.essentialProperties.forEach(function(p){if(THUMBNAILS_SCHEME_ID_URIS.indexOf(p.schemeIdUri)>=0&&p.value){var vars=p.value.split(\\'x\\');if(vars.length===2&&!isNaN(vars[0])&&!isNaN(vars[1])){track.tilesHor=parseInt(vars[0],10);track.tilesVert=parseInt(vars[1],10);}}});}if(useSegmentBase){eventBus.trigger(_Events2.default.SEGMENTBASE_SEGMENTSLIST_REQUEST_NEEDED,{streamId:streamInfo.id,mediaType:_Constants2.default.IMAGE,mimeType:mediaInfo.mimeType,representation:representation,callback:function callback(streamId,mediaType,segments,representation){var cache=[];segments=normalizeSegments(segments,representation);track.segmentDuration=segments[0].duration;//assume all segments have the same duration\\ntrack.readThumbnail=function(time,callback){var cached=null;cache.some(function(el){if(el.start<=time&&el.end>time){cached=el.url;return true;}});if(cached){callback(cached);}else{segments.some(function(ss){if(ss.mediaStartTime<=time&&ss.mediaStartTime+ss.duration>time){var baseURL=baseURLController.resolve(representation.path);loader.load({method:\\'get\\',url:baseURL.url,request:{range:ss.mediaRange,responseType:\\'arraybuffer\\'},onload:function onload(e){var info=boxParser.getSamplesInfo(e.target.response);var blob=new Blob([e.target.response.slice(info.sampleList[0].offset,info.sampleList[0].offset+info.sampleList[0].size)],{type:\\'image/jpeg\\'});var imageUrl=window.URL.createObjectURL(blob);cache.push({start:ss.mediaStartTime,end:ss.mediaStartTime+ss.duration,url:imageUrl});if(callback)callback(imageUrl);}});return true;}});}};}});}else{track.startNumber=representation.startNumber;track.segmentDuration=representation.segmentDuration;track.timescale=representation.timescale;track.templateUrl=buildTemplateUrl(representation);}if(track.tilesHor>0&&track.tilesVert>0){// Precalculate width and heigth per tile for perf reasons\\ntrack.widthPerTile=track.width/track.tilesHor;track.heightPerTile=track.height/track.tilesVert;tracks.push(track);}}function buildTemplateUrl(representation){var templateUrl=urlUtils.isRelative(representation.media)?urlUtils.resolve(representation.media,baseURLController.resolve(representation.path).url):representation.media;if(!templateUrl){return\\'\\';}return(0,_SegmentsUtils.replaceIDForTemplate)(templateUrl,representation.id);}function getTracks(){return tracks;}function getCurrentTrackIndex(){return currentTrackIndex;}function getCurrentTrack(){if(currentTrackIndex<0){return null;}return tracks[currentTrackIndex];}function setTrackByIndex(index){if(!tracks||tracks.length===0){return;}// select highest bitrate in case selected index is higher than bitrate list length\\nif(index>=tracks.length){index=tracks.length-1;}currentTrackIndex=index;}function getThumbnailRequestForTime(time){var currentVoRep=void 0;var voReps=adapter.getVoRepresentations(mediaInfo);for(var i=0;i<voReps.length;i++){if(tracks[currentTrackIndex].id===voReps[i].id){currentVoRep=voReps[i];break;}}return indexHandler.getSegmentRequestForTime(mediaInfo,currentVoRep,time);}function reset(){tracks=[];currentTrackIndex=-1;mediaInfo=null;}instance={initialize:initialize,getTracks:getTracks,reset:reset,setTrackByIndex:setTrackByIndex,getCurrentTrack:getCurrentTrack,getCurrentTrackIndex:getCurrentTrackIndex,getThumbnailRequestForTime:getThumbnailRequestForTime};initialize();return instance;}ThumbnailTracks.__dashjs_factory_name=\\'ThumbnailTracks\\';exports.default=_FactoryMaker2.default.getClassFactory(ThumbnailTracks);\\n//# sourceMappingURL=ThumbnailTracks.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Errors=__webpack_require__(/*! ../../core/errors/Errors */ \"../node_modules/dashjs/build/es5/src/core/errors/Errors.js\");var _Errors2=_interopRequireDefault(_Errors);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _BlacklistController=__webpack_require__(/*! ../controllers/BlacklistController */ \"../node_modules/dashjs/build/es5/src/streaming/controllers/BlacklistController.js\");var _BlacklistController2=_interopRequireDefault(_BlacklistController);var _DVBSelector=__webpack_require__(/*! ./baseUrlResolution/DVBSelector */ \"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js\");var _DVBSelector2=_interopRequireDefault(_DVBSelector);var _BasicSelector=__webpack_require__(/*! ./baseUrlResolution/BasicSelector */ \"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js\");var _BasicSelector2=_interopRequireDefault(_BasicSelector);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DashJSError=__webpack_require__(/*! ../vo/DashJSError */ \"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\");var _DashJSError2=_interopRequireDefault(_DashJSError);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BaseURLSelector(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();var instance=void 0,serviceLocationBlacklistController=void 0,basicSelector=void 0,dvbSelector=void 0,selector=void 0;function setup(){serviceLocationBlacklistController=(0,_BlacklistController2.default)(context).create({updateEventName:_Events2.default.SERVICE_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:_Events2.default.SERVICE_LOCATION_BLACKLIST_ADD});basicSelector=(0,_BasicSelector2.default)(context).create({blacklistController:serviceLocationBlacklistController});dvbSelector=(0,_DVBSelector2.default)(context).create({blacklistController:serviceLocationBlacklistController});selector=basicSelector;}function setConfig(config){if(config.selector){selector=config.selector;}}function chooseSelector(isDVB){(0,_SupervisorTools.checkParameterType)(isDVB,\\'boolean\\');selector=isDVB?dvbSelector:basicSelector;}function select(data){if(!data){return;}var baseUrls=data.baseUrls;var selectedIdx=data.selectedIdx;// Once a random selection has been carried out amongst a group of BaseURLs with the same\\n// @priority attribute value, then that choice should be re-used if the selection needs to be made again\\n// unless the blacklist has been modified or the available BaseURLs have changed.\\nif(!isNaN(selectedIdx)){return baseUrls[selectedIdx];}var selectedBaseUrl=selector.select(baseUrls);if(!selectedBaseUrl){eventBus.trigger(_Events2.default.URL_RESOLUTION_FAILED,{error:new _DashJSError2.default(_Errors2.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,_Errors2.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)});if(selector===basicSelector){reset();}return;}data.selectedIdx=baseUrls.indexOf(selectedBaseUrl);return selectedBaseUrl;}function reset(){serviceLocationBlacklistController.reset();}instance={chooseSelector:chooseSelector,select:select,reset:reset,setConfig:setConfig};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BaseURLSelector.__dashjs_factory_name=\\'BaseURLSelector\\';exports.default=_FactoryMaker2.default.getClassFactory(BaseURLSelector);\\n//# sourceMappingURL=BaseURLSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/BaseURLSelector.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _IsoFile=__webpack_require__(/*! ./IsoFile */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js\\\");var _IsoFile2=_interopRequireDefault(_IsoFile);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _codemIsoboxer=__webpack_require__(/*! codem-isoboxer */ \\\"../node_modules/codem-isoboxer/dist/iso_boxer.js\\\");var _codemIsoboxer2=_interopRequireDefault(_codemIsoboxer);var _IsoBoxSearchInfo=__webpack_require__(/*! ../vo/IsoBoxSearchInfo */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js\\\");var _IsoBoxSearchInfo2=_interopRequireDefault(_IsoBoxSearchInfo);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BoxParser()/*config*/{var logger=void 0,instance=void 0;var context=this.context;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}/**\\n     * @param {ArrayBuffer} data\\n     * @returns {IsoFile|null}\\n     * @memberof BoxParser#\\n     */function parse(data){if(!data)return null;if(data.fileStart===undefined){data.fileStart=0;}var parsedFile=_codemIsoboxer2.default.parseBuffer(data);var dashIsoFile=(0,_IsoFile2.default)(context).create();dashIsoFile.setData(parsedFile);return dashIsoFile;}/**\\n     * From the list of type boxes to look for, returns the latest one that is fully completed (header + payload). This\\n     * method only looks into the list of top boxes and doesn't analyze nested boxes.\\n     * @param {string[]} types\\n     * @param {ArrayBuffer|uint8Array} buffer\\n     * @param {number} offset\\n     * @returns {IsoBoxSearchInfo}\\n     * @memberof BoxParser#\\n     */function findLastTopIsoBoxCompleted(types,buffer,offset){if(offset===undefined){offset=0;}// 8 = size (uint32) + type (4 characters)\\nif(!buffer||offset+8>=buffer.byteLength){return new _IsoBoxSearchInfo2.default(0,false);}var data=buffer instanceof ArrayBuffer?new Uint8Array(buffer):buffer;var boxInfo=void 0;var lastCompletedOffset=0;while(offset<data.byteLength){var boxSize=parseUint32(data,offset);var boxType=parseIsoBoxType(data,offset+4);if(boxSize===0){break;}if(offset+boxSize<=data.byteLength){if(types.indexOf(boxType)>=0){boxInfo=new _IsoBoxSearchInfo2.default(offset,true,boxSize);}else{lastCompletedOffset=offset+boxSize;}}offset+=boxSize;}if(!boxInfo){return new _IsoBoxSearchInfo2.default(lastCompletedOffset,false);}return boxInfo;}function getSamplesInfo(ab){if(!ab||ab.byteLength===0){return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};}var isoFile=parse(ab);// zero or more moofs\\nvar moofBoxes=isoFile.getBoxes('moof');// exactly one mfhd per moof\\nvar mfhdBoxes=isoFile.getBoxes('mfhd');var sampleDuration=void 0,sampleCompositionTimeOffset=void 0,sampleCount=void 0,sampleSize=void 0,sampleDts=void 0,sampleList=void 0,sample=void 0,i=void 0,j=void 0,k=void 0,l=void 0,m=void 0,n=void 0,dataOffset=void 0,lastSequenceNumber=void 0,numSequences=void 0,totalDuration=void 0;numSequences=isoFile.getBoxes('moof').length;lastSequenceNumber=mfhdBoxes[mfhdBoxes.length-1].sequence_number;sampleCount=0;sampleList=[];var subsIndex=-1;var nextSubsSample=-1;for(l=0;l<moofBoxes.length;l++){var moofBox=moofBoxes[l];// zero or more trafs per moof\\nvar trafBoxes=moofBox.getChildBoxes('traf');for(j=0;j<trafBoxes.length;j++){var trafBox=trafBoxes[j];// exactly one tfhd per traf\\nvar tfhdBox=trafBox.getChildBox('tfhd');// zero or one tfdt per traf\\nvar tfdtBox=trafBox.getChildBox('tfdt');sampleDts=tfdtBox.baseMediaDecodeTime;// zero or more truns per traf\\nvar trunBoxes=trafBox.getChildBoxes('trun');// zero or more subs per traf\\nvar subsBoxes=trafBox.getChildBoxes('subs');for(k=0;k<trunBoxes.length;k++){var trunBox=trunBoxes[k];sampleCount=trunBox.sample_count;dataOffset=(tfhdBox.base_data_offset||0)+(trunBox.data_offset||0);for(i=0;i<sampleCount;i++){sample=trunBox.samples[i];sampleDuration=sample.sample_duration!==undefined?sample.sample_duration:tfhdBox.default_sample_duration;sampleSize=sample.sample_size!==undefined?sample.sample_size:tfhdBox.default_sample_size;sampleCompositionTimeOffset=sample.sample_composition_time_offset!==undefined?sample.sample_composition_time_offset:0;var sampleData={'dts':sampleDts,'cts':sampleDts+sampleCompositionTimeOffset,'duration':sampleDuration,'offset':moofBox.offset+dataOffset,'size':sampleSize,'subSizes':[sampleSize]};if(subsBoxes){for(m=0;m<subsBoxes.length;m++){var subsBox=subsBoxes[m];if(subsIndex<subsBox.entry_count-1&&i>nextSubsSample){subsIndex++;nextSubsSample+=subsBox.entries[subsIndex].sample_delta;}if(i==nextSubsSample){sampleData.subSizes=[];var entry=subsBox.entries[subsIndex];for(n=0;n<entry.subsample_count;n++){sampleData.subSizes.push(entry.subsamples[n].subsample_size);}}}}sampleList.push(sampleData);dataOffset+=sampleSize;sampleDts+=sampleDuration;}}totalDuration=sampleDts-tfdtBox.baseMediaDecodeTime;}}return{sampleList:sampleList,lastSequenceNumber:lastSequenceNumber,totalDuration:totalDuration,numSequences:numSequences};}function getMediaTimescaleFromMoov(ab){var isoFile=parse(ab);var mdhdBox=isoFile?isoFile.getBox('mdhd'):undefined;return mdhdBox?mdhdBox.timescale:NaN;}function parseUint32(data,offset){return data[offset+3]>>>0|data[offset+2]<<8>>>0|data[offset+1]<<16>>>0|data[offset]<<24>>>0;}function parseIsoBoxType(data,offset){return String.fromCharCode(data[offset++])+String.fromCharCode(data[offset++])+String.fromCharCode(data[offset++])+String.fromCharCode(data[offset]);}function findInitRange(data){var initRange=null;var start=void 0,end=void 0;var isoFile=parse(data);if(!isoFile){return initRange;}var ftyp=isoFile.getBox('ftyp');var moov=isoFile.getBox('moov');logger.debug('Searching for initialization.');if(moov&&moov.isComplete){start=ftyp?ftyp.offset:moov.offset;end=moov.offset+moov.size-1;initRange=start+'-'+end;logger.debug('Found the initialization.  Range: '+initRange);}return initRange;}/**\\n     * Real-time parsing (whenever data is loaded in the buffer payload) of the payload to capture the moof of a chunk\\n     * @param {array} types\\n     * @param {ArrayBuffer} buffer\\n     * @param {number} offset\\n     * @return {IsoBoxSearchInfo}\\n     */function parsePayload(types,buffer,offset){if(offset===undefined){offset=0;}if(!buffer||offset+8>=buffer.byteLength){return new _IsoBoxSearchInfo2.default(0,false);}var data=buffer instanceof ArrayBuffer?new Uint8Array(buffer):buffer;var boxInfo=void 0;var lastCompletedOffset=0;while(offset<data.byteLength){var boxSize=parseUint32(data,offset);var boxType=parseIsoBoxType(data,offset+4);if(boxSize===0){break;}if(offset+boxSize<=data.byteLength){if(types.indexOf(boxType)>=0){boxInfo=new _IsoBoxSearchInfo2.default(offset,true,boxSize,boxType);}else{lastCompletedOffset=offset+boxSize;}}offset+=boxSize;}if(!boxInfo){return new _IsoBoxSearchInfo2.default(lastCompletedOffset,false);}return boxInfo;}instance={parse:parse,findLastTopIsoBoxCompleted:findLastTopIsoBoxCompleted,getMediaTimescaleFromMoov:getMediaTimescaleFromMoov,getSamplesInfo:getSamplesInfo,findInitRange:findInitRange,parsePayload:parsePayload};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BoxParser.__dashjs_factory_name='BoxParser';exports.default=_FactoryMaker2.default.getSingletonFactory(BoxParser);\\n//# sourceMappingURL=BoxParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/BoxParser.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});exports.supportsMediaSource=supportsMediaSource;var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _ThumbnailTracks=__webpack_require__(/*! ../thumbnail/ThumbnailTracks */ \\\"../node_modules/dashjs/build/es5/src/streaming/thumbnail/ThumbnailTracks.js\\\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var codecCompatibilityTable=[{'codec':'avc1','compatibleCodecs':['avc3']},{'codec':'avc3','compatibleCodecs':['avc1']}];function supportsMediaSource(){var hasWebKit='WebKitMediaSource'in window;var hasMediaSource='MediaSource'in window;return hasWebKit||hasMediaSource;}function Capabilities(){var instance=void 0,encryptedMediaSupported=void 0;function setup(){encryptedMediaSupported=false;}/**\\n     * Returns whether Encrypted Media Extensions are supported on this\\n     * user agent\\n     *\\n     * @return {boolean} true if EME is supported, false otherwise\\n     */function supportsEncryptedMedia(){return encryptedMediaSupported;}/**\\n     *\\n     * @param {boolean} value\\n     */function setEncryptedMediaSupported(value){encryptedMediaSupported=value;}/**\\n     * Check if a codec is supported by the MediaSource\\n     * @param {string} codec\\n     * @return {boolean}\\n     */function supportsCodec(codec){if('MediaSource'in window&&MediaSource.isTypeSupported(codec)){return true;}if('WebKitMediaSource'in window&&WebKitMediaSource.isTypeSupported(codec)){return true;}return false;}/**\\n     * Check if a specific EssentialProperty is supported\\n     * @param {object} ep\\n     * @return {boolean}\\n     */function supportsEssentialProperty(ep){try{return _ThumbnailTracks.THUMBNAILS_SCHEME_ID_URIS.indexOf(ep.schemeIdUri)!==-1;}catch(e){return true;}}/**\\n     * Check if the root of the old codec is the same as the new one, or if it's declared as compatible in the compat table\\n     * @param {string} codec1\\n     * @param {string} codec2\\n     * @return {boolean}\\n     */function codecRootCompatibleWithCodec(codec1,codec2){var codecRoot=codec1.split('.')[0];var rootCompatible=codec2.indexOf(codecRoot)===0;var compatTableCodec=void 0;for(var i=0;i<codecCompatibilityTable.length;i++){if(codecCompatibilityTable[i].codec===codecRoot){compatTableCodec=codecCompatibilityTable[i];break;}}if(compatTableCodec){return rootCompatible||compatTableCodec.compatibleCodecs.some(function(compatibleCodec){return codec2.indexOf(compatibleCodec)===0;});}return rootCompatible;}instance={supportsMediaSource:supportsMediaSource,supportsEncryptedMedia:supportsEncryptedMedia,supportsCodec:supportsCodec,setEncryptedMediaSupported:setEncryptedMediaSupported,supportsEssentialProperty:supportsEssentialProperty,codecRootCompatibleWithCodec:codecRootCompatibleWithCodec};setup();return instance;}Capabilities.__dashjs_factory_name='Capabilities';exports.default=_FactoryMaker2.default.getSingletonFactory(Capabilities);\\n//# sourceMappingURL=Capabilities.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/Capabilities.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \"../node_modules/dashjs/build/es5/src/core/Debug.js\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function CapabilitiesFilter(){var context=this.context;var instance=void 0,adapter=void 0,capabilities=void 0,settings=void 0,logger=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function setConfig(config){if(!config){return;}if(config.adapter){adapter=config.adapter;}if(config.capabilities){capabilities=config.capabilities;}if(config.settings){settings=config.settings;}}function filterUnsupportedFeaturesOfPeriod(streamInfo){_filterUnsupportedCodecs(_Constants2.default.VIDEO,streamInfo);_filterUnsupportedCodecs(_Constants2.default.AUDIO,streamInfo);if(settings.get().streaming.filterUnsupportedEssentialProperties){_filterUnsupportedEssentialProperties(streamInfo);}}function _filterUnsupportedCodecs(type,streamInfo){var realPeriod=adapter.getRealPeriodByIndex(streamInfo?streamInfo.index:null);if(!realPeriod||!realPeriod.AdaptationSet_asArray||realPeriod.AdaptationSet_asArray.length===0){return;}realPeriod.AdaptationSet_asArray=realPeriod.AdaptationSet_asArray.filter(function(as){if(!as.Representation_asArray||as.Representation_asArray.length===0||!adapter.getIsTypeOf(as,type)){return true;}as.Representation_asArray=as.Representation_asArray.filter(function(_,i){var codec=adapter.getCodec(as,i,true);if(!capabilities.supportsCodec(codec)){logger.error(\\'[Stream] codec not supported: \\'+codec);return false;}return true;});return as.Representation_asArray&&as.Representation_asArray.length>0;});}function _filterUnsupportedEssentialProperties(streamInfo){var realPeriod=adapter.getRealPeriodByIndex(streamInfo?streamInfo.index:null);if(!realPeriod||!realPeriod.AdaptationSet_asArray||realPeriod.AdaptationSet_asArray.length===0){return;}realPeriod.AdaptationSet_asArray=realPeriod.AdaptationSet_asArray.filter(function(as){if(!as.Representation_asArray||as.Representation_asArray.length===0){return true;}as.Representation_asArray=as.Representation_asArray.filter(function(rep){var essentialProperties=adapter.getEssentialPropertiesForRepresentation(rep);if(essentialProperties&&essentialProperties.length>0){var i=0;while(i<essentialProperties.length){if(!capabilities.supportsEssentialProperty(essentialProperties[i])){logger.debug(\\'[Stream] EssentialProperty not supported: \\'+essentialProperties[i].schemeIdUri);return false;}i+=1;}}return true;});return as.Representation_asArray&&as.Representation_asArray.length>0;});}instance={setConfig:setConfig,filterUnsupportedFeaturesOfPeriod:filterUnsupportedFeaturesOfPeriod};setup();return instance;}CapabilitiesFilter.__dashjs_factory_name=\\'CapabilitiesFilter\\';exports.default=_FactoryMaker2.default.getSingletonFactory(CapabilitiesFilter);\\n//# sourceMappingURL=CapabilitiesFilter.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/CapabilitiesFilter.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _SupervisorTools=__webpack_require__(/*! ../utils/SupervisorTools */ \"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n* The copyright in this software is being made available under the BSD License,\\n* included below. This software may be subject to other third party and contributor\\n* rights, including patent rights, and no such rights are granted under this license.\\n*\\n* Copyright (c) 2013, Dash Industry Forum.\\n* All rights reserved.\\n*\\n* Redistribution and use in source and binary forms, with or without modification,\\n* are permitted provided that the following conditions are met:\\n*  * Redistributions of source code must retain the above copyright notice, this\\n*  list of conditions and the following disclaimer.\\n*  * Redistributions in binary form must reproduce the above copyright notice,\\n*  this list of conditions and the following disclaimer in the documentation and/or\\n*  other materials provided with the distribution.\\n*  * Neither the name of Dash Industry Forum nor the names of its\\n*  contributors may be used to endorse or promote products derived from this software\\n*  without specific prior written permission.\\n*\\n*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n*  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n*  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n*  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n*  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n*  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n*  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n*  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n*  POSSIBILITY OF SUCH DAMAGE.\\n*/function CustomTimeRanges()/*config*/{var customTimeRangeArray=[];var length=0;function add(start,end){var i=0;for(i=0;i<this.customTimeRangeArray.length&&start>this.customTimeRangeArray[i].start;i++){}this.customTimeRangeArray.splice(i,0,{start:start,end:end});for(i=0;i<this.customTimeRangeArray.length-1;i++){if(this.mergeRanges(i,i+1)){i--;}}this.length=this.customTimeRangeArray.length;}function clear(){this.customTimeRangeArray=[];this.length=0;}function remove(start,end){for(var i=0;i<this.customTimeRangeArray.length;i++){if(start<=this.customTimeRangeArray[i].start&&end>=this.customTimeRangeArray[i].end){//      |--------------Range i-------|\\n//|---------------Range to remove ---------------|\\n//    or\\n//|--------------Range i-------|\\n//|--------------Range to remove ---------------|\\n//    or\\n//                 |--------------Range i-------|\\n//|--------------Range to remove ---------------|\\nthis.customTimeRangeArray.splice(i,1);i--;}else if(start>this.customTimeRangeArray[i].start&&end<this.customTimeRangeArray[i].end){//|-----------------Range i----------------|\\n//        |-------Range to remove -----|\\nthis.customTimeRangeArray.splice(i+1,0,{start:end,end:this.customTimeRangeArray[i].end});this.customTimeRangeArray[i].end=start;break;}else if(start>this.customTimeRangeArray[i].start&&start<this.customTimeRangeArray[i].end){//|-----------Range i----------|\\n//                    |---------Range to remove --------|\\n//    or\\n//|-----------------Range i----------------|\\n//            |-------Range to remove -----|\\nthis.customTimeRangeArray[i].end=start;}else if(end>this.customTimeRangeArray[i].start&&end<this.customTimeRangeArray[i].end){//                     |-----------Range i----------|\\n//|---------Range to remove --------|\\n//            or\\n//|-----------------Range i----------------|\\n//|-------Range to remove -----|\\nthis.customTimeRangeArray[i].start=end;}}this.length=this.customTimeRangeArray.length;}function mergeRanges(rangeIndex1,rangeIndex2){var range1=this.customTimeRangeArray[rangeIndex1];var range2=this.customTimeRangeArray[rangeIndex2];if(range1.start<=range2.start&&range2.start<=range1.end&&range1.end<=range2.end){//|-----------Range1----------|\\n//                    |-----------Range2----------|\\nrange1.end=range2.end;this.customTimeRangeArray.splice(rangeIndex2,1);return true;}else if(range2.start<=range1.start&&range1.start<=range2.end&&range2.end<=range1.end){//                |-----------Range1----------|\\n//|-----------Range2----------|\\nrange1.start=range2.start;this.customTimeRangeArray.splice(rangeIndex2,1);return true;}else if(range2.start<=range1.start&&range1.start<=range2.end&&range1.end<=range2.end){//      |--------Range1-------|\\n//|---------------Range2--------------|\\nthis.customTimeRangeArray.splice(rangeIndex1,1);return true;}else if(range1.start<=range2.start&&range2.start<=range1.end&&range2.end<=range1.end){//|-----------------Range1--------------|\\n//        |-----------Range2----------|\\nthis.customTimeRangeArray.splice(rangeIndex2,1);return true;}return false;}function start(index){(0,_SupervisorTools.checkInteger)(index);if(index>=this.customTimeRangeArray.length||index<0){return NaN;}return this.customTimeRangeArray[index].start;}function end(index){(0,_SupervisorTools.checkInteger)(index);if(index>=this.customTimeRangeArray.length||index<0){return NaN;}return this.customTimeRangeArray[index].end;}return{customTimeRangeArray:customTimeRangeArray,length:length,add:add,clear:clear,remove:remove,mergeRanges:mergeRanges,start:start,end:end};}CustomTimeRanges.__dashjs_factory_name=\\'CustomTimeRanges\\';exports.default=_FactoryMaker2.default.getClassFactory(CustomTimeRanges);\\n//# sourceMappingURL=CustomTimeRanges.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/CustomTimeRanges.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _Constants=__webpack_require__(/*! ../constants/Constants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\\\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var legacyKeysAndReplacements=[{oldKey:'dashjs_vbitrate',newKey:'dashjs_video_bitrate'},{oldKey:'dashjs_abitrate',newKey:'dashjs_audio_bitrate'},{oldKey:'dashjs_vsettings',newKey:'dashjs_video_settings'},{oldKey:'dashjs_asettings',newKey:'dashjs_audio_settings'}];/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var LOCAL_STORAGE_BITRATE_KEY_TEMPLATE='dashjs_?_bitrate';var LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE='dashjs_?_settings';var STORAGE_TYPE_LOCAL='localStorage';var STORAGE_TYPE_SESSION='sessionStorage';var LAST_BITRATE='lastBitrate';var LAST_MEDIA_SETTINGS='lastMediaSettings';function DOMStorage(config){config=config||{};var context=this.context;var settings=config.settings;var instance=void 0,logger=void 0,supported=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);translateLegacyKeys();}//type can be local, session\\nfunction isSupported(type){if(supported!==undefined)return supported;supported=false;var testKey='1';var testValue='1';var storage=void 0;try{if(typeof window!=='undefined'){storage=window[type];}}catch(error){logger.warn('DOMStorage access denied: '+error.message);return supported;}if(!storage||type!==STORAGE_TYPE_LOCAL&&type!==STORAGE_TYPE_SESSION){return supported;}/* When Safari (OS X or iOS) is in private browsing mode, it appears as though localStorage is available, but trying to call setItem throws an exception.\\n         http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an\\n\\n         Check if the storage can be used\\n         */try{storage.setItem(testKey,testValue);storage.removeItem(testKey);supported=true;}catch(error){logger.warn('DOMStorage is supported, but cannot be used: '+error.message);}return supported;}function translateLegacyKeys(){if(isSupported(STORAGE_TYPE_LOCAL)){legacyKeysAndReplacements.forEach(function(entry){var value=localStorage.getItem(entry.oldKey);if(value){localStorage.removeItem(entry.oldKey);try{localStorage.setItem(entry.newKey,value);}catch(e){logger.error(e.message);}}});}}// Return current epoch time, ms, rounded to the nearest 10m to avoid fingerprinting user\\nfunction getTimestamp(){var ten_minutes_ms=60*1000*10;return Math.round(new Date().getTime()/ten_minutes_ms)*ten_minutes_ms;}function canStore(storageType,key){return isSupported(storageType)&&settings.get().streaming[key+'CachingInfo'].enabled;}function checkConfig(){if(!settings){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getSavedMediaSettings(type){var mediaSettings=null;checkConfig();//Checks local storage to see if there is valid, non-expired media settings\\nif(canStore(STORAGE_TYPE_LOCAL,LAST_MEDIA_SETTINGS)){var key=LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE.replace(/\\\\?/,type);try{var obj=JSON.parse(localStorage.getItem(key))||{};var isExpired=new Date().getTime()-parseInt(obj.timestamp,10)>=settings.get().streaming.lastMediaSettingsCachingInfo.ttl||false;mediaSettings=obj.settings;if(isExpired){localStorage.removeItem(key);mediaSettings=null;}}catch(e){return null;}}return mediaSettings;}function getSavedBitrateSettings(type){var savedBitrate=NaN;checkConfig();//Checks local storage to see if there is valid, non-expired bit rate\\n//hinting from the last play session to use as a starting bit rate.\\nif(canStore(STORAGE_TYPE_LOCAL,LAST_BITRATE)){var key=LOCAL_STORAGE_BITRATE_KEY_TEMPLATE.replace(/\\\\?/,type);try{var obj=JSON.parse(localStorage.getItem(key))||{};var isExpired=new Date().getTime()-parseInt(obj.timestamp,10)>=settings.get().streaming.lastBitrateCachingInfo.ttl||false;var bitrate=parseFloat(obj.bitrate);if(!isNaN(bitrate)&&!isExpired){savedBitrate=bitrate;logger.debug('Last saved bitrate for '+type+' was '+bitrate);}else if(isExpired){localStorage.removeItem(key);}}catch(e){return null;}}return savedBitrate;}function setSavedMediaSettings(type,value){if(canStore(STORAGE_TYPE_LOCAL,LAST_MEDIA_SETTINGS)){var key=LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE.replace(/\\\\?/,type);try{localStorage.setItem(key,JSON.stringify({settings:value,timestamp:getTimestamp()}));}catch(e){logger.error(e.message);}}}function setSavedBitrateSettings(type,bitrate){if(canStore(STORAGE_TYPE_LOCAL,LAST_BITRATE)&&bitrate){var key=LOCAL_STORAGE_BITRATE_KEY_TEMPLATE.replace(/\\\\?/,type);try{localStorage.setItem(key,JSON.stringify({bitrate:bitrate.toFixed(3),timestamp:getTimestamp()}));}catch(e){logger.error(e.message);}}}instance={getSavedBitrateSettings:getSavedBitrateSettings,setSavedBitrateSettings:setSavedBitrateSettings,getSavedMediaSettings:getSavedMediaSettings,setSavedMediaSettings:setSavedMediaSettings};setup();return instance;}DOMStorage.__dashjs_factory_name='DOMStorage';var factory=_FactoryMaker2.default.getSingletonFactory(DOMStorage);exports.default=factory;\\n//# sourceMappingURL=DOMStorage.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/DOMStorage.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module DefaultURLUtils\\n * @description Provides utility functions for operating on URLs.\\n * Initially this is simply a method to determine the Base URL of a URL, but\\n * should probably include other things provided all over the place such as\\n * determining whether a URL is relative/absolute, resolving two paths etc.\\n * @ignore\\n */function DefaultURLUtils(){var resolveFunction=void 0;var schemeRegex=/^[a-z][a-z0-9+\\\\-_.]*:/i;var httpUrlRegex=/^https?:\\\\/\\\\//i;var httpsUrlRegex=/^https:\\\\/\\\\//i;var originRegex=/^([a-z][a-z0-9+\\\\-_.]*:\\\\/\\\\/[^\\\\/]+)\\\\/?/i;/**\\n     * Resolves a url given an optional base url\\n     * Uses window.URL to do the resolution.\\n     *\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     * @private\\n     */var nativeURLResolver=function nativeURLResolver(url,baseUrl){try{return new window.URL(url,baseUrl).toString();}catch(e){return url;}};/**\\n     * Resolves a url given an optional base url\\n     * Does not resolve ./, ../ etc but will do enough to construct something\\n     * which will satisfy XHR etc when window.URL is not available ie\\n     * IE11/node etc.\\n     *\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     * @private\\n     */var dumbURLResolver=function dumbURLResolver(url,baseUrl){var baseUrlParseFunc=parseBaseUrl;if(!baseUrl){return url;}if(!isRelative(url)){return url;}if(isPathAbsolute(url)){baseUrlParseFunc=parseOrigin;}if(isSchemeRelative(url)){baseUrlParseFunc=parseScheme;}var base=baseUrlParseFunc(baseUrl);var joinChar=base.charAt(base.length-1)!=='/'&&url.charAt(0)!=='/'?'/':'';return[base,url].join(joinChar);};function setup(){try{var u=new window.URL('x','http://y');//jshint ignore:line\\nresolveFunction=nativeURLResolver;}catch(e){// must be IE11/Node etc\\n}finally{resolveFunction=resolveFunction||dumbURLResolver;}}/**\\n     * Returns a string that contains the Base URL of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function parseBaseUrl(url){var slashIndex=url.indexOf('/');var lastSlashIndex=url.lastIndexOf('/');if(slashIndex!==-1){// if there is only '//'\\nif(lastSlashIndex===slashIndex+1){return url;}if(url.indexOf('?')!==-1){url=url.substring(0,url.indexOf('?'));}return url.substring(0,lastSlashIndex+1);}return'';}/**\\n     * Returns a string that contains the scheme and origin of a URL,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function parseOrigin(url){var matches=url.match(originRegex);if(matches){return matches[1];}return'';}/**\\n     * Returns a string that contains the fragment of a URL without scheme,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function removeHostname(url){var urlParts=/^(?:\\\\w+\\\\:\\\\/\\\\/)?([^\\\\/]+)(.*)$/.exec(url);//[1] = host / [2] = path\\nreturn urlParts[2].substring(1);}/**\\n     * Returns a string that contains the scheme of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function parseScheme(url){var matches=url.match(schemeRegex);if(matches){return matches[0];}return'';}/**\\n     * Determines whether the url is relative.\\n     * @return {boolean}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isRelative(url){return!schemeRegex.test(url);}/**\\n     * Determines whether the url is path-absolute.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isPathAbsolute(url){return isRelative(url)&&url.charAt(0)==='/';}/**\\n     * Determines whether the url is scheme-relative.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isSchemeRelative(url){return url.indexOf('//')===0;}/**\\n     * Determines whether the url is an HTTP-URL as defined in ISO/IEC\\n     * 23009-1:2014 3.1.15. ie URL with a fixed scheme of http or https\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isHTTPURL(url){return httpUrlRegex.test(url);}/**\\n     * Determines whether the supplied url has https scheme\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function isHTTPS(url){return httpsUrlRegex.test(url);}/**\\n     * Resolves a url given an optional base url\\n     * @return {string}\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @memberof module:DefaultURLUtils\\n     * @instance\\n     */function resolve(url,baseUrl){return resolveFunction(url,baseUrl);}setup();var instance={parseBaseUrl:parseBaseUrl,parseOrigin:parseOrigin,parseScheme:parseScheme,isRelative:isRelative,isPathAbsolute:isPathAbsolute,isSchemeRelative:isSchemeRelative,isHTTPURL:isHTTPURL,isHTTPS:isHTTPS,removeHostname:removeHostname,resolve:resolve};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DefaultURLUtils.__dashjs_factory_name='DefaultURLUtils';exports.default=_FactoryMaker2.default.getSingletonFactory(DefaultURLUtils);\\n//# sourceMappingURL=DefaultURLUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * Creates an instance of an EBMLParser class which implements a large subset\\n * of the functionality required to parse Matroska EBML\\n *\\n * @param {Object} config object with data member which is the buffer to parse\\n * @ignore\\n */function EBMLParser(config){config=config||{};var instance=void 0;var data=new DataView(config.data);var pos=0;function getPos(){return pos;}function setPos(value){pos=value;}/**\\n     * Consumes an EBML tag from the data stream.\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag and\\n     * {boolean} required flag.\\n     * @param {boolean} test whether or not the function should throw if a required\\n     * tag is not found\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found and test\\n     * param is false or undefined, or if the stream is malformed.\\n     * @memberof EBMLParser\\n     */function consumeTag(tag,test){var found=true;var bytesConsumed=0;var p1=void 0,p2=void 0;if(test===undefined){test=false;}if(tag.tag>0xFFFFFF){if(data.getUint32(pos)!==tag.tag){found=false;}bytesConsumed=4;}else if(tag.tag>0xFFFF){// 3 bytes\\np1=data.getUint16(pos);p2=data.getUint8(pos+2);// shift p1 over a byte and add p2\\nif(p1*256+p2!==tag.tag){found=false;}bytesConsumed=3;}else if(tag.tag>0xFF){if(data.getUint16(pos)!==tag.tag){found=false;}bytesConsumed=2;}else{if(data.getUint8(pos)!==tag.tag){found=false;}bytesConsumed=1;}if(!found&&tag.required&&!test){throw new Error('required tag not found');}if(found){pos+=bytesConsumed;}return found;}/**\\n     * Consumes an EBML tag from the data stream.   If the tag is found then this\\n     * function will also remove the size field which follows the tag from the\\n     * data stream.\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag and\\n     * {boolean} required flag.\\n     * @param {boolean} test whether or not the function should throw if a required\\n     * tag is not found\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found and test\\n     * param is false or undefined, or if the stream is malformedata.\\n     * @memberof EBMLParser\\n     */function consumeTagAndSize(tag,test){var found=consumeTag(tag,test);if(found){getMatroskaCodedNum();}return found;}/**\\n     * Consumes an EBML tag from the data stream.   If the tag is found then this\\n     * function will also remove the size field which follows the tag from the\\n     * data stream.  It will use the value of the size field to parse a binary\\n     * field, using a parser defined in the tag itself\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag,\\n     * {boolean} required flag, and a parse function which takes a size parameter\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found,\\n     * or if the stream is malformed\\n     * @memberof EBMLParser\\n     */function parseTag(tag){var size=void 0;consumeTag(tag);size=getMatroskaCodedNum();return instance[tag.parse](size);}/**\\n     * Consumes an EBML tag from the data stream.   If the tag is found then this\\n     * function will also remove the size field which follows the tag from the\\n     * data stream.  It will use the value of the size field to skip over the\\n     * entire section of EBML encapsulated by the tag.\\n     *\\n     * @param {Object} tag to parse, A tag is an object with at least a {number} tag, and\\n     * {boolean} required flag\\n     * @param {boolean} test a flag to indicate if an exception should be thrown\\n     * if a required tag is not found\\n     * @return {boolean} whether or not the tag was found\\n     * @throws will throw an exception if a required tag is not found and test is\\n     * false or undefined or if the stream is malformed\\n     * @memberof EBMLParser\\n     */function skipOverElement(tag,test){var found=consumeTag(tag,test);var headerSize=void 0;if(found){headerSize=getMatroskaCodedNum();pos+=headerSize;}return found;}/**\\n     * Returns and consumes a number encoded according to the Matroska EBML\\n     * specification from the bitstream.\\n     *\\n     * @param {boolean} retainMSB whether or not to retain the Most Significant Bit (the\\n     * first 1). this is usually true when reading Tag IDs.\\n     * @return {number} the decoded number\\n     * @throws will throw an exception if the bit stream is malformed or there is\\n     * not enough data\\n     * @memberof EBMLParser\\n     */function getMatroskaCodedNum(retainMSB){var bytesUsed=1;var mask=0x80;var maxBytes=8;var extraBytes=-1;var num=0;var ch=data.getUint8(pos);var i=0;for(i=0;i<maxBytes;i+=1){if((ch&mask)===mask){num=retainMSB===undefined?ch&~mask:ch;extraBytes=i;break;}mask>>=1;}for(i=0;i<extraBytes;i+=1,bytesUsed+=1){num=num<<8|0xff&data.getUint8(pos+bytesUsed);}pos+=bytesUsed;return num;}/**\\n     * Returns and consumes a float from the bitstream.\\n     *\\n     * @param {number} size 4 or 8 byte floats are supported\\n     * @return {number} the decoded number\\n     * @throws will throw an exception if the bit stream is malformed or there is\\n     * not enough data\\n     * @memberof EBMLParser\\n     */function getMatroskaFloat(size){var outFloat=void 0;switch(size){case 4:outFloat=data.getFloat32(pos);pos+=4;break;case 8:outFloat=data.getFloat64(pos);pos+=8;break;}return outFloat;}/**\\n     * Consumes and returns an unsigned int from the bitstream.\\n     *\\n     * @param {number} size 1 to 8 bytes\\n     * @return {number} the decoded number\\n     * @throws will throw an exception if the bit stream is malformed or there is\\n     * not enough data\\n     * @memberof EBMLParser\\n     */function getMatroskaUint(size){var val=0;for(var i=0;i<size;i+=1){val<<=8;val|=data.getUint8(pos+i)&0xff;}pos+=size;return val;}/**\\n     * Tests whether there is more data in the bitstream for parsing\\n     *\\n     * @return {boolean} whether there is more data to parse\\n     * @memberof EBMLParser\\n     */function moreData(){return pos<data.byteLength;}instance={getPos:getPos,setPos:setPos,consumeTag:consumeTag,consumeTagAndSize:consumeTagAndSize,parseTag:parseTag,skipOverElement:skipOverElement,getMatroskaCodedNum:getMatroskaCodedNum,getMatroskaFloat:getMatroskaFloat,getMatroskaUint:getMatroskaUint,moreData:moreData};return instance;}EBMLParser.__dashjs_factory_name='EBMLParser';exports.default=_FactoryMaker2.default.getClassFactory(EBMLParser);\\n//# sourceMappingURL=EBMLParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/EBMLParser.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \"../node_modules/dashjs/build/es5/src/core/EventBus.js\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \"../node_modules/dashjs/build/es5/src/core/events/Events.js\");var _Events2=_interopRequireDefault(_Events);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module ErrorHandler\\n * @ignore\\n */function ErrorHandler(){var instance=void 0;var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();/**\\n     * @param {object} err DashJSError with code, message and data attributes\\n     * @memberof module:ErrorHandler\\n     */function error(err){eventBus.trigger(_Events2.default.ERROR,{error:err});}instance={error:error};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */ErrorHandler.__dashjs_factory_name=\\'ErrorHandler\\';exports.default=_FactoryMaker2.default.getSingletonFactory(ErrorHandler);\\n//# sourceMappingURL=ErrorHandler.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/ErrorHandler.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function InitCache(){var data={};function save(chunk){var id=chunk.streamId;var representationId=chunk.representationId;data[id]=data[id]||{};data[id][representationId]=chunk;}function extract(streamId,representationId){if(data&&data[streamId]&&data[streamId][representationId]){return data[streamId][representationId];}else{return null;}}function reset(){data={};}var instance={save:save,extract:extract,reset:reset};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * Represents data structure to keep and drive {DataChunk}\\n */InitCache.__dashjs_factory_name=\\'InitCache\\';exports.default=_FactoryMaker2.default.getSingletonFactory(InitCache);\\n//# sourceMappingURL=InitCache.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/InitCache.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _IsoBox=__webpack_require__(/*! ../vo/IsoBox */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js\\\");var _IsoBox2=_interopRequireDefault(_IsoBox);var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function IsoFile(){var instance=void 0,parsedIsoFile=void 0;/**\\n    * @param {string} type\\n    * @returns {IsoBox|null}\\n    * @memberof IsoFile#\\n    */function getBox(type){if(!type||!parsedIsoFile||!parsedIsoFile.boxes||parsedIsoFile.boxes.length===0||typeof parsedIsoFile.fetch!=='function')return null;return convertToDashIsoBox(parsedIsoFile.fetch(type));}/**\\n    * @param {string} type\\n    * @returns {Array|null} array of {@link IsoBox}\\n    * @memberof IsoFile#\\n    */function getBoxes(type){var boxes=[];if(!type||!parsedIsoFile||typeof parsedIsoFile.fetchAll!=='function'){return boxes;}var boxData=parsedIsoFile.fetchAll(type);var box=void 0;for(var i=0,ln=boxData.length;i<ln;i++){box=convertToDashIsoBox(boxData[i]);if(box){boxes.push(box);}}return boxes;}/**\\n    * @param {string} value\\n    * @memberof IsoFile#\\n    */function setData(value){parsedIsoFile=value;}/**\\n    * @returns {IsoBox|null}\\n    * @memberof IsoFile#\\n    */function getLastBox(){if(!parsedIsoFile||!parsedIsoFile.boxes||!parsedIsoFile.boxes.length)return null;var type=parsedIsoFile.boxes[parsedIsoFile.boxes.length-1].type;var boxes=getBoxes(type);return boxes.length>0?boxes[boxes.length-1]:null;}function convertToDashIsoBox(boxData){if(!boxData)return null;var box=new _IsoBox2.default(boxData);if(boxData.hasOwnProperty('_incomplete')){box.isComplete=!boxData._incomplete;}return box;}instance={getBox:getBox,getBoxes:getBoxes,setData:setData,getLastBox:getLastBox};return instance;}IsoFile.__dashjs_factory_name='IsoFile';exports.default=_FactoryMaker2.default.getClassFactory(IsoFile);\\n//# sourceMappingURL=IsoFile.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/IsoFile.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @param {Object} config\\n * @returns {{initialize: initialize, getLiveEdge: getLiveEdge, reset: reset}|*}\\n * @constructor\\n * @ignore\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function LiveEdgeFinder(config){config=config||{};var instance=void 0;var timelineConverter=config.timelineConverter;function checkConfig(){if(!timelineConverter||!timelineConverter.hasOwnProperty(\\'getExpectedLiveEdge\\')){throw new Error(_Constants2.default.MISSING_CONFIG_ERROR);}}function getLiveEdge(representationInfo){checkConfig();return representationInfo.DVRWindow?representationInfo.DVRWindow.end:0;}function reset(){timelineConverter=null;}instance={getLiveEdge:getLiveEdge,reset:reset};return instance;}LiveEdgeFinder.__dashjs_factory_name=\\'LiveEdgeFinder\\';exports.default=_FactoryMaker2.default.getClassFactory(LiveEdgeFinder);\\n//# sourceMappingURL=LiveEdgeFinder.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/LiveEdgeFinder.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _fastDeepEqual=__webpack_require__(/*! fast-deep-equal */ \"../node_modules/fast-deep-equal/index.js\");var _fastDeepEqual2=_interopRequireDefault(_fastDeepEqual);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module ObjectUtils\\n * @ignore\\n * @description Provides utility functions for objects\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function ObjectUtils(){var instance=void 0;/**\\n     * Returns true if objects are equal\\n     * @return {boolean}\\n     * @param {object} obj1\\n     * @param {object} obj2\\n     * @memberof module:ObjectUtils\\n     * @instance\\n     */function areEqual(obj1,obj2){return(0,_fastDeepEqual2.default)(obj1,obj2);}instance={areEqual:areEqual};return instance;}ObjectUtils.__dashjs_factory_name=\\'ObjectUtils\\';exports.default=_FactoryMaker2.default.getSingletonFactory(ObjectUtils);\\n//# sourceMappingURL=ObjectUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/ObjectUtils.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RequestModifier(){var instance=void 0;function modifyRequestURL(url){return url;}function modifyRequestHeader(request){return request;}instance={modifyRequestURL:modifyRequestURL,modifyRequestHeader:modifyRequestHeader};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */RequestModifier.__dashjs_factory_name=\\'RequestModifier\\';exports.default=_FactoryMaker2.default.getSingletonFactory(RequestModifier);\\n//# sourceMappingURL=RequestModifier.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/RequestModifier.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _typeof=typeof Symbol===\"function\"&&typeof Symbol.iterator===\"symbol\"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol===\"function\"&&obj.constructor===Symbol&&obj!==Symbol.prototype?\"symbol\":typeof obj;};/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */exports.checkParameterType=checkParameterType;exports.checkInteger=checkInteger;exports.checkRange=checkRange;exports.checkIsVideoOrAudioType=checkIsVideoOrAudioType;var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function checkParameterType(parameter,type){if((typeof parameter===\\'undefined\\'?\\'undefined\\':_typeof(parameter))!==type){throw _Constants2.default.BAD_ARGUMENT_ERROR;}}function checkInteger(parameter){var isInt=parameter!==null&&!isNaN(parameter)&&parameter%1===0;if(!isInt){throw _Constants2.default.BAD_ARGUMENT_ERROR+\\' : argument is not an integer\\';}}function checkRange(parameter,min,max){if(parameter<min||parameter>max){throw _Constants2.default.BAD_ARGUMENT_ERROR+\\' : argument out of range\\';}}function checkIsVideoOrAudioType(type){if(typeof type!==\\'string\\'||type!==_Constants2.default.AUDIO&&type!==_Constants2.default.VIDEO){throw _Constants2.default.BAD_ARGUMENT_ERROR;}}\\n//# sourceMappingURL=SupervisorTools.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/SupervisorTools.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);var _EventBus=__webpack_require__(/*! ../../core/EventBus */ \\\"../node_modules/dashjs/build/es5/src/core/EventBus.js\\\");var _EventBus2=_interopRequireDefault(_EventBus);var _Events=__webpack_require__(/*! ../../core/events/Events */ \\\"../node_modules/dashjs/build/es5/src/core/events/Events.js\\\");var _Events2=_interopRequireDefault(_Events);var _imsc=__webpack_require__(/*! imsc */ \\\"../node_modules/imsc/src/main/js/main.js\\\");var _MediaPlayerEvents=__webpack_require__(/*! ../MediaPlayerEvents */ \\\"../node_modules/dashjs/build/es5/src/streaming/MediaPlayerEvents.js\\\");var _MediaPlayerEvents2=_interopRequireDefault(_MediaPlayerEvents);var _ConformanceViolationConstants=__webpack_require__(/*! ../constants/ConformanceViolationConstants */ \\\"../node_modules/dashjs/build/es5/src/streaming/constants/ConformanceViolationConstants.js\\\");var _ConformanceViolationConstants2=_interopRequireDefault(_ConformanceViolationConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TTMLParser(){var context=this.context;var eventBus=(0,_EventBus2.default)(context).getInstance();/*\\n     * This TTML parser follows \\\"EBU-TT-D SUBTITLING DISTRIBUTION FORMAT - tech3380\\\" spec - https://tech.ebu.ch/docs/tech/tech3380.pdf.\\n     * */var instance=void 0,logger=void 0;var cueCounter=0;// Used to give every cue a unique ID.\\nfunction setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);}function getCueID(){var id='cue_TTML_'+cueCounter;cueCounter++;return id;}/**\\n     * Parse the raw data and process it to return the HTML element representing the cue.\\n     * Return the region to be processed and controlled (hide/show) by the caption controller.\\n     * @param {string} data - raw data received from the TextSourceBuffer\\n     * @param {number} offsetTime - offset time to apply to cue time\\n     * @param {integer} startTimeSegment - startTime for the current segment\\n     * @param {integer} endTimeSegment - endTime for the current segment\\n     * @param {Array} images - images array referenced by subs MP4 box\\n     */function parse(data,offsetTime,startTimeSegment,endTimeSegment,images){var errorMsg='';var captionArray=[];var startTime=void 0,endTime=void 0,i=void 0;var content={};var embeddedImages={};var currentImageId='';var accumulated_image_data='';var metadataHandler={onOpenTag:function onOpenTag(ns,name,attrs){// cope with existing non-compliant content\\nif(attrs[' imagetype']&&!attrs[' imageType']){eventBus.trigger(_MediaPlayerEvents2.default.CONFORMANCE_VIOLATION,{level:_ConformanceViolationConstants2.default.LEVELS.ERROR,event:_ConformanceViolationConstants2.default.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE});attrs[' imageType']=attrs[' imagetype'];}if(name==='image'&&(ns==='http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt'||ns==='http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt')){if(!attrs[' imageType']||attrs[' imageType'].value!=='PNG'){logger.warn('smpte-tt imageType != PNG. Discarded');return;}currentImageId=attrs['http://www.w3.org/XML/1998/namespace id'].value;}},onCloseTag:function onCloseTag(){if(currentImageId){embeddedImages[currentImageId]=accumulated_image_data.trim();}accumulated_image_data='';currentImageId='';},onText:function onText(contents){if(currentImageId){accumulated_image_data=accumulated_image_data+contents;}}};if(!data){errorMsg='no ttml data to parse';throw new Error(errorMsg);}content.data=data;eventBus.trigger(_Events2.default.TTML_TO_PARSE,content);var imsc1doc=(0,_imsc.fromXML)(content.data,function(msg){errorMsg=msg;},metadataHandler);eventBus.trigger(_Events2.default.TTML_PARSED,{ttmlString:content.data,ttmlDoc:imsc1doc});var mediaTimeEvents=imsc1doc.getMediaTimeEvents();for(i=0;i<mediaTimeEvents.length;i++){var isd=(0,_imsc.generateISD)(imsc1doc,mediaTimeEvents[i],function(error){errorMsg=error;});if(isd.contents.some(function(topLevelContents){return topLevelContents.contents.length;})){//be sure that mediaTimeEvents values are in the mp4 segment time ranges.\\nstartTime=mediaTimeEvents[i]+offsetTime<startTimeSegment?startTimeSegment:mediaTimeEvents[i]+offsetTime;endTime=mediaTimeEvents[i+1]+offsetTime>endTimeSegment?endTimeSegment:mediaTimeEvents[i+1]+offsetTime;if(startTime<endTime){captionArray.push({start:startTime,end:endTime,type:'html',cueID:getCueID(),isd:isd,images:images,embeddedImages:embeddedImages});}}}if(errorMsg!==''){logger.error(errorMsg);throw new Error(errorMsg);}return captionArray;}instance={parse:parse};setup();return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */TTMLParser.__dashjs_factory_name='TTMLParser';exports.default=_FactoryMaker2.default.getSingletonFactory(TTMLParser);\\n//# sourceMappingURL=TTMLParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/TTMLParser.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _DefaultURLUtils=__webpack_require__(/*! ./DefaultURLUtils */ \\\"../node_modules/dashjs/build/es5/src/streaming/utils/DefaultURLUtils.js\\\");var _DefaultURLUtils2=_interopRequireDefault(_DefaultURLUtils);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * @module URLUtils\\n * @ignore\\n * @description Provides utility functions for operating on URLs.\\n * Initially this is simply a method to determine the Base URL of a URL, but\\n * should probably include other things provided all over the place such as\\n * determining whether a URL is relative/absolute, resolving two paths etc.\\n *//**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */function URLUtils(){var instance=void 0;var defaultURLUtils=void 0;var regexUtils=[];var context=this.context;function getUtils(url){var i=void 0;for(i=0;i<regexUtils.length;i++){var regex=regexUtils[i].regex;if(regex.test(url)){return regexUtils[i].utils;}}return defaultURLUtils;}function setup(){defaultURLUtils=(0,_DefaultURLUtils2.default)(context).getInstance();}/**\\n     * Register a module to handle specific url.\\n     * @param {regex} regex - url regex\\n     * @param {object} utils - object that handles the regex\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function registerUrlRegex(regex,utils){regexUtils.push({regex:regex,utils:utils});}function internalCall(functionName,url,baseUrl){var utils=getUtils(baseUrl||url);return utils&&typeof utils[functionName]==='function'?utils[functionName](url,baseUrl):defaultURLUtils[functionName](url,baseUrl);}/**\\n     * Returns a string that contains the Base URL of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function parseBaseUrl(url){return internalCall('parseBaseUrl',url);}/**\\n     * Returns a string that contains the scheme and origin of a URL,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function parseOrigin(url){return internalCall('parseOrigin',url);}/**\\n     * Returns a string that contains the fragment of a URL without scheme,\\n     * if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function removeHostname(url){return internalCall('removeHostname',url);}/**\\n     * Returns a string that contains the scheme of a URL, if determinable.\\n     * @param {string} url - full url\\n     * @return {string}\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function parseScheme(url){return internalCall('parseScheme',url);}/**\\n     * Determines whether the url is relative.\\n     * @return {boolean}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isRelative(url){return internalCall('isRelative',url);}/**\\n     * Determines whether the url is path-absolute.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isPathAbsolute(url){return internalCall('isPathAbsolute',url);}/**\\n     * Determines whether the url is scheme-relative.\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isSchemeRelative(url){return internalCall('isSchemeRelative',url);}/**\\n     * Determines whether the url is an HTTP-URL as defined in ISO/IEC\\n     * 23009-1:2014 3.1.15. ie URL with a fixed scheme of http or https\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isHTTPURL(url){return internalCall('isHTTPURL',url);}/**\\n     * Determines whether the supplied url has https scheme\\n     * @return {bool}\\n     * @param {string} url\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function isHTTPS(url){return internalCall('isHTTPS',url);}/**\\n     * Resolves a url given an optional base url\\n     * @return {string}\\n     * @param {string} url\\n     * @param {string} [baseUrl]\\n     * @memberof module:URLUtils\\n     * @instance\\n     */function resolve(url,baseUrl){return internalCall('resolve',url,baseUrl);}setup();instance={registerUrlRegex:registerUrlRegex,parseBaseUrl:parseBaseUrl,parseOrigin:parseOrigin,parseScheme:parseScheme,isRelative:isRelative,isPathAbsolute:isPathAbsolute,isSchemeRelative:isSchemeRelative,isHTTPURL:isHTTPURL,isHTTPS:isHTTPS,removeHostname:removeHostname,resolve:resolve};return instance;}URLUtils.__dashjs_factory_name='URLUtils';var factory=_FactoryMaker2.default.getSingletonFactory(URLUtils);exports.default=factory;\\n//# sourceMappingURL=URLUtils.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/URLUtils.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../core/FactoryMaker */ \\\"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\\\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);var _Debug=__webpack_require__(/*! ../../core/Debug */ \\\"../node_modules/dashjs/build/es5/src/core/Debug.js\\\");var _Debug2=_interopRequireDefault(_Debug);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var WEBVTT='WEBVTT';function VTTParser(){var context=this.context;var instance=void 0,logger=void 0,regExNewLine=void 0,regExToken=void 0,regExWhiteSpace=void 0,regExWhiteSpaceWordBoundary=void 0;function setup(){logger=(0,_Debug2.default)(context).getInstance().getLogger(instance);regExNewLine=/(?:\\\\r\\\\n|\\\\r|\\\\n)/gm;regExToken=/--\\x3e/;regExWhiteSpace=/(^[\\\\s]+|[\\\\s]+$)/g;regExWhiteSpaceWordBoundary=/\\\\s\\\\b/g;}function parse(data){var captionArray=[];var len=void 0,lastStartTime=void 0;if(!data){return captionArray;}data=data.split(regExNewLine);len=data.length;lastStartTime=-1;for(var i=0;i<len;i++){var item=data[i];if(item.length>0&&item!==WEBVTT){if(item.match(regExToken)){var attributes=parseItemAttributes(item);var cuePoints=attributes.cuePoints;var styles=attributes.styles;var text=getSublines(data,i+1);var startTime=convertCuePointTimes(cuePoints[0].replace(regExWhiteSpace,''));var endTime=convertCuePointTimes(cuePoints[1].replace(regExWhiteSpace,''));if(!isNaN(startTime)&&!isNaN(endTime)&&startTime>=lastStartTime&&endTime>startTime){if(text!==''){lastStartTime=startTime;//TODO Make VO external so other parsers can use.\\ncaptionArray.push({start:startTime,end:endTime,data:text,styles:styles});}else{logger.error('Skipping cue due to empty/malformed cue text');}}else{logger.error('Skipping cue due to incorrect cue timing');}}}}return captionArray;}function convertCuePointTimes(time){var timeArray=time.split(':');var len=timeArray.length-1;time=parseInt(timeArray[len-1],10)*60+parseFloat(timeArray[len]);if(len===2){time+=parseInt(timeArray[0],10)*3600;}return time;}function parseItemAttributes(data){var vttCuePoints=data.split(regExToken);var arr=vttCuePoints[1].split(regExWhiteSpaceWordBoundary);arr.shift();//remove first array index it is empty...\\nvttCuePoints[1]=arr[0];arr.shift();return{cuePoints:vttCuePoints,styles:getCaptionStyles(arr)};}function getCaptionStyles(arr){var styleObject={};arr.forEach(function(element){if(element.split(/:/).length>1){var val=element.split(/:/)[1];if(val&&val.search(/%/)!=-1){val=parseInt(val.replace(/%/,''),10);}if(element.match(/align/)||element.match(/A/)){styleObject.align=val;}if(element.match(/line/)||element.match(/L/)){styleObject.line=val;}if(element.match(/position/)||element.match(/P/)){styleObject.position=val;}if(element.match(/size/)||element.match(/S/)){styleObject.size=val;}}});return styleObject;}/*\\n    * VTT can have multiple lines to display per cuepoint.\\n    */function getSublines(data,idx){var i=idx;var subline='';var lineData='';var lineCount=void 0;while(data[i]!==''&&i<data.length){i++;}lineCount=i-idx;if(lineCount>1){for(var j=0;j<lineCount;j++){lineData=data[idx+j];if(!lineData.match(regExToken)){subline+=lineData;if(j!==lineCount-1){subline+='\\\\n';}}else{// caption text should not have '--\\x3e' in it\\nsubline='';break;}}}else{lineData=data[idx];if(!lineData.match(regExToken))subline=lineData;}return subline;}instance={parse:parse};setup();return instance;}VTTParser.__dashjs_factory_name='VTTParser';exports.default=_FactoryMaker2.default.getSingletonFactory(VTTParser);\\n//# sourceMappingURL=VTTParser.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/VTTParser.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BasicSelector(config){config=config||{};var instance=void 0;var blacklistController=config.blacklistController;function select(baseUrls){var index=0;var selectedBaseUrl=void 0;if(baseUrls&&baseUrls.some(function(baseUrl,idx){index=idx;return!blacklistController.contains(baseUrl.serviceLocation);})){selectedBaseUrl=baseUrls[index];}return selectedBaseUrl;}instance={select:select};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */BasicSelector.__dashjs_factory_name=\\'BasicSelector\\';exports.default=_FactoryMaker2.default.getClassFactory(BasicSelector);\\n//# sourceMappingURL=BasicSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/BasicSelector.js?')},\"../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FactoryMaker=__webpack_require__(/*! ../../../core/FactoryMaker */ \"../node_modules/dashjs/build/es5/src/core/FactoryMaker.js\");var _FactoryMaker2=_interopRequireDefault(_FactoryMaker);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DVBSelector(config){config=config||{};var instance=void 0;var blacklistController=config.blacklistController;function getNonBlacklistedBaseUrls(urls){var removedPriorities=[];var samePrioritiesFilter=function samePrioritiesFilter(el){if(removedPriorities.length){if(el.dvb_priority&&removedPriorities.indexOf(el.dvb_priority)!==-1){return false;}}return true;};var serviceLocationFilter=function serviceLocationFilter(baseUrl){if(blacklistController.contains(baseUrl.serviceLocation)){// whenever a BaseURL is removed from the available list of\\n// BaseURLs, any other BaseURL with the same @priority\\n// value as the BaseURL being removed shall also be removed\\nif(baseUrl.dvb_priority){removedPriorities.push(baseUrl.dvb_priority);}// all URLs in the list which have a @serviceLocation\\n// attribute matching an entry in the blacklist shall be\\n// removed from the available list of BaseURLs\\nreturn false;}return true;};return urls.filter(serviceLocationFilter).filter(samePrioritiesFilter);}function selectByWeight(availableUrls){var prioritySorter=function prioritySorter(a,b){var diff=a.dvb_priority-b.dvb_priority;return isNaN(diff)?0:diff;};var topPriorityFilter=function topPriorityFilter(baseUrl,idx,arr){return!idx||arr[0].dvb_priority&&baseUrl.dvb_priority&&arr[0].dvb_priority===baseUrl.dvb_priority;};var totalWeight=0;var cumulWeights=[];var idx=0;var rn=void 0,urls=void 0;// It shall begin by taking the set of resolved BaseURLs present or inherited at the current\\n// position in the MPD, resolved and filtered as described in 10.8.2.1, that have the lowest\\n// @priority attribute value.\\nurls=availableUrls.sort(prioritySorter).filter(topPriorityFilter);if(urls.length){if(urls.length>1){// If there is more than one BaseURL with this lowest @priority attribute value then the Player\\n// shall select one of them at random such that the probability of each BaseURL being chosen\\n// is proportional to the value of its @weight attribute. The method described in RFC 2782\\n// [26] or picking from a number of weighted entries is suitable for this, but there may be other\\n// algorithms which achieve the same effect.\\n// add all the weights together, storing the accumulated weight per entry\\nurls.forEach(function(baseUrl){totalWeight+=baseUrl.dvb_weight;cumulWeights.push(totalWeight);});// pick a random number between zero and totalWeight\\nrn=Math.floor(Math.random()*(totalWeight-1));// select the index for the range rn falls within\\ncumulWeights.every(function(limit,index){idx=index;if(rn<limit){return false;}return true;});}return urls[idx];}}function select(baseUrls){return baseUrls&&selectByWeight(getNonBlacklistedBaseUrls(baseUrls));}instance={select:select};return instance;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */DVBSelector.__dashjs_factory_name=\\'DVBSelector\\';exports.default=_FactoryMaker2.default.getClassFactory(DVBSelector);\\n//# sourceMappingURL=DVBSelector.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/utils/baseUrlResolution/DVBSelector.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var BitrateInfo=function BitrateInfo(){_classCallCheck(this,BitrateInfo);this.mediaType=null;this.bitrate=null;this.width=null;this.height=null;this.scanType=null;this.qualityIndex=NaN;};exports.default=BitrateInfo;\\n//# sourceMappingURL=BitrateInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/BitrateInfo.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DashJSError=function DashJSError(code,message,data){_classCallCheck(this,DashJSError);this.code=code||null;this.message=message||null;this.data=data||null;};exports.default=DashJSError;\\n//# sourceMappingURL=DashJSError.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/DashJSError.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DataChunk=//Represents a data structure that keep all the necessary info about a single init/media segment\\nfunction DataChunk(){_classCallCheck(this,DataChunk);this.streamId=null;this.mediaInfo=null;this.segmentType=null;this.quality=NaN;this.index=NaN;this.bytes=null;this.start=NaN;this.end=NaN;this.duration=NaN;this.representationId=null;this.endFragment=null;};exports.default=DataChunk;\\n//# sourceMappingURL=DataChunk.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/DataChunk.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n */var _HTTPRequest=__webpack_require__(/*! ../vo/metrics/HTTPRequest */ \\\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\\\");function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * @class\\n * @ignore\\n */var FragmentRequest=function(){function FragmentRequest(url){_classCallCheck(this,FragmentRequest);this.action=FragmentRequest.ACTION_DOWNLOAD;this.startTime=NaN;this.mediaStartTime=NaN;this.mediaType=null;this.mediaInfo=null;this.type=null;this.duration=NaN;this.timescale=NaN;this.range=null;this.url=url||null;this.serviceLocation=null;this.requestStartDate=null;this.firstByteDate=null;this.requestEndDate=null;this.quality=NaN;this.index=NaN;this.availabilityStartTime=null;this.availabilityEndTime=null;this.wallStartTime=null;this.bytesLoaded=NaN;this.bytesTotal=NaN;this.delayLoadingTime=NaN;this.responseType='arraybuffer';this.representationId=null;}_createClass(FragmentRequest,[{key:'isInitializationRequest',value:function isInitializationRequest(){return this.type&&this.type===_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE;}},{key:'setInfo',value:function setInfo(info){this.type=info&&info.init?_HTTPRequest.HTTPRequest.INIT_SEGMENT_TYPE:_HTTPRequest.HTTPRequest.MEDIA_SEGMENT_TYPE;this.url=info&&info.url?info.url:null;this.range=info&&info.range?info.range.start+'-'+info.range.end:null;this.mediaType=info&&info.mediaType?info.mediaType:null;}}]);return FragmentRequest;}();FragmentRequest.ACTION_DOWNLOAD='download';FragmentRequest.ACTION_COMPLETE='complete';exports.default=FragmentRequest;\\n//# sourceMappingURL=FragmentRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _FragmentRequest2=__webpack_require__(/*! ./FragmentRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\");var _FragmentRequest3=_interopRequireDefault(_FragmentRequest2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var HeadRequest=function(_FragmentRequest){_inherits(HeadRequest,_FragmentRequest);function HeadRequest(url){_classCallCheck(this,HeadRequest);var _this=_possibleConstructorReturn(this,(HeadRequest.__proto__||Object.getPrototypeOf(HeadRequest)).call(this,url));_this.checkForExistenceOnly=true;return _this;}return HeadRequest;}(_FragmentRequest3.default);exports.default=HeadRequest;\\n//# sourceMappingURL=HeadRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/HeadRequest.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if(\\\"value\\\"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var IsoBox=function(){function IsoBox(boxData){_classCallCheck(this,IsoBox);this.offset=boxData._offset;this.type=boxData.type;this.size=boxData.size;this.boxes=[];if(boxData.boxes){for(var i=0;i<boxData.boxes.length;i++){this.boxes.push(new IsoBox(boxData.boxes[i]));}}this.isComplete=true;switch(boxData.type){case'sidx':this.timescale=boxData.timescale;this.earliest_presentation_time=boxData.earliest_presentation_time;this.first_offset=boxData.first_offset;this.references=boxData.references;if(boxData.references){this.references=[];for(var _i=0;_i<boxData.references.length;_i++){var reference={reference_type:boxData.references[_i].reference_type,referenced_size:boxData.references[_i].referenced_size,subsegment_duration:boxData.references[_i].subsegment_duration};this.references.push(reference);}}break;case'emsg':this.id=boxData.id;this.version=boxData.version===1?1:0;this.value=boxData.value;this.timescale=boxData.timescale;this.scheme_id_uri=boxData.scheme_id_uri;this.presentation_time_delta=boxData.version===1?boxData.presentation_time:boxData.presentation_time_delta;this.event_duration=boxData.event_duration;this.message_data=boxData.message_data;break;case'mdhd':this.timescale=boxData.timescale;break;case'mfhd':this.sequence_number=boxData.sequence_number;break;case'subs':this.entry_count=boxData.entry_count;this.entries=boxData.entries;break;case'tfhd':this.base_data_offset=boxData.base_data_offset;this.sample_description_index=boxData.sample_description_index;this.default_sample_duration=boxData.default_sample_duration;this.default_sample_size=boxData.default_sample_size;this.default_sample_flags=boxData.default_sample_flags;this.flags=boxData.flags;break;case'tfdt':this.version=boxData.version;this.baseMediaDecodeTime=boxData.baseMediaDecodeTime;this.flags=boxData.flags;break;case'trun':this.sample_count=boxData.sample_count;this.first_sample_flags=boxData.first_sample_flags;this.data_offset=boxData.data_offset;this.flags=boxData.flags;this.samples=boxData.samples;if(boxData.samples){this.samples=[];for(var _i2=0,ln=boxData.samples.length;_i2<ln;_i2++){var sample={sample_size:boxData.samples[_i2].sample_size,sample_duration:boxData.samples[_i2].sample_duration,sample_composition_time_offset:boxData.samples[_i2].sample_composition_time_offset};this.samples.push(sample);}}break;}}_createClass(IsoBox,[{key:'getChildBox',value:function getChildBox(type){for(var i=0;i<this.boxes.length;i++){if(this.boxes[i].type===type){return this.boxes[i];}}}},{key:'getChildBoxes',value:function getChildBoxes(type){var boxes=[];for(var i=0;i<this.boxes.length;i++){if(this.boxes[i].type===type){boxes.push(this.boxes[i]);}}return boxes;}}]);return IsoBox;}();exports.default=IsoBox;\\n//# sourceMappingURL=IsoBox.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/IsoBox.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var IsoBoxSearchInfo=function IsoBoxSearchInfo(lastCompletedOffset,found,size){_classCallCheck(this,IsoBoxSearchInfo);this.lastCompletedOffset=lastCompletedOffset;this.found=found;this.size=size;};exports.default=IsoBoxSearchInfo;\\n//# sourceMappingURL=IsoBoxSearchInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/IsoBoxSearchInfo.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var MetricsList=function MetricsList(){_classCallCheck(this,MetricsList);this.TcpList=[];this.HttpList=[];this.RepSwitchList=[];this.BufferLevel=[];this.BufferState=[];this.PlayList=[];this.DroppedFrames=[];this.SchedulingInfo=[];this.DVRInfo=[];this.ManifestUpdate=[];this.RequestsQueue=null;this.DVBErrors=[];};exports.default=MetricsList;\\n//# sourceMappingURL=MetricsList.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/MetricsList.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _Constants=__webpack_require__(/*! ../constants/Constants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/Constants.js\");var _Constants2=_interopRequireDefault(_Constants);var _FragmentRequest2=__webpack_require__(/*! ./FragmentRequest */ \"../node_modules/dashjs/build/es5/src/streaming/vo/FragmentRequest.js\");var _FragmentRequest3=_interopRequireDefault(_FragmentRequest2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\");}return call&&(typeof call===\"object\"||typeof call===\"function\")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!==\"function\"&&superClass!==null){throw new TypeError(\"Super expression must either be null or a function, not \"+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var TextRequest=function(_FragmentRequest){_inherits(TextRequest,_FragmentRequest);function TextRequest(url,type){_classCallCheck(this,TextRequest);var _this=_possibleConstructorReturn(this,(TextRequest.__proto__||Object.getPrototypeOf(TextRequest)).call(this));_this.url=url||null;_this.type=type||null;_this.mediaType=_Constants2.default.STREAM;_this.responseType=\\'\\';//\\'text\\' value returns a bad encoding response in Firefox\\nreturn _this;}return TextRequest;}(_FragmentRequest3.default);exports.default=TextRequest;\\n//# sourceMappingURL=TextRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/TextRequest.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var TextTrackInfo=function TextTrackInfo(){_classCallCheck(this,TextTrackInfo);this.captionData=null;this.label=null;this.lang=null;this.defaultTrack=false;this.kind=null;this.isFragmented=false;this.isEmbedded=false;};exports.default=TextTrackInfo;\\n//# sourceMappingURL=TextTrackInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/TextTrackInfo.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var Thumbnail=function Thumbnail(){_classCallCheck(this,Thumbnail);this.url=null;this.width=null;this.height=null;this.x=null;this.y=null;};exports.default=Thumbnail;\\n//# sourceMappingURL=Thumbnail.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/Thumbnail.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var ThumbnailTrackInfo=function ThumbnailTrackInfo(){_classCallCheck(this,ThumbnailTrackInfo);this.bitrate=0;this.width=0;this.height=0;this.tilesHor=0;this.tilesVert=0;this.widthPerTile=0;this.heightPerTile=0;this.startNumber=0;this.segmentDuration=0;this.timescale=0;this.templateUrl='';this.id='';};exports.default=ThumbnailTrackInfo;\\n//# sourceMappingURL=ThumbnailTrackInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/ThumbnailTrackInfo.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var URIFragmentData=function URIFragmentData(){_classCallCheck(this,URIFragmentData);this.t=null;this.xywh=null;this.track=null;this.id=null;this.s=null;this.r=null;};exports.default=URIFragmentData;/*\\n    From Spec http://www.w3.org/TR/media-frags/\\n\\n    temporal (t)     - This dimension denotes a specific time range in the original media, such as \"starting at second 10, continuing until second 20\";\\n    spatial  (xywh)  - this dimension denotes a specific range of pixels in the original media, such as \"a rectangle with size (100,100) with its top-left at coordinate (10,10)\";\\n                       Media fragments support also addressing the media along two additional dimensions (in the advanced version defined in Media Fragments 1.0 URI (advanced)):\\n    track    (track) - this dimension denotes one or more tracks in the original media, such as \"the english audio and the video track\";\\n    id       (id)    - this dimension denotes a named temporal fragment within the original media, such as \"chapter 2\", and can be seen as a convenient way of specifying a temporal fragment.\\n\\n\\n    ## Note\\n    Akamai is purposing to add #s=X to the ISO standard.\\n        - (X) Value would be a start time to seek to at startup instead of starting at 0 or live edge\\n        - Allows for seeking back before the start time unlike a temporal clipping.\\n*/\\n//# sourceMappingURL=URIFragmentData.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/URIFragmentData.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var BufferLevel=/**\\n     * @description This Object holds reference to the current buffer level and the time it was recorded.\\n     */function BufferLevel(){_classCallCheck(this,BufferLevel);/**\\n         * Real-Time | Time of the measurement of the buffer level.\\n         * @public\\n         */this.t=null;/**\\n         * Level of the buffer in milliseconds. Indicates the playout duration for which\\n         * media data of all active media components is available starting from the\\n         * current playout time.\\n         * @public\\n         */this.level=null;};exports.default=BufferLevel;\\n//# sourceMappingURL=BufferLevel.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferLevel.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});var _MetricsConstants=__webpack_require__(/*! ../../constants/MetricsConstants */ \"../node_modules/dashjs/build/es5/src/streaming/constants/MetricsConstants.js\");var _MetricsConstants2=_interopRequireDefault(_MetricsConstants);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var BufferState=/**\\n     * @description This Object holds reference to the current buffer state of the video element.\\n     */function BufferState(){_classCallCheck(this,BufferState);/**\\n         * The Buffer Level Target determined by the BufferLevelRule.\\n         * @public\\n         */this.target=null;/**\\n         * Current buffer state. Will be MetricsConstants.BUFFER_EMPTY or MetricsConstants.BUFFER_LOADED.\\n         * @public\\n         */this.state=_MetricsConstants2.default.BUFFER_EMPTY;};exports.default=BufferState;\\n//# sourceMappingURL=BufferState.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/BufferState.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DVRInfo=/**\\n     * @description This Object holds reference to DVR availability window information.\\n     */function DVRInfo(){_classCallCheck(this,DVRInfo);/**\\n         * The current time of the video element when this was created.\\n         * @public\\n         */this.time=null;/**\\n         * The current Segment Availability Range as an object with start and end properties.\\n         * It\\'s delta defined by the timeShiftBufferDepth MPD attribute.\\n         * @public\\n         */this.range=null;/**\\n         * Reference to the internal ManifestInfo.js VO.\\n         * @public\\n         */this.manifestInfo=null;};exports.default=DVRInfo;\\n//# sourceMappingURL=DVRInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DVRInfo.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var DroppedFrames=/**\\n     * @description This Object holds reference to DroppedFrames count and the time it was recorded.\\n     */function DroppedFrames(){_classCallCheck(this,DroppedFrames);/**\\n         * Real-Time | Time of the measurement of the dropped frames.\\n         * @public\\n         */this.time=null;/**\\n         * Number of dropped frames\\n         * @public\\n         */this.droppedFrames=null;};exports.default=DroppedFrames;\\n//# sourceMappingURL=DroppedFrames.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/DroppedFrames.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc This Object holds reference to the HTTPRequest for manifest, fragment and xlink loading.\\n * Members which are not defined in ISO23009-1 Annex D should be prefixed by a _ so that they are ignored\\n * by Metrics Reporting code.\\n * @ignore\\n */var HTTPRequest=/**\\n     * @class\\n     */function HTTPRequest(){_classCallCheck(this,HTTPRequest);/**\\n         * Identifier of the TCP connection on which the HTTP request was sent.\\n         * @public\\n         */this.tcpid=null;/**\\n         * This is an optional parameter and should not be included in HTTP request/response transactions for progressive download.\\n         * The type of the request:\\n         * - MPD\\n         * - XLink expansion\\n         * - Initialization Fragment\\n         * - Index Fragment\\n         * - Media Fragment\\n         * - Bitstream Switching Fragment\\n         * - other\\n         * @public\\n         */this.type=null;/**\\n         * The original URL (before any redirects or failures)\\n         * @public\\n         */this.url=null;/**\\n         * The actual URL requested, if different from above\\n         * @public\\n         */this.actualurl=null;/**\\n         * The contents of the byte-range-spec part of the HTTP Range header.\\n         * @public\\n         */this.range=null;/**\\n         * Real-Time | The real time at which the request was sent.\\n         * @public\\n         */this.trequest=null;/**\\n         * Real-Time | The real time at which the first byte of the response was received.\\n         * @public\\n         */this.tresponse=null;/**\\n         * The HTTP response code.\\n         * @public\\n         */this.responsecode=null;/**\\n         * The duration of the throughput trace intervals (ms), for successful requests only.\\n         * @public\\n         */this.interval=null;/**\\n         * Throughput traces, for successful requests only.\\n         * @public\\n         */this.trace=[];/**\\n         * Type of stream (\\\"audio\\\" | \\\"video\\\" etc..)\\n         * @public\\n         */this._stream=null;/**\\n         * Real-Time | The real time at which the request finished.\\n         * @public\\n         */this._tfinish=null;/**\\n         * The duration of the media requests, if available, in seconds.\\n         * @public\\n         */this._mediaduration=null;/**\\n         * The media segment quality\\n         * @public\\n         */this._quality=null;/**\\n         * all the response headers from request.\\n         * @public\\n         */this._responseHeaders=null;/**\\n         * The selected service location for the request. string.\\n         * @public\\n         */this._serviceLocation=null;};/**\\n * @classdesc This Object holds reference to the progress of the HTTPRequest.\\n * @ignore\\n */var HTTPRequestTrace=/**\\n    * @class\\n    */function HTTPRequestTrace(){_classCallCheck(this,HTTPRequestTrace);/**\\n         * Real-Time | Measurement stream start.\\n         * @public\\n         */this.s=null;/**\\n         * Measurement stream duration (ms).\\n         * @public\\n         */this.d=null;/**\\n         * List of integers counting the bytes received in each trace interval within the measurement stream.\\n         * @public\\n         */this.b=[];};HTTPRequest.GET='GET';HTTPRequest.HEAD='HEAD';HTTPRequest.MPD_TYPE='MPD';HTTPRequest.XLINK_EXPANSION_TYPE='XLinkExpansion';HTTPRequest.INIT_SEGMENT_TYPE='InitializationSegment';HTTPRequest.INDEX_SEGMENT_TYPE='IndexSegment';HTTPRequest.MEDIA_SEGMENT_TYPE='MediaSegment';HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE='BitstreamSwitchingSegment';HTTPRequest.LICENSE='license';HTTPRequest.OTHER_TYPE='other';exports.HTTPRequest=HTTPRequest;exports.HTTPRequestTrace=HTTPRequestTrace;\\n//# sourceMappingURL=HTTPRequest.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/HTTPRequest.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc This Object holds reference to the manifest update information.\\n * @ignore\\n */var ManifestUpdate=/**\\n     * @class\\n     */function ManifestUpdate(){_classCallCheck(this,ManifestUpdate);/**\\n         * Media Type Video | Audio | FragmentedText\\n         * @public\\n         */this.mediaType=null;/**\\n         * MPD Type static | dynamic\\n         * @public\\n         */this.type=null;/**\\n         * When this manifest update was requested\\n         * @public\\n         */this.requestTime=null;/**\\n         * When this manifest update was received\\n         * @public\\n         */this.fetchTime=null;/**\\n         * Calculated Availability Start time of the stream.\\n         * @public\\n         */this.availabilityStartTime=null;/**\\n         * the seek point (liveEdge for dynamic, Stream[0].startTime for static)\\n         * @public\\n         */this.presentationStartTime=0;/**\\n         * The calculated difference between the server and client wall clock time\\n         * @public\\n         */this.clientTimeOffset=0;/**\\n         * Actual element.currentTime\\n         * @public\\n         */this.currentTime=null;/**\\n         * Actual element.ranges\\n         * @public\\n         */this.buffered=null;/**\\n         * Static is fixed value of zero. dynamic should be ((Now-@availabilityStartTime) - elementCurrentTime)\\n         * @public\\n         */this.latency=0;/**\\n         * Array holding list of StreamInfo VO Objects\\n         * @public\\n         */this.streamInfo=[];/**\\n         * Array holding list of RepresentationInfo VO Objects\\n         * @public\\n         */this.representationInfo=[];};/**\\n * @classdesc This Object holds reference to the current period\\'s stream information when the manifest was updated.\\n * @ignore\\n */var ManifestUpdateStreamInfo=/**\\n     * @class\\n     */function ManifestUpdateStreamInfo(){_classCallCheck(this,ManifestUpdateStreamInfo);/**\\n         * Stream@id\\n         * @public\\n         */this.id=null;/**\\n         * Period Index\\n         * @public\\n         */this.index=null;/**\\n         * Stream@start\\n         * @public\\n         */this.start=null;/**\\n         * Stream@duration\\n         * @public\\n         */this.duration=null;};/**\\n * @classdesc This Object holds reference to the current representation\\'s info when the manifest was updated.\\n * @ignore\\n */var ManifestUpdateRepresentationInfo=/**\\n     * @class\\n     */function ManifestUpdateRepresentationInfo(){_classCallCheck(this,ManifestUpdateRepresentationInfo);/**\\n         * Track@id\\n         * @public\\n         */this.id=null;/**\\n         * Representation Index\\n         * @public\\n         */this.index=null;/**\\n         * Media Type Video | Audio | FragmentedText\\n         * @public\\n         */this.mediaType=null;/**\\n         * Which representation\\n         * @public\\n         */this.streamIndex=null;/**\\n         * Holds reference to @presentationTimeOffset\\n         * @public\\n         */this.presentationTimeOffset=null;/**\\n         * Holds reference to @startNumber\\n         * @public\\n         */this.startNumber=null;/**\\n         * list|template|timeline\\n         * @public\\n         */this.fragmentInfoType=null;};exports.ManifestUpdate=ManifestUpdate;exports.ManifestUpdateStreamInfo=ManifestUpdateStreamInfo;exports.ManifestUpdateRepresentationInfo=ManifestUpdateRepresentationInfo;\\n//# sourceMappingURL=ManifestUpdate.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/ManifestUpdate.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"Object.defineProperty(exports,\\\"__esModule\\\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\\\"Cannot call a class as a function\\\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @classdesc a PlayList from ISO23009-1 Annex D, this Object holds reference to the playback session information\\n * @ignore\\n */var PlayList=/**\\n     * @class\\n     */function PlayList(){_classCallCheck(this,PlayList);/**\\n         * Timestamp of the user action that starts the playback stream...\\n         * @public\\n         */this.start=null;/**\\n         * Presentation time at which playout was requested by the user...\\n         * @public\\n         */this.mstart=null;/**\\n         * Type of user action which triggered playout\\n         * - New playout request (e.g. initial playout or seeking)\\n         * - Resume from pause\\n         * - Other user request (e.g. user-requested quality change)\\n         * - Start of a metrics collection stream (hence earlier entries in the play list not collected)\\n         * @public\\n         */this.starttype=null;/**\\n         * List of streams of continuous rendering of decoded samples.\\n         * @public\\n         */this.trace=[];};/* Public Static Constants */PlayList.INITIAL_PLAYOUT_START_REASON='initial_playout';PlayList.SEEK_START_REASON='seek';PlayList.RESUME_FROM_PAUSE_START_REASON='resume';PlayList.METRICS_COLLECTION_START_REASON='metrics_collection_start';/**\\n * @classdesc a PlayList.Trace from ISO23009-1 Annex D\\n * @ignore\\n */var PlayListTrace=/**\\n     * @class\\n     */function PlayListTrace(){_classCallCheck(this,PlayListTrace);/**\\n         * The value of the Representation@id of the Representation from which the samples were taken.\\n         * @type {string}\\n         * @public\\n         */this.representationid=null;/**\\n         * If not present, this metrics concerns the Representation as a whole.\\n         * If present, subreplevel indicates the greatest value of any\\n         * Subrepresentation@level being rendered.\\n         * @type {number}\\n         * @public\\n         */this.subreplevel=null;/**\\n         * The time at which the first sample was rendered\\n         * @type {number}\\n         * @public\\n         */this.start=null;/**\\n         * The presentation time of the first sample rendered.\\n         * @type {number}\\n         * @public\\n         */this.mstart=null;/**\\n         * The duration of the continuously presented samples (which is the same in real time and media time). \\\"Continuously presented\\\" means that the media clock continued to advance at the playout speed throughout the interval. NOTE: the spec does not call out the units, but all other durations etc are in ms, and we use ms too.\\n         * @type {number}\\n         * @public\\n         */this.duration=null;/**\\n         * The playback speed relative to normal playback speed (i.e.normal forward playback speed is 1.0).\\n         * @type {number}\\n         * @public\\n         */this.playbackspeed=null;/**\\n         * The reason why continuous presentation of this Representation was stopped.\\n         * representation switch\\n         * rebuffering\\n         * user request\\n         * end of Period\\n         * end of Stream\\n         * end of content\\n         * end of a metrics collection period\\n         *\\n         * @type {string}\\n         * @public\\n         */this.stopreason=null;};PlayListTrace.REPRESENTATION_SWITCH_STOP_REASON='representation_switch';PlayListTrace.REBUFFERING_REASON='rebuffering';PlayListTrace.USER_REQUEST_STOP_REASON='user_request';PlayListTrace.END_OF_PERIOD_STOP_REASON='end_of_period';PlayListTrace.END_OF_CONTENT_STOP_REASON='end_of_content';PlayListTrace.METRICS_COLLECTION_STOP_REASON='metrics_collection_end';PlayListTrace.FAILURE_STOP_REASON='failure';exports.PlayList=PlayList;exports.PlayListTrace=PlayListTrace;\\n//# sourceMappingURL=PlayList.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/PlayList.js?\")},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var RepresentationSwitch=/**\\n     * @description This Object holds reference to the info at quality switch between two representations.\\n     */function RepresentationSwitch(){_classCallCheck(this,RepresentationSwitch);/**\\n         * Time of the switch event.\\n         * @public\\n         */this.t=null;/**\\n         * The media presentation time of the earliest access unit\\n         * (out of all media content components) played out from\\n         * the Representation.\\n         *\\n         * @public\\n         */this.mt=null;/**\\n         * Value of Representation@id identifying the switch-to Representation.\\n         * @public\\n         */this.to=null;/**\\n         * If not present, this metrics concerns the Representation as a whole.\\n         * If present, lto indicates the value of SubRepresentation@level within\\n         * Representation identifying the switch-to level of the Representation.\\n         *\\n         * @public\\n         */this.lto=null;};exports.default=RepresentationSwitch;\\n//# sourceMappingURL=RepresentationSwitch.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RepresentationSwitch.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var RequestsQueue=/**\\n     * @description This Object holds reference to Fragment Model\\'s request queues\\n     */function RequestsQueue(){_classCallCheck(this,RequestsQueue);/**\\n         * Array of all of the requests that have begun to load\\n         * This request may not make it into the executed queue if it is abandon due to ABR rules for example.\\n         * @public\\n         */this.loadingRequests=[];/**\\n         * Array of the The requests that have completed\\n         * @public\\n         */this.executedRequests=[];};exports.default=RequestsQueue;\\n//# sourceMappingURL=RequestsQueue.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/RequestsQueue.js?')},\"../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js\":function(module,exports,__webpack_require__){\"use strict\";eval('Object.defineProperty(exports,\"__esModule\",{value:true});function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError(\"Cannot call a class as a function\");}}/**\\n * The copyright in this software is being made available under the BSD License,\\n * included below. This software may be subject to other third party and contributor\\n * rights, including patent rights, and no such rights are granted under this license.\\n *\\n * Copyright (c) 2013, Dash Industry Forum.\\n * All rights reserved.\\n *\\n * Redistribution and use in source and binary forms, with or without modification,\\n * are permitted provided that the following conditions are met:\\n *  * Redistributions of source code must retain the above copyright notice, this\\n *  list of conditions and the following disclaimer.\\n *  * Redistributions in binary form must reproduce the above copyright notice,\\n *  this list of conditions and the following disclaimer in the documentation and/or\\n *  other materials provided with the distribution.\\n *  * Neither the name of Dash Industry Forum nor the names of its\\n *  contributors may be used to endorse or promote products derived from this software\\n *  without specific prior written permission.\\n *\\n *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\\n *  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\\n *  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\\n *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\\n *  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\\n *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\n *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\n *  POSSIBILITY OF SUCH DAMAGE.\\n *//**\\n * @class\\n * @ignore\\n */var SchedulingInfo=/**\\n     * @description This Object holds reference to the index handling of the current fragment being loaded or executed.\\n     */function SchedulingInfo(){_classCallCheck(this,SchedulingInfo);/**\\n         * Type of stream Audio | Video | FragmentedText\\n         * @public\\n         */this.mediaType=null;/**\\n         * Time of the scheduling event.\\n         * @public\\n         */this.t=null;/**\\n         * Type of fragment (initialization | media)\\n         * @public\\n         */this.type=null;/**\\n         * Presentation start time of fragment\\n         * @public\\n         */this.startTime=null;/**\\n         * Availability start time of fragment\\n         * @public\\n         */this.availabilityStartTime=null;/**\\n         * Duration of fragment\\n         * @public\\n         */this.duration=null;/**\\n         * Bit Rate Quality of fragment\\n         * @public\\n         */this.quality=null;/**\\n         * Range of fragment\\n         * @public\\n         */this.range=null;/**\\n         * Current state of fragment\\n         * @public\\n         */this.state=null;};exports.default=SchedulingInfo;\\n//# sourceMappingURL=SchedulingInfo.js.map\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/dashjs/build/es5/src/streaming/vo/metrics/SchedulingInfo.js?')},\"../node_modules/events/events.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\nvar R = typeof Reflect === 'object' ? Reflect : null\\nvar ReflectApply = R && typeof R.apply === 'function'\\n  ? R.apply\\n  : function ReflectApply(target, receiver, args) {\\n    return Function.prototype.apply.call(target, receiver, args);\\n  }\\n\\nvar ReflectOwnKeys\\nif (R && typeof R.ownKeys === 'function') {\\n  ReflectOwnKeys = R.ownKeys\\n} else if (Object.getOwnPropertySymbols) {\\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\\n    return Object.getOwnPropertyNames(target)\\n      .concat(Object.getOwnPropertySymbols(target));\\n  };\\n} else {\\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\\n    return Object.getOwnPropertyNames(target);\\n  };\\n}\\n\\nfunction ProcessEmitWarning(warning) {\\n  if (console && console.warn) console.warn(warning);\\n}\\n\\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\\n  return value !== value;\\n}\\n\\nfunction EventEmitter() {\\n  EventEmitter.init.call(this);\\n}\\nmodule.exports = EventEmitter;\\n\\n// Backwards-compat with node 0.10.x\\nEventEmitter.EventEmitter = EventEmitter;\\n\\nEventEmitter.prototype._events = undefined;\\nEventEmitter.prototype._eventsCount = 0;\\nEventEmitter.prototype._maxListeners = undefined;\\n\\n// By default EventEmitters will print a warning if more than 10 listeners are\\n// added to it. This is a useful default which helps finding memory leaks.\\nvar defaultMaxListeners = 10;\\n\\nfunction checkListener(listener) {\\n  if (typeof listener !== 'function') {\\n    throw new TypeError('The \\\"listener\\\" argument must be of type Function. Received type ' + typeof listener);\\n  }\\n}\\n\\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\\n  enumerable: true,\\n  get: function() {\\n    return defaultMaxListeners;\\n  },\\n  set: function(arg) {\\n    if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\\n      throw new RangeError('The value of \\\"defaultMaxListeners\\\" is out of range. It must be a non-negative number. Received ' + arg + '.');\\n    }\\n    defaultMaxListeners = arg;\\n  }\\n});\\n\\nEventEmitter.init = function() {\\n\\n  if (this._events === undefined ||\\n      this._events === Object.getPrototypeOf(this)._events) {\\n    this._events = Object.create(null);\\n    this._eventsCount = 0;\\n  }\\n\\n  this._maxListeners = this._maxListeners || undefined;\\n};\\n\\n// Obviously not all Emitters should be limited to 10. This function allows\\n// that to be increased. Set to zero for unlimited.\\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\\n  if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\\n    throw new RangeError('The value of \\\"n\\\" is out of range. It must be a non-negative number. Received ' + n + '.');\\n  }\\n  this._maxListeners = n;\\n  return this;\\n};\\n\\nfunction _getMaxListeners(that) {\\n  if (that._maxListeners === undefined)\\n    return EventEmitter.defaultMaxListeners;\\n  return that._maxListeners;\\n}\\n\\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\\n  return _getMaxListeners(this);\\n};\\n\\nEventEmitter.prototype.emit = function emit(type) {\\n  var args = [];\\n  for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\\n  var doError = (type === 'error');\\n\\n  var events = this._events;\\n  if (events !== undefined)\\n    doError = (doError && events.error === undefined);\\n  else if (!doError)\\n    return false;\\n\\n  // If there is no 'error' event listener then throw.\\n  if (doError) {\\n    var er;\\n    if (args.length > 0)\\n      er = args[0];\\n    if (er instanceof Error) {\\n      // Note: The comments on the `throw` lines are intentional, they show\\n      // up in Node's output if this results in an unhandled exception.\\n      throw er; // Unhandled 'error' event\\n    }\\n    // At least give some kind of context to the user\\n    var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\\n    err.context = er;\\n    throw err; // Unhandled 'error' event\\n  }\\n\\n  var handler = events[type];\\n\\n  if (handler === undefined)\\n    return false;\\n\\n  if (typeof handler === 'function') {\\n    ReflectApply(handler, this, args);\\n  } else {\\n    var len = handler.length;\\n    var listeners = arrayClone(handler, len);\\n    for (var i = 0; i < len; ++i)\\n      ReflectApply(listeners[i], this, args);\\n  }\\n\\n  return true;\\n};\\n\\nfunction _addListener(target, type, listener, prepend) {\\n  var m;\\n  var events;\\n  var existing;\\n\\n  checkListener(listener);\\n\\n  events = target._events;\\n  if (events === undefined) {\\n    events = target._events = Object.create(null);\\n    target._eventsCount = 0;\\n  } else {\\n    // To avoid recursion in the case that type === \\\"newListener\\\"! Before\\n    // adding it to the listeners, first emit \\\"newListener\\\".\\n    if (events.newListener !== undefined) {\\n      target.emit('newListener', type,\\n                  listener.listener ? listener.listener : listener);\\n\\n      // Re-assign `events` because a newListener handler could have caused the\\n      // this._events to be assigned to a new object\\n      events = target._events;\\n    }\\n    existing = events[type];\\n  }\\n\\n  if (existing === undefined) {\\n    // Optimize the case of one listener. Don't need the extra array object.\\n    existing = events[type] = listener;\\n    ++target._eventsCount;\\n  } else {\\n    if (typeof existing === 'function') {\\n      // Adding the second element, need to change to array.\\n      existing = events[type] =\\n        prepend ? [listener, existing] : [existing, listener];\\n      // If we've already got an array, just append.\\n    } else if (prepend) {\\n      existing.unshift(listener);\\n    } else {\\n      existing.push(listener);\\n    }\\n\\n    // Check for listener leak\\n    m = _getMaxListeners(target);\\n    if (m > 0 && existing.length > m && !existing.warned) {\\n      existing.warned = true;\\n      // No error code for this since it is a Warning\\n      // eslint-disable-next-line no-restricted-syntax\\n      var w = new Error('Possible EventEmitter memory leak detected. ' +\\n                          existing.length + ' ' + String(type) + ' listeners ' +\\n                          'added. Use emitter.setMaxListeners() to ' +\\n                          'increase limit');\\n      w.name = 'MaxListenersExceededWarning';\\n      w.emitter = target;\\n      w.type = type;\\n      w.count = existing.length;\\n      ProcessEmitWarning(w);\\n    }\\n  }\\n\\n  return target;\\n}\\n\\nEventEmitter.prototype.addListener = function addListener(type, listener) {\\n  return _addListener(this, type, listener, false);\\n};\\n\\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\\n\\nEventEmitter.prototype.prependListener =\\n    function prependListener(type, listener) {\\n      return _addListener(this, type, listener, true);\\n    };\\n\\nfunction onceWrapper() {\\n  if (!this.fired) {\\n    this.target.removeListener(this.type, this.wrapFn);\\n    this.fired = true;\\n    if (arguments.length === 0)\\n      return this.listener.call(this.target);\\n    return this.listener.apply(this.target, arguments);\\n  }\\n}\\n\\nfunction _onceWrap(target, type, listener) {\\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\\n  var wrapped = onceWrapper.bind(state);\\n  wrapped.listener = listener;\\n  state.wrapFn = wrapped;\\n  return wrapped;\\n}\\n\\nEventEmitter.prototype.once = function once(type, listener) {\\n  checkListener(listener);\\n  this.on(type, _onceWrap(this, type, listener));\\n  return this;\\n};\\n\\nEventEmitter.prototype.prependOnceListener =\\n    function prependOnceListener(type, listener) {\\n      checkListener(listener);\\n      this.prependListener(type, _onceWrap(this, type, listener));\\n      return this;\\n    };\\n\\n// Emits a 'removeListener' event if and only if the listener was removed.\\nEventEmitter.prototype.removeListener =\\n    function removeListener(type, listener) {\\n      var list, events, position, i, originalListener;\\n\\n      checkListener(listener);\\n\\n      events = this._events;\\n      if (events === undefined)\\n        return this;\\n\\n      list = events[type];\\n      if (list === undefined)\\n        return this;\\n\\n      if (list === listener || list.listener === listener) {\\n        if (--this._eventsCount === 0)\\n          this._events = Object.create(null);\\n        else {\\n          delete events[type];\\n          if (events.removeListener)\\n            this.emit('removeListener', type, list.listener || listener);\\n        }\\n      } else if (typeof list !== 'function') {\\n        position = -1;\\n\\n        for (i = list.length - 1; i >= 0; i--) {\\n          if (list[i] === listener || list[i].listener === listener) {\\n            originalListener = list[i].listener;\\n            position = i;\\n            break;\\n          }\\n        }\\n\\n        if (position < 0)\\n          return this;\\n\\n        if (position === 0)\\n          list.shift();\\n        else {\\n          spliceOne(list, position);\\n        }\\n\\n        if (list.length === 1)\\n          events[type] = list[0];\\n\\n        if (events.removeListener !== undefined)\\n          this.emit('removeListener', type, originalListener || listener);\\n      }\\n\\n      return this;\\n    };\\n\\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\\n\\nEventEmitter.prototype.removeAllListeners =\\n    function removeAllListeners(type) {\\n      var listeners, events, i;\\n\\n      events = this._events;\\n      if (events === undefined)\\n        return this;\\n\\n      // not listening for removeListener, no need to emit\\n      if (events.removeListener === undefined) {\\n        if (arguments.length === 0) {\\n          this._events = Object.create(null);\\n          this._eventsCount = 0;\\n        } else if (events[type] !== undefined) {\\n          if (--this._eventsCount === 0)\\n            this._events = Object.create(null);\\n          else\\n            delete events[type];\\n        }\\n        return this;\\n      }\\n\\n      // emit removeListener for all listeners on all events\\n      if (arguments.length === 0) {\\n        var keys = Object.keys(events);\\n        var key;\\n        for (i = 0; i < keys.length; ++i) {\\n          key = keys[i];\\n          if (key === 'removeListener') continue;\\n          this.removeAllListeners(key);\\n        }\\n        this.removeAllListeners('removeListener');\\n        this._events = Object.create(null);\\n        this._eventsCount = 0;\\n        return this;\\n      }\\n\\n      listeners = events[type];\\n\\n      if (typeof listeners === 'function') {\\n        this.removeListener(type, listeners);\\n      } else if (listeners !== undefined) {\\n        // LIFO order\\n        for (i = listeners.length - 1; i >= 0; i--) {\\n          this.removeListener(type, listeners[i]);\\n        }\\n      }\\n\\n      return this;\\n    };\\n\\nfunction _listeners(target, type, unwrap) {\\n  var events = target._events;\\n\\n  if (events === undefined)\\n    return [];\\n\\n  var evlistener = events[type];\\n  if (evlistener === undefined)\\n    return [];\\n\\n  if (typeof evlistener === 'function')\\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\\n\\n  return unwrap ?\\n    unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\\n}\\n\\nEventEmitter.prototype.listeners = function listeners(type) {\\n  return _listeners(this, type, true);\\n};\\n\\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\\n  return _listeners(this, type, false);\\n};\\n\\nEventEmitter.listenerCount = function(emitter, type) {\\n  if (typeof emitter.listenerCount === 'function') {\\n    return emitter.listenerCount(type);\\n  } else {\\n    return listenerCount.call(emitter, type);\\n  }\\n};\\n\\nEventEmitter.prototype.listenerCount = listenerCount;\\nfunction listenerCount(type) {\\n  var events = this._events;\\n\\n  if (events !== undefined) {\\n    var evlistener = events[type];\\n\\n    if (typeof evlistener === 'function') {\\n      return 1;\\n    } else if (evlistener !== undefined) {\\n      return evlistener.length;\\n    }\\n  }\\n\\n  return 0;\\n}\\n\\nEventEmitter.prototype.eventNames = function eventNames() {\\n  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\\n};\\n\\nfunction arrayClone(arr, n) {\\n  var copy = new Array(n);\\n  for (var i = 0; i < n; ++i)\\n    copy[i] = arr[i];\\n  return copy;\\n}\\n\\nfunction spliceOne(list, index) {\\n  for (; index + 1 < list.length; index++)\\n    list[index] = list[index + 1];\\n  list.pop();\\n}\\n\\nfunction unwrapListeners(arr) {\\n  var ret = new Array(arr.length);\\n  for (var i = 0; i < ret.length; ++i) {\\n    ret[i] = arr[i].listener || arr[i];\\n  }\\n  return ret;\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/events/events.js?\")},\"../node_modules/fast-deep-equal/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nvar isArray = Array.isArray;\\nvar keyList = Object.keys;\\nvar hasProp = Object.prototype.hasOwnProperty;\\n\\nmodule.exports = function equal(a, b) {\\n  if (a === b) return true;\\n\\n  if (a && b && typeof a == 'object' && typeof b == 'object') {\\n    var arrA = isArray(a)\\n      , arrB = isArray(b)\\n      , i\\n      , length\\n      , key;\\n\\n    if (arrA && arrB) {\\n      length = a.length;\\n      if (length != b.length) return false;\\n      for (i = length; i-- !== 0;)\\n        if (!equal(a[i], b[i])) return false;\\n      return true;\\n    }\\n\\n    if (arrA != arrB) return false;\\n\\n    var dateA = a instanceof Date\\n      , dateB = b instanceof Date;\\n    if (dateA != dateB) return false;\\n    if (dateA && dateB) return a.getTime() == b.getTime();\\n\\n    var regexpA = a instanceof RegExp\\n      , regexpB = b instanceof RegExp;\\n    if (regexpA != regexpB) return false;\\n    if (regexpA && regexpB) return a.toString() == b.toString();\\n\\n    var keys = keyList(a);\\n    length = keys.length;\\n\\n    if (length !== keyList(b).length)\\n      return false;\\n\\n    for (i = length; i-- !== 0;)\\n      if (!hasProp.call(b, keys[i])) return false;\\n\\n    for (i = length; i-- !== 0;) {\\n      key = keys[i];\\n      if (!equal(a[key], b[key])) return false;\\n    }\\n\\n    return true;\\n  }\\n\\n  return a!==a && b!==b;\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/fast-deep-equal/index.js?\")},\"../node_modules/fetch-ponyfill/build/fetch-browser.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_RESULT__;(function (self) {\\n  'use strict';\\n\\n  function fetchPonyfill(options) {\\n    var Promise = options && options.Promise || self.Promise;\\n    var XMLHttpRequest = options && options.XMLHttpRequest || self.XMLHttpRequest;\\n    var global = self;\\n\\n    return (function () {\\n      var self = Object.create(global, {\\n        fetch: {\\n          value: undefined,\\n          writable: true\\n        }\\n      });\\n\\n      (function(self) {\\n        'use strict';\\n\\n        if (self.fetch) {\\n          return\\n        }\\n\\n        var support = {\\n          searchParams: 'URLSearchParams' in self,\\n          iterable: 'Symbol' in self && 'iterator' in Symbol,\\n          blob: 'FileReader' in self && 'Blob' in self && (function() {\\n            try {\\n              new Blob()\\n              return true\\n            } catch(e) {\\n              return false\\n            }\\n          })(),\\n          formData: 'FormData' in self,\\n          arrayBuffer: 'ArrayBuffer' in self\\n        }\\n\\n        if (support.arrayBuffer) {\\n          var viewClasses = [\\n            '[object Int8Array]',\\n            '[object Uint8Array]',\\n            '[object Uint8ClampedArray]',\\n            '[object Int16Array]',\\n            '[object Uint16Array]',\\n            '[object Int32Array]',\\n            '[object Uint32Array]',\\n            '[object Float32Array]',\\n            '[object Float64Array]'\\n          ]\\n\\n          var isDataView = function(obj) {\\n            return obj && DataView.prototype.isPrototypeOf(obj)\\n          }\\n\\n          var isArrayBufferView = ArrayBuffer.isView || function(obj) {\\n            return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\\n          }\\n        }\\n\\n        function normalizeName(name) {\\n          if (typeof name !== 'string') {\\n            name = String(name)\\n          }\\n          if (/[^a-z0-9\\\\-#$%&'*+.\\\\^_`|~]/i.test(name)) {\\n            throw new TypeError('Invalid character in header field name')\\n          }\\n          return name.toLowerCase()\\n        }\\n\\n        function normalizeValue(value) {\\n          if (typeof value !== 'string') {\\n            value = String(value)\\n          }\\n          return value\\n        }\\n\\n        // Build a destructive iterator for the value list\\n        function iteratorFor(items) {\\n          var iterator = {\\n            next: function() {\\n              var value = items.shift()\\n              return {done: value === undefined, value: value}\\n            }\\n          }\\n\\n          if (support.iterable) {\\n            iterator[Symbol.iterator] = function() {\\n              return iterator\\n            }\\n          }\\n\\n          return iterator\\n        }\\n\\n        function Headers(headers) {\\n          this.map = {}\\n\\n          if (headers instanceof Headers) {\\n            headers.forEach(function(value, name) {\\n              this.append(name, value)\\n            }, this)\\n          } else if (Array.isArray(headers)) {\\n            headers.forEach(function(header) {\\n              this.append(header[0], header[1])\\n            }, this)\\n          } else if (headers) {\\n            Object.getOwnPropertyNames(headers).forEach(function(name) {\\n              this.append(name, headers[name])\\n            }, this)\\n          }\\n        }\\n\\n        Headers.prototype.append = function(name, value) {\\n          name = normalizeName(name)\\n          value = normalizeValue(value)\\n          var oldValue = this.map[name]\\n          this.map[name] = oldValue ? oldValue+','+value : value\\n        }\\n\\n        Headers.prototype['delete'] = function(name) {\\n          delete this.map[normalizeName(name)]\\n        }\\n\\n        Headers.prototype.get = function(name) {\\n          name = normalizeName(name)\\n          return this.has(name) ? this.map[name] : null\\n        }\\n\\n        Headers.prototype.has = function(name) {\\n          return this.map.hasOwnProperty(normalizeName(name))\\n        }\\n\\n        Headers.prototype.set = function(name, value) {\\n          this.map[normalizeName(name)] = normalizeValue(value)\\n        }\\n\\n        Headers.prototype.forEach = function(callback, thisArg) {\\n          for (var name in this.map) {\\n            if (this.map.hasOwnProperty(name)) {\\n              callback.call(thisArg, this.map[name], name, this)\\n            }\\n          }\\n        }\\n\\n        Headers.prototype.keys = function() {\\n          var items = []\\n          this.forEach(function(value, name) { items.push(name) })\\n          return iteratorFor(items)\\n        }\\n\\n        Headers.prototype.values = function() {\\n          var items = []\\n          this.forEach(function(value) { items.push(value) })\\n          return iteratorFor(items)\\n        }\\n\\n        Headers.prototype.entries = function() {\\n          var items = []\\n          this.forEach(function(value, name) { items.push([name, value]) })\\n          return iteratorFor(items)\\n        }\\n\\n        if (support.iterable) {\\n          Headers.prototype[Symbol.iterator] = Headers.prototype.entries\\n        }\\n\\n        function consumed(body) {\\n          if (body.bodyUsed) {\\n            return Promise.reject(new TypeError('Already read'))\\n          }\\n          body.bodyUsed = true\\n        }\\n\\n        function fileReaderReady(reader) {\\n          return new Promise(function(resolve, reject) {\\n            reader.onload = function() {\\n              resolve(reader.result)\\n            }\\n            reader.onerror = function() {\\n              reject(reader.error)\\n            }\\n          })\\n        }\\n\\n        function readBlobAsArrayBuffer(blob) {\\n          var reader = new FileReader()\\n          var promise = fileReaderReady(reader)\\n          reader.readAsArrayBuffer(blob)\\n          return promise\\n        }\\n\\n        function readBlobAsText(blob) {\\n          var reader = new FileReader()\\n          var promise = fileReaderReady(reader)\\n          reader.readAsText(blob)\\n          return promise\\n        }\\n\\n        function readArrayBufferAsText(buf) {\\n          var view = new Uint8Array(buf)\\n          var chars = new Array(view.length)\\n\\n          for (var i = 0; i < view.length; i++) {\\n            chars[i] = String.fromCharCode(view[i])\\n          }\\n          return chars.join('')\\n        }\\n\\n        function bufferClone(buf) {\\n          if (buf.slice) {\\n            return buf.slice(0)\\n          } else {\\n            var view = new Uint8Array(buf.byteLength)\\n            view.set(new Uint8Array(buf))\\n            return view.buffer\\n          }\\n        }\\n\\n        function Body() {\\n          this.bodyUsed = false\\n\\n          this._initBody = function(body) {\\n            this._bodyInit = body\\n            if (!body) {\\n              this._bodyText = ''\\n            } else if (typeof body === 'string') {\\n              this._bodyText = body\\n            } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\\n              this._bodyBlob = body\\n            } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\\n              this._bodyFormData = body\\n            } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\\n              this._bodyText = body.toString()\\n            } else if (support.arrayBuffer && support.blob && isDataView(body)) {\\n              this._bodyArrayBuffer = bufferClone(body.buffer)\\n              // IE 10-11 can't handle a DataView body.\\n              this._bodyInit = new Blob([this._bodyArrayBuffer])\\n            } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\\n              this._bodyArrayBuffer = bufferClone(body)\\n            } else {\\n              throw new Error('unsupported BodyInit type')\\n            }\\n\\n            if (!this.headers.get('content-type')) {\\n              if (typeof body === 'string') {\\n                this.headers.set('content-type', 'text/plain;charset=UTF-8')\\n              } else if (this._bodyBlob && this._bodyBlob.type) {\\n                this.headers.set('content-type', this._bodyBlob.type)\\n              } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\\n                this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\\n              }\\n            }\\n          }\\n\\n          if (support.blob) {\\n            this.blob = function() {\\n              var rejected = consumed(this)\\n              if (rejected) {\\n                return rejected\\n              }\\n\\n              if (this._bodyBlob) {\\n                return Promise.resolve(this._bodyBlob)\\n              } else if (this._bodyArrayBuffer) {\\n                return Promise.resolve(new Blob([this._bodyArrayBuffer]))\\n              } else if (this._bodyFormData) {\\n                throw new Error('could not read FormData body as blob')\\n              } else {\\n                return Promise.resolve(new Blob([this._bodyText]))\\n              }\\n            }\\n\\n            this.arrayBuffer = function() {\\n              if (this._bodyArrayBuffer) {\\n                return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\\n              } else {\\n                return this.blob().then(readBlobAsArrayBuffer)\\n              }\\n            }\\n          }\\n\\n          this.text = function() {\\n            var rejected = consumed(this)\\n            if (rejected) {\\n              return rejected\\n            }\\n\\n            if (this._bodyBlob) {\\n              return readBlobAsText(this._bodyBlob)\\n            } else if (this._bodyArrayBuffer) {\\n              return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\\n            } else if (this._bodyFormData) {\\n              throw new Error('could not read FormData body as text')\\n            } else {\\n              return Promise.resolve(this._bodyText)\\n            }\\n          }\\n\\n          if (support.formData) {\\n            this.formData = function() {\\n              return this.text().then(decode)\\n            }\\n          }\\n\\n          this.json = function() {\\n            return this.text().then(JSON.parse)\\n          }\\n\\n          return this\\n        }\\n\\n        // HTTP methods whose capitalization should be normalized\\n        var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\\n\\n        function normalizeMethod(method) {\\n          var upcased = method.toUpperCase()\\n          return (methods.indexOf(upcased) > -1) ? upcased : method\\n        }\\n\\n        function Request(input, options) {\\n          options = options || {}\\n          var body = options.body\\n\\n          if (input instanceof Request) {\\n            if (input.bodyUsed) {\\n              throw new TypeError('Already read')\\n            }\\n            this.url = input.url\\n            this.credentials = input.credentials\\n            if (!options.headers) {\\n              this.headers = new Headers(input.headers)\\n            }\\n            this.method = input.method\\n            this.mode = input.mode\\n            if (!body && input._bodyInit != null) {\\n              body = input._bodyInit\\n              input.bodyUsed = true\\n            }\\n          } else {\\n            this.url = String(input)\\n          }\\n\\n          this.credentials = options.credentials || this.credentials || 'omit'\\n          if (options.headers || !this.headers) {\\n            this.headers = new Headers(options.headers)\\n          }\\n          this.method = normalizeMethod(options.method || this.method || 'GET')\\n          this.mode = options.mode || this.mode || null\\n          this.referrer = null\\n\\n          if ((this.method === 'GET' || this.method === 'HEAD') && body) {\\n            throw new TypeError('Body not allowed for GET or HEAD requests')\\n          }\\n          this._initBody(body)\\n        }\\n\\n        Request.prototype.clone = function() {\\n          return new Request(this, { body: this._bodyInit })\\n        }\\n\\n        function decode(body) {\\n          var form = new FormData()\\n          body.trim().split('&').forEach(function(bytes) {\\n            if (bytes) {\\n              var split = bytes.split('=')\\n              var name = split.shift().replace(/\\\\+/g, ' ')\\n              var value = split.join('=').replace(/\\\\+/g, ' ')\\n              form.append(decodeURIComponent(name), decodeURIComponent(value))\\n            }\\n          })\\n          return form\\n        }\\n\\n        function parseHeaders(rawHeaders) {\\n          var headers = new Headers()\\n          // Replace instances of \\\\r\\\\n and \\\\n followed by at least one space or horizontal tab with a space\\n          // https://tools.ietf.org/html/rfc7230#section-3.2\\n          var preProcessedHeaders = rawHeaders.replace(/\\\\r?\\\\n[\\\\t ]+/g, ' ')\\n          preProcessedHeaders.split(/\\\\r?\\\\n/).forEach(function(line) {\\n            var parts = line.split(':')\\n            var key = parts.shift().trim()\\n            if (key) {\\n              var value = parts.join(':').trim()\\n              headers.append(key, value)\\n            }\\n          })\\n          return headers\\n        }\\n\\n        Body.call(Request.prototype)\\n\\n        function Response(bodyInit, options) {\\n          if (!options) {\\n            options = {}\\n          }\\n\\n          this.type = 'default'\\n          this.status = options.status === undefined ? 200 : options.status\\n          this.ok = this.status >= 200 && this.status < 300\\n          this.statusText = 'statusText' in options ? options.statusText : 'OK'\\n          this.headers = new Headers(options.headers)\\n          this.url = options.url || ''\\n          this._initBody(bodyInit)\\n        }\\n\\n        Body.call(Response.prototype)\\n\\n        Response.prototype.clone = function() {\\n          return new Response(this._bodyInit, {\\n            status: this.status,\\n            statusText: this.statusText,\\n            headers: new Headers(this.headers),\\n            url: this.url\\n          })\\n        }\\n\\n        Response.error = function() {\\n          var response = new Response(null, {status: 0, statusText: ''})\\n          response.type = 'error'\\n          return response\\n        }\\n\\n        var redirectStatuses = [301, 302, 303, 307, 308]\\n\\n        Response.redirect = function(url, status) {\\n          if (redirectStatuses.indexOf(status) === -1) {\\n            throw new RangeError('Invalid status code')\\n          }\\n\\n          return new Response(null, {status: status, headers: {location: url}})\\n        }\\n\\n        self.Headers = Headers\\n        self.Request = Request\\n        self.Response = Response\\n\\n        self.fetch = function(input, init) {\\n          return new Promise(function(resolve, reject) {\\n            var request = new Request(input, init)\\n            var xhr = new XMLHttpRequest()\\n\\n            xhr.onload = function() {\\n              var options = {\\n                status: xhr.status,\\n                statusText: xhr.statusText,\\n                headers: parseHeaders(xhr.getAllResponseHeaders() || '')\\n              }\\n              options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\\n              var body = 'response' in xhr ? xhr.response : xhr.responseText\\n              resolve(new Response(body, options))\\n            }\\n\\n            xhr.onerror = function() {\\n              reject(new TypeError('Network request failed'))\\n            }\\n\\n            xhr.ontimeout = function() {\\n              reject(new TypeError('Network request failed'))\\n            }\\n\\n            xhr.open(request.method, request.url, true)\\n\\n            if (request.credentials === 'include') {\\n              xhr.withCredentials = true\\n            } else if (request.credentials === 'omit') {\\n              xhr.withCredentials = false\\n            }\\n\\n            if ('responseType' in xhr && support.blob) {\\n              xhr.responseType = 'blob'\\n            }\\n\\n            request.headers.forEach(function(value, name) {\\n              xhr.setRequestHeader(name, value)\\n            })\\n\\n            xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\\n          })\\n        }\\n        self.fetch.polyfill = true\\n      })(typeof self !== 'undefined' ? self : this);\\n\\n\\n      return {\\n        fetch: self.fetch,\\n        Headers: self.Headers,\\n        Request: self.Request,\\n        Response: self.Response\\n      };\\n    }());\\n  }\\n\\n  if (true) {\\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\\n      return fetchPonyfill;\\n    }).call(exports, __webpack_require__, exports, module),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n  } else {}\\n}(typeof self !== 'undefined' ? self : typeof global !== 'undefined' ? global : this));\\n\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/fetch-ponyfill/build/fetch-browser.js?\")},\"../node_modules/global/document.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global :\\n    typeof window !== 'undefined' ? window : {}\\nvar minDoc = __webpack_require__(/*! min-document */ 1);\\n\\nvar doccy;\\n\\nif (typeof document !== 'undefined') {\\n    doccy = document;\\n} else {\\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\\n\\n    if (!doccy) {\\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\\n    }\\n}\\n\\nmodule.exports = doccy;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/global/document.js?\")},\"../node_modules/global/window.js\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {var win;\\n\\nif (typeof window !== \"undefined\") {\\n    win = window;\\n} else if (typeof global !== \"undefined\") {\\n    win = global;\\n} else if (typeof self !== \"undefined\"){\\n    win = self;\\n} else {\\n    win = {};\\n}\\n\\nmodule.exports = win;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/global/window.js?')},\"../node_modules/ieee754/index.js\":function(module,exports){eval(\"exports.read = function (buffer, offset, isLE, mLen, nBytes) {\\n  var e, m\\n  var eLen = (nBytes * 8) - mLen - 1\\n  var eMax = (1 << eLen) - 1\\n  var eBias = eMax >> 1\\n  var nBits = -7\\n  var i = isLE ? (nBytes - 1) : 0\\n  var d = isLE ? -1 : 1\\n  var s = buffer[offset + i]\\n\\n  i += d\\n\\n  e = s & ((1 << (-nBits)) - 1)\\n  s >>= (-nBits)\\n  nBits += eLen\\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\\n\\n  m = e & ((1 << (-nBits)) - 1)\\n  e >>= (-nBits)\\n  nBits += mLen\\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\\n\\n  if (e === 0) {\\n    e = 1 - eBias\\n  } else if (e === eMax) {\\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\\n  } else {\\n    m = m + Math.pow(2, mLen)\\n    e = e - eBias\\n  }\\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\\n}\\n\\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\\n  var e, m, c\\n  var eLen = (nBytes * 8) - mLen - 1\\n  var eMax = (1 << eLen) - 1\\n  var eBias = eMax >> 1\\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\\n  var i = isLE ? 0 : (nBytes - 1)\\n  var d = isLE ? 1 : -1\\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\\n\\n  value = Math.abs(value)\\n\\n  if (isNaN(value) || value === Infinity) {\\n    m = isNaN(value) ? 1 : 0\\n    e = eMax\\n  } else {\\n    e = Math.floor(Math.log(value) / Math.LN2)\\n    if (value * (c = Math.pow(2, -e)) < 1) {\\n      e--\\n      c *= 2\\n    }\\n    if (e + eBias >= 1) {\\n      value += rt / c\\n    } else {\\n      value += rt * Math.pow(2, 1 - eBias)\\n    }\\n    if (value * c >= 2) {\\n      e++\\n      c /= 2\\n    }\\n\\n    if (e + eBias >= eMax) {\\n      m = 0\\n      e = eMax\\n    } else if (e + eBias >= 1) {\\n      m = ((value * c) - 1) * Math.pow(2, mLen)\\n      e = e + eBias\\n    } else {\\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\\n      e = 0\\n    }\\n  }\\n\\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\\n\\n  e = (e << mLen) | m\\n  eLen += mLen\\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\\n\\n  buffer[offset + i - d] |= s * 128\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/ieee754/index.js?\")},\"../node_modules/imsc/node_modules/sax/lib/sax.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(Buffer) {;(function (sax) { // wrapper for non-node envs\\n  sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\\n  sax.SAXParser = SAXParser\\n  sax.SAXStream = SAXStream\\n  sax.createStream = createStream\\n\\n  // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\\n  // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\\n  // since that's the earliest that a buffer overrun could occur.  This way, checks are\\n  // as rare as required, but as often as necessary to ensure never crossing this bound.\\n  // Furthermore, buffers are only tested at most once per write(), so passing a very\\n  // large string into write() might have undesirable effects, but this is manageable by\\n  // the caller, so it is assumed to be safe.  Thus, a call to write() may, in the extreme\\n  // edge case, result in creating at most one complete copy of the string passed in.\\n  // Set to Infinity to have unlimited buffers.\\n  sax.MAX_BUFFER_LENGTH = 64 * 1024\\n\\n  var buffers = [\\n    'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\\n    'procInstName', 'procInstBody', 'entity', 'attribName',\\n    'attribValue', 'cdata', 'script'\\n  ]\\n\\n  sax.EVENTS = [\\n    'text',\\n    'processinginstruction',\\n    'sgmldeclaration',\\n    'doctype',\\n    'comment',\\n    'opentagstart',\\n    'attribute',\\n    'opentag',\\n    'closetag',\\n    'opencdata',\\n    'cdata',\\n    'closecdata',\\n    'error',\\n    'end',\\n    'ready',\\n    'script',\\n    'opennamespace',\\n    'closenamespace'\\n  ]\\n\\n  function SAXParser (strict, opt) {\\n    if (!(this instanceof SAXParser)) {\\n      return new SAXParser(strict, opt)\\n    }\\n\\n    var parser = this\\n    clearBuffers(parser)\\n    parser.q = parser.c = ''\\n    parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\\n    parser.opt = opt || {}\\n    parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\\n    parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\\n    parser.tags = []\\n    parser.closed = parser.closedRoot = parser.sawRoot = false\\n    parser.tag = parser.error = null\\n    parser.strict = !!strict\\n    parser.noscript = !!(strict || parser.opt.noscript)\\n    parser.state = S.BEGIN\\n    parser.strictEntities = parser.opt.strictEntities\\n    parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\\n    parser.attribList = []\\n\\n    // namespaces form a prototype chain.\\n    // it always points at the current tag,\\n    // which protos to its parent tag.\\n    if (parser.opt.xmlns) {\\n      parser.ns = Object.create(rootNS)\\n    }\\n\\n    // mostly just for error reporting\\n    parser.trackPosition = parser.opt.position !== false\\n    if (parser.trackPosition) {\\n      parser.position = parser.line = parser.column = 0\\n    }\\n    emit(parser, 'onready')\\n  }\\n\\n  if (!Object.create) {\\n    Object.create = function (o) {\\n      function F () {}\\n      F.prototype = o\\n      var newf = new F()\\n      return newf\\n    }\\n  }\\n\\n  if (!Object.keys) {\\n    Object.keys = function (o) {\\n      var a = []\\n      for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\\n      return a\\n    }\\n  }\\n\\n  function checkBufferLength (parser) {\\n    var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\\n    var maxActual = 0\\n    for (var i = 0, l = buffers.length; i < l; i++) {\\n      var len = parser[buffers[i]].length\\n      if (len > maxAllowed) {\\n        // Text/cdata nodes can get big, and since they're buffered,\\n        // we can get here under normal conditions.\\n        // Avoid issues by emitting the text node now,\\n        // so at least it won't get any bigger.\\n        switch (buffers[i]) {\\n          case 'textNode':\\n            closeText(parser)\\n            break\\n\\n          case 'cdata':\\n            emitNode(parser, 'oncdata', parser.cdata)\\n            parser.cdata = ''\\n            break\\n\\n          case 'script':\\n            emitNode(parser, 'onscript', parser.script)\\n            parser.script = ''\\n            break\\n\\n          default:\\n            error(parser, 'Max buffer length exceeded: ' + buffers[i])\\n        }\\n      }\\n      maxActual = Math.max(maxActual, len)\\n    }\\n    // schedule the next check for the earliest possible buffer overrun.\\n    var m = sax.MAX_BUFFER_LENGTH - maxActual\\n    parser.bufferCheckPosition = m + parser.position\\n  }\\n\\n  function clearBuffers (parser) {\\n    for (var i = 0, l = buffers.length; i < l; i++) {\\n      parser[buffers[i]] = ''\\n    }\\n  }\\n\\n  function flushBuffers (parser) {\\n    closeText(parser)\\n    if (parser.cdata !== '') {\\n      emitNode(parser, 'oncdata', parser.cdata)\\n      parser.cdata = ''\\n    }\\n    if (parser.script !== '') {\\n      emitNode(parser, 'onscript', parser.script)\\n      parser.script = ''\\n    }\\n  }\\n\\n  SAXParser.prototype = {\\n    end: function () { end(this) },\\n    write: write,\\n    resume: function () { this.error = null; return this },\\n    close: function () { return this.write(null) },\\n    flush: function () { flushBuffers(this) }\\n  }\\n\\n  var Stream\\n  try {\\n    Stream = __webpack_require__(/*! stream */ \\\"../node_modules/stream-browserify/index.js\\\").Stream\\n  } catch (ex) {\\n    Stream = function () {}\\n  }\\n\\n  var streamWraps = sax.EVENTS.filter(function (ev) {\\n    return ev !== 'error' && ev !== 'end'\\n  })\\n\\n  function createStream (strict, opt) {\\n    return new SAXStream(strict, opt)\\n  }\\n\\n  function SAXStream (strict, opt) {\\n    if (!(this instanceof SAXStream)) {\\n      return new SAXStream(strict, opt)\\n    }\\n\\n    Stream.apply(this)\\n\\n    this._parser = new SAXParser(strict, opt)\\n    this.writable = true\\n    this.readable = true\\n\\n    var me = this\\n\\n    this._parser.onend = function () {\\n      me.emit('end')\\n    }\\n\\n    this._parser.onerror = function (er) {\\n      me.emit('error', er)\\n\\n      // if didn't throw, then means error was handled.\\n      // go ahead and clear error, so we can write again.\\n      me._parser.error = null\\n    }\\n\\n    this._decoder = null\\n\\n    streamWraps.forEach(function (ev) {\\n      Object.defineProperty(me, 'on' + ev, {\\n        get: function () {\\n          return me._parser['on' + ev]\\n        },\\n        set: function (h) {\\n          if (!h) {\\n            me.removeAllListeners(ev)\\n            me._parser['on' + ev] = h\\n            return h\\n          }\\n          me.on(ev, h)\\n        },\\n        enumerable: true,\\n        configurable: false\\n      })\\n    })\\n  }\\n\\n  SAXStream.prototype = Object.create(Stream.prototype, {\\n    constructor: {\\n      value: SAXStream\\n    }\\n  })\\n\\n  SAXStream.prototype.write = function (data) {\\n    if (typeof Buffer === 'function' &&\\n      typeof Buffer.isBuffer === 'function' &&\\n      Buffer.isBuffer(data)) {\\n      if (!this._decoder) {\\n        var SD = __webpack_require__(/*! string_decoder */ \\\"../node_modules/string_decoder/lib/string_decoder.js\\\").StringDecoder\\n        this._decoder = new SD('utf8')\\n      }\\n      data = this._decoder.write(data)\\n    }\\n\\n    this._parser.write(data.toString())\\n    this.emit('data', data)\\n    return true\\n  }\\n\\n  SAXStream.prototype.end = function (chunk) {\\n    if (chunk && chunk.length) {\\n      this.write(chunk)\\n    }\\n    this._parser.end()\\n    return true\\n  }\\n\\n  SAXStream.prototype.on = function (ev, handler) {\\n    var me = this\\n    if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\\n      me._parser['on' + ev] = function () {\\n        var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\\n        args.splice(0, 0, ev)\\n        me.emit.apply(me, args)\\n      }\\n    }\\n\\n    return Stream.prototype.on.call(me, ev, handler)\\n  }\\n\\n  // character classes and tokens\\n  var whitespace = '\\\\r\\\\n\\\\t '\\n\\n  // this really needs to be replaced with character classes.\\n  // XML allows all manner of ridiculous numbers and digits.\\n  var number = '0124356789'\\n  var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\\n\\n  // (Letter | \\\"_\\\" | \\\":\\\")\\n  var quote = '\\\\'\\\"'\\n  var attribEnd = whitespace + '>'\\n  var CDATA = '[CDATA['\\n  var DOCTYPE = 'DOCTYPE'\\n  var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\\n  var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\\n  var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\\n\\n  // turn all the string character sets into character class objects.\\n  whitespace = charClass(whitespace)\\n  number = charClass(number)\\n  letter = charClass(letter)\\n\\n  // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\\n  // This implementation works on strings, a single character at a time\\n  // as such, it cannot ever support astral-plane characters (10000-EFFFF)\\n  // without a significant breaking change to either this  parser, or the\\n  // JavaScript language.  Implementation of an emoji-capable xml parser\\n  // is left as an exercise for the reader.\\n  var nameStart = /[:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/\\n\\n  var nameBody = /[:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\\\\.\\\\d-]/\\n\\n  var entityStart = /[#:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]/\\n  var entityBody = /[#:_A-Za-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\\\\.\\\\d-]/\\n\\n  quote = charClass(quote)\\n  attribEnd = charClass(attribEnd)\\n\\n  function charClass (str) {\\n    return str.split('').reduce(function (s, c) {\\n      s[c] = true\\n      return s\\n    }, {})\\n  }\\n\\n  function isRegExp (c) {\\n    return Object.prototype.toString.call(c) === '[object RegExp]'\\n  }\\n\\n  function is (charclass, c) {\\n    return isRegExp(charclass) ? !!c.match(charclass) : charclass[c]\\n  }\\n\\n  function not (charclass, c) {\\n    return !is(charclass, c)\\n  }\\n\\n  var S = 0\\n  sax.STATE = {\\n    BEGIN: S++, // leading byte order mark or whitespace\\n    BEGIN_WHITESPACE: S++, // leading whitespace\\n    TEXT: S++, // general stuff\\n    TEXT_ENTITY: S++, // &amp and such.\\n    OPEN_WAKA: S++, // <\\n    SGML_DECL: S++, // <!BLARG\\n    SGML_DECL_QUOTED: S++, // <!BLARG foo \\\"bar\\n    DOCTYPE: S++, // <!DOCTYPE\\n    DOCTYPE_QUOTED: S++, // <!DOCTYPE \\\"//blah\\n    DOCTYPE_DTD: S++, // <!DOCTYPE \\\"//blah\\\" [ ...\\n    DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE \\\"//blah\\\" [ \\\"foo\\n    COMMENT_STARTING: S++, // <!-\\n    COMMENT: S++, // \\x3c!--\\n    COMMENT_ENDING: S++, // \\x3c!-- blah -\\n    COMMENT_ENDED: S++, // \\x3c!-- blah --\\n    CDATA: S++, // <![CDATA[ something\\n    CDATA_ENDING: S++, // ]\\n    CDATA_ENDING_2: S++, // ]]\\n    PROC_INST: S++, // <?hi\\n    PROC_INST_BODY: S++, // <?hi there\\n    PROC_INST_ENDING: S++, // <?hi \\\"there\\\" ?\\n    OPEN_TAG: S++, // <strong\\n    OPEN_TAG_SLASH: S++, // <strong /\\n    ATTRIB: S++, // <a\\n    ATTRIB_NAME: S++, // <a foo\\n    ATTRIB_NAME_SAW_WHITE: S++, // <a foo _\\n    ATTRIB_VALUE: S++, // <a foo=\\n    ATTRIB_VALUE_QUOTED: S++, // <a foo=\\\"bar\\n    ATTRIB_VALUE_CLOSED: S++, // <a foo=\\\"bar\\\"\\n    ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar\\n    ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar=\\\"&quot;\\\"\\n    ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot\\n    CLOSE_TAG: S++, // </a\\n    CLOSE_TAG_SAW_WHITE: S++, // </a   >\\n    SCRIPT: S++, // <script> ...\\n    SCRIPT_ENDING: S++ // <script> ... <\\n  }\\n\\n  sax.XML_ENTITIES = {\\n    'amp': '&',\\n    'gt': '>',\\n    'lt': '<',\\n    'quot': '\\\"',\\n    'apos': \\\"'\\\"\\n  }\\n\\n  sax.ENTITIES = {\\n    'amp': '&',\\n    'gt': '>',\\n    'lt': '<',\\n    'quot': '\\\"',\\n    'apos': \\\"'\\\",\\n    'AElig': 198,\\n    'Aacute': 193,\\n    'Acirc': 194,\\n    'Agrave': 192,\\n    'Aring': 197,\\n    'Atilde': 195,\\n    'Auml': 196,\\n    'Ccedil': 199,\\n    'ETH': 208,\\n    'Eacute': 201,\\n    'Ecirc': 202,\\n    'Egrave': 200,\\n    'Euml': 203,\\n    'Iacute': 205,\\n    'Icirc': 206,\\n    'Igrave': 204,\\n    'Iuml': 207,\\n    'Ntilde': 209,\\n    'Oacute': 211,\\n    'Ocirc': 212,\\n    'Ograve': 210,\\n    'Oslash': 216,\\n    'Otilde': 213,\\n    'Ouml': 214,\\n    'THORN': 222,\\n    'Uacute': 218,\\n    'Ucirc': 219,\\n    'Ugrave': 217,\\n    'Uuml': 220,\\n    'Yacute': 221,\\n    'aacute': 225,\\n    'acirc': 226,\\n    'aelig': 230,\\n    'agrave': 224,\\n    'aring': 229,\\n    'atilde': 227,\\n    'auml': 228,\\n    'ccedil': 231,\\n    'eacute': 233,\\n    'ecirc': 234,\\n    'egrave': 232,\\n    'eth': 240,\\n    'euml': 235,\\n    'iacute': 237,\\n    'icirc': 238,\\n    'igrave': 236,\\n    'iuml': 239,\\n    'ntilde': 241,\\n    'oacute': 243,\\n    'ocirc': 244,\\n    'ograve': 242,\\n    'oslash': 248,\\n    'otilde': 245,\\n    'ouml': 246,\\n    'szlig': 223,\\n    'thorn': 254,\\n    'uacute': 250,\\n    'ucirc': 251,\\n    'ugrave': 249,\\n    'uuml': 252,\\n    'yacute': 253,\\n    'yuml': 255,\\n    'copy': 169,\\n    'reg': 174,\\n    'nbsp': 160,\\n    'iexcl': 161,\\n    'cent': 162,\\n    'pound': 163,\\n    'curren': 164,\\n    'yen': 165,\\n    'brvbar': 166,\\n    'sect': 167,\\n    'uml': 168,\\n    'ordf': 170,\\n    'laquo': 171,\\n    'not': 172,\\n    'shy': 173,\\n    'macr': 175,\\n    'deg': 176,\\n    'plusmn': 177,\\n    'sup1': 185,\\n    'sup2': 178,\\n    'sup3': 179,\\n    'acute': 180,\\n    'micro': 181,\\n    'para': 182,\\n    'middot': 183,\\n    'cedil': 184,\\n    'ordm': 186,\\n    'raquo': 187,\\n    'frac14': 188,\\n    'frac12': 189,\\n    'frac34': 190,\\n    'iquest': 191,\\n    'times': 215,\\n    'divide': 247,\\n    'OElig': 338,\\n    'oelig': 339,\\n    'Scaron': 352,\\n    'scaron': 353,\\n    'Yuml': 376,\\n    'fnof': 402,\\n    'circ': 710,\\n    'tilde': 732,\\n    'Alpha': 913,\\n    'Beta': 914,\\n    'Gamma': 915,\\n    'Delta': 916,\\n    'Epsilon': 917,\\n    'Zeta': 918,\\n    'Eta': 919,\\n    'Theta': 920,\\n    'Iota': 921,\\n    'Kappa': 922,\\n    'Lambda': 923,\\n    'Mu': 924,\\n    'Nu': 925,\\n    'Xi': 926,\\n    'Omicron': 927,\\n    'Pi': 928,\\n    'Rho': 929,\\n    'Sigma': 931,\\n    'Tau': 932,\\n    'Upsilon': 933,\\n    'Phi': 934,\\n    'Chi': 935,\\n    'Psi': 936,\\n    'Omega': 937,\\n    'alpha': 945,\\n    'beta': 946,\\n    'gamma': 947,\\n    'delta': 948,\\n    'epsilon': 949,\\n    'zeta': 950,\\n    'eta': 951,\\n    'theta': 952,\\n    'iota': 953,\\n    'kappa': 954,\\n    'lambda': 955,\\n    'mu': 956,\\n    'nu': 957,\\n    'xi': 958,\\n    'omicron': 959,\\n    'pi': 960,\\n    'rho': 961,\\n    'sigmaf': 962,\\n    'sigma': 963,\\n    'tau': 964,\\n    'upsilon': 965,\\n    'phi': 966,\\n    'chi': 967,\\n    'psi': 968,\\n    'omega': 969,\\n    'thetasym': 977,\\n    'upsih': 978,\\n    'piv': 982,\\n    'ensp': 8194,\\n    'emsp': 8195,\\n    'thinsp': 8201,\\n    'zwnj': 8204,\\n    'zwj': 8205,\\n    'lrm': 8206,\\n    'rlm': 8207,\\n    'ndash': 8211,\\n    'mdash': 8212,\\n    'lsquo': 8216,\\n    'rsquo': 8217,\\n    'sbquo': 8218,\\n    'ldquo': 8220,\\n    'rdquo': 8221,\\n    'bdquo': 8222,\\n    'dagger': 8224,\\n    'Dagger': 8225,\\n    'bull': 8226,\\n    'hellip': 8230,\\n    'permil': 8240,\\n    'prime': 8242,\\n    'Prime': 8243,\\n    'lsaquo': 8249,\\n    'rsaquo': 8250,\\n    'oline': 8254,\\n    'frasl': 8260,\\n    'euro': 8364,\\n    'image': 8465,\\n    'weierp': 8472,\\n    'real': 8476,\\n    'trade': 8482,\\n    'alefsym': 8501,\\n    'larr': 8592,\\n    'uarr': 8593,\\n    'rarr': 8594,\\n    'darr': 8595,\\n    'harr': 8596,\\n    'crarr': 8629,\\n    'lArr': 8656,\\n    'uArr': 8657,\\n    'rArr': 8658,\\n    'dArr': 8659,\\n    'hArr': 8660,\\n    'forall': 8704,\\n    'part': 8706,\\n    'exist': 8707,\\n    'empty': 8709,\\n    'nabla': 8711,\\n    'isin': 8712,\\n    'notin': 8713,\\n    'ni': 8715,\\n    'prod': 8719,\\n    'sum': 8721,\\n    'minus': 8722,\\n    'lowast': 8727,\\n    'radic': 8730,\\n    'prop': 8733,\\n    'infin': 8734,\\n    'ang': 8736,\\n    'and': 8743,\\n    'or': 8744,\\n    'cap': 8745,\\n    'cup': 8746,\\n    'int': 8747,\\n    'there4': 8756,\\n    'sim': 8764,\\n    'cong': 8773,\\n    'asymp': 8776,\\n    'ne': 8800,\\n    'equiv': 8801,\\n    'le': 8804,\\n    'ge': 8805,\\n    'sub': 8834,\\n    'sup': 8835,\\n    'nsub': 8836,\\n    'sube': 8838,\\n    'supe': 8839,\\n    'oplus': 8853,\\n    'otimes': 8855,\\n    'perp': 8869,\\n    'sdot': 8901,\\n    'lceil': 8968,\\n    'rceil': 8969,\\n    'lfloor': 8970,\\n    'rfloor': 8971,\\n    'lang': 9001,\\n    'rang': 9002,\\n    'loz': 9674,\\n    'spades': 9824,\\n    'clubs': 9827,\\n    'hearts': 9829,\\n    'diams': 9830\\n  }\\n\\n  Object.keys(sax.ENTITIES).forEach(function (key) {\\n    var e = sax.ENTITIES[key]\\n    var s = typeof e === 'number' ? String.fromCharCode(e) : e\\n    sax.ENTITIES[key] = s\\n  })\\n\\n  for (var s in sax.STATE) {\\n    sax.STATE[sax.STATE[s]] = s\\n  }\\n\\n  // shorthand\\n  S = sax.STATE\\n\\n  function emit (parser, event, data) {\\n    parser[event] && parser[event](data)\\n  }\\n\\n  function emitNode (parser, nodeType, data) {\\n    if (parser.textNode) closeText(parser)\\n    emit(parser, nodeType, data)\\n  }\\n\\n  function closeText (parser) {\\n    parser.textNode = textopts(parser.opt, parser.textNode)\\n    if (parser.textNode) emit(parser, 'ontext', parser.textNode)\\n    parser.textNode = ''\\n  }\\n\\n  function textopts (opt, text) {\\n    if (opt.trim) text = text.trim()\\n    if (opt.normalize) text = text.replace(/\\\\s+/g, ' ')\\n    return text\\n  }\\n\\n  function error (parser, er) {\\n    closeText(parser)\\n    if (parser.trackPosition) {\\n      er += '\\\\nLine: ' + parser.line +\\n        '\\\\nColumn: ' + parser.column +\\n        '\\\\nChar: ' + parser.c\\n    }\\n    er = new Error(er)\\n    parser.error = er\\n    emit(parser, 'onerror', er)\\n    return parser\\n  }\\n\\n  function end (parser) {\\n    if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')\\n    if ((parser.state !== S.BEGIN) &&\\n      (parser.state !== S.BEGIN_WHITESPACE) &&\\n      (parser.state !== S.TEXT)) {\\n      error(parser, 'Unexpected end')\\n    }\\n    closeText(parser)\\n    parser.c = ''\\n    parser.closed = true\\n    emit(parser, 'onend')\\n    SAXParser.call(parser, parser.strict, parser.opt)\\n    return parser\\n  }\\n\\n  function strictFail (parser, message) {\\n    if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {\\n      throw new Error('bad call to strictFail')\\n    }\\n    if (parser.strict) {\\n      error(parser, message)\\n    }\\n  }\\n\\n  function newTag (parser) {\\n    if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()\\n    var parent = parser.tags[parser.tags.length - 1] || parser\\n    var tag = parser.tag = { name: parser.tagName, attributes: {} }\\n\\n    // will be overridden if tag contails an xmlns=\\\"foo\\\" or xmlns:foo=\\\"bar\\\"\\n    if (parser.opt.xmlns) {\\n      tag.ns = parent.ns\\n    }\\n    parser.attribList.length = 0\\n    emitNode(parser, 'onopentagstart', tag)\\n  }\\n\\n  function qname (name, attribute) {\\n    var i = name.indexOf(':')\\n    var qualName = i < 0 ? [ '', name ] : name.split(':')\\n    var prefix = qualName[0]\\n    var local = qualName[1]\\n\\n    // <x \\\"xmlns\\\"=\\\"http://foo\\\">\\n    if (attribute && name === 'xmlns') {\\n      prefix = 'xmlns'\\n      local = ''\\n    }\\n\\n    return { prefix: prefix, local: local }\\n  }\\n\\n  function attrib (parser) {\\n    if (!parser.strict) {\\n      parser.attribName = parser.attribName[parser.looseCase]()\\n    }\\n\\n    if (parser.attribList.indexOf(parser.attribName) !== -1 ||\\n      parser.tag.attributes.hasOwnProperty(parser.attribName)) {\\n      parser.attribName = parser.attribValue = ''\\n      return\\n    }\\n\\n    if (parser.opt.xmlns) {\\n      var qn = qname(parser.attribName, true)\\n      var prefix = qn.prefix\\n      var local = qn.local\\n\\n      if (prefix === 'xmlns') {\\n        // namespace binding attribute. push the binding into scope\\n        if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {\\n          strictFail(parser,\\n            'xml: prefix must be bound to ' + XML_NAMESPACE + '\\\\n' +\\n            'Actual: ' + parser.attribValue)\\n        } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {\\n          strictFail(parser,\\n            'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\\\\n' +\\n            'Actual: ' + parser.attribValue)\\n        } else {\\n          var tag = parser.tag\\n          var parent = parser.tags[parser.tags.length - 1] || parser\\n          if (tag.ns === parent.ns) {\\n            tag.ns = Object.create(parent.ns)\\n          }\\n          tag.ns[local] = parser.attribValue\\n        }\\n      }\\n\\n      // defer onattribute events until all attributes have been seen\\n      // so any new bindings can take effect. preserve attribute order\\n      // so deferred events can be emitted in document order\\n      parser.attribList.push([parser.attribName, parser.attribValue])\\n    } else {\\n      // in non-xmlns mode, we can emit the event right away\\n      parser.tag.attributes[parser.attribName] = parser.attribValue\\n      emitNode(parser, 'onattribute', {\\n        name: parser.attribName,\\n        value: parser.attribValue\\n      })\\n    }\\n\\n    parser.attribName = parser.attribValue = ''\\n  }\\n\\n  function openTag (parser, selfClosing) {\\n    if (parser.opt.xmlns) {\\n      // emit namespace binding events\\n      var tag = parser.tag\\n\\n      // add namespace info to tag\\n      var qn = qname(parser.tagName)\\n      tag.prefix = qn.prefix\\n      tag.local = qn.local\\n      tag.uri = tag.ns[qn.prefix] || ''\\n\\n      if (tag.prefix && !tag.uri) {\\n        strictFail(parser, 'Unbound namespace prefix: ' +\\n          JSON.stringify(parser.tagName))\\n        tag.uri = qn.prefix\\n      }\\n\\n      var parent = parser.tags[parser.tags.length - 1] || parser\\n      if (tag.ns && parent.ns !== tag.ns) {\\n        Object.keys(tag.ns).forEach(function (p) {\\n          emitNode(parser, 'onopennamespace', {\\n            prefix: p,\\n            uri: tag.ns[p]\\n          })\\n        })\\n      }\\n\\n      // handle deferred onattribute events\\n      // Note: do not apply default ns to attributes:\\n      //   http://www.w3.org/TR/REC-xml-names/#defaulting\\n      for (var i = 0, l = parser.attribList.length; i < l; i++) {\\n        var nv = parser.attribList[i]\\n        var name = nv[0]\\n        var value = nv[1]\\n        var qualName = qname(name, true)\\n        var prefix = qualName.prefix\\n        var local = qualName.local\\n        var uri = prefix === '' ? '' : (tag.ns[prefix] || '')\\n        var a = {\\n          name: name,\\n          value: value,\\n          prefix: prefix,\\n          local: local,\\n          uri: uri\\n        }\\n\\n        // if there's any attributes with an undefined namespace,\\n        // then fail on them now.\\n        if (prefix && prefix !== 'xmlns' && !uri) {\\n          strictFail(parser, 'Unbound namespace prefix: ' +\\n            JSON.stringify(prefix))\\n          a.uri = prefix\\n        }\\n        parser.tag.attributes[name] = a\\n        emitNode(parser, 'onattribute', a)\\n      }\\n      parser.attribList.length = 0\\n    }\\n\\n    parser.tag.isSelfClosing = !!selfClosing\\n\\n    // process the tag\\n    parser.sawRoot = true\\n    parser.tags.push(parser.tag)\\n    emitNode(parser, 'onopentag', parser.tag)\\n    if (!selfClosing) {\\n      // special case for <script> in non-strict mode.\\n      if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {\\n        parser.state = S.SCRIPT\\n      } else {\\n        parser.state = S.TEXT\\n      }\\n      parser.tag = null\\n      parser.tagName = ''\\n    }\\n    parser.attribName = parser.attribValue = ''\\n    parser.attribList.length = 0\\n  }\\n\\n  function closeTag (parser) {\\n    if (!parser.tagName) {\\n      strictFail(parser, 'Weird empty close tag.')\\n      parser.textNode += '</>'\\n      parser.state = S.TEXT\\n      return\\n    }\\n\\n    if (parser.script) {\\n      if (parser.tagName !== 'script') {\\n        parser.script += '</' + parser.tagName + '>'\\n        parser.tagName = ''\\n        parser.state = S.SCRIPT\\n        return\\n      }\\n      emitNode(parser, 'onscript', parser.script)\\n      parser.script = ''\\n    }\\n\\n    // first make sure that the closing tag actually exists.\\n    // <a><b></c></b></a> will close everything, otherwise.\\n    var t = parser.tags.length\\n    var tagName = parser.tagName\\n    if (!parser.strict) {\\n      tagName = tagName[parser.looseCase]()\\n    }\\n    var closeTo = tagName\\n    while (t--) {\\n      var close = parser.tags[t]\\n      if (close.name !== closeTo) {\\n        // fail the first time in strict mode\\n        strictFail(parser, 'Unexpected close tag')\\n      } else {\\n        break\\n      }\\n    }\\n\\n    // didn't find it.  we already failed for strict, so just abort.\\n    if (t < 0) {\\n      strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)\\n      parser.textNode += '</' + parser.tagName + '>'\\n      parser.state = S.TEXT\\n      return\\n    }\\n    parser.tagName = tagName\\n    var s = parser.tags.length\\n    while (s-- > t) {\\n      var tag = parser.tag = parser.tags.pop()\\n      parser.tagName = parser.tag.name\\n      emitNode(parser, 'onclosetag', parser.tagName)\\n\\n      var x = {}\\n      for (var i in tag.ns) {\\n        x[i] = tag.ns[i]\\n      }\\n\\n      var parent = parser.tags[parser.tags.length - 1] || parser\\n      if (parser.opt.xmlns && tag.ns !== parent.ns) {\\n        // remove namespace bindings introduced by tag\\n        Object.keys(tag.ns).forEach(function (p) {\\n          var n = tag.ns[p]\\n          emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })\\n        })\\n      }\\n    }\\n    if (t === 0) parser.closedRoot = true\\n    parser.tagName = parser.attribValue = parser.attribName = ''\\n    parser.attribList.length = 0\\n    parser.state = S.TEXT\\n  }\\n\\n  function parseEntity (parser) {\\n    var entity = parser.entity\\n    var entityLC = entity.toLowerCase()\\n    var num\\n    var numStr = ''\\n\\n    if (parser.ENTITIES[entity]) {\\n      return parser.ENTITIES[entity]\\n    }\\n    if (parser.ENTITIES[entityLC]) {\\n      return parser.ENTITIES[entityLC]\\n    }\\n    entity = entityLC\\n    if (entity.charAt(0) === '#') {\\n      if (entity.charAt(1) === 'x') {\\n        entity = entity.slice(2)\\n        num = parseInt(entity, 16)\\n        numStr = num.toString(16)\\n      } else {\\n        entity = entity.slice(1)\\n        num = parseInt(entity, 10)\\n        numStr = num.toString(10)\\n      }\\n    }\\n    entity = entity.replace(/^0+/, '')\\n    if (numStr.toLowerCase() !== entity) {\\n      strictFail(parser, 'Invalid character entity')\\n      return '&' + parser.entity + ';'\\n    }\\n\\n    return String.fromCodePoint(num)\\n  }\\n\\n  function beginWhiteSpace (parser, c) {\\n    if (c === '<') {\\n      parser.state = S.OPEN_WAKA\\n      parser.startTagPosition = parser.position\\n    } else if (not(whitespace, c)) {\\n      // have to process this as a text node.\\n      // weird, but happens.\\n      strictFail(parser, 'Non-whitespace before first tag.')\\n      parser.textNode = c\\n      parser.state = S.TEXT\\n    }\\n  }\\n\\n  function charAt (chunk, i) {\\n    var result = ''\\n    if (i < chunk.length) {\\n      result = chunk.charAt(i)\\n    }\\n    return result\\n  }\\n\\n  function write (chunk) {\\n    var parser = this\\n    if (this.error) {\\n      throw this.error\\n    }\\n    if (parser.closed) {\\n      return error(parser,\\n        'Cannot write after close. Assign an onready handler.')\\n    }\\n    if (chunk === null) {\\n      return end(parser)\\n    }\\n    if (typeof chunk === 'object') {\\n      chunk = chunk.toString()\\n    }\\n    var i = 0\\n    var c = ''\\n    while (true) {\\n      c = charAt(chunk, i++)\\n      parser.c = c\\n      if (!c) {\\n        break\\n      }\\n      if (parser.trackPosition) {\\n        parser.position++\\n        if (c === '\\\\n') {\\n          parser.line++\\n          parser.column = 0\\n        } else {\\n          parser.column++\\n        }\\n      }\\n      switch (parser.state) {\\n        case S.BEGIN:\\n          parser.state = S.BEGIN_WHITESPACE\\n          if (c === '\\\\uFEFF') {\\n            continue\\n          }\\n          beginWhiteSpace(parser, c)\\n          continue\\n\\n        case S.BEGIN_WHITESPACE:\\n          beginWhiteSpace(parser, c)\\n          continue\\n\\n        case S.TEXT:\\n          if (parser.sawRoot && !parser.closedRoot) {\\n            var starti = i - 1\\n            while (c && c !== '<' && c !== '&') {\\n              c = charAt(chunk, i++)\\n              if (c && parser.trackPosition) {\\n                parser.position++\\n                if (c === '\\\\n') {\\n                  parser.line++\\n                  parser.column = 0\\n                } else {\\n                  parser.column++\\n                }\\n              }\\n            }\\n            parser.textNode += chunk.substring(starti, i - 1)\\n          }\\n          if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {\\n            parser.state = S.OPEN_WAKA\\n            parser.startTagPosition = parser.position\\n          } else {\\n            if (not(whitespace, c) && (!parser.sawRoot || parser.closedRoot)) {\\n              strictFail(parser, 'Text data outside of root node.')\\n            }\\n            if (c === '&') {\\n              parser.state = S.TEXT_ENTITY\\n            } else {\\n              parser.textNode += c\\n            }\\n          }\\n          continue\\n\\n        case S.SCRIPT:\\n          // only non-strict\\n          if (c === '<') {\\n            parser.state = S.SCRIPT_ENDING\\n          } else {\\n            parser.script += c\\n          }\\n          continue\\n\\n        case S.SCRIPT_ENDING:\\n          if (c === '/') {\\n            parser.state = S.CLOSE_TAG\\n          } else {\\n            parser.script += '<' + c\\n            parser.state = S.SCRIPT\\n          }\\n          continue\\n\\n        case S.OPEN_WAKA:\\n          // either a /, ?, !, or text is coming next.\\n          if (c === '!') {\\n            parser.state = S.SGML_DECL\\n            parser.sgmlDecl = ''\\n          } else if (is(whitespace, c)) {\\n            // wait for it...\\n          } else if (is(nameStart, c)) {\\n            parser.state = S.OPEN_TAG\\n            parser.tagName = c\\n          } else if (c === '/') {\\n            parser.state = S.CLOSE_TAG\\n            parser.tagName = ''\\n          } else if (c === '?') {\\n            parser.state = S.PROC_INST\\n            parser.procInstName = parser.procInstBody = ''\\n          } else {\\n            strictFail(parser, 'Unencoded <')\\n            // if there was some whitespace, then add that in.\\n            if (parser.startTagPosition + 1 < parser.position) {\\n              var pad = parser.position - parser.startTagPosition\\n              c = new Array(pad).join(' ') + c\\n            }\\n            parser.textNode += '<' + c\\n            parser.state = S.TEXT\\n          }\\n          continue\\n\\n        case S.SGML_DECL:\\n          if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {\\n            emitNode(parser, 'onopencdata')\\n            parser.state = S.CDATA\\n            parser.sgmlDecl = ''\\n            parser.cdata = ''\\n          } else if (parser.sgmlDecl + c === '--') {\\n            parser.state = S.COMMENT\\n            parser.comment = ''\\n            parser.sgmlDecl = ''\\n          } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {\\n            parser.state = S.DOCTYPE\\n            if (parser.doctype || parser.sawRoot) {\\n              strictFail(parser,\\n                'Inappropriately located doctype declaration')\\n            }\\n            parser.doctype = ''\\n            parser.sgmlDecl = ''\\n          } else if (c === '>') {\\n            emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)\\n            parser.sgmlDecl = ''\\n            parser.state = S.TEXT\\n          } else if (is(quote, c)) {\\n            parser.state = S.SGML_DECL_QUOTED\\n            parser.sgmlDecl += c\\n          } else {\\n            parser.sgmlDecl += c\\n          }\\n          continue\\n\\n        case S.SGML_DECL_QUOTED:\\n          if (c === parser.q) {\\n            parser.state = S.SGML_DECL\\n            parser.q = ''\\n          }\\n          parser.sgmlDecl += c\\n          continue\\n\\n        case S.DOCTYPE:\\n          if (c === '>') {\\n            parser.state = S.TEXT\\n            emitNode(parser, 'ondoctype', parser.doctype)\\n            parser.doctype = true // just remember that we saw it.\\n          } else {\\n            parser.doctype += c\\n            if (c === '[') {\\n              parser.state = S.DOCTYPE_DTD\\n            } else if (is(quote, c)) {\\n              parser.state = S.DOCTYPE_QUOTED\\n              parser.q = c\\n            }\\n          }\\n          continue\\n\\n        case S.DOCTYPE_QUOTED:\\n          parser.doctype += c\\n          if (c === parser.q) {\\n            parser.q = ''\\n            parser.state = S.DOCTYPE\\n          }\\n          continue\\n\\n        case S.DOCTYPE_DTD:\\n          parser.doctype += c\\n          if (c === ']') {\\n            parser.state = S.DOCTYPE\\n          } else if (is(quote, c)) {\\n            parser.state = S.DOCTYPE_DTD_QUOTED\\n            parser.q = c\\n          }\\n          continue\\n\\n        case S.DOCTYPE_DTD_QUOTED:\\n          parser.doctype += c\\n          if (c === parser.q) {\\n            parser.state = S.DOCTYPE_DTD\\n            parser.q = ''\\n          }\\n          continue\\n\\n        case S.COMMENT:\\n          if (c === '-') {\\n            parser.state = S.COMMENT_ENDING\\n          } else {\\n            parser.comment += c\\n          }\\n          continue\\n\\n        case S.COMMENT_ENDING:\\n          if (c === '-') {\\n            parser.state = S.COMMENT_ENDED\\n            parser.comment = textopts(parser.opt, parser.comment)\\n            if (parser.comment) {\\n              emitNode(parser, 'oncomment', parser.comment)\\n            }\\n            parser.comment = ''\\n          } else {\\n            parser.comment += '-' + c\\n            parser.state = S.COMMENT\\n          }\\n          continue\\n\\n        case S.COMMENT_ENDED:\\n          if (c !== '>') {\\n            strictFail(parser, 'Malformed comment')\\n            // allow \\x3c!-- blah -- bloo --\\x3e in non-strict mode,\\n            // which is a comment of \\\" blah -- bloo \\\"\\n            parser.comment += '--' + c\\n            parser.state = S.COMMENT\\n          } else {\\n            parser.state = S.TEXT\\n          }\\n          continue\\n\\n        case S.CDATA:\\n          if (c === ']') {\\n            parser.state = S.CDATA_ENDING\\n          } else {\\n            parser.cdata += c\\n          }\\n          continue\\n\\n        case S.CDATA_ENDING:\\n          if (c === ']') {\\n            parser.state = S.CDATA_ENDING_2\\n          } else {\\n            parser.cdata += ']' + c\\n            parser.state = S.CDATA\\n          }\\n          continue\\n\\n        case S.CDATA_ENDING_2:\\n          if (c === '>') {\\n            if (parser.cdata) {\\n              emitNode(parser, 'oncdata', parser.cdata)\\n            }\\n            emitNode(parser, 'onclosecdata')\\n            parser.cdata = ''\\n            parser.state = S.TEXT\\n          } else if (c === ']') {\\n            parser.cdata += ']'\\n          } else {\\n            parser.cdata += ']]' + c\\n            parser.state = S.CDATA\\n          }\\n          continue\\n\\n        case S.PROC_INST:\\n          if (c === '?') {\\n            parser.state = S.PROC_INST_ENDING\\n          } else if (is(whitespace, c)) {\\n            parser.state = S.PROC_INST_BODY\\n          } else {\\n            parser.procInstName += c\\n          }\\n          continue\\n\\n        case S.PROC_INST_BODY:\\n          if (!parser.procInstBody && is(whitespace, c)) {\\n            continue\\n          } else if (c === '?') {\\n            parser.state = S.PROC_INST_ENDING\\n          } else {\\n            parser.procInstBody += c\\n          }\\n          continue\\n\\n        case S.PROC_INST_ENDING:\\n          if (c === '>') {\\n            emitNode(parser, 'onprocessinginstruction', {\\n              name: parser.procInstName,\\n              body: parser.procInstBody\\n            })\\n            parser.procInstName = parser.procInstBody = ''\\n            parser.state = S.TEXT\\n          } else {\\n            parser.procInstBody += '?' + c\\n            parser.state = S.PROC_INST_BODY\\n          }\\n          continue\\n\\n        case S.OPEN_TAG:\\n          if (is(nameBody, c)) {\\n            parser.tagName += c\\n          } else {\\n            newTag(parser)\\n            if (c === '>') {\\n              openTag(parser)\\n            } else if (c === '/') {\\n              parser.state = S.OPEN_TAG_SLASH\\n            } else {\\n              if (not(whitespace, c)) {\\n                strictFail(parser, 'Invalid character in tag name')\\n              }\\n              parser.state = S.ATTRIB\\n            }\\n          }\\n          continue\\n\\n        case S.OPEN_TAG_SLASH:\\n          if (c === '>') {\\n            openTag(parser, true)\\n            closeTag(parser)\\n          } else {\\n            strictFail(parser, 'Forward-slash in opening tag not followed by >')\\n            parser.state = S.ATTRIB\\n          }\\n          continue\\n\\n        case S.ATTRIB:\\n          // haven't read the attribute name yet.\\n          if (is(whitespace, c)) {\\n            continue\\n          } else if (c === '>') {\\n            openTag(parser)\\n          } else if (c === '/') {\\n            parser.state = S.OPEN_TAG_SLASH\\n          } else if (is(nameStart, c)) {\\n            parser.attribName = c\\n            parser.attribValue = ''\\n            parser.state = S.ATTRIB_NAME\\n          } else {\\n            strictFail(parser, 'Invalid attribute name')\\n          }\\n          continue\\n\\n        case S.ATTRIB_NAME:\\n          if (c === '=') {\\n            parser.state = S.ATTRIB_VALUE\\n          } else if (c === '>') {\\n            strictFail(parser, 'Attribute without value')\\n            parser.attribValue = parser.attribName\\n            attrib(parser)\\n            openTag(parser)\\n          } else if (is(whitespace, c)) {\\n            parser.state = S.ATTRIB_NAME_SAW_WHITE\\n          } else if (is(nameBody, c)) {\\n            parser.attribName += c\\n          } else {\\n            strictFail(parser, 'Invalid attribute name')\\n          }\\n          continue\\n\\n        case S.ATTRIB_NAME_SAW_WHITE:\\n          if (c === '=') {\\n            parser.state = S.ATTRIB_VALUE\\n          } else if (is(whitespace, c)) {\\n            continue\\n          } else {\\n            strictFail(parser, 'Attribute without value')\\n            parser.tag.attributes[parser.attribName] = ''\\n            parser.attribValue = ''\\n            emitNode(parser, 'onattribute', {\\n              name: parser.attribName,\\n              value: ''\\n            })\\n            parser.attribName = ''\\n            if (c === '>') {\\n              openTag(parser)\\n            } else if (is(nameStart, c)) {\\n              parser.attribName = c\\n              parser.state = S.ATTRIB_NAME\\n            } else {\\n              strictFail(parser, 'Invalid attribute name')\\n              parser.state = S.ATTRIB\\n            }\\n          }\\n          continue\\n\\n        case S.ATTRIB_VALUE:\\n          if (is(whitespace, c)) {\\n            continue\\n          } else if (is(quote, c)) {\\n            parser.q = c\\n            parser.state = S.ATTRIB_VALUE_QUOTED\\n          } else {\\n            strictFail(parser, 'Unquoted attribute value')\\n            parser.state = S.ATTRIB_VALUE_UNQUOTED\\n            parser.attribValue = c\\n          }\\n          continue\\n\\n        case S.ATTRIB_VALUE_QUOTED:\\n          if (c !== parser.q) {\\n            if (c === '&') {\\n              parser.state = S.ATTRIB_VALUE_ENTITY_Q\\n            } else {\\n              parser.attribValue += c\\n            }\\n            continue\\n          }\\n          attrib(parser)\\n          parser.q = ''\\n          parser.state = S.ATTRIB_VALUE_CLOSED\\n          continue\\n\\n        case S.ATTRIB_VALUE_CLOSED:\\n          if (is(whitespace, c)) {\\n            parser.state = S.ATTRIB\\n          } else if (c === '>') {\\n            openTag(parser)\\n          } else if (c === '/') {\\n            parser.state = S.OPEN_TAG_SLASH\\n          } else if (is(nameStart, c)) {\\n            strictFail(parser, 'No whitespace between attributes')\\n            parser.attribName = c\\n            parser.attribValue = ''\\n            parser.state = S.ATTRIB_NAME\\n          } else {\\n            strictFail(parser, 'Invalid attribute name')\\n          }\\n          continue\\n\\n        case S.ATTRIB_VALUE_UNQUOTED:\\n          if (not(attribEnd, c)) {\\n            if (c === '&') {\\n              parser.state = S.ATTRIB_VALUE_ENTITY_U\\n            } else {\\n              parser.attribValue += c\\n            }\\n            continue\\n          }\\n          attrib(parser)\\n          if (c === '>') {\\n            openTag(parser)\\n          } else {\\n            parser.state = S.ATTRIB\\n          }\\n          continue\\n\\n        case S.CLOSE_TAG:\\n          if (!parser.tagName) {\\n            if (is(whitespace, c)) {\\n              continue\\n            } else if (not(nameStart, c)) {\\n              if (parser.script) {\\n                parser.script += '</' + c\\n                parser.state = S.SCRIPT\\n              } else {\\n                strictFail(parser, 'Invalid tagname in closing tag.')\\n              }\\n            } else {\\n              parser.tagName = c\\n            }\\n          } else if (c === '>') {\\n            closeTag(parser)\\n          } else if (is(nameBody, c)) {\\n            parser.tagName += c\\n          } else if (parser.script) {\\n            parser.script += '</' + parser.tagName\\n            parser.tagName = ''\\n            parser.state = S.SCRIPT\\n          } else {\\n            if (not(whitespace, c)) {\\n              strictFail(parser, 'Invalid tagname in closing tag')\\n            }\\n            parser.state = S.CLOSE_TAG_SAW_WHITE\\n          }\\n          continue\\n\\n        case S.CLOSE_TAG_SAW_WHITE:\\n          if (is(whitespace, c)) {\\n            continue\\n          }\\n          if (c === '>') {\\n            closeTag(parser)\\n          } else {\\n            strictFail(parser, 'Invalid characters in closing tag')\\n          }\\n          continue\\n\\n        case S.TEXT_ENTITY:\\n        case S.ATTRIB_VALUE_ENTITY_Q:\\n        case S.ATTRIB_VALUE_ENTITY_U:\\n          var returnState\\n          var buffer\\n          switch (parser.state) {\\n            case S.TEXT_ENTITY:\\n              returnState = S.TEXT\\n              buffer = 'textNode'\\n              break\\n\\n            case S.ATTRIB_VALUE_ENTITY_Q:\\n              returnState = S.ATTRIB_VALUE_QUOTED\\n              buffer = 'attribValue'\\n              break\\n\\n            case S.ATTRIB_VALUE_ENTITY_U:\\n              returnState = S.ATTRIB_VALUE_UNQUOTED\\n              buffer = 'attribValue'\\n              break\\n          }\\n\\n          if (c === ';') {\\n            parser[buffer] += parseEntity(parser)\\n            parser.entity = ''\\n            parser.state = returnState\\n          } else if (is(parser.entity.length ? entityBody : entityStart, c)) {\\n            parser.entity += c\\n          } else {\\n            strictFail(parser, 'Invalid character in entity name')\\n            parser[buffer] += '&' + parser.entity + c\\n            parser.entity = ''\\n            parser.state = returnState\\n          }\\n\\n          continue\\n\\n        default:\\n          throw new Error(parser, 'Unknown state: ' + parser.state)\\n      }\\n    } // while\\n\\n    if (parser.position >= parser.bufferCheckPosition) {\\n      checkBufferLength(parser)\\n    }\\n    return parser\\n  }\\n\\n  /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */\\n  if (!String.fromCodePoint) {\\n    (function () {\\n      var stringFromCharCode = String.fromCharCode\\n      var floor = Math.floor\\n      var fromCodePoint = function () {\\n        var MAX_SIZE = 0x4000\\n        var codeUnits = []\\n        var highSurrogate\\n        var lowSurrogate\\n        var index = -1\\n        var length = arguments.length\\n        if (!length) {\\n          return ''\\n        }\\n        var result = ''\\n        while (++index < length) {\\n          var codePoint = Number(arguments[index])\\n          if (\\n            !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\\n            codePoint < 0 || // not a valid Unicode code point\\n            codePoint > 0x10FFFF || // not a valid Unicode code point\\n            floor(codePoint) !== codePoint // not an integer\\n          ) {\\n            throw RangeError('Invalid code point: ' + codePoint)\\n          }\\n          if (codePoint <= 0xFFFF) { // BMP code point\\n            codeUnits.push(codePoint)\\n          } else { // Astral code point; split in surrogate halves\\n            // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\\n            codePoint -= 0x10000\\n            highSurrogate = (codePoint >> 10) + 0xD800\\n            lowSurrogate = (codePoint % 0x400) + 0xDC00\\n            codeUnits.push(highSurrogate, lowSurrogate)\\n          }\\n          if (index + 1 === length || codeUnits.length > MAX_SIZE) {\\n            result += stringFromCharCode.apply(null, codeUnits)\\n            codeUnits.length = 0\\n          }\\n        }\\n        return result\\n      }\\n      if (Object.defineProperty) {\\n        Object.defineProperty(String, 'fromCodePoint', {\\n          value: fromCodePoint,\\n          configurable: true,\\n          writable: true\\n        })\\n      } else {\\n        String.fromCodePoint = fromCodePoint\\n      }\\n    }())\\n  }\\n})( false ? undefined : exports)\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node-libs-browser/node_modules/buffer/index.js */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\").Buffer))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/node_modules/sax/lib/sax.js?\")},\"../node_modules/imsc/src/main/js/doc.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscDoc\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscDoc, sax, imscNames, imscStyles, imscUtils) {\\r\\n\\r\\n\\r\\n    /**\\r\\n     * Allows a client to provide callbacks to handle children of the <metadata> element\\r\\n     * @typedef {Object} MetadataHandler\\r\\n     * @property {?OpenTagCallBack} onOpenTag\\r\\n     * @property {?CloseTagCallBack} onCloseTag\\r\\n     * @property {?TextCallBack} onText\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Called when the opening tag of an element node is encountered.\\r\\n     * @callback OpenTagCallBack\\r\\n     * @param {string} ns Namespace URI of the element\\r\\n     * @param {string} name Local name of the element\\r\\n     * @param {Object[]} attributes List of attributes, each consisting of a\\r\\n     *                              `uri`, `name` and `value`\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Called when the closing tag of an element node is encountered.\\r\\n     * @callback CloseTagCallBack\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Called when a text node is encountered.\\r\\n     * @callback TextCallBack\\r\\n     * @param {string} contents Contents of the text node\\r\\n     */\\r\\n\\r\\n    /**\\r\\n     * Parses an IMSC1 document into an opaque in-memory representation that exposes\\r\\n     * a single method <pre>getMediaTimeEvents()</pre> that returns a list of time\\r\\n     * offsets (in seconds) of the ISD, i.e. the points in time where the visual\\r\\n     * representation of the document change. `metadataHandler` allows the caller to\\r\\n     * be called back when nodes are present in <metadata> elements. \\r\\n     * \\r\\n     * @param {string} xmlstring XML document\\r\\n     * @param {?module:imscUtils.ErrorHandler} errorHandler Error callback\\r\\n     * @param {?MetadataHandler} metadataHandler Callback for <Metadata> elements\\r\\n     * @returns {Object} Opaque in-memory representation of an IMSC1 document\\r\\n     */\\r\\n\\r\\n    imscDoc.fromXML = function (xmlstring, errorHandler, metadataHandler) {\\r\\n        var p = sax.parser(true, {xmlns: true});\\r\\n        var estack = [];\\r\\n        var xmllangstack = [];\\r\\n        var xmlspacestack = [];\\r\\n        var metadata_depth = 0;\\r\\n        var doc = null;\\r\\n\\r\\n        p.onclosetag = function (node) {\\r\\n\\r\\n            if (estack[0] instanceof Styling) {\\r\\n\\r\\n                /* flatten chained referential styling */\\r\\n\\r\\n                for (var sid in estack[0].styles) {\\r\\n\\r\\n                    mergeChainedStyles(estack[0], estack[0].styles[sid], errorHandler);\\r\\n\\r\\n                }\\r\\n\\r\\n            } else if (estack[0] instanceof P || estack[0] instanceof Span) {\\r\\n\\r\\n                /* merge anonymous spans */\\r\\n\\r\\n                if (estack[0].contents.length > 1) {\\r\\n\\r\\n                    var cs = [estack[0].contents[0]];\\r\\n\\r\\n                    var c;\\r\\n\\r\\n                    for (c = 1; c < estack[0].contents.length; c++) {\\r\\n\\r\\n                        if (estack[0].contents[c] instanceof AnonymousSpan &&\\r\\n                                cs[cs.length - 1] instanceof AnonymousSpan) {\\r\\n\\r\\n                            cs[cs.length - 1].text += estack[0].contents[c].text;\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            cs.push(estack[0].contents[c]);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                    estack[0].contents = cs;\\r\\n\\r\\n                }\\r\\n\\r\\n                // remove redundant nested anonymous spans (9.3.3(1)(c))\\r\\n\\r\\n                if (estack[0] instanceof Span &&\\r\\n                        estack[0].contents.length === 1 &&\\r\\n                        estack[0].contents[0] instanceof AnonymousSpan) {\\r\\n\\r\\n                    estack[0].text = estack[0].contents[0].text;\\r\\n                    delete estack[0].contents;\\r\\n\\r\\n                }\\r\\n\\r\\n            } else if (estack[0] instanceof ForeignElement) {\\r\\n\\r\\n                if (estack[0].node.uri === imscNames.ns_tt &&\\r\\n                        estack[0].node.local === \\'metadata\\') {\\r\\n\\r\\n                    /* leave the metadata element */\\r\\n\\r\\n                    metadata_depth--;\\r\\n\\r\\n                } else if (metadata_depth > 0 &&\\r\\n                        metadataHandler &&\\r\\n                        \\'onCloseTag\\' in metadataHandler) {\\r\\n\\r\\n                    /* end of child of metadata element */\\r\\n\\r\\n                    metadataHandler.onCloseTag();\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            // TODO: delete stylerefs?\\r\\n\\r\\n            // maintain the xml:space stack\\r\\n\\r\\n            xmlspacestack.shift();\\r\\n\\r\\n            // maintain the xml:lang stack\\r\\n\\r\\n            xmllangstack.shift();\\r\\n\\r\\n            // prepare for the next element\\r\\n\\r\\n            estack.shift();\\r\\n        };\\r\\n\\r\\n        p.ontext = function (str) {\\r\\n\\r\\n            if (estack[0] === undefined) {\\r\\n\\r\\n                /* ignoring text outside of elements */\\r\\n\\r\\n            } else if (estack[0] instanceof Span || estack[0] instanceof P) {\\r\\n\\r\\n                /* ignore children text nodes in ruby container spans */\\r\\n\\r\\n                if (estack[0] instanceof Span) {\\r\\n\\r\\n                    var ruby = estack[0].styleAttrs[imscStyles.byName.ruby.qname];\\r\\n\\r\\n                    if (ruby === \\'container\\' || ruby === \\'textContainer\\' || ruby === \\'baseContainer\\') {\\r\\n\\r\\n                        return;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                /* create an anonymous span */\\r\\n\\r\\n                var s = new AnonymousSpan();\\r\\n\\r\\n                s.initFromText(doc, estack[0], str, xmlspacestack[0], errorHandler);\\r\\n\\r\\n                estack[0].contents.push(s);\\r\\n\\r\\n            } else if (estack[0] instanceof ForeignElement &&\\r\\n                    metadata_depth > 0 &&\\r\\n                    metadataHandler &&\\r\\n                    \\'onText\\' in metadataHandler) {\\r\\n\\r\\n                /* text node within a child of metadata element */\\r\\n\\r\\n                metadataHandler.onText(str);\\r\\n\\r\\n            }\\r\\n\\r\\n        };\\r\\n\\r\\n\\r\\n        p.onopentag = function (node) {\\r\\n\\r\\n            // maintain the xml:space stack\\r\\n\\r\\n            var xmlspace = node.attributes[\"xml:space\"];\\r\\n\\r\\n            if (xmlspace) {\\r\\n\\r\\n                xmlspacestack.unshift(xmlspace.value);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                if (xmlspacestack.length === 0) {\\r\\n\\r\\n                    xmlspacestack.unshift(\"default\");\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    xmlspacestack.unshift(xmlspacestack[0]);\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* maintain the xml:lang stack */\\r\\n\\r\\n\\r\\n            var xmllang = node.attributes[\"xml:lang\"];\\r\\n\\r\\n            if (xmllang) {\\r\\n\\r\\n                xmllangstack.unshift(xmllang.value);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                if (xmllangstack.length === 0) {\\r\\n\\r\\n                    xmllangstack.unshift(\"\");\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    xmllangstack.unshift(xmllangstack[0]);\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n\\r\\n            /* process the element */\\r\\n\\r\\n            if (node.uri === imscNames.ns_tt) {\\r\\n\\r\\n                if (node.local === \\'tt\\') {\\r\\n\\r\\n                    if (doc !== null) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Two <tt> elements at (\" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    doc = new TT();\\r\\n\\r\\n                    doc.initFromNode(node, errorHandler);\\r\\n\\r\\n                    estack.unshift(doc);\\r\\n\\r\\n                } else if (node.local === \\'head\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof TT)) {\\r\\n                        reportFatal(errorHandler, \"Parent of <head> element is not <tt> at (\" + this.line + \",\" + this.column + \")\");\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(doc.head);\\r\\n\\r\\n                } else if (node.local === \\'styling\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Head)) {\\r\\n                        reportFatal(errorHandler, \"Parent of <styling> element is not <head> at (\" + this.line + \",\" + this.column + \")\");\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(doc.head.styling);\\r\\n\\r\\n                } else if (node.local === \\'style\\') {\\r\\n\\r\\n                    var s;\\r\\n\\r\\n                    if (estack[0] instanceof Styling) {\\r\\n\\r\\n                        s = new Style();\\r\\n\\r\\n                        s.initFromNode(node, errorHandler);\\r\\n\\r\\n                        /* ignore <style> element missing @id */\\r\\n\\r\\n                        if (!s.id) {\\r\\n\\r\\n                            reportError(errorHandler, \"<style> element missing @id attribute\");\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            doc.head.styling.styles[s.id] = s;\\r\\n\\r\\n                        }\\r\\n\\r\\n                        estack.unshift(s);\\r\\n\\r\\n                    } else if (estack[0] instanceof Region) {\\r\\n\\r\\n                        /* nested styles can be merged with specified styles\\r\\n                         * immediately, with lower priority\\r\\n                         * (see 8.4.4.2(3) at TTML1 )\\r\\n                         */\\r\\n\\r\\n                        s = new Style();\\r\\n\\r\\n                        s.initFromNode(node, errorHandler);\\r\\n\\r\\n                        mergeStylesIfNotPresent(s.styleAttrs, estack[0].styleAttrs);\\r\\n\\r\\n                        estack.unshift(s);\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <style> element is not <styling> or <region> at (\" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                }  else if (node.local === \\'initial\\') {\\r\\n\\r\\n                    var ini;\\r\\n\\r\\n                    if (estack[0] instanceof Styling) {\\r\\n\\r\\n                        ini = new Initial();\\r\\n\\r\\n                        ini.initFromNode(node, errorHandler);\\r\\n                        \\r\\n                        for (var qn in ini.styleAttrs) {\\r\\n                            \\r\\n                            doc.head.styling.initials[qn] = ini.styleAttrs[qn];\\r\\n                            \\r\\n                        }\\r\\n                        \\r\\n                        estack.unshift(ini);\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <initial> element is not <styling> at (\" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                } else if (node.local === \\'layout\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Head)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <layout> element is not <head> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(doc.head.layout);\\r\\n\\r\\n                } else if (node.local === \\'region\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Layout)) {\\r\\n                        reportFatal(errorHandler, \"Parent of <region> element is not <layout> at \" + this.line + \",\" + this.column + \")\");\\r\\n                    }\\r\\n\\r\\n                    var r = new Region();\\r\\n\\r\\n                    r.initFromNode(doc, node, errorHandler);\\r\\n\\r\\n                    if (!r.id || r.id in doc.head.layout.regions) {\\r\\n\\r\\n                        reportError(errorHandler, \"Ignoring <region> with duplicate or missing @id at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        doc.head.layout.regions[r.id] = r;\\r\\n\\r\\n                    }\\r\\n\\r\\n                    estack.unshift(r);\\r\\n\\r\\n                } else if (node.local === \\'body\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof TT)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <body> element is not <tt> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    if (doc.body !== null) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Second <body> element at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var b = new Body();\\r\\n\\r\\n                    b.initFromNode(doc, node, errorHandler);\\r\\n\\r\\n                    doc.body = b;\\r\\n\\r\\n                    estack.unshift(b);\\r\\n\\r\\n                } else if (node.local === \\'div\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Div || estack[0] instanceof Body)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <div> element is not <body> or <div> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var d = new Div();\\r\\n\\r\\n                    d.initFromNode(doc, estack[0], node, errorHandler);\\r\\n                    \\r\\n                    /* transform smpte:backgroundImage to TTML2 image element */\\r\\n                    \\r\\n                    var bi = d.styleAttrs[imscStyles.byName.backgroundImage.qname];\\r\\n                    \\r\\n                    if (bi) {\\r\\n                        d.contents.push(new Image(bi));\\r\\n                        delete d.styleAttrs[imscStyles.byName.backgroundImage.qname];                  \\r\\n                    }\\r\\n\\r\\n                    estack[0].contents.push(d);\\r\\n\\r\\n                    estack.unshift(d);\\r\\n\\r\\n                } else if (node.local === \\'image\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Div)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <image> element is not <div> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var img = new Image();\\r\\n                    \\r\\n                    img.initFromNode(doc, estack[0], node, errorHandler);\\r\\n                    \\r\\n                    estack[0].contents.push(img);\\r\\n\\r\\n                    estack.unshift(img);\\r\\n\\r\\n                } else if (node.local === \\'p\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Div)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <p> element is not <div> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var p = new P();\\r\\n\\r\\n                    p.initFromNode(doc, estack[0], node, errorHandler);\\r\\n\\r\\n                    estack[0].contents.push(p);\\r\\n\\r\\n                    estack.unshift(p);\\r\\n\\r\\n                } else if (node.local === \\'span\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Span || estack[0] instanceof P)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <span> element is not <span> or <p> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var ns = new Span();\\r\\n\\r\\n                    ns.initFromNode(doc, estack[0], node, xmlspacestack[0], errorHandler);\\r\\n\\r\\n                    estack[0].contents.push(ns);\\r\\n\\r\\n                    estack.unshift(ns);\\r\\n\\r\\n                } else if (node.local === \\'br\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Span || estack[0] instanceof P)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <br> element is not <span> or <p> at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var nb = new Br();\\r\\n\\r\\n                    nb.initFromNode(doc, estack[0], node, errorHandler);\\r\\n\\r\\n                    estack[0].contents.push(nb);\\r\\n\\r\\n                    estack.unshift(nb);\\r\\n\\r\\n                } else if (node.local === \\'set\\') {\\r\\n\\r\\n                    if (!(estack[0] instanceof Span ||\\r\\n                            estack[0] instanceof P ||\\r\\n                            estack[0] instanceof Div ||\\r\\n                            estack[0] instanceof Body ||\\r\\n                            estack[0] instanceof Region ||\\r\\n                            estack[0] instanceof Br)) {\\r\\n\\r\\n                        reportFatal(errorHandler, \"Parent of <set> element is not a content element or a region at \" + this.line + \",\" + this.column + \")\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    var st = new Set();\\r\\n\\r\\n                    st.initFromNode(doc, estack[0], node, errorHandler);\\r\\n\\r\\n                    estack[0].sets.push(st);\\r\\n\\r\\n                    estack.unshift(st);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    /* element in the TT namespace, but not a content element */\\r\\n\\r\\n                    estack.unshift(new ForeignElement(node));\\r\\n                }\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /* ignore elements not in the TTML namespace unless in metadata element */\\r\\n\\r\\n                estack.unshift(new ForeignElement(node));\\r\\n\\r\\n            }\\r\\n\\r\\n            /* handle metadata callbacks */\\r\\n\\r\\n            if (estack[0] instanceof ForeignElement) {\\r\\n\\r\\n                if (node.uri === imscNames.ns_tt &&\\r\\n                        node.local === \\'metadata\\') {\\r\\n\\r\\n                    /* enter the metadata element */\\r\\n\\r\\n                    metadata_depth++;\\r\\n\\r\\n                } else if (\\r\\n                        metadata_depth > 0 &&\\r\\n                        metadataHandler &&\\r\\n                        \\'onOpenTag\\' in metadataHandler\\r\\n                        ) {\\r\\n\\r\\n                    /* start of child of metadata element */\\r\\n\\r\\n                    var attrs = [];\\r\\n\\r\\n                    for (var a in node.attributes) {\\r\\n                        attrs[node.attributes[a].uri + \" \" + node.attributes[a].local] =\\r\\n                                {\\r\\n                                    uri: node.attributes[a].uri,\\r\\n                                    local: node.attributes[a].local,\\r\\n                                    value: node.attributes[a].value\\r\\n                                };\\r\\n                    }\\r\\n\\r\\n                    metadataHandler.onOpenTag(node.uri, node.local, attrs);\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        };\\r\\n\\r\\n        // parse the document\\r\\n\\r\\n        p.write(xmlstring).close();\\r\\n\\r\\n        // all referential styling has been flatten, so delete styles\\r\\n\\r\\n        delete doc.head.styling.styles;\\r\\n       \\r\\n        // create default region if no regions specified\\r\\n\\r\\n        var hasRegions = false;\\r\\n\\r\\n        /* AFAIK the only way to determine whether an object has members */\\r\\n\\r\\n        for (var i in doc.head.layout.regions) {\\r\\n\\r\\n            hasRegions = true;\\r\\n\\r\\n            break;\\r\\n\\r\\n        }\\r\\n\\r\\n        if (!hasRegions) {\\r\\n\\r\\n            /* create default region */\\r\\n\\r\\n            var dr = Region.prototype.createDefaultRegion();\\r\\n\\r\\n            doc.head.layout.regions[dr.id] = dr;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* resolve desired timing for regions */\\r\\n\\r\\n        for (var region_i in doc.head.layout.regions) {\\r\\n\\r\\n            resolveTiming(doc, doc.head.layout.regions[region_i], null, null);\\r\\n\\r\\n        }\\r\\n\\r\\n        /* resolve desired timing for content elements */\\r\\n\\r\\n        if (doc.body) {\\r\\n            resolveTiming(doc, doc.body, null, null);\\r\\n        }\\r\\n\\r\\n        /* remove undefined spans in ruby containers */\\r\\n\\r\\n        if (doc.body) {\\r\\n            cleanRubyContainers(doc.body);\\r\\n        }\\r\\n\\r\\n        return doc;\\r\\n    };\\r\\n\\r\\n    function cleanRubyContainers(element) {\\r\\n        \\r\\n        if (! (\\'contents\\' in element)) return;\\r\\n\\r\\n        var rubyval = \\'styleAttrs\\' in element ? element.styleAttrs[imscStyles.byName.ruby.qname] : null;\\r\\n\\r\\n        var isrubycontainer = (element.kind === \\'span\\' && (rubyval === \"container\" || rubyval === \"textContainer\" || rubyval === \"baseContainer\"));\\r\\n\\r\\n        for (var i = element.contents.length - 1; i >= 0; i--) {\\r\\n\\r\\n            if (isrubycontainer && !(\\'styleAttrs\\' in element.contents[i] && imscStyles.byName.ruby.qname in element.contents[i].styleAttrs)) {\\r\\n\\r\\n                /* prune undefined <span> in ruby containers */\\r\\n\\r\\n                delete element.contents[i];\\r\\n\\r\\n            } else {\\r\\n\\r\\n                cleanRubyContainers(element.contents[i]);\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function resolveTiming(doc, element, prev_sibling, parent) {\\r\\n\\r\\n        /* are we in a seq container? */\\r\\n\\r\\n        var isinseq = parent && parent.timeContainer === \"seq\";\\r\\n\\r\\n        /* determine implicit begin */\\r\\n\\r\\n        var implicit_begin = 0; /* default */\\r\\n\\r\\n        if (parent) {\\r\\n\\r\\n            if (isinseq && prev_sibling) {\\r\\n\\r\\n                /*\\r\\n                 * if seq time container, offset from the previous sibling end\\r\\n                 */\\r\\n\\r\\n                implicit_begin = prev_sibling.end;\\r\\n\\r\\n\\r\\n            } else {\\r\\n\\r\\n                implicit_begin = parent.begin;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* compute desired begin */\\r\\n\\r\\n        element.begin = element.explicit_begin ? element.explicit_begin + implicit_begin : implicit_begin;\\r\\n\\r\\n\\r\\n        /* determine implicit end */\\r\\n\\r\\n        var implicit_end = element.begin;\\r\\n\\r\\n        var s = null;\\r\\n\\r\\n        for (var set_i in element.sets) {\\r\\n\\r\\n            resolveTiming(doc, element.sets[set_i], s, element);\\r\\n\\r\\n            if (element.timeContainer === \"seq\") {\\r\\n\\r\\n                implicit_end = element.sets[set_i].end;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                implicit_end = Math.max(implicit_end, element.sets[set_i].end);\\r\\n\\r\\n            }\\r\\n\\r\\n            s = element.sets[set_i];\\r\\n\\r\\n        }\\r\\n\\r\\n        if (!(\\'contents\\' in element)) {\\r\\n\\r\\n            /* anonymous spans and regions and <set> and <br>s and spans with only children text nodes */\\r\\n\\r\\n            if (isinseq) {\\r\\n\\r\\n                /* in seq container, implicit duration is zero */\\r\\n\\r\\n                implicit_end = element.begin;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /* in par container, implicit duration is indefinite */\\r\\n\\r\\n                implicit_end = Number.POSITIVE_INFINITY;\\r\\n\\r\\n            }\\r\\n\\r\\n        } else {\\r\\n\\r\\n            for (var content_i in element.contents) {\\r\\n\\r\\n                resolveTiming(doc, element.contents[content_i], s, element);\\r\\n\\r\\n                if (element.timeContainer === \"seq\") {\\r\\n\\r\\n                    implicit_end = element.contents[content_i].end;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    implicit_end = Math.max(implicit_end, element.contents[content_i].end);\\r\\n\\r\\n                }\\r\\n\\r\\n                s = element.contents[content_i];\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* determine desired end */\\r\\n        /* it is never made really clear in SMIL that the explicit end is offset by the implicit begin */\\r\\n\\r\\n        if (element.explicit_end !== null && element.explicit_dur !== null) {\\r\\n\\r\\n            element.end = Math.min(element.begin + element.explicit_dur, implicit_begin + element.explicit_end);\\r\\n\\r\\n        } else if (element.explicit_end === null && element.explicit_dur !== null) {\\r\\n\\r\\n            element.end = element.begin + element.explicit_dur;\\r\\n\\r\\n        } else if (element.explicit_end !== null && element.explicit_dur === null) {\\r\\n\\r\\n            element.end = implicit_begin + element.explicit_end;\\r\\n\\r\\n        } else {\\r\\n\\r\\n            element.end = implicit_end;\\r\\n        }\\r\\n\\r\\n        delete element.explicit_begin;\\r\\n        delete element.explicit_dur;\\r\\n        delete element.explicit_end;\\r\\n\\r\\n        doc._registerEvent(element);\\r\\n\\r\\n    }\\r\\n\\r\\n    function ForeignElement(node) {\\r\\n        this.node = node;\\r\\n    }\\r\\n\\r\\n    function TT() {\\r\\n        this.events = [];\\r\\n        this.head = new Head();\\r\\n        this.body = null;\\r\\n    }\\r\\n\\r\\n    TT.prototype.initFromNode = function (node, errorHandler) {\\r\\n\\r\\n        /* compute cell resolution */\\r\\n\\r\\n        var cr = extractCellResolution(node, errorHandler);\\r\\n        \\r\\n        this.cellLength = {\\r\\n                \\'h\\': new imscUtils.ComputedLength(0, 1/cr.h),\\r\\n                \\'w\\': new imscUtils.ComputedLength(1/cr.w, 0)\\r\\n            };\\r\\n\\r\\n        /* extract frame rate and tick rate */\\r\\n\\r\\n        var frtr = extractFrameAndTickRate(node, errorHandler);\\r\\n\\r\\n        this.effectiveFrameRate = frtr.effectiveFrameRate;\\r\\n\\r\\n        this.tickRate = frtr.tickRate;\\r\\n\\r\\n        /* extract aspect ratio */\\r\\n\\r\\n        this.aspectRatio = extractAspectRatio(node, errorHandler);\\r\\n\\r\\n        /* check timebase */\\r\\n\\r\\n        var attr = findAttribute(node, imscNames.ns_ttp, \"timeBase\");\\r\\n\\r\\n        if (attr !== null && attr !== \"media\") {\\r\\n\\r\\n            reportFatal(errorHandler, \"Unsupported time base\");\\r\\n\\r\\n        }\\r\\n\\r\\n        /* retrieve extent */\\r\\n\\r\\n        var e = extractExtent(node, errorHandler);\\r\\n\\r\\n        if (e === null) {\\r\\n\\r\\n            this.pxLength = {\\r\\n                \\'h\\': null,\\r\\n                \\'w\\': null\\r\\n            };\\r\\n\\r\\n        } else {\\r\\n\\r\\n            if (e.h.unit !== \"px\" || e.w.unit !== \"px\") {\\r\\n                reportFatal(errorHandler, \"Extent on TT must be in px or absent\");\\r\\n            }\\r\\n\\r\\n            this.pxLength = {\\r\\n                \\'h\\': new imscUtils.ComputedLength(0, 1 / e.h.value),\\r\\n                \\'w\\': new imscUtils.ComputedLength(1 / e.w.value, 0)\\r\\n            };\\r\\n        }\\r\\n        \\r\\n        /** set root container dimensions to (1, 1) arbitrarily\\r\\n          * the root container is mapped to actual dimensions at rendering\\r\\n        **/\\r\\n        \\r\\n        this.dimensions = {\\r\\n                \\'h\\': new imscUtils.ComputedLength(0, 1),\\r\\n                \\'w\\': new imscUtils.ComputedLength(1, 0)\\r\\n    };\\r\\n\\r\\n    };\\r\\n\\r\\n    /* register a temporal events */\\r\\n    TT.prototype._registerEvent = function (elem) {\\r\\n\\r\\n        /* skip if begin is not < then end */\\r\\n\\r\\n        if (elem.end <= elem.begin)\\r\\n            return;\\r\\n\\r\\n        /* index the begin time of the event */\\r\\n\\r\\n        var b_i = indexOf(this.events, elem.begin);\\r\\n\\r\\n        if (!b_i.found) {\\r\\n            this.events.splice(b_i.index, 0, elem.begin);\\r\\n        }\\r\\n\\r\\n        /* index the end time of the event */\\r\\n\\r\\n        if (elem.end !== Number.POSITIVE_INFINITY) {\\r\\n\\r\\n            var e_i = indexOf(this.events, elem.end);\\r\\n\\r\\n            if (!e_i.found) {\\r\\n                this.events.splice(e_i.index, 0, elem.end);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n\\r\\n    /*\\r\\n     * Retrieves the range of ISD times covered by the document\\r\\n     * \\r\\n     * @returns {Array} Array of two elements: min_begin_time and max_begin_time\\r\\n     * \\r\\n     */\\r\\n    TT.prototype.getMediaTimeRange = function () {\\r\\n\\r\\n        return [this.events[0], this.events[this.events.length - 1]];\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Returns list of ISD begin times  \\r\\n     * \\r\\n     * @returns {Array}\\r\\n     */\\r\\n    TT.prototype.getMediaTimeEvents = function () {\\r\\n\\r\\n        return this.events;\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Head element\\r\\n     */\\r\\n\\r\\n    function Head() {\\r\\n        this.styling = new Styling();\\r\\n        this.layout = new Layout();\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Styling element\\r\\n     */\\r\\n\\r\\n    function Styling() {\\r\\n        this.styles = {};\\r\\n        this.initials = {};\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Style element\\r\\n     */\\r\\n\\r\\n    function Style() {\\r\\n        this.id = null;\\r\\n        this.styleAttrs = null;\\r\\n        this.styleRefs = null;\\r\\n    }\\r\\n\\r\\n    Style.prototype.initFromNode = function (node, errorHandler) {\\r\\n        this.id = elementGetXMLID(node);\\r\\n        this.styleAttrs = elementGetStyles(node, errorHandler);\\r\\n        this.styleRefs = elementGetStyleRefs(node);\\r\\n    };\\r\\n    \\r\\n    /*\\r\\n     * Represents a TTML initial element\\r\\n     */\\r\\n\\r\\n    function Initial() {\\r\\n        this.styleAttrs = null;\\r\\n    }\\r\\n\\r\\n    Initial.prototype.initFromNode = function (node, errorHandler) {\\r\\n        \\r\\n        this.styleAttrs = {};\\r\\n        \\r\\n        for (var i in node.attributes) {\\r\\n\\r\\n            if (node.attributes[i].uri === imscNames.ns_itts ||\\r\\n                node.attributes[i].uri === imscNames.ns_ebutts ||\\r\\n                node.attributes[i].uri === imscNames.ns_tts) {\\r\\n                \\r\\n                var qname = node.attributes[i].uri + \" \" + node.attributes[i].local;\\r\\n                \\r\\n                this.styleAttrs[qname] = node.attributes[i].value;\\r\\n\\r\\n            }\\r\\n        }\\r\\n        \\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Layout element\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function Layout() {\\r\\n        this.regions = {};\\r\\n    }\\r\\n    \\r\\n    /*\\r\\n     * Represents a TTML image element\\r\\n     */\\r\\n\\r\\n    function Image(src, type) {\\r\\n        ContentElement.call(this, \\'image\\');\\r\\n        this.src = src;\\r\\n        this.type = type;\\r\\n    }\\r\\n\\r\\n    Image.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.src = \\'src\\' in node.attributes ? node.attributes.src.value : null;\\r\\n        \\r\\n        if (! this.src) {\\r\\n            reportError(errorHandler, \"Invalid image@src attribute\");\\r\\n        }\\r\\n        \\r\\n        this.type = \\'type\\' in node.attributes ? node.attributes.type.value : null;\\r\\n        \\r\\n        if (! this.type) {\\r\\n            reportError(errorHandler, \"Invalid image@type attribute\");\\r\\n        }\\r\\n        \\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * TTML element utility functions\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function ContentElement(kind) {\\r\\n        this.kind = kind;\\r\\n    }\\r\\n\\r\\n    function IdentifiedElement(id) {\\r\\n        this.id = id;\\r\\n    }\\r\\n\\r\\n    IdentifiedElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.id = elementGetXMLID(node);\\r\\n    };\\r\\n\\r\\n    function LayoutElement(id) {\\r\\n        this.regionID = id;\\r\\n    }\\r\\n\\r\\n    LayoutElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.regionID = elementGetRegionID(node);\\r\\n    };\\r\\n\\r\\n    function StyledElement(styleAttrs) {\\r\\n        this.styleAttrs = styleAttrs;\\r\\n    }\\r\\n\\r\\n    StyledElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n\\r\\n        this.styleAttrs = elementGetStyles(node, errorHandler);\\r\\n\\r\\n        if (doc.head !== null && doc.head.styling !== null) {\\r\\n            mergeReferencedStyles(doc.head.styling, elementGetStyleRefs(node), this.styleAttrs, errorHandler);\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n    function AnimatedElement(sets) {\\r\\n        this.sets = sets;\\r\\n    }\\r\\n\\r\\n    AnimatedElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.sets = [];\\r\\n    };\\r\\n\\r\\n    function ContainerElement(contents) {\\r\\n        this.contents = contents;\\r\\n    }\\r\\n\\r\\n    ContainerElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        this.contents = [];\\r\\n    };\\r\\n\\r\\n    function TimedElement(explicit_begin, explicit_end, explicit_dur) {\\r\\n        this.explicit_begin = explicit_begin;\\r\\n        this.explicit_end = explicit_end;\\r\\n        this.explicit_dur = explicit_dur;\\r\\n    }\\r\\n\\r\\n    TimedElement.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        var t = processTiming(doc, parent, node, errorHandler);\\r\\n        this.explicit_begin = t.explicit_begin;\\r\\n        this.explicit_end = t.explicit_end;\\r\\n        this.explicit_dur = t.explicit_dur;\\r\\n\\r\\n        this.timeContainer = elementGetTimeContainer(node, errorHandler);\\r\\n    };\\r\\n\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML body element\\r\\n     */\\r\\n\\r\\n\\r\\n\\r\\n    function Body() {\\r\\n        ContentElement.call(this, \\'body\\');\\r\\n    }\\r\\n\\r\\n\\r\\n    Body.prototype.initFromNode = function (doc, node, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML div element\\r\\n     */\\r\\n\\r\\n    function Div() {\\r\\n        ContentElement.call(this, \\'div\\');\\r\\n    }\\r\\n\\r\\n    Div.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML p element\\r\\n     */\\r\\n\\r\\n    function P() {\\r\\n        ContentElement.call(this, \\'p\\');\\r\\n    }\\r\\n\\r\\n    P.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML span element\\r\\n     */\\r\\n\\r\\n    function Span() {\\r\\n        ContentElement.call(this, \\'span\\');\\r\\n    }\\r\\n\\r\\n    Span.prototype.initFromNode = function (doc, parent, node, xmlspace, errorHandler) {\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        ContainerElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n\\r\\n        this.space = xmlspace;\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML anonymous span element\\r\\n     */\\r\\n\\r\\n    function AnonymousSpan() {\\r\\n        ContentElement.call(this, \\'span\\');\\r\\n    }\\r\\n\\r\\n    AnonymousSpan.prototype.initFromText = function (doc, parent, text, xmlspace, errorHandler) {\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, null, errorHandler);\\r\\n\\r\\n        this.text = text;\\r\\n        this.space = xmlspace;\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML br element\\r\\n     */\\r\\n\\r\\n    function Br() {\\r\\n        ContentElement.call(this, \\'br\\');\\r\\n    }\\r\\n\\r\\n    Br.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n        LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Region element\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function Region() {\\r\\n    }\\r\\n\\r\\n    Region.prototype.createDefaultRegion = function () {\\r\\n        var r = new Region();\\r\\n\\r\\n        IdentifiedElement.call(r, \\'\\');\\r\\n        StyledElement.call(r, {});\\r\\n        AnimatedElement.call(r, []);\\r\\n        TimedElement.call(r, 0, Number.POSITIVE_INFINITY, null);\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n    Region.prototype.initFromNode = function (doc, node, errorHandler) {\\r\\n        IdentifiedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        StyledElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n        AnimatedElement.prototype.initFromNode.call(this, doc, null, node, errorHandler);\\r\\n\\r\\n        /* immediately merge referenced styles */\\r\\n\\r\\n        if (doc.head !== null && doc.head.styling !== null) {\\r\\n            mergeReferencedStyles(doc.head.styling, elementGetStyleRefs(node), this.styleAttrs, errorHandler);\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Represents a TTML Set element\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function Set() {\\r\\n    }\\r\\n\\r\\n    Set.prototype.initFromNode = function (doc, parent, node, errorHandler) {\\r\\n\\r\\n        TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);\\r\\n\\r\\n        var styles = elementGetStyles(node, errorHandler);\\r\\n\\r\\n        this.qname = null;\\r\\n        this.value = null;\\r\\n\\r\\n        for (var qname in styles) {\\r\\n\\r\\n            if (this.qname) {\\r\\n\\r\\n                reportError(errorHandler, \"More than one style specified on set\");\\r\\n                break;\\r\\n\\r\\n            }\\r\\n\\r\\n            this.qname = qname;\\r\\n            this.value = styles[qname];\\r\\n\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n    /*\\r\\n     * Utility functions\\r\\n     * \\r\\n     */\\r\\n\\r\\n\\r\\n    function elementGetXMLID(node) {\\r\\n        return node && \\'xml:id\\' in node.attributes ? node.attributes[\\'xml:id\\'].value || null : null;\\r\\n    }\\r\\n\\r\\n    function elementGetRegionID(node) {\\r\\n        return node && \\'region\\' in node.attributes ? node.attributes.region.value : \\'\\';\\r\\n    }\\r\\n\\r\\n    function elementGetTimeContainer(node, errorHandler) {\\r\\n\\r\\n        var tc = node && \\'timeContainer\\' in node.attributes ? node.attributes.timeContainer.value : null;\\r\\n\\r\\n        if ((!tc) || tc === \"par\") {\\r\\n\\r\\n            return \"par\";\\r\\n\\r\\n        } else if (tc === \"seq\") {\\r\\n\\r\\n            return \"seq\";\\r\\n\\r\\n        } else {\\r\\n\\r\\n            reportError(errorHandler, \"Illegal value of timeContainer (assuming \\'par\\')\");\\r\\n\\r\\n            return \"par\";\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function elementGetStyleRefs(node) {\\r\\n\\r\\n        return node && \\'style\\' in node.attributes ? node.attributes.style.value.split(\" \") : [];\\r\\n\\r\\n    }\\r\\n\\r\\n    function elementGetStyles(node, errorHandler) {\\r\\n\\r\\n        var s = {};\\r\\n\\r\\n        if (node !== null) {\\r\\n\\r\\n            for (var i in node.attributes) {\\r\\n\\r\\n                var qname = node.attributes[i].uri + \" \" + node.attributes[i].local;\\r\\n\\r\\n                var sa = imscStyles.byQName[qname];\\r\\n\\r\\n                if (sa !== undefined) {\\r\\n\\r\\n                    var val = sa.parse(node.attributes[i].value);\\r\\n\\r\\n                    if (val !== null) {\\r\\n\\r\\n                        s[qname] = val;\\r\\n\\r\\n                        /* TODO: consider refactoring errorHandler into parse and compute routines */\\r\\n\\r\\n                        if (sa === imscStyles.byName.zIndex) {\\r\\n                            reportWarning(errorHandler, \"zIndex attribute present but not used by IMSC1 since regions do not overlap\");\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        reportError(errorHandler, \"Cannot parse styling attribute \" + qname + \" --\\x3e \" + node.attributes[i].value);\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return s;\\r\\n    }\\r\\n\\r\\n    function findAttribute(node, ns, name) {\\r\\n        for (var i in node.attributes) {\\r\\n\\r\\n            if (node.attributes[i].uri === ns &&\\r\\n                    node.attributes[i].local === name) {\\r\\n\\r\\n                return node.attributes[i].value;\\r\\n            }\\r\\n        }\\r\\n\\r\\n        return null;\\r\\n    }\\r\\n\\r\\n    function extractAspectRatio(node, errorHandler) {\\r\\n\\r\\n        var ar = findAttribute(node, imscNames.ns_ittp, \"aspectRatio\");\\r\\n\\r\\n        if (ar === null) {\\r\\n            \\r\\n            ar = findAttribute(node, imscNames.ns_ttp, \"displayAspectRatio\");\\r\\n            \\r\\n        }\\r\\n\\r\\n        var rslt = null;\\r\\n\\r\\n        if (ar !== null) {\\r\\n\\r\\n            var ASPECT_RATIO_RE = /(\\\\d+)\\\\s+(\\\\d+)/;\\r\\n\\r\\n            var m = ASPECT_RATIO_RE.exec(ar);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                var w = parseInt(m[1]);\\r\\n\\r\\n                var h = parseInt(m[2]);\\r\\n\\r\\n                if (w !== 0 && h !== 0) {\\r\\n\\r\\n                    rslt = w / h;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    reportError(errorHandler, \"Illegal aspectRatio values (ignoring)\");\\r\\n                }\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportError(errorHandler, \"Malformed aspectRatio attribute (ignoring)\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return rslt;\\r\\n\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Returns the cellResolution attribute from a node\\r\\n     * \\r\\n     */\\r\\n    function extractCellResolution(node, errorHandler) {\\r\\n\\r\\n        var cr = findAttribute(node, imscNames.ns_ttp, \"cellResolution\");\\r\\n\\r\\n        // initial value\\r\\n\\r\\n        var h = 15;\\r\\n        var w = 32;\\r\\n\\r\\n        if (cr !== null) {\\r\\n\\r\\n            var CELL_RESOLUTION_RE = /(\\\\d+) (\\\\d+)/;\\r\\n\\r\\n            var m = CELL_RESOLUTION_RE.exec(cr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                w = parseInt(m[1]);\\r\\n\\r\\n                h = parseInt(m[2]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed cellResolution value (using initial value instead)\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {\\'w\\': w, \\'h\\': h};\\r\\n\\r\\n    }\\r\\n\\r\\n\\r\\n    function extractFrameAndTickRate(node, errorHandler) {\\r\\n\\r\\n        // subFrameRate is ignored per IMSC1 specification\\r\\n\\r\\n        // extract frame rate\\r\\n\\r\\n        var fps_attr = findAttribute(node, imscNames.ns_ttp, \"frameRate\");\\r\\n\\r\\n        // initial value\\r\\n\\r\\n        var fps = 30;\\r\\n\\r\\n        // match variable\\r\\n\\r\\n        var m;\\r\\n\\r\\n        if (fps_attr !== null) {\\r\\n\\r\\n            var FRAME_RATE_RE = /(\\\\d+)/;\\r\\n\\r\\n            m = FRAME_RATE_RE.exec(fps_attr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                fps = parseInt(m[1]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed frame rate attribute (using initial value instead)\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        // extract frame rate multiplier\\r\\n\\r\\n        var frm_attr = findAttribute(node, imscNames.ns_ttp, \"frameRateMultiplier\");\\r\\n\\r\\n        // initial value\\r\\n\\r\\n        var frm = 1;\\r\\n\\r\\n        if (frm_attr !== null) {\\r\\n\\r\\n            var FRAME_RATE_MULT_RE = /(\\\\d+) (\\\\d+)/;\\r\\n\\r\\n            m = FRAME_RATE_MULT_RE.exec(frm_attr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                frm = parseInt(m[1]) / parseInt(m[2]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed frame rate multiplier attribute (using initial value instead)\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        var efps = frm * fps;\\r\\n\\r\\n        // extract tick rate\\r\\n\\r\\n        var tr = 1;\\r\\n\\r\\n        var trattr = findAttribute(node, imscNames.ns_ttp, \"tickRate\");\\r\\n\\r\\n        if (trattr === null) {\\r\\n\\r\\n            if (fps_attr !== null)\\r\\n                tr = efps;\\r\\n\\r\\n        } else {\\r\\n\\r\\n            var TICK_RATE_RE = /(\\\\d+)/;\\r\\n\\r\\n            m = TICK_RATE_RE.exec(trattr);\\r\\n\\r\\n            if (m !== null) {\\r\\n\\r\\n                tr = parseInt(m[1]);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed tick rate attribute (using initial value instead)\");\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {effectiveFrameRate: efps, tickRate: tr};\\r\\n\\r\\n    }\\r\\n\\r\\n    function extractExtent(node, errorHandler) {\\r\\n\\r\\n        var attr = findAttribute(node, imscNames.ns_tts, \"extent\");\\r\\n\\r\\n        if (attr === null)\\r\\n            return null;\\r\\n\\r\\n        var s = attr.split(\" \");\\r\\n\\r\\n        if (s.length !== 2) {\\r\\n\\r\\n            reportWarning(errorHandler, \"Malformed extent (ignoring)\");\\r\\n\\r\\n            return null;\\r\\n        }\\r\\n\\r\\n        var w = imscUtils.parseLength(s[0]);\\r\\n\\r\\n        var h = imscUtils.parseLength(s[1]);\\r\\n\\r\\n        if (!h || !w) {\\r\\n\\r\\n            reportWarning(errorHandler, \"Malformed extent values (ignoring)\");\\r\\n\\r\\n            return null;\\r\\n        }\\r\\n\\r\\n        return {\\'h\\': h, \\'w\\': w};\\r\\n\\r\\n    }\\r\\n\\r\\n    function parseTimeExpression(tickRate, effectiveFrameRate, str) {\\r\\n\\r\\n        var CLOCK_TIME_FRACTION_RE = /^(\\\\d{2,}):(\\\\d\\\\d):(\\\\d\\\\d(?:\\\\.\\\\d+)?)$/;\\r\\n        var CLOCK_TIME_FRAMES_RE = /^(\\\\d{2,}):(\\\\d\\\\d):(\\\\d\\\\d)\\\\:(\\\\d{2,})$/;\\r\\n        var OFFSET_FRAME_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)f$/;\\r\\n        var OFFSET_TICK_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)t$/;\\r\\n        var OFFSET_MS_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)ms$/;\\r\\n        var OFFSET_S_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)s$/;\\r\\n        var OFFSET_H_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)h$/;\\r\\n        var OFFSET_M_RE = /^(\\\\d+(?:\\\\.\\\\d+)?)m$/;\\r\\n        var m;\\r\\n        var r = null;\\r\\n        if ((m = OFFSET_FRAME_RE.exec(str)) !== null) {\\r\\n\\r\\n            if (effectiveFrameRate !== null) {\\r\\n\\r\\n                r = parseFloat(m[1]) / effectiveFrameRate;\\r\\n            }\\r\\n\\r\\n        } else if ((m = OFFSET_TICK_RE.exec(str)) !== null) {\\r\\n\\r\\n            if (tickRate !== null) {\\r\\n\\r\\n                r = parseFloat(m[1]) / tickRate;\\r\\n            }\\r\\n\\r\\n        } else if ((m = OFFSET_MS_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]) / 1000.0;\\r\\n\\r\\n        } else if ((m = OFFSET_S_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]);\\r\\n\\r\\n        } else if ((m = OFFSET_H_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]) * 3600.0;\\r\\n\\r\\n        } else if ((m = OFFSET_M_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseFloat(m[1]) * 60.0;\\r\\n\\r\\n        } else if ((m = CLOCK_TIME_FRACTION_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = parseInt(m[1]) * 3600 +\\r\\n                    parseInt(m[2]) * 60 +\\r\\n                    parseFloat(m[3]);\\r\\n\\r\\n        } else if ((m = CLOCK_TIME_FRAMES_RE.exec(str)) !== null) {\\r\\n\\r\\n            /* this assumes that HH:MM:SS is a clock-time-with-fraction */\\r\\n\\r\\n            if (effectiveFrameRate !== null) {\\r\\n\\r\\n                r = parseInt(m[1]) * 3600 +\\r\\n                        parseInt(m[2]) * 60 +\\r\\n                        parseInt(m[3]) +\\r\\n                        (m[4] === null ? 0 : parseInt(m[4]) / effectiveFrameRate);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    }\\r\\n\\r\\n    function processTiming(doc, parent, node, errorHandler) {\\r\\n\\r\\n        /* determine explicit begin */\\r\\n\\r\\n        var explicit_begin = null;\\r\\n\\r\\n        if (node && \\'begin\\' in node.attributes) {\\r\\n\\r\\n            explicit_begin = parseTimeExpression(doc.tickRate, doc.effectiveFrameRate, node.attributes.begin.value);\\r\\n\\r\\n            if (explicit_begin === null) {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed begin value \" + node.attributes.begin.value + \" (using 0)\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* determine explicit duration */\\r\\n\\r\\n        var explicit_dur = null;\\r\\n\\r\\n        if (node && \\'dur\\' in node.attributes) {\\r\\n\\r\\n            explicit_dur = parseTimeExpression(doc.tickRate, doc.effectiveFrameRate, node.attributes.dur.value);\\r\\n\\r\\n            if (explicit_dur === null) {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed dur value \" + node.attributes.dur.value + \" (ignoring)\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* determine explicit end */\\r\\n\\r\\n        var explicit_end = null;\\r\\n\\r\\n        if (node && \\'end\\' in node.attributes) {\\r\\n\\r\\n            explicit_end = parseTimeExpression(doc.tickRate, doc.effectiveFrameRate, node.attributes.end.value);\\r\\n\\r\\n            if (explicit_end === null) {\\r\\n\\r\\n                reportWarning(errorHandler, \"Malformed end value (ignoring)\");\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {explicit_begin: explicit_begin,\\r\\n            explicit_end: explicit_end,\\r\\n            explicit_dur: explicit_dur};\\r\\n\\r\\n    }\\r\\n\\r\\n\\r\\n\\r\\n    function mergeChainedStyles(styling, style, errorHandler) {\\r\\n\\r\\n        while (style.styleRefs.length > 0) {\\r\\n\\r\\n            var sref = style.styleRefs.pop();\\r\\n\\r\\n            if (!(sref in styling.styles)) {\\r\\n                reportError(errorHandler, \"Non-existant style id referenced\");\\r\\n                continue;\\r\\n            }\\r\\n\\r\\n            mergeChainedStyles(styling, styling.styles[sref], errorHandler);\\r\\n\\r\\n            mergeStylesIfNotPresent(styling.styles[sref].styleAttrs, style.styleAttrs);\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function mergeReferencedStyles(styling, stylerefs, styleattrs, errorHandler) {\\r\\n\\r\\n        for (var i = stylerefs.length - 1; i >= 0; i--) {\\r\\n\\r\\n            var sref = stylerefs[i];\\r\\n\\r\\n            if (!(sref in styling.styles)) {\\r\\n                reportError(errorHandler, \"Non-existant style id referenced\");\\r\\n                continue;\\r\\n            }\\r\\n\\r\\n            mergeStylesIfNotPresent(styling.styles[sref].styleAttrs, styleattrs);\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function mergeStylesIfNotPresent(from_styles, into_styles) {\\r\\n\\r\\n        for (var sname in from_styles) {\\r\\n\\r\\n            if (sname in into_styles)\\r\\n                continue;\\r\\n\\r\\n            into_styles[sname] = from_styles[sname];\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    /* TODO: validate style format at parsing */\\r\\n\\r\\n\\r\\n    /*\\r\\n     * ERROR HANDLING UTILITY FUNCTIONS\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function reportInfo(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.info && errorHandler.info(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportWarning(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.warn && errorHandler.warn(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportError(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.error && errorHandler.error(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportFatal(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.fatal)\\r\\n            errorHandler.fatal(msg);\\r\\n\\r\\n        throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    /*\\r\\n     * Binary search utility function\\r\\n     * \\r\\n     * @typedef {Object} BinarySearchResult\\r\\n     * @property {boolean} found Was an exact match found?\\r\\n     * @property {number} index Position of the exact match or insert position\\r\\n     * \\r\\n     * @returns {BinarySearchResult}\\r\\n     */\\r\\n\\r\\n    function indexOf(arr, searchval) {\\r\\n\\r\\n        var min = 0;\\r\\n        var max = arr.length - 1;\\r\\n        var cur;\\r\\n\\r\\n        while (min <= max) {\\r\\n\\r\\n            cur = Math.floor((min + max) / 2);\\r\\n\\r\\n            var curval = arr[cur];\\r\\n\\r\\n            if (curval < searchval) {\\r\\n\\r\\n                min = cur + 1;\\r\\n\\r\\n            } else if (curval > searchval) {\\r\\n\\r\\n                max = cur - 1;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                return {found: true, index: cur};\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return {found: false, index: min};\\r\\n    }\\r\\n\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n        typeof sax === \\'undefined\\' ? __webpack_require__(/*! sax */ \"../node_modules/imsc/node_modules/sax/lib/sax.js\") : sax,\\r\\n        typeof imscNames === \\'undefined\\' ? __webpack_require__(/*! ./names */ \"../node_modules/imsc/src/main/js/names.js\") : imscNames,\\r\\n        typeof imscStyles === \\'undefined\\' ? __webpack_require__(/*! ./styles */ \"../node_modules/imsc/src/main/js/styles.js\") : imscStyles,\\r\\n        typeof imscUtils === \\'undefined\\' ? __webpack_require__(/*! ./utils */ \"../node_modules/imsc/src/main/js/utils.js\") : imscUtils);\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/doc.js?')},\"../node_modules/imsc/src/main/js/html.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscHTML\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscHTML, imscNames, imscStyles) {\\r\\n\\r\\n    /**\\r\\n     * Function that maps <pre>smpte:background</pre> URIs to URLs resolving to image resource\\r\\n     * @callback IMGResolver\\r\\n     * @param {string} <pre>smpte:background</pre> URI\\r\\n     * @return {string} PNG resource URL\\r\\n     */\\r\\n\\r\\n\\r\\n    /**\\r\\n     * Renders an ISD object (returned by <pre>generateISD()</pre>) into a \\r\\n     * parent element, that must be attached to the DOM. The ISD will be rendered\\r\\n     * into a child <pre>div</pre>\\r\\n     * with heigh and width equal to the clientHeight and clientWidth of the element,\\r\\n     * unless explicitly specified otherwise by the caller. Images URIs specified \\r\\n     * by <pre>smpte:background</pre> attributes are mapped to image resource URLs\\r\\n     * by an <pre>imgResolver</pre> function. The latter takes the value of <code>smpte:background</code>\\r\\n     * attribute and an <code>img</code> DOM element as input, and is expected to\\r\\n     * set the <code>src</code> attribute of the <code>img</code> to the absolute URI of the image.\\r\\n     * <pre>displayForcedOnlyMode</pre> sets the (boolean)\\r\\n     * value of the IMSC1 displayForcedOnlyMode parameter. The function returns\\r\\n     * an opaque object that should passed in <code>previousISDState</code> when this function\\r\\n     * is called for the next ISD, otherwise <code>previousISDState</code> should be set to \\r\\n     * <code>null</code>.\\r\\n     * \\r\\n     * @param {Object} isd ISD to be rendered\\r\\n     * @param {Object} element Element into which the ISD is rendered\\r\\n     * @param {?IMGResolver} imgResolver Resolve <pre>smpte:background</pre> URIs into URLs.\\r\\n     * @param {?number} eheight Height (in pixel) of the child <div>div</div> or null \\r\\n     *                  to use clientHeight of the parent element\\r\\n     * @param {?number} ewidth Width (in pixel) of the child <div>div</div> or null\\r\\n     *                  to use clientWidth of the parent element\\r\\n     * @param {?boolean} displayForcedOnlyMode Value of the IMSC1 displayForcedOnlyMode parameter,\\r\\n     *                   or false if null         \\r\\n     * @param {?module:imscUtils.ErrorHandler} errorHandler Error callback\\r\\n     * @param {Object} previousISDState State saved during processing of the previous ISD, or null if initial call\\r\\n     * @param {?boolean} enableRollUp Enables roll-up animations (see CEA 708)\\r\\n     * @return {Object} ISD state to be provided when this funtion is called for the next ISD\\r\\n     */\\r\\n\\r\\n    imscHTML.render = function (isd,\\r\\n            element,\\r\\n            imgResolver,\\r\\n            eheight,\\r\\n            ewidth,\\r\\n            displayForcedOnlyMode,\\r\\n            errorHandler,\\r\\n            previousISDState,\\r\\n            enableRollUp\\r\\n            ) {\\r\\n\\r\\n        /* maintain aspect ratio if specified */\\r\\n\\r\\n        var height = eheight || element.clientHeight;\\r\\n        var width = ewidth || element.clientWidth;\\r\\n\\r\\n        if (isd.aspectRatio !== null) {\\r\\n\\r\\n            var twidth = height * isd.aspectRatio;\\r\\n\\r\\n            if (twidth > width) {\\r\\n\\r\\n                height = Math.round(width / isd.aspectRatio);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                width = twidth;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        var rootcontainer = document.createElement(\"div\");\\r\\n\\r\\n        rootcontainer.style.position = \"relative\";\\r\\n        rootcontainer.style.width = width + \"px\";\\r\\n        rootcontainer.style.height = height + \"px\";\\r\\n        rootcontainer.style.margin = \"auto\";\\r\\n        rootcontainer.style.top = 0;\\r\\n        rootcontainer.style.bottom = 0;\\r\\n        rootcontainer.style.left = 0;\\r\\n        rootcontainer.style.right = 0;\\r\\n        rootcontainer.style.zIndex = 0;\\r\\n\\r\\n        var context = {\\r\\n            h: height,\\r\\n            w: width,\\r\\n            regionH: null,\\r\\n            regionW: null,\\r\\n            imgResolver: imgResolver,\\r\\n            displayForcedOnlyMode: displayForcedOnlyMode || false,\\r\\n            isd: isd,\\r\\n            errorHandler: errorHandler,\\r\\n            previousISDState: previousISDState,\\r\\n            enableRollUp: enableRollUp || false,\\r\\n            currentISDState: {},\\r\\n            flg: null, /* current fillLineGap value if active, null otherwise */\\r\\n            lp: null, /* current linePadding value if active, null otherwise */\\r\\n            mra: null, /* current multiRowAlign value if active, null otherwise */\\r\\n            ipd: null, /* inline progression direction (lr, rl, tb) */\\r\\n            bpd: null, /* block progression direction (lr, rl, tb) */\\r\\n            ruby: null, /* is ruby present in a <p> */\\r\\n            textEmphasis: null, /* is textEmphasis present in a <p> */\\r\\n            rubyReserve: null /* is rubyReserve applicable to a <p> */\\r\\n        };\\r\\n\\r\\n        element.appendChild(rootcontainer);\\r\\n\\r\\n        for (var i in isd.contents) {\\r\\n\\r\\n            processElement(context, rootcontainer, isd.contents[i]);\\r\\n\\r\\n        }\\r\\n\\r\\n        return context.currentISDState;\\r\\n\\r\\n    };\\r\\n\\r\\n    function processElement(context, dom_parent, isd_element) {\\r\\n\\r\\n        var e;\\r\\n\\r\\n        if (isd_element.kind === \\'region\\') {\\r\\n\\r\\n            e = document.createElement(\"div\");\\r\\n            e.style.position = \"absolute\";\\r\\n\\r\\n        } else if (isd_element.kind === \\'body\\') {\\r\\n\\r\\n            e = document.createElement(\"div\");\\r\\n\\r\\n        } else if (isd_element.kind === \\'div\\') {\\r\\n\\r\\n            e = document.createElement(\"div\");\\r\\n\\r\\n        } else if (isd_element.kind === \\'image\\') {\\r\\n\\r\\n            e = document.createElement(\"img\");\\r\\n\\r\\n            if (context.imgResolver !== null && isd_element.src !== null) {\\r\\n\\r\\n                var uri = context.imgResolver(isd_element.src, e);\\r\\n\\r\\n                if (uri)\\r\\n                    e.src = uri;\\r\\n\\r\\n                e.height = context.regionH;\\r\\n                e.width = context.regionW;\\r\\n\\r\\n            }\\r\\n\\r\\n        } else if (isd_element.kind === \\'p\\') {\\r\\n\\r\\n            e = document.createElement(\"p\");\\r\\n\\r\\n        } else if (isd_element.kind === \\'span\\') {\\r\\n\\r\\n            if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"container\") {\\r\\n\\r\\n                e = document.createElement(\"ruby\");\\r\\n\\r\\n                context.ruby = true;\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"base\") {\\r\\n\\r\\n                e = document.createElement(\"rb\");\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"text\") {\\r\\n\\r\\n                e = document.createElement(\"rt\");\\r\\n\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"baseContainer\") {\\r\\n\\r\\n                e = document.createElement(\"rbc\");\\r\\n\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"textContainer\") {\\r\\n\\r\\n                e = document.createElement(\"rtc\");\\r\\n\\r\\n\\r\\n            } else if (isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"delimiter\") {\\r\\n\\r\\n                /* ignore rp */\\r\\n\\r\\n                return;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                e = document.createElement(\"span\");\\r\\n\\r\\n            }\\r\\n\\r\\n            var te = isd_element.styleAttrs[imscStyles.byName.textEmphasis.qname];\\r\\n\\r\\n            if (te && te.style !== \"none\") {\\r\\n\\r\\n                context.textEmphasis = true;\\r\\n\\r\\n            }\\r\\n\\r\\n            //e.textContent = isd_element.text;\\r\\n\\r\\n        } else if (isd_element.kind === \\'br\\') {\\r\\n\\r\\n            e = document.createElement(\"br\");\\r\\n\\r\\n        }\\r\\n\\r\\n        if (!e) {\\r\\n\\r\\n            reportError(context.errorHandler, \"Error processing ISD element kind: \" + isd_element.kind);\\r\\n\\r\\n            return;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* add to parent */\\r\\n\\r\\n        dom_parent.appendChild(e);\\r\\n\\r\\n        /* override UA default margin */\\r\\n        /* TODO: should apply to <p> only */\\r\\n\\r\\n        e.style.margin = \"0\";\\r\\n\\r\\n        /* tranform TTML styles to CSS styles */\\r\\n\\r\\n        for (var i in STYLING_MAP_DEFS) {\\r\\n\\r\\n            var sm = STYLING_MAP_DEFS[i];\\r\\n\\r\\n            var attr = isd_element.styleAttrs[sm.qname];\\r\\n\\r\\n            if (attr !== undefined && sm.map !== null) {\\r\\n\\r\\n                sm.map(context, e, isd_element, attr);\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        var proc_e = e;\\r\\n\\r\\n        /* remember writing direction */\\r\\n\\r\\n        if (isd_element.kind === \"region\") {\\r\\n\\r\\n            var wdir = isd_element.styleAttrs[imscStyles.byName.writingMode.qname];\\r\\n\\r\\n            if (wdir === \"lrtb\" || wdir === \"lr\") {\\r\\n\\r\\n                context.ipd = \"lr\";\\r\\n                context.bpd = \"tb\";\\r\\n\\r\\n            } else if (wdir === \"rltb\" || wdir === \"rl\") {\\r\\n\\r\\n                context.ipd = \"rl\";\\r\\n                context.bpd = \"tb\";\\r\\n\\r\\n            } else if (wdir === \"tblr\") {\\r\\n\\r\\n                context.ipd = \"tb\";\\r\\n                context.bpd = \"lr\";\\r\\n\\r\\n            } else if (wdir === \"tbrl\" || wdir === \"tb\") {\\r\\n\\r\\n                context.ipd = \"tb\";\\r\\n                context.bpd = \"rl\";\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* do we have linePadding ? */\\r\\n\\r\\n        var lp = isd_element.styleAttrs[imscStyles.byName.linePadding.qname];\\r\\n\\r\\n        if (lp && (! lp.isZero())) {\\r\\n\\r\\n            var plength = lp.toUsedLength(context.w, context.h);\\r\\n\\r\\n\\r\\n            if (plength > 0) {\\r\\n                \\r\\n                /* apply padding to the <p> so that line padding does not cause line wraps */\\r\\n\\r\\n                var padmeasure = Math.ceil(plength) + \"px\";\\r\\n\\r\\n                if (context.bpd === \"tb\") {\\r\\n\\r\\n                    proc_e.style.paddingLeft = padmeasure;\\r\\n                    proc_e.style.paddingRight = padmeasure;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    proc_e.style.paddingTop = padmeasure;\\r\\n                    proc_e.style.paddingBottom = padmeasure;\\r\\n\\r\\n                }\\r\\n\\r\\n                context.lp = lp;\\r\\n            }\\r\\n        }\\r\\n\\r\\n        // do we have multiRowAlign?\\r\\n\\r\\n        var mra = isd_element.styleAttrs[imscStyles.byName.multiRowAlign.qname];\\r\\n\\r\\n        if (mra && mra !== \"auto\") {\\r\\n\\r\\n            /* create inline block to handle multirowAlign */\\r\\n\\r\\n            var s = document.createElement(\"span\");\\r\\n\\r\\n            s.style.display = \"inline-block\";\\r\\n\\r\\n            s.style.textAlign = mra;\\r\\n\\r\\n            e.appendChild(s);\\r\\n\\r\\n            proc_e = s;\\r\\n\\r\\n            context.mra = mra;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* do we have rubyReserve? */\\r\\n\\r\\n        var rr = isd_element.styleAttrs[imscStyles.byName.rubyReserve.qname];\\r\\n\\r\\n        if (rr && rr[0] !== \"none\") {\\r\\n            context.rubyReserve = rr;\\r\\n        }\\r\\n\\r\\n\\r\\n        /* remember we are filling line gaps */\\r\\n\\r\\n        if (isd_element.styleAttrs[imscStyles.byName.fillLineGap.qname]) {\\r\\n            context.flg = true;\\r\\n        }\\r\\n\\r\\n\\r\\n        if (isd_element.kind === \"span\" && isd_element.text) {\\r\\n\\r\\n            if (imscStyles.byName.textCombine.qname in isd_element.styleAttrs &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.textCombine.qname][0] === \"all\") {\\r\\n\\r\\n                /* ignore tate-chu-yoku since line break cannot happen within */\\r\\n                e.textContent = isd_element.text;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                // wrap characters in spans to find the line wrap locations\\r\\n\\r\\n                var cbuf = \\'\\';\\r\\n\\r\\n                for (var j = 0; j < isd_element.text.length; j++) {\\r\\n\\r\\n                    cbuf += isd_element.text.charAt(j);\\r\\n\\r\\n                    var cc = isd_element.text.charCodeAt(j);\\r\\n\\r\\n                    if (cc < 0xD800 || cc > 0xDBFF || j === isd_element.text.length) {\\r\\n\\r\\n                        /* wrap the character(s) in a span unless it is a high surrogate */\\r\\n\\r\\n                        var span = document.createElement(\"span\");\\r\\n\\r\\n                        span.textContent = cbuf;\\r\\n    \\r\\n                        e.appendChild(span);\\r\\n\\r\\n                        cbuf = \\'\\';\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n        }\\r\\n\\r\\n        /* process the children of the ISD element */\\r\\n\\r\\n        for (var k in isd_element.contents) {\\r\\n\\r\\n            processElement(context, proc_e, isd_element.contents[k]);\\r\\n\\r\\n        }\\r\\n\\r\\n        /* list of lines */\\r\\n\\r\\n        var linelist = [];\\r\\n\\r\\n\\r\\n        /* paragraph processing */\\r\\n        /* TODO: linePadding only supported for horizontal scripts */\\r\\n\\r\\n        if ((context.lp || context.mra || context.flg || context.ruby || context.textEmphasis || context.rubyReserve) &&\\r\\n                isd_element.kind === \"p\") {\\r\\n\\r\\n            constructLineList(context, proc_e, linelist, null);\\r\\n\\r\\n            /* apply rubyReserve */\\r\\n\\r\\n            if (context.rubyReserve) {\\r\\n\\r\\n                applyRubyReserve(linelist, context);\\r\\n\\r\\n                context.rubyReserve = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* apply tts:rubyPosition=\"outside\" */\\r\\n\\r\\n            if (context.ruby || context.rubyReserve) {\\r\\n\\r\\n                applyRubyPosition(linelist, context);\\r\\n\\r\\n                context.ruby = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* apply text emphasis \"outside\" position */\\r\\n\\r\\n            if (context.textEmphasis) {\\r\\n\\r\\n                applyTextEmphasis(linelist, context);\\r\\n\\r\\n                context.textEmphasis = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* insert line breaks for multirowalign */\\r\\n\\r\\n            if (context.mra) {\\r\\n\\r\\n                applyMultiRowAlign(linelist);\\r\\n\\r\\n                context.mra = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* add linepadding */\\r\\n\\r\\n            if (context.lp) {\\r\\n\\r\\n                applyLinePadding(linelist, context.lp.toUsedLength(context.w, context.h), context);\\r\\n\\r\\n                context.lp = null;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* fill line gaps linepadding */\\r\\n\\r\\n            if (context.flg) {\\r\\n\\r\\n                var par_edges = rect2edges(proc_e.getBoundingClientRect(), context);\\r\\n\\r\\n                applyFillLineGap(linelist, par_edges.before, par_edges.after, context);\\r\\n\\r\\n                context.flg = null;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n\\r\\n        /* region processing */\\r\\n\\r\\n        if (isd_element.kind === \"region\") {\\r\\n\\r\\n            /* build line list */\\r\\n\\r\\n            constructLineList(context, proc_e, linelist);\\r\\n\\r\\n            /* perform roll up if needed */\\r\\n\\r\\n            if ((context.bpd === \"tb\") &&\\r\\n                    context.enableRollUp &&\\r\\n                    isd_element.contents.length > 0 &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.displayAlign.qname] === \\'after\\') {\\r\\n\\r\\n                /* horrible hack, perhaps default region id should be underscore everywhere? */\\r\\n\\r\\n                var rid = isd_element.id === \\'\\' ? \\'_\\' : isd_element.id;\\r\\n\\r\\n                var rb = new RegionPBuffer(rid, linelist);\\r\\n\\r\\n                context.currentISDState[rb.id] = rb;\\r\\n\\r\\n                if (context.previousISDState &&\\r\\n                        rb.id in context.previousISDState &&\\r\\n                        context.previousISDState[rb.id].plist.length > 0 &&\\r\\n                        rb.plist.length > 1 &&\\r\\n                        rb.plist[rb.plist.length - 2].text ===\\r\\n                        context.previousISDState[rb.id].plist[context.previousISDState[rb.id].plist.length - 1].text) {\\r\\n\\r\\n                    var body_elem = e.firstElementChild;\\r\\n\\r\\n                    var h = rb.plist[rb.plist.length - 1].after - rb.plist[rb.plist.length - 1].before;\\r\\n\\r\\n                    body_elem.style.bottom = \"-\" + h + \"px\";\\r\\n                    body_elem.style.transition = \"transform 0.4s\";\\r\\n                    body_elem.style.position = \"relative\";\\r\\n                    body_elem.style.transform = \"translateY(-\" + h + \"px)\";\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* TODO: clean-up the spans ? */\\r\\n\\r\\n        }\\r\\n    }\\r\\n\\r\\n    function applyLinePadding(lineList, lp, context) {\\r\\n\\r\\n        for (var i in lineList) {\\r\\n\\r\\n            var l = lineList[i].elements.length;\\r\\n\\r\\n            var se = lineList[i].elements[lineList[i].start_elem];\\r\\n\\r\\n            var ee = lineList[i].elements[lineList[i].end_elem];\\r\\n\\r\\n            var pospadpxlen = Math.ceil(lp) + \"px\";\\r\\n\\r\\n            var negpadpxlen = \"-\" + Math.ceil(lp) + \"px\";\\r\\n\\r\\n            if (l !== 0) {\\r\\n\\r\\n                if (context.ipd === \"lr\") {\\r\\n\\r\\n                    se.node.style.borderLeftColor = se.bgcolor || \"#00000000\";\\r\\n                    se.node.style.borderLeftStyle = \"solid\";\\r\\n                    se.node.style.borderLeftWidth = pospadpxlen;\\r\\n                    se.node.style.marginLeft = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \"rl\") {\\r\\n\\r\\n                    se.node.style.borderRightColor = se.bgcolor || \"#00000000\";\\r\\n                    se.node.style.borderRightStyle = \"solid\";\\r\\n                    se.node.style.borderRightWidth = pospadpxlen;\\r\\n                    se.node.style.marginRight = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \"tb\") {\\r\\n\\r\\n                    se.node.style.borderTopColor = se.bgcolor || \"#00000000\";\\r\\n                    se.node.style.borderTopStyle = \"solid\";\\r\\n                    se.node.style.borderTopWidth = pospadpxlen;\\r\\n                    se.node.style.marginTop = negpadpxlen;\\r\\n\\r\\n                }\\r\\n\\r\\n                if (context.ipd === \"lr\") {\\r\\n\\r\\n                    ee.node.style.borderRightColor = ee.bgcolor  || \"#00000000\";\\r\\n                    ee.node.style.borderRightStyle = \"solid\";\\r\\n                    ee.node.style.borderRightWidth = pospadpxlen;\\r\\n                    ee.node.style.marginRight = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \"rl\") {\\r\\n\\r\\n                    ee.node.style.borderLeftColor = ee.bgcolor || \"#00000000\";\\r\\n                    ee.node.style.borderLeftStyle = \"solid\";\\r\\n                    ee.node.style.borderLeftWidth = pospadpxlen;\\r\\n                    ee.node.style.marginLeft = negpadpxlen;\\r\\n\\r\\n                } else if (context.ipd === \"tb\") {\\r\\n\\r\\n                    ee.node.style.borderBottomColor = ee.bgcolor || \"#00000000\";\\r\\n                    ee.node.style.borderBottomStyle = \"solid\";\\r\\n                    ee.node.style.borderBottomWidth = pospadpxlen;\\r\\n                    ee.node.style.marginBottom = negpadpxlen;\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyMultiRowAlign(lineList) {\\r\\n\\r\\n        /* apply an explicit br to all but the last line */\\r\\n\\r\\n        for (var i = 0; i < lineList.length - 1; i++) {\\r\\n\\r\\n            var l = lineList[i].elements.length;\\r\\n\\r\\n            if (l !== 0 && lineList[i].br === false) {\\r\\n                var br = document.createElement(\"br\");\\r\\n\\r\\n                var lastnode = lineList[i].elements[l - 1].node;\\r\\n\\r\\n                lastnode.parentElement.insertBefore(br, lastnode.nextSibling);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyTextEmphasis(lineList, context) {\\r\\n\\r\\n        /* supports \"outside\" only */\\r\\n\\r\\n        for (var i = 0; i < lineList.length; i++) {\\r\\n\\r\\n            for (var j = 0; j < lineList[i].te.length; j++) {\\r\\n\\r\\n                /* skip if position already set */\\r\\n\\r\\n                if (lineList[i].te[j].style.textEmphasisPosition &&\\r\\n                    lineList[i].te[j].style.textEmphasisPosition !== \"none\")\\r\\n                    continue;\\r\\n\\r\\n                var pos;\\r\\n\\r\\n                if (context.bpd === \"tb\") {\\r\\n\\r\\n                    pos = (i === 0) ? \"left over\" : \"left under\";\\r\\n\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    if (context.bpd === \"rl\") {\\r\\n\\r\\n                        pos = (i === 0) ? \"right under\" : \"left under\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        pos = (i === 0) ? \"left under\" : \"right under\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                lineList[i].te[j].style.textEmphasisPosition = pos;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyRubyPosition(lineList, context) {\\r\\n\\r\\n        for (var i = 0; i < lineList.length; i++) {\\r\\n\\r\\n            for (var j = 0; j < lineList[i].rbc.length; j++) {\\r\\n\\r\\n                /* skip if ruby-position already set */\\r\\n\\r\\n                if (lineList[i].rbc[j].style.rubyPosition)\\r\\n                    continue;\\r\\n\\r\\n                var pos;\\r\\n\\r\\n                if (context.bpd === \"tb\") {\\r\\n\\r\\n                    pos = (i === 0) ? \"over\" : \"under\";\\r\\n\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    if (context.bpd === \"rl\") {\\r\\n\\r\\n                        pos = (i === 0) ? \"over\" : \"under\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        pos = (i === 0) ? \"under\" : \"over\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                lineList[i].rbc[j].style.rubyPosition = pos;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyRubyReserve(lineList, context) {\\r\\n\\r\\n        for (var i = 0; i < lineList.length; i++) {\\r\\n\\r\\n            var ruby = document.createElement(\"ruby\");\\r\\n\\r\\n            var rb = document.createElement(\"rb\");\\r\\n            rb.textContent = \"\\\\u200B\";\\r\\n\\r\\n            ruby.appendChild(rb);\\r\\n\\r\\n            var rt1;\\r\\n            var rt2;\\r\\n\\r\\n            var fs = context.rubyReserve[1].toUsedLength(context.w, context.h) + \"px\";\\r\\n\\r\\n            if (context.rubyReserve[0] === \"both\") {\\r\\n\\r\\n                rt1 = document.createElement(\"rtc\");\\r\\n                rt1.style.rubyPosition = \"under\";\\r\\n                rt1.textContent = \"\\\\u200B\";\\r\\n                rt1.style.fontSize = fs;\\r\\n\\r\\n                rt2 = document.createElement(\"rtc\");\\r\\n                rt2.style.rubyPosition = \"over\";\\r\\n                rt2.textContent = \"\\\\u200B\";\\r\\n                rt2.style.fontSize = fs;\\r\\n\\r\\n                ruby.appendChild(rt1);\\r\\n                ruby.appendChild(rt2);\\r\\n\\r\\n            } else {\\r\\n\\r\\n                rt1 = document.createElement(\"rtc\");\\r\\n                rt1.textContent = \"\\\\u200B\";\\r\\n                rt1.style.fontSize = fs;\\r\\n\\r\\n                if (context.rubyReserve[0] === \"after\" || (context.rubyReserve[0] === \"outside\" && i > 0)) {\\r\\n\\r\\n                    rt1.style.rubyPosition = (context.bpd === \"tb\" || context.bpd === \"rl\") ? \"under\" : \"over\";\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rt1.style.rubyPosition = (context.bpd === \"tb\" || context.bpd === \"rl\") ? \"over\" : \"under\";\\r\\n\\r\\n                }\\r\\n\\r\\n                ruby.appendChild(rt1);\\r\\n\\r\\n            }\\r\\n\\r\\n            var e = lineList[i].elements[0].node.parentElement.insertBefore(\\r\\n                    ruby,\\r\\n                    lineList[i].elements[0].node\\r\\n                    );\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function applyFillLineGap(lineList, par_before, par_after, context) {\\r\\n\\r\\n        /* positive for BPD = lr and tb, negative for BPD = rl */\\r\\n        var s = Math.sign(par_after - par_before);\\r\\n\\r\\n        for (var i = 0; i <= lineList.length; i++) {\\r\\n\\r\\n            /* compute frontier between lines */\\r\\n\\r\\n            var frontier;\\r\\n\\r\\n            if (i === 0) {\\r\\n\\r\\n                frontier = par_before;\\r\\n\\r\\n            } else if (i === lineList.length) {\\r\\n\\r\\n                frontier = par_after;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                frontier = (lineList[i].before + lineList[i - 1].after) / 2;\\r\\n\\r\\n            }\\r\\n\\r\\n            /* padding amount */\\r\\n\\r\\n            var pad;\\r\\n\\r\\n            /* current element */\\r\\n\\r\\n            var e;\\r\\n\\r\\n            /* before line */\\r\\n\\r\\n            if (i > 0) {\\r\\n\\r\\n                for (var j = 0; j < lineList[i - 1].elements.length; j++) {\\r\\n\\r\\n                    if (lineList[i - 1].elements[j].bgcolor === null)\\r\\n                        continue;\\r\\n\\r\\n                    e = lineList[i - 1].elements[j];\\r\\n\\r\\n                    if (s * (e.after - frontier) < 0) {\\r\\n\\r\\n                        pad = Math.ceil(Math.abs(frontier - e.after)) + \"px\";\\r\\n\\r\\n                        e.node.style.backgroundColor = e.bgcolor;\\r\\n\\r\\n                        if (context.bpd === \"lr\") {\\r\\n\\r\\n                            e.node.style.paddingRight = pad;\\r\\n\\r\\n\\r\\n                        } else if (context.bpd === \"rl\") {\\r\\n\\r\\n                            e.node.style.paddingLeft = pad;\\r\\n\\r\\n                        } else if (context.bpd === \"tb\") {\\r\\n\\r\\n                            e.node.style.paddingBottom = pad;\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* after line */\\r\\n\\r\\n            if (i < lineList.length) {\\r\\n\\r\\n                for (var k = 0; k < lineList[i].elements.length; k++) {\\r\\n\\r\\n                    e = lineList[i].elements[k];\\r\\n\\r\\n                    if (e.bgcolor === null)\\r\\n                        continue;\\r\\n\\r\\n                    if (s * (e.before - frontier) > 0) {\\r\\n\\r\\n                        pad = Math.ceil(Math.abs(e.before - frontier)) + \"px\";\\r\\n\\r\\n                        e.node.style.backgroundColor = e.bgcolor;\\r\\n\\r\\n                        if (context.bpd === \"lr\") {\\r\\n\\r\\n                            e.node.style.paddingLeft = pad;\\r\\n\\r\\n\\r\\n                        } else if (context.bpd === \"rl\") {\\r\\n\\r\\n                            e.node.style.paddingRight = pad;\\r\\n\\r\\n\\r\\n                        } else if (context.bpd === \"tb\") {\\r\\n\\r\\n                            e.node.style.paddingTop = pad;\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function RegionPBuffer(id, lineList) {\\r\\n\\r\\n        this.id = id;\\r\\n\\r\\n        this.plist = lineList;\\r\\n\\r\\n    }\\r\\n\\r\\n    function pruneEmptySpans(element) {\\r\\n\\r\\n        var child = element.firstChild;\\r\\n\\r\\n        while (child) {\\r\\n\\r\\n            var nchild = child.nextSibling;\\r\\n\\r\\n            if (child.nodeType === Node.ELEMENT_NODE &&\\r\\n                    child.localName === \\'span\\') {\\r\\n\\r\\n                pruneEmptySpans(child);\\r\\n\\r\\n                if (child.childElementCount === 0 &&\\r\\n                        child.textContent.length === 0) {\\r\\n\\r\\n                    element.removeChild(child);\\r\\n\\r\\n                }\\r\\n            }\\r\\n\\r\\n            child = nchild;\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function rect2edges(rect, context) {\\r\\n\\r\\n        var edges = {before: null, after: null, start: null, end: null};\\r\\n\\r\\n        if (context.bpd === \"tb\") {\\r\\n\\r\\n            edges.before = rect.top;\\r\\n            edges.after = rect.bottom;\\r\\n\\r\\n            if (context.ipd === \"lr\") {\\r\\n\\r\\n                edges.start = rect.left;\\r\\n                edges.end = rect.right;\\r\\n\\r\\n            } else {\\r\\n\\r\\n                edges.start = rect.right;\\r\\n                edges.end = rect.left;\\r\\n            }\\r\\n\\r\\n        } else if (context.bpd === \"lr\") {\\r\\n\\r\\n            edges.before = rect.left;\\r\\n            edges.after = rect.right;\\r\\n            edges.start = rect.top;\\r\\n            edges.end = rect.bottom;\\r\\n\\r\\n        } else if (context.bpd === \"rl\") {\\r\\n\\r\\n            edges.before = rect.right;\\r\\n            edges.after = rect.left;\\r\\n            edges.start = rect.top;\\r\\n            edges.end = rect.bottom;\\r\\n\\r\\n        }\\r\\n\\r\\n        return edges;\\r\\n\\r\\n    }\\r\\n\\r\\n    function constructLineList(context, element, llist, bgcolor) {\\r\\n\\r\\n        if (element.localName === \"rt\" || element.localName === \"rtc\") {\\r\\n\\r\\n            /* skip ruby annotations */\\r\\n\\r\\n            return;\\r\\n\\r\\n        }\\r\\n\\r\\n        var curbgcolor = element.style.backgroundColor || bgcolor;\\r\\n\\r\\n        if (element.childElementCount === 0) {\\r\\n\\r\\n            if (element.localName === \\'span\\' || element.localName === \\'rb\\') {\\r\\n\\r\\n                var r = element.getBoundingClientRect();\\r\\n\\r\\n                /* skip if span is not displayed */\\r\\n\\r\\n                if (r.height === 0 || r.width === 0)\\r\\n                    return;\\r\\n\\r\\n                var edges = rect2edges(r, context);\\r\\n\\r\\n                if (llist.length === 0 ||\\r\\n                        (!isSameLine(edges.before, edges.after, llist[llist.length - 1].before, llist[llist.length - 1].after))\\r\\n                        ) {\\r\\n\\r\\n                    llist.push({\\r\\n                        before: edges.before,\\r\\n                        after: edges.after,\\r\\n                        start: edges.start,\\r\\n                        end: edges.end,\\r\\n                        start_elem: 0,\\r\\n                        end_elem: 0,\\r\\n                        elements: [],\\r\\n                        rbc: [],\\r\\n                        te: [],\\r\\n                        text: \"\",\\r\\n                        br: false\\r\\n                    });\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    /* positive for BPD = lr and tb, negative for BPD = rl */\\r\\n                    var bpd_dir = Math.sign(edges.after - edges.before);\\r\\n\\r\\n                    /* positive for IPD = lr and tb, negative for IPD = rl */\\r\\n                    var ipd_dir = Math.sign(edges.end - edges.start);\\r\\n\\r\\n                    /* check if the line height has increased */\\r\\n\\r\\n                    if (bpd_dir * (edges.before - llist[llist.length - 1].before) < 0) {\\r\\n                        llist[llist.length - 1].before = edges.before;\\r\\n                    }\\r\\n\\r\\n                    if (bpd_dir * (edges.after - llist[llist.length - 1].after) > 0) {\\r\\n                        llist[llist.length - 1].after = edges.after;\\r\\n                    }\\r\\n\\r\\n                    if (ipd_dir * (edges.start - llist[llist.length - 1].start) < 0) {\\r\\n                        llist[llist.length - 1].start = edges.start;\\r\\n                        llist[llist.length - 1].start_elem = llist[llist.length - 1].elements.length;\\r\\n                    }\\r\\n\\r\\n                    if (ipd_dir * (edges.end - llist[llist.length - 1].end) > 0) {\\r\\n                        llist[llist.length - 1].end = edges.end;\\r\\n                        llist[llist.length - 1].end_elem = llist[llist.length - 1].elements.length;\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                llist[llist.length - 1].text += element.textContent;\\r\\n\\r\\n                llist[llist.length - 1].elements.push(\\r\\n                        {\\r\\n                            node: element,\\r\\n                            bgcolor: curbgcolor,\\r\\n                            before: edges.before,\\r\\n                            after: edges.after\\r\\n                        }\\r\\n                );\\r\\n\\r\\n            } else if (element.localName === \\'br\\' && llist.length !== 0) {\\r\\n\\r\\n                llist[llist.length - 1].br = true;\\r\\n\\r\\n            }\\r\\n\\r\\n        } else {\\r\\n\\r\\n            var child = element.firstChild;\\r\\n\\r\\n            while (child) {\\r\\n\\r\\n                if (child.nodeType === Node.ELEMENT_NODE) {\\r\\n\\r\\n                    constructLineList(context, child, llist, curbgcolor);\\r\\n\\r\\n                    if (child.localName === \\'ruby\\' || child.localName === \\'rtc\\') {\\r\\n\\r\\n                        /* remember non-empty ruby and rtc elements so that tts:rubyPosition can be applied */\\r\\n\\r\\n                        if (llist.length > 0) {\\r\\n\\r\\n                            llist[llist.length - 1].rbc.push(child);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    } else if (child.localName === \\'span\\' &&\\r\\n                            child.style.textEmphasisStyle &&\\r\\n                            child.style.textEmphasisStyle !== \"none\") {\\r\\n\\r\\n                        /* remember non-empty span elements with textEmphasis */\\r\\n\\r\\n                        if (llist.length > 0) {\\r\\n\\r\\n                            llist[llist.length - 1].te.push(child);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n                    \\r\\n\\r\\n                }\\r\\n\\r\\n                child = child.nextSibling;\\r\\n            }\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function isSameLine(before1, after1, before2, after2) {\\r\\n\\r\\n        return ((after1 < after2) && (before1 > before2)) || ((after2 <= after1) && (before2 >= before1));\\r\\n\\r\\n    }\\r\\n\\r\\n    function HTMLStylingMapDefintion(qName, mapFunc) {\\r\\n        this.qname = qName;\\r\\n        this.map = mapFunc;\\r\\n    }\\r\\n\\r\\n    var STYLING_MAP_DEFS = [\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling backgroundColor\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* skip if transparent */\\r\\n                    if (attr[3] === 0)\\r\\n                        return;\\r\\n\\r\\n                    dom_element.style.backgroundColor = \"rgba(\" +\\r\\n                            attr[0].toString() + \",\" +\\r\\n                            attr[1].toString() + \",\" +\\r\\n                            attr[2].toString() + \",\" +\\r\\n                            (attr[3] / 255).toString() +\\r\\n                            \")\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling color\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.color = \"rgba(\" +\\r\\n                            attr[0].toString() + \",\" +\\r\\n                            attr[1].toString() + \",\" +\\r\\n                            attr[2].toString() + \",\" +\\r\\n                            (attr[3] / 255).toString() +\\r\\n                            \")\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling direction\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.direction = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling display\",\\r\\n                function (context, dom_element, isd_element, attr) {}\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling displayAlign\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* see https://css-tricks.com/snippets/css/a-guide-to-flexbox/ */\\r\\n\\r\\n                    /* TODO: is this affected by writing direction? */\\r\\n\\r\\n                    dom_element.style.display = \"flex\";\\r\\n                    dom_element.style.flexDirection = \"column\";\\r\\n\\r\\n\\r\\n                    if (attr === \"before\") {\\r\\n\\r\\n                        dom_element.style.justifyContent = \"flex-start\";\\r\\n\\r\\n                    } else if (attr === \"center\") {\\r\\n\\r\\n                        dom_element.style.justifyContent = \"center\";\\r\\n\\r\\n                    } else if (attr === \"after\") {\\r\\n\\r\\n                        dom_element.style.justifyContent = \"flex-end\";\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling extent\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    /* TODO: this is super ugly */\\r\\n\\r\\n                    context.regionH = attr.h.toUsedLength(context.w, context.h);\\r\\n                    context.regionW = attr.w.toUsedLength(context.w, context.h);\\r\\n\\r\\n                    /* \\r\\n                     * CSS height/width are measured against the content rectangle,\\r\\n                     * whereas TTML height/width include padding\\r\\n                     */\\r\\n\\r\\n                    var hdelta = 0;\\r\\n                    var wdelta = 0;\\r\\n\\r\\n                    var p = isd_element.styleAttrs[\"http://www.w3.org/ns/ttml#styling padding\"];\\r\\n\\r\\n                    if (!p) {\\r\\n\\r\\n                        /* error */\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        hdelta = p[0].toUsedLength(context.w, context.h) + p[2].toUsedLength(context.w, context.h);\\r\\n                        wdelta = p[1].toUsedLength(context.w, context.h) + p[3].toUsedLength(context.w, context.h);\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.height = (context.regionH - hdelta) + \"px\";\\r\\n                    dom_element.style.width = (context.regionW - wdelta) + \"px\";\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling fontFamily\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var rslt = [];\\r\\n\\r\\n                    /* per IMSC1 */\\r\\n\\r\\n                    for (var i in attr) {\\r\\n\\r\\n                        if (attr[i] === \"monospaceSerif\") {\\r\\n\\r\\n                            rslt.push(\"Courier New\");\\r\\n                            rslt.push(\\'\"Liberation Mono\"\\');\\r\\n                            rslt.push(\"Courier\");\\r\\n                            rslt.push(\"monospace\");\\r\\n\\r\\n                        } else if (attr[i] === \"proportionalSansSerif\") {\\r\\n\\r\\n                            rslt.push(\"Arial\");\\r\\n                            rslt.push(\"Helvetica\");\\r\\n                            rslt.push(\\'\"Liberation Sans\"\\');\\r\\n                            rslt.push(\"sans-serif\");\\r\\n\\r\\n                        } else if (attr[i] === \"monospace\") {\\r\\n\\r\\n                            rslt.push(\"monospace\");\\r\\n\\r\\n                        } else if (attr[i] === \"sansSerif\") {\\r\\n\\r\\n                            rslt.push(\"sans-serif\");\\r\\n\\r\\n                        } else if (attr[i] === \"serif\") {\\r\\n\\r\\n                            rslt.push(\"serif\");\\r\\n\\r\\n                        } else if (attr[i] === \"monospaceSansSerif\") {\\r\\n\\r\\n                            rslt.push(\"Consolas\");\\r\\n                            rslt.push(\"monospace\");\\r\\n\\r\\n                        } else if (attr[i] === \"proportionalSerif\") {\\r\\n\\r\\n                            rslt.push(\"serif\");\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            rslt.push(attr[i]);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.fontFamily = rslt.join(\",\");\\r\\n                }\\r\\n        ),\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling shear\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* return immediately if tts:shear is 0% since CSS transforms are not inherited*/\\r\\n\\r\\n                    if (attr === 0)\\r\\n                        return;\\r\\n\\r\\n                    var angle = attr * -0.9;\\r\\n\\r\\n                    /* context.writingMode is needed since writing mode is not inherited and sets the inline progression */\\r\\n\\r\\n                    if (context.bpd === \"tb\") {\\r\\n\\r\\n                        dom_element.style.transform = \"skewX(\" + angle + \"deg)\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        dom_element.style.transform = \"skewY(\" + angle + \"deg)\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        ),\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling fontSize\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.fontSize = attr.toUsedLength(context.w, context.h) + \"px\";\\r\\n                }\\r\\n        ),\\r\\n\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling fontStyle\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.fontStyle = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling fontWeight\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.fontWeight = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling lineHeight\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    if (attr === \"normal\") {\\r\\n\\r\\n                        dom_element.style.lineHeight = \"normal\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        dom_element.style.lineHeight = attr.toUsedLength(context.w, context.h) + \"px\";\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling opacity\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.opacity = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling origin\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.top = attr.h.toUsedLength(context.w, context.h) + \"px\";\\r\\n                    dom_element.style.left = attr.w.toUsedLength(context.w, context.h) + \"px\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling overflow\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.overflow = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling padding\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* attr: top,left,bottom,right*/\\r\\n\\r\\n                    /* style: top right bottom left*/\\r\\n\\r\\n                    var rslt = [];\\r\\n\\r\\n                    rslt[0] = attr[0].toUsedLength(context.w, context.h) + \"px\";\\r\\n                    rslt[1] = attr[3].toUsedLength(context.w, context.h) + \"px\";\\r\\n                    rslt[2] = attr[2].toUsedLength(context.w, context.h) + \"px\";\\r\\n                    rslt[3] = attr[1].toUsedLength(context.w, context.h) + \"px\";\\r\\n\\r\\n                    dom_element.style.padding = rslt.join(\" \");\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling position\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.top = attr.h.toUsedLength(context.w, context.h) + \"px\";\\r\\n                    dom_element.style.left = attr.w.toUsedLength(context.w, context.h) + \"px\";\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling rubyAlign\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.rubyAlign = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling rubyPosition\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* skip if \"outside\", which is handled by applyRubyPosition() */\\r\\n\\r\\n                    if (attr === \"before\" || attr === \"after\") {\\r\\n\\r\\n                        var pos;\\r\\n\\r\\n                        if (context.bpd === \"tb\") {\\r\\n\\r\\n                            pos = (attr === \"before\") ? \"over\" : \"under\";\\r\\n\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            if (context.bpd === \"rl\") {\\r\\n\\r\\n                                pos = (attr === \"before\") ? \"over\" : \"under\";\\r\\n\\r\\n                            } else {\\r\\n\\r\\n                                pos = (attr === \"before\") ? \"under\" : \"over\";\\r\\n\\r\\n                            }\\r\\n\\r\\n                        }\\r\\n\\r\\n                        /* apply position to the parent dom_element, i.e. ruby or rtc */\\r\\n\\r\\n                        dom_element.parentElement.style.rubyPosition = pos;\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling showBackground\",\\r\\n                null\\r\\n                ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling textAlign\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var ta;\\r\\n                    var dir = isd_element.styleAttrs[imscStyles.byName.direction.qname];\\r\\n\\r\\n                    /* handle UAs that do not understand start or end */\\r\\n\\r\\n                    if (attr === \"start\") {\\r\\n\\r\\n                        ta = (dir === \"rtl\") ? \"right\" : \"left\";\\r\\n\\r\\n                    } else if (attr === \"end\") {\\r\\n\\r\\n                        ta = (dir === \"rtl\") ? \"left\" : \"right\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        ta = attr;\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.textAlign = ta;\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling textDecoration\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.textDecoration = attr.join(\" \").replace(\"lineThrough\", \"line-through\");\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling textOutline\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* defer to tts:textShadow */\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling textShadow\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var txto = isd_element.styleAttrs[imscStyles.byName.textOutline.qname];\\r\\n\\r\\n                    if (attr === \"none\" && txto === \"none\") {\\r\\n\\r\\n                        dom_element.style.textShadow = \"\";\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        var s = [];\\r\\n\\r\\n                        if (txto !== \"none\") {\\r\\n\\r\\n                            /* emulate text outline */\\r\\n\\r\\n                            s.push(\\r\\n                                    \"rgba(\" +\\r\\n                                    txto.color[0].toString() + \",\" +\\r\\n                                    txto.color[1].toString() + \",\" +\\r\\n                                    txto.color[2].toString() + \",\" +\\r\\n                                    (txto.color[3] / 255).toString() +\\r\\n                                    \")\" + \" 0px 0px \" +\\r\\n                                    txto.thickness.toUsedLength(context.w, context.h) + \"px\"\\r\\n                                    );\\r\\n\\r\\n                        }\\r\\n\\r\\n                        /* add text shadow */\\r\\n\\r\\n                        if (attr !== \"none\") {\\r\\n\\r\\n                            for (var i in attr) {\\r\\n\\r\\n\\r\\n                                s.push(attr[i].x_off.toUsedLength(context.w, context.h) + \"px \" +\\r\\n                                        attr[i].y_off.toUsedLength(context.w, context.h) + \"px \" +\\r\\n                                        attr[i].b_radius.toUsedLength(context.w, context.h) + \"px \" +\\r\\n                                        \"rgba(\" +\\r\\n                                        attr[i].color[0].toString() + \",\" +\\r\\n                                        attr[i].color[1].toString() + \",\" +\\r\\n                                        attr[i].color[2].toString() + \",\" +\\r\\n                                        (attr[i].color[3] / 255).toString() +\\r\\n                                        \")\"\\r\\n                                        );\\r\\n\\r\\n                            }\\r\\n\\r\\n                        }\\r\\n\\r\\n                        dom_element.style.textShadow = s.join(\",\");\\r\\n\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling textCombine\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    dom_element.style.textCombineUpright = attr.join(\" \");\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling textEmphasis\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    /* ignore color (not used in IMSC 1.1) */\\r\\n\\r\\n                    if (attr.style === \"none\") {\\r\\n\\r\\n                        dom_element.style.textEmphasisStyle = \"none\";\\r\\n\\r\\n                        /* no need to set position, so return */\\r\\n                        \\r\\n                        return;\\r\\n                    \\r\\n                    } else if (attr.style === \"auto\") {\\r\\n\\r\\n                        dom_element.style.textEmphasisStyle = \"filled\";\\r\\n                    \\r\\n                    } else {\\r\\n\\r\\n                        dom_element.style.textEmphasisStyle =  attr.style + \" \" + attr.symbol;\\r\\n                    }\\r\\n\\r\\n                    /* ignore \"outside\" position (set in postprocessing) */\\r\\n\\r\\n                    if (attr.position === \"before\" || attr.position === \"after\") {\\r\\n\\r\\n                        var pos;\\r\\n\\r\\n                        if (context.bpd === \"tb\") {\\r\\n\\r\\n                            pos = (attr.position === \"before\") ? \"left over\" : \"left under\";\\r\\n\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            if (context.bpd === \"rl\") {\\r\\n\\r\\n                                pos = (attr.position === \"before\") ? \"right under\" : \"left under\";\\r\\n\\r\\n                            } else {\\r\\n\\r\\n                                pos = (attr.position === \"before\") ? \"left under\" : \"right under\";\\r\\n\\r\\n                            }\\r\\n\\r\\n                        }\\r\\n\\r\\n                        dom_element.style.textEmphasisPosition = pos;\\r\\n                    }\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling unicodeBidi\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    var ub;\\r\\n\\r\\n                    if (attr === \\'bidiOverride\\') {\\r\\n                        ub = \"bidi-override\";\\r\\n                    } else {\\r\\n                        ub = attr;\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.unicodeBidi = ub;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling visibility\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.visibility = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling wrapOption\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    if (attr === \"wrap\") {\\r\\n\\r\\n                        if (isd_element.space === \"preserve\") {\\r\\n                            dom_element.style.whiteSpace = \"pre-wrap\";\\r\\n                        } else {\\r\\n                            dom_element.style.whiteSpace = \"normal\";\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        if (isd_element.space === \"preserve\") {\\r\\n\\r\\n                            dom_element.style.whiteSpace = \"pre\";\\r\\n\\r\\n                        } else {\\r\\n                            dom_element.style.whiteSpace = \"noWrap\";\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling writingMode\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    if (attr === \"lrtb\" || attr === \"lr\") {\\r\\n\\r\\n                        context.writingMode = \"horizontal-tb\";\\r\\n\\r\\n                    } else if (attr === \"rltb\" || attr === \"rl\") {\\r\\n\\r\\n                        context.writingMode = \"horizontal-tb\";\\r\\n\\r\\n                    } else if (attr === \"tblr\") {\\r\\n\\r\\n                        context.writingMode = \"vertical-lr\";\\r\\n\\r\\n                    } else if (attr === \"tbrl\" || attr === \"tb\") {\\r\\n\\r\\n                        context.writingMode = \"vertical-rl\";\\r\\n\\r\\n                    }\\r\\n\\r\\n                    dom_element.style.writingMode = context.writingMode;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml#styling zIndex\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n                    dom_element.style.zIndex = attr;\\r\\n                }\\r\\n        ),\\r\\n        new HTMLStylingMapDefintion(\\r\\n                \"http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay\",\\r\\n                function (context, dom_element, isd_element, attr) {\\r\\n\\r\\n                    if (context.displayForcedOnlyMode && attr === false) {\\r\\n                        dom_element.style.visibility = \"hidden\";\\r\\n                    }\\r\\n\\r\\n                }\\r\\n        )\\r\\n    ];\\r\\n\\r\\n    var STYLMAP_BY_QNAME = {};\\r\\n\\r\\n    for (var i in STYLING_MAP_DEFS) {\\r\\n\\r\\n        STYLMAP_BY_QNAME[STYLING_MAP_DEFS[i].qname] = STYLING_MAP_DEFS[i];\\r\\n    }\\r\\n\\r\\n    function reportError(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.error && errorHandler.error(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n        typeof imscNames === \\'undefined\\' ? __webpack_require__(/*! ./names */ \"../node_modules/imsc/src/main/js/names.js\") : imscNames,\\r\\n        typeof imscStyles === \\'undefined\\' ? __webpack_require__(/*! ./styles */ \"../node_modules/imsc/src/main/js/styles.js\") : imscStyles,\\r\\n        typeof imscUtils === \\'undefined\\' ? __webpack_require__(/*! ./utils */ \"../node_modules/imsc/src/main/js/utils.js\") : imscUtils);\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/html.js?')},\"../node_modules/imsc/src/main/js/isd.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscISD\\r\\n */\\r\\n\\r\\n\\r\\n;\\r\\n(function (imscISD, imscNames, imscStyles, imscUtils) { // wrapper for non-node envs\\r\\n\\r\\n    /** \\r\\n     * Creates a canonical representation of an IMSC1 document returned by <pre>imscDoc.fromXML()</pre>\\r\\n     * at a given absolute offset in seconds. This offset does not have to be one of the values returned\\r\\n     * by <pre>getMediaTimeEvents()</pre>.\\r\\n     * \\r\\n     * @param {Object} tt IMSC1 document\\r\\n     * @param {number} offset Absolute offset (in seconds)\\r\\n     * @param {?module:imscUtils.ErrorHandler} errorHandler Error callback\\r\\n     * @returns {Object} Opaque in-memory representation of an ISD\\r\\n     */\\r\\n\\r\\n    imscISD.generateISD = function (tt, offset, errorHandler) {\\r\\n\\r\\n        /* TODO check for tt and offset validity */\\r\\n\\r\\n        /* create the ISD object from the IMSC1 doc */\\r\\n\\r\\n        var isd = new ISD(tt);\\r\\n\\r\\n        /* context */\\r\\n\\r\\n        var context = {\\r\\n\\r\\n            /*rubyfs: []*/ /* font size of the nearest textContainer or container */\\r\\n\\r\\n        };\\r\\n\\r\\n        /* process regions */\\r\\n\\r\\n        for (var r in tt.head.layout.regions) {\\r\\n\\r\\n            /* post-order traversal of the body tree per [construct intermediate document] */\\r\\n\\r\\n            var c = isdProcessContentElement(tt, offset, tt.head.layout.regions[r], tt.body, null, \\'\\', tt.head.layout.regions[r], errorHandler, context);\\r\\n\\r\\n            if (c !== null) {\\r\\n\\r\\n                /* add the region to the ISD */\\r\\n\\r\\n                isd.contents.push(c.element);\\r\\n            }\\r\\n\\r\\n\\r\\n        }\\r\\n\\r\\n        return isd;\\r\\n    };\\r\\n\\r\\n    /* set of styles not applicable to ruby container spans */\\r\\n\\r\\n    var _rcs_na_styles = [\\r\\n        imscStyles.byName.color.qname,\\r\\n        imscStyles.byName.textCombine.qname,\\r\\n        imscStyles.byName.textDecoration.qname,\\r\\n        imscStyles.byName.textEmphasis.qname,\\r\\n        imscStyles.byName.textOutline.qname,\\r\\n        imscStyles.byName.textShadow.qname\\r\\n    ];\\r\\n\\r\\n    function isdProcessContentElement(doc, offset, region, body, parent, inherited_region_id, elem, errorHandler, context) {\\r\\n\\r\\n        /* prune if temporally inactive */\\r\\n\\r\\n        if (offset < elem.begin || offset >= elem.end) {\\r\\n            return null;\\r\\n        }\\r\\n\\r\\n        /* \\r\\n         * set the associated region as specified by the regionID attribute, or the \\r\\n         * inherited associated region otherwise\\r\\n         */\\r\\n\\r\\n        var associated_region_id = \\'regionID\\' in elem && elem.regionID !== \\'\\' ? elem.regionID : inherited_region_id;\\r\\n\\r\\n        /* prune the element if either:\\r\\n         * - the element is not terminal and the associated region is neither the default\\r\\n         *   region nor the parent region (this allows children to be associated with a \\r\\n         *   region later on)\\r\\n         * - the element is terminal and the associated region is not the parent region\\r\\n         */\\r\\n\\r\\n        /* TODO: improve detection of terminal elements since <region> has no contents */\\r\\n\\r\\n        if (parent !== null /* are we in the region element */ &&\\r\\n            associated_region_id !== region.id &&\\r\\n            (\\r\\n                (!(\\'contents\\' in elem)) ||\\r\\n                (\\'contents\\' in elem && elem.contents.length === 0) ||\\r\\n                associated_region_id !== \\'\\'\\r\\n                )\\r\\n            )\\r\\n            return null;\\r\\n\\r\\n        /* create an ISD element, including applying specified styles */\\r\\n\\r\\n        var isd_element = new ISDContentElement(elem);\\r\\n\\r\\n        /* apply set (animation) styling */\\r\\n\\r\\n        for (var i in elem.sets) {\\r\\n\\r\\n            if (offset < elem.sets[i].begin || offset >= elem.sets[i].end)\\r\\n                continue;\\r\\n\\r\\n            isd_element.styleAttrs[elem.sets[i].qname] = elem.sets[i].value;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* \\r\\n         * keep track of specified styling attributes so that we\\r\\n         * can compute them later\\r\\n         */\\r\\n\\r\\n        var spec_attr = {};\\r\\n\\r\\n        for (var qname in isd_element.styleAttrs) {\\r\\n\\r\\n            spec_attr[qname] = true;\\r\\n\\r\\n            /* special rule for tts:writingMode (section 7.29.1 of XSL)\\r\\n             * direction is set consistently with writingMode only\\r\\n             * if writingMode sets inline-direction to LTR or RTL  \\r\\n             */\\r\\n\\r\\n            if (qname === imscStyles.byName.writingMode.qname &&\\r\\n                !(imscStyles.byName.direction.qname in isd_element.styleAttrs)) {\\r\\n\\r\\n                var wm = isd_element.styleAttrs[qname];\\r\\n\\r\\n                if (wm === \"lrtb\" || wm === \"lr\") {\\r\\n\\r\\n                    isd_element.styleAttrs[imscStyles.byName.direction.qname] = \"ltr\";\\r\\n\\r\\n                } else if (wm === \"rltb\" || wm === \"rl\") {\\r\\n\\r\\n                    isd_element.styleAttrs[imscStyles.byName.direction.qname] = \"rtl\";\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n        }\\r\\n\\r\\n        /* inherited styling */\\r\\n\\r\\n        if (parent !== null) {\\r\\n\\r\\n            for (var j in imscStyles.all) {\\r\\n\\r\\n                var sa = imscStyles.all[j];\\r\\n\\r\\n                /* textDecoration has special inheritance rules */\\r\\n\\r\\n                if (sa.qname === imscStyles.byName.textDecoration.qname) {\\r\\n\\r\\n                    /* handle both textDecoration inheritance and specification */\\r\\n\\r\\n                    var ps = parent.styleAttrs[sa.qname];\\r\\n                    var es = isd_element.styleAttrs[sa.qname];\\r\\n                    var outs = [];\\r\\n\\r\\n                    if (es === undefined) {\\r\\n\\r\\n                        outs = ps;\\r\\n\\r\\n                    } else if (es.indexOf(\"none\") === -1) {\\r\\n\\r\\n                        if ((es.indexOf(\"noUnderline\") === -1 &&\\r\\n                            ps.indexOf(\"underline\") !== -1) ||\\r\\n                            es.indexOf(\"underline\") !== -1) {\\r\\n\\r\\n                            outs.push(\"underline\");\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if ((es.indexOf(\"noLineThrough\") === -1 &&\\r\\n                            ps.indexOf(\"lineThrough\") !== -1) ||\\r\\n                            es.indexOf(\"lineThrough\") !== -1) {\\r\\n\\r\\n                            outs.push(\"lineThrough\");\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if ((es.indexOf(\"noOverline\") === -1 &&\\r\\n                            ps.indexOf(\"overline\") !== -1) ||\\r\\n                            es.indexOf(\"overline\") !== -1) {\\r\\n\\r\\n                            outs.push(\"overline\");\\r\\n\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        outs.push(\"none\");\\r\\n\\r\\n                    }\\r\\n\\r\\n                    isd_element.styleAttrs[sa.qname] = outs;\\r\\n\\r\\n                } else if (sa.qname === imscStyles.byName.fontSize.qname &&\\r\\n                    !(sa.qname in isd_element.styleAttrs) &&\\r\\n                    isd_element.kind === \\'span\\' &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"textContainer\") {\\r\\n                    \\r\\n                    /* special inheritance rule for ruby text container font size */\\r\\n                    \\r\\n                    var ruby_fs = parent.styleAttrs[imscStyles.byName.fontSize.qname];\\r\\n\\r\\n                    isd_element.styleAttrs[sa.qname] = new imscUtils.ComputedLength(\\r\\n                        0.5 * ruby_fs.rw,\\r\\n                        0.5 * ruby_fs.rh);\\r\\n\\r\\n                } else if (sa.qname === imscStyles.byName.fontSize.qname &&\\r\\n                    !(sa.qname in isd_element.styleAttrs) &&\\r\\n                    isd_element.kind === \\'span\\' &&\\r\\n                    isd_element.styleAttrs[imscStyles.byName.ruby.qname] === \"text\") {\\r\\n                    \\r\\n                    /* special inheritance rule for ruby text font size */\\r\\n                    \\r\\n                    var parent_fs = parent.styleAttrs[imscStyles.byName.fontSize.qname];\\r\\n                    \\r\\n                    if (parent.styleAttrs[imscStyles.byName.ruby.qname] === \"textContainer\") {\\r\\n                        \\r\\n                        isd_element.styleAttrs[sa.qname] = parent_fs;\\r\\n                        \\r\\n                    } else {\\r\\n                        \\r\\n                        isd_element.styleAttrs[sa.qname] = new imscUtils.ComputedLength(\\r\\n                            0.5 * parent_fs.rw,\\r\\n                            0.5 * parent_fs.rh);\\r\\n                    }\\r\\n                    \\r\\n                } else if (sa.inherit &&\\r\\n                    (sa.qname in parent.styleAttrs) &&\\r\\n                    !(sa.qname in isd_element.styleAttrs)) {\\r\\n\\r\\n                    isd_element.styleAttrs[sa.qname] = parent.styleAttrs[sa.qname];\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* initial value styling */\\r\\n\\r\\n        for (var k in imscStyles.all) {\\r\\n\\r\\n            var ivs = imscStyles.all[k];\\r\\n\\r\\n            /* skip if value is already specified */\\r\\n\\r\\n            if (ivs.qname in isd_element.styleAttrs) continue;\\r\\n\\r\\n            /* skip tts:position if tts:origin is specified */\\r\\n\\r\\n            if (ivs.qname === imscStyles.byName.position.qname &&\\r\\n                imscStyles.byName.origin.qname in isd_element.styleAttrs)\\r\\n                continue;\\r\\n\\r\\n            /* skip tts:origin if tts:position is specified */\\r\\n\\r\\n            if (ivs.qname === imscStyles.byName.origin.qname &&\\r\\n                imscStyles.byName.position.qname in isd_element.styleAttrs)\\r\\n                continue;\\r\\n            \\r\\n            /* determine initial value */\\r\\n            \\r\\n            var iv = doc.head.styling.initials[ivs.qname] || ivs.initial;\\r\\n\\r\\n            /* apply initial value to elements other than region only if non-inherited */\\r\\n\\r\\n            if (isd_element.kind === \\'region\\' || (ivs.inherit === false && iv !== null)) {\\r\\n\\r\\n                isd_element.styleAttrs[ivs.qname] = ivs.parse(iv);\\r\\n\\r\\n                /* keep track of the style as specified */\\r\\n\\r\\n                spec_attr[ivs.qname] = true;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* compute styles (only for non-inherited styles) */\\r\\n        /* TODO: get rid of spec_attr */\\r\\n\\r\\n        for (var z in imscStyles.all) {\\r\\n\\r\\n            var cs = imscStyles.all[z];\\r\\n\\r\\n            if (!(cs.qname in spec_attr)) continue;\\r\\n\\r\\n            if (cs.compute !== null) {\\r\\n\\r\\n                var cstyle = cs.compute(\\r\\n                    /*doc, parent, element, attr, context*/\\r\\n                    doc,\\r\\n                    parent,\\r\\n                    isd_element,\\r\\n                    isd_element.styleAttrs[cs.qname],\\r\\n                    context\\r\\n                    );\\r\\n\\r\\n                if (cstyle !== null) {\\r\\n\\r\\n                    isd_element.styleAttrs[cs.qname] = cstyle;\\r\\n                    \\r\\n                } else {\\r\\n                    /* if the style cannot be computed, replace it by its initial value */\\r\\n\\r\\n                    isd_element.styleAttrs[cs.qname] = cs.compute(\\r\\n                        /*doc, parent, element, attr, context*/\\r\\n                        doc,\\r\\n                        parent,\\r\\n                        isd_element,\\r\\n                        cs.parse(cs.initial),\\r\\n                        context\\r\\n                    );\\r\\n\\r\\n                    reportError(errorHandler, \"Style \\'\" + cs.qname + \"\\' on element \\'\" + isd_element.kind + \"\\' cannot be computed\");\\r\\n                }\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* tts:fontSize special ineritance for ruby */\\r\\n\\r\\n/*        var isrubycontainer = false;\\r\\n\\r\\n        if (isd_element.kind === \"span\") {\\r\\n\\r\\n            var rtemp = isd_element.styleAttrs[imscStyles.byName.ruby.qname];\\r\\n\\r\\n            if (rtemp === \"container\" || rtemp === \"textContainer\") {\\r\\n\\r\\n                isrubycontainer = true;\\r\\n\\r\\n                context.rubyfs.unshift(isd_element.styleAttrs[imscStyles.byName.fontSize.qname]);\\r\\n\\r\\n            }\\r\\n\\r\\n        } */\\r\\n\\r\\n        /* prune if tts:display is none */\\r\\n\\r\\n        if (isd_element.styleAttrs[imscStyles.byName.display.qname] === \"none\")\\r\\n            return null;\\r\\n\\r\\n        /* process contents of the element */\\r\\n\\r\\n        var contents;\\r\\n\\r\\n        if (parent === null) {\\r\\n\\r\\n            /* we are processing the region */\\r\\n\\r\\n            if (body === null) {\\r\\n\\r\\n                /* if there is no body, still process the region but with empty content */\\r\\n\\r\\n                contents = [];\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /*use the body element as contents */\\r\\n\\r\\n                contents = [body];\\r\\n\\r\\n            }\\r\\n\\r\\n        } else if (\\'contents\\' in elem) {\\r\\n\\r\\n            contents = elem.contents;\\r\\n\\r\\n        }\\r\\n\\r\\n        for (var x in contents) {\\r\\n\\r\\n            var c = isdProcessContentElement(doc, offset, region, body, isd_element, associated_region_id, contents[x], errorHandler, context);\\r\\n\\r\\n            /* \\r\\n             * keep child element only if they are non-null and their region match \\r\\n             * the region of this element\\r\\n             */\\r\\n\\r\\n            if (c !== null) {\\r\\n\\r\\n                isd_element.contents.push(c.element);\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* compute used value of lineHeight=\"normal\" */\\r\\n\\r\\n        /*        if (isd_element.styleAttrs[imscStyles.byName.lineHeight.qname] === \"normal\"  ) {\\r\\n         \\r\\n         isd_element.styleAttrs[imscStyles.byName.lineHeight.qname] =\\r\\n         isd_element.styleAttrs[imscStyles.byName.fontSize.qname] * 1.2;\\r\\n         \\r\\n         }\\r\\n         */\\r\\n\\r\\n        /* tts:fontSize special ineritance for ruby */\\r\\n\\r\\n        /*if (isrubycontainer) {\\r\\n\\r\\n            context.rubyfs.shift();\\r\\n\\r\\n        }*/\\r\\n\\r\\n        /* remove styles that are not applicable */\\r\\n\\r\\n        for (var qnameb in isd_element.styleAttrs) {\\r\\n\\r\\n            /* true if not applicable */\\r\\n\\r\\n            var na = false;\\r\\n\\r\\n            /* special applicability of certain style properties to ruby container spans */\\r\\n            /* TODO: in the future ruby elements should be translated to elements instead of kept as spans */\\r\\n\\r\\n            if (isd_element.kind === \\'span\\') {\\r\\n\\r\\n                var rsp = isd_element.styleAttrs[imscStyles.byName.ruby.qname];\\r\\n\\r\\n                na = ( rsp === \\'container\\' || rsp === \\'textContainer\\' || rsp === \\'baseContainer\\' ) && \\r\\n                    _rcs_na_styles.indexOf(qnameb) !== -1;\\r\\n\\r\\n                if (! na) {\\r\\n\\r\\n                    na = rsp !== \\'container\\' &&\\r\\n                        qnameb === imscStyles.byName.rubyAlign.qname;\\r\\n\\r\\n                }\\r\\n\\r\\n                if (! na) {\\r\\n\\r\\n                    na =  (! (rsp === \\'textContainer\\' || rsp === \\'text\\')) &&\\r\\n                        qnameb === imscStyles.byName.rubyPosition.qname;\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            /* normal applicability */\\r\\n            \\r\\n            if (! na) {\\r\\n\\r\\n                var da = imscStyles.byQName[qnameb];\\r\\n                na = da.applies.indexOf(isd_element.kind) === -1;\\r\\n\\r\\n            }\\r\\n\\r\\n\\r\\n            if (na) {\\r\\n                delete isd_element.styleAttrs[qnameb];\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* collapse white space if space is \"default\" */\\r\\n\\r\\n        if (isd_element.kind === \\'span\\' && isd_element.text && isd_element.space === \"default\") {\\r\\n\\r\\n            var trimmedspan = isd_element.text.replace(/[\\\\t\\\\r\\\\n ]+/g, \\' \\');\\r\\n\\r\\n            isd_element.text = trimmedspan;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* trim whitespace around explicit line breaks */\\r\\n\\r\\n        if (isd_element.kind === \\'p\\') {\\r\\n\\r\\n            var elist = [];\\r\\n\\r\\n            constructSpanList(isd_element, elist);\\r\\n\\r\\n            var l = 0;\\r\\n\\r\\n            var state = \"after_br\";\\r\\n            var br_pos = 0;\\r\\n\\r\\n            while (true) {\\r\\n\\r\\n                if (state === \"after_br\") {\\r\\n\\r\\n                    if (l >= elist.length || elist[l].kind === \"br\") {\\r\\n\\r\\n                        state = \"before_br\";\\r\\n                        br_pos = l;\\r\\n                        l--;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        if (elist[l].space !== \"preserve\") {\\r\\n\\r\\n                            elist[l].text = elist[l].text.replace(/^[\\\\t\\\\r\\\\n ]+/g, \\'\\');\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if (elist[l].text.length > 0) {\\r\\n\\r\\n                            state = \"looking_br\";\\r\\n                            l++;\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            elist.splice(l, 1);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                } else if (state === \"before_br\") {\\r\\n\\r\\n                    if (l < 0 || elist[l].kind === \"br\") {\\r\\n\\r\\n                        state = \"after_br\";\\r\\n                        l = br_pos + 1;\\r\\n\\r\\n                        if (l >= elist.length) break;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        if (elist[l].space !== \"preserve\") {\\r\\n\\r\\n                            elist[l].text = elist[l].text.replace(/[\\\\t\\\\r\\\\n ]+$/g, \\'\\');\\r\\n\\r\\n                        }\\r\\n\\r\\n                        if (elist[l].text.length > 0) {\\r\\n\\r\\n                            state = \"after_br\";\\r\\n                            l = br_pos + 1;\\r\\n\\r\\n                            if (l >= elist.length) break;\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            elist.splice(l, 1);\\r\\n                            l--;\\r\\n\\r\\n                        }\\r\\n\\r\\n                    }\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    if (l >= elist.length || elist[l].kind === \"br\") {\\r\\n\\r\\n                        state = \"before_br\";\\r\\n                        br_pos = l;\\r\\n                        l--;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        l++;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            pruneEmptySpans(isd_element);\\r\\n\\r\\n        }\\r\\n\\r\\n        /* keep element if:\\r\\n         * * contains a background image\\r\\n         * * <br/>\\r\\n         * * if there are children\\r\\n         * * if it is an image\\r\\n         * * if <span> and has text\\r\\n         * * if region and showBackground = always\\r\\n         */\\r\\n\\r\\n        if ((isd_element.kind === \\'div\\' && imscStyles.byName.backgroundImage.qname in isd_element.styleAttrs) ||\\r\\n            isd_element.kind === \\'br\\' ||\\r\\n            isd_element.kind === \\'image\\' ||\\r\\n            (\\'contents\\' in isd_element && isd_element.contents.length > 0) ||\\r\\n            (isd_element.kind === \\'span\\' && isd_element.text !== null) ||\\r\\n            (isd_element.kind === \\'region\\' &&\\r\\n                isd_element.styleAttrs[imscStyles.byName.showBackground.qname] === \\'always\\')) {\\r\\n\\r\\n            return {\\r\\n                region_id: associated_region_id,\\r\\n                element: isd_element\\r\\n            };\\r\\n        }\\r\\n\\r\\n        return null;\\r\\n    }\\r\\n\\r\\n    function constructSpanList(element, elist) {\\r\\n\\r\\n        if (\\'contents\\' in element) {\\r\\n\\r\\n            for (var i in element.contents) {\\r\\n                constructSpanList(element.contents[i], elist);\\r\\n            }\\r\\n\\r\\n        } else if (element.kind === \\'span\\' || element.kind === \\'br\\') {\\r\\n\\r\\n            elist.push(element);\\r\\n\\r\\n        }\\r\\n\\r\\n    }\\r\\n\\r\\n    function pruneEmptySpans(element) {\\r\\n\\r\\n        if (element.kind === \\'br\\') {\\r\\n\\r\\n            return false;\\r\\n\\r\\n        } else if (\\'text\\' in element) {\\r\\n\\r\\n            return  element.text.length === 0;\\r\\n\\r\\n        } else if (\\'contents\\' in element) {\\r\\n\\r\\n            var i = element.contents.length;\\r\\n\\r\\n            while (i--) {\\r\\n\\r\\n                if (pruneEmptySpans(element.contents[i])) {\\r\\n                    element.contents.splice(i, 1);\\r\\n                }\\r\\n\\r\\n            }\\r\\n\\r\\n            return element.contents.length === 0;\\r\\n\\r\\n        }\\r\\n    }\\r\\n\\r\\n    function ISD(tt) {\\r\\n        this.contents = [];\\r\\n        this.aspectRatio = tt.aspectRatio;\\r\\n    }\\r\\n\\r\\n    function ISDContentElement(ttelem) {\\r\\n\\r\\n        /* assume the element is a region if it does not have a kind */\\r\\n\\r\\n        this.kind = ttelem.kind || \\'region\\';\\r\\n\\r\\n        /* copy id */\\r\\n\\r\\n        if (ttelem.id) {\\r\\n            this.id = ttelem.id;\\r\\n        }\\r\\n\\r\\n        /* deep copy of style attributes */\\r\\n        this.styleAttrs = {};\\r\\n\\r\\n        for (var sname in ttelem.styleAttrs) {\\r\\n\\r\\n            this.styleAttrs[sname] =\\r\\n                ttelem.styleAttrs[sname];\\r\\n        }\\r\\n        \\r\\n        /* copy src and type if image */\\r\\n        \\r\\n        if (\\'src\\' in ttelem) {\\r\\n            \\r\\n            this.src = ttelem.src;\\r\\n            \\r\\n        }\\r\\n        \\r\\n         if (\\'type\\' in ttelem) {\\r\\n            \\r\\n            this.type = ttelem.type;\\r\\n            \\r\\n        }\\r\\n\\r\\n        /* TODO: clean this! \\r\\n         * TODO: ISDElement and document element should be better tied together */\\r\\n\\r\\n        if (\\'text\\' in ttelem) {\\r\\n\\r\\n            this.text = ttelem.text;\\r\\n\\r\\n        } else if (this.kind === \\'region\\' || \\'contents\\' in ttelem) {\\r\\n\\r\\n            this.contents = [];\\r\\n        }\\r\\n\\r\\n        if (\\'space\\' in ttelem) {\\r\\n\\r\\n            this.space = ttelem.space;\\r\\n        }\\r\\n    }\\r\\n\\r\\n\\r\\n    /*\\r\\n     * ERROR HANDLING UTILITY FUNCTIONS\\r\\n     * \\r\\n     */\\r\\n\\r\\n    function reportInfo(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.info && errorHandler.info(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportWarning(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.warn && errorHandler.warn(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportError(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.error && errorHandler.error(msg))\\r\\n            throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n    function reportFatal(errorHandler, msg) {\\r\\n\\r\\n        if (errorHandler && errorHandler.fatal)\\r\\n            errorHandler.fatal(msg);\\r\\n\\r\\n        throw msg;\\r\\n\\r\\n    }\\r\\n\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n    typeof imscNames === \\'undefined\\' ? __webpack_require__(/*! ./names */ \"../node_modules/imsc/src/main/js/names.js\") : imscNames,\\r\\n    typeof imscStyles === \\'undefined\\' ? __webpack_require__(/*! ./styles */ \"../node_modules/imsc/src/main/js/styles.js\") : imscStyles,\\r\\n    typeof imscUtils === \\'undefined\\' ? __webpack_require__(/*! ./utils */ \"../node_modules/imsc/src/main/js/utils.js\") : imscUtils\\r\\n    );\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/isd.js?')},\"../node_modules/imsc/src/main/js/main.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\nexports.generateISD = __webpack_require__(/*! ./isd */ \"../node_modules/imsc/src/main/js/isd.js\").generateISD;\\r\\nexports.fromXML = __webpack_require__(/*! ./doc */ \"../node_modules/imsc/src/main/js/doc.js\").fromXML;\\r\\nexports.renderHTML = __webpack_require__(/*! ./html */ \"../node_modules/imsc/src/main/js/html.js\").render;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/main.js?')},\"../node_modules/imsc/src/main/js/names.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscNames\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscNames) { // wrapper for non-node envs\\r\\n\\r\\n    imscNames.ns_tt = \"http://www.w3.org/ns/ttml\";\\r\\n    imscNames.ns_tts = \"http://www.w3.org/ns/ttml#styling\";\\r\\n    imscNames.ns_ttp = \"http://www.w3.org/ns/ttml#parameter\";\\r\\n    imscNames.ns_xml = \"http://www.w3.org/XML/1998/namespace\";\\r\\n    imscNames.ns_itts = \"http://www.w3.org/ns/ttml/profile/imsc1#styling\";\\r\\n    imscNames.ns_ittp = \"http://www.w3.org/ns/ttml/profile/imsc1#parameter\";\\r\\n    imscNames.ns_smpte = \"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt\";\\r\\n    imscNames.ns_ebutts = \"urn:ebu:tt:style\";\\r\\n    \\r\\n})( false ? undefined : exports);\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/names.js?')},\"../node_modules/imsc/src/main/js/styles.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscStyles\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscStyles, imscNames, imscUtils) { // wrapper for non-node envs\\r\\n\\r\\n    function StylingAttributeDefinition(ns, name, initialValue, appliesTo, isInherit, isAnimatable, parseFunc, computeFunc) {\\r\\n        this.name = name;\\r\\n        this.ns = ns;\\r\\n        this.qname = ns + \" \" + name;\\r\\n        this.inherit = isInherit;\\r\\n        this.animatable = isAnimatable;\\r\\n        this.initial = initialValue;\\r\\n        this.applies = appliesTo;\\r\\n        this.parse = parseFunc;\\r\\n        this.compute = computeFunc;\\r\\n    }\\r\\n\\r\\n    imscStyles.all = [\\r\\n\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"backgroundColor\",\\r\\n            \"transparent\",\\r\\n            [\\'body\\', \\'div\\', \\'p\\', \\'region\\', \\'span\\'],\\r\\n            false,\\r\\n            true,\\r\\n            imscUtils.parseColor,\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"color\",\\r\\n            \"white\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseColor,\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"direction\",\\r\\n            \"ltr\",\\r\\n            [\\'p\\', \\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"display\",\\r\\n            \"auto\",\\r\\n            [\\'body\\', \\'div\\', \\'p\\', \\'region\\', \\'span\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"displayAlign\",\\r\\n            \"before\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"extent\",\\r\\n            \"auto\",\\r\\n            [\\'tt\\', \\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                if (str === \"auto\") {\\r\\n\\r\\n                    return str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    var s = str.split(\" \");\\r\\n                    if (s.length !== 2)\\r\\n                        return null;\\r\\n                    var w = imscUtils.parseLength(s[0]);\\r\\n                    var h = imscUtils.parseLength(s[1]);\\r\\n                    if (!h || !w)\\r\\n                        return null;\\r\\n                    return {\\'h\\': h, \\'w\\': w};\\r\\n                }\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var h;\\r\\n                var w;\\r\\n\\r\\n                if (attr === \"auto\") {\\r\\n\\r\\n                    h = new imscUtils.ComputedLength(0, 1);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    h = imscUtils.toComputedLength(\\r\\n                        attr.h.value,\\r\\n                        attr.h.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.h,\\r\\n                        null,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n\\r\\n                    if (h === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n                }\\r\\n\\r\\n                if (attr === \"auto\") {\\r\\n\\r\\n                    w = new imscUtils.ComputedLength(1, 0);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    w = imscUtils.toComputedLength(\\r\\n                        attr.w.value,\\r\\n                        attr.w.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.w,\\r\\n                        null,\\r\\n                        doc.pxLength.w\\r\\n                        );\\r\\n\\r\\n                    if (w === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return {\\'h\\': h, \\'w\\': w};\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"fontFamily\",\\r\\n            \"default\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var ffs = str.split(\",\");\\r\\n                var rslt = [];\\r\\n\\r\\n                for (var i in ffs) {\\r\\n\\r\\n                    if (ffs[i].charAt(0) !== \"\\'\" && ffs[i].charAt(0) !== \\'\"\\') {\\r\\n\\r\\n                        if (ffs[i] === \"default\") {\\r\\n\\r\\n                            /* per IMSC1 */\\r\\n\\r\\n                            rslt.push(\"monospaceSerif\");\\r\\n\\r\\n                        } else {\\r\\n\\r\\n                            rslt.push(ffs[i]);\\r\\n\\r\\n                        }\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        rslt.push(ffs[i]);\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return rslt;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"shear\",\\r\\n            \"0%\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseLength,\\r\\n            function (doc, parent, element, attr) {\\r\\n\\r\\n                var fs;\\r\\n\\r\\n                if (attr.unit === \"%\") {\\r\\n\\r\\n                    fs = Math.abs(attr.value) > 100 ? Math.sign(attr.value) * 100 : attr.value;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                return fs;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"fontSize\",\\r\\n            \"1c\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseLength,\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var fs;\\r\\n\\r\\n                fs = imscUtils.toComputedLength(\\r\\n                    attr.value,\\r\\n                    attr.unit,\\r\\n                    parent !== null ? parent.styleAttrs[imscStyles.byName.fontSize.qname] : doc.cellLength.h,\\r\\n                    parent !== null ? parent.styleAttrs[imscStyles.byName.fontSize.qname] : doc.cellLength.h,\\r\\n                    doc.cellLength.h,\\r\\n                    doc.pxLength.h\\r\\n                    );\\r\\n\\r\\n                return fs;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"fontStyle\",\\r\\n            \"normal\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                /* TODO: handle font style */\\r\\n\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"fontWeight\",\\r\\n            \"normal\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                /* TODO: handle font weight */\\r\\n\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"lineHeight\",\\r\\n            \"normal\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                if (str === \"normal\") {\\r\\n                    return str;\\r\\n                } else {\\r\\n                    return imscUtils.parseLength(str);\\r\\n                }\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var lh;\\r\\n\\r\\n                if (attr === \"normal\") {\\r\\n\\r\\n                    /* inherit normal per https://github.com/w3c/ttml1/issues/220 */\\r\\n\\r\\n                    lh = attr;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    lh = imscUtils.toComputedLength(\\r\\n                        attr.value,\\r\\n                        attr.unit,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        doc.cellLength.h,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n                    if (lh === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                /* TODO: create a Length constructor */\\r\\n\\r\\n                return lh;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"opacity\",\\r\\n            1.0,\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            parseFloat,\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"origin\",\\r\\n            \"auto\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                if (str === \"auto\") {\\r\\n\\r\\n                    return str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    var s = str.split(\" \");\\r\\n                    if (s.length !== 2)\\r\\n                        return null;\\r\\n                    var w = imscUtils.parseLength(s[0]);\\r\\n                    var h = imscUtils.parseLength(s[1]);\\r\\n                    if (!h || !w)\\r\\n                        return null;\\r\\n                    return {\\'h\\': h, \\'w\\': w};\\r\\n                }\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var h;\\r\\n                var w;\\r\\n\\r\\n                if (attr === \"auto\") {\\r\\n\\r\\n                    h = new imscUtils.ComputedLength(0,0);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    h = imscUtils.toComputedLength(\\r\\n                        attr.h.value,\\r\\n                        attr.h.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.h,\\r\\n                        null,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n                    if (h === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                if (attr === \"auto\") {\\r\\n\\r\\n                    w = new imscUtils.ComputedLength(0,0);\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    w = imscUtils.toComputedLength(\\r\\n                        attr.w.value,\\r\\n                        attr.w.unit,\\r\\n                        null,\\r\\n                        doc.dimensions.w,\\r\\n                        null,\\r\\n                        doc.pxLength.w\\r\\n                        );\\r\\n\\r\\n                    if (w === null) {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return {\\'h\\': h, \\'w\\': w};\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"overflow\",\\r\\n            \"hidden\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"padding\",\\r\\n            \"0px\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                var s = str.split(\" \");\\r\\n                if (s.length > 4)\\r\\n                    return null;\\r\\n                var r = [];\\r\\n                for (var i in s) {\\r\\n\\r\\n                    var l = imscUtils.parseLength(s[i]);\\r\\n                    if (!l)\\r\\n                        return null;\\r\\n                    r.push(l);\\r\\n                }\\r\\n\\r\\n                return r;\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                var padding;\\r\\n\\r\\n                /* TODO: make sure we are in region */\\r\\n\\r\\n                /*\\r\\n                 * expand padding shortcuts to \\r\\n                 * [before, end, after, start]\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (attr.length === 1) {\\r\\n\\r\\n                    padding = [attr[0], attr[0], attr[0], attr[0]];\\r\\n\\r\\n                } else if (attr.length === 2) {\\r\\n\\r\\n                    padding = [attr[0], attr[1], attr[0], attr[1]];\\r\\n\\r\\n                } else if (attr.length === 3) {\\r\\n\\r\\n                    padding = [attr[0], attr[1], attr[2], attr[1]];\\r\\n\\r\\n                } else if (attr.length === 4) {\\r\\n\\r\\n                    padding = [attr[0], attr[1], attr[2], attr[3]];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                /* TODO: take into account tts:direction */\\r\\n\\r\\n                /* \\r\\n                 * transform [before, end, after, start] according to writingMode to \\r\\n                 * [top,left,bottom,right]\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                var dir = element.styleAttrs[imscStyles.byName.writingMode.qname];\\r\\n\\r\\n                if (dir === \"lrtb\" || dir === \"lr\") {\\r\\n\\r\\n                    padding = [padding[0], padding[3], padding[2], padding[1]];\\r\\n\\r\\n                } else if (dir === \"rltb\" || dir === \"rl\") {\\r\\n\\r\\n                    padding = [padding[0], padding[1], padding[2], padding[3]];\\r\\n\\r\\n                } else if (dir === \"tblr\") {\\r\\n\\r\\n                    padding = [padding[3], padding[0], padding[1], padding[2]];\\r\\n\\r\\n                } else if (dir === \"tbrl\" || dir === \"tb\") {\\r\\n\\r\\n                    padding = [padding[3], padding[2], padding[1], padding[0]];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                var out = [];\\r\\n\\r\\n                for (var i in padding) {\\r\\n\\r\\n                    if (padding[i].value === 0) {\\r\\n\\r\\n                        out[i] = new imscUtils.ComputedLength(0,0);\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        out[i] = imscUtils.toComputedLength(\\r\\n                            padding[i].value,\\r\\n                            padding[i].unit,\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                            i === \"0\" || i === \"2\" ? element.styleAttrs[imscStyles.byName.extent.qname].h : element.styleAttrs[imscStyles.byName.extent.qname].w,\\r\\n                            i === \"0\" || i === \"2\" ? doc.cellLength.h : doc.cellLength.w,\\r\\n                            i === \"0\" || i === \"2\" ? doc.pxLength.h: doc.pxLength.w\\r\\n                            );\\r\\n\\r\\n                        if (out[i] === null) return null;\\r\\n\\r\\n                    }\\r\\n                }\\r\\n\\r\\n\\r\\n                return out;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"position\",\\r\\n            \"top left\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                return imscUtils.parsePosition(str);\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr) {\\r\\n                var h;\\r\\n                var w;\\r\\n                \\r\\n                h = imscUtils.toComputedLength(\\r\\n                    attr.v.offset.value,\\r\\n                    attr.v.offset.unit,\\r\\n                    null,\\r\\n                    new imscUtils.ComputedLength(\\r\\n                        - element.styleAttrs[imscStyles.byName.extent.qname].h.rw,\\r\\n                        doc.dimensions.h.rh - element.styleAttrs[imscStyles.byName.extent.qname].h.rh \\r\\n                    ),\\r\\n                    null,\\r\\n                    doc.pxLength.h\\r\\n                    );\\r\\n\\r\\n                if (h === null) return null;\\r\\n\\r\\n\\r\\n                if (attr.v.edge === \"bottom\") {\\r\\n\\r\\n                    h = new imscUtils.ComputedLength(\\r\\n                        - h.rw - element.styleAttrs[imscStyles.byName.extent.qname].h.rw,\\r\\n                        doc.dimensions.h.rh - h.rh - element.styleAttrs[imscStyles.byName.extent.qname].h.rh\\r\\n                    );\\r\\n            \\r\\n                }\\r\\n\\r\\n                w = imscUtils.toComputedLength(\\r\\n                    attr.h.offset.value,\\r\\n                    attr.h.offset.unit,\\r\\n                    null,\\r\\n                    new imscUtils.ComputedLength(\\r\\n                        doc.dimensions.w.rw - element.styleAttrs[imscStyles.byName.extent.qname].w.rw,\\r\\n                        - element.styleAttrs[imscStyles.byName.extent.qname].w.rh\\r\\n                    ),\\r\\n                    null,\\r\\n                    doc.pxLength.w\\r\\n                    );\\r\\n\\r\\n                if (h === null) return null;\\r\\n\\r\\n                if (attr.h.edge === \"right\") {\\r\\n                    \\r\\n                    w = new imscUtils.ComputedLength(\\r\\n                        doc.dimensions.w.rw - w.rw - element.styleAttrs[imscStyles.byName.extent.qname].w.rw,\\r\\n                        - w.rh - element.styleAttrs[imscStyles.byName.extent.qname].w.rh\\r\\n                    );\\r\\n\\r\\n                }\\r\\n\\r\\n                return {\\'h\\': h, \\'w\\': w};\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"ruby\",\\r\\n            \"none\",\\r\\n            [\\'span\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"rubyAlign\",\\r\\n            \"center\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                \\r\\n                if (! (str === \"center\" || str === \"spaceAround\")) {\\r\\n                    return null;\\r\\n                }\\r\\n                \\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"rubyPosition\",\\r\\n            \"outside\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"rubyReserve\",\\r\\n            \"none\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var s = str.split(\" \");\\r\\n\\r\\n                var r = [null, null];\\r\\n\\r\\n                if (s.length === 0 || s.length > 2)\\r\\n                    return null;\\r\\n\\r\\n                if (s[0] === \"none\" ||\\r\\n                    s[0] === \"both\" ||\\r\\n                    s[0] === \"after\" ||\\r\\n                    s[0] === \"before\" ||\\r\\n                    s[0] === \"outside\") {\\r\\n\\r\\n                    r[0] = s[0];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return null;\\r\\n\\r\\n                }\\r\\n\\r\\n                if (s.length === 2 && s[0] !== \"none\") {\\r\\n\\r\\n                    var l = imscUtils.parseLength(s[1]);\\r\\n\\r\\n                    if (l) {\\r\\n\\r\\n                        r[1] = l;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n\\r\\n                return r;\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                if (attr[0] === \"none\") {\\r\\n\\r\\n                    return attr;\\r\\n\\r\\n                }\\r\\n\\r\\n                var fs = null;\\r\\n\\r\\n                if (attr[1] === null) {\\r\\n\\r\\n                    fs = new imscUtils.ComputedLength(\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname].rw * 0.5,\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname].rh * 0.5\\r\\n                    );\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    fs = imscUtils.toComputedLength(attr[1].value,\\r\\n                        attr[1].unit,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        doc.cellLength.h,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n                \\r\\n                }\\r\\n\\r\\n                if (fs === null) return null;\\r\\n\\r\\n                return [attr[0], fs];\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"showBackground\",\\r\\n            \"always\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"textAlign\",\\r\\n            \"start\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n                /* Section 7.16.9 of XSL */\\r\\n\\r\\n                if (attr === \"left\") {\\r\\n\\r\\n                    return \"start\";\\r\\n\\r\\n                } else if (attr === \"right\") {\\r\\n\\r\\n                    return \"end\";\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    return attr;\\r\\n\\r\\n                }\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"textCombine\",\\r\\n            \"none\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var s = str.split(\" \");\\r\\n\\r\\n                if (s.length === 1) {\\r\\n\\r\\n                    if (s[0] === \"none\" || s[0] === \"all\") {\\r\\n\\r\\n                        return [s[0]];\\r\\n\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return null;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"textDecoration\",\\r\\n            \"none\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str.split(\" \");\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"textEmphasis\",\\r\\n            \"none\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                var e = str.split(\" \");\\r\\n\\r\\n                var rslt = {style: null, symbol: null, color: null, position: null};\\r\\n\\r\\n                for (var i in e) {\\r\\n\\r\\n                    if (e[i] === \"none\" || e[i] === \"auto\") {\\r\\n\\r\\n                        rslt.style = e[i];\\r\\n\\r\\n                    } else if (e[i] === \"filled\" ||\\r\\n                        e[i] === \"open\") {\\r\\n\\r\\n                        rslt.style = e[i];\\r\\n\\r\\n                    } else if (e[i] === \"circle\" ||\\r\\n                        e[i] === \"dot\" ||\\r\\n                        e[i] === \"sesame\") {\\r\\n\\r\\n                        rslt.symbol = e[i];\\r\\n\\r\\n                    } else if (e[i] === \"current\") {\\r\\n\\r\\n                        rslt.color = e[i];\\r\\n\\r\\n                    } else if (e[i] === \"outside\" || e[i] === \"before\" || e[i] === \"after\") {\\r\\n\\r\\n                        rslt.position = e[i];\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        rslt.color = imscUtils.parseColor(e[i]);\\r\\n\\r\\n                        if (rslt.color === null)\\r\\n                            return null;\\r\\n\\r\\n                    }\\r\\n                }\\r\\n\\r\\n                if (rslt.style == null && rslt.symbol == null) {\\r\\n\\r\\n                    rslt.style = \"auto\";\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rslt.symbol = rslt.symbol || \"circle\";\\r\\n                    rslt.style = rslt.style || \"filled\";\\r\\n\\r\\n                }\\r\\n\\r\\n                rslt.position = rslt.position || \"outside\";\\r\\n                rslt.color = rslt.color || \"current\";\\r\\n\\r\\n                return rslt;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"textOutline\",\\r\\n            \"none\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                /*\\r\\n                 * returns {c: <color>?, thichness: <length>} | \"none\"\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (str === \"none\") {\\r\\n\\r\\n                    return str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    var r = {};\\r\\n                    var s = str.split(\" \");\\r\\n                    if (s.length === 0 || s.length > 2)\\r\\n                        return null;\\r\\n                    var c = imscUtils.parseColor(s[0]);\\r\\n\\r\\n                    r.color = c;\\r\\n\\r\\n                    if (c !== null)\\r\\n                        s.shift();\\r\\n\\r\\n                    if (s.length !== 1)\\r\\n                        return null;\\r\\n\\r\\n                    var l = imscUtils.parseLength(s[0]);\\r\\n\\r\\n                    if (!l)\\r\\n                        return null;\\r\\n\\r\\n                    r.thickness = l;\\r\\n\\r\\n                    return r;\\r\\n                }\\r\\n\\r\\n            },\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                /*\\r\\n                 * returns {color: <color>, thickness: <norm length>}\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (attr === \"none\")\\r\\n                    return attr;\\r\\n\\r\\n                var rslt = {};\\r\\n\\r\\n                if (attr.color === null) {\\r\\n\\r\\n                    rslt.color = element.styleAttrs[imscStyles.byName.color.qname];\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rslt.color = attr.color;\\r\\n\\r\\n                }\\r\\n\\r\\n                rslt.thickness = imscUtils.toComputedLength(\\r\\n                    attr.thickness.value,\\r\\n                    attr.thickness.unit,\\r\\n                    element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                    element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                    doc.cellLength.h,\\r\\n                    doc.pxLength.h\\r\\n                    );\\r\\n\\r\\n                if (rslt.thickness === null)\\r\\n                    return null;\\r\\n\\r\\n                return rslt;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"textShadow\",\\r\\n            \"none\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            imscUtils.parseTextShadow,\\r\\n            function (doc, parent, element, attr) {\\r\\n\\r\\n                /*\\r\\n                 * returns [{x_off: <length>, y_off: <length>, b_radius: <length>, color: <color>}*] or \"none\"\\r\\n                 * \\r\\n                 */\\r\\n\\r\\n                if (attr === \"none\")\\r\\n                    return attr;\\r\\n\\r\\n                var r = [];\\r\\n\\r\\n                for (var i in attr) {\\r\\n\\r\\n                    var shadow = {};\\r\\n\\r\\n                    shadow.x_off = imscUtils.toComputedLength(\\r\\n                        attr[i][0].value,\\r\\n                        attr[i][0].unit,\\r\\n                        null,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        null,\\r\\n                        doc.pxLength.w\\r\\n                        );\\r\\n\\r\\n                    if (shadow.x_off === null)\\r\\n                        return null;\\r\\n\\r\\n                    shadow.y_off = imscUtils.toComputedLength(\\r\\n                        attr[i][1].value,\\r\\n                        attr[i][1].unit,\\r\\n                        null,\\r\\n                        element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                        null,\\r\\n                        doc.pxLength.h\\r\\n                        );\\r\\n\\r\\n                    if (shadow.y_off === null)\\r\\n                        return null;\\r\\n\\r\\n                    if (attr[i][2] === null) {\\r\\n\\r\\n                        shadow.b_radius = 0;\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        shadow.b_radius = imscUtils.toComputedLength(\\r\\n                            attr[i][2].value,\\r\\n                            attr[i][2].unit,\\r\\n                            null,\\r\\n                            element.styleAttrs[imscStyles.byName.fontSize.qname],\\r\\n                            null,\\r\\n                            doc.pxLength.h\\r\\n                            );\\r\\n\\r\\n                        if (shadow.b_radius === null)\\r\\n                            return null;\\r\\n\\r\\n                    }\\r\\n\\r\\n                    if (attr[i][3] === null) {\\r\\n\\r\\n                        shadow.color = element.styleAttrs[imscStyles.byName.color.qname];\\r\\n\\r\\n                    } else {\\r\\n\\r\\n                        shadow.color = attr[i][3];\\r\\n\\r\\n                    }\\r\\n\\r\\n                    r.push(shadow);\\r\\n\\r\\n                }\\r\\n\\r\\n                return r;\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"unicodeBidi\",\\r\\n            \"normal\",\\r\\n            [\\'span\\', \\'p\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"visibility\",\\r\\n            \"visible\",\\r\\n            [\\'body\\', \\'div\\', \\'p\\', \\'region\\', \\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"wrapOption\",\\r\\n            \"wrap\",\\r\\n            [\\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"writingMode\",\\r\\n            \"lrtb\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_tts,\\r\\n            \"zIndex\",\\r\\n            \"auto\",\\r\\n            [\\'region\\'],\\r\\n            false,\\r\\n            true,\\r\\n            function (str) {\\r\\n\\r\\n                var rslt;\\r\\n\\r\\n                if (str === \\'auto\\') {\\r\\n\\r\\n                    rslt = str;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    rslt = parseInt(str);\\r\\n\\r\\n                    if (isNaN(rslt)) {\\r\\n                        rslt = null;\\r\\n                    }\\r\\n\\r\\n                }\\r\\n\\r\\n                return rslt;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_ebutts,\\r\\n            \"linePadding\",\\r\\n            \"0c\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            false,\\r\\n            imscUtils.parseLength,\\r\\n            function (doc, parent, element, attr, context) {\\r\\n\\r\\n                return imscUtils.toComputedLength(attr.value, attr.unit, null, null, doc.cellLength.w, null);\\r\\n\\r\\n            }\\r\\n        ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_ebutts,\\r\\n            \"multiRowAlign\",\\r\\n            \"auto\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            false,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_smpte,\\r\\n            \"backgroundImage\",\\r\\n            null,\\r\\n            [\\'div\\'],\\r\\n            false,\\r\\n            false,\\r\\n            function (str) {\\r\\n                return str;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_itts,\\r\\n            \"forcedDisplay\",\\r\\n            \"false\",\\r\\n            [\\'body\\', \\'div\\', \\'p\\', \\'region\\', \\'span\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str === \\'true\\' ? true : false;\\r\\n            },\\r\\n            null\\r\\n            ),\\r\\n        new StylingAttributeDefinition(\\r\\n            imscNames.ns_itts,\\r\\n            \"fillLineGap\",\\r\\n            \"false\",\\r\\n            [\\'p\\'],\\r\\n            true,\\r\\n            true,\\r\\n            function (str) {\\r\\n                return str === \\'true\\' ? true : false;\\r\\n            },\\r\\n            null\\r\\n            )\\r\\n    ];\\r\\n\\r\\n    /* TODO: allow null parse function */\\r\\n\\r\\n    imscStyles.byQName = {};\\r\\n    for (var i in imscStyles.all) {\\r\\n\\r\\n        imscStyles.byQName[imscStyles.all[i].qname] = imscStyles.all[i];\\r\\n    }\\r\\n\\r\\n    imscStyles.byName = {};\\r\\n    for (var j in imscStyles.all) {\\r\\n\\r\\n        imscStyles.byName[imscStyles.all[j].name] = imscStyles.all[j];\\r\\n    }\\r\\n\\r\\n\\r\\n})( false ? undefined : exports,\\r\\n    typeof imscNames === \\'undefined\\' ? __webpack_require__(/*! ./names */ \"../node_modules/imsc/src/main/js/names.js\") : imscNames,\\r\\n    typeof imscUtils === \\'undefined\\' ? __webpack_require__(/*! ./utils */ \"../node_modules/imsc/src/main/js/utils.js\") : imscUtils);\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/styles.js?')},\"../node_modules/imsc/src/main/js/utils.js\":function(module,exports,__webpack_require__){eval('/* \\r\\n * Copyright (c) 2016, Pierre-Anthony Lemieux <pal@sandflow.com>\\r\\n * All rights reserved.\\r\\n *\\r\\n * Redistribution and use in source and binary forms, with or without\\r\\n * modification, are permitted provided that the following conditions are met:\\r\\n *\\r\\n * * Redistributions of source code must retain the above copyright notice, this\\r\\n *   list of conditions and the following disclaimer.\\r\\n * * Redistributions in binary form must reproduce the above copyright notice,\\r\\n *   this list of conditions and the following disclaimer in the documentation\\r\\n *   and/or other materials provided with the distribution.\\r\\n *\\r\\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\\r\\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\r\\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\\r\\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\\r\\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\r\\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\r\\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\\r\\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\\r\\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\\r\\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\\r\\n * POSSIBILITY OF SUCH DAMAGE.\\r\\n */\\r\\n\\r\\n/**\\r\\n * @module imscUtils\\r\\n */\\r\\n\\r\\n;\\r\\n(function (imscUtils) { // wrapper for non-node envs\\r\\n\\r\\n    /* Documents the error handler interface */\\r\\n\\r\\n    /**\\r\\n     * @classdesc Generic interface for handling events. The interface exposes four\\r\\n     * methods:\\r\\n     * * <pre>info</pre>: unusual event that does not result in an inconsistent state\\r\\n     * * <pre>warn</pre>: unexpected event that should not result in an inconsistent state\\r\\n     * * <pre>error</pre>: unexpected event that may result in an inconsistent state\\r\\n     * * <pre>fatal</pre>: unexpected event that results in an inconsistent state\\r\\n     *   and termination of processing\\r\\n     * Each method takes a single <pre>string</pre> describing the event as argument,\\r\\n     * and returns a single <pre>boolean</pre>, which terminates processing if <pre>true</pre>.\\r\\n     *\\r\\n     * @name ErrorHandler\\r\\n     * @class\\r\\n     */\\r\\n\\r\\n\\r\\n    /*\\r\\n     * Parses a TTML color expression\\r\\n     * \\r\\n     */\\r\\n\\r\\n    var HEX_COLOR_RE = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/;\\r\\n    var DEC_COLOR_RE = /rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/;\\r\\n    var DEC_COLORA_RE = /rgba\\\\(\\\\s*(\\\\d+),\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/;\\r\\n    var NAMED_COLOR = {\\r\\n        transparent: [0, 0, 0, 0],\\r\\n        black: [0, 0, 0, 255],\\r\\n        silver: [192, 192, 192, 255],\\r\\n        gray: [128, 128, 128, 255],\\r\\n        white: [255, 255, 255, 255],\\r\\n        maroon: [128, 0, 0, 255],\\r\\n        red: [255, 0, 0, 255],\\r\\n        purple: [128, 0, 128, 255],\\r\\n        fuchsia: [255, 0, 255, 255],\\r\\n        magenta: [255, 0, 255, 255],\\r\\n        green: [0, 128, 0, 255],\\r\\n        lime: [0, 255, 0, 255],\\r\\n        olive: [128, 128, 0, 255],\\r\\n        yellow: [255, 255, 0, 255],\\r\\n        navy: [0, 0, 128, 255],\\r\\n        blue: [0, 0, 255, 255],\\r\\n        teal: [0, 128, 128, 255],\\r\\n        aqua: [0, 255, 255, 255],\\r\\n        cyan: [0, 255, 255, 255]\\r\\n    };\\r\\n\\r\\n    imscUtils.parseColor = function (str) {\\r\\n\\r\\n        var m;\\r\\n        \\r\\n        var r = null;\\r\\n        \\r\\n        var nc = NAMED_COLOR[str.toLowerCase()];\\r\\n        \\r\\n        if (nc !== undefined) {\\r\\n\\r\\n            r = nc;\\r\\n\\r\\n        } else if ((m = HEX_COLOR_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = [parseInt(m[1], 16),\\r\\n                parseInt(m[2], 16),\\r\\n                parseInt(m[3], 16),\\r\\n                (m[4] !== undefined ? parseInt(m[4], 16) : 255)];\\r\\n            \\r\\n        } else if ((m = DEC_COLOR_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = [parseInt(m[1]),\\r\\n                parseInt(m[2]),\\r\\n                parseInt(m[3]),\\r\\n                255];\\r\\n            \\r\\n        } else if ((m = DEC_COLORA_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = [parseInt(m[1]),\\r\\n                parseInt(m[2]),\\r\\n                parseInt(m[3]),\\r\\n                parseInt(m[4])];\\r\\n            \\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n    var LENGTH_RE = /^((?:\\\\+|\\\\-)?\\\\d*(?:\\\\.\\\\d+)?)(px|em|c|%|rh|rw)$/;\\r\\n\\r\\n    imscUtils.parseLength = function (str) {\\r\\n\\r\\n        var m;\\r\\n\\r\\n        var r = null;\\r\\n\\r\\n        if ((m = LENGTH_RE.exec(str)) !== null) {\\r\\n\\r\\n            r = {value: parseFloat(m[1]), unit: m[2]};\\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n    imscUtils.parseTextShadow = function (str) {\\r\\n\\r\\n        var shadows = str.split(\",\");\\r\\n\\r\\n        var r = [];\\r\\n\\r\\n        for (var i in shadows) {\\r\\n\\r\\n            var shadow = shadows[i].split(\" \");\\r\\n\\r\\n            if (shadow.length === 1 && shadow[0] === \"none\") {\\r\\n\\r\\n                return \"none\";\\r\\n\\r\\n            } else if (shadow.length > 1 && shadow.length < 5) {\\r\\n\\r\\n                var out_shadow = [null, null, null, null];\\r\\n\\r\\n                /* x offset */\\r\\n\\r\\n                var l = imscUtils.parseLength(shadow.shift());\\r\\n\\r\\n                if (l === null)\\r\\n                    return null;\\r\\n\\r\\n                out_shadow[0] = l;\\r\\n\\r\\n                /* y offset */\\r\\n\\r\\n                l = imscUtils.parseLength(shadow.shift());\\r\\n\\r\\n                if (l === null)\\r\\n                    return null;\\r\\n\\r\\n                out_shadow[1] = l;\\r\\n\\r\\n                /* is there a third component */\\r\\n\\r\\n                if (shadow.length === 0) {\\r\\n                    r.push(out_shadow);\\r\\n                    continue;\\r\\n                }\\r\\n\\r\\n                l = imscUtils.parseLength(shadow[0]);\\r\\n\\r\\n                if (l !== null) {\\r\\n\\r\\n                    out_shadow[2] = l;\\r\\n\\r\\n                    shadow.shift();\\r\\n\\r\\n                }\\r\\n\\r\\n                if (shadow.length === 0) {\\r\\n                    r.push(out_shadow);\\r\\n                    continue;\\r\\n                }\\r\\n\\r\\n                var c = imscUtils.parseColor(shadow[0]);\\r\\n\\r\\n                if (c === null)\\r\\n                    return null;\\r\\n\\r\\n                out_shadow[3] = c;\\r\\n\\r\\n                r.push(out_shadow);\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return r;\\r\\n    };\\r\\n\\r\\n\\r\\n    imscUtils.parsePosition = function (str) {\\r\\n\\r\\n        /* see https://www.w3.org/TR/ttml2/#style-value-position */\\r\\n\\r\\n        var s = str.split(\" \");\\r\\n\\r\\n        var isKeyword = function (str) {\\r\\n\\r\\n            return str === \"center\" ||\\r\\n                    str === \"left\" ||\\r\\n                    str === \"top\" ||\\r\\n                    str === \"bottom\" ||\\r\\n                    str === \"right\";\\r\\n\\r\\n        };\\r\\n\\r\\n        if (s.length > 4) {\\r\\n\\r\\n            return null;\\r\\n\\r\\n        }\\r\\n\\r\\n        /* initial clean-up pass */\\r\\n\\r\\n        for (var j in s) {\\r\\n\\r\\n            if (!isKeyword(s[j])) {\\r\\n\\r\\n                var l = imscUtils.parseLength(s[j]);\\r\\n\\r\\n                if (l === null)\\r\\n                    return null;\\r\\n\\r\\n                s[j] = l;\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        /* position default */\\r\\n\\r\\n        var pos = {\\r\\n            h: {edge: \"left\", offset: {value: 50, unit: \"%\"}},\\r\\n            v: {edge: \"top\", offset: {value: 50, unit: \"%\"}}\\r\\n        };\\r\\n\\r\\n        /* update position */\\r\\n\\r\\n        for (var i = 0; i < s.length; ) {\\r\\n\\r\\n            /* extract the current component */\\r\\n\\r\\n            var comp = s[i++];\\r\\n\\r\\n            if (isKeyword(comp)) {\\r\\n\\r\\n                /* we have a keyword */\\r\\n\\r\\n                var offset = {value: 0, unit: \"%\"};\\r\\n\\r\\n                /* peek at the next component */\\r\\n\\r\\n                if (s.length !== 2 && i < s.length && (!isKeyword(s[i]))) {\\r\\n\\r\\n                    /* followed by an offset */\\r\\n\\r\\n                    offset = s[i++];\\r\\n\\r\\n                }\\r\\n\\r\\n                /* skip if center */\\r\\n\\r\\n                if (comp === \"right\") {\\r\\n\\r\\n                    pos.h.edge = comp;\\r\\n\\r\\n                    pos.h.offset = offset;\\r\\n\\r\\n                } else if (comp === \"bottom\") {\\r\\n\\r\\n                    pos.v.edge = comp;\\r\\n\\r\\n\\r\\n                    pos.v.offset = offset;\\r\\n\\r\\n\\r\\n                } else if (comp === \"left\") {\\r\\n\\r\\n                    pos.h.offset = offset;\\r\\n\\r\\n\\r\\n                } else if (comp === \"top\") {\\r\\n\\r\\n                    pos.v.offset = offset;\\r\\n\\r\\n\\r\\n                }\\r\\n\\r\\n            } else if (s.length === 1 || s.length === 2) {\\r\\n\\r\\n                /* we have a bare value */\\r\\n\\r\\n                if (i === 1) {\\r\\n\\r\\n                    /* assign it to left edge if first bare value */\\r\\n\\r\\n                    pos.h.offset = comp;\\r\\n\\r\\n                } else {\\r\\n\\r\\n                    /* assign it to top edge if second bare value */\\r\\n\\r\\n                    pos.v.offset = comp;\\r\\n\\r\\n                }\\r\\n\\r\\n            } else {\\r\\n\\r\\n                /* error condition */\\r\\n\\r\\n                return null;\\r\\n\\r\\n            }\\r\\n\\r\\n        }\\r\\n\\r\\n        return pos;\\r\\n    };\\r\\n\\r\\n\\r\\n    imscUtils.ComputedLength = function (rw, rh) {\\r\\n        this.rw = rw;\\r\\n        this.rh = rh;\\r\\n    };\\r\\n\\r\\n    imscUtils.ComputedLength.prototype.toUsedLength = function (width, height) {\\r\\n        return width * this.rw + height * this.rh;\\r\\n    };\\r\\n\\r\\n    imscUtils.ComputedLength.prototype.isZero = function () {\\r\\n        return this.rw === 0 && this.rh === 0;\\r\\n    };\\r\\n\\r\\n    /**\\r\\n     * Computes a specified length to a root container relative length\\r\\n     * \\r\\n     * @param {number} lengthVal Length value to be computed\\r\\n     * @param {string} lengthUnit Units of the length value\\r\\n     * @param {number} emScale length of 1em, or null if em is not allowed\\r\\n     * @param {number} percentScale length to which , or null if perecentage is not allowed\\r\\n     * @param {number} cellScale length of 1c, or null if c is not allowed\\r\\n     * @param {number} pxScale length of 1px, or null if px is not allowed\\r\\n     * @param {number} direction 0 if the length is computed in the horizontal direction, 1 if the length is computed in the vertical direction\\r\\n     * @return {number} Computed length\\r\\n     */\\r\\n    imscUtils.toComputedLength = function(lengthVal, lengthUnit, emLength, percentLength, cellLength, pxLength) {\\r\\n\\r\\n        if (lengthUnit === \"%\" && percentLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    percentLength.rw * lengthVal / 100,\\r\\n                    percentLength.rh * lengthVal / 100\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \"em\" && emLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    emLength.rw * lengthVal,\\r\\n                    emLength.rh * lengthVal\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \"c\" && cellLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    lengthVal * cellLength.rw,\\r\\n                    lengthVal * cellLength.rh\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \"px\" && pxLength) {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    lengthVal * pxLength.rw,\\r\\n                    lengthVal * pxLength.rh\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \"rh\") {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    0,\\r\\n                    lengthVal / 100\\r\\n                    );\\r\\n\\r\\n        } else if (lengthUnit === \"rw\") {\\r\\n\\r\\n            return new imscUtils.ComputedLength(\\r\\n                    lengthVal / 100,\\r\\n                    0                    \\r\\n                    );\\r\\n\\r\\n        } else {\\r\\n\\r\\n            return null;\\r\\n\\r\\n        }\\r\\n\\r\\n    };\\r\\n\\r\\n\\r\\n\\r\\n})( false ? undefined : exports);\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/imsc/src/main/js/utils.js?')},\"../node_modules/inherits/inherits_browser.js\":function(module,exports){eval(\"if (typeof Object.create === 'function') {\\n  // implementation from standard node.js 'util' module\\n  module.exports = function inherits(ctor, superCtor) {\\n    if (superCtor) {\\n      ctor.super_ = superCtor\\n      ctor.prototype = Object.create(superCtor.prototype, {\\n        constructor: {\\n          value: ctor,\\n          enumerable: false,\\n          writable: true,\\n          configurable: true\\n        }\\n      })\\n    }\\n  };\\n} else {\\n  // old school shim for old browsers\\n  module.exports = function inherits(ctor, superCtor) {\\n    if (superCtor) {\\n      ctor.super_ = superCtor\\n      var TempCtor = function () {}\\n      TempCtor.prototype = superCtor.prototype\\n      ctor.prototype = new TempCtor()\\n      ctor.prototype.constructor = ctor\\n    }\\n  }\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/inherits/inherits_browser.js?\")},\"../node_modules/is-function/index.js\":function(module,exports){eval(\"module.exports = isFunction\\n\\nvar toString = Object.prototype.toString\\n\\nfunction isFunction (fn) {\\n  if (!fn) {\\n    return false\\n  }\\n  var string = toString.call(fn)\\n  return string === '[object Function]' ||\\n    (typeof fn === 'function' && string !== '[object RegExp]') ||\\n    (typeof window !== 'undefined' &&\\n     // IE8 and below\\n     (fn === window.setTimeout ||\\n      fn === window.alert ||\\n      fn === window.confirm ||\\n      fn === window.prompt))\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/is-function/index.js?\")},\"../node_modules/is-obj/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\nmodule.exports = function (x) {\\n\\tvar type = typeof x;\\n\\treturn x !== null && (type === 'object' || type === 'function');\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/is-obj/index.js?\")},\"../node_modules/isarray/index.js\":function(module,exports){eval(\"var toString = {}.toString;\\n\\nmodule.exports = Array.isArray || function (arr) {\\n  return toString.call(arr) == '[object Array]';\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/isarray/index.js?\")},\"../node_modules/keycode/index.js\":function(module,exports){eval(\"// Source: http://jsfiddle.net/vWx8V/\\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\\n\\n/**\\n * Conenience method returns corresponding value for given keyName or keyCode.\\n *\\n * @param {Mixed} keyCode {Number} or keyName {String}\\n * @return {Mixed}\\n * @api public\\n */\\n\\nfunction keyCode(searchInput) {\\n  // Keyboard Events\\n  if (searchInput && 'object' === typeof searchInput) {\\n    var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode\\n    if (hasKeyCode) searchInput = hasKeyCode\\n  }\\n\\n  // Numbers\\n  if ('number' === typeof searchInput) return names[searchInput]\\n\\n  // Everything else (cast to string)\\n  var search = String(searchInput)\\n\\n  // check codes\\n  var foundNamedKey = codes[search.toLowerCase()]\\n  if (foundNamedKey) return foundNamedKey\\n\\n  // check aliases\\n  var foundNamedKey = aliases[search.toLowerCase()]\\n  if (foundNamedKey) return foundNamedKey\\n\\n  // weird character?\\n  if (search.length === 1) return search.charCodeAt(0)\\n\\n  return undefined\\n}\\n\\n/**\\n * Compares a keyboard event with a given keyCode or keyName.\\n *\\n * @param {Event} event Keyboard event that should be tested\\n * @param {Mixed} keyCode {Number} or keyName {String}\\n * @return {Boolean}\\n * @api public\\n */\\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\\n  if (event && 'object' === typeof event) {\\n    var keyCode = event.which || event.keyCode || event.charCode\\n    if (keyCode === null || keyCode === undefined) { return false; }\\n    if (typeof nameOrCode === 'string') {\\n      // check codes\\n      var foundNamedKey = codes[nameOrCode.toLowerCase()]\\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\\n    \\n      // check aliases\\n      var foundNamedKey = aliases[nameOrCode.toLowerCase()]\\n      if (foundNamedKey) { return foundNamedKey === keyCode; }\\n    } else if (typeof nameOrCode === 'number') {\\n      return nameOrCode === keyCode;\\n    }\\n    return false;\\n  }\\n}\\n\\nexports = module.exports = keyCode;\\n\\n/**\\n * Get by name\\n *\\n *   exports.code['enter'] // => 13\\n */\\n\\nvar codes = exports.code = exports.codes = {\\n  'backspace': 8,\\n  'tab': 9,\\n  'enter': 13,\\n  'shift': 16,\\n  'ctrl': 17,\\n  'alt': 18,\\n  'pause/break': 19,\\n  'caps lock': 20,\\n  'esc': 27,\\n  'space': 32,\\n  'page up': 33,\\n  'page down': 34,\\n  'end': 35,\\n  'home': 36,\\n  'left': 37,\\n  'up': 38,\\n  'right': 39,\\n  'down': 40,\\n  'insert': 45,\\n  'delete': 46,\\n  'command': 91,\\n  'left command': 91,\\n  'right command': 93,\\n  'numpad *': 106,\\n  'numpad +': 107,\\n  'numpad -': 109,\\n  'numpad .': 110,\\n  'numpad /': 111,\\n  'num lock': 144,\\n  'scroll lock': 145,\\n  'my computer': 182,\\n  'my calculator': 183,\\n  ';': 186,\\n  '=': 187,\\n  ',': 188,\\n  '-': 189,\\n  '.': 190,\\n  '/': 191,\\n  '`': 192,\\n  '[': 219,\\n  '\\\\\\\\': 220,\\n  ']': 221,\\n  \\\"'\\\": 222\\n}\\n\\n// Helper aliases\\n\\nvar aliases = exports.aliases = {\\n  'windows': 91,\\n  '⇧': 16,\\n  '⌥': 18,\\n  '⌃': 17,\\n  '⌘': 91,\\n  'ctl': 17,\\n  'control': 17,\\n  'option': 18,\\n  'pause': 19,\\n  'break': 19,\\n  'caps': 20,\\n  'return': 13,\\n  'escape': 27,\\n  'spc': 32,\\n  'spacebar': 32,\\n  'pgup': 33,\\n  'pgdn': 34,\\n  'ins': 45,\\n  'del': 46,\\n  'cmd': 91\\n}\\n\\n/*!\\n * Programatically add the following\\n */\\n\\n// lower case chars\\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32\\n\\n// numbers\\nfor (var i = 48; i < 58; i++) codes[i - 48] = i\\n\\n// function keys\\nfor (i = 1; i < 13; i++) codes['f'+i] = i + 111\\n\\n// numpad keys\\nfor (i = 0; i < 10; i++) codes['numpad '+i] = i + 96\\n\\n/**\\n * Get by code\\n *\\n *   exports.name[13] // => 'Enter'\\n */\\n\\nvar names = exports.names = exports.title = {} // title for backward compat\\n\\n// Create reverse mapping\\nfor (i in codes) names[codes[i]] = i\\n\\n// Add aliases\\nfor (var alias in aliases) {\\n  codes[alias] = aliases[alias]\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/keycode/index.js?\")},\"../node_modules/m3u8-parser/dist/m3u8-parser.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"LineStream\\\", function() { return LineStream; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"ParseStream\\\", function() { return ParseStream; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"Parser\\\", function() { return Parser; });\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\");\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\\n/*! @name m3u8-parser @version 4.4.0 @license Apache-2.0 */\\n\\n\\nfunction _extends() {\\n  _extends = Object.assign || function (target) {\\n    for (var i = 1; i < arguments.length; i++) {\\n      var source = arguments[i];\\n\\n      for (var key in source) {\\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\\n          target[key] = source[key];\\n        }\\n      }\\n    }\\n\\n    return target;\\n  };\\n\\n  return _extends.apply(this, arguments);\\n}\\n\\nfunction _inheritsLoose(subClass, superClass) {\\n  subClass.prototype = Object.create(superClass.prototype);\\n  subClass.prototype.constructor = subClass;\\n  subClass.__proto__ = superClass;\\n}\\n\\nfunction _assertThisInitialized(self) {\\n  if (self === void 0) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return self;\\n}\\n\\n/**\\n * @file stream.js\\n */\\n\\n/**\\n * A lightweight readable stream implementation that handles event dispatching.\\n *\\n * @class Stream\\n */\\nvar Stream =\\n/*#__PURE__*/\\nfunction () {\\n  function Stream() {\\n    this.listeners = {};\\n  }\\n  /**\\n   * Add a listener for a specified event type.\\n   *\\n   * @param {string} type the event name\\n   * @param {Function} listener the callback to be invoked when an event of\\n   * the specified type occurs\\n   */\\n\\n\\n  var _proto = Stream.prototype;\\n\\n  _proto.on = function on(type, listener) {\\n    if (!this.listeners[type]) {\\n      this.listeners[type] = [];\\n    }\\n\\n    this.listeners[type].push(listener);\\n  }\\n  /**\\n   * Remove a listener for a specified event type.\\n   *\\n   * @param {string} type the event name\\n   * @param {Function} listener  a function previously registered for this\\n   * type of event through `on`\\n   * @return {boolean} if we could turn it off or not\\n   */\\n  ;\\n\\n  _proto.off = function off(type, listener) {\\n    if (!this.listeners[type]) {\\n      return false;\\n    }\\n\\n    var index = this.listeners[type].indexOf(listener);\\n    this.listeners[type].splice(index, 1);\\n    return index > -1;\\n  }\\n  /**\\n   * Trigger an event of the specified type on this stream. Any additional\\n   * arguments to this function are passed as parameters to event listeners.\\n   *\\n   * @param {string} type the event name\\n   */\\n  ;\\n\\n  _proto.trigger = function trigger(type) {\\n    var callbacks = this.listeners[type];\\n    var i;\\n    var length;\\n    var args;\\n\\n    if (!callbacks) {\\n      return;\\n    } // Slicing the arguments on every invocation of this method\\n    // can add a significant amount of overhead. Avoid the\\n    // intermediate object creation for the common case of a\\n    // single callback argument\\n\\n\\n    if (arguments.length === 2) {\\n      length = callbacks.length;\\n\\n      for (i = 0; i < length; ++i) {\\n        callbacks[i].call(this, arguments[1]);\\n      }\\n    } else {\\n      args = Array.prototype.slice.call(arguments, 1);\\n      length = callbacks.length;\\n\\n      for (i = 0; i < length; ++i) {\\n        callbacks[i].apply(this, args);\\n      }\\n    }\\n  }\\n  /**\\n   * Destroys the stream and cleans up.\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.listeners = {};\\n  }\\n  /**\\n   * Forwards all `data` events on this stream to the destination stream. The\\n   * destination stream should provide a method `push` to receive the data\\n   * events as they arrive.\\n   *\\n   * @param {Stream} destination the stream that will receive all `data` events\\n   * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n   */\\n  ;\\n\\n  _proto.pipe = function pipe(destination) {\\n    this.on('data', function (data) {\\n      destination.push(data);\\n    });\\n  };\\n\\n  return Stream;\\n}();\\n\\n/**\\n * A stream that buffers string input and generates a `data` event for each\\n * line.\\n *\\n * @class LineStream\\n * @extends Stream\\n */\\n\\nvar LineStream =\\n/*#__PURE__*/\\nfunction (_Stream) {\\n  _inheritsLoose(LineStream, _Stream);\\n\\n  function LineStream() {\\n    var _this;\\n\\n    _this = _Stream.call(this) || this;\\n    _this.buffer = '';\\n    return _this;\\n  }\\n  /**\\n   * Add new data to be parsed.\\n   *\\n   * @param {string} data the text to process\\n   */\\n\\n\\n  var _proto = LineStream.prototype;\\n\\n  _proto.push = function push(data) {\\n    var nextNewline;\\n    this.buffer += data;\\n    nextNewline = this.buffer.indexOf('\\\\n');\\n\\n    for (; nextNewline > -1; nextNewline = this.buffer.indexOf('\\\\n')) {\\n      this.trigger('data', this.buffer.substring(0, nextNewline));\\n      this.buffer = this.buffer.substring(nextNewline + 1);\\n    }\\n  };\\n\\n  return LineStream;\\n}(Stream);\\n\\n/**\\n * \\\"forgiving\\\" attribute list psuedo-grammar:\\n * attributes -> keyvalue (',' keyvalue)*\\n * keyvalue   -> key '=' value\\n * key        -> [^=]*\\n * value      -> '\\\"' [^\\\"]* '\\\"' | [^,]*\\n */\\n\\nvar attributeSeparator = function attributeSeparator() {\\n  var key = '[^=]*';\\n  var value = '\\\"[^\\\"]*\\\"|[^,]*';\\n  var keyvalue = '(?:' + key + ')=(?:' + value + ')';\\n  return new RegExp('(?:^|,)(' + keyvalue + ')');\\n};\\n/**\\n * Parse attributes from a line given the separator\\n *\\n * @param {string} attributes the attribute line to parse\\n */\\n\\n\\nvar parseAttributes = function parseAttributes(attributes) {\\n  // split the string using attributes as the separator\\n  var attrs = attributes.split(attributeSeparator());\\n  var result = {};\\n  var i = attrs.length;\\n  var attr;\\n\\n  while (i--) {\\n    // filter out unmatched portions of the string\\n    if (attrs[i] === '') {\\n      continue;\\n    } // split the key and value\\n\\n\\n    attr = /([^=]*)=(.*)/.exec(attrs[i]).slice(1); // trim whitespace and remove optional quotes around the value\\n\\n    attr[0] = attr[0].replace(/^\\\\s+|\\\\s+$/g, '');\\n    attr[1] = attr[1].replace(/^\\\\s+|\\\\s+$/g, '');\\n    attr[1] = attr[1].replace(/^['\\\"](.*)['\\\"]$/g, '$1');\\n    result[attr[0]] = attr[1];\\n  }\\n\\n  return result;\\n};\\n/**\\n * A line-level M3U8 parser event stream. It expects to receive input one\\n * line at a time and performs a context-free parse of its contents. A stream\\n * interpretation of a manifest can be useful if the manifest is expected to\\n * be too large to fit comfortably into memory or the entirety of the input\\n * is not immediately available. Otherwise, it's probably much easier to work\\n * with a regular `Parser` object.\\n *\\n * Produces `data` events with an object that captures the parser's\\n * interpretation of the input. That object has a property `tag` that is one\\n * of `uri`, `comment`, or `tag`. URIs only have a single additional\\n * property, `line`, which captures the entirety of the input without\\n * interpretation. Comments similarly have a single additional property\\n * `text` which is the input without the leading `#`.\\n *\\n * Tags always have a property `tagType` which is the lower-cased version of\\n * the M3U8 directive without the `#EXT` or `#EXT-X-` prefix. For instance,\\n * `#EXT-X-MEDIA-SEQUENCE` becomes `media-sequence` when parsed. Unrecognized\\n * tags are given the tag type `unknown` and a single additional property\\n * `data` with the remainder of the input.\\n *\\n * @class ParseStream\\n * @extends Stream\\n */\\n\\n\\nvar ParseStream =\\n/*#__PURE__*/\\nfunction (_Stream) {\\n  _inheritsLoose(ParseStream, _Stream);\\n\\n  function ParseStream() {\\n    var _this;\\n\\n    _this = _Stream.call(this) || this;\\n    _this.customParsers = [];\\n    _this.tagMappers = [];\\n    return _this;\\n  }\\n  /**\\n   * Parses an additional line of input.\\n   *\\n   * @param {string} line a single line of an M3U8 file to parse\\n   */\\n\\n\\n  var _proto = ParseStream.prototype;\\n\\n  _proto.push = function push(line) {\\n    var _this2 = this;\\n\\n    var match;\\n    var event; // strip whitespace\\n\\n    line = line.trim();\\n\\n    if (line.length === 0) {\\n      // ignore empty lines\\n      return;\\n    } // URIs\\n\\n\\n    if (line[0] !== '#') {\\n      this.trigger('data', {\\n        type: 'uri',\\n        uri: line\\n      });\\n      return;\\n    } // map tags\\n\\n\\n    var newLines = this.tagMappers.reduce(function (acc, mapper) {\\n      var mappedLine = mapper(line); // skip if unchanged\\n\\n      if (mappedLine === line) {\\n        return acc;\\n      }\\n\\n      return acc.concat([mappedLine]);\\n    }, [line]);\\n    newLines.forEach(function (newLine) {\\n      for (var i = 0; i < _this2.customParsers.length; i++) {\\n        if (_this2.customParsers[i].call(_this2, newLine)) {\\n          return;\\n        }\\n      } // Comments\\n\\n\\n      if (newLine.indexOf('#EXT') !== 0) {\\n        _this2.trigger('data', {\\n          type: 'comment',\\n          text: newLine.slice(1)\\n        });\\n\\n        return;\\n      } // strip off any carriage returns here so the regex matching\\n      // doesn't have to account for them.\\n\\n\\n      newLine = newLine.replace('\\\\r', ''); // Tags\\n\\n      match = /^#EXTM3U/.exec(newLine);\\n\\n      if (match) {\\n        _this2.trigger('data', {\\n          type: 'tag',\\n          tagType: 'm3u'\\n        });\\n\\n        return;\\n      }\\n\\n      match = /^#EXTINF:?([0-9\\\\.]*)?,?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'inf'\\n        };\\n\\n        if (match[1]) {\\n          event.duration = parseFloat(match[1]);\\n        }\\n\\n        if (match[2]) {\\n          event.title = match[2];\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'targetduration'\\n        };\\n\\n        if (match[1]) {\\n          event.duration = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'totalduration'\\n        };\\n\\n        if (match[1]) {\\n          event.duration = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-VERSION:?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'version'\\n        };\\n\\n        if (match[1]) {\\n          event.version = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-MEDIA-SEQUENCE:?(\\\\-?[0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'media-sequence'\\n        };\\n\\n        if (match[1]) {\\n          event.number = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-DISCONTINUITY-SEQUENCE:?(\\\\-?[0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'discontinuity-sequence'\\n        };\\n\\n        if (match[1]) {\\n          event.number = parseInt(match[1], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'playlist-type'\\n        };\\n\\n        if (match[1]) {\\n          event.playlistType = match[1];\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'byterange'\\n        };\\n\\n        if (match[1]) {\\n          event.length = parseInt(match[1], 10);\\n        }\\n\\n        if (match[2]) {\\n          event.offset = parseInt(match[2], 10);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'allow-cache'\\n        };\\n\\n        if (match[1]) {\\n          event.allowed = !/NO/.test(match[1]);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-MAP:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'map'\\n        };\\n\\n        if (match[1]) {\\n          var attributes = parseAttributes(match[1]);\\n\\n          if (attributes.URI) {\\n            event.uri = attributes.URI;\\n          }\\n\\n          if (attributes.BYTERANGE) {\\n            var _attributes$BYTERANGE = attributes.BYTERANGE.split('@'),\\n                length = _attributes$BYTERANGE[0],\\n                offset = _attributes$BYTERANGE[1];\\n\\n            event.byterange = {};\\n\\n            if (length) {\\n              event.byterange.length = parseInt(length, 10);\\n            }\\n\\n            if (offset) {\\n              event.byterange.offset = parseInt(offset, 10);\\n            }\\n          }\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-STREAM-INF:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'stream-inf'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]);\\n\\n          if (event.attributes.RESOLUTION) {\\n            var split = event.attributes.RESOLUTION.split('x');\\n            var resolution = {};\\n\\n            if (split[0]) {\\n              resolution.width = parseInt(split[0], 10);\\n            }\\n\\n            if (split[1]) {\\n              resolution.height = parseInt(split[1], 10);\\n            }\\n\\n            event.attributes.RESOLUTION = resolution;\\n          }\\n\\n          if (event.attributes.BANDWIDTH) {\\n            event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);\\n          }\\n\\n          if (event.attributes['PROGRAM-ID']) {\\n            event.attributes['PROGRAM-ID'] = parseInt(event.attributes['PROGRAM-ID'], 10);\\n          }\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-MEDIA:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'media'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-ENDLIST/.exec(newLine);\\n\\n      if (match) {\\n        _this2.trigger('data', {\\n          type: 'tag',\\n          tagType: 'endlist'\\n        });\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-DISCONTINUITY/.exec(newLine);\\n\\n      if (match) {\\n        _this2.trigger('data', {\\n          type: 'tag',\\n          tagType: 'discontinuity'\\n        });\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'program-date-time'\\n        };\\n\\n        if (match[1]) {\\n          event.dateTimeString = match[1];\\n          event.dateTimeObject = new Date(match[1]);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-KEY:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'key'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]); // parse the IV string into a Uint32Array\\n\\n          if (event.attributes.IV) {\\n            if (event.attributes.IV.substring(0, 2).toLowerCase() === '0x') {\\n              event.attributes.IV = event.attributes.IV.substring(2);\\n            }\\n\\n            event.attributes.IV = event.attributes.IV.match(/.{8}/g);\\n            event.attributes.IV[0] = parseInt(event.attributes.IV[0], 16);\\n            event.attributes.IV[1] = parseInt(event.attributes.IV[1], 16);\\n            event.attributes.IV[2] = parseInt(event.attributes.IV[2], 16);\\n            event.attributes.IV[3] = parseInt(event.attributes.IV[3], 16);\\n            event.attributes.IV = new Uint32Array(event.attributes.IV);\\n          }\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-START:?(.*)$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'start'\\n        };\\n\\n        if (match[1]) {\\n          event.attributes = parseAttributes(match[1]);\\n          event.attributes['TIME-OFFSET'] = parseFloat(event.attributes['TIME-OFFSET']);\\n          event.attributes.PRECISE = /YES/.test(event.attributes.PRECISE);\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'cue-out-cont'\\n        };\\n\\n        if (match[1]) {\\n          event.data = match[1];\\n        } else {\\n          event.data = '';\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-CUE-OUT:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'cue-out'\\n        };\\n\\n        if (match[1]) {\\n          event.data = match[1];\\n        } else {\\n          event.data = '';\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      }\\n\\n      match = /^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine);\\n\\n      if (match) {\\n        event = {\\n          type: 'tag',\\n          tagType: 'cue-in'\\n        };\\n\\n        if (match[1]) {\\n          event.data = match[1];\\n        } else {\\n          event.data = '';\\n        }\\n\\n        _this2.trigger('data', event);\\n\\n        return;\\n      } // unknown tag type\\n\\n\\n      _this2.trigger('data', {\\n        type: 'tag',\\n        data: newLine.slice(4)\\n      });\\n    });\\n  }\\n  /**\\n   * Add a parser for custom headers\\n   *\\n   * @param {Object}   options              a map of options for the added parser\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {string}   options.customType   the custom type to register to the output\\n   * @param {Function} [options.dataParser] function to parse the line into an object\\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\\n   */\\n  ;\\n\\n  _proto.addParser = function addParser(_ref) {\\n    var _this3 = this;\\n\\n    var expression = _ref.expression,\\n        customType = _ref.customType,\\n        dataParser = _ref.dataParser,\\n        segment = _ref.segment;\\n\\n    if (typeof dataParser !== 'function') {\\n      dataParser = function dataParser(line) {\\n        return line;\\n      };\\n    }\\n\\n    this.customParsers.push(function (line) {\\n      var match = expression.exec(line);\\n\\n      if (match) {\\n        _this3.trigger('data', {\\n          type: 'custom',\\n          data: dataParser(line),\\n          customType: customType,\\n          segment: segment\\n        });\\n\\n        return true;\\n      }\\n    });\\n  }\\n  /**\\n   * Add a custom header mapper\\n   *\\n   * @param {Object}   options\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {Function} options.map          function to translate tag into a different tag\\n   */\\n  ;\\n\\n  _proto.addTagMapper = function addTagMapper(_ref2) {\\n    var expression = _ref2.expression,\\n        map = _ref2.map;\\n\\n    var mapFn = function mapFn(line) {\\n      if (expression.test(line)) {\\n        return map(line);\\n      }\\n\\n      return line;\\n    };\\n\\n    this.tagMappers.push(mapFn);\\n  };\\n\\n  return ParseStream;\\n}(Stream);\\n\\nfunction decodeB64ToUint8Array(b64Text) {\\n  var decodedString = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.atob(b64Text || '');\\n  var array = new Uint8Array(decodedString.length);\\n\\n  for (var i = 0; i < decodedString.length; i++) {\\n    array[i] = decodedString.charCodeAt(i);\\n  }\\n\\n  return array;\\n}\\n\\n/**\\n * A parser for M3U8 files. The current interpretation of the input is\\n * exposed as a property `manifest` on parser objects. It's just two lines to\\n * create and parse a manifest once you have the contents available as a string:\\n *\\n * ```js\\n * var parser = new m3u8.Parser();\\n * parser.push(xhr.responseText);\\n * ```\\n *\\n * New input can later be applied to update the manifest object by calling\\n * `push` again.\\n *\\n * The parser attempts to create a usable manifest object even if the\\n * underlying input is somewhat nonsensical. It emits `info` and `warning`\\n * events during the parse if it encounters input that seems invalid or\\n * requires some property of the manifest object to be defaulted.\\n *\\n * @class Parser\\n * @extends Stream\\n */\\n\\nvar Parser =\\n/*#__PURE__*/\\nfunction (_Stream) {\\n  _inheritsLoose(Parser, _Stream);\\n\\n  function Parser() {\\n    var _this;\\n\\n    _this = _Stream.call(this) || this;\\n    _this.lineStream = new LineStream();\\n    _this.parseStream = new ParseStream();\\n\\n    _this.lineStream.pipe(_this.parseStream);\\n    /* eslint-disable consistent-this */\\n\\n\\n    var self = _assertThisInitialized(_this);\\n    /* eslint-enable consistent-this */\\n\\n\\n    var uris = [];\\n    var currentUri = {}; // if specified, the active EXT-X-MAP definition\\n\\n    var currentMap; // if specified, the active decryption key\\n\\n    var _key;\\n\\n    var noop = function noop() {};\\n\\n    var defaultMediaGroups = {\\n      'AUDIO': {},\\n      'VIDEO': {},\\n      'CLOSED-CAPTIONS': {},\\n      'SUBTITLES': {}\\n    }; // This is the Widevine UUID from DASH IF IOP. The same exact string is\\n    // used in MPDs with Widevine encrypted streams.\\n\\n    var widevineUuid = 'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed'; // group segments into numbered timelines delineated by discontinuities\\n\\n    var currentTimeline = 0; // the manifest is empty until the parse stream begins delivering data\\n\\n    _this.manifest = {\\n      allowCache: true,\\n      discontinuityStarts: [],\\n      segments: []\\n    }; // update the manifest with the m3u8 entry from the parse stream\\n\\n    _this.parseStream.on('data', function (entry) {\\n      var mediaGroup;\\n      var rendition;\\n      ({\\n        tag: function tag() {\\n          // switch based on the tag type\\n          (({\\n            'allow-cache': function allowCache() {\\n              this.manifest.allowCache = entry.allowed;\\n\\n              if (!('allowed' in entry)) {\\n                this.trigger('info', {\\n                  message: 'defaulting allowCache to YES'\\n                });\\n                this.manifest.allowCache = true;\\n              }\\n            },\\n            byterange: function byterange() {\\n              var byterange = {};\\n\\n              if ('length' in entry) {\\n                currentUri.byterange = byterange;\\n                byterange.length = entry.length;\\n\\n                if (!('offset' in entry)) {\\n                  this.trigger('info', {\\n                    message: 'defaulting offset to zero'\\n                  });\\n                  entry.offset = 0;\\n                }\\n              }\\n\\n              if ('offset' in entry) {\\n                currentUri.byterange = byterange;\\n                byterange.offset = entry.offset;\\n              }\\n            },\\n            endlist: function endlist() {\\n              this.manifest.endList = true;\\n            },\\n            inf: function inf() {\\n              if (!('mediaSequence' in this.manifest)) {\\n                this.manifest.mediaSequence = 0;\\n                this.trigger('info', {\\n                  message: 'defaulting media sequence to zero'\\n                });\\n              }\\n\\n              if (!('discontinuitySequence' in this.manifest)) {\\n                this.manifest.discontinuitySequence = 0;\\n                this.trigger('info', {\\n                  message: 'defaulting discontinuity sequence to zero'\\n                });\\n              }\\n\\n              if (entry.duration > 0) {\\n                currentUri.duration = entry.duration;\\n              }\\n\\n              if (entry.duration === 0) {\\n                currentUri.duration = 0.01;\\n                this.trigger('info', {\\n                  message: 'updating zero segment duration to a small value'\\n                });\\n              }\\n\\n              this.manifest.segments = uris;\\n            },\\n            key: function key() {\\n              if (!entry.attributes) {\\n                this.trigger('warn', {\\n                  message: 'ignoring key declaration without attribute list'\\n                });\\n                return;\\n              } // clear the active encryption key\\n\\n\\n              if (entry.attributes.METHOD === 'NONE') {\\n                _key = null;\\n                return;\\n              }\\n\\n              if (!entry.attributes.URI) {\\n                this.trigger('warn', {\\n                  message: 'ignoring key declaration without URI'\\n                });\\n                return;\\n              } // check if the content is encrypted for Widevine\\n              // Widevine/HLS spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf\\n\\n\\n              if (entry.attributes.KEYFORMAT === widevineUuid) {\\n                var VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR', 'SAMPLE-AES-CENC'];\\n\\n                if (VALID_METHODS.indexOf(entry.attributes.METHOD) === -1) {\\n                  this.trigger('warn', {\\n                    message: 'invalid key method provided for Widevine'\\n                  });\\n                  return;\\n                }\\n\\n                if (entry.attributes.METHOD === 'SAMPLE-AES-CENC') {\\n                  this.trigger('warn', {\\n                    message: 'SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead'\\n                  });\\n                }\\n\\n                if (entry.attributes.URI.substring(0, 23) !== 'data:text/plain;base64,') {\\n                  this.trigger('warn', {\\n                    message: 'invalid key URI provided for Widevine'\\n                  });\\n                  return;\\n                }\\n\\n                if (!(entry.attributes.KEYID && entry.attributes.KEYID.substring(0, 2) === '0x')) {\\n                  this.trigger('warn', {\\n                    message: 'invalid key ID provided for Widevine'\\n                  });\\n                  return;\\n                } // if Widevine key attributes are valid, store them as `contentProtection`\\n                // on the manifest to emulate Widevine tag structure in a DASH mpd\\n\\n\\n                this.manifest.contentProtection = {\\n                  'com.widevine.alpha': {\\n                    attributes: {\\n                      schemeIdUri: entry.attributes.KEYFORMAT,\\n                      // remove '0x' from the key id string\\n                      keyId: entry.attributes.KEYID.substring(2)\\n                    },\\n                    // decode the base64-encoded PSSH box\\n                    pssh: decodeB64ToUint8Array(entry.attributes.URI.split(',')[1])\\n                  }\\n                };\\n                return;\\n              }\\n\\n              if (!entry.attributes.METHOD) {\\n                this.trigger('warn', {\\n                  message: 'defaulting key method to AES-128'\\n                });\\n              } // setup an encryption key for upcoming segments\\n\\n\\n              _key = {\\n                method: entry.attributes.METHOD || 'AES-128',\\n                uri: entry.attributes.URI\\n              };\\n\\n              if (typeof entry.attributes.IV !== 'undefined') {\\n                _key.iv = entry.attributes.IV;\\n              }\\n            },\\n            'media-sequence': function mediaSequence() {\\n              if (!isFinite(entry.number)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid media sequence: ' + entry.number\\n                });\\n                return;\\n              }\\n\\n              this.manifest.mediaSequence = entry.number;\\n            },\\n            'discontinuity-sequence': function discontinuitySequence() {\\n              if (!isFinite(entry.number)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid discontinuity sequence: ' + entry.number\\n                });\\n                return;\\n              }\\n\\n              this.manifest.discontinuitySequence = entry.number;\\n              currentTimeline = entry.number;\\n            },\\n            'playlist-type': function playlistType() {\\n              if (!/VOD|EVENT/.test(entry.playlistType)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring unknown playlist type: ' + entry.playlist\\n                });\\n                return;\\n              }\\n\\n              this.manifest.playlistType = entry.playlistType;\\n            },\\n            map: function map() {\\n              currentMap = {};\\n\\n              if (entry.uri) {\\n                currentMap.uri = entry.uri;\\n              }\\n\\n              if (entry.byterange) {\\n                currentMap.byterange = entry.byterange;\\n              }\\n            },\\n            'stream-inf': function streamInf() {\\n              this.manifest.playlists = uris;\\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\\n\\n              if (!entry.attributes) {\\n                this.trigger('warn', {\\n                  message: 'ignoring empty stream-inf attributes'\\n                });\\n                return;\\n              }\\n\\n              if (!currentUri.attributes) {\\n                currentUri.attributes = {};\\n              }\\n\\n              _extends(currentUri.attributes, entry.attributes);\\n            },\\n            media: function media() {\\n              this.manifest.mediaGroups = this.manifest.mediaGroups || defaultMediaGroups;\\n\\n              if (!(entry.attributes && entry.attributes.TYPE && entry.attributes['GROUP-ID'] && entry.attributes.NAME)) {\\n                this.trigger('warn', {\\n                  message: 'ignoring incomplete or missing media group'\\n                });\\n                return;\\n              } // find the media group, creating defaults as necessary\\n\\n\\n              var mediaGroupType = this.manifest.mediaGroups[entry.attributes.TYPE];\\n              mediaGroupType[entry.attributes['GROUP-ID']] = mediaGroupType[entry.attributes['GROUP-ID']] || {};\\n              mediaGroup = mediaGroupType[entry.attributes['GROUP-ID']]; // collect the rendition metadata\\n\\n              rendition = {\\n                default: /yes/i.test(entry.attributes.DEFAULT)\\n              };\\n\\n              if (rendition.default) {\\n                rendition.autoselect = true;\\n              } else {\\n                rendition.autoselect = /yes/i.test(entry.attributes.AUTOSELECT);\\n              }\\n\\n              if (entry.attributes.LANGUAGE) {\\n                rendition.language = entry.attributes.LANGUAGE;\\n              }\\n\\n              if (entry.attributes.URI) {\\n                rendition.uri = entry.attributes.URI;\\n              }\\n\\n              if (entry.attributes['INSTREAM-ID']) {\\n                rendition.instreamId = entry.attributes['INSTREAM-ID'];\\n              }\\n\\n              if (entry.attributes.CHARACTERISTICS) {\\n                rendition.characteristics = entry.attributes.CHARACTERISTICS;\\n              }\\n\\n              if (entry.attributes.FORCED) {\\n                rendition.forced = /yes/i.test(entry.attributes.FORCED);\\n              } // insert the new rendition\\n\\n\\n              mediaGroup[entry.attributes.NAME] = rendition;\\n            },\\n            discontinuity: function discontinuity() {\\n              currentTimeline += 1;\\n              currentUri.discontinuity = true;\\n              this.manifest.discontinuityStarts.push(uris.length);\\n            },\\n            'program-date-time': function programDateTime() {\\n              if (typeof this.manifest.dateTimeString === 'undefined') {\\n                // PROGRAM-DATE-TIME is a media-segment tag, but for backwards\\n                // compatibility, we add the first occurence of the PROGRAM-DATE-TIME tag\\n                // to the manifest object\\n                // TODO: Consider removing this in future major version\\n                this.manifest.dateTimeString = entry.dateTimeString;\\n                this.manifest.dateTimeObject = entry.dateTimeObject;\\n              }\\n\\n              currentUri.dateTimeString = entry.dateTimeString;\\n              currentUri.dateTimeObject = entry.dateTimeObject;\\n            },\\n            targetduration: function targetduration() {\\n              if (!isFinite(entry.duration) || entry.duration < 0) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid target duration: ' + entry.duration\\n                });\\n                return;\\n              }\\n\\n              this.manifest.targetDuration = entry.duration;\\n            },\\n            totalduration: function totalduration() {\\n              if (!isFinite(entry.duration) || entry.duration < 0) {\\n                this.trigger('warn', {\\n                  message: 'ignoring invalid total duration: ' + entry.duration\\n                });\\n                return;\\n              }\\n\\n              this.manifest.totalDuration = entry.duration;\\n            },\\n            start: function start() {\\n              if (!entry.attributes || isNaN(entry.attributes['TIME-OFFSET'])) {\\n                this.trigger('warn', {\\n                  message: 'ignoring start declaration without appropriate attribute list'\\n                });\\n                return;\\n              }\\n\\n              this.manifest.start = {\\n                timeOffset: entry.attributes['TIME-OFFSET'],\\n                precise: entry.attributes.PRECISE\\n              };\\n            },\\n            'cue-out': function cueOut() {\\n              currentUri.cueOut = entry.data;\\n            },\\n            'cue-out-cont': function cueOutCont() {\\n              currentUri.cueOutCont = entry.data;\\n            },\\n            'cue-in': function cueIn() {\\n              currentUri.cueIn = entry.data;\\n            }\\n          })[entry.tagType] || noop).call(self);\\n        },\\n        uri: function uri() {\\n          currentUri.uri = entry.uri;\\n          uris.push(currentUri); // if no explicit duration was declared, use the target duration\\n\\n          if (this.manifest.targetDuration && !('duration' in currentUri)) {\\n            this.trigger('warn', {\\n              message: 'defaulting segment duration to the target duration'\\n            });\\n            currentUri.duration = this.manifest.targetDuration;\\n          } // annotate with encryption information, if necessary\\n\\n\\n          if (_key) {\\n            currentUri.key = _key;\\n          }\\n\\n          currentUri.timeline = currentTimeline; // annotate with initialization segment information, if necessary\\n\\n          if (currentMap) {\\n            currentUri.map = currentMap;\\n          } // prepare for the next URI\\n\\n\\n          currentUri = {};\\n        },\\n        comment: function comment() {// comments are not important for playback\\n        },\\n        custom: function custom() {\\n          // if this is segment-level data attach the output to the segment\\n          if (entry.segment) {\\n            currentUri.custom = currentUri.custom || {};\\n            currentUri.custom[entry.customType] = entry.data; // if this is manifest-level data attach to the top level manifest object\\n          } else {\\n            this.manifest.custom = this.manifest.custom || {};\\n            this.manifest.custom[entry.customType] = entry.data;\\n          }\\n        }\\n      })[entry.type].call(self);\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Parse the input string and update the manifest object.\\n   *\\n   * @param {string} chunk a potentially incomplete portion of the manifest\\n   */\\n\\n\\n  var _proto = Parser.prototype;\\n\\n  _proto.push = function push(chunk) {\\n    this.lineStream.push(chunk);\\n  }\\n  /**\\n   * Flush any remaining input. This can be handy if the last line of an M3U8\\n   * manifest did not contain a trailing newline but the file has been\\n   * completely received.\\n   */\\n  ;\\n\\n  _proto.end = function end() {\\n    // flush any buffered input\\n    this.lineStream.push('\\\\n');\\n  }\\n  /**\\n   * Add an additional parser for non-standard tags\\n   *\\n   * @param {Object}   options              a map of options for the added parser\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {string}   options.type         the type to register to the output\\n   * @param {Function} [options.dataParser] function to parse the line into an object\\n   * @param {boolean}  [options.segment]    should tag data be attached to the segment object\\n   */\\n  ;\\n\\n  _proto.addParser = function addParser(options) {\\n    this.parseStream.addParser(options);\\n  }\\n  /**\\n   * Add a custom header mapper\\n   *\\n   * @param {Object}   options\\n   * @param {RegExp}   options.expression   a regular expression to match the custom header\\n   * @param {Function} options.map          function to translate tag into a different tag\\n   */\\n  ;\\n\\n  _proto.addTagMapper = function addTagMapper(options) {\\n    this.parseStream.addTagMapper(options);\\n  };\\n\\n  return Parser;\\n}(Stream);\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/m3u8-parser/dist/m3u8-parser.es.js?\")},\"../node_modules/mpd-parser/dist/mpd-parser.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"VERSION\\\", function() { return VERSION; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"inheritAttributes\\\", function() { return inheritAttributes; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"parse\\\", function() { return parse; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"parseUTCTiming\\\", function() { return parseUTCTiming; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"stringToMpdXml\\\", function() { return stringToMpdXml; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"toM3u8\\\", function() { return toM3u8; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \\\"toPlaylists\\\", function() { return toPlaylists; });\\n/* harmony import */ var _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @videojs/vhs-utils/dist/resolve-url */ \\\"../node_modules/@videojs/vhs-utils/dist/resolve-url.js\\\");\\n/* harmony import */ var _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\");\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @videojs/vhs-utils/dist/decode-b64-to-uint8-array */ \\\"../node_modules/@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js\\\");\\n/* harmony import */ var _videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var xmldom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! xmldom */ \\\"../node_modules/xmldom/dom-parser.js\\\");\\n/* harmony import */ var xmldom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(xmldom__WEBPACK_IMPORTED_MODULE_3__);\\n/*! @name mpd-parser @version 0.10.0 @license Apache-2.0 */\\n\\n\\n\\n\\n\\nvar version = \\\"0.10.0\\\";\\n\\nvar isObject = function isObject(obj) {\\n  return !!obj && typeof obj === 'object';\\n};\\n\\nvar merge = function merge() {\\n  for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {\\n    objects[_key] = arguments[_key];\\n  }\\n\\n  return objects.reduce(function (result, source) {\\n    Object.keys(source).forEach(function (key) {\\n      if (Array.isArray(result[key]) && Array.isArray(source[key])) {\\n        result[key] = result[key].concat(source[key]);\\n      } else if (isObject(result[key]) && isObject(source[key])) {\\n        result[key] = merge(result[key], source[key]);\\n      } else {\\n        result[key] = source[key];\\n      }\\n    });\\n    return result;\\n  }, {});\\n};\\nvar values = function values(o) {\\n  return Object.keys(o).map(function (k) {\\n    return o[k];\\n  });\\n};\\n\\nvar range = function range(start, end) {\\n  var result = [];\\n\\n  for (var i = start; i < end; i++) {\\n    result.push(i);\\n  }\\n\\n  return result;\\n};\\nvar flatten = function flatten(lists) {\\n  return lists.reduce(function (x, y) {\\n    return x.concat(y);\\n  }, []);\\n};\\nvar from = function from(list) {\\n  if (!list.length) {\\n    return [];\\n  }\\n\\n  var result = [];\\n\\n  for (var i = 0; i < list.length; i++) {\\n    result.push(list[i]);\\n  }\\n\\n  return result;\\n};\\nvar findIndexes = function findIndexes(l, key) {\\n  return l.reduce(function (a, e, i) {\\n    if (e[key]) {\\n      a.push(i);\\n    }\\n\\n    return a;\\n  }, []);\\n};\\n\\nvar errors = {\\n  INVALID_NUMBER_OF_PERIOD: 'INVALID_NUMBER_OF_PERIOD',\\n  DASH_EMPTY_MANIFEST: 'DASH_EMPTY_MANIFEST',\\n  DASH_INVALID_XML: 'DASH_INVALID_XML',\\n  NO_BASE_URL: 'NO_BASE_URL',\\n  MISSING_SEGMENT_INFORMATION: 'MISSING_SEGMENT_INFORMATION',\\n  SEGMENT_TIME_UNSPECIFIED: 'SEGMENT_TIME_UNSPECIFIED',\\n  UNSUPPORTED_UTC_TIMING_SCHEME: 'UNSUPPORTED_UTC_TIMING_SCHEME'\\n};\\n\\n/**\\n * @typedef {Object} SingleUri\\n * @property {string} uri - relative location of segment\\n * @property {string} resolvedUri - resolved location of segment\\n * @property {Object} byterange - Object containing information on how to make byte range\\n *   requests following byte-range-spec per RFC2616.\\n * @property {String} byterange.length - length of range request\\n * @property {String} byterange.offset - byte offset of range request\\n *\\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1\\n */\\n\\n/**\\n * Converts a URLType node (5.3.9.2.3 Table 13) to a segment object\\n * that conforms to how m3u8-parser is structured\\n *\\n * @see https://github.com/videojs/m3u8-parser\\n *\\n * @param {string} baseUrl - baseUrl provided by <BaseUrl> nodes\\n * @param {string} source - source url for segment\\n * @param {string} range - optional range used for range calls,\\n *   follows  RFC 2616, Clause 14.35.1\\n * @return {SingleUri} full segment information transformed into a format similar\\n *   to m3u8-parser\\n */\\n\\nvar urlTypeToSegment = function urlTypeToSegment(_ref) {\\n  var _ref$baseUrl = _ref.baseUrl,\\n      baseUrl = _ref$baseUrl === void 0 ? '' : _ref$baseUrl,\\n      _ref$source = _ref.source,\\n      source = _ref$source === void 0 ? '' : _ref$source,\\n      _ref$range = _ref.range,\\n      range = _ref$range === void 0 ? '' : _ref$range,\\n      _ref$indexRange = _ref.indexRange,\\n      indexRange = _ref$indexRange === void 0 ? '' : _ref$indexRange;\\n  var segment = {\\n    uri: source,\\n    resolvedUri: _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default()(baseUrl || '', source)\\n  };\\n\\n  if (range || indexRange) {\\n    var rangeStr = range ? range : indexRange;\\n    var ranges = rangeStr.split('-');\\n    var startRange = parseInt(ranges[0], 10);\\n    var endRange = parseInt(ranges[1], 10); // byterange should be inclusive according to\\n    // RFC 2616, Clause 14.35.1\\n\\n    segment.byterange = {\\n      length: endRange - startRange + 1,\\n      offset: startRange\\n    };\\n  }\\n\\n  return segment;\\n};\\nvar byteRangeToString = function byteRangeToString(byterange) {\\n  // `endRange` is one less than `offset + length` because the HTTP range\\n  // header uses inclusive ranges\\n  var endRange = byterange.offset + byterange.length - 1;\\n  return byterange.offset + \\\"-\\\" + endRange;\\n};\\n\\n/**\\n * Functions for calculating the range of available segments in static and dynamic\\n * manifests.\\n */\\n\\nvar segmentRange = {\\n  /**\\n   * Returns the entire range of available segments for a static MPD\\n   *\\n   * @param {Object} attributes\\n   *        Inheritied MPD attributes\\n   * @return {{ start: number, end: number }}\\n   *         The start and end numbers for available segments\\n   */\\n  static: function _static(attributes) {\\n    var duration = attributes.duration,\\n        _attributes$timescale = attributes.timescale,\\n        timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\\n        sourceDuration = attributes.sourceDuration;\\n    return {\\n      start: 0,\\n      end: Math.ceil(sourceDuration / (duration / timescale))\\n    };\\n  },\\n\\n  /**\\n   * Returns the current live window range of available segments for a dynamic MPD\\n   *\\n   * @param {Object} attributes\\n   *        Inheritied MPD attributes\\n   * @return {{ start: number, end: number }}\\n   *         The start and end numbers for available segments\\n   */\\n  dynamic: function dynamic(attributes) {\\n    var NOW = attributes.NOW,\\n        clientOffset = attributes.clientOffset,\\n        availabilityStartTime = attributes.availabilityStartTime,\\n        _attributes$timescale2 = attributes.timescale,\\n        timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\\n        duration = attributes.duration,\\n        _attributes$start = attributes.start,\\n        start = _attributes$start === void 0 ? 0 : _attributes$start,\\n        _attributes$minimumUp = attributes.minimumUpdatePeriod,\\n        minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp,\\n        _attributes$timeShift = attributes.timeShiftBufferDepth,\\n        timeShiftBufferDepth = _attributes$timeShift === void 0 ? Infinity : _attributes$timeShift;\\n    var now = (NOW + clientOffset) / 1000;\\n    var periodStartWC = availabilityStartTime + start;\\n    var periodEndWC = now + minimumUpdatePeriod;\\n    var periodDuration = periodEndWC - periodStartWC;\\n    var segmentCount = Math.ceil(periodDuration * timescale / duration);\\n    var availableStart = Math.floor((now - periodStartWC - timeShiftBufferDepth) * timescale / duration);\\n    var availableEnd = Math.floor((now - periodStartWC) * timescale / duration);\\n    return {\\n      start: Math.max(0, availableStart),\\n      end: Math.min(segmentCount, availableEnd)\\n    };\\n  }\\n};\\n/**\\n * Maps a range of numbers to objects with information needed to build the corresponding\\n * segment list\\n *\\n * @name toSegmentsCallback\\n * @function\\n * @param {number} number\\n *        Number of the segment\\n * @param {number} index\\n *        Index of the number in the range list\\n * @return {{ number: Number, duration: Number, timeline: Number, time: Number }}\\n *         Object with segment timing and duration info\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping a range of numbers to\\n * information needed to build the segment list.\\n *\\n * @param {Object} attributes\\n *        Inherited MPD attributes\\n * @return {toSegmentsCallback}\\n *         Callback map function\\n */\\n\\nvar toSegments = function toSegments(attributes) {\\n  return function (number, index) {\\n    var duration = attributes.duration,\\n        _attributes$timescale3 = attributes.timescale,\\n        timescale = _attributes$timescale3 === void 0 ? 1 : _attributes$timescale3,\\n        periodIndex = attributes.periodIndex,\\n        _attributes$startNumb = attributes.startNumber,\\n        startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb;\\n    return {\\n      number: startNumber + number,\\n      duration: duration / timescale,\\n      timeline: periodIndex,\\n      time: index * duration\\n    };\\n  };\\n};\\n/**\\n * Returns a list of objects containing segment timing and duration info used for\\n * building the list of segments. This uses the @duration attribute specified\\n * in the MPD manifest to derive the range of segments.\\n *\\n * @param {Object} attributes\\n *        Inherited MPD attributes\\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\\n *         List of Objects with segment timing and duration info\\n */\\n\\nvar parseByDuration = function parseByDuration(attributes) {\\n  var _attributes$type = attributes.type,\\n      type = _attributes$type === void 0 ? 'static' : _attributes$type,\\n      duration = attributes.duration,\\n      _attributes$timescale4 = attributes.timescale,\\n      timescale = _attributes$timescale4 === void 0 ? 1 : _attributes$timescale4,\\n      sourceDuration = attributes.sourceDuration;\\n\\n  var _segmentRange$type = segmentRange[type](attributes),\\n      start = _segmentRange$type.start,\\n      end = _segmentRange$type.end;\\n\\n  var segments = range(start, end).map(toSegments(attributes));\\n\\n  if (type === 'static') {\\n    var index = segments.length - 1; // final segment may be less than full segment duration\\n\\n    segments[index].duration = sourceDuration - duration / timescale * index;\\n  }\\n\\n  return segments;\\n};\\n\\n/**\\n * Translates SegmentBase into a set of segments.\\n * (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\\n * node should be translated into segment.\\n *\\n * @param {Object} attributes\\n *   Object containing all inherited attributes from parent elements with attribute\\n *   names as keys\\n * @return {Object.<Array>} list of segments\\n */\\n\\nvar segmentsFromBase = function segmentsFromBase(attributes) {\\n  var baseUrl = attributes.baseUrl,\\n      _attributes$initializ = attributes.initialization,\\n      initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ,\\n      sourceDuration = attributes.sourceDuration,\\n      _attributes$timescale = attributes.timescale,\\n      timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\\n      _attributes$indexRang = attributes.indexRange,\\n      indexRange = _attributes$indexRang === void 0 ? '' : _attributes$indexRang,\\n      duration = attributes.duration; // base url is required for SegmentBase to work, per spec (Section 5.3.9.2.1)\\n\\n  if (!baseUrl) {\\n    throw new Error(errors.NO_BASE_URL);\\n  }\\n\\n  var initSegment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: initialization.sourceURL,\\n    range: initialization.range\\n  });\\n  var segment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: baseUrl,\\n    indexRange: indexRange\\n  });\\n  segment.map = initSegment; // If there is a duration, use it, otherwise use the given duration of the source\\n  // (since SegmentBase is only for one total segment)\\n\\n  if (duration) {\\n    var segmentTimeInfo = parseByDuration(attributes);\\n\\n    if (segmentTimeInfo.length) {\\n      segment.duration = segmentTimeInfo[0].duration;\\n      segment.timeline = segmentTimeInfo[0].timeline;\\n    }\\n  } else if (sourceDuration) {\\n    segment.duration = sourceDuration / timescale;\\n    segment.timeline = 0;\\n  } // This is used for mediaSequence\\n\\n\\n  segment.number = 0;\\n  return [segment];\\n};\\n/**\\n * Given a playlist, a sidx box, and a baseUrl, update the segment list of the playlist\\n * according to the sidx information given.\\n *\\n * playlist.sidx has metadadata about the sidx where-as the sidx param\\n * is the parsed sidx box itself.\\n *\\n * @param {Object} playlist the playlist to update the sidx information for\\n * @param {Object} sidx the parsed sidx box\\n * @return {Object} the playlist object with the updated sidx information\\n */\\n\\nvar addSegmentsToPlaylist = function addSegmentsToPlaylist(playlist, sidx, baseUrl) {\\n  // Retain init segment information\\n  var initSegment = playlist.sidx.map ? playlist.sidx.map : null; // Retain source duration from initial master manifest parsing\\n\\n  var sourceDuration = playlist.sidx.duration; // Retain source timeline\\n\\n  var timeline = playlist.timeline || 0;\\n  var sidxByteRange = playlist.sidx.byterange;\\n  var sidxEnd = sidxByteRange.offset + sidxByteRange.length; // Retain timescale of the parsed sidx\\n\\n  var timescale = sidx.timescale; // referenceType 1 refers to other sidx boxes\\n\\n  var mediaReferences = sidx.references.filter(function (r) {\\n    return r.referenceType !== 1;\\n  });\\n  var segments = []; // firstOffset is the offset from the end of the sidx box\\n\\n  var startIndex = sidxEnd + sidx.firstOffset;\\n\\n  for (var i = 0; i < mediaReferences.length; i++) {\\n    var reference = sidx.references[i]; // size of the referenced (sub)segment\\n\\n    var size = reference.referencedSize; // duration of the referenced (sub)segment, in  the  timescale\\n    // this will be converted to seconds when generating segments\\n\\n    var duration = reference.subsegmentDuration; // should be an inclusive range\\n\\n    var endIndex = startIndex + size - 1;\\n    var indexRange = startIndex + \\\"-\\\" + endIndex;\\n    var attributes = {\\n      baseUrl: baseUrl,\\n      timescale: timescale,\\n      timeline: timeline,\\n      // this is used in parseByDuration\\n      periodIndex: timeline,\\n      duration: duration,\\n      sourceDuration: sourceDuration,\\n      indexRange: indexRange\\n    };\\n    var segment = segmentsFromBase(attributes)[0];\\n\\n    if (initSegment) {\\n      segment.map = initSegment;\\n    }\\n\\n    segments.push(segment);\\n    startIndex += size;\\n  }\\n\\n  playlist.segments = segments;\\n  return playlist;\\n};\\n\\nvar mergeDiscontiguousPlaylists = function mergeDiscontiguousPlaylists(playlists) {\\n  var mergedPlaylists = values(playlists.reduce(function (acc, playlist) {\\n    // assuming playlist IDs are the same across periods\\n    // TODO: handle multiperiod where representation sets are not the same\\n    // across periods\\n    var name = playlist.attributes.id + (playlist.attributes.lang || ''); // Periods after first\\n\\n    if (acc[name]) {\\n      var _acc$name$segments;\\n\\n      // first segment of subsequent periods signal a discontinuity\\n      if (playlist.segments[0]) {\\n        playlist.segments[0].discontinuity = true;\\n      }\\n\\n      (_acc$name$segments = acc[name].segments).push.apply(_acc$name$segments, playlist.segments); // bubble up contentProtection, this assumes all DRM content\\n      // has the same contentProtection\\n\\n\\n      if (playlist.attributes.contentProtection) {\\n        acc[name].attributes.contentProtection = playlist.attributes.contentProtection;\\n      }\\n    } else {\\n      // first Period\\n      acc[name] = playlist;\\n    }\\n\\n    return acc;\\n  }, {}));\\n  return mergedPlaylists.map(function (playlist) {\\n    playlist.discontinuityStarts = findIndexes(playlist.segments, 'discontinuity');\\n    return playlist;\\n  });\\n};\\n\\nvar addSegmentInfoFromSidx = function addSegmentInfoFromSidx(playlists, sidxMapping) {\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  if (!Object.keys(sidxMapping).length) {\\n    return playlists;\\n  }\\n\\n  for (var i in playlists) {\\n    var playlist = playlists[i];\\n\\n    if (!playlist.sidx) {\\n      continue;\\n    }\\n\\n    var sidxKey = playlist.sidx.uri + '-' + byteRangeToString(playlist.sidx.byterange);\\n    var sidxMatch = sidxMapping[sidxKey] && sidxMapping[sidxKey].sidx;\\n\\n    if (playlist.sidx && sidxMatch) {\\n      addSegmentsToPlaylist(playlist, sidxMatch, playlist.sidx.resolvedUri);\\n    }\\n  }\\n\\n  return playlists;\\n};\\n\\nvar formatAudioPlaylist = function formatAudioPlaylist(_ref) {\\n  var _attributes;\\n\\n  var attributes = _ref.attributes,\\n      segments = _ref.segments,\\n      sidx = _ref.sidx;\\n  var playlist = {\\n    attributes: (_attributes = {\\n      NAME: attributes.id,\\n      BANDWIDTH: attributes.bandwidth,\\n      CODECS: attributes.codecs\\n    }, _attributes['PROGRAM-ID'] = 1, _attributes),\\n    uri: '',\\n    endList: (attributes.type || 'static') === 'static',\\n    timeline: attributes.periodIndex,\\n    resolvedUri: '',\\n    targetDuration: attributes.duration,\\n    segments: segments,\\n    mediaSequence: segments.length ? segments[0].number : 1\\n  };\\n\\n  if (attributes.contentProtection) {\\n    playlist.contentProtection = attributes.contentProtection;\\n  }\\n\\n  if (sidx) {\\n    playlist.sidx = sidx;\\n  }\\n\\n  return playlist;\\n};\\nvar formatVttPlaylist = function formatVttPlaylist(_ref2) {\\n  var _attributes2;\\n\\n  var attributes = _ref2.attributes,\\n      segments = _ref2.segments;\\n\\n  if (typeof segments === 'undefined') {\\n    // vtt tracks may use single file in BaseURL\\n    segments = [{\\n      uri: attributes.baseUrl,\\n      timeline: attributes.periodIndex,\\n      resolvedUri: attributes.baseUrl || '',\\n      duration: attributes.sourceDuration,\\n      number: 0\\n    }]; // targetDuration should be the same duration as the only segment\\n\\n    attributes.duration = attributes.sourceDuration;\\n  }\\n\\n  return {\\n    attributes: (_attributes2 = {\\n      NAME: attributes.id,\\n      BANDWIDTH: attributes.bandwidth\\n    }, _attributes2['PROGRAM-ID'] = 1, _attributes2),\\n    uri: '',\\n    endList: (attributes.type || 'static') === 'static',\\n    timeline: attributes.periodIndex,\\n    resolvedUri: attributes.baseUrl || '',\\n    targetDuration: attributes.duration,\\n    segments: segments,\\n    mediaSequence: segments.length ? segments[0].number : 1\\n  };\\n};\\nvar organizeAudioPlaylists = function organizeAudioPlaylists(playlists, sidxMapping) {\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  var mainPlaylist;\\n  var formattedPlaylists = playlists.reduce(function (a, playlist) {\\n    var role = playlist.attributes.role && playlist.attributes.role.value || '';\\n    var language = playlist.attributes.lang || '';\\n    var label = 'main';\\n\\n    if (language) {\\n      var roleLabel = role ? \\\" (\\\" + role + \\\")\\\" : '';\\n      label = \\\"\\\" + playlist.attributes.lang + roleLabel;\\n    } // skip if we already have the highest quality audio for a language\\n\\n\\n    if (a[label] && a[label].playlists[0].attributes.BANDWIDTH > playlist.attributes.bandwidth) {\\n      return a;\\n    }\\n\\n    a[label] = {\\n      language: language,\\n      autoselect: true,\\n      default: role === 'main',\\n      playlists: addSegmentInfoFromSidx([formatAudioPlaylist(playlist)], sidxMapping),\\n      uri: ''\\n    };\\n\\n    if (typeof mainPlaylist === 'undefined' && role === 'main') {\\n      mainPlaylist = playlist;\\n      mainPlaylist.default = true;\\n    }\\n\\n    return a;\\n  }, {}); // if no playlists have role \\\"main\\\", mark the first as main\\n\\n  if (!mainPlaylist) {\\n    var firstLabel = Object.keys(formattedPlaylists)[0];\\n    formattedPlaylists[firstLabel].default = true;\\n  }\\n\\n  return formattedPlaylists;\\n};\\nvar organizeVttPlaylists = function organizeVttPlaylists(playlists, sidxMapping) {\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  return playlists.reduce(function (a, playlist) {\\n    var label = playlist.attributes.lang || 'text'; // skip if we already have subtitles\\n\\n    if (a[label]) {\\n      return a;\\n    }\\n\\n    a[label] = {\\n      language: label,\\n      default: false,\\n      autoselect: false,\\n      playlists: addSegmentInfoFromSidx([formatVttPlaylist(playlist)], sidxMapping),\\n      uri: ''\\n    };\\n    return a;\\n  }, {});\\n};\\nvar formatVideoPlaylist = function formatVideoPlaylist(_ref3) {\\n  var _attributes3;\\n\\n  var attributes = _ref3.attributes,\\n      segments = _ref3.segments,\\n      sidx = _ref3.sidx;\\n  var playlist = {\\n    attributes: (_attributes3 = {\\n      NAME: attributes.id,\\n      AUDIO: 'audio',\\n      SUBTITLES: 'subs',\\n      RESOLUTION: {\\n        width: attributes.width,\\n        height: attributes.height\\n      },\\n      CODECS: attributes.codecs,\\n      BANDWIDTH: attributes.bandwidth\\n    }, _attributes3['PROGRAM-ID'] = 1, _attributes3),\\n    uri: '',\\n    endList: (attributes.type || 'static') === 'static',\\n    timeline: attributes.periodIndex,\\n    resolvedUri: '',\\n    targetDuration: attributes.duration,\\n    segments: segments,\\n    mediaSequence: segments.length ? segments[0].number : 1\\n  };\\n\\n  if (attributes.contentProtection) {\\n    playlist.contentProtection = attributes.contentProtection;\\n  }\\n\\n  if (sidx) {\\n    playlist.sidx = sidx;\\n  }\\n\\n  return playlist;\\n};\\nvar toM3u8 = function toM3u8(dashPlaylists, sidxMapping) {\\n  var _mediaGroups;\\n\\n  if (sidxMapping === void 0) {\\n    sidxMapping = {};\\n  }\\n\\n  if (!dashPlaylists.length) {\\n    return {};\\n  } // grab all master attributes\\n\\n\\n  var _dashPlaylists$0$attr = dashPlaylists[0].attributes,\\n      duration = _dashPlaylists$0$attr.sourceDuration,\\n      _dashPlaylists$0$attr2 = _dashPlaylists$0$attr.type,\\n      type = _dashPlaylists$0$attr2 === void 0 ? 'static' : _dashPlaylists$0$attr2,\\n      suggestedPresentationDelay = _dashPlaylists$0$attr.suggestedPresentationDelay,\\n      _dashPlaylists$0$attr3 = _dashPlaylists$0$attr.minimumUpdatePeriod,\\n      minimumUpdatePeriod = _dashPlaylists$0$attr3 === void 0 ? 0 : _dashPlaylists$0$attr3;\\n\\n  var videoOnly = function videoOnly(_ref4) {\\n    var attributes = _ref4.attributes;\\n    return attributes.mimeType === 'video/mp4' || attributes.contentType === 'video';\\n  };\\n\\n  var audioOnly = function audioOnly(_ref5) {\\n    var attributes = _ref5.attributes;\\n    return attributes.mimeType === 'audio/mp4' || attributes.contentType === 'audio';\\n  };\\n\\n  var vttOnly = function vttOnly(_ref6) {\\n    var attributes = _ref6.attributes;\\n    return attributes.mimeType === 'text/vtt' || attributes.contentType === 'text';\\n  };\\n\\n  var videoPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(videoOnly)).map(formatVideoPlaylist);\\n  var audioPlaylists = mergeDiscontiguousPlaylists(dashPlaylists.filter(audioOnly));\\n  var vttPlaylists = dashPlaylists.filter(vttOnly);\\n  var master = {\\n    allowCache: true,\\n    discontinuityStarts: [],\\n    segments: [],\\n    endList: true,\\n    mediaGroups: (_mediaGroups = {\\n      AUDIO: {},\\n      VIDEO: {}\\n    }, _mediaGroups['CLOSED-CAPTIONS'] = {}, _mediaGroups.SUBTITLES = {}, _mediaGroups),\\n    uri: '',\\n    duration: duration,\\n    playlists: addSegmentInfoFromSidx(videoPlaylists, sidxMapping),\\n    minimumUpdatePeriod: minimumUpdatePeriod * 1000\\n  };\\n\\n  if (type === 'dynamic') {\\n    master.suggestedPresentationDelay = suggestedPresentationDelay;\\n  }\\n\\n  if (audioPlaylists.length) {\\n    master.mediaGroups.AUDIO.audio = organizeAudioPlaylists(audioPlaylists, sidxMapping);\\n  }\\n\\n  if (vttPlaylists.length) {\\n    master.mediaGroups.SUBTITLES.subs = organizeVttPlaylists(vttPlaylists, sidxMapping);\\n  }\\n\\n  return master;\\n};\\n\\n/**\\n * Calculates the R (repetition) value for a live stream (for the final segment\\n * in a manifest where the r value is negative 1)\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {number} time\\n *        current time (typically the total time up until the final segment)\\n * @param {number} duration\\n *        duration property for the given <S />\\n *\\n * @return {number}\\n *        R value to reach the end of the given period\\n */\\nvar getLiveRValue = function getLiveRValue(attributes, time, duration) {\\n  var NOW = attributes.NOW,\\n      clientOffset = attributes.clientOffset,\\n      availabilityStartTime = attributes.availabilityStartTime,\\n      _attributes$timescale = attributes.timescale,\\n      timescale = _attributes$timescale === void 0 ? 1 : _attributes$timescale,\\n      _attributes$start = attributes.start,\\n      start = _attributes$start === void 0 ? 0 : _attributes$start,\\n      _attributes$minimumUp = attributes.minimumUpdatePeriod,\\n      minimumUpdatePeriod = _attributes$minimumUp === void 0 ? 0 : _attributes$minimumUp;\\n  var now = (NOW + clientOffset) / 1000;\\n  var periodStartWC = availabilityStartTime + start;\\n  var periodEndWC = now + minimumUpdatePeriod;\\n  var periodDuration = periodEndWC - periodStartWC;\\n  return Math.ceil((periodDuration * timescale - time) / duration);\\n};\\n/**\\n * Uses information provided by SegmentTemplate.SegmentTimeline to determine segment\\n * timing and duration\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {Object[]} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *\\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\\n *         List of Objects with segment timing and duration info\\n */\\n\\n\\nvar parseByTimeline = function parseByTimeline(attributes, segmentTimeline) {\\n  var _attributes$type = attributes.type,\\n      type = _attributes$type === void 0 ? 'static' : _attributes$type,\\n      _attributes$minimumUp2 = attributes.minimumUpdatePeriod,\\n      minimumUpdatePeriod = _attributes$minimumUp2 === void 0 ? 0 : _attributes$minimumUp2,\\n      _attributes$media = attributes.media,\\n      media = _attributes$media === void 0 ? '' : _attributes$media,\\n      sourceDuration = attributes.sourceDuration,\\n      _attributes$timescale2 = attributes.timescale,\\n      timescale = _attributes$timescale2 === void 0 ? 1 : _attributes$timescale2,\\n      _attributes$startNumb = attributes.startNumber,\\n      startNumber = _attributes$startNumb === void 0 ? 1 : _attributes$startNumb,\\n      timeline = attributes.periodIndex;\\n  var segments = [];\\n  var time = -1;\\n\\n  for (var sIndex = 0; sIndex < segmentTimeline.length; sIndex++) {\\n    var S = segmentTimeline[sIndex];\\n    var duration = S.d;\\n    var repeat = S.r || 0;\\n    var segmentTime = S.t || 0;\\n\\n    if (time < 0) {\\n      // first segment\\n      time = segmentTime;\\n    }\\n\\n    if (segmentTime && segmentTime > time) {\\n      // discontinuity\\n      // TODO: How to handle this type of discontinuity\\n      // timeline++ here would treat it like HLS discontuity and content would\\n      // get appended without gap\\n      // E.G.\\n      //  <S t=\\\"0\\\" d=\\\"1\\\" />\\n      //  <S d=\\\"1\\\" />\\n      //  <S d=\\\"1\\\" />\\n      //  <S t=\\\"5\\\" d=\\\"1\\\" />\\n      // would have $Time$ values of [0, 1, 2, 5]\\n      // should this be appened at time positions [0, 1, 2, 3],(#EXT-X-DISCONTINUITY)\\n      // or [0, 1, 2, gap, gap, 5]? (#EXT-X-GAP)\\n      // does the value of sourceDuration consider this when calculating arbitrary\\n      // negative @r repeat value?\\n      // E.G. Same elements as above with this added at the end\\n      //  <S d=\\\"1\\\" r=\\\"-1\\\" />\\n      //  with a sourceDuration of 10\\n      // Would the 2 gaps be included in the time duration calculations resulting in\\n      // 8 segments with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9] or 10 segments\\n      // with $Time$ values of [0, 1, 2, 5, 6, 7, 8, 9, 10, 11] ?\\n      time = segmentTime;\\n    }\\n\\n    var count = void 0;\\n\\n    if (repeat < 0) {\\n      var nextS = sIndex + 1;\\n\\n      if (nextS === segmentTimeline.length) {\\n        // last segment\\n        if (type === 'dynamic' && minimumUpdatePeriod > 0 && media.indexOf('$Number$') > 0) {\\n          count = getLiveRValue(attributes, time, duration);\\n        } else {\\n          // TODO: This may be incorrect depending on conclusion of TODO above\\n          count = (sourceDuration * timescale - time) / duration;\\n        }\\n      } else {\\n        count = (segmentTimeline[nextS].t - time) / duration;\\n      }\\n    } else {\\n      count = repeat + 1;\\n    }\\n\\n    var end = startNumber + segments.length + count;\\n    var number = startNumber + segments.length;\\n\\n    while (number < end) {\\n      segments.push({\\n        number: number,\\n        duration: duration / timescale,\\n        time: time,\\n        timeline: timeline\\n      });\\n      time += duration;\\n      number++;\\n    }\\n  }\\n\\n  return segments;\\n};\\n\\nvar identifierPattern = /\\\\$([A-z]*)(?:(%0)([0-9]+)d)?\\\\$/g;\\n/**\\n * Replaces template identifiers with corresponding values. To be used as the callback\\n * for String.prototype.replace\\n *\\n * @name replaceCallback\\n * @function\\n * @param {string} match\\n *        Entire match of identifier\\n * @param {string} identifier\\n *        Name of matched identifier\\n * @param {string} format\\n *        Format tag string. Its presence indicates that padding is expected\\n * @param {string} width\\n *        Desired length of the replaced value. Values less than this width shall be left\\n *        zero padded\\n * @return {string}\\n *         Replacement for the matched identifier\\n */\\n\\n/**\\n * Returns a function to be used as a callback for String.prototype.replace to replace\\n * template identifiers\\n *\\n * @param {Obect} values\\n *        Object containing values that shall be used to replace known identifiers\\n * @param {number} values.RepresentationID\\n *        Value of the Representation@id attribute\\n * @param {number} values.Number\\n *        Number of the corresponding segment\\n * @param {number} values.Bandwidth\\n *        Value of the Representation@bandwidth attribute.\\n * @param {number} values.Time\\n *        Timestamp value of the corresponding segment\\n * @return {replaceCallback}\\n *         Callback to be used with String.prototype.replace to replace identifiers\\n */\\n\\nvar identifierReplacement = function identifierReplacement(values) {\\n  return function (match, identifier, format, width) {\\n    if (match === '$$') {\\n      // escape sequence\\n      return '$';\\n    }\\n\\n    if (typeof values[identifier] === 'undefined') {\\n      return match;\\n    }\\n\\n    var value = '' + values[identifier];\\n\\n    if (identifier === 'RepresentationID') {\\n      // Format tag shall not be present with RepresentationID\\n      return value;\\n    }\\n\\n    if (!format) {\\n      width = 1;\\n    } else {\\n      width = parseInt(width, 10);\\n    }\\n\\n    if (value.length >= width) {\\n      return value;\\n    }\\n\\n    return \\\"\\\" + new Array(width - value.length + 1).join('0') + value;\\n  };\\n};\\n/**\\n * Constructs a segment url from a template string\\n *\\n * @param {string} url\\n *        Template string to construct url from\\n * @param {Obect} values\\n *        Object containing values that shall be used to replace known identifiers\\n * @param {number} values.RepresentationID\\n *        Value of the Representation@id attribute\\n * @param {number} values.Number\\n *        Number of the corresponding segment\\n * @param {number} values.Bandwidth\\n *        Value of the Representation@bandwidth attribute.\\n * @param {number} values.Time\\n *        Timestamp value of the corresponding segment\\n * @return {string}\\n *         Segment url with identifiers replaced\\n */\\n\\nvar constructTemplateUrl = function constructTemplateUrl(url, values) {\\n  return url.replace(identifierPattern, identifierReplacement(values));\\n};\\n/**\\n * Generates a list of objects containing timing and duration information about each\\n * segment needed to generate segment uris and the complete segment object\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {Object[]|undefined} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *        the SegmentTimeline element\\n * @return {{number: number, duration: number, time: number, timeline: number}[]}\\n *         List of Objects with segment timing and duration info\\n */\\n\\nvar parseTemplateInfo = function parseTemplateInfo(attributes, segmentTimeline) {\\n  if (!attributes.duration && !segmentTimeline) {\\n    // if neither @duration or SegmentTimeline are present, then there shall be exactly\\n    // one media segment\\n    return [{\\n      number: attributes.startNumber || 1,\\n      duration: attributes.sourceDuration,\\n      time: 0,\\n      timeline: attributes.periodIndex\\n    }];\\n  }\\n\\n  if (attributes.duration) {\\n    return parseByDuration(attributes);\\n  }\\n\\n  return parseByTimeline(attributes, segmentTimeline);\\n};\\n/**\\n * Generates a list of segments using information provided by the SegmentTemplate element\\n *\\n * @param {Object} attributes\\n *        Object containing all inherited attributes from parent elements with attribute\\n *        names as keys\\n * @param {Object[]|undefined} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *        the SegmentTimeline element\\n * @return {Object[]}\\n *         List of segment objects\\n */\\n\\nvar segmentsFromTemplate = function segmentsFromTemplate(attributes, segmentTimeline) {\\n  var templateValues = {\\n    RepresentationID: attributes.id,\\n    Bandwidth: attributes.bandwidth || 0\\n  };\\n  var _attributes$initializ = attributes.initialization,\\n      initialization = _attributes$initializ === void 0 ? {\\n    sourceURL: '',\\n    range: ''\\n  } : _attributes$initializ;\\n  var mapSegment = urlTypeToSegment({\\n    baseUrl: attributes.baseUrl,\\n    source: constructTemplateUrl(initialization.sourceURL, templateValues),\\n    range: initialization.range\\n  });\\n  var segments = parseTemplateInfo(attributes, segmentTimeline);\\n  return segments.map(function (segment) {\\n    templateValues.Number = segment.number;\\n    templateValues.Time = segment.time;\\n    var uri = constructTemplateUrl(attributes.media || '', templateValues);\\n    return {\\n      uri: uri,\\n      timeline: segment.timeline,\\n      duration: segment.duration,\\n      resolvedUri: _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default()(attributes.baseUrl || '', uri),\\n      map: mapSegment,\\n      number: segment.number\\n    };\\n  });\\n};\\n\\n/**\\n * Converts a <SegmentUrl> (of type URLType from the DASH spec 5.3.9.2 Table 14)\\n * to an object that matches the output of a segment in videojs/mpd-parser\\n *\\n * @param {Object} attributes\\n *   Object containing all inherited attributes from parent elements with attribute\\n *   names as keys\\n * @param {Object} segmentUrl\\n *   <SegmentURL> node to translate into a segment object\\n * @return {Object} translated segment object\\n */\\n\\nvar SegmentURLToSegmentObject = function SegmentURLToSegmentObject(attributes, segmentUrl) {\\n  var baseUrl = attributes.baseUrl,\\n      _attributes$initializ = attributes.initialization,\\n      initialization = _attributes$initializ === void 0 ? {} : _attributes$initializ;\\n  var initSegment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: initialization.sourceURL,\\n    range: initialization.range\\n  });\\n  var segment = urlTypeToSegment({\\n    baseUrl: baseUrl,\\n    source: segmentUrl.media,\\n    range: segmentUrl.mediaRange\\n  });\\n  segment.map = initSegment;\\n  return segment;\\n};\\n/**\\n * Generates a list of segments using information provided by the SegmentList element\\n * SegmentList (DASH SPEC Section 5.3.9.3.2) contains a set of <SegmentURL> nodes.  Each\\n * node should be translated into segment.\\n *\\n * @param {Object} attributes\\n *   Object containing all inherited attributes from parent elements with attribute\\n *   names as keys\\n * @param {Object[]|undefined} segmentTimeline\\n *        List of objects representing the attributes of each S element contained within\\n *        the SegmentTimeline element\\n * @return {Object.<Array>} list of segments\\n */\\n\\n\\nvar segmentsFromList = function segmentsFromList(attributes, segmentTimeline) {\\n  var duration = attributes.duration,\\n      _attributes$segmentUr = attributes.segmentUrls,\\n      segmentUrls = _attributes$segmentUr === void 0 ? [] : _attributes$segmentUr; // Per spec (5.3.9.2.1) no way to determine segment duration OR\\n  // if both SegmentTimeline and @duration are defined, it is outside of spec.\\n\\n  if (!duration && !segmentTimeline || duration && segmentTimeline) {\\n    throw new Error(errors.SEGMENT_TIME_UNSPECIFIED);\\n  }\\n\\n  var segmentUrlMap = segmentUrls.map(function (segmentUrlObject) {\\n    return SegmentURLToSegmentObject(attributes, segmentUrlObject);\\n  });\\n  var segmentTimeInfo;\\n\\n  if (duration) {\\n    segmentTimeInfo = parseByDuration(attributes);\\n  }\\n\\n  if (segmentTimeline) {\\n    segmentTimeInfo = parseByTimeline(attributes, segmentTimeline);\\n  }\\n\\n  var segments = segmentTimeInfo.map(function (segmentTime, index) {\\n    if (segmentUrlMap[index]) {\\n      var segment = segmentUrlMap[index];\\n      segment.timeline = segmentTime.timeline;\\n      segment.duration = segmentTime.duration;\\n      segment.number = segmentTime.number;\\n      return segment;\\n    } // Since we're mapping we should get rid of any blank segments (in case\\n    // the given SegmentTimeline is handling for more elements than we have\\n    // SegmentURLs for).\\n\\n  }).filter(function (segment) {\\n    return segment;\\n  });\\n  return segments;\\n};\\n\\nvar generateSegments = function generateSegments(_ref) {\\n  var attributes = _ref.attributes,\\n      segmentInfo = _ref.segmentInfo;\\n  var segmentAttributes;\\n  var segmentsFn;\\n\\n  if (segmentInfo.template) {\\n    segmentsFn = segmentsFromTemplate;\\n    segmentAttributes = merge(attributes, segmentInfo.template);\\n  } else if (segmentInfo.base) {\\n    segmentsFn = segmentsFromBase;\\n    segmentAttributes = merge(attributes, segmentInfo.base);\\n  } else if (segmentInfo.list) {\\n    segmentsFn = segmentsFromList;\\n    segmentAttributes = merge(attributes, segmentInfo.list);\\n  }\\n\\n  var segmentsInfo = {\\n    attributes: attributes\\n  };\\n\\n  if (!segmentsFn) {\\n    return segmentsInfo;\\n  }\\n\\n  var segments = segmentsFn(segmentAttributes, segmentInfo.timeline); // The @duration attribute will be used to determin the playlist's targetDuration which\\n  // must be in seconds. Since we've generated the segment list, we no longer need\\n  // @duration to be in @timescale units, so we can convert it here.\\n\\n  if (segmentAttributes.duration) {\\n    var _segmentAttributes = segmentAttributes,\\n        duration = _segmentAttributes.duration,\\n        _segmentAttributes$ti = _segmentAttributes.timescale,\\n        timescale = _segmentAttributes$ti === void 0 ? 1 : _segmentAttributes$ti;\\n    segmentAttributes.duration = duration / timescale;\\n  } else if (segments.length) {\\n    // if there is no @duration attribute, use the largest segment duration as\\n    // as target duration\\n    segmentAttributes.duration = segments.reduce(function (max, segment) {\\n      return Math.max(max, Math.ceil(segment.duration));\\n    }, 0);\\n  } else {\\n    segmentAttributes.duration = 0;\\n  }\\n\\n  segmentsInfo.attributes = segmentAttributes;\\n  segmentsInfo.segments = segments; // This is a sidx box without actual segment information\\n\\n  if (segmentInfo.base && segmentAttributes.indexRange) {\\n    segmentsInfo.sidx = segments[0];\\n    segmentsInfo.segments = [];\\n  }\\n\\n  return segmentsInfo;\\n};\\nvar toPlaylists = function toPlaylists(representations) {\\n  return representations.map(generateSegments);\\n};\\n\\nvar findChildren = function findChildren(element, name) {\\n  return from(element.childNodes).filter(function (_ref) {\\n    var tagName = _ref.tagName;\\n    return tagName === name;\\n  });\\n};\\nvar getContent = function getContent(element) {\\n  return element.textContent.trim();\\n};\\n\\nvar parseDuration = function parseDuration(str) {\\n  var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\\n  var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\\n  var SECONDS_IN_DAY = 24 * 60 * 60;\\n  var SECONDS_IN_HOUR = 60 * 60;\\n  var SECONDS_IN_MIN = 60; // P10Y10M10DT10H10M10.1S\\n\\n  var durationRegex = /P(?:(\\\\d*)Y)?(?:(\\\\d*)M)?(?:(\\\\d*)D)?(?:T(?:(\\\\d*)H)?(?:(\\\\d*)M)?(?:([\\\\d.]*)S)?)?/;\\n  var match = durationRegex.exec(str);\\n\\n  if (!match) {\\n    return 0;\\n  }\\n\\n  var _match$slice = match.slice(1),\\n      year = _match$slice[0],\\n      month = _match$slice[1],\\n      day = _match$slice[2],\\n      hour = _match$slice[3],\\n      minute = _match$slice[4],\\n      second = _match$slice[5];\\n\\n  return parseFloat(year || 0) * SECONDS_IN_YEAR + parseFloat(month || 0) * SECONDS_IN_MONTH + parseFloat(day || 0) * SECONDS_IN_DAY + parseFloat(hour || 0) * SECONDS_IN_HOUR + parseFloat(minute || 0) * SECONDS_IN_MIN + parseFloat(second || 0);\\n};\\nvar parseDate = function parseDate(str) {\\n  // Date format without timezone according to ISO 8601\\n  // YYY-MM-DDThh:mm:ss.ssssss\\n  var dateRegex = /^\\\\d+-\\\\d+-\\\\d+T\\\\d+:\\\\d+:\\\\d+(\\\\.\\\\d+)?$/; // If the date string does not specifiy a timezone, we must specifiy UTC. This is\\n  // expressed by ending with 'Z'\\n\\n  if (dateRegex.test(str)) {\\n    str += 'Z';\\n  }\\n\\n  return Date.parse(str);\\n};\\n\\nvar parsers = {\\n  /**\\n   * Specifies the duration of the entire Media Presentation. Format is a duration string\\n   * as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  mediaPresentationDuration: function mediaPresentationDuration(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the Segment availability start time for all Segments referred to in this\\n   * MPD. For a dynamic manifest, it specifies the anchor for the earliest availability\\n   * time. Format is a date string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The date as seconds from unix epoch\\n   */\\n  availabilityStartTime: function availabilityStartTime(value) {\\n    return parseDate(value) / 1000;\\n  },\\n\\n  /**\\n   * Specifies the smallest period between potential changes to the MPD. Format is a\\n   * duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  minimumUpdatePeriod: function minimumUpdatePeriod(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the suggested presentation delay. Format is a\\n   * duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  suggestedPresentationDelay: function suggestedPresentationDelay(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * specifices the type of mpd. Can be either \\\"static\\\" or \\\"dynamic\\\"\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   *\\n   * @return {string}\\n   *         The type as a string\\n   */\\n  type: function type(value) {\\n    return value;\\n  },\\n\\n  /**\\n   * Specifies the duration of the smallest time shifting buffer for any Representation\\n   * in the MPD. Format is a duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  timeShiftBufferDepth: function timeShiftBufferDepth(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the PeriodStart time of the Period relative to the availabilityStarttime.\\n   * Format is a duration string as specified in ISO 8601\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The duration in seconds\\n   */\\n  start: function start(value) {\\n    return parseDuration(value);\\n  },\\n\\n  /**\\n   * Specifies the width of the visual presentation\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed width\\n   */\\n  width: function width(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the height of the visual presentation\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed height\\n   */\\n  height: function height(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the bitrate of the representation\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed bandwidth\\n   */\\n  bandwidth: function bandwidth(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the number of the first Media Segment in this Representation in the Period\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed number\\n   */\\n  startNumber: function startNumber(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the timescale in units per seconds\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The aprsed timescale\\n   */\\n  timescale: function timescale(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the constant approximate Segment duration\\n   * NOTE: The <Period> element also contains an @duration attribute. This duration\\n   *       specifies the duration of the Period. This attribute is currently not\\n   *       supported by the rest of the parser, however we still check for it to prevent\\n   *       errors.\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed duration\\n   */\\n  duration: function duration(value) {\\n    var parsedValue = parseInt(value, 10);\\n\\n    if (isNaN(parsedValue)) {\\n      return parseDuration(value);\\n    }\\n\\n    return parsedValue;\\n  },\\n\\n  /**\\n   * Specifies the Segment duration, in units of the value of the @timescale.\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed duration\\n   */\\n  d: function d(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the MPD start time, in @timescale units, the first Segment in the series\\n   * starts relative to the beginning of the Period\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed time\\n   */\\n  t: function t(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Specifies the repeat count of the number of following contiguous Segments with the\\n   * same duration expressed by the value of @d\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {number}\\n   *         The parsed number\\n   */\\n  r: function r(value) {\\n    return parseInt(value, 10);\\n  },\\n\\n  /**\\n   * Default parser for all other attributes. Acts as a no-op and just returns the value\\n   * as a string\\n   *\\n   * @param {string} value\\n   *        value of attribute as a string\\n   * @return {string}\\n   *         Unparsed value\\n   */\\n  DEFAULT: function DEFAULT(value) {\\n    return value;\\n  }\\n};\\n/**\\n * Gets all the attributes and values of the provided node, parses attributes with known\\n * types, and returns an object with attribute names mapped to values.\\n *\\n * @param {Node} el\\n *        The node to parse attributes from\\n * @return {Object}\\n *         Object with all attributes of el parsed\\n */\\n\\nvar parseAttributes = function parseAttributes(el) {\\n  if (!(el && el.attributes)) {\\n    return {};\\n  }\\n\\n  return from(el.attributes).reduce(function (a, e) {\\n    var parseFn = parsers[e.name] || parsers.DEFAULT;\\n    a[e.name] = parseFn(e.value);\\n    return a;\\n  }, {});\\n};\\n\\nvar keySystemsMap = {\\n  'urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b': 'org.w3.clearkey',\\n  'urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed': 'com.widevine.alpha',\\n  'urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95': 'com.microsoft.playready',\\n  'urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb': 'com.adobe.primetime'\\n};\\n/**\\n * Builds a list of urls that is the product of the reference urls and BaseURL values\\n *\\n * @param {string[]} referenceUrls\\n *        List of reference urls to resolve to\\n * @param {Node[]} baseUrlElements\\n *        List of BaseURL nodes from the mpd\\n * @return {string[]}\\n *         List of resolved urls\\n */\\n\\nvar buildBaseUrls = function buildBaseUrls(referenceUrls, baseUrlElements) {\\n  if (!baseUrlElements.length) {\\n    return referenceUrls;\\n  }\\n\\n  return flatten(referenceUrls.map(function (reference) {\\n    return baseUrlElements.map(function (baseUrlElement) {\\n      return _videojs_vhs_utils_dist_resolve_url__WEBPACK_IMPORTED_MODULE_0___default()(reference, getContent(baseUrlElement));\\n    });\\n  }));\\n};\\n/**\\n * Contains all Segment information for its containing AdaptationSet\\n *\\n * @typedef {Object} SegmentInformation\\n * @property {Object|undefined} template\\n *           Contains the attributes for the SegmentTemplate node\\n * @property {Object[]|undefined} timeline\\n *           Contains a list of atrributes for each S node within the SegmentTimeline node\\n * @property {Object|undefined} list\\n *           Contains the attributes for the SegmentList node\\n * @property {Object|undefined} base\\n *           Contains the attributes for the SegmentBase node\\n */\\n\\n/**\\n * Returns all available Segment information contained within the AdaptationSet node\\n *\\n * @param {Node} adaptationSet\\n *        The AdaptationSet node to get Segment information from\\n * @return {SegmentInformation}\\n *         The Segment information contained within the provided AdaptationSet\\n */\\n\\nvar getSegmentInformation = function getSegmentInformation(adaptationSet) {\\n  var segmentTemplate = findChildren(adaptationSet, 'SegmentTemplate')[0];\\n  var segmentList = findChildren(adaptationSet, 'SegmentList')[0];\\n  var segmentUrls = segmentList && findChildren(segmentList, 'SegmentURL').map(function (s) {\\n    return merge({\\n      tag: 'SegmentURL'\\n    }, parseAttributes(s));\\n  });\\n  var segmentBase = findChildren(adaptationSet, 'SegmentBase')[0];\\n  var segmentTimelineParentNode = segmentList || segmentTemplate;\\n  var segmentTimeline = segmentTimelineParentNode && findChildren(segmentTimelineParentNode, 'SegmentTimeline')[0];\\n  var segmentInitializationParentNode = segmentList || segmentBase || segmentTemplate;\\n  var segmentInitialization = segmentInitializationParentNode && findChildren(segmentInitializationParentNode, 'Initialization')[0]; // SegmentTemplate is handled slightly differently, since it can have both\\n  // @initialization and an <Initialization> node.  @initialization can be templated,\\n  // while the node can have a url and range specified.  If the <SegmentTemplate> has\\n  // both @initialization and an <Initialization> subelement we opt to override with\\n  // the node, as this interaction is not defined in the spec.\\n\\n  var template = segmentTemplate && parseAttributes(segmentTemplate);\\n\\n  if (template && segmentInitialization) {\\n    template.initialization = segmentInitialization && parseAttributes(segmentInitialization);\\n  } else if (template && template.initialization) {\\n    // If it is @initialization we convert it to an object since this is the format that\\n    // later functions will rely on for the initialization segment.  This is only valid\\n    // for <SegmentTemplate>\\n    template.initialization = {\\n      sourceURL: template.initialization\\n    };\\n  }\\n\\n  var segmentInfo = {\\n    template: template,\\n    timeline: segmentTimeline && findChildren(segmentTimeline, 'S').map(function (s) {\\n      return parseAttributes(s);\\n    }),\\n    list: segmentList && merge(parseAttributes(segmentList), {\\n      segmentUrls: segmentUrls,\\n      initialization: parseAttributes(segmentInitialization)\\n    }),\\n    base: segmentBase && merge(parseAttributes(segmentBase), {\\n      initialization: parseAttributes(segmentInitialization)\\n    })\\n  };\\n  Object.keys(segmentInfo).forEach(function (key) {\\n    if (!segmentInfo[key]) {\\n      delete segmentInfo[key];\\n    }\\n  });\\n  return segmentInfo;\\n};\\n/**\\n * Contains Segment information and attributes needed to construct a Playlist object\\n * from a Representation\\n *\\n * @typedef {Object} RepresentationInformation\\n * @property {SegmentInformation} segmentInfo\\n *           Segment information for this Representation\\n * @property {Object} attributes\\n *           Inherited attributes for this Representation\\n */\\n\\n/**\\n * Maps a Representation node to an object containing Segment information and attributes\\n *\\n * @name inheritBaseUrlsCallback\\n * @function\\n * @param {Node} representation\\n *        Representation node from the mpd\\n * @return {RepresentationInformation}\\n *         Representation information needed to construct a Playlist object\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping Representation nodes to\\n * Segment information and attributes using inherited BaseURL nodes.\\n *\\n * @param {Object} adaptationSetAttributes\\n *        Contains attributes inherited by the AdaptationSet\\n * @param {string[]} adaptationSetBaseUrls\\n *        Contains list of resolved base urls inherited by the AdaptationSet\\n * @param {SegmentInformation} adaptationSetSegmentInfo\\n *        Contains Segment information for the AdaptationSet\\n * @return {inheritBaseUrlsCallback}\\n *         Callback map function\\n */\\n\\nvar inheritBaseUrls = function inheritBaseUrls(adaptationSetAttributes, adaptationSetBaseUrls, adaptationSetSegmentInfo) {\\n  return function (representation) {\\n    var repBaseUrlElements = findChildren(representation, 'BaseURL');\\n    var repBaseUrls = buildBaseUrls(adaptationSetBaseUrls, repBaseUrlElements);\\n    var attributes = merge(adaptationSetAttributes, parseAttributes(representation));\\n    var representationSegmentInfo = getSegmentInformation(representation);\\n    return repBaseUrls.map(function (baseUrl) {\\n      return {\\n        segmentInfo: merge(adaptationSetSegmentInfo, representationSegmentInfo),\\n        attributes: merge(attributes, {\\n          baseUrl: baseUrl\\n        })\\n      };\\n    });\\n  };\\n};\\n/**\\n * Tranforms a series of content protection nodes to\\n * an object containing pssh data by key system\\n *\\n * @param {Node[]} contentProtectionNodes\\n *        Content protection nodes\\n * @return {Object}\\n *        Object containing pssh data by key system\\n */\\n\\nvar generateKeySystemInformation = function generateKeySystemInformation(contentProtectionNodes) {\\n  return contentProtectionNodes.reduce(function (acc, node) {\\n    var attributes = parseAttributes(node);\\n    var keySystem = keySystemsMap[attributes.schemeIdUri];\\n\\n    if (keySystem) {\\n      acc[keySystem] = {\\n        attributes: attributes\\n      };\\n      var psshNode = findChildren(node, 'cenc:pssh')[0];\\n\\n      if (psshNode) {\\n        var pssh = getContent(psshNode);\\n        var psshBuffer = pssh && _videojs_vhs_utils_dist_decode_b64_to_uint8_array__WEBPACK_IMPORTED_MODULE_2___default()(pssh);\\n        acc[keySystem].pssh = psshBuffer;\\n      }\\n    }\\n\\n    return acc;\\n  }, {});\\n};\\n/**\\n * Maps an AdaptationSet node to a list of Representation information objects\\n *\\n * @name toRepresentationsCallback\\n * @function\\n * @param {Node} adaptationSet\\n *        AdaptationSet node from the mpd\\n * @return {RepresentationInformation[]}\\n *         List of objects containing Representaion information\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping AdaptationSet nodes to a list of\\n * Representation information objects\\n *\\n * @param {Object} periodAttributes\\n *        Contains attributes inherited by the Period\\n * @param {string[]} periodBaseUrls\\n *        Contains list of resolved base urls inherited by the Period\\n * @param {string[]} periodSegmentInfo\\n *        Contains Segment Information at the period level\\n * @return {toRepresentationsCallback}\\n *         Callback map function\\n */\\n\\n\\nvar toRepresentations = function toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo) {\\n  return function (adaptationSet) {\\n    var adaptationSetAttributes = parseAttributes(adaptationSet);\\n    var adaptationSetBaseUrls = buildBaseUrls(periodBaseUrls, findChildren(adaptationSet, 'BaseURL'));\\n    var role = findChildren(adaptationSet, 'Role')[0];\\n    var roleAttributes = {\\n      role: parseAttributes(role)\\n    };\\n    var attrs = merge(periodAttributes, adaptationSetAttributes, roleAttributes);\\n    var contentProtection = generateKeySystemInformation(findChildren(adaptationSet, 'ContentProtection'));\\n\\n    if (Object.keys(contentProtection).length) {\\n      attrs = merge(attrs, {\\n        contentProtection: contentProtection\\n      });\\n    }\\n\\n    var segmentInfo = getSegmentInformation(adaptationSet);\\n    var representations = findChildren(adaptationSet, 'Representation');\\n    var adaptationSetSegmentInfo = merge(periodSegmentInfo, segmentInfo);\\n    return flatten(representations.map(inheritBaseUrls(attrs, adaptationSetBaseUrls, adaptationSetSegmentInfo)));\\n  };\\n};\\n/**\\n * Maps an Period node to a list of Representation inforamtion objects for all\\n * AdaptationSet nodes contained within the Period\\n *\\n * @name toAdaptationSetsCallback\\n * @function\\n * @param {Node} period\\n *        Period node from the mpd\\n * @param {number} periodIndex\\n *        Index of the Period within the mpd\\n * @return {RepresentationInformation[]}\\n *         List of objects containing Representaion information\\n */\\n\\n/**\\n * Returns a callback for Array.prototype.map for mapping Period nodes to a list of\\n * Representation information objects\\n *\\n * @param {Object} mpdAttributes\\n *        Contains attributes inherited by the mpd\\n * @param {string[]} mpdBaseUrls\\n *        Contains list of resolved base urls inherited by the mpd\\n * @return {toAdaptationSetsCallback}\\n *         Callback map function\\n */\\n\\nvar toAdaptationSets = function toAdaptationSets(mpdAttributes, mpdBaseUrls) {\\n  return function (period, index) {\\n    var periodBaseUrls = buildBaseUrls(mpdBaseUrls, findChildren(period, 'BaseURL'));\\n    var periodAtt = parseAttributes(period);\\n    var parsedPeriodId = parseInt(periodAtt.id, 10); // fallback to mapping index if Period@id is not a number\\n\\n    var periodIndex = global_window__WEBPACK_IMPORTED_MODULE_1___default.a.isNaN(parsedPeriodId) ? index : parsedPeriodId;\\n    var periodAttributes = merge(mpdAttributes, {\\n      periodIndex: periodIndex\\n    });\\n    var adaptationSets = findChildren(period, 'AdaptationSet');\\n    var periodSegmentInfo = getSegmentInformation(period);\\n    return flatten(adaptationSets.map(toRepresentations(periodAttributes, periodBaseUrls, periodSegmentInfo)));\\n  };\\n};\\n/**\\n * Traverses the mpd xml tree to generate a list of Representation information objects\\n * that have inherited attributes from parent nodes\\n *\\n * @param {Node} mpd\\n *        The root node of the mpd\\n * @param {Object} options\\n *        Available options for inheritAttributes\\n * @param {string} options.manifestUri\\n *        The uri source of the mpd\\n * @param {number} options.NOW\\n *        Current time per DASH IOP.  Default is current time in ms since epoch\\n * @param {number} options.clientOffset\\n *        Client time difference from NOW (in milliseconds)\\n * @return {RepresentationInformation[]}\\n *         List of objects containing Representation information\\n */\\n\\nvar inheritAttributes = function inheritAttributes(mpd, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  var _options = options,\\n      _options$manifestUri = _options.manifestUri,\\n      manifestUri = _options$manifestUri === void 0 ? '' : _options$manifestUri,\\n      _options$NOW = _options.NOW,\\n      NOW = _options$NOW === void 0 ? Date.now() : _options$NOW,\\n      _options$clientOffset = _options.clientOffset,\\n      clientOffset = _options$clientOffset === void 0 ? 0 : _options$clientOffset;\\n  var periods = findChildren(mpd, 'Period');\\n\\n  if (!periods.length) {\\n    throw new Error(errors.INVALID_NUMBER_OF_PERIOD);\\n  }\\n\\n  var mpdAttributes = parseAttributes(mpd);\\n  var mpdBaseUrls = buildBaseUrls([manifestUri], findChildren(mpd, 'BaseURL'));\\n  mpdAttributes.sourceDuration = mpdAttributes.mediaPresentationDuration || 0;\\n  mpdAttributes.NOW = NOW;\\n  mpdAttributes.clientOffset = clientOffset;\\n  return flatten(periods.map(toAdaptationSets(mpdAttributes, mpdBaseUrls)));\\n};\\n\\nvar stringToMpdXml = function stringToMpdXml(manifestString) {\\n  if (manifestString === '') {\\n    throw new Error(errors.DASH_EMPTY_MANIFEST);\\n  }\\n\\n  var parser = new xmldom__WEBPACK_IMPORTED_MODULE_3__[\\\"DOMParser\\\"]();\\n  var xml = parser.parseFromString(manifestString, 'application/xml');\\n  var mpd = xml && xml.documentElement.tagName === 'MPD' ? xml.documentElement : null;\\n\\n  if (!mpd || mpd && mpd.getElementsByTagName('parsererror').length > 0) {\\n    throw new Error(errors.DASH_INVALID_XML);\\n  }\\n\\n  return mpd;\\n};\\n\\n/**\\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\\n *\\n * @param {string} mpd\\n *        XML string of the MPD manifest\\n * @return {Object|null}\\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\\n */\\n\\nvar parseUTCTimingScheme = function parseUTCTimingScheme(mpd) {\\n  var UTCTimingNode = findChildren(mpd, 'UTCTiming')[0];\\n\\n  if (!UTCTimingNode) {\\n    return null;\\n  }\\n\\n  var attributes = parseAttributes(UTCTimingNode);\\n\\n  switch (attributes.schemeIdUri) {\\n    case 'urn:mpeg:dash:utc:http-head:2014':\\n    case 'urn:mpeg:dash:utc:http-head:2012':\\n      attributes.method = 'HEAD';\\n      break;\\n\\n    case 'urn:mpeg:dash:utc:http-xsdate:2014':\\n    case 'urn:mpeg:dash:utc:http-iso:2014':\\n    case 'urn:mpeg:dash:utc:http-xsdate:2012':\\n    case 'urn:mpeg:dash:utc:http-iso:2012':\\n      attributes.method = 'GET';\\n      break;\\n\\n    case 'urn:mpeg:dash:utc:direct:2014':\\n    case 'urn:mpeg:dash:utc:direct:2012':\\n      attributes.method = 'DIRECT';\\n      attributes.value = Date.parse(attributes.value);\\n      break;\\n\\n    case 'urn:mpeg:dash:utc:http-ntp:2014':\\n    case 'urn:mpeg:dash:utc:ntp:2014':\\n    case 'urn:mpeg:dash:utc:sntp:2014':\\n    default:\\n      throw new Error(errors.UNSUPPORTED_UTC_TIMING_SCHEME);\\n  }\\n\\n  return attributes;\\n};\\n\\nvar VERSION = version;\\n\\nvar parse = function parse(manifestString, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  return toM3u8(toPlaylists(inheritAttributes(stringToMpdXml(manifestString), options)), options.sidxMapping);\\n};\\n/**\\n * Parses the manifest for a UTCTiming node, returning the nodes attributes if found\\n *\\n * @param {string} manifestString\\n *        XML string of the MPD manifest\\n * @return {Object|null}\\n *         Attributes of UTCTiming node specified in the manifest. Null if none found\\n */\\n\\n\\nvar parseUTCTiming = function parseUTCTiming(manifestString) {\\n  return parseUTCTimingScheme(stringToMpdXml(manifestString));\\n};\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mpd-parser/dist/mpd-parser.es.js?\")},\"../node_modules/mux.js/lib/aac/utils.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Utilities to detect basic properties and metadata about Aac data.\\n */\\n\\n\\nvar ADTS_SAMPLING_FREQUENCIES = [\\n  96000,\\n  88200,\\n  64000,\\n  48000,\\n  44100,\\n  32000,\\n  24000,\\n  22050,\\n  16000,\\n  12000,\\n  11025,\\n  8000,\\n  7350\\n];\\n\\nvar isLikelyAacData = function(data) {\\n  if ((data[0] === 'I'.charCodeAt(0)) &&\\n      (data[1] === 'D'.charCodeAt(0)) &&\\n      (data[2] === '3'.charCodeAt(0))) {\\n    return true;\\n  }\\n  return false;\\n};\\n\\nvar parseSyncSafeInteger = function(data) {\\n  return (data[0] << 21) |\\n          (data[1] << 14) |\\n          (data[2] << 7) |\\n          (data[3]);\\n};\\n\\n// return a percent-encoded representation of the specified byte range\\n// @see http://en.wikipedia.org/wiki/Percent-encoding\\nvar percentEncode = function(bytes, start, end) {\\n  var i, result = '';\\n  for (i = start; i < end; i++) {\\n    result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\\n  }\\n  return result;\\n};\\n\\n// return the string representation of the specified byte range,\\n// interpreted as ISO-8859-1.\\nvar parseIso88591 = function(bytes, start, end) {\\n  return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\\n};\\n\\nvar parseId3TagSize = function(header, byteIndex) {\\n  var\\n    returnSize = (header[byteIndex + 6] << 21) |\\n                 (header[byteIndex + 7] << 14) |\\n                 (header[byteIndex + 8] << 7) |\\n                 (header[byteIndex + 9]),\\n    flags = header[byteIndex + 5],\\n    footerPresent = (flags & 16) >> 4;\\n\\n  if (footerPresent) {\\n    return returnSize + 20;\\n  }\\n  return returnSize + 10;\\n};\\n\\nvar parseAdtsSize = function(header, byteIndex) {\\n  var\\n    lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\\n    middle = header[byteIndex + 4] << 3,\\n    highTwo = header[byteIndex + 3] & 0x3 << 11;\\n\\n  return (highTwo | middle) | lowThree;\\n};\\n\\nvar parseType = function(header, byteIndex) {\\n  if ((header[byteIndex] === 'I'.charCodeAt(0)) &&\\n      (header[byteIndex + 1] === 'D'.charCodeAt(0)) &&\\n      (header[byteIndex + 2] === '3'.charCodeAt(0))) {\\n    return 'timed-metadata';\\n  } else if ((header[byteIndex] & 0xff === 0xff) &&\\n             ((header[byteIndex + 1] & 0xf0) === 0xf0)) {\\n    return 'audio';\\n  }\\n  return null;\\n};\\n\\nvar parseSampleRate = function(packet) {\\n  var i = 0;\\n\\n  while (i + 5 < packet.length) {\\n    if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\\n      // If a valid header was not found,  jump one forward and attempt to\\n      // find a valid ADTS header starting at the next byte\\n      i++;\\n      continue;\\n    }\\n    return ADTS_SAMPLING_FREQUENCIES[(packet[i + 2] & 0x3c) >>> 2];\\n  }\\n\\n  return null;\\n};\\n\\nvar parseAacTimestamp = function(packet) {\\n  var frameStart, frameSize, frame, frameHeader;\\n\\n  // find the start of the first frame and the end of the tag\\n  frameStart = 10;\\n  if (packet[5] & 0x40) {\\n    // advance the frame start past the extended header\\n    frameStart += 4; // header size field\\n    frameStart += parseSyncSafeInteger(packet.subarray(10, 14));\\n  }\\n\\n  // parse one or more ID3 frames\\n  // http://id3.org/id3v2.3.0#ID3v2_frame_overview\\n  do {\\n    // determine the number of bytes in this frame\\n    frameSize = parseSyncSafeInteger(packet.subarray(frameStart + 4, frameStart + 8));\\n    if (frameSize < 1) {\\n      return null;\\n    }\\n    frameHeader = String.fromCharCode(packet[frameStart],\\n                                      packet[frameStart + 1],\\n                                      packet[frameStart + 2],\\n                                      packet[frameStart + 3]);\\n\\n    if (frameHeader === 'PRIV') {\\n      frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\\n\\n      for (var i = 0; i < frame.byteLength; i++) {\\n        if (frame[i] === 0) {\\n          var owner = parseIso88591(frame, 0, i);\\n          if (owner === 'com.apple.streaming.transportStreamTimestamp') {\\n            var d = frame.subarray(i + 1);\\n            var size = ((d[3] & 0x01)  << 30) |\\n                       (d[4]  << 22) |\\n                       (d[5] << 14) |\\n                       (d[6] << 6) |\\n                       (d[7] >>> 2);\\n            size *= 4;\\n            size += d[7] & 0x03;\\n\\n            return size;\\n          }\\n          break;\\n        }\\n      }\\n    }\\n\\n    frameStart += 10; // advance past the frame header\\n    frameStart += frameSize; // advance past the frame body\\n  } while (frameStart < packet.byteLength);\\n  return null;\\n};\\n\\nmodule.exports = {\\n  isLikelyAacData: isLikelyAacData,\\n  parseId3TagSize: parseId3TagSize,\\n  parseAdtsSize: parseAdtsSize,\\n  parseType: parseType,\\n  parseSampleRate: parseSampleRate,\\n  parseAacTimestamp: parseAacTimestamp\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/aac/utils.js?\")},\"../node_modules/mux.js/lib/m2ts/caption-stream.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Reads in-band caption information from a video elementary\\n * stream. Captions must follow the CEA-708 standard for injection\\n * into an MPEG-2 transport streams.\\n * @see https://en.wikipedia.org/wiki/CEA-708\\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\\n */\\n\\n\\n\\n// -----------------\\n// Link To Transport\\n// -----------------\\n\\nvar Stream = __webpack_require__(/*! ../utils/stream */ \\\"../node_modules/mux.js/lib/utils/stream.js\\\");\\nvar cea708Parser = __webpack_require__(/*! ../tools/caption-packet-parser */ \\\"../node_modules/mux.js/lib/tools/caption-packet-parser.js\\\");\\n\\nvar CaptionStream = function() {\\n\\n  CaptionStream.prototype.init.call(this);\\n\\n  this.captionPackets_ = [];\\n\\n  this.ccStreams_ = [\\n    new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\\n    new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\\n    new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\\n    new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\\n  ];\\n\\n  this.reset();\\n\\n  // forward data and done events from CCs to this CaptionStream\\n  this.ccStreams_.forEach(function(cc) {\\n    cc.on('data', this.trigger.bind(this, 'data'));\\n    cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\\n    cc.on('done', this.trigger.bind(this, 'done'));\\n  }, this);\\n\\n};\\n\\nCaptionStream.prototype = new Stream();\\nCaptionStream.prototype.push = function(event) {\\n  var sei, userData, newCaptionPackets;\\n\\n  // only examine SEI NALs\\n  if (event.nalUnitType !== 'sei_rbsp') {\\n    return;\\n  }\\n\\n  // parse the sei\\n  sei = cea708Parser.parseSei(event.escapedRBSP);\\n\\n  // ignore everything but user_data_registered_itu_t_t35\\n  if (sei.payloadType !== cea708Parser.USER_DATA_REGISTERED_ITU_T_T35) {\\n    return;\\n  }\\n\\n  // parse out the user data payload\\n  userData = cea708Parser.parseUserData(sei);\\n\\n  // ignore unrecognized userData\\n  if (!userData) {\\n    return;\\n  }\\n\\n  // Sometimes, the same segment # will be downloaded twice. To stop the\\n  // caption data from being processed twice, we track the latest dts we've\\n  // received and ignore everything with a dts before that. However, since\\n  // data for a specific dts can be split across packets on either side of\\n  // a segment boundary, we need to make sure we *don't* ignore the packets\\n  // from the *next* segment that have dts === this.latestDts_. By constantly\\n  // tracking the number of packets received with dts === this.latestDts_, we\\n  // know how many should be ignored once we start receiving duplicates.\\n  if (event.dts < this.latestDts_) {\\n    // We've started getting older data, so set the flag.\\n    this.ignoreNextEqualDts_ = true;\\n    return;\\n  } else if ((event.dts === this.latestDts_) && (this.ignoreNextEqualDts_)) {\\n    this.numSameDts_--;\\n    if (!this.numSameDts_) {\\n      // We've received the last duplicate packet, time to start processing again\\n      this.ignoreNextEqualDts_ = false;\\n    }\\n    return;\\n  }\\n\\n  // parse out CC data packets and save them for later\\n  newCaptionPackets = cea708Parser.parseCaptionPackets(event.pts, userData);\\n  this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\\n  if (this.latestDts_ !== event.dts) {\\n    this.numSameDts_ = 0;\\n  }\\n  this.numSameDts_++;\\n  this.latestDts_ = event.dts;\\n};\\n\\nCaptionStream.prototype.flushCCStreams = function(flushType) {\\n  this.ccStreams_.forEach(function(cc) {\\n    return flushType === 'flush' ? cc.flush() : cc.partialFlush();\\n  }, this);\\n};\\n\\nCaptionStream.prototype.flushStream = function(flushType) {\\n  // make sure we actually parsed captions before proceeding\\n  if (!this.captionPackets_.length) {\\n    this.flushCCStreams(flushType);\\n    return;\\n  }\\n\\n  // In Chrome, the Array#sort function is not stable so add a\\n  // presortIndex that we can use to ensure we get a stable-sort\\n  this.captionPackets_.forEach(function(elem, idx) {\\n    elem.presortIndex = idx;\\n  });\\n\\n  // sort caption byte-pairs based on their PTS values\\n  this.captionPackets_.sort(function(a, b) {\\n    if (a.pts === b.pts) {\\n      return a.presortIndex - b.presortIndex;\\n    }\\n    return a.pts - b.pts;\\n  });\\n\\n  this.captionPackets_.forEach(function(packet) {\\n    if (packet.type < 2) {\\n      // Dispatch packet to the right Cea608Stream\\n      this.dispatchCea608Packet(packet);\\n    }\\n    // this is where an 'else' would go for a dispatching packets\\n    // to a theoretical Cea708Stream that handles SERVICEn data\\n  }, this);\\n\\n  this.captionPackets_.length = 0;\\n  this.flushCCStreams(flushType);\\n};\\n\\nCaptionStream.prototype.flush = function() {\\n  return this.flushStream('flush');\\n};\\n\\n// Only called if handling partial data\\nCaptionStream.prototype.partialFlush = function() {\\n  return this.flushStream('partialFlush');\\n};\\n\\nCaptionStream.prototype.reset = function() {\\n  this.latestDts_ = null;\\n  this.ignoreNextEqualDts_ = false;\\n  this.numSameDts_ = 0;\\n  this.activeCea608Channel_ = [null, null];\\n  this.ccStreams_.forEach(function(ccStream) {\\n    ccStream.reset();\\n  });\\n};\\n\\n// From the CEA-608 spec:\\n/*\\n * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\\n * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\\n * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\\n * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\\n * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\\n * to switch to captioning or Text.\\n*/\\n// With that in mind, we ignore any data between an XDS control code and a\\n// subsequent closed-captioning control code.\\nCaptionStream.prototype.dispatchCea608Packet = function(packet) {\\n  // NOTE: packet.type is the CEA608 field\\n  if (this.setsTextOrXDSActive(packet)) {\\n    this.activeCea608Channel_[packet.type] = null;\\n  } else if (this.setsChannel1Active(packet)) {\\n    this.activeCea608Channel_[packet.type] = 0;\\n  } else if (this.setsChannel2Active(packet)) {\\n    this.activeCea608Channel_[packet.type] = 1;\\n  }\\n  if (this.activeCea608Channel_[packet.type] === null) {\\n    // If we haven't received anything to set the active channel, or the\\n    // packets are Text/XDS data, discard the data; we don't want jumbled\\n    // captions\\n    return;\\n  }\\n  this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\\n};\\n\\nCaptionStream.prototype.setsChannel1Active = function(packet) {\\n  return ((packet.ccData & 0x7800) === 0x1000);\\n};\\nCaptionStream.prototype.setsChannel2Active = function(packet) {\\n  return ((packet.ccData & 0x7800) === 0x1800);\\n};\\nCaptionStream.prototype.setsTextOrXDSActive = function(packet) {\\n  return ((packet.ccData & 0x7100) === 0x0100) ||\\n    ((packet.ccData & 0x78fe) === 0x102a) ||\\n    ((packet.ccData & 0x78fe) === 0x182a);\\n};\\n\\n// ----------------------\\n// Session to Application\\n// ----------------------\\n\\n// This hash maps non-ASCII, special, and extended character codes to their\\n// proper Unicode equivalent. The first keys that are only a single byte\\n// are the non-standard ASCII characters, which simply map the CEA608 byte\\n// to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\\n// character codes, but have their MSB bitmasked with 0x03 so that a lookup\\n// can be performed regardless of the field and data channel on which the\\n// character code was received.\\nvar CHARACTER_TRANSLATION = {\\n  0x2a: 0xe1,     // á\\n  0x5c: 0xe9,     // é\\n  0x5e: 0xed,     // í\\n  0x5f: 0xf3,     // ó\\n  0x60: 0xfa,     // ú\\n  0x7b: 0xe7,     // ç\\n  0x7c: 0xf7,     // ÷\\n  0x7d: 0xd1,     // Ñ\\n  0x7e: 0xf1,     // ñ\\n  0x7f: 0x2588,   // █\\n  0x0130: 0xae,   // ®\\n  0x0131: 0xb0,   // °\\n  0x0132: 0xbd,   // ½\\n  0x0133: 0xbf,   // ¿\\n  0x0134: 0x2122, // ™\\n  0x0135: 0xa2,   // ¢\\n  0x0136: 0xa3,   // £\\n  0x0137: 0x266a, // ♪\\n  0x0138: 0xe0,   // à\\n  0x0139: 0xa0,   //\\n  0x013a: 0xe8,   // è\\n  0x013b: 0xe2,   // â\\n  0x013c: 0xea,   // ê\\n  0x013d: 0xee,   // î\\n  0x013e: 0xf4,   // ô\\n  0x013f: 0xfb,   // û\\n  0x0220: 0xc1,   // Á\\n  0x0221: 0xc9,   // É\\n  0x0222: 0xd3,   // Ó\\n  0x0223: 0xda,   // Ú\\n  0x0224: 0xdc,   // Ü\\n  0x0225: 0xfc,   // ü\\n  0x0226: 0x2018, // ‘\\n  0x0227: 0xa1,   // ¡\\n  0x0228: 0x2a,   // *\\n  0x0229: 0x27,   // '\\n  0x022a: 0x2014, // —\\n  0x022b: 0xa9,   // ©\\n  0x022c: 0x2120, // ℠\\n  0x022d: 0x2022, // •\\n  0x022e: 0x201c, // “\\n  0x022f: 0x201d, // ”\\n  0x0230: 0xc0,   // À\\n  0x0231: 0xc2,   // Â\\n  0x0232: 0xc7,   // Ç\\n  0x0233: 0xc8,   // È\\n  0x0234: 0xca,   // Ê\\n  0x0235: 0xcb,   // Ë\\n  0x0236: 0xeb,   // ë\\n  0x0237: 0xce,   // Î\\n  0x0238: 0xcf,   // Ï\\n  0x0239: 0xef,   // ï\\n  0x023a: 0xd4,   // Ô\\n  0x023b: 0xd9,   // Ù\\n  0x023c: 0xf9,   // ù\\n  0x023d: 0xdb,   // Û\\n  0x023e: 0xab,   // «\\n  0x023f: 0xbb,   // »\\n  0x0320: 0xc3,   // Ã\\n  0x0321: 0xe3,   // ã\\n  0x0322: 0xcd,   // Í\\n  0x0323: 0xcc,   // Ì\\n  0x0324: 0xec,   // ì\\n  0x0325: 0xd2,   // Ò\\n  0x0326: 0xf2,   // ò\\n  0x0327: 0xd5,   // Õ\\n  0x0328: 0xf5,   // õ\\n  0x0329: 0x7b,   // {\\n  0x032a: 0x7d,   // }\\n  0x032b: 0x5c,   // \\\\\\n  0x032c: 0x5e,   // ^\\n  0x032d: 0x5f,   // _\\n  0x032e: 0x7c,   // |\\n  0x032f: 0x7e,   // ~\\n  0x0330: 0xc4,   // Ä\\n  0x0331: 0xe4,   // ä\\n  0x0332: 0xd6,   // Ö\\n  0x0333: 0xf6,   // ö\\n  0x0334: 0xdf,   // ß\\n  0x0335: 0xa5,   // ¥\\n  0x0336: 0xa4,   // ¤\\n  0x0337: 0x2502, // │\\n  0x0338: 0xc5,   // Å\\n  0x0339: 0xe5,   // å\\n  0x033a: 0xd8,   // Ø\\n  0x033b: 0xf8,   // ø\\n  0x033c: 0x250c, // ┌\\n  0x033d: 0x2510, // ┐\\n  0x033e: 0x2514, // └\\n  0x033f: 0x2518  // ┘\\n};\\n\\nvar getCharFromCode = function(code) {\\n  if (code === null) {\\n    return '';\\n  }\\n  code = CHARACTER_TRANSLATION[code] || code;\\n  return String.fromCharCode(code);\\n};\\n\\n// the index of the last row in a CEA-608 display buffer\\nvar BOTTOM_ROW = 14;\\n\\n// This array is used for mapping PACs -> row #, since there's no way of\\n// getting it through bit logic.\\nvar ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620,\\n            0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420];\\n\\n// CEA-608 captions are rendered onto a 34x15 matrix of character\\n// cells. The \\\"bottom\\\" row is the last element in the outer array.\\nvar createDisplayBuffer = function() {\\n  var result = [], i = BOTTOM_ROW + 1;\\n  while (i--) {\\n    result.push('');\\n  }\\n  return result;\\n};\\n\\nvar Cea608Stream = function(field, dataChannel) {\\n  Cea608Stream.prototype.init.call(this);\\n\\n  this.field_ = field || 0;\\n  this.dataChannel_ = dataChannel || 0;\\n\\n  this.name_ = 'CC' + (((this.field_ << 1) | this.dataChannel_) + 1);\\n\\n  this.setConstants();\\n  this.reset();\\n\\n  this.push = function(packet) {\\n    var data, swap, char0, char1, text;\\n    // remove the parity bits\\n    data = packet.ccData & 0x7f7f;\\n\\n    // ignore duplicate control codes; the spec demands they're sent twice\\n    if (data === this.lastControlCode_) {\\n      this.lastControlCode_ = null;\\n      return;\\n    }\\n\\n    // Store control codes\\n    if ((data & 0xf000) === 0x1000) {\\n      this.lastControlCode_ = data;\\n    } else if (data !== this.PADDING_) {\\n      this.lastControlCode_ = null;\\n    }\\n\\n    char0 = data >>> 8;\\n    char1 = data & 0xff;\\n\\n    if (data === this.PADDING_) {\\n      return;\\n\\n    } else if (data === this.RESUME_CAPTION_LOADING_) {\\n      this.mode_ = 'popOn';\\n\\n    } else if (data === this.END_OF_CAPTION_) {\\n      // If an EOC is received while in paint-on mode, the displayed caption\\n      // text should be swapped to non-displayed memory as if it was a pop-on\\n      // caption. Because of that, we should explicitly switch back to pop-on\\n      // mode\\n      this.mode_ = 'popOn';\\n      this.clearFormatting(packet.pts);\\n      // if a caption was being displayed, it's gone now\\n      this.flushDisplayed(packet.pts);\\n\\n      // flip memory\\n      swap = this.displayed_;\\n      this.displayed_ = this.nonDisplayed_;\\n      this.nonDisplayed_ = swap;\\n\\n      // start measuring the time to display the caption\\n      this.startPts_ = packet.pts;\\n\\n    } else if (data === this.ROLL_UP_2_ROWS_) {\\n      this.rollUpRows_ = 2;\\n      this.setRollUp(packet.pts);\\n    } else if (data === this.ROLL_UP_3_ROWS_) {\\n      this.rollUpRows_ = 3;\\n      this.setRollUp(packet.pts);\\n    } else if (data === this.ROLL_UP_4_ROWS_) {\\n      this.rollUpRows_ = 4;\\n      this.setRollUp(packet.pts);\\n    } else if (data === this.CARRIAGE_RETURN_) {\\n      this.clearFormatting(packet.pts);\\n      this.flushDisplayed(packet.pts);\\n      this.shiftRowsUp_();\\n      this.startPts_ = packet.pts;\\n\\n    } else if (data === this.BACKSPACE_) {\\n      if (this.mode_ === 'popOn') {\\n        this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n      } else {\\n        this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n      }\\n    } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\\n      this.flushDisplayed(packet.pts);\\n      this.displayed_ = createDisplayBuffer();\\n    } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\\n      this.nonDisplayed_ = createDisplayBuffer();\\n\\n    } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\\n      if (this.mode_ !== 'paintOn') {\\n        // NOTE: This should be removed when proper caption positioning is\\n        // implemented\\n        this.flushDisplayed(packet.pts);\\n        this.displayed_ = createDisplayBuffer();\\n      }\\n      this.mode_ = 'paintOn';\\n      this.startPts_ = packet.pts;\\n\\n    // Append special characters to caption text\\n    } else if (this.isSpecialCharacter(char0, char1)) {\\n      // Bitmask char0 so that we can apply character transformations\\n      // regardless of field and data channel.\\n      // Then byte-shift to the left and OR with char1 so we can pass the\\n      // entire character code to `getCharFromCode`.\\n      char0 = (char0 & 0x03) << 8;\\n      text = getCharFromCode(char0 | char1);\\n      this[this.mode_](packet.pts, text);\\n      this.column_++;\\n\\n    // Append extended characters to caption text\\n    } else if (this.isExtCharacter(char0, char1)) {\\n      // Extended characters always follow their \\\"non-extended\\\" equivalents.\\n      // IE if a \\\"è\\\" is desired, you'll always receive \\\"eè\\\"; non-compliant\\n      // decoders are supposed to drop the \\\"è\\\", while compliant decoders\\n      // backspace the \\\"e\\\" and insert \\\"è\\\".\\n\\n      // Delete the previous character\\n      if (this.mode_ === 'popOn') {\\n        this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n      } else {\\n        this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n      }\\n\\n      // Bitmask char0 so that we can apply character transformations\\n      // regardless of field and data channel.\\n      // Then byte-shift to the left and OR with char1 so we can pass the\\n      // entire character code to `getCharFromCode`.\\n      char0 = (char0 & 0x03) << 8;\\n      text = getCharFromCode(char0 | char1);\\n      this[this.mode_](packet.pts, text);\\n      this.column_++;\\n\\n    // Process mid-row codes\\n    } else if (this.isMidRowCode(char0, char1)) {\\n      // Attributes are not additive, so clear all formatting\\n      this.clearFormatting(packet.pts);\\n\\n      // According to the standard, mid-row codes\\n      // should be replaced with spaces, so add one now\\n      this[this.mode_](packet.pts, ' ');\\n      this.column_++;\\n\\n      if ((char1 & 0xe) === 0xe) {\\n        this.addFormatting(packet.pts, ['i']);\\n      }\\n\\n      if ((char1 & 0x1) === 0x1) {\\n        this.addFormatting(packet.pts, ['u']);\\n      }\\n\\n    // Detect offset control codes and adjust cursor\\n    } else if (this.isOffsetControlCode(char0, char1)) {\\n      // Cursor position is set by indent PAC (see below) in 4-column\\n      // increments, with an additional offset code of 1-3 to reach any\\n      // of the 32 columns specified by CEA-608. So all we need to do\\n      // here is increment the column cursor by the given offset.\\n      this.column_ += (char1 & 0x03);\\n\\n    // Detect PACs (Preamble Address Codes)\\n    } else if (this.isPAC(char0, char1)) {\\n\\n      // There's no logic for PAC -> row mapping, so we have to just\\n      // find the row code in an array and use its index :(\\n      var row = ROWS.indexOf(data & 0x1f20);\\n\\n      // Configure the caption window if we're in roll-up mode\\n      if (this.mode_ === 'rollUp') {\\n        // This implies that the base row is incorrectly set.\\n        // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\\n        // of roll-up rows set.\\n        if (row - this.rollUpRows_ + 1 < 0) {\\n          row = this.rollUpRows_ - 1;\\n        }\\n\\n        this.setRollUp(packet.pts, row);\\n      }\\n\\n      if (row !== this.row_) {\\n        // formatting is only persistent for current row\\n        this.clearFormatting(packet.pts);\\n        this.row_ = row;\\n      }\\n      // All PACs can apply underline, so detect and apply\\n      // (All odd-numbered second bytes set underline)\\n      if ((char1 & 0x1) && (this.formatting_.indexOf('u') === -1)) {\\n          this.addFormatting(packet.pts, ['u']);\\n      }\\n\\n      if ((data & 0x10) === 0x10) {\\n        // We've got an indent level code. Each successive even number\\n        // increments the column cursor by 4, so we can get the desired\\n        // column position by bit-shifting to the right (to get n/2)\\n        // and multiplying by 4.\\n        this.column_ = ((data & 0xe) >> 1) * 4;\\n      }\\n\\n      if (this.isColorPAC(char1)) {\\n        // it's a color code, though we only support white, which\\n        // can be either normal or italicized. white italics can be\\n        // either 0x4e or 0x6e depending on the row, so we just\\n        // bitwise-and with 0xe to see if italics should be turned on\\n        if ((char1 & 0xe) === 0xe) {\\n          this.addFormatting(packet.pts, ['i']);\\n        }\\n      }\\n\\n    // We have a normal character in char0, and possibly one in char1\\n    } else if (this.isNormalChar(char0)) {\\n      if (char1 === 0x00) {\\n        char1 = null;\\n      }\\n      text = getCharFromCode(char0);\\n      text += getCharFromCode(char1);\\n      this[this.mode_](packet.pts, text);\\n      this.column_ += text.length;\\n\\n    } // finish data processing\\n\\n  };\\n};\\nCea608Stream.prototype = new Stream();\\n// Trigger a cue point that captures the current state of the\\n// display buffer\\nCea608Stream.prototype.flushDisplayed = function(pts) {\\n  var content = this.displayed_\\n    // remove spaces from the start and end of the string\\n    .map(function(row) {\\n      try {\\n        return row.trim();\\n      } catch (e) {\\n        // Ordinarily, this shouldn't happen. However, caption\\n        // parsing errors should not throw exceptions and\\n        // break playback.\\n        // eslint-disable-next-line no-console\\n        console.error('Skipping malformed caption.');\\n        return '';\\n      }\\n    })\\n    // combine all text rows to display in one cue\\n    .join('\\\\n')\\n    // and remove blank rows from the start and end, but not the middle\\n    .replace(/^\\\\n+|\\\\n+$/g, '');\\n\\n  if (content.length) {\\n    this.trigger('data', {\\n      startPts: this.startPts_,\\n      endPts: pts,\\n      text: content,\\n      stream: this.name_\\n    });\\n  }\\n};\\n\\n/**\\n * Zero out the data, used for startup and on seek\\n */\\nCea608Stream.prototype.reset = function() {\\n  this.mode_ = 'popOn';\\n  // When in roll-up mode, the index of the last row that will\\n  // actually display captions. If a caption is shifted to a row\\n  // with a lower index than this, it is cleared from the display\\n  // buffer\\n  this.topRow_ = 0;\\n  this.startPts_ = 0;\\n  this.displayed_ = createDisplayBuffer();\\n  this.nonDisplayed_ = createDisplayBuffer();\\n  this.lastControlCode_ = null;\\n\\n  // Track row and column for proper line-breaking and spacing\\n  this.column_ = 0;\\n  this.row_ = BOTTOM_ROW;\\n  this.rollUpRows_ = 2;\\n\\n  // This variable holds currently-applied formatting\\n  this.formatting_ = [];\\n};\\n\\n/**\\n * Sets up control code and related constants for this instance\\n */\\nCea608Stream.prototype.setConstants = function() {\\n  // The following attributes have these uses:\\n  // ext_ :    char0 for mid-row codes, and the base for extended\\n  //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\\n  //           extended codes)\\n  // control_: char0 for control codes, except byte-shifted to the\\n  //           left so that we can do this.control_ | CONTROL_CODE\\n  // offset_:  char0 for tab offset codes\\n  //\\n  // It's also worth noting that control codes, and _only_ control codes,\\n  // differ between field 1 and field2. Field 2 control codes are always\\n  // their field 1 value plus 1. That's why there's the \\\"| field\\\" on the\\n  // control value.\\n  if (this.dataChannel_ === 0) {\\n    this.BASE_     = 0x10;\\n    this.EXT_      = 0x11;\\n    this.CONTROL_  = (0x14 | this.field_) << 8;\\n    this.OFFSET_   = 0x17;\\n  } else if (this.dataChannel_ === 1) {\\n    this.BASE_     = 0x18;\\n    this.EXT_      = 0x19;\\n    this.CONTROL_  = (0x1c | this.field_) << 8;\\n    this.OFFSET_   = 0x1f;\\n  }\\n\\n  // Constants for the LSByte command codes recognized by Cea608Stream. This\\n  // list is not exhaustive. For a more comprehensive listing and semantics see\\n  // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\\n  // Padding\\n  this.PADDING_                    = 0x0000;\\n  // Pop-on Mode\\n  this.RESUME_CAPTION_LOADING_     = this.CONTROL_ | 0x20;\\n  this.END_OF_CAPTION_             = this.CONTROL_ | 0x2f;\\n  // Roll-up Mode\\n  this.ROLL_UP_2_ROWS_             = this.CONTROL_ | 0x25;\\n  this.ROLL_UP_3_ROWS_             = this.CONTROL_ | 0x26;\\n  this.ROLL_UP_4_ROWS_             = this.CONTROL_ | 0x27;\\n  this.CARRIAGE_RETURN_            = this.CONTROL_ | 0x2d;\\n  // paint-on mode\\n  this.RESUME_DIRECT_CAPTIONING_   = this.CONTROL_ | 0x29;\\n  // Erasure\\n  this.BACKSPACE_                  = this.CONTROL_ | 0x21;\\n  this.ERASE_DISPLAYED_MEMORY_     = this.CONTROL_ | 0x2c;\\n  this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\\n};\\n\\n/**\\n * Detects if the 2-byte packet data is a special character\\n *\\n * Special characters have a second byte in the range 0x30 to 0x3f,\\n * with the first byte being 0x11 (for data channel 1) or 0x19 (for\\n * data channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are an special character\\n */\\nCea608Stream.prototype.isSpecialCharacter = function(char0, char1) {\\n  return (char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f);\\n};\\n\\n/**\\n * Detects if the 2-byte packet data is an extended character\\n *\\n * Extended characters have a second byte in the range 0x20 to 0x3f,\\n * with the first byte being 0x12 or 0x13 (for data channel 1) or\\n * 0x1a or 0x1b (for data channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are an extended character\\n */\\nCea608Stream.prototype.isExtCharacter = function(char0, char1) {\\n  return ((char0 === (this.EXT_ + 1) || char0 === (this.EXT_ + 2)) &&\\n    (char1 >= 0x20 && char1 <= 0x3f));\\n};\\n\\n/**\\n * Detects if the 2-byte packet is a mid-row code\\n *\\n * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\\n * the first byte being 0x11 (for data channel 1) or 0x19 (for data\\n * channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are a mid-row code\\n */\\nCea608Stream.prototype.isMidRowCode = function(char0, char1) {\\n  return (char0 === this.EXT_ && (char1 >= 0x20 && char1 <= 0x2f));\\n};\\n\\n/**\\n * Detects if the 2-byte packet is an offset control code\\n *\\n * Offset control codes have a second byte in the range 0x21 to 0x23,\\n * with the first byte being 0x17 (for data channel 1) or 0x1f (for\\n * data channel 2).\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are an offset control code\\n */\\nCea608Stream.prototype.isOffsetControlCode = function(char0, char1) {\\n  return (char0 === this.OFFSET_ && (char1 >= 0x21 && char1 <= 0x23));\\n};\\n\\n/**\\n * Detects if the 2-byte packet is a Preamble Address Code\\n *\\n * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\\n * or 0x18 to 0x1f (for data channel 2), with the second byte in the\\n * range 0x40 to 0x7f.\\n *\\n * @param  {Integer} char0 The first byte\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the 2 bytes are a PAC\\n */\\nCea608Stream.prototype.isPAC = function(char0, char1) {\\n  return (char0 >= this.BASE_ && char0 < (this.BASE_ + 8) &&\\n    (char1 >= 0x40 && char1 <= 0x7f));\\n};\\n\\n/**\\n * Detects if a packet's second byte is in the range of a PAC color code\\n *\\n * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\\n * 0x60 to 0x6f.\\n *\\n * @param  {Integer} char1 The second byte\\n * @return {Boolean}       Whether the byte is a color PAC\\n */\\nCea608Stream.prototype.isColorPAC = function(char1) {\\n  return ((char1 >= 0x40 && char1 <= 0x4f) || (char1 >= 0x60 && char1 <= 0x7f));\\n};\\n\\n/**\\n * Detects if a single byte is in the range of a normal character\\n *\\n * Normal text bytes are in the range 0x20 to 0x7f.\\n *\\n * @param  {Integer} char  The byte\\n * @return {Boolean}       Whether the byte is a normal character\\n */\\nCea608Stream.prototype.isNormalChar = function(char) {\\n  return (char >= 0x20 && char <= 0x7f);\\n};\\n\\n/**\\n * Configures roll-up\\n *\\n * @param  {Integer} pts         Current PTS\\n * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\\n *                               a new position\\n */\\nCea608Stream.prototype.setRollUp = function(pts, newBaseRow) {\\n  // Reset the base row to the bottom row when switching modes\\n  if (this.mode_ !== 'rollUp') {\\n    this.row_ = BOTTOM_ROW;\\n    this.mode_ = 'rollUp';\\n    // Spec says to wipe memories when switching to roll-up\\n    this.flushDisplayed(pts);\\n    this.nonDisplayed_ = createDisplayBuffer();\\n    this.displayed_ = createDisplayBuffer();\\n  }\\n\\n  if (newBaseRow !== undefined && newBaseRow !== this.row_) {\\n    // move currently displayed captions (up or down) to the new base row\\n    for (var i = 0; i < this.rollUpRows_; i++) {\\n      this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\\n      this.displayed_[this.row_ - i] = '';\\n    }\\n  }\\n\\n  if (newBaseRow === undefined) {\\n    newBaseRow = this.row_;\\n  }\\n\\n  this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\\n};\\n\\n// Adds the opening HTML tag for the passed character to the caption text,\\n// and keeps track of it for later closing\\nCea608Stream.prototype.addFormatting = function(pts, format) {\\n  this.formatting_ = this.formatting_.concat(format);\\n  var text = format.reduce(function(text, format) {\\n    return text + '<' + format + '>';\\n  }, '');\\n  this[this.mode_](pts, text);\\n};\\n\\n// Adds HTML closing tags for current formatting to caption text and\\n// clears remembered formatting\\nCea608Stream.prototype.clearFormatting = function(pts) {\\n  if (!this.formatting_.length) {\\n    return;\\n  }\\n  var text = this.formatting_.reverse().reduce(function(text, format) {\\n    return text + '</' + format + '>';\\n  }, '');\\n  this.formatting_ = [];\\n  this[this.mode_](pts, text);\\n};\\n\\n// Mode Implementations\\nCea608Stream.prototype.popOn = function(pts, text) {\\n  var baseRow = this.nonDisplayed_[this.row_];\\n\\n  // buffer characters\\n  baseRow += text;\\n  this.nonDisplayed_[this.row_] = baseRow;\\n};\\n\\nCea608Stream.prototype.rollUp = function(pts, text) {\\n  var baseRow = this.displayed_[this.row_];\\n\\n  baseRow += text;\\n  this.displayed_[this.row_] = baseRow;\\n\\n};\\n\\nCea608Stream.prototype.shiftRowsUp_ = function() {\\n  var i;\\n  // clear out inactive rows\\n  for (i = 0; i < this.topRow_; i++) {\\n    this.displayed_[i] = '';\\n  }\\n  for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\\n    this.displayed_[i] = '';\\n  }\\n  // shift displayed rows up\\n  for (i = this.topRow_; i < this.row_; i++) {\\n    this.displayed_[i] = this.displayed_[i + 1];\\n  }\\n  // clear out the bottom row\\n  this.displayed_[this.row_] = '';\\n};\\n\\nCea608Stream.prototype.paintOn = function(pts, text) {\\n  var baseRow = this.displayed_[this.row_];\\n\\n  baseRow += text;\\n  this.displayed_[this.row_] = baseRow;\\n};\\n\\n// exports\\nmodule.exports = {\\n  CaptionStream: CaptionStream,\\n  Cea608Stream: Cea608Stream\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/caption-stream.js?\")},\"../node_modules/mux.js/lib/m2ts/probe.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Utilities to detect basic properties and metadata about TS Segments.\\n */\\n\\n\\nvar StreamTypes = __webpack_require__(/*! ./stream-types.js */ \\\"../node_modules/mux.js/lib/m2ts/stream-types.js\\\");\\n\\nvar parsePid = function(packet) {\\n  var pid = packet[1] & 0x1f;\\n  pid <<= 8;\\n  pid |= packet[2];\\n  return pid;\\n};\\n\\nvar parsePayloadUnitStartIndicator = function(packet) {\\n  return !!(packet[1] & 0x40);\\n};\\n\\nvar parseAdaptionField = function(packet) {\\n  var offset = 0;\\n  // if an adaption field is present, its length is specified by the\\n  // fifth byte of the TS packet header. The adaptation field is\\n  // used to add stuffing to PES packets that don't fill a complete\\n  // TS packet, and to specify some forms of timing and control data\\n  // that we do not currently use.\\n  if (((packet[3] & 0x30) >>> 4) > 0x01) {\\n    offset += packet[4] + 1;\\n  }\\n  return offset;\\n};\\n\\nvar parseType = function(packet, pmtPid) {\\n  var pid = parsePid(packet);\\n  if (pid === 0) {\\n    return 'pat';\\n  } else if (pid === pmtPid) {\\n    return 'pmt';\\n  } else if (pmtPid) {\\n    return 'pes';\\n  }\\n  return null;\\n};\\n\\nvar parsePat = function(packet) {\\n  var pusi = parsePayloadUnitStartIndicator(packet);\\n  var offset = 4 + parseAdaptionField(packet);\\n\\n  if (pusi) {\\n    offset += packet[offset] + 1;\\n  }\\n\\n  return (packet[offset + 10] & 0x1f) << 8 | packet[offset + 11];\\n};\\n\\nvar parsePmt = function(packet) {\\n  var programMapTable = {};\\n  var pusi = parsePayloadUnitStartIndicator(packet);\\n  var payloadOffset = 4 + parseAdaptionField(packet);\\n\\n  if (pusi) {\\n    payloadOffset += packet[payloadOffset] + 1;\\n  }\\n\\n  // PMTs can be sent ahead of the time when they should actually\\n  // take effect. We don't believe this should ever be the case\\n  // for HLS but we'll ignore \\\"forward\\\" PMT declarations if we see\\n  // them. Future PMT declarations have the current_next_indicator\\n  // set to zero.\\n  if (!(packet[payloadOffset + 5] & 0x01)) {\\n    return;\\n  }\\n\\n  var sectionLength, tableEnd, programInfoLength;\\n  // the mapping table ends at the end of the current section\\n  sectionLength = (packet[payloadOffset + 1] & 0x0f) << 8 | packet[payloadOffset + 2];\\n  tableEnd = 3 + sectionLength - 4;\\n\\n  // to determine where the table is, we have to figure out how\\n  // long the program info descriptors are\\n  programInfoLength = (packet[payloadOffset + 10] & 0x0f) << 8 | packet[payloadOffset + 11];\\n\\n  // advance the offset to the first entry in the mapping table\\n  var offset = 12 + programInfoLength;\\n  while (offset < tableEnd) {\\n    var i = payloadOffset + offset;\\n    // add an entry that maps the elementary_pid to the stream_type\\n    programMapTable[(packet[i + 1] & 0x1F) << 8 | packet[i + 2]] = packet[i];\\n\\n    // move to the next table entry\\n    // skip past the elementary stream descriptors, if present\\n    offset += ((packet[i + 3] & 0x0F) << 8 | packet[i + 4]) + 5;\\n  }\\n  return programMapTable;\\n};\\n\\nvar parsePesType = function(packet, programMapTable) {\\n  var pid = parsePid(packet);\\n  var type = programMapTable[pid];\\n  switch (type) {\\n    case StreamTypes.H264_STREAM_TYPE:\\n      return 'video';\\n    case StreamTypes.ADTS_STREAM_TYPE:\\n      return 'audio';\\n    case StreamTypes.METADATA_STREAM_TYPE:\\n      return 'timed-metadata';\\n    default:\\n      return null;\\n  }\\n};\\n\\nvar parsePesTime = function(packet) {\\n  var pusi = parsePayloadUnitStartIndicator(packet);\\n  if (!pusi) {\\n    return null;\\n  }\\n\\n  var offset = 4 + parseAdaptionField(packet);\\n\\n  if (offset >= packet.byteLength) {\\n    // From the H 222.0 MPEG-TS spec\\n    // \\\"For transport stream packets carrying PES packets, stuffing is needed when there\\n    //  is insufficient PES packet data to completely fill the transport stream packet\\n    //  payload bytes. Stuffing is accomplished by defining an adaptation field longer than\\n    //  the sum of the lengths of the data elements in it, so that the payload bytes\\n    //  remaining after the adaptation field exactly accommodates the available PES packet\\n    //  data.\\\"\\n    //\\n    // If the offset is >= the length of the packet, then the packet contains no data\\n    // and instead is just adaption field stuffing bytes\\n    return null;\\n  }\\n\\n  var pes = null;\\n  var ptsDtsFlags;\\n\\n  // PES packets may be annotated with a PTS value, or a PTS value\\n  // and a DTS value. Determine what combination of values is\\n  // available to work with.\\n  ptsDtsFlags = packet[offset + 7];\\n\\n  // PTS and DTS are normally stored as a 33-bit number.  Javascript\\n  // performs all bitwise operations on 32-bit integers but javascript\\n  // supports a much greater range (52-bits) of integer using standard\\n  // mathematical operations.\\n  // We construct a 31-bit value using bitwise operators over the 31\\n  // most significant bits and then multiply by 4 (equal to a left-shift\\n  // of 2) before we add the final 2 least significant bits of the\\n  // timestamp (equal to an OR.)\\n  if (ptsDtsFlags & 0xC0) {\\n    pes = {};\\n    // the PTS and DTS are not written out directly. For information\\n    // on how they are encoded, see\\n    // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\\n    pes.pts = (packet[offset + 9] & 0x0E) << 27 |\\n      (packet[offset + 10] & 0xFF) << 20 |\\n      (packet[offset + 11] & 0xFE) << 12 |\\n      (packet[offset + 12] & 0xFF) <<  5 |\\n      (packet[offset + 13] & 0xFE) >>>  3;\\n    pes.pts *= 4; // Left shift by 2\\n    pes.pts += (packet[offset + 13] & 0x06) >>> 1; // OR by the two LSBs\\n    pes.dts = pes.pts;\\n    if (ptsDtsFlags & 0x40) {\\n      pes.dts = (packet[offset + 14] & 0x0E) << 27 |\\n        (packet[offset + 15] & 0xFF) << 20 |\\n        (packet[offset + 16] & 0xFE) << 12 |\\n        (packet[offset + 17] & 0xFF) << 5 |\\n        (packet[offset + 18] & 0xFE) >>> 3;\\n      pes.dts *= 4; // Left shift by 2\\n      pes.dts += (packet[offset + 18] & 0x06) >>> 1; // OR by the two LSBs\\n    }\\n  }\\n  return pes;\\n};\\n\\nvar parseNalUnitType = function(type) {\\n  switch (type) {\\n    case 0x05:\\n      return 'slice_layer_without_partitioning_rbsp_idr';\\n    case 0x06:\\n      return 'sei_rbsp';\\n    case 0x07:\\n      return 'seq_parameter_set_rbsp';\\n    case 0x08:\\n      return 'pic_parameter_set_rbsp';\\n    case 0x09:\\n      return 'access_unit_delimiter_rbsp';\\n    default:\\n      return null;\\n  }\\n};\\n\\nvar videoPacketContainsKeyFrame = function(packet) {\\n  var offset = 4 + parseAdaptionField(packet);\\n  var frameBuffer = packet.subarray(offset);\\n  var frameI = 0;\\n  var frameSyncPoint = 0;\\n  var foundKeyFrame = false;\\n  var nalType;\\n\\n  // advance the sync point to a NAL start, if necessary\\n  for (; frameSyncPoint < frameBuffer.byteLength - 3; frameSyncPoint++) {\\n    if (frameBuffer[frameSyncPoint + 2] === 1) {\\n      // the sync point is properly aligned\\n      frameI = frameSyncPoint + 5;\\n      break;\\n    }\\n  }\\n\\n  while (frameI < frameBuffer.byteLength) {\\n    // look at the current byte to determine if we've hit the end of\\n    // a NAL unit boundary\\n    switch (frameBuffer[frameI]) {\\n    case 0:\\n      // skip past non-sync sequences\\n      if (frameBuffer[frameI - 1] !== 0) {\\n        frameI += 2;\\n        break;\\n      } else if (frameBuffer[frameI - 2] !== 0) {\\n        frameI++;\\n        break;\\n      }\\n\\n      if (frameSyncPoint + 3 !== frameI - 2) {\\n        nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\\n        if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\\n          foundKeyFrame = true;\\n        }\\n      }\\n\\n      // drop trailing zeroes\\n      do {\\n        frameI++;\\n      } while (frameBuffer[frameI] !== 1 && frameI < frameBuffer.length);\\n      frameSyncPoint = frameI - 2;\\n      frameI += 3;\\n      break;\\n    case 1:\\n      // skip past non-sync sequences\\n      if (frameBuffer[frameI - 1] !== 0 ||\\n          frameBuffer[frameI - 2] !== 0) {\\n        frameI += 3;\\n        break;\\n      }\\n\\n      nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\\n      if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\\n        foundKeyFrame = true;\\n      }\\n      frameSyncPoint = frameI - 2;\\n      frameI += 3;\\n      break;\\n    default:\\n      // the current byte isn't a one or zero, so it cannot be part\\n      // of a sync sequence\\n      frameI += 3;\\n      break;\\n    }\\n  }\\n  frameBuffer = frameBuffer.subarray(frameSyncPoint);\\n  frameI -= frameSyncPoint;\\n  frameSyncPoint = 0;\\n  // parse the final nal\\n  if (frameBuffer && frameBuffer.byteLength > 3) {\\n    nalType = parseNalUnitType(frameBuffer[frameSyncPoint + 3] & 0x1f);\\n    if (nalType === 'slice_layer_without_partitioning_rbsp_idr') {\\n      foundKeyFrame = true;\\n    }\\n  }\\n\\n  return foundKeyFrame;\\n};\\n\\n\\nmodule.exports = {\\n  parseType: parseType,\\n  parsePat: parsePat,\\n  parsePmt: parsePmt,\\n  parsePayloadUnitStartIndicator: parsePayloadUnitStartIndicator,\\n  parsePesType: parsePesType,\\n  parsePesTime: parsePesTime,\\n  videoPacketContainsKeyFrame: videoPacketContainsKeyFrame\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/probe.js?\")},\"../node_modules/mux.js/lib/m2ts/stream-types.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n */\\n\\n\\nmodule.exports = {\\n  H264_STREAM_TYPE: 0x1B,\\n  ADTS_STREAM_TYPE: 0x0F,\\n  METADATA_STREAM_TYPE: 0x15\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/stream-types.js?\")},\"../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Accepts program elementary stream (PES) data events and corrects\\n * decode and presentation time stamps to account for a rollover\\n * of the 33 bit value.\\n */\\n\\n\\n\\nvar Stream = __webpack_require__(/*! ../utils/stream */ \\\"../node_modules/mux.js/lib/utils/stream.js\\\");\\n\\nvar MAX_TS = 8589934592;\\n\\nvar RO_THRESH = 4294967296;\\n\\nvar TYPE_SHARED = 'shared';\\n\\nvar handleRollover = function(value, reference) {\\n  var direction = 1;\\n\\n  if (value > reference) {\\n    // If the current timestamp value is greater than our reference timestamp and we detect a\\n    // timestamp rollover, this means the roll over is happening in the opposite direction.\\n    // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\\n    // point will be set to a small number, e.g. 1. The user then seeks backwards over the\\n    // rollover point. In loading this segment, the timestamp values will be very large,\\n    // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\\n    // the time stamp to be `value - 2^33`.\\n    direction = -1;\\n  }\\n\\n  // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\\n  // cause an incorrect adjustment.\\n  while (Math.abs(reference - value) > RO_THRESH) {\\n    value += (direction * MAX_TS);\\n  }\\n\\n  return value;\\n};\\n\\nvar TimestampRolloverStream = function(type) {\\n  var lastDTS, referenceDTS;\\n\\n  TimestampRolloverStream.prototype.init.call(this);\\n\\n  // The \\\"shared\\\" type is used in cases where a stream will contain muxed\\n  // video and audio. We could use `undefined` here, but having a string\\n  // makes debugging a little clearer.\\n  this.type_ = type || TYPE_SHARED;\\n\\n  this.push = function(data) {\\n\\n    // Any \\\"shared\\\" rollover streams will accept _all_ data. Otherwise,\\n    // streams will only accept data that matches their type.\\n    if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\\n      return;\\n    }\\n\\n    if (referenceDTS === undefined) {\\n      referenceDTS = data.dts;\\n    }\\n\\n    data.dts = handleRollover(data.dts, referenceDTS);\\n    data.pts = handleRollover(data.pts, referenceDTS);\\n\\n    lastDTS = data.dts;\\n\\n    this.trigger('data', data);\\n  };\\n\\n  this.flush = function() {\\n    referenceDTS = lastDTS;\\n    this.trigger('done');\\n  };\\n\\n  this.endTimeline = function() {\\n    this.flush();\\n    this.trigger('endedtimeline');\\n  };\\n\\n  this.discontinuity = function() {\\n    referenceDTS = void 0;\\n    lastDTS = void 0;\\n  };\\n\\n  this.reset = function() {\\n    this.discontinuity();\\n    this.trigger('reset');\\n  };\\n};\\n\\nTimestampRolloverStream.prototype = new Stream();\\n\\nmodule.exports = {\\n  TimestampRolloverStream: TimestampRolloverStream,\\n  handleRollover: handleRollover\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js?\")},\"../node_modules/mux.js/lib/mp4/caption-parser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Reads in-band CEA-708 captions out of FMP4 segments.\\n * @see https://en.wikipedia.org/wiki/CEA-708\\n */\\n\\n\\nvar discardEmulationPreventionBytes = __webpack_require__(/*! ../tools/caption-packet-parser */ \\\"../node_modules/mux.js/lib/tools/caption-packet-parser.js\\\").discardEmulationPreventionBytes;\\nvar CaptionStream = __webpack_require__(/*! ../m2ts/caption-stream */ \\\"../node_modules/mux.js/lib/m2ts/caption-stream.js\\\").CaptionStream;\\nvar probe = __webpack_require__(/*! ./probe */ \\\"../node_modules/mux.js/lib/mp4/probe.js\\\");\\nvar inspect = __webpack_require__(/*! ../tools/mp4-inspector */ \\\"../node_modules/mux.js/lib/tools/mp4-inspector.js\\\");\\n\\n/**\\n  * Maps an offset in the mdat to a sample based on the the size of the samples.\\n  * Assumes that `parseSamples` has been called first.\\n  *\\n  * @param {Number} offset - The offset into the mdat\\n  * @param {Object[]} samples - An array of samples, parsed using `parseSamples`\\n  * @return {?Object} The matching sample, or null if no match was found.\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.8.8\\n **/\\nvar mapToSample = function(offset, samples) {\\n  var approximateOffset = offset;\\n\\n  for (var i = 0; i < samples.length; i++) {\\n    var sample = samples[i];\\n\\n    if (approximateOffset < sample.size) {\\n      return sample;\\n    }\\n\\n    approximateOffset -= sample.size;\\n  }\\n\\n  return null;\\n};\\n\\n/**\\n  * Finds SEI nal units contained in a Media Data Box.\\n  * Assumes that `parseSamples` has been called first.\\n  *\\n  * @param {Uint8Array} avcStream - The bytes of the mdat\\n  * @param {Object[]} samples - The samples parsed out by `parseSamples`\\n  * @param {Number} trackId - The trackId of this video track\\n  * @return {Object[]} seiNals - the parsed SEI NALUs found.\\n  *   The contents of the seiNal should match what is expected by\\n  *   CaptionStream.push (nalUnitType, size, data, escapedRBSP, pts, dts)\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.1.1\\n  * @see Rec. ITU-T H.264, 7.3.2.3.1\\n **/\\nvar findSeiNals = function(avcStream, samples, trackId) {\\n  var\\n    avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\\n    result = [],\\n    seiNal,\\n    i,\\n    length,\\n    lastMatchedSample;\\n\\n  for (i = 0; i + 4 < avcStream.length; i += length) {\\n    length = avcView.getUint32(i);\\n    i += 4;\\n\\n    // Bail if this doesn't appear to be an H264 stream\\n    if (length <= 0) {\\n      continue;\\n    }\\n\\n    switch (avcStream[i] & 0x1F) {\\n    case 0x06:\\n      var data = avcStream.subarray(i + 1, i + 1 + length);\\n      var matchingSample = mapToSample(i, samples);\\n\\n      seiNal = {\\n        nalUnitType: 'sei_rbsp',\\n        size: length,\\n        data: data,\\n        escapedRBSP: discardEmulationPreventionBytes(data),\\n        trackId: trackId\\n      };\\n\\n      if (matchingSample) {\\n        seiNal.pts = matchingSample.pts;\\n        seiNal.dts = matchingSample.dts;\\n        lastMatchedSample = matchingSample;\\n      } else {\\n        // If a matching sample cannot be found, use the last\\n        // sample's values as they should be as close as possible\\n        seiNal.pts = lastMatchedSample.pts;\\n        seiNal.dts = lastMatchedSample.dts;\\n      }\\n\\n      result.push(seiNal);\\n      break;\\n    default:\\n      break;\\n    }\\n  }\\n\\n  return result;\\n};\\n\\n/**\\n  * Parses sample information out of Track Run Boxes and calculates\\n  * the absolute presentation and decode timestamps of each sample.\\n  *\\n  * @param {Array<Uint8Array>} truns - The Trun Run boxes to be parsed\\n  * @param {Number} baseMediaDecodeTime - base media decode time from tfdt\\n      @see ISO-BMFF-12/2015, Section 8.8.12\\n  * @param {Object} tfhd - The parsed Track Fragment Header\\n  *   @see inspect.parseTfhd\\n  * @return {Object[]} the parsed samples\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.8.8\\n **/\\nvar parseSamples = function(truns, baseMediaDecodeTime, tfhd) {\\n  var currentDts = baseMediaDecodeTime;\\n  var defaultSampleDuration = tfhd.defaultSampleDuration || 0;\\n  var defaultSampleSize = tfhd.defaultSampleSize || 0;\\n  var trackId = tfhd.trackId;\\n  var allSamples = [];\\n\\n  truns.forEach(function(trun) {\\n    // Note: We currently do not parse the sample table as well\\n    // as the trun. It's possible some sources will require this.\\n    // moov > trak > mdia > minf > stbl\\n    var trackRun = inspect.parseTrun(trun);\\n    var samples = trackRun.samples;\\n\\n    samples.forEach(function(sample) {\\n      if (sample.duration === undefined) {\\n        sample.duration = defaultSampleDuration;\\n      }\\n      if (sample.size === undefined) {\\n        sample.size = defaultSampleSize;\\n      }\\n      sample.trackId = trackId;\\n      sample.dts = currentDts;\\n      if (sample.compositionTimeOffset === undefined) {\\n        sample.compositionTimeOffset = 0;\\n      }\\n      sample.pts = currentDts + sample.compositionTimeOffset;\\n\\n      currentDts += sample.duration;\\n    });\\n\\n    allSamples = allSamples.concat(samples);\\n  });\\n\\n  return allSamples;\\n};\\n\\n/**\\n  * Parses out caption nals from an FMP4 segment's video tracks.\\n  *\\n  * @param {Uint8Array} segment - The bytes of a single segment\\n  * @param {Number} videoTrackId - The trackId of a video track in the segment\\n  * @return {Object.<Number, Object[]>} A mapping of video trackId to\\n  *   a list of seiNals found in that track\\n **/\\nvar parseCaptionNals = function(segment, videoTrackId) {\\n  // To get the samples\\n  var trafs = probe.findBox(segment, ['moof', 'traf']);\\n  // To get SEI NAL units\\n  var mdats = probe.findBox(segment, ['mdat']);\\n  var captionNals = {};\\n  var mdatTrafPairs = [];\\n\\n  // Pair up each traf with a mdat as moofs and mdats are in pairs\\n  mdats.forEach(function(mdat, index) {\\n    var matchingTraf = trafs[index];\\n    mdatTrafPairs.push({\\n      mdat: mdat,\\n      traf: matchingTraf\\n    });\\n  });\\n\\n  mdatTrafPairs.forEach(function(pair) {\\n    var mdat = pair.mdat;\\n    var traf = pair.traf;\\n    var tfhd = probe.findBox(traf, ['tfhd']);\\n    // Exactly 1 tfhd per traf\\n    var headerInfo = inspect.parseTfhd(tfhd[0]);\\n    var trackId = headerInfo.trackId;\\n    var tfdt = probe.findBox(traf, ['tfdt']);\\n    // Either 0 or 1 tfdt per traf\\n    var baseMediaDecodeTime = (tfdt.length > 0) ? inspect.parseTfdt(tfdt[0]).baseMediaDecodeTime : 0;\\n    var truns = probe.findBox(traf, ['trun']);\\n    var samples;\\n    var seiNals;\\n\\n    // Only parse video data for the chosen video track\\n    if (videoTrackId === trackId && truns.length > 0) {\\n      samples = parseSamples(truns, baseMediaDecodeTime, headerInfo);\\n\\n      seiNals = findSeiNals(mdat, samples, trackId);\\n\\n      if (!captionNals[trackId]) {\\n        captionNals[trackId] = [];\\n      }\\n\\n      captionNals[trackId] = captionNals[trackId].concat(seiNals);\\n    }\\n  });\\n\\n  return captionNals;\\n};\\n\\n/**\\n  * Parses out inband captions from an MP4 container and returns\\n  * caption objects that can be used by WebVTT and the TextTrack API.\\n  * @see https://developer.mozilla.org/en-US/docs/Web/API/VTTCue\\n  * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack\\n  * Assumes that `probe.getVideoTrackIds` and `probe.timescale` have been called first\\n  *\\n  * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\\n  * @param {Number} trackId - The id of the video track to parse\\n  * @param {Number} timescale - The timescale for the video track from the init segment\\n  *\\n  * @return {?Object[]} parsedCaptions - A list of captions or null if no video tracks\\n  * @return {Number} parsedCaptions[].startTime - The time to show the caption in seconds\\n  * @return {Number} parsedCaptions[].endTime - The time to stop showing the caption in seconds\\n  * @return {String} parsedCaptions[].text - The visible content of the caption\\n **/\\nvar parseEmbeddedCaptions = function(segment, trackId, timescale) {\\n  var seiNals;\\n\\n  // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\\n  if (trackId === null) {\\n    return null;\\n  }\\n\\n  seiNals = parseCaptionNals(segment, trackId);\\n\\n  return {\\n    seiNals: seiNals[trackId],\\n    timescale: timescale\\n  };\\n};\\n\\n/**\\n  * Converts SEI NALUs into captions that can be used by video.js\\n **/\\nvar CaptionParser = function() {\\n  var isInitialized = false;\\n  var captionStream;\\n\\n  // Stores segments seen before trackId and timescale are set\\n  var segmentCache;\\n  // Stores video track ID of the track being parsed\\n  var trackId;\\n  // Stores the timescale of the track being parsed\\n  var timescale;\\n  // Stores captions parsed so far\\n  var parsedCaptions;\\n  // Stores whether we are receiving partial data or not\\n  var parsingPartial;\\n\\n  /**\\n    * A method to indicate whether a CaptionParser has been initalized\\n    * @returns {Boolean}\\n   **/\\n  this.isInitialized = function() {\\n    return isInitialized;\\n  };\\n\\n  /**\\n    * Initializes the underlying CaptionStream, SEI NAL parsing\\n    * and management, and caption collection\\n   **/\\n  this.init = function(options) {\\n    captionStream = new CaptionStream();\\n    isInitialized = true;\\n    parsingPartial = options ? options.isPartial : false;\\n\\n    // Collect dispatched captions\\n    captionStream.on('data', function(event) {\\n      // Convert to seconds in the source's timescale\\n      event.startTime = event.startPts / timescale;\\n      event.endTime = event.endPts / timescale;\\n\\n      parsedCaptions.captions.push(event);\\n      parsedCaptions.captionStreams[event.stream] = true;\\n    });\\n  };\\n\\n  /**\\n    * Determines if a new video track will be selected\\n    * or if the timescale changed\\n    * @return {Boolean}\\n   **/\\n  this.isNewInit = function(videoTrackIds, timescales) {\\n    if ((videoTrackIds && videoTrackIds.length === 0) ||\\n        (timescales && typeof timescales === 'object' &&\\n          Object.keys(timescales).length === 0)) {\\n      return false;\\n    }\\n\\n    return trackId !== videoTrackIds[0] ||\\n      timescale !== timescales[trackId];\\n  };\\n\\n  /**\\n    * Parses out SEI captions and interacts with underlying\\n    * CaptionStream to return dispatched captions\\n    *\\n    * @param {Uint8Array} segment - The fmp4 segment containing embedded captions\\n    * @param {Number[]} videoTrackIds - A list of video tracks found in the init segment\\n    * @param {Object.<Number, Number>} timescales - The timescales found in the init segment\\n    * @see parseEmbeddedCaptions\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.parse = function(segment, videoTrackIds, timescales) {\\n    var parsedData;\\n\\n    if (!this.isInitialized()) {\\n      return null;\\n\\n    // This is not likely to be a video segment\\n    } else if (!videoTrackIds || !timescales) {\\n      return null;\\n\\n    } else if (this.isNewInit(videoTrackIds, timescales)) {\\n      // Use the first video track only as there is no\\n      // mechanism to switch to other video tracks\\n      trackId = videoTrackIds[0];\\n      timescale = timescales[trackId];\\n\\n    // If an init segment has not been seen yet, hold onto segment\\n    // data until we have one.\\n    // the ISO-BMFF spec says that trackId can't be zero, but there's some broken content out there\\n    } else if (trackId === null || !timescale) {\\n      segmentCache.push(segment);\\n      return null;\\n    }\\n\\n    // Now that a timescale and trackId is set, parse cached segments\\n    while (segmentCache.length > 0) {\\n      var cachedSegment = segmentCache.shift();\\n\\n      this.parse(cachedSegment, videoTrackIds, timescales);\\n    }\\n\\n    parsedData = parseEmbeddedCaptions(segment, trackId, timescale);\\n\\n    if (parsedData === null || !parsedData.seiNals) {\\n      return null;\\n    }\\n\\n    this.pushNals(parsedData.seiNals);\\n    // Force the parsed captions to be dispatched\\n    this.flushStream();\\n\\n    return parsedCaptions;\\n  };\\n\\n  /**\\n    * Pushes SEI NALUs onto CaptionStream\\n    * @param {Object[]} nals - A list of SEI nals parsed using `parseCaptionNals`\\n    * Assumes that `parseCaptionNals` has been called first\\n    * @see m2ts/caption-stream.js\\n    **/\\n  this.pushNals = function(nals) {\\n    if (!this.isInitialized() || !nals || nals.length === 0) {\\n      return null;\\n    }\\n\\n    nals.forEach(function(nal) {\\n      captionStream.push(nal);\\n    });\\n  };\\n\\n  /**\\n    * Flushes underlying CaptionStream to dispatch processed, displayable captions\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.flushStream = function() {\\n    if (!this.isInitialized()) {\\n      return null;\\n    }\\n\\n    if (!parsingPartial) {\\n      captionStream.flush();\\n    } else {\\n      captionStream.partialFlush();\\n    }\\n  };\\n\\n  /**\\n    * Reset caption buckets for new data\\n   **/\\n  this.clearParsedCaptions = function() {\\n    parsedCaptions.captions = [];\\n    parsedCaptions.captionStreams = {};\\n  };\\n\\n  /**\\n    * Resets underlying CaptionStream\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.resetCaptionStream = function() {\\n    if (!this.isInitialized()) {\\n      return null;\\n    }\\n\\n    captionStream.reset();\\n  };\\n\\n  /**\\n    * Convenience method to clear all captions flushed from the\\n    * CaptionStream and still being parsed\\n    * @see m2ts/caption-stream.js\\n   **/\\n  this.clearAllCaptions = function() {\\n    this.clearParsedCaptions();\\n    this.resetCaptionStream();\\n  };\\n\\n  /**\\n    * Reset caption parser\\n   **/\\n  this.reset = function() {\\n    segmentCache = [];\\n    trackId = null;\\n    timescale = null;\\n\\n    if (!parsedCaptions) {\\n      parsedCaptions = {\\n        captions: [],\\n        // CC1, CC2, CC3, CC4\\n        captionStreams: {}\\n      };\\n    } else {\\n      this.clearParsedCaptions();\\n    }\\n\\n    this.resetCaptionStream();\\n  };\\n\\n  this.reset();\\n};\\n\\nmodule.exports = CaptionParser;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/mp4/caption-parser.js?\")},\"../node_modules/mux.js/lib/mp4/probe.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Utilities to detect basic properties and metadata about MP4s.\\n */\\n\\n\\nvar toUnsigned = __webpack_require__(/*! ../utils/bin */ \\\"../node_modules/mux.js/lib/utils/bin.js\\\").toUnsigned;\\nvar toHexString = __webpack_require__(/*! ../utils/bin */ \\\"../node_modules/mux.js/lib/utils/bin.js\\\").toHexString;\\nvar mp4Inspector = __webpack_require__(/*! ../tools/mp4-inspector.js */ \\\"../node_modules/mux.js/lib/tools/mp4-inspector.js\\\");\\nvar timescale, startTime, compositionStartTime, getVideoTrackIds, getTracks;\\n\\n/**\\n * Parses an MP4 initialization segment and extracts the timescale\\n * values for any declared tracks. Timescale values indicate the\\n * number of clock ticks per second to assume for time-based values\\n * elsewhere in the MP4.\\n *\\n * To determine the start time of an MP4, you need two pieces of\\n * information: the timescale unit and the earliest base media decode\\n * time. Multiple timescales can be specified within an MP4 but the\\n * base media decode time is always expressed in the timescale from\\n * the media header box for the track:\\n * ```\\n * moov > trak > mdia > mdhd.timescale\\n * ```\\n * @param init {Uint8Array} the bytes of the init segment\\n * @return {object} a hash of track ids to timescale values or null if\\n * the init segment is malformed.\\n */\\ntimescale = function(init) {\\n  var\\n    result = {},\\n    traks = mp4Inspector.findBox(init, ['moov', 'trak']);\\n\\n  // mdhd timescale\\n  return traks.reduce(function(result, trak) {\\n    var tkhd, version, index, id, mdhd;\\n\\n    tkhd = mp4Inspector.findBox(trak, ['tkhd'])[0];\\n    if (!tkhd) {\\n      return null;\\n    }\\n    version = tkhd[0];\\n    index = version === 0 ? 12 : 20;\\n    id = toUnsigned(tkhd[index]     << 24 |\\n                    tkhd[index + 1] << 16 |\\n                    tkhd[index + 2] <<  8 |\\n                    tkhd[index + 3]);\\n\\n    mdhd = mp4Inspector.findBox(trak, ['mdia', 'mdhd'])[0];\\n    if (!mdhd) {\\n      return null;\\n    }\\n    version = mdhd[0];\\n    index = version === 0 ? 12 : 20;\\n    result[id] = toUnsigned(mdhd[index]     << 24 |\\n                            mdhd[index + 1] << 16 |\\n                            mdhd[index + 2] <<  8 |\\n                            mdhd[index + 3]);\\n    return result;\\n  }, result);\\n};\\n\\n/**\\n * Determine the base media decode start time, in seconds, for an MP4\\n * fragment. If multiple fragments are specified, the earliest time is\\n * returned.\\n *\\n * The base media decode time can be parsed from track fragment\\n * metadata:\\n * ```\\n * moof > traf > tfdt.baseMediaDecodeTime\\n * ```\\n * It requires the timescale value from the mdhd to interpret.\\n *\\n * @param timescale {object} a hash of track ids to timescale values.\\n * @return {number} the earliest base media decode start time for the\\n * fragment, in seconds\\n */\\nstartTime = function(timescale, fragment) {\\n  var trafs, baseTimes, result;\\n\\n  // we need info from two childrend of each track fragment box\\n  trafs = mp4Inspector.findBox(fragment, ['moof', 'traf']);\\n\\n  // determine the start times for each track\\n  baseTimes = [].concat.apply([], trafs.map(function(traf) {\\n    return mp4Inspector.findBox(traf, ['tfhd']).map(function(tfhd) {\\n      var id, scale, baseTime;\\n\\n      // get the track id from the tfhd\\n      id = toUnsigned(tfhd[4] << 24 |\\n                      tfhd[5] << 16 |\\n                      tfhd[6] <<  8 |\\n                      tfhd[7]);\\n      // assume a 90kHz clock if no timescale was specified\\n      scale = timescale[id] || 90e3;\\n\\n      // get the base media decode time from the tfdt\\n      baseTime = mp4Inspector.findBox(traf, ['tfdt']).map(function(tfdt) {\\n        var version, result;\\n\\n        version = tfdt[0];\\n        result = toUnsigned(tfdt[4] << 24 |\\n                            tfdt[5] << 16 |\\n                            tfdt[6] <<  8 |\\n                            tfdt[7]);\\n        if (version ===  1) {\\n          result *= Math.pow(2, 32);\\n          result += toUnsigned(tfdt[8]  << 24 |\\n                               tfdt[9]  << 16 |\\n                               tfdt[10] <<  8 |\\n                               tfdt[11]);\\n        }\\n        return result;\\n      })[0];\\n      baseTime = baseTime || Infinity;\\n\\n      // convert base time to seconds\\n      return baseTime / scale;\\n    });\\n  }));\\n\\n  // return the minimum\\n  result = Math.min.apply(null, baseTimes);\\n  return isFinite(result) ? result : 0;\\n};\\n\\n/**\\n * Determine the composition start, in seconds, for an MP4\\n * fragment.\\n *\\n * The composition start time of a fragment can be calculated using the base\\n * media decode time, composition time offset, and timescale, as follows:\\n *\\n * compositionStartTime = (baseMediaDecodeTime + compositionTimeOffset) / timescale\\n *\\n * All of the aforementioned information is contained within a media fragment's\\n * `traf` box, except for timescale info, which comes from the initialization\\n * segment, so a track id (also contained within a `traf`) is also necessary to\\n * associate it with a timescale\\n *\\n *\\n * @param timescales {object} - a hash of track ids to timescale values.\\n * @param fragment {Unit8Array} - the bytes of a media segment\\n * @return {number} the composition start time for the fragment, in seconds\\n **/\\ncompositionStartTime = function(timescales, fragment) {\\n  var trafBoxes = mp4Inspector.findBox(fragment, ['moof', 'traf']);\\n  var baseMediaDecodeTime = 0;\\n  var compositionTimeOffset = 0;\\n  var trackId;\\n\\n  if (trafBoxes && trafBoxes.length) {\\n    // The spec states that track run samples contained within a `traf` box are contiguous, but\\n    // it does not explicitly state whether the `traf` boxes themselves are contiguous.\\n    // We will assume that they are, so we only need the first to calculate start time.\\n    var parsedTraf = mp4Inspector.parseTraf(trafBoxes[0]);\\n\\n    for (var i = 0; i < parsedTraf.boxes.length; i++) {\\n      if (parsedTraf.boxes[i].type === 'tfhd') {\\n        trackId = parsedTraf.boxes[i].trackId;\\n      } else if (parsedTraf.boxes[i].type === 'tfdt') {\\n        baseMediaDecodeTime = parsedTraf.boxes[i].baseMediaDecodeTime;\\n      } else if (parsedTraf.boxes[i].type === 'trun' && parsedTraf.boxes[i].samples.length) {\\n        compositionTimeOffset = parsedTraf.boxes[i].samples[0].compositionTimeOffset || 0;\\n      }\\n    }\\n  }\\n\\n  // Get timescale for this specific track. Assume a 90kHz clock if no timescale was\\n  // specified.\\n  var timescale = timescales[trackId] || 90e3;\\n\\n  // return the composition start time, in seconds\\n  return (baseMediaDecodeTime + compositionTimeOffset) / timescale;\\n};\\n\\n/**\\n  * Find the trackIds of the video tracks in this source.\\n  * Found by parsing the Handler Reference and Track Header Boxes:\\n  *   moov > trak > mdia > hdlr\\n  *   moov > trak > tkhd\\n  *\\n  * @param {Uint8Array} init - The bytes of the init segment for this source\\n  * @return {Number[]} A list of trackIds\\n  *\\n  * @see ISO-BMFF-12/2015, Section 8.4.3\\n **/\\ngetVideoTrackIds = function(init) {\\n  var traks = mp4Inspector.findBox(init, ['moov', 'trak']);\\n  var videoTrackIds = [];\\n\\n  traks.forEach(function(trak) {\\n    var hdlrs = mp4Inspector.findBox(trak, ['mdia', 'hdlr']);\\n    var tkhds = mp4Inspector.findBox(trak, ['tkhd']);\\n\\n    hdlrs.forEach(function(hdlr, index) {\\n      var handlerType = mp4Inspector.parseType(hdlr.subarray(8, 12));\\n      var tkhd = tkhds[index];\\n      var view;\\n      var version;\\n      var trackId;\\n\\n      if (handlerType === 'vide') {\\n        view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\\n        version = view.getUint8(0);\\n        trackId = (version === 0) ? view.getUint32(12) : view.getUint32(20);\\n\\n        videoTrackIds.push(trackId);\\n      }\\n    });\\n  });\\n\\n  return videoTrackIds;\\n};\\n\\n/**\\n * Get all the video, audio, and hint tracks from a non fragmented\\n * mp4 segment\\n */\\ngetTracks = function(init) {\\n  var traks = mp4Inspector.findBox(init, ['moov', 'trak']);\\n  var tracks = [];\\n\\n  traks.forEach(function(trak) {\\n    var track = {};\\n    var tkhd = mp4Inspector.findBox(trak, ['tkhd'])[0];\\n    var view, version;\\n\\n    // id\\n    if (tkhd) {\\n      view = new DataView(tkhd.buffer, tkhd.byteOffset, tkhd.byteLength);\\n      version = view.getUint8(0);\\n\\n      track.id = (version === 0) ? view.getUint32(12) : view.getUint32(20);\\n    }\\n\\n    var hdlr = mp4Inspector.findBox(trak, ['mdia', 'hdlr'])[0];\\n\\n    // type\\n    if (hdlr) {\\n      var type = mp4Inspector.parseType(hdlr.subarray(8, 12));\\n\\n      if (type === 'vide') {\\n        track.type = 'video';\\n      } else if (type === 'soun') {\\n        track.type = 'audio';\\n      } else {\\n        track.type = type;\\n      }\\n    }\\n\\n\\n    // codec\\n    var stsd = mp4Inspector.findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];\\n\\n    if (stsd) {\\n      var sampleDescriptions = stsd.subarray(8);\\n      // gives the codec type string\\n      track.codec = mp4Inspector.parseType(sampleDescriptions.subarray(4, 8));\\n\\n      var codecBox = mp4Inspector.findBox(sampleDescriptions, [track.codec])[0];\\n      var codecConfig, codecConfigType;\\n\\n      if (codecBox) {\\n        // https://tools.ietf.org/html/rfc6381#section-3.3\\n        if ((/^[a-z]vc[1-9]$/i).test(track.codec)) {\\n          // we don't need anything but the \\\"config\\\" parameter of the\\n          // avc1 codecBox\\n          codecConfig = codecBox.subarray(78);\\n          codecConfigType = mp4Inspector.parseType(codecConfig.subarray(4, 8));\\n\\n          if (codecConfigType === 'avcC' && codecConfig.length > 11) {\\n            track.codec += '.';\\n\\n            // left padded with zeroes for single digit hex\\n            // profile idc\\n            track.codec +=  toHexString(codecConfig[9]);\\n            // the byte containing the constraint_set flags\\n            track.codec += toHexString(codecConfig[10]);\\n            // level idc\\n            track.codec += toHexString(codecConfig[11]);\\n          } else {\\n            // TODO: show a warning that we couldn't parse the codec\\n            // and are using the default\\n            track.codec = 'avc1.4d400d';\\n          }\\n        } else if ((/^mp4[a,v]$/i).test(track.codec)) {\\n          // we do not need anything but the streamDescriptor of the mp4a codecBox\\n          codecConfig = codecBox.subarray(28);\\n          codecConfigType = mp4Inspector.parseType(codecConfig.subarray(4, 8));\\n\\n          if (codecConfigType === 'esds' && codecConfig.length > 20 && codecConfig[19] !== 0) {\\n            track.codec += '.' + toHexString(codecConfig[19]);\\n            // this value is only a single digit\\n            track.codec += '.' + toHexString((codecConfig[20] >>> 2) & 0x3f).replace(/^0/, '');\\n          } else {\\n            // TODO: show a warning that we couldn't parse the codec\\n            // and are using the default\\n            track.codec = 'mp4a.40.2';\\n          }\\n        } else {\\n          // TODO: show a warning? for unknown codec type\\n        }\\n      }\\n    }\\n\\n    var mdhd = mp4Inspector.findBox(trak, ['mdia', 'mdhd'])[0];\\n\\n    if (mdhd && tkhd) {\\n      var index = version === 0 ? 12 : 20;\\n\\n      track.timescale = toUnsigned(mdhd[index]     << 24 |\\n                                   mdhd[index + 1] << 16 |\\n                                   mdhd[index + 2] <<  8 |\\n                                   mdhd[index + 3]);\\n    }\\n\\n    tracks.push(track);\\n  });\\n\\n  return tracks;\\n};\\n\\nmodule.exports = {\\n  // export mp4 inspector's findBox and parseType for backwards compatibility\\n  findBox: mp4Inspector.findBox,\\n  parseType: mp4Inspector.parseType,\\n  timescale: timescale,\\n  startTime: startTime,\\n  compositionStartTime: compositionStartTime,\\n  videoTrackIds: getVideoTrackIds,\\n  tracks: getTracks\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/mp4/probe.js?\")},\"../node_modules/mux.js/lib/tools/caption-packet-parser.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Reads in-band caption information from a video elementary\\n * stream. Captions must follow the CEA-708 standard for injection\\n * into an MPEG-2 transport streams.\\n * @see https://en.wikipedia.org/wiki/CEA-708\\n * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\\n */\\n\\n\\n\\n// Supplemental enhancement information (SEI) NAL units have a\\n// payload type field to indicate how they are to be\\n// interpreted. CEAS-708 caption content is always transmitted with\\n// payload type 0x04.\\nvar USER_DATA_REGISTERED_ITU_T_T35 = 4,\\n    RBSP_TRAILING_BITS = 128;\\n\\n/**\\n  * Parse a supplemental enhancement information (SEI) NAL unit.\\n  * Stops parsing once a message of type ITU T T35 has been found.\\n  *\\n  * @param bytes {Uint8Array} the bytes of a SEI NAL unit\\n  * @return {object} the parsed SEI payload\\n  * @see Rec. ITU-T H.264, 7.3.2.3.1\\n  */\\nvar parseSei = function(bytes) {\\n  var\\n    i = 0,\\n    result = {\\n      payloadType: -1,\\n      payloadSize: 0\\n    },\\n    payloadType = 0,\\n    payloadSize = 0;\\n\\n  // go through the sei_rbsp parsing each each individual sei_message\\n  while (i < bytes.byteLength) {\\n    // stop once we have hit the end of the sei_rbsp\\n    if (bytes[i] === RBSP_TRAILING_BITS) {\\n      break;\\n    }\\n\\n    // Parse payload type\\n    while (bytes[i] === 0xFF) {\\n      payloadType += 255;\\n      i++;\\n    }\\n    payloadType += bytes[i++];\\n\\n    // Parse payload size\\n    while (bytes[i] === 0xFF) {\\n      payloadSize += 255;\\n      i++;\\n    }\\n    payloadSize += bytes[i++];\\n\\n    // this sei_message is a 608/708 caption so save it and break\\n    // there can only ever be one caption message in a frame's sei\\n    if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\\n      result.payloadType = payloadType;\\n      result.payloadSize = payloadSize;\\n      result.payload = bytes.subarray(i, i + payloadSize);\\n      break;\\n    }\\n\\n    // skip the payload and parse the next message\\n    i += payloadSize;\\n    payloadType = 0;\\n    payloadSize = 0;\\n  }\\n\\n  return result;\\n};\\n\\n// see ANSI/SCTE 128-1 (2013), section 8.1\\nvar parseUserData = function(sei) {\\n  // itu_t_t35_contry_code must be 181 (United States) for\\n  // captions\\n  if (sei.payload[0] !== 181) {\\n    return null;\\n  }\\n\\n  // itu_t_t35_provider_code should be 49 (ATSC) for captions\\n  if (((sei.payload[1] << 8) | sei.payload[2]) !== 49) {\\n    return null;\\n  }\\n\\n  // the user_identifier should be \\\"GA94\\\" to indicate ATSC1 data\\n  if (String.fromCharCode(sei.payload[3],\\n                          sei.payload[4],\\n                          sei.payload[5],\\n                          sei.payload[6]) !== 'GA94') {\\n    return null;\\n  }\\n\\n  // finally, user_data_type_code should be 0x03 for caption data\\n  if (sei.payload[7] !== 0x03) {\\n    return null;\\n  }\\n\\n  // return the user_data_type_structure and strip the trailing\\n  // marker bits\\n  return sei.payload.subarray(8, sei.payload.length - 1);\\n};\\n\\n// see CEA-708-D, section 4.4\\nvar parseCaptionPackets = function(pts, userData) {\\n  var results = [], i, count, offset, data;\\n\\n  // if this is just filler, return immediately\\n  if (!(userData[0] & 0x40)) {\\n    return results;\\n  }\\n\\n  // parse out the cc_data_1 and cc_data_2 fields\\n  count = userData[0] & 0x1f;\\n  for (i = 0; i < count; i++) {\\n    offset = i * 3;\\n    data = {\\n      type: userData[offset + 2] & 0x03,\\n      pts: pts\\n    };\\n\\n    // capture cc data when cc_valid is 1\\n    if (userData[offset + 2] & 0x04) {\\n      data.ccData = (userData[offset + 3] << 8) | userData[offset + 4];\\n      results.push(data);\\n    }\\n  }\\n  return results;\\n};\\n\\nvar discardEmulationPreventionBytes = function(data) {\\n    var\\n      length = data.byteLength,\\n      emulationPreventionBytesPositions = [],\\n      i = 1,\\n      newLength, newData;\\n\\n    // Find all `Emulation Prevention Bytes`\\n    while (i < length - 2) {\\n      if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\\n        emulationPreventionBytesPositions.push(i + 2);\\n        i += 2;\\n      } else {\\n        i++;\\n      }\\n    }\\n\\n    // If no Emulation Prevention Bytes were found just return the original\\n    // array\\n    if (emulationPreventionBytesPositions.length === 0) {\\n      return data;\\n    }\\n\\n    // Create a new array to hold the NAL unit data\\n    newLength = length - emulationPreventionBytesPositions.length;\\n    newData = new Uint8Array(newLength);\\n    var sourceIndex = 0;\\n\\n    for (i = 0; i < newLength; sourceIndex++, i++) {\\n      if (sourceIndex === emulationPreventionBytesPositions[0]) {\\n        // Skip this byte\\n        sourceIndex++;\\n        // Remove this position index\\n        emulationPreventionBytesPositions.shift();\\n      }\\n      newData[i] = data[sourceIndex];\\n    }\\n\\n    return newData;\\n};\\n\\n// exports\\nmodule.exports = {\\n  parseSei: parseSei,\\n  parseUserData: parseUserData,\\n  parseCaptionPackets: parseCaptionPackets,\\n  discardEmulationPreventionBytes: discardEmulationPreventionBytes,\\n  USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/tools/caption-packet-parser.js?\")},\"../node_modules/mux.js/lib/tools/mp4-inspector.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Parse the internal MP4 structure into an equivalent javascript\\n * object.\\n */\\n\\n\\nvar\\n  inspectMp4,\\n  textifyMp4,\\n  toUnsigned = __webpack_require__(/*! ../utils/bin */ \\\"../node_modules/mux.js/lib/utils/bin.js\\\").toUnsigned,\\n  parseMp4Date = function(seconds) {\\n    return new Date(seconds * 1000 - 2082844800000);\\n  },\\n  parseSampleFlags = function(flags) {\\n    return {\\n      isLeading: (flags[0] & 0x0c) >>> 2,\\n      dependsOn: flags[0] & 0x03,\\n      isDependedOn: (flags[1] & 0xc0) >>> 6,\\n      hasRedundancy: (flags[1] & 0x30) >>> 4,\\n      paddingValue: (flags[1] & 0x0e) >>> 1,\\n      isNonSyncSample: flags[1] & 0x01,\\n      degradationPriority: (flags[2] << 8) | flags[3]\\n    };\\n  },\\n  /**\\n   * Returns the string representation of an ASCII encoded four byte buffer.\\n   * @param buffer {Uint8Array} a four-byte buffer to translate\\n   * @return {string} the corresponding string\\n   */\\n  parseType = function(buffer) {\\n    var result = '';\\n    result += String.fromCharCode(buffer[0]);\\n    result += String.fromCharCode(buffer[1]);\\n    result += String.fromCharCode(buffer[2]);\\n    result += String.fromCharCode(buffer[3]);\\n    return result;\\n  },\\n  // Find the data for a box specified by its path\\n  findBox = function(data, path) {\\n    var results = [],\\n        i, size, type, end, subresults;\\n\\n    if (!path.length) {\\n      // short-circuit the search for empty paths\\n      return null;\\n    }\\n\\n    for (i = 0; i < data.byteLength;) {\\n      size  = toUnsigned(data[i]     << 24 |\\n                         data[i + 1] << 16 |\\n                         data[i + 2] <<  8 |\\n                         data[i + 3]);\\n\\n      type = parseType(data.subarray(i + 4, i + 8));\\n\\n      end = size > 1 ? i + size : data.byteLength;\\n\\n      if (type === path[0]) {\\n        if (path.length === 1) {\\n          // this is the end of the path and we've found the box we were\\n          // looking for\\n          results.push(data.subarray(i + 8, end));\\n        } else {\\n          // recursively search for the next box along the path\\n          subresults = findBox(data.subarray(i + 8, end), path.slice(1));\\n          if (subresults.length) {\\n            results = results.concat(subresults);\\n          }\\n        }\\n      }\\n      i = end;\\n    }\\n\\n    // we've finished searching all of data\\n    return results;\\n  },\\n  nalParse = function(avcStream) {\\n    var\\n      avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\\n      result = [],\\n      i,\\n      length;\\n    for (i = 0; i + 4 < avcStream.length; i += length) {\\n      length = avcView.getUint32(i);\\n      i += 4;\\n\\n      // bail if this doesn't appear to be an H264 stream\\n      if (length <= 0) {\\n        result.push('<span style=\\\\'color:red;\\\\'>MALFORMED DATA</span>');\\n        continue;\\n      }\\n\\n      switch (avcStream[i] & 0x1F) {\\n      case 0x01:\\n        result.push('slice_layer_without_partitioning_rbsp');\\n        break;\\n      case 0x05:\\n        result.push('slice_layer_without_partitioning_rbsp_idr');\\n        break;\\n      case 0x06:\\n        result.push('sei_rbsp');\\n        break;\\n      case 0x07:\\n        result.push('seq_parameter_set_rbsp');\\n        break;\\n      case 0x08:\\n        result.push('pic_parameter_set_rbsp');\\n        break;\\n      case 0x09:\\n        result.push('access_unit_delimiter_rbsp');\\n        break;\\n      default:\\n        result.push('UNKNOWN NAL - ' + avcStream[i] & 0x1F);\\n        break;\\n      }\\n    }\\n    return result;\\n  },\\n\\n  // registry of handlers for individual mp4 box types\\n  parse = {\\n    // codingname, not a first-class box type. stsd entries share the\\n    // same format as real boxes so the parsing infrastructure can be\\n    // shared\\n    avc1: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        dataReferenceIndex: view.getUint16(6),\\n        width: view.getUint16(24),\\n        height: view.getUint16(26),\\n        horizresolution: view.getUint16(28) + (view.getUint16(30) / 16),\\n        vertresolution: view.getUint16(32) + (view.getUint16(34) / 16),\\n        frameCount: view.getUint16(40),\\n        depth: view.getUint16(74),\\n        config: inspectMp4(data.subarray(78, data.byteLength))\\n      };\\n    },\\n    avcC: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          configurationVersion: data[0],\\n          avcProfileIndication: data[1],\\n          profileCompatibility: data[2],\\n          avcLevelIndication: data[3],\\n          lengthSizeMinusOne: data[4] & 0x03,\\n          sps: [],\\n          pps: []\\n        },\\n        numOfSequenceParameterSets = data[5] & 0x1f,\\n        numOfPictureParameterSets,\\n        nalSize,\\n        offset,\\n        i;\\n\\n      // iterate past any SPSs\\n      offset = 6;\\n      for (i = 0; i < numOfSequenceParameterSets; i++) {\\n        nalSize = view.getUint16(offset);\\n        offset += 2;\\n        result.sps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\\n        offset += nalSize;\\n      }\\n      // iterate past any PPSs\\n      numOfPictureParameterSets = data[offset];\\n      offset++;\\n      for (i = 0; i < numOfPictureParameterSets; i++) {\\n        nalSize = view.getUint16(offset);\\n        offset += 2;\\n        result.pps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\\n        offset += nalSize;\\n      }\\n      return result;\\n    },\\n    btrt: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        bufferSizeDB: view.getUint32(0),\\n        maxBitrate: view.getUint32(4),\\n        avgBitrate: view.getUint32(8)\\n      };\\n    },\\n    esds: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        esId: (data[6] << 8) | data[7],\\n        streamPriority: data[8] & 0x1f,\\n        decoderConfig: {\\n          objectProfileIndication: data[11],\\n          streamType: (data[12] >>> 2) & 0x3f,\\n          bufferSize: (data[13] << 16) | (data[14] << 8) | data[15],\\n          maxBitrate: (data[16] << 24) |\\n            (data[17] << 16) |\\n            (data[18] <<  8) |\\n            data[19],\\n          avgBitrate: (data[20] << 24) |\\n            (data[21] << 16) |\\n            (data[22] <<  8) |\\n            data[23],\\n          decoderConfigDescriptor: {\\n            tag: data[24],\\n            length: data[25],\\n            audioObjectType: (data[26] >>> 3) & 0x1f,\\n            samplingFrequencyIndex: ((data[26] & 0x07) << 1) |\\n              ((data[27] >>> 7) & 0x01),\\n            channelConfiguration: (data[27] >>> 3) & 0x0f\\n          }\\n        }\\n      };\\n    },\\n    ftyp: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          majorBrand: parseType(data.subarray(0, 4)),\\n          minorVersion: view.getUint32(4),\\n          compatibleBrands: []\\n        },\\n        i = 8;\\n      while (i < data.byteLength) {\\n        result.compatibleBrands.push(parseType(data.subarray(i, i + 4)));\\n        i += 4;\\n      }\\n      return result;\\n    },\\n    dinf: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    dref: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        dataReferences: inspectMp4(data.subarray(8))\\n      };\\n    },\\n    hdlr: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          handlerType: parseType(data.subarray(8, 12)),\\n          name: ''\\n        },\\n        i = 8;\\n\\n      // parse out the name field\\n      for (i = 24; i < data.byteLength; i++) {\\n        if (data[i] === 0x00) {\\n          // the name field is null-terminated\\n          i++;\\n          break;\\n        }\\n        result.name += String.fromCharCode(data[i]);\\n      }\\n      // decode UTF-8 to javascript's internal representation\\n      // see http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\\n      result.name = decodeURIComponent(escape(result.name));\\n\\n      return result;\\n    },\\n    mdat: function(data) {\\n      return {\\n        byteLength: data.byteLength,\\n        nals: nalParse(data)\\n      };\\n    },\\n    mdhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        i = 4,\\n        language,\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          language: ''\\n        };\\n      if (result.version === 1) {\\n        i += 4;\\n        result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 8;\\n        result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 8;\\n        result.duration = view.getUint32(i); // truncating top 4 bytes\\n      } else {\\n        result.creationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.modificationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 4;\\n        result.duration = view.getUint32(i);\\n      }\\n      i += 4;\\n      // language is stored as an ISO-639-2/T code in an array of three 5-bit fields\\n      // each field is the packed difference between its ASCII value and 0x60\\n      language = view.getUint16(i);\\n      result.language += String.fromCharCode((language >> 10) + 0x60);\\n      result.language += String.fromCharCode(((language & 0x03e0) >> 5) + 0x60);\\n      result.language += String.fromCharCode((language & 0x1f) + 0x60);\\n\\n      return result;\\n    },\\n    mdia: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    mfhd: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        sequenceNumber: (data[4] << 24) |\\n          (data[5] << 16) |\\n          (data[6] << 8) |\\n          (data[7])\\n      };\\n    },\\n    minf: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    // codingname, not a first-class box type. stsd entries share the\\n    // same format as real boxes so the parsing infrastructure can be\\n    // shared\\n    mp4a: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          // 6 bytes reserved\\n          dataReferenceIndex: view.getUint16(6),\\n          // 4 + 4 bytes reserved\\n          channelcount: view.getUint16(16),\\n          samplesize: view.getUint16(18),\\n          // 2 bytes pre_defined\\n          // 2 bytes reserved\\n          samplerate: view.getUint16(24) + (view.getUint16(26) / 65536)\\n        };\\n\\n      // if there are more bytes to process, assume this is an ISO/IEC\\n      // 14496-14 MP4AudioSampleEntry and parse the ESDBox\\n      if (data.byteLength > 28) {\\n        result.streamDescriptor = inspectMp4(data.subarray(28))[0];\\n      }\\n      return result;\\n    },\\n    moof: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    moov: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    mvex: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    mvhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        i = 4,\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4))\\n        };\\n\\n      if (result.version === 1) {\\n        i += 4;\\n        result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 8;\\n        result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 8;\\n        result.duration = view.getUint32(i); // truncating top 4 bytes\\n      } else {\\n        result.creationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.modificationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.timescale = view.getUint32(i);\\n        i += 4;\\n        result.duration = view.getUint32(i);\\n      }\\n      i += 4;\\n\\n      // convert fixed-point, base 16 back to a number\\n      result.rate = view.getUint16(i) + (view.getUint16(i + 2) / 16);\\n      i += 4;\\n      result.volume = view.getUint8(i) + (view.getUint8(i + 1) / 8);\\n      i += 2;\\n      i += 2;\\n      i += 2 * 4;\\n      result.matrix = new Uint32Array(data.subarray(i, i + (9 * 4)));\\n      i += 9 * 4;\\n      i += 6 * 4;\\n      result.nextTrackId = view.getUint32(i);\\n      return result;\\n    },\\n    pdin: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        version: view.getUint8(0),\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        rate: view.getUint32(4),\\n        initialDelay: view.getUint32(8)\\n      };\\n    },\\n    sdtp: function(data) {\\n      var\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          samples: []\\n        }, i;\\n\\n      for (i = 4; i < data.byteLength; i++) {\\n        result.samples.push({\\n          dependsOn: (data[i] & 0x30) >> 4,\\n          isDependedOn: (data[i] & 0x0c) >> 2,\\n          hasRedundancy: data[i] & 0x03\\n        });\\n      }\\n      return result;\\n    },\\n    sidx: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n          result = {\\n            version: data[0],\\n            flags: new Uint8Array(data.subarray(1, 4)),\\n            references: [],\\n            referenceId: view.getUint32(4),\\n            timescale: view.getUint32(8),\\n            earliestPresentationTime: view.getUint32(12),\\n            firstOffset: view.getUint32(16)\\n          },\\n          referenceCount = view.getUint16(22),\\n          i;\\n\\n      for (i = 24; referenceCount; i += 12, referenceCount--) {\\n        result.references.push({\\n          referenceType: (data[i] & 0x80) >>> 7,\\n          referencedSize: view.getUint32(i) & 0x7FFFFFFF,\\n          subsegmentDuration: view.getUint32(i + 4),\\n          startsWithSap: !!(data[i + 8] & 0x80),\\n          sapType: (data[i + 8] & 0x70) >>> 4,\\n          sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\\n        });\\n      }\\n\\n      return result;\\n    },\\n    smhd: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        balance: data[4] + (data[5] / 256)\\n      };\\n    },\\n    stbl: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    stco: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          chunkOffsets: []\\n        },\\n        entryCount = view.getUint32(4),\\n        i;\\n      for (i = 8; entryCount; i += 4, entryCount--) {\\n        result.chunkOffsets.push(view.getUint32(i));\\n      }\\n      return result;\\n    },\\n    stsc: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        entryCount = view.getUint32(4),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          sampleToChunks: []\\n        },\\n        i;\\n      for (i = 8; entryCount; i += 12, entryCount--) {\\n        result.sampleToChunks.push({\\n          firstChunk: view.getUint32(i),\\n          samplesPerChunk: view.getUint32(i + 4),\\n          sampleDescriptionIndex: view.getUint32(i + 8)\\n        });\\n      }\\n      return result;\\n    },\\n    stsd: function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        sampleDescriptions: inspectMp4(data.subarray(8))\\n      };\\n    },\\n    stsz: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          sampleSize: view.getUint32(4),\\n          entries: []\\n        },\\n        i;\\n      for (i = 12; i < data.byteLength; i += 4) {\\n        result.entries.push(view.getUint32(i));\\n      }\\n      return result;\\n    },\\n    stts: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          timeToSamples: []\\n        },\\n        entryCount = view.getUint32(4),\\n        i;\\n\\n      for (i = 8; entryCount; i += 8, entryCount--) {\\n        result.timeToSamples.push({\\n          sampleCount: view.getUint32(i),\\n          sampleDelta: view.getUint32(i + 4)\\n        });\\n      }\\n      return result;\\n    },\\n    styp: function(data) {\\n      return parse.ftyp(data);\\n    },\\n    tfdt: function(data) {\\n      var result = {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        baseMediaDecodeTime: toUnsigned(data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7])\\n      };\\n      if (result.version === 1) {\\n        result.baseMediaDecodeTime *= Math.pow(2, 32);\\n        result.baseMediaDecodeTime += toUnsigned(data[8] << 24 | data[9] << 16 | data[10] << 8 | data[11]);\\n      }\\n      return result;\\n    },\\n    tfhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          trackId: view.getUint32(4)\\n        },\\n        baseDataOffsetPresent = result.flags[2] & 0x01,\\n        sampleDescriptionIndexPresent = result.flags[2] & 0x02,\\n        defaultSampleDurationPresent = result.flags[2] & 0x08,\\n        defaultSampleSizePresent = result.flags[2] & 0x10,\\n        defaultSampleFlagsPresent = result.flags[2] & 0x20,\\n        durationIsEmpty = result.flags[0] & 0x010000,\\n        defaultBaseIsMoof =  result.flags[0] & 0x020000,\\n        i;\\n\\n      i = 8;\\n      if (baseDataOffsetPresent) {\\n        i += 4; // truncate top 4 bytes\\n        // FIXME: should we read the full 64 bits?\\n        result.baseDataOffset = view.getUint32(12);\\n        i += 4;\\n      }\\n      if (sampleDescriptionIndexPresent) {\\n        result.sampleDescriptionIndex = view.getUint32(i);\\n        i += 4;\\n      }\\n      if (defaultSampleDurationPresent) {\\n        result.defaultSampleDuration = view.getUint32(i);\\n        i += 4;\\n      }\\n      if (defaultSampleSizePresent) {\\n        result.defaultSampleSize = view.getUint32(i);\\n        i += 4;\\n      }\\n      if (defaultSampleFlagsPresent) {\\n        result.defaultSampleFlags = view.getUint32(i);\\n      }\\n      if (durationIsEmpty) {\\n        result.durationIsEmpty = true;\\n      }\\n      if (!baseDataOffsetPresent && defaultBaseIsMoof) {\\n        result.baseDataOffsetIsMoof = true;\\n      }\\n      return result;\\n    },\\n    tkhd: function(data) {\\n      var\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        i = 4,\\n        result = {\\n          version: view.getUint8(0),\\n          flags: new Uint8Array(data.subarray(1, 4))\\n        };\\n      if (result.version === 1) {\\n        i += 4;\\n        result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 8;\\n        result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\\n        i += 4;\\n        result.trackId = view.getUint32(i);\\n        i += 4;\\n        i += 8;\\n        result.duration = view.getUint32(i); // truncating top 4 bytes\\n      } else {\\n        result.creationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.modificationTime = parseMp4Date(view.getUint32(i));\\n        i += 4;\\n        result.trackId = view.getUint32(i);\\n        i += 4;\\n        i += 4;\\n        result.duration = view.getUint32(i);\\n      }\\n      i += 4;\\n      i += 2 * 4;\\n      result.layer = view.getUint16(i);\\n      i += 2;\\n      result.alternateGroup = view.getUint16(i);\\n      i += 2;\\n      // convert fixed-point, base 16 back to a number\\n      result.volume = view.getUint8(i) + (view.getUint8(i + 1) / 8);\\n      i += 2;\\n      i += 2;\\n      result.matrix = new Uint32Array(data.subarray(i, i + (9 * 4)));\\n      i += 9 * 4;\\n      result.width = view.getUint16(i) + (view.getUint16(i + 2) / 16);\\n      i += 4;\\n      result.height = view.getUint16(i) + (view.getUint16(i + 2) / 16);\\n      return result;\\n    },\\n    traf: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    trak: function(data) {\\n      return {\\n        boxes: inspectMp4(data)\\n      };\\n    },\\n    trex: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        trackId: view.getUint32(4),\\n        defaultSampleDescriptionIndex: view.getUint32(8),\\n        defaultSampleDuration: view.getUint32(12),\\n        defaultSampleSize: view.getUint32(16),\\n        sampleDependsOn: data[20] & 0x03,\\n        sampleIsDependedOn: (data[21] & 0xc0) >> 6,\\n        sampleHasRedundancy: (data[21] & 0x30) >> 4,\\n        samplePaddingValue: (data[21] & 0x0e) >> 1,\\n        sampleIsDifferenceSample: !!(data[21] & 0x01),\\n        sampleDegradationPriority: view.getUint16(22)\\n      };\\n    },\\n    trun: function(data) {\\n      var\\n        result = {\\n          version: data[0],\\n          flags: new Uint8Array(data.subarray(1, 4)),\\n          samples: []\\n        },\\n        view = new DataView(data.buffer, data.byteOffset, data.byteLength),\\n        // Flag interpretation\\n        dataOffsetPresent = result.flags[2] & 0x01, // compare with 2nd byte of 0x1\\n        firstSampleFlagsPresent = result.flags[2] & 0x04, // compare with 2nd byte of 0x4\\n        sampleDurationPresent = result.flags[1] & 0x01, // compare with 2nd byte of 0x100\\n        sampleSizePresent = result.flags[1] & 0x02, // compare with 2nd byte of 0x200\\n        sampleFlagsPresent = result.flags[1] & 0x04, // compare with 2nd byte of 0x400\\n        sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08, // compare with 2nd byte of 0x800\\n        sampleCount = view.getUint32(4),\\n        offset = 8,\\n        sample;\\n\\n      if (dataOffsetPresent) {\\n        // 32 bit signed integer\\n        result.dataOffset = view.getInt32(offset);\\n        offset += 4;\\n      }\\n\\n      // Overrides the flags for the first sample only. The order of\\n      // optional values will be: duration, size, compositionTimeOffset\\n      if (firstSampleFlagsPresent && sampleCount) {\\n        sample = {\\n          flags: parseSampleFlags(data.subarray(offset, offset + 4))\\n        };\\n        offset += 4;\\n        if (sampleDurationPresent) {\\n          sample.duration = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleSizePresent) {\\n          sample.size = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleCompositionTimeOffsetPresent) {\\n          // Note: this should be a signed int if version is 1\\n          sample.compositionTimeOffset = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        result.samples.push(sample);\\n        sampleCount--;\\n      }\\n\\n      while (sampleCount--) {\\n        sample = {};\\n        if (sampleDurationPresent) {\\n          sample.duration = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleSizePresent) {\\n          sample.size = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        if (sampleFlagsPresent) {\\n          sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\\n          offset += 4;\\n        }\\n        if (sampleCompositionTimeOffsetPresent) {\\n          // Note: this should be a signed int if version is 1\\n          sample.compositionTimeOffset = view.getUint32(offset);\\n          offset += 4;\\n        }\\n        result.samples.push(sample);\\n      }\\n      return result;\\n    },\\n    'url ': function(data) {\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4))\\n      };\\n    },\\n    vmhd: function(data) {\\n      var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\\n      return {\\n        version: data[0],\\n        flags: new Uint8Array(data.subarray(1, 4)),\\n        graphicsmode: view.getUint16(4),\\n        opcolor: new Uint16Array([view.getUint16(6),\\n                                  view.getUint16(8),\\n                                  view.getUint16(10)])\\n      };\\n    }\\n  };\\n\\n\\n/**\\n * Return a javascript array of box objects parsed from an ISO base\\n * media file.\\n * @param data {Uint8Array} the binary data of the media to be inspected\\n * @return {array} a javascript array of potentially nested box objects\\n */\\ninspectMp4 = function(data) {\\n  var\\n    i = 0,\\n    result = [],\\n    view,\\n    size,\\n    type,\\n    end,\\n    box;\\n\\n  // Convert data from Uint8Array to ArrayBuffer, to follow Dataview API\\n  var ab = new ArrayBuffer(data.length);\\n  var v = new Uint8Array(ab);\\n  for (var z = 0; z < data.length; ++z) {\\n      v[z] = data[z];\\n  }\\n  view = new DataView(ab);\\n\\n  while (i < data.byteLength) {\\n    // parse box data\\n    size = view.getUint32(i);\\n    type =  parseType(data.subarray(i + 4, i + 8));\\n    end = size > 1 ? i + size : data.byteLength;\\n\\n    // parse type-specific data\\n    box = (parse[type] || function(data) {\\n      return {\\n        data: data\\n      };\\n    })(data.subarray(i + 8, end));\\n    box.size = size;\\n    box.type = type;\\n\\n    // store this box and move to the next\\n    result.push(box);\\n    i = end;\\n  }\\n  return result;\\n};\\n\\n/**\\n * Returns a textual representation of the javascript represtentation\\n * of an MP4 file. You can use it as an alternative to\\n * JSON.stringify() to compare inspected MP4s.\\n * @param inspectedMp4 {array} the parsed array of boxes in an MP4\\n * file\\n * @param depth {number} (optional) the number of ancestor boxes of\\n * the elements of inspectedMp4. Assumed to be zero if unspecified.\\n * @return {string} a text representation of the parsed MP4\\n */\\ntextifyMp4 = function(inspectedMp4, depth) {\\n  var indent;\\n  depth = depth || 0;\\n  indent = new Array(depth * 2 + 1).join(' ');\\n\\n  // iterate over all the boxes\\n  return inspectedMp4.map(function(box, index) {\\n\\n    // list the box type first at the current indentation level\\n    return indent + box.type + '\\\\n' +\\n\\n      // the type is already included and handle child boxes separately\\n      Object.keys(box).filter(function(key) {\\n        return key !== 'type' && key !== 'boxes';\\n\\n      // output all the box properties\\n      }).map(function(key) {\\n        var prefix = indent + '  ' + key + ': ',\\n            value = box[key];\\n\\n        // print out raw bytes as hexademical\\n        if (value instanceof Uint8Array || value instanceof Uint32Array) {\\n          var bytes = Array.prototype.slice.call(new Uint8Array(value.buffer, value.byteOffset, value.byteLength))\\n              .map(function(byte) {\\n                return ' ' + ('00' + byte.toString(16)).slice(-2);\\n              }).join('').match(/.{1,24}/g);\\n          if (!bytes) {\\n            return prefix + '<>';\\n          }\\n          if (bytes.length === 1) {\\n            return prefix + '<' + bytes.join('').slice(1) + '>';\\n          }\\n          return prefix + '<\\\\n' + bytes.map(function(line) {\\n            return indent + '  ' + line;\\n          }).join('\\\\n') + '\\\\n' + indent + '  >';\\n        }\\n\\n        // stringify generic objects\\n        return prefix +\\n            JSON.stringify(value, null, 2)\\n              .split('\\\\n').map(function(line, index) {\\n                if (index === 0) {\\n                  return line;\\n                }\\n                return indent + '  ' + line;\\n              }).join('\\\\n');\\n      }).join('\\\\n') +\\n\\n    // recursively textify the child boxes\\n    (box.boxes ? '\\\\n' + textifyMp4(box.boxes, depth + 1) : '');\\n  }).join('\\\\n');\\n};\\n\\nmodule.exports = {\\n  inspect: inspectMp4,\\n  textify: textifyMp4,\\n  parseType: parseType,\\n  findBox: findBox,\\n  parseTraf: parse.traf,\\n  parseTfdt: parse.tfdt,\\n  parseHdlr: parse.hdlr,\\n  parseTfhd: parse.tfhd,\\n  parseTrun: parse.trun,\\n  parseSidx: parse.sidx\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/tools/mp4-inspector.js?\")},\"../node_modules/mux.js/lib/tools/ts-inspector.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * Parse mpeg2 transport stream packets to extract basic timing information\\n */\\n\\n\\nvar StreamTypes = __webpack_require__(/*! ../m2ts/stream-types.js */ \\\"../node_modules/mux.js/lib/m2ts/stream-types.js\\\");\\nvar handleRollover = __webpack_require__(/*! ../m2ts/timestamp-rollover-stream.js */ \\\"../node_modules/mux.js/lib/m2ts/timestamp-rollover-stream.js\\\").handleRollover;\\nvar probe = {};\\nprobe.ts = __webpack_require__(/*! ../m2ts/probe.js */ \\\"../node_modules/mux.js/lib/m2ts/probe.js\\\");\\nprobe.aac = __webpack_require__(/*! ../aac/utils.js */ \\\"../node_modules/mux.js/lib/aac/utils.js\\\");\\nvar ONE_SECOND_IN_TS = __webpack_require__(/*! ../utils/clock */ \\\"../node_modules/mux.js/lib/utils/clock.js\\\").ONE_SECOND_IN_TS;\\n\\nvar\\n  MP2T_PACKET_LENGTH = 188, // bytes\\n  SYNC_BYTE = 0x47;\\n\\n/**\\n * walks through segment data looking for pat and pmt packets to parse out\\n * program map table information\\n */\\nvar parsePsi_ = function(bytes, pmt) {\\n  var\\n    startIndex = 0,\\n    endIndex = MP2T_PACKET_LENGTH,\\n    packet, type;\\n\\n  while (endIndex < bytes.byteLength) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pat':\\n          if (!pmt.pid) {\\n            pmt.pid = probe.ts.parsePat(packet);\\n          }\\n          break;\\n        case 'pmt':\\n          if (!pmt.table) {\\n            pmt.table = probe.ts.parsePmt(packet);\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      // Found the pat and pmt, we can stop walking the segment\\n      if (pmt.pid && pmt.table) {\\n        return;\\n      }\\n\\n      startIndex += MP2T_PACKET_LENGTH;\\n      endIndex += MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex++;\\n    endIndex++;\\n  }\\n};\\n\\n/**\\n * walks through the segment data from the start and end to get timing information\\n * for the first and last audio pes packets\\n */\\nvar parseAudioPes_ = function(bytes, pmt, result) {\\n  var\\n    startIndex = 0,\\n    endIndex = MP2T_PACKET_LENGTH,\\n    packet, type, pesType, pusi, parsed;\\n\\n  var endLoop = false;\\n\\n  // Start walking from start of segment to get first audio packet\\n  while (endIndex <= bytes.byteLength) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE &&\\n        (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'audio' && pusi) {\\n            parsed = probe.ts.parsePesTime(packet);\\n            if (parsed) {\\n              parsed.type = 'audio';\\n              result.audio.push(parsed);\\n              endLoop = true;\\n            }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop) {\\n        break;\\n      }\\n\\n      startIndex += MP2T_PACKET_LENGTH;\\n      endIndex += MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex++;\\n    endIndex++;\\n  }\\n\\n  // Start walking from end of segment to get last audio packet\\n  endIndex = bytes.byteLength;\\n  startIndex = endIndex - MP2T_PACKET_LENGTH;\\n  endLoop = false;\\n  while (startIndex >= 0) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE &&\\n        (bytes[endIndex] === SYNC_BYTE || endIndex === bytes.byteLength)) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'audio' && pusi) {\\n            parsed = probe.ts.parsePesTime(packet);\\n            if (parsed) {\\n              parsed.type = 'audio';\\n              result.audio.push(parsed);\\n              endLoop = true;\\n            }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop) {\\n        break;\\n      }\\n\\n      startIndex -= MP2T_PACKET_LENGTH;\\n      endIndex -= MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex--;\\n    endIndex--;\\n  }\\n};\\n\\n/**\\n * walks through the segment data from the start and end to get timing information\\n * for the first and last video pes packets as well as timing information for the first\\n * key frame.\\n */\\nvar parseVideoPes_ = function(bytes, pmt, result) {\\n  var\\n    startIndex = 0,\\n    endIndex = MP2T_PACKET_LENGTH,\\n    packet, type, pesType, pusi, parsed, frame, i, pes;\\n\\n  var endLoop = false;\\n\\n  var currentFrame = {\\n    data: [],\\n    size: 0\\n  };\\n\\n  // Start walking from start of segment to get first video packet\\n  while (endIndex < bytes.byteLength) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'video') {\\n            if (pusi && !endLoop) {\\n              parsed = probe.ts.parsePesTime(packet);\\n              if (parsed) {\\n                parsed.type = 'video';\\n                result.video.push(parsed);\\n                endLoop = true;\\n              }\\n            }\\n            if (!result.firstKeyFrame) {\\n              if (pusi) {\\n                if (currentFrame.size !== 0) {\\n                  frame = new Uint8Array(currentFrame.size);\\n                  i = 0;\\n                  while (currentFrame.data.length) {\\n                    pes = currentFrame.data.shift();\\n                    frame.set(pes, i);\\n                    i += pes.byteLength;\\n                  }\\n                  if (probe.ts.videoPacketContainsKeyFrame(frame)) {\\n                    var firstKeyFrame = probe.ts.parsePesTime(frame);\\n\\n                    // PTS/DTS may not be available. Simply *not* setting\\n                    // the keyframe seems to work fine with HLS playback\\n                    // and definitely preferable to a crash with TypeError...\\n                    if (firstKeyFrame) {\\n                      result.firstKeyFrame = firstKeyFrame;\\n                      result.firstKeyFrame.type = 'video';\\n                    } else {\\n                      // eslint-disable-next-line\\n                      console.warn(\\n                        'Failed to extract PTS/DTS from PES at first keyframe. ' +\\n                        'This could be an unusual TS segment, or else mux.js did not ' +\\n                        'parse your TS segment correctly. If you know your TS ' +\\n                        'segments do contain PTS/DTS on keyframes please file a bug ' +\\n                        'report! You can try ffprobe to double check for yourself.'\\n                      );\\n                    }\\n                  }\\n                  currentFrame.size = 0;\\n                }\\n              }\\n              currentFrame.data.push(packet);\\n              currentFrame.size += packet.byteLength;\\n            }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop && result.firstKeyFrame) {\\n        break;\\n      }\\n\\n      startIndex += MP2T_PACKET_LENGTH;\\n      endIndex += MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex++;\\n    endIndex++;\\n  }\\n\\n  // Start walking from end of segment to get last video packet\\n  endIndex = bytes.byteLength;\\n  startIndex = endIndex - MP2T_PACKET_LENGTH;\\n  endLoop = false;\\n  while (startIndex >= 0) {\\n    // Look for a pair of start and end sync bytes in the data..\\n    if (bytes[startIndex] === SYNC_BYTE && bytes[endIndex] === SYNC_BYTE) {\\n      // We found a packet\\n      packet = bytes.subarray(startIndex, endIndex);\\n      type = probe.ts.parseType(packet, pmt.pid);\\n\\n      switch (type) {\\n        case 'pes':\\n          pesType = probe.ts.parsePesType(packet, pmt.table);\\n          pusi = probe.ts.parsePayloadUnitStartIndicator(packet);\\n          if (pesType === 'video' && pusi) {\\n              parsed = probe.ts.parsePesTime(packet);\\n              if (parsed) {\\n                parsed.type = 'video';\\n                result.video.push(parsed);\\n                endLoop = true;\\n              }\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n\\n      if (endLoop) {\\n        break;\\n      }\\n\\n      startIndex -= MP2T_PACKET_LENGTH;\\n      endIndex -= MP2T_PACKET_LENGTH;\\n      continue;\\n    }\\n\\n    // If we get here, we have somehow become de-synchronized and we need to step\\n    // forward one byte at a time until we find a pair of sync bytes that denote\\n    // a packet\\n    startIndex--;\\n    endIndex--;\\n  }\\n};\\n\\n/**\\n * Adjusts the timestamp information for the segment to account for\\n * rollover and convert to seconds based on pes packet timescale (90khz clock)\\n */\\nvar adjustTimestamp_ = function(segmentInfo, baseTimestamp) {\\n  if (segmentInfo.audio && segmentInfo.audio.length) {\\n    var audioBaseTimestamp = baseTimestamp;\\n    if (typeof audioBaseTimestamp === 'undefined') {\\n      audioBaseTimestamp = segmentInfo.audio[0].dts;\\n    }\\n    segmentInfo.audio.forEach(function(info) {\\n      info.dts = handleRollover(info.dts, audioBaseTimestamp);\\n      info.pts = handleRollover(info.pts, audioBaseTimestamp);\\n      // time in seconds\\n      info.dtsTime = info.dts / ONE_SECOND_IN_TS;\\n      info.ptsTime = info.pts / ONE_SECOND_IN_TS;\\n    });\\n  }\\n\\n  if (segmentInfo.video && segmentInfo.video.length) {\\n    var videoBaseTimestamp = baseTimestamp;\\n    if (typeof videoBaseTimestamp === 'undefined') {\\n      videoBaseTimestamp = segmentInfo.video[0].dts;\\n    }\\n    segmentInfo.video.forEach(function(info) {\\n      info.dts = handleRollover(info.dts, videoBaseTimestamp);\\n      info.pts = handleRollover(info.pts, videoBaseTimestamp);\\n      // time in seconds\\n      info.dtsTime = info.dts / ONE_SECOND_IN_TS;\\n      info.ptsTime = info.pts / ONE_SECOND_IN_TS;\\n    });\\n    if (segmentInfo.firstKeyFrame) {\\n      var frame = segmentInfo.firstKeyFrame;\\n      frame.dts = handleRollover(frame.dts, videoBaseTimestamp);\\n      frame.pts = handleRollover(frame.pts, videoBaseTimestamp);\\n      // time in seconds\\n      frame.dtsTime = frame.dts / ONE_SECOND_IN_TS;\\n      frame.ptsTime = frame.dts / ONE_SECOND_IN_TS;\\n    }\\n  }\\n};\\n\\n/**\\n * inspects the aac data stream for start and end time information\\n */\\nvar inspectAac_ = function(bytes) {\\n  var\\n    endLoop = false,\\n    audioCount = 0,\\n    sampleRate = null,\\n    timestamp = null,\\n    frameSize = 0,\\n    byteIndex = 0,\\n    packet;\\n\\n  while (bytes.length - byteIndex >= 3) {\\n    var type = probe.aac.parseType(bytes, byteIndex);\\n    switch (type) {\\n      case 'timed-metadata':\\n        // Exit early because we don't have enough to parse\\n        // the ID3 tag header\\n        if (bytes.length - byteIndex < 10) {\\n          endLoop = true;\\n          break;\\n        }\\n\\n        frameSize = probe.aac.parseId3TagSize(bytes, byteIndex);\\n\\n        // Exit early if we don't have enough in the buffer\\n        // to emit a full packet\\n        if (frameSize > bytes.length) {\\n          endLoop = true;\\n          break;\\n        }\\n        if (timestamp === null) {\\n          packet = bytes.subarray(byteIndex, byteIndex + frameSize);\\n          timestamp = probe.aac.parseAacTimestamp(packet);\\n        }\\n        byteIndex += frameSize;\\n        break;\\n      case 'audio':\\n        // Exit early because we don't have enough to parse\\n        // the ADTS frame header\\n        if (bytes.length - byteIndex < 7) {\\n          endLoop = true;\\n          break;\\n        }\\n\\n        frameSize = probe.aac.parseAdtsSize(bytes, byteIndex);\\n\\n        // Exit early if we don't have enough in the buffer\\n        // to emit a full packet\\n        if (frameSize > bytes.length) {\\n          endLoop = true;\\n          break;\\n        }\\n        if (sampleRate === null) {\\n          packet = bytes.subarray(byteIndex, byteIndex + frameSize);\\n          sampleRate = probe.aac.parseSampleRate(packet);\\n        }\\n        audioCount++;\\n        byteIndex += frameSize;\\n        break;\\n      default:\\n        byteIndex++;\\n        break;\\n    }\\n    if (endLoop) {\\n      return null;\\n    }\\n  }\\n  if (sampleRate === null || timestamp === null) {\\n    return null;\\n  }\\n\\n  var audioTimescale = ONE_SECOND_IN_TS / sampleRate;\\n\\n  var result = {\\n    audio: [\\n      {\\n        type: 'audio',\\n        dts: timestamp,\\n        pts: timestamp\\n      },\\n      {\\n        type: 'audio',\\n        dts: timestamp + (audioCount * 1024 * audioTimescale),\\n        pts: timestamp + (audioCount * 1024 * audioTimescale)\\n      }\\n    ]\\n  };\\n\\n  return result;\\n};\\n\\n/**\\n * inspects the transport stream segment data for start and end time information\\n * of the audio and video tracks (when present) as well as the first key frame's\\n * start time.\\n */\\nvar inspectTs_ = function(bytes) {\\n  var pmt = {\\n    pid: null,\\n    table: null\\n  };\\n\\n  var result = {};\\n\\n  parsePsi_(bytes, pmt);\\n\\n  for (var pid in pmt.table) {\\n    if (pmt.table.hasOwnProperty(pid)) {\\n      var type = pmt.table[pid];\\n      switch (type) {\\n        case StreamTypes.H264_STREAM_TYPE:\\n          result.video = [];\\n          parseVideoPes_(bytes, pmt, result);\\n          if (result.video.length === 0) {\\n            delete result.video;\\n          }\\n          break;\\n        case StreamTypes.ADTS_STREAM_TYPE:\\n          result.audio = [];\\n          parseAudioPes_(bytes, pmt, result);\\n          if (result.audio.length === 0) {\\n            delete result.audio;\\n          }\\n          break;\\n        default:\\n          break;\\n      }\\n    }\\n  }\\n  return result;\\n};\\n\\n/**\\n * Inspects segment byte data and returns an object with start and end timing information\\n *\\n * @param {Uint8Array} bytes The segment byte data\\n * @param {Number} baseTimestamp Relative reference timestamp used when adjusting frame\\n *  timestamps for rollover. This value must be in 90khz clock.\\n * @return {Object} Object containing start and end frame timing info of segment.\\n */\\nvar inspect = function(bytes, baseTimestamp) {\\n  var isAacData = probe.aac.isLikelyAacData(bytes);\\n\\n  var result;\\n\\n  if (isAacData) {\\n    result = inspectAac_(bytes);\\n  } else {\\n    result = inspectTs_(bytes);\\n  }\\n\\n  if (!result || (!result.audio && !result.video)) {\\n    return null;\\n  }\\n\\n  adjustTimestamp_(result, baseTimestamp);\\n\\n  return result;\\n};\\n\\nmodule.exports = {\\n  inspect: inspect,\\n  parseAudioPes_: parseAudioPes_\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/tools/ts-inspector.js?\")},\"../node_modules/mux.js/lib/utils/bin.js\":function(module,exports){eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n */\\nvar toUnsigned = function(value) {\\n  return value >>> 0;\\n};\\n\\nvar toHexString = function(value) {\\n  return ('00' + value.toString(16)).slice(-2);\\n};\\n\\nmodule.exports = {\\n  toUnsigned: toUnsigned,\\n  toHexString: toHexString\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/utils/bin.js?\")},\"../node_modules/mux.js/lib/utils/clock.js\":function(module,exports){eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n */\\nvar\\n  ONE_SECOND_IN_TS = 90000, // 90kHz clock\\n  secondsToVideoTs,\\n  secondsToAudioTs,\\n  videoTsToSeconds,\\n  audioTsToSeconds,\\n  audioTsToVideoTs,\\n  videoTsToAudioTs,\\n  metadataTsToSeconds;\\n\\nsecondsToVideoTs = function(seconds) {\\n  return seconds * ONE_SECOND_IN_TS;\\n};\\n\\nsecondsToAudioTs = function(seconds, sampleRate) {\\n  return seconds * sampleRate;\\n};\\n\\nvideoTsToSeconds = function(timestamp) {\\n  return timestamp / ONE_SECOND_IN_TS;\\n};\\n\\naudioTsToSeconds = function(timestamp, sampleRate) {\\n  return timestamp / sampleRate;\\n};\\n\\naudioTsToVideoTs = function(timestamp, sampleRate) {\\n  return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\\n};\\n\\nvideoTsToAudioTs = function(timestamp, sampleRate) {\\n  return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\\n};\\n\\n/**\\n * Adjust ID3 tag or caption timing information by the timeline pts values\\n * (if keepOriginalTimestamps is false) and convert to seconds\\n */\\nmetadataTsToSeconds = function(timestamp, timelineStartPts, keepOriginalTimestamps) {\\n  return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\\n};\\n\\nmodule.exports = {\\n  ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\\n  secondsToVideoTs: secondsToVideoTs,\\n  secondsToAudioTs: secondsToAudioTs,\\n  videoTsToSeconds: videoTsToSeconds,\\n  audioTsToSeconds: audioTsToSeconds,\\n  audioTsToVideoTs: audioTsToVideoTs,\\n  videoTsToAudioTs: videoTsToAudioTs,\\n  metadataTsToSeconds: metadataTsToSeconds\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/utils/clock.js?\")},\"../node_modules/mux.js/lib/utils/stream.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * mux.js\\n *\\n * Copyright (c) Brightcove\\n * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n *\\n * A lightweight readable stream implemention that handles event dispatching.\\n * Objects that inherit from streams should call init in their constructors.\\n */\\n\\n\\nvar Stream = function() {\\n  this.init = function() {\\n    var listeners = {};\\n    /**\\n     * Add a listener for a specified event type.\\n     * @param type {string} the event name\\n     * @param listener {function} the callback to be invoked when an event of\\n     * the specified type occurs\\n     */\\n    this.on = function(type, listener) {\\n      if (!listeners[type]) {\\n        listeners[type] = [];\\n      }\\n      listeners[type] = listeners[type].concat(listener);\\n    };\\n    /**\\n     * Remove a listener for a specified event type.\\n     * @param type {string} the event name\\n     * @param listener {function} a function previously registered for this\\n     * type of event through `on`\\n     */\\n    this.off = function(type, listener) {\\n      var index;\\n      if (!listeners[type]) {\\n        return false;\\n      }\\n      index = listeners[type].indexOf(listener);\\n      listeners[type] = listeners[type].slice();\\n      listeners[type].splice(index, 1);\\n      return index > -1;\\n    };\\n    /**\\n     * Trigger an event of the specified type on this stream. Any additional\\n     * arguments to this function are passed as parameters to event listeners.\\n     * @param type {string} the event name\\n     */\\n    this.trigger = function(type) {\\n      var callbacks, i, length, args;\\n      callbacks = listeners[type];\\n      if (!callbacks) {\\n        return;\\n      }\\n      // Slicing the arguments on every invocation of this method\\n      // can add a significant amount of overhead. Avoid the\\n      // intermediate object creation for the common case of a\\n      // single callback argument\\n      if (arguments.length === 2) {\\n        length = callbacks.length;\\n        for (i = 0; i < length; ++i) {\\n          callbacks[i].call(this, arguments[1]);\\n        }\\n      } else {\\n        args = [];\\n        i = arguments.length;\\n        for (i = 1; i < arguments.length; ++i) {\\n          args.push(arguments[i]);\\n        }\\n        length = callbacks.length;\\n        for (i = 0; i < length; ++i) {\\n          callbacks[i].apply(this, args);\\n        }\\n      }\\n    };\\n    /**\\n     * Destroys the stream and cleans up.\\n     */\\n    this.dispose = function() {\\n      listeners = {};\\n    };\\n  };\\n};\\n\\n/**\\n * Forwards all `data` events on this stream to the destination stream. The\\n * destination stream should provide a method `push` to receive the data\\n * events as they arrive.\\n * @param destination {stream} the stream that will receive all `data` events\\n * @param autoFlush {boolean} if false, we will not call `flush` on the destination\\n *                            when the current stream emits a 'done' event\\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n */\\nStream.prototype.pipe = function(destination) {\\n  this.on('data', function(data) {\\n    destination.push(data);\\n  });\\n\\n  this.on('done', function(flushSource) {\\n    destination.flush(flushSource);\\n  });\\n\\n  this.on('partialdone', function(flushSource) {\\n    destination.partialFlush(flushSource);\\n  });\\n\\n  this.on('endedtimeline', function(flushSource) {\\n    destination.endTimeline(flushSource);\\n  });\\n\\n  this.on('reset', function(flushSource) {\\n    destination.reset(flushSource);\\n  });\\n\\n  return destination;\\n};\\n\\n// Default stream functions that are expected to be overridden to perform\\n// actual work. These are provided by the prototype as a sort of no-op\\n// implementation so that we don't have to check for their existence in the\\n// `pipe` function above.\\nStream.prototype.push = function(data) {\\n  this.trigger('data', data);\\n};\\n\\nStream.prototype.flush = function(flushSource) {\\n  this.trigger('done', flushSource);\\n};\\n\\nStream.prototype.partialFlush = function(flushSource) {\\n  this.trigger('partialdone', flushSource);\\n};\\n\\nStream.prototype.endTimeline = function(flushSource) {\\n  this.trigger('endedtimeline', flushSource);\\n};\\n\\nStream.prototype.reset = function(flushSource) {\\n  this.trigger('reset', flushSource);\\n};\\n\\nmodule.exports = Stream;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/mux.js/lib/utils/stream.js?\")},\"../node_modules/node-libs-browser/node_modules/buffer/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/* WEBPACK VAR INJECTION */(function(global) {/*!\\n * The buffer module from node.js, for the browser.\\n *\\n * @author   Feross Aboukhadijeh <http://feross.org>\\n * @license  MIT\\n */\\n/* eslint-disable no-proto */\\n\\n\\n\\nvar base64 = __webpack_require__(/*! base64-js */ \\\"../node_modules/base64-js/index.js\\\")\\nvar ieee754 = __webpack_require__(/*! ieee754 */ \\\"../node_modules/ieee754/index.js\\\")\\nvar isArray = __webpack_require__(/*! isarray */ \\\"../node_modules/isarray/index.js\\\")\\n\\nexports.Buffer = Buffer\\nexports.SlowBuffer = SlowBuffer\\nexports.INSPECT_MAX_BYTES = 50\\n\\n/**\\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\\n *   === true    Use Uint8Array implementation (fastest)\\n *   === false   Use Object implementation (most compatible, even IE6)\\n *\\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\\n * Opera 11.6+, iOS 4.2+.\\n *\\n * Due to various browser bugs, sometimes the Object implementation will be used even\\n * when the browser supports typed arrays.\\n *\\n * Note:\\n *\\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\\n *\\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\\n *\\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\\n *     incorrect length in some situations.\\n\\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\\n * get the Object implementation, which is slower but behaves correctly.\\n */\\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\\n  ? global.TYPED_ARRAY_SUPPORT\\n  : typedArraySupport()\\n\\n/*\\n * Export kMaxLength after typed array support is determined.\\n */\\nexports.kMaxLength = kMaxLength()\\n\\nfunction typedArraySupport () {\\n  try {\\n    var arr = new Uint8Array(1)\\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\\n    return arr.foo() === 42 && // typed array instances can be augmented\\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\\n  } catch (e) {\\n    return false\\n  }\\n}\\n\\nfunction kMaxLength () {\\n  return Buffer.TYPED_ARRAY_SUPPORT\\n    ? 0x7fffffff\\n    : 0x3fffffff\\n}\\n\\nfunction createBuffer (that, length) {\\n  if (kMaxLength() < length) {\\n    throw new RangeError('Invalid typed array length')\\n  }\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    // Return an augmented `Uint8Array` instance, for best performance\\n    that = new Uint8Array(length)\\n    that.__proto__ = Buffer.prototype\\n  } else {\\n    // Fallback: Return an object instance of the Buffer class\\n    if (that === null) {\\n      that = new Buffer(length)\\n    }\\n    that.length = length\\n  }\\n\\n  return that\\n}\\n\\n/**\\n * The Buffer constructor returns instances of `Uint8Array` that have their\\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\\n * returns a single octet.\\n *\\n * The `Uint8Array` prototype remains unmodified.\\n */\\n\\nfunction Buffer (arg, encodingOrOffset, length) {\\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\\n    return new Buffer(arg, encodingOrOffset, length)\\n  }\\n\\n  // Common case.\\n  if (typeof arg === 'number') {\\n    if (typeof encodingOrOffset === 'string') {\\n      throw new Error(\\n        'If encoding is specified then the first argument must be a string'\\n      )\\n    }\\n    return allocUnsafe(this, arg)\\n  }\\n  return from(this, arg, encodingOrOffset, length)\\n}\\n\\nBuffer.poolSize = 8192 // not used by this implementation\\n\\n// TODO: Legacy, not needed anymore. Remove in next major version.\\nBuffer._augment = function (arr) {\\n  arr.__proto__ = Buffer.prototype\\n  return arr\\n}\\n\\nfunction from (that, value, encodingOrOffset, length) {\\n  if (typeof value === 'number') {\\n    throw new TypeError('\\\"value\\\" argument must not be a number')\\n  }\\n\\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\\n  }\\n\\n  if (typeof value === 'string') {\\n    return fromString(that, value, encodingOrOffset)\\n  }\\n\\n  return fromObject(that, value)\\n}\\n\\n/**\\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\\n * if value is a number.\\n * Buffer.from(str[, encoding])\\n * Buffer.from(array)\\n * Buffer.from(buffer)\\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\\n **/\\nBuffer.from = function (value, encodingOrOffset, length) {\\n  return from(null, value, encodingOrOffset, length)\\n}\\n\\nif (Buffer.TYPED_ARRAY_SUPPORT) {\\n  Buffer.prototype.__proto__ = Uint8Array.prototype\\n  Buffer.__proto__ = Uint8Array\\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\\n      Buffer[Symbol.species] === Buffer) {\\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\\n    Object.defineProperty(Buffer, Symbol.species, {\\n      value: null,\\n      configurable: true\\n    })\\n  }\\n}\\n\\nfunction assertSize (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('\\\"size\\\" argument must be a number')\\n  } else if (size < 0) {\\n    throw new RangeError('\\\"size\\\" argument must not be negative')\\n  }\\n}\\n\\nfunction alloc (that, size, fill, encoding) {\\n  assertSize(size)\\n  if (size <= 0) {\\n    return createBuffer(that, size)\\n  }\\n  if (fill !== undefined) {\\n    // Only pay attention to encoding if it's a string. This\\n    // prevents accidentally sending in a number that would\\n    // be interpretted as a start offset.\\n    return typeof encoding === 'string'\\n      ? createBuffer(that, size).fill(fill, encoding)\\n      : createBuffer(that, size).fill(fill)\\n  }\\n  return createBuffer(that, size)\\n}\\n\\n/**\\n * Creates a new filled Buffer instance.\\n * alloc(size[, fill[, encoding]])\\n **/\\nBuffer.alloc = function (size, fill, encoding) {\\n  return alloc(null, size, fill, encoding)\\n}\\n\\nfunction allocUnsafe (that, size) {\\n  assertSize(size)\\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\\n    for (var i = 0; i < size; ++i) {\\n      that[i] = 0\\n    }\\n  }\\n  return that\\n}\\n\\n/**\\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\\n * */\\nBuffer.allocUnsafe = function (size) {\\n  return allocUnsafe(null, size)\\n}\\n/**\\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\\n */\\nBuffer.allocUnsafeSlow = function (size) {\\n  return allocUnsafe(null, size)\\n}\\n\\nfunction fromString (that, string, encoding) {\\n  if (typeof encoding !== 'string' || encoding === '') {\\n    encoding = 'utf8'\\n  }\\n\\n  if (!Buffer.isEncoding(encoding)) {\\n    throw new TypeError('\\\"encoding\\\" must be a valid string encoding')\\n  }\\n\\n  var length = byteLength(string, encoding) | 0\\n  that = createBuffer(that, length)\\n\\n  var actual = that.write(string, encoding)\\n\\n  if (actual !== length) {\\n    // Writing a hex string, for example, that contains invalid characters will\\n    // cause everything after the first invalid character to be ignored. (e.g.\\n    // 'abxxcd' will be treated as 'ab')\\n    that = that.slice(0, actual)\\n  }\\n\\n  return that\\n}\\n\\nfunction fromArrayLike (that, array) {\\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\\n  that = createBuffer(that, length)\\n  for (var i = 0; i < length; i += 1) {\\n    that[i] = array[i] & 255\\n  }\\n  return that\\n}\\n\\nfunction fromArrayBuffer (that, array, byteOffset, length) {\\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\\n\\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\\n    throw new RangeError('\\\\'offset\\\\' is out of bounds')\\n  }\\n\\n  if (array.byteLength < byteOffset + (length || 0)) {\\n    throw new RangeError('\\\\'length\\\\' is out of bounds')\\n  }\\n\\n  if (byteOffset === undefined && length === undefined) {\\n    array = new Uint8Array(array)\\n  } else if (length === undefined) {\\n    array = new Uint8Array(array, byteOffset)\\n  } else {\\n    array = new Uint8Array(array, byteOffset, length)\\n  }\\n\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    // Return an augmented `Uint8Array` instance, for best performance\\n    that = array\\n    that.__proto__ = Buffer.prototype\\n  } else {\\n    // Fallback: Return an object instance of the Buffer class\\n    that = fromArrayLike(that, array)\\n  }\\n  return that\\n}\\n\\nfunction fromObject (that, obj) {\\n  if (Buffer.isBuffer(obj)) {\\n    var len = checked(obj.length) | 0\\n    that = createBuffer(that, len)\\n\\n    if (that.length === 0) {\\n      return that\\n    }\\n\\n    obj.copy(that, 0, 0, len)\\n    return that\\n  }\\n\\n  if (obj) {\\n    if ((typeof ArrayBuffer !== 'undefined' &&\\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\\n        return createBuffer(that, 0)\\n      }\\n      return fromArrayLike(that, obj)\\n    }\\n\\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\\n      return fromArrayLike(that, obj.data)\\n    }\\n  }\\n\\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\\n}\\n\\nfunction checked (length) {\\n  // Note: cannot use `length < kMaxLength()` here because that fails when\\n  // length is NaN (which is otherwise coerced to zero.)\\n  if (length >= kMaxLength()) {\\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\\n  }\\n  return length | 0\\n}\\n\\nfunction SlowBuffer (length) {\\n  if (+length != length) { // eslint-disable-line eqeqeq\\n    length = 0\\n  }\\n  return Buffer.alloc(+length)\\n}\\n\\nBuffer.isBuffer = function isBuffer (b) {\\n  return !!(b != null && b._isBuffer)\\n}\\n\\nBuffer.compare = function compare (a, b) {\\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\\n    throw new TypeError('Arguments must be Buffers')\\n  }\\n\\n  if (a === b) return 0\\n\\n  var x = a.length\\n  var y = b.length\\n\\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\\n    if (a[i] !== b[i]) {\\n      x = a[i]\\n      y = b[i]\\n      break\\n    }\\n  }\\n\\n  if (x < y) return -1\\n  if (y < x) return 1\\n  return 0\\n}\\n\\nBuffer.isEncoding = function isEncoding (encoding) {\\n  switch (String(encoding).toLowerCase()) {\\n    case 'hex':\\n    case 'utf8':\\n    case 'utf-8':\\n    case 'ascii':\\n    case 'latin1':\\n    case 'binary':\\n    case 'base64':\\n    case 'ucs2':\\n    case 'ucs-2':\\n    case 'utf16le':\\n    case 'utf-16le':\\n      return true\\n    default:\\n      return false\\n  }\\n}\\n\\nBuffer.concat = function concat (list, length) {\\n  if (!isArray(list)) {\\n    throw new TypeError('\\\"list\\\" argument must be an Array of Buffers')\\n  }\\n\\n  if (list.length === 0) {\\n    return Buffer.alloc(0)\\n  }\\n\\n  var i\\n  if (length === undefined) {\\n    length = 0\\n    for (i = 0; i < list.length; ++i) {\\n      length += list[i].length\\n    }\\n  }\\n\\n  var buffer = Buffer.allocUnsafe(length)\\n  var pos = 0\\n  for (i = 0; i < list.length; ++i) {\\n    var buf = list[i]\\n    if (!Buffer.isBuffer(buf)) {\\n      throw new TypeError('\\\"list\\\" argument must be an Array of Buffers')\\n    }\\n    buf.copy(buffer, pos)\\n    pos += buf.length\\n  }\\n  return buffer\\n}\\n\\nfunction byteLength (string, encoding) {\\n  if (Buffer.isBuffer(string)) {\\n    return string.length\\n  }\\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\\n    return string.byteLength\\n  }\\n  if (typeof string !== 'string') {\\n    string = '' + string\\n  }\\n\\n  var len = string.length\\n  if (len === 0) return 0\\n\\n  // Use a for loop to avoid recursion\\n  var loweredCase = false\\n  for (;;) {\\n    switch (encoding) {\\n      case 'ascii':\\n      case 'latin1':\\n      case 'binary':\\n        return len\\n      case 'utf8':\\n      case 'utf-8':\\n      case undefined:\\n        return utf8ToBytes(string).length\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return len * 2\\n      case 'hex':\\n        return len >>> 1\\n      case 'base64':\\n        return base64ToBytes(string).length\\n      default:\\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\\n        encoding = ('' + encoding).toLowerCase()\\n        loweredCase = true\\n    }\\n  }\\n}\\nBuffer.byteLength = byteLength\\n\\nfunction slowToString (encoding, start, end) {\\n  var loweredCase = false\\n\\n  // No need to verify that \\\"this.length <= MAX_UINT32\\\" since it's a read-only\\n  // property of a typed array.\\n\\n  // This behaves neither like String nor Uint8Array in that we set start/end\\n  // to their upper/lower bounds if the value passed is out of range.\\n  // undefined is handled specially as per ECMA-262 6th Edition,\\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\\n  if (start === undefined || start < 0) {\\n    start = 0\\n  }\\n  // Return early if start > this.length. Done here to prevent potential uint32\\n  // coercion fail below.\\n  if (start > this.length) {\\n    return ''\\n  }\\n\\n  if (end === undefined || end > this.length) {\\n    end = this.length\\n  }\\n\\n  if (end <= 0) {\\n    return ''\\n  }\\n\\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\\n  end >>>= 0\\n  start >>>= 0\\n\\n  if (end <= start) {\\n    return ''\\n  }\\n\\n  if (!encoding) encoding = 'utf8'\\n\\n  while (true) {\\n    switch (encoding) {\\n      case 'hex':\\n        return hexSlice(this, start, end)\\n\\n      case 'utf8':\\n      case 'utf-8':\\n        return utf8Slice(this, start, end)\\n\\n      case 'ascii':\\n        return asciiSlice(this, start, end)\\n\\n      case 'latin1':\\n      case 'binary':\\n        return latin1Slice(this, start, end)\\n\\n      case 'base64':\\n        return base64Slice(this, start, end)\\n\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return utf16leSlice(this, start, end)\\n\\n      default:\\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\\n        encoding = (encoding + '').toLowerCase()\\n        loweredCase = true\\n    }\\n  }\\n}\\n\\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\\n// Buffer instances.\\nBuffer.prototype._isBuffer = true\\n\\nfunction swap (b, n, m) {\\n  var i = b[n]\\n  b[n] = b[m]\\n  b[m] = i\\n}\\n\\nBuffer.prototype.swap16 = function swap16 () {\\n  var len = this.length\\n  if (len % 2 !== 0) {\\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\\n  }\\n  for (var i = 0; i < len; i += 2) {\\n    swap(this, i, i + 1)\\n  }\\n  return this\\n}\\n\\nBuffer.prototype.swap32 = function swap32 () {\\n  var len = this.length\\n  if (len % 4 !== 0) {\\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\\n  }\\n  for (var i = 0; i < len; i += 4) {\\n    swap(this, i, i + 3)\\n    swap(this, i + 1, i + 2)\\n  }\\n  return this\\n}\\n\\nBuffer.prototype.swap64 = function swap64 () {\\n  var len = this.length\\n  if (len % 8 !== 0) {\\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\\n  }\\n  for (var i = 0; i < len; i += 8) {\\n    swap(this, i, i + 7)\\n    swap(this, i + 1, i + 6)\\n    swap(this, i + 2, i + 5)\\n    swap(this, i + 3, i + 4)\\n  }\\n  return this\\n}\\n\\nBuffer.prototype.toString = function toString () {\\n  var length = this.length | 0\\n  if (length === 0) return ''\\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\\n  return slowToString.apply(this, arguments)\\n}\\n\\nBuffer.prototype.equals = function equals (b) {\\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\\n  if (this === b) return true\\n  return Buffer.compare(this, b) === 0\\n}\\n\\nBuffer.prototype.inspect = function inspect () {\\n  var str = ''\\n  var max = exports.INSPECT_MAX_BYTES\\n  if (this.length > 0) {\\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\\n    if (this.length > max) str += ' ... '\\n  }\\n  return '<Buffer ' + str + '>'\\n}\\n\\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\\n  if (!Buffer.isBuffer(target)) {\\n    throw new TypeError('Argument must be a Buffer')\\n  }\\n\\n  if (start === undefined) {\\n    start = 0\\n  }\\n  if (end === undefined) {\\n    end = target ? target.length : 0\\n  }\\n  if (thisStart === undefined) {\\n    thisStart = 0\\n  }\\n  if (thisEnd === undefined) {\\n    thisEnd = this.length\\n  }\\n\\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\\n    throw new RangeError('out of range index')\\n  }\\n\\n  if (thisStart >= thisEnd && start >= end) {\\n    return 0\\n  }\\n  if (thisStart >= thisEnd) {\\n    return -1\\n  }\\n  if (start >= end) {\\n    return 1\\n  }\\n\\n  start >>>= 0\\n  end >>>= 0\\n  thisStart >>>= 0\\n  thisEnd >>>= 0\\n\\n  if (this === target) return 0\\n\\n  var x = thisEnd - thisStart\\n  var y = end - start\\n  var len = Math.min(x, y)\\n\\n  var thisCopy = this.slice(thisStart, thisEnd)\\n  var targetCopy = target.slice(start, end)\\n\\n  for (var i = 0; i < len; ++i) {\\n    if (thisCopy[i] !== targetCopy[i]) {\\n      x = thisCopy[i]\\n      y = targetCopy[i]\\n      break\\n    }\\n  }\\n\\n  if (x < y) return -1\\n  if (y < x) return 1\\n  return 0\\n}\\n\\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\\n//\\n// Arguments:\\n// - buffer - a Buffer to search\\n// - val - a string, Buffer, or number\\n// - byteOffset - an index into `buffer`; will be clamped to an int32\\n// - encoding - an optional encoding, relevant is val is a string\\n// - dir - true for indexOf, false for lastIndexOf\\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\\n  // Empty buffer means no match\\n  if (buffer.length === 0) return -1\\n\\n  // Normalize byteOffset\\n  if (typeof byteOffset === 'string') {\\n    encoding = byteOffset\\n    byteOffset = 0\\n  } else if (byteOffset > 0x7fffffff) {\\n    byteOffset = 0x7fffffff\\n  } else if (byteOffset < -0x80000000) {\\n    byteOffset = -0x80000000\\n  }\\n  byteOffset = +byteOffset  // Coerce to Number.\\n  if (isNaN(byteOffset)) {\\n    // byteOffset: it it's undefined, null, NaN, \\\"foo\\\", etc, search whole buffer\\n    byteOffset = dir ? 0 : (buffer.length - 1)\\n  }\\n\\n  // Normalize byteOffset: negative offsets start from the end of the buffer\\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\\n  if (byteOffset >= buffer.length) {\\n    if (dir) return -1\\n    else byteOffset = buffer.length - 1\\n  } else if (byteOffset < 0) {\\n    if (dir) byteOffset = 0\\n    else return -1\\n  }\\n\\n  // Normalize val\\n  if (typeof val === 'string') {\\n    val = Buffer.from(val, encoding)\\n  }\\n\\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\\n  if (Buffer.isBuffer(val)) {\\n    // Special case: looking for empty string/buffer always fails\\n    if (val.length === 0) {\\n      return -1\\n    }\\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\\n  } else if (typeof val === 'number') {\\n    val = val & 0xFF // Search for a byte value [0-255]\\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\\n        typeof Uint8Array.prototype.indexOf === 'function') {\\n      if (dir) {\\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\\n      } else {\\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\\n      }\\n    }\\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\\n  }\\n\\n  throw new TypeError('val must be string, number or Buffer')\\n}\\n\\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\\n  var indexSize = 1\\n  var arrLength = arr.length\\n  var valLength = val.length\\n\\n  if (encoding !== undefined) {\\n    encoding = String(encoding).toLowerCase()\\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\\n        encoding === 'utf16le' || encoding === 'utf-16le') {\\n      if (arr.length < 2 || val.length < 2) {\\n        return -1\\n      }\\n      indexSize = 2\\n      arrLength /= 2\\n      valLength /= 2\\n      byteOffset /= 2\\n    }\\n  }\\n\\n  function read (buf, i) {\\n    if (indexSize === 1) {\\n      return buf[i]\\n    } else {\\n      return buf.readUInt16BE(i * indexSize)\\n    }\\n  }\\n\\n  var i\\n  if (dir) {\\n    var foundIndex = -1\\n    for (i = byteOffset; i < arrLength; i++) {\\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\\n        if (foundIndex === -1) foundIndex = i\\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\\n      } else {\\n        if (foundIndex !== -1) i -= i - foundIndex\\n        foundIndex = -1\\n      }\\n    }\\n  } else {\\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\\n    for (i = byteOffset; i >= 0; i--) {\\n      var found = true\\n      for (var j = 0; j < valLength; j++) {\\n        if (read(arr, i + j) !== read(val, j)) {\\n          found = false\\n          break\\n        }\\n      }\\n      if (found) return i\\n    }\\n  }\\n\\n  return -1\\n}\\n\\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\\n  return this.indexOf(val, byteOffset, encoding) !== -1\\n}\\n\\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\\n}\\n\\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\\n}\\n\\nfunction hexWrite (buf, string, offset, length) {\\n  offset = Number(offset) || 0\\n  var remaining = buf.length - offset\\n  if (!length) {\\n    length = remaining\\n  } else {\\n    length = Number(length)\\n    if (length > remaining) {\\n      length = remaining\\n    }\\n  }\\n\\n  // must be an even number of digits\\n  var strLen = string.length\\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\\n\\n  if (length > strLen / 2) {\\n    length = strLen / 2\\n  }\\n  for (var i = 0; i < length; ++i) {\\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\\n    if (isNaN(parsed)) return i\\n    buf[offset + i] = parsed\\n  }\\n  return i\\n}\\n\\nfunction utf8Write (buf, string, offset, length) {\\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\\n}\\n\\nfunction asciiWrite (buf, string, offset, length) {\\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\\n}\\n\\nfunction latin1Write (buf, string, offset, length) {\\n  return asciiWrite(buf, string, offset, length)\\n}\\n\\nfunction base64Write (buf, string, offset, length) {\\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\\n}\\n\\nfunction ucs2Write (buf, string, offset, length) {\\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\\n}\\n\\nBuffer.prototype.write = function write (string, offset, length, encoding) {\\n  // Buffer#write(string)\\n  if (offset === undefined) {\\n    encoding = 'utf8'\\n    length = this.length\\n    offset = 0\\n  // Buffer#write(string, encoding)\\n  } else if (length === undefined && typeof offset === 'string') {\\n    encoding = offset\\n    length = this.length\\n    offset = 0\\n  // Buffer#write(string, offset[, length][, encoding])\\n  } else if (isFinite(offset)) {\\n    offset = offset | 0\\n    if (isFinite(length)) {\\n      length = length | 0\\n      if (encoding === undefined) encoding = 'utf8'\\n    } else {\\n      encoding = length\\n      length = undefined\\n    }\\n  // legacy write(string, encoding, offset, length) - remove in v0.13\\n  } else {\\n    throw new Error(\\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\\n    )\\n  }\\n\\n  var remaining = this.length - offset\\n  if (length === undefined || length > remaining) length = remaining\\n\\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\\n    throw new RangeError('Attempt to write outside buffer bounds')\\n  }\\n\\n  if (!encoding) encoding = 'utf8'\\n\\n  var loweredCase = false\\n  for (;;) {\\n    switch (encoding) {\\n      case 'hex':\\n        return hexWrite(this, string, offset, length)\\n\\n      case 'utf8':\\n      case 'utf-8':\\n        return utf8Write(this, string, offset, length)\\n\\n      case 'ascii':\\n        return asciiWrite(this, string, offset, length)\\n\\n      case 'latin1':\\n      case 'binary':\\n        return latin1Write(this, string, offset, length)\\n\\n      case 'base64':\\n        // Warning: maxLength not taken into account in base64Write\\n        return base64Write(this, string, offset, length)\\n\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return ucs2Write(this, string, offset, length)\\n\\n      default:\\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\\n        encoding = ('' + encoding).toLowerCase()\\n        loweredCase = true\\n    }\\n  }\\n}\\n\\nBuffer.prototype.toJSON = function toJSON () {\\n  return {\\n    type: 'Buffer',\\n    data: Array.prototype.slice.call(this._arr || this, 0)\\n  }\\n}\\n\\nfunction base64Slice (buf, start, end) {\\n  if (start === 0 && end === buf.length) {\\n    return base64.fromByteArray(buf)\\n  } else {\\n    return base64.fromByteArray(buf.slice(start, end))\\n  }\\n}\\n\\nfunction utf8Slice (buf, start, end) {\\n  end = Math.min(buf.length, end)\\n  var res = []\\n\\n  var i = start\\n  while (i < end) {\\n    var firstByte = buf[i]\\n    var codePoint = null\\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\\n      : (firstByte > 0xDF) ? 3\\n      : (firstByte > 0xBF) ? 2\\n      : 1\\n\\n    if (i + bytesPerSequence <= end) {\\n      var secondByte, thirdByte, fourthByte, tempCodePoint\\n\\n      switch (bytesPerSequence) {\\n        case 1:\\n          if (firstByte < 0x80) {\\n            codePoint = firstByte\\n          }\\n          break\\n        case 2:\\n          secondByte = buf[i + 1]\\n          if ((secondByte & 0xC0) === 0x80) {\\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\\n            if (tempCodePoint > 0x7F) {\\n              codePoint = tempCodePoint\\n            }\\n          }\\n          break\\n        case 3:\\n          secondByte = buf[i + 1]\\n          thirdByte = buf[i + 2]\\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\\n              codePoint = tempCodePoint\\n            }\\n          }\\n          break\\n        case 4:\\n          secondByte = buf[i + 1]\\n          thirdByte = buf[i + 2]\\n          fourthByte = buf[i + 3]\\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\\n              codePoint = tempCodePoint\\n            }\\n          }\\n      }\\n    }\\n\\n    if (codePoint === null) {\\n      // we did not generate a valid codePoint so insert a\\n      // replacement char (U+FFFD) and advance only 1 byte\\n      codePoint = 0xFFFD\\n      bytesPerSequence = 1\\n    } else if (codePoint > 0xFFFF) {\\n      // encode to utf16 (surrogate pair dance)\\n      codePoint -= 0x10000\\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\\n      codePoint = 0xDC00 | codePoint & 0x3FF\\n    }\\n\\n    res.push(codePoint)\\n    i += bytesPerSequence\\n  }\\n\\n  return decodeCodePointsArray(res)\\n}\\n\\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\\n// the lowest limit is Chrome, with 0x10000 args.\\n// We go 1 magnitude less, for safety\\nvar MAX_ARGUMENTS_LENGTH = 0x1000\\n\\nfunction decodeCodePointsArray (codePoints) {\\n  var len = codePoints.length\\n  if (len <= MAX_ARGUMENTS_LENGTH) {\\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\\n  }\\n\\n  // Decode in chunks to avoid \\\"call stack size exceeded\\\".\\n  var res = ''\\n  var i = 0\\n  while (i < len) {\\n    res += String.fromCharCode.apply(\\n      String,\\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\\n    )\\n  }\\n  return res\\n}\\n\\nfunction asciiSlice (buf, start, end) {\\n  var ret = ''\\n  end = Math.min(buf.length, end)\\n\\n  for (var i = start; i < end; ++i) {\\n    ret += String.fromCharCode(buf[i] & 0x7F)\\n  }\\n  return ret\\n}\\n\\nfunction latin1Slice (buf, start, end) {\\n  var ret = ''\\n  end = Math.min(buf.length, end)\\n\\n  for (var i = start; i < end; ++i) {\\n    ret += String.fromCharCode(buf[i])\\n  }\\n  return ret\\n}\\n\\nfunction hexSlice (buf, start, end) {\\n  var len = buf.length\\n\\n  if (!start || start < 0) start = 0\\n  if (!end || end < 0 || end > len) end = len\\n\\n  var out = ''\\n  for (var i = start; i < end; ++i) {\\n    out += toHex(buf[i])\\n  }\\n  return out\\n}\\n\\nfunction utf16leSlice (buf, start, end) {\\n  var bytes = buf.slice(start, end)\\n  var res = ''\\n  for (var i = 0; i < bytes.length; i += 2) {\\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\\n  }\\n  return res\\n}\\n\\nBuffer.prototype.slice = function slice (start, end) {\\n  var len = this.length\\n  start = ~~start\\n  end = end === undefined ? len : ~~end\\n\\n  if (start < 0) {\\n    start += len\\n    if (start < 0) start = 0\\n  } else if (start > len) {\\n    start = len\\n  }\\n\\n  if (end < 0) {\\n    end += len\\n    if (end < 0) end = 0\\n  } else if (end > len) {\\n    end = len\\n  }\\n\\n  if (end < start) end = start\\n\\n  var newBuf\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    newBuf = this.subarray(start, end)\\n    newBuf.__proto__ = Buffer.prototype\\n  } else {\\n    var sliceLen = end - start\\n    newBuf = new Buffer(sliceLen, undefined)\\n    for (var i = 0; i < sliceLen; ++i) {\\n      newBuf[i] = this[i + start]\\n    }\\n  }\\n\\n  return newBuf\\n}\\n\\n/*\\n * Need to make sure that buffer isn't trying to write out of bounds.\\n */\\nfunction checkOffset (offset, ext, length) {\\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\\n}\\n\\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n  var val = this[offset]\\n  var mul = 1\\n  var i = 0\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    val += this[offset + i] * mul\\n  }\\n\\n  return val\\n}\\n\\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) {\\n    checkOffset(offset, byteLength, this.length)\\n  }\\n\\n  var val = this[offset + --byteLength]\\n  var mul = 1\\n  while (byteLength > 0 && (mul *= 0x100)) {\\n    val += this[offset + --byteLength] * mul\\n  }\\n\\n  return val\\n}\\n\\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 1, this.length)\\n  return this[offset]\\n}\\n\\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  return this[offset] | (this[offset + 1] << 8)\\n}\\n\\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  return (this[offset] << 8) | this[offset + 1]\\n}\\n\\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return ((this[offset]) |\\n      (this[offset + 1] << 8) |\\n      (this[offset + 2] << 16)) +\\n      (this[offset + 3] * 0x1000000)\\n}\\n\\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return (this[offset] * 0x1000000) +\\n    ((this[offset + 1] << 16) |\\n    (this[offset + 2] << 8) |\\n    this[offset + 3])\\n}\\n\\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n  var val = this[offset]\\n  var mul = 1\\n  var i = 0\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    val += this[offset + i] * mul\\n  }\\n  mul *= 0x80\\n\\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\\n\\n  return val\\n}\\n\\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\\n\\n  var i = byteLength\\n  var mul = 1\\n  var val = this[offset + --i]\\n  while (i > 0 && (mul *= 0x100)) {\\n    val += this[offset + --i] * mul\\n  }\\n  mul *= 0x80\\n\\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\\n\\n  return val\\n}\\n\\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 1, this.length)\\n  if (!(this[offset] & 0x80)) return (this[offset])\\n  return ((0xff - this[offset] + 1) * -1)\\n}\\n\\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  var val = this[offset] | (this[offset + 1] << 8)\\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\\n}\\n\\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 2, this.length)\\n  var val = this[offset + 1] | (this[offset] << 8)\\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\\n}\\n\\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return (this[offset]) |\\n    (this[offset + 1] << 8) |\\n    (this[offset + 2] << 16) |\\n    (this[offset + 3] << 24)\\n}\\n\\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n\\n  return (this[offset] << 24) |\\n    (this[offset + 1] << 16) |\\n    (this[offset + 2] << 8) |\\n    (this[offset + 3])\\n}\\n\\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n  return ieee754.read(this, offset, true, 23, 4)\\n}\\n\\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 4, this.length)\\n  return ieee754.read(this, offset, false, 23, 4)\\n}\\n\\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 8, this.length)\\n  return ieee754.read(this, offset, true, 52, 8)\\n}\\n\\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\\n  if (!noAssert) checkOffset(offset, 8, this.length)\\n  return ieee754.read(this, offset, false, 52, 8)\\n}\\n\\nfunction checkInt (buf, value, offset, ext, max, min) {\\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\\\"buffer\\\" argument must be a Buffer instance')\\n  if (value > max || value < min) throw new RangeError('\\\"value\\\" argument is out of bounds')\\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\\n}\\n\\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) {\\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\\n  }\\n\\n  var mul = 1\\n  var i = 0\\n  this[offset] = value & 0xFF\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    this[offset + i] = (value / mul) & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  byteLength = byteLength | 0\\n  if (!noAssert) {\\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\\n  }\\n\\n  var i = byteLength - 1\\n  var mul = 1\\n  this[offset + i] = value & 0xFF\\n  while (--i >= 0 && (mul *= 0x100)) {\\n    this[offset + i] = (value / mul) & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\\n  this[offset] = (value & 0xff)\\n  return offset + 1\\n}\\n\\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\\n  if (value < 0) value = 0xffff + value + 1\\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\\n      (littleEndian ? i : 1 - i) * 8\\n  }\\n}\\n\\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value & 0xff)\\n    this[offset + 1] = (value >>> 8)\\n  } else {\\n    objectWriteUInt16(this, value, offset, true)\\n  }\\n  return offset + 2\\n}\\n\\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 8)\\n    this[offset + 1] = (value & 0xff)\\n  } else {\\n    objectWriteUInt16(this, value, offset, false)\\n  }\\n  return offset + 2\\n}\\n\\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\\n  if (value < 0) value = 0xffffffff + value + 1\\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\\n  }\\n}\\n\\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset + 3] = (value >>> 24)\\n    this[offset + 2] = (value >>> 16)\\n    this[offset + 1] = (value >>> 8)\\n    this[offset] = (value & 0xff)\\n  } else {\\n    objectWriteUInt32(this, value, offset, true)\\n  }\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 24)\\n    this[offset + 1] = (value >>> 16)\\n    this[offset + 2] = (value >>> 8)\\n    this[offset + 3] = (value & 0xff)\\n  } else {\\n    objectWriteUInt32(this, value, offset, false)\\n  }\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) {\\n    var limit = Math.pow(2, 8 * byteLength - 1)\\n\\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\\n  }\\n\\n  var i = 0\\n  var mul = 1\\n  var sub = 0\\n  this[offset] = value & 0xFF\\n  while (++i < byteLength && (mul *= 0x100)) {\\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\\n      sub = 1\\n    }\\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) {\\n    var limit = Math.pow(2, 8 * byteLength - 1)\\n\\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\\n  }\\n\\n  var i = byteLength - 1\\n  var mul = 1\\n  var sub = 0\\n  this[offset + i] = value & 0xFF\\n  while (--i >= 0 && (mul *= 0x100)) {\\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\\n      sub = 1\\n    }\\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\\n  }\\n\\n  return offset + byteLength\\n}\\n\\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\\n  if (value < 0) value = 0xff + value + 1\\n  this[offset] = (value & 0xff)\\n  return offset + 1\\n}\\n\\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value & 0xff)\\n    this[offset + 1] = (value >>> 8)\\n  } else {\\n    objectWriteUInt16(this, value, offset, true)\\n  }\\n  return offset + 2\\n}\\n\\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 8)\\n    this[offset + 1] = (value & 0xff)\\n  } else {\\n    objectWriteUInt16(this, value, offset, false)\\n  }\\n  return offset + 2\\n}\\n\\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value & 0xff)\\n    this[offset + 1] = (value >>> 8)\\n    this[offset + 2] = (value >>> 16)\\n    this[offset + 3] = (value >>> 24)\\n  } else {\\n    objectWriteUInt32(this, value, offset, true)\\n  }\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\\n  value = +value\\n  offset = offset | 0\\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\\n  if (value < 0) value = 0xffffffff + value + 1\\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\\n    this[offset] = (value >>> 24)\\n    this[offset + 1] = (value >>> 16)\\n    this[offset + 2] = (value >>> 8)\\n    this[offset + 3] = (value & 0xff)\\n  } else {\\n    objectWriteUInt32(this, value, offset, false)\\n  }\\n  return offset + 4\\n}\\n\\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\\n  if (offset < 0) throw new RangeError('Index out of range')\\n}\\n\\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\\n  if (!noAssert) {\\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\\n  }\\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\\n  return offset + 4\\n}\\n\\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\\n  return writeFloat(this, value, offset, true, noAssert)\\n}\\n\\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\\n  return writeFloat(this, value, offset, false, noAssert)\\n}\\n\\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\\n  if (!noAssert) {\\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\\n  }\\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\\n  return offset + 8\\n}\\n\\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\\n  return writeDouble(this, value, offset, true, noAssert)\\n}\\n\\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\\n  return writeDouble(this, value, offset, false, noAssert)\\n}\\n\\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\\n  if (!start) start = 0\\n  if (!end && end !== 0) end = this.length\\n  if (targetStart >= target.length) targetStart = target.length\\n  if (!targetStart) targetStart = 0\\n  if (end > 0 && end < start) end = start\\n\\n  // Copy 0 bytes; we're done\\n  if (end === start) return 0\\n  if (target.length === 0 || this.length === 0) return 0\\n\\n  // Fatal error conditions\\n  if (targetStart < 0) {\\n    throw new RangeError('targetStart out of bounds')\\n  }\\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\\n\\n  // Are we oob?\\n  if (end > this.length) end = this.length\\n  if (target.length - targetStart < end - start) {\\n    end = target.length - targetStart + start\\n  }\\n\\n  var len = end - start\\n  var i\\n\\n  if (this === target && start < targetStart && targetStart < end) {\\n    // descending copy from end\\n    for (i = len - 1; i >= 0; --i) {\\n      target[i + targetStart] = this[i + start]\\n    }\\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\\n    // ascending copy from start\\n    for (i = 0; i < len; ++i) {\\n      target[i + targetStart] = this[i + start]\\n    }\\n  } else {\\n    Uint8Array.prototype.set.call(\\n      target,\\n      this.subarray(start, start + len),\\n      targetStart\\n    )\\n  }\\n\\n  return len\\n}\\n\\n// Usage:\\n//    buffer.fill(number[, offset[, end]])\\n//    buffer.fill(buffer[, offset[, end]])\\n//    buffer.fill(string[, offset[, end]][, encoding])\\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\\n  // Handle string cases:\\n  if (typeof val === 'string') {\\n    if (typeof start === 'string') {\\n      encoding = start\\n      start = 0\\n      end = this.length\\n    } else if (typeof end === 'string') {\\n      encoding = end\\n      end = this.length\\n    }\\n    if (val.length === 1) {\\n      var code = val.charCodeAt(0)\\n      if (code < 256) {\\n        val = code\\n      }\\n    }\\n    if (encoding !== undefined && typeof encoding !== 'string') {\\n      throw new TypeError('encoding must be a string')\\n    }\\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\\n      throw new TypeError('Unknown encoding: ' + encoding)\\n    }\\n  } else if (typeof val === 'number') {\\n    val = val & 255\\n  }\\n\\n  // Invalid ranges are not set to a default, so can range check early.\\n  if (start < 0 || this.length < start || this.length < end) {\\n    throw new RangeError('Out of range index')\\n  }\\n\\n  if (end <= start) {\\n    return this\\n  }\\n\\n  start = start >>> 0\\n  end = end === undefined ? this.length : end >>> 0\\n\\n  if (!val) val = 0\\n\\n  var i\\n  if (typeof val === 'number') {\\n    for (i = start; i < end; ++i) {\\n      this[i] = val\\n    }\\n  } else {\\n    var bytes = Buffer.isBuffer(val)\\n      ? val\\n      : utf8ToBytes(new Buffer(val, encoding).toString())\\n    var len = bytes.length\\n    for (i = 0; i < end - start; ++i) {\\n      this[i + start] = bytes[i % len]\\n    }\\n  }\\n\\n  return this\\n}\\n\\n// HELPER FUNCTIONS\\n// ================\\n\\nvar INVALID_BASE64_RE = /[^+\\\\/0-9A-Za-z-_]/g\\n\\nfunction base64clean (str) {\\n  // Node strips out invalid characters like \\\\n and \\\\t from the string, base64-js does not\\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\\n  // Node converts strings with length < 2 to ''\\n  if (str.length < 2) return ''\\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\\n  while (str.length % 4 !== 0) {\\n    str = str + '='\\n  }\\n  return str\\n}\\n\\nfunction stringtrim (str) {\\n  if (str.trim) return str.trim()\\n  return str.replace(/^\\\\s+|\\\\s+$/g, '')\\n}\\n\\nfunction toHex (n) {\\n  if (n < 16) return '0' + n.toString(16)\\n  return n.toString(16)\\n}\\n\\nfunction utf8ToBytes (string, units) {\\n  units = units || Infinity\\n  var codePoint\\n  var length = string.length\\n  var leadSurrogate = null\\n  var bytes = []\\n\\n  for (var i = 0; i < length; ++i) {\\n    codePoint = string.charCodeAt(i)\\n\\n    // is surrogate component\\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\\n      // last char was a lead\\n      if (!leadSurrogate) {\\n        // no lead yet\\n        if (codePoint > 0xDBFF) {\\n          // unexpected trail\\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n          continue\\n        } else if (i + 1 === length) {\\n          // unpaired lead\\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n          continue\\n        }\\n\\n        // valid lead\\n        leadSurrogate = codePoint\\n\\n        continue\\n      }\\n\\n      // 2 leads in a row\\n      if (codePoint < 0xDC00) {\\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n        leadSurrogate = codePoint\\n        continue\\n      }\\n\\n      // valid surrogate pair\\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\\n    } else if (leadSurrogate) {\\n      // valid bmp char, but last char was a lead\\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\\n    }\\n\\n    leadSurrogate = null\\n\\n    // encode utf8\\n    if (codePoint < 0x80) {\\n      if ((units -= 1) < 0) break\\n      bytes.push(codePoint)\\n    } else if (codePoint < 0x800) {\\n      if ((units -= 2) < 0) break\\n      bytes.push(\\n        codePoint >> 0x6 | 0xC0,\\n        codePoint & 0x3F | 0x80\\n      )\\n    } else if (codePoint < 0x10000) {\\n      if ((units -= 3) < 0) break\\n      bytes.push(\\n        codePoint >> 0xC | 0xE0,\\n        codePoint >> 0x6 & 0x3F | 0x80,\\n        codePoint & 0x3F | 0x80\\n      )\\n    } else if (codePoint < 0x110000) {\\n      if ((units -= 4) < 0) break\\n      bytes.push(\\n        codePoint >> 0x12 | 0xF0,\\n        codePoint >> 0xC & 0x3F | 0x80,\\n        codePoint >> 0x6 & 0x3F | 0x80,\\n        codePoint & 0x3F | 0x80\\n      )\\n    } else {\\n      throw new Error('Invalid code point')\\n    }\\n  }\\n\\n  return bytes\\n}\\n\\nfunction asciiToBytes (str) {\\n  var byteArray = []\\n  for (var i = 0; i < str.length; ++i) {\\n    // Node's code seems to be doing this and not & 0x7F..\\n    byteArray.push(str.charCodeAt(i) & 0xFF)\\n  }\\n  return byteArray\\n}\\n\\nfunction utf16leToBytes (str, units) {\\n  var c, hi, lo\\n  var byteArray = []\\n  for (var i = 0; i < str.length; ++i) {\\n    if ((units -= 2) < 0) break\\n\\n    c = str.charCodeAt(i)\\n    hi = c >> 8\\n    lo = c % 256\\n    byteArray.push(lo)\\n    byteArray.push(hi)\\n  }\\n\\n  return byteArray\\n}\\n\\nfunction base64ToBytes (str) {\\n  return base64.toByteArray(base64clean(str))\\n}\\n\\nfunction blitBuffer (src, dst, offset, length) {\\n  for (var i = 0; i < length; ++i) {\\n    if ((i + offset >= dst.length) || (i >= src.length)) break\\n    dst[i + offset] = src[i]\\n  }\\n  return i\\n}\\n\\nfunction isnan (val) {\\n  return val !== val // eslint-disable-line no-self-compare\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/node-libs-browser/node_modules/buffer/index.js?\")},\"../node_modules/pkcs7/dist/pkcs7.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval('__webpack_require__.r(__webpack_exports__);\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pad\", function() { return pad; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unpad\", function() { return unpad; });\\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VERSION\", function() { return version; });\\n/*\\n * pkcs7.pad\\n * https://github.com/brightcove/pkcs7\\n *\\n * Copyright (c) 2014 Brightcove\\n * Licensed under the apache2 license.\\n */\\n\\nvar PADDING = void 0;\\n\\n/**\\n * Returns a new Uint8Array that is padded with PKCS#7 padding.\\n * @param plaintext {Uint8Array} the input bytes before encryption\\n * @return {Uint8Array} the padded bytes\\n * @see http://tools.ietf.org/html/rfc5652\\n */\\nfunction pad(plaintext) {\\n  var padding = PADDING[plaintext.byteLength % 16 || 0];\\n  var result = new Uint8Array(plaintext.byteLength + padding.length);\\n\\n  result.set(plaintext);\\n  result.set(padding, plaintext.byteLength);\\n\\n  return result;\\n}\\n\\n// pre-define the padding values\\nPADDING = [[16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16], [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15], [14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14], [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13], [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [9, 9, 9, 9, 9, 9, 9, 9, 9], [8, 8, 8, 8, 8, 8, 8, 8], [7, 7, 7, 7, 7, 7, 7], [6, 6, 6, 6, 6, 6], [5, 5, 5, 5, 5], [4, 4, 4, 4], [3, 3, 3], [2, 2], [1]];\\n\\n/**\\n * Returns the subarray of a Uint8Array without PKCS#7 padding.\\n * @param padded {Uint8Array} unencrypted bytes that have been padded\\n * @return {Uint8Array} the unpadded bytes\\n * @see http://tools.ietf.org/html/rfc5652\\n */\\nfunction unpad(padded) {\\n  return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\\n}\\n\\nvar version = \"1.0.2\";\\n\\n\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/pkcs7/dist/pkcs7.es.js?')},\"../node_modules/process-nextick-args/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/* WEBPACK VAR INJECTION */(function(process) {\\n\\nif (typeof process === 'undefined' ||\\n    !process.version ||\\n    process.version.indexOf('v0.') === 0 ||\\n    process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\\n  module.exports = { nextTick: nextTick };\\n} else {\\n  module.exports = process\\n}\\n\\nfunction nextTick(fn, arg1, arg2, arg3) {\\n  if (typeof fn !== 'function') {\\n    throw new TypeError('\\\"callback\\\" argument must be a function');\\n  }\\n  var len = arguments.length;\\n  var args, i;\\n  switch (len) {\\n  case 0:\\n  case 1:\\n    return process.nextTick(fn);\\n  case 2:\\n    return process.nextTick(function afterTickOne() {\\n      fn.call(null, arg1);\\n    });\\n  case 3:\\n    return process.nextTick(function afterTickTwo() {\\n      fn.call(null, arg1, arg2);\\n    });\\n  case 4:\\n    return process.nextTick(function afterTickThree() {\\n      fn.call(null, arg1, arg2, arg3);\\n    });\\n  default:\\n    args = new Array(len - 1);\\n    i = 0;\\n    while (i < args.length) {\\n      args[i++] = arguments[i];\\n    }\\n    return process.nextTick(function afterTick() {\\n      fn.apply(null, args);\\n    });\\n  }\\n}\\n\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \\\"../node_modules/process/browser.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/process-nextick-args/index.js?\")},\"../node_modules/process/browser.js\":function(module,exports){eval(\"// shim for using process in browser\\nvar process = module.exports = {};\\n\\n// cached from whatever global is present so that test runners that stub it\\n// don't break things.  But we need to wrap it in a try catch in case it is\\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\\n// function because try/catches deoptimize in certain engines.\\n\\nvar cachedSetTimeout;\\nvar cachedClearTimeout;\\n\\nfunction defaultSetTimout() {\\n    throw new Error('setTimeout has not been defined');\\n}\\nfunction defaultClearTimeout () {\\n    throw new Error('clearTimeout has not been defined');\\n}\\n(function () {\\n    try {\\n        if (typeof setTimeout === 'function') {\\n            cachedSetTimeout = setTimeout;\\n        } else {\\n            cachedSetTimeout = defaultSetTimout;\\n        }\\n    } catch (e) {\\n        cachedSetTimeout = defaultSetTimout;\\n    }\\n    try {\\n        if (typeof clearTimeout === 'function') {\\n            cachedClearTimeout = clearTimeout;\\n        } else {\\n            cachedClearTimeout = defaultClearTimeout;\\n        }\\n    } catch (e) {\\n        cachedClearTimeout = defaultClearTimeout;\\n    }\\n} ())\\nfunction runTimeout(fun) {\\n    if (cachedSetTimeout === setTimeout) {\\n        //normal enviroments in sane situations\\n        return setTimeout(fun, 0);\\n    }\\n    // if setTimeout wasn't available but was latter defined\\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\\n        cachedSetTimeout = setTimeout;\\n        return setTimeout(fun, 0);\\n    }\\n    try {\\n        // when when somebody has screwed with setTimeout but no I.E. maddness\\n        return cachedSetTimeout(fun, 0);\\n    } catch(e){\\n        try {\\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n            return cachedSetTimeout.call(null, fun, 0);\\n        } catch(e){\\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\\n            return cachedSetTimeout.call(this, fun, 0);\\n        }\\n    }\\n\\n\\n}\\nfunction runClearTimeout(marker) {\\n    if (cachedClearTimeout === clearTimeout) {\\n        //normal enviroments in sane situations\\n        return clearTimeout(marker);\\n    }\\n    // if clearTimeout wasn't available but was latter defined\\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\\n        cachedClearTimeout = clearTimeout;\\n        return clearTimeout(marker);\\n    }\\n    try {\\n        // when when somebody has screwed with setTimeout but no I.E. maddness\\n        return cachedClearTimeout(marker);\\n    } catch (e){\\n        try {\\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\\n            return cachedClearTimeout.call(null, marker);\\n        } catch (e){\\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\\n            return cachedClearTimeout.call(this, marker);\\n        }\\n    }\\n\\n\\n\\n}\\nvar queue = [];\\nvar draining = false;\\nvar currentQueue;\\nvar queueIndex = -1;\\n\\nfunction cleanUpNextTick() {\\n    if (!draining || !currentQueue) {\\n        return;\\n    }\\n    draining = false;\\n    if (currentQueue.length) {\\n        queue = currentQueue.concat(queue);\\n    } else {\\n        queueIndex = -1;\\n    }\\n    if (queue.length) {\\n        drainQueue();\\n    }\\n}\\n\\nfunction drainQueue() {\\n    if (draining) {\\n        return;\\n    }\\n    var timeout = runTimeout(cleanUpNextTick);\\n    draining = true;\\n\\n    var len = queue.length;\\n    while(len) {\\n        currentQueue = queue;\\n        queue = [];\\n        while (++queueIndex < len) {\\n            if (currentQueue) {\\n                currentQueue[queueIndex].run();\\n            }\\n        }\\n        queueIndex = -1;\\n        len = queue.length;\\n    }\\n    currentQueue = null;\\n    draining = false;\\n    runClearTimeout(timeout);\\n}\\n\\nprocess.nextTick = function (fun) {\\n    var args = new Array(arguments.length - 1);\\n    if (arguments.length > 1) {\\n        for (var i = 1; i < arguments.length; i++) {\\n            args[i - 1] = arguments[i];\\n        }\\n    }\\n    queue.push(new Item(fun, args));\\n    if (queue.length === 1 && !draining) {\\n        runTimeout(drainQueue);\\n    }\\n};\\n\\n// v8 likes predictible objects\\nfunction Item(fun, array) {\\n    this.fun = fun;\\n    this.array = array;\\n}\\nItem.prototype.run = function () {\\n    this.fun.apply(null, this.array);\\n};\\nprocess.title = 'browser';\\nprocess.browser = true;\\nprocess.env = {};\\nprocess.argv = [];\\nprocess.version = ''; // empty string to avoid regexp issues\\nprocess.versions = {};\\n\\nfunction noop() {}\\n\\nprocess.on = noop;\\nprocess.addListener = noop;\\nprocess.once = noop;\\nprocess.off = noop;\\nprocess.removeListener = noop;\\nprocess.removeAllListeners = noop;\\nprocess.emit = noop;\\nprocess.prependListener = noop;\\nprocess.prependOnceListener = noop;\\n\\nprocess.listeners = function (name) { return [] }\\n\\nprocess.binding = function (name) {\\n    throw new Error('process.binding is not supported');\\n};\\n\\nprocess.cwd = function () { return '/' };\\nprocess.chdir = function (dir) {\\n    throw new Error('process.chdir is not supported');\\n};\\nprocess.umask = function() { return 0; };\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/process/browser.js?\")},\"../node_modules/promise-polyfill/promise.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(setImmediate) {(function (root) {\\n\\n  // Store setTimeout reference so promise-polyfill will be unaffected by\\n  // other code modifying setTimeout (like sinon.useFakeTimers())\\n  var setTimeoutFunc = setTimeout;\\n\\n  function noop() {}\\n  \\n  // Polyfill for Function.prototype.bind\\n  function bind(fn, thisArg) {\\n    return function () {\\n      fn.apply(thisArg, arguments);\\n    };\\n  }\\n\\n  function Promise(fn) {\\n    if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');\\n    if (typeof fn !== 'function') throw new TypeError('not a function');\\n    this._state = 0;\\n    this._handled = false;\\n    this._value = undefined;\\n    this._deferreds = [];\\n\\n    doResolve(fn, this);\\n  }\\n\\n  function handle(self, deferred) {\\n    while (self._state === 3) {\\n      self = self._value;\\n    }\\n    if (self._state === 0) {\\n      self._deferreds.push(deferred);\\n      return;\\n    }\\n    self._handled = true;\\n    Promise._immediateFn(function () {\\n      var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\\n      if (cb === null) {\\n        (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\\n        return;\\n      }\\n      var ret;\\n      try {\\n        ret = cb(self._value);\\n      } catch (e) {\\n        reject(deferred.promise, e);\\n        return;\\n      }\\n      resolve(deferred.promise, ret);\\n    });\\n  }\\n\\n  function resolve(self, newValue) {\\n    try {\\n      // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\\n      if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');\\n      if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\\n        var then = newValue.then;\\n        if (newValue instanceof Promise) {\\n          self._state = 3;\\n          self._value = newValue;\\n          finale(self);\\n          return;\\n        } else if (typeof then === 'function') {\\n          doResolve(bind(then, newValue), self);\\n          return;\\n        }\\n      }\\n      self._state = 1;\\n      self._value = newValue;\\n      finale(self);\\n    } catch (e) {\\n      reject(self, e);\\n    }\\n  }\\n\\n  function reject(self, newValue) {\\n    self._state = 2;\\n    self._value = newValue;\\n    finale(self);\\n  }\\n\\n  function finale(self) {\\n    if (self._state === 2 && self._deferreds.length === 0) {\\n      Promise._immediateFn(function() {\\n        if (!self._handled) {\\n          Promise._unhandledRejectionFn(self._value);\\n        }\\n      });\\n    }\\n\\n    for (var i = 0, len = self._deferreds.length; i < len; i++) {\\n      handle(self, self._deferreds[i]);\\n    }\\n    self._deferreds = null;\\n  }\\n\\n  function Handler(onFulfilled, onRejected, promise) {\\n    this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\\n    this.onRejected = typeof onRejected === 'function' ? onRejected : null;\\n    this.promise = promise;\\n  }\\n\\n  /**\\n   * Take a potentially misbehaving resolver function and make sure\\n   * onFulfilled and onRejected are only called once.\\n   *\\n   * Makes no guarantees about asynchrony.\\n   */\\n  function doResolve(fn, self) {\\n    var done = false;\\n    try {\\n      fn(function (value) {\\n        if (done) return;\\n        done = true;\\n        resolve(self, value);\\n      }, function (reason) {\\n        if (done) return;\\n        done = true;\\n        reject(self, reason);\\n      });\\n    } catch (ex) {\\n      if (done) return;\\n      done = true;\\n      reject(self, ex);\\n    }\\n  }\\n\\n  Promise.prototype['catch'] = function (onRejected) {\\n    return this.then(null, onRejected);\\n  };\\n\\n  Promise.prototype.then = function (onFulfilled, onRejected) {\\n    var prom = new (this.constructor)(noop);\\n\\n    handle(this, new Handler(onFulfilled, onRejected, prom));\\n    return prom;\\n  };\\n\\n  Promise.all = function (arr) {\\n    return new Promise(function (resolve, reject) {\\n      if (!arr || typeof arr.length === 'undefined') throw new TypeError('Promise.all accepts an array');\\n      var args = Array.prototype.slice.call(arr);\\n      if (args.length === 0) return resolve([]);\\n      var remaining = args.length;\\n\\n      function res(i, val) {\\n        try {\\n          if (val && (typeof val === 'object' || typeof val === 'function')) {\\n            var then = val.then;\\n            if (typeof then === 'function') {\\n              then.call(val, function (val) {\\n                res(i, val);\\n              }, reject);\\n              return;\\n            }\\n          }\\n          args[i] = val;\\n          if (--remaining === 0) {\\n            resolve(args);\\n          }\\n        } catch (ex) {\\n          reject(ex);\\n        }\\n      }\\n\\n      for (var i = 0; i < args.length; i++) {\\n        res(i, args[i]);\\n      }\\n    });\\n  };\\n\\n  Promise.resolve = function (value) {\\n    if (value && typeof value === 'object' && value.constructor === Promise) {\\n      return value;\\n    }\\n\\n    return new Promise(function (resolve) {\\n      resolve(value);\\n    });\\n  };\\n\\n  Promise.reject = function (value) {\\n    return new Promise(function (resolve, reject) {\\n      reject(value);\\n    });\\n  };\\n\\n  Promise.race = function (values) {\\n    return new Promise(function (resolve, reject) {\\n      for (var i = 0, len = values.length; i < len; i++) {\\n        values[i].then(resolve, reject);\\n      }\\n    });\\n  };\\n\\n  // Use polyfill for setImmediate for performance gains\\n  Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||\\n    function (fn) {\\n      setTimeoutFunc(fn, 0);\\n    };\\n\\n  Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\\n    if (typeof console !== 'undefined' && console) {\\n      console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\\n    }\\n  };\\n\\n  /**\\n   * Set the immediate function to execute callbacks\\n   * @param fn {function} Function to execute\\n   * @deprecated\\n   */\\n  Promise._setImmediateFn = function _setImmediateFn(fn) {\\n    Promise._immediateFn = fn;\\n  };\\n\\n  /**\\n   * Change the function to execute on unhandled rejection\\n   * @param {function} fn Function to execute on unhandled rejection\\n   * @deprecated\\n   */\\n  Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\\n    Promise._unhandledRejectionFn = fn;\\n  };\\n  \\n  if ( true && module.exports) {\\n    module.exports = Promise;\\n  } else if (!root.Promise) {\\n    root.Promise = Promise;\\n  }\\n\\n})(this);\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../timers-browserify/main.js */ \\\"../node_modules/timers-browserify/main.js\\\").setImmediate))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/promise-polyfill/promise.js?\")},\"../node_modules/readable-stream/duplex-browser.js\":function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ \"../node_modules/readable-stream/lib/_stream_duplex.js\");\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/duplex-browser.js?')},\"../node_modules/readable-stream/lib/_stream_duplex.js\":function(module,exports,__webpack_require__){\"use strict\";eval('// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \"Software\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// a duplex stream is just a stream that is both readable and writable.\\n// Since JS doesn\\'t have multiple prototypal inheritance, this class\\n// prototypally inherits from Readable, and then parasitically from\\n// Writable.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \"../node_modules/process-nextick-args/index.js\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar objectKeys = Object.keys || function (obj) {\\n  var keys = [];\\n  for (var key in obj) {\\n    keys.push(key);\\n  }return keys;\\n};\\n/*</replacement>*/\\n\\nmodule.exports = Duplex;\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"../node_modules/core-util-is/lib/util.js\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \"../node_modules/inherits/inherits_browser.js\");\\n/*</replacement>*/\\n\\nvar Readable = __webpack_require__(/*! ./_stream_readable */ \"../node_modules/readable-stream/lib/_stream_readable.js\");\\nvar Writable = __webpack_require__(/*! ./_stream_writable */ \"../node_modules/readable-stream/lib/_stream_writable.js\");\\n\\nutil.inherits(Duplex, Readable);\\n\\n{\\n  // avoid scope creep, the keys array can then be collected\\n  var keys = objectKeys(Writable.prototype);\\n  for (var v = 0; v < keys.length; v++) {\\n    var method = keys[v];\\n    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\\n  }\\n}\\n\\nfunction Duplex(options) {\\n  if (!(this instanceof Duplex)) return new Duplex(options);\\n\\n  Readable.call(this, options);\\n  Writable.call(this, options);\\n\\n  if (options && options.readable === false) this.readable = false;\\n\\n  if (options && options.writable === false) this.writable = false;\\n\\n  this.allowHalfOpen = true;\\n  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\\n\\n  this.once(\\'end\\', onend);\\n}\\n\\nObject.defineProperty(Duplex.prototype, \\'writableHighWaterMark\\', {\\n  // making it explicit this property is not enumerable\\n  // because otherwise some prototype manipulation in\\n  // userland will fail\\n  enumerable: false,\\n  get: function () {\\n    return this._writableState.highWaterMark;\\n  }\\n});\\n\\n// the no-half-open enforcer\\nfunction onend() {\\n  // if we allow half-open state, or if the writable side ended,\\n  // then we\\'re ok.\\n  if (this.allowHalfOpen || this._writableState.ended) return;\\n\\n  // no more data can be written.\\n  // But allow more writes to happen in this tick.\\n  pna.nextTick(onEndNT, this);\\n}\\n\\nfunction onEndNT(self) {\\n  self.end();\\n}\\n\\nObject.defineProperty(Duplex.prototype, \\'destroyed\\', {\\n  get: function () {\\n    if (this._readableState === undefined || this._writableState === undefined) {\\n      return false;\\n    }\\n    return this._readableState.destroyed && this._writableState.destroyed;\\n  },\\n  set: function (value) {\\n    // we ignore the value if the stream\\n    // has not been initialized yet\\n    if (this._readableState === undefined || this._writableState === undefined) {\\n      return;\\n    }\\n\\n    // backward compatibility, the user is explicitly\\n    // managing destroyed\\n    this._readableState.destroyed = value;\\n    this._writableState.destroyed = value;\\n  }\\n});\\n\\nDuplex.prototype._destroy = function (err, cb) {\\n  this.push(null);\\n  this.end();\\n\\n  pna.nextTick(cb, err);\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_duplex.js?')},\"../node_modules/readable-stream/lib/_stream_passthrough.js\":function(module,exports,__webpack_require__){\"use strict\";eval('// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \"Software\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// a passthrough stream.\\n// basically just the most minimal sort of Transform stream.\\n// Every written chunk gets output as-is.\\n\\n\\n\\nmodule.exports = PassThrough;\\n\\nvar Transform = __webpack_require__(/*! ./_stream_transform */ \"../node_modules/readable-stream/lib/_stream_transform.js\");\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"../node_modules/core-util-is/lib/util.js\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \"../node_modules/inherits/inherits_browser.js\");\\n/*</replacement>*/\\n\\nutil.inherits(PassThrough, Transform);\\n\\nfunction PassThrough(options) {\\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\\n\\n  Transform.call(this, options);\\n}\\n\\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\\n  cb(null, chunk);\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_passthrough.js?')},\"../node_modules/readable-stream/lib/_stream_readable.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\nmodule.exports = Readable;\\n\\n/*<replacement>*/\\nvar isArray = __webpack_require__(/*! isarray */ \\\"../node_modules/isarray/index.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Duplex;\\n/*</replacement>*/\\n\\nReadable.ReadableState = ReadableState;\\n\\n/*<replacement>*/\\nvar EE = __webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\").EventEmitter;\\n\\nvar EElistenerCount = function (emitter, type) {\\n  return emitter.listeners(type).length;\\n};\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \\\"../node_modules/readable-stream/lib/internal/streams/stream-browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\\\").Buffer;\\nvar OurUint8Array = global.Uint8Array || function () {};\\nfunction _uint8ArrayToBuffer(chunk) {\\n  return Buffer.from(chunk);\\n}\\nfunction _isUint8Array(obj) {\\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\\n}\\n\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar debugUtil = __webpack_require__(/*! util */ 2);\\nvar debug = void 0;\\nif (debugUtil && debugUtil.debuglog) {\\n  debug = debugUtil.debuglog('stream');\\n} else {\\n  debug = function () {};\\n}\\n/*</replacement>*/\\n\\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \\\"../node_modules/readable-stream/lib/internal/streams/BufferList.js\\\");\\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \\\"../node_modules/readable-stream/lib/internal/streams/destroy.js\\\");\\nvar StringDecoder;\\n\\nutil.inherits(Readable, Stream);\\n\\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\\n\\nfunction prependListener(emitter, event, fn) {\\n  // Sadly this is not cacheable as some libraries bundle their own\\n  // event emitter implementation with them.\\n  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\\n\\n  // This is a hack to make sure that our error handler is attached before any\\n  // userland ones.  NEVER DO THIS. This is here only because this code needs\\n  // to continue to work with older versions of Node.js that do not include\\n  // the prependListener() method. The goal is to eventually remove this hack.\\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\\n}\\n\\nfunction ReadableState(options, stream) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  options = options || {};\\n\\n  // Duplex streams are both readable and writable, but share\\n  // the same options object.\\n  // However, some cases require setting options to different\\n  // values for the readable and the writable sides of the duplex stream.\\n  // These options can be provided separately as readableXXX and writableXXX.\\n  var isDuplex = stream instanceof Duplex;\\n\\n  // object stream flag. Used to make read(n) ignore n and to\\n  // make all the buffer merging and length checks go away\\n  this.objectMode = !!options.objectMode;\\n\\n  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\\n\\n  // the point at which it stops calling _read() to fill the buffer\\n  // Note: 0 is a valid value, means \\\"don't call _read preemptively ever\\\"\\n  var hwm = options.highWaterMark;\\n  var readableHwm = options.readableHighWaterMark;\\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\\n\\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\\n\\n  // cast to ints.\\n  this.highWaterMark = Math.floor(this.highWaterMark);\\n\\n  // A linked list is used to store data chunks instead of an array because the\\n  // linked list can remove elements from the beginning faster than\\n  // array.shift()\\n  this.buffer = new BufferList();\\n  this.length = 0;\\n  this.pipes = null;\\n  this.pipesCount = 0;\\n  this.flowing = null;\\n  this.ended = false;\\n  this.endEmitted = false;\\n  this.reading = false;\\n\\n  // a flag to be able to tell if the event 'readable'/'data' is emitted\\n  // immediately, or on a later tick.  We set this to true at first, because\\n  // any actions that shouldn't happen until \\\"later\\\" should generally also\\n  // not happen before the first read call.\\n  this.sync = true;\\n\\n  // whenever we return null, then we set a flag to say\\n  // that we're awaiting a 'readable' event emission.\\n  this.needReadable = false;\\n  this.emittedReadable = false;\\n  this.readableListening = false;\\n  this.resumeScheduled = false;\\n\\n  // has it been destroyed\\n  this.destroyed = false;\\n\\n  // Crypto is kind of old and crusty.  Historically, its default string\\n  // encoding is 'binary' so we have to make this configurable.\\n  // Everything else in the universe uses 'utf8', though.\\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\\n\\n  // the number of writers that are awaiting a drain event in .pipe()s\\n  this.awaitDrain = 0;\\n\\n  // if true, a maybeReadMore has been scheduled\\n  this.readingMore = false;\\n\\n  this.decoder = null;\\n  this.encoding = null;\\n  if (options.encoding) {\\n    if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \\\"../node_modules/string_decoder/lib/string_decoder.js\\\").StringDecoder;\\n    this.decoder = new StringDecoder(options.encoding);\\n    this.encoding = options.encoding;\\n  }\\n}\\n\\nfunction Readable(options) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  if (!(this instanceof Readable)) return new Readable(options);\\n\\n  this._readableState = new ReadableState(options, this);\\n\\n  // legacy\\n  this.readable = true;\\n\\n  if (options) {\\n    if (typeof options.read === 'function') this._read = options.read;\\n\\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\\n  }\\n\\n  Stream.call(this);\\n}\\n\\nObject.defineProperty(Readable.prototype, 'destroyed', {\\n  get: function () {\\n    if (this._readableState === undefined) {\\n      return false;\\n    }\\n    return this._readableState.destroyed;\\n  },\\n  set: function (value) {\\n    // we ignore the value if the stream\\n    // has not been initialized yet\\n    if (!this._readableState) {\\n      return;\\n    }\\n\\n    // backward compatibility, the user is explicitly\\n    // managing destroyed\\n    this._readableState.destroyed = value;\\n  }\\n});\\n\\nReadable.prototype.destroy = destroyImpl.destroy;\\nReadable.prototype._undestroy = destroyImpl.undestroy;\\nReadable.prototype._destroy = function (err, cb) {\\n  this.push(null);\\n  cb(err);\\n};\\n\\n// Manually shove something into the read() buffer.\\n// This returns true if the highWaterMark has not been hit yet,\\n// similar to how Writable.write() returns true if you should\\n// write() some more.\\nReadable.prototype.push = function (chunk, encoding) {\\n  var state = this._readableState;\\n  var skipChunkCheck;\\n\\n  if (!state.objectMode) {\\n    if (typeof chunk === 'string') {\\n      encoding = encoding || state.defaultEncoding;\\n      if (encoding !== state.encoding) {\\n        chunk = Buffer.from(chunk, encoding);\\n        encoding = '';\\n      }\\n      skipChunkCheck = true;\\n    }\\n  } else {\\n    skipChunkCheck = true;\\n  }\\n\\n  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\\n};\\n\\n// Unshift should *always* be something directly out of read()\\nReadable.prototype.unshift = function (chunk) {\\n  return readableAddChunk(this, chunk, null, true, false);\\n};\\n\\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\\n  var state = stream._readableState;\\n  if (chunk === null) {\\n    state.reading = false;\\n    onEofChunk(stream, state);\\n  } else {\\n    var er;\\n    if (!skipChunkCheck) er = chunkInvalid(state, chunk);\\n    if (er) {\\n      stream.emit('error', er);\\n    } else if (state.objectMode || chunk && chunk.length > 0) {\\n      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\\n        chunk = _uint8ArrayToBuffer(chunk);\\n      }\\n\\n      if (addToFront) {\\n        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\\n      } else if (state.ended) {\\n        stream.emit('error', new Error('stream.push() after EOF'));\\n      } else {\\n        state.reading = false;\\n        if (state.decoder && !encoding) {\\n          chunk = state.decoder.write(chunk);\\n          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\\n        } else {\\n          addChunk(stream, state, chunk, false);\\n        }\\n      }\\n    } else if (!addToFront) {\\n      state.reading = false;\\n    }\\n  }\\n\\n  return needMoreData(state);\\n}\\n\\nfunction addChunk(stream, state, chunk, addToFront) {\\n  if (state.flowing && state.length === 0 && !state.sync) {\\n    stream.emit('data', chunk);\\n    stream.read(0);\\n  } else {\\n    // update the buffer info.\\n    state.length += state.objectMode ? 1 : chunk.length;\\n    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\\n\\n    if (state.needReadable) emitReadable(stream);\\n  }\\n  maybeReadMore(stream, state);\\n}\\n\\nfunction chunkInvalid(state, chunk) {\\n  var er;\\n  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\\n    er = new TypeError('Invalid non-string/buffer chunk');\\n  }\\n  return er;\\n}\\n\\n// if it's past the high water mark, we can push in some more.\\n// Also, if we have no data yet, we can stand some\\n// more bytes.  This is to work around cases where hwm=0,\\n// such as the repl.  Also, if the push() triggered a\\n// readable event, and the user called read(largeNumber) such that\\n// needReadable was set, then we ought to push more, so that another\\n// 'readable' event will be triggered.\\nfunction needMoreData(state) {\\n  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\\n}\\n\\nReadable.prototype.isPaused = function () {\\n  return this._readableState.flowing === false;\\n};\\n\\n// backwards compatibility.\\nReadable.prototype.setEncoding = function (enc) {\\n  if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ \\\"../node_modules/string_decoder/lib/string_decoder.js\\\").StringDecoder;\\n  this._readableState.decoder = new StringDecoder(enc);\\n  this._readableState.encoding = enc;\\n  return this;\\n};\\n\\n// Don't raise the hwm > 8MB\\nvar MAX_HWM = 0x800000;\\nfunction computeNewHighWaterMark(n) {\\n  if (n >= MAX_HWM) {\\n    n = MAX_HWM;\\n  } else {\\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\\n    // tiny amounts\\n    n--;\\n    n |= n >>> 1;\\n    n |= n >>> 2;\\n    n |= n >>> 4;\\n    n |= n >>> 8;\\n    n |= n >>> 16;\\n    n++;\\n  }\\n  return n;\\n}\\n\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction howMuchToRead(n, state) {\\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\\n  if (state.objectMode) return 1;\\n  if (n !== n) {\\n    // Only flow one buffer at a time\\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\\n  }\\n  // If we're asking for more than the current hwm, then raise the hwm.\\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\\n  if (n <= state.length) return n;\\n  // Don't have enough\\n  if (!state.ended) {\\n    state.needReadable = true;\\n    return 0;\\n  }\\n  return state.length;\\n}\\n\\n// you can override either this method, or the async _read(n) below.\\nReadable.prototype.read = function (n) {\\n  debug('read', n);\\n  n = parseInt(n, 10);\\n  var state = this._readableState;\\n  var nOrig = n;\\n\\n  if (n !== 0) state.emittedReadable = false;\\n\\n  // if we're doing read(0) to trigger a readable event, but we\\n  // already have a bunch of data in the buffer, then just trigger\\n  // the 'readable' event and move on.\\n  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\\n    debug('read: emitReadable', state.length, state.ended);\\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\\n    return null;\\n  }\\n\\n  n = howMuchToRead(n, state);\\n\\n  // if we've ended, and we're now clear, then finish it up.\\n  if (n === 0 && state.ended) {\\n    if (state.length === 0) endReadable(this);\\n    return null;\\n  }\\n\\n  // All the actual chunk generation logic needs to be\\n  // *below* the call to _read.  The reason is that in certain\\n  // synthetic stream cases, such as passthrough streams, _read\\n  // may be a completely synchronous operation which may change\\n  // the state of the read buffer, providing enough data when\\n  // before there was *not* enough.\\n  //\\n  // So, the steps are:\\n  // 1. Figure out what the state of things will be after we do\\n  // a read from the buffer.\\n  //\\n  // 2. If that resulting state will trigger a _read, then call _read.\\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\\n  // deeply ugly to write APIs this way, but that still doesn't mean\\n  // that the Readable class should behave improperly, as streams are\\n  // designed to be sync/async agnostic.\\n  // Take note if the _read call is sync or async (ie, if the read call\\n  // has returned yet), so that we know whether or not it's safe to emit\\n  // 'readable' etc.\\n  //\\n  // 3. Actually pull the requested chunks out of the buffer and return.\\n\\n  // if we need a readable event, then we need to do some reading.\\n  var doRead = state.needReadable;\\n  debug('need readable', doRead);\\n\\n  // if we currently have less than the highWaterMark, then also read some\\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\\n    doRead = true;\\n    debug('length less than watermark', doRead);\\n  }\\n\\n  // however, if we've ended, then there's no point, and if we're already\\n  // reading, then it's unnecessary.\\n  if (state.ended || state.reading) {\\n    doRead = false;\\n    debug('reading or ended', doRead);\\n  } else if (doRead) {\\n    debug('do read');\\n    state.reading = true;\\n    state.sync = true;\\n    // if the length is currently zero, then we *need* a readable event.\\n    if (state.length === 0) state.needReadable = true;\\n    // call internal read method\\n    this._read(state.highWaterMark);\\n    state.sync = false;\\n    // If _read pushed data synchronously, then `reading` will be false,\\n    // and we need to re-evaluate how much data we can return to the user.\\n    if (!state.reading) n = howMuchToRead(nOrig, state);\\n  }\\n\\n  var ret;\\n  if (n > 0) ret = fromList(n, state);else ret = null;\\n\\n  if (ret === null) {\\n    state.needReadable = true;\\n    n = 0;\\n  } else {\\n    state.length -= n;\\n  }\\n\\n  if (state.length === 0) {\\n    // If we have nothing in the buffer, then we want to know\\n    // as soon as we *do* get something into the buffer.\\n    if (!state.ended) state.needReadable = true;\\n\\n    // If we tried to read() past the EOF, then emit end on the next tick.\\n    if (nOrig !== n && state.ended) endReadable(this);\\n  }\\n\\n  if (ret !== null) this.emit('data', ret);\\n\\n  return ret;\\n};\\n\\nfunction onEofChunk(stream, state) {\\n  if (state.ended) return;\\n  if (state.decoder) {\\n    var chunk = state.decoder.end();\\n    if (chunk && chunk.length) {\\n      state.buffer.push(chunk);\\n      state.length += state.objectMode ? 1 : chunk.length;\\n    }\\n  }\\n  state.ended = true;\\n\\n  // emit 'readable' now to make sure it gets picked up.\\n  emitReadable(stream);\\n}\\n\\n// Don't emit readable right away in sync mode, because this can trigger\\n// another read() call => stack overflow.  This way, it might trigger\\n// a nextTick recursion warning, but that's not so bad.\\nfunction emitReadable(stream) {\\n  var state = stream._readableState;\\n  state.needReadable = false;\\n  if (!state.emittedReadable) {\\n    debug('emitReadable', state.flowing);\\n    state.emittedReadable = true;\\n    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\\n  }\\n}\\n\\nfunction emitReadable_(stream) {\\n  debug('emit readable');\\n  stream.emit('readable');\\n  flow(stream);\\n}\\n\\n// at this point, the user has presumably seen the 'readable' event,\\n// and called read() to consume some data.  that may have triggered\\n// in turn another _read(n) call, in which case reading = true if\\n// it's in progress.\\n// However, if we're not ended, or reading, and the length < hwm,\\n// then go ahead and try to read some more preemptively.\\nfunction maybeReadMore(stream, state) {\\n  if (!state.readingMore) {\\n    state.readingMore = true;\\n    pna.nextTick(maybeReadMore_, stream, state);\\n  }\\n}\\n\\nfunction maybeReadMore_(stream, state) {\\n  var len = state.length;\\n  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\\n    debug('maybeReadMore read 0');\\n    stream.read(0);\\n    if (len === state.length)\\n      // didn't get any data, stop spinning.\\n      break;else len = state.length;\\n  }\\n  state.readingMore = false;\\n}\\n\\n// abstract method.  to be overridden in specific implementation classes.\\n// call cb(er, data) where data is <= n in length.\\n// for virtual (non-string, non-buffer) streams, \\\"length\\\" is somewhat\\n// arbitrary, and perhaps not very meaningful.\\nReadable.prototype._read = function (n) {\\n  this.emit('error', new Error('_read() is not implemented'));\\n};\\n\\nReadable.prototype.pipe = function (dest, pipeOpts) {\\n  var src = this;\\n  var state = this._readableState;\\n\\n  switch (state.pipesCount) {\\n    case 0:\\n      state.pipes = dest;\\n      break;\\n    case 1:\\n      state.pipes = [state.pipes, dest];\\n      break;\\n    default:\\n      state.pipes.push(dest);\\n      break;\\n  }\\n  state.pipesCount += 1;\\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\\n\\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\\n\\n  var endFn = doEnd ? onend : unpipe;\\n  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\\n\\n  dest.on('unpipe', onunpipe);\\n  function onunpipe(readable, unpipeInfo) {\\n    debug('onunpipe');\\n    if (readable === src) {\\n      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\\n        unpipeInfo.hasUnpiped = true;\\n        cleanup();\\n      }\\n    }\\n  }\\n\\n  function onend() {\\n    debug('onend');\\n    dest.end();\\n  }\\n\\n  // when the dest drains, it reduces the awaitDrain counter\\n  // on the source.  This would be more elegant with a .once()\\n  // handler in flow(), but adding and removing repeatedly is\\n  // too slow.\\n  var ondrain = pipeOnDrain(src);\\n  dest.on('drain', ondrain);\\n\\n  var cleanedUp = false;\\n  function cleanup() {\\n    debug('cleanup');\\n    // cleanup event handlers once the pipe is broken\\n    dest.removeListener('close', onclose);\\n    dest.removeListener('finish', onfinish);\\n    dest.removeListener('drain', ondrain);\\n    dest.removeListener('error', onerror);\\n    dest.removeListener('unpipe', onunpipe);\\n    src.removeListener('end', onend);\\n    src.removeListener('end', unpipe);\\n    src.removeListener('data', ondata);\\n\\n    cleanedUp = true;\\n\\n    // if the reader is waiting for a drain event from this\\n    // specific writer, then it would cause it to never start\\n    // flowing again.\\n    // So, if this is awaiting a drain, then we just call it now.\\n    // If we don't know, then assume that we are waiting for one.\\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\\n  }\\n\\n  // If the user pushes more data while we're writing to dest then we'll end up\\n  // in ondata again. However, we only want to increase awaitDrain once because\\n  // dest will only emit one 'drain' event for the multiple writes.\\n  // => Introduce a guard on increasing awaitDrain.\\n  var increasedAwaitDrain = false;\\n  src.on('data', ondata);\\n  function ondata(chunk) {\\n    debug('ondata');\\n    increasedAwaitDrain = false;\\n    var ret = dest.write(chunk);\\n    if (false === ret && !increasedAwaitDrain) {\\n      // If the user unpiped during `dest.write()`, it is possible\\n      // to get stuck in a permanently paused state if that write\\n      // also returned false.\\n      // => Check whether `dest` is still a piping destination.\\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\\n        debug('false write response, pause', src._readableState.awaitDrain);\\n        src._readableState.awaitDrain++;\\n        increasedAwaitDrain = true;\\n      }\\n      src.pause();\\n    }\\n  }\\n\\n  // if the dest has an error, then stop piping into it.\\n  // however, don't suppress the throwing behavior for this.\\n  function onerror(er) {\\n    debug('onerror', er);\\n    unpipe();\\n    dest.removeListener('error', onerror);\\n    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\\n  }\\n\\n  // Make sure our error handler is attached before userland ones.\\n  prependListener(dest, 'error', onerror);\\n\\n  // Both close and finish should trigger unpipe, but only once.\\n  function onclose() {\\n    dest.removeListener('finish', onfinish);\\n    unpipe();\\n  }\\n  dest.once('close', onclose);\\n  function onfinish() {\\n    debug('onfinish');\\n    dest.removeListener('close', onclose);\\n    unpipe();\\n  }\\n  dest.once('finish', onfinish);\\n\\n  function unpipe() {\\n    debug('unpipe');\\n    src.unpipe(dest);\\n  }\\n\\n  // tell the dest that it's being piped to\\n  dest.emit('pipe', src);\\n\\n  // start the flow if it hasn't been started already.\\n  if (!state.flowing) {\\n    debug('pipe resume');\\n    src.resume();\\n  }\\n\\n  return dest;\\n};\\n\\nfunction pipeOnDrain(src) {\\n  return function () {\\n    var state = src._readableState;\\n    debug('pipeOnDrain', state.awaitDrain);\\n    if (state.awaitDrain) state.awaitDrain--;\\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\\n      state.flowing = true;\\n      flow(src);\\n    }\\n  };\\n}\\n\\nReadable.prototype.unpipe = function (dest) {\\n  var state = this._readableState;\\n  var unpipeInfo = { hasUnpiped: false };\\n\\n  // if we're not piping anywhere, then do nothing.\\n  if (state.pipesCount === 0) return this;\\n\\n  // just one destination.  most common case.\\n  if (state.pipesCount === 1) {\\n    // passed in one, but it's not the right one.\\n    if (dest && dest !== state.pipes) return this;\\n\\n    if (!dest) dest = state.pipes;\\n\\n    // got a match.\\n    state.pipes = null;\\n    state.pipesCount = 0;\\n    state.flowing = false;\\n    if (dest) dest.emit('unpipe', this, unpipeInfo);\\n    return this;\\n  }\\n\\n  // slow case. multiple pipe destinations.\\n\\n  if (!dest) {\\n    // remove all.\\n    var dests = state.pipes;\\n    var len = state.pipesCount;\\n    state.pipes = null;\\n    state.pipesCount = 0;\\n    state.flowing = false;\\n\\n    for (var i = 0; i < len; i++) {\\n      dests[i].emit('unpipe', this, unpipeInfo);\\n    }return this;\\n  }\\n\\n  // try to find the right one.\\n  var index = indexOf(state.pipes, dest);\\n  if (index === -1) return this;\\n\\n  state.pipes.splice(index, 1);\\n  state.pipesCount -= 1;\\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\\n\\n  dest.emit('unpipe', this, unpipeInfo);\\n\\n  return this;\\n};\\n\\n// set up data events if they are asked for\\n// Ensure readable listeners eventually get something\\nReadable.prototype.on = function (ev, fn) {\\n  var res = Stream.prototype.on.call(this, ev, fn);\\n\\n  if (ev === 'data') {\\n    // Start flowing on next tick if stream isn't explicitly paused\\n    if (this._readableState.flowing !== false) this.resume();\\n  } else if (ev === 'readable') {\\n    var state = this._readableState;\\n    if (!state.endEmitted && !state.readableListening) {\\n      state.readableListening = state.needReadable = true;\\n      state.emittedReadable = false;\\n      if (!state.reading) {\\n        pna.nextTick(nReadingNextTick, this);\\n      } else if (state.length) {\\n        emitReadable(this);\\n      }\\n    }\\n  }\\n\\n  return res;\\n};\\nReadable.prototype.addListener = Readable.prototype.on;\\n\\nfunction nReadingNextTick(self) {\\n  debug('readable nexttick read 0');\\n  self.read(0);\\n}\\n\\n// pause() and resume() are remnants of the legacy readable stream API\\n// If the user uses them, then switch into old mode.\\nReadable.prototype.resume = function () {\\n  var state = this._readableState;\\n  if (!state.flowing) {\\n    debug('resume');\\n    state.flowing = true;\\n    resume(this, state);\\n  }\\n  return this;\\n};\\n\\nfunction resume(stream, state) {\\n  if (!state.resumeScheduled) {\\n    state.resumeScheduled = true;\\n    pna.nextTick(resume_, stream, state);\\n  }\\n}\\n\\nfunction resume_(stream, state) {\\n  if (!state.reading) {\\n    debug('resume read 0');\\n    stream.read(0);\\n  }\\n\\n  state.resumeScheduled = false;\\n  state.awaitDrain = 0;\\n  stream.emit('resume');\\n  flow(stream);\\n  if (state.flowing && !state.reading) stream.read(0);\\n}\\n\\nReadable.prototype.pause = function () {\\n  debug('call pause flowing=%j', this._readableState.flowing);\\n  if (false !== this._readableState.flowing) {\\n    debug('pause');\\n    this._readableState.flowing = false;\\n    this.emit('pause');\\n  }\\n  return this;\\n};\\n\\nfunction flow(stream) {\\n  var state = stream._readableState;\\n  debug('flow', state.flowing);\\n  while (state.flowing && stream.read() !== null) {}\\n}\\n\\n// wrap an old-style stream as the async data source.\\n// This is *not* part of the readable stream interface.\\n// It is an ugly unfortunate mess of history.\\nReadable.prototype.wrap = function (stream) {\\n  var _this = this;\\n\\n  var state = this._readableState;\\n  var paused = false;\\n\\n  stream.on('end', function () {\\n    debug('wrapped end');\\n    if (state.decoder && !state.ended) {\\n      var chunk = state.decoder.end();\\n      if (chunk && chunk.length) _this.push(chunk);\\n    }\\n\\n    _this.push(null);\\n  });\\n\\n  stream.on('data', function (chunk) {\\n    debug('wrapped data');\\n    if (state.decoder) chunk = state.decoder.write(chunk);\\n\\n    // don't skip over falsy values in objectMode\\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\\n\\n    var ret = _this.push(chunk);\\n    if (!ret) {\\n      paused = true;\\n      stream.pause();\\n    }\\n  });\\n\\n  // proxy all the other methods.\\n  // important when wrapping filters and duplexes.\\n  for (var i in stream) {\\n    if (this[i] === undefined && typeof stream[i] === 'function') {\\n      this[i] = function (method) {\\n        return function () {\\n          return stream[method].apply(stream, arguments);\\n        };\\n      }(i);\\n    }\\n  }\\n\\n  // proxy certain important events.\\n  for (var n = 0; n < kProxyEvents.length; n++) {\\n    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\\n  }\\n\\n  // when we try to consume some more bytes, simply unpause the\\n  // underlying stream.\\n  this._read = function (n) {\\n    debug('wrapped _read', n);\\n    if (paused) {\\n      paused = false;\\n      stream.resume();\\n    }\\n  };\\n\\n  return this;\\n};\\n\\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\\n  // making it explicit this property is not enumerable\\n  // because otherwise some prototype manipulation in\\n  // userland will fail\\n  enumerable: false,\\n  get: function () {\\n    return this._readableState.highWaterMark;\\n  }\\n});\\n\\n// exposed for testing purposes only.\\nReadable._fromList = fromList;\\n\\n// Pluck off n bytes from an array of buffers.\\n// Length is the combined lengths of all the buffers in the list.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction fromList(n, state) {\\n  // nothing buffered\\n  if (state.length === 0) return null;\\n\\n  var ret;\\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\\n    // read it all, truncate the list\\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\\n    state.buffer.clear();\\n  } else {\\n    // read part of list\\n    ret = fromListPartial(n, state.buffer, state.decoder);\\n  }\\n\\n  return ret;\\n}\\n\\n// Extracts only enough buffered data to satisfy the amount requested.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction fromListPartial(n, list, hasStrings) {\\n  var ret;\\n  if (n < list.head.data.length) {\\n    // slice is the same for buffers and strings\\n    ret = list.head.data.slice(0, n);\\n    list.head.data = list.head.data.slice(n);\\n  } else if (n === list.head.data.length) {\\n    // first chunk is a perfect match\\n    ret = list.shift();\\n  } else {\\n    // result spans more than one buffer\\n    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\\n  }\\n  return ret;\\n}\\n\\n// Copies a specified amount of characters from the list of buffered data\\n// chunks.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction copyFromBufferString(n, list) {\\n  var p = list.head;\\n  var c = 1;\\n  var ret = p.data;\\n  n -= ret.length;\\n  while (p = p.next) {\\n    var str = p.data;\\n    var nb = n > str.length ? str.length : n;\\n    if (nb === str.length) ret += str;else ret += str.slice(0, n);\\n    n -= nb;\\n    if (n === 0) {\\n      if (nb === str.length) {\\n        ++c;\\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\\n      } else {\\n        list.head = p;\\n        p.data = str.slice(nb);\\n      }\\n      break;\\n    }\\n    ++c;\\n  }\\n  list.length -= c;\\n  return ret;\\n}\\n\\n// Copies a specified amount of bytes from the list of buffered data chunks.\\n// This function is designed to be inlinable, so please take care when making\\n// changes to the function body.\\nfunction copyFromBuffer(n, list) {\\n  var ret = Buffer.allocUnsafe(n);\\n  var p = list.head;\\n  var c = 1;\\n  p.data.copy(ret);\\n  n -= p.data.length;\\n  while (p = p.next) {\\n    var buf = p.data;\\n    var nb = n > buf.length ? buf.length : n;\\n    buf.copy(ret, ret.length - n, 0, nb);\\n    n -= nb;\\n    if (n === 0) {\\n      if (nb === buf.length) {\\n        ++c;\\n        if (p.next) list.head = p.next;else list.head = list.tail = null;\\n      } else {\\n        list.head = p;\\n        p.data = buf.slice(nb);\\n      }\\n      break;\\n    }\\n    ++c;\\n  }\\n  list.length -= c;\\n  return ret;\\n}\\n\\nfunction endReadable(stream) {\\n  var state = stream._readableState;\\n\\n  // If we get here before consuming all the bytes, then that is a\\n  // bug in node.  Should never happen.\\n  if (state.length > 0) throw new Error('\\\"endReadable()\\\" called on non-empty stream');\\n\\n  if (!state.endEmitted) {\\n    state.ended = true;\\n    pna.nextTick(endReadableNT, state, stream);\\n  }\\n}\\n\\nfunction endReadableNT(state, stream) {\\n  // Check that we didn't get one last unshift.\\n  if (!state.endEmitted && state.length === 0) {\\n    state.endEmitted = true;\\n    stream.readable = false;\\n    stream.emit('end');\\n  }\\n}\\n\\nfunction indexOf(xs, x) {\\n  for (var i = 0, l = xs.length; i < l; i++) {\\n    if (xs[i] === x) return i;\\n  }\\n  return -1;\\n}\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\"), __webpack_require__(/*! ./../../process/browser.js */ \\\"../node_modules/process/browser.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_readable.js?\")},\"../node_modules/readable-stream/lib/_stream_transform.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// a transform stream is a readable/writable stream where you do\\n// something with the data.  Sometimes it's called a \\\"filter\\\",\\n// but that's not a great name for it, since that implies a thing where\\n// some bits pass through, and others are simply ignored.  (That would\\n// be a valid example of a transform, of course.)\\n//\\n// While the output is causally related to the input, it's not a\\n// necessarily symmetric or synchronous transformation.  For example,\\n// a zlib stream might take multiple plain-text writes(), and then\\n// emit a single compressed chunk some time in the future.\\n//\\n// Here's how this works:\\n//\\n// The Transform stream has all the aspects of the readable and writable\\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\\n// internally, and returns false if there's a lot of pending writes\\n// buffered up.  When you call read(), that calls _read(n) until\\n// there's enough pending readable data buffered up.\\n//\\n// In a transform stream, the written data is placed in a buffer.  When\\n// _read(n) is called, it transforms the queued up data, calling the\\n// buffered _write cb's as it consumes chunks.  If consuming a single\\n// written chunk would result in multiple output chunks, then the first\\n// outputted bit calls the readcb, and subsequent chunks just go into\\n// the read buffer, and will cause it to emit 'readable' if necessary.\\n//\\n// This way, back-pressure is actually determined by the reading side,\\n// since _read has to be called to start processing a new chunk.  However,\\n// a pathological inflate type of transform can cause excessive buffering\\n// here.  For example, imagine a stream where every byte of input is\\n// interpreted as an integer from 0-255, and then results in that many\\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\\n// 1kb of data being output.  In this case, you could write a very small\\n// amount of input, and end up with a very large amount of output.  In\\n// such a pathological inflating mechanism, there'd be no way to tell\\n// the system to stop doing the transform.  A single 4MB write could\\n// cause the system to run out of memory.\\n//\\n// However, even in such a pathological case, only a single written chunk\\n// would be consumed, and then the rest would wait (un-transformed) until\\n// the results of the previous transformed chunk were consumed.\\n\\n\\n\\nmodule.exports = Transform;\\n\\nvar Duplex = __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\nutil.inherits(Transform, Duplex);\\n\\nfunction afterTransform(er, data) {\\n  var ts = this._transformState;\\n  ts.transforming = false;\\n\\n  var cb = ts.writecb;\\n\\n  if (!cb) {\\n    return this.emit('error', new Error('write callback called multiple times'));\\n  }\\n\\n  ts.writechunk = null;\\n  ts.writecb = null;\\n\\n  if (data != null) // single equals check for both `null` and `undefined`\\n    this.push(data);\\n\\n  cb(er);\\n\\n  var rs = this._readableState;\\n  rs.reading = false;\\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\\n    this._read(rs.highWaterMark);\\n  }\\n}\\n\\nfunction Transform(options) {\\n  if (!(this instanceof Transform)) return new Transform(options);\\n\\n  Duplex.call(this, options);\\n\\n  this._transformState = {\\n    afterTransform: afterTransform.bind(this),\\n    needTransform: false,\\n    transforming: false,\\n    writecb: null,\\n    writechunk: null,\\n    writeencoding: null\\n  };\\n\\n  // start out asking for a readable event once data is transformed.\\n  this._readableState.needReadable = true;\\n\\n  // we have implemented the _read method, and done the other things\\n  // that Readable wants before the first _read call, so unset the\\n  // sync guard flag.\\n  this._readableState.sync = false;\\n\\n  if (options) {\\n    if (typeof options.transform === 'function') this._transform = options.transform;\\n\\n    if (typeof options.flush === 'function') this._flush = options.flush;\\n  }\\n\\n  // When the writable side finishes, then flush out anything remaining.\\n  this.on('prefinish', prefinish);\\n}\\n\\nfunction prefinish() {\\n  var _this = this;\\n\\n  if (typeof this._flush === 'function') {\\n    this._flush(function (er, data) {\\n      done(_this, er, data);\\n    });\\n  } else {\\n    done(this, null, null);\\n  }\\n}\\n\\nTransform.prototype.push = function (chunk, encoding) {\\n  this._transformState.needTransform = false;\\n  return Duplex.prototype.push.call(this, chunk, encoding);\\n};\\n\\n// This is the part where you do stuff!\\n// override this function in implementation classes.\\n// 'chunk' is an input chunk.\\n//\\n// Call `push(newChunk)` to pass along transformed output\\n// to the readable side.  You may call 'push' zero or more times.\\n//\\n// Call `cb(err)` when you are done with this chunk.  If you pass\\n// an error, then that'll put the hurt on the whole operation.  If you\\n// never call cb(), then you'll never get another chunk.\\nTransform.prototype._transform = function (chunk, encoding, cb) {\\n  throw new Error('_transform() is not implemented');\\n};\\n\\nTransform.prototype._write = function (chunk, encoding, cb) {\\n  var ts = this._transformState;\\n  ts.writecb = cb;\\n  ts.writechunk = chunk;\\n  ts.writeencoding = encoding;\\n  if (!ts.transforming) {\\n    var rs = this._readableState;\\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\\n  }\\n};\\n\\n// Doesn't matter what the args are here.\\n// _transform does all the work.\\n// That we got here means that the readable side wants more data.\\nTransform.prototype._read = function (n) {\\n  var ts = this._transformState;\\n\\n  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\\n    ts.transforming = true;\\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\\n  } else {\\n    // mark that we need a transform, so that any data that comes in\\n    // will get processed, now that we've asked for it.\\n    ts.needTransform = true;\\n  }\\n};\\n\\nTransform.prototype._destroy = function (err, cb) {\\n  var _this2 = this;\\n\\n  Duplex.prototype._destroy.call(this, err, function (err2) {\\n    cb(err2);\\n    _this2.emit('close');\\n  });\\n};\\n\\nfunction done(stream, er, data) {\\n  if (er) return stream.emit('error', er);\\n\\n  if (data != null) // single equals check for both `null` and `undefined`\\n    stream.push(data);\\n\\n  // if there's nothing in the write buffer, then that means\\n  // that nothing more will ever be provided\\n  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\\n\\n  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\\n\\n  return stream.push(null);\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_transform.js?\")},\"../node_modules/readable-stream/lib/_stream_writable.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n// A bit simpler than readable streams.\\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\\n// the drain event emission and buffering.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\nmodule.exports = Writable;\\n\\n/* <replacement> */\\nfunction WriteReq(chunk, encoding, cb) {\\n  this.chunk = chunk;\\n  this.encoding = encoding;\\n  this.callback = cb;\\n  this.next = null;\\n}\\n\\n// It seems a linked list but it is not\\n// there will be only 2 of these for each stream\\nfunction CorkedRequest(state) {\\n  var _this = this;\\n\\n  this.next = null;\\n  this.entry = null;\\n  this.finish = function () {\\n    onCorkedFinish(_this, state);\\n  };\\n}\\n/* </replacement> */\\n\\n/*<replacement>*/\\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Duplex;\\n/*</replacement>*/\\n\\nWritable.WritableState = WritableState;\\n\\n/*<replacement>*/\\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \\\"../node_modules/core-util-is/lib/util.js\\\"));\\nutil.inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar internalUtil = {\\n  deprecate: __webpack_require__(/*! util-deprecate */ \\\"../node_modules/util-deprecate/browser.js\\\")\\n};\\n/*</replacement>*/\\n\\n/*<replacement>*/\\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \\\"../node_modules/readable-stream/lib/internal/streams/stream-browser.js\\\");\\n/*</replacement>*/\\n\\n/*<replacement>*/\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\\\").Buffer;\\nvar OurUint8Array = global.Uint8Array || function () {};\\nfunction _uint8ArrayToBuffer(chunk) {\\n  return Buffer.from(chunk);\\n}\\nfunction _isUint8Array(obj) {\\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\\n}\\n\\n/*</replacement>*/\\n\\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \\\"../node_modules/readable-stream/lib/internal/streams/destroy.js\\\");\\n\\nutil.inherits(Writable, Stream);\\n\\nfunction nop() {}\\n\\nfunction WritableState(options, stream) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  options = options || {};\\n\\n  // Duplex streams are both readable and writable, but share\\n  // the same options object.\\n  // However, some cases require setting options to different\\n  // values for the readable and the writable sides of the duplex stream.\\n  // These options can be provided separately as readableXXX and writableXXX.\\n  var isDuplex = stream instanceof Duplex;\\n\\n  // object stream flag to indicate whether or not this stream\\n  // contains buffers or objects.\\n  this.objectMode = !!options.objectMode;\\n\\n  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\\n\\n  // the point at which write() starts returning false\\n  // Note: 0 is a valid value, means that we always return false if\\n  // the entire buffer is not flushed immediately on write()\\n  var hwm = options.highWaterMark;\\n  var writableHwm = options.writableHighWaterMark;\\n  var defaultHwm = this.objectMode ? 16 : 16 * 1024;\\n\\n  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\\n\\n  // cast to ints.\\n  this.highWaterMark = Math.floor(this.highWaterMark);\\n\\n  // if _final has been called\\n  this.finalCalled = false;\\n\\n  // drain event flag.\\n  this.needDrain = false;\\n  // at the start of calling end()\\n  this.ending = false;\\n  // when end() has been called, and returned\\n  this.ended = false;\\n  // when 'finish' is emitted\\n  this.finished = false;\\n\\n  // has it been destroyed\\n  this.destroyed = false;\\n\\n  // should we decode strings into buffers before passing to _write?\\n  // this is here so that some node-core streams can optimize string\\n  // handling at a lower level.\\n  var noDecode = options.decodeStrings === false;\\n  this.decodeStrings = !noDecode;\\n\\n  // Crypto is kind of old and crusty.  Historically, its default string\\n  // encoding is 'binary' so we have to make this configurable.\\n  // Everything else in the universe uses 'utf8', though.\\n  this.defaultEncoding = options.defaultEncoding || 'utf8';\\n\\n  // not an actual buffer we keep track of, but a measurement\\n  // of how much we're waiting to get pushed to some underlying\\n  // socket or file.\\n  this.length = 0;\\n\\n  // a flag to see when we're in the middle of a write.\\n  this.writing = false;\\n\\n  // when true all writes will be buffered until .uncork() call\\n  this.corked = 0;\\n\\n  // a flag to be able to tell if the onwrite cb is called immediately,\\n  // or on a later tick.  We set this to true at first, because any\\n  // actions that shouldn't happen until \\\"later\\\" should generally also\\n  // not happen before the first write call.\\n  this.sync = true;\\n\\n  // a flag to know if we're processing previously buffered items, which\\n  // may call the _write() callback in the same tick, so that we don't\\n  // end up in an overlapped onwrite situation.\\n  this.bufferProcessing = false;\\n\\n  // the callback that's passed to _write(chunk,cb)\\n  this.onwrite = function (er) {\\n    onwrite(stream, er);\\n  };\\n\\n  // the callback that the user supplies to write(chunk,encoding,cb)\\n  this.writecb = null;\\n\\n  // the amount that is being written when _write is called.\\n  this.writelen = 0;\\n\\n  this.bufferedRequest = null;\\n  this.lastBufferedRequest = null;\\n\\n  // number of pending user-supplied write callbacks\\n  // this must be 0 before 'finish' can be emitted\\n  this.pendingcb = 0;\\n\\n  // emit prefinish if the only thing we're waiting for is _write cbs\\n  // This is relevant for synchronous Transform streams\\n  this.prefinished = false;\\n\\n  // True if the error was already emitted and should not be thrown again\\n  this.errorEmitted = false;\\n\\n  // count buffered requests\\n  this.bufferedRequestCount = 0;\\n\\n  // allocate the first CorkedRequest, there is always\\n  // one allocated and free to use, and we maintain at most two\\n  this.corkedRequestsFree = new CorkedRequest(this);\\n}\\n\\nWritableState.prototype.getBuffer = function getBuffer() {\\n  var current = this.bufferedRequest;\\n  var out = [];\\n  while (current) {\\n    out.push(current);\\n    current = current.next;\\n  }\\n  return out;\\n};\\n\\n(function () {\\n  try {\\n    Object.defineProperty(WritableState.prototype, 'buffer', {\\n      get: internalUtil.deprecate(function () {\\n        return this.getBuffer();\\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\\n    });\\n  } catch (_) {}\\n})();\\n\\n// Test _writableState for inheritance to account for Duplex streams,\\n// whose prototype chain only points to Readable.\\nvar realHasInstance;\\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\\n  realHasInstance = Function.prototype[Symbol.hasInstance];\\n  Object.defineProperty(Writable, Symbol.hasInstance, {\\n    value: function (object) {\\n      if (realHasInstance.call(this, object)) return true;\\n      if (this !== Writable) return false;\\n\\n      return object && object._writableState instanceof WritableState;\\n    }\\n  });\\n} else {\\n  realHasInstance = function (object) {\\n    return object instanceof this;\\n  };\\n}\\n\\nfunction Writable(options) {\\n  Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \\\"../node_modules/readable-stream/lib/_stream_duplex.js\\\");\\n\\n  // Writable ctor is applied to Duplexes, too.\\n  // `realHasInstance` is necessary because using plain `instanceof`\\n  // would return false, as no `_writableState` property is attached.\\n\\n  // Trying to use the custom `instanceof` for Writable here will also break the\\n  // Node.js LazyTransform implementation, which has a non-trivial getter for\\n  // `_writableState` that would lead to infinite recursion.\\n  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\\n    return new Writable(options);\\n  }\\n\\n  this._writableState = new WritableState(options, this);\\n\\n  // legacy.\\n  this.writable = true;\\n\\n  if (options) {\\n    if (typeof options.write === 'function') this._write = options.write;\\n\\n    if (typeof options.writev === 'function') this._writev = options.writev;\\n\\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\\n\\n    if (typeof options.final === 'function') this._final = options.final;\\n  }\\n\\n  Stream.call(this);\\n}\\n\\n// Otherwise people can pipe Writable streams, which is just wrong.\\nWritable.prototype.pipe = function () {\\n  this.emit('error', new Error('Cannot pipe, not readable'));\\n};\\n\\nfunction writeAfterEnd(stream, cb) {\\n  var er = new Error('write after end');\\n  // TODO: defer error events consistently everywhere, not just the cb\\n  stream.emit('error', er);\\n  pna.nextTick(cb, er);\\n}\\n\\n// Checks that a user-supplied chunk is valid, especially for the particular\\n// mode the stream is in. Currently this means that `null` is never accepted\\n// and undefined/non-string values are only allowed in object mode.\\nfunction validChunk(stream, state, chunk, cb) {\\n  var valid = true;\\n  var er = false;\\n\\n  if (chunk === null) {\\n    er = new TypeError('May not write null values to stream');\\n  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\\n    er = new TypeError('Invalid non-string/buffer chunk');\\n  }\\n  if (er) {\\n    stream.emit('error', er);\\n    pna.nextTick(cb, er);\\n    valid = false;\\n  }\\n  return valid;\\n}\\n\\nWritable.prototype.write = function (chunk, encoding, cb) {\\n  var state = this._writableState;\\n  var ret = false;\\n  var isBuf = !state.objectMode && _isUint8Array(chunk);\\n\\n  if (isBuf && !Buffer.isBuffer(chunk)) {\\n    chunk = _uint8ArrayToBuffer(chunk);\\n  }\\n\\n  if (typeof encoding === 'function') {\\n    cb = encoding;\\n    encoding = null;\\n  }\\n\\n  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\\n\\n  if (typeof cb !== 'function') cb = nop;\\n\\n  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\\n    state.pendingcb++;\\n    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\\n  }\\n\\n  return ret;\\n};\\n\\nWritable.prototype.cork = function () {\\n  var state = this._writableState;\\n\\n  state.corked++;\\n};\\n\\nWritable.prototype.uncork = function () {\\n  var state = this._writableState;\\n\\n  if (state.corked) {\\n    state.corked--;\\n\\n    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\\n  }\\n};\\n\\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\\n  // node::ParseEncoding() requires lower case.\\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\\n  this._writableState.defaultEncoding = encoding;\\n  return this;\\n};\\n\\nfunction decodeChunk(state, chunk, encoding) {\\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\\n    chunk = Buffer.from(chunk, encoding);\\n  }\\n  return chunk;\\n}\\n\\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\\n  // making it explicit this property is not enumerable\\n  // because otherwise some prototype manipulation in\\n  // userland will fail\\n  enumerable: false,\\n  get: function () {\\n    return this._writableState.highWaterMark;\\n  }\\n});\\n\\n// if we're already writing something, then just put this\\n// in the queue, and wait our turn.  Otherwise, call _write\\n// If we return false, then we need a drain event, so set that flag.\\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\\n  if (!isBuf) {\\n    var newChunk = decodeChunk(state, chunk, encoding);\\n    if (chunk !== newChunk) {\\n      isBuf = true;\\n      encoding = 'buffer';\\n      chunk = newChunk;\\n    }\\n  }\\n  var len = state.objectMode ? 1 : chunk.length;\\n\\n  state.length += len;\\n\\n  var ret = state.length < state.highWaterMark;\\n  // we must ensure that previous needDrain will not be reset to false.\\n  if (!ret) state.needDrain = true;\\n\\n  if (state.writing || state.corked) {\\n    var last = state.lastBufferedRequest;\\n    state.lastBufferedRequest = {\\n      chunk: chunk,\\n      encoding: encoding,\\n      isBuf: isBuf,\\n      callback: cb,\\n      next: null\\n    };\\n    if (last) {\\n      last.next = state.lastBufferedRequest;\\n    } else {\\n      state.bufferedRequest = state.lastBufferedRequest;\\n    }\\n    state.bufferedRequestCount += 1;\\n  } else {\\n    doWrite(stream, state, false, len, chunk, encoding, cb);\\n  }\\n\\n  return ret;\\n}\\n\\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\\n  state.writelen = len;\\n  state.writecb = cb;\\n  state.writing = true;\\n  state.sync = true;\\n  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\\n  state.sync = false;\\n}\\n\\nfunction onwriteError(stream, state, sync, er, cb) {\\n  --state.pendingcb;\\n\\n  if (sync) {\\n    // defer the callback if we are being called synchronously\\n    // to avoid piling up things on the stack\\n    pna.nextTick(cb, er);\\n    // this can emit finish, and it will always happen\\n    // after error\\n    pna.nextTick(finishMaybe, stream, state);\\n    stream._writableState.errorEmitted = true;\\n    stream.emit('error', er);\\n  } else {\\n    // the caller expect this to happen before if\\n    // it is async\\n    cb(er);\\n    stream._writableState.errorEmitted = true;\\n    stream.emit('error', er);\\n    // this can emit finish, but finish must\\n    // always follow error\\n    finishMaybe(stream, state);\\n  }\\n}\\n\\nfunction onwriteStateUpdate(state) {\\n  state.writing = false;\\n  state.writecb = null;\\n  state.length -= state.writelen;\\n  state.writelen = 0;\\n}\\n\\nfunction onwrite(stream, er) {\\n  var state = stream._writableState;\\n  var sync = state.sync;\\n  var cb = state.writecb;\\n\\n  onwriteStateUpdate(state);\\n\\n  if (er) onwriteError(stream, state, sync, er, cb);else {\\n    // Check if we're actually ready to finish, but don't emit yet\\n    var finished = needFinish(state);\\n\\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\\n      clearBuffer(stream, state);\\n    }\\n\\n    if (sync) {\\n      /*<replacement>*/\\n      asyncWrite(afterWrite, stream, state, finished, cb);\\n      /*</replacement>*/\\n    } else {\\n      afterWrite(stream, state, finished, cb);\\n    }\\n  }\\n}\\n\\nfunction afterWrite(stream, state, finished, cb) {\\n  if (!finished) onwriteDrain(stream, state);\\n  state.pendingcb--;\\n  cb();\\n  finishMaybe(stream, state);\\n}\\n\\n// Must force callback to be called on nextTick, so that we don't\\n// emit 'drain' before the write() consumer gets the 'false' return\\n// value, and has a chance to attach a 'drain' listener.\\nfunction onwriteDrain(stream, state) {\\n  if (state.length === 0 && state.needDrain) {\\n    state.needDrain = false;\\n    stream.emit('drain');\\n  }\\n}\\n\\n// if there's something in the buffer waiting, then process it\\nfunction clearBuffer(stream, state) {\\n  state.bufferProcessing = true;\\n  var entry = state.bufferedRequest;\\n\\n  if (stream._writev && entry && entry.next) {\\n    // Fast case, write everything using _writev()\\n    var l = state.bufferedRequestCount;\\n    var buffer = new Array(l);\\n    var holder = state.corkedRequestsFree;\\n    holder.entry = entry;\\n\\n    var count = 0;\\n    var allBuffers = true;\\n    while (entry) {\\n      buffer[count] = entry;\\n      if (!entry.isBuf) allBuffers = false;\\n      entry = entry.next;\\n      count += 1;\\n    }\\n    buffer.allBuffers = allBuffers;\\n\\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish);\\n\\n    // doWrite is almost always async, defer these to save a bit of time\\n    // as the hot path ends with doWrite\\n    state.pendingcb++;\\n    state.lastBufferedRequest = null;\\n    if (holder.next) {\\n      state.corkedRequestsFree = holder.next;\\n      holder.next = null;\\n    } else {\\n      state.corkedRequestsFree = new CorkedRequest(state);\\n    }\\n    state.bufferedRequestCount = 0;\\n  } else {\\n    // Slow case, write chunks one-by-one\\n    while (entry) {\\n      var chunk = entry.chunk;\\n      var encoding = entry.encoding;\\n      var cb = entry.callback;\\n      var len = state.objectMode ? 1 : chunk.length;\\n\\n      doWrite(stream, state, false, len, chunk, encoding, cb);\\n      entry = entry.next;\\n      state.bufferedRequestCount--;\\n      // if we didn't call the onwrite immediately, then\\n      // it means that we need to wait until it does.\\n      // also, that means that the chunk and cb are currently\\n      // being processed, so move the buffer counter past them.\\n      if (state.writing) {\\n        break;\\n      }\\n    }\\n\\n    if (entry === null) state.lastBufferedRequest = null;\\n  }\\n\\n  state.bufferedRequest = entry;\\n  state.bufferProcessing = false;\\n}\\n\\nWritable.prototype._write = function (chunk, encoding, cb) {\\n  cb(new Error('_write() is not implemented'));\\n};\\n\\nWritable.prototype._writev = null;\\n\\nWritable.prototype.end = function (chunk, encoding, cb) {\\n  var state = this._writableState;\\n\\n  if (typeof chunk === 'function') {\\n    cb = chunk;\\n    chunk = null;\\n    encoding = null;\\n  } else if (typeof encoding === 'function') {\\n    cb = encoding;\\n    encoding = null;\\n  }\\n\\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\\n\\n  // .end() fully uncorks\\n  if (state.corked) {\\n    state.corked = 1;\\n    this.uncork();\\n  }\\n\\n  // ignore unnecessary end() calls.\\n  if (!state.ending && !state.finished) endWritable(this, state, cb);\\n};\\n\\nfunction needFinish(state) {\\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\\n}\\nfunction callFinal(stream, state) {\\n  stream._final(function (err) {\\n    state.pendingcb--;\\n    if (err) {\\n      stream.emit('error', err);\\n    }\\n    state.prefinished = true;\\n    stream.emit('prefinish');\\n    finishMaybe(stream, state);\\n  });\\n}\\nfunction prefinish(stream, state) {\\n  if (!state.prefinished && !state.finalCalled) {\\n    if (typeof stream._final === 'function') {\\n      state.pendingcb++;\\n      state.finalCalled = true;\\n      pna.nextTick(callFinal, stream, state);\\n    } else {\\n      state.prefinished = true;\\n      stream.emit('prefinish');\\n    }\\n  }\\n}\\n\\nfunction finishMaybe(stream, state) {\\n  var need = needFinish(state);\\n  if (need) {\\n    prefinish(stream, state);\\n    if (state.pendingcb === 0) {\\n      state.finished = true;\\n      stream.emit('finish');\\n    }\\n  }\\n  return need;\\n}\\n\\nfunction endWritable(stream, state, cb) {\\n  state.ending = true;\\n  finishMaybe(stream, state);\\n  if (cb) {\\n    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\\n  }\\n  state.ended = true;\\n  stream.writable = false;\\n}\\n\\nfunction onCorkedFinish(corkReq, state, err) {\\n  var entry = corkReq.entry;\\n  corkReq.entry = null;\\n  while (entry) {\\n    var cb = entry.callback;\\n    state.pendingcb--;\\n    cb(err);\\n    entry = entry.next;\\n  }\\n  if (state.corkedRequestsFree) {\\n    state.corkedRequestsFree.next = corkReq;\\n  } else {\\n    state.corkedRequestsFree = corkReq;\\n  }\\n}\\n\\nObject.defineProperty(Writable.prototype, 'destroyed', {\\n  get: function () {\\n    if (this._writableState === undefined) {\\n      return false;\\n    }\\n    return this._writableState.destroyed;\\n  },\\n  set: function (value) {\\n    // we ignore the value if the stream\\n    // has not been initialized yet\\n    if (!this._writableState) {\\n      return;\\n    }\\n\\n    // backward compatibility, the user is explicitly\\n    // managing destroyed\\n    this._writableState.destroyed = value;\\n  }\\n});\\n\\nWritable.prototype.destroy = destroyImpl.destroy;\\nWritable.prototype._undestroy = destroyImpl.undestroy;\\nWritable.prototype._destroy = function (err, cb) {\\n  this.end();\\n  cb(err);\\n};\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \\\"../node_modules/process/browser.js\\\"), __webpack_require__(/*! ./../../timers-browserify/main.js */ \\\"../node_modules/timers-browserify/main.js\\\").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/_stream_writable.js?\")},\"../node_modules/readable-stream/lib/internal/streams/BufferList.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\\\").Buffer;\\nvar util = __webpack_require__(/*! util */ 3);\\n\\nfunction copyBuffer(src, target, offset) {\\n  src.copy(target, offset);\\n}\\n\\nmodule.exports = function () {\\n  function BufferList() {\\n    _classCallCheck(this, BufferList);\\n\\n    this.head = null;\\n    this.tail = null;\\n    this.length = 0;\\n  }\\n\\n  BufferList.prototype.push = function push(v) {\\n    var entry = { data: v, next: null };\\n    if (this.length > 0) this.tail.next = entry;else this.head = entry;\\n    this.tail = entry;\\n    ++this.length;\\n  };\\n\\n  BufferList.prototype.unshift = function unshift(v) {\\n    var entry = { data: v, next: this.head };\\n    if (this.length === 0) this.tail = entry;\\n    this.head = entry;\\n    ++this.length;\\n  };\\n\\n  BufferList.prototype.shift = function shift() {\\n    if (this.length === 0) return;\\n    var ret = this.head.data;\\n    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\\n    --this.length;\\n    return ret;\\n  };\\n\\n  BufferList.prototype.clear = function clear() {\\n    this.head = this.tail = null;\\n    this.length = 0;\\n  };\\n\\n  BufferList.prototype.join = function join(s) {\\n    if (this.length === 0) return '';\\n    var p = this.head;\\n    var ret = '' + p.data;\\n    while (p = p.next) {\\n      ret += s + p.data;\\n    }return ret;\\n  };\\n\\n  BufferList.prototype.concat = function concat(n) {\\n    if (this.length === 0) return Buffer.alloc(0);\\n    if (this.length === 1) return this.head.data;\\n    var ret = Buffer.allocUnsafe(n >>> 0);\\n    var p = this.head;\\n    var i = 0;\\n    while (p) {\\n      copyBuffer(p.data, ret, i);\\n      i += p.data.length;\\n      p = p.next;\\n    }\\n    return ret;\\n  };\\n\\n  return BufferList;\\n}();\\n\\nif (util && util.inspect && util.inspect.custom) {\\n  module.exports.prototype[util.inspect.custom] = function () {\\n    var obj = util.inspect({ length: this.length });\\n    return this.constructor.name + ' ' + obj;\\n  };\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/internal/streams/BufferList.js?\")},\"../node_modules/readable-stream/lib/internal/streams/destroy.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\n/*<replacement>*/\\n\\nvar pna = __webpack_require__(/*! process-nextick-args */ \\\"../node_modules/process-nextick-args/index.js\\\");\\n/*</replacement>*/\\n\\n// undocumented cb() API, needed for core, not for public API\\nfunction destroy(err, cb) {\\n  var _this = this;\\n\\n  var readableDestroyed = this._readableState && this._readableState.destroyed;\\n  var writableDestroyed = this._writableState && this._writableState.destroyed;\\n\\n  if (readableDestroyed || writableDestroyed) {\\n    if (cb) {\\n      cb(err);\\n    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\\n      pna.nextTick(emitErrorNT, this, err);\\n    }\\n    return this;\\n  }\\n\\n  // we set destroyed to true before firing error callbacks in order\\n  // to make it re-entrance safe in case destroy() is called within callbacks\\n\\n  if (this._readableState) {\\n    this._readableState.destroyed = true;\\n  }\\n\\n  // if this is a duplex stream mark the writable part as destroyed as well\\n  if (this._writableState) {\\n    this._writableState.destroyed = true;\\n  }\\n\\n  this._destroy(err || null, function (err) {\\n    if (!cb && err) {\\n      pna.nextTick(emitErrorNT, _this, err);\\n      if (_this._writableState) {\\n        _this._writableState.errorEmitted = true;\\n      }\\n    } else if (cb) {\\n      cb(err);\\n    }\\n  });\\n\\n  return this;\\n}\\n\\nfunction undestroy() {\\n  if (this._readableState) {\\n    this._readableState.destroyed = false;\\n    this._readableState.reading = false;\\n    this._readableState.ended = false;\\n    this._readableState.endEmitted = false;\\n  }\\n\\n  if (this._writableState) {\\n    this._writableState.destroyed = false;\\n    this._writableState.ended = false;\\n    this._writableState.ending = false;\\n    this._writableState.finished = false;\\n    this._writableState.errorEmitted = false;\\n  }\\n}\\n\\nfunction emitErrorNT(self, err) {\\n  self.emit('error', err);\\n}\\n\\nmodule.exports = {\\n  destroy: destroy,\\n  undestroy: undestroy\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/internal/streams/destroy.js?\")},\"../node_modules/readable-stream/lib/internal/streams/stream-browser.js\":function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! events */ \"../node_modules/events/events.js\").EventEmitter;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/lib/internal/streams/stream-browser.js?')},\"../node_modules/readable-stream/node_modules/safe-buffer/index.js\":function(module,exports,__webpack_require__){eval(\"/* eslint-disable node/no-deprecated-api */\\nvar buffer = __webpack_require__(/*! buffer */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\")\\nvar Buffer = buffer.Buffer\\n\\n// alternative to using Object.keys for old browsers\\nfunction copyProps (src, dst) {\\n  for (var key in src) {\\n    dst[key] = src[key]\\n  }\\n}\\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\\n  module.exports = buffer\\n} else {\\n  // Copy properties from require('buffer')\\n  copyProps(buffer, exports)\\n  exports.Buffer = SafeBuffer\\n}\\n\\nfunction SafeBuffer (arg, encodingOrOffset, length) {\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\n// Copy static methods from Buffer\\ncopyProps(Buffer, SafeBuffer)\\n\\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\\n  if (typeof arg === 'number') {\\n    throw new TypeError('Argument must not be a number')\\n  }\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\nSafeBuffer.alloc = function (size, fill, encoding) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  var buf = Buffer(size)\\n  if (fill !== undefined) {\\n    if (typeof encoding === 'string') {\\n      buf.fill(fill, encoding)\\n    } else {\\n      buf.fill(fill)\\n    }\\n  } else {\\n    buf.fill(0)\\n  }\\n  return buf\\n}\\n\\nSafeBuffer.allocUnsafe = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return Buffer(size)\\n}\\n\\nSafeBuffer.allocUnsafeSlow = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return buffer.SlowBuffer(size)\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/node_modules/safe-buffer/index.js?\")},\"../node_modules/readable-stream/passthrough.js\":function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! ./readable */ \"../node_modules/readable-stream/readable-browser.js\").PassThrough\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/passthrough.js?')},\"../node_modules/readable-stream/readable-browser.js\":function(module,exports,__webpack_require__){eval('exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ \"../node_modules/readable-stream/lib/_stream_readable.js\");\\nexports.Stream = exports;\\nexports.Readable = exports;\\nexports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ \"../node_modules/readable-stream/lib/_stream_writable.js\");\\nexports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ \"../node_modules/readable-stream/lib/_stream_duplex.js\");\\nexports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ \"../node_modules/readable-stream/lib/_stream_transform.js\");\\nexports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ \"../node_modules/readable-stream/lib/_stream_passthrough.js\");\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/readable-browser.js?')},\"../node_modules/readable-stream/transform.js\":function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! ./readable */ \"../node_modules/readable-stream/readable-browser.js\").Transform\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/transform.js?')},\"../node_modules/readable-stream/writable-browser.js\":function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ \"../node_modules/readable-stream/lib/_stream_writable.js\");\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/readable-stream/writable-browser.js?')},\"../node_modules/safe-buffer/index.js\":function(module,exports,__webpack_require__){eval(\"/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\\n/* eslint-disable node/no-deprecated-api */\\nvar buffer = __webpack_require__(/*! buffer */ \\\"../node_modules/node-libs-browser/node_modules/buffer/index.js\\\")\\nvar Buffer = buffer.Buffer\\n\\n// alternative to using Object.keys for old browsers\\nfunction copyProps (src, dst) {\\n  for (var key in src) {\\n    dst[key] = src[key]\\n  }\\n}\\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\\n  module.exports = buffer\\n} else {\\n  // Copy properties from require('buffer')\\n  copyProps(buffer, exports)\\n  exports.Buffer = SafeBuffer\\n}\\n\\nfunction SafeBuffer (arg, encodingOrOffset, length) {\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\nSafeBuffer.prototype = Object.create(Buffer.prototype)\\n\\n// Copy static methods from Buffer\\ncopyProps(Buffer, SafeBuffer)\\n\\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\\n  if (typeof arg === 'number') {\\n    throw new TypeError('Argument must not be a number')\\n  }\\n  return Buffer(arg, encodingOrOffset, length)\\n}\\n\\nSafeBuffer.alloc = function (size, fill, encoding) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  var buf = Buffer(size)\\n  if (fill !== undefined) {\\n    if (typeof encoding === 'string') {\\n      buf.fill(fill, encoding)\\n    } else {\\n      buf.fill(fill)\\n    }\\n  } else {\\n    buf.fill(0)\\n  }\\n  return buf\\n}\\n\\nSafeBuffer.allocUnsafe = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return Buffer(size)\\n}\\n\\nSafeBuffer.allocUnsafeSlow = function (size) {\\n  if (typeof size !== 'number') {\\n    throw new TypeError('Argument must be a number')\\n  }\\n  return buffer.SlowBuffer(size)\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/safe-buffer/index.js?\")},\"../node_modules/safe-json-parse/tuple.js\":function(module,exports){eval(\"module.exports = SafeParseTuple\\n\\nfunction SafeParseTuple(obj, reviver) {\\n    var json\\n    var error = null\\n\\n    try {\\n        json = JSON.parse(obj, reviver)\\n    } catch (err) {\\n        error = err\\n    }\\n\\n    return [error, json]\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/safe-json-parse/tuple.js?\")},\"../node_modules/setimmediate/setImmediate.js\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {\\n    \"use strict\";\\n\\n    if (global.setImmediate) {\\n        return;\\n    }\\n\\n    var nextHandle = 1; // Spec says greater than zero\\n    var tasksByHandle = {};\\n    var currentlyRunningATask = false;\\n    var doc = global.document;\\n    var registerImmediate;\\n\\n    function setImmediate(callback) {\\n      // Callback can either be a function or a string\\n      if (typeof callback !== \"function\") {\\n        callback = new Function(\"\" + callback);\\n      }\\n      // Copy function arguments\\n      var args = new Array(arguments.length - 1);\\n      for (var i = 0; i < args.length; i++) {\\n          args[i] = arguments[i + 1];\\n      }\\n      // Store and register the task\\n      var task = { callback: callback, args: args };\\n      tasksByHandle[nextHandle] = task;\\n      registerImmediate(nextHandle);\\n      return nextHandle++;\\n    }\\n\\n    function clearImmediate(handle) {\\n        delete tasksByHandle[handle];\\n    }\\n\\n    function run(task) {\\n        var callback = task.callback;\\n        var args = task.args;\\n        switch (args.length) {\\n        case 0:\\n            callback();\\n            break;\\n        case 1:\\n            callback(args[0]);\\n            break;\\n        case 2:\\n            callback(args[0], args[1]);\\n            break;\\n        case 3:\\n            callback(args[0], args[1], args[2]);\\n            break;\\n        default:\\n            callback.apply(undefined, args);\\n            break;\\n        }\\n    }\\n\\n    function runIfPresent(handle) {\\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\\n        // So if we\\'re currently running a task, we\\'ll need to delay this invocation.\\n        if (currentlyRunningATask) {\\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\\n            // \"too much recursion\" error.\\n            setTimeout(runIfPresent, 0, handle);\\n        } else {\\n            var task = tasksByHandle[handle];\\n            if (task) {\\n                currentlyRunningATask = true;\\n                try {\\n                    run(task);\\n                } finally {\\n                    clearImmediate(handle);\\n                    currentlyRunningATask = false;\\n                }\\n            }\\n        }\\n    }\\n\\n    function installNextTickImplementation() {\\n        registerImmediate = function(handle) {\\n            process.nextTick(function () { runIfPresent(handle); });\\n        };\\n    }\\n\\n    function canUsePostMessage() {\\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\\n        // where `global.postMessage` means something completely different and can\\'t be used for this purpose.\\n        if (global.postMessage && !global.importScripts) {\\n            var postMessageIsAsynchronous = true;\\n            var oldOnMessage = global.onmessage;\\n            global.onmessage = function() {\\n                postMessageIsAsynchronous = false;\\n            };\\n            global.postMessage(\"\", \"*\");\\n            global.onmessage = oldOnMessage;\\n            return postMessageIsAsynchronous;\\n        }\\n    }\\n\\n    function installPostMessageImplementation() {\\n        // Installs an event handler on `global` for the `message` event: see\\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\\n\\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\\n        var onGlobalMessage = function(event) {\\n            if (event.source === global &&\\n                typeof event.data === \"string\" &&\\n                event.data.indexOf(messagePrefix) === 0) {\\n                runIfPresent(+event.data.slice(messagePrefix.length));\\n            }\\n        };\\n\\n        if (global.addEventListener) {\\n            global.addEventListener(\"message\", onGlobalMessage, false);\\n        } else {\\n            global.attachEvent(\"onmessage\", onGlobalMessage);\\n        }\\n\\n        registerImmediate = function(handle) {\\n            global.postMessage(messagePrefix + handle, \"*\");\\n        };\\n    }\\n\\n    function installMessageChannelImplementation() {\\n        var channel = new MessageChannel();\\n        channel.port1.onmessage = function(event) {\\n            var handle = event.data;\\n            runIfPresent(handle);\\n        };\\n\\n        registerImmediate = function(handle) {\\n            channel.port2.postMessage(handle);\\n        };\\n    }\\n\\n    function installReadyStateChangeImplementation() {\\n        var html = doc.documentElement;\\n        registerImmediate = function(handle) {\\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it\\'s been called.\\n            var script = doc.createElement(\"script\");\\n            script.onreadystatechange = function () {\\n                runIfPresent(handle);\\n                script.onreadystatechange = null;\\n                html.removeChild(script);\\n                script = null;\\n            };\\n            html.appendChild(script);\\n        };\\n    }\\n\\n    function installSetTimeoutImplementation() {\\n        registerImmediate = function(handle) {\\n            setTimeout(runIfPresent, 0, handle);\\n        };\\n    }\\n\\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\\n\\n    // Don\\'t get fooled by e.g. browserify environments.\\n    if ({}.toString.call(global.process) === \"[object process]\") {\\n        // For Node.js before 0.9\\n        installNextTickImplementation();\\n\\n    } else if (canUsePostMessage()) {\\n        // For non-IE10 modern browsers\\n        installPostMessageImplementation();\\n\\n    } else if (global.MessageChannel) {\\n        // For web workers, where supported\\n        installMessageChannelImplementation();\\n\\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\\n        // For IE 6–8\\n        installReadyStateChangeImplementation();\\n\\n    } else {\\n        // For older browsers\\n        installSetTimeoutImplementation();\\n    }\\n\\n    attachTo.setImmediate = setImmediate;\\n    attachTo.clearImmediate = clearImmediate;\\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../process/browser.js */ \"../node_modules/process/browser.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/setimmediate/setImmediate.js?')},\"../node_modules/stream-browserify/index.js\":function(module,exports,__webpack_require__){eval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\nmodule.exports = Stream;\\n\\nvar EE = __webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\").EventEmitter;\\nvar inherits = __webpack_require__(/*! inherits */ \\\"../node_modules/inherits/inherits_browser.js\\\");\\n\\ninherits(Stream, EE);\\nStream.Readable = __webpack_require__(/*! readable-stream/readable.js */ \\\"../node_modules/readable-stream/readable-browser.js\\\");\\nStream.Writable = __webpack_require__(/*! readable-stream/writable.js */ \\\"../node_modules/readable-stream/writable-browser.js\\\");\\nStream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ \\\"../node_modules/readable-stream/duplex-browser.js\\\");\\nStream.Transform = __webpack_require__(/*! readable-stream/transform.js */ \\\"../node_modules/readable-stream/transform.js\\\");\\nStream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ \\\"../node_modules/readable-stream/passthrough.js\\\");\\n\\n// Backwards-compat with node 0.4.x\\nStream.Stream = Stream;\\n\\n\\n\\n// old-style streams.  Note that the pipe method (the only relevant\\n// part of this class) is overridden in the Readable class.\\n\\nfunction Stream() {\\n  EE.call(this);\\n}\\n\\nStream.prototype.pipe = function(dest, options) {\\n  var source = this;\\n\\n  function ondata(chunk) {\\n    if (dest.writable) {\\n      if (false === dest.write(chunk) && source.pause) {\\n        source.pause();\\n      }\\n    }\\n  }\\n\\n  source.on('data', ondata);\\n\\n  function ondrain() {\\n    if (source.readable && source.resume) {\\n      source.resume();\\n    }\\n  }\\n\\n  dest.on('drain', ondrain);\\n\\n  // If the 'end' option is not supplied, dest.end() will be called when\\n  // source gets the 'end' or 'close' events.  Only dest.end() once.\\n  if (!dest._isStdio && (!options || options.end !== false)) {\\n    source.on('end', onend);\\n    source.on('close', onclose);\\n  }\\n\\n  var didOnEnd = false;\\n  function onend() {\\n    if (didOnEnd) return;\\n    didOnEnd = true;\\n\\n    dest.end();\\n  }\\n\\n\\n  function onclose() {\\n    if (didOnEnd) return;\\n    didOnEnd = true;\\n\\n    if (typeof dest.destroy === 'function') dest.destroy();\\n  }\\n\\n  // don't leave dangling pipes when there are errors.\\n  function onerror(er) {\\n    cleanup();\\n    if (EE.listenerCount(this, 'error') === 0) {\\n      throw er; // Unhandled stream error in pipe.\\n    }\\n  }\\n\\n  source.on('error', onerror);\\n  dest.on('error', onerror);\\n\\n  // remove all the event listeners that were added.\\n  function cleanup() {\\n    source.removeListener('data', ondata);\\n    dest.removeListener('drain', ondrain);\\n\\n    source.removeListener('end', onend);\\n    source.removeListener('close', onclose);\\n\\n    source.removeListener('error', onerror);\\n    dest.removeListener('error', onerror);\\n\\n    source.removeListener('end', cleanup);\\n    source.removeListener('close', cleanup);\\n\\n    dest.removeListener('close', cleanup);\\n  }\\n\\n  source.on('end', cleanup);\\n  source.on('close', cleanup);\\n\\n  dest.on('close', cleanup);\\n\\n  dest.emit('pipe', source);\\n\\n  // Allow for unix-like usage: A.pipe(B).pipe(C)\\n  return dest;\\n};\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/stream-browserify/index.js?\")},\"../node_modules/string_decoder/lib/string_decoder.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"// Copyright Joyent, Inc. and other Node contributors.\\n//\\n// Permission is hereby granted, free of charge, to any person obtaining a\\n// copy of this software and associated documentation files (the\\n// \\\"Software\\\"), to deal in the Software without restriction, including\\n// without limitation the rights to use, copy, modify, merge, publish,\\n// distribute, sublicense, and/or sell copies of the Software, and to permit\\n// persons to whom the Software is furnished to do so, subject to the\\n// following conditions:\\n//\\n// The above copyright notice and this permission notice shall be included\\n// in all copies or substantial portions of the Software.\\n//\\n// THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n\\n\\n/*<replacement>*/\\n\\nvar Buffer = __webpack_require__(/*! safe-buffer */ \\\"../node_modules/safe-buffer/index.js\\\").Buffer;\\n/*</replacement>*/\\n\\nvar isEncoding = Buffer.isEncoding || function (encoding) {\\n  encoding = '' + encoding;\\n  switch (encoding && encoding.toLowerCase()) {\\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\\n      return true;\\n    default:\\n      return false;\\n  }\\n};\\n\\nfunction _normalizeEncoding(enc) {\\n  if (!enc) return 'utf8';\\n  var retried;\\n  while (true) {\\n    switch (enc) {\\n      case 'utf8':\\n      case 'utf-8':\\n        return 'utf8';\\n      case 'ucs2':\\n      case 'ucs-2':\\n      case 'utf16le':\\n      case 'utf-16le':\\n        return 'utf16le';\\n      case 'latin1':\\n      case 'binary':\\n        return 'latin1';\\n      case 'base64':\\n      case 'ascii':\\n      case 'hex':\\n        return enc;\\n      default:\\n        if (retried) return; // undefined\\n        enc = ('' + enc).toLowerCase();\\n        retried = true;\\n    }\\n  }\\n};\\n\\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\\n// modules monkey-patch it to support additional encodings\\nfunction normalizeEncoding(enc) {\\n  var nenc = _normalizeEncoding(enc);\\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\\n  return nenc || enc;\\n}\\n\\n// StringDecoder provides an interface for efficiently splitting a series of\\n// buffers into a series of JS strings without breaking apart multi-byte\\n// characters.\\nexports.StringDecoder = StringDecoder;\\nfunction StringDecoder(encoding) {\\n  this.encoding = normalizeEncoding(encoding);\\n  var nb;\\n  switch (this.encoding) {\\n    case 'utf16le':\\n      this.text = utf16Text;\\n      this.end = utf16End;\\n      nb = 4;\\n      break;\\n    case 'utf8':\\n      this.fillLast = utf8FillLast;\\n      nb = 4;\\n      break;\\n    case 'base64':\\n      this.text = base64Text;\\n      this.end = base64End;\\n      nb = 3;\\n      break;\\n    default:\\n      this.write = simpleWrite;\\n      this.end = simpleEnd;\\n      return;\\n  }\\n  this.lastNeed = 0;\\n  this.lastTotal = 0;\\n  this.lastChar = Buffer.allocUnsafe(nb);\\n}\\n\\nStringDecoder.prototype.write = function (buf) {\\n  if (buf.length === 0) return '';\\n  var r;\\n  var i;\\n  if (this.lastNeed) {\\n    r = this.fillLast(buf);\\n    if (r === undefined) return '';\\n    i = this.lastNeed;\\n    this.lastNeed = 0;\\n  } else {\\n    i = 0;\\n  }\\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\\n  return r || '';\\n};\\n\\nStringDecoder.prototype.end = utf8End;\\n\\n// Returns only complete characters in a Buffer\\nStringDecoder.prototype.text = utf8Text;\\n\\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\\nStringDecoder.prototype.fillLast = function (buf) {\\n  if (this.lastNeed <= buf.length) {\\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\\n  }\\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\\n  this.lastNeed -= buf.length;\\n};\\n\\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\\n// continuation byte. If an invalid byte is detected, -2 is returned.\\nfunction utf8CheckByte(byte) {\\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\\n  return byte >> 6 === 0x02 ? -1 : -2;\\n}\\n\\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\\n// needed to complete the UTF-8 character (if applicable) are returned.\\nfunction utf8CheckIncomplete(self, buf, i) {\\n  var j = buf.length - 1;\\n  if (j < i) return 0;\\n  var nb = utf8CheckByte(buf[j]);\\n  if (nb >= 0) {\\n    if (nb > 0) self.lastNeed = nb - 1;\\n    return nb;\\n  }\\n  if (--j < i || nb === -2) return 0;\\n  nb = utf8CheckByte(buf[j]);\\n  if (nb >= 0) {\\n    if (nb > 0) self.lastNeed = nb - 2;\\n    return nb;\\n  }\\n  if (--j < i || nb === -2) return 0;\\n  nb = utf8CheckByte(buf[j]);\\n  if (nb >= 0) {\\n    if (nb > 0) {\\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\\n    }\\n    return nb;\\n  }\\n  return 0;\\n}\\n\\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\\n// needed or are available. If we see a non-continuation byte where we expect\\n// one, we \\\"replace\\\" the validated continuation bytes we've seen so far with\\n// a single UTF-8 replacement character ('\\\\ufffd'), to match v8's UTF-8 decoding\\n// behavior. The continuation byte check is included three times in the case\\n// where all of the continuation bytes for a character exist in the same buffer.\\n// It is also done this way as a slight performance increase instead of using a\\n// loop.\\nfunction utf8CheckExtraBytes(self, buf, p) {\\n  if ((buf[0] & 0xC0) !== 0x80) {\\n    self.lastNeed = 0;\\n    return '\\\\ufffd';\\n  }\\n  if (self.lastNeed > 1 && buf.length > 1) {\\n    if ((buf[1] & 0xC0) !== 0x80) {\\n      self.lastNeed = 1;\\n      return '\\\\ufffd';\\n    }\\n    if (self.lastNeed > 2 && buf.length > 2) {\\n      if ((buf[2] & 0xC0) !== 0x80) {\\n        self.lastNeed = 2;\\n        return '\\\\ufffd';\\n      }\\n    }\\n  }\\n}\\n\\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\\nfunction utf8FillLast(buf) {\\n  var p = this.lastTotal - this.lastNeed;\\n  var r = utf8CheckExtraBytes(this, buf, p);\\n  if (r !== undefined) return r;\\n  if (this.lastNeed <= buf.length) {\\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\\n  }\\n  buf.copy(this.lastChar, p, 0, buf.length);\\n  this.lastNeed -= buf.length;\\n}\\n\\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\\n// partial character, the character's bytes are buffered until the required\\n// number of bytes are available.\\nfunction utf8Text(buf, i) {\\n  var total = utf8CheckIncomplete(this, buf, i);\\n  if (!this.lastNeed) return buf.toString('utf8', i);\\n  this.lastTotal = total;\\n  var end = buf.length - (total - this.lastNeed);\\n  buf.copy(this.lastChar, 0, end);\\n  return buf.toString('utf8', i, end);\\n}\\n\\n// For UTF-8, a replacement character is added when ending on a partial\\n// character.\\nfunction utf8End(buf) {\\n  var r = buf && buf.length ? this.write(buf) : '';\\n  if (this.lastNeed) return r + '\\\\ufffd';\\n  return r;\\n}\\n\\n// UTF-16LE typically needs two bytes per character, but even if we have an even\\n// number of bytes available, we need to check if we end on a leading/high\\n// surrogate. In that case, we need to wait for the next two bytes in order to\\n// decode the last character properly.\\nfunction utf16Text(buf, i) {\\n  if ((buf.length - i) % 2 === 0) {\\n    var r = buf.toString('utf16le', i);\\n    if (r) {\\n      var c = r.charCodeAt(r.length - 1);\\n      if (c >= 0xD800 && c <= 0xDBFF) {\\n        this.lastNeed = 2;\\n        this.lastTotal = 4;\\n        this.lastChar[0] = buf[buf.length - 2];\\n        this.lastChar[1] = buf[buf.length - 1];\\n        return r.slice(0, -1);\\n      }\\n    }\\n    return r;\\n  }\\n  this.lastNeed = 1;\\n  this.lastTotal = 2;\\n  this.lastChar[0] = buf[buf.length - 1];\\n  return buf.toString('utf16le', i, buf.length - 1);\\n}\\n\\n// For UTF-16LE we do not explicitly append special replacement characters if we\\n// end on a partial character, we simply let v8 handle that.\\nfunction utf16End(buf) {\\n  var r = buf && buf.length ? this.write(buf) : '';\\n  if (this.lastNeed) {\\n    var end = this.lastTotal - this.lastNeed;\\n    return r + this.lastChar.toString('utf16le', 0, end);\\n  }\\n  return r;\\n}\\n\\nfunction base64Text(buf, i) {\\n  var n = (buf.length - i) % 3;\\n  if (n === 0) return buf.toString('base64', i);\\n  this.lastNeed = 3 - n;\\n  this.lastTotal = 3;\\n  if (n === 1) {\\n    this.lastChar[0] = buf[buf.length - 1];\\n  } else {\\n    this.lastChar[0] = buf[buf.length - 2];\\n    this.lastChar[1] = buf[buf.length - 1];\\n  }\\n  return buf.toString('base64', i, buf.length - n);\\n}\\n\\nfunction base64End(buf) {\\n  var r = buf && buf.length ? this.write(buf) : '';\\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\\n  return r;\\n}\\n\\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\\nfunction simpleWrite(buf) {\\n  return buf.toString(this.encoding);\\n}\\n\\nfunction simpleEnd(buf) {\\n  return buf && buf.length ? this.write(buf) : '';\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/string_decoder/lib/string_decoder.js?\")},\"../node_modules/timers-browserify/main.js\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== \"undefined\" && global) ||\\n            (typeof self !== \"undefined\" && self) ||\\n            window;\\nvar apply = Function.prototype.apply;\\n\\n// DOM APIs, for completeness\\n\\nexports.setTimeout = function() {\\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\\n};\\nexports.setInterval = function() {\\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\\n};\\nexports.clearTimeout =\\nexports.clearInterval = function(timeout) {\\n  if (timeout) {\\n    timeout.close();\\n  }\\n};\\n\\nfunction Timeout(id, clearFn) {\\n  this._id = id;\\n  this._clearFn = clearFn;\\n}\\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\\nTimeout.prototype.close = function() {\\n  this._clearFn.call(scope, this._id);\\n};\\n\\n// Does not start the time, just sets up the members needed.\\nexports.enroll = function(item, msecs) {\\n  clearTimeout(item._idleTimeoutId);\\n  item._idleTimeout = msecs;\\n};\\n\\nexports.unenroll = function(item) {\\n  clearTimeout(item._idleTimeoutId);\\n  item._idleTimeout = -1;\\n};\\n\\nexports._unrefActive = exports.active = function(item) {\\n  clearTimeout(item._idleTimeoutId);\\n\\n  var msecs = item._idleTimeout;\\n  if (msecs >= 0) {\\n    item._idleTimeoutId = setTimeout(function onTimeout() {\\n      if (item._onTimeout)\\n        item._onTimeout();\\n    }, msecs);\\n  }\\n};\\n\\n// setimmediate attaches itself to the global object\\n__webpack_require__(/*! setimmediate */ \"../node_modules/setimmediate/setImmediate.js\");\\n// On some exotic environments, it\\'s not clear which object `setimmediate` was\\n// able to install onto.  Search each possibility in the same order as the\\n// `setimmediate` library.\\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\\n                       (typeof global !== \"undefined\" && global.setImmediate) ||\\n                       (this && this.setImmediate);\\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\\n                         (typeof global !== \"undefined\" && global.clearImmediate) ||\\n                         (this && this.clearImmediate);\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/timers-browserify/main.js?')},\"../node_modules/url-toolkit/src/url-toolkit.js\":function(module,exports,__webpack_require__){eval(\"// see https://tools.ietf.org/html/rfc1808\\n\\n(function (root) {\\n  var URL_REGEX = /^((?:[a-zA-Z0-9+\\\\-.]+:)?)(\\\\/\\\\/[^\\\\/?#]*)?((?:[^\\\\/?#]*\\\\/)*[^;?#]*)?(;[^?#]*)?(\\\\?[^#]*)?(#.*)?$/;\\n  var FIRST_SEGMENT_REGEX = /^([^\\\\/?#]*)(.*)$/;\\n  var SLASH_DOT_REGEX = /(?:\\\\/|^)\\\\.(?=\\\\/)/g;\\n  var SLASH_DOT_DOT_REGEX = /(?:\\\\/|^)\\\\.\\\\.\\\\/(?!\\\\.\\\\.\\\\/)[^\\\\/]*(?=\\\\/)/g;\\n\\n  var URLToolkit = {\\n    // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\\n    // E.g\\n    // With opts.alwaysNormalize = false (default, spec compliant)\\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\\n    // With opts.alwaysNormalize = true (not spec compliant)\\n    // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\\n    buildAbsoluteURL: function (baseURL, relativeURL, opts) {\\n      opts = opts || {};\\n      // remove any remaining space and CRLF\\n      baseURL = baseURL.trim();\\n      relativeURL = relativeURL.trim();\\n      if (!relativeURL) {\\n        // 2a) If the embedded URL is entirely empty, it inherits the\\n        // entire base URL (i.e., is set equal to the base URL)\\n        // and we are done.\\n        if (!opts.alwaysNormalize) {\\n          return baseURL;\\n        }\\n        var basePartsForNormalise = URLToolkit.parseURL(baseURL);\\n        if (!basePartsForNormalise) {\\n          throw new Error('Error trying to parse base URL.');\\n        }\\n        basePartsForNormalise.path = URLToolkit.normalizePath(\\n          basePartsForNormalise.path\\n        );\\n        return URLToolkit.buildURLFromParts(basePartsForNormalise);\\n      }\\n      var relativeParts = URLToolkit.parseURL(relativeURL);\\n      if (!relativeParts) {\\n        throw new Error('Error trying to parse relative URL.');\\n      }\\n      if (relativeParts.scheme) {\\n        // 2b) If the embedded URL starts with a scheme name, it is\\n        // interpreted as an absolute URL and we are done.\\n        if (!opts.alwaysNormalize) {\\n          return relativeURL;\\n        }\\n        relativeParts.path = URLToolkit.normalizePath(relativeParts.path);\\n        return URLToolkit.buildURLFromParts(relativeParts);\\n      }\\n      var baseParts = URLToolkit.parseURL(baseURL);\\n      if (!baseParts) {\\n        throw new Error('Error trying to parse base URL.');\\n      }\\n      if (!baseParts.netLoc && baseParts.path && baseParts.path[0] !== '/') {\\n        // If netLoc missing and path doesn't start with '/', assume everthing before the first '/' is the netLoc\\n        // This causes 'example.com/a' to be handled as '//example.com/a' instead of '/example.com/a'\\n        var pathParts = FIRST_SEGMENT_REGEX.exec(baseParts.path);\\n        baseParts.netLoc = pathParts[1];\\n        baseParts.path = pathParts[2];\\n      }\\n      if (baseParts.netLoc && !baseParts.path) {\\n        baseParts.path = '/';\\n      }\\n      var builtParts = {\\n        // 2c) Otherwise, the embedded URL inherits the scheme of\\n        // the base URL.\\n        scheme: baseParts.scheme,\\n        netLoc: relativeParts.netLoc,\\n        path: null,\\n        params: relativeParts.params,\\n        query: relativeParts.query,\\n        fragment: relativeParts.fragment,\\n      };\\n      if (!relativeParts.netLoc) {\\n        // 3) If the embedded URL's <net_loc> is non-empty, we skip to\\n        // Step 7.  Otherwise, the embedded URL inherits the <net_loc>\\n        // (if any) of the base URL.\\n        builtParts.netLoc = baseParts.netLoc;\\n        // 4) If the embedded URL path is preceded by a slash \\\"/\\\", the\\n        // path is not relative and we skip to Step 7.\\n        if (relativeParts.path[0] !== '/') {\\n          if (!relativeParts.path) {\\n            // 5) If the embedded URL path is empty (and not preceded by a\\n            // slash), then the embedded URL inherits the base URL path\\n            builtParts.path = baseParts.path;\\n            // 5a) if the embedded URL's <params> is non-empty, we skip to\\n            // step 7; otherwise, it inherits the <params> of the base\\n            // URL (if any) and\\n            if (!relativeParts.params) {\\n              builtParts.params = baseParts.params;\\n              // 5b) if the embedded URL's <query> is non-empty, we skip to\\n              // step 7; otherwise, it inherits the <query> of the base\\n              // URL (if any) and we skip to step 7.\\n              if (!relativeParts.query) {\\n                builtParts.query = baseParts.query;\\n              }\\n            }\\n          } else {\\n            // 6) The last segment of the base URL's path (anything\\n            // following the rightmost slash \\\"/\\\", or the entire path if no\\n            // slash is present) is removed and the embedded URL's path is\\n            // appended in its place.\\n            var baseURLPath = baseParts.path;\\n            var newPath =\\n              baseURLPath.substring(0, baseURLPath.lastIndexOf('/') + 1) +\\n              relativeParts.path;\\n            builtParts.path = URLToolkit.normalizePath(newPath);\\n          }\\n        }\\n      }\\n      if (builtParts.path === null) {\\n        builtParts.path = opts.alwaysNormalize\\n          ? URLToolkit.normalizePath(relativeParts.path)\\n          : relativeParts.path;\\n      }\\n      return URLToolkit.buildURLFromParts(builtParts);\\n    },\\n    parseURL: function (url) {\\n      var parts = URL_REGEX.exec(url);\\n      if (!parts) {\\n        return null;\\n      }\\n      return {\\n        scheme: parts[1] || '',\\n        netLoc: parts[2] || '',\\n        path: parts[3] || '',\\n        params: parts[4] || '',\\n        query: parts[5] || '',\\n        fragment: parts[6] || '',\\n      };\\n    },\\n    normalizePath: function (path) {\\n      // The following operations are\\n      // then applied, in order, to the new path:\\n      // 6a) All occurrences of \\\"./\\\", where \\\".\\\" is a complete path\\n      // segment, are removed.\\n      // 6b) If the path ends with \\\".\\\" as a complete path segment,\\n      // that \\\".\\\" is removed.\\n      path = path.split('').reverse().join('').replace(SLASH_DOT_REGEX, '');\\n      // 6c) All occurrences of \\\"<segment>/../\\\", where <segment> is a\\n      // complete path segment not equal to \\\"..\\\", are removed.\\n      // Removal of these path segments is performed iteratively,\\n      // removing the leftmost matching pattern on each iteration,\\n      // until no matching pattern remains.\\n      // 6d) If the path ends with \\\"<segment>/..\\\", where <segment> is a\\n      // complete path segment not equal to \\\"..\\\", that\\n      // \\\"<segment>/..\\\" is removed.\\n      while (\\n        path.length !== (path = path.replace(SLASH_DOT_DOT_REGEX, '')).length\\n      ) {}\\n      return path.split('').reverse().join('');\\n    },\\n    buildURLFromParts: function (parts) {\\n      return (\\n        parts.scheme +\\n        parts.netLoc +\\n        parts.path +\\n        parts.params +\\n        parts.query +\\n        parts.fragment\\n      );\\n    },\\n  };\\n\\n  if (true)\\n    module.exports = URLToolkit;\\n  else {}\\n})(this);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/url-toolkit/src/url-toolkit.js?\")},\"../node_modules/util-deprecate/browser.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(global) {\\n/**\\n * Module exports.\\n */\\n\\nmodule.exports = deprecate;\\n\\n/**\\n * Mark that a method should not be used.\\n * Returns a modified function which warns once by default.\\n *\\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\\n *\\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\\n * will throw an Error when invoked.\\n *\\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\\n * will invoke `console.trace()` instead of `console.error()`.\\n *\\n * @param {Function} fn - the function to deprecate\\n * @param {String} msg - the string to print to the console when `fn` is invoked\\n * @returns {Function} a new \\\"deprecated\\\" version of `fn`\\n * @api public\\n */\\n\\nfunction deprecate (fn, msg) {\\n  if (config('noDeprecation')) {\\n    return fn;\\n  }\\n\\n  var warned = false;\\n  function deprecated() {\\n    if (!warned) {\\n      if (config('throwDeprecation')) {\\n        throw new Error(msg);\\n      } else if (config('traceDeprecation')) {\\n        console.trace(msg);\\n      } else {\\n        console.warn(msg);\\n      }\\n      warned = true;\\n    }\\n    return fn.apply(this, arguments);\\n  }\\n\\n  return deprecated;\\n}\\n\\n/**\\n * Checks `localStorage` for boolean values for the given `name`.\\n *\\n * @param {String} name\\n * @returns {Boolean}\\n * @api private\\n */\\n\\nfunction config (name) {\\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\\n  try {\\n    if (!global.localStorage) return false;\\n  } catch (_) {\\n    return false;\\n  }\\n  var val = global.localStorage[name];\\n  if (null == val) return false;\\n  return String(val).toLowerCase() === 'true';\\n}\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/util-deprecate/browser.js?\")},\"../node_modules/video.js/dist/video.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ \\\"../node_modules/video.js/node_modules/global/window.js-exposed\\\");\\n/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/document */ \\\"../node_modules/video.js/node_modules/global/document.js-exposed\\\");\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__);\\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__);\\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);\\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);\\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);\\n/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/inheritsLoose */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__);\\n/* harmony import */ var safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! safe-json-parse/tuple */ \\\"../node_modules/safe-json-parse/tuple.js\\\");\\n/* harmony import */ var safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7__);\\n/* harmony import */ var keycode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! keycode */ \\\"../node_modules/keycode/index.js\\\");\\n/* harmony import */ var keycode__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(keycode__WEBPACK_IMPORTED_MODULE_8__);\\n/* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @videojs/xhr */ \\\"../node_modules/@videojs/xhr/index.js\\\");\\n/* harmony import */ var _videojs_xhr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_videojs_xhr__WEBPACK_IMPORTED_MODULE_9__);\\n/* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! videojs-vtt.js */ \\\"../node_modules/videojs-vtt.js/lib/browser-index.js\\\");\\n/* harmony import */ var videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10__);\\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime/helpers/construct */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11__);\\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \\\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed\\\");\\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12__);\\n/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! url-toolkit */ \\\"../node_modules/url-toolkit/src/url-toolkit.js\\\");\\n/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_13__);\\n/* harmony import */ var m3u8_parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! m3u8-parser */ \\\"../node_modules/m3u8-parser/dist/m3u8-parser.es.js\\\");\\n/* harmony import */ var mpd_parser__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! mpd-parser */ \\\"../node_modules/mpd-parser/dist/mpd-parser.es.js\\\");\\n/* harmony import */ var mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! mux.js/lib/tools/mp4-inspector */ \\\"../node_modules/mux.js/lib/tools/mp4-inspector.js\\\");\\n/* harmony import */ var mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16__);\\n/* harmony import */ var mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! mux.js/lib/mp4/probe */ \\\"../node_modules/mux.js/lib/mp4/probe.js\\\");\\n/* harmony import */ var mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17__);\\n/* harmony import */ var mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! mux.js/lib/mp4/caption-parser */ \\\"../node_modules/mux.js/lib/mp4/caption-parser.js\\\");\\n/* harmony import */ var mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18__);\\n/* harmony import */ var mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! mux.js/lib/tools/ts-inspector.js */ \\\"../node_modules/mux.js/lib/tools/ts-inspector.js\\\");\\n/* harmony import */ var mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19__);\\n/* harmony import */ var aes_decrypter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! aes-decrypter */ \\\"../node_modules/aes-decrypter/dist/aes-decrypter.es.js\\\");\\n/**\\n * @license\\n * Video.js 7.8.4 <http://videojs.com/>\\n * Copyright Brightcove, Inc. <https://www.brightcove.com/>\\n * Available under Apache License Version 2.0\\n * <https://github.com/videojs/video.js/blob/master/LICENSE>\\n *\\n * Includes vtt.js <https://github.com/mozilla/vtt.js>\\n * Available under Apache License Version 2.0\\n * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>\\n */\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nvar version = \\\"7.8.4\\\";\\n\\n/**\\n * @file create-logger.js\\n * @module create-logger\\n */\\n\\nvar history = [];\\n/**\\n * Log messages to the console and history based on the type of message\\n *\\n * @private\\n * @param  {string} type\\n *         The name of the console method to use.\\n *\\n * @param  {Array} args\\n *         The arguments to be passed to the matching console method.\\n */\\n\\nvar LogByTypeFactory = function LogByTypeFactory(name, log) {\\n  return function (type, level, args) {\\n    var lvl = log.levels[level];\\n    var lvlRegExp = new RegExp(\\\"^(\\\" + lvl + \\\")$\\\");\\n\\n    if (type !== 'log') {\\n      // Add the type to the front of the message when it's not \\\"log\\\".\\n      args.unshift(type.toUpperCase() + ':');\\n    } // Add console prefix after adding to history.\\n\\n\\n    args.unshift(name + ':'); // Add a clone of the args at this point to history.\\n\\n    if (history) {\\n      history.push([].concat(args)); // only store 1000 history entries\\n\\n      var splice = history.length - 1000;\\n      history.splice(0, splice > 0 ? splice : 0);\\n    } // If there's no console then don't try to output messages, but they will\\n    // still be stored in history.\\n\\n\\n    if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console) {\\n      return;\\n    } // Was setting these once outside of this function, but containing them\\n    // in the function makes it easier to test cases where console doesn't exist\\n    // when the module is executed.\\n\\n\\n    var fn = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console[type];\\n\\n    if (!fn && type === 'debug') {\\n      // Certain browsers don't have support for console.debug. For those, we\\n      // should default to the closest comparable log.\\n      fn = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.info || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.log;\\n    } // Bail out if there's no console or if this type is not allowed by the\\n    // current logging level.\\n\\n\\n    if (!fn || !lvl || !lvlRegExp.test(type)) {\\n      return;\\n    }\\n\\n    fn[Array.isArray(args) ? 'apply' : 'call'](global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console, args);\\n  };\\n};\\n\\nfunction createLogger(name) {\\n  // This is the private tracking variable for logging level.\\n  var level = 'info'; // the curried logByType bound to the specific log and history\\n\\n  var logByType;\\n  /**\\n   * Logs plain debug messages. Similar to `console.log`.\\n   *\\n   * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\\n   * of our JSDoc template, we cannot properly document this as both a function\\n   * and a namespace, so its function signature is documented here.\\n   *\\n   * #### Arguments\\n   * ##### *args\\n   * Mixed[]\\n   *\\n   * Any combination of values that could be passed to `console.log()`.\\n   *\\n   * #### Return Value\\n   *\\n   * `undefined`\\n   *\\n   * @namespace\\n   * @param    {Mixed[]} args\\n   *           One or more messages or objects that should be logged.\\n   */\\n\\n  var log = function log() {\\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n      args[_key] = arguments[_key];\\n    }\\n\\n    logByType('log', level, args);\\n  }; // This is the logByType helper that the logging methods below use\\n\\n\\n  logByType = LogByTypeFactory(name, log);\\n  /**\\n   * Create a new sublogger which chains the old name to the new name.\\n   *\\n   * For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:\\n   * ```js\\n   *  mylogger('foo');\\n   *  // > VIDEOJS: player: foo\\n   * ```\\n   *\\n   * @param {string} name\\n   *        The name to add call the new logger\\n   * @return {Object}\\n   */\\n\\n  log.createLogger = function (subname) {\\n    return createLogger(name + ': ' + subname);\\n  };\\n  /**\\n   * Enumeration of available logging levels, where the keys are the level names\\n   * and the values are `|`-separated strings containing logging methods allowed\\n   * in that logging level. These strings are used to create a regular expression\\n   * matching the function name being called.\\n   *\\n   * Levels provided by Video.js are:\\n   *\\n   * - `off`: Matches no calls. Any value that can be cast to `false` will have\\n   *   this effect. The most restrictive.\\n   * - `all`: Matches only Video.js-provided functions (`debug`, `log`,\\n   *   `log.warn`, and `log.error`).\\n   * - `debug`: Matches `log.debug`, `log`, `log.warn`, and `log.error` calls.\\n   * - `info` (default): Matches `log`, `log.warn`, and `log.error` calls.\\n   * - `warn`: Matches `log.warn` and `log.error` calls.\\n   * - `error`: Matches only `log.error` calls.\\n   *\\n   * @type {Object}\\n   */\\n\\n\\n  log.levels = {\\n    all: 'debug|log|warn|error',\\n    off: '',\\n    debug: 'debug|log|warn|error',\\n    info: 'log|warn|error',\\n    warn: 'warn|error',\\n    error: 'error',\\n    DEFAULT: level\\n  };\\n  /**\\n   * Get or set the current logging level.\\n   *\\n   * If a string matching a key from {@link module:log.levels} is provided, acts\\n   * as a setter.\\n   *\\n   * @param  {string} [lvl]\\n   *         Pass a valid level to set a new logging level.\\n   *\\n   * @return {string}\\n   *         The current logging level.\\n   */\\n\\n  log.level = function (lvl) {\\n    if (typeof lvl === 'string') {\\n      if (!log.levels.hasOwnProperty(lvl)) {\\n        throw new Error(\\\"\\\\\\\"\\\" + lvl + \\\"\\\\\\\" in not a valid log level\\\");\\n      }\\n\\n      level = lvl;\\n    }\\n\\n    return level;\\n  };\\n  /**\\n   * Returns an array containing everything that has been logged to the history.\\n   *\\n   * This array is a shallow clone of the internal history record. However, its\\n   * contents are _not_ cloned; so, mutating objects inside this array will\\n   * mutate them in history.\\n   *\\n   * @return {Array}\\n   */\\n\\n\\n  log.history = function () {\\n    return history ? [].concat(history) : [];\\n  };\\n  /**\\n   * Allows you to filter the history by the given logger name\\n   *\\n   * @param {string} fname\\n   *        The name to filter by\\n   *\\n   * @return {Array}\\n   *         The filtered list to return\\n   */\\n\\n\\n  log.history.filter = function (fname) {\\n    return (history || []).filter(function (historyItem) {\\n      // if the first item in each historyItem includes `fname`, then it's a match\\n      return new RegExp(\\\".*\\\" + fname + \\\".*\\\").test(historyItem[0]);\\n    });\\n  };\\n  /**\\n   * Clears the internal history tracking, but does not prevent further history\\n   * tracking.\\n   */\\n\\n\\n  log.history.clear = function () {\\n    if (history) {\\n      history.length = 0;\\n    }\\n  };\\n  /**\\n   * Disable history tracking if it is currently enabled.\\n   */\\n\\n\\n  log.history.disable = function () {\\n    if (history !== null) {\\n      history.length = 0;\\n      history = null;\\n    }\\n  };\\n  /**\\n   * Enable history tracking if it is currently disabled.\\n   */\\n\\n\\n  log.history.enable = function () {\\n    if (history === null) {\\n      history = [];\\n    }\\n  };\\n  /**\\n   * Logs error messages. Similar to `console.error`.\\n   *\\n   * @param {Mixed[]} args\\n   *        One or more messages or objects that should be logged as an error\\n   */\\n\\n\\n  log.error = function () {\\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n      args[_key2] = arguments[_key2];\\n    }\\n\\n    return logByType('error', level, args);\\n  };\\n  /**\\n   * Logs warning messages. Similar to `console.warn`.\\n   *\\n   * @param {Mixed[]} args\\n   *        One or more messages or objects that should be logged as a warning.\\n   */\\n\\n\\n  log.warn = function () {\\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n      args[_key3] = arguments[_key3];\\n    }\\n\\n    return logByType('warn', level, args);\\n  };\\n  /**\\n   * Logs debug messages. Similar to `console.debug`, but may also act as a comparable\\n   * log if `console.debug` is not available\\n   *\\n   * @param {Mixed[]} args\\n   *        One or more messages or objects that should be logged as debug.\\n   */\\n\\n\\n  log.debug = function () {\\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\\n      args[_key4] = arguments[_key4];\\n    }\\n\\n    return logByType('debug', level, args);\\n  };\\n\\n  return log;\\n}\\n\\n/**\\n * @file log.js\\n * @module log\\n */\\nvar log = createLogger('VIDEOJS');\\nvar createLogger$1 = log.createLogger;\\n\\n/**\\n * @file obj.js\\n * @module obj\\n */\\n\\n/**\\n * @callback obj:EachCallback\\n *\\n * @param {Mixed} value\\n *        The current key for the object that is being iterated over.\\n *\\n * @param {string} key\\n *        The current key-value for object that is being iterated over\\n */\\n\\n/**\\n * @callback obj:ReduceCallback\\n *\\n * @param {Mixed} accum\\n *        The value that is accumulating over the reduce loop.\\n *\\n * @param {Mixed} value\\n *        The current key for the object that is being iterated over.\\n *\\n * @param {string} key\\n *        The current key-value for object that is being iterated over\\n *\\n * @return {Mixed}\\n *         The new accumulated value.\\n */\\nvar toString = Object.prototype.toString;\\n/**\\n * Get the keys of an Object\\n *\\n * @param {Object}\\n *        The Object to get the keys from\\n *\\n * @return {string[]}\\n *         An array of the keys from the object. Returns an empty array if the\\n *         object passed in was invalid or had no keys.\\n *\\n * @private\\n */\\n\\nvar keys = function keys(object) {\\n  return isObject(object) ? Object.keys(object) : [];\\n};\\n/**\\n * Array-like iteration for objects.\\n *\\n * @param {Object} object\\n *        The object to iterate over\\n *\\n * @param {obj:EachCallback} fn\\n *        The callback function which is called for each key in the object.\\n */\\n\\n\\nfunction each(object, fn) {\\n  keys(object).forEach(function (key) {\\n    return fn(object[key], key);\\n  });\\n}\\n/**\\n * Array-like reduce for objects.\\n *\\n * @param {Object} object\\n *        The Object that you want to reduce.\\n *\\n * @param {Function} fn\\n *         A callback function which is called for each key in the object. It\\n *         receives the accumulated value and the per-iteration value and key\\n *         as arguments.\\n *\\n * @param {Mixed} [initial = 0]\\n *        Starting value\\n *\\n * @return {Mixed}\\n *         The final accumulated value.\\n */\\n\\nfunction reduce(object, fn, initial) {\\n  if (initial === void 0) {\\n    initial = 0;\\n  }\\n\\n  return keys(object).reduce(function (accum, key) {\\n    return fn(accum, object[key], key);\\n  }, initial);\\n}\\n/**\\n * Object.assign-style object shallow merge/extend.\\n *\\n * @param  {Object} target\\n * @param  {Object} ...sources\\n * @return {Object}\\n */\\n\\nfunction assign(target) {\\n  for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n    sources[_key - 1] = arguments[_key];\\n  }\\n\\n  if (Object.assign) {\\n    return _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default.a.apply(void 0, [target].concat(sources));\\n  }\\n\\n  sources.forEach(function (source) {\\n    if (!source) {\\n      return;\\n    }\\n\\n    each(source, function (value, key) {\\n      target[key] = value;\\n    });\\n  });\\n  return target;\\n}\\n/**\\n * Returns whether a value is an object of any kind - including DOM nodes,\\n * arrays, regular expressions, etc. Not functions, though.\\n *\\n * This avoids the gotcha where using `typeof` on a `null` value\\n * results in `'object'`.\\n *\\n * @param  {Object} value\\n * @return {boolean}\\n */\\n\\nfunction isObject(value) {\\n  return !!value && typeof value === 'object';\\n}\\n/**\\n * Returns whether an object appears to be a \\\"plain\\\" object - that is, a\\n * direct instance of `Object`.\\n *\\n * @param  {Object} value\\n * @return {boolean}\\n */\\n\\nfunction isPlain(value) {\\n  return isObject(value) && toString.call(value) === '[object Object]' && value.constructor === Object;\\n}\\n\\n/**\\n * @file computed-style.js\\n * @module computed-style\\n */\\n/**\\n * A safe getComputedStyle.\\n *\\n * This is needed because in Firefox, if the player is loaded in an iframe with\\n * `display:none`, then `getComputedStyle` returns `null`, so, we do a\\n * null-check to make sure that the player doesn't break in these cases.\\n *\\n * @function\\n * @param    {Element} el\\n *           The element you want the computed style of\\n *\\n * @param    {string} prop\\n *           The property name you want\\n *\\n * @see      https://bugzilla.mozilla.org/show_bug.cgi?id=548397\\n */\\n\\nfunction computedStyle(el, prop) {\\n  if (!el || !prop) {\\n    return '';\\n  }\\n\\n  if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle === 'function') {\\n    var computedStyleValue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle(el);\\n    return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : '';\\n  }\\n\\n  return '';\\n}\\n\\n/**\\n * @file dom.js\\n * @module dom\\n */\\n/**\\n * Detect if a value is a string with any non-whitespace characters.\\n *\\n * @private\\n * @param  {string} str\\n *         The string to check\\n *\\n * @return {boolean}\\n *         Will be `true` if the string is non-blank, `false` otherwise.\\n *\\n */\\n\\nfunction isNonBlankString(str) {\\n  // we use str.trim as it will trim any whitespace characters\\n  // from the front or back of non-whitespace characters. aka\\n  // Any string that contains non-whitespace characters will\\n  // still contain them after `trim` but whitespace only strings\\n  // will have a length of 0, failing this check.\\n  return typeof str === 'string' && Boolean(str.trim());\\n}\\n/**\\n * Throws an error if the passed string has whitespace. This is used by\\n * class methods to be relatively consistent with the classList API.\\n *\\n * @private\\n * @param  {string} str\\n *         The string to check for whitespace.\\n *\\n * @throws {Error}\\n *         Throws an error if there is whitespace in the string.\\n */\\n\\n\\nfunction throwIfWhitespace(str) {\\n  // str.indexOf instead of regex because str.indexOf is faster performance wise.\\n  if (str.indexOf(' ') >= 0) {\\n    throw new Error('class has illegal whitespace characters');\\n  }\\n}\\n/**\\n * Produce a regular expression for matching a className within an elements className.\\n *\\n * @private\\n * @param  {string} className\\n *         The className to generate the RegExp for.\\n *\\n * @return {RegExp}\\n *         The RegExp that will check for a specific `className` in an elements\\n *         className.\\n */\\n\\n\\nfunction classRegExp(className) {\\n  return new RegExp('(^|\\\\\\\\s)' + className + '($|\\\\\\\\s)');\\n}\\n/**\\n * Whether the current DOM interface appears to be real (i.e. not simulated).\\n *\\n * @return {boolean}\\n *         Will be `true` if the DOM appears to be real, `false` otherwise.\\n */\\n\\n\\nfunction isReal() {\\n  // Both document and window will never be undefined thanks to `global`.\\n  return global_document__WEBPACK_IMPORTED_MODULE_1___default.a === global_window__WEBPACK_IMPORTED_MODULE_0___default.a.document;\\n}\\n/**\\n * Determines, via duck typing, whether or not a value is a DOM element.\\n *\\n * @param  {Mixed} value\\n *         The value to check.\\n *\\n * @return {boolean}\\n *         Will be `true` if the value is a DOM element, `false` otherwise.\\n */\\n\\nfunction isEl(value) {\\n  return isObject(value) && value.nodeType === 1;\\n}\\n/**\\n * Determines if the current DOM is embedded in an iframe.\\n *\\n * @return {boolean}\\n *         Will be `true` if the DOM is embedded in an iframe, `false`\\n *         otherwise.\\n */\\n\\nfunction isInFrame() {\\n  // We need a try/catch here because Safari will throw errors when attempting\\n  // to get either `parent` or `self`\\n  try {\\n    return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.parent !== global_window__WEBPACK_IMPORTED_MODULE_0___default.a.self;\\n  } catch (x) {\\n    return true;\\n  }\\n}\\n/**\\n * Creates functions to query the DOM using a given method.\\n *\\n * @private\\n * @param   {string} method\\n *          The method to create the query with.\\n *\\n * @return  {Function}\\n *          The query method\\n */\\n\\nfunction createQuerier(method) {\\n  return function (selector, context) {\\n    if (!isNonBlankString(selector)) {\\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a[method](null);\\n    }\\n\\n    if (isNonBlankString(context)) {\\n      context = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.querySelector(context);\\n    }\\n\\n    var ctx = isEl(context) ? context : global_document__WEBPACK_IMPORTED_MODULE_1___default.a;\\n    return ctx[method] && ctx[method](selector);\\n  };\\n}\\n/**\\n * Creates an element and applies properties, attributes, and inserts content.\\n *\\n * @param  {string} [tagName='div']\\n *         Name of tag to be created.\\n *\\n * @param  {Object} [properties={}]\\n *         Element properties to be applied.\\n *\\n * @param  {Object} [attributes={}]\\n *         Element attributes to be applied.\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor object.\\n *\\n * @return {Element}\\n *         The element that was created.\\n */\\n\\n\\nfunction createEl(tagName, properties, attributes, content) {\\n  if (tagName === void 0) {\\n    tagName = 'div';\\n  }\\n\\n  if (properties === void 0) {\\n    properties = {};\\n  }\\n\\n  if (attributes === void 0) {\\n    attributes = {};\\n  }\\n\\n  var el = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(tagName);\\n  Object.getOwnPropertyNames(properties).forEach(function (propName) {\\n    var val = properties[propName]; // See #2176\\n    // We originally were accepting both properties and attributes in the\\n    // same object, but that doesn't work so well.\\n\\n    if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\\n      log.warn('Setting attributes in the second argument of createEl()\\\\n' + 'has been deprecated. Use the third argument instead.\\\\n' + (\\\"createEl(type, properties, attributes). Attempting to set \\\" + propName + \\\" to \\\" + val + \\\".\\\"));\\n      el.setAttribute(propName, val); // Handle textContent since it's not supported everywhere and we have a\\n      // method for it.\\n    } else if (propName === 'textContent') {\\n      textContent(el, val);\\n    } else if (el[propName] !== val) {\\n      el[propName] = val;\\n    }\\n  });\\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\\n    el.setAttribute(attrName, attributes[attrName]);\\n  });\\n\\n  if (content) {\\n    appendContent(el, content);\\n  }\\n\\n  return el;\\n}\\n/**\\n * Injects text into an element, replacing any existing contents entirely.\\n *\\n * @param  {Element} el\\n *         The element to add text content into\\n *\\n * @param  {string} text\\n *         The text content to add.\\n *\\n * @return {Element}\\n *         The element with added text content.\\n */\\n\\nfunction textContent(el, text) {\\n  if (typeof el.textContent === 'undefined') {\\n    el.innerText = text;\\n  } else {\\n    el.textContent = text;\\n  }\\n\\n  return el;\\n}\\n/**\\n * Insert an element as the first child node of another\\n *\\n * @param {Element} child\\n *        Element to insert\\n *\\n * @param {Element} parent\\n *        Element to insert child into\\n */\\n\\nfunction prependTo(child, parent) {\\n  if (parent.firstChild) {\\n    parent.insertBefore(child, parent.firstChild);\\n  } else {\\n    parent.appendChild(child);\\n  }\\n}\\n/**\\n * Check if an element has a class name.\\n *\\n * @param  {Element} element\\n *         Element to check\\n *\\n * @param  {string} classToCheck\\n *         Class name to check for\\n *\\n * @return {boolean}\\n *         Will be `true` if the element has a class, `false` otherwise.\\n *\\n * @throws {Error}\\n *         Throws an error if `classToCheck` has white space.\\n */\\n\\nfunction hasClass(element, classToCheck) {\\n  throwIfWhitespace(classToCheck);\\n\\n  if (element.classList) {\\n    return element.classList.contains(classToCheck);\\n  }\\n\\n  return classRegExp(classToCheck).test(element.className);\\n}\\n/**\\n * Add a class name to an element.\\n *\\n * @param  {Element} element\\n *         Element to add class name to.\\n *\\n * @param  {string} classToAdd\\n *         Class name to add.\\n *\\n * @return {Element}\\n *         The DOM element with the added class name.\\n */\\n\\nfunction addClass(element, classToAdd) {\\n  if (element.classList) {\\n    element.classList.add(classToAdd); // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\\n    // in the case of classList not being supported.\\n  } else if (!hasClass(element, classToAdd)) {\\n    element.className = (element.className + ' ' + classToAdd).trim();\\n  }\\n\\n  return element;\\n}\\n/**\\n * Remove a class name from an element.\\n *\\n * @param  {Element} element\\n *         Element to remove a class name from.\\n *\\n * @param  {string} classToRemove\\n *         Class name to remove\\n *\\n * @return {Element}\\n *         The DOM element with class name removed.\\n */\\n\\nfunction removeClass(element, classToRemove) {\\n  if (element.classList) {\\n    element.classList.remove(classToRemove);\\n  } else {\\n    throwIfWhitespace(classToRemove);\\n    element.className = element.className.split(/\\\\s+/).filter(function (c) {\\n      return c !== classToRemove;\\n    }).join(' ');\\n  }\\n\\n  return element;\\n}\\n/**\\n * The callback definition for toggleClass.\\n *\\n * @callback module:dom~PredicateCallback\\n * @param    {Element} element\\n *           The DOM element of the Component.\\n *\\n * @param    {string} classToToggle\\n *           The `className` that wants to be toggled\\n *\\n * @return   {boolean|undefined}\\n *           If `true` is returned, the `classToToggle` will be added to the\\n *           `element`. If `false`, the `classToToggle` will be removed from\\n *           the `element`. If `undefined`, the callback will be ignored.\\n */\\n\\n/**\\n * Adds or removes a class name to/from an element depending on an optional\\n * condition or the presence/absence of the class name.\\n *\\n * @param  {Element} element\\n *         The element to toggle a class name on.\\n *\\n * @param  {string} classToToggle\\n *         The class that should be toggled.\\n *\\n * @param  {boolean|module:dom~PredicateCallback} [predicate]\\n *         See the return value for {@link module:dom~PredicateCallback}\\n *\\n * @return {Element}\\n *         The element with a class that has been toggled.\\n */\\n\\nfunction toggleClass(element, classToToggle, predicate) {\\n  // This CANNOT use `classList` internally because IE11 does not support the\\n  // second parameter to the `classList.toggle()` method! Which is fine because\\n  // `classList` will be used by the add/remove functions.\\n  var has = hasClass(element, classToToggle);\\n\\n  if (typeof predicate === 'function') {\\n    predicate = predicate(element, classToToggle);\\n  }\\n\\n  if (typeof predicate !== 'boolean') {\\n    predicate = !has;\\n  } // If the necessary class operation matches the current state of the\\n  // element, no action is required.\\n\\n\\n  if (predicate === has) {\\n    return;\\n  }\\n\\n  if (predicate) {\\n    addClass(element, classToToggle);\\n  } else {\\n    removeClass(element, classToToggle);\\n  }\\n\\n  return element;\\n}\\n/**\\n * Apply attributes to an HTML element.\\n *\\n * @param {Element} el\\n *        Element to add attributes to.\\n *\\n * @param {Object} [attributes]\\n *        Attributes to be applied.\\n */\\n\\nfunction setAttributes(el, attributes) {\\n  Object.getOwnPropertyNames(attributes).forEach(function (attrName) {\\n    var attrValue = attributes[attrName];\\n\\n    if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\\n      el.removeAttribute(attrName);\\n    } else {\\n      el.setAttribute(attrName, attrValue === true ? '' : attrValue);\\n    }\\n  });\\n}\\n/**\\n * Get an element's attribute values, as defined on the HTML tag.\\n *\\n * Attributes are not the same as properties. They're defined on the tag\\n * or with setAttribute.\\n *\\n * @param  {Element} tag\\n *         Element from which to get tag attributes.\\n *\\n * @return {Object}\\n *         All attributes of the element. Boolean attributes will be `true` or\\n *         `false`, others will be strings.\\n */\\n\\nfunction getAttributes(tag) {\\n  var obj = {}; // known boolean attributes\\n  // we can check for matching boolean properties, but not all browsers\\n  // and not all tags know about these attributes, so, we still want to check them manually\\n\\n  var knownBooleans = ',' + 'autoplay,controls,playsinline,loop,muted,default,defaultMuted' + ',';\\n\\n  if (tag && tag.attributes && tag.attributes.length > 0) {\\n    var attrs = tag.attributes;\\n\\n    for (var i = attrs.length - 1; i >= 0; i--) {\\n      var attrName = attrs[i].name;\\n      var attrVal = attrs[i].value; // check for known booleans\\n      // the matching element property will return a value for typeof\\n\\n      if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {\\n        // the value of an included boolean attribute is typically an empty\\n        // string ('') which would equal false if we just check for a false value.\\n        // we also don't want support bad code like autoplay='false'\\n        attrVal = attrVal !== null ? true : false;\\n      }\\n\\n      obj[attrName] = attrVal;\\n    }\\n  }\\n\\n  return obj;\\n}\\n/**\\n * Get the value of an element's attribute.\\n *\\n * @param {Element} el\\n *        A DOM element.\\n *\\n * @param {string} attribute\\n *        Attribute to get the value of.\\n *\\n * @return {string}\\n *         The value of the attribute.\\n */\\n\\nfunction getAttribute(el, attribute) {\\n  return el.getAttribute(attribute);\\n}\\n/**\\n * Set the value of an element's attribute.\\n *\\n * @param {Element} el\\n *        A DOM element.\\n *\\n * @param {string} attribute\\n *        Attribute to set.\\n *\\n * @param {string} value\\n *        Value to set the attribute to.\\n */\\n\\nfunction setAttribute(el, attribute, value) {\\n  el.setAttribute(attribute, value);\\n}\\n/**\\n * Remove an element's attribute.\\n *\\n * @param {Element} el\\n *        A DOM element.\\n *\\n * @param {string} attribute\\n *        Attribute to remove.\\n */\\n\\nfunction removeAttribute(el, attribute) {\\n  el.removeAttribute(attribute);\\n}\\n/**\\n * Attempt to block the ability to select text.\\n */\\n\\nfunction blockTextSelection() {\\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.focus();\\n\\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.onselectstart = function () {\\n    return false;\\n  };\\n}\\n/**\\n * Turn off text selection blocking.\\n */\\n\\nfunction unblockTextSelection() {\\n  global_document__WEBPACK_IMPORTED_MODULE_1___default.a.onselectstart = function () {\\n    return true;\\n  };\\n}\\n/**\\n * Identical to the native `getBoundingClientRect` function, but ensures that\\n * the method is supported at all (it is in all browsers we claim to support)\\n * and that the element is in the DOM before continuing.\\n *\\n * This wrapper function also shims properties which are not provided by some\\n * older browsers (namely, IE8).\\n *\\n * Additionally, some browsers do not support adding properties to a\\n * `ClientRect`/`DOMRect` object; so, we shallow-copy it with the standard\\n * properties (except `x` and `y` which are not widely supported). This helps\\n * avoid implementations where keys are non-enumerable.\\n *\\n * @param  {Element} el\\n *         Element whose `ClientRect` we want to calculate.\\n *\\n * @return {Object|undefined}\\n *         Always returns a plain object - or `undefined` if it cannot.\\n */\\n\\nfunction getBoundingClientRect(el) {\\n  if (el && el.getBoundingClientRect && el.parentNode) {\\n    var rect = el.getBoundingClientRect();\\n    var result = {};\\n    ['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (k) {\\n      if (rect[k] !== undefined) {\\n        result[k] = rect[k];\\n      }\\n    });\\n\\n    if (!result.height) {\\n      result.height = parseFloat(computedStyle(el, 'height'));\\n    }\\n\\n    if (!result.width) {\\n      result.width = parseFloat(computedStyle(el, 'width'));\\n    }\\n\\n    return result;\\n  }\\n}\\n/**\\n * Represents the position of a DOM element on the page.\\n *\\n * @typedef  {Object} module:dom~Position\\n *\\n * @property {number} left\\n *           Pixels to the left.\\n *\\n * @property {number} top\\n *           Pixels from the top.\\n */\\n\\n/**\\n * Get the position of an element in the DOM.\\n *\\n * Uses `getBoundingClientRect` technique from John Resig.\\n *\\n * @see http://ejohn.org/blog/getboundingclientrect-is-awesome/\\n *\\n * @param  {Element} el\\n *         Element from which to get offset.\\n *\\n * @return {module:dom~Position}\\n *         The position of the element that was passed in.\\n */\\n\\nfunction findPosition(el) {\\n  var box;\\n\\n  if (el.getBoundingClientRect && el.parentNode) {\\n    box = el.getBoundingClientRect();\\n  }\\n\\n  if (!box) {\\n    return {\\n      left: 0,\\n      top: 0\\n    };\\n  }\\n\\n  var docEl = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement;\\n  var body = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body;\\n  var clientLeft = docEl.clientLeft || body.clientLeft || 0;\\n  var scrollLeft = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.pageXOffset || body.scrollLeft;\\n  var left = box.left + scrollLeft - clientLeft;\\n  var clientTop = docEl.clientTop || body.clientTop || 0;\\n  var scrollTop = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.pageYOffset || body.scrollTop;\\n  var top = box.top + scrollTop - clientTop; // Android sometimes returns slightly off decimal values, so need to round\\n\\n  return {\\n    left: Math.round(left),\\n    top: Math.round(top)\\n  };\\n}\\n/**\\n * Represents x and y coordinates for a DOM element or mouse pointer.\\n *\\n * @typedef  {Object} module:dom~Coordinates\\n *\\n * @property {number} x\\n *           x coordinate in pixels\\n *\\n * @property {number} y\\n *           y coordinate in pixels\\n */\\n\\n/**\\n * Get the pointer position within an element.\\n *\\n * The base on the coordinates are the bottom left of the element.\\n *\\n * @param  {Element} el\\n *         Element on which to get the pointer position on.\\n *\\n * @param  {EventTarget~Event} event\\n *         Event object.\\n *\\n * @return {module:dom~Coordinates}\\n *         A coordinates object corresponding to the mouse position.\\n *\\n */\\n\\nfunction getPointerPosition(el, event) {\\n  var position = {};\\n  var box = findPosition(el);\\n  var boxW = el.offsetWidth;\\n  var boxH = el.offsetHeight;\\n  var boxY = box.top;\\n  var boxX = box.left;\\n  var pageY = event.pageY;\\n  var pageX = event.pageX;\\n\\n  if (event.changedTouches) {\\n    pageX = event.changedTouches[0].pageX;\\n    pageY = event.changedTouches[0].pageY;\\n  }\\n\\n  position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));\\n  position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\\n  return position;\\n}\\n/**\\n * Determines, via duck typing, whether or not a value is a text node.\\n *\\n * @param  {Mixed} value\\n *         Check if this value is a text node.\\n *\\n * @return {boolean}\\n *         Will be `true` if the value is a text node, `false` otherwise.\\n */\\n\\nfunction isTextNode(value) {\\n  return isObject(value) && value.nodeType === 3;\\n}\\n/**\\n * Empties the contents of an element.\\n *\\n * @param  {Element} el\\n *         The element to empty children from\\n *\\n * @return {Element}\\n *         The element with no children\\n */\\n\\nfunction emptyEl(el) {\\n  while (el.firstChild) {\\n    el.removeChild(el.firstChild);\\n  }\\n\\n  return el;\\n}\\n/**\\n * This is a mixed value that describes content to be injected into the DOM\\n * via some method. It can be of the following types:\\n *\\n * Type       | Description\\n * -----------|-------------\\n * `string`   | The value will be normalized into a text node.\\n * `Element`  | The value will be accepted as-is.\\n * `TextNode` | The value will be accepted as-is.\\n * `Array`    | A one-dimensional array of strings, elements, text nodes, or functions. These functions should return a string, element, or text node (any other return value, like an array, will be ignored).\\n * `Function` | A function, which is expected to return a string, element, text node, or array - any of the other possible values described above. This means that a content descriptor could be a function that returns an array of functions, but those second-level functions must return strings, elements, or text nodes.\\n *\\n * @typedef {string|Element|TextNode|Array|Function} module:dom~ContentDescriptor\\n */\\n\\n/**\\n * Normalizes content for eventual insertion into the DOM.\\n *\\n * This allows a wide range of content definition methods, but helps protect\\n * from falling into the trap of simply writing to `innerHTML`, which could\\n * be an XSS concern.\\n *\\n * The content for an element can be passed in multiple types and\\n * combinations, whose behavior is as follows:\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor value.\\n *\\n * @return {Array}\\n *         All of the content that was passed in, normalized to an array of\\n *         elements or text nodes.\\n */\\n\\nfunction normalizeContent(content) {\\n  // First, invoke content if it is a function. If it produces an array,\\n  // that needs to happen before normalization.\\n  if (typeof content === 'function') {\\n    content = content();\\n  } // Next up, normalize to an array, so one or many items can be normalized,\\n  // filtered, and returned.\\n\\n\\n  return (Array.isArray(content) ? content : [content]).map(function (value) {\\n    // First, invoke value if it is a function to produce a new value,\\n    // which will be subsequently normalized to a Node of some kind.\\n    if (typeof value === 'function') {\\n      value = value();\\n    }\\n\\n    if (isEl(value) || isTextNode(value)) {\\n      return value;\\n    }\\n\\n    if (typeof value === 'string' && /\\\\S/.test(value)) {\\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(value);\\n    }\\n  }).filter(function (value) {\\n    return value;\\n  });\\n}\\n/**\\n * Normalizes and appends content to an element.\\n *\\n * @param  {Element} el\\n *         Element to append normalized content to.\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor value.\\n *\\n * @return {Element}\\n *         The element with appended normalized content.\\n */\\n\\nfunction appendContent(el, content) {\\n  normalizeContent(content).forEach(function (node) {\\n    return el.appendChild(node);\\n  });\\n  return el;\\n}\\n/**\\n * Normalizes and inserts content into an element; this is identical to\\n * `appendContent()`, except it empties the element first.\\n *\\n * @param {Element} el\\n *        Element to insert normalized content into.\\n *\\n * @param {module:dom~ContentDescriptor} content\\n *        A content descriptor value.\\n *\\n * @return {Element}\\n *         The element with inserted normalized content.\\n */\\n\\nfunction insertContent(el, content) {\\n  return appendContent(emptyEl(el), content);\\n}\\n/**\\n * Check if an event was a single left click.\\n *\\n * @param  {EventTarget~Event} event\\n *         Event object.\\n *\\n * @return {boolean}\\n *         Will be `true` if a single left click, `false` otherwise.\\n */\\n\\nfunction isSingleLeftClick(event) {\\n  // Note: if you create something draggable, be sure to\\n  // call it on both `mousedown` and `mousemove` event,\\n  // otherwise `mousedown` should be enough for a button\\n  if (event.button === undefined && event.buttons === undefined) {\\n    // Why do we need `buttons` ?\\n    // Because, middle mouse sometimes have this:\\n    // e.button === 0 and e.buttons === 4\\n    // Furthermore, we want to prevent combination click, something like\\n    // HOLD middlemouse then left click, that would be\\n    // e.button === 0, e.buttons === 5\\n    // just `button` is not gonna work\\n    // Alright, then what this block does ?\\n    // this is for chrome `simulate mobile devices`\\n    // I want to support this as well\\n    return true;\\n  }\\n\\n  if (event.button === 0 && event.buttons === undefined) {\\n    // Touch screen, sometimes on some specific device, `buttons`\\n    // doesn't have anything (safari on ios, blackberry...)\\n    return true;\\n  } // `mouseup` event on a single left click has\\n  // `button` and `buttons` equal to 0\\n\\n\\n  if (event.type === 'mouseup' && event.button === 0 && event.buttons === 0) {\\n    return true;\\n  }\\n\\n  if (event.button !== 0 || event.buttons !== 1) {\\n    // This is the reason we have those if else block above\\n    // if any special case we can catch and let it slide\\n    // we do it above, when get to here, this definitely\\n    // is-not-left-click\\n    return false;\\n  }\\n\\n  return true;\\n}\\n/**\\n * Finds a single DOM element matching `selector` within the optional\\n * `context` of another DOM element (defaulting to `document`).\\n *\\n * @param  {string} selector\\n *         A valid CSS selector, which will be passed to `querySelector`.\\n *\\n * @param  {Element|String} [context=document]\\n *         A DOM element within which to query. Can also be a selector\\n *         string in which case the first matching element will be used\\n *         as context. If missing (or no element matches selector), falls\\n *         back to `document`.\\n *\\n * @return {Element|null}\\n *         The element that was found or null.\\n */\\n\\nvar $ = createQuerier('querySelector');\\n/**\\n * Finds a all DOM elements matching `selector` within the optional\\n * `context` of another DOM element (defaulting to `document`).\\n *\\n * @param  {string} selector\\n *         A valid CSS selector, which will be passed to `querySelectorAll`.\\n *\\n * @param  {Element|String} [context=document]\\n *         A DOM element within which to query. Can also be a selector\\n *         string in which case the first matching element will be used\\n *         as context. If missing (or no element matches selector), falls\\n *         back to `document`.\\n *\\n * @return {NodeList}\\n *         A element list of elements that were found. Will be empty if none\\n *         were found.\\n *\\n */\\n\\nvar $$ = createQuerier('querySelectorAll');\\n\\nvar Dom = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  isReal: isReal,\\n  isEl: isEl,\\n  isInFrame: isInFrame,\\n  createEl: createEl,\\n  textContent: textContent,\\n  prependTo: prependTo,\\n  hasClass: hasClass,\\n  addClass: addClass,\\n  removeClass: removeClass,\\n  toggleClass: toggleClass,\\n  setAttributes: setAttributes,\\n  getAttributes: getAttributes,\\n  getAttribute: getAttribute,\\n  setAttribute: setAttribute,\\n  removeAttribute: removeAttribute,\\n  blockTextSelection: blockTextSelection,\\n  unblockTextSelection: unblockTextSelection,\\n  getBoundingClientRect: getBoundingClientRect,\\n  findPosition: findPosition,\\n  getPointerPosition: getPointerPosition,\\n  isTextNode: isTextNode,\\n  emptyEl: emptyEl,\\n  normalizeContent: normalizeContent,\\n  appendContent: appendContent,\\n  insertContent: insertContent,\\n  isSingleLeftClick: isSingleLeftClick,\\n  $: $,\\n  $$: $$\\n});\\n\\n/**\\n * @file setup.js - Functions for setting up a player without\\n * user interaction based on the data-setup `attribute` of the video tag.\\n *\\n * @module setup\\n */\\nvar _windowLoaded = false;\\nvar videojs;\\n/**\\n * Set up any tags that have a data-setup `attribute` when the player is started.\\n */\\n\\nvar autoSetup = function autoSetup() {\\n  // Protect against breakage in non-browser environments and check global autoSetup option.\\n  if (!isReal() || videojs.options.autoSetup === false) {\\n    return;\\n  }\\n\\n  var vids = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('video'));\\n  var audios = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('audio'));\\n  var divs = Array.prototype.slice.call(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.getElementsByTagName('video-js'));\\n  var mediaEls = vids.concat(audios, divs); // Check if any media elements exist\\n\\n  if (mediaEls && mediaEls.length > 0) {\\n    for (var i = 0, e = mediaEls.length; i < e; i++) {\\n      var mediaEl = mediaEls[i]; // Check if element exists, has getAttribute func.\\n\\n      if (mediaEl && mediaEl.getAttribute) {\\n        // Make sure this player hasn't already been set up.\\n        if (mediaEl.player === undefined) {\\n          var options = mediaEl.getAttribute('data-setup'); // Check if data-setup attr exists.\\n          // We only auto-setup if they've added the data-setup attr.\\n\\n          if (options !== null) {\\n            // Create new video.js instance.\\n            videojs(mediaEl);\\n          }\\n        } // If getAttribute isn't defined, we need to wait for the DOM.\\n\\n      } else {\\n        autoSetupTimeout(1);\\n        break;\\n      }\\n    } // No videos were found, so keep looping unless page is finished loading.\\n\\n  } else if (!_windowLoaded) {\\n    autoSetupTimeout(1);\\n  }\\n};\\n/**\\n * Wait until the page is loaded before running autoSetup. This will be called in\\n * autoSetup if `hasLoaded` returns false.\\n *\\n * @param {number} wait\\n *        How long to wait in ms\\n *\\n * @param {module:videojs} [vjs]\\n *        The videojs library function\\n */\\n\\n\\nfunction autoSetupTimeout(wait, vjs) {\\n  if (vjs) {\\n    videojs = vjs;\\n  }\\n\\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(autoSetup, wait);\\n}\\n/**\\n * Used to set the internal tracking of window loaded state to true.\\n *\\n * @private\\n */\\n\\n\\nfunction setWindowLoaded() {\\n  _windowLoaded = true;\\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('load', setWindowLoaded);\\n}\\n\\nif (isReal()) {\\n  if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.readyState === 'complete') {\\n    setWindowLoaded();\\n  } else {\\n    /**\\n     * Listen for the load event on window, and set _windowLoaded to true.\\n     *\\n     * We use a standard event listener here to avoid incrementing the GUID\\n     * before any players are created.\\n     *\\n     * @listens load\\n     */\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('load', setWindowLoaded);\\n  }\\n}\\n\\n/**\\n * @file stylesheet.js\\n * @module stylesheet\\n */\\n/**\\n * Create a DOM syle element given a className for it.\\n *\\n * @param {string} className\\n *        The className to add to the created style element.\\n *\\n * @return {Element}\\n *         The element that was created.\\n */\\n\\nvar createStyleElement = function createStyleElement(className) {\\n  var style = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('style');\\n  style.className = className;\\n  return style;\\n};\\n/**\\n * Add text to a DOM element.\\n *\\n * @param {Element} el\\n *        The Element to add text content to.\\n *\\n * @param {string} content\\n *        The text to add to the element.\\n */\\n\\nvar setTextContent = function setTextContent(el, content) {\\n  if (el.styleSheet) {\\n    el.styleSheet.cssText = content;\\n  } else {\\n    el.textContent = content;\\n  }\\n};\\n\\n/**\\n * @file guid.js\\n * @module guid\\n */\\n// Default value for GUIDs. This allows us to reset the GUID counter in tests.\\n//\\n// The initial GUID is 3 because some users have come to rely on the first\\n// default player ID ending up as `vjs_video_3`.\\n//\\n// See: https://github.com/videojs/video.js/pull/6216\\nvar _initialGuid = 3;\\n/**\\n * Unique ID for an element or function\\n *\\n * @type {Number}\\n */\\n\\nvar _guid = _initialGuid;\\n/**\\n * Get a unique auto-incrementing ID by number that has not been returned before.\\n *\\n * @return {number}\\n *         A new unique ID.\\n */\\n\\nfunction newGUID() {\\n  return _guid++;\\n}\\n\\n/**\\n * @file dom-data.js\\n * @module dom-data\\n */\\nvar FakeWeakMap;\\n\\nif (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WeakMap) {\\n  FakeWeakMap = /*#__PURE__*/function () {\\n    function FakeWeakMap() {\\n      this.vdata = 'vdata' + Math.floor(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now() || Date.now());\\n      this.data = {};\\n    }\\n\\n    var _proto = FakeWeakMap.prototype;\\n\\n    _proto.set = function set(key, value) {\\n      var access = key[this.vdata] || newGUID();\\n\\n      if (!key[this.vdata]) {\\n        key[this.vdata] = access;\\n      }\\n\\n      this.data[access] = value;\\n      return this;\\n    };\\n\\n    _proto.get = function get(key) {\\n      var access = key[this.vdata]; // we have data, return it\\n\\n      if (access) {\\n        return this.data[access];\\n      } // we don't have data, return nothing.\\n      // return undefined explicitly as that's the contract for this method\\n\\n\\n      log('We have no data for this element', key);\\n      return undefined;\\n    };\\n\\n    _proto.has = function has(key) {\\n      var access = key[this.vdata];\\n      return access in this.data;\\n    };\\n\\n    _proto[\\\"delete\\\"] = function _delete(key) {\\n      var access = key[this.vdata];\\n\\n      if (access) {\\n        delete this.data[access];\\n        delete key[this.vdata];\\n      }\\n    };\\n\\n    return FakeWeakMap;\\n  }();\\n}\\n/**\\n * Element Data Store.\\n *\\n * Allows for binding data to an element without putting it directly on the\\n * element. Ex. Event listeners are stored here.\\n * (also from jsninja.com, slightly modified and updated for closure compiler)\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nvar DomData = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WeakMap ? new WeakMap() : new FakeWeakMap();\\n\\n/**\\n * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\\n * robust as jquery's, so there's probably some differences.\\n *\\n * @file events.js\\n * @module events\\n */\\n/**\\n * Clean up the listener cache and dispatchers\\n *\\n * @param {Element|Object} elem\\n *        Element to clean up\\n *\\n * @param {string} type\\n *        Type of event to clean up\\n */\\n\\nfunction _cleanUpEvents(elem, type) {\\n  if (!DomData.has(elem)) {\\n    return;\\n  }\\n\\n  var data = DomData.get(elem); // Remove the events of a particular type if there are none left\\n\\n  if (data.handlers[type].length === 0) {\\n    delete data.handlers[type]; // data.handlers[type] = null;\\n    // Setting to null was causing an error with data.handlers\\n    // Remove the meta-handler from the element\\n\\n    if (elem.removeEventListener) {\\n      elem.removeEventListener(type, data.dispatcher, false);\\n    } else if (elem.detachEvent) {\\n      elem.detachEvent('on' + type, data.dispatcher);\\n    }\\n  } // Remove the events object if there are no types left\\n\\n\\n  if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\\n    delete data.handlers;\\n    delete data.dispatcher;\\n    delete data.disabled;\\n  } // Finally remove the element data if there is no data left\\n\\n\\n  if (Object.getOwnPropertyNames(data).length === 0) {\\n    DomData[\\\"delete\\\"](elem);\\n  }\\n}\\n/**\\n * Loops through an array of event types and calls the requested method for each type.\\n *\\n * @param {Function} fn\\n *        The event method we want to use.\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind listeners to\\n *\\n * @param {string} type\\n *        Type of event to bind to.\\n *\\n * @param {EventTarget~EventListener} callback\\n *        Event listener.\\n */\\n\\n\\nfunction _handleMultipleEvents(fn, elem, types, callback) {\\n  types.forEach(function (type) {\\n    // Call the event method for each one of the types\\n    fn(elem, type, callback);\\n  });\\n}\\n/**\\n * Fix a native event to have standard property values\\n *\\n * @param {Object} event\\n *        Event object to fix.\\n *\\n * @return {Object}\\n *         Fixed event object.\\n */\\n\\n\\nfunction fixEvent(event) {\\n  if (event.fixed_) {\\n    return event;\\n  }\\n\\n  function returnTrue() {\\n    return true;\\n  }\\n\\n  function returnFalse() {\\n    return false;\\n  } // Test if fixing up is needed\\n  // Used to check if !event.stopPropagation instead of isPropagationStopped\\n  // But native events return true for stopPropagation, but don't have\\n  // other expected methods like isPropagationStopped. Seems to be a problem\\n  // with the Javascript Ninja code. So we're just overriding all events now.\\n\\n\\n  if (!event || !event.isPropagationStopped) {\\n    var old = event || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.event;\\n    event = {}; // Clone the old object so that we can modify the values event = {};\\n    // IE8 Doesn't like when you mess with native event properties\\n    // Firefox returns false for event.hasOwnProperty('type') and other props\\n    //  which makes copying more difficult.\\n    // TODO: Probably best to create a whitelist of event props\\n\\n    for (var key in old) {\\n      // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\\n      // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\\n      // and webkitMovementX/Y\\n      if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' && key !== 'webkitMovementX' && key !== 'webkitMovementY') {\\n        // Chrome 32+ warns if you try to copy deprecated returnValue, but\\n        // we still want to if preventDefault isn't supported (IE8).\\n        if (!(key === 'returnValue' && old.preventDefault)) {\\n          event[key] = old[key];\\n        }\\n      }\\n    } // The event occurred on this element\\n\\n\\n    if (!event.target) {\\n      event.target = event.srcElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a;\\n    } // Handle which other element the event is related to\\n\\n\\n    if (!event.relatedTarget) {\\n      event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;\\n    } // Stop the default browser action\\n\\n\\n    event.preventDefault = function () {\\n      if (old.preventDefault) {\\n        old.preventDefault();\\n      }\\n\\n      event.returnValue = false;\\n      old.returnValue = false;\\n      event.defaultPrevented = true;\\n    };\\n\\n    event.defaultPrevented = false; // Stop the event from bubbling\\n\\n    event.stopPropagation = function () {\\n      if (old.stopPropagation) {\\n        old.stopPropagation();\\n      }\\n\\n      event.cancelBubble = true;\\n      old.cancelBubble = true;\\n      event.isPropagationStopped = returnTrue;\\n    };\\n\\n    event.isPropagationStopped = returnFalse; // Stop the event from bubbling and executing other handlers\\n\\n    event.stopImmediatePropagation = function () {\\n      if (old.stopImmediatePropagation) {\\n        old.stopImmediatePropagation();\\n      }\\n\\n      event.isImmediatePropagationStopped = returnTrue;\\n      event.stopPropagation();\\n    };\\n\\n    event.isImmediatePropagationStopped = returnFalse; // Handle mouse position\\n\\n    if (event.clientX !== null && event.clientX !== undefined) {\\n      var doc = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement;\\n      var body = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body;\\n      event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\\n      event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\\n    } // Handle key presses\\n\\n\\n    event.which = event.charCode || event.keyCode; // Fix button for mouse clicks:\\n    // 0 == left; 1 == middle; 2 == right\\n\\n    if (event.button !== null && event.button !== undefined) {\\n      // The following is disabled because it does not pass videojs-standard\\n      // and... yikes.\\n\\n      /* eslint-disable */\\n      event.button = event.button & 1 ? 0 : event.button & 4 ? 1 : event.button & 2 ? 2 : 0;\\n      /* eslint-enable */\\n    }\\n  }\\n\\n  event.fixed_ = true; // Returns fixed-up instance\\n\\n  return event;\\n}\\n/**\\n * Whether passive event listeners are supported\\n */\\n\\nvar _supportsPassive;\\n\\nvar supportsPassive = function supportsPassive() {\\n  if (typeof _supportsPassive !== 'boolean') {\\n    _supportsPassive = false;\\n\\n    try {\\n      var opts = Object.defineProperty({}, 'passive', {\\n        get: function get() {\\n          _supportsPassive = true;\\n        }\\n      });\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('test', null, opts);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('test', null, opts);\\n    } catch (e) {// disregard\\n    }\\n  }\\n\\n  return _supportsPassive;\\n};\\n/**\\n * Touch events Chrome expects to be passive\\n */\\n\\n\\nvar passiveEvents = ['touchstart', 'touchmove'];\\n/**\\n * Add an event listener to element\\n * It stores the handler function in a separate cache object\\n * and adds a generic handler to the element's event,\\n * along with a unique id (guid) to the element.\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind listeners to\\n *\\n * @param {string|string[]} type\\n *        Type of event to bind to.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        Event listener.\\n */\\n\\nfunction on(elem, type, fn) {\\n  if (Array.isArray(type)) {\\n    return _handleMultipleEvents(on, elem, type, fn);\\n  }\\n\\n  if (!DomData.has(elem)) {\\n    DomData.set(elem, {});\\n  }\\n\\n  var data = DomData.get(elem); // We need a place to store all our handler data\\n\\n  if (!data.handlers) {\\n    data.handlers = {};\\n  }\\n\\n  if (!data.handlers[type]) {\\n    data.handlers[type] = [];\\n  }\\n\\n  if (!fn.guid) {\\n    fn.guid = newGUID();\\n  }\\n\\n  data.handlers[type].push(fn);\\n\\n  if (!data.dispatcher) {\\n    data.disabled = false;\\n\\n    data.dispatcher = function (event, hash) {\\n      if (data.disabled) {\\n        return;\\n      }\\n\\n      event = fixEvent(event);\\n      var handlers = data.handlers[event.type];\\n\\n      if (handlers) {\\n        // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\\n        var handlersCopy = handlers.slice(0);\\n\\n        for (var m = 0, n = handlersCopy.length; m < n; m++) {\\n          if (event.isImmediatePropagationStopped()) {\\n            break;\\n          } else {\\n            try {\\n              handlersCopy[m].call(elem, event, hash);\\n            } catch (e) {\\n              log.error(e);\\n            }\\n          }\\n        }\\n      }\\n    };\\n  }\\n\\n  if (data.handlers[type].length === 1) {\\n    if (elem.addEventListener) {\\n      var options = false;\\n\\n      if (supportsPassive() && passiveEvents.indexOf(type) > -1) {\\n        options = {\\n          passive: true\\n        };\\n      }\\n\\n      elem.addEventListener(type, data.dispatcher, options);\\n    } else if (elem.attachEvent) {\\n      elem.attachEvent('on' + type, data.dispatcher);\\n    }\\n  }\\n}\\n/**\\n * Removes event listeners from an element\\n *\\n * @param {Element|Object} elem\\n *        Object to remove listeners from.\\n *\\n * @param {string|string[]} [type]\\n *        Type of listener to remove. Don't include to remove all events from element.\\n *\\n * @param {EventTarget~EventListener} [fn]\\n *        Specific listener to remove. Don't include to remove listeners for an event\\n *        type.\\n */\\n\\nfunction off(elem, type, fn) {\\n  // Don't want to add a cache object through getElData if not needed\\n  if (!DomData.has(elem)) {\\n    return;\\n  }\\n\\n  var data = DomData.get(elem); // If no events exist, nothing to unbind\\n\\n  if (!data.handlers) {\\n    return;\\n  }\\n\\n  if (Array.isArray(type)) {\\n    return _handleMultipleEvents(off, elem, type, fn);\\n  } // Utility function\\n\\n\\n  var removeType = function removeType(el, t) {\\n    data.handlers[t] = [];\\n\\n    _cleanUpEvents(el, t);\\n  }; // Are we removing all bound events?\\n\\n\\n  if (type === undefined) {\\n    for (var t in data.handlers) {\\n      if (Object.prototype.hasOwnProperty.call(data.handlers || {}, t)) {\\n        removeType(elem, t);\\n      }\\n    }\\n\\n    return;\\n  }\\n\\n  var handlers = data.handlers[type]; // If no handlers exist, nothing to unbind\\n\\n  if (!handlers) {\\n    return;\\n  } // If no listener was provided, remove all listeners for type\\n\\n\\n  if (!fn) {\\n    removeType(elem, type);\\n    return;\\n  } // We're only removing a single handler\\n\\n\\n  if (fn.guid) {\\n    for (var n = 0; n < handlers.length; n++) {\\n      if (handlers[n].guid === fn.guid) {\\n        handlers.splice(n--, 1);\\n      }\\n    }\\n  }\\n\\n  _cleanUpEvents(elem, type);\\n}\\n/**\\n * Trigger an event for an element\\n *\\n * @param {Element|Object} elem\\n *        Element to trigger an event on\\n *\\n * @param {EventTarget~Event|string} event\\n *        A string (the type) or an event object with a type attribute\\n *\\n * @param {Object} [hash]\\n *        data hash to pass along with the event\\n *\\n * @return {boolean|undefined}\\n *         Returns the opposite of `defaultPrevented` if default was\\n *         prevented. Otherwise, returns `undefined`\\n */\\n\\nfunction trigger(elem, event, hash) {\\n  // Fetches element data and a reference to the parent (for bubbling).\\n  // Don't want to add a data object to cache for every parent,\\n  // so checking hasElData first.\\n  var elemData = DomData.has(elem) ? DomData.get(elem) : {};\\n  var parent = elem.parentNode || elem.ownerDocument; // type = event.type || event,\\n  // handler;\\n  // If an event name was passed as a string, creates an event out of it\\n\\n  if (typeof event === 'string') {\\n    event = {\\n      type: event,\\n      target: elem\\n    };\\n  } else if (!event.target) {\\n    event.target = elem;\\n  } // Normalizes the event properties.\\n\\n\\n  event = fixEvent(event); // If the passed element has a dispatcher, executes the established handlers.\\n\\n  if (elemData.dispatcher) {\\n    elemData.dispatcher.call(elem, event, hash);\\n  } // Unless explicitly stopped or the event does not bubble (e.g. media events)\\n  // recursively calls this function to bubble the event up the DOM.\\n\\n\\n  if (parent && !event.isPropagationStopped() && event.bubbles === true) {\\n    trigger.call(null, parent, event, hash); // If at the top of the DOM, triggers the default action unless disabled.\\n  } else if (!parent && !event.defaultPrevented && event.target && event.target[event.type]) {\\n    if (!DomData.has(event.target)) {\\n      DomData.set(event.target, {});\\n    }\\n\\n    var targetData = DomData.get(event.target); // Checks if the target has a default action for this event.\\n\\n    if (event.target[event.type]) {\\n      // Temporarily disables event dispatching on the target as we have already executed the handler.\\n      targetData.disabled = true; // Executes the default action.\\n\\n      if (typeof event.target[event.type] === 'function') {\\n        event.target[event.type]();\\n      } // Re-enables event dispatching.\\n\\n\\n      targetData.disabled = false;\\n    }\\n  } // Inform the triggerer if the default was prevented by returning false\\n\\n\\n  return !event.defaultPrevented;\\n}\\n/**\\n * Trigger a listener only once for an event.\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind to.\\n *\\n * @param {string|string[]} type\\n *        Name/type of event\\n *\\n * @param {Event~EventListener} fn\\n *        Event listener function\\n */\\n\\nfunction one(elem, type, fn) {\\n  if (Array.isArray(type)) {\\n    return _handleMultipleEvents(one, elem, type, fn);\\n  }\\n\\n  var func = function func() {\\n    off(elem, type, func);\\n    fn.apply(this, arguments);\\n  }; // copy the guid to the new function so it can removed using the original function's ID\\n\\n\\n  func.guid = fn.guid = fn.guid || newGUID();\\n  on(elem, type, func);\\n}\\n/**\\n * Trigger a listener only once and then turn if off for all\\n * configured events\\n *\\n * @param {Element|Object} elem\\n *        Element or object to bind to.\\n *\\n * @param {string|string[]} type\\n *        Name/type of event\\n *\\n * @param {Event~EventListener} fn\\n *        Event listener function\\n */\\n\\nfunction any(elem, type, fn) {\\n  var func = function func() {\\n    off(elem, type, func);\\n    fn.apply(this, arguments);\\n  }; // copy the guid to the new function so it can removed using the original function's ID\\n\\n\\n  func.guid = fn.guid = fn.guid || newGUID(); // multiple ons, but one off for everything\\n\\n  on(elem, type, func);\\n}\\n\\nvar Events = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  fixEvent: fixEvent,\\n  on: on,\\n  off: off,\\n  trigger: trigger,\\n  one: one,\\n  any: any\\n});\\n\\n/**\\n * @file fn.js\\n * @module fn\\n */\\nvar UPDATE_REFRESH_INTERVAL = 30;\\n/**\\n * Bind (a.k.a proxy or context). A simple method for changing the context of\\n * a function.\\n *\\n * It also stores a unique id on the function so it can be easily removed from\\n * events.\\n *\\n * @function\\n * @param    {Mixed} context\\n *           The object to bind as scope.\\n *\\n * @param    {Function} fn\\n *           The function to be bound to a scope.\\n *\\n * @param    {number} [uid]\\n *           An optional unique ID for the function to be set\\n *\\n * @return   {Function}\\n *           The new function that will be bound into the context given\\n */\\n\\nvar bind = function bind(context, fn, uid) {\\n  // Make sure the function has a unique ID\\n  if (!fn.guid) {\\n    fn.guid = newGUID();\\n  } // Create the new function that changes the context\\n\\n\\n  var bound = fn.bind(context); // Allow for the ability to individualize this function\\n  // Needed in the case where multiple objects might share the same prototype\\n  // IF both items add an event listener with the same function, then you try to remove just one\\n  // it will remove both because they both have the same guid.\\n  // when using this, you need to use the bind method when you remove the listener as well.\\n  // currently used in text tracks\\n\\n  bound.guid = uid ? uid + '_' + fn.guid : fn.guid;\\n  return bound;\\n};\\n/**\\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\\n * at most once per every `wait` milliseconds.\\n *\\n * @function\\n * @param    {Function} fn\\n *           The function to be throttled.\\n *\\n * @param    {number}   wait\\n *           The number of milliseconds by which to throttle.\\n *\\n * @return   {Function}\\n */\\n\\nvar throttle = function throttle(fn, wait) {\\n  var last = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\\n\\n  var throttled = function throttled() {\\n    var now = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\\n\\n    if (now - last >= wait) {\\n      fn.apply(void 0, arguments);\\n      last = now;\\n    }\\n  };\\n\\n  return throttled;\\n};\\n/**\\n * Creates a debounced function that delays invoking `func` until after `wait`\\n * milliseconds have elapsed since the last time the debounced function was\\n * invoked.\\n *\\n * Inspired by lodash and underscore implementations.\\n *\\n * @function\\n * @param    {Function} func\\n *           The function to wrap with debounce behavior.\\n *\\n * @param    {number} wait\\n *           The number of milliseconds to wait after the last invocation.\\n *\\n * @param    {boolean} [immediate]\\n *           Whether or not to invoke the function immediately upon creation.\\n *\\n * @param    {Object} [context=window]\\n *           The \\\"context\\\" in which the debounced function should debounce. For\\n *           example, if this function should be tied to a Video.js player,\\n *           the player can be passed here. Alternatively, defaults to the\\n *           global `window` object.\\n *\\n * @return   {Function}\\n *           A debounced function.\\n */\\n\\nvar debounce = function debounce(func, wait, immediate, context) {\\n  if (context === void 0) {\\n    context = global_window__WEBPACK_IMPORTED_MODULE_0___default.a;\\n  }\\n\\n  var timeout;\\n\\n  var cancel = function cancel() {\\n    context.clearTimeout(timeout);\\n    timeout = null;\\n  };\\n  /* eslint-disable consistent-this */\\n\\n\\n  var debounced = function debounced() {\\n    var self = this;\\n    var args = arguments;\\n\\n    var _later = function later() {\\n      timeout = null;\\n      _later = null;\\n\\n      if (!immediate) {\\n        func.apply(self, args);\\n      }\\n    };\\n\\n    if (!timeout && immediate) {\\n      func.apply(self, args);\\n    }\\n\\n    context.clearTimeout(timeout);\\n    timeout = context.setTimeout(_later, wait);\\n  };\\n  /* eslint-enable consistent-this */\\n\\n\\n  debounced.cancel = cancel;\\n  return debounced;\\n};\\n\\n/**\\n * @file src/js/event-target.js\\n */\\n/**\\n * `EventTarget` is a class that can have the same API as the DOM `EventTarget`. It\\n * adds shorthand functions that wrap around lengthy functions. For example:\\n * the `on` function is a wrapper around `addEventListener`.\\n *\\n * @see [EventTarget Spec]{@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget}\\n * @class EventTarget\\n */\\n\\nvar EventTarget = function EventTarget() {};\\n/**\\n * A Custom DOM event.\\n *\\n * @typedef {Object} EventTarget~Event\\n * @see [Properties]{@link https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent}\\n */\\n\\n/**\\n * All event listeners should follow the following format.\\n *\\n * @callback EventTarget~EventListener\\n * @this {EventTarget}\\n *\\n * @param {EventTarget~Event} event\\n *        the event that triggered this function\\n *\\n * @param {Object} [hash]\\n *        hash of data sent during the event\\n */\\n\\n/**\\n * An object containing event names as keys and booleans as values.\\n *\\n * > NOTE: If an event name is set to a true value here {@link EventTarget#trigger}\\n *         will have extra functionality. See that function for more information.\\n *\\n * @property EventTarget.prototype.allowedEvents_\\n * @private\\n */\\n\\n\\nEventTarget.prototype.allowedEvents_ = {};\\n/**\\n * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a\\n * function that will get called when an event with a certain name gets triggered.\\n *\\n * @param {string|string[]} type\\n *        An event name or an array of event names.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        The function to call with `EventTarget`s\\n */\\n\\nEventTarget.prototype.on = function (type, fn) {\\n  // Remove the addEventListener alias before calling Events.on\\n  // so we don't get into an infinite type loop\\n  var ael = this.addEventListener;\\n\\n  this.addEventListener = function () {};\\n\\n  on(this, type, fn);\\n  this.addEventListener = ael;\\n};\\n/**\\n * An alias of {@link EventTarget#on}. Allows `EventTarget` to mimic\\n * the standard DOM API.\\n *\\n * @function\\n * @see {@link EventTarget#on}\\n */\\n\\n\\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\\n/**\\n * Removes an `event listener` for a specific event from an instance of `EventTarget`.\\n * This makes it so that the `event listener` will no longer get called when the\\n * named event happens.\\n *\\n * @param {string|string[]} type\\n *        An event name or an array of event names.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        The function to remove.\\n */\\n\\nEventTarget.prototype.off = function (type, fn) {\\n  off(this, type, fn);\\n};\\n/**\\n * An alias of {@link EventTarget#off}. Allows `EventTarget` to mimic\\n * the standard DOM API.\\n *\\n * @function\\n * @see {@link EventTarget#off}\\n */\\n\\n\\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\\n/**\\n * This function will add an `event listener` that gets triggered only once. After the\\n * first trigger it will get removed. This is like adding an `event listener`\\n * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.\\n *\\n * @param {string|string[]} type\\n *        An event name or an array of event names.\\n *\\n * @param {EventTarget~EventListener} fn\\n *        The function to be called once for each event name.\\n */\\n\\nEventTarget.prototype.one = function (type, fn) {\\n  // Remove the addEventListener aliasing Events.on\\n  // so we don't get into an infinite type loop\\n  var ael = this.addEventListener;\\n\\n  this.addEventListener = function () {};\\n\\n  one(this, type, fn);\\n  this.addEventListener = ael;\\n};\\n\\nEventTarget.prototype.any = function (type, fn) {\\n  // Remove the addEventListener aliasing Events.on\\n  // so we don't get into an infinite type loop\\n  var ael = this.addEventListener;\\n\\n  this.addEventListener = function () {};\\n\\n  any(this, type, fn);\\n  this.addEventListener = ael;\\n};\\n/**\\n * This function causes an event to happen. This will then cause any `event listeners`\\n * that are waiting for that event, to get called. If there are no `event listeners`\\n * for an event then nothing will happen.\\n *\\n * If the name of the `Event` that is being triggered is in `EventTarget.allowedEvents_`.\\n * Trigger will also call the `on` + `uppercaseEventName` function.\\n *\\n * Example:\\n * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call\\n * `onClick` if it exists.\\n *\\n * @param {string|EventTarget~Event|Object} event\\n *        The name of the event, an `Event`, or an object with a key of type set to\\n *        an event name.\\n */\\n\\n\\nEventTarget.prototype.trigger = function (event) {\\n  var type = event.type || event; // deprecation\\n  // In a future version we should default target to `this`\\n  // similar to how we default the target to `elem` in\\n  // `Events.trigger`. Right now the default `target` will be\\n  // `document` due to the `Event.fixEvent` call.\\n\\n  if (typeof event === 'string') {\\n    event = {\\n      type: type\\n    };\\n  }\\n\\n  event = fixEvent(event);\\n\\n  if (this.allowedEvents_[type] && this['on' + type]) {\\n    this['on' + type](event);\\n  }\\n\\n  trigger(this, event);\\n};\\n/**\\n * An alias of {@link EventTarget#trigger}. Allows `EventTarget` to mimic\\n * the standard DOM API.\\n *\\n * @function\\n * @see {@link EventTarget#trigger}\\n */\\n\\n\\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\\nvar EVENT_MAP;\\n\\nEventTarget.prototype.queueTrigger = function (event) {\\n  var _this = this;\\n\\n  // only set up EVENT_MAP if it'll be used\\n  if (!EVENT_MAP) {\\n    EVENT_MAP = new Map();\\n  }\\n\\n  var type = event.type || event;\\n  var map = EVENT_MAP.get(this);\\n\\n  if (!map) {\\n    map = new Map();\\n    EVENT_MAP.set(this, map);\\n  }\\n\\n  var oldTimeout = map.get(type);\\n  map[\\\"delete\\\"](type);\\n  global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(oldTimeout);\\n  var timeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n    // if we cleared out all timeouts for the current target, delete its map\\n    if (map.size === 0) {\\n      map = null;\\n      EVENT_MAP[\\\"delete\\\"](_this);\\n    }\\n\\n    _this.trigger(event);\\n  }, 0);\\n  map.set(type, timeout);\\n};\\n\\n/**\\n * @file mixins/evented.js\\n * @module evented\\n */\\n/**\\n * Returns whether or not an object has had the evented mixin applied.\\n *\\n * @param  {Object} object\\n *         An object to test.\\n *\\n * @return {boolean}\\n *         Whether or not the object appears to be evented.\\n */\\n\\nvar isEvented = function isEvented(object) {\\n  return object instanceof EventTarget || !!object.eventBusEl_ && ['on', 'one', 'off', 'trigger'].every(function (k) {\\n    return typeof object[k] === 'function';\\n  });\\n};\\n/**\\n * Adds a callback to run after the evented mixin applied.\\n *\\n * @param  {Object} object\\n *         An object to Add\\n * @param  {Function} callback\\n *         The callback to run.\\n */\\n\\n\\nvar addEventedCallback = function addEventedCallback(target, callback) {\\n  if (isEvented(target)) {\\n    callback();\\n  } else {\\n    if (!target.eventedCallbacks) {\\n      target.eventedCallbacks = [];\\n    }\\n\\n    target.eventedCallbacks.push(callback);\\n  }\\n};\\n/**\\n * Whether a value is a valid event type - non-empty string or array.\\n *\\n * @private\\n * @param  {string|Array} type\\n *         The type value to test.\\n *\\n * @return {boolean}\\n *         Whether or not the type is a valid event type.\\n */\\n\\n\\nvar isValidEventType = function isValidEventType(type) {\\n  return (// The regex here verifies that the `type` contains at least one non-\\n    // whitespace character.\\n    typeof type === 'string' && /\\\\S/.test(type) || Array.isArray(type) && !!type.length\\n  );\\n};\\n/**\\n * Validates a value to determine if it is a valid event target. Throws if not.\\n *\\n * @private\\n * @throws {Error}\\n *         If the target does not appear to be a valid event target.\\n *\\n * @param  {Object} target\\n *         The object to test.\\n */\\n\\n\\nvar validateTarget = function validateTarget(target) {\\n  if (!target.nodeName && !isEvented(target)) {\\n    throw new Error('Invalid target; must be a DOM node or evented object.');\\n  }\\n};\\n/**\\n * Validates a value to determine if it is a valid event target. Throws if not.\\n *\\n * @private\\n * @throws {Error}\\n *         If the type does not appear to be a valid event type.\\n *\\n * @param  {string|Array} type\\n *         The type to test.\\n */\\n\\n\\nvar validateEventType = function validateEventType(type) {\\n  if (!isValidEventType(type)) {\\n    throw new Error('Invalid event type; must be a non-empty string or array.');\\n  }\\n};\\n/**\\n * Validates a value to determine if it is a valid listener. Throws if not.\\n *\\n * @private\\n * @throws {Error}\\n *         If the listener is not a function.\\n *\\n * @param  {Function} listener\\n *         The listener to test.\\n */\\n\\n\\nvar validateListener = function validateListener(listener) {\\n  if (typeof listener !== 'function') {\\n    throw new Error('Invalid listener; must be a function.');\\n  }\\n};\\n/**\\n * Takes an array of arguments given to `on()` or `one()`, validates them, and\\n * normalizes them into an object.\\n *\\n * @private\\n * @param  {Object} self\\n *         The evented object on which `on()` or `one()` was called. This\\n *         object will be bound as the `this` value for the listener.\\n *\\n * @param  {Array} args\\n *         An array of arguments passed to `on()` or `one()`.\\n *\\n * @return {Object}\\n *         An object containing useful values for `on()` or `one()` calls.\\n */\\n\\n\\nvar normalizeListenArgs = function normalizeListenArgs(self, args) {\\n  // If the number of arguments is less than 3, the target is always the\\n  // evented object itself.\\n  var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;\\n  var target;\\n  var type;\\n  var listener;\\n\\n  if (isTargetingSelf) {\\n    target = self.eventBusEl_; // Deal with cases where we got 3 arguments, but we are still listening to\\n    // the evented object itself.\\n\\n    if (args.length >= 3) {\\n      args.shift();\\n    }\\n\\n    type = args[0];\\n    listener = args[1];\\n  } else {\\n    target = args[0];\\n    type = args[1];\\n    listener = args[2];\\n  }\\n\\n  validateTarget(target);\\n  validateEventType(type);\\n  validateListener(listener);\\n  listener = bind(self, listener);\\n  return {\\n    isTargetingSelf: isTargetingSelf,\\n    target: target,\\n    type: type,\\n    listener: listener\\n  };\\n};\\n/**\\n * Adds the listener to the event type(s) on the target, normalizing for\\n * the type of target.\\n *\\n * @private\\n * @param  {Element|Object} target\\n *         A DOM node or evented object.\\n *\\n * @param  {string} method\\n *         The event binding method to use (\\\"on\\\" or \\\"one\\\").\\n *\\n * @param  {string|Array} type\\n *         One or more event type(s).\\n *\\n * @param  {Function} listener\\n *         A listener function.\\n */\\n\\n\\nvar listen = function listen(target, method, type, listener) {\\n  validateTarget(target);\\n\\n  if (target.nodeName) {\\n    Events[method](target, type, listener);\\n  } else {\\n    target[method](type, listener);\\n  }\\n};\\n/**\\n * Contains methods that provide event capabilities to an object which is passed\\n * to {@link module:evented|evented}.\\n *\\n * @mixin EventedMixin\\n */\\n\\n\\nvar EventedMixin = {\\n  /**\\n   * Add a listener to an event (or events) on this object or another evented\\n   * object.\\n   *\\n   * @param  {string|Array|Element|Object} targetOrType\\n   *         If this is a string or array, it represents the event type(s)\\n   *         that will trigger the listener.\\n   *\\n   *         Another evented object can be passed here instead, which will\\n   *         cause the listener to listen for events on _that_ object.\\n   *\\n   *         In either case, the listener's `this` value will be bound to\\n   *         this object.\\n   *\\n   * @param  {string|Array|Function} typeOrListener\\n   *         If the first argument was a string or array, this should be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function.\\n   */\\n  on: function on() {\\n    var _this = this;\\n\\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n      args[_key] = arguments[_key];\\n    }\\n\\n    var _normalizeListenArgs = normalizeListenArgs(this, args),\\n        isTargetingSelf = _normalizeListenArgs.isTargetingSelf,\\n        target = _normalizeListenArgs.target,\\n        type = _normalizeListenArgs.type,\\n        listener = _normalizeListenArgs.listener;\\n\\n    listen(target, 'on', type, listener); // If this object is listening to another evented object.\\n\\n    if (!isTargetingSelf) {\\n      // If this object is disposed, remove the listener.\\n      var removeListenerOnDispose = function removeListenerOnDispose() {\\n        return _this.off(target, type, listener);\\n      }; // Use the same function ID as the listener so we can remove it later it\\n      // using the ID of the original listener.\\n\\n\\n      removeListenerOnDispose.guid = listener.guid; // Add a listener to the target's dispose event as well. This ensures\\n      // that if the target is disposed BEFORE this object, we remove the\\n      // removal listener that was just added. Otherwise, we create a memory leak.\\n\\n      var removeRemoverOnTargetDispose = function removeRemoverOnTargetDispose() {\\n        return _this.off('dispose', removeListenerOnDispose);\\n      }; // Use the same function ID as the listener so we can remove it later\\n      // it using the ID of the original listener.\\n\\n\\n      removeRemoverOnTargetDispose.guid = listener.guid;\\n      listen(this, 'on', 'dispose', removeListenerOnDispose);\\n      listen(target, 'on', 'dispose', removeRemoverOnTargetDispose);\\n    }\\n  },\\n\\n  /**\\n   * Add a listener to an event (or events) on this object or another evented\\n   * object. The listener will be called once per event and then removed.\\n   *\\n   * @param  {string|Array|Element|Object} targetOrType\\n   *         If this is a string or array, it represents the event type(s)\\n   *         that will trigger the listener.\\n   *\\n   *         Another evented object can be passed here instead, which will\\n   *         cause the listener to listen for events on _that_ object.\\n   *\\n   *         In either case, the listener's `this` value will be bound to\\n   *         this object.\\n   *\\n   * @param  {string|Array|Function} typeOrListener\\n   *         If the first argument was a string or array, this should be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function.\\n   */\\n  one: function one() {\\n    var _this2 = this;\\n\\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n      args[_key2] = arguments[_key2];\\n    }\\n\\n    var _normalizeListenArgs2 = normalizeListenArgs(this, args),\\n        isTargetingSelf = _normalizeListenArgs2.isTargetingSelf,\\n        target = _normalizeListenArgs2.target,\\n        type = _normalizeListenArgs2.type,\\n        listener = _normalizeListenArgs2.listener; // Targeting this evented object.\\n\\n\\n    if (isTargetingSelf) {\\n      listen(target, 'one', type, listener); // Targeting another evented object.\\n    } else {\\n      // TODO: This wrapper is incorrect! It should only\\n      //       remove the wrapper for the event type that called it.\\n      //       Instead all listners are removed on the first trigger!\\n      //       see https://github.com/videojs/video.js/issues/5962\\n      var wrapper = function wrapper() {\\n        _this2.off(target, type, wrapper);\\n\\n        for (var _len3 = arguments.length, largs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n          largs[_key3] = arguments[_key3];\\n        }\\n\\n        listener.apply(null, largs);\\n      }; // Use the same function ID as the listener so we can remove it later\\n      // it using the ID of the original listener.\\n\\n\\n      wrapper.guid = listener.guid;\\n      listen(target, 'one', type, wrapper);\\n    }\\n  },\\n\\n  /**\\n   * Add a listener to an event (or events) on this object or another evented\\n   * object. The listener will only be called once for the first event that is triggered\\n   * then removed.\\n   *\\n   * @param  {string|Array|Element|Object} targetOrType\\n   *         If this is a string or array, it represents the event type(s)\\n   *         that will trigger the listener.\\n   *\\n   *         Another evented object can be passed here instead, which will\\n   *         cause the listener to listen for events on _that_ object.\\n   *\\n   *         In either case, the listener's `this` value will be bound to\\n   *         this object.\\n   *\\n   * @param  {string|Array|Function} typeOrListener\\n   *         If the first argument was a string or array, this should be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function.\\n   */\\n  any: function any() {\\n    var _this3 = this;\\n\\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\\n      args[_key4] = arguments[_key4];\\n    }\\n\\n    var _normalizeListenArgs3 = normalizeListenArgs(this, args),\\n        isTargetingSelf = _normalizeListenArgs3.isTargetingSelf,\\n        target = _normalizeListenArgs3.target,\\n        type = _normalizeListenArgs3.type,\\n        listener = _normalizeListenArgs3.listener; // Targeting this evented object.\\n\\n\\n    if (isTargetingSelf) {\\n      listen(target, 'any', type, listener); // Targeting another evented object.\\n    } else {\\n      var wrapper = function wrapper() {\\n        _this3.off(target, type, wrapper);\\n\\n        for (var _len5 = arguments.length, largs = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\\n          largs[_key5] = arguments[_key5];\\n        }\\n\\n        listener.apply(null, largs);\\n      }; // Use the same function ID as the listener so we can remove it later\\n      // it using the ID of the original listener.\\n\\n\\n      wrapper.guid = listener.guid;\\n      listen(target, 'any', type, wrapper);\\n    }\\n  },\\n\\n  /**\\n   * Removes listener(s) from event(s) on an evented object.\\n   *\\n   * @param  {string|Array|Element|Object} [targetOrType]\\n   *         If this is a string or array, it represents the event type(s).\\n   *\\n   *         Another evented object can be passed here instead, in which case\\n   *         ALL 3 arguments are _required_.\\n   *\\n   * @param  {string|Array|Function} [typeOrListener]\\n   *         If the first argument was a string or array, this may be the\\n   *         listener function. Otherwise, this is a string or array of event\\n   *         type(s).\\n   *\\n   * @param  {Function} [listener]\\n   *         If the first argument was another evented object, this will be\\n   *         the listener function; otherwise, _all_ listeners bound to the\\n   *         event type(s) will be removed.\\n   */\\n  off: function off$1(targetOrType, typeOrListener, listener) {\\n    // Targeting this evented object.\\n    if (!targetOrType || isValidEventType(targetOrType)) {\\n      off(this.eventBusEl_, targetOrType, typeOrListener); // Targeting another evented object.\\n    } else {\\n      var target = targetOrType;\\n      var type = typeOrListener; // Fail fast and in a meaningful way!\\n\\n      validateTarget(target);\\n      validateEventType(type);\\n      validateListener(listener); // Ensure there's at least a guid, even if the function hasn't been used\\n\\n      listener = bind(this, listener); // Remove the dispose listener on this evented object, which was given\\n      // the same guid as the event listener in on().\\n\\n      this.off('dispose', listener);\\n\\n      if (target.nodeName) {\\n        off(target, type, listener);\\n        off(target, 'dispose', listener);\\n      } else if (isEvented(target)) {\\n        target.off(type, listener);\\n        target.off('dispose', listener);\\n      }\\n    }\\n  },\\n\\n  /**\\n   * Fire an event on this evented object, causing its listeners to be called.\\n   *\\n   * @param   {string|Object} event\\n   *          An event type or an object with a type property.\\n   *\\n   * @param   {Object} [hash]\\n   *          An additional object to pass along to listeners.\\n   *\\n   * @return {boolean}\\n   *          Whether or not the default behavior was prevented.\\n   */\\n  trigger: function trigger$1(event, hash) {\\n    return trigger(this.eventBusEl_, event, hash);\\n  }\\n};\\n/**\\n * Applies {@link module:evented~EventedMixin|EventedMixin} to a target object.\\n *\\n * @param  {Object} target\\n *         The object to which to add event methods.\\n *\\n * @param  {Object} [options={}]\\n *         Options for customizing the mixin behavior.\\n *\\n * @param  {string} [options.eventBusKey]\\n *         By default, adds a `eventBusEl_` DOM element to the target object,\\n *         which is used as an event bus. If the target object already has a\\n *         DOM element that should be used, pass its key here.\\n *\\n * @return {Object}\\n *         The target object.\\n */\\n\\nfunction evented(target, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  var _options = options,\\n      eventBusKey = _options.eventBusKey; // Set or create the eventBusEl_.\\n\\n  if (eventBusKey) {\\n    if (!target[eventBusKey].nodeName) {\\n      throw new Error(\\\"The eventBusKey \\\\\\\"\\\" + eventBusKey + \\\"\\\\\\\" does not refer to an element.\\\");\\n    }\\n\\n    target.eventBusEl_ = target[eventBusKey];\\n  } else {\\n    target.eventBusEl_ = createEl('span', {\\n      className: 'vjs-event-bus'\\n    });\\n  }\\n\\n  assign(target, EventedMixin);\\n\\n  if (target.eventedCallbacks) {\\n    target.eventedCallbacks.forEach(function (callback) {\\n      callback();\\n    });\\n  } // When any evented object is disposed, it removes all its listeners.\\n\\n\\n  target.on('dispose', function () {\\n    target.off();\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n      target.eventBusEl_ = null;\\n    }, 0);\\n  });\\n  return target;\\n}\\n\\n/**\\n * @file mixins/stateful.js\\n * @module stateful\\n */\\n/**\\n * Contains methods that provide statefulness to an object which is passed\\n * to {@link module:stateful}.\\n *\\n * @mixin StatefulMixin\\n */\\n\\nvar StatefulMixin = {\\n  /**\\n   * A hash containing arbitrary keys and values representing the state of\\n   * the object.\\n   *\\n   * @type {Object}\\n   */\\n  state: {},\\n\\n  /**\\n   * Set the state of an object by mutating its\\n   * {@link module:stateful~StatefulMixin.state|state} object in place.\\n   *\\n   * @fires   module:stateful~StatefulMixin#statechanged\\n   * @param   {Object|Function} stateUpdates\\n   *          A new set of properties to shallow-merge into the plugin state.\\n   *          Can be a plain object or a function returning a plain object.\\n   *\\n   * @return {Object|undefined}\\n   *          An object containing changes that occurred. If no changes\\n   *          occurred, returns `undefined`.\\n   */\\n  setState: function setState(stateUpdates) {\\n    var _this = this;\\n\\n    // Support providing the `stateUpdates` state as a function.\\n    if (typeof stateUpdates === 'function') {\\n      stateUpdates = stateUpdates();\\n    }\\n\\n    var changes;\\n    each(stateUpdates, function (value, key) {\\n      // Record the change if the value is different from what's in the\\n      // current state.\\n      if (_this.state[key] !== value) {\\n        changes = changes || {};\\n        changes[key] = {\\n          from: _this.state[key],\\n          to: value\\n        };\\n      }\\n\\n      _this.state[key] = value;\\n    }); // Only trigger \\\"statechange\\\" if there were changes AND we have a trigger\\n    // function. This allows us to not require that the target object be an\\n    // evented object.\\n\\n    if (changes && isEvented(this)) {\\n      /**\\n       * An event triggered on an object that is both\\n       * {@link module:stateful|stateful} and {@link module:evented|evented}\\n       * indicating that its state has changed.\\n       *\\n       * @event    module:stateful~StatefulMixin#statechanged\\n       * @type     {Object}\\n       * @property {Object} changes\\n       *           A hash containing the properties that were changed and\\n       *           the values they were changed `from` and `to`.\\n       */\\n      this.trigger({\\n        changes: changes,\\n        type: 'statechanged'\\n      });\\n    }\\n\\n    return changes;\\n  }\\n};\\n/**\\n * Applies {@link module:stateful~StatefulMixin|StatefulMixin} to a target\\n * object.\\n *\\n * If the target object is {@link module:evented|evented} and has a\\n * `handleStateChanged` method, that method will be automatically bound to the\\n * `statechanged` event on itself.\\n *\\n * @param   {Object} target\\n *          The object to be made stateful.\\n *\\n * @param   {Object} [defaultState]\\n *          A default set of properties to populate the newly-stateful object's\\n *          `state` property.\\n *\\n * @return {Object}\\n *          Returns the `target`.\\n */\\n\\nfunction stateful(target, defaultState) {\\n  assign(target, StatefulMixin); // This happens after the mixing-in because we need to replace the `state`\\n  // added in that step.\\n\\n  target.state = assign({}, target.state, defaultState); // Auto-bind the `handleStateChanged` method of the target object if it exists.\\n\\n  if (typeof target.handleStateChanged === 'function' && isEvented(target)) {\\n    target.on('statechanged', target.handleStateChanged);\\n  }\\n\\n  return target;\\n}\\n\\n/**\\n * @file string-cases.js\\n * @module to-lower-case\\n */\\n\\n/**\\n * Lowercase the first letter of a string.\\n *\\n * @param {string} string\\n *        String to be lowercased\\n *\\n * @return {string}\\n *         The string with a lowercased first letter\\n */\\nvar toLowerCase = function toLowerCase(string) {\\n  if (typeof string !== 'string') {\\n    return string;\\n  }\\n\\n  return string.replace(/./, function (w) {\\n    return w.toLowerCase();\\n  });\\n};\\n/**\\n * Uppercase the first letter of a string.\\n *\\n * @param {string} string\\n *        String to be uppercased\\n *\\n * @return {string}\\n *         The string with an uppercased first letter\\n */\\n\\nvar toTitleCase = function toTitleCase(string) {\\n  if (typeof string !== 'string') {\\n    return string;\\n  }\\n\\n  return string.replace(/./, function (w) {\\n    return w.toUpperCase();\\n  });\\n};\\n/**\\n * Compares the TitleCase versions of the two strings for equality.\\n *\\n * @param {string} str1\\n *        The first string to compare\\n *\\n * @param {string} str2\\n *        The second string to compare\\n *\\n * @return {boolean}\\n *         Whether the TitleCase versions of the strings are equal\\n */\\n\\nvar titleCaseEquals = function titleCaseEquals(str1, str2) {\\n  return toTitleCase(str1) === toTitleCase(str2);\\n};\\n\\n/**\\n * @file merge-options.js\\n * @module merge-options\\n */\\n/**\\n * Merge two objects recursively.\\n *\\n * Performs a deep merge like\\n * {@link https://lodash.com/docs/4.17.10#merge|lodash.merge}, but only merges\\n * plain objects (not arrays, elements, or anything else).\\n *\\n * Non-plain object values will be copied directly from the right-most\\n * argument.\\n *\\n * @static\\n * @param   {Object[]} sources\\n *          One or more objects to merge into a new object.\\n *\\n * @return {Object}\\n *          A new object that is the merged result of all sources.\\n */\\n\\nfunction mergeOptions() {\\n  var result = {};\\n\\n  for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\\n    sources[_key] = arguments[_key];\\n  }\\n\\n  sources.forEach(function (source) {\\n    if (!source) {\\n      return;\\n    }\\n\\n    each(source, function (value, key) {\\n      if (!isPlain(value)) {\\n        result[key] = value;\\n        return;\\n      }\\n\\n      if (!isPlain(result[key])) {\\n        result[key] = {};\\n      }\\n\\n      result[key] = mergeOptions(result[key], value);\\n    });\\n  });\\n  return result;\\n}\\n\\n/**\\n * Player Component - Base class for all UI objects\\n *\\n * @file component.js\\n */\\n/**\\n * Base class for all UI Components.\\n * Components are UI objects which represent both a javascript object and an element\\n * in the DOM. They can be children of other components, and can have\\n * children themselves.\\n *\\n * Components can also use methods from {@link EventTarget}\\n */\\n\\nvar Component = /*#__PURE__*/function () {\\n  /**\\n   * A callback that is called when a component is ready. Does not have any\\n   * paramters and any callback value will be ignored.\\n   *\\n   * @callback Component~ReadyCallback\\n   * @this Component\\n   */\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Object[]} [options.children]\\n   *        An array of children objects to intialize this component with. Children objects have\\n   *        a name property that will be used if more than one component of the same type needs to be\\n   *        added.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        Function that gets called when the `Component` is ready.\\n   */\\n  function Component(player, options, ready) {\\n    // The component might be the player itself and we can't pass `this` to super\\n    if (!player && this.play) {\\n      this.player_ = player = this; // eslint-disable-line\\n    } else {\\n      this.player_ = player;\\n    }\\n\\n    this.isDisposed_ = false; // Hold the reference to the parent component via `addChild` method\\n\\n    this.parentComponent_ = null; // Make a copy of prototype.options_ to protect against overriding defaults\\n\\n    this.options_ = mergeOptions({}, this.options_); // Updated options with supplied options\\n\\n    options = this.options_ = mergeOptions(this.options_, options); // Get ID from options or options element if one is supplied\\n\\n    this.id_ = options.id || options.el && options.el.id; // If there was no ID from the options, generate one\\n\\n    if (!this.id_) {\\n      // Don't require the player ID function in the case of mock players\\n      var id = player && player.id && player.id() || 'no_player';\\n      this.id_ = id + \\\"_component_\\\" + newGUID();\\n    }\\n\\n    this.name_ = options.name || null; // Create element if one wasn't provided in options\\n\\n    if (options.el) {\\n      this.el_ = options.el;\\n    } else if (options.createEl !== false) {\\n      this.el_ = this.createEl();\\n    } // if evented is anything except false, we want to mixin in evented\\n\\n\\n    if (options.evented !== false) {\\n      // Make this an evented object and use `el_`, if available, as its event bus\\n      evented(this, {\\n        eventBusKey: this.el_ ? 'el_' : null\\n      });\\n    }\\n\\n    stateful(this, this.constructor.defaultState);\\n    this.children_ = [];\\n    this.childIndex_ = {};\\n    this.childNameIndex_ = {};\\n    var SetSham;\\n\\n    if (!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set) {\\n      SetSham = /*#__PURE__*/function () {\\n        function SetSham() {\\n          this.set_ = {};\\n        }\\n\\n        var _proto2 = SetSham.prototype;\\n\\n        _proto2.has = function has(key) {\\n          return key in this.set_;\\n        };\\n\\n        _proto2[\\\"delete\\\"] = function _delete(key) {\\n          var has = this.has(key);\\n          delete this.set_[key];\\n          return has;\\n        };\\n\\n        _proto2.add = function add(key) {\\n          this.set_[key] = 1;\\n          return this;\\n        };\\n\\n        _proto2.forEach = function forEach(callback, thisArg) {\\n          for (var key in this.set_) {\\n            callback.call(thisArg, key, key, this);\\n          }\\n        };\\n\\n        return SetSham;\\n      }();\\n    }\\n\\n    this.setTimeoutIds_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? new Set() : new SetSham();\\n    this.setIntervalIds_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? new Set() : new SetSham();\\n    this.rafIds_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Set ? new Set() : new SetSham();\\n    this.clearingTimersOnDispose_ = false; // Add any child components in options\\n\\n    if (options.initChildren !== false) {\\n      this.initChildren();\\n    }\\n\\n    this.ready(ready); // Don't want to trigger ready here or it will before init is actually\\n    // finished for all children that run this constructor\\n\\n    if (options.reportTouchActivity !== false) {\\n      this.enableTouchActivity();\\n    }\\n  }\\n  /**\\n   * Dispose of the `Component` and all child components.\\n   *\\n   * @fires Component#dispose\\n   */\\n\\n\\n  var _proto = Component.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    // Bail out if the component has already been disposed.\\n    if (this.isDisposed_) {\\n      return;\\n    }\\n    /**\\n     * Triggered when a `Component` is disposed.\\n     *\\n     * @event Component#dispose\\n     * @type {EventTarget~Event}\\n     *\\n     * @property {boolean} [bubbles=false]\\n     *           set to false so that the dispose event does not\\n     *           bubble up\\n     */\\n\\n\\n    this.trigger({\\n      type: 'dispose',\\n      bubbles: false\\n    });\\n    this.isDisposed_ = true; // Dispose all children.\\n\\n    if (this.children_) {\\n      for (var i = this.children_.length - 1; i >= 0; i--) {\\n        if (this.children_[i].dispose) {\\n          this.children_[i].dispose();\\n        }\\n      }\\n    } // Delete child references\\n\\n\\n    this.children_ = null;\\n    this.childIndex_ = null;\\n    this.childNameIndex_ = null;\\n    this.parentComponent_ = null;\\n\\n    if (this.el_) {\\n      // Remove element from DOM\\n      if (this.el_.parentNode) {\\n        this.el_.parentNode.removeChild(this.el_);\\n      }\\n\\n      if (DomData.has(this.el_)) {\\n        DomData[\\\"delete\\\"](this.el_);\\n      }\\n\\n      this.el_ = null;\\n    } // remove reference to the player after disposing of the element\\n\\n\\n    this.player_ = null;\\n  }\\n  /**\\n   * Determine whether or not this component has been disposed.\\n   *\\n   * @return {boolean}\\n   *         If the component has been disposed, will be `true`. Otherwise, `false`.\\n   */\\n  ;\\n\\n  _proto.isDisposed = function isDisposed() {\\n    return Boolean(this.isDisposed_);\\n  }\\n  /**\\n   * Return the {@link Player} that the `Component` has attached to.\\n   *\\n   * @return {Player}\\n   *         The player that this `Component` has attached to.\\n   */\\n  ;\\n\\n  _proto.player = function player() {\\n    return this.player_;\\n  }\\n  /**\\n   * Deep merge of options objects with new options.\\n   * > Note: When both `obj` and `options` contain properties whose values are objects.\\n   *         The two properties get merged using {@link module:mergeOptions}\\n   *\\n   * @param {Object} obj\\n   *        The object that contains new options.\\n   *\\n   * @return {Object}\\n   *         A new object of `this.options_` and `obj` merged together.\\n   */\\n  ;\\n\\n  _proto.options = function options(obj) {\\n    if (!obj) {\\n      return this.options_;\\n    }\\n\\n    this.options_ = mergeOptions(this.options_, obj);\\n    return this.options_;\\n  }\\n  /**\\n   * Get the `Component`s DOM element\\n   *\\n   * @return {Element}\\n   *         The DOM element for this `Component`.\\n   */\\n  ;\\n\\n  _proto.el = function el() {\\n    return this.el_;\\n  }\\n  /**\\n   * Create the `Component`s DOM element.\\n   *\\n   * @param {string} [tagName]\\n   *        Element's DOM node type. e.g. 'div'\\n   *\\n   * @param {Object} [properties]\\n   *        An object of properties that should be set.\\n   *\\n   * @param {Object} [attributes]\\n   *        An object of attributes that should be set.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1(tagName, properties, attributes) {\\n    return createEl(tagName, properties, attributes);\\n  }\\n  /**\\n   * Localize a string given the string in english.\\n   *\\n   * If tokens are provided, it'll try and run a simple token replacement on the provided string.\\n   * The tokens it looks for look like `{1}` with the index being 1-indexed into the tokens array.\\n   *\\n   * If a `defaultValue` is provided, it'll use that over `string`,\\n   * if a value isn't found in provided language files.\\n   * This is useful if you want to have a descriptive key for token replacement\\n   * but have a succinct localized string and not require `en.json` to be included.\\n   *\\n   * Currently, it is used for the progress bar timing.\\n   * ```js\\n   * {\\n   *   \\\"progress bar timing: currentTime={1} duration={2}\\\": \\\"{1} of {2}\\\"\\n   * }\\n   * ```\\n   * It is then used like so:\\n   * ```js\\n   * this.localize('progress bar timing: currentTime={1} duration{2}',\\n   *               [this.player_.currentTime(), this.player_.duration()],\\n   *               '{1} of {2}');\\n   * ```\\n   *\\n   * Which outputs something like: `01:23 of 24:56`.\\n   *\\n   *\\n   * @param {string} string\\n   *        The string to localize and the key to lookup in the language files.\\n   * @param {string[]} [tokens]\\n   *        If the current item has token replacements, provide the tokens here.\\n   * @param {string} [defaultValue]\\n   *        Defaults to `string`. Can be a default value to use for token replacement\\n   *        if the lookup key is needed to be separate.\\n   *\\n   * @return {string}\\n   *         The localized string or if no localization exists the english string.\\n   */\\n  ;\\n\\n  _proto.localize = function localize(string, tokens, defaultValue) {\\n    if (defaultValue === void 0) {\\n      defaultValue = string;\\n    }\\n\\n    var code = this.player_.language && this.player_.language();\\n    var languages = this.player_.languages && this.player_.languages();\\n    var language = languages && languages[code];\\n    var primaryCode = code && code.split('-')[0];\\n    var primaryLang = languages && languages[primaryCode];\\n    var localizedString = defaultValue;\\n\\n    if (language && language[string]) {\\n      localizedString = language[string];\\n    } else if (primaryLang && primaryLang[string]) {\\n      localizedString = primaryLang[string];\\n    }\\n\\n    if (tokens) {\\n      localizedString = localizedString.replace(/\\\\{(\\\\d+)\\\\}/g, function (match, index) {\\n        var value = tokens[index - 1];\\n        var ret = value;\\n\\n        if (typeof value === 'undefined') {\\n          ret = match;\\n        }\\n\\n        return ret;\\n      });\\n    }\\n\\n    return localizedString;\\n  }\\n  /**\\n   * Return the `Component`s DOM element. This is where children get inserted.\\n   * This will usually be the the same as the element returned in {@link Component#el}.\\n   *\\n   * @return {Element}\\n   *         The content element for this `Component`.\\n   */\\n  ;\\n\\n  _proto.contentEl = function contentEl() {\\n    return this.contentEl_ || this.el_;\\n  }\\n  /**\\n   * Get this `Component`s ID\\n   *\\n   * @return {string}\\n   *         The id of this `Component`\\n   */\\n  ;\\n\\n  _proto.id = function id() {\\n    return this.id_;\\n  }\\n  /**\\n   * Get the `Component`s name. The name gets used to reference the `Component`\\n   * and is set during registration.\\n   *\\n   * @return {string}\\n   *         The name of this `Component`.\\n   */\\n  ;\\n\\n  _proto.name = function name() {\\n    return this.name_;\\n  }\\n  /**\\n   * Get an array of all child components\\n   *\\n   * @return {Array}\\n   *         The children\\n   */\\n  ;\\n\\n  _proto.children = function children() {\\n    return this.children_;\\n  }\\n  /**\\n   * Returns the child `Component` with the given `id`.\\n   *\\n   * @param {string} id\\n   *        The id of the child `Component` to get.\\n   *\\n   * @return {Component|undefined}\\n   *         The child `Component` with the given `id` or undefined.\\n   */\\n  ;\\n\\n  _proto.getChildById = function getChildById(id) {\\n    return this.childIndex_[id];\\n  }\\n  /**\\n   * Returns the child `Component` with the given `name`.\\n   *\\n   * @param {string} name\\n   *        The name of the child `Component` to get.\\n   *\\n   * @return {Component|undefined}\\n   *         The child `Component` with the given `name` or undefined.\\n   */\\n  ;\\n\\n  _proto.getChild = function getChild(name) {\\n    if (!name) {\\n      return;\\n    }\\n\\n    return this.childNameIndex_[name];\\n  }\\n  /**\\n   * Returns the descendant `Component` following the givent\\n   * descendant `names`. For instance ['foo', 'bar', 'baz'] would\\n   * try to get 'foo' on the current component, 'bar' on the 'foo'\\n   * component and 'baz' on the 'bar' component and return undefined\\n   * if any of those don't exist.\\n   *\\n   * @param {...string[]|...string} names\\n   *        The name of the child `Component` to get.\\n   *\\n   * @return {Component|undefined}\\n   *         The descendant `Component` following the given descendant\\n   *         `names` or undefined.\\n   */\\n  ;\\n\\n  _proto.getDescendant = function getDescendant() {\\n    for (var _len = arguments.length, names = new Array(_len), _key = 0; _key < _len; _key++) {\\n      names[_key] = arguments[_key];\\n    }\\n\\n    // flatten array argument into the main array\\n    names = names.reduce(function (acc, n) {\\n      return acc.concat(n);\\n    }, []);\\n    var currentChild = this;\\n\\n    for (var i = 0; i < names.length; i++) {\\n      currentChild = currentChild.getChild(names[i]);\\n\\n      if (!currentChild || !currentChild.getChild) {\\n        return;\\n      }\\n    }\\n\\n    return currentChild;\\n  }\\n  /**\\n   * Add a child `Component` inside the current `Component`.\\n   *\\n   *\\n   * @param {string|Component} child\\n   *        The name or instance of a child to add.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of options that will get passed to children of\\n   *        the child.\\n   *\\n   * @param {number} [index=this.children_.length]\\n   *        The index to attempt to add a child into.\\n   *\\n   * @return {Component}\\n   *         The `Component` that gets added as a child. When using a string the\\n   *         `Component` will get created by this process.\\n   */\\n  ;\\n\\n  _proto.addChild = function addChild(child, options, index) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (index === void 0) {\\n      index = this.children_.length;\\n    }\\n\\n    var component;\\n    var componentName; // If child is a string, create component with options\\n\\n    if (typeof child === 'string') {\\n      componentName = toTitleCase(child);\\n      var componentClassName = options.componentClass || componentName; // Set name through options\\n\\n      options.name = componentName; // Create a new object & element for this controls set\\n      // If there's no .player_, this is a player\\n\\n      var ComponentClass = Component.getComponent(componentClassName);\\n\\n      if (!ComponentClass) {\\n        throw new Error(\\\"Component \\\" + componentClassName + \\\" does not exist\\\");\\n      } // data stored directly on the videojs object may be\\n      // misidentified as a component to retain\\n      // backwards-compatibility with 4.x. check to make sure the\\n      // component class can be instantiated.\\n\\n\\n      if (typeof ComponentClass !== 'function') {\\n        return null;\\n      }\\n\\n      component = new ComponentClass(this.player_ || this, options); // child is a component instance\\n    } else {\\n      component = child;\\n    }\\n\\n    if (component.parentComponent_) {\\n      component.parentComponent_.removeChild(component);\\n    }\\n\\n    this.children_.splice(index, 0, component);\\n    component.parentComponent_ = this;\\n\\n    if (typeof component.id === 'function') {\\n      this.childIndex_[component.id()] = component;\\n    } // If a name wasn't used to create the component, check if we can use the\\n    // name function of the component\\n\\n\\n    componentName = componentName || component.name && toTitleCase(component.name());\\n\\n    if (componentName) {\\n      this.childNameIndex_[componentName] = component;\\n      this.childNameIndex_[toLowerCase(componentName)] = component;\\n    } // Add the UI object's element to the container div (box)\\n    // Having an element is not required\\n\\n\\n    if (typeof component.el === 'function' && component.el()) {\\n      // If inserting before a component, insert before that component's element\\n      var refNode = null;\\n\\n      if (this.children_[index + 1]) {\\n        // Most children are components, but the video tech is an HTML element\\n        if (this.children_[index + 1].el_) {\\n          refNode = this.children_[index + 1].el_;\\n        } else if (isEl(this.children_[index + 1])) {\\n          refNode = this.children_[index + 1];\\n        }\\n      }\\n\\n      this.contentEl().insertBefore(component.el(), refNode);\\n    } // Return so it can stored on parent object if desired.\\n\\n\\n    return component;\\n  }\\n  /**\\n   * Remove a child `Component` from this `Component`s list of children. Also removes\\n   * the child `Component`s element from this `Component`s element.\\n   *\\n   * @param {Component} component\\n   *        The child `Component` to remove.\\n   */\\n  ;\\n\\n  _proto.removeChild = function removeChild(component) {\\n    if (typeof component === 'string') {\\n      component = this.getChild(component);\\n    }\\n\\n    if (!component || !this.children_) {\\n      return;\\n    }\\n\\n    var childFound = false;\\n\\n    for (var i = this.children_.length - 1; i >= 0; i--) {\\n      if (this.children_[i] === component) {\\n        childFound = true;\\n        this.children_.splice(i, 1);\\n        break;\\n      }\\n    }\\n\\n    if (!childFound) {\\n      return;\\n    }\\n\\n    component.parentComponent_ = null;\\n    this.childIndex_[component.id()] = null;\\n    this.childNameIndex_[toTitleCase(component.name())] = null;\\n    this.childNameIndex_[toLowerCase(component.name())] = null;\\n    var compEl = component.el();\\n\\n    if (compEl && compEl.parentNode === this.contentEl()) {\\n      this.contentEl().removeChild(component.el());\\n    }\\n  }\\n  /**\\n   * Add and initialize default child `Component`s based upon options.\\n   */\\n  ;\\n\\n  _proto.initChildren = function initChildren() {\\n    var _this = this;\\n\\n    var children = this.options_.children;\\n\\n    if (children) {\\n      // `this` is `parent`\\n      var parentOptions = this.options_;\\n\\n      var handleAdd = function handleAdd(child) {\\n        var name = child.name;\\n        var opts = child.opts; // Allow options for children to be set at the parent options\\n        // e.g. videojs(id, { controlBar: false });\\n        // instead of videojs(id, { children: { controlBar: false });\\n\\n        if (parentOptions[name] !== undefined) {\\n          opts = parentOptions[name];\\n        } // Allow for disabling default components\\n        // e.g. options['children']['posterImage'] = false\\n\\n\\n        if (opts === false) {\\n          return;\\n        } // Allow options to be passed as a simple boolean if no configuration\\n        // is necessary.\\n\\n\\n        if (opts === true) {\\n          opts = {};\\n        } // We also want to pass the original player options\\n        // to each component as well so they don't need to\\n        // reach back into the player for options later.\\n\\n\\n        opts.playerOptions = _this.options_.playerOptions; // Create and add the child component.\\n        // Add a direct reference to the child by name on the parent instance.\\n        // If two of the same component are used, different names should be supplied\\n        // for each\\n\\n        var newChild = _this.addChild(name, opts);\\n\\n        if (newChild) {\\n          _this[name] = newChild;\\n        }\\n      }; // Allow for an array of children details to passed in the options\\n\\n\\n      var workingChildren;\\n      var Tech = Component.getComponent('Tech');\\n\\n      if (Array.isArray(children)) {\\n        workingChildren = children;\\n      } else {\\n        workingChildren = Object.keys(children);\\n      }\\n\\n      workingChildren // children that are in this.options_ but also in workingChildren  would\\n      // give us extra children we do not want. So, we want to filter them out.\\n      .concat(Object.keys(this.options_).filter(function (child) {\\n        return !workingChildren.some(function (wchild) {\\n          if (typeof wchild === 'string') {\\n            return child === wchild;\\n          }\\n\\n          return child === wchild.name;\\n        });\\n      })).map(function (child) {\\n        var name;\\n        var opts;\\n\\n        if (typeof child === 'string') {\\n          name = child;\\n          opts = children[name] || _this.options_[name] || {};\\n        } else {\\n          name = child.name;\\n          opts = child;\\n        }\\n\\n        return {\\n          name: name,\\n          opts: opts\\n        };\\n      }).filter(function (child) {\\n        // we have to make sure that child.name isn't in the techOrder since\\n        // techs are registerd as Components but can't aren't compatible\\n        // See https://github.com/videojs/video.js/issues/2772\\n        var c = Component.getComponent(child.opts.componentClass || toTitleCase(child.name));\\n        return c && !Tech.isTech(c);\\n      }).forEach(handleAdd);\\n    }\\n  }\\n  /**\\n   * Builds the default DOM class name. Should be overriden by sub-components.\\n   *\\n   * @return {string}\\n   *         The DOM class name for this object.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    // Child classes can include a function that does:\\n    // return 'CLASS NAME' + this._super();\\n    return '';\\n  }\\n  /**\\n   * Bind a listener to the component's ready state.\\n   * Different from event listeners in that if the ready event has already happened\\n   * it will trigger the function immediately.\\n   *\\n   * @return {Component}\\n   *         Returns itself; method can be chained.\\n   */\\n  ;\\n\\n  _proto.ready = function ready(fn, sync) {\\n    if (sync === void 0) {\\n      sync = false;\\n    }\\n\\n    if (!fn) {\\n      return;\\n    }\\n\\n    if (!this.isReady_) {\\n      this.readyQueue_ = this.readyQueue_ || [];\\n      this.readyQueue_.push(fn);\\n      return;\\n    }\\n\\n    if (sync) {\\n      fn.call(this);\\n    } else {\\n      // Call the function asynchronously by default for consistency\\n      this.setTimeout(fn, 1);\\n    }\\n  }\\n  /**\\n   * Trigger all the ready listeners for this `Component`.\\n   *\\n   * @fires Component#ready\\n   */\\n  ;\\n\\n  _proto.triggerReady = function triggerReady() {\\n    this.isReady_ = true; // Ensure ready is triggered asynchronously\\n\\n    this.setTimeout(function () {\\n      var readyQueue = this.readyQueue_; // Reset Ready Queue\\n\\n      this.readyQueue_ = [];\\n\\n      if (readyQueue && readyQueue.length > 0) {\\n        readyQueue.forEach(function (fn) {\\n          fn.call(this);\\n        }, this);\\n      } // Allow for using event listeners also\\n\\n      /**\\n       * Triggered when a `Component` is ready.\\n       *\\n       * @event Component#ready\\n       * @type {EventTarget~Event}\\n       */\\n\\n\\n      this.trigger('ready');\\n    }, 1);\\n  }\\n  /**\\n   * Find a single DOM element matching a `selector`. This can be within the `Component`s\\n   * `contentEl()` or another custom context.\\n   *\\n   * @param {string} selector\\n   *        A valid CSS selector, which will be passed to `querySelector`.\\n   *\\n   * @param {Element|string} [context=this.contentEl()]\\n   *        A DOM element within which to query. Can also be a selector string in\\n   *        which case the first matching element will get used as context. If\\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\\n   *        nothing it falls back to `document`.\\n   *\\n   * @return {Element|null}\\n   *         the dom element that was found, or null\\n   *\\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\\n   */\\n  ;\\n\\n  _proto.$ = function $$1(selector, context) {\\n    return $(selector, context || this.contentEl());\\n  }\\n  /**\\n   * Finds all DOM element matching a `selector`. This can be within the `Component`s\\n   * `contentEl()` or another custom context.\\n   *\\n   * @param {string} selector\\n   *        A valid CSS selector, which will be passed to `querySelectorAll`.\\n   *\\n   * @param {Element|string} [context=this.contentEl()]\\n   *        A DOM element within which to query. Can also be a selector string in\\n   *        which case the first matching element will get used as context. If\\n   *        missing `this.contentEl()` gets used. If  `this.contentEl()` returns\\n   *        nothing it falls back to `document`.\\n   *\\n   * @return {NodeList}\\n   *         a list of dom elements that were found\\n   *\\n   * @see [Information on CSS Selectors](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_Started/Selectors)\\n   */\\n  ;\\n\\n  _proto.$$ = function $$$1(selector, context) {\\n    return $$(selector, context || this.contentEl());\\n  }\\n  /**\\n   * Check if a component's element has a CSS class name.\\n   *\\n   * @param {string} classToCheck\\n   *        CSS class name to check.\\n   *\\n   * @return {boolean}\\n   *         - True if the `Component` has the class.\\n   *         - False if the `Component` does not have the class`\\n   */\\n  ;\\n\\n  _proto.hasClass = function hasClass$1(classToCheck) {\\n    return hasClass(this.el_, classToCheck);\\n  }\\n  /**\\n   * Add a CSS class name to the `Component`s element.\\n   *\\n   * @param {string} classToAdd\\n   *        CSS class name to add\\n   */\\n  ;\\n\\n  _proto.addClass = function addClass$1(classToAdd) {\\n    addClass(this.el_, classToAdd);\\n  }\\n  /**\\n   * Remove a CSS class name from the `Component`s element.\\n   *\\n   * @param {string} classToRemove\\n   *        CSS class name to remove\\n   */\\n  ;\\n\\n  _proto.removeClass = function removeClass$1(classToRemove) {\\n    removeClass(this.el_, classToRemove);\\n  }\\n  /**\\n   * Add or remove a CSS class name from the component's element.\\n   * - `classToToggle` gets added when {@link Component#hasClass} would return false.\\n   * - `classToToggle` gets removed when {@link Component#hasClass} would return true.\\n   *\\n   * @param  {string} classToToggle\\n   *         The class to add or remove based on (@link Component#hasClass}\\n   *\\n   * @param  {boolean|Dom~predicate} [predicate]\\n   *         An {@link Dom~predicate} function or a boolean\\n   */\\n  ;\\n\\n  _proto.toggleClass = function toggleClass$1(classToToggle, predicate) {\\n    toggleClass(this.el_, classToToggle, predicate);\\n  }\\n  /**\\n   * Show the `Component`s element if it is hidden by removing the\\n   * 'vjs-hidden' class name from it.\\n   */\\n  ;\\n\\n  _proto.show = function show() {\\n    this.removeClass('vjs-hidden');\\n  }\\n  /**\\n   * Hide the `Component`s element if it is currently showing by adding the\\n   * 'vjs-hidden` class name to it.\\n   */\\n  ;\\n\\n  _proto.hide = function hide() {\\n    this.addClass('vjs-hidden');\\n  }\\n  /**\\n   * Lock a `Component`s element in its visible state by adding the 'vjs-lock-showing'\\n   * class name to it. Used during fadeIn/fadeOut.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.lockShowing = function lockShowing() {\\n    this.addClass('vjs-lock-showing');\\n  }\\n  /**\\n   * Unlock a `Component`s element from its visible state by removing the 'vjs-lock-showing'\\n   * class name from it. Used during fadeIn/fadeOut.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.unlockShowing = function unlockShowing() {\\n    this.removeClass('vjs-lock-showing');\\n  }\\n  /**\\n   * Get the value of an attribute on the `Component`s element.\\n   *\\n   * @param {string} attribute\\n   *        Name of the attribute to get the value from.\\n   *\\n   * @return {string|null}\\n   *         - The value of the attribute that was asked for.\\n   *         - Can be an empty string on some browsers if the attribute does not exist\\n   *           or has no value\\n   *         - Most browsers will return null if the attibute does not exist or has\\n   *           no value.\\n   *\\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute}\\n   */\\n  ;\\n\\n  _proto.getAttribute = function getAttribute$1(attribute) {\\n    return getAttribute(this.el_, attribute);\\n  }\\n  /**\\n   * Set the value of an attribute on the `Component`'s element\\n   *\\n   * @param {string} attribute\\n   *        Name of the attribute to set.\\n   *\\n   * @param {string} value\\n   *        Value to set the attribute to.\\n   *\\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute}\\n   */\\n  ;\\n\\n  _proto.setAttribute = function setAttribute$1(attribute, value) {\\n    setAttribute(this.el_, attribute, value);\\n  }\\n  /**\\n   * Remove an attribute from the `Component`s element.\\n   *\\n   * @param {string} attribute\\n   *        Name of the attribute to remove.\\n   *\\n   * @see [DOM API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute}\\n   */\\n  ;\\n\\n  _proto.removeAttribute = function removeAttribute$1(attribute) {\\n    removeAttribute(this.el_, attribute);\\n  }\\n  /**\\n   * Get or set the width of the component based upon the CSS styles.\\n   * See {@link Component#dimension} for more detailed information.\\n   *\\n   * @param {number|string} [num]\\n   *        The width that you want to set postfixed with '%', 'px' or nothing.\\n   *\\n   * @param {boolean} [skipListeners]\\n   *        Skip the componentresize event trigger\\n   *\\n   * @return {number|string}\\n   *         The width when getting, zero if there is no width. Can be a string\\n   *           postpixed with '%' or 'px'.\\n   */\\n  ;\\n\\n  _proto.width = function width(num, skipListeners) {\\n    return this.dimension('width', num, skipListeners);\\n  }\\n  /**\\n   * Get or set the height of the component based upon the CSS styles.\\n   * See {@link Component#dimension} for more detailed information.\\n   *\\n   * @param {number|string} [num]\\n   *        The height that you want to set postfixed with '%', 'px' or nothing.\\n   *\\n   * @param {boolean} [skipListeners]\\n   *        Skip the componentresize event trigger\\n   *\\n   * @return {number|string}\\n   *         The width when getting, zero if there is no width. Can be a string\\n   *         postpixed with '%' or 'px'.\\n   */\\n  ;\\n\\n  _proto.height = function height(num, skipListeners) {\\n    return this.dimension('height', num, skipListeners);\\n  }\\n  /**\\n   * Set both the width and height of the `Component` element at the same time.\\n   *\\n   * @param  {number|string} width\\n   *         Width to set the `Component`s element to.\\n   *\\n   * @param  {number|string} height\\n   *         Height to set the `Component`s element to.\\n   */\\n  ;\\n\\n  _proto.dimensions = function dimensions(width, height) {\\n    // Skip componentresize listeners on width for optimization\\n    this.width(width, true);\\n    this.height(height);\\n  }\\n  /**\\n   * Get or set width or height of the `Component` element. This is the shared code\\n   * for the {@link Component#width} and {@link Component#height}.\\n   *\\n   * Things to know:\\n   * - If the width or height in an number this will return the number postfixed with 'px'.\\n   * - If the width/height is a percent this will return the percent postfixed with '%'\\n   * - Hidden elements have a width of 0 with `window.getComputedStyle`. This function\\n   *   defaults to the `Component`s `style.width` and falls back to `window.getComputedStyle`.\\n   *   See [this]{@link http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/}\\n   *   for more information\\n   * - If you want the computed style of the component, use {@link Component#currentWidth}\\n   *   and {@link {Component#currentHeight}\\n   *\\n   * @fires Component#componentresize\\n   *\\n   * @param {string} widthOrHeight\\n   8        'width' or 'height'\\n   *\\n   * @param  {number|string} [num]\\n   8         New dimension\\n   *\\n   * @param  {boolean} [skipListeners]\\n   *         Skip componentresize event trigger\\n   *\\n   * @return {number}\\n   *         The dimension when getting or 0 if unset\\n   */\\n  ;\\n\\n  _proto.dimension = function dimension(widthOrHeight, num, skipListeners) {\\n    if (num !== undefined) {\\n      // Set to zero if null or literally NaN (NaN !== NaN)\\n      if (num === null || num !== num) {\\n        num = 0;\\n      } // Check if using css width/height (% or px) and adjust\\n\\n\\n      if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\\n        this.el_.style[widthOrHeight] = num;\\n      } else if (num === 'auto') {\\n        this.el_.style[widthOrHeight] = '';\\n      } else {\\n        this.el_.style[widthOrHeight] = num + 'px';\\n      } // skipListeners allows us to avoid triggering the resize event when setting both width and height\\n\\n\\n      if (!skipListeners) {\\n        /**\\n         * Triggered when a component is resized.\\n         *\\n         * @event Component#componentresize\\n         * @type {EventTarget~Event}\\n         */\\n        this.trigger('componentresize');\\n      }\\n\\n      return;\\n    } // Not setting a value, so getting it\\n    // Make sure element exists\\n\\n\\n    if (!this.el_) {\\n      return 0;\\n    } // Get dimension value from style\\n\\n\\n    var val = this.el_.style[widthOrHeight];\\n    var pxIndex = val.indexOf('px');\\n\\n    if (pxIndex !== -1) {\\n      // Return the pixel value with no 'px'\\n      return parseInt(val.slice(0, pxIndex), 10);\\n    } // No px so using % or no style was set, so falling back to offsetWidth/height\\n    // If component has display:none, offset will return 0\\n    // TODO: handle display:none and no dimension style using px\\n\\n\\n    return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\\n  }\\n  /**\\n   * Get the computed width or the height of the component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @param {string} widthOrHeight\\n   *        A string containing 'width' or 'height'. Whichever one you want to get.\\n   *\\n   * @return {number}\\n   *         The dimension that gets asked for or 0 if nothing was set\\n   *         for that dimension.\\n   */\\n  ;\\n\\n  _proto.currentDimension = function currentDimension(widthOrHeight) {\\n    var computedWidthOrHeight = 0;\\n\\n    if (widthOrHeight !== 'width' && widthOrHeight !== 'height') {\\n      throw new Error('currentDimension only accepts width or height value');\\n    }\\n\\n    computedWidthOrHeight = computedStyle(this.el_, widthOrHeight); // remove 'px' from variable and parse as integer\\n\\n    computedWidthOrHeight = parseFloat(computedWidthOrHeight); // if the computed value is still 0, it's possible that the browser is lying\\n    // and we want to check the offset values.\\n    // This code also runs wherever getComputedStyle doesn't exist.\\n\\n    if (computedWidthOrHeight === 0 || isNaN(computedWidthOrHeight)) {\\n      var rule = \\\"offset\\\" + toTitleCase(widthOrHeight);\\n      computedWidthOrHeight = this.el_[rule];\\n    }\\n\\n    return computedWidthOrHeight;\\n  }\\n  /**\\n   * An object that contains width and height values of the `Component`s\\n   * computed style. Uses `window.getComputedStyle`.\\n   *\\n   * @typedef {Object} Component~DimensionObject\\n   *\\n   * @property {number} width\\n   *           The width of the `Component`s computed style.\\n   *\\n   * @property {number} height\\n   *           The height of the `Component`s computed style.\\n   */\\n\\n  /**\\n   * Get an object that contains computed width and height values of the\\n   * component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @return {Component~DimensionObject}\\n   *         The computed dimensions of the component's element.\\n   */\\n  ;\\n\\n  _proto.currentDimensions = function currentDimensions() {\\n    return {\\n      width: this.currentDimension('width'),\\n      height: this.currentDimension('height')\\n    };\\n  }\\n  /**\\n   * Get the computed width of the component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @return {number}\\n   *         The computed width of the component's element.\\n   */\\n  ;\\n\\n  _proto.currentWidth = function currentWidth() {\\n    return this.currentDimension('width');\\n  }\\n  /**\\n   * Get the computed height of the component's element.\\n   *\\n   * Uses `window.getComputedStyle`.\\n   *\\n   * @return {number}\\n   *         The computed height of the component's element.\\n   */\\n  ;\\n\\n  _proto.currentHeight = function currentHeight() {\\n    return this.currentDimension('height');\\n  }\\n  /**\\n   * Set the focus to this component\\n   */\\n  ;\\n\\n  _proto.focus = function focus() {\\n    this.el_.focus();\\n  }\\n  /**\\n   * Remove the focus from this component\\n   */\\n  ;\\n\\n  _proto.blur = function blur() {\\n    this.el_.blur();\\n  }\\n  /**\\n   * When this Component receives a `keydown` event which it does not process,\\n   *  it passes the event to the Player for handling.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    if (this.player_) {\\n      // We only stop propagation here because we want unhandled events to fall\\n      // back to the browser.\\n      event.stopPropagation();\\n      this.player_.handleKeyDown(event);\\n    }\\n  }\\n  /**\\n   * Many components used to have a `handleKeyPress` method, which was poorly\\n   * named because it listened to a `keydown` event. This method name now\\n   * delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`\\n   * will not see their method calls stop working.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleKeyPress = function handleKeyPress(event) {\\n    this.handleKeyDown(event);\\n  }\\n  /**\\n   * Emit a 'tap' events when touch event support gets detected. This gets used to\\n   * support toggling the controls through a tap on the video. They get enabled\\n   * because every sub-component would have extra overhead otherwise.\\n   *\\n   * @private\\n   * @fires Component#tap\\n   * @listens Component#touchstart\\n   * @listens Component#touchmove\\n   * @listens Component#touchleave\\n   * @listens Component#touchcancel\\n   * @listens Component#touchend\\n    */\\n  ;\\n\\n  _proto.emitTapEvents = function emitTapEvents() {\\n    // Track the start time so we can determine how long the touch lasted\\n    var touchStart = 0;\\n    var firstTouch = null; // Maximum movement allowed during a touch event to still be considered a tap\\n    // Other popular libs use anywhere from 2 (hammer.js) to 15,\\n    // so 10 seems like a nice, round number.\\n\\n    var tapMovementThreshold = 10; // The maximum length a touch can be while still being considered a tap\\n\\n    var touchTimeThreshold = 200;\\n    var couldBeTap;\\n    this.on('touchstart', function (event) {\\n      // If more than one finger, don't consider treating this as a click\\n      if (event.touches.length === 1) {\\n        // Copy pageX/pageY from the object\\n        firstTouch = {\\n          pageX: event.touches[0].pageX,\\n          pageY: event.touches[0].pageY\\n        }; // Record start time so we can detect a tap vs. \\\"touch and hold\\\"\\n\\n        touchStart = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now(); // Reset couldBeTap tracking\\n\\n        couldBeTap = true;\\n      }\\n    });\\n    this.on('touchmove', function (event) {\\n      // If more than one finger, don't consider treating this as a click\\n      if (event.touches.length > 1) {\\n        couldBeTap = false;\\n      } else if (firstTouch) {\\n        // Some devices will throw touchmoves for all but the slightest of taps.\\n        // So, if we moved only a small distance, this could still be a tap\\n        var xdiff = event.touches[0].pageX - firstTouch.pageX;\\n        var ydiff = event.touches[0].pageY - firstTouch.pageY;\\n        var touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\\n\\n        if (touchDistance > tapMovementThreshold) {\\n          couldBeTap = false;\\n        }\\n      }\\n    });\\n\\n    var noTap = function noTap() {\\n      couldBeTap = false;\\n    }; // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\\n\\n\\n    this.on('touchleave', noTap);\\n    this.on('touchcancel', noTap); // When the touch ends, measure how long it took and trigger the appropriate\\n    // event\\n\\n    this.on('touchend', function (event) {\\n      firstTouch = null; // Proceed only if the touchmove/leave/cancel event didn't happen\\n\\n      if (couldBeTap === true) {\\n        // Measure how long the touch lasted\\n        var touchTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now() - touchStart; // Make sure the touch was less than the threshold to be considered a tap\\n\\n        if (touchTime < touchTimeThreshold) {\\n          // Don't let browser turn this into a click\\n          event.preventDefault();\\n          /**\\n           * Triggered when a `Component` is tapped.\\n           *\\n           * @event Component#tap\\n           * @type {EventTarget~Event}\\n           */\\n\\n          this.trigger('tap'); // It may be good to copy the touchend event object and change the\\n          // type to tap, if the other event properties aren't exact after\\n          // Events.fixEvent runs (e.g. event.target)\\n        }\\n      }\\n    });\\n  }\\n  /**\\n   * This function reports user activity whenever touch events happen. This can get\\n   * turned off by any sub-components that wants touch events to act another way.\\n   *\\n   * Report user touch activity when touch events occur. User activity gets used to\\n   * determine when controls should show/hide. It is simple when it comes to mouse\\n   * events, because any mouse event should show the controls. So we capture mouse\\n   * events that bubble up to the player and report activity when that happens.\\n   * With touch events it isn't as easy as `touchstart` and `touchend` toggle player\\n   * controls. So touch events can't help us at the player level either.\\n   *\\n   * User activity gets checked asynchronously. So what could happen is a tap event\\n   * on the video turns the controls off. Then the `touchend` event bubbles up to\\n   * the player. Which, if it reported user activity, would turn the controls right\\n   * back on. We also don't want to completely block touch events from bubbling up.\\n   * Furthermore a `touchmove` event and anything other than a tap, should not turn\\n   * controls back on.\\n   *\\n   * @listens Component#touchstart\\n   * @listens Component#touchmove\\n   * @listens Component#touchend\\n   * @listens Component#touchcancel\\n   */\\n  ;\\n\\n  _proto.enableTouchActivity = function enableTouchActivity() {\\n    // Don't continue if the root player doesn't support reporting user activity\\n    if (!this.player() || !this.player().reportUserActivity) {\\n      return;\\n    } // listener for reporting that the user is active\\n\\n\\n    var report = bind(this.player(), this.player().reportUserActivity);\\n    var touchHolding;\\n    this.on('touchstart', function () {\\n      report(); // For as long as the they are touching the device or have their mouse down,\\n      // we consider them active even if they're not moving their finger or mouse.\\n      // So we want to continue to update that they are active\\n\\n      this.clearInterval(touchHolding); // report at the same interval as activityCheck\\n\\n      touchHolding = this.setInterval(report, 250);\\n    });\\n\\n    var touchEnd = function touchEnd(event) {\\n      report(); // stop the interval that maintains activity if the touch is holding\\n\\n      this.clearInterval(touchHolding);\\n    };\\n\\n    this.on('touchmove', report);\\n    this.on('touchend', touchEnd);\\n    this.on('touchcancel', touchEnd);\\n  }\\n  /**\\n   * A callback that has no parameters and is bound into `Component`s context.\\n   *\\n   * @callback Component~GenericCallback\\n   * @this Component\\n   */\\n\\n  /**\\n   * Creates a function that runs after an `x` millisecond timeout. This function is a\\n   * wrapper around `window.setTimeout`. There are a few reasons to use this one\\n   * instead though:\\n   * 1. It gets cleared via  {@link Component#clearTimeout} when\\n   *    {@link Component#dispose} gets called.\\n   * 2. The function callback will gets turned into a {@link Component~GenericCallback}\\n   *\\n   * > Note: You can't use `window.clearTimeout` on the id returned by this function. This\\n   *         will cause its dispose listener not to get cleaned up! Please use\\n   *         {@link Component#clearTimeout} or {@link Component#dispose} instead.\\n   *\\n   * @param {Component~GenericCallback} fn\\n   *        The function that will be run after `timeout`.\\n   *\\n   * @param {number} timeout\\n   *        Timeout in milliseconds to delay before executing the specified function.\\n   *\\n   * @return {number}\\n   *         Returns a timeout ID that gets used to identify the timeout. It can also\\n   *         get used in {@link Component#clearTimeout} to clear the timeout that\\n   *         was set.\\n   *\\n   * @listens Component#dispose\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout}\\n   */\\n  ;\\n\\n  _proto.setTimeout = function setTimeout(fn, timeout) {\\n    var _this2 = this;\\n\\n    // declare as variables so they are properly available in timeout function\\n    // eslint-disable-next-line\\n    var timeoutId;\\n    fn = bind(this, fn);\\n    this.clearTimersOnDispose_();\\n    timeoutId = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n      if (_this2.setTimeoutIds_.has(timeoutId)) {\\n        _this2.setTimeoutIds_[\\\"delete\\\"](timeoutId);\\n      }\\n\\n      fn();\\n    }, timeout);\\n    this.setTimeoutIds_.add(timeoutId);\\n    return timeoutId;\\n  }\\n  /**\\n   * Clears a timeout that gets created via `window.setTimeout` or\\n   * {@link Component#setTimeout}. If you set a timeout via {@link Component#setTimeout}\\n   * use this function instead of `window.clearTimout`. If you don't your dispose\\n   * listener will not get cleaned up until {@link Component#dispose}!\\n   *\\n   * @param {number} timeoutId\\n   *        The id of the timeout to clear. The return value of\\n   *        {@link Component#setTimeout} or `window.setTimeout`.\\n   *\\n   * @return {number}\\n   *         Returns the timeout id that was cleared.\\n   *\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearTimeout}\\n   */\\n  ;\\n\\n  _proto.clearTimeout = function clearTimeout(timeoutId) {\\n    if (this.setTimeoutIds_.has(timeoutId)) {\\n      this.setTimeoutIds_[\\\"delete\\\"](timeoutId);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(timeoutId);\\n    }\\n\\n    return timeoutId;\\n  }\\n  /**\\n   * Creates a function that gets run every `x` milliseconds. This function is a wrapper\\n   * around `window.setInterval`. There are a few reasons to use this one instead though.\\n   * 1. It gets cleared via  {@link Component#clearInterval} when\\n   *    {@link Component#dispose} gets called.\\n   * 2. The function callback will be a {@link Component~GenericCallback}\\n   *\\n   * @param {Component~GenericCallback} fn\\n   *        The function to run every `x` seconds.\\n   *\\n   * @param {number} interval\\n   *        Execute the specified function every `x` milliseconds.\\n   *\\n   * @return {number}\\n   *         Returns an id that can be used to identify the interval. It can also be be used in\\n   *         {@link Component#clearInterval} to clear the interval.\\n   *\\n   * @listens Component#dispose\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval}\\n   */\\n  ;\\n\\n  _proto.setInterval = function setInterval(fn, interval) {\\n    fn = bind(this, fn);\\n    this.clearTimersOnDispose_();\\n    var intervalId = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setInterval(fn, interval);\\n    this.setIntervalIds_.add(intervalId);\\n    return intervalId;\\n  }\\n  /**\\n   * Clears an interval that gets created via `window.setInterval` or\\n   * {@link Component#setInterval}. If you set an inteval via {@link Component#setInterval}\\n   * use this function instead of `window.clearInterval`. If you don't your dispose\\n   * listener will not get cleaned up until {@link Component#dispose}!\\n   *\\n   * @param {number} intervalId\\n   *        The id of the interval to clear. The return value of\\n   *        {@link Component#setInterval} or `window.setInterval`.\\n   *\\n   * @return {number}\\n   *         Returns the interval id that was cleared.\\n   *\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/clearInterval}\\n   */\\n  ;\\n\\n  _proto.clearInterval = function clearInterval(intervalId) {\\n    if (this.setIntervalIds_.has(intervalId)) {\\n      this.setIntervalIds_[\\\"delete\\\"](intervalId);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearInterval(intervalId);\\n    }\\n\\n    return intervalId;\\n  }\\n  /**\\n   * Queues up a callback to be passed to requestAnimationFrame (rAF), but\\n   * with a few extra bonuses:\\n   *\\n   * - Supports browsers that do not support rAF by falling back to\\n   *   {@link Component#setTimeout}.\\n   *\\n   * - The callback is turned into a {@link Component~GenericCallback} (i.e.\\n   *   bound to the component).\\n   *\\n   * - Automatic cancellation of the rAF callback is handled if the component\\n   *   is disposed before it is called.\\n   *\\n   * @param  {Component~GenericCallback} fn\\n   *         A function that will be bound to this component and executed just\\n   *         before the browser's next repaint.\\n   *\\n   * @return {number}\\n   *         Returns an rAF ID that gets used to identify the timeout. It can\\n   *         also be used in {@link Component#cancelAnimationFrame} to cancel\\n   *         the animation frame callback.\\n   *\\n   * @listens Component#dispose\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame}\\n   */\\n  ;\\n\\n  _proto.requestAnimationFrame = function requestAnimationFrame(fn) {\\n    var _this3 = this;\\n\\n    // Fall back to using a timer.\\n    if (!this.supportsRaf_) {\\n      return this.setTimeout(fn, 1000 / 60);\\n    }\\n\\n    this.clearTimersOnDispose_(); // declare as variables so they are properly available in rAF function\\n    // eslint-disable-next-line\\n\\n    var id;\\n    fn = bind(this, fn);\\n    id = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.requestAnimationFrame(function () {\\n      if (_this3.rafIds_.has(id)) {\\n        _this3.rafIds_[\\\"delete\\\"](id);\\n      }\\n\\n      fn();\\n    });\\n    this.rafIds_.add(id);\\n    return id;\\n  }\\n  /**\\n   * Cancels a queued callback passed to {@link Component#requestAnimationFrame}\\n   * (rAF).\\n   *\\n   * If you queue an rAF callback via {@link Component#requestAnimationFrame},\\n   * use this function instead of `window.cancelAnimationFrame`. If you don't,\\n   * your dispose listener will not get cleaned up until {@link Component#dispose}!\\n   *\\n   * @param {number} id\\n   *        The rAF ID to clear. The return value of {@link Component#requestAnimationFrame}.\\n   *\\n   * @return {number}\\n   *         Returns the rAF ID that was cleared.\\n   *\\n   * @see [Similar to]{@link https://developer.mozilla.org/en-US/docs/Web/API/window/cancelAnimationFrame}\\n   */\\n  ;\\n\\n  _proto.cancelAnimationFrame = function cancelAnimationFrame(id) {\\n    // Fall back to using a timer.\\n    if (!this.supportsRaf_) {\\n      return this.clearTimeout(id);\\n    }\\n\\n    if (this.rafIds_.has(id)) {\\n      this.rafIds_[\\\"delete\\\"](id);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.cancelAnimationFrame(id);\\n    }\\n\\n    return id;\\n  }\\n  /**\\n   * A function to setup `requestAnimationFrame`, `setTimeout`,\\n   * and `setInterval`, clearing on dispose.\\n   *\\n   * > Previously each timer added and removed dispose listeners on it's own.\\n   * For better performance it was decided to batch them all, and use `Set`s\\n   * to track outstanding timer ids.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.clearTimersOnDispose_ = function clearTimersOnDispose_() {\\n    var _this4 = this;\\n\\n    if (this.clearingTimersOnDispose_) {\\n      return;\\n    }\\n\\n    this.clearingTimersOnDispose_ = true;\\n    this.one('dispose', function () {\\n      [['rafIds_', 'cancelAnimationFrame'], ['setTimeoutIds_', 'clearTimeout'], ['setIntervalIds_', 'clearInterval']].forEach(function (_ref) {\\n        var idName = _ref[0],\\n            cancelName = _ref[1];\\n\\n        _this4[idName].forEach(_this4[cancelName], _this4);\\n      });\\n      _this4.clearingTimersOnDispose_ = false;\\n    });\\n  }\\n  /**\\n   * Register a `Component` with `videojs` given the name and the component.\\n   *\\n   * > NOTE: {@link Tech}s should not be registered as a `Component`. {@link Tech}s\\n   *         should be registered using {@link Tech.registerTech} or\\n   *         {@link videojs:videojs.registerTech}.\\n   *\\n   * > NOTE: This function can also be seen on videojs as\\n   *         {@link videojs:videojs.registerComponent}.\\n   *\\n   * @param {string} name\\n   *        The name of the `Component` to register.\\n   *\\n   * @param {Component} ComponentToRegister\\n   *        The `Component` class to register.\\n   *\\n   * @return {Component}\\n   *         The `Component` that was registered.\\n   */\\n  ;\\n\\n  Component.registerComponent = function registerComponent(name, ComponentToRegister) {\\n    if (typeof name !== 'string' || !name) {\\n      throw new Error(\\\"Illegal component name, \\\\\\\"\\\" + name + \\\"\\\\\\\"; must be a non-empty string.\\\");\\n    }\\n\\n    var Tech = Component.getComponent('Tech'); // We need to make sure this check is only done if Tech has been registered.\\n\\n    var isTech = Tech && Tech.isTech(ComponentToRegister);\\n    var isComp = Component === ComponentToRegister || Component.prototype.isPrototypeOf(ComponentToRegister.prototype);\\n\\n    if (isTech || !isComp) {\\n      var reason;\\n\\n      if (isTech) {\\n        reason = 'techs must be registered using Tech.registerTech()';\\n      } else {\\n        reason = 'must be a Component subclass';\\n      }\\n\\n      throw new Error(\\\"Illegal component, \\\\\\\"\\\" + name + \\\"\\\\\\\"; \\\" + reason + \\\".\\\");\\n    }\\n\\n    name = toTitleCase(name);\\n\\n    if (!Component.components_) {\\n      Component.components_ = {};\\n    }\\n\\n    var Player = Component.getComponent('Player');\\n\\n    if (name === 'Player' && Player && Player.players) {\\n      var players = Player.players;\\n      var playerNames = Object.keys(players); // If we have players that were disposed, then their name will still be\\n      // in Players.players. So, we must loop through and verify that the value\\n      // for each item is not null. This allows registration of the Player component\\n      // after all players have been disposed or before any were created.\\n\\n      if (players && playerNames.length > 0 && playerNames.map(function (pname) {\\n        return players[pname];\\n      }).every(Boolean)) {\\n        throw new Error('Can not register Player component after player has been created.');\\n      }\\n    }\\n\\n    Component.components_[name] = ComponentToRegister;\\n    Component.components_[toLowerCase(name)] = ComponentToRegister;\\n    return ComponentToRegister;\\n  }\\n  /**\\n   * Get a `Component` based on the name it was registered with.\\n   *\\n   * @param {string} name\\n   *        The Name of the component to get.\\n   *\\n   * @return {Component}\\n   *         The `Component` that got registered under the given name.\\n   *\\n   * @deprecated In `videojs` 6 this will not return `Component`s that were not\\n   *             registered using {@link Component.registerComponent}. Currently we\\n   *             check the global `videojs` object for a `Component` name and\\n   *             return that if it exists.\\n   */\\n  ;\\n\\n  Component.getComponent = function getComponent(name) {\\n    if (!name || !Component.components_) {\\n      return;\\n    }\\n\\n    return Component.components_[name];\\n  };\\n\\n  return Component;\\n}();\\n/**\\n * Whether or not this component supports `requestAnimationFrame`.\\n *\\n * This is exposed primarily for testing purposes.\\n *\\n * @private\\n * @type {Boolean}\\n */\\n\\n\\nComponent.prototype.supportsRaf_ = typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.requestAnimationFrame === 'function' && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.cancelAnimationFrame === 'function';\\nComponent.registerComponent('Component', Component);\\n\\n/**\\n * @file browser.js\\n * @module browser\\n */\\nvar USER_AGENT = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.userAgent || '';\\nvar webkitVersionMap = /AppleWebKit\\\\/([\\\\d.]+)/i.exec(USER_AGENT);\\nvar appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\\n/**\\n * Whether or not this device is an iPod.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_IPOD = /iPod/i.test(USER_AGENT);\\n/**\\n * The detected iOS version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {string|null}\\n */\\n\\nvar IOS_VERSION = function () {\\n  var match = USER_AGENT.match(/OS (\\\\d+)_/i);\\n\\n  if (match && match[1]) {\\n    return match[1];\\n  }\\n\\n  return null;\\n}();\\n/**\\n * Whether or not this is an Android device.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_ANDROID = /Android/i.test(USER_AGENT);\\n/**\\n * The detected Android version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {number|string|null}\\n */\\n\\nvar ANDROID_VERSION = function () {\\n  // This matches Android Major.Minor.Patch versions\\n  // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\\n  var match = USER_AGENT.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);\\n\\n  if (!match) {\\n    return null;\\n  }\\n\\n  var major = match[1] && parseFloat(match[1]);\\n  var minor = match[2] && parseFloat(match[2]);\\n\\n  if (major && minor) {\\n    return parseFloat(match[1] + '.' + match[2]);\\n  } else if (major) {\\n    return major;\\n  }\\n\\n  return null;\\n}();\\n/**\\n * Whether or not this is a native Android browser.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\\n/**\\n * Whether or not this is Mozilla Firefox.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_FIREFOX = /Firefox/i.test(USER_AGENT);\\n/**\\n * Whether or not this is Microsoft Edge.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_EDGE = /Edg/i.test(USER_AGENT);\\n/**\\n * Whether or not this is Google Chrome.\\n *\\n * This will also be `true` for Chrome on iOS, which will have different support\\n * as it is actually Safari under the hood.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_CHROME = !IS_EDGE && (/Chrome/i.test(USER_AGENT) || /CriOS/i.test(USER_AGENT));\\n/**\\n * The detected Google Chrome version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {number|null}\\n */\\n\\nvar CHROME_VERSION = function () {\\n  var match = USER_AGENT.match(/(Chrome|CriOS)\\\\/(\\\\d+)/);\\n\\n  if (match && match[2]) {\\n    return parseFloat(match[2]);\\n  }\\n\\n  return null;\\n}();\\n/**\\n * The detected Internet Explorer version - or `null`.\\n *\\n * @static\\n * @const\\n * @type {number|null}\\n */\\n\\nvar IE_VERSION = function () {\\n  var result = /MSIE\\\\s(\\\\d+)\\\\.\\\\d/.exec(USER_AGENT);\\n  var version = result && parseFloat(result[1]);\\n\\n  if (!version && /Trident\\\\/7.0/i.test(USER_AGENT) && /rv:11.0/.test(USER_AGENT)) {\\n    // IE 11 has a different user agent string than other IE versions\\n    version = 11.0;\\n  }\\n\\n  return version;\\n}();\\n/**\\n * Whether or not this is desktop Safari.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_SAFARI = /Safari/i.test(USER_AGENT) && !IS_CHROME && !IS_ANDROID && !IS_EDGE;\\n/**\\n * Whether or not this is a Windows machine.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_WINDOWS = /Windows/i.test(USER_AGENT);\\n/**\\n * Whether or not this device is touch-enabled.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar TOUCH_ENABLED = isReal() && ('ontouchstart' in global_window__WEBPACK_IMPORTED_MODULE_0___default.a || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.maxTouchPoints || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.DocumentTouch && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.document instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.DocumentTouch);\\n/**\\n * Whether or not this device is an iPad.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_IPAD = /iPad/i.test(USER_AGENT) || IS_SAFARI && TOUCH_ENABLED && !/iPhone/i.test(USER_AGENT);\\n/**\\n * Whether or not this device is an iPhone.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\\n// to identify iPhones, we need to exclude iPads.\\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\\n\\nvar IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\\n/**\\n * Whether or not this is an iOS device.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\\n/**\\n * Whether or not this is any flavor of Safari - including iOS.\\n *\\n * @static\\n * @const\\n * @type {Boolean}\\n */\\n\\nvar IS_ANY_SAFARI = (IS_SAFARI || IS_IOS) && !IS_CHROME;\\n\\nvar browser = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  IS_IPOD: IS_IPOD,\\n  IOS_VERSION: IOS_VERSION,\\n  IS_ANDROID: IS_ANDROID,\\n  ANDROID_VERSION: ANDROID_VERSION,\\n  IS_NATIVE_ANDROID: IS_NATIVE_ANDROID,\\n  IS_FIREFOX: IS_FIREFOX,\\n  IS_EDGE: IS_EDGE,\\n  IS_CHROME: IS_CHROME,\\n  CHROME_VERSION: CHROME_VERSION,\\n  IE_VERSION: IE_VERSION,\\n  IS_SAFARI: IS_SAFARI,\\n  IS_WINDOWS: IS_WINDOWS,\\n  TOUCH_ENABLED: TOUCH_ENABLED,\\n  IS_IPAD: IS_IPAD,\\n  IS_IPHONE: IS_IPHONE,\\n  IS_IOS: IS_IOS,\\n  IS_ANY_SAFARI: IS_ANY_SAFARI\\n});\\n\\n/**\\n * @file time-ranges.js\\n * @module time-ranges\\n */\\n\\n/**\\n * Returns the time for the specified index at the start or end\\n * of a TimeRange object.\\n *\\n * @typedef    {Function} TimeRangeIndex\\n *\\n * @param      {number} [index=0]\\n *             The range number to return the time for.\\n *\\n * @return     {number}\\n *             The time offset at the specified index.\\n *\\n * @deprecated The index argument must be provided.\\n *             In the future, leaving it out will throw an error.\\n */\\n\\n/**\\n * An object that contains ranges of time.\\n *\\n * @typedef  {Object} TimeRange\\n *\\n * @property {number} length\\n *           The number of time ranges represented by this object.\\n *\\n * @property {module:time-ranges~TimeRangeIndex} start\\n *           Returns the time offset at which a specified time range begins.\\n *\\n * @property {module:time-ranges~TimeRangeIndex} end\\n *           Returns the time offset at which a specified time range ends.\\n *\\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges\\n */\\n\\n/**\\n * Check if any of the time ranges are over the maximum index.\\n *\\n * @private\\n * @param   {string} fnName\\n *          The function name to use for logging\\n *\\n * @param   {number} index\\n *          The index to check\\n *\\n * @param   {number} maxIndex\\n *          The maximum possible index\\n *\\n * @throws  {Error} if the timeRanges provided are over the maxIndex\\n */\\nfunction rangeCheck(fnName, index, maxIndex) {\\n  if (typeof index !== 'number' || index < 0 || index > maxIndex) {\\n    throw new Error(\\\"Failed to execute '\\\" + fnName + \\\"' on 'TimeRanges': The index provided (\\\" + index + \\\") is non-numeric or out of bounds (0-\\\" + maxIndex + \\\").\\\");\\n  }\\n}\\n/**\\n * Get the time for the specified index at the start or end\\n * of a TimeRange object.\\n *\\n * @private\\n * @param      {string} fnName\\n *             The function name to use for logging\\n *\\n * @param      {string} valueIndex\\n *             The property that should be used to get the time. should be\\n *             'start' or 'end'\\n *\\n * @param      {Array} ranges\\n *             An array of time ranges\\n *\\n * @param      {Array} [rangeIndex=0]\\n *             The index to start the search at\\n *\\n * @return     {number}\\n *             The time that offset at the specified index.\\n *\\n * @deprecated rangeIndex must be set to a value, in the future this will throw an error.\\n * @throws     {Error} if rangeIndex is more than the length of ranges\\n */\\n\\n\\nfunction getRange(fnName, valueIndex, ranges, rangeIndex) {\\n  rangeCheck(fnName, rangeIndex, ranges.length - 1);\\n  return ranges[rangeIndex][valueIndex];\\n}\\n/**\\n * Create a time range object given ranges of time.\\n *\\n * @private\\n * @param   {Array} [ranges]\\n *          An array of time ranges.\\n */\\n\\n\\nfunction createTimeRangesObj(ranges) {\\n  if (ranges === undefined || ranges.length === 0) {\\n    return {\\n      length: 0,\\n      start: function start() {\\n        throw new Error('This TimeRanges object is empty');\\n      },\\n      end: function end() {\\n        throw new Error('This TimeRanges object is empty');\\n      }\\n    };\\n  }\\n\\n  return {\\n    length: ranges.length,\\n    start: getRange.bind(null, 'start', 0, ranges),\\n    end: getRange.bind(null, 'end', 1, ranges)\\n  };\\n}\\n/**\\n * Create a `TimeRange` object which mimics an\\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/TimeRanges|HTML5 TimeRanges instance}.\\n *\\n * @param {number|Array[]} start\\n *        The start of a single range (a number) or an array of ranges (an\\n *        array of arrays of two numbers each).\\n *\\n * @param {number} end\\n *        The end of a single range. Cannot be used with the array form of\\n *        the `start` argument.\\n */\\n\\n\\nfunction createTimeRanges(start, end) {\\n  if (Array.isArray(start)) {\\n    return createTimeRangesObj(start);\\n  } else if (start === undefined || end === undefined) {\\n    return createTimeRangesObj();\\n  }\\n\\n  return createTimeRangesObj([[start, end]]);\\n}\\n\\n/**\\n * @file buffer.js\\n * @module buffer\\n */\\n/**\\n * Compute the percentage of the media that has been buffered.\\n *\\n * @param {TimeRange} buffered\\n *        The current `TimeRange` object representing buffered time ranges\\n *\\n * @param {number} duration\\n *        Total duration of the media\\n *\\n * @return {number}\\n *         Percent buffered of the total duration in decimal form.\\n */\\n\\nfunction bufferedPercent(buffered, duration) {\\n  var bufferedDuration = 0;\\n  var start;\\n  var end;\\n\\n  if (!duration) {\\n    return 0;\\n  }\\n\\n  if (!buffered || !buffered.length) {\\n    buffered = createTimeRanges(0, 0);\\n  }\\n\\n  for (var i = 0; i < buffered.length; i++) {\\n    start = buffered.start(i);\\n    end = buffered.end(i); // buffered end can be bigger than duration by a very small fraction\\n\\n    if (end > duration) {\\n      end = duration;\\n    }\\n\\n    bufferedDuration += end - start;\\n  }\\n\\n  return bufferedDuration / duration;\\n}\\n\\n/**\\n * @file fullscreen-api.js\\n * @module fullscreen-api\\n * @private\\n */\\n/**\\n * Store the browser-specific methods for the fullscreen API.\\n *\\n * @type {Object}\\n * @see [Specification]{@link https://fullscreen.spec.whatwg.org}\\n * @see [Map Approach From Screenfull.js]{@link https://github.com/sindresorhus/screenfull.js}\\n */\\n\\nvar FullscreenApi = {\\n  prefixed: true\\n}; // browser API methods\\n\\nvar apiMap = [['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror', 'fullscreen'], // WebKit\\n['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror', '-webkit-full-screen'], // Mozilla\\n['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror', '-moz-full-screen'], // Microsoft\\n['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError', '-ms-fullscreen']];\\nvar specApi = apiMap[0];\\nvar browserApi; // determine the supported set of functions\\n\\nfor (var i = 0; i < apiMap.length; i++) {\\n  // check for exitFullscreen function\\n  if (apiMap[i][1] in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n    browserApi = apiMap[i];\\n    break;\\n  }\\n} // map the browser API names to the spec API names\\n\\n\\nif (browserApi) {\\n  for (var _i = 0; _i < browserApi.length; _i++) {\\n    FullscreenApi[specApi[_i]] = browserApi[_i];\\n  }\\n\\n  FullscreenApi.prefixed = browserApi[0] !== specApi[0];\\n}\\n\\n/**\\n * @file media-error.js\\n */\\n/**\\n * A Custom `MediaError` class which mimics the standard HTML5 `MediaError` class.\\n *\\n * @param {number|string|Object|MediaError} value\\n *        This can be of multiple types:\\n *        - number: should be a standard error code\\n *        - string: an error message (the code will be 0)\\n *        - Object: arbitrary properties\\n *        - `MediaError` (native): used to populate a video.js `MediaError` object\\n *        - `MediaError` (video.js): will return itself if it's already a\\n *          video.js `MediaError` object.\\n *\\n * @see [MediaError Spec]{@link https://dev.w3.org/html5/spec-author-view/video.html#mediaerror}\\n * @see [Encrypted MediaError Spec]{@link https://www.w3.org/TR/2013/WD-encrypted-media-20130510/#error-codes}\\n *\\n * @class MediaError\\n */\\n\\nfunction MediaError(value) {\\n  // Allow redundant calls to this constructor to avoid having `instanceof`\\n  // checks peppered around the code.\\n  if (value instanceof MediaError) {\\n    return value;\\n  }\\n\\n  if (typeof value === 'number') {\\n    this.code = value;\\n  } else if (typeof value === 'string') {\\n    // default code is zero, so this is a custom error\\n    this.message = value;\\n  } else if (isObject(value)) {\\n    // We assign the `code` property manually because native `MediaError` objects\\n    // do not expose it as an own/enumerable property of the object.\\n    if (typeof value.code === 'number') {\\n      this.code = value.code;\\n    }\\n\\n    assign(this, value);\\n  }\\n\\n  if (!this.message) {\\n    this.message = MediaError.defaultMessages[this.code] || '';\\n  }\\n}\\n/**\\n * The error code that refers two one of the defined `MediaError` types\\n *\\n * @type {Number}\\n */\\n\\n\\nMediaError.prototype.code = 0;\\n/**\\n * An optional message that to show with the error. Message is not part of the HTML5\\n * video spec but allows for more informative custom errors.\\n *\\n * @type {String}\\n */\\n\\nMediaError.prototype.message = '';\\n/**\\n * An optional status code that can be set by plugins to allow even more detail about\\n * the error. For example a plugin might provide a specific HTTP status code and an\\n * error message for that code. Then when the plugin gets that error this class will\\n * know how to display an error message for it. This allows a custom message to show\\n * up on the `Player` error overlay.\\n *\\n * @type {Array}\\n */\\n\\nMediaError.prototype.status = null;\\n/**\\n * Errors indexed by the W3C standard. The order **CANNOT CHANGE**! See the\\n * specification listed under {@link MediaError} for more information.\\n *\\n * @enum {array}\\n * @readonly\\n * @property {string} 0 - MEDIA_ERR_CUSTOM\\n * @property {string} 1 - MEDIA_ERR_ABORTED\\n * @property {string} 2 - MEDIA_ERR_NETWORK\\n * @property {string} 3 - MEDIA_ERR_DECODE\\n * @property {string} 4 - MEDIA_ERR_SRC_NOT_SUPPORTED\\n * @property {string} 5 - MEDIA_ERR_ENCRYPTED\\n */\\n\\nMediaError.errorTypes = ['MEDIA_ERR_CUSTOM', 'MEDIA_ERR_ABORTED', 'MEDIA_ERR_NETWORK', 'MEDIA_ERR_DECODE', 'MEDIA_ERR_SRC_NOT_SUPPORTED', 'MEDIA_ERR_ENCRYPTED'];\\n/**\\n * The default `MediaError` messages based on the {@link MediaError.errorTypes}.\\n *\\n * @type {Array}\\n * @constant\\n */\\n\\nMediaError.defaultMessages = {\\n  1: 'You aborted the media playback',\\n  2: 'A network error caused the media download to fail part-way.',\\n  3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\\n  4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\\n  5: 'The media is encrypted and we do not have the keys to decrypt it.'\\n}; // Add types as properties on MediaError\\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\\n\\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\\n  MediaError[MediaError.errorTypes[errNum]] = errNum; // values should be accessible on both the class and instance\\n\\n  MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\\n} // jsdocs for instance/static members added above\\n\\n/**\\n * Returns whether an object is `Promise`-like (i.e. has a `then` method).\\n *\\n * @param  {Object}  value\\n *         An object that may or may not be `Promise`-like.\\n *\\n * @return {boolean}\\n *         Whether or not the object is `Promise`-like.\\n */\\nfunction isPromise(value) {\\n  return value !== undefined && value !== null && typeof value.then === 'function';\\n}\\n/**\\n * Silence a Promise-like object.\\n *\\n * This is useful for avoiding non-harmful, but potentially confusing \\\"uncaught\\n * play promise\\\" rejection error messages.\\n *\\n * @param  {Object} value\\n *         An object that may or may not be `Promise`-like.\\n */\\n\\nfunction silencePromise(value) {\\n  if (isPromise(value)) {\\n    value.then(null, function (e) {});\\n  }\\n}\\n\\n/**\\n * @file text-track-list-converter.js Utilities for capturing text track state and\\n * re-creating tracks based on a capture.\\n *\\n * @module text-track-list-converter\\n */\\n\\n/**\\n * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that\\n * represents the {@link TextTrack}'s state.\\n *\\n * @param {TextTrack} track\\n *        The text track to query.\\n *\\n * @return {Object}\\n *         A serializable javascript representation of the TextTrack.\\n * @private\\n */\\nvar trackToJson_ = function trackToJson_(track) {\\n  var ret = ['kind', 'label', 'language', 'id', 'inBandMetadataTrackDispatchType', 'mode', 'src'].reduce(function (acc, prop, i) {\\n    if (track[prop]) {\\n      acc[prop] = track[prop];\\n    }\\n\\n    return acc;\\n  }, {\\n    cues: track.cues && Array.prototype.map.call(track.cues, function (cue) {\\n      return {\\n        startTime: cue.startTime,\\n        endTime: cue.endTime,\\n        text: cue.text,\\n        id: cue.id\\n      };\\n    })\\n  });\\n  return ret;\\n};\\n/**\\n * Examine a {@link Tech} and return a JSON-compatible javascript array that represents the\\n * state of all {@link TextTrack}s currently configured. The return array is compatible with\\n * {@link text-track-list-converter:jsonToTextTracks}.\\n *\\n * @param {Tech} tech\\n *        The tech object to query\\n *\\n * @return {Array}\\n *         A serializable javascript representation of the {@link Tech}s\\n *         {@link TextTrackList}.\\n */\\n\\n\\nvar textTracksToJson = function textTracksToJson(tech) {\\n  var trackEls = tech.$$('track');\\n  var trackObjs = Array.prototype.map.call(trackEls, function (t) {\\n    return t.track;\\n  });\\n  var tracks = Array.prototype.map.call(trackEls, function (trackEl) {\\n    var json = trackToJson_(trackEl.track);\\n\\n    if (trackEl.src) {\\n      json.src = trackEl.src;\\n    }\\n\\n    return json;\\n  });\\n  return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function (track) {\\n    return trackObjs.indexOf(track) === -1;\\n  }).map(trackToJson_));\\n};\\n/**\\n * Create a set of remote {@link TextTrack}s on a {@link Tech} based on an array of javascript\\n * object {@link TextTrack} representations.\\n *\\n * @param {Array} json\\n *        An array of `TextTrack` representation objects, like those that would be\\n *        produced by `textTracksToJson`.\\n *\\n * @param {Tech} tech\\n *        The `Tech` to create the `TextTrack`s on.\\n */\\n\\n\\nvar jsonToTextTracks = function jsonToTextTracks(json, tech) {\\n  json.forEach(function (track) {\\n    var addedTrack = tech.addRemoteTextTrack(track).track;\\n\\n    if (!track.src && track.cues) {\\n      track.cues.forEach(function (cue) {\\n        return addedTrack.addCue(cue);\\n      });\\n    }\\n  });\\n  return tech.textTracks();\\n};\\n\\nvar textTrackConverter = {\\n  textTracksToJson: textTracksToJson,\\n  jsonToTextTracks: jsonToTextTracks,\\n  trackToJson_: trackToJson_\\n};\\n\\nvar MODAL_CLASS_NAME = 'vjs-modal-dialog';\\n/**\\n * The `ModalDialog` displays over the video and its controls, which blocks\\n * interaction with the player until it is closed.\\n *\\n * Modal dialogs include a \\\"Close\\\" button and will close when that button\\n * is activated - or when ESC is pressed anywhere.\\n *\\n * @extends Component\\n */\\n\\nvar ModalDialog = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ModalDialog, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Mixed} [options.content=undefined]\\n   *        Provide customized content for this modal.\\n   *\\n   * @param {string} [options.description]\\n   *        A text description for the modal, primarily for accessibility.\\n   *\\n   * @param {boolean} [options.fillAlways=false]\\n   *        Normally, modals are automatically filled only the first time\\n   *        they open. This tells the modal to refresh its content\\n   *        every time it opens.\\n   *\\n   * @param {string} [options.label]\\n   *        A text label for the modal, primarily for accessibility.\\n   *\\n   * @param {boolean} [options.pauseOnOpen=true]\\n   *        If `true`, playback will will be paused if playing when\\n   *        the modal opens, and resumed when it closes.\\n   *\\n   * @param {boolean} [options.temporary=true]\\n   *        If `true`, the modal can only be opened once; it will be\\n   *        disposed as soon as it's closed.\\n   *\\n   * @param {boolean} [options.uncloseable=false]\\n   *        If `true`, the user will not be able to close the modal\\n   *        through the UI in the normal ways. Programmatic closing is\\n   *        still possible.\\n   */\\n  function ModalDialog(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.opened_ = _this.hasBeenOpened_ = _this.hasBeenFilled_ = false;\\n\\n    _this.closeable(!_this.options_.uncloseable);\\n\\n    _this.content(_this.options_.content); // Make sure the contentEl is defined AFTER any children are initialized\\n    // because we only want the contents of the modal in the contentEl\\n    // (not the UI elements like the close button).\\n\\n\\n    _this.contentEl_ = createEl('div', {\\n      className: MODAL_CLASS_NAME + \\\"-content\\\"\\n    }, {\\n      role: 'document'\\n    });\\n    _this.descEl_ = createEl('p', {\\n      className: MODAL_CLASS_NAME + \\\"-description vjs-control-text\\\",\\n      id: _this.el().getAttribute('aria-describedby')\\n    });\\n    textContent(_this.descEl_, _this.description());\\n\\n    _this.el_.appendChild(_this.descEl_);\\n\\n    _this.el_.appendChild(_this.contentEl_);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `ModalDialog`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The DOM element that gets created.\\n   */\\n\\n\\n  var _proto = ModalDialog.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: this.buildCSSClass(),\\n      tabIndex: -1\\n    }, {\\n      'aria-describedby': this.id() + \\\"_description\\\",\\n      'aria-hidden': 'true',\\n      'aria-label': this.label(),\\n      'role': 'dialog'\\n    });\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n    this.descEl_ = null;\\n    this.previouslyActiveEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return MODAL_CLASS_NAME + \\\" vjs-hidden \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Returns the label string for this modal. Primarily used for accessibility.\\n   *\\n   * @return {string}\\n   *         the localized or raw label of this modal.\\n   */\\n  ;\\n\\n  _proto.label = function label() {\\n    return this.localize(this.options_.label || 'Modal Window');\\n  }\\n  /**\\n   * Returns the description string for this modal. Primarily used for\\n   * accessibility.\\n   *\\n   * @return {string}\\n   *         The localized or raw description of this modal.\\n   */\\n  ;\\n\\n  _proto.description = function description() {\\n    var desc = this.options_.description || this.localize('This is a modal window.'); // Append a universal closeability message if the modal is closeable.\\n\\n    if (this.closeable()) {\\n      desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\\n    }\\n\\n    return desc;\\n  }\\n  /**\\n   * Opens the modal.\\n   *\\n   * @fires ModalDialog#beforemodalopen\\n   * @fires ModalDialog#modalopen\\n   */\\n  ;\\n\\n  _proto.open = function open() {\\n    if (!this.opened_) {\\n      var player = this.player();\\n      /**\\n        * Fired just before a `ModalDialog` is opened.\\n        *\\n        * @event ModalDialog#beforemodalopen\\n        * @type {EventTarget~Event}\\n        */\\n\\n      this.trigger('beforemodalopen');\\n      this.opened_ = true; // Fill content if the modal has never opened before and\\n      // never been filled.\\n\\n      if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\\n        this.fill();\\n      } // If the player was playing, pause it and take note of its previously\\n      // playing state.\\n\\n\\n      this.wasPlaying_ = !player.paused();\\n\\n      if (this.options_.pauseOnOpen && this.wasPlaying_) {\\n        player.pause();\\n      }\\n\\n      this.on('keydown', this.handleKeyDown); // Hide controls and note if they were enabled.\\n\\n      this.hadControls_ = player.controls();\\n      player.controls(false);\\n      this.show();\\n      this.conditionalFocus_();\\n      this.el().setAttribute('aria-hidden', 'false');\\n      /**\\n        * Fired just after a `ModalDialog` is opened.\\n        *\\n        * @event ModalDialog#modalopen\\n        * @type {EventTarget~Event}\\n        */\\n\\n      this.trigger('modalopen');\\n      this.hasBeenOpened_ = true;\\n    }\\n  }\\n  /**\\n   * If the `ModalDialog` is currently open or closed.\\n   *\\n   * @param  {boolean} [value]\\n   *         If given, it will open (`true`) or close (`false`) the modal.\\n   *\\n   * @return {boolean}\\n   *         the current open state of the modaldialog\\n   */\\n  ;\\n\\n  _proto.opened = function opened(value) {\\n    if (typeof value === 'boolean') {\\n      this[value ? 'open' : 'close']();\\n    }\\n\\n    return this.opened_;\\n  }\\n  /**\\n   * Closes the modal, does nothing if the `ModalDialog` is\\n   * not open.\\n   *\\n   * @fires ModalDialog#beforemodalclose\\n   * @fires ModalDialog#modalclose\\n   */\\n  ;\\n\\n  _proto.close = function close() {\\n    if (!this.opened_) {\\n      return;\\n    }\\n\\n    var player = this.player();\\n    /**\\n      * Fired just before a `ModalDialog` is closed.\\n      *\\n      * @event ModalDialog#beforemodalclose\\n      * @type {EventTarget~Event}\\n      */\\n\\n    this.trigger('beforemodalclose');\\n    this.opened_ = false;\\n\\n    if (this.wasPlaying_ && this.options_.pauseOnOpen) {\\n      player.play();\\n    }\\n\\n    this.off('keydown', this.handleKeyDown);\\n\\n    if (this.hadControls_) {\\n      player.controls(true);\\n    }\\n\\n    this.hide();\\n    this.el().setAttribute('aria-hidden', 'true');\\n    /**\\n      * Fired just after a `ModalDialog` is closed.\\n      *\\n      * @event ModalDialog#modalclose\\n      * @type {EventTarget~Event}\\n      */\\n\\n    this.trigger('modalclose');\\n    this.conditionalBlur_();\\n\\n    if (this.options_.temporary) {\\n      this.dispose();\\n    }\\n  }\\n  /**\\n   * Check to see if the `ModalDialog` is closeable via the UI.\\n   *\\n   * @param  {boolean} [value]\\n   *         If given as a boolean, it will set the `closeable` option.\\n   *\\n   * @return {boolean}\\n   *         Returns the final value of the closable option.\\n   */\\n  ;\\n\\n  _proto.closeable = function closeable(value) {\\n    if (typeof value === 'boolean') {\\n      var closeable = this.closeable_ = !!value;\\n      var close = this.getChild('closeButton'); // If this is being made closeable and has no close button, add one.\\n\\n      if (closeable && !close) {\\n        // The close button should be a child of the modal - not its\\n        // content element, so temporarily change the content element.\\n        var temp = this.contentEl_;\\n        this.contentEl_ = this.el_;\\n        close = this.addChild('closeButton', {\\n          controlText: 'Close Modal Dialog'\\n        });\\n        this.contentEl_ = temp;\\n        this.on(close, 'close', this.close);\\n      } // If this is being made uncloseable and has a close button, remove it.\\n\\n\\n      if (!closeable && close) {\\n        this.off(close, 'close', this.close);\\n        this.removeChild(close);\\n        close.dispose();\\n      }\\n    }\\n\\n    return this.closeable_;\\n  }\\n  /**\\n   * Fill the modal's content element with the modal's \\\"content\\\" option.\\n   * The content element will be emptied before this change takes place.\\n   */\\n  ;\\n\\n  _proto.fill = function fill() {\\n    this.fillWith(this.content());\\n  }\\n  /**\\n   * Fill the modal's content element with arbitrary content.\\n   * The content element will be emptied before this change takes place.\\n   *\\n   * @fires ModalDialog#beforemodalfill\\n   * @fires ModalDialog#modalfill\\n   *\\n   * @param {Mixed} [content]\\n   *        The same rules apply to this as apply to the `content` option.\\n   */\\n  ;\\n\\n  _proto.fillWith = function fillWith(content) {\\n    var contentEl = this.contentEl();\\n    var parentEl = contentEl.parentNode;\\n    var nextSiblingEl = contentEl.nextSibling;\\n    /**\\n      * Fired just before a `ModalDialog` is filled with content.\\n      *\\n      * @event ModalDialog#beforemodalfill\\n      * @type {EventTarget~Event}\\n      */\\n\\n    this.trigger('beforemodalfill');\\n    this.hasBeenFilled_ = true; // Detach the content element from the DOM before performing\\n    // manipulation to avoid modifying the live DOM multiple times.\\n\\n    parentEl.removeChild(contentEl);\\n    this.empty();\\n    insertContent(contentEl, content);\\n    /**\\n     * Fired just after a `ModalDialog` is filled with content.\\n     *\\n     * @event ModalDialog#modalfill\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('modalfill'); // Re-inject the re-filled content element.\\n\\n    if (nextSiblingEl) {\\n      parentEl.insertBefore(contentEl, nextSiblingEl);\\n    } else {\\n      parentEl.appendChild(contentEl);\\n    } // make sure that the close button is last in the dialog DOM\\n\\n\\n    var closeButton = this.getChild('closeButton');\\n\\n    if (closeButton) {\\n      parentEl.appendChild(closeButton.el_);\\n    }\\n  }\\n  /**\\n   * Empties the content element. This happens anytime the modal is filled.\\n   *\\n   * @fires ModalDialog#beforemodalempty\\n   * @fires ModalDialog#modalempty\\n   */\\n  ;\\n\\n  _proto.empty = function empty() {\\n    /**\\n    * Fired just before a `ModalDialog` is emptied.\\n    *\\n    * @event ModalDialog#beforemodalempty\\n    * @type {EventTarget~Event}\\n    */\\n    this.trigger('beforemodalempty');\\n    emptyEl(this.contentEl());\\n    /**\\n    * Fired just after a `ModalDialog` is emptied.\\n    *\\n    * @event ModalDialog#modalempty\\n    * @type {EventTarget~Event}\\n    */\\n\\n    this.trigger('modalempty');\\n  }\\n  /**\\n   * Gets or sets the modal content, which gets normalized before being\\n   * rendered into the DOM.\\n   *\\n   * This does not update the DOM or fill the modal, but it is called during\\n   * that process.\\n   *\\n   * @param  {Mixed} [value]\\n   *         If defined, sets the internal content value to be used on the\\n   *         next call(s) to `fill`. This value is normalized before being\\n   *         inserted. To \\\"clear\\\" the internal content value, pass `null`.\\n   *\\n   * @return {Mixed}\\n   *         The current content of the modal dialog\\n   */\\n  ;\\n\\n  _proto.content = function content(value) {\\n    if (typeof value !== 'undefined') {\\n      this.content_ = value;\\n    }\\n\\n    return this.content_;\\n  }\\n  /**\\n   * conditionally focus the modal dialog if focus was previously on the player.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.conditionalFocus_ = function conditionalFocus_() {\\n    var activeEl = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement;\\n    var playerEl = this.player_.el_;\\n    this.previouslyActiveEl_ = null;\\n\\n    if (playerEl.contains(activeEl) || playerEl === activeEl) {\\n      this.previouslyActiveEl_ = activeEl;\\n      this.focus();\\n    }\\n  }\\n  /**\\n   * conditionally blur the element and refocus the last focused element\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.conditionalBlur_ = function conditionalBlur_() {\\n    if (this.previouslyActiveEl_) {\\n      this.previouslyActiveEl_.focus();\\n      this.previouslyActiveEl_ = null;\\n    }\\n  }\\n  /**\\n   * Keydown handler. Attached when modal is focused.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Do not allow keydowns to reach out of the modal dialog.\\n    event.stopPropagation();\\n\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Escape') && this.closeable()) {\\n      event.preventDefault();\\n      this.close();\\n      return;\\n    } // exit early if it isn't a tab key\\n\\n\\n    if (!keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      return;\\n    }\\n\\n    var focusableEls = this.focusableEls_();\\n    var activeEl = this.el_.querySelector(':focus');\\n    var focusIndex;\\n\\n    for (var i = 0; i < focusableEls.length; i++) {\\n      if (activeEl === focusableEls[i]) {\\n        focusIndex = i;\\n        break;\\n      }\\n    }\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement === this.el_) {\\n      focusIndex = 0;\\n    }\\n\\n    if (event.shiftKey && focusIndex === 0) {\\n      focusableEls[focusableEls.length - 1].focus();\\n      event.preventDefault();\\n    } else if (!event.shiftKey && focusIndex === focusableEls.length - 1) {\\n      focusableEls[0].focus();\\n      event.preventDefault();\\n    }\\n  }\\n  /**\\n   * get all focusable elements\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.focusableEls_ = function focusableEls_() {\\n    var allChildren = this.el_.querySelectorAll('*');\\n    return Array.prototype.filter.call(allChildren, function (child) {\\n      return (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLAnchorElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLAreaElement) && child.hasAttribute('href') || (child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLInputElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLSelectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLTextAreaElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLButtonElement) && !child.hasAttribute('disabled') || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLIFrameElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLObjectElement || child instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLEmbedElement || child.hasAttribute('tabindex') && child.getAttribute('tabindex') !== -1 || child.hasAttribute('contenteditable');\\n    });\\n  };\\n\\n  return ModalDialog;\\n}(Component);\\n/**\\n * Default options for `ModalDialog` default options.\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nModalDialog.prototype.options_ = {\\n  pauseOnOpen: true,\\n  temporary: true\\n};\\nComponent.registerComponent('ModalDialog', ModalDialog);\\n\\n/**\\n * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and\\n * {@link VideoTrackList}\\n *\\n * @extends EventTarget\\n */\\n\\nvar TrackList = /*#__PURE__*/function (_EventTarget) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TrackList, _EventTarget);\\n\\n  /**\\n   * Create an instance of this class\\n   *\\n   * @param {Track[]} tracks\\n   *        A list of tracks to initialize the list with.\\n   *\\n   * @abstract\\n   */\\n  function TrackList(tracks) {\\n    var _this;\\n\\n    if (tracks === void 0) {\\n      tracks = [];\\n    }\\n\\n    _this = _EventTarget.call(this) || this;\\n    _this.tracks_ = [];\\n    /**\\n     * @memberof TrackList\\n     * @member {number} length\\n     *         The current number of `Track`s in the this Trackist.\\n     * @instance\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'length', {\\n      get: function get() {\\n        return this.tracks_.length;\\n      }\\n    });\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      _this.addTrack(tracks[i]);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Add a {@link Track} to the `TrackList`\\n   *\\n   * @param {Track} track\\n   *        The audio, video, or text track to add to the list.\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n\\n\\n  var _proto = TrackList.prototype;\\n\\n  _proto.addTrack = function addTrack(track) {\\n    var index = this.tracks_.length;\\n\\n    if (!('' + index in this)) {\\n      Object.defineProperty(this, index, {\\n        get: function get() {\\n          return this.tracks_[index];\\n        }\\n      });\\n    } // Do not add duplicate tracks\\n\\n\\n    if (this.tracks_.indexOf(track) === -1) {\\n      this.tracks_.push(track);\\n      /**\\n       * Triggered when a track is added to a track list.\\n       *\\n       * @event TrackList#addtrack\\n       * @type {EventTarget~Event}\\n       * @property {Track} track\\n       *           A reference to track that was added.\\n       */\\n\\n      this.trigger({\\n        track: track,\\n        type: 'addtrack',\\n        target: this\\n      });\\n    }\\n  }\\n  /**\\n   * Remove a {@link Track} from the `TrackList`\\n   *\\n   * @param {Track} rtrack\\n   *        The audio, video, or text track to remove from the list.\\n   *\\n   * @fires TrackList#removetrack\\n   */\\n  ;\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    var track;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      if (this[i] === rtrack) {\\n        track = this[i];\\n\\n        if (track.off) {\\n          track.off();\\n        }\\n\\n        this.tracks_.splice(i, 1);\\n        break;\\n      }\\n    }\\n\\n    if (!track) {\\n      return;\\n    }\\n    /**\\n     * Triggered when a track is removed from track list.\\n     *\\n     * @event TrackList#removetrack\\n     * @type {EventTarget~Event}\\n     * @property {Track} track\\n     *           A reference to track that was removed.\\n     */\\n\\n\\n    this.trigger({\\n      track: track,\\n      type: 'removetrack',\\n      target: this\\n    });\\n  }\\n  /**\\n   * Get a Track from the TrackList by a tracks id\\n   *\\n   * @param {string} id - the id of the track to get\\n   * @method getTrackById\\n   * @return {Track}\\n   * @private\\n   */\\n  ;\\n\\n  _proto.getTrackById = function getTrackById(id) {\\n    var result = null;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      var track = this[i];\\n\\n      if (track.id === id) {\\n        result = track;\\n        break;\\n      }\\n    }\\n\\n    return result;\\n  };\\n\\n  return TrackList;\\n}(EventTarget);\\n/**\\n * Triggered when a different track is selected/enabled.\\n *\\n * @event TrackList#change\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Events that can be called with on + eventName. See {@link EventHandler}.\\n *\\n * @property {Object} TrackList#allowedEvents_\\n * @private\\n */\\n\\n\\nTrackList.prototype.allowedEvents_ = {\\n  change: 'change',\\n  addtrack: 'addtrack',\\n  removetrack: 'removetrack'\\n}; // emulate attribute EventHandler support to allow for feature detection\\n\\nfor (var event in TrackList.prototype.allowedEvents_) {\\n  TrackList.prototype['on' + event] = null;\\n}\\n\\n/**\\n * Anywhere we call this function we diverge from the spec\\n * as we only support one enabled audiotrack at a time\\n *\\n * @param {AudioTrackList} list\\n *        list to work on\\n *\\n * @param {AudioTrack} track\\n *        The track to skip\\n *\\n * @private\\n */\\n\\nvar disableOthers = function disableOthers(list, track) {\\n  for (var i = 0; i < list.length; i++) {\\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\\n      continue;\\n    } // another audio track is enabled, disable it\\n\\n\\n    list[i].enabled = false;\\n  }\\n};\\n/**\\n * The current list of {@link AudioTrack} for a media file.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist}\\n * @extends TrackList\\n */\\n\\n\\nvar AudioTrackList = /*#__PURE__*/function (_TrackList) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrackList, _TrackList);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {AudioTrack[]} [tracks=[]]\\n   *        A list of `AudioTrack` to instantiate the list with.\\n   */\\n  function AudioTrackList(tracks) {\\n    var _this;\\n\\n    if (tracks === void 0) {\\n      tracks = [];\\n    }\\n\\n    // make sure only 1 track is enabled\\n    // sorted from last index to first index\\n    for (var i = tracks.length - 1; i >= 0; i--) {\\n      if (tracks[i].enabled) {\\n        disableOthers(tracks, tracks[i]);\\n        break;\\n      }\\n    }\\n\\n    _this = _TrackList.call(this, tracks) || this;\\n    _this.changing_ = false;\\n    return _this;\\n  }\\n  /**\\n   * Add an {@link AudioTrack} to the `AudioTrackList`.\\n   *\\n   * @param {AudioTrack} track\\n   *        The AudioTrack to add to the list\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n\\n\\n  var _proto = AudioTrackList.prototype;\\n\\n  _proto.addTrack = function addTrack(track) {\\n    var _this2 = this;\\n\\n    if (track.enabled) {\\n      disableOthers(this, track);\\n    }\\n\\n    _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\\n\\n\\n    if (!track.addEventListener) {\\n      return;\\n    }\\n\\n    track.enabledChange_ = function () {\\n      // when we are disabling other tracks (since we don't support\\n      // more than one track at a time) we will set changing_\\n      // to true so that we don't trigger additional change events\\n      if (_this2.changing_) {\\n        return;\\n      }\\n\\n      _this2.changing_ = true;\\n      disableOthers(_this2, track);\\n      _this2.changing_ = false;\\n\\n      _this2.trigger('change');\\n    };\\n    /**\\n     * @listens AudioTrack#enabledchange\\n     * @fires TrackList#change\\n     */\\n\\n\\n    track.addEventListener('enabledchange', track.enabledChange_);\\n  };\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    _TrackList.prototype.removeTrack.call(this, rtrack);\\n\\n    if (rtrack.removeEventListener && rtrack.enabledChange_) {\\n      rtrack.removeEventListener('enabledchange', rtrack.enabledChange_);\\n      rtrack.enabledChange_ = null;\\n    }\\n  };\\n\\n  return AudioTrackList;\\n}(TrackList);\\n\\n/**\\n * Un-select all other {@link VideoTrack}s that are selected.\\n *\\n * @param {VideoTrackList} list\\n *        list to work on\\n *\\n * @param {VideoTrack} track\\n *        The track to skip\\n *\\n * @private\\n */\\n\\nvar disableOthers$1 = function disableOthers(list, track) {\\n  for (var i = 0; i < list.length; i++) {\\n    if (!Object.keys(list[i]).length || track.id === list[i].id) {\\n      continue;\\n    } // another video track is enabled, disable it\\n\\n\\n    list[i].selected = false;\\n  }\\n};\\n/**\\n * The current list of {@link VideoTrack} for a video.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist}\\n * @extends TrackList\\n */\\n\\n\\nvar VideoTrackList = /*#__PURE__*/function (_TrackList) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VideoTrackList, _TrackList);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {VideoTrack[]} [tracks=[]]\\n   *        A list of `VideoTrack` to instantiate the list with.\\n   */\\n  function VideoTrackList(tracks) {\\n    var _this;\\n\\n    if (tracks === void 0) {\\n      tracks = [];\\n    }\\n\\n    // make sure only 1 track is enabled\\n    // sorted from last index to first index\\n    for (var i = tracks.length - 1; i >= 0; i--) {\\n      if (tracks[i].selected) {\\n        disableOthers$1(tracks, tracks[i]);\\n        break;\\n      }\\n    }\\n\\n    _this = _TrackList.call(this, tracks) || this;\\n    _this.changing_ = false;\\n    /**\\n     * @member {number} VideoTrackList#selectedIndex\\n     *         The current index of the selected {@link VideoTrack`}.\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'selectedIndex', {\\n      get: function get() {\\n        for (var _i = 0; _i < this.length; _i++) {\\n          if (this[_i].selected) {\\n            return _i;\\n          }\\n        }\\n\\n        return -1;\\n      },\\n      set: function set() {}\\n    });\\n    return _this;\\n  }\\n  /**\\n   * Add a {@link VideoTrack} to the `VideoTrackList`.\\n   *\\n   * @param {VideoTrack} track\\n   *        The VideoTrack to add to the list\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n\\n\\n  var _proto = VideoTrackList.prototype;\\n\\n  _proto.addTrack = function addTrack(track) {\\n    var _this2 = this;\\n\\n    if (track.selected) {\\n      disableOthers$1(this, track);\\n    }\\n\\n    _TrackList.prototype.addTrack.call(this, track); // native tracks don't have this\\n\\n\\n    if (!track.addEventListener) {\\n      return;\\n    }\\n\\n    track.selectedChange_ = function () {\\n      if (_this2.changing_) {\\n        return;\\n      }\\n\\n      _this2.changing_ = true;\\n      disableOthers$1(_this2, track);\\n      _this2.changing_ = false;\\n\\n      _this2.trigger('change');\\n    };\\n    /**\\n     * @listens VideoTrack#selectedchange\\n     * @fires TrackList#change\\n     */\\n\\n\\n    track.addEventListener('selectedchange', track.selectedChange_);\\n  };\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    _TrackList.prototype.removeTrack.call(this, rtrack);\\n\\n    if (rtrack.removeEventListener && rtrack.selectedChange_) {\\n      rtrack.removeEventListener('selectedchange', rtrack.selectedChange_);\\n      rtrack.selectedChange_ = null;\\n    }\\n  };\\n\\n  return VideoTrackList;\\n}(TrackList);\\n\\n/**\\n * The current list of {@link TextTrack} for a media file.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist}\\n * @extends TrackList\\n */\\n\\nvar TextTrackList = /*#__PURE__*/function (_TrackList) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackList, _TrackList);\\n\\n  function TextTrackList() {\\n    return _TrackList.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = TextTrackList.prototype;\\n\\n  /**\\n   * Add a {@link TextTrack} to the `TextTrackList`\\n   *\\n   * @param {TextTrack} track\\n   *        The text track to add to the list.\\n   *\\n   * @fires TrackList#addtrack\\n   */\\n  _proto.addTrack = function addTrack(track) {\\n    var _this = this;\\n\\n    _TrackList.prototype.addTrack.call(this, track);\\n\\n    if (!this.queueChange_) {\\n      this.queueChange_ = function () {\\n        return _this.queueTrigger('change');\\n      };\\n    }\\n\\n    if (!this.triggerSelectedlanguagechange) {\\n      this.triggerSelectedlanguagechange_ = function () {\\n        return _this.trigger('selectedlanguagechange');\\n      };\\n    }\\n    /**\\n     * @listens TextTrack#modechange\\n     * @fires TrackList#change\\n     */\\n\\n\\n    track.addEventListener('modechange', this.queueChange_);\\n    var nonLanguageTextTrackKind = ['metadata', 'chapters'];\\n\\n    if (nonLanguageTextTrackKind.indexOf(track.kind) === -1) {\\n      track.addEventListener('modechange', this.triggerSelectedlanguagechange_);\\n    }\\n  };\\n\\n  _proto.removeTrack = function removeTrack(rtrack) {\\n    _TrackList.prototype.removeTrack.call(this, rtrack); // manually remove the event handlers we added\\n\\n\\n    if (rtrack.removeEventListener) {\\n      if (this.queueChange_) {\\n        rtrack.removeEventListener('modechange', this.queueChange_);\\n      }\\n\\n      if (this.selectedlanguagechange_) {\\n        rtrack.removeEventListener('modechange', this.triggerSelectedlanguagechange_);\\n      }\\n    }\\n  };\\n\\n  return TextTrackList;\\n}(TrackList);\\n\\n/**\\n * @file html-track-element-list.js\\n */\\n\\n/**\\n * The current list of {@link HtmlTrackElement}s.\\n */\\nvar HtmlTrackElementList = /*#__PURE__*/function () {\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {HtmlTrackElement[]} [tracks=[]]\\n   *        A list of `HtmlTrackElement` to instantiate the list with.\\n   */\\n  function HtmlTrackElementList(trackElements) {\\n    if (trackElements === void 0) {\\n      trackElements = [];\\n    }\\n\\n    this.trackElements_ = [];\\n    /**\\n     * @memberof HtmlTrackElementList\\n     * @member {number} length\\n     *         The current number of `Track`s in the this Trackist.\\n     * @instance\\n     */\\n\\n    Object.defineProperty(this, 'length', {\\n      get: function get() {\\n        return this.trackElements_.length;\\n      }\\n    });\\n\\n    for (var i = 0, length = trackElements.length; i < length; i++) {\\n      this.addTrackElement_(trackElements[i]);\\n    }\\n  }\\n  /**\\n   * Add an {@link HtmlTrackElement} to the `HtmlTrackElementList`\\n   *\\n   * @param {HtmlTrackElement} trackElement\\n   *        The track element to add to the list.\\n   *\\n   * @private\\n   */\\n\\n\\n  var _proto = HtmlTrackElementList.prototype;\\n\\n  _proto.addTrackElement_ = function addTrackElement_(trackElement) {\\n    var index = this.trackElements_.length;\\n\\n    if (!('' + index in this)) {\\n      Object.defineProperty(this, index, {\\n        get: function get() {\\n          return this.trackElements_[index];\\n        }\\n      });\\n    } // Do not add duplicate elements\\n\\n\\n    if (this.trackElements_.indexOf(trackElement) === -1) {\\n      this.trackElements_.push(trackElement);\\n    }\\n  }\\n  /**\\n   * Get an {@link HtmlTrackElement} from the `HtmlTrackElementList` given an\\n   * {@link TextTrack}.\\n   *\\n   * @param {TextTrack} track\\n   *        The track associated with a track element.\\n   *\\n   * @return {HtmlTrackElement|undefined}\\n   *         The track element that was found or undefined.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.getTrackElementByTrack_ = function getTrackElementByTrack_(track) {\\n    var trackElement_;\\n\\n    for (var i = 0, length = this.trackElements_.length; i < length; i++) {\\n      if (track === this.trackElements_[i].track) {\\n        trackElement_ = this.trackElements_[i];\\n        break;\\n      }\\n    }\\n\\n    return trackElement_;\\n  }\\n  /**\\n   * Remove a {@link HtmlTrackElement} from the `HtmlTrackElementList`\\n   *\\n   * @param {HtmlTrackElement} trackElement\\n   *        The track element to remove from the list.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.removeTrackElement_ = function removeTrackElement_(trackElement) {\\n    for (var i = 0, length = this.trackElements_.length; i < length; i++) {\\n      if (trackElement === this.trackElements_[i]) {\\n        if (this.trackElements_[i].track && typeof this.trackElements_[i].track.off === 'function') {\\n          this.trackElements_[i].track.off();\\n        }\\n\\n        if (typeof this.trackElements_[i].off === 'function') {\\n          this.trackElements_[i].off();\\n        }\\n\\n        this.trackElements_.splice(i, 1);\\n        break;\\n      }\\n    }\\n  };\\n\\n  return HtmlTrackElementList;\\n}();\\n\\n/**\\n * @file text-track-cue-list.js\\n */\\n\\n/**\\n * @typedef {Object} TextTrackCueList~TextTrackCue\\n *\\n * @property {string} id\\n *           The unique id for this text track cue\\n *\\n * @property {number} startTime\\n *           The start time for this text track cue\\n *\\n * @property {number} endTime\\n *           The end time for this text track cue\\n *\\n * @property {boolean} pauseOnExit\\n *           Pause when the end time is reached if true.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcue}\\n */\\n\\n/**\\n * A List of TextTrackCues.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist}\\n */\\nvar TextTrackCueList = /*#__PURE__*/function () {\\n  /**\\n   * Create an instance of this class..\\n   *\\n   * @param {Array} cues\\n   *        A list of cues to be initialized with\\n   */\\n  function TextTrackCueList(cues) {\\n    TextTrackCueList.prototype.setCues_.call(this, cues);\\n    /**\\n     * @memberof TextTrackCueList\\n     * @member {number} length\\n     *         The current number of `TextTrackCue`s in the TextTrackCueList.\\n     * @instance\\n     */\\n\\n    Object.defineProperty(this, 'length', {\\n      get: function get() {\\n        return this.length_;\\n      }\\n    });\\n  }\\n  /**\\n   * A setter for cues in this list. Creates getters\\n   * an an index for the cues.\\n   *\\n   * @param {Array} cues\\n   *        An array of cues to set\\n   *\\n   * @private\\n   */\\n\\n\\n  var _proto = TextTrackCueList.prototype;\\n\\n  _proto.setCues_ = function setCues_(cues) {\\n    var oldLength = this.length || 0;\\n    var i = 0;\\n    var l = cues.length;\\n    this.cues_ = cues;\\n    this.length_ = cues.length;\\n\\n    var defineProp = function defineProp(index) {\\n      if (!('' + index in this)) {\\n        Object.defineProperty(this, '' + index, {\\n          get: function get() {\\n            return this.cues_[index];\\n          }\\n        });\\n      }\\n    };\\n\\n    if (oldLength < l) {\\n      i = oldLength;\\n\\n      for (; i < l; i++) {\\n        defineProp.call(this, i);\\n      }\\n    }\\n  }\\n  /**\\n   * Get a `TextTrackCue` that is currently in the `TextTrackCueList` by id.\\n   *\\n   * @param {string} id\\n   *        The id of the cue that should be searched for.\\n   *\\n   * @return {TextTrackCueList~TextTrackCue|null}\\n   *         A single cue or null if none was found.\\n   */\\n  ;\\n\\n  _proto.getCueById = function getCueById(id) {\\n    var result = null;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      var cue = this[i];\\n\\n      if (cue.id === id) {\\n        result = cue;\\n        break;\\n      }\\n    }\\n\\n    return result;\\n  };\\n\\n  return TextTrackCueList;\\n}();\\n\\n/**\\n * @file track-kinds.js\\n */\\n\\n/**\\n * All possible `VideoTrackKind`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-videotrack-kind\\n * @typedef VideoTrack~Kind\\n * @enum\\n */\\nvar VideoTrackKind = {\\n  alternative: 'alternative',\\n  captions: 'captions',\\n  main: 'main',\\n  sign: 'sign',\\n  subtitles: 'subtitles',\\n  commentary: 'commentary'\\n};\\n/**\\n * All possible `AudioTrackKind`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-audiotrack-kind\\n * @typedef AudioTrack~Kind\\n * @enum\\n */\\n\\nvar AudioTrackKind = {\\n  'alternative': 'alternative',\\n  'descriptions': 'descriptions',\\n  'main': 'main',\\n  'main-desc': 'main-desc',\\n  'translation': 'translation',\\n  'commentary': 'commentary'\\n};\\n/**\\n * All possible `TextTrackKind`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-texttrack-kind\\n * @typedef TextTrack~Kind\\n * @enum\\n */\\n\\nvar TextTrackKind = {\\n  subtitles: 'subtitles',\\n  captions: 'captions',\\n  descriptions: 'descriptions',\\n  chapters: 'chapters',\\n  metadata: 'metadata'\\n};\\n/**\\n * All possible `TextTrackMode`s\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\\n * @typedef TextTrack~Mode\\n * @enum\\n */\\n\\nvar TextTrackMode = {\\n  disabled: 'disabled',\\n  hidden: 'hidden',\\n  showing: 'showing'\\n};\\n\\n/**\\n * A Track class that contains all of the common functionality for {@link AudioTrack},\\n * {@link VideoTrack}, and {@link TextTrack}.\\n *\\n * > Note: This class should not be used directly\\n *\\n * @see {@link https://html.spec.whatwg.org/multipage/embedded-content.html}\\n * @extends EventTarget\\n * @abstract\\n */\\n\\nvar Track = /*#__PURE__*/function (_EventTarget) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Track, _EventTarget);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} [options={}]\\n   *        Object of option names and values\\n   *\\n   * @param {string} [options.kind='']\\n   *        A valid kind for the track type you are creating.\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this AudioTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @abstract\\n   */\\n  function Track(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _EventTarget.call(this) || this;\\n    var trackProps = {\\n      id: options.id || 'vjs_track_' + newGUID(),\\n      kind: options.kind || '',\\n      label: options.label || '',\\n      language: options.language || ''\\n    };\\n    /**\\n     * @memberof Track\\n     * @member {string} id\\n     *         The id of this track. Cannot be changed after creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    /**\\n     * @memberof Track\\n     * @member {string} kind\\n     *         The kind of track that this is. Cannot be changed after creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    /**\\n     * @memberof Track\\n     * @member {string} label\\n     *         The label of this track. Cannot be changed after creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    /**\\n     * @memberof Track\\n     * @member {string} language\\n     *         The two letter language code for this track. Cannot be changed after\\n     *         creation.\\n     * @instance\\n     *\\n     * @readonly\\n     */\\n\\n    var _loop = function _loop(key) {\\n      Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), key, {\\n        get: function get() {\\n          return trackProps[key];\\n        },\\n        set: function set() {}\\n      });\\n    };\\n\\n    for (var key in trackProps) {\\n      _loop(key);\\n    }\\n\\n    return _this;\\n  }\\n\\n  return Track;\\n}(EventTarget);\\n\\n/**\\n * @file url.js\\n * @module url\\n */\\n/**\\n * @typedef {Object} url:URLObject\\n *\\n * @property {string} protocol\\n *           The protocol of the url that was parsed.\\n *\\n * @property {string} hostname\\n *           The hostname of the url that was parsed.\\n *\\n * @property {string} port\\n *           The port of the url that was parsed.\\n *\\n * @property {string} pathname\\n *           The pathname of the url that was parsed.\\n *\\n * @property {string} search\\n *           The search query of the url that was parsed.\\n *\\n * @property {string} hash\\n *           The hash of the url that was parsed.\\n *\\n * @property {string} host\\n *           The host of the url that was parsed.\\n */\\n\\n/**\\n * Resolve and parse the elements of a URL.\\n *\\n * @function\\n * @param    {String} url\\n *           The url to parse\\n *\\n * @return   {url:URLObject}\\n *           An object of url details\\n */\\n\\nvar parseUrl = function parseUrl(url) {\\n  var props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; // add the url to an anchor and let the browser parse the URL\\n\\n  var a = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('a');\\n  a.href = url; // IE8 (and 9?) Fix\\n  // ie8 doesn't parse the URL correctly until the anchor is actually\\n  // added to the body, and an innerHTML is needed to trigger the parsing\\n\\n  var addToBody = a.host === '' && a.protocol !== 'file:';\\n  var div;\\n\\n  if (addToBody) {\\n    div = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('div');\\n    div.innerHTML = \\\"<a href=\\\\\\\"\\\" + url + \\\"\\\\\\\"></a>\\\";\\n    a = div.firstChild; // prevent the div from affecting layout\\n\\n    div.setAttribute('style', 'display:none; position:absolute;');\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.appendChild(div);\\n  } // Copy the specific URL properties to a new object\\n  // This is also needed for IE8 because the anchor loses its\\n  // properties when it's removed from the dom\\n\\n\\n  var details = {};\\n\\n  for (var i = 0; i < props.length; i++) {\\n    details[props[i]] = a[props[i]];\\n  } // IE9 adds the port to the host property unlike everyone else. If\\n  // a port identifier is added for standard ports, strip it.\\n\\n\\n  if (details.protocol === 'http:') {\\n    details.host = details.host.replace(/:80$/, '');\\n  }\\n\\n  if (details.protocol === 'https:') {\\n    details.host = details.host.replace(/:443$/, '');\\n  }\\n\\n  if (!details.protocol) {\\n    details.protocol = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.protocol;\\n  }\\n\\n  if (addToBody) {\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.removeChild(div);\\n  }\\n\\n  return details;\\n};\\n/**\\n * Get absolute version of relative URL. Used to tell Flash the correct URL.\\n *\\n * @function\\n * @param    {string} url\\n *           URL to make absolute\\n *\\n * @return   {string}\\n *           Absolute URL\\n *\\n * @see      http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\\n */\\n\\nvar getAbsoluteURL = function getAbsoluteURL(url) {\\n  // Check if absolute URL\\n  if (!url.match(/^https?:\\\\/\\\\//)) {\\n    // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\\n    var div = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('div');\\n    div.innerHTML = \\\"<a href=\\\\\\\"\\\" + url + \\\"\\\\\\\">x</a>\\\";\\n    url = div.firstChild.href;\\n  }\\n\\n  return url;\\n};\\n/**\\n * Returns the extension of the passed file name. It will return an empty string\\n * if passed an invalid path.\\n *\\n * @function\\n * @param    {string} path\\n *           The fileName path like '/path/to/file.mp4'\\n *\\n * @return  {string}\\n *           The extension in lower case or an empty string if no\\n *           extension could be found.\\n */\\n\\nvar getFileExtension = function getFileExtension(path) {\\n  if (typeof path === 'string') {\\n    var splitPathRe = /^(\\\\/?)([\\\\s\\\\S]*?)((?:\\\\.{1,2}|[^\\\\/]+?)(\\\\.([^\\\\.\\\\/\\\\?]+)))(?:[\\\\/]*|[\\\\?].*)$/;\\n    var pathParts = splitPathRe.exec(path);\\n\\n    if (pathParts) {\\n      return pathParts.pop().toLowerCase();\\n    }\\n  }\\n\\n  return '';\\n};\\n/**\\n * Returns whether the url passed is a cross domain request or not.\\n *\\n * @function\\n * @param    {string} url\\n *           The url to check.\\n *\\n * @param    {Object} [winLoc]\\n *           the domain to check the url against, defaults to window.location\\n *\\n * @param    {string} [winLoc.protocol]\\n *           The window location protocol defaults to window.location.protocol\\n *\\n * @param    {string} [winLoc.host]\\n *           The window location host defaults to window.location.host\\n *\\n * @return   {boolean}\\n *           Whether it is a cross domain request or not.\\n */\\n\\nvar isCrossOrigin = function isCrossOrigin(url, winLoc) {\\n  if (winLoc === void 0) {\\n    winLoc = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location;\\n  }\\n\\n  var urlInfo = parseUrl(url); // IE8 protocol relative urls will return ':' for protocol\\n\\n  var srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol; // Check if url is for another domain/origin\\n  // IE8 doesn't know location.origin, so we won't rely on it here\\n\\n  var crossOrigin = srcProtocol + urlInfo.host !== winLoc.protocol + winLoc.host;\\n  return crossOrigin;\\n};\\n\\nvar Url = /*#__PURE__*/Object.freeze({\\n  __proto__: null,\\n  parseUrl: parseUrl,\\n  getAbsoluteURL: getAbsoluteURL,\\n  getFileExtension: getFileExtension,\\n  isCrossOrigin: isCrossOrigin\\n});\\n\\n/**\\n * Takes a webvtt file contents and parses it into cues\\n *\\n * @param {string} srcContent\\n *        webVTT file contents\\n *\\n * @param {TextTrack} track\\n *        TextTrack to add cues to. Cues come from the srcContent.\\n *\\n * @private\\n */\\n\\nvar parseCues = function parseCues(srcContent, track) {\\n  var parser = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.StringDecoder());\\n  var errors = [];\\n\\n  parser.oncue = function (cue) {\\n    track.addCue(cue);\\n  };\\n\\n  parser.onparsingerror = function (error) {\\n    errors.push(error);\\n  };\\n\\n  parser.onflush = function () {\\n    track.trigger({\\n      type: 'loadeddata',\\n      target: track\\n    });\\n  };\\n\\n  parser.parse(srcContent);\\n\\n  if (errors.length > 0) {\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupCollapsed) {\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupCollapsed(\\\"Text Track parsing errors for \\\" + track.src);\\n    }\\n\\n    errors.forEach(function (error) {\\n      return log.error(error);\\n    });\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupEnd) {\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.console.groupEnd();\\n    }\\n  }\\n\\n  parser.flush();\\n};\\n/**\\n * Load a `TextTrack` from a specified url.\\n *\\n * @param {string} src\\n *        Url to load track from.\\n *\\n * @param {TextTrack} track\\n *        Track to add cues to. Comes from the content at the end of `url`.\\n *\\n * @private\\n */\\n\\n\\nvar loadTrack = function loadTrack(src, track) {\\n  var opts = {\\n    uri: src\\n  };\\n  var crossOrigin = isCrossOrigin(src);\\n\\n  if (crossOrigin) {\\n    opts.cors = crossOrigin;\\n  }\\n\\n  _videojs_xhr__WEBPACK_IMPORTED_MODULE_9___default()(opts, bind(this, function (err, response, responseBody) {\\n    if (err) {\\n      return log.error(err, response);\\n    }\\n\\n    track.loaded_ = true; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\\n    // NOTE: this is only used for the alt/video.novtt.js build\\n\\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function') {\\n      if (track.tech_) {\\n        // to prevent use before define eslint error, we define loadHandler\\n        // as a let here\\n        track.tech_.any(['vttjsloaded', 'vttjserror'], function (event) {\\n          if (event.type === 'vttjserror') {\\n            log.error(\\\"vttjs failed to load, stopping trying to process \\\" + track.src);\\n            return;\\n          }\\n\\n          return parseCues(responseBody, track);\\n        });\\n      }\\n    } else {\\n      parseCues(responseBody, track);\\n    }\\n  }));\\n};\\n/**\\n * A representation of a single `TextTrack`.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack}\\n * @extends Track\\n */\\n\\n\\nvar TextTrack = /*#__PURE__*/function (_Track) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrack, _Track);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} options={}\\n   *        Object of option names and values\\n   *\\n   * @param {Tech} options.tech\\n   *        A reference to the tech that owns this TextTrack.\\n   *\\n   * @param {TextTrack~Kind} [options.kind='subtitles']\\n   *        A valid text track kind.\\n   *\\n   * @param {TextTrack~Mode} [options.mode='disabled']\\n   *        A valid text track mode.\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this TextTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {string} [options.srclang='']\\n   *        A valid two character language code. An alternative, but deprioritized\\n   *        version of `options.language`\\n   *\\n   * @param {string} [options.src]\\n   *        A url to TextTrack cues.\\n   *\\n   * @param {boolean} [options.default]\\n   *        If this track should default to on or off.\\n   */\\n  function TextTrack(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (!options.tech) {\\n      throw new Error('A tech was not provided.');\\n    }\\n\\n    var settings = mergeOptions(options, {\\n      kind: TextTrackKind[options.kind] || 'subtitles',\\n      language: options.language || options.srclang || ''\\n    });\\n    var mode = TextTrackMode[settings.mode] || 'disabled';\\n    var default_ = settings[\\\"default\\\"];\\n\\n    if (settings.kind === 'metadata' || settings.kind === 'chapters') {\\n      mode = 'hidden';\\n    }\\n\\n    _this = _Track.call(this, settings) || this;\\n    _this.tech_ = settings.tech;\\n    _this.cues_ = [];\\n    _this.activeCues_ = [];\\n    _this.preload_ = _this.tech_.preloadTextTracks !== false;\\n    var cues = new TextTrackCueList(_this.cues_);\\n    var activeCues = new TextTrackCueList(_this.activeCues_);\\n    var changed = false;\\n    var timeupdateHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), function () {\\n      // Accessing this.activeCues for the side-effects of updating itself\\n      // due to its nature as a getter function. Do not remove or cues will\\n      // stop updating!\\n      // Use the setter to prevent deletion from uglify (pure_getters rule)\\n      this.activeCues = this.activeCues;\\n\\n      if (changed) {\\n        this.trigger('cuechange');\\n        changed = false;\\n      }\\n    });\\n\\n    if (mode !== 'disabled') {\\n      _this.tech_.ready(function () {\\n        _this.tech_.on('timeupdate', timeupdateHandler);\\n      }, true);\\n    }\\n\\n    Object.defineProperties(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), {\\n      /**\\n       * @memberof TextTrack\\n       * @member {boolean} default\\n       *         If this track was set to be on or off by default. Cannot be changed after\\n       *         creation.\\n       * @instance\\n       *\\n       * @readonly\\n       */\\n      \\\"default\\\": {\\n        get: function get() {\\n          return default_;\\n        },\\n        set: function set() {}\\n      },\\n\\n      /**\\n       * @memberof TextTrack\\n       * @member {string} mode\\n       *         Set the mode of this TextTrack to a valid {@link TextTrack~Mode}. Will\\n       *         not be set if setting to an invalid mode.\\n       * @instance\\n       *\\n       * @fires TextTrack#modechange\\n       */\\n      mode: {\\n        get: function get() {\\n          return mode;\\n        },\\n        set: function set(newMode) {\\n          var _this2 = this;\\n\\n          if (!TextTrackMode[newMode]) {\\n            return;\\n          }\\n\\n          mode = newMode;\\n\\n          if (!this.preload_ && mode !== 'disabled' && this.cues.length === 0) {\\n            // On-demand load.\\n            loadTrack(this.src, this);\\n          }\\n\\n          if (mode !== 'disabled') {\\n            this.tech_.ready(function () {\\n              _this2.tech_.on('timeupdate', timeupdateHandler);\\n            }, true);\\n          } else {\\n            this.tech_.off('timeupdate', timeupdateHandler);\\n          }\\n          /**\\n           * An event that fires when mode changes on this track. This allows\\n           * the TextTrackList that holds this track to act accordingly.\\n           *\\n           * > Note: This is not part of the spec!\\n           *\\n           * @event TextTrack#modechange\\n           * @type {EventTarget~Event}\\n           */\\n\\n\\n          this.trigger('modechange');\\n        }\\n      },\\n\\n      /**\\n       * @memberof TextTrack\\n       * @member {TextTrackCueList} cues\\n       *         The text track cue list for this TextTrack.\\n       * @instance\\n       */\\n      cues: {\\n        get: function get() {\\n          if (!this.loaded_) {\\n            return null;\\n          }\\n\\n          return cues;\\n        },\\n        set: function set() {}\\n      },\\n\\n      /**\\n       * @memberof TextTrack\\n       * @member {TextTrackCueList} activeCues\\n       *         The list text track cues that are currently active for this TextTrack.\\n       * @instance\\n       */\\n      activeCues: {\\n        get: function get() {\\n          if (!this.loaded_) {\\n            return null;\\n          } // nothing to do\\n\\n\\n          if (this.cues.length === 0) {\\n            return activeCues;\\n          }\\n\\n          var ct = this.tech_.currentTime();\\n          var active = [];\\n\\n          for (var i = 0, l = this.cues.length; i < l; i++) {\\n            var cue = this.cues[i];\\n\\n            if (cue.startTime <= ct && cue.endTime >= ct) {\\n              active.push(cue);\\n            } else if (cue.startTime === cue.endTime && cue.startTime <= ct && cue.startTime + 0.5 >= ct) {\\n              active.push(cue);\\n            }\\n          }\\n\\n          changed = false;\\n\\n          if (active.length !== this.activeCues_.length) {\\n            changed = true;\\n          } else {\\n            for (var _i = 0; _i < active.length; _i++) {\\n              if (this.activeCues_.indexOf(active[_i]) === -1) {\\n                changed = true;\\n              }\\n            }\\n          }\\n\\n          this.activeCues_ = active;\\n          activeCues.setCues_(this.activeCues_);\\n          return activeCues;\\n        },\\n        // /!\\\\ Keep this setter empty (see the timeupdate handler above)\\n        set: function set() {}\\n      }\\n    });\\n\\n    if (settings.src) {\\n      _this.src = settings.src;\\n\\n      if (!_this.preload_) {\\n        // Tracks will load on-demand.\\n        // Act like we're loaded for other purposes.\\n        _this.loaded_ = true;\\n      }\\n\\n      if (_this.preload_ || default_ || settings.kind !== 'subtitles' && settings.kind !== 'captions') {\\n        loadTrack(_this.src, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\\n      }\\n    } else {\\n      _this.loaded_ = true;\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Add a cue to the internal list of cues.\\n   *\\n   * @param {TextTrack~Cue} cue\\n   *        The cue to add to our internal list\\n   */\\n\\n\\n  var _proto = TextTrack.prototype;\\n\\n  _proto.addCue = function addCue(originalCue) {\\n    var cue = originalCue;\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs && !(originalCue instanceof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs.VTTCue)) {\\n      cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);\\n\\n      for (var prop in originalCue) {\\n        if (!(prop in cue)) {\\n          cue[prop] = originalCue[prop];\\n        }\\n      } // make sure that `id` is copied over\\n\\n\\n      cue.id = originalCue.id;\\n      cue.originalCue_ = originalCue;\\n    }\\n\\n    var tracks = this.tech_.textTracks();\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      if (tracks[i] !== this) {\\n        tracks[i].removeCue(cue);\\n      }\\n    }\\n\\n    this.cues_.push(cue);\\n    this.cues.setCues_(this.cues_);\\n  }\\n  /**\\n   * Remove a cue from our internal list\\n   *\\n   * @param {TextTrack~Cue} removeCue\\n   *        The cue to remove from our internal list\\n   */\\n  ;\\n\\n  _proto.removeCue = function removeCue(_removeCue) {\\n    var i = this.cues_.length;\\n\\n    while (i--) {\\n      var cue = this.cues_[i];\\n\\n      if (cue === _removeCue || cue.originalCue_ && cue.originalCue_ === _removeCue) {\\n        this.cues_.splice(i, 1);\\n        this.cues.setCues_(this.cues_);\\n        break;\\n      }\\n    }\\n  };\\n\\n  return TextTrack;\\n}(Track);\\n/**\\n * cuechange - One or more cues in the track have become active or stopped being active.\\n */\\n\\n\\nTextTrack.prototype.allowedEvents_ = {\\n  cuechange: 'cuechange'\\n};\\n\\n/**\\n * A representation of a single `AudioTrack`. If it is part of an {@link AudioTrackList}\\n * only one `AudioTrack` in the list will be enabled at a time.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotrack}\\n * @extends Track\\n */\\n\\nvar AudioTrack = /*#__PURE__*/function (_Track) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrack, _Track);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} [options={}]\\n   *        Object of option names and values\\n   *\\n   * @param {AudioTrack~Kind} [options.kind='']\\n   *        A valid audio track kind\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this AudioTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {boolean} [options.enabled]\\n   *        If this track is the one that is currently playing. If this track is part of\\n   *        an {@link AudioTrackList}, only one {@link AudioTrack} will be enabled.\\n   */\\n  function AudioTrack(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var settings = mergeOptions(options, {\\n      kind: AudioTrackKind[options.kind] || ''\\n    });\\n    _this = _Track.call(this, settings) || this;\\n    var enabled = false;\\n    /**\\n     * @memberof AudioTrack\\n     * @member {boolean} enabled\\n     *         If this `AudioTrack` is enabled or not. When setting this will\\n     *         fire {@link AudioTrack#enabledchange} if the state of enabled is changed.\\n     * @instance\\n     *\\n     * @fires VideoTrack#selectedchange\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'enabled', {\\n      get: function get() {\\n        return enabled;\\n      },\\n      set: function set(newEnabled) {\\n        // an invalid or unchanged value\\n        if (typeof newEnabled !== 'boolean' || newEnabled === enabled) {\\n          return;\\n        }\\n\\n        enabled = newEnabled;\\n        /**\\n         * An event that fires when enabled changes on this track. This allows\\n         * the AudioTrackList that holds this track to act accordingly.\\n         *\\n         * > Note: This is not part of the spec! Native tracks will do\\n         *         this internally without an event.\\n         *\\n         * @event AudioTrack#enabledchange\\n         * @type {EventTarget~Event}\\n         */\\n\\n        this.trigger('enabledchange');\\n      }\\n    }); // if the user sets this track to selected then\\n    // set selected to that true value otherwise\\n    // we keep it false\\n\\n    if (settings.enabled) {\\n      _this.enabled = settings.enabled;\\n    }\\n\\n    _this.loaded_ = true;\\n    return _this;\\n  }\\n\\n  return AudioTrack;\\n}(Track);\\n\\n/**\\n * A representation of a single `VideoTrack`.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#videotrack}\\n * @extends Track\\n */\\n\\nvar VideoTrack = /*#__PURE__*/function (_Track) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VideoTrack, _Track);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} [options={}]\\n   *        Object of option names and values\\n   *\\n   * @param {string} [options.kind='']\\n   *        A valid {@link VideoTrack~Kind}\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this AudioTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {boolean} [options.selected]\\n   *        If this track is the one that is currently playing.\\n   */\\n  function VideoTrack(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var settings = mergeOptions(options, {\\n      kind: VideoTrackKind[options.kind] || ''\\n    });\\n    _this = _Track.call(this, settings) || this;\\n    var selected = false;\\n    /**\\n     * @memberof VideoTrack\\n     * @member {boolean} selected\\n     *         If this `VideoTrack` is selected or not. When setting this will\\n     *         fire {@link VideoTrack#selectedchange} if the state of selected changed.\\n     * @instance\\n     *\\n     * @fires VideoTrack#selectedchange\\n     */\\n\\n    Object.defineProperty(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), 'selected', {\\n      get: function get() {\\n        return selected;\\n      },\\n      set: function set(newSelected) {\\n        // an invalid or unchanged value\\n        if (typeof newSelected !== 'boolean' || newSelected === selected) {\\n          return;\\n        }\\n\\n        selected = newSelected;\\n        /**\\n         * An event that fires when selected changes on this track. This allows\\n         * the VideoTrackList that holds this track to act accordingly.\\n         *\\n         * > Note: This is not part of the spec! Native tracks will do\\n         *         this internally without an event.\\n         *\\n         * @event VideoTrack#selectedchange\\n         * @type {EventTarget~Event}\\n         */\\n\\n        this.trigger('selectedchange');\\n      }\\n    }); // if the user sets this track to selected then\\n    // set selected to that true value otherwise\\n    // we keep it false\\n\\n    if (settings.selected) {\\n      _this.selected = settings.selected;\\n    }\\n\\n    return _this;\\n  }\\n\\n  return VideoTrack;\\n}(Track);\\n\\n/**\\n * @memberof HTMLTrackElement\\n * @typedef {HTMLTrackElement~ReadyState}\\n * @enum {number}\\n */\\n\\nvar NONE = 0;\\nvar LOADING = 1;\\nvar LOADED = 2;\\nvar ERROR = 3;\\n/**\\n * A single track represented in the DOM.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement}\\n * @extends EventTarget\\n */\\n\\nvar HTMLTrackElement = /*#__PURE__*/function (_EventTarget) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(HTMLTrackElement, _EventTarget);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Object} options={}\\n   *        Object of option names and values\\n   *\\n   * @param {Tech} options.tech\\n   *        A reference to the tech that owns this HTMLTrackElement.\\n   *\\n   * @param {TextTrack~Kind} [options.kind='subtitles']\\n   *        A valid text track kind.\\n   *\\n   * @param {TextTrack~Mode} [options.mode='disabled']\\n   *        A valid text track mode.\\n   *\\n   * @param {string} [options.id='vjs_track_' + Guid.newGUID()]\\n   *        A unique id for this TextTrack.\\n   *\\n   * @param {string} [options.label='']\\n   *        The menu label for this track.\\n   *\\n   * @param {string} [options.language='']\\n   *        A valid two character language code.\\n   *\\n   * @param {string} [options.srclang='']\\n   *        A valid two character language code. An alternative, but deprioritized\\n   *        vesion of `options.language`\\n   *\\n   * @param {string} [options.src]\\n   *        A url to TextTrack cues.\\n   *\\n   * @param {boolean} [options.default]\\n   *        If this track should default to on or off.\\n   */\\n  function HTMLTrackElement(options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _EventTarget.call(this) || this;\\n    var readyState;\\n    var track = new TextTrack(options);\\n    _this.kind = track.kind;\\n    _this.src = track.src;\\n    _this.srclang = track.language;\\n    _this.label = track.label;\\n    _this[\\\"default\\\"] = track[\\\"default\\\"];\\n    Object.defineProperties(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), {\\n      /**\\n       * @memberof HTMLTrackElement\\n       * @member {HTMLTrackElement~ReadyState} readyState\\n       *         The current ready state of the track element.\\n       * @instance\\n       */\\n      readyState: {\\n        get: function get() {\\n          return readyState;\\n        }\\n      },\\n\\n      /**\\n       * @memberof HTMLTrackElement\\n       * @member {TextTrack} track\\n       *         The underlying TextTrack object.\\n       * @instance\\n       *\\n       */\\n      track: {\\n        get: function get() {\\n          return track;\\n        }\\n      }\\n    });\\n    readyState = NONE;\\n    /**\\n     * @listens TextTrack#loadeddata\\n     * @fires HTMLTrackElement#load\\n     */\\n\\n    track.addEventListener('loadeddata', function () {\\n      readyState = LOADED;\\n\\n      _this.trigger({\\n        type: 'load',\\n        target: _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)\\n      });\\n    });\\n    return _this;\\n  }\\n\\n  return HTMLTrackElement;\\n}(EventTarget);\\n\\nHTMLTrackElement.prototype.allowedEvents_ = {\\n  load: 'load'\\n};\\nHTMLTrackElement.NONE = NONE;\\nHTMLTrackElement.LOADING = LOADING;\\nHTMLTrackElement.LOADED = LOADED;\\nHTMLTrackElement.ERROR = ERROR;\\n\\n/*\\n * This file contains all track properties that are used in\\n * player.js, tech.js, html5.js and possibly other techs in the future.\\n */\\n\\nvar NORMAL = {\\n  audio: {\\n    ListClass: AudioTrackList,\\n    TrackClass: AudioTrack,\\n    capitalName: 'Audio'\\n  },\\n  video: {\\n    ListClass: VideoTrackList,\\n    TrackClass: VideoTrack,\\n    capitalName: 'Video'\\n  },\\n  text: {\\n    ListClass: TextTrackList,\\n    TrackClass: TextTrack,\\n    capitalName: 'Text'\\n  }\\n};\\nObject.keys(NORMAL).forEach(function (type) {\\n  NORMAL[type].getterName = type + \\\"Tracks\\\";\\n  NORMAL[type].privateName = type + \\\"Tracks_\\\";\\n});\\nvar REMOTE = {\\n  remoteText: {\\n    ListClass: TextTrackList,\\n    TrackClass: TextTrack,\\n    capitalName: 'RemoteText',\\n    getterName: 'remoteTextTracks',\\n    privateName: 'remoteTextTracks_'\\n  },\\n  remoteTextEl: {\\n    ListClass: HtmlTrackElementList,\\n    TrackClass: HTMLTrackElement,\\n    capitalName: 'RemoteTextTrackEls',\\n    getterName: 'remoteTextTrackEls',\\n    privateName: 'remoteTextTrackEls_'\\n  }\\n};\\n\\nvar ALL = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, NORMAL, REMOTE);\\n\\nREMOTE.names = Object.keys(REMOTE);\\nNORMAL.names = Object.keys(NORMAL);\\nALL.names = [].concat(REMOTE.names).concat(NORMAL.names);\\n\\n/**\\n * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string\\n * that just contains the src url alone.\\n * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`\\n   * `var SourceString = 'http://example.com/some-video.mp4';`\\n *\\n * @typedef {Object|string} Tech~SourceObject\\n *\\n * @property {string} src\\n *           The url to the source\\n *\\n * @property {string} type\\n *           The mime type of the source\\n */\\n\\n/**\\n * A function used by {@link Tech} to create a new {@link TextTrack}.\\n *\\n * @private\\n *\\n * @param {Tech} self\\n *        An instance of the Tech class.\\n *\\n * @param {string} kind\\n *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\\n *\\n * @param {string} [label]\\n *        Label to identify the text track\\n *\\n * @param {string} [language]\\n *        Two letter language abbreviation\\n *\\n * @param {Object} [options={}]\\n *        An object with additional text track options\\n *\\n * @return {TextTrack}\\n *          The text track that was created.\\n */\\n\\nfunction createTrackHelper(self, kind, label, language, options) {\\n  if (options === void 0) {\\n    options = {};\\n  }\\n\\n  var tracks = self.textTracks();\\n  options.kind = kind;\\n\\n  if (label) {\\n    options.label = label;\\n  }\\n\\n  if (language) {\\n    options.language = language;\\n  }\\n\\n  options.tech = self;\\n  var track = new ALL.text.TrackClass(options);\\n  tracks.addTrack(track);\\n  return track;\\n}\\n/**\\n * This is the base class for media playback technology controllers, such as\\n * {@link Flash} and {@link HTML5}\\n *\\n * @extends Component\\n */\\n\\n\\nvar Tech = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Tech, _Component);\\n\\n  /**\\n  * Create an instance of this Tech.\\n  *\\n  * @param {Object} [options]\\n  *        The key/value store of player options.\\n  *\\n  * @param {Component~ReadyCallback} ready\\n  *        Callback function to call when the `HTML5` Tech is ready.\\n  */\\n  function Tech(options, ready) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (ready === void 0) {\\n      ready = function ready() {};\\n    }\\n\\n    // we don't want the tech to report user activity automatically.\\n    // This is done manually in addControlsListeners\\n    options.reportTouchActivity = false;\\n    _this = _Component.call(this, null, options, ready) || this; // keep track of whether the current source has played at all to\\n    // implement a very limited played()\\n\\n    _this.hasStarted_ = false;\\n\\n    _this.on('playing', function () {\\n      this.hasStarted_ = true;\\n    });\\n\\n    _this.on('loadstart', function () {\\n      this.hasStarted_ = false;\\n    });\\n\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n\\n      if (options && options[props.getterName]) {\\n        _this[props.privateName] = options[props.getterName];\\n      }\\n    }); // Manually track progress in cases where the browser/flash player doesn't report it.\\n\\n    if (!_this.featuresProgressEvents) {\\n      _this.manualProgressOn();\\n    } // Manually track timeupdates in cases where the browser/flash player doesn't report it.\\n\\n\\n    if (!_this.featuresTimeupdateEvents) {\\n      _this.manualTimeUpdatesOn();\\n    }\\n\\n    ['Text', 'Audio', 'Video'].forEach(function (track) {\\n      if (options[\\\"native\\\" + track + \\\"Tracks\\\"] === false) {\\n        _this[\\\"featuresNative\\\" + track + \\\"Tracks\\\"] = false;\\n      }\\n    });\\n\\n    if (options.nativeCaptions === false || options.nativeTextTracks === false) {\\n      _this.featuresNativeTextTracks = false;\\n    } else if (options.nativeCaptions === true || options.nativeTextTracks === true) {\\n      _this.featuresNativeTextTracks = true;\\n    }\\n\\n    if (!_this.featuresNativeTextTracks) {\\n      _this.emulateTextTracks();\\n    }\\n\\n    _this.preloadTextTracks = options.preloadTextTracks !== false;\\n    _this.autoRemoteTextTracks_ = new ALL.text.ListClass();\\n\\n    _this.initTrackListeners(); // Turn on component tap events only if not using native controls\\n\\n\\n    if (!options.nativeControlsForTouch) {\\n      _this.emitTapEvents();\\n    }\\n\\n    if (_this.constructor) {\\n      _this.name_ = _this.constructor.name || 'Unknown Tech';\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * A special function to trigger source set in a way that will allow player\\n   * to re-trigger if the player or tech are not ready yet.\\n   *\\n   * @fires Tech#sourceset\\n   * @param {string} src The source string at the time of the source changing.\\n   */\\n\\n\\n  var _proto = Tech.prototype;\\n\\n  _proto.triggerSourceset = function triggerSourceset(src) {\\n    var _this2 = this;\\n\\n    if (!this.isReady_) {\\n      // on initial ready we have to trigger source set\\n      // 1ms after ready so that player can watch for it.\\n      this.one('ready', function () {\\n        return _this2.setTimeout(function () {\\n          return _this2.triggerSourceset(src);\\n        }, 1);\\n      });\\n    }\\n    /**\\n     * Fired when the source is set on the tech causing the media element\\n     * to reload.\\n     *\\n     * @see {@link Player#event:sourceset}\\n     * @event Tech#sourceset\\n     * @type {EventTarget~Event}\\n     */\\n\\n\\n    this.trigger({\\n      src: src,\\n      type: 'sourceset'\\n    });\\n  }\\n  /* Fallbacks for unsupported event types\\n  ================================================================================ */\\n\\n  /**\\n   * Polyfill the `progress` event for browsers that don't support it natively.\\n   *\\n   * @see {@link Tech#trackProgress}\\n   */\\n  ;\\n\\n  _proto.manualProgressOn = function manualProgressOn() {\\n    this.on('durationchange', this.onDurationChange);\\n    this.manualProgress = true; // Trigger progress watching when a source begins loading\\n\\n    this.one('ready', this.trackProgress);\\n  }\\n  /**\\n   * Turn off the polyfill for `progress` events that was created in\\n   * {@link Tech#manualProgressOn}\\n   */\\n  ;\\n\\n  _proto.manualProgressOff = function manualProgressOff() {\\n    this.manualProgress = false;\\n    this.stopTrackingProgress();\\n    this.off('durationchange', this.onDurationChange);\\n  }\\n  /**\\n   * This is used to trigger a `progress` event when the buffered percent changes. It\\n   * sets an interval function that will be called every 500 milliseconds to check if the\\n   * buffer end percent has changed.\\n   *\\n   * > This function is called by {@link Tech#manualProgressOn}\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `ready` event that caused this to run.\\n   *\\n   * @listens Tech#ready\\n   * @fires Tech#progress\\n   */\\n  ;\\n\\n  _proto.trackProgress = function trackProgress(event) {\\n    this.stopTrackingProgress();\\n    this.progressInterval = this.setInterval(bind(this, function () {\\n      // Don't trigger unless buffered amount is greater than last time\\n      var numBufferedPercent = this.bufferedPercent();\\n\\n      if (this.bufferedPercent_ !== numBufferedPercent) {\\n        /**\\n         * See {@link Player#progress}\\n         *\\n         * @event Tech#progress\\n         * @type {EventTarget~Event}\\n         */\\n        this.trigger('progress');\\n      }\\n\\n      this.bufferedPercent_ = numBufferedPercent;\\n\\n      if (numBufferedPercent === 1) {\\n        this.stopTrackingProgress();\\n      }\\n    }), 500);\\n  }\\n  /**\\n   * Update our internal duration on a `durationchange` event by calling\\n   * {@link Tech#duration}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `durationchange` event that caused this to run.\\n   *\\n   * @listens Tech#durationchange\\n   */\\n  ;\\n\\n  _proto.onDurationChange = function onDurationChange(event) {\\n    this.duration_ = this.duration();\\n  }\\n  /**\\n   * Get and create a `TimeRange` object for buffering.\\n   *\\n   * @return {TimeRange}\\n   *         The time range object that was created.\\n   */\\n  ;\\n\\n  _proto.buffered = function buffered() {\\n    return createTimeRanges(0, 0);\\n  }\\n  /**\\n   * Get the percentage of the current video that is currently buffered.\\n   *\\n   * @return {number}\\n   *         A number from 0 to 1 that represents the decimal percentage of the\\n   *         video that is buffered.\\n   *\\n   */\\n  ;\\n\\n  _proto.bufferedPercent = function bufferedPercent$1() {\\n    return bufferedPercent(this.buffered(), this.duration_);\\n  }\\n  /**\\n   * Turn off the polyfill for `progress` events that was created in\\n   * {@link Tech#manualProgressOn}\\n   * Stop manually tracking progress events by clearing the interval that was set in\\n   * {@link Tech#trackProgress}.\\n   */\\n  ;\\n\\n  _proto.stopTrackingProgress = function stopTrackingProgress() {\\n    this.clearInterval(this.progressInterval);\\n  }\\n  /**\\n   * Polyfill the `timeupdate` event for browsers that don't support it.\\n   *\\n   * @see {@link Tech#trackCurrentTime}\\n   */\\n  ;\\n\\n  _proto.manualTimeUpdatesOn = function manualTimeUpdatesOn() {\\n    this.manualTimeUpdates = true;\\n    this.on('play', this.trackCurrentTime);\\n    this.on('pause', this.stopTrackingCurrentTime);\\n  }\\n  /**\\n   * Turn off the polyfill for `timeupdate` events that was created in\\n   * {@link Tech#manualTimeUpdatesOn}\\n   */\\n  ;\\n\\n  _proto.manualTimeUpdatesOff = function manualTimeUpdatesOff() {\\n    this.manualTimeUpdates = false;\\n    this.stopTrackingCurrentTime();\\n    this.off('play', this.trackCurrentTime);\\n    this.off('pause', this.stopTrackingCurrentTime);\\n  }\\n  /**\\n   * Sets up an interval function to track current time and trigger `timeupdate` every\\n   * 250 milliseconds.\\n   *\\n   * @listens Tech#play\\n   * @triggers Tech#timeupdate\\n   */\\n  ;\\n\\n  _proto.trackCurrentTime = function trackCurrentTime() {\\n    if (this.currentTimeInterval) {\\n      this.stopTrackingCurrentTime();\\n    }\\n\\n    this.currentTimeInterval = this.setInterval(function () {\\n      /**\\n       * Triggered at an interval of 250ms to indicated that time is passing in the video.\\n       *\\n       * @event Tech#timeupdate\\n       * @type {EventTarget~Event}\\n       */\\n      this.trigger({\\n        type: 'timeupdate',\\n        target: this,\\n        manuallyTriggered: true\\n      }); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\\n    }, 250);\\n  }\\n  /**\\n   * Stop the interval function created in {@link Tech#trackCurrentTime} so that the\\n   * `timeupdate` event is no longer triggered.\\n   *\\n   * @listens {Tech#pause}\\n   */\\n  ;\\n\\n  _proto.stopTrackingCurrentTime = function stopTrackingCurrentTime() {\\n    this.clearInterval(this.currentTimeInterval); // #1002 - if the video ends right before the next timeupdate would happen,\\n    // the progress bar won't make it all the way to the end\\n\\n    this.trigger({\\n      type: 'timeupdate',\\n      target: this,\\n      manuallyTriggered: true\\n    });\\n  }\\n  /**\\n   * Turn off all event polyfills, clear the `Tech`s {@link AudioTrackList},\\n   * {@link VideoTrackList}, and {@link TextTrackList}, and dispose of this Tech.\\n   *\\n   * @fires Component#dispose\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    // clear out all tracks because we can't reuse them between techs\\n    this.clearTracks(NORMAL.names); // Turn off any manual progress or timeupdate tracking\\n\\n    if (this.manualProgress) {\\n      this.manualProgressOff();\\n    }\\n\\n    if (this.manualTimeUpdates) {\\n      this.manualTimeUpdatesOff();\\n    }\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Clear out a single `TrackList` or an array of `TrackLists` given their names.\\n   *\\n   * > Note: Techs without source handlers should call this between sources for `video`\\n   *         & `audio` tracks. You don't want to use them between tracks!\\n   *\\n   * @param {string[]|string} types\\n   *        TrackList names to clear, valid names are `video`, `audio`, and\\n   *        `text`.\\n   */\\n  ;\\n\\n  _proto.clearTracks = function clearTracks(types) {\\n    var _this3 = this;\\n\\n    types = [].concat(types); // clear out all tracks because we can't reuse them between techs\\n\\n    types.forEach(function (type) {\\n      var list = _this3[type + \\\"Tracks\\\"]() || [];\\n      var i = list.length;\\n\\n      while (i--) {\\n        var track = list[i];\\n\\n        if (type === 'text') {\\n          _this3.removeRemoteTextTrack(track);\\n        }\\n\\n        list.removeTrack(track);\\n      }\\n    });\\n  }\\n  /**\\n   * Remove any TextTracks added via addRemoteTextTrack that are\\n   * flagged for automatic garbage collection\\n   */\\n  ;\\n\\n  _proto.cleanupAutoTextTracks = function cleanupAutoTextTracks() {\\n    var list = this.autoRemoteTextTracks_ || [];\\n    var i = list.length;\\n\\n    while (i--) {\\n      var track = list[i];\\n      this.removeRemoteTextTrack(track);\\n    }\\n  }\\n  /**\\n   * Reset the tech, which will removes all sources and reset the internal readyState.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.reset = function reset() {}\\n  /**\\n   * Get or set an error on the Tech.\\n   *\\n   * @param {MediaError} [err]\\n   *        Error to set on the Tech\\n   *\\n   * @return {MediaError|null}\\n   *         The current error object on the tech, or null if there isn't one.\\n   */\\n  ;\\n\\n  _proto.error = function error(err) {\\n    if (err !== undefined) {\\n      this.error_ = new MediaError(err);\\n      this.trigger('error');\\n    }\\n\\n    return this.error_;\\n  }\\n  /**\\n   * Returns the `TimeRange`s that have been played through for the current source.\\n   *\\n   * > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.\\n   *         It only checks whether the source has played at all or not.\\n   *\\n   * @return {TimeRange}\\n   *         - A single time range if this video has played\\n   *         - An empty set of ranges if not.\\n   */\\n  ;\\n\\n  _proto.played = function played() {\\n    if (this.hasStarted_) {\\n      return createTimeRanges(0, 0);\\n    }\\n\\n    return createTimeRanges();\\n  }\\n  /**\\n   * Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was\\n   * previously called.\\n   *\\n   * @fires Tech#timeupdate\\n   */\\n  ;\\n\\n  _proto.setCurrentTime = function setCurrentTime() {\\n    // improve the accuracy of manual timeupdates\\n    if (this.manualTimeUpdates) {\\n      /**\\n       * A manual `timeupdate` event.\\n       *\\n       * @event Tech#timeupdate\\n       * @type {EventTarget~Event}\\n       */\\n      this.trigger({\\n        type: 'timeupdate',\\n        target: this,\\n        manuallyTriggered: true\\n      });\\n    }\\n  }\\n  /**\\n   * Turn on listeners for {@link VideoTrackList}, {@link {AudioTrackList}, and\\n   * {@link TextTrackList} events.\\n   *\\n   * This adds {@link EventTarget~EventListeners} for `addtrack`, and  `removetrack`.\\n   *\\n   * @fires Tech#audiotrackchange\\n   * @fires Tech#videotrackchange\\n   * @fires Tech#texttrackchange\\n   */\\n  ;\\n\\n  _proto.initTrackListeners = function initTrackListeners() {\\n    var _this4 = this;\\n\\n    /**\\n      * Triggered when tracks are added or removed on the Tech {@link AudioTrackList}\\n      *\\n      * @event Tech#audiotrackchange\\n      * @type {EventTarget~Event}\\n      */\\n\\n    /**\\n      * Triggered when tracks are added or removed on the Tech {@link VideoTrackList}\\n      *\\n      * @event Tech#videotrackchange\\n      * @type {EventTarget~Event}\\n      */\\n\\n    /**\\n      * Triggered when tracks are added or removed on the Tech {@link TextTrackList}\\n      *\\n      * @event Tech#texttrackchange\\n      * @type {EventTarget~Event}\\n      */\\n    NORMAL.names.forEach(function (name) {\\n      var props = NORMAL[name];\\n\\n      var trackListChanges = function trackListChanges() {\\n        _this4.trigger(name + \\\"trackchange\\\");\\n      };\\n\\n      var tracks = _this4[props.getterName]();\\n\\n      tracks.addEventListener('removetrack', trackListChanges);\\n      tracks.addEventListener('addtrack', trackListChanges);\\n\\n      _this4.on('dispose', function () {\\n        tracks.removeEventListener('removetrack', trackListChanges);\\n        tracks.removeEventListener('addtrack', trackListChanges);\\n      });\\n    });\\n  }\\n  /**\\n   * Emulate TextTracks using vtt.js if necessary\\n   *\\n   * @fires Tech#vttjsloaded\\n   * @fires Tech#vttjserror\\n   */\\n  ;\\n\\n  _proto.addWebVttScript_ = function addWebVttScript_() {\\n    var _this5 = this;\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT) {\\n      return;\\n    } // Initially, Tech.el_ is a child of a dummy-div wait until the Component system\\n    // signals that the Tech is ready at which point Tech.el_ is part of the DOM\\n    // before inserting the WebVTT script\\n\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body.contains(this.el())) {\\n      // load via require if available and vtt.js script location was not passed in\\n      // as an option. novtt builds will turn the above require call into an empty object\\n      // which will cause this if check to always fail.\\n      if (!this.options_['vtt.js'] && isPlain(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10___default.a) && Object.keys(videojs_vtt_js__WEBPACK_IMPORTED_MODULE_10___default.a).length > 0) {\\n        this.trigger('vttjsloaded');\\n        return;\\n      } // load vtt.js via the script location option or the cdn of no location was\\n      // passed in\\n\\n\\n      var script = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('script');\\n      script.src = this.options_['vtt.js'] || 'https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js';\\n\\n      script.onload = function () {\\n        /**\\n         * Fired when vtt.js is loaded.\\n         *\\n         * @event Tech#vttjsloaded\\n         * @type {EventTarget~Event}\\n         */\\n        _this5.trigger('vttjsloaded');\\n      };\\n\\n      script.onerror = function () {\\n        /**\\n         * Fired when vtt.js was not loaded due to an error\\n         *\\n         * @event Tech#vttjsloaded\\n         * @type {EventTarget~Event}\\n         */\\n        _this5.trigger('vttjserror');\\n      };\\n\\n      this.on('dispose', function () {\\n        script.onload = null;\\n        script.onerror = null;\\n      }); // but have not loaded yet and we set it to true before the inject so that\\n      // we don't overwrite the injected window.WebVTT if it loads right away\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT = true;\\n      this.el().parentNode.appendChild(script);\\n    } else {\\n      this.ready(this.addWebVttScript_);\\n    }\\n  }\\n  /**\\n   * Emulate texttracks\\n   *\\n   */\\n  ;\\n\\n  _proto.emulateTextTracks = function emulateTextTracks() {\\n    var _this6 = this;\\n\\n    var tracks = this.textTracks();\\n    var remoteTracks = this.remoteTextTracks();\\n\\n    var handleAddTrack = function handleAddTrack(e) {\\n      return tracks.addTrack(e.track);\\n    };\\n\\n    var handleRemoveTrack = function handleRemoveTrack(e) {\\n      return tracks.removeTrack(e.track);\\n    };\\n\\n    remoteTracks.on('addtrack', handleAddTrack);\\n    remoteTracks.on('removetrack', handleRemoveTrack);\\n    this.addWebVttScript_();\\n\\n    var updateDisplay = function updateDisplay() {\\n      return _this6.trigger('texttrackchange');\\n    };\\n\\n    var textTracksChanges = function textTracksChanges() {\\n      updateDisplay();\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        var track = tracks[i];\\n        track.removeEventListener('cuechange', updateDisplay);\\n\\n        if (track.mode === 'showing') {\\n          track.addEventListener('cuechange', updateDisplay);\\n        }\\n      }\\n    };\\n\\n    textTracksChanges();\\n    tracks.addEventListener('change', textTracksChanges);\\n    tracks.addEventListener('addtrack', textTracksChanges);\\n    tracks.addEventListener('removetrack', textTracksChanges);\\n    this.on('dispose', function () {\\n      remoteTracks.off('addtrack', handleAddTrack);\\n      remoteTracks.off('removetrack', handleRemoveTrack);\\n      tracks.removeEventListener('change', textTracksChanges);\\n      tracks.removeEventListener('addtrack', textTracksChanges);\\n      tracks.removeEventListener('removetrack', textTracksChanges);\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        var track = tracks[i];\\n        track.removeEventListener('cuechange', updateDisplay);\\n      }\\n    });\\n  }\\n  /**\\n   * Create and returns a remote {@link TextTrack} object.\\n   *\\n   * @param {string} kind\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\\n   *\\n   * @param {string} [label]\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [language]\\n   *        Two letter language abbreviation\\n   *\\n   * @return {TextTrack}\\n   *         The TextTrack that gets created.\\n   */\\n  ;\\n\\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\\n    if (!kind) {\\n      throw new Error('TextTrack kind is required but was not provided');\\n    }\\n\\n    return createTrackHelper(this, kind, label, language);\\n  }\\n  /**\\n   * Create an emulated TextTrack for use by addRemoteTextTrack\\n   *\\n   * This is intended to be overridden by classes that inherit from\\n   * Tech in order to create native or custom TextTracks.\\n   *\\n   * @param {Object} options\\n   *        The object should contain the options to initialize the TextTrack with.\\n   *\\n   * @param {string} [options.kind]\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\\n   *\\n   * @param {string} [options.label].\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [options.language]\\n   *        Two letter language abbreviation.\\n   *\\n   * @return {HTMLTrackElement}\\n   *         The track element that gets created.\\n   */\\n  ;\\n\\n  _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\\n    var track = mergeOptions(options, {\\n      tech: this\\n    });\\n    return new REMOTE.remoteTextEl.TrackClass(track);\\n  }\\n  /**\\n   * Creates a remote text track object and returns an html track element.\\n   *\\n   * > Note: This can be an emulated {@link HTMLTrackElement} or a native one.\\n   *\\n   * @param {Object} options\\n   *        See {@link Tech#createRemoteTextTrack} for more detailed properties.\\n   *\\n   * @param {boolean} [manualCleanup=true]\\n   *        - When false: the TextTrack will be automatically removed from the video\\n   *          element whenever the source changes\\n   *        - When True: The TextTrack will have to be cleaned up manually\\n   *\\n   * @return {HTMLTrackElement}\\n   *         An Html Track Element.\\n   *\\n   * @deprecated The default functionality for this function will be equivalent\\n   *             to \\\"manualCleanup=false\\\" in the future. The manualCleanup parameter will\\n   *             also be removed.\\n   */\\n  ;\\n\\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\\n    var _this7 = this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var htmlTrackElement = this.createRemoteTextTrack(options);\\n\\n    if (manualCleanup !== true && manualCleanup !== false) {\\n      // deprecation warning\\n      log.warn('Calling addRemoteTextTrack without explicitly setting the \\\"manualCleanup\\\" parameter to `true` is deprecated and default to `false` in future version of video.js');\\n      manualCleanup = true;\\n    } // store HTMLTrackElement and TextTrack to remote list\\n\\n\\n    this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\\n    this.remoteTextTracks().addTrack(htmlTrackElement.track);\\n\\n    if (manualCleanup !== true) {\\n      // create the TextTrackList if it doesn't exist\\n      this.ready(function () {\\n        return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track);\\n      });\\n    }\\n\\n    return htmlTrackElement;\\n  }\\n  /**\\n   * Remove a remote text track from the remote `TextTrackList`.\\n   *\\n   * @param {TextTrack} track\\n   *        `TextTrack` to remove from the `TextTrackList`\\n   */\\n  ;\\n\\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\\n    var trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track); // remove HTMLTrackElement and TextTrack from remote list\\n\\n    this.remoteTextTrackEls().removeTrackElement_(trackElement);\\n    this.remoteTextTracks().removeTrack(track);\\n    this.autoRemoteTextTracks_.removeTrack(track);\\n  }\\n  /**\\n   * Gets available media playback quality metrics as specified by the W3C's Media\\n   * Playback Quality API.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\\n   *\\n   * @return {Object}\\n   *         An object with supported media playback quality metrics\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\\n    return {};\\n  }\\n  /**\\n   * Attempt to create a floating video window always on top of other windows\\n   * so that users may continue consuming media while they interact with other\\n   * content sites, or applications on their device.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @return {Promise|undefined}\\n   *         A promise with a Picture-in-Picture window if the browser supports\\n   *         Promises (or one was passed in as an option). It returns undefined\\n   *         otherwise.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      return PromiseClass.reject();\\n    }\\n  }\\n  /**\\n   * A method to set a poster from a `Tech`.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.setPoster = function setPoster() {}\\n  /**\\n   * A method to check for the presence of the 'playsinline' <video> attribute.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.playsinline = function playsinline() {}\\n  /**\\n   * A method to set or unset the 'playsinline' <video> attribute.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.setPlaysinline = function setPlaysinline() {}\\n  /**\\n   * Attempt to force override of native audio tracks.\\n   *\\n   * @param {boolean} override - If set to true native audio will be overridden,\\n   * otherwise native audio will potentially be used.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks() {}\\n  /**\\n   * Attempt to force override of native video tracks.\\n   *\\n   * @param {boolean} override - If set to true native video will be overridden,\\n   * otherwise native video will potentially be used.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks() {}\\n  /*\\n   * Check if the tech can support the given mime-type.\\n   *\\n   * The base tech does not support any type, but source handlers might\\n   * overwrite this.\\n   *\\n   * @param  {string} type\\n   *         The mimetype to check for support\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or empty string\\n   *\\n   * @see [Spec]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType}\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.canPlayType = function canPlayType() {\\n    return '';\\n  }\\n  /**\\n   * Check if the type is supported by this tech.\\n   *\\n   * The base tech does not support any type, but source handlers might\\n   * overwrite this.\\n   *\\n   * @param {string} type\\n   *        The media type to check\\n   * @return {string} Returns the native video element's response\\n   */\\n  ;\\n\\n  Tech.canPlayType = function canPlayType() {\\n    return '';\\n  }\\n  /**\\n   * Check if the tech can support the given source\\n   *\\n   * @param {Object} srcObj\\n   *        The source object\\n   * @param {Object} options\\n   *        The options passed to the tech\\n   * @return {string} 'probably', 'maybe', or '' (empty string)\\n   */\\n  ;\\n\\n  Tech.canPlaySource = function canPlaySource(srcObj, options) {\\n    return Tech.canPlayType(srcObj.type);\\n  }\\n  /*\\n   * Return whether the argument is a Tech or not.\\n   * Can be passed either a Class like `Html5` or a instance like `player.tech_`\\n   *\\n   * @param {Object} component\\n   *        The item to check\\n   *\\n   * @return {boolean}\\n   *         Whether it is a tech or not\\n   *         - True if it is a tech\\n   *         - False if it is not\\n   */\\n  ;\\n\\n  Tech.isTech = function isTech(component) {\\n    return component.prototype instanceof Tech || component instanceof Tech || component === Tech;\\n  }\\n  /**\\n   * Registers a `Tech` into a shared list for videojs.\\n   *\\n   * @param {string} name\\n   *        Name of the `Tech` to register.\\n   *\\n   * @param {Object} tech\\n   *        The `Tech` class to register.\\n   */\\n  ;\\n\\n  Tech.registerTech = function registerTech(name, tech) {\\n    if (!Tech.techs_) {\\n      Tech.techs_ = {};\\n    }\\n\\n    if (!Tech.isTech(tech)) {\\n      throw new Error(\\\"Tech \\\" + name + \\\" must be a Tech\\\");\\n    }\\n\\n    if (!Tech.canPlayType) {\\n      throw new Error('Techs must have a static canPlayType method on them');\\n    }\\n\\n    if (!Tech.canPlaySource) {\\n      throw new Error('Techs must have a static canPlaySource method on them');\\n    }\\n\\n    name = toTitleCase(name);\\n    Tech.techs_[name] = tech;\\n    Tech.techs_[toLowerCase(name)] = tech;\\n\\n    if (name !== 'Tech') {\\n      // camel case the techName for use in techOrder\\n      Tech.defaultTechOrder_.push(name);\\n    }\\n\\n    return tech;\\n  }\\n  /**\\n   * Get a `Tech` from the shared list by name.\\n   *\\n   * @param {string} name\\n   *        `camelCase` or `TitleCase` name of the Tech to get\\n   *\\n   * @return {Tech|undefined}\\n   *         The `Tech` or undefined if there was no tech with the name requested.\\n   */\\n  ;\\n\\n  Tech.getTech = function getTech(name) {\\n    if (!name) {\\n      return;\\n    }\\n\\n    if (Tech.techs_ && Tech.techs_[name]) {\\n      return Tech.techs_[name];\\n    }\\n\\n    name = toTitleCase(name);\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs[name]) {\\n      log.warn(\\\"The \\\" + name + \\\" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)\\\");\\n      return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.videojs[name];\\n    }\\n  };\\n\\n  return Tech;\\n}(Component);\\n/**\\n * Get the {@link VideoTrackList}\\n *\\n * @returns {VideoTrackList}\\n * @method Tech.prototype.videoTracks\\n */\\n\\n/**\\n * Get the {@link AudioTrackList}\\n *\\n * @returns {AudioTrackList}\\n * @method Tech.prototype.audioTracks\\n */\\n\\n/**\\n * Get the {@link TextTrackList}\\n *\\n * @returns {TextTrackList}\\n * @method Tech.prototype.textTracks\\n */\\n\\n/**\\n * Get the remote element {@link TextTrackList}\\n *\\n * @returns {TextTrackList}\\n * @method Tech.prototype.remoteTextTracks\\n */\\n\\n/**\\n * Get the remote element {@link HtmlTrackElementList}\\n *\\n * @returns {HtmlTrackElementList}\\n * @method Tech.prototype.remoteTextTrackEls\\n */\\n\\n\\nALL.names.forEach(function (name) {\\n  var props = ALL[name];\\n\\n  Tech.prototype[props.getterName] = function () {\\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\\n    return this[props.privateName];\\n  };\\n});\\n/**\\n * List of associated text tracks\\n *\\n * @type {TextTrackList}\\n * @private\\n * @property Tech#textTracks_\\n */\\n\\n/**\\n * List of associated audio tracks.\\n *\\n * @type {AudioTrackList}\\n * @private\\n * @property Tech#audioTracks_\\n */\\n\\n/**\\n * List of associated video tracks.\\n *\\n * @type {VideoTrackList}\\n * @private\\n * @property Tech#videoTracks_\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports volume control.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresVolumeControl = true;\\n/**\\n * Boolean indicating whether the `Tech` supports muting volume.\\n *\\n * @type {bolean}\\n * @default\\n */\\n\\nTech.prototype.featuresMuteControl = true;\\n/**\\n * Boolean indicating whether the `Tech` supports fullscreen resize control.\\n * Resizing plugins using request fullscreen reloads the plugin\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresFullscreenResize = false;\\n/**\\n * Boolean indicating whether the `Tech` supports changing the speed at which the video\\n * plays. Examples:\\n *   - Set player to play 2x (twice) as fast\\n *   - Set player to play 0.5x (half) as fast\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresPlaybackRate = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the `progress` event. This is currently\\n * not triggered by video-js-swf. This will be used to determine if\\n * {@link Tech#manualProgressOn} should be called.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresProgressEvents = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\\n *\\n * A tech should set this to `true` and then use {@link Tech#triggerSourceset}\\n * to trigger a {@link Tech#event:sourceset} at the earliest time after getting\\n * a new source.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresSourceset = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the `timeupdate` event. This is currently\\n * not triggered by video-js-swf. This will be used to determine if\\n * {@link Tech#manualTimeUpdates} should be called.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresTimeupdateEvents = false;\\n/**\\n * Boolean indicating whether the `Tech` supports the native `TextTrack`s.\\n * This will help us integrate with native `TextTrack`s if the browser supports them.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nTech.prototype.featuresNativeTextTracks = false;\\n/**\\n * A functional mixin for techs that want to use the Source Handler pattern.\\n * Source handlers are scripts for handling specific formats.\\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\\n * Example: `Tech.withSourceHandlers.call(MyTech);`\\n *\\n * @param {Tech} _Tech\\n *        The tech to add source handler functions to.\\n *\\n * @mixes Tech~SourceHandlerAdditions\\n */\\n\\nTech.withSourceHandlers = function (_Tech) {\\n  /**\\n   * Register a source handler\\n   *\\n   * @param {Function} handler\\n   *        The source handler class\\n   *\\n   * @param {number} [index]\\n   *        Register it at the following index\\n   */\\n  _Tech.registerSourceHandler = function (handler, index) {\\n    var handlers = _Tech.sourceHandlers;\\n\\n    if (!handlers) {\\n      handlers = _Tech.sourceHandlers = [];\\n    }\\n\\n    if (index === undefined) {\\n      // add to the end of the list\\n      index = handlers.length;\\n    }\\n\\n    handlers.splice(index, 0, handler);\\n  };\\n  /**\\n   * Check if the tech can support the given type. Also checks the\\n   * Techs sourceHandlers.\\n   *\\n   * @param {string} type\\n   *         The mimetype to check.\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or '' (empty string)\\n   */\\n\\n\\n  _Tech.canPlayType = function (type) {\\n    var handlers = _Tech.sourceHandlers || [];\\n    var can;\\n\\n    for (var i = 0; i < handlers.length; i++) {\\n      can = handlers[i].canPlayType(type);\\n\\n      if (can) {\\n        return can;\\n      }\\n    }\\n\\n    return '';\\n  };\\n  /**\\n   * Returns the first source handler that supports the source.\\n   *\\n   * TODO: Answer question: should 'probably' be prioritized over 'maybe'\\n   *\\n   * @param {Tech~SourceObject} source\\n   *        The source object\\n   *\\n   * @param {Object} options\\n   *        The options passed to the tech\\n   *\\n   * @return {SourceHandler|null}\\n   *          The first source handler that supports the source or null if\\n   *          no SourceHandler supports the source\\n   */\\n\\n\\n  _Tech.selectSourceHandler = function (source, options) {\\n    var handlers = _Tech.sourceHandlers || [];\\n    var can;\\n\\n    for (var i = 0; i < handlers.length; i++) {\\n      can = handlers[i].canHandleSource(source, options);\\n\\n      if (can) {\\n        return handlers[i];\\n      }\\n    }\\n\\n    return null;\\n  };\\n  /**\\n   * Check if the tech can support the given source.\\n   *\\n   * @param {Tech~SourceObject} srcObj\\n   *        The source object\\n   *\\n   * @param {Object} options\\n   *        The options passed to the tech\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or '' (empty string)\\n   */\\n\\n\\n  _Tech.canPlaySource = function (srcObj, options) {\\n    var sh = _Tech.selectSourceHandler(srcObj, options);\\n\\n    if (sh) {\\n      return sh.canHandleSource(srcObj, options);\\n    }\\n\\n    return '';\\n  };\\n  /**\\n   * When using a source handler, prefer its implementation of\\n   * any function normally provided by the tech.\\n   */\\n\\n\\n  var deferrable = ['seekable', 'seeking', 'duration'];\\n  /**\\n   * A wrapper around {@link Tech#seekable} that will call a `SourceHandler`s seekable\\n   * function if it exists, with a fallback to the Techs seekable function.\\n   *\\n   * @method _Tech.seekable\\n   */\\n\\n  /**\\n   * A wrapper around {@link Tech#duration} that will call a `SourceHandler`s duration\\n   * function if it exists, otherwise it will fallback to the techs duration function.\\n   *\\n   * @method _Tech.duration\\n   */\\n\\n  deferrable.forEach(function (fnName) {\\n    var originalFn = this[fnName];\\n\\n    if (typeof originalFn !== 'function') {\\n      return;\\n    }\\n\\n    this[fnName] = function () {\\n      if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\\n        return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\\n      }\\n\\n      return originalFn.apply(this, arguments);\\n    };\\n  }, _Tech.prototype);\\n  /**\\n   * Create a function for setting the source using a source object\\n   * and source handlers.\\n   * Should never be called unless a source handler was found.\\n   *\\n   * @param {Tech~SourceObject} source\\n   *        A source object with src and type keys\\n   */\\n\\n  _Tech.prototype.setSource = function (source) {\\n    var sh = _Tech.selectSourceHandler(source, this.options_);\\n\\n    if (!sh) {\\n      // Fall back to a native source hander when unsupported sources are\\n      // deliberately set\\n      if (_Tech.nativeSourceHandler) {\\n        sh = _Tech.nativeSourceHandler;\\n      } else {\\n        log.error('No source handler found for the current source.');\\n      }\\n    } // Dispose any existing source handler\\n\\n\\n    this.disposeSourceHandler();\\n    this.off('dispose', this.disposeSourceHandler);\\n\\n    if (sh !== _Tech.nativeSourceHandler) {\\n      this.currentSource_ = source;\\n    }\\n\\n    this.sourceHandler_ = sh.handleSource(source, this, this.options_);\\n    this.one('dispose', this.disposeSourceHandler);\\n  };\\n  /**\\n   * Clean up any existing SourceHandlers and listeners when the Tech is disposed.\\n   *\\n   * @listens Tech#dispose\\n   */\\n\\n\\n  _Tech.prototype.disposeSourceHandler = function () {\\n    // if we have a source and get another one\\n    // then we are loading something new\\n    // than clear all of our current tracks\\n    if (this.currentSource_) {\\n      this.clearTracks(['audio', 'video']);\\n      this.currentSource_ = null;\\n    } // always clean up auto-text tracks\\n\\n\\n    this.cleanupAutoTextTracks();\\n\\n    if (this.sourceHandler_) {\\n      if (this.sourceHandler_.dispose) {\\n        this.sourceHandler_.dispose();\\n      }\\n\\n      this.sourceHandler_ = null;\\n    }\\n  };\\n}; // The base Tech class needs to be registered as a Component. It is the only\\n// Tech that can be registered as a Component.\\n\\n\\nComponent.registerComponent('Tech', Tech);\\nTech.registerTech('Tech', Tech);\\n/**\\n * A list of techs that should be added to techOrder on Players\\n *\\n * @private\\n */\\n\\nTech.defaultTechOrder_ = [];\\n\\n/**\\n * @file middleware.js\\n * @module middleware\\n */\\nvar middlewares = {};\\nvar middlewareInstances = {};\\nvar TERMINATOR = {};\\n/**\\n * A middleware object is a plain JavaScript object that has methods that\\n * match the {@link Tech} methods found in the lists of allowed\\n * {@link module:middleware.allowedGetters|getters},\\n * {@link module:middleware.allowedSetters|setters}, and\\n * {@link module:middleware.allowedMediators|mediators}.\\n *\\n * @typedef {Object} MiddlewareObject\\n */\\n\\n/**\\n * A middleware factory function that should return a\\n * {@link module:middleware~MiddlewareObject|MiddlewareObject}.\\n *\\n * This factory will be called for each player when needed, with the player\\n * passed in as an argument.\\n *\\n * @callback MiddlewareFactory\\n * @param {Player} player\\n *        A Video.js player.\\n */\\n\\n/**\\n * Define a middleware that the player should use by way of a factory function\\n * that returns a middleware object.\\n *\\n * @param  {string} type\\n *         The MIME type to match or `\\\"*\\\"` for all MIME types.\\n *\\n * @param  {MiddlewareFactory} middleware\\n *         A middleware factory function that will be executed for\\n *         matching types.\\n */\\n\\nfunction use(type, middleware) {\\n  middlewares[type] = middlewares[type] || [];\\n  middlewares[type].push(middleware);\\n}\\n/**\\n * Asynchronously sets a source using middleware by recursing through any\\n * matching middlewares and calling `setSource` on each, passing along the\\n * previous returned value each time.\\n *\\n * @param  {Player} player\\n *         A {@link Player} instance.\\n *\\n * @param  {Tech~SourceObject} src\\n *         A source object.\\n *\\n * @param  {Function}\\n *         The next middleware to run.\\n */\\n\\nfunction setSource(player, src, next) {\\n  player.setTimeout(function () {\\n    return setSourceHelper(src, middlewares[src.type], next, player);\\n  }, 1);\\n}\\n/**\\n * When the tech is set, passes the tech to each middleware's `setTech` method.\\n *\\n * @param {Object[]} middleware\\n *        An array of middleware instances.\\n *\\n * @param {Tech} tech\\n *        A Video.js tech.\\n */\\n\\nfunction setTech(middleware, tech) {\\n  middleware.forEach(function (mw) {\\n    return mw.setTech && mw.setTech(tech);\\n  });\\n}\\n/**\\n * Calls a getter on the tech first, through each middleware\\n * from right to left to the player.\\n *\\n * @param  {Object[]} middleware\\n *         An array of middleware instances.\\n *\\n * @param  {Tech} tech\\n *         The current tech.\\n *\\n * @param  {string} method\\n *         A method name.\\n *\\n * @return {Mixed}\\n *         The final value from the tech after middleware has intercepted it.\\n */\\n\\nfunction get(middleware, tech, method) {\\n  return middleware.reduceRight(middlewareIterator(method), tech[method]());\\n}\\n/**\\n * Takes the argument given to the player and calls the setter method on each\\n * middleware from left to right to the tech.\\n *\\n * @param  {Object[]} middleware\\n *         An array of middleware instances.\\n *\\n * @param  {Tech} tech\\n *         The current tech.\\n *\\n * @param  {string} method\\n *         A method name.\\n *\\n * @param  {Mixed} arg\\n *         The value to set on the tech.\\n *\\n * @return {Mixed}\\n *         The return value of the `method` of the `tech`.\\n */\\n\\nfunction set(middleware, tech, method, arg) {\\n  return tech[method](middleware.reduce(middlewareIterator(method), arg));\\n}\\n/**\\n * Takes the argument given to the player and calls the `call` version of the\\n * method on each middleware from left to right.\\n *\\n * Then, call the passed in method on the tech and return the result unchanged\\n * back to the player, through middleware, this time from right to left.\\n *\\n * @param  {Object[]} middleware\\n *         An array of middleware instances.\\n *\\n * @param  {Tech} tech\\n *         The current tech.\\n *\\n * @param  {string} method\\n *         A method name.\\n *\\n * @param  {Mixed} arg\\n *         The value to set on the tech.\\n *\\n * @return {Mixed}\\n *         The return value of the `method` of the `tech`, regardless of the\\n *         return values of middlewares.\\n */\\n\\nfunction mediate(middleware, tech, method, arg) {\\n  if (arg === void 0) {\\n    arg = null;\\n  }\\n\\n  var callMethod = 'call' + toTitleCase(method);\\n  var middlewareValue = middleware.reduce(middlewareIterator(callMethod), arg);\\n  var terminated = middlewareValue === TERMINATOR; // deprecated. The `null` return value should instead return TERMINATOR to\\n  // prevent confusion if a techs method actually returns null.\\n\\n  var returnValue = terminated ? null : tech[method](middlewareValue);\\n  executeRight(middleware, method, returnValue, terminated);\\n  return returnValue;\\n}\\n/**\\n * Enumeration of allowed getters where the keys are method names.\\n *\\n * @type {Object}\\n */\\n\\nvar allowedGetters = {\\n  buffered: 1,\\n  currentTime: 1,\\n  duration: 1,\\n  muted: 1,\\n  played: 1,\\n  paused: 1,\\n  seekable: 1,\\n  volume: 1\\n};\\n/**\\n * Enumeration of allowed setters where the keys are method names.\\n *\\n * @type {Object}\\n */\\n\\nvar allowedSetters = {\\n  setCurrentTime: 1,\\n  setMuted: 1,\\n  setVolume: 1\\n};\\n/**\\n * Enumeration of allowed mediators where the keys are method names.\\n *\\n * @type {Object}\\n */\\n\\nvar allowedMediators = {\\n  play: 1,\\n  pause: 1\\n};\\n\\nfunction middlewareIterator(method) {\\n  return function (value, mw) {\\n    // if the previous middleware terminated, pass along the termination\\n    if (value === TERMINATOR) {\\n      return TERMINATOR;\\n    }\\n\\n    if (mw[method]) {\\n      return mw[method](value);\\n    }\\n\\n    return value;\\n  };\\n}\\n\\nfunction executeRight(mws, method, value, terminated) {\\n  for (var i = mws.length - 1; i >= 0; i--) {\\n    var mw = mws[i];\\n\\n    if (mw[method]) {\\n      mw[method](terminated, value);\\n    }\\n  }\\n}\\n/**\\n * Clear the middleware cache for a player.\\n *\\n * @param  {Player} player\\n *         A {@link Player} instance.\\n */\\n\\n\\nfunction clearCacheForPlayer(player) {\\n  middlewareInstances[player.id()] = null;\\n}\\n/**\\n * {\\n *  [playerId]: [[mwFactory, mwInstance], ...]\\n * }\\n *\\n * @private\\n */\\n\\nfunction getOrCreateFactory(player, mwFactory) {\\n  var mws = middlewareInstances[player.id()];\\n  var mw = null;\\n\\n  if (mws === undefined || mws === null) {\\n    mw = mwFactory(player);\\n    middlewareInstances[player.id()] = [[mwFactory, mw]];\\n    return mw;\\n  }\\n\\n  for (var i = 0; i < mws.length; i++) {\\n    var _mws$i = mws[i],\\n        mwf = _mws$i[0],\\n        mwi = _mws$i[1];\\n\\n    if (mwf !== mwFactory) {\\n      continue;\\n    }\\n\\n    mw = mwi;\\n  }\\n\\n  if (mw === null) {\\n    mw = mwFactory(player);\\n    mws.push([mwFactory, mw]);\\n  }\\n\\n  return mw;\\n}\\n\\nfunction setSourceHelper(src, middleware, next, player, acc, lastRun) {\\n  if (src === void 0) {\\n    src = {};\\n  }\\n\\n  if (middleware === void 0) {\\n    middleware = [];\\n  }\\n\\n  if (acc === void 0) {\\n    acc = [];\\n  }\\n\\n  if (lastRun === void 0) {\\n    lastRun = false;\\n  }\\n\\n  var _middleware = middleware,\\n      mwFactory = _middleware[0],\\n      mwrest = _middleware.slice(1); // if mwFactory is a string, then we're at a fork in the road\\n\\n\\n  if (typeof mwFactory === 'string') {\\n    setSourceHelper(src, middlewares[mwFactory], next, player, acc, lastRun); // if we have an mwFactory, call it with the player to get the mw,\\n    // then call the mw's setSource method\\n  } else if (mwFactory) {\\n    var mw = getOrCreateFactory(player, mwFactory); // if setSource isn't present, implicitly select this middleware\\n\\n    if (!mw.setSource) {\\n      acc.push(mw);\\n      return setSourceHelper(src, mwrest, next, player, acc, lastRun);\\n    }\\n\\n    mw.setSource(assign({}, src), function (err, _src) {\\n      // something happened, try the next middleware on the current level\\n      // make sure to use the old src\\n      if (err) {\\n        return setSourceHelper(src, mwrest, next, player, acc, lastRun);\\n      } // we've succeeded, now we need to go deeper\\n\\n\\n      acc.push(mw); // if it's the same type, continue down the current chain\\n      // otherwise, we want to go down the new chain\\n\\n      setSourceHelper(_src, src.type === _src.type ? mwrest : middlewares[_src.type], next, player, acc, lastRun);\\n    });\\n  } else if (mwrest.length) {\\n    setSourceHelper(src, mwrest, next, player, acc, lastRun);\\n  } else if (lastRun) {\\n    next(src, acc);\\n  } else {\\n    setSourceHelper(src, middlewares['*'], next, player, acc, true);\\n  }\\n}\\n\\n/**\\n * Mimetypes\\n *\\n * @see http://hul.harvard.edu/ois/////systems/wax/wax-public-help/mimetypes.htm\\n * @typedef Mimetypes~Kind\\n * @enum\\n */\\n\\nvar MimetypesKind = {\\n  opus: 'video/ogg',\\n  ogv: 'video/ogg',\\n  mp4: 'video/mp4',\\n  mov: 'video/mp4',\\n  m4v: 'video/mp4',\\n  mkv: 'video/x-matroska',\\n  m4a: 'audio/mp4',\\n  mp3: 'audio/mpeg',\\n  aac: 'audio/aac',\\n  oga: 'audio/ogg',\\n  m3u8: 'application/x-mpegURL',\\n  jpg: 'image/jpeg',\\n  jpeg: 'image/jpeg',\\n  gif: 'image/gif',\\n  png: 'image/png',\\n  svg: 'image/svg+xml',\\n  webp: 'image/webp'\\n};\\n/**\\n * Get the mimetype of a given src url if possible\\n *\\n * @param {string} src\\n *        The url to the src\\n *\\n * @return {string}\\n *         return the mimetype if it was known or empty string otherwise\\n */\\n\\nvar getMimetype = function getMimetype(src) {\\n  if (src === void 0) {\\n    src = '';\\n  }\\n\\n  var ext = getFileExtension(src);\\n  var mimetype = MimetypesKind[ext.toLowerCase()];\\n  return mimetype || '';\\n};\\n/**\\n * Find the mime type of a given source string if possible. Uses the player\\n * source cache.\\n *\\n * @param {Player} player\\n *        The player object\\n *\\n * @param {string} src\\n *        The source string\\n *\\n * @return {string}\\n *         The type that was found\\n */\\n\\nvar findMimetype = function findMimetype(player, src) {\\n  if (!src) {\\n    return '';\\n  } // 1. check for the type in the `source` cache\\n\\n\\n  if (player.cache_.source.src === src && player.cache_.source.type) {\\n    return player.cache_.source.type;\\n  } // 2. see if we have this source in our `currentSources` cache\\n\\n\\n  var matchingSources = player.cache_.sources.filter(function (s) {\\n    return s.src === src;\\n  });\\n\\n  if (matchingSources.length) {\\n    return matchingSources[0].type;\\n  } // 3. look for the src url in source elements and use the type there\\n\\n\\n  var sources = player.$$('source');\\n\\n  for (var i = 0; i < sources.length; i++) {\\n    var s = sources[i];\\n\\n    if (s.type && s.src && s.src === src) {\\n      return s.type;\\n    }\\n  } // 4. finally fallback to our list of mime types based on src url extension\\n\\n\\n  return getMimetype(src);\\n};\\n\\n/**\\n * @module filter-source\\n */\\n/**\\n * Filter out single bad source objects or multiple source objects in an\\n * array. Also flattens nested source object arrays into a 1 dimensional\\n * array of source objects.\\n *\\n * @param {Tech~SourceObject|Tech~SourceObject[]} src\\n *        The src object to filter\\n *\\n * @return {Tech~SourceObject[]}\\n *         An array of sourceobjects containing only valid sources\\n *\\n * @private\\n */\\n\\nvar filterSource = function filterSource(src) {\\n  // traverse array\\n  if (Array.isArray(src)) {\\n    var newsrc = [];\\n    src.forEach(function (srcobj) {\\n      srcobj = filterSource(srcobj);\\n\\n      if (Array.isArray(srcobj)) {\\n        newsrc = newsrc.concat(srcobj);\\n      } else if (isObject(srcobj)) {\\n        newsrc.push(srcobj);\\n      }\\n    });\\n    src = newsrc;\\n  } else if (typeof src === 'string' && src.trim()) {\\n    // convert string into object\\n    src = [fixSource({\\n      src: src\\n    })];\\n  } else if (isObject(src) && typeof src.src === 'string' && src.src && src.src.trim()) {\\n    // src is already valid\\n    src = [fixSource(src)];\\n  } else {\\n    // invalid source, turn it into an empty array\\n    src = [];\\n  }\\n\\n  return src;\\n};\\n/**\\n * Checks src mimetype, adding it when possible\\n *\\n * @param {Tech~SourceObject} src\\n *        The src object to check\\n * @return {Tech~SourceObject}\\n *        src Object with known type\\n */\\n\\n\\nfunction fixSource(src) {\\n  if (!src.type) {\\n    var mimetype = getMimetype(src.src);\\n\\n    if (mimetype) {\\n      src.type = mimetype;\\n    }\\n  }\\n\\n  return src;\\n}\\n\\n/**\\n * The `MediaLoader` is the `Component` that decides which playback technology to load\\n * when a player is initialized.\\n *\\n * @extends Component\\n */\\n\\nvar MediaLoader = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MediaLoader, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should attach to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function that is run when this component is ready.\\n   */\\n  function MediaLoader(player, options, ready) {\\n    var _this;\\n\\n    // MediaLoader has no element\\n    var options_ = mergeOptions({\\n      createEl: false\\n    }, options);\\n    _this = _Component.call(this, player, options_, ready) || this; // If there are no sources when the player is initialized,\\n    // load the first supported playback technology.\\n\\n    if (!options.playerOptions.sources || options.playerOptions.sources.length === 0) {\\n      for (var i = 0, j = options.playerOptions.techOrder; i < j.length; i++) {\\n        var techName = toTitleCase(j[i]);\\n        var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\\n        // Remove once that deprecated behavior is removed.\\n\\n        if (!techName) {\\n          tech = Component.getComponent(techName);\\n        } // Check if the browser supports this technology\\n\\n\\n        if (tech && tech.isSupported()) {\\n          player.loadTech_(techName);\\n          break;\\n        }\\n      }\\n    } else {\\n      // Loop through playback technologies (HTML5, Flash) and check for support.\\n      // Then load the best source.\\n      // A few assumptions here:\\n      //   All playback technologies respect preload false.\\n      player.src(options.playerOptions.sources);\\n    }\\n\\n    return _this;\\n  }\\n\\n  return MediaLoader;\\n}(Component);\\n\\nComponent.registerComponent('MediaLoader', MediaLoader);\\n\\n/**\\n * Component which is clickable or keyboard actionable, but is not a\\n * native HTML button.\\n *\\n * @extends Component\\n */\\n\\nvar ClickableComponent = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ClickableComponent, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param  {Player} player\\n   *         The `Player` that this class should be attached to.\\n   *\\n   * @param  {Object} [options]\\n   *         The key/value store of player options.\\n   *\\n   * @param  {function} [options.clickHandler]\\n   *         The function to call when the button is clicked / activated\\n   */\\n  function ClickableComponent(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.emitTapEvents();\\n\\n    _this.enable();\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `ClickableComponent`s DOM element.\\n   *\\n   * @param {string} [tag=div]\\n   *        The element's node type.\\n   *\\n   * @param {Object} [props={}]\\n   *        An object of properties that should be set on the element.\\n   *\\n   * @param {Object} [attributes={}]\\n   *        An object of attributes that should be set on the element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n\\n\\n  var _proto = ClickableComponent.prototype;\\n\\n  _proto.createEl = function createEl(tag, props, attributes) {\\n    if (tag === void 0) {\\n      tag = 'div';\\n    }\\n\\n    if (props === void 0) {\\n      props = {};\\n    }\\n\\n    if (attributes === void 0) {\\n      attributes = {};\\n    }\\n\\n    props = assign({\\n      innerHTML: '<span aria-hidden=\\\"true\\\" class=\\\"vjs-icon-placeholder\\\"></span>',\\n      className: this.buildCSSClass(),\\n      tabIndex: 0\\n    }, props);\\n\\n    if (tag === 'button') {\\n      log.error(\\\"Creating a ClickableComponent with an HTML element of \\\" + tag + \\\" is not supported; use a Button instead.\\\");\\n    } // Add ARIA attributes for clickable element which is not a native HTML button\\n\\n\\n    attributes = assign({\\n      role: 'button'\\n    }, attributes);\\n    this.tabIndex_ = props.tabIndex;\\n\\n    var el = _Component.prototype.createEl.call(this, tag, props, attributes);\\n\\n    this.createControlTextEl(el);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    // remove controlTextEl_ on dispose\\n    this.controlTextEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create a control text element on this `ClickableComponent`\\n   *\\n   * @param {Element} [el]\\n   *        Parent element for the control text.\\n   *\\n   * @return {Element}\\n   *         The control text element that gets created.\\n   */\\n  ;\\n\\n  _proto.createControlTextEl = function createControlTextEl(el) {\\n    this.controlTextEl_ = createEl('span', {\\n      className: 'vjs-control-text'\\n    }, {\\n      // let the screen reader user know that the text of the element may change\\n      'aria-live': 'polite'\\n    });\\n\\n    if (el) {\\n      el.appendChild(this.controlTextEl_);\\n    }\\n\\n    this.controlText(this.controlText_, el);\\n    return this.controlTextEl_;\\n  }\\n  /**\\n   * Get or set the localize text to use for the controls on the `ClickableComponent`.\\n   *\\n   * @param {string} [text]\\n   *        Control text for element.\\n   *\\n   * @param {Element} [el=this.el()]\\n   *        Element to set the title on.\\n   *\\n   * @return {string}\\n   *         - The control text when getting\\n   */\\n  ;\\n\\n  _proto.controlText = function controlText(text, el) {\\n    if (el === void 0) {\\n      el = this.el();\\n    }\\n\\n    if (text === undefined) {\\n      return this.controlText_ || 'Need Text';\\n    }\\n\\n    var localizedText = this.localize(text);\\n    this.controlText_ = text;\\n    textContent(this.controlTextEl_, localizedText);\\n\\n    if (!this.nonIconControl) {\\n      // Set title attribute if only an icon is shown\\n      el.setAttribute('title', localizedText);\\n    }\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-control vjs-button \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Enable this `ClickableComponent`\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    if (!this.enabled_) {\\n      this.enabled_ = true;\\n      this.removeClass('vjs-disabled');\\n      this.el_.setAttribute('aria-disabled', 'false');\\n\\n      if (typeof this.tabIndex_ !== 'undefined') {\\n        this.el_.setAttribute('tabIndex', this.tabIndex_);\\n      }\\n\\n      this.on(['tap', 'click'], this.handleClick);\\n      this.on('keydown', this.handleKeyDown);\\n    }\\n  }\\n  /**\\n   * Disable this `ClickableComponent`\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    this.enabled_ = false;\\n    this.addClass('vjs-disabled');\\n    this.el_.setAttribute('aria-disabled', 'true');\\n\\n    if (typeof this.tabIndex_ !== 'undefined') {\\n      this.el_.removeAttribute('tabIndex');\\n    }\\n\\n    this.off('mouseover', this.handleMouseOver);\\n    this.off('mouseout', this.handleMouseOut);\\n    this.off(['tap', 'click'], this.handleClick);\\n    this.off('keydown', this.handleKeyDown);\\n  }\\n  /**\\n   * Event handler that is called when a `ClickableComponent` receives a\\n   * `click` or `tap` event.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `tap` or `click` event that caused this function to be called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (this.options_.clickHandler) {\\n      this.options_.clickHandler.call(this, arguments);\\n    }\\n  }\\n  /**\\n   * Event handler that is called when a `ClickableComponent` receives a\\n   * `keydown` event.\\n   *\\n   * By default, if the key is Space or Enter, it will trigger a `click` event.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Support Space or Enter key operation to fire a click event. Also,\\n    // prevent the event from propagating through the DOM and triggering\\n    // Player hotkeys.\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Enter')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.trigger('click');\\n    } else {\\n      // Pass keypress handling up for unsupported keys\\n      _Component.prototype.handleKeyDown.call(this, event);\\n    }\\n  };\\n\\n  return ClickableComponent;\\n}(Component);\\n\\nComponent.registerComponent('ClickableComponent', ClickableComponent);\\n\\n/**\\n * A `ClickableComponent` that handles showing the poster image for the player.\\n *\\n * @extends ClickableComponent\\n */\\n\\nvar PosterImage = /*#__PURE__*/function (_ClickableComponent) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PosterImage, _ClickableComponent);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should attach to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PosterImage(player, options) {\\n    var _this;\\n\\n    _this = _ClickableComponent.call(this, player, options) || this;\\n\\n    _this.update();\\n\\n    player.on('posterchange', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update));\\n    return _this;\\n  }\\n  /**\\n   * Clean up and dispose of the `PosterImage`.\\n   */\\n\\n\\n  var _proto = PosterImage.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    this.player().off('posterchange', this.update);\\n\\n    _ClickableComponent.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create the `PosterImage`s DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = createEl('div', {\\n      className: 'vjs-poster',\\n      // Don't want poster to be tabbable.\\n      tabIndex: -1\\n    });\\n    return el;\\n  }\\n  /**\\n   * An {@link EventTarget~EventListener} for {@link Player#posterchange} events.\\n   *\\n   * @listens Player#posterchange\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `Player#posterchange` event that triggered this function.\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var url = this.player().poster();\\n    this.setSrc(url); // If there's no poster source we should display:none on this component\\n    // so it's not still clickable or right-clickable\\n\\n    if (url) {\\n      this.show();\\n    } else {\\n      this.hide();\\n    }\\n  }\\n  /**\\n   * Set the source of the `PosterImage` depending on the display method.\\n   *\\n   * @param {string} url\\n   *        The URL to the source for the `PosterImage`.\\n   */\\n  ;\\n\\n  _proto.setSrc = function setSrc(url) {\\n    var backgroundImage = ''; // Any falsy value should stay as an empty string, otherwise\\n    // this will throw an extra error\\n\\n    if (url) {\\n      backgroundImage = \\\"url(\\\\\\\"\\\" + url + \\\"\\\\\\\")\\\";\\n    }\\n\\n    this.el_.style.backgroundImage = backgroundImage;\\n  }\\n  /**\\n   * An {@link EventTarget~EventListener} for clicks on the `PosterImage`. See\\n   * {@link ClickableComponent#handleClick} for instances where this will be triggered.\\n   *\\n   * @listens tap\\n   * @listens click\\n   * @listens keydown\\n   *\\n   * @param {EventTarget~Event} event\\n   +        The `click`, `tap` or `keydown` event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    // We don't want a click to trigger playback when controls are disabled\\n    if (!this.player_.controls()) {\\n      return;\\n    }\\n\\n    var sourceIsEncrypted = this.player_.usingPlugin('eme') && this.player_.eme.sessions && this.player_.eme.sessions.length > 0;\\n\\n    if (this.player_.tech(true) && // We've observed a bug in IE and Edge when playing back DRM content where\\n    // calling .focus() on the video element causes the video to go black,\\n    // so we avoid it in that specific case\\n    !((IE_VERSION || IS_EDGE) && sourceIsEncrypted)) {\\n      this.player_.tech(true).focus();\\n    }\\n\\n    if (this.player_.paused()) {\\n      silencePromise(this.player_.play());\\n    } else {\\n      this.player_.pause();\\n    }\\n  };\\n\\n  return PosterImage;\\n}(ClickableComponent);\\n\\nComponent.registerComponent('PosterImage', PosterImage);\\n\\nvar darkGray = '#222';\\nvar lightGray = '#ccc';\\nvar fontMap = {\\n  monospace: 'monospace',\\n  sansSerif: 'sans-serif',\\n  serif: 'serif',\\n  monospaceSansSerif: '\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace',\\n  monospaceSerif: '\\\"Courier New\\\", monospace',\\n  proportionalSansSerif: 'sans-serif',\\n  proportionalSerif: 'serif',\\n  casual: '\\\"Comic Sans MS\\\", Impact, fantasy',\\n  script: '\\\"Monotype Corsiva\\\", cursive',\\n  smallcaps: '\\\"Andale Mono\\\", \\\"Lucida Console\\\", monospace, sans-serif'\\n};\\n/**\\n * Construct an rgba color from a given hex color code.\\n *\\n * @param {number} color\\n *        Hex number for color, like #f0e or #f604e2.\\n *\\n * @param {number} opacity\\n *        Value for opacity, 0.0 - 1.0.\\n *\\n * @return {string}\\n *         The rgba color that was created, like 'rgba(255, 0, 0, 0.3)'.\\n */\\n\\nfunction constructColor(color, opacity) {\\n  var hex;\\n\\n  if (color.length === 4) {\\n    // color looks like \\\"#f0e\\\"\\n    hex = color[1] + color[1] + color[2] + color[2] + color[3] + color[3];\\n  } else if (color.length === 7) {\\n    // color looks like \\\"#f604e2\\\"\\n    hex = color.slice(1);\\n  } else {\\n    throw new Error('Invalid color code provided, ' + color + '; must be formatted as e.g. #f0e or #f604e2.');\\n  }\\n\\n  return 'rgba(' + parseInt(hex.slice(0, 2), 16) + ',' + parseInt(hex.slice(2, 4), 16) + ',' + parseInt(hex.slice(4, 6), 16) + ',' + opacity + ')';\\n}\\n/**\\n * Try to update the style of a DOM element. Some style changes will throw an error,\\n * particularly in IE8. Those should be noops.\\n *\\n * @param {Element} el\\n *        The DOM element to be styled.\\n *\\n * @param {string} style\\n *        The CSS property on the element that should be styled.\\n *\\n * @param {string} rule\\n *        The style rule that should be applied to the property.\\n *\\n * @private\\n */\\n\\nfunction tryUpdateStyle(el, style, rule) {\\n  try {\\n    el.style[style] = rule;\\n  } catch (e) {\\n    // Satisfies linter.\\n    return;\\n  }\\n}\\n/**\\n * The component for displaying text track cues.\\n *\\n * @extends Component\\n */\\n\\n\\nvar TextTrackDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when `TextTrackDisplay` is ready.\\n   */\\n  function TextTrackDisplay(player, options, ready) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options, ready) || this;\\n    var updateDisplayHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.updateDisplay);\\n    player.on('loadstart', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.toggleDisplay));\\n    player.on('texttrackchange', updateDisplayHandler);\\n    player.on('loadedmetadata', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.preselectTrack)); // This used to be called during player init, but was causing an error\\n    // if a track should show by default and the display hadn't loaded yet.\\n    // Should probably be moved to an external track loader when we support\\n    // tracks that don't need a display.\\n\\n    player.ready(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), function () {\\n      if (player.tech_ && player.tech_.featuresNativeTextTracks) {\\n        this.hide();\\n        return;\\n      }\\n\\n      player.on('fullscreenchange', updateDisplayHandler);\\n      player.on('playerresize', updateDisplayHandler);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.addEventListener('orientationchange', updateDisplayHandler);\\n      player.on('dispose', function () {\\n        return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.removeEventListener('orientationchange', updateDisplayHandler);\\n      });\\n      var tracks = this.options_.playerOptions.tracks || [];\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        this.player_.addRemoteTextTrack(tracks[i], true);\\n      }\\n\\n      this.preselectTrack();\\n    }));\\n    return _this;\\n  }\\n  /**\\n  * Preselect a track following this precedence:\\n  * - matches the previously selected {@link TextTrack}'s language and kind\\n  * - matches the previously selected {@link TextTrack}'s language only\\n  * - is the first default captions track\\n  * - is the first default descriptions track\\n  *\\n  * @listens Player#loadstart\\n  */\\n\\n\\n  var _proto = TextTrackDisplay.prototype;\\n\\n  _proto.preselectTrack = function preselectTrack() {\\n    var modes = {\\n      captions: 1,\\n      subtitles: 1\\n    };\\n    var trackList = this.player_.textTracks();\\n    var userPref = this.player_.cache_.selectedLanguage;\\n    var firstDesc;\\n    var firstCaptions;\\n    var preferredTrack;\\n\\n    for (var i = 0; i < trackList.length; i++) {\\n      var track = trackList[i];\\n\\n      if (userPref && userPref.enabled && userPref.language && userPref.language === track.language && track.kind in modes) {\\n        // Always choose the track that matches both language and kind\\n        if (track.kind === userPref.kind) {\\n          preferredTrack = track; // or choose the first track that matches language\\n        } else if (!preferredTrack) {\\n          preferredTrack = track;\\n        } // clear everything if offTextTrackMenuItem was clicked\\n\\n      } else if (userPref && !userPref.enabled) {\\n        preferredTrack = null;\\n        firstDesc = null;\\n        firstCaptions = null;\\n      } else if (track[\\\"default\\\"]) {\\n        if (track.kind === 'descriptions' && !firstDesc) {\\n          firstDesc = track;\\n        } else if (track.kind in modes && !firstCaptions) {\\n          firstCaptions = track;\\n        }\\n      }\\n    } // The preferredTrack matches the user preference and takes\\n    // precedence over all the other tracks.\\n    // So, display the preferredTrack before the first default track\\n    // and the subtitles/captions track before the descriptions track\\n\\n\\n    if (preferredTrack) {\\n      preferredTrack.mode = 'showing';\\n    } else if (firstCaptions) {\\n      firstCaptions.mode = 'showing';\\n    } else if (firstDesc) {\\n      firstDesc.mode = 'showing';\\n    }\\n  }\\n  /**\\n   * Turn display of {@link TextTrack}'s from the current state into the other state.\\n   * There are only two states:\\n   * - 'shown'\\n   * - 'hidden'\\n   *\\n   * @listens Player#loadstart\\n   */\\n  ;\\n\\n  _proto.toggleDisplay = function toggleDisplay() {\\n    if (this.player_.tech_ && this.player_.tech_.featuresNativeTextTracks) {\\n      this.hide();\\n    } else {\\n      this.show();\\n    }\\n  }\\n  /**\\n   * Create the {@link Component}'s DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-text-track-display'\\n    }, {\\n      'aria-live': 'off',\\n      'aria-atomic': 'true'\\n    });\\n  }\\n  /**\\n   * Clear all displayed {@link TextTrack}s.\\n   */\\n  ;\\n\\n  _proto.clearDisplay = function clearDisplay() {\\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT === 'function') {\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, [], this.el_);\\n    }\\n  }\\n  /**\\n   * Update the displayed TextTrack when a either a {@link Player#texttrackchange} or\\n   * a {@link Player#fullscreenchange} is fired.\\n   *\\n   * @listens Player#texttrackchange\\n   * @listens Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.updateDisplay = function updateDisplay() {\\n    var tracks = this.player_.textTracks();\\n    var allowMultipleShowingTracks = this.options_.allowMultipleShowingTracks;\\n    this.clearDisplay();\\n\\n    if (allowMultipleShowingTracks) {\\n      var showingTracks = [];\\n\\n      for (var _i = 0; _i < tracks.length; ++_i) {\\n        var track = tracks[_i];\\n\\n        if (track.mode !== 'showing') {\\n          continue;\\n        }\\n\\n        showingTracks.push(track);\\n      }\\n\\n      this.updateForTrack(showingTracks);\\n      return;\\n    } //  Track display prioritization model: if multiple tracks are 'showing',\\n    //  display the first 'subtitles' or 'captions' track which is 'showing',\\n    //  otherwise display the first 'descriptions' track which is 'showing'\\n\\n\\n    var descriptionsTrack = null;\\n    var captionsSubtitlesTrack = null;\\n    var i = tracks.length;\\n\\n    while (i--) {\\n      var _track = tracks[i];\\n\\n      if (_track.mode === 'showing') {\\n        if (_track.kind === 'descriptions') {\\n          descriptionsTrack = _track;\\n        } else {\\n          captionsSubtitlesTrack = _track;\\n        }\\n      }\\n    }\\n\\n    if (captionsSubtitlesTrack) {\\n      if (this.getAttribute('aria-live') !== 'off') {\\n        this.setAttribute('aria-live', 'off');\\n      }\\n\\n      this.updateForTrack(captionsSubtitlesTrack);\\n    } else if (descriptionsTrack) {\\n      if (this.getAttribute('aria-live') !== 'assertive') {\\n        this.setAttribute('aria-live', 'assertive');\\n      }\\n\\n      this.updateForTrack(descriptionsTrack);\\n    }\\n  }\\n  /**\\n   * Style {@Link TextTrack} activeCues according to {@Link TextTrackSettings}.\\n   *\\n   * @param {TextTrack} track\\n   *        Text track object containing active cues to style.\\n   */\\n  ;\\n\\n  _proto.updateDisplayState = function updateDisplayState(track) {\\n    var overrides = this.player_.textTrackSettings.getValues();\\n    var cues = track.activeCues;\\n    var i = cues.length;\\n\\n    while (i--) {\\n      var cue = cues[i];\\n\\n      if (!cue) {\\n        continue;\\n      }\\n\\n      var cueDiv = cue.displayState;\\n\\n      if (overrides.color) {\\n        cueDiv.firstChild.style.color = overrides.color;\\n      }\\n\\n      if (overrides.textOpacity) {\\n        tryUpdateStyle(cueDiv.firstChild, 'color', constructColor(overrides.color || '#fff', overrides.textOpacity));\\n      }\\n\\n      if (overrides.backgroundColor) {\\n        cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\\n      }\\n\\n      if (overrides.backgroundOpacity) {\\n        tryUpdateStyle(cueDiv.firstChild, 'backgroundColor', constructColor(overrides.backgroundColor || '#000', overrides.backgroundOpacity));\\n      }\\n\\n      if (overrides.windowColor) {\\n        if (overrides.windowOpacity) {\\n          tryUpdateStyle(cueDiv, 'backgroundColor', constructColor(overrides.windowColor, overrides.windowOpacity));\\n        } else {\\n          cueDiv.style.backgroundColor = overrides.windowColor;\\n        }\\n      }\\n\\n      if (overrides.edgeStyle) {\\n        if (overrides.edgeStyle === 'dropshadow') {\\n          cueDiv.firstChild.style.textShadow = \\\"2px 2px 3px \\\" + darkGray + \\\", 2px 2px 4px \\\" + darkGray + \\\", 2px 2px 5px \\\" + darkGray;\\n        } else if (overrides.edgeStyle === 'raised') {\\n          cueDiv.firstChild.style.textShadow = \\\"1px 1px \\\" + darkGray + \\\", 2px 2px \\\" + darkGray + \\\", 3px 3px \\\" + darkGray;\\n        } else if (overrides.edgeStyle === 'depressed') {\\n          cueDiv.firstChild.style.textShadow = \\\"1px 1px \\\" + lightGray + \\\", 0 1px \\\" + lightGray + \\\", -1px -1px \\\" + darkGray + \\\", 0 -1px \\\" + darkGray;\\n        } else if (overrides.edgeStyle === 'uniform') {\\n          cueDiv.firstChild.style.textShadow = \\\"0 0 4px \\\" + darkGray + \\\", 0 0 4px \\\" + darkGray + \\\", 0 0 4px \\\" + darkGray + \\\", 0 0 4px \\\" + darkGray;\\n        }\\n      }\\n\\n      if (overrides.fontPercent && overrides.fontPercent !== 1) {\\n        var fontSize = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.parseFloat(cueDiv.style.fontSize);\\n        cueDiv.style.fontSize = fontSize * overrides.fontPercent + 'px';\\n        cueDiv.style.height = 'auto';\\n        cueDiv.style.top = 'auto';\\n        cueDiv.style.bottom = '2px';\\n      }\\n\\n      if (overrides.fontFamily && overrides.fontFamily !== 'default') {\\n        if (overrides.fontFamily === 'small-caps') {\\n          cueDiv.firstChild.style.fontVariant = 'small-caps';\\n        } else {\\n          cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\\n        }\\n      }\\n    }\\n  }\\n  /**\\n   * Add an {@link TextTrack} to to the {@link Tech}s {@link TextTrackList}.\\n   *\\n   * @param {TextTrack|TextTrack[]} tracks\\n   *        Text track object or text track array to be added to the list.\\n   */\\n  ;\\n\\n  _proto.updateForTrack = function updateForTrack(tracks) {\\n    if (!Array.isArray(tracks)) {\\n      tracks = [tracks];\\n    }\\n\\n    if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function' || tracks.every(function (track) {\\n      return !track.activeCues;\\n    })) {\\n      return;\\n    }\\n\\n    var cues = []; // push all active track cues\\n\\n    for (var i = 0; i < tracks.length; ++i) {\\n      var track = tracks[i];\\n\\n      for (var j = 0; j < track.activeCues.length; ++j) {\\n        cues.push(track.activeCues[j]);\\n      }\\n    } // removes all cues before it processes new ones\\n\\n\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.processCues(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, cues, this.el_); // add unique class to each language text track & add settings styling if necessary\\n\\n    for (var _i2 = 0; _i2 < tracks.length; ++_i2) {\\n      var _track2 = tracks[_i2];\\n\\n      for (var _j = 0; _j < _track2.activeCues.length; ++_j) {\\n        var cueEl = _track2.activeCues[_j].displayState;\\n        addClass(cueEl, 'vjs-text-track-cue');\\n        addClass(cueEl, 'vjs-text-track-cue-' + (_track2.language ? _track2.language : _i2));\\n      }\\n\\n      if (this.player_.textTrackSettings) {\\n        this.updateDisplayState(_track2);\\n      }\\n    }\\n  };\\n\\n  return TextTrackDisplay;\\n}(Component);\\n\\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\\n\\n/**\\n * A loading spinner for use during waiting/loading events.\\n *\\n * @extends Component\\n */\\n\\nvar LoadingSpinner = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LoadingSpinner, _Component);\\n\\n  function LoadingSpinner() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = LoadingSpinner.prototype;\\n\\n  /**\\n   * Create the `LoadingSpinner`s DOM element.\\n   *\\n   * @return {Element}\\n   *         The dom element that gets created.\\n   */\\n  _proto.createEl = function createEl$1() {\\n    var isAudio = this.player_.isAudio();\\n    var playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');\\n    var controlText = createEl('span', {\\n      className: 'vjs-control-text',\\n      innerHTML: this.localize('{1} is loading.', [playerType])\\n    });\\n\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-loading-spinner',\\n      dir: 'ltr'\\n    });\\n\\n    el.appendChild(controlText);\\n    return el;\\n  };\\n\\n  return LoadingSpinner;\\n}(Component);\\n\\nComponent.registerComponent('LoadingSpinner', LoadingSpinner);\\n\\n/**\\n * Base class for all buttons.\\n *\\n * @extends ClickableComponent\\n */\\n\\nvar Button = /*#__PURE__*/function (_ClickableComponent) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Button, _ClickableComponent);\\n\\n  function Button() {\\n    return _ClickableComponent.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = Button.prototype;\\n\\n  /**\\n   * Create the `Button`s DOM element.\\n   *\\n   * @param {string} [tag=\\\"button\\\"]\\n   *        The element's node type. This argument is IGNORED: no matter what\\n   *        is passed, it will always create a `button` element.\\n   *\\n   * @param {Object} [props={}]\\n   *        An object of properties that should be set on the element.\\n   *\\n   * @param {Object} [attributes={}]\\n   *        An object of attributes that should be set on the element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  _proto.createEl = function createEl(tag, props, attributes) {\\n    if (props === void 0) {\\n      props = {};\\n    }\\n\\n    if (attributes === void 0) {\\n      attributes = {};\\n    }\\n\\n    tag = 'button';\\n    props = assign({\\n      innerHTML: '<span aria-hidden=\\\"true\\\" class=\\\"vjs-icon-placeholder\\\"></span>',\\n      className: this.buildCSSClass()\\n    }, props); // Add attributes for button element\\n\\n    attributes = assign({\\n      // Necessary since the default button type is \\\"submit\\\"\\n      type: 'button'\\n    }, attributes);\\n    var el = Component.prototype.createEl.call(this, tag, props, attributes);\\n    this.createControlTextEl(el);\\n    return el;\\n  }\\n  /**\\n   * Add a child `Component` inside of this `Button`.\\n   *\\n   * @param {string|Component} child\\n   *        The name or instance of a child to add.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of options that will get passed to children of\\n   *        the child.\\n   *\\n   * @return {Component}\\n   *         The `Component` that gets added as a child. When using a string the\\n   *         `Component` will get created by this process.\\n   *\\n   * @deprecated since version 5\\n   */\\n  ;\\n\\n  _proto.addChild = function addChild(child, options) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    var className = this.constructor.name;\\n    log.warn(\\\"Adding an actionable (user controllable) child to a Button (\\\" + className + \\\") is not supported; use a ClickableComponent instead.\\\"); // Avoid the error message generated by ClickableComponent's addChild method\\n\\n    return Component.prototype.addChild.call(this, child, options);\\n  }\\n  /**\\n   * Enable the `Button` element so that it can be activated or clicked. Use this with\\n   * {@link Button#disable}.\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    _ClickableComponent.prototype.enable.call(this);\\n\\n    this.el_.removeAttribute('disabled');\\n  }\\n  /**\\n   * Disable the `Button` element so that it cannot be activated or clicked. Use this with\\n   * {@link Button#enable}.\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    _ClickableComponent.prototype.disable.call(this);\\n\\n    this.el_.setAttribute('disabled', 'disabled');\\n  }\\n  /**\\n   * This gets called when a `Button` has focus and `keydown` is triggered via a key\\n   * press.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to get called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Ignore Space or Enter key operation, which is handled by the browser for\\n    // a button - though not for its super class, ClickableComponent. Also,\\n    // prevent the event from propagating through the DOM and triggering Player\\n    // hotkeys. We do not preventDefault here because we _want_ the browser to\\n    // handle it.\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Enter')) {\\n      event.stopPropagation();\\n      return;\\n    } // Pass keypress handling up for unsupported keys\\n\\n\\n    _ClickableComponent.prototype.handleKeyDown.call(this, event);\\n  };\\n\\n  return Button;\\n}(ClickableComponent);\\n\\nComponent.registerComponent('Button', Button);\\n\\n/**\\n * The initial play button that shows before the video has played. The hiding of the\\n * `BigPlayButton` get done via CSS and `Player` states.\\n *\\n * @extends Button\\n */\\n\\nvar BigPlayButton = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(BigPlayButton, _Button);\\n\\n  function BigPlayButton(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n    _this.mouseused_ = false;\\n\\n    _this.on('mousedown', _this.handleMouseDown);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object. Always returns 'vjs-big-play-button'.\\n   */\\n\\n\\n  var _proto = BigPlayButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-big-play-button';\\n  }\\n  /**\\n   * This gets called when a `BigPlayButton` \\\"clicked\\\". See {@link ClickableComponent}\\n   * for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var playPromise = this.player_.play(); // exit early if clicked via the mouse\\n\\n    if (this.mouseused_ && event.clientX && event.clientY) {\\n      var sourceIsEncrypted = this.player_.usingPlugin('eme') && this.player_.eme.sessions && this.player_.eme.sessions.length > 0;\\n      silencePromise(playPromise);\\n\\n      if (this.player_.tech(true) && // We've observed a bug in IE and Edge when playing back DRM content where\\n      // calling .focus() on the video element causes the video to go black,\\n      // so we avoid it in that specific case\\n      !((IE_VERSION || IS_EDGE) && sourceIsEncrypted)) {\\n        this.player_.tech(true).focus();\\n      }\\n\\n      return;\\n    }\\n\\n    var cb = this.player_.getChild('controlBar');\\n    var playToggle = cb && cb.getChild('playToggle');\\n\\n    if (!playToggle) {\\n      this.player_.tech(true).focus();\\n      return;\\n    }\\n\\n    var playFocus = function playFocus() {\\n      return playToggle.focus();\\n    };\\n\\n    if (isPromise(playPromise)) {\\n      playPromise.then(playFocus, function () {});\\n    } else {\\n      this.setTimeout(playFocus, 1);\\n    }\\n  };\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    this.mouseused_ = false;\\n\\n    _Button.prototype.handleKeyDown.call(this, event);\\n  };\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    this.mouseused_ = true;\\n  };\\n\\n  return BigPlayButton;\\n}(Button);\\n/**\\n * The text that should display over the `BigPlayButton`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nBigPlayButton.prototype.controlText_ = 'Play Video';\\nComponent.registerComponent('BigPlayButton', BigPlayButton);\\n\\n/**\\n * The `CloseButton` is a `{@link Button}` that fires a `close` event when\\n * it gets clicked.\\n *\\n * @extends Button\\n */\\n\\nvar CloseButton = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CloseButton, _Button);\\n\\n  /**\\n  * Creates an instance of the this class.\\n  *\\n  * @param  {Player} player\\n  *         The `Player` that this class should be attached to.\\n  *\\n  * @param  {Object} [options]\\n  *         The key/value store of player options.\\n  */\\n  function CloseButton(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.controlText(options && options.controlText || _this.localize('Close'));\\n\\n    return _this;\\n  }\\n  /**\\n  * Builds the default DOM `className`.\\n  *\\n  * @return {string}\\n  *         The DOM `className` for this object.\\n  */\\n\\n\\n  var _proto = CloseButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-close-button \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * This gets called when a `CloseButton` gets clicked. See\\n   * {@link ClickableComponent#handleClick} for more information on when\\n   * this will be triggered\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   * @fires CloseButton#close\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    /**\\n     * Triggered when the a `CloseButton` is clicked.\\n     *\\n     * @event CloseButton#close\\n     * @type {EventTarget~Event}\\n     *\\n     * @property {boolean} [bubbles=false]\\n     *           set to false so that the close event does not\\n     *           bubble up to parents if there is no listener\\n     */\\n    this.trigger({\\n      type: 'close',\\n      bubbles: false\\n    });\\n  }\\n  /**\\n   * Event handler that is called when a `CloseButton` receives a\\n   * `keydown` event.\\n   *\\n   * By default, if the key is Esc, it will trigger a `click` event.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Esc button will trigger `click` event\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.trigger('click');\\n    } else {\\n      // Pass keypress handling up for unsupported keys\\n      _Button.prototype.handleKeyDown.call(this, event);\\n    }\\n  };\\n\\n  return CloseButton;\\n}(Button);\\n\\nComponent.registerComponent('CloseButton', CloseButton);\\n\\n/**\\n * Button to toggle between play and pause.\\n *\\n * @extends Button\\n */\\n\\nvar PlayToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlayToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function PlayToggle(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _Button.call(this, player, options) || this; // show or hide replay icon\\n\\n    options.replay = options.replay === undefined || options.replay;\\n\\n    _this.on(player, 'play', _this.handlePlay);\\n\\n    _this.on(player, 'pause', _this.handlePause);\\n\\n    if (options.replay) {\\n      _this.on(player, 'ended', _this.handleEnded);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = PlayToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-play-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * This gets called when an `PlayToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (this.player_.paused()) {\\n      this.player_.play();\\n    } else {\\n      this.player_.pause();\\n    }\\n  }\\n  /**\\n   * This gets called once after the video has ended and the user seeks so that\\n   * we can change the replay button back to a play button.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#seeked\\n   */\\n  ;\\n\\n  _proto.handleSeeked = function handleSeeked(event) {\\n    this.removeClass('vjs-ended');\\n\\n    if (this.player_.paused()) {\\n      this.handlePause(event);\\n    } else {\\n      this.handlePlay(event);\\n    }\\n  }\\n  /**\\n   * Add the vjs-playing class to the element so it can change appearance.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#play\\n   */\\n  ;\\n\\n  _proto.handlePlay = function handlePlay(event) {\\n    this.removeClass('vjs-ended');\\n    this.removeClass('vjs-paused');\\n    this.addClass('vjs-playing'); // change the button text to \\\"Pause\\\"\\n\\n    this.controlText('Pause');\\n  }\\n  /**\\n   * Add the vjs-paused class to the element so it can change appearance.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#pause\\n   */\\n  ;\\n\\n  _proto.handlePause = function handlePause(event) {\\n    this.removeClass('vjs-playing');\\n    this.addClass('vjs-paused'); // change the button text to \\\"Play\\\"\\n\\n    this.controlText('Play');\\n  }\\n  /**\\n   * Add the vjs-ended class to the element so it can change appearance\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#ended\\n   */\\n  ;\\n\\n  _proto.handleEnded = function handleEnded(event) {\\n    this.removeClass('vjs-playing');\\n    this.addClass('vjs-ended'); // change the button text to \\\"Replay\\\"\\n\\n    this.controlText('Replay'); // on the next seek remove the replay button\\n\\n    this.one(this.player_, 'seeked', this.handleSeeked);\\n  };\\n\\n  return PlayToggle;\\n}(Button);\\n/**\\n * The text that should display over the `PlayToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPlayToggle.prototype.controlText_ = 'Play';\\nComponent.registerComponent('PlayToggle', PlayToggle);\\n\\n/**\\n * @file format-time.js\\n * @module format-time\\n */\\n\\n/**\\n * Format seconds as a time string, H:MM:SS or M:SS. Supplying a guide (in\\n * seconds) will force a number of leading zeros to cover the length of the\\n * guide.\\n *\\n * @private\\n * @param  {number} seconds\\n *         Number of seconds to be turned into a string\\n *\\n * @param  {number} guide\\n *         Number (in seconds) to model the string after\\n *\\n * @return {string}\\n *         Time formatted as H:MM:SS or M:SS\\n */\\nvar defaultImplementation = function defaultImplementation(seconds, guide) {\\n  seconds = seconds < 0 ? 0 : seconds;\\n  var s = Math.floor(seconds % 60);\\n  var m = Math.floor(seconds / 60 % 60);\\n  var h = Math.floor(seconds / 3600);\\n  var gm = Math.floor(guide / 60 % 60);\\n  var gh = Math.floor(guide / 3600); // handle invalid times\\n\\n  if (isNaN(seconds) || seconds === Infinity) {\\n    // '-' is false for all relational operators (e.g. <, >=) so this setting\\n    // will add the minimum number of fields specified by the guide\\n    h = m = s = '-';\\n  } // Check if we need to show hours\\n\\n\\n  h = h > 0 || gh > 0 ? h + ':' : ''; // If hours are showing, we may need to add a leading zero.\\n  // Always show at least one digit of minutes.\\n\\n  m = ((h || gm >= 10) && m < 10 ? '0' + m : m) + ':'; // Check if leading zero is need for seconds\\n\\n  s = s < 10 ? '0' + s : s;\\n  return h + m + s;\\n}; // Internal pointer to the current implementation.\\n\\n\\nvar implementation = defaultImplementation;\\n/**\\n * Replaces the default formatTime implementation with a custom implementation.\\n *\\n * @param {Function} customImplementation\\n *        A function which will be used in place of the default formatTime\\n *        implementation. Will receive the current time in seconds and the\\n *        guide (in seconds) as arguments.\\n */\\n\\nfunction setFormatTime(customImplementation) {\\n  implementation = customImplementation;\\n}\\n/**\\n * Resets formatTime to the default implementation.\\n */\\n\\nfunction resetFormatTime() {\\n  implementation = defaultImplementation;\\n}\\n/**\\n * Delegates to either the default time formatting function or a custom\\n * function supplied via `setFormatTime`.\\n *\\n * Formats seconds as a time string (H:MM:SS or M:SS). Supplying a\\n * guide (in seconds) will force a number of leading zeros to cover the\\n * length of the guide.\\n *\\n * @static\\n * @example  formatTime(125, 600) === \\\"02:05\\\"\\n * @param    {number} seconds\\n *           Number of seconds to be turned into a string\\n *\\n * @param    {number} guide\\n *           Number (in seconds) to model the string after\\n *\\n * @return   {string}\\n *           Time formatted as H:MM:SS or M:SS\\n */\\n\\nfunction formatTime(seconds, guide) {\\n  if (guide === void 0) {\\n    guide = seconds;\\n  }\\n\\n  return implementation(seconds, guide);\\n}\\n\\n/**\\n * Displays time information about the video\\n *\\n * @extends Component\\n */\\n\\nvar TimeDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TimeDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TimeDisplay(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.on(player, ['timeupdate', 'ended'], _this.updateContent);\\n\\n    _this.updateTextNode_();\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = TimeDisplay.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var className = this.buildCSSClass();\\n\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: className + \\\" vjs-time-control vjs-control\\\",\\n      innerHTML: \\\"<span class=\\\\\\\"vjs-control-text\\\\\\\" role=\\\\\\\"presentation\\\\\\\">\\\" + this.localize(this.labelText_) + \\\"\\\\xA0</span>\\\"\\n    });\\n\\n    this.contentEl_ = createEl('span', {\\n      className: className + \\\"-display\\\"\\n    }, {\\n      // tell screen readers not to automatically read the time as it changes\\n      'aria-live': 'off',\\n      // span elements have no implicit role, but some screen readers (notably VoiceOver)\\n      // treat them as a break between items in the DOM when using arrow keys\\n      // (or left-to-right swipes on iOS) to read contents of a page. Using\\n      // role='presentation' causes VoiceOver to NOT treat this span as a break.\\n      'role': 'presentation'\\n    });\\n    el.appendChild(this.contentEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n    this.textNode_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Updates the time display text node with a new time\\n   *\\n   * @param {number} [time=0] the time to update to\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateTextNode_ = function updateTextNode_(time) {\\n    var _this2 = this;\\n\\n    if (time === void 0) {\\n      time = 0;\\n    }\\n\\n    time = formatTime(time);\\n\\n    if (this.formattedTime_ === time) {\\n      return;\\n    }\\n\\n    this.formattedTime_ = time;\\n    this.requestAnimationFrame(function () {\\n      if (!_this2.contentEl_) {\\n        return;\\n      }\\n\\n      var oldNode = _this2.textNode_;\\n      _this2.textNode_ = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(_this2.formattedTime_);\\n\\n      if (!_this2.textNode_) {\\n        return;\\n      }\\n\\n      if (oldNode) {\\n        _this2.contentEl_.replaceChild(_this2.textNode_, oldNode);\\n      } else {\\n        _this2.contentEl_.appendChild(_this2.textNode_);\\n      }\\n    });\\n  }\\n  /**\\n   * To be filled out in the child class, should update the displayed time\\n   * in accordance with the fact that the current time has changed.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate`  event that caused this to run.\\n   *\\n   * @listens Player#timeupdate\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {};\\n\\n  return TimeDisplay;\\n}(Component);\\n/**\\n * The text that is added to the `TimeDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nTimeDisplay.prototype.labelText_ = 'Time';\\n/**\\n * The text that should display over the `TimeDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nTimeDisplay.prototype.controlText_ = 'Time';\\nComponent.registerComponent('TimeDisplay', TimeDisplay);\\n\\n/**\\n * Displays the current time\\n *\\n * @extends Component\\n */\\n\\nvar CurrentTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CurrentTimeDisplay, _TimeDisplay);\\n\\n  function CurrentTimeDisplay() {\\n    return _TimeDisplay.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = CurrentTimeDisplay.prototype;\\n\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-current-time';\\n  }\\n  /**\\n   * Update current time display\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate` event that caused this function to run.\\n   *\\n   * @listens Player#timeupdate\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {\\n    // Allows for smooth scrubbing, when player can't keep up.\\n    var time;\\n\\n    if (this.player_.ended()) {\\n      time = this.player_.duration();\\n    } else {\\n      time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\\n    }\\n\\n    this.updateTextNode_(time);\\n  };\\n\\n  return CurrentTimeDisplay;\\n}(TimeDisplay);\\n/**\\n * The text that is added to the `CurrentTimeDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nCurrentTimeDisplay.prototype.labelText_ = 'Current Time';\\n/**\\n * The text that should display over the `CurrentTimeDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nCurrentTimeDisplay.prototype.controlText_ = 'Current Time';\\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\\n\\n/**\\n * Displays the duration\\n *\\n * @extends Component\\n */\\n\\nvar DurationDisplay = /*#__PURE__*/function (_TimeDisplay) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(DurationDisplay, _TimeDisplay);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function DurationDisplay(player, options) {\\n    var _this;\\n\\n    _this = _TimeDisplay.call(this, player, options) || this; // we do not want to/need to throttle duration changes,\\n    // as they should always display the changed duration as\\n    // it has changed\\n\\n    _this.on(player, 'durationchange', _this.updateContent); // Listen to loadstart because the player duration is reset when a new media element is loaded,\\n    // but the durationchange on the user agent will not fire.\\n    // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\\n\\n\\n    _this.on(player, 'loadstart', _this.updateContent); // Also listen for timeupdate (in the parent) and loadedmetadata because removing those\\n    // listeners could have broken dependent applications/libraries. These\\n    // can likely be removed for 7.0.\\n\\n\\n    _this.on(player, 'loadedmetadata', _this.updateContent);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = DurationDisplay.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-duration';\\n  }\\n  /**\\n   * Update duration time display.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `durationchange`, `timeupdate`, or `loadedmetadata` event that caused\\n   *        this function to be called.\\n   *\\n   * @listens Player#durationchange\\n   * @listens Player#timeupdate\\n   * @listens Player#loadedmetadata\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {\\n    var duration = this.player_.duration();\\n    this.updateTextNode_(duration);\\n  };\\n\\n  return DurationDisplay;\\n}(TimeDisplay);\\n/**\\n * The text that is added to the `DurationDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nDurationDisplay.prototype.labelText_ = 'Duration';\\n/**\\n * The text that should display over the `DurationDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nDurationDisplay.prototype.controlText_ = 'Duration';\\nComponent.registerComponent('DurationDisplay', DurationDisplay);\\n\\n/**\\n * The separator between the current time and duration.\\n * Can be hidden if it's not needed in the design.\\n *\\n * @extends Component\\n */\\n\\nvar TimeDivider = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TimeDivider, _Component);\\n\\n  function TimeDivider() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = TimeDivider.prototype;\\n\\n  /**\\n   * Create the component's DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-time-control vjs-time-divider',\\n      innerHTML: '<div><span>/</span></div>'\\n    }, {\\n      // this element and its contents can be hidden from assistive techs since\\n      // it is made extraneous by the announcement of the control text\\n      // for the current time and duration displays\\n      'aria-hidden': true\\n    });\\n  };\\n\\n  return TimeDivider;\\n}(Component);\\n\\nComponent.registerComponent('TimeDivider', TimeDivider);\\n\\n/**\\n * Displays the time left in the video\\n *\\n * @extends Component\\n */\\n\\nvar RemainingTimeDisplay = /*#__PURE__*/function (_TimeDisplay) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(RemainingTimeDisplay, _TimeDisplay);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function RemainingTimeDisplay(player, options) {\\n    var _this;\\n\\n    _this = _TimeDisplay.call(this, player, options) || this;\\n\\n    _this.on(player, 'durationchange', _this.updateContent);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = RemainingTimeDisplay.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return 'vjs-remaining-time';\\n  }\\n  /**\\n   * Create the `Component`'s DOM element with the \\\"minus\\\" characted prepend to the time\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _TimeDisplay.prototype.createEl.call(this);\\n\\n    el.insertBefore(createEl('span', {}, {\\n      'aria-hidden': true\\n    }, '-'), this.contentEl_);\\n    return el;\\n  }\\n  /**\\n   * Update remaining time display.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate` or `durationchange` event that caused this to run.\\n   *\\n   * @listens Player#timeupdate\\n   * @listens Player#durationchange\\n   */\\n  ;\\n\\n  _proto.updateContent = function updateContent(event) {\\n    if (typeof this.player_.duration() !== 'number') {\\n      return;\\n    }\\n\\n    var time; // @deprecated We should only use remainingTimeDisplay\\n    // as of video.js 7\\n\\n    if (this.player_.ended()) {\\n      time = 0;\\n    } else if (this.player_.remainingTimeDisplay) {\\n      time = this.player_.remainingTimeDisplay();\\n    } else {\\n      time = this.player_.remainingTime();\\n    }\\n\\n    this.updateTextNode_(time);\\n  };\\n\\n  return RemainingTimeDisplay;\\n}(TimeDisplay);\\n/**\\n * The text that is added to the `RemainingTimeDisplay` for screen reader users.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nRemainingTimeDisplay.prototype.labelText_ = 'Remaining Time';\\n/**\\n * The text that should display over the `RemainingTimeDisplay`s controls. Added to for localization.\\n *\\n * @type {string}\\n * @private\\n *\\n * @deprecated in v7; controlText_ is not used in non-active display Components\\n */\\n\\nRemainingTimeDisplay.prototype.controlText_ = 'Remaining Time';\\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\\n\\n/**\\n * Displays the live indicator when duration is Infinity.\\n *\\n * @extends Component\\n */\\n\\nvar LiveDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LiveDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function LiveDisplay(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.updateShowing();\\n\\n    _this.on(_this.player(), 'durationchange', _this.updateShowing);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = LiveDisplay.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-live-control vjs-control'\\n    });\\n\\n    this.contentEl_ = createEl('div', {\\n      className: 'vjs-live-display',\\n      innerHTML: \\\"<span class=\\\\\\\"vjs-control-text\\\\\\\">\\\" + this.localize('Stream Type') + \\\"\\\\xA0</span>\\\" + this.localize('LIVE')\\n    }, {\\n      'aria-live': 'off'\\n    });\\n    el.appendChild(this.contentEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Check the duration to see if the LiveDisplay should be showing or not. Then show/hide\\n   * it accordingly\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#durationchange} event that caused this function to run.\\n   *\\n   * @listens Player#durationchange\\n   */\\n  ;\\n\\n  _proto.updateShowing = function updateShowing(event) {\\n    if (this.player().duration() === Infinity) {\\n      this.show();\\n    } else {\\n      this.hide();\\n    }\\n  };\\n\\n  return LiveDisplay;\\n}(Component);\\n\\nComponent.registerComponent('LiveDisplay', LiveDisplay);\\n\\n/**\\n * Displays the live indicator when duration is Infinity.\\n *\\n * @extends Component\\n */\\n\\nvar SeekToLive = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SeekToLive, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function SeekToLive(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.updateLiveEdgeStatus();\\n\\n    if (_this.player_.liveTracker) {\\n      _this.on(_this.player_.liveTracker, 'liveedgechange', _this.updateLiveEdgeStatus);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = SeekToLive.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _Button.prototype.createEl.call(this, 'button', {\\n      className: 'vjs-seek-to-live-control vjs-control'\\n    });\\n\\n    this.textEl_ = createEl('span', {\\n      className: 'vjs-seek-to-live-text',\\n      innerHTML: this.localize('LIVE')\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n    el.appendChild(this.textEl_);\\n    return el;\\n  }\\n  /**\\n   * Update the state of this button if we are at the live edge\\n   * or not\\n   */\\n  ;\\n\\n  _proto.updateLiveEdgeStatus = function updateLiveEdgeStatus() {\\n    // default to live edge\\n    if (!this.player_.liveTracker || this.player_.liveTracker.atLiveEdge()) {\\n      this.setAttribute('aria-disabled', true);\\n      this.addClass('vjs-at-live-edge');\\n      this.controlText('Seek to live, currently playing live');\\n    } else {\\n      this.setAttribute('aria-disabled', false);\\n      this.removeClass('vjs-at-live-edge');\\n      this.controlText('Seek to live, currently behind live');\\n    }\\n  }\\n  /**\\n   * On click bring us as near to the live point as possible.\\n   * This requires that we wait for the next `live-seekable-change`\\n   * event which will happen every segment length seconds.\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick() {\\n    this.player_.liveTracker.seekToLiveEdge();\\n  }\\n  /**\\n   * Dispose of the element and stop tracking\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    if (this.player_.liveTracker) {\\n      this.off(this.player_.liveTracker, 'liveedgechange', this.updateLiveEdgeStatus);\\n    }\\n\\n    this.textEl_ = null;\\n\\n    _Button.prototype.dispose.call(this);\\n  };\\n\\n  return SeekToLive;\\n}(Button);\\n\\nSeekToLive.prototype.controlText_ = 'Seek to live, currently playing live';\\nComponent.registerComponent('SeekToLive', SeekToLive);\\n\\n/**\\n * Keep a number between a min and a max value\\n *\\n * @param {number} number\\n *        The number to clamp\\n *\\n * @param {number} min\\n *        The minimum value\\n * @param {number} max\\n *        The maximum value\\n *\\n * @return {number}\\n *         the clamped number\\n */\\nvar clamp = function clamp(number, min, max) {\\n  number = Number(number);\\n  return Math.min(max, Math.max(min, isNaN(number) ? min : number));\\n};\\n\\n/**\\n * The base functionality for a slider. Can be vertical or horizontal.\\n * For instance the volume bar or the seek bar on a video is a slider.\\n *\\n * @extends Component\\n */\\n\\nvar Slider = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Slider, _Component);\\n\\n  /**\\n  * Create an instance of this class\\n  *\\n  * @param {Player} player\\n  *        The `Player` that this class should be attached to.\\n  *\\n  * @param {Object} [options]\\n  *        The key/value store of player options.\\n  */\\n  function Slider(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this; // Set property names to bar to match with the child Slider class is looking for\\n\\n    _this.bar = _this.getChild(_this.options_.barName); // Set a horizontal or vertical class on the slider depending on the slider type\\n\\n    _this.vertical(!!_this.options_.vertical);\\n\\n    _this.enable();\\n\\n    return _this;\\n  }\\n  /**\\n   * Are controls are currently enabled for this slider or not.\\n   *\\n   * @return {boolean}\\n   *         true if controls are enabled, false otherwise\\n   */\\n\\n\\n  var _proto = Slider.prototype;\\n\\n  _proto.enabled = function enabled() {\\n    return this.enabled_;\\n  }\\n  /**\\n   * Enable controls for this slider if they are disabled\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    if (this.enabled()) {\\n      return;\\n    }\\n\\n    this.on('mousedown', this.handleMouseDown);\\n    this.on('touchstart', this.handleMouseDown);\\n    this.on('keydown', this.handleKeyDown);\\n    this.on('click', this.handleClick); // TODO: deprecated, controlsvisible does not seem to be fired\\n\\n    this.on(this.player_, 'controlsvisible', this.update);\\n\\n    if (this.playerEvent) {\\n      this.on(this.player_, this.playerEvent, this.update);\\n    }\\n\\n    this.removeClass('disabled');\\n    this.setAttribute('tabindex', 0);\\n    this.enabled_ = true;\\n  }\\n  /**\\n   * Disable controls for this slider if they are enabled\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    if (!this.enabled()) {\\n      return;\\n    }\\n\\n    var doc = this.bar.el_.ownerDocument;\\n    this.off('mousedown', this.handleMouseDown);\\n    this.off('touchstart', this.handleMouseDown);\\n    this.off('keydown', this.handleKeyDown);\\n    this.off('click', this.handleClick);\\n    this.off(this.player_, 'controlsvisible', this.update);\\n    this.off(doc, 'mousemove', this.handleMouseMove);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchmove', this.handleMouseMove);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n    this.removeAttribute('tabindex');\\n    this.addClass('disabled');\\n\\n    if (this.playerEvent) {\\n      this.off(this.player_, this.playerEvent, this.update);\\n    }\\n\\n    this.enabled_ = false;\\n  }\\n  /**\\n   * Create the `Slider`s DOM element.\\n   *\\n   * @param {string} type\\n   *        Type of element to create.\\n   *\\n   * @param {Object} [props={}]\\n   *        List of properties in Object form.\\n   *\\n   * @param {Object} [attributes={}]\\n   *        list of attributes in Object form.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl(type, props, attributes) {\\n    if (props === void 0) {\\n      props = {};\\n    }\\n\\n    if (attributes === void 0) {\\n      attributes = {};\\n    }\\n\\n    // Add the slider element class to all sub classes\\n    props.className = props.className + ' vjs-slider';\\n    props = assign({\\n      tabIndex: 0\\n    }, props);\\n    attributes = assign({\\n      'role': 'slider',\\n      'aria-valuenow': 0,\\n      'aria-valuemin': 0,\\n      'aria-valuemax': 100,\\n      'tabIndex': 0\\n    }, attributes);\\n    return _Component.prototype.createEl.call(this, type, props, attributes);\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `Slider`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   * @fires Slider#slideractive\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    var doc = this.bar.el_.ownerDocument;\\n\\n    if (event.type === 'mousedown') {\\n      event.preventDefault();\\n    } // Do not call preventDefault() on touchstart in Chrome\\n    // to avoid console warnings. Use a 'touch-action: none' style\\n    // instead to prevent unintented scrolling.\\n    // https://developers.google.com/web/updates/2017/01/scrolling-intervention\\n\\n\\n    if (event.type === 'touchstart' && !IS_CHROME) {\\n      event.preventDefault();\\n    }\\n\\n    blockTextSelection();\\n    this.addClass('vjs-sliding');\\n    /**\\n     * Triggered when the slider is in an active state\\n     *\\n     * @event Slider#slideractive\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('slideractive');\\n    this.on(doc, 'mousemove', this.handleMouseMove);\\n    this.on(doc, 'mouseup', this.handleMouseUp);\\n    this.on(doc, 'touchmove', this.handleMouseMove);\\n    this.on(doc, 'touchend', this.handleMouseUp);\\n    this.handleMouseMove(event);\\n  }\\n  /**\\n   * Handle the `mousemove`, `touchmove`, and `mousedown` events on this `Slider`.\\n   * The `mousemove` and `touchmove` events will only only trigger this function during\\n   * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and\\n   * {@link Slider#handleMouseUp}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered\\n   *        this function\\n   *\\n   * @listens mousemove\\n   * @listens touchmove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {}\\n  /**\\n   * Handle `mouseup` or `touchend` events on the `Slider`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mouseup` or `touchend` event that triggered this function.\\n   *\\n   * @listens touchend\\n   * @listens mouseup\\n   * @fires Slider#sliderinactive\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp() {\\n    var doc = this.bar.el_.ownerDocument;\\n    unblockTextSelection();\\n    this.removeClass('vjs-sliding');\\n    /**\\n     * Triggered when the slider is no longer in an active state.\\n     *\\n     * @event Slider#sliderinactive\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('sliderinactive');\\n    this.off(doc, 'mousemove', this.handleMouseMove);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchmove', this.handleMouseMove);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n    this.update();\\n  }\\n  /**\\n   * Update the progress bar of the `Slider`.\\n   *\\n   * @return {number}\\n   *          The percentage of progress the progress bar represents as a\\n   *          number from 0 to 1.\\n   */\\n  ;\\n\\n  _proto.update = function update() {\\n    var _this2 = this;\\n\\n    // In VolumeBar init we have a setTimeout for update that pops and update\\n    // to the end of the execution stack. The player is destroyed before then\\n    // update will cause an error\\n    // If there's no bar...\\n    if (!this.el_ || !this.bar) {\\n      return;\\n    } // clamp progress between 0 and 1\\n    // and only round to four decimal places, as we round to two below\\n\\n\\n    var progress = this.getProgress();\\n\\n    if (progress === this.progress_) {\\n      return progress;\\n    }\\n\\n    this.progress_ = progress;\\n    this.requestAnimationFrame(function () {\\n      // Set the new bar width or height\\n      var sizeKey = _this2.vertical() ? 'height' : 'width'; // Convert to a percentage for css value\\n\\n      _this2.bar.el().style[sizeKey] = (progress * 100).toFixed(2) + '%';\\n    });\\n    return progress;\\n  }\\n  /**\\n   * Get the percentage of the bar that should be filled\\n   * but clamped and rounded.\\n   *\\n   * @return {number}\\n   *         percentage filled that the slider is\\n   */\\n  ;\\n\\n  _proto.getProgress = function getProgress() {\\n    return Number(clamp(this.getPercent(), 0, 1).toFixed(4));\\n  }\\n  /**\\n   * Calculate distance for slider\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run.\\n   *\\n   * @return {number}\\n   *         The current position of the Slider.\\n   *         - position.x for vertical `Slider`s\\n   *         - position.y for horizontal `Slider`s\\n   */\\n  ;\\n\\n  _proto.calculateDistance = function calculateDistance(event) {\\n    var position = getPointerPosition(this.el_, event);\\n\\n    if (this.vertical()) {\\n      return position.y;\\n    }\\n\\n    return position.x;\\n  }\\n  /**\\n   * Handle a `keydown` event on the `Slider`. Watches for left, rigth, up, and down\\n   * arrow keys. This function will only be called when the slider has focus. See\\n   * {@link Slider#handleFocus} and {@link Slider#handleBlur}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the `keydown` event that caused this function to run.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Left and Down Arrows\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Left') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Down')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepBack(); // Up and Right Arrows\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Right') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Up')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepForward();\\n    } else {\\n      // Pass keydown handling up for unsupported keys\\n      _Component.prototype.handleKeyDown.call(this, event);\\n    }\\n  }\\n  /**\\n   * Listener for click events on slider, used to prevent clicks\\n   *   from bubbling up to parent elements like button menus.\\n   *\\n   * @param {Object} event\\n   *        Event that caused this object to run\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    event.stopPropagation();\\n    event.preventDefault();\\n  }\\n  /**\\n   * Get/set if slider is horizontal for vertical\\n   *\\n   * @param {boolean} [bool]\\n   *        - true if slider is vertical,\\n   *        - false is horizontal\\n   *\\n   * @return {boolean}\\n   *         - true if slider is vertical, and getting\\n   *         - false if the slider is horizontal, and getting\\n   */\\n  ;\\n\\n  _proto.vertical = function vertical(bool) {\\n    if (bool === undefined) {\\n      return this.vertical_ || false;\\n    }\\n\\n    this.vertical_ = !!bool;\\n\\n    if (this.vertical_) {\\n      this.addClass('vjs-slider-vertical');\\n    } else {\\n      this.addClass('vjs-slider-horizontal');\\n    }\\n  };\\n\\n  return Slider;\\n}(Component);\\n\\nComponent.registerComponent('Slider', Slider);\\n\\nvar percentify = function percentify(time, end) {\\n  return clamp(time / end * 100, 0, 100).toFixed(2) + '%';\\n};\\n/**\\n * Shows loading progress\\n *\\n * @extends Component\\n */\\n\\n\\nvar LoadProgressBar = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LoadProgressBar, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function LoadProgressBar(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.partEls_ = [];\\n\\n    _this.on(player, 'progress', _this.update);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = LoadProgressBar.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-load-progress'\\n    });\\n\\n    var wrapper = createEl('span', {\\n      className: 'vjs-control-text'\\n    });\\n    var loadedText = createEl('span', {\\n      textContent: this.localize('Loaded')\\n    });\\n    var separator = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createTextNode(': ');\\n    this.percentageEl_ = createEl('span', {\\n      className: 'vjs-control-text-loaded-percentage',\\n      textContent: '0%'\\n    });\\n    el.appendChild(wrapper);\\n    wrapper.appendChild(loadedText);\\n    wrapper.appendChild(separator);\\n    wrapper.appendChild(this.percentageEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.partEls_ = null;\\n    this.percentageEl_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Update progress bar\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `progress` event that caused this function to run.\\n   *\\n   * @listens Player#progress\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var _this2 = this;\\n\\n    this.requestAnimationFrame(function () {\\n      var liveTracker = _this2.player_.liveTracker;\\n\\n      var buffered = _this2.player_.buffered();\\n\\n      var duration = liveTracker && liveTracker.isLive() ? liveTracker.seekableEnd() : _this2.player_.duration();\\n\\n      var bufferedEnd = _this2.player_.bufferedEnd();\\n\\n      var children = _this2.partEls_;\\n      var percent = percentify(bufferedEnd, duration);\\n\\n      if (_this2.percent_ !== percent) {\\n        // update the width of the progress bar\\n        _this2.el_.style.width = percent; // update the control-text\\n\\n        textContent(_this2.percentageEl_, percent);\\n        _this2.percent_ = percent;\\n      } // add child elements to represent the individual buffered time ranges\\n\\n\\n      for (var i = 0; i < buffered.length; i++) {\\n        var start = buffered.start(i);\\n        var end = buffered.end(i);\\n        var part = children[i];\\n\\n        if (!part) {\\n          part = _this2.el_.appendChild(createEl());\\n          children[i] = part;\\n        } //  only update if changed\\n\\n\\n        if (part.dataset.start === start && part.dataset.end === end) {\\n          continue;\\n        }\\n\\n        part.dataset.start = start;\\n        part.dataset.end = end; // set the percent based on the width of the progress bar (bufferedEnd)\\n\\n        part.style.left = percentify(start, bufferedEnd);\\n        part.style.width = percentify(end - start, bufferedEnd);\\n      } // remove unused buffered range elements\\n\\n\\n      for (var _i = children.length; _i > buffered.length; _i--) {\\n        _this2.el_.removeChild(children[_i - 1]);\\n      }\\n\\n      children.length = buffered.length;\\n    });\\n  };\\n\\n  return LoadProgressBar;\\n}(Component);\\n\\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\\n\\n/**\\n * Time tooltips display a time above the progress bar.\\n *\\n * @extends Component\\n */\\n\\nvar TimeTooltip = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TimeTooltip, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The {@link Player} that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TimeTooltip(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\\n    return _this;\\n  }\\n  /**\\n   * Create the time tooltip DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = TimeTooltip.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-time-tooltip'\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n  }\\n  /**\\n   * Updates the position of the time tooltip relative to the `SeekBar`.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   */\\n  ;\\n\\n  _proto.update = function update(seekBarRect, seekBarPoint, content) {\\n    var tooltipRect = getBoundingClientRect(this.el_);\\n    var playerRect = getBoundingClientRect(this.player_.el());\\n    var seekBarPointPx = seekBarRect.width * seekBarPoint; // do nothing if either rect isn't available\\n    // for example, if the player isn't in the DOM for testing\\n\\n    if (!playerRect || !tooltipRect) {\\n      return;\\n    } // This is the space left of the `seekBarPoint` available within the bounds\\n    // of the player. We calculate any gap between the left edge of the player\\n    // and the left edge of the `SeekBar` and add the number of pixels in the\\n    // `SeekBar` before hitting the `seekBarPoint`\\n\\n\\n    var spaceLeftOfPoint = seekBarRect.left - playerRect.left + seekBarPointPx; // This is the space right of the `seekBarPoint` available within the bounds\\n    // of the player. We calculate the number of pixels from the `seekBarPoint`\\n    // to the right edge of the `SeekBar` and add to that any gap between the\\n    // right edge of the `SeekBar` and the player.\\n\\n    var spaceRightOfPoint = seekBarRect.width - seekBarPointPx + (playerRect.right - seekBarRect.right); // This is the number of pixels by which the tooltip will need to be pulled\\n    // further to the right to center it over the `seekBarPoint`.\\n\\n    var pullTooltipBy = tooltipRect.width / 2; // Adjust the `pullTooltipBy` distance to the left or right depending on\\n    // the results of the space calculations above.\\n\\n    if (spaceLeftOfPoint < pullTooltipBy) {\\n      pullTooltipBy += pullTooltipBy - spaceLeftOfPoint;\\n    } else if (spaceRightOfPoint < pullTooltipBy) {\\n      pullTooltipBy = spaceRightOfPoint;\\n    } // Due to the imprecision of decimal/ratio based calculations and varying\\n    // rounding behaviors, there are cases where the spacing adjustment is off\\n    // by a pixel or two. This adds insurance to these calculations.\\n\\n\\n    if (pullTooltipBy < 0) {\\n      pullTooltipBy = 0;\\n    } else if (pullTooltipBy > tooltipRect.width) {\\n      pullTooltipBy = tooltipRect.width;\\n    }\\n\\n    this.el_.style.right = \\\"-\\\" + pullTooltipBy + \\\"px\\\";\\n    this.write(content);\\n  }\\n  /**\\n   * Write the time to the tooltip DOM element.\\n   *\\n   * @param {string} content\\n   *        The formatted time for the tooltip.\\n   */\\n  ;\\n\\n  _proto.write = function write(content) {\\n    textContent(this.el_, content);\\n  }\\n  /**\\n   * Updates the position of the time tooltip relative to the `SeekBar`.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   *\\n   * @param {number} time\\n   *        The time to update the tooltip to, not used during live playback\\n   *\\n   * @param {Function} cb\\n   *        A function that will be called during the request animation frame\\n   *        for tooltips that need to do additional animations from the default\\n   */\\n  ;\\n\\n  _proto.updateTime = function updateTime(seekBarRect, seekBarPoint, time, cb) {\\n    var _this2 = this;\\n\\n    // If there is an existing rAF ID, cancel it so we don't over-queue.\\n    if (this.rafId_) {\\n      this.cancelAnimationFrame(this.rafId_);\\n    }\\n\\n    this.rafId_ = this.requestAnimationFrame(function () {\\n      var content;\\n\\n      var duration = _this2.player_.duration();\\n\\n      if (_this2.player_.liveTracker && _this2.player_.liveTracker.isLive()) {\\n        var liveWindow = _this2.player_.liveTracker.liveWindow();\\n\\n        var secondsBehind = liveWindow - seekBarPoint * liveWindow;\\n        content = (secondsBehind < 1 ? '' : '-') + formatTime(secondsBehind, liveWindow);\\n      } else {\\n        content = formatTime(time, duration);\\n      }\\n\\n      _this2.update(seekBarRect, seekBarPoint, content);\\n\\n      if (cb) {\\n        cb();\\n      }\\n    });\\n  };\\n\\n  return TimeTooltip;\\n}(Component);\\n\\nComponent.registerComponent('TimeTooltip', TimeTooltip);\\n\\n/**\\n * Used by {@link SeekBar} to display media playback progress as part of the\\n * {@link ProgressControl}.\\n *\\n * @extends Component\\n */\\n\\nvar PlayProgressBar = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlayProgressBar, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The {@link Player} that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PlayProgressBar(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\\n    return _this;\\n  }\\n  /**\\n   * Create the the DOM element for this class.\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = PlayProgressBar.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-play-progress vjs-slider-bar'\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n  }\\n  /**\\n   * Enqueues updates to its own DOM as well as the DOM of its\\n   * {@link TimeTooltip} child.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   */\\n  ;\\n\\n  _proto.update = function update(seekBarRect, seekBarPoint) {\\n    var timeTooltip = this.getChild('timeTooltip');\\n\\n    if (!timeTooltip) {\\n      return;\\n    }\\n\\n    var time = this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\\n    timeTooltip.updateTime(seekBarRect, seekBarPoint, time);\\n  };\\n\\n  return PlayProgressBar;\\n}(Component);\\n/**\\n * Default options for {@link PlayProgressBar}.\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nPlayProgressBar.prototype.options_ = {\\n  children: []\\n}; // Time tooltips should not be added to a player on mobile devices\\n\\nif (!IS_IOS && !IS_ANDROID) {\\n  PlayProgressBar.prototype.options_.children.push('timeTooltip');\\n}\\n\\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\\n\\n/**\\n * The {@link MouseTimeDisplay} component tracks mouse movement over the\\n * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip}\\n * indicating the time which is represented by a given point in the\\n * {@link ProgressControl}.\\n *\\n * @extends Component\\n */\\n\\nvar MouseTimeDisplay = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MouseTimeDisplay, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The {@link Player} that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function MouseTimeDisplay(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.update = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update), UPDATE_REFRESH_INTERVAL);\\n    return _this;\\n  }\\n  /**\\n   * Create the DOM element for this class.\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = MouseTimeDisplay.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-mouse-display'\\n    });\\n  }\\n  /**\\n   * Enqueues updates to its own DOM as well as the DOM of its\\n   * {@link TimeTooltip} child.\\n   *\\n   * @param {Object} seekBarRect\\n   *        The `ClientRect` for the {@link SeekBar} element.\\n   *\\n   * @param {number} seekBarPoint\\n   *        A number from 0 to 1, representing a horizontal reference point\\n   *        from the left edge of the {@link SeekBar}\\n   */\\n  ;\\n\\n  _proto.update = function update(seekBarRect, seekBarPoint) {\\n    var _this2 = this;\\n\\n    var time = seekBarPoint * this.player_.duration();\\n    this.getChild('timeTooltip').updateTime(seekBarRect, seekBarPoint, time, function () {\\n      _this2.el_.style.left = seekBarRect.width * seekBarPoint + \\\"px\\\";\\n    });\\n  };\\n\\n  return MouseTimeDisplay;\\n}(Component);\\n/**\\n * Default options for `MouseTimeDisplay`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nMouseTimeDisplay.prototype.options_ = {\\n  children: ['timeTooltip']\\n};\\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\\n\\nvar STEP_SECONDS = 5; // The multiplier of STEP_SECONDS that PgUp/PgDown move the timeline.\\n\\nvar PAGE_KEY_MULTIPLIER = 12;\\n/**\\n * Seek bar and container for the progress bars. Uses {@link PlayProgressBar}\\n * as its `bar`.\\n *\\n * @extends Slider\\n */\\n\\nvar SeekBar = /*#__PURE__*/function (_Slider) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SeekBar, _Slider);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function SeekBar(player, options) {\\n    var _this;\\n\\n    _this = _Slider.call(this, player, options) || this;\\n\\n    _this.setEventHandlers_();\\n\\n    return _this;\\n  }\\n  /**\\n   * Sets the event handlers\\n   *\\n   * @private\\n   */\\n\\n\\n  var _proto = SeekBar.prototype;\\n\\n  _proto.setEventHandlers_ = function setEventHandlers_() {\\n    this.update_ = bind(this, this.update);\\n    this.update = throttle(this.update_, UPDATE_REFRESH_INTERVAL);\\n    this.on(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\\n\\n    if (this.player_.liveTracker) {\\n      this.on(this.player_.liveTracker, 'liveedgechange', this.update);\\n    } // when playing, let's ensure we smoothly update the play progress bar\\n    // via an interval\\n\\n\\n    this.updateInterval = null;\\n    this.on(this.player_, ['playing'], this.enableInterval_);\\n    this.on(this.player_, ['ended', 'pause', 'waiting'], this.disableInterval_); // we don't need to update the play progress if the document is hidden,\\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\\n\\n    if ('hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.toggleVisibility_);\\n    }\\n  };\\n\\n  _proto.toggleVisibility_ = function toggleVisibility_(e) {\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.hidden) {\\n      this.disableInterval_(e);\\n    } else {\\n      this.enableInterval_(); // we just switched back to the page and someone may be looking, so, update ASAP\\n\\n      this.update();\\n    }\\n  };\\n\\n  _proto.enableInterval_ = function enableInterval_() {\\n    if (this.updateInterval) {\\n      return;\\n    }\\n\\n    this.updateInterval = this.setInterval(this.update, UPDATE_REFRESH_INTERVAL);\\n  };\\n\\n  _proto.disableInterval_ = function disableInterval_(e) {\\n    if (this.player_.liveTracker && this.player_.liveTracker.isLive() && e && e.type !== 'ended') {\\n      return;\\n    }\\n\\n    if (!this.updateInterval) {\\n      return;\\n    }\\n\\n    this.clearInterval(this.updateInterval);\\n    this.updateInterval = null;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Slider.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-progress-holder'\\n    }, {\\n      'aria-label': this.localize('Progress Bar')\\n    });\\n  }\\n  /**\\n   * This function updates the play progress bar and accessibility\\n   * attributes to whatever is passed in.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `timeupdate` or `ended` event that caused this to run.\\n   *\\n   * @listens Player#timeupdate\\n   *\\n   * @return {number}\\n   *          The current percent at a number from 0-1\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var _this2 = this;\\n\\n    var percent = _Slider.prototype.update.call(this);\\n\\n    this.requestAnimationFrame(function () {\\n      var currentTime = _this2.player_.ended() ? _this2.player_.duration() : _this2.getCurrentTime_();\\n      var liveTracker = _this2.player_.liveTracker;\\n\\n      var duration = _this2.player_.duration();\\n\\n      if (liveTracker && liveTracker.isLive()) {\\n        duration = _this2.player_.liveTracker.liveCurrentTime();\\n      }\\n\\n      if (_this2.percent_ !== percent) {\\n        // machine readable value of progress bar (percentage complete)\\n        _this2.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2));\\n\\n        _this2.percent_ = percent;\\n      }\\n\\n      if (_this2.currentTime_ !== currentTime || _this2.duration_ !== duration) {\\n        // human readable value of progress bar (time complete)\\n        _this2.el_.setAttribute('aria-valuetext', _this2.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}'));\\n\\n        _this2.currentTime_ = currentTime;\\n        _this2.duration_ = duration;\\n      } // update the progress bar time tooltip with the current time\\n\\n\\n      if (_this2.bar) {\\n        _this2.bar.update(getBoundingClientRect(_this2.el()), _this2.getProgress());\\n      }\\n    });\\n    return percent;\\n  }\\n  /**\\n   * Get the value of current time but allows for smooth scrubbing,\\n   * when player can't keep up.\\n   *\\n   * @return {number}\\n   *         The current time value to display\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.getCurrentTime_ = function getCurrentTime_() {\\n    return this.player_.scrubbing() ? this.player_.getCache().currentTime : this.player_.currentTime();\\n  }\\n  /**\\n   * Get the percentage of media played so far.\\n   *\\n   * @return {number}\\n   *         The percentage of media played so far (0 to 1).\\n   */\\n  ;\\n\\n  _proto.getPercent = function getPercent() {\\n    var currentTime = this.getCurrentTime_();\\n    var percent;\\n    var liveTracker = this.player_.liveTracker;\\n\\n    if (liveTracker && liveTracker.isLive()) {\\n      percent = (currentTime - liveTracker.seekableStart()) / liveTracker.liveWindow(); // prevent the percent from changing at the live edge\\n\\n      if (liveTracker.atLiveEdge()) {\\n        percent = 1;\\n      }\\n    } else {\\n      percent = currentTime / this.player_.duration();\\n    }\\n\\n    return percent;\\n  }\\n  /**\\n   * Handle mouse down on seek bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousedown` event that caused this to run.\\n   *\\n   * @listens mousedown\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    } // Stop event propagation to prevent double fire in progress-control.js\\n\\n\\n    event.stopPropagation();\\n    this.player_.scrubbing(true);\\n    this.videoWasPlaying = !this.player_.paused();\\n    this.player_.pause();\\n\\n    _Slider.prototype.handleMouseDown.call(this, event);\\n  }\\n  /**\\n   * Handle mouse move on seek bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousemove` event that caused this to run.\\n   *\\n   * @listens mousemove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    }\\n\\n    var newTime;\\n    var distance = this.calculateDistance(event);\\n    var liveTracker = this.player_.liveTracker;\\n\\n    if (!liveTracker || !liveTracker.isLive()) {\\n      newTime = distance * this.player_.duration(); // Don't let video end while scrubbing.\\n\\n      if (newTime === this.player_.duration()) {\\n        newTime = newTime - 0.1;\\n      }\\n    } else {\\n      if (distance >= 0.99) {\\n        liveTracker.seekToLiveEdge();\\n        return;\\n      }\\n\\n      var seekableStart = liveTracker.seekableStart();\\n      var seekableEnd = liveTracker.liveCurrentTime();\\n      newTime = seekableStart + distance * liveTracker.liveWindow(); // Don't let video end while scrubbing.\\n\\n      if (newTime >= seekableEnd) {\\n        newTime = seekableEnd;\\n      } // Compensate for precision differences so that currentTime is not less\\n      // than seekable start\\n\\n\\n      if (newTime <= seekableStart) {\\n        newTime = seekableStart + 0.1;\\n      } // On android seekableEnd can be Infinity sometimes,\\n      // this will cause newTime to be Infinity, which is\\n      // not a valid currentTime.\\n\\n\\n      if (newTime === Infinity) {\\n        return;\\n      }\\n    } // Set new time (tell player to seek to new time)\\n\\n\\n    this.player_.currentTime(newTime);\\n  };\\n\\n  _proto.enable = function enable() {\\n    _Slider.prototype.enable.call(this);\\n\\n    var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\\n\\n    if (!mouseTimeDisplay) {\\n      return;\\n    }\\n\\n    mouseTimeDisplay.show();\\n  };\\n\\n  _proto.disable = function disable() {\\n    _Slider.prototype.disable.call(this);\\n\\n    var mouseTimeDisplay = this.getChild('mouseTimeDisplay');\\n\\n    if (!mouseTimeDisplay) {\\n      return;\\n    }\\n\\n    mouseTimeDisplay.hide();\\n  }\\n  /**\\n   * Handle mouse up on seek bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseup` event that caused this to run.\\n   *\\n   * @listens mouseup\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp(event) {\\n    _Slider.prototype.handleMouseUp.call(this, event); // Stop event propagation to prevent double fire in progress-control.js\\n\\n\\n    if (event) {\\n      event.stopPropagation();\\n    }\\n\\n    this.player_.scrubbing(false);\\n    /**\\n     * Trigger timeupdate because we're done seeking and the time has changed.\\n     * This is particularly useful for if the player is paused to time the time displays.\\n     *\\n     * @event Tech#timeupdate\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.player_.trigger({\\n      type: 'timeupdate',\\n      target: this,\\n      manuallyTriggered: true\\n    });\\n\\n    if (this.videoWasPlaying) {\\n      silencePromise(this.player_.play());\\n    } else {\\n      // We're done seeking and the time has changed.\\n      // If the player is paused, make sure we display the correct time on the seek bar.\\n      this.update_();\\n    }\\n  }\\n  /**\\n   * Move more quickly fast forward for keyboard-only users\\n   */\\n  ;\\n\\n  _proto.stepForward = function stepForward() {\\n    this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS);\\n  }\\n  /**\\n   * Move more quickly rewind for keyboard-only users\\n   */\\n  ;\\n\\n  _proto.stepBack = function stepBack() {\\n    this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS);\\n  }\\n  /**\\n   * Toggles the playback state of the player\\n   * This gets called when enter or space is used on the seekbar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called\\n   *\\n   */\\n  ;\\n\\n  _proto.handleAction = function handleAction(event) {\\n    if (this.player_.paused()) {\\n      this.player_.play();\\n    } else {\\n      this.player_.pause();\\n    }\\n  }\\n  /**\\n   * Called when this SeekBar has focus and a key gets pressed down.\\n   * Supports the following keys:\\n   *\\n   *   Space or Enter key fire a click event\\n   *   Home key moves to start of the timeline\\n   *   End key moves to end of the timeline\\n   *   Digit \\\"0\\\" through \\\"9\\\" keys move to 0%, 10% ... 80%, 90% of the timeline\\n   *   PageDown key moves back a larger step than ArrowDown\\n   *   PageUp key moves forward a large step\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Space') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Enter')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.handleAction(event);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Home')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(0);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'End')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(this.player_.duration());\\n    } else if (/^[0-9]$/.test(keycode__WEBPACK_IMPORTED_MODULE_8___default()(event))) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var gotoFraction = (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.codes[keycode__WEBPACK_IMPORTED_MODULE_8___default()(event)] - keycode__WEBPACK_IMPORTED_MODULE_8___default.a.codes['0']) * 10.0 / 100.0;\\n      this.player_.currentTime(this.player_.duration() * gotoFraction);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'PgDn')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS * PAGE_KEY_MULTIPLIER);\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'PgUp')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS * PAGE_KEY_MULTIPLIER);\\n    } else {\\n      // Pass keydown handling up for unsupported keys\\n      _Slider.prototype.handleKeyDown.call(this, event);\\n    }\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.disableInterval_();\\n    this.off(this.player_, ['ended', 'durationchange', 'timeupdate'], this.update);\\n\\n    if (this.player_.liveTracker) {\\n      this.on(this.player_.liveTracker, 'liveedgechange', this.update);\\n    }\\n\\n    this.off(this.player_, ['playing'], this.enableInterval_);\\n    this.off(this.player_, ['ended', 'pause', 'waiting'], this.disableInterval_); // we don't need to update the play progress if the document is hidden,\\n    // also, this causes the CPU to spike and eventually crash the page on IE11.\\n\\n    if ('hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.toggleVisibility_);\\n    }\\n\\n    _Slider.prototype.dispose.call(this);\\n  };\\n\\n  return SeekBar;\\n}(Slider);\\n/**\\n * Default options for the `SeekBar`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nSeekBar.prototype.options_ = {\\n  children: ['loadProgressBar', 'playProgressBar'],\\n  barName: 'playProgressBar'\\n}; // MouseTimeDisplay tooltips should not be added to a player on mobile devices\\n\\nif (!IS_IOS && !IS_ANDROID) {\\n  SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay');\\n}\\n\\nComponent.registerComponent('SeekBar', SeekBar);\\n\\n/**\\n * The Progress Control component contains the seek bar, load progress,\\n * and play progress.\\n *\\n * @extends Component\\n */\\n\\nvar ProgressControl = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ProgressControl, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function ProgressControl(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.handleMouseMove = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\\n    _this.throttledHandleMouseSeek = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMouseSeek), UPDATE_REFRESH_INTERVAL);\\n\\n    _this.enable();\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = ProgressControl.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-progress-control vjs-control'\\n    });\\n  }\\n  /**\\n   * When the mouse moves over the `ProgressControl`, the pointer position\\n   * gets passed down to the `MouseTimeDisplay` component.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousemove` event that caused this function to run.\\n   *\\n   * @listen mousemove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (!seekBar) {\\n      return;\\n    }\\n\\n    var playProgressBar = seekBar.getChild('playProgressBar');\\n    var mouseTimeDisplay = seekBar.getChild('mouseTimeDisplay');\\n\\n    if (!playProgressBar && !mouseTimeDisplay) {\\n      return;\\n    }\\n\\n    var seekBarEl = seekBar.el();\\n    var seekBarRect = getBoundingClientRect(seekBarEl);\\n    var seekBarPoint = getPointerPosition(seekBarEl, event).x; // The default skin has a gap on either side of the `SeekBar`. This means\\n    // that it's possible to trigger this behavior outside the boundaries of\\n    // the `SeekBar`. This ensures we stay within it at all times.\\n\\n    seekBarPoint = clamp(0, 1, seekBarPoint);\\n\\n    if (mouseTimeDisplay) {\\n      mouseTimeDisplay.update(seekBarRect, seekBarPoint);\\n    }\\n\\n    if (playProgressBar) {\\n      playProgressBar.update(seekBarRect, seekBar.getProgress());\\n    }\\n  }\\n  /**\\n   * A throttled version of the {@link ProgressControl#handleMouseSeek} listener.\\n   *\\n   * @method ProgressControl#throttledHandleMouseSeek\\n   * @param {EventTarget~Event} event\\n   *        The `mousemove` event that caused this function to run.\\n   *\\n   * @listen mousemove\\n   * @listen touchmove\\n   */\\n\\n  /**\\n   * Handle `mousemove` or `touchmove` events on the `ProgressControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousemove\\n   * @listens touchmove\\n   */\\n  ;\\n\\n  _proto.handleMouseSeek = function handleMouseSeek(event) {\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (seekBar) {\\n      seekBar.handleMouseMove(event);\\n    }\\n  }\\n  /**\\n   * Are controls are currently enabled for this progress control.\\n   *\\n   * @return {boolean}\\n   *         true if controls are enabled, false otherwise\\n   */\\n  ;\\n\\n  _proto.enabled = function enabled() {\\n    return this.enabled_;\\n  }\\n  /**\\n   * Disable all controls on the progress control and its children\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    this.children().forEach(function (child) {\\n      return child.disable && child.disable();\\n    });\\n\\n    if (!this.enabled()) {\\n      return;\\n    }\\n\\n    this.off(['mousedown', 'touchstart'], this.handleMouseDown);\\n    this.off(this.el_, 'mousemove', this.handleMouseMove);\\n    this.handleMouseUp();\\n    this.addClass('disabled');\\n    this.enabled_ = false;\\n  }\\n  /**\\n   * Enable all controls on the progress control and its children\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    this.children().forEach(function (child) {\\n      return child.enable && child.enable();\\n    });\\n\\n    if (this.enabled()) {\\n      return;\\n    }\\n\\n    this.on(['mousedown', 'touchstart'], this.handleMouseDown);\\n    this.on(this.el_, 'mousemove', this.handleMouseMove);\\n    this.removeClass('disabled');\\n    this.enabled_ = true;\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `ProgressControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    var doc = this.el_.ownerDocument;\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (seekBar) {\\n      seekBar.handleMouseDown(event);\\n    }\\n\\n    this.on(doc, 'mousemove', this.throttledHandleMouseSeek);\\n    this.on(doc, 'touchmove', this.throttledHandleMouseSeek);\\n    this.on(doc, 'mouseup', this.handleMouseUp);\\n    this.on(doc, 'touchend', this.handleMouseUp);\\n  }\\n  /**\\n   * Handle `mouseup` or `touchend` events on the `ProgressControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mouseup` or `touchend` event that triggered this function.\\n   *\\n   * @listens touchend\\n   * @listens mouseup\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp(event) {\\n    var doc = this.el_.ownerDocument;\\n    var seekBar = this.getChild('seekBar');\\n\\n    if (seekBar) {\\n      seekBar.handleMouseUp(event);\\n    }\\n\\n    this.off(doc, 'mousemove', this.throttledHandleMouseSeek);\\n    this.off(doc, 'touchmove', this.throttledHandleMouseSeek);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n  };\\n\\n  return ProgressControl;\\n}(Component);\\n/**\\n * Default options for `ProgressControl`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nProgressControl.prototype.options_ = {\\n  children: ['seekBar']\\n};\\nComponent.registerComponent('ProgressControl', ProgressControl);\\n\\n/**\\n * Toggle Picture-in-Picture mode\\n *\\n * @extends Button\\n */\\n\\nvar PictureInPictureToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PictureInPictureToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @listens Player#enterpictureinpicture\\n   * @listens Player#leavepictureinpicture\\n   */\\n  function PictureInPictureToggle(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.on(player, ['enterpictureinpicture', 'leavepictureinpicture'], _this.handlePictureInPictureChange); // TODO: Activate button on player loadedmetadata event.\\n    // TODO: Deactivate button on player emptied event.\\n    // TODO: Deactivate button if disablepictureinpicture attribute is present.\\n\\n\\n    if (!global_document__WEBPACK_IMPORTED_MODULE_1___default.a.pictureInPictureEnabled) {\\n      _this.disable();\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = PictureInPictureToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-picture-in-picture-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Handles enterpictureinpicture and leavepictureinpicture on the player and change control text accordingly.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#enterpictureinpicture} or {@link Player#leavepictureinpicture} event that caused this function to be\\n   *        called.\\n   *\\n   * @listens Player#enterpictureinpicture\\n   * @listens Player#leavepictureinpicture\\n   */\\n  ;\\n\\n  _proto.handlePictureInPictureChange = function handlePictureInPictureChange(event) {\\n    if (this.player_.isInPictureInPicture()) {\\n      this.controlText('Exit Picture-in-Picture');\\n    } else {\\n      this.controlText('Picture-in-Picture');\\n    }\\n  }\\n  /**\\n   * This gets called when an `PictureInPictureToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (!this.player_.isInPictureInPicture()) {\\n      this.player_.requestPictureInPicture();\\n    } else {\\n      this.player_.exitPictureInPicture();\\n    }\\n  };\\n\\n  return PictureInPictureToggle;\\n}(Button);\\n/**\\n * The text that should display over the `PictureInPictureToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPictureInPictureToggle.prototype.controlText_ = 'Picture-in-Picture';\\nComponent.registerComponent('PictureInPictureToggle', PictureInPictureToggle);\\n\\n/**\\n * Toggle fullscreen video\\n *\\n * @extends Button\\n */\\n\\nvar FullscreenToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(FullscreenToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function FullscreenToggle(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this;\\n\\n    _this.on(player, 'fullscreenchange', _this.handleFullscreenChange);\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a[player.fsApi_.fullscreenEnabled] === false) {\\n      _this.disable();\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = FullscreenToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-fullscreen-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Handles fullscreenchange on the player and change control text accordingly.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#fullscreenchange} event that caused this function to be\\n   *        called.\\n   *\\n   * @listens Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.handleFullscreenChange = function handleFullscreenChange(event) {\\n    if (this.player_.isFullscreen()) {\\n      this.controlText('Non-Fullscreen');\\n    } else {\\n      this.controlText('Fullscreen');\\n    }\\n  }\\n  /**\\n   * This gets called when an `FullscreenToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (!this.player_.isFullscreen()) {\\n      this.player_.requestFullscreen();\\n    } else {\\n      this.player_.exitFullscreen();\\n    }\\n  };\\n\\n  return FullscreenToggle;\\n}(Button);\\n/**\\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\\n\\n/**\\n * Check if volume control is supported and if it isn't hide the\\n * `Component` that was passed  using the `vjs-hidden` class.\\n *\\n * @param {Component} self\\n *        The component that should be hidden if volume is unsupported\\n *\\n * @param {Player} player\\n *        A reference to the player\\n *\\n * @private\\n */\\nvar checkVolumeSupport = function checkVolumeSupport(self, player) {\\n  // hide volume controls when they're not supported by the current tech\\n  if (player.tech_ && !player.tech_.featuresVolumeControl) {\\n    self.addClass('vjs-hidden');\\n  }\\n\\n  self.on(player, 'loadstart', function () {\\n    if (!player.tech_.featuresVolumeControl) {\\n      self.addClass('vjs-hidden');\\n    } else {\\n      self.removeClass('vjs-hidden');\\n    }\\n  });\\n};\\n\\n/**\\n * Shows volume level\\n *\\n * @extends Component\\n */\\n\\nvar VolumeLevel = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumeLevel, _Component);\\n\\n  function VolumeLevel() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = VolumeLevel.prototype;\\n\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-volume-level',\\n      innerHTML: '<span class=\\\"vjs-control-text\\\"></span>'\\n    });\\n  };\\n\\n  return VolumeLevel;\\n}(Component);\\n\\nComponent.registerComponent('VolumeLevel', VolumeLevel);\\n\\n/**\\n * The bar that contains the volume level and can be clicked on to adjust the level\\n *\\n * @extends Slider\\n */\\n\\nvar VolumeBar = /*#__PURE__*/function (_Slider) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumeBar, _Slider);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function VolumeBar(player, options) {\\n    var _this;\\n\\n    _this = _Slider.call(this, player, options) || this;\\n\\n    _this.on('slideractive', _this.updateLastVolume_);\\n\\n    _this.on(player, 'volumechange', _this.updateARIAAttributes);\\n\\n    player.ready(function () {\\n      return _this.updateARIAAttributes();\\n    });\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = VolumeBar.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Slider.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-volume-bar vjs-slider-bar'\\n    }, {\\n      'aria-label': this.localize('Volume Level'),\\n      'aria-live': 'polite'\\n    });\\n  }\\n  /**\\n   * Handle mouse down on volume bar\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mousedown` event that caused this to run.\\n   *\\n   * @listens mousedown\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    }\\n\\n    _Slider.prototype.handleMouseDown.call(this, event);\\n  }\\n  /**\\n   * Handle movement events on the {@link VolumeMenuButton}.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run.\\n   *\\n   * @listens mousemove\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    }\\n\\n    this.checkMuted();\\n    this.player_.volume(this.calculateDistance(event));\\n  }\\n  /**\\n   * If the player is muted unmute it.\\n   */\\n  ;\\n\\n  _proto.checkMuted = function checkMuted() {\\n    if (this.player_.muted()) {\\n      this.player_.muted(false);\\n    }\\n  }\\n  /**\\n   * Get percent of volume level\\n   *\\n   * @return {number}\\n   *         Volume level percent as a decimal number.\\n   */\\n  ;\\n\\n  _proto.getPercent = function getPercent() {\\n    if (this.player_.muted()) {\\n      return 0;\\n    }\\n\\n    return this.player_.volume();\\n  }\\n  /**\\n   * Increase volume level for keyboard users\\n   */\\n  ;\\n\\n  _proto.stepForward = function stepForward() {\\n    this.checkMuted();\\n    this.player_.volume(this.player_.volume() + 0.1);\\n  }\\n  /**\\n   * Decrease volume level for keyboard users\\n   */\\n  ;\\n\\n  _proto.stepBack = function stepBack() {\\n    this.checkMuted();\\n    this.player_.volume(this.player_.volume() - 0.1);\\n  }\\n  /**\\n   * Update ARIA accessibility attributes\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `volumechange` event that caused this function to run.\\n   *\\n   * @listens Player#volumechange\\n   */\\n  ;\\n\\n  _proto.updateARIAAttributes = function updateARIAAttributes(event) {\\n    var ariaValue = this.player_.muted() ? 0 : this.volumeAsPercentage_();\\n    this.el_.setAttribute('aria-valuenow', ariaValue);\\n    this.el_.setAttribute('aria-valuetext', ariaValue + '%');\\n  }\\n  /**\\n   * Returns the current value of the player volume as a percentage\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.volumeAsPercentage_ = function volumeAsPercentage_() {\\n    return Math.round(this.player_.volume() * 100);\\n  }\\n  /**\\n   * When user starts dragging the VolumeBar, store the volume and listen for\\n   * the end of the drag. When the drag ends, if the volume was set to zero,\\n   * set lastVolume to the stored volume.\\n   *\\n   * @listens slideractive\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateLastVolume_ = function updateLastVolume_() {\\n    var _this2 = this;\\n\\n    var volumeBeforeDrag = this.player_.volume();\\n    this.one('sliderinactive', function () {\\n      if (_this2.player_.volume() === 0) {\\n        _this2.player_.lastVolume_(volumeBeforeDrag);\\n      }\\n    });\\n  };\\n\\n  return VolumeBar;\\n}(Slider);\\n/**\\n * Default options for the `VolumeBar`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nVolumeBar.prototype.options_ = {\\n  children: ['volumeLevel'],\\n  barName: 'volumeLevel'\\n};\\n/**\\n * Call the update event for this Slider when this event happens on the player.\\n *\\n * @type {string}\\n */\\n\\nVolumeBar.prototype.playerEvent = 'volumechange';\\nComponent.registerComponent('VolumeBar', VolumeBar);\\n\\n/**\\n * The component for controlling the volume level\\n *\\n * @extends Component\\n */\\n\\nvar VolumeControl = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumeControl, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function VolumeControl(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    options.vertical = options.vertical || false; // Pass the vertical option down to the VolumeBar if\\n    // the VolumeBar is turned on.\\n\\n    if (typeof options.volumeBar === 'undefined' || isPlain(options.volumeBar)) {\\n      options.volumeBar = options.volumeBar || {};\\n      options.volumeBar.vertical = options.vertical;\\n    }\\n\\n    _this = _Component.call(this, player, options) || this; // hide this control if volume support is missing\\n\\n    checkVolumeSupport(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), player);\\n    _this.throttledHandleMouseMove = throttle(bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMouseMove), UPDATE_REFRESH_INTERVAL);\\n\\n    _this.on('mousedown', _this.handleMouseDown);\\n\\n    _this.on('touchstart', _this.handleMouseDown); // while the slider is active (the mouse has been pressed down and\\n    // is dragging) or in focus we do not want to hide the VolumeBar\\n\\n\\n    _this.on(_this.volumeBar, ['focus', 'slideractive'], function () {\\n      _this.volumeBar.addClass('vjs-slider-active');\\n\\n      _this.addClass('vjs-slider-active');\\n\\n      _this.trigger('slideractive');\\n    });\\n\\n    _this.on(_this.volumeBar, ['blur', 'sliderinactive'], function () {\\n      _this.volumeBar.removeClass('vjs-slider-active');\\n\\n      _this.removeClass('vjs-slider-active');\\n\\n      _this.trigger('sliderinactive');\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = VolumeControl.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    var orientationClass = 'vjs-volume-horizontal';\\n\\n    if (this.options_.vertical) {\\n      orientationClass = 'vjs-volume-vertical';\\n    }\\n\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: \\\"vjs-volume-control vjs-control \\\" + orientationClass\\n    });\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   */\\n  ;\\n\\n  _proto.handleMouseDown = function handleMouseDown(event) {\\n    var doc = this.el_.ownerDocument;\\n    this.on(doc, 'mousemove', this.throttledHandleMouseMove);\\n    this.on(doc, 'touchmove', this.throttledHandleMouseMove);\\n    this.on(doc, 'mouseup', this.handleMouseUp);\\n    this.on(doc, 'touchend', this.handleMouseUp);\\n  }\\n  /**\\n   * Handle `mouseup` or `touchend` events on the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mouseup` or `touchend` event that triggered this function.\\n   *\\n   * @listens touchend\\n   * @listens mouseup\\n   */\\n  ;\\n\\n  _proto.handleMouseUp = function handleMouseUp(event) {\\n    var doc = this.el_.ownerDocument;\\n    this.off(doc, 'mousemove', this.throttledHandleMouseMove);\\n    this.off(doc, 'touchmove', this.throttledHandleMouseMove);\\n    this.off(doc, 'mouseup', this.handleMouseUp);\\n    this.off(doc, 'touchend', this.handleMouseUp);\\n  }\\n  /**\\n   * Handle `mousedown` or `touchstart` events on the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        `mousedown` or `touchstart` event that triggered this function\\n   *\\n   * @listens mousedown\\n   * @listens touchstart\\n   */\\n  ;\\n\\n  _proto.handleMouseMove = function handleMouseMove(event) {\\n    this.volumeBar.handleMouseMove(event);\\n  };\\n\\n  return VolumeControl;\\n}(Component);\\n/**\\n * Default options for the `VolumeControl`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nVolumeControl.prototype.options_ = {\\n  children: ['volumeBar']\\n};\\nComponent.registerComponent('VolumeControl', VolumeControl);\\n\\n/**\\n * Check if muting volume is supported and if it isn't hide the mute toggle\\n * button.\\n *\\n * @param {Component} self\\n *        A reference to the mute toggle button\\n *\\n * @param {Player} player\\n *        A reference to the player\\n *\\n * @private\\n */\\nvar checkMuteSupport = function checkMuteSupport(self, player) {\\n  // hide mute toggle button if it's not supported by the current tech\\n  if (player.tech_ && !player.tech_.featuresMuteControl) {\\n    self.addClass('vjs-hidden');\\n  }\\n\\n  self.on(player, 'loadstart', function () {\\n    if (!player.tech_.featuresMuteControl) {\\n      self.addClass('vjs-hidden');\\n    } else {\\n      self.removeClass('vjs-hidden');\\n    }\\n  });\\n};\\n\\n/**\\n * A button component for muting the audio.\\n *\\n * @extends Button\\n */\\n\\nvar MuteToggle = /*#__PURE__*/function (_Button) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MuteToggle, _Button);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function MuteToggle(player, options) {\\n    var _this;\\n\\n    _this = _Button.call(this, player, options) || this; // hide this control if volume support is missing\\n\\n    checkMuteSupport(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), player);\\n\\n    _this.on(player, ['loadstart', 'volumechange'], _this.update);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = MuteToggle.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-mute-control \\\" + _Button.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * This gets called when an `MuteToggle` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var vol = this.player_.volume();\\n    var lastVolume = this.player_.lastVolume_();\\n\\n    if (vol === 0) {\\n      var volumeToSet = lastVolume < 0.1 ? 0.1 : lastVolume;\\n      this.player_.volume(volumeToSet);\\n      this.player_.muted(false);\\n    } else {\\n      this.player_.muted(this.player_.muted() ? false : true);\\n    }\\n  }\\n  /**\\n   * Update the `MuteToggle` button based on the state of `volume` and `muted`\\n   * on the player.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link Player#loadstart} event if this function was called\\n   *        through an event.\\n   *\\n   * @listens Player#loadstart\\n   * @listens Player#volumechange\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    this.updateIcon_();\\n    this.updateControlText_();\\n  }\\n  /**\\n   * Update the appearance of the `MuteToggle` icon.\\n   *\\n   * Possible states (given `level` variable below):\\n   * - 0: crossed out\\n   * - 1: zero bars of volume\\n   * - 2: one bar of volume\\n   * - 3: two bars of volume\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateIcon_ = function updateIcon_() {\\n    var vol = this.player_.volume();\\n    var level = 3; // in iOS when a player is loaded with muted attribute\\n    // and volume is changed with a native mute button\\n    // we want to make sure muted state is updated\\n\\n    if (IS_IOS && this.player_.tech_ && this.player_.tech_.el_) {\\n      this.player_.muted(this.player_.tech_.el_.muted);\\n    }\\n\\n    if (vol === 0 || this.player_.muted()) {\\n      level = 0;\\n    } else if (vol < 0.33) {\\n      level = 1;\\n    } else if (vol < 0.67) {\\n      level = 2;\\n    } // TODO improve muted icon classes\\n\\n\\n    for (var i = 0; i < 4; i++) {\\n      removeClass(this.el_, \\\"vjs-vol-\\\" + i);\\n    }\\n\\n    addClass(this.el_, \\\"vjs-vol-\\\" + level);\\n  }\\n  /**\\n   * If `muted` has changed on the player, update the control text\\n   * (`title` attribute on `vjs-mute-control` element and content of\\n   * `vjs-control-text` element).\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateControlText_ = function updateControlText_() {\\n    var soundOff = this.player_.muted() || this.player_.volume() === 0;\\n    var text = soundOff ? 'Unmute' : 'Mute';\\n\\n    if (this.controlText() !== text) {\\n      this.controlText(text);\\n    }\\n  };\\n\\n  return MuteToggle;\\n}(Button);\\n/**\\n * The text that should display over the `MuteToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nMuteToggle.prototype.controlText_ = 'Mute';\\nComponent.registerComponent('MuteToggle', MuteToggle);\\n\\n/**\\n * A Component to contain the MuteToggle and VolumeControl so that\\n * they can work together.\\n *\\n * @extends Component\\n */\\n\\nvar VolumePanel = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(VolumePanel, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function VolumePanel(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    if (typeof options.inline !== 'undefined') {\\n      options.inline = options.inline;\\n    } else {\\n      options.inline = true;\\n    } // pass the inline option down to the VolumeControl as vertical if\\n    // the VolumeControl is on.\\n\\n\\n    if (typeof options.volumeControl === 'undefined' || isPlain(options.volumeControl)) {\\n      options.volumeControl = options.volumeControl || {};\\n      options.volumeControl.vertical = !options.inline;\\n    }\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    _this.on(player, ['loadstart'], _this.volumePanelState_);\\n\\n    _this.on(_this.muteToggle, 'keyup', _this.handleKeyPress);\\n\\n    _this.on(_this.volumeControl, 'keyup', _this.handleVolumeControlKeyUp);\\n\\n    _this.on('keydown', _this.handleKeyPress);\\n\\n    _this.on('mouseover', _this.handleMouseOver);\\n\\n    _this.on('mouseout', _this.handleMouseOut); // while the slider is active (the mouse has been pressed down and\\n    // is dragging) we do not want to hide the VolumeBar\\n\\n\\n    _this.on(_this.volumeControl, ['slideractive'], _this.sliderActive_);\\n\\n    _this.on(_this.volumeControl, ['sliderinactive'], _this.sliderInactive_);\\n\\n    return _this;\\n  }\\n  /**\\n   * Add vjs-slider-active class to the VolumePanel\\n   *\\n   * @listens VolumeControl#slideractive\\n   * @private\\n   */\\n\\n\\n  var _proto = VolumePanel.prototype;\\n\\n  _proto.sliderActive_ = function sliderActive_() {\\n    this.addClass('vjs-slider-active');\\n  }\\n  /**\\n   * Removes vjs-slider-active class to the VolumePanel\\n   *\\n   * @listens VolumeControl#sliderinactive\\n   * @private\\n   */\\n  ;\\n\\n  _proto.sliderInactive_ = function sliderInactive_() {\\n    this.removeClass('vjs-slider-active');\\n  }\\n  /**\\n   * Adds vjs-hidden or vjs-mute-toggle-only to the VolumePanel\\n   * depending on MuteToggle and VolumeControl state\\n   *\\n   * @listens Player#loadstart\\n   * @private\\n   */\\n  ;\\n\\n  _proto.volumePanelState_ = function volumePanelState_() {\\n    // hide volume panel if neither volume control or mute toggle\\n    // are displayed\\n    if (this.volumeControl.hasClass('vjs-hidden') && this.muteToggle.hasClass('vjs-hidden')) {\\n      this.addClass('vjs-hidden');\\n    } // if only mute toggle is visible we don't want\\n    // volume panel expanding when hovered or active\\n\\n\\n    if (this.volumeControl.hasClass('vjs-hidden') && !this.muteToggle.hasClass('vjs-hidden')) {\\n      this.addClass('vjs-mute-toggle-only');\\n    }\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var orientationClass = 'vjs-volume-panel-horizontal';\\n\\n    if (!this.options_.inline) {\\n      orientationClass = 'vjs-volume-panel-vertical';\\n    }\\n\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: \\\"vjs-volume-panel vjs-control \\\" + orientationClass\\n    });\\n  }\\n  /**\\n   * Dispose of the `volume-panel` and all child components.\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.handleMouseOut();\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Handles `keyup` events on the `VolumeControl`, looking for ESC, which closes\\n   * the volume panel and sets focus on `MuteToggle`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keyup` event that caused this function to be called.\\n   *\\n   * @listens keyup\\n   */\\n  ;\\n\\n  _proto.handleVolumeControlKeyUp = function handleVolumeControlKeyUp(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      this.muteToggle.focus();\\n    }\\n  }\\n  /**\\n   * This gets called when a `VolumePanel` gains hover via a `mouseover` event.\\n   * Turns on listening for `mouseover` event. When they happen it\\n   * calls `this.handleMouseOver`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseover` event that caused this function to be called.\\n   *\\n   * @listens mouseover\\n   */\\n  ;\\n\\n  _proto.handleMouseOver = function handleMouseOver(event) {\\n    this.addClass('vjs-hover');\\n    on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(this, this.handleKeyPress));\\n  }\\n  /**\\n   * This gets called when a `VolumePanel` gains hover via a `mouseout` event.\\n   * Turns on listening for `mouseout` event. When they happen it\\n   * calls `this.handleMouseOut`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseout` event that caused this function to be called.\\n   *\\n   * @listens mouseout\\n   */\\n  ;\\n\\n  _proto.handleMouseOut = function handleMouseOut(event) {\\n    this.removeClass('vjs-hover');\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(this, this.handleKeyPress));\\n  }\\n  /**\\n   * Handles `keyup` event on the document or `keydown` event on the `VolumePanel`,\\n   * looking for ESC, which hides the `VolumeControl`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The keypress that triggered this event.\\n   *\\n   * @listens keydown | keyup\\n   */\\n  ;\\n\\n  _proto.handleKeyPress = function handleKeyPress(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      this.handleMouseOut();\\n    }\\n  };\\n\\n  return VolumePanel;\\n}(Component);\\n/**\\n * Default options for the `VolumeControl`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nVolumePanel.prototype.options_ = {\\n  children: ['muteToggle', 'volumeControl']\\n};\\nComponent.registerComponent('VolumePanel', VolumePanel);\\n\\n/**\\n * The Menu component is used to build popup menus, including subtitle and\\n * captions selection menus.\\n *\\n * @extends Component\\n */\\n\\nvar Menu = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Menu, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        the player that this component should attach to\\n   *\\n   * @param {Object} [options]\\n   *        Object of option names and values\\n   *\\n   */\\n  function Menu(player, options) {\\n    var _this;\\n\\n    _this = _Component.call(this, player, options) || this;\\n\\n    if (options) {\\n      _this.menuButton_ = options.menuButton;\\n    }\\n\\n    _this.focusedChild_ = -1;\\n\\n    _this.on('keydown', _this.handleKeyDown); // All the menu item instances share the same blur handler provided by the menu container.\\n\\n\\n    _this.boundHandleBlur_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleBlur);\\n    _this.boundHandleTapClick_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleTapClick);\\n    return _this;\\n  }\\n  /**\\n   * Add event listeners to the {@link MenuItem}.\\n   *\\n   * @param {Object} component\\n   *        The instance of the `MenuItem` to add listeners to.\\n   *\\n   */\\n\\n\\n  var _proto = Menu.prototype;\\n\\n  _proto.addEventListenerForItem = function addEventListenerForItem(component) {\\n    if (!(component instanceof Component)) {\\n      return;\\n    }\\n\\n    this.on(component, 'blur', this.boundHandleBlur_);\\n    this.on(component, ['tap', 'click'], this.boundHandleTapClick_);\\n  }\\n  /**\\n   * Remove event listeners from the {@link MenuItem}.\\n   *\\n   * @param {Object} component\\n   *        The instance of the `MenuItem` to remove listeners.\\n   *\\n   */\\n  ;\\n\\n  _proto.removeEventListenerForItem = function removeEventListenerForItem(component) {\\n    if (!(component instanceof Component)) {\\n      return;\\n    }\\n\\n    this.off(component, 'blur', this.boundHandleBlur_);\\n    this.off(component, ['tap', 'click'], this.boundHandleTapClick_);\\n  }\\n  /**\\n   * This method will be called indirectly when the component has been added\\n   * before the component adds to the new menu instance by `addItem`.\\n   * In this case, the original menu instance will remove the component\\n   * by calling `removeChild`.\\n   *\\n   * @param {Object} component\\n   *        The instance of the `MenuItem`\\n   */\\n  ;\\n\\n  _proto.removeChild = function removeChild(component) {\\n    if (typeof component === 'string') {\\n      component = this.getChild(component);\\n    }\\n\\n    this.removeEventListenerForItem(component);\\n\\n    _Component.prototype.removeChild.call(this, component);\\n  }\\n  /**\\n   * Add a {@link MenuItem} to the menu.\\n   *\\n   * @param {Object|string} component\\n   *        The name or instance of the `MenuItem` to add.\\n   *\\n   */\\n  ;\\n\\n  _proto.addItem = function addItem(component) {\\n    var childComponent = this.addChild(component);\\n\\n    if (childComponent) {\\n      this.addEventListenerForItem(childComponent);\\n    }\\n  }\\n  /**\\n   * Create the `Menu`s DOM element.\\n   *\\n   * @return {Element}\\n   *         the element that was created\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl$1() {\\n    var contentElType = this.options_.contentElType || 'ul';\\n    this.contentEl_ = createEl(contentElType, {\\n      className: 'vjs-menu-content'\\n    });\\n    this.contentEl_.setAttribute('role', 'menu');\\n\\n    var el = _Component.prototype.createEl.call(this, 'div', {\\n      append: this.contentEl_,\\n      className: 'vjs-menu'\\n    });\\n\\n    el.appendChild(this.contentEl_); // Prevent clicks from bubbling up. Needed for Menu Buttons,\\n    // where a click on the parent is significant\\n\\n    on(el, 'click', function (event) {\\n      event.preventDefault();\\n      event.stopImmediatePropagation();\\n    });\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.contentEl_ = null;\\n    this.boundHandleBlur_ = null;\\n    this.boundHandleTapClick_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Called when a `MenuItem` loses focus.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `blur` event that caused this function to be called.\\n   *\\n   * @listens blur\\n   */\\n  ;\\n\\n  _proto.handleBlur = function handleBlur(event) {\\n    var relatedTarget = event.relatedTarget || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.activeElement; // Close menu popup when a user clicks outside the menu\\n\\n    if (!this.children().some(function (element) {\\n      return element.el() === relatedTarget;\\n    })) {\\n      var btn = this.menuButton_;\\n\\n      if (btn && btn.buttonPressed_ && relatedTarget !== btn.el().firstChild) {\\n        btn.unpressButton();\\n      }\\n    }\\n  }\\n  /**\\n   * Called when a `MenuItem` gets clicked or tapped.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `click` or `tap` event that caused this function to be called.\\n   *\\n   * @listens click,tap\\n   */\\n  ;\\n\\n  _proto.handleTapClick = function handleTapClick(event) {\\n    // Unpress the associated MenuButton, and move focus back to it\\n    if (this.menuButton_) {\\n      this.menuButton_.unpressButton();\\n      var childComponents = this.children();\\n\\n      if (!Array.isArray(childComponents)) {\\n        return;\\n      }\\n\\n      var foundComponent = childComponents.filter(function (component) {\\n        return component.el() === event.target;\\n      })[0];\\n\\n      if (!foundComponent) {\\n        return;\\n      } // don't focus menu button if item is a caption settings item\\n      // because focus will move elsewhere\\n\\n\\n      if (foundComponent.name() !== 'CaptionSettingsMenuItem') {\\n        this.menuButton_.focus();\\n      }\\n    }\\n  }\\n  /**\\n   * Handle a `keydown` event on this menu. This listener is added in the constructor.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        A `keydown` event that happened on the menu.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Left and Down Arrows\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Left') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Down')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepForward(); // Up and Right Arrows\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Right') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Up')) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.stepBack();\\n    }\\n  }\\n  /**\\n   * Move to next (lower) menu item for keyboard users.\\n   */\\n  ;\\n\\n  _proto.stepForward = function stepForward() {\\n    var stepChild = 0;\\n\\n    if (this.focusedChild_ !== undefined) {\\n      stepChild = this.focusedChild_ + 1;\\n    }\\n\\n    this.focus(stepChild);\\n  }\\n  /**\\n   * Move to previous (higher) menu item for keyboard users.\\n   */\\n  ;\\n\\n  _proto.stepBack = function stepBack() {\\n    var stepChild = 0;\\n\\n    if (this.focusedChild_ !== undefined) {\\n      stepChild = this.focusedChild_ - 1;\\n    }\\n\\n    this.focus(stepChild);\\n  }\\n  /**\\n   * Set focus on a {@link MenuItem} in the `Menu`.\\n   *\\n   * @param {Object|string} [item=0]\\n   *        Index of child item set focus on.\\n   */\\n  ;\\n\\n  _proto.focus = function focus(item) {\\n    if (item === void 0) {\\n      item = 0;\\n    }\\n\\n    var children = this.children().slice();\\n    var haveTitle = children.length && children[0].className && /vjs-menu-title/.test(children[0].className);\\n\\n    if (haveTitle) {\\n      children.shift();\\n    }\\n\\n    if (children.length > 0) {\\n      if (item < 0) {\\n        item = 0;\\n      } else if (item >= children.length) {\\n        item = children.length - 1;\\n      }\\n\\n      this.focusedChild_ = item;\\n      children[item].el_.focus();\\n    }\\n  };\\n\\n  return Menu;\\n}(Component);\\n\\nComponent.registerComponent('Menu', Menu);\\n\\n/**\\n * A `MenuButton` class for any popup {@link Menu}.\\n *\\n * @extends Component\\n */\\n\\nvar MenuButton = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MenuButton, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function MenuButton(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _Component.call(this, player, options) || this;\\n    _this.menuButton_ = new Button(player, options);\\n\\n    _this.menuButton_.controlText(_this.controlText_);\\n\\n    _this.menuButton_.el_.setAttribute('aria-haspopup', 'true'); // Add buildCSSClass values to the button, not the wrapper\\n\\n\\n    var buttonClass = Button.prototype.buildCSSClass();\\n    _this.menuButton_.el_.className = _this.buildCSSClass() + ' ' + buttonClass;\\n\\n    _this.menuButton_.removeClass('vjs-control');\\n\\n    _this.addChild(_this.menuButton_);\\n\\n    _this.update();\\n\\n    _this.enabled_ = true;\\n\\n    _this.on(_this.menuButton_, 'tap', _this.handleClick);\\n\\n    _this.on(_this.menuButton_, 'click', _this.handleClick);\\n\\n    _this.on(_this.menuButton_, 'keydown', _this.handleKeyDown);\\n\\n    _this.on(_this.menuButton_, 'mouseenter', function () {\\n      _this.addClass('vjs-hover');\\n\\n      _this.menu.show();\\n\\n      on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleMenuKeyUp));\\n    });\\n\\n    _this.on('mouseleave', _this.handleMouseLeave);\\n\\n    _this.on('keydown', _this.handleSubmenuKeyDown);\\n\\n    return _this;\\n  }\\n  /**\\n   * Update the menu based on the current state of its items.\\n   */\\n\\n\\n  var _proto = MenuButton.prototype;\\n\\n  _proto.update = function update() {\\n    var menu = this.createMenu();\\n\\n    if (this.menu) {\\n      this.menu.dispose();\\n      this.removeChild(this.menu);\\n    }\\n\\n    this.menu = menu;\\n    this.addChild(menu);\\n    /**\\n     * Track the state of the menu button\\n     *\\n     * @type {Boolean}\\n     * @private\\n     */\\n\\n    this.buttonPressed_ = false;\\n    this.menuButton_.el_.setAttribute('aria-expanded', 'false');\\n\\n    if (this.items && this.items.length <= this.hideThreshold_) {\\n      this.hide();\\n    } else {\\n      this.show();\\n    }\\n  }\\n  /**\\n   * Create the menu and add all items to it.\\n   *\\n   * @return {Menu}\\n   *         The constructed menu\\n   */\\n  ;\\n\\n  _proto.createMenu = function createMenu() {\\n    var menu = new Menu(this.player_, {\\n      menuButton: this\\n    });\\n    /**\\n     * Hide the menu if the number of items is less than or equal to this threshold. This defaults\\n     * to 0 and whenever we add items which can be hidden to the menu we'll increment it. We list\\n     * it here because every time we run `createMenu` we need to reset the value.\\n     *\\n     * @protected\\n     * @type {Number}\\n     */\\n\\n    this.hideThreshold_ = 0; // Add a title list item to the top\\n\\n    if (this.options_.title) {\\n      var titleEl = createEl('li', {\\n        className: 'vjs-menu-title',\\n        innerHTML: toTitleCase(this.options_.title),\\n        tabIndex: -1\\n      });\\n      this.hideThreshold_ += 1;\\n      var titleComponent = new Component(this.player_, {\\n        el: titleEl\\n      });\\n      menu.addItem(titleComponent);\\n    }\\n\\n    this.items = this.createItems();\\n\\n    if (this.items) {\\n      // Add menu items to the menu\\n      for (var i = 0; i < this.items.length; i++) {\\n        menu.addItem(this.items[i]);\\n      }\\n    }\\n\\n    return menu;\\n  }\\n  /**\\n   * Create the list of menu items. Specific to each subclass.\\n   *\\n   * @abstract\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {}\\n  /**\\n   * Create the `MenuButtons`s DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: this.buildWrapperCSSClass()\\n    }, {});\\n  }\\n  /**\\n   * Allow sub components to stack CSS class names for the wrapper element\\n   *\\n   * @return {string}\\n   *         The constructed wrapper DOM `className`\\n   */\\n  ;\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\\n\\n    if (this.options_.inline === true) {\\n      menuButtonClass += '-inline';\\n    } else {\\n      menuButtonClass += '-popup';\\n    } // TODO: Fix the CSS so that this isn't necessary\\n\\n\\n    var buttonClass = Button.prototype.buildCSSClass();\\n    return \\\"vjs-menu-button \\\" + menuButtonClass + \\\" \\\" + buttonClass + \\\" \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    var menuButtonClass = 'vjs-menu-button'; // If the inline option is passed, we want to use different styles altogether.\\n\\n    if (this.options_.inline === true) {\\n      menuButtonClass += '-inline';\\n    } else {\\n      menuButtonClass += '-popup';\\n    }\\n\\n    return \\\"vjs-menu-button \\\" + menuButtonClass + \\\" \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Get or set the localized control text that will be used for accessibility.\\n   *\\n   * > NOTE: This will come from the internal `menuButton_` element.\\n   *\\n   * @param {string} [text]\\n   *        Control text for element.\\n   *\\n   * @param {Element} [el=this.menuButton_.el()]\\n   *        Element to set the title on.\\n   *\\n   * @return {string}\\n   *         - The control text when getting\\n   */\\n  ;\\n\\n  _proto.controlText = function controlText(text, el) {\\n    if (el === void 0) {\\n      el = this.menuButton_.el();\\n    }\\n\\n    return this.menuButton_.controlText(text, el);\\n  }\\n  /**\\n   * Dispose of the `menu-button` and all child components.\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.handleMouseLeave();\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Handle a click on a `MenuButton`.\\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    if (this.buttonPressed_) {\\n      this.unpressButton();\\n    } else {\\n      this.pressButton();\\n    }\\n  }\\n  /**\\n   * Handle `mouseleave` for `MenuButton`.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `mouseleave` event that caused this function to be called.\\n   *\\n   * @listens mouseleave\\n   */\\n  ;\\n\\n  _proto.handleMouseLeave = function handleMouseLeave(event) {\\n    this.removeClass('vjs-hover');\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keyup', bind(this, this.handleMenuKeyUp));\\n  }\\n  /**\\n   * Set the focus to the actual button, not to this element\\n   */\\n  ;\\n\\n  _proto.focus = function focus() {\\n    this.menuButton_.focus();\\n  }\\n  /**\\n   * Remove the focus from the actual button, not this element\\n   */\\n  ;\\n\\n  _proto.blur = function blur() {\\n    this.menuButton_.blur();\\n  }\\n  /**\\n   * Handle tab, escape, down arrow, and up arrow keys for `MenuButton`. See\\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    // Escape or Tab unpress the 'button'\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      if (this.buttonPressed_) {\\n        this.unpressButton();\\n      } // Don't preventDefault for Tab key - we still want to lose focus\\n\\n\\n      if (!keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n        event.preventDefault(); // Set focus back to the menu button's button\\n\\n        this.menuButton_.focus();\\n      } // Up Arrow or Down Arrow also 'press' the button to open the menu\\n\\n    } else if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Up') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Down')) {\\n      if (!this.buttonPressed_) {\\n        event.preventDefault();\\n        this.pressButton();\\n      }\\n    }\\n  }\\n  /**\\n   * Handle a `keyup` event on a `MenuButton`. The listener for this is added in\\n   * the constructor.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        Key press event\\n   *\\n   * @listens keyup\\n   */\\n  ;\\n\\n  _proto.handleMenuKeyUp = function handleMenuKeyUp(event) {\\n    // Escape hides popup menu\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      this.removeClass('vjs-hover');\\n    }\\n  }\\n  /**\\n   * This method name now delegates to `handleSubmenuKeyDown`. This means\\n   * anyone calling `handleSubmenuKeyPress` will not see their method calls\\n   * stop working.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleSubmenuKeyPress = function handleSubmenuKeyPress(event) {\\n    this.handleSubmenuKeyDown(event);\\n  }\\n  /**\\n   * Handle a `keydown` event on a sub-menu. The listener for this is added in\\n   * the constructor.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        Key press event\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleSubmenuKeyDown = function handleSubmenuKeyDown(event) {\\n    // Escape or Tab unpress the 'button'\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n      if (this.buttonPressed_) {\\n        this.unpressButton();\\n      } // Don't preventDefault for Tab key - we still want to lose focus\\n\\n\\n      if (!keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Tab')) {\\n        event.preventDefault(); // Set focus back to the menu button's button\\n\\n        this.menuButton_.focus();\\n      }\\n    }\\n  }\\n  /**\\n   * Put the current `MenuButton` into a pressed state.\\n   */\\n  ;\\n\\n  _proto.pressButton = function pressButton() {\\n    if (this.enabled_) {\\n      this.buttonPressed_ = true;\\n      this.menu.show();\\n      this.menu.lockShowing();\\n      this.menuButton_.el_.setAttribute('aria-expanded', 'true'); // set the focus into the submenu, except on iOS where it is resulting in\\n      // undesired scrolling behavior when the player is in an iframe\\n\\n      if (IS_IOS && isInFrame()) {\\n        // Return early so that the menu isn't focused\\n        return;\\n      }\\n\\n      this.menu.focus();\\n    }\\n  }\\n  /**\\n   * Take the current `MenuButton` out of a pressed state.\\n   */\\n  ;\\n\\n  _proto.unpressButton = function unpressButton() {\\n    if (this.enabled_) {\\n      this.buttonPressed_ = false;\\n      this.menu.unlockShowing();\\n      this.menu.hide();\\n      this.menuButton_.el_.setAttribute('aria-expanded', 'false');\\n    }\\n  }\\n  /**\\n   * Disable the `MenuButton`. Don't allow it to be clicked.\\n   */\\n  ;\\n\\n  _proto.disable = function disable() {\\n    this.unpressButton();\\n    this.enabled_ = false;\\n    this.addClass('vjs-disabled');\\n    this.menuButton_.disable();\\n  }\\n  /**\\n   * Enable the `MenuButton`. Allow it to be clicked.\\n   */\\n  ;\\n\\n  _proto.enable = function enable() {\\n    this.enabled_ = true;\\n    this.removeClass('vjs-disabled');\\n    this.menuButton_.enable();\\n  };\\n\\n  return MenuButton;\\n}(Component);\\n\\nComponent.registerComponent('MenuButton', MenuButton);\\n\\n/**\\n * The base class for buttons that toggle specific  track types (e.g. subtitles).\\n *\\n * @extends MenuButton\\n */\\n\\nvar TrackButton = /*#__PURE__*/function (_MenuButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TrackButton, _MenuButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TrackButton(player, options) {\\n    var _this;\\n\\n    var tracks = options.tracks;\\n    _this = _MenuButton.call(this, player, options) || this;\\n\\n    if (_this.items.length <= 1) {\\n      _this.hide();\\n    }\\n\\n    if (!tracks) {\\n      return _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this);\\n    }\\n\\n    var updateHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update);\\n    tracks.addEventListener('removetrack', updateHandler);\\n    tracks.addEventListener('addtrack', updateHandler);\\n\\n    _this.player_.on('ready', updateHandler);\\n\\n    _this.player_.on('dispose', function () {\\n      tracks.removeEventListener('removetrack', updateHandler);\\n      tracks.removeEventListener('addtrack', updateHandler);\\n    });\\n\\n    return _this;\\n  }\\n\\n  return TrackButton;\\n}(MenuButton);\\n\\nComponent.registerComponent('TrackButton', TrackButton);\\n\\n/**\\n * @file menu-keys.js\\n */\\n\\n/**\\n  * All keys used for operation of a menu (`MenuButton`, `Menu`, and `MenuItem`)\\n  * Note that 'Enter' and 'Space' are not included here (otherwise they would\\n  * prevent the `MenuButton` and `MenuItem` from being keyboard-clickable)\\n  * @typedef MenuKeys\\n  * @array\\n  */\\nvar MenuKeys = ['Tab', 'Esc', 'Up', 'Down', 'Right', 'Left'];\\n\\n/**\\n * The component for a menu item. `<li>`\\n *\\n * @extends ClickableComponent\\n */\\n\\nvar MenuItem = /*#__PURE__*/function (_ClickableComponent) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(MenuItem, _ClickableComponent);\\n\\n  /**\\n   * Creates an instance of the this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   *\\n   */\\n  function MenuItem(player, options) {\\n    var _this;\\n\\n    _this = _ClickableComponent.call(this, player, options) || this;\\n    _this.selectable = options.selectable;\\n    _this.isSelected_ = options.selected || false;\\n    _this.multiSelectable = options.multiSelectable;\\n\\n    _this.selected(_this.isSelected_);\\n\\n    if (_this.selectable) {\\n      if (_this.multiSelectable) {\\n        _this.el_.setAttribute('role', 'menuitemcheckbox');\\n      } else {\\n        _this.el_.setAttribute('role', 'menuitemradio');\\n      }\\n    } else {\\n      _this.el_.setAttribute('role', 'menuitem');\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `MenuItem's DOM element\\n   *\\n   * @param {string} [type=li]\\n   *        Element's node type, not actually used, always set to `li`.\\n   *\\n   * @param {Object} [props={}]\\n   *        An object of properties that should be set on the element\\n   *\\n   * @param {Object} [attrs={}]\\n   *        An object of attributes that should be set on the element\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n\\n\\n  var _proto = MenuItem.prototype;\\n\\n  _proto.createEl = function createEl(type, props, attrs) {\\n    // The control is textual, not just an icon\\n    this.nonIconControl = true;\\n    return _ClickableComponent.prototype.createEl.call(this, 'li', assign({\\n      className: 'vjs-menu-item',\\n      innerHTML: \\\"<span class=\\\\\\\"vjs-menu-item-text\\\\\\\">\\\" + this.localize(this.options_.label) + \\\"</span>\\\",\\n      tabIndex: -1\\n    }, props), attrs);\\n  }\\n  /**\\n   * Ignore keys which are used by the menu, but pass any other ones up. See\\n   * {@link ClickableComponent#handleKeyDown} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    if (!MenuKeys.some(function (key) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, key);\\n    })) {\\n      // Pass keydown handling up for unused keys\\n      _ClickableComponent.prototype.handleKeyDown.call(this, event);\\n    }\\n  }\\n  /**\\n   * Any click on a `MenuItem` puts it into the selected state.\\n   * See {@link ClickableComponent#handleClick} for instances where this is called.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    this.selected(true);\\n  }\\n  /**\\n   * Set the state for this menu item as selected or not.\\n   *\\n   * @param {boolean} selected\\n   *        if the menu item is selected or not\\n   */\\n  ;\\n\\n  _proto.selected = function selected(_selected) {\\n    if (this.selectable) {\\n      if (_selected) {\\n        this.addClass('vjs-selected');\\n        this.el_.setAttribute('aria-checked', 'true'); // aria-checked isn't fully supported by browsers/screen readers,\\n        // so indicate selected state to screen reader in the control text.\\n\\n        this.controlText(', selected');\\n        this.isSelected_ = true;\\n      } else {\\n        this.removeClass('vjs-selected');\\n        this.el_.setAttribute('aria-checked', 'false'); // Indicate un-selected state to screen reader\\n\\n        this.controlText('');\\n        this.isSelected_ = false;\\n      }\\n    }\\n  };\\n\\n  return MenuItem;\\n}(ClickableComponent);\\n\\nComponent.registerComponent('MenuItem', MenuItem);\\n\\n/**\\n * The specific menu item type for selecting a language within a text track kind\\n *\\n * @extends MenuItem\\n */\\n\\nvar TextTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function TextTrackMenuItem(player, options) {\\n    var _this;\\n\\n    var track = options.track;\\n    var tracks = player.textTracks(); // Modify options for parent MenuItem class's init.\\n\\n    options.label = track.label || track.language || 'Unknown';\\n    options.selected = track.mode === 'showing';\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.track = track; // Determine the relevant kind(s) of tracks for this component and filter\\n    // out empty kinds.\\n\\n    _this.kinds = (options.kinds || [options.kind || _this.track.kind]).filter(Boolean);\\n\\n    var changeHandler = function changeHandler() {\\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n        args[_key] = arguments[_key];\\n      }\\n\\n      _this.handleTracksChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), args);\\n    };\\n\\n    var selectedLanguageChangeHandler = function selectedLanguageChangeHandler() {\\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n        args[_key2] = arguments[_key2];\\n      }\\n\\n      _this.handleSelectedLanguageChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), args);\\n    };\\n\\n    player.on(['loadstart', 'texttrackchange'], changeHandler);\\n    tracks.addEventListener('change', changeHandler);\\n    tracks.addEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\\n\\n    _this.on('dispose', function () {\\n      player.off(['loadstart', 'texttrackchange'], changeHandler);\\n      tracks.removeEventListener('change', changeHandler);\\n      tracks.removeEventListener('selectedlanguagechange', selectedLanguageChangeHandler);\\n    }); // iOS7 doesn't dispatch change events to TextTrackLists when an\\n    // associated track's mode changes. Without something like\\n    // Object.observe() (also not present on iOS7), it's not\\n    // possible to detect changes to the mode attribute and polyfill\\n    // the change event. As a poor substitute, we manually dispatch\\n    // change events whenever the controls modify the mode.\\n\\n\\n    if (tracks.onchange === undefined) {\\n      var event;\\n\\n      _this.on(['tap', 'click'], function () {\\n        if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Event !== 'object') {\\n          // Android 2.3 throws an Illegal Constructor error for window.Event\\n          try {\\n            event = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Event('change');\\n          } catch (err) {// continue regardless of error\\n          }\\n        }\\n\\n        if (!event) {\\n          event = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createEvent('Event');\\n          event.initEvent('change', true, true);\\n        }\\n\\n        tracks.dispatchEvent(event);\\n      });\\n    } // set the default state based on current tracks\\n\\n\\n    _this.handleTracksChange();\\n\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `TextTrackMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = TextTrackMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var referenceTrack = this.track;\\n    var tracks = this.player_.textTracks();\\n\\n    _MenuItem.prototype.handleClick.call(this, event);\\n\\n    if (!tracks) {\\n      return;\\n    }\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i]; // If the track from the text tracks list is not of the right kind,\\n      // skip it. We do not want to affect tracks of incompatible kind(s).\\n\\n      if (this.kinds.indexOf(track.kind) === -1) {\\n        continue;\\n      } // If this text track is the component's track and it is not showing,\\n      // set it to showing.\\n\\n\\n      if (track === referenceTrack) {\\n        if (track.mode !== 'showing') {\\n          track.mode = 'showing';\\n        } // If this text track is not the component's track and it is not\\n        // disabled, set it to disabled.\\n\\n      } else if (track.mode !== 'disabled') {\\n        track.mode = 'disabled';\\n      }\\n    }\\n  }\\n  /**\\n   * Handle text track list change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `change` event that caused this function to be called.\\n   *\\n   * @listens TextTrackList#change\\n   */\\n  ;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    var shouldBeSelected = this.track.mode === 'showing'; // Prevent redundant selected() calls because they may cause\\n    // screen readers to read the appended control text unnecessarily\\n\\n    if (shouldBeSelected !== this.isSelected_) {\\n      this.selected(shouldBeSelected);\\n    }\\n  };\\n\\n  _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\\n    if (this.track.mode === 'showing') {\\n      var selectedLanguage = this.player_.cache_.selectedLanguage; // Don't replace the kind of track across the same language\\n\\n      if (selectedLanguage && selectedLanguage.enabled && selectedLanguage.language === this.track.language && selectedLanguage.kind !== this.track.kind) {\\n        return;\\n      }\\n\\n      this.player_.cache_.selectedLanguage = {\\n        enabled: true,\\n        language: this.track.language,\\n        kind: this.track.kind\\n      };\\n    }\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    // remove reference to track object on dispose\\n    this.track = null;\\n\\n    _MenuItem.prototype.dispose.call(this);\\n  };\\n\\n  return TextTrackMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\\n\\n/**\\n * A special menu item for turning of a specific type of text track\\n *\\n * @extends TextTrackMenuItem\\n */\\n\\nvar OffTextTrackMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(OffTextTrackMenuItem, _TextTrackMenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function OffTextTrackMenuItem(player, options) {\\n    // Create pseudo track info\\n    // Requires options['kind']\\n    options.track = {\\n      player: player,\\n      // it is no longer necessary to store `kind` or `kinds` on the track itself\\n      // since they are now stored in the `kinds` property of all instances of\\n      // TextTrackMenuItem, but this will remain for backwards compatibility\\n      kind: options.kind,\\n      kinds: options.kinds,\\n      \\\"default\\\": false,\\n      mode: 'disabled'\\n    };\\n\\n    if (!options.kinds) {\\n      options.kinds = [options.kind];\\n    }\\n\\n    if (options.label) {\\n      options.track.label = options.label;\\n    } else {\\n      options.track.label = options.kinds.join(' and ') + ' off';\\n    } // MenuItem is selectable\\n\\n\\n    options.selectable = true; // MenuItem is NOT multiSelectable (i.e. only one can be marked \\\"selected\\\" at a time)\\n\\n    options.multiSelectable = false;\\n    return _TextTrackMenuItem.call(this, player, options) || this;\\n  }\\n  /**\\n   * Handle text track change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run\\n   */\\n\\n\\n  var _proto = OffTextTrackMenuItem.prototype;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    var tracks = this.player().textTracks();\\n    var shouldBeSelected = true;\\n\\n    for (var i = 0, l = tracks.length; i < l; i++) {\\n      var track = tracks[i];\\n\\n      if (this.options_.kinds.indexOf(track.kind) > -1 && track.mode === 'showing') {\\n        shouldBeSelected = false;\\n        break;\\n      }\\n    } // Prevent redundant selected() calls because they may cause\\n    // screen readers to read the appended control text unnecessarily\\n\\n\\n    if (shouldBeSelected !== this.isSelected_) {\\n      this.selected(shouldBeSelected);\\n    }\\n  };\\n\\n  _proto.handleSelectedLanguageChange = function handleSelectedLanguageChange(event) {\\n    var tracks = this.player().textTracks();\\n    var allHidden = true;\\n\\n    for (var i = 0, l = tracks.length; i < l; i++) {\\n      var track = tracks[i];\\n\\n      if (['captions', 'descriptions', 'subtitles'].indexOf(track.kind) > -1 && track.mode === 'showing') {\\n        allHidden = false;\\n        break;\\n      }\\n    }\\n\\n    if (allHidden) {\\n      this.player_.cache_.selectedLanguage = {\\n        enabled: false\\n      };\\n    }\\n  };\\n\\n  return OffTextTrackMenuItem;\\n}(TextTrackMenuItem);\\n\\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\\n\\n/**\\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\\n *\\n * @extends MenuButton\\n */\\n\\nvar TextTrackButton = /*#__PURE__*/function (_TrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackButton, _TrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function TextTrackButton(player, options) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    options.tracks = player.textTracks();\\n    return _TrackButton.call(this, player, options) || this;\\n  }\\n  /**\\n   * Create a menu item for each text track\\n   *\\n   * @param {TextTrackMenuItem[]} [items=[]]\\n   *        Existing array of items to use during creation\\n   *\\n   * @return {TextTrackMenuItem[]}\\n   *         Array of menu items that were created\\n   */\\n\\n\\n  var _proto = TextTrackButton.prototype;\\n\\n  _proto.createItems = function createItems(items, TrackMenuItem) {\\n    if (items === void 0) {\\n      items = [];\\n    }\\n\\n    if (TrackMenuItem === void 0) {\\n      TrackMenuItem = TextTrackMenuItem;\\n    }\\n\\n    // Label is an override for the [track] off label\\n    // USed to localise captions/subtitles\\n    var label;\\n\\n    if (this.label_) {\\n      label = this.label_ + \\\" off\\\";\\n    } // Add an OFF menu item to turn all tracks off\\n\\n\\n    items.push(new OffTextTrackMenuItem(this.player_, {\\n      kinds: this.kinds_,\\n      kind: this.kind_,\\n      label: label\\n    }));\\n    this.hideThreshold_ += 1;\\n    var tracks = this.player_.textTracks();\\n\\n    if (!Array.isArray(this.kinds_)) {\\n      this.kinds_ = [this.kind_];\\n    }\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i]; // only add tracks that are of an appropriate kind and have a label\\n\\n      if (this.kinds_.indexOf(track.kind) > -1) {\\n        var item = new TrackMenuItem(this.player_, {\\n          track: track,\\n          kinds: this.kinds_,\\n          kind: this.kind_,\\n          // MenuItem is selectable\\n          selectable: true,\\n          // MenuItem is NOT multiSelectable (i.e. only one can be marked \\\"selected\\\" at a time)\\n          multiSelectable: false\\n        });\\n        item.addClass(\\\"vjs-\\\" + track.kind + \\\"-menu-item\\\");\\n        items.push(item);\\n      }\\n    }\\n\\n    return items;\\n  };\\n\\n  return TextTrackButton;\\n}(TrackButton);\\n\\nComponent.registerComponent('TextTrackButton', TextTrackButton);\\n\\n/**\\n * The chapter track menu item\\n *\\n * @extends MenuItem\\n */\\n\\nvar ChaptersTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ChaptersTrackMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function ChaptersTrackMenuItem(player, options) {\\n    var _this;\\n\\n    var track = options.track;\\n    var cue = options.cue;\\n    var currentTime = player.currentTime(); // Modify options for parent MenuItem class's init.\\n\\n    options.selectable = true;\\n    options.multiSelectable = false;\\n    options.label = cue.text;\\n    options.selected = cue.startTime <= currentTime && currentTime < cue.endTime;\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.track = track;\\n    _this.cue = cue;\\n    track.addEventListener('cuechange', bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.update));\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `ChaptersTrackMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = ChaptersTrackMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    _MenuItem.prototype.handleClick.call(this);\\n\\n    this.player_.currentTime(this.cue.startTime);\\n    this.update(this.cue.startTime);\\n  }\\n  /**\\n   * Update chapter menu item\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `cuechange` event that caused this function to run.\\n   *\\n   * @listens TextTrack#cuechange\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    var cue = this.cue;\\n    var currentTime = this.player_.currentTime(); // vjs.log(currentTime, cue.startTime);\\n\\n    this.selected(cue.startTime <= currentTime && currentTime < cue.endTime);\\n  };\\n\\n  return ChaptersTrackMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\\n\\n/**\\n * The button component for toggling and selecting chapters\\n * Chapters act much differently than other text tracks\\n * Cues are navigation vs. other tracks of alternative languages\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar ChaptersButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ChaptersButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this function is ready.\\n   */\\n  function ChaptersButton(player, options, ready) {\\n    return _TextTrackButton.call(this, player, options, ready) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = ChaptersButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-chapters-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-chapters-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Update the menu based on the current state of its items.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        An event that triggered this function to run.\\n   *\\n   * @listens TextTrackList#addtrack\\n   * @listens TextTrackList#removetrack\\n   * @listens TextTrackList#change\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    if (!this.track_ || event && (event.type === 'addtrack' || event.type === 'removetrack')) {\\n      this.setTrack(this.findChaptersTrack());\\n    }\\n\\n    _TextTrackButton.prototype.update.call(this);\\n  }\\n  /**\\n   * Set the currently selected track for the chapters button.\\n   *\\n   * @param {TextTrack} track\\n   *        The new track to select. Nothing will change if this is the currently selected\\n   *        track.\\n   */\\n  ;\\n\\n  _proto.setTrack = function setTrack(track) {\\n    if (this.track_ === track) {\\n      return;\\n    }\\n\\n    if (!this.updateHandler_) {\\n      this.updateHandler_ = this.update.bind(this);\\n    } // here this.track_ refers to the old track instance\\n\\n\\n    if (this.track_) {\\n      var remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\\n\\n      if (remoteTextTrackEl) {\\n        remoteTextTrackEl.removeEventListener('load', this.updateHandler_);\\n      }\\n\\n      this.track_ = null;\\n    }\\n\\n    this.track_ = track; // here this.track_ refers to the new track instance\\n\\n    if (this.track_) {\\n      this.track_.mode = 'hidden';\\n\\n      var _remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);\\n\\n      if (_remoteTextTrackEl) {\\n        _remoteTextTrackEl.addEventListener('load', this.updateHandler_);\\n      }\\n    }\\n  }\\n  /**\\n   * Find the track object that is currently in use by this ChaptersButton\\n   *\\n   * @return {TextTrack|undefined}\\n   *         The current track or undefined if none was found.\\n   */\\n  ;\\n\\n  _proto.findChaptersTrack = function findChaptersTrack() {\\n    var tracks = this.player_.textTracks() || [];\\n\\n    for (var i = tracks.length - 1; i >= 0; i--) {\\n      // We will always choose the last track as our chaptersTrack\\n      var track = tracks[i];\\n\\n      if (track.kind === this.kind_) {\\n        return track;\\n      }\\n    }\\n  }\\n  /**\\n   * Get the caption for the ChaptersButton based on the track label. This will also\\n   * use the current tracks localized kind as a fallback if a label does not exist.\\n   *\\n   * @return {string}\\n   *         The tracks current label or the localized track kind.\\n   */\\n  ;\\n\\n  _proto.getMenuCaption = function getMenuCaption() {\\n    if (this.track_ && this.track_.label) {\\n      return this.track_.label;\\n    }\\n\\n    return this.localize(toTitleCase(this.kind_));\\n  }\\n  /**\\n   * Create menu from chapter track\\n   *\\n   * @return {Menu}\\n   *         New menu for the chapter buttons\\n   */\\n  ;\\n\\n  _proto.createMenu = function createMenu() {\\n    this.options_.title = this.getMenuCaption();\\n    return _TextTrackButton.prototype.createMenu.call(this);\\n  }\\n  /**\\n   * Create a menu item for each text track\\n   *\\n   * @return {TextTrackMenuItem[]}\\n   *         Array of menu items\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {\\n    var items = [];\\n\\n    if (!this.track_) {\\n      return items;\\n    }\\n\\n    var cues = this.track_.cues;\\n\\n    if (!cues) {\\n      return items;\\n    }\\n\\n    for (var i = 0, l = cues.length; i < l; i++) {\\n      var cue = cues[i];\\n      var mi = new ChaptersTrackMenuItem(this.player_, {\\n        track: this.track_,\\n        cue: cue\\n      });\\n      items.push(mi);\\n    }\\n\\n    return items;\\n  };\\n\\n  return ChaptersButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nChaptersButton.prototype.kind_ = 'chapters';\\n/**\\n * The text that should display over the `ChaptersButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nChaptersButton.prototype.controlText_ = 'Chapters';\\nComponent.registerComponent('ChaptersButton', ChaptersButton);\\n\\n/**\\n * The button component for toggling and selecting descriptions\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar DescriptionsButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(DescriptionsButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this component is ready.\\n   */\\n  function DescriptionsButton(player, options, ready) {\\n    var _this;\\n\\n    _this = _TextTrackButton.call(this, player, options, ready) || this;\\n    var tracks = player.textTracks();\\n    var changeHandler = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.handleTracksChange);\\n    tracks.addEventListener('change', changeHandler);\\n\\n    _this.on('dispose', function () {\\n      tracks.removeEventListener('change', changeHandler);\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Handle text track change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The event that caused this function to run\\n   *\\n   * @listens TextTrackList#change\\n   */\\n\\n\\n  var _proto = DescriptionsButton.prototype;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    var tracks = this.player().textTracks();\\n    var disabled = false; // Check whether a track of a different kind is showing\\n\\n    for (var i = 0, l = tracks.length; i < l; i++) {\\n      var track = tracks[i];\\n\\n      if (track.kind !== this.kind_ && track.mode === 'showing') {\\n        disabled = true;\\n        break;\\n      }\\n    } // If another track is showing, disable this menu button\\n\\n\\n    if (disabled) {\\n      this.disable();\\n    } else {\\n      this.enable();\\n    }\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-descriptions-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-descriptions-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  };\\n\\n  return DescriptionsButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nDescriptionsButton.prototype.kind_ = 'descriptions';\\n/**\\n * The text that should display over the `DescriptionsButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nDescriptionsButton.prototype.controlText_ = 'Descriptions';\\nComponent.registerComponent('DescriptionsButton', DescriptionsButton);\\n\\n/**\\n * The button component for toggling and selecting subtitles\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar SubtitlesButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SubtitlesButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this component is ready.\\n   */\\n  function SubtitlesButton(player, options, ready) {\\n    return _TextTrackButton.call(this, player, options, ready) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = SubtitlesButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-subtitles-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-subtitles-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  };\\n\\n  return SubtitlesButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nSubtitlesButton.prototype.kind_ = 'subtitles';\\n/**\\n * The text that should display over the `SubtitlesButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\\n\\n/**\\n * The menu item for caption track settings menu\\n *\\n * @extends TextTrackMenuItem\\n */\\n\\nvar CaptionSettingsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CaptionSettingsMenuItem, _TextTrackMenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function CaptionSettingsMenuItem(player, options) {\\n    var _this;\\n\\n    options.track = {\\n      player: player,\\n      kind: options.kind,\\n      label: options.kind + ' settings',\\n      selectable: false,\\n      \\\"default\\\": false,\\n      mode: 'disabled'\\n    }; // CaptionSettingsMenuItem has no concept of 'selected'\\n\\n    options.selectable = false;\\n    options.name = 'CaptionSettingsMenuItem';\\n    _this = _TextTrackMenuItem.call(this, player, options) || this;\\n\\n    _this.addClass('vjs-texttrack-settings');\\n\\n    _this.controlText(', opens ' + options.kind + ' settings dialog');\\n\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `CaptionSettingsMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = CaptionSettingsMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    this.player().getChild('textTrackSettings').open();\\n  };\\n\\n  return CaptionSettingsMenuItem;\\n}(TextTrackMenuItem);\\n\\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\\n\\n/**\\n * The button component for toggling and selecting captions\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar CaptionsButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CaptionsButton, _TextTrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        The function to call when this component is ready.\\n   */\\n  function CaptionsButton(player, options, ready) {\\n    return _TextTrackButton.call(this, player, options, ready) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = CaptionsButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-captions-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-captions-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create caption menu items\\n   *\\n   * @return {CaptionSettingsMenuItem[]}\\n   *         The array of current menu items.\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {\\n    var items = [];\\n\\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\\n      items.push(new CaptionSettingsMenuItem(this.player_, {\\n        kind: this.kind_\\n      }));\\n      this.hideThreshold_ += 1;\\n    }\\n\\n    return _TextTrackButton.prototype.createItems.call(this, items);\\n  };\\n\\n  return CaptionsButton;\\n}(TextTrackButton);\\n/**\\n * `kind` of TextTrack to look for to associate it with this menu.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nCaptionsButton.prototype.kind_ = 'captions';\\n/**\\n * The text that should display over the `CaptionsButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\nCaptionsButton.prototype.controlText_ = 'Captions';\\nComponent.registerComponent('CaptionsButton', CaptionsButton);\\n\\n/**\\n * SubsCapsMenuItem has an [cc] icon to distinguish captions from subtitles\\n * in the SubsCapsMenu.\\n *\\n * @extends TextTrackMenuItem\\n */\\n\\nvar SubsCapsMenuItem = /*#__PURE__*/function (_TextTrackMenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SubsCapsMenuItem, _TextTrackMenuItem);\\n\\n  function SubsCapsMenuItem() {\\n    return _TextTrackMenuItem.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = SubsCapsMenuItem.prototype;\\n\\n  _proto.createEl = function createEl(type, props, attrs) {\\n    var innerHTML = \\\"<span class=\\\\\\\"vjs-menu-item-text\\\\\\\">\\\" + this.localize(this.options_.label);\\n\\n    if (this.options_.track.kind === 'captions') {\\n      innerHTML += \\\"\\\\n        <span aria-hidden=\\\\\\\"true\\\\\\\" class=\\\\\\\"vjs-icon-placeholder\\\\\\\"></span>\\\\n        <span class=\\\\\\\"vjs-control-text\\\\\\\"> \\\" + this.localize('Captions') + \\\"</span>\\\\n      \\\";\\n    }\\n\\n    innerHTML += '</span>';\\n\\n    var el = _TextTrackMenuItem.prototype.createEl.call(this, type, assign({\\n      innerHTML: innerHTML\\n    }, props), attrs);\\n\\n    return el;\\n  };\\n\\n  return SubsCapsMenuItem;\\n}(TextTrackMenuItem);\\n\\nComponent.registerComponent('SubsCapsMenuItem', SubsCapsMenuItem);\\n\\n/**\\n * The button component for toggling and selecting captions and/or subtitles\\n *\\n * @extends TextTrackButton\\n */\\n\\nvar SubsCapsButton = /*#__PURE__*/function (_TextTrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(SubsCapsButton, _TextTrackButton);\\n\\n  function SubsCapsButton(player, options) {\\n    var _this;\\n\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    _this = _TextTrackButton.call(this, player, options) || this; // Although North America uses \\\"captions\\\" in most cases for\\n    // \\\"captions and subtitles\\\" other locales use \\\"subtitles\\\"\\n\\n    _this.label_ = 'subtitles';\\n\\n    if (['en', 'en-us', 'en-ca', 'fr-ca'].indexOf(_this.player_.language_) > -1) {\\n      _this.label_ = 'captions';\\n    }\\n\\n    _this.menuButton_.controlText(toTitleCase(_this.label_));\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = SubsCapsButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-subs-caps-button \\\" + _TextTrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-subs-caps-button \\\" + _TextTrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create caption/subtitles menu items\\n   *\\n   * @return {CaptionSettingsMenuItem[]}\\n   *         The array of current menu items.\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems() {\\n    var items = [];\\n\\n    if (!(this.player().tech_ && this.player().tech_.featuresNativeTextTracks) && this.player().getChild('textTrackSettings')) {\\n      items.push(new CaptionSettingsMenuItem(this.player_, {\\n        kind: this.label_\\n      }));\\n      this.hideThreshold_ += 1;\\n    }\\n\\n    items = _TextTrackButton.prototype.createItems.call(this, items, SubsCapsMenuItem);\\n    return items;\\n  };\\n\\n  return SubsCapsButton;\\n}(TextTrackButton);\\n/**\\n * `kind`s of TextTrack to look for to associate it with this menu.\\n *\\n * @type {array}\\n * @private\\n */\\n\\n\\nSubsCapsButton.prototype.kinds_ = ['captions', 'subtitles'];\\n/**\\n * The text that should display over the `SubsCapsButton`s controls.\\n *\\n *\\n * @type {string}\\n * @private\\n */\\n\\nSubsCapsButton.prototype.controlText_ = 'Subtitles';\\nComponent.registerComponent('SubsCapsButton', SubsCapsButton);\\n\\n/**\\n * An {@link AudioTrack} {@link MenuItem}\\n *\\n * @extends MenuItem\\n */\\n\\nvar AudioTrackMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrackMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function AudioTrackMenuItem(player, options) {\\n    var _this;\\n\\n    var track = options.track;\\n    var tracks = player.audioTracks(); // Modify options for parent MenuItem class's init.\\n\\n    options.label = track.label || track.language || 'Unknown';\\n    options.selected = track.enabled;\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.track = track;\\n\\n    _this.addClass(\\\"vjs-\\\" + track.kind + \\\"-menu-item\\\");\\n\\n    var changeHandler = function changeHandler() {\\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n        args[_key] = arguments[_key];\\n      }\\n\\n      _this.handleTracksChange.apply(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), args);\\n    };\\n\\n    tracks.addEventListener('change', changeHandler);\\n\\n    _this.on('dispose', function () {\\n      tracks.removeEventListener('change', changeHandler);\\n    });\\n\\n    return _this;\\n  }\\n\\n  var _proto = AudioTrackMenuItem.prototype;\\n\\n  _proto.createEl = function createEl(type, props, attrs) {\\n    var innerHTML = \\\"<span class=\\\\\\\"vjs-menu-item-text\\\\\\\">\\\" + this.localize(this.options_.label);\\n\\n    if (this.options_.track.kind === 'main-desc') {\\n      innerHTML += \\\"\\\\n        <span aria-hidden=\\\\\\\"true\\\\\\\" class=\\\\\\\"vjs-icon-placeholder\\\\\\\"></span>\\\\n        <span class=\\\\\\\"vjs-control-text\\\\\\\"> \\\" + this.localize('Descriptions') + \\\"</span>\\\\n      \\\";\\n    }\\n\\n    innerHTML += '</span>';\\n\\n    var el = _MenuItem.prototype.createEl.call(this, type, assign({\\n      innerHTML: innerHTML\\n    }, props), attrs);\\n\\n    return el;\\n  }\\n  /**\\n   * This gets called when an `AudioTrackMenuItem is \\\"clicked\\\". See {@link ClickableComponent}\\n   * for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    var tracks = this.player_.audioTracks();\\n\\n    _MenuItem.prototype.handleClick.call(this, event);\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i];\\n      track.enabled = track === this.track;\\n    }\\n  }\\n  /**\\n   * Handle any {@link AudioTrack} change.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The {@link AudioTrackList#change} event that caused this to run.\\n   *\\n   * @listens AudioTrackList#change\\n   */\\n  ;\\n\\n  _proto.handleTracksChange = function handleTracksChange(event) {\\n    this.selected(this.track.enabled);\\n  };\\n\\n  return AudioTrackMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent('AudioTrackMenuItem', AudioTrackMenuItem);\\n\\n/**\\n * The base class for buttons that toggle specific {@link AudioTrack} types.\\n *\\n * @extends TrackButton\\n */\\n\\nvar AudioTrackButton = /*#__PURE__*/function (_TrackButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(AudioTrackButton, _TrackButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options={}]\\n   *        The key/value store of player options.\\n   */\\n  function AudioTrackButton(player, options) {\\n    if (options === void 0) {\\n      options = {};\\n    }\\n\\n    options.tracks = player.audioTracks();\\n    return _TrackButton.call(this, player, options) || this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n\\n\\n  var _proto = AudioTrackButton.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-audio-button \\\" + _TrackButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-audio-button \\\" + _TrackButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create a menu item for each audio track\\n   *\\n   * @param {AudioTrackMenuItem[]} [items=[]]\\n   *        An array of existing menu items to use.\\n   *\\n   * @return {AudioTrackMenuItem[]}\\n   *         An array of menu items\\n   */\\n  ;\\n\\n  _proto.createItems = function createItems(items) {\\n    if (items === void 0) {\\n      items = [];\\n    }\\n\\n    // if there's only one audio track, there no point in showing it\\n    this.hideThreshold_ = 1;\\n    var tracks = this.player_.audioTracks();\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i];\\n      items.push(new AudioTrackMenuItem(this.player_, {\\n        track: track,\\n        // MenuItem is selectable\\n        selectable: true,\\n        // MenuItem is NOT multiSelectable (i.e. only one can be marked \\\"selected\\\" at a time)\\n        multiSelectable: false\\n      }));\\n    }\\n\\n    return items;\\n  };\\n\\n  return AudioTrackButton;\\n}(TrackButton);\\n/**\\n * The text that should display over the `AudioTrackButton`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nAudioTrackButton.prototype.controlText_ = 'Audio Track';\\nComponent.registerComponent('AudioTrackButton', AudioTrackButton);\\n\\n/**\\n * The specific menu item type for selecting a playback rate.\\n *\\n * @extends MenuItem\\n */\\n\\nvar PlaybackRateMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlaybackRateMenuItem, _MenuItem);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PlaybackRateMenuItem(player, options) {\\n    var _this;\\n\\n    var label = options.rate;\\n    var rate = parseFloat(label, 10); // Modify options for parent MenuItem class's init.\\n\\n    options.label = label;\\n    options.selected = rate === 1;\\n    options.selectable = true;\\n    options.multiSelectable = false;\\n    _this = _MenuItem.call(this, player, options) || this;\\n    _this.label = label;\\n    _this.rate = rate;\\n\\n    _this.on(player, 'ratechange', _this.update);\\n\\n    return _this;\\n  }\\n  /**\\n   * This gets called when an `PlaybackRateMenuItem` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n\\n\\n  var _proto = PlaybackRateMenuItem.prototype;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    _MenuItem.prototype.handleClick.call(this);\\n\\n    this.player().playbackRate(this.rate);\\n  }\\n  /**\\n   * Update the PlaybackRateMenuItem when the playbackrate changes.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `ratechange` event that caused this function to run.\\n   *\\n   * @listens Player#ratechange\\n   */\\n  ;\\n\\n  _proto.update = function update(event) {\\n    this.selected(this.player().playbackRate() === this.rate);\\n  };\\n\\n  return PlaybackRateMenuItem;\\n}(MenuItem);\\n/**\\n * The text that should display over the `PlaybackRateMenuItem`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPlaybackRateMenuItem.prototype.contentElType = 'button';\\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\\n\\n/**\\n * The component for controlling the playback rate.\\n *\\n * @extends MenuButton\\n */\\n\\nvar PlaybackRateMenuButton = /*#__PURE__*/function (_MenuButton) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(PlaybackRateMenuButton, _MenuButton);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   */\\n  function PlaybackRateMenuButton(player, options) {\\n    var _this;\\n\\n    _this = _MenuButton.call(this, player, options) || this;\\n\\n    _this.updateVisibility();\\n\\n    _this.updateLabel();\\n\\n    _this.on(player, 'loadstart', _this.updateVisibility);\\n\\n    _this.on(player, 'ratechange', _this.updateLabel);\\n\\n    return _this;\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n\\n\\n  var _proto = PlaybackRateMenuButton.prototype;\\n\\n  _proto.createEl = function createEl$1() {\\n    var el = _MenuButton.prototype.createEl.call(this);\\n\\n    this.labelEl_ = createEl('div', {\\n      className: 'vjs-playback-rate-value',\\n      innerHTML: '1x'\\n    });\\n    el.appendChild(this.labelEl_);\\n    return el;\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    this.labelEl_ = null;\\n\\n    _MenuButton.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  ;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-playback-rate \\\" + _MenuButton.prototype.buildCSSClass.call(this);\\n  };\\n\\n  _proto.buildWrapperCSSClass = function buildWrapperCSSClass() {\\n    return \\\"vjs-playback-rate \\\" + _MenuButton.prototype.buildWrapperCSSClass.call(this);\\n  }\\n  /**\\n   * Create the playback rate menu\\n   *\\n   * @return {Menu}\\n   *         Menu object populated with {@link PlaybackRateMenuItem}s\\n   */\\n  ;\\n\\n  _proto.createMenu = function createMenu() {\\n    var menu = new Menu(this.player());\\n    var rates = this.playbackRates();\\n\\n    if (rates) {\\n      for (var i = rates.length - 1; i >= 0; i--) {\\n        menu.addChild(new PlaybackRateMenuItem(this.player(), {\\n          rate: rates[i] + 'x'\\n        }));\\n      }\\n    }\\n\\n    return menu;\\n  }\\n  /**\\n   * Updates ARIA accessibility attributes\\n   */\\n  ;\\n\\n  _proto.updateARIAAttributes = function updateARIAAttributes() {\\n    // Current playback rate\\n    this.el().setAttribute('aria-valuenow', this.player().playbackRate());\\n  }\\n  /**\\n   * This gets called when an `PlaybackRateMenuButton` is \\\"clicked\\\". See\\n   * {@link ClickableComponent} for more detailed information on what a click can be.\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The `keydown`, `tap`, or `click` event that caused this function to be\\n   *        called.\\n   *\\n   * @listens tap\\n   * @listens click\\n   */\\n  ;\\n\\n  _proto.handleClick = function handleClick(event) {\\n    // select next rate option\\n    var currentRate = this.player().playbackRate();\\n    var rates = this.playbackRates(); // this will select first one if the last one currently selected\\n\\n    var newRate = rates[0];\\n\\n    for (var i = 0; i < rates.length; i++) {\\n      if (rates[i] > currentRate) {\\n        newRate = rates[i];\\n        break;\\n      }\\n    }\\n\\n    this.player().playbackRate(newRate);\\n  }\\n  /**\\n   * Get possible playback rates\\n   *\\n   * @return {Array}\\n   *         All possible playback rates\\n   */\\n  ;\\n\\n  _proto.playbackRates = function playbackRates() {\\n    return this.options_.playbackRates || this.options_.playerOptions && this.options_.playerOptions.playbackRates;\\n  }\\n  /**\\n   * Get whether playback rates is supported by the tech\\n   * and an array of playback rates exists\\n   *\\n   * @return {boolean}\\n   *         Whether changing playback rate is supported\\n   */\\n  ;\\n\\n  _proto.playbackRateSupported = function playbackRateSupported() {\\n    return this.player().tech_ && this.player().tech_.featuresPlaybackRate && this.playbackRates() && this.playbackRates().length > 0;\\n  }\\n  /**\\n   * Hide playback rate controls when they're no playback rate options to select\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#loadstart\\n   */\\n  ;\\n\\n  _proto.updateVisibility = function updateVisibility(event) {\\n    if (this.playbackRateSupported()) {\\n      this.removeClass('vjs-hidden');\\n    } else {\\n      this.addClass('vjs-hidden');\\n    }\\n  }\\n  /**\\n   * Update button label when rate changed\\n   *\\n   * @param {EventTarget~Event} [event]\\n   *        The event that caused this function to run.\\n   *\\n   * @listens Player#ratechange\\n   */\\n  ;\\n\\n  _proto.updateLabel = function updateLabel(event) {\\n    if (this.playbackRateSupported()) {\\n      this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\\n    }\\n  };\\n\\n  return PlaybackRateMenuButton;\\n}(MenuButton);\\n/**\\n * The text that should display over the `FullscreenToggle`s controls. Added for localization.\\n *\\n * @type {string}\\n * @private\\n */\\n\\n\\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\\n\\n/**\\n * Just an empty spacer element that can be used as an append point for plugins, etc.\\n * Also can be used to create space between elements when necessary.\\n *\\n * @extends Component\\n */\\n\\nvar Spacer = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Spacer, _Component);\\n\\n  function Spacer() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = Spacer.prototype;\\n\\n  /**\\n  * Builds the default DOM `className`.\\n  *\\n  * @return {string}\\n  *         The DOM `className` for this object.\\n  */\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-spacer \\\" + _Component.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: this.buildCSSClass()\\n    });\\n  };\\n\\n  return Spacer;\\n}(Component);\\n\\nComponent.registerComponent('Spacer', Spacer);\\n\\n/**\\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\\n *\\n * @extends Spacer\\n */\\n\\nvar CustomControlSpacer = /*#__PURE__*/function (_Spacer) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(CustomControlSpacer, _Spacer);\\n\\n  function CustomControlSpacer() {\\n    return _Spacer.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = CustomControlSpacer.prototype;\\n\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   */\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-custom-control-spacer \\\" + _Spacer.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var el = _Spacer.prototype.createEl.call(this, {\\n      className: this.buildCSSClass()\\n    }); // No-flex/table-cell mode requires there be some content\\n    // in the cell to fill the remaining space of the table.\\n\\n\\n    el.innerHTML = \\\"\\\\xA0\\\";\\n    return el;\\n  };\\n\\n  return CustomControlSpacer;\\n}(Spacer);\\n\\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\\n\\n/**\\n * Container of main controls.\\n *\\n * @extends Component\\n */\\n\\nvar ControlBar = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ControlBar, _Component);\\n\\n  function ControlBar() {\\n    return _Component.apply(this, arguments) || this;\\n  }\\n\\n  var _proto = ControlBar.prototype;\\n\\n  /**\\n   * Create the `Component`'s DOM element\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   */\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'div', {\\n      className: 'vjs-control-bar',\\n      dir: 'ltr'\\n    });\\n  };\\n\\n  return ControlBar;\\n}(Component);\\n/**\\n * Default options for `ControlBar`\\n *\\n * @type {Object}\\n * @private\\n */\\n\\n\\nControlBar.prototype.options_ = {\\n  children: ['playToggle', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'fullscreenToggle']\\n};\\n\\nif ('exitPictureInPicture' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n  ControlBar.prototype.options_.children.splice(ControlBar.prototype.options_.children.length - 1, 0, 'pictureInPictureToggle');\\n}\\n\\nComponent.registerComponent('ControlBar', ControlBar);\\n\\n/**\\n * A display that indicates an error has occurred. This means that the video\\n * is unplayable.\\n *\\n * @extends ModalDialog\\n */\\n\\nvar ErrorDisplay = /*#__PURE__*/function (_ModalDialog) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ErrorDisplay, _ModalDialog);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param  {Player} player\\n   *         The `Player` that this class should be attached to.\\n   *\\n   * @param  {Object} [options]\\n   *         The key/value store of player options.\\n   */\\n  function ErrorDisplay(player, options) {\\n    var _this;\\n\\n    _this = _ModalDialog.call(this, player, options) || this;\\n\\n    _this.on(player, 'error', _this.open);\\n\\n    return _this;\\n  }\\n  /**\\n   * Builds the default DOM `className`.\\n   *\\n   * @return {string}\\n   *         The DOM `className` for this object.\\n   *\\n   * @deprecated Since version 5.\\n   */\\n\\n\\n  var _proto = ErrorDisplay.prototype;\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return \\\"vjs-error-display \\\" + _ModalDialog.prototype.buildCSSClass.call(this);\\n  }\\n  /**\\n   * Gets the localized error message based on the `Player`s error.\\n   *\\n   * @return {string}\\n   *         The `Player`s error message localized or an empty string.\\n   */\\n  ;\\n\\n  _proto.content = function content() {\\n    var error = this.player().error();\\n    return error ? this.localize(error.message) : '';\\n  };\\n\\n  return ErrorDisplay;\\n}(ModalDialog);\\n/**\\n * The default options for an `ErrorDisplay`.\\n *\\n * @private\\n */\\n\\n\\nErrorDisplay.prototype.options_ = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, ModalDialog.prototype.options_, {\\n  pauseOnOpen: false,\\n  fillAlways: true,\\n  temporary: false,\\n  uncloseable: true\\n});\\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\\n\\nvar LOCAL_STORAGE_KEY = 'vjs-text-track-settings';\\nvar COLOR_BLACK = ['#000', 'Black'];\\nvar COLOR_BLUE = ['#00F', 'Blue'];\\nvar COLOR_CYAN = ['#0FF', 'Cyan'];\\nvar COLOR_GREEN = ['#0F0', 'Green'];\\nvar COLOR_MAGENTA = ['#F0F', 'Magenta'];\\nvar COLOR_RED = ['#F00', 'Red'];\\nvar COLOR_WHITE = ['#FFF', 'White'];\\nvar COLOR_YELLOW = ['#FF0', 'Yellow'];\\nvar OPACITY_OPAQUE = ['1', 'Opaque'];\\nvar OPACITY_SEMI = ['0.5', 'Semi-Transparent'];\\nvar OPACITY_TRANS = ['0', 'Transparent']; // Configuration for the various <select> elements in the DOM of this component.\\n//\\n// Possible keys include:\\n//\\n// `default`:\\n//   The default option index. Only needs to be provided if not zero.\\n// `parser`:\\n//   A function which is used to parse the value from the selected option in\\n//   a customized way.\\n// `selector`:\\n//   The selector used to find the associated <select> element.\\n\\nvar selectConfigs = {\\n  backgroundColor: {\\n    selector: '.vjs-bg-color > select',\\n    id: 'captions-background-color-%s',\\n    label: 'Color',\\n    options: [COLOR_BLACK, COLOR_WHITE, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\\n  },\\n  backgroundOpacity: {\\n    selector: '.vjs-bg-opacity > select',\\n    id: 'captions-background-opacity-%s',\\n    label: 'Transparency',\\n    options: [OPACITY_OPAQUE, OPACITY_SEMI, OPACITY_TRANS]\\n  },\\n  color: {\\n    selector: '.vjs-fg-color > select',\\n    id: 'captions-foreground-color-%s',\\n    label: 'Color',\\n    options: [COLOR_WHITE, COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW, COLOR_MAGENTA, COLOR_CYAN]\\n  },\\n  edgeStyle: {\\n    selector: '.vjs-edge-style > select',\\n    id: '%s',\\n    label: 'Text Edge Style',\\n    options: [['none', 'None'], ['raised', 'Raised'], ['depressed', 'Depressed'], ['uniform', 'Uniform'], ['dropshadow', 'Dropshadow']]\\n  },\\n  fontFamily: {\\n    selector: '.vjs-font-family > select',\\n    id: 'captions-font-family-%s',\\n    label: 'Font Family',\\n    options: [['proportionalSansSerif', 'Proportional Sans-Serif'], ['monospaceSansSerif', 'Monospace Sans-Serif'], ['proportionalSerif', 'Proportional Serif'], ['monospaceSerif', 'Monospace Serif'], ['casual', 'Casual'], ['script', 'Script'], ['small-caps', 'Small Caps']]\\n  },\\n  fontPercent: {\\n    selector: '.vjs-font-percent > select',\\n    id: 'captions-font-size-%s',\\n    label: 'Font Size',\\n    options: [['0.50', '50%'], ['0.75', '75%'], ['1.00', '100%'], ['1.25', '125%'], ['1.50', '150%'], ['1.75', '175%'], ['2.00', '200%'], ['3.00', '300%'], ['4.00', '400%']],\\n    \\\"default\\\": 2,\\n    parser: function parser(v) {\\n      return v === '1.00' ? null : Number(v);\\n    }\\n  },\\n  textOpacity: {\\n    selector: '.vjs-text-opacity > select',\\n    id: 'captions-foreground-opacity-%s',\\n    label: 'Transparency',\\n    options: [OPACITY_OPAQUE, OPACITY_SEMI]\\n  },\\n  // Options for this object are defined below.\\n  windowColor: {\\n    selector: '.vjs-window-color > select',\\n    id: 'captions-window-color-%s',\\n    label: 'Color'\\n  },\\n  // Options for this object are defined below.\\n  windowOpacity: {\\n    selector: '.vjs-window-opacity > select',\\n    id: 'captions-window-opacity-%s',\\n    label: 'Transparency',\\n    options: [OPACITY_TRANS, OPACITY_SEMI, OPACITY_OPAQUE]\\n  }\\n};\\nselectConfigs.windowColor.options = selectConfigs.backgroundColor.options;\\n/**\\n * Get the actual value of an option.\\n *\\n * @param  {string} value\\n *         The value to get\\n *\\n * @param  {Function} [parser]\\n *         Optional function to adjust the value.\\n *\\n * @return {Mixed}\\n *         - Will be `undefined` if no value exists\\n *         - Will be `undefined` if the given value is \\\"none\\\".\\n *         - Will be the actual value otherwise.\\n *\\n * @private\\n */\\n\\nfunction parseOptionValue(value, parser) {\\n  if (parser) {\\n    value = parser(value);\\n  }\\n\\n  if (value && value !== 'none') {\\n    return value;\\n  }\\n}\\n/**\\n * Gets the value of the selected <option> element within a <select> element.\\n *\\n * @param  {Element} el\\n *         the element to look in\\n *\\n * @param  {Function} [parser]\\n *         Optional function to adjust the value.\\n *\\n * @return {Mixed}\\n *         - Will be `undefined` if no value exists\\n *         - Will be `undefined` if the given value is \\\"none\\\".\\n *         - Will be the actual value otherwise.\\n *\\n * @private\\n */\\n\\n\\nfunction getSelectedOptionValue(el, parser) {\\n  var value = el.options[el.options.selectedIndex].value;\\n  return parseOptionValue(value, parser);\\n}\\n/**\\n * Sets the selected <option> element within a <select> element based on a\\n * given value.\\n *\\n * @param {Element} el\\n *        The element to look in.\\n *\\n * @param {string} value\\n *        the property to look on.\\n *\\n * @param {Function} [parser]\\n *        Optional function to adjust the value before comparing.\\n *\\n * @private\\n */\\n\\n\\nfunction setSelectedOption(el, value, parser) {\\n  if (!value) {\\n    return;\\n  }\\n\\n  for (var i = 0; i < el.options.length; i++) {\\n    if (parseOptionValue(el.options[i].value, parser) === value) {\\n      el.selectedIndex = i;\\n      break;\\n    }\\n  }\\n}\\n/**\\n * Manipulate Text Tracks settings.\\n *\\n * @extends ModalDialog\\n */\\n\\n\\nvar TextTrackSettings = /*#__PURE__*/function (_ModalDialog) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(TextTrackSettings, _ModalDialog);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *         The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *         The key/value store of player options.\\n   */\\n  function TextTrackSettings(player, options) {\\n    var _this;\\n\\n    options.temporary = false;\\n    _this = _ModalDialog.call(this, player, options) || this;\\n    _this.updateDisplay = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.updateDisplay); // fill the modal and pretend we have opened it\\n\\n    _this.fill();\\n\\n    _this.hasBeenOpened_ = _this.hasBeenFilled_ = true;\\n    _this.endDialog = createEl('p', {\\n      className: 'vjs-control-text',\\n      textContent: _this.localize('End of dialog window.')\\n    });\\n\\n    _this.el().appendChild(_this.endDialog);\\n\\n    _this.setDefaults(); // Grab `persistTextTrackSettings` from the player options if not passed in child options\\n\\n\\n    if (options.persistTextTrackSettings === undefined) {\\n      _this.options_.persistTextTrackSettings = _this.options_.playerOptions.persistTextTrackSettings;\\n    }\\n\\n    _this.on(_this.$('.vjs-done-button'), 'click', function () {\\n      _this.saveSettings();\\n\\n      _this.close();\\n    });\\n\\n    _this.on(_this.$('.vjs-default-button'), 'click', function () {\\n      _this.setDefaults();\\n\\n      _this.updateDisplay();\\n    });\\n\\n    each(selectConfigs, function (config) {\\n      _this.on(_this.$(config.selector), 'change', _this.updateDisplay);\\n    });\\n\\n    if (_this.options_.persistTextTrackSettings) {\\n      _this.restoreSettings();\\n    }\\n\\n    return _this;\\n  }\\n\\n  var _proto = TextTrackSettings.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    this.endDialog = null;\\n\\n    _ModalDialog.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create a <select> element with configured options.\\n   *\\n   * @param {string} key\\n   *        Configuration key to use during creation.\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElSelect_ = function createElSelect_(key, legendId, type) {\\n    var _this2 = this;\\n\\n    if (legendId === void 0) {\\n      legendId = '';\\n    }\\n\\n    if (type === void 0) {\\n      type = 'label';\\n    }\\n\\n    var config = selectConfigs[key];\\n    var id = config.id.replace('%s', this.id_);\\n    var selectLabelledbyIds = [legendId, id].join(' ').trim();\\n    return [\\\"<\\\" + type + \\\" id=\\\\\\\"\\\" + id + \\\"\\\\\\\" class=\\\\\\\"\\\" + (type === 'label' ? 'vjs-label' : '') + \\\"\\\\\\\">\\\", this.localize(config.label), \\\"</\\\" + type + \\\">\\\", \\\"<select aria-labelledby=\\\\\\\"\\\" + selectLabelledbyIds + \\\"\\\\\\\">\\\"].concat(config.options.map(function (o) {\\n      var optionId = id + '-' + o[1].replace(/\\\\W+/g, '');\\n      return [\\\"<option id=\\\\\\\"\\\" + optionId + \\\"\\\\\\\" value=\\\\\\\"\\\" + o[0] + \\\"\\\\\\\" \\\", \\\"aria-labelledby=\\\\\\\"\\\" + selectLabelledbyIds + \\\" \\\" + optionId + \\\"\\\\\\\">\\\", _this2.localize(o[1]), '</option>'].join('');\\n    })).concat('</select>').join('');\\n  }\\n  /**\\n   * Create foreground color element for the component\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElFgColor_ = function createElFgColor_() {\\n    var legendId = \\\"captions-text-legend-\\\" + this.id_;\\n    return ['<fieldset class=\\\"vjs-fg-color vjs-track-setting\\\">', \\\"<legend id=\\\\\\\"\\\" + legendId + \\\"\\\\\\\">\\\", this.localize('Text'), '</legend>', this.createElSelect_('color', legendId), '<span class=\\\"vjs-text-opacity vjs-opacity\\\">', this.createElSelect_('textOpacity', legendId), '</span>', '</fieldset>'].join('');\\n  }\\n  /**\\n   * Create background color element for the component\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElBgColor_ = function createElBgColor_() {\\n    var legendId = \\\"captions-background-\\\" + this.id_;\\n    return ['<fieldset class=\\\"vjs-bg-color vjs-track-setting\\\">', \\\"<legend id=\\\\\\\"\\\" + legendId + \\\"\\\\\\\">\\\", this.localize('Background'), '</legend>', this.createElSelect_('backgroundColor', legendId), '<span class=\\\"vjs-bg-opacity vjs-opacity\\\">', this.createElSelect_('backgroundOpacity', legendId), '</span>', '</fieldset>'].join('');\\n  }\\n  /**\\n   * Create window color element for the component\\n   *\\n   * @return {string}\\n   *         An HTML string.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElWinColor_ = function createElWinColor_() {\\n    var legendId = \\\"captions-window-\\\" + this.id_;\\n    return ['<fieldset class=\\\"vjs-window-color vjs-track-setting\\\">', \\\"<legend id=\\\\\\\"\\\" + legendId + \\\"\\\\\\\">\\\", this.localize('Window'), '</legend>', this.createElSelect_('windowColor', legendId), '<span class=\\\"vjs-window-opacity vjs-opacity\\\">', this.createElSelect_('windowOpacity', legendId), '</span>', '</fieldset>'].join('');\\n  }\\n  /**\\n   * Create color elements for the component\\n   *\\n   * @return {Element}\\n   *         The element that was created\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElColors_ = function createElColors_() {\\n    return createEl('div', {\\n      className: 'vjs-track-settings-colors',\\n      innerHTML: [this.createElFgColor_(), this.createElBgColor_(), this.createElWinColor_()].join('')\\n    });\\n  }\\n  /**\\n   * Create font elements for the component\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElFont_ = function createElFont_() {\\n    return createEl('div', {\\n      className: 'vjs-track-settings-font',\\n      innerHTML: ['<fieldset class=\\\"vjs-font-percent vjs-track-setting\\\">', this.createElSelect_('fontPercent', '', 'legend'), '</fieldset>', '<fieldset class=\\\"vjs-edge-style vjs-track-setting\\\">', this.createElSelect_('edgeStyle', '', 'legend'), '</fieldset>', '<fieldset class=\\\"vjs-font-family vjs-track-setting\\\">', this.createElSelect_('fontFamily', '', 'legend'), '</fieldset>'].join('')\\n    });\\n  }\\n  /**\\n   * Create controls for the component\\n   *\\n   * @return {Element}\\n   *         The element that was created.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.createElControls_ = function createElControls_() {\\n    var defaultsDescription = this.localize('restore all settings to the default values');\\n    return createEl('div', {\\n      className: 'vjs-track-settings-controls',\\n      innerHTML: [\\\"<button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"vjs-default-button\\\\\\\" title=\\\\\\\"\\\" + defaultsDescription + \\\"\\\\\\\">\\\", this.localize('Reset'), \\\"<span class=\\\\\\\"vjs-control-text\\\\\\\"> \\\" + defaultsDescription + \\\"</span>\\\", '</button>', \\\"<button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"vjs-done-button\\\\\\\">\\\" + this.localize('Done') + \\\"</button>\\\"].join('')\\n    });\\n  };\\n\\n  _proto.content = function content() {\\n    return [this.createElColors_(), this.createElFont_(), this.createElControls_()];\\n  };\\n\\n  _proto.label = function label() {\\n    return this.localize('Caption Settings Dialog');\\n  };\\n\\n  _proto.description = function description() {\\n    return this.localize('Beginning of dialog window. Escape will cancel and close the window.');\\n  };\\n\\n  _proto.buildCSSClass = function buildCSSClass() {\\n    return _ModalDialog.prototype.buildCSSClass.call(this) + ' vjs-text-track-settings';\\n  }\\n  /**\\n   * Gets an object of text track settings (or null).\\n   *\\n   * @return {Object}\\n   *         An object with config values parsed from the DOM or localStorage.\\n   */\\n  ;\\n\\n  _proto.getValues = function getValues() {\\n    var _this3 = this;\\n\\n    return reduce(selectConfigs, function (accum, config, key) {\\n      var value = getSelectedOptionValue(_this3.$(config.selector), config.parser);\\n\\n      if (value !== undefined) {\\n        accum[key] = value;\\n      }\\n\\n      return accum;\\n    }, {});\\n  }\\n  /**\\n   * Sets text track settings from an object of values.\\n   *\\n   * @param {Object} values\\n   *        An object with config values parsed from the DOM or localStorage.\\n   */\\n  ;\\n\\n  _proto.setValues = function setValues(values) {\\n    var _this4 = this;\\n\\n    each(selectConfigs, function (config, key) {\\n      setSelectedOption(_this4.$(config.selector), values[key], config.parser);\\n    });\\n  }\\n  /**\\n   * Sets all `<select>` elements to their default values.\\n   */\\n  ;\\n\\n  _proto.setDefaults = function setDefaults() {\\n    var _this5 = this;\\n\\n    each(selectConfigs, function (config) {\\n      var index = config.hasOwnProperty('default') ? config[\\\"default\\\"] : 0;\\n      _this5.$(config.selector).selectedIndex = index;\\n    });\\n  }\\n  /**\\n   * Restore texttrack settings from localStorage\\n   */\\n  ;\\n\\n  _proto.restoreSettings = function restoreSettings() {\\n    var values;\\n\\n    try {\\n      values = JSON.parse(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.getItem(LOCAL_STORAGE_KEY));\\n    } catch (err) {\\n      log.warn(err);\\n    }\\n\\n    if (values) {\\n      this.setValues(values);\\n    }\\n  }\\n  /**\\n   * Save text track settings to localStorage\\n   */\\n  ;\\n\\n  _proto.saveSettings = function saveSettings() {\\n    if (!this.options_.persistTextTrackSettings) {\\n      return;\\n    }\\n\\n    var values = this.getValues();\\n\\n    try {\\n      if (Object.keys(values).length) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(values));\\n      } else {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.localStorage.removeItem(LOCAL_STORAGE_KEY);\\n      }\\n    } catch (err) {\\n      log.warn(err);\\n    }\\n  }\\n  /**\\n   * Update display of text track settings\\n   */\\n  ;\\n\\n  _proto.updateDisplay = function updateDisplay() {\\n    var ttDisplay = this.player_.getChild('textTrackDisplay');\\n\\n    if (ttDisplay) {\\n      ttDisplay.updateDisplay();\\n    }\\n  }\\n  /**\\n   * conditionally blur the element and refocus the captions button\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.conditionalBlur_ = function conditionalBlur_() {\\n    this.previouslyActiveEl_ = null;\\n    var cb = this.player_.controlBar;\\n    var subsCapsBtn = cb && cb.subsCapsButton;\\n    var ccBtn = cb && cb.captionsButton;\\n\\n    if (subsCapsBtn) {\\n      subsCapsBtn.focus();\\n    } else if (ccBtn) {\\n      ccBtn.focus();\\n    }\\n  };\\n\\n  return TextTrackSettings;\\n}(ModalDialog);\\n\\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\\n\\n/**\\n * A Resize Manager. It is in charge of triggering `playerresize` on the player in the right conditions.\\n *\\n * It'll either create an iframe and use a debounced resize handler on it or use the new {@link https://wicg.github.io/ResizeObserver/|ResizeObserver}.\\n *\\n * If the ResizeObserver is available natively, it will be used. A polyfill can be passed in as an option.\\n * If a `playerresize` event is not needed, the ResizeManager component can be removed from the player, see the example below.\\n * @example <caption>How to disable the resize manager</caption>\\n * const player = videojs('#vid', {\\n *   resizeManager: false\\n * });\\n *\\n * @see {@link https://wicg.github.io/ResizeObserver/|ResizeObserver specification}\\n *\\n * @extends Component\\n */\\n\\nvar ResizeManager = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(ResizeManager, _Component);\\n\\n  /**\\n   * Create the ResizeManager.\\n   *\\n   * @param {Object} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of ResizeManager options.\\n   *\\n   * @param {Object} [options.ResizeObserver]\\n   *        A polyfill for ResizeObserver can be passed in here.\\n   *        If this is set to null it will ignore the native ResizeObserver and fall back to the iframe fallback.\\n   */\\n  function ResizeManager(player, options) {\\n    var _this;\\n\\n    var RESIZE_OBSERVER_AVAILABLE = options.ResizeObserver || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.ResizeObserver; // if `null` was passed, we want to disable the ResizeObserver\\n\\n    if (options.ResizeObserver === null) {\\n      RESIZE_OBSERVER_AVAILABLE = false;\\n    } // Only create an element when ResizeObserver isn't available\\n\\n\\n    var options_ = mergeOptions({\\n      createEl: !RESIZE_OBSERVER_AVAILABLE,\\n      reportTouchActivity: false\\n    }, options);\\n    _this = _Component.call(this, player, options_) || this;\\n    _this.ResizeObserver = options.ResizeObserver || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.ResizeObserver;\\n    _this.loadListener_ = null;\\n    _this.resizeObserver_ = null;\\n    _this.debouncedHandler_ = debounce(function () {\\n      _this.resizeHandler();\\n    }, 100, false, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\\n\\n    if (RESIZE_OBSERVER_AVAILABLE) {\\n      _this.resizeObserver_ = new _this.ResizeObserver(_this.debouncedHandler_);\\n\\n      _this.resizeObserver_.observe(player.el());\\n    } else {\\n      _this.loadListener_ = function () {\\n        if (!_this.el_ || !_this.el_.contentWindow) {\\n          return;\\n        }\\n\\n        var debouncedHandler_ = _this.debouncedHandler_;\\n\\n        var unloadListener_ = _this.unloadListener_ = function () {\\n          off(this, 'resize', debouncedHandler_);\\n          off(this, 'unload', unloadListener_);\\n          unloadListener_ = null;\\n        }; // safari and edge can unload the iframe before resizemanager dispose\\n        // we have to dispose of event handlers correctly before that happens\\n\\n\\n        on(_this.el_.contentWindow, 'unload', unloadListener_);\\n        on(_this.el_.contentWindow, 'resize', debouncedHandler_);\\n      };\\n\\n      _this.one('load', _this.loadListener_);\\n    }\\n\\n    return _this;\\n  }\\n\\n  var _proto = ResizeManager.prototype;\\n\\n  _proto.createEl = function createEl() {\\n    return _Component.prototype.createEl.call(this, 'iframe', {\\n      className: 'vjs-resize-manager',\\n      tabIndex: -1\\n    }, {\\n      'aria-hidden': 'true'\\n    });\\n  }\\n  /**\\n   * Called when a resize is triggered on the iframe or a resize is observed via the ResizeObserver\\n   *\\n   * @fires Player#playerresize\\n   */\\n  ;\\n\\n  _proto.resizeHandler = function resizeHandler() {\\n    /**\\n     * Called when the player size has changed\\n     *\\n     * @event Player#playerresize\\n     * @type {EventTarget~Event}\\n     */\\n    // make sure player is still around to trigger\\n    // prevents this from causing an error after dispose\\n    if (!this.player_ || !this.player_.trigger) {\\n      return;\\n    }\\n\\n    this.player_.trigger('playerresize');\\n  };\\n\\n  _proto.dispose = function dispose() {\\n    if (this.debouncedHandler_) {\\n      this.debouncedHandler_.cancel();\\n    }\\n\\n    if (this.resizeObserver_) {\\n      if (this.player_.el()) {\\n        this.resizeObserver_.unobserve(this.player_.el());\\n      }\\n\\n      this.resizeObserver_.disconnect();\\n    }\\n\\n    if (this.loadListener_) {\\n      this.off('load', this.loadListener_);\\n    }\\n\\n    if (this.el_ && this.el_.contentWindow && this.unloadListener_) {\\n      this.unloadListener_.call(this.el_.contentWindow);\\n    }\\n\\n    this.ResizeObserver = null;\\n    this.resizeObserver = null;\\n    this.debouncedHandler_ = null;\\n    this.loadListener_ = null;\\n\\n    _Component.prototype.dispose.call(this);\\n  };\\n\\n  return ResizeManager;\\n}(Component);\\n\\nComponent.registerComponent('ResizeManager', ResizeManager);\\n\\nvar defaults = {\\n  trackingThreshold: 30,\\n  liveTolerance: 15\\n};\\n/*\\n  track when we are at the live edge, and other helpers for live playback */\\n\\n/**\\n * A class for checking live current time and determining when the player\\n * is at or behind the live edge.\\n */\\n\\nvar LiveTracker = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(LiveTracker, _Component);\\n\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * @param {Player} player\\n   *        The `Player` that this class should be attached to.\\n   *\\n   * @param {Object} [options]\\n   *        The key/value store of player options.\\n   *\\n   * @param {number} [options.trackingThreshold=30]\\n   *        Number of seconds of live window (seekableEnd - seekableStart) that\\n   *        media needs to have before the liveui will be shown.\\n   *\\n   * @param {number} [options.liveTolerance=15]\\n   *        Number of seconds behind live that we have to be\\n   *        before we will be considered non-live. Note that this will only\\n   *        be used when playing at the live edge. This allows large seekable end\\n   *        changes to not effect wether we are live or not.\\n   */\\n  function LiveTracker(player, options) {\\n    var _this;\\n\\n    // LiveTracker does not need an element\\n    var options_ = mergeOptions(defaults, options, {\\n      createEl: false\\n    });\\n    _this = _Component.call(this, player, options_) || this;\\n\\n    _this.reset_();\\n\\n    _this.on(_this.player_, 'durationchange', _this.handleDurationchange); // we don't need to track live playback if the document is hidden,\\n    // also, tracking when the document is hidden can\\n    // cause the CPU to spike and eventually crash the page on IE11.\\n\\n\\n    if (IE_VERSION && 'hidden' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a && 'visibilityState' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      _this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', _this.handleVisibilityChange);\\n    }\\n\\n    return _this;\\n  }\\n  /**\\n   * toggle tracking based on document visiblility\\n   */\\n\\n\\n  var _proto = LiveTracker.prototype;\\n\\n  _proto.handleVisibilityChange = function handleVisibilityChange() {\\n    if (this.player_.duration() !== Infinity) {\\n      return;\\n    }\\n\\n    if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a.hidden) {\\n      this.stopTracking();\\n    } else {\\n      this.startTracking();\\n    }\\n  }\\n  /**\\n   * all the functionality for tracking when seek end changes\\n   * and for tracking how far past seek end we should be\\n   */\\n  ;\\n\\n  _proto.trackLive_ = function trackLive_() {\\n    var seekable = this.player_.seekable(); // skip undefined seekable\\n\\n    if (!seekable || !seekable.length) {\\n      return;\\n    }\\n\\n    var newTime = Number(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now().toFixed(4));\\n    var deltaTime = this.lastTime_ === -1 ? 0 : (newTime - this.lastTime_) / 1000;\\n    this.lastTime_ = newTime;\\n    this.pastSeekEnd_ = this.pastSeekEnd() + deltaTime;\\n    var liveCurrentTime = this.liveCurrentTime();\\n    var currentTime = this.player_.currentTime(); // we are behind live if any are true\\n    // 1. the player is paused\\n    // 2. the user seeked to a location 2 seconds away from live\\n    // 3. the difference between live and current time is greater\\n    //    liveTolerance which defaults to 15s\\n\\n    var isBehind = this.player_.paused() || this.seekedBehindLive_ || Math.abs(liveCurrentTime - currentTime) > this.options_.liveTolerance; // we cannot be behind if\\n    // 1. until we have not seen a timeupdate yet\\n    // 2. liveCurrentTime is Infinity, which happens on Android\\n\\n    if (!this.timeupdateSeen_ || liveCurrentTime === Infinity) {\\n      isBehind = false;\\n    }\\n\\n    if (isBehind !== this.behindLiveEdge_) {\\n      this.behindLiveEdge_ = isBehind;\\n      this.trigger('liveedgechange');\\n    }\\n  }\\n  /**\\n   * handle a durationchange event on the player\\n   * and start/stop tracking accordingly.\\n   */\\n  ;\\n\\n  _proto.handleDurationchange = function handleDurationchange() {\\n    if (this.player_.duration() === Infinity && this.liveWindow() >= this.options_.trackingThreshold) {\\n      if (this.player_.options_.liveui) {\\n        this.player_.addClass('vjs-liveui');\\n      }\\n\\n      this.startTracking();\\n    } else {\\n      this.player_.removeClass('vjs-liveui');\\n      this.stopTracking();\\n    }\\n  }\\n  /**\\n   * start tracking live playback\\n   */\\n  ;\\n\\n  _proto.startTracking = function startTracking() {\\n    if (this.isTracking()) {\\n      return;\\n    } // If we haven't seen a timeupdate, we need to check whether playback\\n    // began before this component started tracking. This can happen commonly\\n    // when using autoplay.\\n\\n\\n    if (!this.timeupdateSeen_) {\\n      this.timeupdateSeen_ = this.player_.hasStarted();\\n    }\\n\\n    this.trackingInterval_ = this.setInterval(this.trackLive_, UPDATE_REFRESH_INTERVAL);\\n    this.trackLive_();\\n    this.on(this.player_, ['play', 'pause'], this.trackLive_);\\n\\n    if (!this.timeupdateSeen_) {\\n      this.one(this.player_, 'play', this.handlePlay);\\n      this.one(this.player_, 'timeupdate', this.handleFirstTimeupdate);\\n    } else {\\n      this.on(this.player_, 'seeked', this.handleSeeked);\\n    }\\n  }\\n  /**\\n   * handle the first timeupdate on the player if it wasn't already playing\\n   * when live tracker started tracking.\\n   */\\n  ;\\n\\n  _proto.handleFirstTimeupdate = function handleFirstTimeupdate() {\\n    this.timeupdateSeen_ = true;\\n    this.on(this.player_, 'seeked', this.handleSeeked);\\n  }\\n  /**\\n   * Keep track of what time a seek starts, and listen for seeked\\n   * to find where a seek ends.\\n   */\\n  ;\\n\\n  _proto.handleSeeked = function handleSeeked() {\\n    var timeDiff = Math.abs(this.liveCurrentTime() - this.player_.currentTime());\\n    this.seekedBehindLive_ = this.skipNextSeeked_ ? false : timeDiff > 2;\\n    this.skipNextSeeked_ = false;\\n    this.trackLive_();\\n  }\\n  /**\\n   * handle the first play on the player, and make sure that we seek\\n   * right to the live edge.\\n   */\\n  ;\\n\\n  _proto.handlePlay = function handlePlay() {\\n    this.one(this.player_, 'timeupdate', this.seekToLiveEdge);\\n  }\\n  /**\\n   * Stop tracking, and set all internal variables to\\n   * their initial value.\\n   */\\n  ;\\n\\n  _proto.reset_ = function reset_() {\\n    this.lastTime_ = -1;\\n    this.pastSeekEnd_ = 0;\\n    this.lastSeekEnd_ = -1;\\n    this.behindLiveEdge_ = true;\\n    this.timeupdateSeen_ = false;\\n    this.seekedBehindLive_ = false;\\n    this.skipNextSeeked_ = false;\\n    this.clearInterval(this.trackingInterval_);\\n    this.trackingInterval_ = null;\\n    this.off(this.player_, ['play', 'pause'], this.trackLive_);\\n    this.off(this.player_, 'seeked', this.handleSeeked);\\n    this.off(this.player_, 'play', this.handlePlay);\\n    this.off(this.player_, 'timeupdate', this.handleFirstTimeupdate);\\n    this.off(this.player_, 'timeupdate', this.seekToLiveEdge);\\n  }\\n  /**\\n   * stop tracking live playback\\n   */\\n  ;\\n\\n  _proto.stopTracking = function stopTracking() {\\n    if (!this.isTracking()) {\\n      return;\\n    }\\n\\n    this.reset_();\\n    this.trigger('liveedgechange');\\n  }\\n  /**\\n   * A helper to get the player seekable end\\n   * so that we don't have to null check everywhere\\n   *\\n   * @return {number}\\n   *         The furthest seekable end or Infinity.\\n   */\\n  ;\\n\\n  _proto.seekableEnd = function seekableEnd() {\\n    var seekable = this.player_.seekable();\\n    var seekableEnds = [];\\n    var i = seekable ? seekable.length : 0;\\n\\n    while (i--) {\\n      seekableEnds.push(seekable.end(i));\\n    } // grab the furthest seekable end after sorting, or if there are none\\n    // default to Infinity\\n\\n\\n    return seekableEnds.length ? seekableEnds.sort()[seekableEnds.length - 1] : Infinity;\\n  }\\n  /**\\n   * A helper to get the player seekable start\\n   * so that we don't have to null check everywhere\\n   *\\n   * @return {number}\\n   *         The earliest seekable start or 0.\\n   */\\n  ;\\n\\n  _proto.seekableStart = function seekableStart() {\\n    var seekable = this.player_.seekable();\\n    var seekableStarts = [];\\n    var i = seekable ? seekable.length : 0;\\n\\n    while (i--) {\\n      seekableStarts.push(seekable.start(i));\\n    } // grab the first seekable start after sorting, or if there are none\\n    // default to 0\\n\\n\\n    return seekableStarts.length ? seekableStarts.sort()[0] : 0;\\n  }\\n  /**\\n   * Get the live time window aka\\n   * the amount of time between seekable start and\\n   * live current time.\\n   *\\n   * @return {number}\\n   *         The amount of seconds that are seekable in\\n   *         the live video.\\n   */\\n  ;\\n\\n  _proto.liveWindow = function liveWindow() {\\n    var liveCurrentTime = this.liveCurrentTime();\\n\\n    if (liveCurrentTime === Infinity) {\\n      return Infinity;\\n    }\\n\\n    return liveCurrentTime - this.seekableStart();\\n  }\\n  /**\\n   * Determines if the player is live, only checks if this component\\n   * is tracking live playback or not\\n   *\\n   * @return {boolean}\\n   *         Wether liveTracker is tracking\\n   */\\n  ;\\n\\n  _proto.isLive = function isLive() {\\n    return this.isTracking();\\n  }\\n  /**\\n   * Determines if currentTime is at the live edge and won't fall behind\\n   * on each seekableendchange\\n   *\\n   * @return {boolean}\\n   *         Wether playback is at the live edge\\n   */\\n  ;\\n\\n  _proto.atLiveEdge = function atLiveEdge() {\\n    return !this.behindLiveEdge();\\n  }\\n  /**\\n   * get what we expect the live current time to be\\n   *\\n   * @return {number}\\n   *         The expected live current time\\n   */\\n  ;\\n\\n  _proto.liveCurrentTime = function liveCurrentTime() {\\n    return this.pastSeekEnd() + this.seekableEnd();\\n  }\\n  /**\\n   * The number of seconds that have occured after seekable end\\n   * changed. This will be reset to 0 once seekable end changes.\\n   *\\n   * @return {number}\\n   *         Seconds past the current seekable end\\n   */\\n  ;\\n\\n  _proto.pastSeekEnd = function pastSeekEnd() {\\n    var seekableEnd = this.seekableEnd();\\n\\n    if (this.lastSeekEnd_ !== -1 && seekableEnd !== this.lastSeekEnd_) {\\n      this.pastSeekEnd_ = 0;\\n    }\\n\\n    this.lastSeekEnd_ = seekableEnd;\\n    return this.pastSeekEnd_;\\n  }\\n  /**\\n   * If we are currently behind the live edge, aka currentTime will be\\n   * behind on a seekableendchange\\n   *\\n   * @return {boolean}\\n   *         If we are behind the live edge\\n   */\\n  ;\\n\\n  _proto.behindLiveEdge = function behindLiveEdge() {\\n    return this.behindLiveEdge_;\\n  }\\n  /**\\n   * Wether live tracker is currently tracking or not.\\n   */\\n  ;\\n\\n  _proto.isTracking = function isTracking() {\\n    return typeof this.trackingInterval_ === 'number';\\n  }\\n  /**\\n   * Seek to the live edge if we are behind the live edge\\n   */\\n  ;\\n\\n  _proto.seekToLiveEdge = function seekToLiveEdge() {\\n    this.seekedBehindLive_ = false;\\n\\n    if (this.atLiveEdge()) {\\n      return;\\n    } // skipNextSeeked_\\n\\n\\n    this.skipNextSeeked_ = true;\\n    this.player_.currentTime(this.liveCurrentTime());\\n  }\\n  /**\\n   * Dispose of liveTracker\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    this.off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'visibilitychange', this.handleVisibilityChange);\\n    this.stopTracking();\\n\\n    _Component.prototype.dispose.call(this);\\n  };\\n\\n  return LiveTracker;\\n}(Component);\\n\\nComponent.registerComponent('LiveTracker', LiveTracker);\\n\\n/**\\n * This function is used to fire a sourceset when there is something\\n * similar to `mediaEl.load()` being called. It will try to find the source via\\n * the `src` attribute and then the `<source>` elements. It will then fire `sourceset`\\n * with the source that was found or empty string if we cannot know. If it cannot\\n * find a source then `sourceset` will not be fired.\\n *\\n * @param {Html5} tech\\n *        The tech object that sourceset was setup on\\n *\\n * @return {boolean}\\n *         returns false if the sourceset was not fired and true otherwise.\\n */\\n\\nvar sourcesetLoad = function sourcesetLoad(tech) {\\n  var el = tech.el(); // if `el.src` is set, that source will be loaded.\\n\\n  if (el.hasAttribute('src')) {\\n    tech.triggerSourceset(el.src);\\n    return true;\\n  }\\n  /**\\n   * Since there isn't a src property on the media element, source elements will be used for\\n   * implementing the source selection algorithm. This happens asynchronously and\\n   * for most cases were there is more than one source we cannot tell what source will\\n   * be loaded, without re-implementing the source selection algorithm. At this time we are not\\n   * going to do that. There are three special cases that we do handle here though:\\n   *\\n   * 1. If there are no sources, do not fire `sourceset`.\\n   * 2. If there is only one `<source>` with a `src` property/attribute that is our `src`\\n   * 3. If there is more than one `<source>` but all of them have the same `src` url.\\n   *    That will be our src.\\n   */\\n\\n\\n  var sources = tech.$$('source');\\n  var srcUrls = [];\\n  var src = ''; // if there are no sources, do not fire sourceset\\n\\n  if (!sources.length) {\\n    return false;\\n  } // only count valid/non-duplicate source elements\\n\\n\\n  for (var i = 0; i < sources.length; i++) {\\n    var url = sources[i].src;\\n\\n    if (url && srcUrls.indexOf(url) === -1) {\\n      srcUrls.push(url);\\n    }\\n  } // there were no valid sources\\n\\n\\n  if (!srcUrls.length) {\\n    return false;\\n  } // there is only one valid source element url\\n  // use that\\n\\n\\n  if (srcUrls.length === 1) {\\n    src = srcUrls[0];\\n  }\\n\\n  tech.triggerSourceset(src);\\n  return true;\\n};\\n/**\\n * our implementation of an `innerHTML` descriptor for browsers\\n * that do not have one.\\n */\\n\\n\\nvar innerHTMLDescriptorPolyfill = Object.defineProperty({}, 'innerHTML', {\\n  get: function get() {\\n    return this.cloneNode(true).innerHTML;\\n  },\\n  set: function set(v) {\\n    // make a dummy node to use innerHTML on\\n    var dummy = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(this.nodeName.toLowerCase()); // set innerHTML to the value provided\\n\\n    dummy.innerHTML = v; // make a document fragment to hold the nodes from dummy\\n\\n    var docFrag = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createDocumentFragment(); // copy all of the nodes created by the innerHTML on dummy\\n    // to the document fragment\\n\\n    while (dummy.childNodes.length) {\\n      docFrag.appendChild(dummy.childNodes[0]);\\n    } // remove content\\n\\n\\n    this.innerText = ''; // now we add all of that html in one by appending the\\n    // document fragment. This is how innerHTML does it.\\n\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.appendChild.call(this, docFrag); // then return the result that innerHTML's setter would\\n\\n    return this.innerHTML;\\n  }\\n});\\n/**\\n * Get a property descriptor given a list of priorities and the\\n * property to get.\\n */\\n\\nvar getDescriptor = function getDescriptor(priority, prop) {\\n  var descriptor = {};\\n\\n  for (var i = 0; i < priority.length; i++) {\\n    descriptor = Object.getOwnPropertyDescriptor(priority[i], prop);\\n\\n    if (descriptor && descriptor.set && descriptor.get) {\\n      break;\\n    }\\n  }\\n\\n  descriptor.enumerable = true;\\n  descriptor.configurable = true;\\n  return descriptor;\\n};\\n\\nvar getInnerHTMLDescriptor = function getInnerHTMLDescriptor(tech) {\\n  return getDescriptor([tech.el(), global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLMediaElement.prototype, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype, innerHTMLDescriptorPolyfill], 'innerHTML');\\n};\\n/**\\n * Patches browser internal functions so that we can tell synchronously\\n * if a `<source>` was appended to the media element. For some reason this\\n * causes a `sourceset` if the the media element is ready and has no source.\\n * This happens when:\\n * - The page has just loaded and the media element does not have a source.\\n * - The media element was emptied of all sources, then `load()` was called.\\n *\\n * It does this by patching the following functions/properties when they are supported:\\n *\\n * - `append()` - can be used to add a `<source>` element to the media element\\n * - `appendChild()` - can be used to add a `<source>` element to the media element\\n * - `insertAdjacentHTML()` -  can be used to add a `<source>` element to the media element\\n * - `innerHTML` -  can be used to add a `<source>` element to the media element\\n *\\n * @param {Html5} tech\\n *        The tech object that sourceset is being setup on.\\n */\\n\\n\\nvar firstSourceWatch = function firstSourceWatch(tech) {\\n  var el = tech.el(); // make sure firstSourceWatch isn't setup twice.\\n\\n  if (el.resetSourceWatch_) {\\n    return;\\n  }\\n\\n  var old = {};\\n  var innerDescriptor = getInnerHTMLDescriptor(tech);\\n\\n  var appendWrapper = function appendWrapper(appendFn) {\\n    return function () {\\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n        args[_key] = arguments[_key];\\n      }\\n\\n      var retval = appendFn.apply(el, args);\\n      sourcesetLoad(tech);\\n      return retval;\\n    };\\n  };\\n\\n  ['append', 'appendChild', 'insertAdjacentHTML'].forEach(function (k) {\\n    if (!el[k]) {\\n      return;\\n    } // store the old function\\n\\n\\n    old[k] = el[k]; // call the old function with a sourceset if a source\\n    // was loaded\\n\\n    el[k] = appendWrapper(old[k]);\\n  });\\n  Object.defineProperty(el, 'innerHTML', mergeOptions(innerDescriptor, {\\n    set: appendWrapper(innerDescriptor.set)\\n  }));\\n\\n  el.resetSourceWatch_ = function () {\\n    el.resetSourceWatch_ = null;\\n    Object.keys(old).forEach(function (k) {\\n      el[k] = old[k];\\n    });\\n    Object.defineProperty(el, 'innerHTML', innerDescriptor);\\n  }; // on the first sourceset, we need to revert our changes\\n\\n\\n  tech.one('sourceset', el.resetSourceWatch_);\\n};\\n/**\\n * our implementation of a `src` descriptor for browsers\\n * that do not have one.\\n */\\n\\n\\nvar srcDescriptorPolyfill = Object.defineProperty({}, 'src', {\\n  get: function get() {\\n    if (this.hasAttribute('src')) {\\n      return getAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.getAttribute.call(this, 'src'));\\n    }\\n\\n    return '';\\n  },\\n  set: function set(v) {\\n    global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Element.prototype.setAttribute.call(this, 'src', v);\\n    return v;\\n  }\\n});\\n\\nvar getSrcDescriptor = function getSrcDescriptor(tech) {\\n  return getDescriptor([tech.el(), global_window__WEBPACK_IMPORTED_MODULE_0___default.a.HTMLMediaElement.prototype, srcDescriptorPolyfill], 'src');\\n};\\n/**\\n * setup `sourceset` handling on the `Html5` tech. This function\\n * patches the following element properties/functions:\\n *\\n * - `src` - to determine when `src` is set\\n * - `setAttribute()` - to determine when `src` is set\\n * - `load()` - this re-triggers the source selection algorithm, and can\\n *              cause a sourceset.\\n *\\n * If there is no source when we are adding `sourceset` support or during a `load()`\\n * we also patch the functions listed in `firstSourceWatch`.\\n *\\n * @param {Html5} tech\\n *        The tech to patch\\n */\\n\\n\\nvar setupSourceset = function setupSourceset(tech) {\\n  if (!tech.featuresSourceset) {\\n    return;\\n  }\\n\\n  var el = tech.el(); // make sure sourceset isn't setup twice.\\n\\n  if (el.resetSourceset_) {\\n    return;\\n  }\\n\\n  var srcDescriptor = getSrcDescriptor(tech);\\n  var oldSetAttribute = el.setAttribute;\\n  var oldLoad = el.load;\\n  Object.defineProperty(el, 'src', mergeOptions(srcDescriptor, {\\n    set: function set(v) {\\n      var retval = srcDescriptor.set.call(el, v); // we use the getter here to get the actual value set on src\\n\\n      tech.triggerSourceset(el.src);\\n      return retval;\\n    }\\n  }));\\n\\n  el.setAttribute = function (n, v) {\\n    var retval = oldSetAttribute.call(el, n, v);\\n\\n    if (/src/i.test(n)) {\\n      tech.triggerSourceset(el.src);\\n    }\\n\\n    return retval;\\n  };\\n\\n  el.load = function () {\\n    var retval = oldLoad.call(el); // if load was called, but there was no source to fire\\n    // sourceset on. We have to watch for a source append\\n    // as that can trigger a `sourceset` when the media element\\n    // has no source\\n\\n    if (!sourcesetLoad(tech)) {\\n      tech.triggerSourceset('');\\n      firstSourceWatch(tech);\\n    }\\n\\n    return retval;\\n  };\\n\\n  if (el.currentSrc) {\\n    tech.triggerSourceset(el.currentSrc);\\n  } else if (!sourcesetLoad(tech)) {\\n    firstSourceWatch(tech);\\n  }\\n\\n  el.resetSourceset_ = function () {\\n    el.resetSourceset_ = null;\\n    el.load = oldLoad;\\n    el.setAttribute = oldSetAttribute;\\n    Object.defineProperty(el, 'src', srcDescriptor);\\n\\n    if (el.resetSourceWatch_) {\\n      el.resetSourceWatch_();\\n    }\\n  };\\n};\\n\\n/**\\n * Object.defineProperty but \\\"lazy\\\", which means that the value is only set after\\n * it retrieved the first time, rather than being set right away.\\n *\\n * @param {Object} obj the object to set the property on\\n * @param {string} key the key for the property to set\\n * @param {Function} getValue the function used to get the value when it is needed.\\n * @param {boolean} setter wether a setter shoould be allowed or not\\n */\\nvar defineLazyProperty = function defineLazyProperty(obj, key, getValue, setter) {\\n  if (setter === void 0) {\\n    setter = true;\\n  }\\n\\n  var set = function set(value) {\\n    return Object.defineProperty(obj, key, {\\n      value: value,\\n      enumerable: true,\\n      writable: true\\n    });\\n  };\\n\\n  var options = {\\n    configurable: true,\\n    enumerable: true,\\n    get: function get() {\\n      var value = getValue();\\n      set(value);\\n      return value;\\n    }\\n  };\\n\\n  if (setter) {\\n    options.set = set;\\n  }\\n\\n  return Object.defineProperty(obj, key, options);\\n};\\n\\n/**\\n * HTML5 Media Controller - Wrapper for HTML5 Media API\\n *\\n * @mixes Tech~SourceHandlerAdditions\\n * @extends Tech\\n */\\n\\nvar Html5 = /*#__PURE__*/function (_Tech) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Html5, _Tech);\\n\\n  /**\\n  * Create an instance of this Tech.\\n  *\\n  * @param {Object} [options]\\n  *        The key/value store of player options.\\n  *\\n  * @param {Component~ReadyCallback} ready\\n  *        Callback function to call when the `HTML5` Tech is ready.\\n  */\\n  function Html5(options, ready) {\\n    var _this;\\n\\n    _this = _Tech.call(this, options, ready) || this;\\n    var source = options.source;\\n    var crossoriginTracks = false; // Set the source if one is provided\\n    // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\\n    // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\\n    // anyway so the error gets fired.\\n\\n    if (source && (_this.el_.currentSrc !== source.src || options.tag && options.tag.initNetworkState_ === 3)) {\\n      _this.setSource(source);\\n    } else {\\n      _this.handleLateInit_(_this.el_);\\n    } // setup sourceset after late sourceset/init\\n\\n\\n    if (options.enableSourceset) {\\n      _this.setupSourcesetHandling_();\\n    }\\n\\n    if (_this.el_.hasChildNodes()) {\\n      var nodes = _this.el_.childNodes;\\n      var nodesLength = nodes.length;\\n      var removeNodes = [];\\n\\n      while (nodesLength--) {\\n        var node = nodes[nodesLength];\\n        var nodeName = node.nodeName.toLowerCase();\\n\\n        if (nodeName === 'track') {\\n          if (!_this.featuresNativeTextTracks) {\\n            // Empty video tag tracks so the built-in player doesn't use them also.\\n            // This may not be fast enough to stop HTML5 browsers from reading the tags\\n            // so we'll need to turn off any default tracks if we're manually doing\\n            // captions and subtitles. videoElement.textTracks\\n            removeNodes.push(node);\\n          } else {\\n            // store HTMLTrackElement and TextTrack to remote list\\n            _this.remoteTextTrackEls().addTrackElement_(node);\\n\\n            _this.remoteTextTracks().addTrack(node.track);\\n\\n            _this.textTracks().addTrack(node.track);\\n\\n            if (!crossoriginTracks && !_this.el_.hasAttribute('crossorigin') && isCrossOrigin(node.src)) {\\n              crossoriginTracks = true;\\n            }\\n          }\\n        }\\n      }\\n\\n      for (var i = 0; i < removeNodes.length; i++) {\\n        _this.el_.removeChild(removeNodes[i]);\\n      }\\n    }\\n\\n    _this.proxyNativeTracks_();\\n\\n    if (_this.featuresNativeTextTracks && crossoriginTracks) {\\n      log.warn('Text Tracks are being loaded from another origin but the crossorigin attribute isn\\\\'t used.\\\\n' + 'This may prevent text tracks from loading.');\\n    } // prevent iOS Safari from disabling metadata text tracks during native playback\\n\\n\\n    _this.restoreMetadataTracksInIOSNativePlayer_(); // Determine if native controls should be used\\n    // Our goal should be to get the custom controls on mobile solid everywhere\\n    // so we can remove this all together. Right now this will block custom\\n    // controls on touch enabled laptops like the Chrome Pixel\\n\\n\\n    if ((TOUCH_ENABLED || IS_IPHONE || IS_NATIVE_ANDROID) && options.nativeControlsForTouch === true) {\\n      _this.setControls(true);\\n    } // on iOS, we want to proxy `webkitbeginfullscreen` and `webkitendfullscreen`\\n    // into a `fullscreenchange` event\\n\\n\\n    _this.proxyWebkitFullscreen_();\\n\\n    _this.triggerReady();\\n\\n    return _this;\\n  }\\n  /**\\n   * Dispose of `HTML5` media element and remove all tracks.\\n   */\\n\\n\\n  var _proto = Html5.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    if (this.el_ && this.el_.resetSourceset_) {\\n      this.el_.resetSourceset_();\\n    }\\n\\n    Html5.disposeMediaElement(this.el_);\\n    this.options_ = null; // tech will handle clearing of the emulated track list\\n\\n    _Tech.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Modify the media element so that we can detect when\\n   * the source is changed. Fires `sourceset` just after the source has changed\\n   */\\n  ;\\n\\n  _proto.setupSourcesetHandling_ = function setupSourcesetHandling_() {\\n    setupSourceset(this);\\n  }\\n  /**\\n   * When a captions track is enabled in the iOS Safari native player, all other\\n   * tracks are disabled (including metadata tracks), which nulls all of their\\n   * associated cue points. This will restore metadata tracks to their pre-fullscreen\\n   * state in those cases so that cue points are not needlessly lost.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.restoreMetadataTracksInIOSNativePlayer_ = function restoreMetadataTracksInIOSNativePlayer_() {\\n    var textTracks = this.textTracks();\\n    var metadataTracksPreFullscreenState; // captures a snapshot of every metadata track's current state\\n\\n    var takeMetadataTrackSnapshot = function takeMetadataTrackSnapshot() {\\n      metadataTracksPreFullscreenState = [];\\n\\n      for (var i = 0; i < textTracks.length; i++) {\\n        var track = textTracks[i];\\n\\n        if (track.kind === 'metadata') {\\n          metadataTracksPreFullscreenState.push({\\n            track: track,\\n            storedMode: track.mode\\n          });\\n        }\\n      }\\n    }; // snapshot each metadata track's initial state, and update the snapshot\\n    // each time there is a track 'change' event\\n\\n\\n    takeMetadataTrackSnapshot();\\n    textTracks.addEventListener('change', takeMetadataTrackSnapshot);\\n    this.on('dispose', function () {\\n      return textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\\n    });\\n\\n    var restoreTrackMode = function restoreTrackMode() {\\n      for (var i = 0; i < metadataTracksPreFullscreenState.length; i++) {\\n        var storedTrack = metadataTracksPreFullscreenState[i];\\n\\n        if (storedTrack.track.mode === 'disabled' && storedTrack.track.mode !== storedTrack.storedMode) {\\n          storedTrack.track.mode = storedTrack.storedMode;\\n        }\\n      } // we only want this handler to be executed on the first 'change' event\\n\\n\\n      textTracks.removeEventListener('change', restoreTrackMode);\\n    }; // when we enter fullscreen playback, stop updating the snapshot and\\n    // restore all track modes to their pre-fullscreen state\\n\\n\\n    this.on('webkitbeginfullscreen', function () {\\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot); // remove the listener before adding it just in case it wasn't previously removed\\n\\n      textTracks.removeEventListener('change', restoreTrackMode);\\n      textTracks.addEventListener('change', restoreTrackMode);\\n    }); // start updating the snapshot again after leaving fullscreen\\n\\n    this.on('webkitendfullscreen', function () {\\n      // remove the listener before adding it just in case it wasn't previously removed\\n      textTracks.removeEventListener('change', takeMetadataTrackSnapshot);\\n      textTracks.addEventListener('change', takeMetadataTrackSnapshot); // remove the restoreTrackMode handler in case it wasn't triggered during fullscreen playback\\n\\n      textTracks.removeEventListener('change', restoreTrackMode);\\n    });\\n  }\\n  /**\\n   * Attempt to force override of tracks for the given type\\n   *\\n   * @param {string} type - Track type to override, possible values include 'Audio',\\n   * 'Video', and 'Text'.\\n   * @param {boolean} override - If set to true native audio/video will be overridden,\\n   * otherwise native audio/video will potentially be used.\\n   * @private\\n   */\\n  ;\\n\\n  _proto.overrideNative_ = function overrideNative_(type, override) {\\n    var _this2 = this;\\n\\n    // If there is no behavioral change don't add/remove listeners\\n    if (override !== this[\\\"featuresNative\\\" + type + \\\"Tracks\\\"]) {\\n      return;\\n    }\\n\\n    var lowerCaseType = type.toLowerCase();\\n\\n    if (this[lowerCaseType + \\\"TracksListeners_\\\"]) {\\n      Object.keys(this[lowerCaseType + \\\"TracksListeners_\\\"]).forEach(function (eventName) {\\n        var elTracks = _this2.el()[lowerCaseType + \\\"Tracks\\\"];\\n\\n        elTracks.removeEventListener(eventName, _this2[lowerCaseType + \\\"TracksListeners_\\\"][eventName]);\\n      });\\n    }\\n\\n    this[\\\"featuresNative\\\" + type + \\\"Tracks\\\"] = !override;\\n    this[lowerCaseType + \\\"TracksListeners_\\\"] = null;\\n    this.proxyNativeTracksForType_(lowerCaseType);\\n  }\\n  /**\\n   * Attempt to force override of native audio tracks.\\n   *\\n   * @param {boolean} override - If set to true native audio will be overridden,\\n   * otherwise native audio will potentially be used.\\n   */\\n  ;\\n\\n  _proto.overrideNativeAudioTracks = function overrideNativeAudioTracks(override) {\\n    this.overrideNative_('Audio', override);\\n  }\\n  /**\\n   * Attempt to force override of native video tracks.\\n   *\\n   * @param {boolean} override - If set to true native video will be overridden,\\n   * otherwise native video will potentially be used.\\n   */\\n  ;\\n\\n  _proto.overrideNativeVideoTracks = function overrideNativeVideoTracks(override) {\\n    this.overrideNative_('Video', override);\\n  }\\n  /**\\n   * Proxy native track list events for the given type to our track\\n   * lists if the browser we are playing in supports that type of track list.\\n   *\\n   * @param {string} name - Track type; values include 'audio', 'video', and 'text'\\n   * @private\\n   */\\n  ;\\n\\n  _proto.proxyNativeTracksForType_ = function proxyNativeTracksForType_(name) {\\n    var _this3 = this;\\n\\n    var props = NORMAL[name];\\n    var elTracks = this.el()[props.getterName];\\n    var techTracks = this[props.getterName]();\\n\\n    if (!this[\\\"featuresNative\\\" + props.capitalName + \\\"Tracks\\\"] || !elTracks || !elTracks.addEventListener) {\\n      return;\\n    }\\n\\n    var listeners = {\\n      change: function change(e) {\\n        var event = {\\n          type: 'change',\\n          target: techTracks,\\n          currentTarget: techTracks,\\n          srcElement: techTracks\\n        };\\n        techTracks.trigger(event); // if we are a text track change event, we should also notify the\\n        // remote text track list. This can potentially cause a false positive\\n        // if we were to get a change event on a non-remote track and\\n        // we triggered the event on the remote text track list which doesn't\\n        // contain that track. However, best practices mean looping through the\\n        // list of tracks and searching for the appropriate mode value, so,\\n        // this shouldn't pose an issue\\n\\n        if (name === 'text') {\\n          _this3[REMOTE.remoteText.getterName]().trigger(event);\\n        }\\n      },\\n      addtrack: function addtrack(e) {\\n        techTracks.addTrack(e.track);\\n      },\\n      removetrack: function removetrack(e) {\\n        techTracks.removeTrack(e.track);\\n      }\\n    };\\n\\n    var removeOldTracks = function removeOldTracks() {\\n      var removeTracks = [];\\n\\n      for (var i = 0; i < techTracks.length; i++) {\\n        var found = false;\\n\\n        for (var j = 0; j < elTracks.length; j++) {\\n          if (elTracks[j] === techTracks[i]) {\\n            found = true;\\n            break;\\n          }\\n        }\\n\\n        if (!found) {\\n          removeTracks.push(techTracks[i]);\\n        }\\n      }\\n\\n      while (removeTracks.length) {\\n        techTracks.removeTrack(removeTracks.shift());\\n      }\\n    };\\n\\n    this[props.getterName + 'Listeners_'] = listeners;\\n    Object.keys(listeners).forEach(function (eventName) {\\n      var listener = listeners[eventName];\\n      elTracks.addEventListener(eventName, listener);\\n\\n      _this3.on('dispose', function (e) {\\n        return elTracks.removeEventListener(eventName, listener);\\n      });\\n    }); // Remove (native) tracks that are not used anymore\\n\\n    this.on('loadstart', removeOldTracks);\\n    this.on('dispose', function (e) {\\n      return _this3.off('loadstart', removeOldTracks);\\n    });\\n  }\\n  /**\\n   * Proxy all native track list events to our track lists if the browser we are playing\\n   * in supports that type of track list.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.proxyNativeTracks_ = function proxyNativeTracks_() {\\n    var _this4 = this;\\n\\n    NORMAL.names.forEach(function (name) {\\n      _this4.proxyNativeTracksForType_(name);\\n    });\\n  }\\n  /**\\n   * Create the `Html5` Tech's DOM element.\\n   *\\n   * @return {Element}\\n   *         The element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var el = this.options_.tag; // Check if this browser supports moving the element into the box.\\n    // On the iPhone video will break if you move the element,\\n    // So we have to create a brand new element.\\n    // If we ingested the player div, we do not need to move the media element.\\n\\n    if (!el || !(this.options_.playerElIngest || this.movingMediaElementInDOM)) {\\n      // If the original tag is still there, clone and remove it.\\n      if (el) {\\n        var clone = el.cloneNode(true);\\n\\n        if (el.parentNode) {\\n          el.parentNode.insertBefore(clone, el);\\n        }\\n\\n        Html5.disposeMediaElement(el);\\n        el = clone;\\n      } else {\\n        el = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'); // determine if native controls should be used\\n\\n        var tagAttributes = this.options_.tag && getAttributes(this.options_.tag);\\n        var attributes = mergeOptions({}, tagAttributes);\\n\\n        if (!TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\\n          delete attributes.controls;\\n        }\\n\\n        setAttributes(el, assign(attributes, {\\n          id: this.options_.techId,\\n          \\\"class\\\": 'vjs-tech'\\n        }));\\n      }\\n\\n      el.playerId = this.options_.playerId;\\n    }\\n\\n    if (typeof this.options_.preload !== 'undefined') {\\n      setAttribute(el, 'preload', this.options_.preload);\\n    } // Update specific tag settings, in case they were overridden\\n    // `autoplay` has to be *last* so that `muted` and `playsinline` are present\\n    // when iOS/Safari or other browsers attempt to autoplay.\\n\\n\\n    var settingsAttrs = ['loop', 'muted', 'playsinline', 'autoplay'];\\n\\n    for (var i = 0; i < settingsAttrs.length; i++) {\\n      var attr = settingsAttrs[i];\\n      var value = this.options_[attr];\\n\\n      if (typeof value !== 'undefined') {\\n        if (value) {\\n          setAttribute(el, attr, attr);\\n        } else {\\n          removeAttribute(el, attr);\\n        }\\n\\n        el[attr] = value;\\n      }\\n    }\\n\\n    return el;\\n  }\\n  /**\\n   * This will be triggered if the loadstart event has already fired, before videojs was\\n   * ready. Two known examples of when this can happen are:\\n   * 1. If we're loading the playback object after it has started loading\\n   * 2. The media is already playing the (often with autoplay on) then\\n   *\\n   * This function will fire another loadstart so that videojs can catchup.\\n   *\\n   * @fires Tech#loadstart\\n   *\\n   * @return {undefined}\\n   *         returns nothing.\\n   */\\n  ;\\n\\n  _proto.handleLateInit_ = function handleLateInit_(el) {\\n    if (el.networkState === 0 || el.networkState === 3) {\\n      // The video element hasn't started loading the source yet\\n      // or didn't find a source\\n      return;\\n    }\\n\\n    if (el.readyState === 0) {\\n      // NetworkState is set synchronously BUT loadstart is fired at the\\n      // end of the current stack, usually before setInterval(fn, 0).\\n      // So at this point we know loadstart may have already fired or is\\n      // about to fire, and either way the player hasn't seen it yet.\\n      // We don't want to fire loadstart prematurely here and cause a\\n      // double loadstart so we'll wait and see if it happens between now\\n      // and the next loop, and fire it if not.\\n      // HOWEVER, we also want to make sure it fires before loadedmetadata\\n      // which could also happen between now and the next loop, so we'll\\n      // watch for that also.\\n      var loadstartFired = false;\\n\\n      var setLoadstartFired = function setLoadstartFired() {\\n        loadstartFired = true;\\n      };\\n\\n      this.on('loadstart', setLoadstartFired);\\n\\n      var triggerLoadstart = function triggerLoadstart() {\\n        // We did miss the original loadstart. Make sure the player\\n        // sees loadstart before loadedmetadata\\n        if (!loadstartFired) {\\n          this.trigger('loadstart');\\n        }\\n      };\\n\\n      this.on('loadedmetadata', triggerLoadstart);\\n      this.ready(function () {\\n        this.off('loadstart', setLoadstartFired);\\n        this.off('loadedmetadata', triggerLoadstart);\\n\\n        if (!loadstartFired) {\\n          // We did miss the original native loadstart. Fire it now.\\n          this.trigger('loadstart');\\n        }\\n      });\\n      return;\\n    } // From here on we know that loadstart already fired and we missed it.\\n    // The other readyState events aren't as much of a problem if we double\\n    // them, so not going to go to as much trouble as loadstart to prevent\\n    // that unless we find reason to.\\n\\n\\n    var eventsToTrigger = ['loadstart']; // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\\n\\n    eventsToTrigger.push('loadedmetadata'); // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\\n\\n    if (el.readyState >= 2) {\\n      eventsToTrigger.push('loadeddata');\\n    } // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\\n\\n\\n    if (el.readyState >= 3) {\\n      eventsToTrigger.push('canplay');\\n    } // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\\n\\n\\n    if (el.readyState >= 4) {\\n      eventsToTrigger.push('canplaythrough');\\n    } // We still need to give the player time to add event listeners\\n\\n\\n    this.ready(function () {\\n      eventsToTrigger.forEach(function (type) {\\n        this.trigger(type);\\n      }, this);\\n    });\\n  }\\n  /**\\n   * Set current time for the `HTML5` tech.\\n   *\\n   * @param {number} seconds\\n   *        Set the current time of the media to this.\\n   */\\n  ;\\n\\n  _proto.setCurrentTime = function setCurrentTime(seconds) {\\n    try {\\n      this.el_.currentTime = seconds;\\n    } catch (e) {\\n      log(e, 'Video is not ready. (Video.js)'); // this.warning(VideoJS.warnings.videoNotReady);\\n    }\\n  }\\n  /**\\n   * Get the current duration of the HTML5 media element.\\n   *\\n   * @return {number}\\n   *         The duration of the media or 0 if there is no duration.\\n   */\\n  ;\\n\\n  _proto.duration = function duration() {\\n    var _this5 = this;\\n\\n    // Android Chrome will report duration as Infinity for VOD HLS until after\\n    // playback has started, which triggers the live display erroneously.\\n    // Return NaN if playback has not started and trigger a durationupdate once\\n    // the duration can be reliably known.\\n    if (this.el_.duration === Infinity && IS_ANDROID && IS_CHROME && this.el_.currentTime === 0) {\\n      // Wait for the first `timeupdate` with currentTime > 0 - there may be\\n      // several with 0\\n      var checkProgress = function checkProgress() {\\n        if (_this5.el_.currentTime > 0) {\\n          // Trigger durationchange for genuinely live video\\n          if (_this5.el_.duration === Infinity) {\\n            _this5.trigger('durationchange');\\n          }\\n\\n          _this5.off('timeupdate', checkProgress);\\n        }\\n      };\\n\\n      this.on('timeupdate', checkProgress);\\n      return NaN;\\n    }\\n\\n    return this.el_.duration || NaN;\\n  }\\n  /**\\n   * Get the current width of the HTML5 media element.\\n   *\\n   * @return {number}\\n   *         The width of the HTML5 media element.\\n   */\\n  ;\\n\\n  _proto.width = function width() {\\n    return this.el_.offsetWidth;\\n  }\\n  /**\\n   * Get the current height of the HTML5 media element.\\n   *\\n   * @return {number}\\n   *         The height of the HTML5 media element.\\n   */\\n  ;\\n\\n  _proto.height = function height() {\\n    return this.el_.offsetHeight;\\n  }\\n  /**\\n   * Proxy iOS `webkitbeginfullscreen` and `webkitendfullscreen` into\\n   * `fullscreenchange` event.\\n   *\\n   * @private\\n   * @fires fullscreenchange\\n   * @listens webkitendfullscreen\\n   * @listens webkitbeginfullscreen\\n   * @listens webkitbeginfullscreen\\n   */\\n  ;\\n\\n  _proto.proxyWebkitFullscreen_ = function proxyWebkitFullscreen_() {\\n    var _this6 = this;\\n\\n    if (!('webkitDisplayingFullscreen' in this.el_)) {\\n      return;\\n    }\\n\\n    var endFn = function endFn() {\\n      this.trigger('fullscreenchange', {\\n        isFullscreen: false\\n      });\\n    };\\n\\n    var beginFn = function beginFn() {\\n      if ('webkitPresentationMode' in this.el_ && this.el_.webkitPresentationMode !== 'picture-in-picture') {\\n        this.one('webkitendfullscreen', endFn);\\n        this.trigger('fullscreenchange', {\\n          isFullscreen: true,\\n          // set a flag in case another tech triggers fullscreenchange\\n          nativeIOSFullscreen: true\\n        });\\n      }\\n    };\\n\\n    this.on('webkitbeginfullscreen', beginFn);\\n    this.on('dispose', function () {\\n      _this6.off('webkitbeginfullscreen', beginFn);\\n\\n      _this6.off('webkitendfullscreen', endFn);\\n    });\\n  }\\n  /**\\n   * Check if fullscreen is supported on the current playback device.\\n   *\\n   * @return {boolean}\\n   *         - True if fullscreen is supported.\\n   *         - False if fullscreen is not supported.\\n   */\\n  ;\\n\\n  _proto.supportsFullScreen = function supportsFullScreen() {\\n    if (typeof this.el_.webkitEnterFullScreen === 'function') {\\n      var userAgent = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator.userAgent || ''; // Seems to be broken in Chromium/Chrome && Safari in Leopard\\n\\n      if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\\n        return true;\\n      }\\n    }\\n\\n    return false;\\n  }\\n  /**\\n   * Request that the `HTML5` Tech enter fullscreen.\\n   */\\n  ;\\n\\n  _proto.enterFullScreen = function enterFullScreen() {\\n    var video = this.el_;\\n\\n    if (video.paused && video.networkState <= video.HAVE_METADATA) {\\n      // attempt to prime the video element for programmatic access\\n      // this isn't necessary on the desktop but shouldn't hurt\\n      silencePromise(this.el_.play()); // playing and pausing synchronously during the transition to fullscreen\\n      // can get iOS ~6.1 devices into a play/pause loop\\n\\n      this.setTimeout(function () {\\n        video.pause();\\n\\n        try {\\n          video.webkitEnterFullScreen();\\n        } catch (e) {\\n          this.trigger('fullscreenerror', e);\\n        }\\n      }, 0);\\n    } else {\\n      try {\\n        video.webkitEnterFullScreen();\\n      } catch (e) {\\n        this.trigger('fullscreenerror', e);\\n      }\\n    }\\n  }\\n  /**\\n   * Request that the `HTML5` Tech exit fullscreen.\\n   */\\n  ;\\n\\n  _proto.exitFullScreen = function exitFullScreen() {\\n    if (!this.el_.webkitDisplayingFullscreen) {\\n      this.trigger('fullscreenerror', new Error('The video is not fullscreen'));\\n      return;\\n    }\\n\\n    this.el_.webkitExitFullScreen();\\n  }\\n  /**\\n   * Create a floating video window always on top of other windows so that users may\\n   * continue consuming media while they interact with other content sites, or\\n   * applications on their device.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @return {Promise}\\n   *         A promise with a Picture-in-Picture window.\\n   */\\n  ;\\n\\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\\n    return this.el_.requestPictureInPicture();\\n  }\\n  /**\\n   * A getter/setter for the `Html5` Tech's source object.\\n   * > Note: Please use {@link Html5#setSource}\\n   *\\n   * @param {Tech~SourceObject} [src]\\n   *        The source object you want to set on the `HTML5` techs element.\\n   *\\n   * @return {Tech~SourceObject|undefined}\\n   *         - The current source object when a source is not passed in.\\n   *         - undefined when setting\\n   *\\n   * @deprecated Since version 5.\\n   */\\n  ;\\n\\n  _proto.src = function src(_src) {\\n    if (_src === undefined) {\\n      return this.el_.src;\\n    } // Setting src through `src` instead of `setSrc` will be deprecated\\n\\n\\n    this.setSrc(_src);\\n  }\\n  /**\\n   * Reset the tech by removing all sources and then calling\\n   * {@link Html5.resetMediaElement}.\\n   */\\n  ;\\n\\n  _proto.reset = function reset() {\\n    Html5.resetMediaElement(this.el_);\\n  }\\n  /**\\n   * Get the current source on the `HTML5` Tech. Falls back to returning the source from\\n   * the HTML5 media element.\\n   *\\n   * @return {Tech~SourceObject}\\n   *         The current source object from the HTML5 tech. With a fallback to the\\n   *         elements source.\\n   */\\n  ;\\n\\n  _proto.currentSrc = function currentSrc() {\\n    if (this.currentSource_) {\\n      return this.currentSource_.src;\\n    }\\n\\n    return this.el_.currentSrc;\\n  }\\n  /**\\n   * Set controls attribute for the HTML5 media Element.\\n   *\\n   * @param {string} val\\n   *        Value to set the controls attribute to\\n   */\\n  ;\\n\\n  _proto.setControls = function setControls(val) {\\n    this.el_.controls = !!val;\\n  }\\n  /**\\n   * Create and returns a remote {@link TextTrack} object.\\n   *\\n   * @param {string} kind\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata)\\n   *\\n   * @param {string} [label]\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [language]\\n   *        Two letter language abbreviation\\n   *\\n   * @return {TextTrack}\\n   *         The TextTrack that gets created.\\n   */\\n  ;\\n\\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\\n    if (!this.featuresNativeTextTracks) {\\n      return _Tech.prototype.addTextTrack.call(this, kind, label, language);\\n    }\\n\\n    return this.el_.addTextTrack(kind, label, language);\\n  }\\n  /**\\n   * Creates either native TextTrack or an emulated TextTrack depending\\n   * on the value of `featuresNativeTextTracks`\\n   *\\n   * @param {Object} options\\n   *        The object should contain the options to initialize the TextTrack with.\\n   *\\n   * @param {string} [options.kind]\\n   *        `TextTrack` kind (subtitles, captions, descriptions, chapters, or metadata).\\n   *\\n   * @param {string} [options.label]\\n   *        Label to identify the text track\\n   *\\n   * @param {string} [options.language]\\n   *        Two letter language abbreviation.\\n   *\\n   * @param {boolean} [options.default]\\n   *        Default this track to on.\\n   *\\n   * @param {string} [options.id]\\n   *        The internal id to assign this track.\\n   *\\n   * @param {string} [options.src]\\n   *        A source url for the track.\\n   *\\n   * @return {HTMLTrackElement}\\n   *         The track element that gets created.\\n   */\\n  ;\\n\\n  _proto.createRemoteTextTrack = function createRemoteTextTrack(options) {\\n    if (!this.featuresNativeTextTracks) {\\n      return _Tech.prototype.createRemoteTextTrack.call(this, options);\\n    }\\n\\n    var htmlTrackElement = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('track');\\n\\n    if (options.kind) {\\n      htmlTrackElement.kind = options.kind;\\n    }\\n\\n    if (options.label) {\\n      htmlTrackElement.label = options.label;\\n    }\\n\\n    if (options.language || options.srclang) {\\n      htmlTrackElement.srclang = options.language || options.srclang;\\n    }\\n\\n    if (options[\\\"default\\\"]) {\\n      htmlTrackElement[\\\"default\\\"] = options[\\\"default\\\"];\\n    }\\n\\n    if (options.id) {\\n      htmlTrackElement.id = options.id;\\n    }\\n\\n    if (options.src) {\\n      htmlTrackElement.src = options.src;\\n    }\\n\\n    return htmlTrackElement;\\n  }\\n  /**\\n   * Creates a remote text track object and returns an html track element.\\n   *\\n   * @param {Object} options The object should contain values for\\n   * kind, language, label, and src (location of the WebVTT file)\\n   * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\\n   * automatically removed from the video element whenever the source changes\\n   * @return {HTMLTrackElement} An Html Track Element.\\n   * This can be an emulated {@link HTMLTrackElement} or a native one.\\n   * @deprecated The default value of the \\\"manualCleanup\\\" parameter will default\\n   * to \\\"false\\\" in upcoming versions of Video.js\\n   */\\n  ;\\n\\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\\n    var htmlTrackElement = _Tech.prototype.addRemoteTextTrack.call(this, options, manualCleanup);\\n\\n    if (this.featuresNativeTextTracks) {\\n      this.el().appendChild(htmlTrackElement);\\n    }\\n\\n    return htmlTrackElement;\\n  }\\n  /**\\n   * Remove remote `TextTrack` from `TextTrackList` object\\n   *\\n   * @param {TextTrack} track\\n   *        `TextTrack` object to remove\\n   */\\n  ;\\n\\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(track) {\\n    _Tech.prototype.removeRemoteTextTrack.call(this, track);\\n\\n    if (this.featuresNativeTextTracks) {\\n      var tracks = this.$$('track');\\n      var i = tracks.length;\\n\\n      while (i--) {\\n        if (track === tracks[i] || track === tracks[i].track) {\\n          this.el().removeChild(tracks[i]);\\n        }\\n      }\\n    }\\n  }\\n  /**\\n   * Gets available media playback quality metrics as specified by the W3C's Media\\n   * Playback Quality API.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\\n   *\\n   * @return {Object}\\n   *         An object with supported media playback quality metrics\\n   */\\n  ;\\n\\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\\n    if (typeof this.el().getVideoPlaybackQuality === 'function') {\\n      return this.el().getVideoPlaybackQuality();\\n    }\\n\\n    var videoPlaybackQuality = {};\\n\\n    if (typeof this.el().webkitDroppedFrameCount !== 'undefined' && typeof this.el().webkitDecodedFrameCount !== 'undefined') {\\n      videoPlaybackQuality.droppedVideoFrames = this.el().webkitDroppedFrameCount;\\n      videoPlaybackQuality.totalVideoFrames = this.el().webkitDecodedFrameCount;\\n    }\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now === 'function') {\\n      videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.now();\\n    } else if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing && typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing.navigationStart === 'number') {\\n      videoPlaybackQuality.creationTime = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Date.now() - global_window__WEBPACK_IMPORTED_MODULE_0___default.a.performance.timing.navigationStart;\\n    }\\n\\n    return videoPlaybackQuality;\\n  };\\n\\n  return Html5;\\n}(Tech);\\n/* HTML5 Support Testing ---------------------------------------------------- */\\n\\n/**\\n * Element for testing browser HTML5 media capabilities\\n *\\n * @type {Element}\\n * @constant\\n * @private\\n */\\n\\n\\ndefineLazyProperty(Html5, 'TEST_VID', function () {\\n  if (!isReal()) {\\n    return;\\n  }\\n\\n  var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video');\\n  var track = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('track');\\n  track.kind = 'captions';\\n  track.srclang = 'en';\\n  track.label = 'English';\\n  video.appendChild(track);\\n  return video;\\n});\\n/**\\n * Check if HTML5 media is supported by this browser/device.\\n *\\n * @return {boolean}\\n *         - True if HTML5 media is supported.\\n *         - False if HTML5 media is not supported.\\n */\\n\\nHtml5.isSupported = function () {\\n  // IE with no Media Player is a LIAR! (#984)\\n  try {\\n    Html5.TEST_VID.volume = 0.5;\\n  } catch (e) {\\n    return false;\\n  }\\n\\n  return !!(Html5.TEST_VID && Html5.TEST_VID.canPlayType);\\n};\\n/**\\n * Check if the tech can support the given type\\n *\\n * @param {string} type\\n *        The mimetype to check\\n * @return {string} 'probably', 'maybe', or '' (empty string)\\n */\\n\\n\\nHtml5.canPlayType = function (type) {\\n  return Html5.TEST_VID.canPlayType(type);\\n};\\n/**\\n * Check if the tech can support the given source\\n *\\n * @param {Object} srcObj\\n *        The source object\\n * @param {Object} options\\n *        The options passed to the tech\\n * @return {string} 'probably', 'maybe', or '' (empty string)\\n */\\n\\n\\nHtml5.canPlaySource = function (srcObj, options) {\\n  return Html5.canPlayType(srcObj.type);\\n};\\n/**\\n * Check if the volume can be changed in this browser/device.\\n * Volume cannot be changed in a lot of mobile devices.\\n * Specifically, it can't be changed from 1 on iOS.\\n *\\n * @return {boolean}\\n *         - True if volume can be controlled\\n *         - False otherwise\\n */\\n\\n\\nHtml5.canControlVolume = function () {\\n  // IE will error if Windows Media Player not installed #3315\\n  try {\\n    var volume = Html5.TEST_VID.volume;\\n    Html5.TEST_VID.volume = volume / 2 + 0.1;\\n    return volume !== Html5.TEST_VID.volume;\\n  } catch (e) {\\n    return false;\\n  }\\n};\\n/**\\n * Check if the volume can be muted in this browser/device.\\n * Some devices, e.g. iOS, don't allow changing volume\\n * but permits muting/unmuting.\\n *\\n * @return {bolean}\\n *      - True if volume can be muted\\n *      - False otherwise\\n */\\n\\n\\nHtml5.canMuteVolume = function () {\\n  try {\\n    var muted = Html5.TEST_VID.muted; // in some versions of iOS muted property doesn't always\\n    // work, so we want to set both property and attribute\\n\\n    Html5.TEST_VID.muted = !muted;\\n\\n    if (Html5.TEST_VID.muted) {\\n      setAttribute(Html5.TEST_VID, 'muted', 'muted');\\n    } else {\\n      removeAttribute(Html5.TEST_VID, 'muted', 'muted');\\n    }\\n\\n    return muted !== Html5.TEST_VID.muted;\\n  } catch (e) {\\n    return false;\\n  }\\n};\\n/**\\n * Check if the playback rate can be changed in this browser/device.\\n *\\n * @return {boolean}\\n *         - True if playback rate can be controlled\\n *         - False otherwise\\n */\\n\\n\\nHtml5.canControlPlaybackRate = function () {\\n  // Playback rate API is implemented in Android Chrome, but doesn't do anything\\n  // https://github.com/videojs/video.js/issues/3180\\n  if (IS_ANDROID && IS_CHROME && CHROME_VERSION < 58) {\\n    return false;\\n  } // IE will error if Windows Media Player not installed #3315\\n\\n\\n  try {\\n    var playbackRate = Html5.TEST_VID.playbackRate;\\n    Html5.TEST_VID.playbackRate = playbackRate / 2 + 0.1;\\n    return playbackRate !== Html5.TEST_VID.playbackRate;\\n  } catch (e) {\\n    return false;\\n  }\\n};\\n/**\\n * Check if we can override a video/audio elements attributes, with\\n * Object.defineProperty.\\n *\\n * @return {boolean}\\n *         - True if builtin attributes can be overridden\\n *         - False otherwise\\n */\\n\\n\\nHtml5.canOverrideAttributes = function () {\\n  // if we cannot overwrite the src/innerHTML property, there is no support\\n  // iOS 7 safari for instance cannot do this.\\n  try {\\n    var noop = function noop() {};\\n\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'), 'src', {\\n      get: noop,\\n      set: noop\\n    });\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('audio'), 'src', {\\n      get: noop,\\n      set: noop\\n    });\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'), 'innerHTML', {\\n      get: noop,\\n      set: noop\\n    });\\n    Object.defineProperty(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('audio'), 'innerHTML', {\\n      get: noop,\\n      set: noop\\n    });\\n  } catch (e) {\\n    return false;\\n  }\\n\\n  return true;\\n};\\n/**\\n * Check to see if native `TextTrack`s are supported by this browser/device.\\n *\\n * @return {boolean}\\n *         - True if native `TextTrack`s are supported.\\n *         - False otherwise\\n */\\n\\n\\nHtml5.supportsNativeTextTracks = function () {\\n  return IS_ANY_SAFARI || IS_IOS && IS_CHROME;\\n};\\n/**\\n * Check to see if native `VideoTrack`s are supported by this browser/device\\n *\\n * @return {boolean}\\n *        - True if native `VideoTrack`s are supported.\\n *        - False otherwise\\n */\\n\\n\\nHtml5.supportsNativeVideoTracks = function () {\\n  return !!(Html5.TEST_VID && Html5.TEST_VID.videoTracks);\\n};\\n/**\\n * Check to see if native `AudioTrack`s are supported by this browser/device\\n *\\n * @return {boolean}\\n *        - True if native `AudioTrack`s are supported.\\n *        - False otherwise\\n */\\n\\n\\nHtml5.supportsNativeAudioTracks = function () {\\n  return !!(Html5.TEST_VID && Html5.TEST_VID.audioTracks);\\n};\\n/**\\n * An array of events available on the Html5 tech.\\n *\\n * @private\\n * @type {Array}\\n */\\n\\n\\nHtml5.Events = ['loadstart', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'loadedmetadata', 'loadeddata', 'canplay', 'canplaythrough', 'playing', 'waiting', 'seeking', 'seeked', 'ended', 'durationchange', 'timeupdate', 'progress', 'play', 'pause', 'ratechange', 'resize', 'volumechange'];\\n/**\\n * Boolean indicating whether the `Tech` supports volume control.\\n *\\n * @type {boolean}\\n * @default {@link Html5.canControlVolume}\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports muting volume.\\n *\\n * @type {bolean}\\n * @default {@link Html5.canMuteVolume}\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports changing the speed at which the media\\n * plays. Examples:\\n *   - Set player to play 2x (twice) as fast\\n *   - Set player to play 0.5x (half) as fast\\n *\\n * @type {boolean}\\n * @default {@link Html5.canControlPlaybackRate}\\n */\\n\\n/**\\n * Boolean indicating whether the `Tech` supports the `sourceset` event.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports native `TextTrack`s.\\n *\\n * @type {boolean}\\n * @default {@link Html5.supportsNativeTextTracks}\\n */\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports native `VideoTrack`s.\\n *\\n * @type {boolean}\\n * @default {@link Html5.supportsNativeVideoTracks}\\n */\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports native `AudioTrack`s.\\n *\\n * @type {boolean}\\n * @default {@link Html5.supportsNativeAudioTracks}\\n */\\n\\n[['featuresVolumeControl', 'canControlVolume'], ['featuresMuteControl', 'canMuteVolume'], ['featuresPlaybackRate', 'canControlPlaybackRate'], ['featuresSourceset', 'canOverrideAttributes'], ['featuresNativeTextTracks', 'supportsNativeTextTracks'], ['featuresNativeVideoTracks', 'supportsNativeVideoTracks'], ['featuresNativeAudioTracks', 'supportsNativeAudioTracks']].forEach(function (_ref) {\\n  var key = _ref[0],\\n      fn = _ref[1];\\n  defineLazyProperty(Html5.prototype, key, function () {\\n    return Html5[fn]();\\n  }, true);\\n});\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports the media element\\n * moving in the DOM. iOS breaks if you move the media element, so this is set this to\\n * false there. Everywhere else this should be true.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nHtml5.prototype.movingMediaElementInDOM = !IS_IOS; // TODO: Previous comment: No longer appears to be used. Can probably be removed.\\n//       Is this true?\\n\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports automatic media resize\\n * when going into fullscreen.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nHtml5.prototype.featuresFullscreenResize = true;\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports the progress event.\\n * If this is false, manual `progress` events will be triggered instead.\\n *\\n * @type {boolean}\\n * @default\\n */\\n\\nHtml5.prototype.featuresProgressEvents = true;\\n/**\\n * Boolean indicating whether the `HTML5` tech currently supports the timeupdate event.\\n * If this is false, manual `timeupdate` events will be triggered instead.\\n *\\n * @default\\n */\\n\\nHtml5.prototype.featuresTimeupdateEvents = true; // HTML5 Feature detection and Device Fixes --------------------------------- //\\n\\nvar canPlayType;\\n\\nHtml5.patchCanPlayType = function () {\\n  // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\\n  // Firefox and Chrome report correctly\\n  if (ANDROID_VERSION >= 4.0 && !IS_FIREFOX && !IS_CHROME) {\\n    canPlayType = Html5.TEST_VID && Html5.TEST_VID.constructor.prototype.canPlayType;\\n\\n    Html5.TEST_VID.constructor.prototype.canPlayType = function (type) {\\n      var mpegurlRE = /^application\\\\/(?:x-|vnd\\\\.apple\\\\.)mpegurl/i;\\n\\n      if (type && mpegurlRE.test(type)) {\\n        return 'maybe';\\n      }\\n\\n      return canPlayType.call(this, type);\\n    };\\n  }\\n};\\n\\nHtml5.unpatchCanPlayType = function () {\\n  var r = Html5.TEST_VID.constructor.prototype.canPlayType;\\n\\n  if (canPlayType) {\\n    Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\\n  }\\n\\n  return r;\\n}; // by default, patch the media element\\n\\n\\nHtml5.patchCanPlayType();\\n\\nHtml5.disposeMediaElement = function (el) {\\n  if (!el) {\\n    return;\\n  }\\n\\n  if (el.parentNode) {\\n    el.parentNode.removeChild(el);\\n  } // remove any child track or source nodes to prevent their loading\\n\\n\\n  while (el.hasChildNodes()) {\\n    el.removeChild(el.firstChild);\\n  } // remove any src reference. not setting `src=''` because that causes a warning\\n  // in firefox\\n\\n\\n  el.removeAttribute('src'); // force the media element to update its loading state by calling load()\\n  // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\\n\\n  if (typeof el.load === 'function') {\\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\\n    (function () {\\n      try {\\n        el.load();\\n      } catch (e) {// not supported\\n      }\\n    })();\\n  }\\n};\\n\\nHtml5.resetMediaElement = function (el) {\\n  if (!el) {\\n    return;\\n  }\\n\\n  var sources = el.querySelectorAll('source');\\n  var i = sources.length;\\n\\n  while (i--) {\\n    el.removeChild(sources[i]);\\n  } // remove any src reference.\\n  // not setting `src=''` because that throws an error\\n\\n\\n  el.removeAttribute('src');\\n\\n  if (typeof el.load === 'function') {\\n    // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\\n    (function () {\\n      try {\\n        el.load();\\n      } catch (e) {// satisfy linter\\n      }\\n    })();\\n  }\\n};\\n/* Native HTML5 element property wrapping ----------------------------------- */\\n// Wrap native boolean attributes with getters that check both property and attribute\\n// The list is as followed:\\n// muted, defaultMuted, autoplay, controls, loop, playsinline\\n\\n\\n[\\n/**\\n * Get the value of `muted` from the media element. `muted` indicates\\n * that the volume for the media should be set to silent. This does not actually change\\n * the `volume` attribute.\\n *\\n * @method Html5#muted\\n * @return {boolean}\\n *         - True if the value of `volume` should be ignored and the audio set to silent.\\n *         - False if the value of `volume` should be used.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\\n */\\n'muted',\\n/**\\n * Get the value of `defaultMuted` from the media element. `defaultMuted` indicates\\n * whether the media should start muted or not. Only changes the default state of the\\n * media. `muted` and `defaultMuted` can have different values. {@link Html5#muted} indicates the\\n * current state.\\n *\\n * @method Html5#defaultMuted\\n * @return {boolean}\\n *         - The value of `defaultMuted` from the media element.\\n *         - True indicates that the media should start muted.\\n *         - False indicates that the media should not start muted\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\\n */\\n'defaultMuted',\\n/**\\n * Get the value of `autoplay` from the media element. `autoplay` indicates\\n * that the media should start to play as soon as the page is ready.\\n *\\n * @method Html5#autoplay\\n * @return {boolean}\\n *         - The value of `autoplay` from the media element.\\n *         - True indicates that the media should start as soon as the page loads.\\n *         - False indicates that the media should not start as soon as the page loads.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\\n */\\n'autoplay',\\n/**\\n * Get the value of `controls` from the media element. `controls` indicates\\n * whether the native media controls should be shown or hidden.\\n *\\n * @method Html5#controls\\n * @return {boolean}\\n *         - The value of `controls` from the media element.\\n *         - True indicates that native controls should be showing.\\n *         - False indicates that native controls should be hidden.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-controls}\\n */\\n'controls',\\n/**\\n * Get the value of `loop` from the media element. `loop` indicates\\n * that the media should return to the start of the media and continue playing once\\n * it reaches the end.\\n *\\n * @method Html5#loop\\n * @return {boolean}\\n *         - The value of `loop` from the media element.\\n *         - True indicates that playback should seek back to start once\\n *           the end of a media is reached.\\n *         - False indicates that playback should not loop back to the start when the\\n *           end of the media is reached.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\\n */\\n'loop',\\n/**\\n * Get the value of `playsinline` from the media element. `playsinline` indicates\\n * to the browser that non-fullscreen playback is preferred when fullscreen\\n * playback is the native default, such as in iOS Safari.\\n *\\n * @method Html5#playsinline\\n * @return {boolean}\\n *         - The value of `playsinline` from the media element.\\n *         - True indicates that the media should play inline.\\n *         - False indicates that the media should not play inline.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\\n */\\n'playsinline'].forEach(function (prop) {\\n  Html5.prototype[prop] = function () {\\n    return this.el_[prop] || this.el_.hasAttribute(prop);\\n  };\\n}); // Wrap native boolean attributes with setters that set both property and attribute\\n// The list is as followed:\\n// setMuted, setDefaultMuted, setAutoplay, setLoop, setPlaysinline\\n// setControls is special-cased above\\n\\n[\\n/**\\n * Set the value of `muted` on the media element. `muted` indicates that the current\\n * audio level should be silent.\\n *\\n * @method Html5#setMuted\\n * @param {boolean} muted\\n *        - True if the audio should be set to silent\\n *        - False otherwise\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-muted}\\n */\\n'muted',\\n/**\\n * Set the value of `defaultMuted` on the media element. `defaultMuted` indicates that the current\\n * audio level should be silent, but will only effect the muted level on intial playback..\\n *\\n * @method Html5.prototype.setDefaultMuted\\n * @param {boolean} defaultMuted\\n *        - True if the audio should be set to silent\\n *        - False otherwise\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultmuted}\\n */\\n'defaultMuted',\\n/**\\n * Set the value of `autoplay` on the media element. `autoplay` indicates\\n * that the media should start to play as soon as the page is ready.\\n *\\n * @method Html5#setAutoplay\\n * @param {boolean} autoplay\\n *         - True indicates that the media should start as soon as the page loads.\\n *         - False indicates that the media should not start as soon as the page loads.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-autoplay}\\n */\\n'autoplay',\\n/**\\n * Set the value of `loop` on the media element. `loop` indicates\\n * that the media should return to the start of the media and continue playing once\\n * it reaches the end.\\n *\\n * @method Html5#setLoop\\n * @param {boolean} loop\\n *         - True indicates that playback should seek back to start once\\n *           the end of a media is reached.\\n *         - False indicates that playback should not loop back to the start when the\\n *           end of the media is reached.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-loop}\\n */\\n'loop',\\n/**\\n * Set the value of `playsinline` from the media element. `playsinline` indicates\\n * to the browser that non-fullscreen playback is preferred when fullscreen\\n * playback is the native default, such as in iOS Safari.\\n *\\n * @method Html5#setPlaysinline\\n * @param {boolean} playsinline\\n *         - True indicates that the media should play inline.\\n *         - False indicates that the media should not play inline.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\\n */\\n'playsinline'].forEach(function (prop) {\\n  Html5.prototype['set' + toTitleCase(prop)] = function (v) {\\n    this.el_[prop] = v;\\n\\n    if (v) {\\n      this.el_.setAttribute(prop, prop);\\n    } else {\\n      this.el_.removeAttribute(prop);\\n    }\\n  };\\n}); // Wrap native properties with a getter\\n// The list is as followed\\n// paused, currentTime, buffered, volume, poster, preload, error, seeking\\n// seekable, ended, playbackRate, defaultPlaybackRate, played, networkState\\n// readyState, videoWidth, videoHeight, crossOrigin\\n\\n[\\n/**\\n * Get the value of `paused` from the media element. `paused` indicates whether the media element\\n * is currently paused or not.\\n *\\n * @method Html5#paused\\n * @return {boolean}\\n *         The value of `paused` from the media element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-paused}\\n */\\n'paused',\\n/**\\n * Get the value of `currentTime` from the media element. `currentTime` indicates\\n * the current second that the media is at in playback.\\n *\\n * @method Html5#currentTime\\n * @return {number}\\n *         The value of `currentTime` from the media element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-currenttime}\\n */\\n'currentTime',\\n/**\\n * Get the value of `buffered` from the media element. `buffered` is a `TimeRange`\\n * object that represents the parts of the media that are already downloaded and\\n * available for playback.\\n *\\n * @method Html5#buffered\\n * @return {TimeRange}\\n *         The value of `buffered` from the media element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-buffered}\\n */\\n'buffered',\\n/**\\n * Get the value of `volume` from the media element. `volume` indicates\\n * the current playback volume of audio for a media. `volume` will be a value from 0\\n * (silent) to 1 (loudest and default).\\n *\\n * @method Html5#volume\\n * @return {number}\\n *         The value of `volume` from the media element. Value will be between 0-1.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\\n */\\n'volume',\\n/**\\n * Get the value of `poster` from the media element. `poster` indicates\\n * that the url of an image file that can/will be shown when no media data is available.\\n *\\n * @method Html5#poster\\n * @return {string}\\n *         The value of `poster` from the media element. Value will be a url to an\\n *         image.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-video-poster}\\n */\\n'poster',\\n/**\\n * Get the value of `preload` from the media element. `preload` indicates\\n * what should download before the media is interacted with. It can have the following\\n * values:\\n * - none: nothing should be downloaded\\n * - metadata: poster and the first few frames of the media may be downloaded to get\\n *   media dimensions and other metadata\\n * - auto: allow the media and metadata for the media to be downloaded before\\n *    interaction\\n *\\n * @method Html5#preload\\n * @return {string}\\n *         The value of `preload` from the media element. Will be 'none', 'metadata',\\n *         or 'auto'.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\\n */\\n'preload',\\n/**\\n * Get the value of the `error` from the media element. `error` indicates any\\n * MediaError that may have occurred during playback. If error returns null there is no\\n * current error.\\n *\\n * @method Html5#error\\n * @return {MediaError|null}\\n *         The value of `error` from the media element. Will be `MediaError` if there\\n *         is a current error and null otherwise.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-error}\\n */\\n'error',\\n/**\\n * Get the value of `seeking` from the media element. `seeking` indicates whether the\\n * media is currently seeking to a new position or not.\\n *\\n * @method Html5#seeking\\n * @return {boolean}\\n *         - The value of `seeking` from the media element.\\n *         - True indicates that the media is currently seeking to a new position.\\n *         - False indicates that the media is not seeking to a new position at this time.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seeking}\\n */\\n'seeking',\\n/**\\n * Get the value of `seekable` from the media element. `seekable` returns a\\n * `TimeRange` object indicating ranges of time that can currently be `seeked` to.\\n *\\n * @method Html5#seekable\\n * @return {TimeRange}\\n *         The value of `seekable` from the media element. A `TimeRange` object\\n *         indicating the current ranges of time that can be seeked to.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-seekable}\\n */\\n'seekable',\\n/**\\n * Get the value of `ended` from the media element. `ended` indicates whether\\n * the media has reached the end or not.\\n *\\n * @method Html5#ended\\n * @return {boolean}\\n *         - The value of `ended` from the media element.\\n *         - True indicates that the media has ended.\\n *         - False indicates that the media has not ended.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-ended}\\n */\\n'ended',\\n/**\\n * Get the value of `playbackRate` from the media element. `playbackRate` indicates\\n * the rate at which the media is currently playing back. Examples:\\n *   - if playbackRate is set to 2, media will play twice as fast.\\n *   - if playbackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5#playbackRate\\n * @return {number}\\n *         The value of `playbackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\\n */\\n'playbackRate',\\n/**\\n * Get the value of `defaultPlaybackRate` from the media element. `defaultPlaybackRate` indicates\\n * the rate at which the media is currently playing back. This value will not indicate the current\\n * `playbackRate` after playback has started, use {@link Html5#playbackRate} for that.\\n *\\n * Examples:\\n *   - if defaultPlaybackRate is set to 2, media will play twice as fast.\\n *   - if defaultPlaybackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5.prototype.defaultPlaybackRate\\n * @return {number}\\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\\n */\\n'defaultPlaybackRate',\\n/**\\n * Get the value of `played` from the media element. `played` returns a `TimeRange`\\n * object representing points in the media timeline that have been played.\\n *\\n * @method Html5#played\\n * @return {TimeRange}\\n *         The value of `played` from the media element. A `TimeRange` object indicating\\n *         the ranges of time that have been played.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-played}\\n */\\n'played',\\n/**\\n * Get the value of `networkState` from the media element. `networkState` indicates\\n * the current network state. It returns an enumeration from the following list:\\n * - 0: NETWORK_EMPTY\\n * - 1: NETWORK_IDLE\\n * - 2: NETWORK_LOADING\\n * - 3: NETWORK_NO_SOURCE\\n *\\n * @method Html5#networkState\\n * @return {number}\\n *         The value of `networkState` from the media element. This will be a number\\n *         from the list in the description.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-networkstate}\\n */\\n'networkState',\\n/**\\n * Get the value of `readyState` from the media element. `readyState` indicates\\n * the current state of the media element. It returns an enumeration from the\\n * following list:\\n * - 0: HAVE_NOTHING\\n * - 1: HAVE_METADATA\\n * - 2: HAVE_CURRENT_DATA\\n * - 3: HAVE_FUTURE_DATA\\n * - 4: HAVE_ENOUGH_DATA\\n *\\n * @method Html5#readyState\\n * @return {number}\\n *         The value of `readyState` from the media element. This will be a number\\n *         from the list in the description.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#ready-states}\\n */\\n'readyState',\\n/**\\n * Get the value of `videoWidth` from the video element. `videoWidth` indicates\\n * the current width of the video in css pixels.\\n *\\n * @method Html5#videoWidth\\n * @return {number}\\n *         The value of `videoWidth` from the video element. This will be a number\\n *         in css pixels.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\\n */\\n'videoWidth',\\n/**\\n * Get the value of `videoHeight` from the video element. `videoHeight` indicates\\n * the current height of the video in css pixels.\\n *\\n * @method Html5#videoHeight\\n * @return {number}\\n *         The value of `videoHeight` from the video element. This will be a number\\n *         in css pixels.\\n *\\n * @see [Spec] {@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-video-videowidth}\\n */\\n'videoHeight',\\n/**\\n * Get the value of `crossOrigin` from the media element. `crossOrigin` indicates\\n * to the browser that should sent the cookies along with the requests for the\\n * different assets/playlists\\n *\\n * @method Html5#crossOrigin\\n * @return {string}\\n *         - anonymous indicates that the media should not sent cookies.\\n *         - use-credentials indicates that the media should sent cookies along the requests.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\\n */\\n'crossOrigin'].forEach(function (prop) {\\n  Html5.prototype[prop] = function () {\\n    return this.el_[prop];\\n  };\\n}); // Wrap native properties with a setter in this format:\\n// set + toTitleCase(name)\\n// The list is as follows:\\n// setVolume, setSrc, setPoster, setPreload, setPlaybackRate, setDefaultPlaybackRate, setCrossOrigin\\n\\n[\\n/**\\n * Set the value of `volume` on the media element. `volume` indicates the current\\n * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and\\n * so on.\\n *\\n * @method Html5#setVolume\\n * @param {number} percentAsDecimal\\n *        The volume percent as a decimal. Valid range is from 0-1.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-a-volume}\\n */\\n'volume',\\n/**\\n * Set the value of `src` on the media element. `src` indicates the current\\n * {@link Tech~SourceObject} for the media.\\n *\\n * @method Html5#setSrc\\n * @param {Tech~SourceObject} src\\n *        The source object to set as the current source.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-src}\\n */\\n'src',\\n/**\\n * Set the value of `poster` on the media element. `poster` is the url to\\n * an image file that can/will be shown when no media data is available.\\n *\\n * @method Html5#setPoster\\n * @param {string} poster\\n *        The url to an image that should be used as the `poster` for the media\\n *        element.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-poster}\\n */\\n'poster',\\n/**\\n * Set the value of `preload` on the media element. `preload` indicates\\n * what should download before the media is interacted with. It can have the following\\n * values:\\n * - none: nothing should be downloaded\\n * - metadata: poster and the first few frames of the media may be downloaded to get\\n *   media dimensions and other metadata\\n * - auto: allow the media and metadata for the media to be downloaded before\\n *    interaction\\n *\\n * @method Html5#setPreload\\n * @param {string} preload\\n *         The value of `preload` to set on the media element. Must be 'none', 'metadata',\\n *         or 'auto'.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#attr-media-preload}\\n */\\n'preload',\\n/**\\n * Set the value of `playbackRate` on the media element. `playbackRate` indicates\\n * the rate at which the media should play back. Examples:\\n *   - if playbackRate is set to 2, media will play twice as fast.\\n *   - if playbackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5#setPlaybackRate\\n * @return {number}\\n *         The value of `playbackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-playbackrate}\\n */\\n'playbackRate',\\n/**\\n * Set the value of `defaultPlaybackRate` on the media element. `defaultPlaybackRate` indicates\\n * the rate at which the media should play back upon initial startup. Changing this value\\n * after a video has started will do nothing. Instead you should used {@link Html5#setPlaybackRate}.\\n *\\n * Example Values:\\n *   - if playbackRate is set to 2, media will play twice as fast.\\n *   - if playbackRate is set to 0.5, media will play half as fast.\\n *\\n * @method Html5.prototype.setDefaultPlaybackRate\\n * @return {number}\\n *         The value of `defaultPlaybackRate` from the media element. A number indicating\\n *         the current playback speed of the media, where 1 is normal speed.\\n *\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-defaultplaybackrate}\\n */\\n'defaultPlaybackRate',\\n/**\\n * Set the value of `crossOrigin` from the media element. `crossOrigin` indicates\\n * to the browser that should sent the cookies along with the requests for the\\n * different assets/playlists\\n *\\n * @method Html5#setCrossOrigin\\n * @param {string} crossOrigin\\n *         - anonymous indicates that the media should not sent cookies.\\n *         - use-credentials indicates that the media should sent cookies along the requests.\\n *\\n * @see [Spec]{@link https://html.spec.whatwg.org/#attr-media-crossorigin}\\n */\\n'crossOrigin'].forEach(function (prop) {\\n  Html5.prototype['set' + toTitleCase(prop)] = function (v) {\\n    this.el_[prop] = v;\\n  };\\n}); // wrap native functions with a function\\n// The list is as follows:\\n// pause, load, play\\n\\n[\\n/**\\n * A wrapper around the media elements `pause` function. This will call the `HTML5`\\n * media elements `pause` function.\\n *\\n * @method Html5#pause\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}\\n */\\n'pause',\\n/**\\n * A wrapper around the media elements `load` function. This will call the `HTML5`s\\n * media element `load` function.\\n *\\n * @method Html5#load\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}\\n */\\n'load',\\n/**\\n * A wrapper around the media elements `play` function. This will call the `HTML5`s\\n * media element `play` function.\\n *\\n * @method Html5#play\\n * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-play}\\n */\\n'play'].forEach(function (prop) {\\n  Html5.prototype[prop] = function () {\\n    return this.el_[prop]();\\n  };\\n});\\nTech.withSourceHandlers(Html5);\\n/**\\n * Native source handler for Html5, simply passes the source to the media element.\\n *\\n * @property {Tech~SourceObject} source\\n *        The source object\\n *\\n * @property {Html5} tech\\n *        The instance of the HTML5 tech.\\n */\\n\\nHtml5.nativeSourceHandler = {};\\n/**\\n * Check if the media element can play the given mime type.\\n *\\n * @param {string} type\\n *        The mimetype to check\\n *\\n * @return {string}\\n *         'probably', 'maybe', or '' (empty string)\\n */\\n\\nHtml5.nativeSourceHandler.canPlayType = function (type) {\\n  // IE without MediaPlayer throws an error (#519)\\n  try {\\n    return Html5.TEST_VID.canPlayType(type);\\n  } catch (e) {\\n    return '';\\n  }\\n};\\n/**\\n * Check if the media element can handle a source natively.\\n *\\n * @param {Tech~SourceObject} source\\n *         The source object\\n *\\n * @param {Object} [options]\\n *         Options to be passed to the tech.\\n *\\n * @return {string}\\n *         'probably', 'maybe', or '' (empty string).\\n */\\n\\n\\nHtml5.nativeSourceHandler.canHandleSource = function (source, options) {\\n  // If a type was provided we should rely on that\\n  if (source.type) {\\n    return Html5.nativeSourceHandler.canPlayType(source.type); // If no type, fall back to checking 'video/[EXTENSION]'\\n  } else if (source.src) {\\n    var ext = getFileExtension(source.src);\\n    return Html5.nativeSourceHandler.canPlayType(\\\"video/\\\" + ext);\\n  }\\n\\n  return '';\\n};\\n/**\\n * Pass the source to the native media element.\\n *\\n * @param {Tech~SourceObject} source\\n *        The source object\\n *\\n * @param {Html5} tech\\n *        The instance of the Html5 tech\\n *\\n * @param {Object} [options]\\n *        The options to pass to the source\\n */\\n\\n\\nHtml5.nativeSourceHandler.handleSource = function (source, tech, options) {\\n  tech.setSrc(source.src);\\n};\\n/**\\n * A noop for the native dispose function, as cleanup is not needed.\\n */\\n\\n\\nHtml5.nativeSourceHandler.dispose = function () {}; // Register the native source handler\\n\\n\\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\\nTech.registerTech('Html5', Html5);\\n\\n// on the player when they happen\\n\\nvar TECH_EVENTS_RETRIGGER = [\\n/**\\n * Fired while the user agent is downloading media data.\\n *\\n * @event Player#progress\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `progress` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechProgress_\\n * @fires Player#progress\\n * @listens Tech#progress\\n */\\n'progress',\\n/**\\n * Fires when the loading of an audio/video is aborted.\\n *\\n * @event Player#abort\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `abort` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechAbort_\\n * @fires Player#abort\\n * @listens Tech#abort\\n */\\n'abort',\\n/**\\n * Fires when the browser is intentionally not getting media data.\\n *\\n * @event Player#suspend\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `suspend` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechSuspend_\\n * @fires Player#suspend\\n * @listens Tech#suspend\\n */\\n'suspend',\\n/**\\n * Fires when the current playlist is empty.\\n *\\n * @event Player#emptied\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `emptied` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechEmptied_\\n * @fires Player#emptied\\n * @listens Tech#emptied\\n */\\n'emptied',\\n/**\\n * Fires when the browser is trying to get media data, but data is not available.\\n *\\n * @event Player#stalled\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechStalled_\\n * @fires Player#stalled\\n * @listens Tech#stalled\\n */\\n'stalled',\\n/**\\n * Fires when the browser has loaded meta data for the audio/video.\\n *\\n * @event Player#loadedmetadata\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Retrigger the `stalled` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechLoadedmetadata_\\n * @fires Player#loadedmetadata\\n * @listens Tech#loadedmetadata\\n */\\n'loadedmetadata',\\n/**\\n * Fires when the browser has loaded the current frame of the audio/video.\\n *\\n * @event Player#loadeddata\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechLoaddeddata_\\n * @fires Player#loadeddata\\n * @listens Tech#loadeddata\\n */\\n'loadeddata',\\n/**\\n * Fires when the current playback position has changed.\\n *\\n * @event Player#timeupdate\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechTimeUpdate_\\n * @fires Player#timeupdate\\n * @listens Tech#timeupdate\\n */\\n'timeupdate',\\n/**\\n * Fires when the video's intrinsic dimensions change\\n *\\n * @event Player#resize\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `resize` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechResize_\\n * @fires Player#resize\\n * @listens Tech#resize\\n */\\n'resize',\\n/**\\n * Fires when the volume has been changed\\n *\\n * @event Player#volumechange\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `volumechange` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechVolumechange_\\n * @fires Player#volumechange\\n * @listens Tech#volumechange\\n */\\n'volumechange',\\n/**\\n * Fires when the text track has been changed\\n *\\n * @event Player#texttrackchange\\n * @type {event}\\n */\\n\\n/**\\n * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.\\n *\\n * @private\\n * @method Player#handleTechTexttrackchange_\\n * @fires Player#texttrackchange\\n * @listens Tech#texttrackchange\\n */\\n'texttrackchange']; // events to queue when playback rate is zero\\n// this is a hash for the sole purpose of mapping non-camel-cased event names\\n// to camel-cased function names\\n\\nvar TECH_EVENTS_QUEUE = {\\n  canplay: 'CanPlay',\\n  canplaythrough: 'CanPlayThrough',\\n  playing: 'Playing',\\n  seeked: 'Seeked'\\n};\\nvar BREAKPOINT_ORDER = ['tiny', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'huge'];\\nvar BREAKPOINT_CLASSES = {}; // grep: vjs-layout-tiny\\n// grep: vjs-layout-x-small\\n// grep: vjs-layout-small\\n// grep: vjs-layout-medium\\n// grep: vjs-layout-large\\n// grep: vjs-layout-x-large\\n// grep: vjs-layout-huge\\n\\nBREAKPOINT_ORDER.forEach(function (k) {\\n  var v = k.charAt(0) === 'x' ? \\\"x-\\\" + k.substring(1) : k;\\n  BREAKPOINT_CLASSES[k] = \\\"vjs-layout-\\\" + v;\\n});\\nvar DEFAULT_BREAKPOINTS = {\\n  tiny: 210,\\n  xsmall: 320,\\n  small: 425,\\n  medium: 768,\\n  large: 1440,\\n  xlarge: 2560,\\n  huge: Infinity\\n};\\n/**\\n * An instance of the `Player` class is created when any of the Video.js setup methods\\n * are used to initialize a video.\\n *\\n * After an instance has been created it can be accessed globally in two ways:\\n * 1. By calling `videojs('example_video_1');`\\n * 2. By using it directly via  `videojs.players.example_video_1;`\\n *\\n * @extends Component\\n */\\n\\nvar Player = /*#__PURE__*/function (_Component) {\\n  _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6___default()(Player, _Component);\\n\\n  /**\\n   * Create an instance of this class.\\n   *\\n   * @param {Element} tag\\n   *        The original video DOM element used for configuring options.\\n   *\\n   * @param {Object} [options]\\n   *        Object of option names and values.\\n   *\\n   * @param {Component~ReadyCallback} [ready]\\n   *        Ready callback function.\\n   */\\n  function Player(tag, options, ready) {\\n    var _this;\\n\\n    // Make sure tag ID exists\\n    tag.id = tag.id || options.id || \\\"vjs_video_\\\" + newGUID(); // Set Options\\n    // The options argument overrides options set in the video tag\\n    // which overrides globally set options.\\n    // This latter part coincides with the load order\\n    // (tag must exist before Player)\\n\\n    options = assign(Player.getTagSettings(tag), options); // Delay the initialization of children because we need to set up\\n    // player properties first, and can't use `this` before `super()`\\n\\n    options.initChildren = false; // Same with creating the element\\n\\n    options.createEl = false; // don't auto mixin the evented mixin\\n\\n    options.evented = false; // we don't want the player to report touch activity on itself\\n    // see enableTouchActivity in Component\\n\\n    options.reportTouchActivity = false; // If language is not set, get the closest lang attribute\\n\\n    if (!options.language) {\\n      if (typeof tag.closest === 'function') {\\n        var closest = tag.closest('[lang]');\\n\\n        if (closest && closest.getAttribute) {\\n          options.language = closest.getAttribute('lang');\\n        }\\n      } else {\\n        var element = tag;\\n\\n        while (element && element.nodeType === 1) {\\n          if (getAttributes(element).hasOwnProperty('lang')) {\\n            options.language = element.getAttribute('lang');\\n            break;\\n          }\\n\\n          element = element.parentNode;\\n        }\\n      }\\n    } // Run base component initializing with new options\\n\\n\\n    _this = _Component.call(this, null, options, ready) || this; // Create bound methods for document listeners.\\n\\n    _this.boundDocumentFullscreenChange_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.documentFullscreenChange_);\\n    _this.boundFullWindowOnEscKey_ = bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), _this.fullWindowOnEscKey); // default isFullscreen_ to false\\n\\n    _this.isFullscreen_ = false; // create logger\\n\\n    _this.log = createLogger$1(_this.id_); // Hold our own reference to fullscreen api so it can be mocked in tests\\n\\n    _this.fsApi_ = FullscreenApi; // Tracks when a tech changes the poster\\n\\n    _this.isPosterFromTech_ = false; // Holds callback info that gets queued when playback rate is zero\\n    // and a seek is happening\\n\\n    _this.queuedCallbacks_ = []; // Turn off API access because we're loading a new tech that might load asynchronously\\n\\n    _this.isReady_ = false; // Init state hasStarted_\\n\\n    _this.hasStarted_ = false; // Init state userActive_\\n\\n    _this.userActive_ = false; // if the global option object was accidentally blown away by\\n    // someone, bail early with an informative error\\n\\n    if (!_this.options_ || !_this.options_.techOrder || !_this.options_.techOrder.length) {\\n      throw new Error('No techOrder specified. Did you overwrite ' + 'videojs.options instead of just changing the ' + 'properties you want to override?');\\n    } // Store the original tag used to set options\\n\\n\\n    _this.tag = tag; // Store the tag attributes used to restore html5 element\\n\\n    _this.tagAttributes = tag && getAttributes(tag); // Update current language\\n\\n    _this.language(_this.options_.language); // Update Supported Languages\\n\\n\\n    if (options.languages) {\\n      // Normalise player option languages to lowercase\\n      var languagesToLower = {};\\n      Object.getOwnPropertyNames(options.languages).forEach(function (name) {\\n        languagesToLower[name.toLowerCase()] = options.languages[name];\\n      });\\n      _this.languages_ = languagesToLower;\\n    } else {\\n      _this.languages_ = Player.prototype.options_.languages;\\n    }\\n\\n    _this.resetCache_(); // Set poster\\n\\n\\n    _this.poster_ = options.poster || ''; // Set controls\\n\\n    _this.controls_ = !!options.controls; // Original tag settings stored in options\\n    // now remove immediately so native controls don't flash.\\n    // May be turned back on by HTML5 tech if nativeControlsForTouch is true\\n\\n    tag.controls = false;\\n    tag.removeAttribute('controls');\\n    _this.changingSrc_ = false;\\n    _this.playCallbacks_ = [];\\n    _this.playTerminatedQueue_ = []; // the attribute overrides the option\\n\\n    if (tag.hasAttribute('autoplay')) {\\n      _this.autoplay(true);\\n    } else {\\n      // otherwise use the setter to validate and\\n      // set the correct value.\\n      _this.autoplay(_this.options_.autoplay);\\n    } // check plugins\\n\\n\\n    if (options.plugins) {\\n      Object.keys(options.plugins).forEach(function (name) {\\n        if (typeof _this[name] !== 'function') {\\n          throw new Error(\\\"plugin \\\\\\\"\\\" + name + \\\"\\\\\\\" does not exist\\\");\\n        }\\n      });\\n    }\\n    /*\\n     * Store the internal state of scrubbing\\n     *\\n     * @private\\n     * @return {Boolean} True if the user is scrubbing\\n     */\\n\\n\\n    _this.scrubbing_ = false;\\n    _this.el_ = _this.createEl(); // Make this an evented object and use `el_` as its event bus.\\n\\n    evented(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), {\\n      eventBusKey: 'el_'\\n    }); // listen to document and player fullscreenchange handlers so we receive those events\\n    // before a user can receive them so we can update isFullscreen appropriately.\\n    // make sure that we listen to fullscreenchange events before everything else to make sure that\\n    // our isFullscreen method is updated properly for internal components as well as external.\\n\\n    if (_this.fsApi_.requestFullscreen) {\\n      on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, _this.fsApi_.fullscreenchange, _this.boundDocumentFullscreenChange_);\\n\\n      _this.on(_this.fsApi_.fullscreenchange, _this.boundDocumentFullscreenChange_);\\n    }\\n\\n    if (_this.fluid_) {\\n      _this.on('playerreset', _this.updateStyleEl_);\\n    } // We also want to pass the original player options to each component and plugin\\n    // as well so they don't need to reach back into the player for options later.\\n    // We also need to do another copy of this.options_ so we don't end up with\\n    // an infinite loop.\\n\\n\\n    var playerOptionsCopy = mergeOptions(_this.options_); // Load plugins\\n\\n    if (options.plugins) {\\n      Object.keys(options.plugins).forEach(function (name) {\\n        _this[name](options.plugins[name]);\\n      });\\n    }\\n\\n    _this.options_.playerOptions = playerOptionsCopy;\\n    _this.middleware_ = [];\\n\\n    _this.initChildren(); // Set isAudio based on whether or not an audio tag was used\\n\\n\\n    _this.isAudio(tag.nodeName.toLowerCase() === 'audio'); // Update controls className. Can't do this when the controls are initially\\n    // set because the element doesn't exist yet.\\n\\n\\n    if (_this.controls()) {\\n      _this.addClass('vjs-controls-enabled');\\n    } else {\\n      _this.addClass('vjs-controls-disabled');\\n    } // Set ARIA label and region role depending on player type\\n\\n\\n    _this.el_.setAttribute('role', 'region');\\n\\n    if (_this.isAudio()) {\\n      _this.el_.setAttribute('aria-label', _this.localize('Audio Player'));\\n    } else {\\n      _this.el_.setAttribute('aria-label', _this.localize('Video Player'));\\n    }\\n\\n    if (_this.isAudio()) {\\n      _this.addClass('vjs-audio');\\n    }\\n\\n    if (_this.flexNotSupported_()) {\\n      _this.addClass('vjs-no-flex');\\n    } // TODO: Make this smarter. Toggle user state between touching/mousing\\n    // using events, since devices can have both touch and mouse events.\\n    // TODO: Make this check be performed again when the window switches between monitors\\n    // (See https://github.com/videojs/video.js/issues/5683)\\n\\n\\n    if (TOUCH_ENABLED) {\\n      _this.addClass('vjs-touch-enabled');\\n    } // iOS Safari has broken hover handling\\n\\n\\n    if (!IS_IOS) {\\n      _this.addClass('vjs-workinghover');\\n    } // Make player easily findable by ID\\n\\n\\n    Player.players[_this.id_] = _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this); // Add a major version class to aid css in plugins\\n\\n    var majorVersion = version.split('.')[0];\\n\\n    _this.addClass(\\\"vjs-v\\\" + majorVersion); // When the player is first initialized, trigger activity so components\\n    // like the control bar show themselves if needed\\n\\n\\n    _this.userActive(true);\\n\\n    _this.reportUserActivity();\\n\\n    _this.one('play', _this.listenForUserActivity_);\\n\\n    _this.on('stageclick', _this.handleStageClick_);\\n\\n    _this.on('keydown', _this.handleKeyDown);\\n\\n    _this.breakpoints(_this.options_.breakpoints);\\n\\n    _this.responsive(_this.options_.responsive);\\n\\n    return _this;\\n  }\\n  /**\\n   * Destroys the video player and does any necessary cleanup.\\n   *\\n   * This is especially helpful if you are dynamically adding and removing videos\\n   * to/from the DOM.\\n   *\\n   * @fires Player#dispose\\n   */\\n\\n\\n  var _proto = Player.prototype;\\n\\n  _proto.dispose = function dispose() {\\n    var _this2 = this;\\n\\n    /**\\n     * Called when the player is being disposed of.\\n     *\\n     * @event Player#dispose\\n     * @type {EventTarget~Event}\\n     */\\n    this.trigger('dispose'); // prevent dispose from being called twice\\n\\n    this.off('dispose'); // Make sure all player-specific document listeners are unbound. This is\\n\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, this.fsApi_.fullscreenchange, this.boundDocumentFullscreenChange_);\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_);\\n\\n    if (this.styleEl_ && this.styleEl_.parentNode) {\\n      this.styleEl_.parentNode.removeChild(this.styleEl_);\\n      this.styleEl_ = null;\\n    } // Kill reference to this player\\n\\n\\n    Player.players[this.id_] = null;\\n\\n    if (this.tag && this.tag.player) {\\n      this.tag.player = null;\\n    }\\n\\n    if (this.el_ && this.el_.player) {\\n      this.el_.player = null;\\n    }\\n\\n    if (this.tech_) {\\n      this.tech_.dispose();\\n      this.isPosterFromTech_ = false;\\n      this.poster_ = '';\\n    }\\n\\n    if (this.playerElIngest_) {\\n      this.playerElIngest_ = null;\\n    }\\n\\n    if (this.tag) {\\n      this.tag = null;\\n    }\\n\\n    clearCacheForPlayer(this); // remove all event handlers for track lists\\n    // all tracks and track listeners are removed on\\n    // tech dispose\\n\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n\\n      var list = _this2[props.getterName](); // if it is not a native list\\n      // we have to manually remove event listeners\\n\\n\\n      if (list && list.off) {\\n        list.off();\\n      }\\n    }); // the actual .el_ is removed here\\n\\n    _Component.prototype.dispose.call(this);\\n  }\\n  /**\\n   * Create the `Player`'s DOM element.\\n   *\\n   * @return {Element}\\n   *         The DOM element that gets created.\\n   */\\n  ;\\n\\n  _proto.createEl = function createEl() {\\n    var tag = this.tag;\\n    var el;\\n    var playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player');\\n    var divEmbed = this.tag.tagName.toLowerCase() === 'video-js';\\n\\n    if (playerElIngest) {\\n      el = this.el_ = tag.parentNode;\\n    } else if (!divEmbed) {\\n      el = this.el_ = _Component.prototype.createEl.call(this, 'div');\\n    } // Copy over all the attributes from the tag, including ID and class\\n    // ID will now reference player box, not the video tag\\n\\n\\n    var attrs = getAttributes(tag);\\n\\n    if (divEmbed) {\\n      el = this.el_ = tag;\\n      tag = this.tag = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video');\\n\\n      while (el.children.length) {\\n        tag.appendChild(el.firstChild);\\n      }\\n\\n      if (!hasClass(el, 'video-js')) {\\n        addClass(el, 'video-js');\\n      }\\n\\n      el.appendChild(tag);\\n      playerElIngest = this.playerElIngest_ = el; // move properties over from our custom `video-js` element\\n      // to our new `video` element. This will move things like\\n      // `src` or `controls` that were set via js before the player\\n      // was initialized.\\n\\n      Object.keys(el).forEach(function (k) {\\n        try {\\n          tag[k] = el[k];\\n        } catch (e) {// we got a a property like outerHTML which we can't actually copy, ignore it\\n        }\\n      });\\n    } // set tabindex to -1 to remove the video element from the focus order\\n\\n\\n    tag.setAttribute('tabindex', '-1');\\n    attrs.tabindex = '-1'; // Workaround for #4583 (JAWS+IE doesn't announce BPB or play button), and\\n    // for the same issue with Chrome (on Windows) with JAWS.\\n    // See https://github.com/FreedomScientific/VFO-standards-support/issues/78\\n    // Note that we can't detect if JAWS is being used, but this ARIA attribute\\n    //  doesn't change behavior of IE11 or Chrome if JAWS is not being used\\n\\n    if (IE_VERSION || IS_CHROME && IS_WINDOWS) {\\n      tag.setAttribute('role', 'application');\\n      attrs.role = 'application';\\n    } // Remove width/height attrs from tag so CSS can make it 100% width/height\\n\\n\\n    tag.removeAttribute('width');\\n    tag.removeAttribute('height');\\n\\n    if ('width' in attrs) {\\n      delete attrs.width;\\n    }\\n\\n    if ('height' in attrs) {\\n      delete attrs.height;\\n    }\\n\\n    Object.getOwnPropertyNames(attrs).forEach(function (attr) {\\n      // don't copy over the class attribute to the player element when we're in a div embed\\n      // the class is already set up properly in the divEmbed case\\n      // and we want to make sure that the `video-js` class doesn't get lost\\n      if (!(divEmbed && attr === 'class')) {\\n        el.setAttribute(attr, attrs[attr]);\\n      }\\n\\n      if (divEmbed) {\\n        tag.setAttribute(attr, attrs[attr]);\\n      }\\n    }); // Update tag id/class for use as HTML5 playback tech\\n    // Might think we should do this after embedding in container so .vjs-tech class\\n    // doesn't flash 100% width/height, but class only applies with .video-js parent\\n\\n    tag.playerId = tag.id;\\n    tag.id += '_html5_api';\\n    tag.className = 'vjs-tech'; // Make player findable on elements\\n\\n    tag.player = el.player = this; // Default state of video is paused\\n\\n    this.addClass('vjs-paused'); // Add a style element in the player that we'll use to set the width/height\\n    // of the player in a way that's still overrideable by CSS, just like the\\n    // video element\\n\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE !== true) {\\n      this.styleEl_ = createStyleElement('vjs-styles-dimensions');\\n      var defaultsStyleEl = $('.vjs-styles-defaults');\\n      var head = $('head');\\n      head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\\n    }\\n\\n    this.fill_ = false;\\n    this.fluid_ = false; // Pass in the width/height/aspectRatio options which will update the style el\\n\\n    this.width(this.options_.width);\\n    this.height(this.options_.height);\\n    this.fill(this.options_.fill);\\n    this.fluid(this.options_.fluid);\\n    this.aspectRatio(this.options_.aspectRatio); // support both crossOrigin and crossorigin to reduce confusion and issues around the name\\n\\n    this.crossOrigin(this.options_.crossOrigin || this.options_.crossorigin); // Hide any links within the video/audio tag,\\n    // because IE doesn't hide them completely from screen readers.\\n\\n    var links = tag.getElementsByTagName('a');\\n\\n    for (var i = 0; i < links.length; i++) {\\n      var linkEl = links.item(i);\\n      addClass(linkEl, 'vjs-hidden');\\n      linkEl.setAttribute('hidden', 'hidden');\\n    } // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\\n    // keep track of the original for later so we can know if the source originally failed\\n\\n\\n    tag.initNetworkState_ = tag.networkState; // Wrap video tag in div (el/box) container\\n\\n    if (tag.parentNode && !playerElIngest) {\\n      tag.parentNode.insertBefore(el, tag);\\n    } // insert the tag as the first child of the player element\\n    // then manually add it to the children array so that this.addChild\\n    // will work properly for other components\\n    //\\n    // Breaks iPhone, fixed in HTML5 setup.\\n\\n\\n    prependTo(tag, el);\\n    this.children_.unshift(tag); // Set lang attr on player to ensure CSS :lang() in consistent with player\\n    // if it's been set to something different to the doc\\n\\n    this.el_.setAttribute('lang', this.language_);\\n    this.el_ = el;\\n    return el;\\n  }\\n  /**\\n   * Get or set the `Player`'s crossOrigin option. For the HTML5 player, this\\n   * sets the `crossOrigin` property on the `<video>` tag to control the CORS\\n   * behavior.\\n   *\\n   * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\\n   *\\n   * @param {string} [value]\\n   *        The value to set the `Player`'s crossOrigin to. If an argument is\\n   *        given, must be one of `anonymous` or `use-credentials`.\\n   *\\n   * @return {string|undefined}\\n   *         - The current crossOrigin value of the `Player` when getting.\\n   *         - undefined when setting\\n   */\\n  ;\\n\\n  _proto.crossOrigin = function crossOrigin(value) {\\n    if (!value) {\\n      return this.techGet_('crossOrigin');\\n    }\\n\\n    if (value !== 'anonymous' && value !== 'use-credentials') {\\n      log.warn(\\\"crossOrigin must be \\\\\\\"anonymous\\\\\\\" or \\\\\\\"use-credentials\\\\\\\", given \\\\\\\"\\\" + value + \\\"\\\\\\\"\\\");\\n      return;\\n    }\\n\\n    this.techCall_('setCrossOrigin', value);\\n    return;\\n  }\\n  /**\\n   * A getter/setter for the `Player`'s width. Returns the player's configured value.\\n   * To get the current width use `currentWidth()`.\\n   *\\n   * @param {number} [value]\\n   *        The value to set the `Player`'s width to.\\n   *\\n   * @return {number}\\n   *         The current width of the `Player` when getting.\\n   */\\n  ;\\n\\n  _proto.width = function width(value) {\\n    return this.dimension('width', value);\\n  }\\n  /**\\n   * A getter/setter for the `Player`'s height. Returns the player's configured value.\\n   * To get the current height use `currentheight()`.\\n   *\\n   * @param {number} [value]\\n   *        The value to set the `Player`'s heigth to.\\n   *\\n   * @return {number}\\n   *         The current height of the `Player` when getting.\\n   */\\n  ;\\n\\n  _proto.height = function height(value) {\\n    return this.dimension('height', value);\\n  }\\n  /**\\n   * A getter/setter for the `Player`'s width & height.\\n   *\\n   * @param {string} dimension\\n   *        This string can be:\\n   *        - 'width'\\n   *        - 'height'\\n   *\\n   * @param {number} [value]\\n   *        Value for dimension specified in the first argument.\\n   *\\n   * @return {number}\\n   *         The dimension arguments value when getting (width/height).\\n   */\\n  ;\\n\\n  _proto.dimension = function dimension(_dimension, value) {\\n    var privDimension = _dimension + '_';\\n\\n    if (value === undefined) {\\n      return this[privDimension] || 0;\\n    }\\n\\n    if (value === '' || value === 'auto') {\\n      // If an empty string is given, reset the dimension to be automatic\\n      this[privDimension] = undefined;\\n      this.updateStyleEl_();\\n      return;\\n    }\\n\\n    var parsedVal = parseFloat(value);\\n\\n    if (isNaN(parsedVal)) {\\n      log.error(\\\"Improper value \\\\\\\"\\\" + value + \\\"\\\\\\\" supplied for for \\\" + _dimension);\\n      return;\\n    }\\n\\n    this[privDimension] = parsedVal;\\n    this.updateStyleEl_();\\n  }\\n  /**\\n   * A getter/setter/toggler for the vjs-fluid `className` on the `Player`.\\n   *\\n   * Turning this on will turn off fill mode.\\n   *\\n   * @param {boolean} [bool]\\n   *        - A value of true adds the class.\\n   *        - A value of false removes the class.\\n   *        - No value will be a getter.\\n   *\\n   * @return {boolean|undefined}\\n   *         - The value of fluid when getting.\\n   *         - `undefined` when setting.\\n   */\\n  ;\\n\\n  _proto.fluid = function fluid(bool) {\\n    if (bool === undefined) {\\n      return !!this.fluid_;\\n    }\\n\\n    this.fluid_ = !!bool;\\n\\n    if (isEvented(this)) {\\n      this.off('playerreset', this.updateStyleEl_);\\n    }\\n\\n    if (bool) {\\n      this.addClass('vjs-fluid');\\n      this.fill(false);\\n      addEventedCallback(function () {\\n        this.on('playerreset', this.updateStyleEl_);\\n      });\\n    } else {\\n      this.removeClass('vjs-fluid');\\n    }\\n\\n    this.updateStyleEl_();\\n  }\\n  /**\\n   * A getter/setter/toggler for the vjs-fill `className` on the `Player`.\\n   *\\n   * Turning this on will turn off fluid mode.\\n   *\\n   * @param {boolean} [bool]\\n   *        - A value of true adds the class.\\n   *        - A value of false removes the class.\\n   *        - No value will be a getter.\\n   *\\n   * @return {boolean|undefined}\\n   *         - The value of fluid when getting.\\n   *         - `undefined` when setting.\\n   */\\n  ;\\n\\n  _proto.fill = function fill(bool) {\\n    if (bool === undefined) {\\n      return !!this.fill_;\\n    }\\n\\n    this.fill_ = !!bool;\\n\\n    if (bool) {\\n      this.addClass('vjs-fill');\\n      this.fluid(false);\\n    } else {\\n      this.removeClass('vjs-fill');\\n    }\\n  }\\n  /**\\n   * Get/Set the aspect ratio\\n   *\\n   * @param {string} [ratio]\\n   *        Aspect ratio for player\\n   *\\n   * @return {string|undefined}\\n   *         returns the current aspect ratio when getting\\n   */\\n\\n  /**\\n   * A getter/setter for the `Player`'s aspect ratio.\\n   *\\n   * @param {string} [ratio]\\n   *        The value to set the `Player`'s aspect ratio to.\\n   *\\n   * @return {string|undefined}\\n   *         - The current aspect ratio of the `Player` when getting.\\n   *         - undefined when setting\\n   */\\n  ;\\n\\n  _proto.aspectRatio = function aspectRatio(ratio) {\\n    if (ratio === undefined) {\\n      return this.aspectRatio_;\\n    } // Check for width:height format\\n\\n\\n    if (!/^\\\\d+\\\\:\\\\d+$/.test(ratio)) {\\n      throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\\n    }\\n\\n    this.aspectRatio_ = ratio; // We're assuming if you set an aspect ratio you want fluid mode,\\n    // because in fixed mode you could calculate width and height yourself.\\n\\n    this.fluid(true);\\n    this.updateStyleEl_();\\n  }\\n  /**\\n   * Update styles of the `Player` element (height, width and aspect ratio).\\n   *\\n   * @private\\n   * @listens Tech#loadedmetadata\\n   */\\n  ;\\n\\n  _proto.updateStyleEl_ = function updateStyleEl_() {\\n    if (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE === true) {\\n      var _width = typeof this.width_ === 'number' ? this.width_ : this.options_.width;\\n\\n      var _height = typeof this.height_ === 'number' ? this.height_ : this.options_.height;\\n\\n      var techEl = this.tech_ && this.tech_.el();\\n\\n      if (techEl) {\\n        if (_width >= 0) {\\n          techEl.width = _width;\\n        }\\n\\n        if (_height >= 0) {\\n          techEl.height = _height;\\n        }\\n      }\\n\\n      return;\\n    }\\n\\n    var width;\\n    var height;\\n    var aspectRatio;\\n    var idClass; // The aspect ratio is either used directly or to calculate width and height.\\n\\n    if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\\n      // Use any aspectRatio that's been specifically set\\n      aspectRatio = this.aspectRatio_;\\n    } else if (this.videoWidth() > 0) {\\n      // Otherwise try to get the aspect ratio from the video metadata\\n      aspectRatio = this.videoWidth() + ':' + this.videoHeight();\\n    } else {\\n      // Or use a default. The video element's is 2:1, but 16:9 is more common.\\n      aspectRatio = '16:9';\\n    } // Get the ratio as a decimal we can use to calculate dimensions\\n\\n\\n    var ratioParts = aspectRatio.split(':');\\n    var ratioMultiplier = ratioParts[1] / ratioParts[0];\\n\\n    if (this.width_ !== undefined) {\\n      // Use any width that's been specifically set\\n      width = this.width_;\\n    } else if (this.height_ !== undefined) {\\n      // Or calulate the width from the aspect ratio if a height has been set\\n      width = this.height_ / ratioMultiplier;\\n    } else {\\n      // Or use the video's metadata, or use the video el's default of 300\\n      width = this.videoWidth() || 300;\\n    }\\n\\n    if (this.height_ !== undefined) {\\n      // Use any height that's been specifically set\\n      height = this.height_;\\n    } else {\\n      // Otherwise calculate the height from the ratio and the width\\n      height = width * ratioMultiplier;\\n    } // Ensure the CSS class is valid by starting with an alpha character\\n\\n\\n    if (/^[^a-zA-Z]/.test(this.id())) {\\n      idClass = 'dimensions-' + this.id();\\n    } else {\\n      idClass = this.id() + '-dimensions';\\n    } // Ensure the right class is still on the player for the style element\\n\\n\\n    this.addClass(idClass);\\n    setTextContent(this.styleEl_, \\\"\\\\n      .\\\" + idClass + \\\" {\\\\n        width: \\\" + width + \\\"px;\\\\n        height: \\\" + height + \\\"px;\\\\n      }\\\\n\\\\n      .\\\" + idClass + \\\".vjs-fluid {\\\\n        padding-top: \\\" + ratioMultiplier * 100 + \\\"%;\\\\n      }\\\\n    \\\");\\n  }\\n  /**\\n   * Load/Create an instance of playback {@link Tech} including element\\n   * and API methods. Then append the `Tech` element in `Player` as a child.\\n   *\\n   * @param {string} techName\\n   *        name of the playback technology\\n   *\\n   * @param {string} source\\n   *        video source\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.loadTech_ = function loadTech_(techName, source) {\\n    var _this3 = this;\\n\\n    // Pause and remove current playback technology\\n    if (this.tech_) {\\n      this.unloadTech_();\\n    }\\n\\n    var titleTechName = toTitleCase(techName);\\n    var camelTechName = techName.charAt(0).toLowerCase() + techName.slice(1); // get rid of the HTML5 video tag as soon as we are using another tech\\n\\n    if (titleTechName !== 'Html5' && this.tag) {\\n      Tech.getTech('Html5').disposeMediaElement(this.tag);\\n      this.tag.player = null;\\n      this.tag = null;\\n    }\\n\\n    this.techName_ = titleTechName; // Turn off API access because we're loading a new tech that might load asynchronously\\n\\n    this.isReady_ = false; // if autoplay is a string we pass false to the tech\\n    // because the player is going to handle autoplay on `loadstart`\\n\\n    var autoplay = typeof this.autoplay() === 'string' ? false : this.autoplay(); // Grab tech-specific options from player options and add source and parent element to use.\\n\\n    var techOptions = {\\n      source: source,\\n      autoplay: autoplay,\\n      'nativeControlsForTouch': this.options_.nativeControlsForTouch,\\n      'playerId': this.id(),\\n      'techId': this.id() + \\\"_\\\" + camelTechName + \\\"_api\\\",\\n      'playsinline': this.options_.playsinline,\\n      'preload': this.options_.preload,\\n      'loop': this.options_.loop,\\n      'muted': this.options_.muted,\\n      'poster': this.poster(),\\n      'language': this.language(),\\n      'playerElIngest': this.playerElIngest_ || false,\\n      'vtt.js': this.options_['vtt.js'],\\n      'canOverridePoster': !!this.options_.techCanOverridePoster,\\n      'enableSourceset': this.options_.enableSourceset,\\n      'Promise': this.options_.Promise\\n    };\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n      techOptions[props.getterName] = _this3[props.privateName];\\n    });\\n    assign(techOptions, this.options_[titleTechName]);\\n    assign(techOptions, this.options_[camelTechName]);\\n    assign(techOptions, this.options_[techName.toLowerCase()]);\\n\\n    if (this.tag) {\\n      techOptions.tag = this.tag;\\n    }\\n\\n    if (source && source.src === this.cache_.src && this.cache_.currentTime > 0) {\\n      techOptions.startTime = this.cache_.currentTime;\\n    } // Initialize tech instance\\n\\n\\n    var TechClass = Tech.getTech(techName);\\n\\n    if (!TechClass) {\\n      throw new Error(\\\"No Tech named '\\\" + titleTechName + \\\"' exists! '\\\" + titleTechName + \\\"' should be registered using videojs.registerTech()'\\\");\\n    }\\n\\n    this.tech_ = new TechClass(techOptions); // player.triggerReady is always async, so don't need this to be async\\n\\n    this.tech_.ready(bind(this, this.handleTechReady_), true);\\n    textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_); // Listen to all HTML5-defined events and trigger them on the player\\n\\n    TECH_EVENTS_RETRIGGER.forEach(function (event) {\\n      _this3.on(_this3.tech_, event, _this3[\\\"handleTech\\\" + toTitleCase(event) + \\\"_\\\"]);\\n    });\\n    Object.keys(TECH_EVENTS_QUEUE).forEach(function (event) {\\n      _this3.on(_this3.tech_, event, function (eventObj) {\\n        if (_this3.tech_.playbackRate() === 0 && _this3.tech_.seeking()) {\\n          _this3.queuedCallbacks_.push({\\n            callback: _this3[\\\"handleTech\\\" + TECH_EVENTS_QUEUE[event] + \\\"_\\\"].bind(_this3),\\n            event: eventObj\\n          });\\n\\n          return;\\n        }\\n\\n        _this3[\\\"handleTech\\\" + TECH_EVENTS_QUEUE[event] + \\\"_\\\"](eventObj);\\n      });\\n    });\\n    this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\\n    this.on(this.tech_, 'sourceset', this.handleTechSourceset_);\\n    this.on(this.tech_, 'waiting', this.handleTechWaiting_);\\n    this.on(this.tech_, 'ended', this.handleTechEnded_);\\n    this.on(this.tech_, 'seeking', this.handleTechSeeking_);\\n    this.on(this.tech_, 'play', this.handleTechPlay_);\\n    this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\\n    this.on(this.tech_, 'pause', this.handleTechPause_);\\n    this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\\n    this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\\n    this.on(this.tech_, 'fullscreenerror', this.handleTechFullscreenError_);\\n    this.on(this.tech_, 'enterpictureinpicture', this.handleTechEnterPictureInPicture_);\\n    this.on(this.tech_, 'leavepictureinpicture', this.handleTechLeavePictureInPicture_);\\n    this.on(this.tech_, 'error', this.handleTechError_);\\n    this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\\n    this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\\n    this.on(this.tech_, 'textdata', this.handleTechTextData_);\\n    this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\\n    this.usingNativeControls(this.techGet_('controls'));\\n\\n    if (this.controls() && !this.usingNativeControls()) {\\n      this.addTechControlsListeners_();\\n    } // Add the tech element in the DOM if it was not already there\\n    // Make sure to not insert the original video element if using Html5\\n\\n\\n    if (this.tech_.el().parentNode !== this.el() && (titleTechName !== 'Html5' || !this.tag)) {\\n      prependTo(this.tech_.el(), this.el());\\n    } // Get rid of the original video tag reference after the first tech is loaded\\n\\n\\n    if (this.tag) {\\n      this.tag.player = null;\\n      this.tag = null;\\n    }\\n  }\\n  /**\\n   * Unload and dispose of the current playback {@link Tech}.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.unloadTech_ = function unloadTech_() {\\n    var _this4 = this;\\n\\n    // Save the current text tracks so that we can reuse the same text tracks with the next tech\\n    ALL.names.forEach(function (name) {\\n      var props = ALL[name];\\n      _this4[props.privateName] = _this4[props.getterName]();\\n    });\\n    this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\\n    this.isReady_ = false;\\n    this.tech_.dispose();\\n    this.tech_ = false;\\n\\n    if (this.isPosterFromTech_) {\\n      this.poster_ = '';\\n      this.trigger('posterchange');\\n    }\\n\\n    this.isPosterFromTech_ = false;\\n  }\\n  /**\\n   * Return a reference to the current {@link Tech}.\\n   * It will print a warning by default about the danger of using the tech directly\\n   * but any argument that is passed in will silence the warning.\\n   *\\n   * @param {*} [safety]\\n   *        Anything passed in to silence the warning\\n   *\\n   * @return {Tech}\\n   *         The Tech\\n   */\\n  ;\\n\\n  _proto.tech = function tech(safety) {\\n    if (safety === undefined) {\\n      log.warn('Using the tech directly can be dangerous. I hope you know what you\\\\'re doing.\\\\n' + 'See https://github.com/videojs/video.js/issues/2617 for more info.\\\\n');\\n    }\\n\\n    return this.tech_;\\n  }\\n  /**\\n   * Set up click and touch listeners for the playback element\\n   *\\n   * - On desktops: a click on the video itself will toggle playback\\n   * - On mobile devices: a click on the video toggles controls\\n   *   which is done by toggling the user state between active and\\n   *   inactive\\n   * - A tap can signal that a user has become active or has become inactive\\n   *   e.g. a quick tap on an iPhone movie should reveal the controls. Another\\n   *   quick tap should hide them again (signaling the user is in an inactive\\n   *   viewing state)\\n   * - In addition to this, we still want the user to be considered inactive after\\n   *   a few seconds of inactivity.\\n   *\\n   * > Note: the only part of iOS interaction we can't mimic with this setup\\n   * is a touch and hold on the video element counting as activity in order to\\n   * keep the controls showing, but that shouldn't be an issue. A touch and hold\\n   * on any controls will still keep the user active\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.addTechControlsListeners_ = function addTechControlsListeners_() {\\n    // Make sure to remove all the previous listeners in case we are called multiple times.\\n    this.removeTechControlsListeners_(); // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\\n    // trigger mousedown/up.\\n    // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\\n    // Any touch events are set to block the mousedown event from happening\\n\\n    this.on(this.tech_, 'mouseup', this.handleTechClick_);\\n    this.on(this.tech_, 'dblclick', this.handleTechDoubleClick_); // If the controls were hidden we don't want that to change without a tap event\\n    // so we'll check if the controls were already showing before reporting user\\n    // activity\\n\\n    this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\\n    this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\\n    this.on(this.tech_, 'touchend', this.handleTechTouchEnd_); // The tap listener needs to come after the touchend listener because the tap\\n    // listener cancels out any reportedUserActivity when setting userActive(false)\\n\\n    this.on(this.tech_, 'tap', this.handleTechTap_);\\n  }\\n  /**\\n   * Remove the listeners used for click and tap controls. This is needed for\\n   * toggling to controls disabled, where a tap/touch should do nothing.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.removeTechControlsListeners_ = function removeTechControlsListeners_() {\\n    // We don't want to just use `this.off()` because there might be other needed\\n    // listeners added by techs that extend this.\\n    this.off(this.tech_, 'tap', this.handleTechTap_);\\n    this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\\n    this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\\n    this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\\n    this.off(this.tech_, 'mouseup', this.handleTechClick_);\\n    this.off(this.tech_, 'dblclick', this.handleTechDoubleClick_);\\n  }\\n  /**\\n   * Player waits for the tech to be ready\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechReady_ = function handleTechReady_() {\\n    this.triggerReady(); // Keep the same volume as before\\n\\n    if (this.cache_.volume) {\\n      this.techCall_('setVolume', this.cache_.volume);\\n    } // Look if the tech found a higher resolution poster while loading\\n\\n\\n    this.handleTechPosterChange_(); // Update the duration if available\\n\\n    this.handleTechDurationChange_();\\n  }\\n  /**\\n   * Retrigger the `loadstart` event that was triggered by the {@link Tech}. This\\n   * function will also trigger {@link Player#firstplay} if it is the first loadstart\\n   * for a video.\\n   *\\n   * @fires Player#loadstart\\n   * @fires Player#firstplay\\n   * @listens Tech#loadstart\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechLoadStart_ = function handleTechLoadStart_() {\\n    // TODO: Update to use `emptied` event instead. See #1277.\\n    this.removeClass('vjs-ended');\\n    this.removeClass('vjs-seeking'); // reset the error state\\n\\n    this.error(null); // Update the duration\\n\\n    this.handleTechDurationChange_(); // If it's already playing we want to trigger a firstplay event now.\\n    // The firstplay event relies on both the play and loadstart events\\n    // which can happen in any order for a new source\\n\\n    if (!this.paused()) {\\n      /**\\n       * Fired when the user agent begins looking for media data\\n       *\\n       * @event Player#loadstart\\n       * @type {EventTarget~Event}\\n       */\\n      this.trigger('loadstart');\\n      this.trigger('firstplay');\\n    } else {\\n      // reset the hasStarted state\\n      this.hasStarted(false);\\n      this.trigger('loadstart');\\n    } // autoplay happens after loadstart for the browser,\\n    // so we mimic that behavior\\n\\n\\n    this.manualAutoplay_(this.autoplay());\\n  }\\n  /**\\n   * Handle autoplay string values, rather than the typical boolean\\n   * values that should be handled by the tech. Note that this is not\\n   * part of any specification. Valid values and what they do can be\\n   * found on the autoplay getter at Player#autoplay()\\n   */\\n  ;\\n\\n  _proto.manualAutoplay_ = function manualAutoplay_(type) {\\n    var _this5 = this;\\n\\n    if (!this.tech_ || typeof type !== 'string') {\\n      return;\\n    }\\n\\n    var muted = function muted() {\\n      var previouslyMuted = _this5.muted();\\n\\n      _this5.muted(true);\\n\\n      var restoreMuted = function restoreMuted() {\\n        _this5.muted(previouslyMuted);\\n      }; // restore muted on play terminatation\\n\\n\\n      _this5.playTerminatedQueue_.push(restoreMuted);\\n\\n      var mutedPromise = _this5.play();\\n\\n      if (!isPromise(mutedPromise)) {\\n        return;\\n      }\\n\\n      return mutedPromise[\\\"catch\\\"](restoreMuted);\\n    };\\n\\n    var promise; // if muted defaults to true\\n    // the only thing we can do is call play\\n\\n    if (type === 'any' && this.muted() !== true) {\\n      promise = this.play();\\n\\n      if (isPromise(promise)) {\\n        promise = promise[\\\"catch\\\"](muted);\\n      }\\n    } else if (type === 'muted' && this.muted() !== true) {\\n      promise = muted();\\n    } else {\\n      promise = this.play();\\n    }\\n\\n    if (!isPromise(promise)) {\\n      return;\\n    }\\n\\n    return promise.then(function () {\\n      _this5.trigger({\\n        type: 'autoplay-success',\\n        autoplay: type\\n      });\\n    })[\\\"catch\\\"](function (e) {\\n      _this5.trigger({\\n        type: 'autoplay-failure',\\n        autoplay: type\\n      });\\n    });\\n  }\\n  /**\\n   * Update the internal source caches so that we return the correct source from\\n   * `src()`, `currentSource()`, and `currentSources()`.\\n   *\\n   * > Note: `currentSources` will not be updated if the source that is passed in exists\\n   *         in the current `currentSources` cache.\\n   *\\n   *\\n   * @param {Tech~SourceObject} srcObj\\n   *        A string or object source to update our caches to.\\n   */\\n  ;\\n\\n  _proto.updateSourceCaches_ = function updateSourceCaches_(srcObj) {\\n    if (srcObj === void 0) {\\n      srcObj = '';\\n    }\\n\\n    var src = srcObj;\\n    var type = '';\\n\\n    if (typeof src !== 'string') {\\n      src = srcObj.src;\\n      type = srcObj.type;\\n    } // make sure all the caches are set to default values\\n    // to prevent null checking\\n\\n\\n    this.cache_.source = this.cache_.source || {};\\n    this.cache_.sources = this.cache_.sources || []; // try to get the type of the src that was passed in\\n\\n    if (src && !type) {\\n      type = findMimetype(this, src);\\n    } // update `currentSource` cache always\\n\\n\\n    this.cache_.source = mergeOptions({}, srcObj, {\\n      src: src,\\n      type: type\\n    });\\n    var matchingSources = this.cache_.sources.filter(function (s) {\\n      return s.src && s.src === src;\\n    });\\n    var sourceElSources = [];\\n    var sourceEls = this.$$('source');\\n    var matchingSourceEls = [];\\n\\n    for (var i = 0; i < sourceEls.length; i++) {\\n      var sourceObj = getAttributes(sourceEls[i]);\\n      sourceElSources.push(sourceObj);\\n\\n      if (sourceObj.src && sourceObj.src === src) {\\n        matchingSourceEls.push(sourceObj.src);\\n      }\\n    } // if we have matching source els but not matching sources\\n    // the current source cache is not up to date\\n\\n\\n    if (matchingSourceEls.length && !matchingSources.length) {\\n      this.cache_.sources = sourceElSources; // if we don't have matching source or source els set the\\n      // sources cache to the `currentSource` cache\\n    } else if (!matchingSources.length) {\\n      this.cache_.sources = [this.cache_.source];\\n    } // update the tech `src` cache\\n\\n\\n    this.cache_.src = src;\\n  }\\n  /**\\n   * *EXPERIMENTAL* Fired when the source is set or changed on the {@link Tech}\\n   * causing the media element to reload.\\n   *\\n   * It will fire for the initial source and each subsequent source.\\n   * This event is a custom event from Video.js and is triggered by the {@link Tech}.\\n   *\\n   * The event object for this event contains a `src` property that will contain the source\\n   * that was available when the event was triggered. This is generally only necessary if Video.js\\n   * is switching techs while the source was being changed.\\n   *\\n   * It is also fired when `load` is called on the player (or media element)\\n   * because the {@link https://html.spec.whatwg.org/multipage/media.html#dom-media-load|specification for `load`}\\n   * says that the resource selection algorithm needs to be aborted and restarted.\\n   * In this case, it is very likely that the `src` property will be set to the\\n   * empty string `\\\"\\\"` to indicate we do not know what the source will be but\\n   * that it is changing.\\n   *\\n   * *This event is currently still experimental and may change in minor releases.*\\n   * __To use this, pass `enableSourceset` option to the player.__\\n   *\\n   * @event Player#sourceset\\n   * @type {EventTarget~Event}\\n   * @prop {string} src\\n   *                The source url available when the `sourceset` was triggered.\\n   *                It will be an empty string if we cannot know what the source is\\n   *                but know that the source will change.\\n   */\\n\\n  /**\\n   * Retrigger the `sourceset` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#sourceset\\n   * @listens Tech#sourceset\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechSourceset_ = function handleTechSourceset_(event) {\\n    var _this6 = this;\\n\\n    // only update the source cache when the source\\n    // was not updated using the player api\\n    if (!this.changingSrc_) {\\n      var updateSourceCaches = function updateSourceCaches(src) {\\n        return _this6.updateSourceCaches_(src);\\n      };\\n\\n      var playerSrc = this.currentSource().src;\\n      var eventSrc = event.src; // if we have a playerSrc that is not a blob, and a tech src that is a blob\\n\\n      if (playerSrc && !/^blob:/.test(playerSrc) && /^blob:/.test(eventSrc)) {\\n        // if both the tech source and the player source were updated we assume\\n        // something like @videojs/http-streaming did the sourceset and skip updating the source cache.\\n        if (!this.lastSource_ || this.lastSource_.tech !== eventSrc && this.lastSource_.player !== playerSrc) {\\n          updateSourceCaches = function updateSourceCaches() {};\\n        }\\n      } // update the source to the intial source right away\\n      // in some cases this will be empty string\\n\\n\\n      updateSourceCaches(eventSrc); // if the `sourceset` `src` was an empty string\\n      // wait for a `loadstart` to update the cache to `currentSrc`.\\n      // If a sourceset happens before a `loadstart`, we reset the state\\n\\n      if (!event.src) {\\n        this.tech_.any(['sourceset', 'loadstart'], function (e) {\\n          // if a sourceset happens before a `loadstart` there\\n          // is nothing to do as this `handleTechSourceset_`\\n          // will be called again and this will be handled there.\\n          if (e.type === 'sourceset') {\\n            return;\\n          }\\n\\n          var techSrc = _this6.techGet('currentSrc');\\n\\n          _this6.lastSource_.tech = techSrc;\\n\\n          _this6.updateSourceCaches_(techSrc);\\n        });\\n      }\\n    }\\n\\n    this.lastSource_ = {\\n      player: this.currentSource().src,\\n      tech: event.src\\n    };\\n    this.trigger({\\n      src: event.src,\\n      type: 'sourceset'\\n    });\\n  }\\n  /**\\n   * Add/remove the vjs-has-started class\\n   *\\n   * @fires Player#firstplay\\n   *\\n   * @param {boolean} request\\n   *        - true: adds the class\\n   *        - false: remove the class\\n   *\\n   * @return {boolean}\\n   *         the boolean value of hasStarted_\\n   */\\n  ;\\n\\n  _proto.hasStarted = function hasStarted(request) {\\n    if (request === undefined) {\\n      // act as getter, if we have no request to change\\n      return this.hasStarted_;\\n    }\\n\\n    if (request === this.hasStarted_) {\\n      return;\\n    }\\n\\n    this.hasStarted_ = request;\\n\\n    if (this.hasStarted_) {\\n      this.addClass('vjs-has-started');\\n      this.trigger('firstplay');\\n    } else {\\n      this.removeClass('vjs-has-started');\\n    }\\n  }\\n  /**\\n   * Fired whenever the media begins or resumes playback\\n   *\\n   * @see [Spec]{@link https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play}\\n   * @fires Player#play\\n   * @listens Tech#play\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPlay_ = function handleTechPlay_() {\\n    this.removeClass('vjs-ended');\\n    this.removeClass('vjs-paused');\\n    this.addClass('vjs-playing'); // hide the poster when the user hits play\\n\\n    this.hasStarted(true);\\n    /**\\n     * Triggered whenever an {@link Tech#play} event happens. Indicates that\\n     * playback has started or resumed.\\n     *\\n     * @event Player#play\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('play');\\n  }\\n  /**\\n   * Retrigger the `ratechange` event that was triggered by the {@link Tech}.\\n   *\\n   * If there were any events queued while the playback rate was zero, fire\\n   * those events now.\\n   *\\n   * @private\\n   * @method Player#handleTechRateChange_\\n   * @fires Player#ratechange\\n   * @listens Tech#ratechange\\n   */\\n  ;\\n\\n  _proto.handleTechRateChange_ = function handleTechRateChange_() {\\n    if (this.tech_.playbackRate() > 0 && this.cache_.lastPlaybackRate === 0) {\\n      this.queuedCallbacks_.forEach(function (queued) {\\n        return queued.callback(queued.event);\\n      });\\n      this.queuedCallbacks_ = [];\\n    }\\n\\n    this.cache_.lastPlaybackRate = this.tech_.playbackRate();\\n    /**\\n     * Fires when the playing speed of the audio/video is changed\\n     *\\n     * @event Player#ratechange\\n     * @type {event}\\n     */\\n\\n    this.trigger('ratechange');\\n  }\\n  /**\\n   * Retrigger the `waiting` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#waiting\\n   * @listens Tech#waiting\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechWaiting_ = function handleTechWaiting_() {\\n    var _this7 = this;\\n\\n    this.addClass('vjs-waiting');\\n    /**\\n     * A readyState change on the DOM element has caused playback to stop.\\n     *\\n     * @event Player#waiting\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('waiting'); // Browsers may emit a timeupdate event after a waiting event. In order to prevent\\n    // premature removal of the waiting class, wait for the time to change.\\n\\n    var timeWhenWaiting = this.currentTime();\\n\\n    var timeUpdateListener = function timeUpdateListener() {\\n      if (timeWhenWaiting !== _this7.currentTime()) {\\n        _this7.removeClass('vjs-waiting');\\n\\n        _this7.off('timeupdate', timeUpdateListener);\\n      }\\n    };\\n\\n    this.on('timeupdate', timeUpdateListener);\\n  }\\n  /**\\n   * Retrigger the `canplay` event that was triggered by the {@link Tech}.\\n   * > Note: This is not consistent between browsers. See #1351\\n   *\\n   * @fires Player#canplay\\n   * @listens Tech#canplay\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechCanPlay_ = function handleTechCanPlay_() {\\n    this.removeClass('vjs-waiting');\\n    /**\\n     * The media has a readyState of HAVE_FUTURE_DATA or greater.\\n     *\\n     * @event Player#canplay\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('canplay');\\n  }\\n  /**\\n   * Retrigger the `canplaythrough` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#canplaythrough\\n   * @listens Tech#canplaythrough\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechCanPlayThrough_ = function handleTechCanPlayThrough_() {\\n    this.removeClass('vjs-waiting');\\n    /**\\n     * The media has a readyState of HAVE_ENOUGH_DATA or greater. This means that the\\n     * entire media file can be played without buffering.\\n     *\\n     * @event Player#canplaythrough\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('canplaythrough');\\n  }\\n  /**\\n   * Retrigger the `playing` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#playing\\n   * @listens Tech#playing\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPlaying_ = function handleTechPlaying_() {\\n    this.removeClass('vjs-waiting');\\n    /**\\n     * The media is no longer blocked from playback, and has started playing.\\n     *\\n     * @event Player#playing\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('playing');\\n  }\\n  /**\\n   * Retrigger the `seeking` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#seeking\\n   * @listens Tech#seeking\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechSeeking_ = function handleTechSeeking_() {\\n    this.addClass('vjs-seeking');\\n    /**\\n     * Fired whenever the player is jumping to a new time\\n     *\\n     * @event Player#seeking\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('seeking');\\n  }\\n  /**\\n   * Retrigger the `seeked` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#seeked\\n   * @listens Tech#seeked\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechSeeked_ = function handleTechSeeked_() {\\n    this.removeClass('vjs-seeking');\\n    this.removeClass('vjs-ended');\\n    /**\\n     * Fired when the player has finished jumping to a new time\\n     *\\n     * @event Player#seeked\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('seeked');\\n  }\\n  /**\\n   * Retrigger the `firstplay` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#firstplay\\n   * @listens Tech#firstplay\\n   * @deprecated As of 6.0 firstplay event is deprecated.\\n   *             As of 6.0 passing the `starttime` option to the player and the firstplay event are deprecated.\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechFirstPlay_ = function handleTechFirstPlay_() {\\n    // If the first starttime attribute is specified\\n    // then we will start at the given offset in seconds\\n    if (this.options_.starttime) {\\n      log.warn('Passing the `starttime` option to the player will be deprecated in 6.0');\\n      this.currentTime(this.options_.starttime);\\n    }\\n\\n    this.addClass('vjs-has-started');\\n    /**\\n     * Fired the first time a video is played. Not part of the HLS spec, and this is\\n     * probably not the best implementation yet, so use sparingly. If you don't have a\\n     * reason to prevent playback, use `myPlayer.one('play');` instead.\\n     *\\n     * @event Player#firstplay\\n     * @deprecated As of 6.0 firstplay event is deprecated.\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('firstplay');\\n  }\\n  /**\\n   * Retrigger the `pause` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#pause\\n   * @listens Tech#pause\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPause_ = function handleTechPause_() {\\n    this.removeClass('vjs-playing');\\n    this.addClass('vjs-paused');\\n    /**\\n     * Fired whenever the media has been paused\\n     *\\n     * @event Player#pause\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('pause');\\n  }\\n  /**\\n   * Retrigger the `ended` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#ended\\n   * @listens Tech#ended\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechEnded_ = function handleTechEnded_() {\\n    this.addClass('vjs-ended');\\n\\n    if (this.options_.loop) {\\n      this.currentTime(0);\\n      this.play();\\n    } else if (!this.paused()) {\\n      this.pause();\\n    }\\n    /**\\n     * Fired when the end of the media resource is reached (currentTime == duration)\\n     *\\n     * @event Player#ended\\n     * @type {EventTarget~Event}\\n     */\\n\\n\\n    this.trigger('ended');\\n  }\\n  /**\\n   * Fired when the duration of the media resource is first known or changed\\n   *\\n   * @listens Tech#durationchange\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechDurationChange_ = function handleTechDurationChange_() {\\n    this.duration(this.techGet_('duration'));\\n  }\\n  /**\\n   * Handle a click on the media element to play/pause\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the event that caused this function to trigger\\n   *\\n   * @listens Tech#mouseup\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechClick_ = function handleTechClick_(event) {\\n    if (!isSingleLeftClick(event)) {\\n      return;\\n    } // When controls are disabled a click should not toggle playback because\\n    // the click is considered a control\\n\\n\\n    if (!this.controls_) {\\n      return;\\n    }\\n\\n    if (this.paused()) {\\n      silencePromise(this.play());\\n    } else {\\n      this.pause();\\n    }\\n  }\\n  /**\\n   * Handle a double-click on the media element to enter/exit fullscreen\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the event that caused this function to trigger\\n   *\\n   * @listens Tech#dblclick\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechDoubleClick_ = function handleTechDoubleClick_(event) {\\n    if (!this.controls_) {\\n      return;\\n    } // we do not want to toggle fullscreen state\\n    // when double-clicking inside a control bar or a modal\\n\\n\\n    var inAllowedEls = Array.prototype.some.call(this.$$('.vjs-control-bar, .vjs-modal-dialog'), function (el) {\\n      return el.contains(event.target);\\n    });\\n\\n    if (!inAllowedEls) {\\n      /*\\n       * options.userActions.doubleClick\\n       *\\n       * If `undefined` or `true`, double-click toggles fullscreen if controls are present\\n       * Set to `false` to disable double-click handling\\n       * Set to a function to substitute an external double-click handler\\n       */\\n      if (this.options_ === undefined || this.options_.userActions === undefined || this.options_.userActions.doubleClick === undefined || this.options_.userActions.doubleClick !== false) {\\n        if (this.options_ !== undefined && this.options_.userActions !== undefined && typeof this.options_.userActions.doubleClick === 'function') {\\n          this.options_.userActions.doubleClick.call(this, event);\\n        } else if (this.isFullscreen()) {\\n          this.exitFullscreen();\\n        } else {\\n          this.requestFullscreen();\\n        }\\n      }\\n    }\\n  }\\n  /**\\n   * Handle a tap on the media element. It will toggle the user\\n   * activity state, which hides and shows the controls.\\n   *\\n   * @listens Tech#tap\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTap_ = function handleTechTap_() {\\n    this.userActive(!this.userActive());\\n  }\\n  /**\\n   * Handle touch to start\\n   *\\n   * @listens Tech#touchstart\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTouchStart_ = function handleTechTouchStart_() {\\n    this.userWasActive = this.userActive();\\n  }\\n  /**\\n   * Handle touch to move\\n   *\\n   * @listens Tech#touchmove\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTouchMove_ = function handleTechTouchMove_() {\\n    if (this.userWasActive) {\\n      this.reportUserActivity();\\n    }\\n  }\\n  /**\\n   * Handle touch to end\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the touchend event that triggered\\n   *        this function\\n   *\\n   * @listens Tech#touchend\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTouchEnd_ = function handleTechTouchEnd_(event) {\\n    // Stop the mouse events from also happening\\n    event.preventDefault();\\n  }\\n  /**\\n   * native click events on the SWF aren't triggered on IE11, Win8.1RT\\n   * use stageclick events triggered from inside the SWF instead\\n   *\\n   * @private\\n   * @listens stageclick\\n   */\\n  ;\\n\\n  _proto.handleStageClick_ = function handleStageClick_() {\\n    this.reportUserActivity();\\n  }\\n  /**\\n   * @private\\n   */\\n  ;\\n\\n  _proto.toggleFullscreenClass_ = function toggleFullscreenClass_() {\\n    if (this.isFullscreen()) {\\n      this.addClass('vjs-fullscreen');\\n    } else {\\n      this.removeClass('vjs-fullscreen');\\n    }\\n  }\\n  /**\\n   * when the document fschange event triggers it calls this\\n   */\\n  ;\\n\\n  _proto.documentFullscreenChange_ = function documentFullscreenChange_(e) {\\n    var targetPlayer = e.target.player; // if another player was fullscreen\\n    // do a null check for targetPlayer because older firefox's would put document as e.target\\n\\n    if (targetPlayer && targetPlayer !== this) {\\n      return;\\n    }\\n\\n    var el = this.el();\\n    var isFs = global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.fullscreenElement] === el;\\n\\n    if (!isFs && el.matches) {\\n      isFs = el.matches(':' + this.fsApi_.fullscreen);\\n    } else if (!isFs && el.msMatchesSelector) {\\n      isFs = el.msMatchesSelector(':' + this.fsApi_.fullscreen);\\n    }\\n\\n    this.isFullscreen(isFs);\\n  }\\n  /**\\n   * Handle Tech Fullscreen Change\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the fullscreenchange event that triggered this function\\n   *\\n   * @param {Object} data\\n   *        the data that was sent with the event\\n   *\\n   * @private\\n   * @listens Tech#fullscreenchange\\n   * @fires Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.handleTechFullscreenChange_ = function handleTechFullscreenChange_(event, data) {\\n    if (data) {\\n      if (data.nativeIOSFullscreen) {\\n        this.toggleClass('vjs-ios-native-fs');\\n      }\\n\\n      this.isFullscreen(data.isFullscreen);\\n    }\\n  };\\n\\n  _proto.handleTechFullscreenError_ = function handleTechFullscreenError_(event, err) {\\n    this.trigger('fullscreenerror', err);\\n  }\\n  /**\\n   * @private\\n   */\\n  ;\\n\\n  _proto.togglePictureInPictureClass_ = function togglePictureInPictureClass_() {\\n    if (this.isInPictureInPicture()) {\\n      this.addClass('vjs-picture-in-picture');\\n    } else {\\n      this.removeClass('vjs-picture-in-picture');\\n    }\\n  }\\n  /**\\n   * Handle Tech Enter Picture-in-Picture.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the enterpictureinpicture event that triggered this function\\n   *\\n   * @private\\n   * @listens Tech#enterpictureinpicture\\n   */\\n  ;\\n\\n  _proto.handleTechEnterPictureInPicture_ = function handleTechEnterPictureInPicture_(event) {\\n    this.isInPictureInPicture(true);\\n  }\\n  /**\\n   * Handle Tech Leave Picture-in-Picture.\\n   *\\n   * @param {EventTarget~Event} event\\n   *        the leavepictureinpicture event that triggered this function\\n   *\\n   * @private\\n   * @listens Tech#leavepictureinpicture\\n   */\\n  ;\\n\\n  _proto.handleTechLeavePictureInPicture_ = function handleTechLeavePictureInPicture_(event) {\\n    this.isInPictureInPicture(false);\\n  }\\n  /**\\n   * Fires when an error occurred during the loading of an audio/video.\\n   *\\n   * @private\\n   * @listens Tech#error\\n   */\\n  ;\\n\\n  _proto.handleTechError_ = function handleTechError_() {\\n    var error = this.tech_.error();\\n    this.error(error);\\n  }\\n  /**\\n   * Retrigger the `textdata` event that was triggered by the {@link Tech}.\\n   *\\n   * @fires Player#textdata\\n   * @listens Tech#textdata\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechTextData_ = function handleTechTextData_() {\\n    var data = null;\\n\\n    if (arguments.length > 1) {\\n      data = arguments[1];\\n    }\\n    /**\\n     * Fires when we get a textdata event from tech\\n     *\\n     * @event Player#textdata\\n     * @type {EventTarget~Event}\\n     */\\n\\n\\n    this.trigger('textdata', data);\\n  }\\n  /**\\n   * Get object for cached values.\\n   *\\n   * @return {Object}\\n   *         get the current object cache\\n   */\\n  ;\\n\\n  _proto.getCache = function getCache() {\\n    return this.cache_;\\n  }\\n  /**\\n   * Resets the internal cache object.\\n   *\\n   * Using this function outside the player constructor or reset method may\\n   * have unintended side-effects.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.resetCache_ = function resetCache_() {\\n    this.cache_ = {\\n      // Right now, the currentTime is not _really_ cached because it is always\\n      // retrieved from the tech (see: currentTime). However, for completeness,\\n      // we set it to zero here to ensure that if we do start actually caching\\n      // it, we reset it along with everything else.\\n      currentTime: 0,\\n      initTime: 0,\\n      inactivityTimeout: this.options_.inactivityTimeout,\\n      duration: NaN,\\n      lastVolume: 1,\\n      lastPlaybackRate: this.defaultPlaybackRate(),\\n      media: null,\\n      src: '',\\n      source: {},\\n      sources: [],\\n      volume: 1\\n    };\\n  }\\n  /**\\n   * Pass values to the playback tech\\n   *\\n   * @param {string} [method]\\n   *        the method to call\\n   *\\n   * @param {Object} arg\\n   *        the argument to pass\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.techCall_ = function techCall_(method, arg) {\\n    // If it's not ready yet, call method when it is\\n    this.ready(function () {\\n      if (method in allowedSetters) {\\n        return set(this.middleware_, this.tech_, method, arg);\\n      } else if (method in allowedMediators) {\\n        return mediate(this.middleware_, this.tech_, method, arg);\\n      }\\n\\n      try {\\n        if (this.tech_) {\\n          this.tech_[method](arg);\\n        }\\n      } catch (e) {\\n        log(e);\\n        throw e;\\n      }\\n    }, true);\\n  }\\n  /**\\n   * Get calls can't wait for the tech, and sometimes don't need to.\\n   *\\n   * @param {string} method\\n   *        Tech method\\n   *\\n   * @return {Function|undefined}\\n   *         the method or undefined\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.techGet_ = function techGet_(method) {\\n    if (!this.tech_ || !this.tech_.isReady_) {\\n      return;\\n    }\\n\\n    if (method in allowedGetters) {\\n      return get(this.middleware_, this.tech_, method);\\n    } else if (method in allowedMediators) {\\n      return mediate(this.middleware_, this.tech_, method);\\n    } // Flash likes to die and reload when you hide or reposition it.\\n    // In these cases the object methods go away and we get errors.\\n    // When that happens we'll catch the errors and inform tech that it's not ready any more.\\n\\n\\n    try {\\n      return this.tech_[method]();\\n    } catch (e) {\\n      // When building additional tech libs, an expected method may not be defined yet\\n      if (this.tech_[method] === undefined) {\\n        log(\\\"Video.js: \\\" + method + \\\" method not defined for \\\" + this.techName_ + \\\" playback technology.\\\", e);\\n        throw e;\\n      } // When a method isn't available on the object it throws a TypeError\\n\\n\\n      if (e.name === 'TypeError') {\\n        log(\\\"Video.js: \\\" + method + \\\" unavailable on \\\" + this.techName_ + \\\" playback technology element.\\\", e);\\n        this.tech_.isReady_ = false;\\n        throw e;\\n      } // If error unknown, just log and throw\\n\\n\\n      log(e);\\n      throw e;\\n    }\\n  }\\n  /**\\n   * Attempt to begin playback at the first opportunity.\\n   *\\n   * @return {Promise|undefined}\\n   *         Returns a promise if the browser supports Promises (or one\\n   *         was passed in as an option). This promise will be resolved on\\n   *         the return value of play. If this is undefined it will fulfill the\\n   *         promise chain otherwise the promise chain will be fulfilled when\\n   *         the promise from play is fulfilled.\\n   */\\n  ;\\n\\n  _proto.play = function play() {\\n    var _this8 = this;\\n\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      return new PromiseClass(function (resolve) {\\n        _this8.play_(resolve);\\n      });\\n    }\\n\\n    return this.play_();\\n  }\\n  /**\\n   * The actual logic for play, takes a callback that will be resolved on the\\n   * return value of play. This allows us to resolve to the play promise if there\\n   * is one on modern browsers.\\n   *\\n   * @private\\n   * @param {Function} [callback]\\n   *        The callback that should be called when the techs play is actually called\\n   */\\n  ;\\n\\n  _proto.play_ = function play_(callback) {\\n    var _this9 = this;\\n\\n    if (callback === void 0) {\\n      callback = silencePromise;\\n    }\\n\\n    this.playCallbacks_.push(callback);\\n    var isSrcReady = Boolean(!this.changingSrc_ && (this.src() || this.currentSrc())); // treat calls to play_ somewhat like the `one` event function\\n\\n    if (this.waitToPlay_) {\\n      this.off(['ready', 'loadstart'], this.waitToPlay_);\\n      this.waitToPlay_ = null;\\n    } // if the player/tech is not ready or the src itself is not ready\\n    // queue up a call to play on `ready` or `loadstart`\\n\\n\\n    if (!this.isReady_ || !isSrcReady) {\\n      this.waitToPlay_ = function (e) {\\n        _this9.play_();\\n      };\\n\\n      this.one(['ready', 'loadstart'], this.waitToPlay_); // if we are in Safari, there is a high chance that loadstart will trigger after the gesture timeperiod\\n      // in that case, we need to prime the video element by calling load so it'll be ready in time\\n\\n      if (!isSrcReady && (IS_ANY_SAFARI || IS_IOS)) {\\n        this.load();\\n      }\\n\\n      return;\\n    } // If the player/tech is ready and we have a source, we can attempt playback.\\n\\n\\n    var val = this.techGet_('play'); // play was terminated if the returned value is null\\n\\n    if (val === null) {\\n      this.runPlayTerminatedQueue_();\\n    } else {\\n      this.runPlayCallbacks_(val);\\n    }\\n  }\\n  /**\\n   * These functions will be run when if play is terminated. If play\\n   * runPlayCallbacks_ is run these function will not be run. This allows us\\n   * to differenciate between a terminated play and an actual call to play.\\n   */\\n  ;\\n\\n  _proto.runPlayTerminatedQueue_ = function runPlayTerminatedQueue_() {\\n    var queue = this.playTerminatedQueue_.slice(0);\\n    this.playTerminatedQueue_ = [];\\n    queue.forEach(function (q) {\\n      q();\\n    });\\n  }\\n  /**\\n   * When a callback to play is delayed we have to run these\\n   * callbacks when play is actually called on the tech. This function\\n   * runs the callbacks that were delayed and accepts the return value\\n   * from the tech.\\n   *\\n   * @param {undefined|Promise} val\\n   *        The return value from the tech.\\n   */\\n  ;\\n\\n  _proto.runPlayCallbacks_ = function runPlayCallbacks_(val) {\\n    var callbacks = this.playCallbacks_.slice(0);\\n    this.playCallbacks_ = []; // clear play terminatedQueue since we finished a real play\\n\\n    this.playTerminatedQueue_ = [];\\n    callbacks.forEach(function (cb) {\\n      cb(val);\\n    });\\n  }\\n  /**\\n   * Pause the video playback\\n   *\\n   * @return {Player}\\n   *         A reference to the player object this function was called on\\n   */\\n  ;\\n\\n  _proto.pause = function pause() {\\n    this.techCall_('pause');\\n  }\\n  /**\\n   * Check if the player is paused or has yet to play\\n   *\\n   * @return {boolean}\\n   *         - false: if the media is currently playing\\n   *         - true: if media is not currently playing\\n   */\\n  ;\\n\\n  _proto.paused = function paused() {\\n    // The initial state of paused should be true (in Safari it's actually false)\\n    return this.techGet_('paused') === false ? false : true;\\n  }\\n  /**\\n   * Get a TimeRange object representing the current ranges of time that the user\\n   * has played.\\n   *\\n   * @return {TimeRange}\\n   *         A time range object that represents all the increments of time that have\\n   *         been played.\\n   */\\n  ;\\n\\n  _proto.played = function played() {\\n    return this.techGet_('played') || createTimeRanges(0, 0);\\n  }\\n  /**\\n   * Returns whether or not the user is \\\"scrubbing\\\". Scrubbing is\\n   * when the user has clicked the progress bar handle and is\\n   * dragging it along the progress bar.\\n   *\\n   * @param {boolean} [isScrubbing]\\n   *        whether the user is or is not scrubbing\\n   *\\n   * @return {boolean}\\n   *         The value of scrubbing when getting\\n   */\\n  ;\\n\\n  _proto.scrubbing = function scrubbing(isScrubbing) {\\n    if (typeof isScrubbing === 'undefined') {\\n      return this.scrubbing_;\\n    }\\n\\n    this.scrubbing_ = !!isScrubbing;\\n\\n    if (isScrubbing) {\\n      this.addClass('vjs-scrubbing');\\n    } else {\\n      this.removeClass('vjs-scrubbing');\\n    }\\n  }\\n  /**\\n   * Get or set the current time (in seconds)\\n   *\\n   * @param {number|string} [seconds]\\n   *        The time to seek to in seconds\\n   *\\n   * @return {number}\\n   *         - the current time in seconds when getting\\n   */\\n  ;\\n\\n  _proto.currentTime = function currentTime(seconds) {\\n    if (typeof seconds !== 'undefined') {\\n      if (seconds < 0) {\\n        seconds = 0;\\n      }\\n\\n      if (!this.isReady_ || this.changingSrc_ || !this.tech_ || !this.tech_.isReady_) {\\n        this.cache_.initTime = seconds;\\n        this.off('canplay', this.applyInitTime_);\\n        this.one('canplay', this.applyInitTime_);\\n        return;\\n      }\\n\\n      this.techCall_('setCurrentTime', seconds);\\n      this.cache_.initTime = 0;\\n      return;\\n    } // cache last currentTime and return. default to 0 seconds\\n    //\\n    // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\\n    // currentTime when scrubbing, but may not provide much performance benefit afterall.\\n    // Should be tested. Also something has to read the actual current time or the cache will\\n    // never get updated.\\n\\n\\n    this.cache_.currentTime = this.techGet_('currentTime') || 0;\\n    return this.cache_.currentTime;\\n  }\\n  /**\\n   * Apply the value of initTime stored in cache as currentTime.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.applyInitTime_ = function applyInitTime_() {\\n    this.currentTime(this.cache_.initTime);\\n  }\\n  /**\\n   * Normally gets the length in time of the video in seconds;\\n   * in all but the rarest use cases an argument will NOT be passed to the method\\n   *\\n   * > **NOTE**: The video must have started loading before the duration can be\\n   * known, and in the case of Flash, may not be known until the video starts\\n   * playing.\\n   *\\n   * @fires Player#durationchange\\n   *\\n   * @param {number} [seconds]\\n   *        The duration of the video to set in seconds\\n   *\\n   * @return {number}\\n   *         - The duration of the video in seconds when getting\\n   */\\n  ;\\n\\n  _proto.duration = function duration(seconds) {\\n    if (seconds === undefined) {\\n      // return NaN if the duration is not known\\n      return this.cache_.duration !== undefined ? this.cache_.duration : NaN;\\n    }\\n\\n    seconds = parseFloat(seconds); // Standardize on Infinity for signaling video is live\\n\\n    if (seconds < 0) {\\n      seconds = Infinity;\\n    }\\n\\n    if (seconds !== this.cache_.duration) {\\n      // Cache the last set value for optimized scrubbing (esp. Flash)\\n      this.cache_.duration = seconds;\\n\\n      if (seconds === Infinity) {\\n        this.addClass('vjs-live');\\n      } else {\\n        this.removeClass('vjs-live');\\n      }\\n\\n      if (!isNaN(seconds)) {\\n        // Do not fire durationchange unless the duration value is known.\\n        // @see [Spec]{@link https://www.w3.org/TR/2011/WD-html5-20110113/video.html#media-element-load-algorithm}\\n\\n        /**\\n         * @event Player#durationchange\\n         * @type {EventTarget~Event}\\n         */\\n        this.trigger('durationchange');\\n      }\\n    }\\n  }\\n  /**\\n   * Calculates how much time is left in the video. Not part\\n   * of the native video API.\\n   *\\n   * @return {number}\\n   *         The time remaining in seconds\\n   */\\n  ;\\n\\n  _proto.remainingTime = function remainingTime() {\\n    return this.duration() - this.currentTime();\\n  }\\n  /**\\n   * A remaining time function that is intented to be used when\\n   * the time is to be displayed directly to the user.\\n   *\\n   * @return {number}\\n   *         The rounded time remaining in seconds\\n   */\\n  ;\\n\\n  _proto.remainingTimeDisplay = function remainingTimeDisplay() {\\n    return Math.floor(this.duration()) - Math.floor(this.currentTime());\\n  } //\\n  // Kind of like an array of portions of the video that have been downloaded.\\n\\n  /**\\n   * Get a TimeRange object with an array of the times of the video\\n   * that have been downloaded. If you just want the percent of the\\n   * video that's been downloaded, use bufferedPercent.\\n   *\\n   * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}\\n   *\\n   * @return {TimeRange}\\n   *         A mock TimeRange object (following HTML spec)\\n   */\\n  ;\\n\\n  _proto.buffered = function buffered() {\\n    var buffered = this.techGet_('buffered');\\n\\n    if (!buffered || !buffered.length) {\\n      buffered = createTimeRanges(0, 0);\\n    }\\n\\n    return buffered;\\n  }\\n  /**\\n   * Get the percent (as a decimal) of the video that's been downloaded.\\n   * This method is not a part of the native HTML video API.\\n   *\\n   * @return {number}\\n   *         A decimal between 0 and 1 representing the percent\\n   *         that is buffered 0 being 0% and 1 being 100%\\n   */\\n  ;\\n\\n  _proto.bufferedPercent = function bufferedPercent$1() {\\n    return bufferedPercent(this.buffered(), this.duration());\\n  }\\n  /**\\n   * Get the ending time of the last buffered time range\\n   * This is used in the progress bar to encapsulate all time ranges.\\n   *\\n   * @return {number}\\n   *         The end of the last buffered time range\\n   */\\n  ;\\n\\n  _proto.bufferedEnd = function bufferedEnd() {\\n    var buffered = this.buffered();\\n    var duration = this.duration();\\n    var end = buffered.end(buffered.length - 1);\\n\\n    if (end > duration) {\\n      end = duration;\\n    }\\n\\n    return end;\\n  }\\n  /**\\n   * Get or set the current volume of the media\\n   *\\n   * @param  {number} [percentAsDecimal]\\n   *         The new volume as a decimal percent:\\n   *         - 0 is muted/0%/off\\n   *         - 1.0 is 100%/full\\n   *         - 0.5 is half volume or 50%\\n   *\\n   * @return {number}\\n   *         The current volume as a percent when getting\\n   */\\n  ;\\n\\n  _proto.volume = function volume(percentAsDecimal) {\\n    var vol;\\n\\n    if (percentAsDecimal !== undefined) {\\n      // Force value to between 0 and 1\\n      vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal)));\\n      this.cache_.volume = vol;\\n      this.techCall_('setVolume', vol);\\n\\n      if (vol > 0) {\\n        this.lastVolume_(vol);\\n      }\\n\\n      return;\\n    } // Default to 1 when returning current volume.\\n\\n\\n    vol = parseFloat(this.techGet_('volume'));\\n    return isNaN(vol) ? 1 : vol;\\n  }\\n  /**\\n   * Get the current muted state, or turn mute on or off\\n   *\\n   * @param {boolean} [muted]\\n   *        - true to mute\\n   *        - false to unmute\\n   *\\n   * @return {boolean}\\n   *         - true if mute is on and getting\\n   *         - false if mute is off and getting\\n   */\\n  ;\\n\\n  _proto.muted = function muted(_muted) {\\n    if (_muted !== undefined) {\\n      this.techCall_('setMuted', _muted);\\n      return;\\n    }\\n\\n    return this.techGet_('muted') || false;\\n  }\\n  /**\\n   * Get the current defaultMuted state, or turn defaultMuted on or off. defaultMuted\\n   * indicates the state of muted on initial playback.\\n   *\\n   * ```js\\n   *   var myPlayer = videojs('some-player-id');\\n   *\\n   *   myPlayer.src(\\\"http://www.example.com/path/to/video.mp4\\\");\\n   *\\n   *   // get, should be false\\n   *   console.log(myPlayer.defaultMuted());\\n   *   // set to true\\n   *   myPlayer.defaultMuted(true);\\n   *   // get should be true\\n   *   console.log(myPlayer.defaultMuted());\\n   * ```\\n   *\\n   * @param {boolean} [defaultMuted]\\n   *        - true to mute\\n   *        - false to unmute\\n   *\\n   * @return {boolean|Player}\\n   *         - true if defaultMuted is on and getting\\n   *         - false if defaultMuted is off and getting\\n   *         - A reference to the current player when setting\\n   */\\n  ;\\n\\n  _proto.defaultMuted = function defaultMuted(_defaultMuted) {\\n    if (_defaultMuted !== undefined) {\\n      return this.techCall_('setDefaultMuted', _defaultMuted);\\n    }\\n\\n    return this.techGet_('defaultMuted') || false;\\n  }\\n  /**\\n   * Get the last volume, or set it\\n   *\\n   * @param  {number} [percentAsDecimal]\\n   *         The new last volume as a decimal percent:\\n   *         - 0 is muted/0%/off\\n   *         - 1.0 is 100%/full\\n   *         - 0.5 is half volume or 50%\\n   *\\n   * @return {number}\\n   *         the current value of lastVolume as a percent when getting\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.lastVolume_ = function lastVolume_(percentAsDecimal) {\\n    if (percentAsDecimal !== undefined && percentAsDecimal !== 0) {\\n      this.cache_.lastVolume = percentAsDecimal;\\n      return;\\n    }\\n\\n    return this.cache_.lastVolume;\\n  }\\n  /**\\n   * Check if current tech can support native fullscreen\\n   * (e.g. with built in controls like iOS, so not our flash swf)\\n   *\\n   * @return {boolean}\\n   *         if native fullscreen is supported\\n   */\\n  ;\\n\\n  _proto.supportsFullScreen = function supportsFullScreen() {\\n    return this.techGet_('supportsFullScreen') || false;\\n  }\\n  /**\\n   * Check if the player is in fullscreen mode or tell the player that it\\n   * is or is not in fullscreen mode.\\n   *\\n   * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\\n   * property and instead document.fullscreenElement is used. But isFullscreen is\\n   * still a valuable property for internal player workings.\\n   *\\n   * @param  {boolean} [isFS]\\n   *         Set the players current fullscreen state\\n   *\\n   * @return {boolean}\\n   *         - true if fullscreen is on and getting\\n   *         - false if fullscreen is off and getting\\n   */\\n  ;\\n\\n  _proto.isFullscreen = function isFullscreen(isFS) {\\n    if (isFS !== undefined) {\\n      var oldValue = this.isFullscreen_;\\n      this.isFullscreen_ = Boolean(isFS); // if we changed fullscreen state and we're in prefixed mode, trigger fullscreenchange\\n      // this is the only place where we trigger fullscreenchange events for older browsers\\n      // fullWindow mode is treated as a prefixed event and will get a fullscreenchange event as well\\n\\n      if (this.isFullscreen_ !== oldValue && this.fsApi_.prefixed) {\\n        /**\\n           * @event Player#fullscreenchange\\n           * @type {EventTarget~Event}\\n           */\\n        this.trigger('fullscreenchange');\\n      }\\n\\n      this.toggleFullscreenClass_();\\n      return;\\n    }\\n\\n    return this.isFullscreen_;\\n  }\\n  /**\\n   * Increase the size of the video to full screen\\n   * In some browsers, full screen is not supported natively, so it enters\\n   * \\\"full window mode\\\", where the video fills the browser window.\\n   * In browsers and devices that support native full screen, sometimes the\\n   * browser's default controls will be shown, and not the Video.js custom skin.\\n   * This includes most mobile devices (iOS, Android) and older versions of\\n   * Safari.\\n   *\\n   * @param  {Object} [fullscreenOptions]\\n   *         Override the player fullscreen options\\n   *\\n   * @fires Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.requestFullscreen = function requestFullscreen(fullscreenOptions) {\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      var self = this;\\n      return new PromiseClass(function (resolve, reject) {\\n        function offHandler() {\\n          self.off('fullscreenerror', errorHandler);\\n          self.off('fullscreenchange', changeHandler);\\n        }\\n\\n        function changeHandler() {\\n          offHandler();\\n          resolve();\\n        }\\n\\n        function errorHandler(e, err) {\\n          offHandler();\\n          reject(err);\\n        }\\n\\n        self.one('fullscreenchange', changeHandler);\\n        self.one('fullscreenerror', errorHandler);\\n        var promise = self.requestFullscreenHelper_(fullscreenOptions);\\n\\n        if (promise) {\\n          promise.then(offHandler, offHandler);\\n          return promise;\\n        }\\n      });\\n    }\\n\\n    return this.requestFullscreenHelper_();\\n  };\\n\\n  _proto.requestFullscreenHelper_ = function requestFullscreenHelper_(fullscreenOptions) {\\n    var _this10 = this;\\n\\n    var fsOptions; // Only pass fullscreen options to requestFullscreen in spec-compliant browsers.\\n    // Use defaults or player configured option unless passed directly to this method.\\n\\n    if (!this.fsApi_.prefixed) {\\n      fsOptions = this.options_.fullscreen && this.options_.fullscreen.options || {};\\n\\n      if (fullscreenOptions !== undefined) {\\n        fsOptions = fullscreenOptions;\\n      }\\n    } // This method works as follows:\\n    // 1. if a fullscreen api is available, use it\\n    //   1. call requestFullscreen with potential options\\n    //   2. if we got a promise from above, use it to update isFullscreen()\\n    // 2. otherwise, if the tech supports fullscreen, call `enterFullScreen` on it.\\n    //   This is particularly used for iPhone, older iPads, and non-safari browser on iOS.\\n    // 3. otherwise, use \\\"fullWindow\\\" mode\\n\\n\\n    if (this.fsApi_.requestFullscreen) {\\n      var promise = this.el_[this.fsApi_.requestFullscreen](fsOptions);\\n\\n      if (promise) {\\n        promise.then(function () {\\n          return _this10.isFullscreen(true);\\n        }, function () {\\n          return _this10.isFullscreen(false);\\n        });\\n      }\\n\\n      return promise;\\n    } else if (this.tech_.supportsFullScreen()) {\\n      // we can't take the video.js controls fullscreen but we can go fullscreen\\n      // with native controls\\n      this.techCall_('enterFullScreen');\\n    } else {\\n      // fullscreen isn't supported so we'll just stretch the video element to\\n      // fill the viewport\\n      this.enterFullWindow();\\n    }\\n  }\\n  /**\\n   * Return the video to its normal size after having been in full screen mode\\n   *\\n   * @fires Player#fullscreenchange\\n   */\\n  ;\\n\\n  _proto.exitFullscreen = function exitFullscreen() {\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (PromiseClass) {\\n      var self = this;\\n      return new PromiseClass(function (resolve, reject) {\\n        function offHandler() {\\n          self.off('fullscreenerror', errorHandler);\\n          self.off('fullscreenchange', changeHandler);\\n        }\\n\\n        function changeHandler() {\\n          offHandler();\\n          resolve();\\n        }\\n\\n        function errorHandler(e, err) {\\n          offHandler();\\n          reject(err);\\n        }\\n\\n        self.one('fullscreenchange', changeHandler);\\n        self.one('fullscreenerror', errorHandler);\\n        var promise = self.exitFullscreenHelper_();\\n\\n        if (promise) {\\n          promise.then(offHandler, offHandler);\\n          return promise;\\n        }\\n      });\\n    }\\n\\n    return this.exitFullscreenHelper_();\\n  };\\n\\n  _proto.exitFullscreenHelper_ = function exitFullscreenHelper_() {\\n    var _this11 = this;\\n\\n    if (this.fsApi_.requestFullscreen) {\\n      var promise = global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.exitFullscreen]();\\n\\n      if (promise) {\\n        promise.then(function () {\\n          return _this11.isFullscreen(false);\\n        });\\n      }\\n\\n      return promise;\\n    } else if (this.tech_.supportsFullScreen()) {\\n      this.techCall_('exitFullScreen');\\n    } else {\\n      this.exitFullWindow();\\n    }\\n  }\\n  /**\\n   * When fullscreen isn't supported we can stretch the\\n   * video container to as wide as the browser will let us.\\n   *\\n   * @fires Player#enterFullWindow\\n   */\\n  ;\\n\\n  _proto.enterFullWindow = function enterFullWindow() {\\n    this.isFullscreen(true);\\n    this.isFullWindow = true; // Storing original doc overflow value to return to when fullscreen is off\\n\\n    this.docOrigOverflow = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow; // Add listener for esc key to exit fullscreen\\n\\n    on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_); // Hide any scroll bars\\n\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow = 'hidden'; // Apply fullscreen styles\\n\\n    addClass(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body, 'vjs-full-window');\\n    /**\\n     * @event Player#enterFullWindow\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('enterFullWindow');\\n  }\\n  /**\\n   * Check for call to either exit full window or\\n   * full screen on ESC key\\n   *\\n   * @param {string} event\\n   *        Event to check for key press\\n   */\\n  ;\\n\\n  _proto.fullWindowOnEscKey = function fullWindowOnEscKey(event) {\\n    if (keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(event, 'Esc')) {\\n      if (this.isFullscreen() === true) {\\n        this.exitFullscreen();\\n      } else {\\n        this.exitFullWindow();\\n      }\\n    }\\n  }\\n  /**\\n   * Exit full window\\n   *\\n   * @fires Player#exitFullWindow\\n   */\\n  ;\\n\\n  _proto.exitFullWindow = function exitFullWindow() {\\n    this.isFullscreen(false);\\n    this.isFullWindow = false;\\n    off(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, 'keydown', this.boundFullWindowOnEscKey_); // Unhide scroll bars.\\n\\n    global_document__WEBPACK_IMPORTED_MODULE_1___default.a.documentElement.style.overflow = this.docOrigOverflow; // Remove fullscreen styles\\n\\n    removeClass(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.body, 'vjs-full-window'); // Resize the box, controller, and poster to original sizes\\n    // this.positionAll();\\n\\n    /**\\n     * @event Player#exitFullWindow\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('exitFullWindow');\\n  }\\n  /**\\n   * Check if the player is in Picture-in-Picture mode or tell the player that it\\n   * is or is not in Picture-in-Picture mode.\\n   *\\n   * @param  {boolean} [isPiP]\\n   *         Set the players current Picture-in-Picture state\\n   *\\n   * @return {boolean}\\n   *         - true if Picture-in-Picture is on and getting\\n   *         - false if Picture-in-Picture is off and getting\\n   */\\n  ;\\n\\n  _proto.isInPictureInPicture = function isInPictureInPicture(isPiP) {\\n    if (isPiP !== undefined) {\\n      this.isInPictureInPicture_ = !!isPiP;\\n      this.togglePictureInPictureClass_();\\n      return;\\n    }\\n\\n    return !!this.isInPictureInPicture_;\\n  }\\n  /**\\n   * Create a floating video window always on top of other windows so that users may\\n   * continue consuming media while they interact with other content sites, or\\n   * applications on their device.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @fires Player#enterpictureinpicture\\n   *\\n   * @return {Promise}\\n   *         A promise with a Picture-in-Picture window.\\n   */\\n  ;\\n\\n  _proto.requestPictureInPicture = function requestPictureInPicture() {\\n    if ('pictureInPictureEnabled' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      /**\\n       * This event fires when the player enters picture in picture mode\\n       *\\n       * @event Player#enterpictureinpicture\\n       * @type {EventTarget~Event}\\n       */\\n      return this.techGet_('requestPictureInPicture');\\n    }\\n  }\\n  /**\\n   * Exit Picture-in-Picture mode.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/picture-in-picture}\\n   *\\n   * @fires Player#leavepictureinpicture\\n   *\\n   * @return {Promise}\\n   *         A promise.\\n   */\\n  ;\\n\\n  _proto.exitPictureInPicture = function exitPictureInPicture() {\\n    if ('pictureInPictureEnabled' in global_document__WEBPACK_IMPORTED_MODULE_1___default.a) {\\n      /**\\n       * This event fires when the player leaves picture in picture mode\\n       *\\n       * @event Player#leavepictureinpicture\\n       * @type {EventTarget~Event}\\n       */\\n      return global_document__WEBPACK_IMPORTED_MODULE_1___default.a.exitPictureInPicture();\\n    }\\n  }\\n  /**\\n   * Called when this Player has focus and a key gets pressed down, or when\\n   * any Component of this player receives a key press that it doesn't handle.\\n   * This allows player-wide hotkeys (either as defined below, or optionally\\n   * by an external function).\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   *\\n   * @listens keydown\\n   */\\n  ;\\n\\n  _proto.handleKeyDown = function handleKeyDown(event) {\\n    var userActions = this.options_.userActions; // Bail out if hotkeys are not configured.\\n\\n    if (!userActions || !userActions.hotkeys) {\\n      return;\\n    } // Function that determines whether or not to exclude an element from\\n    // hotkeys handling.\\n\\n\\n    var excludeElement = function excludeElement(el) {\\n      var tagName = el.tagName.toLowerCase(); // The first and easiest test is for `contenteditable` elements.\\n\\n      if (el.isContentEditable) {\\n        return true;\\n      } // Inputs matching these types will still trigger hotkey handling as\\n      // they are not text inputs.\\n\\n\\n      var allowedInputTypes = ['button', 'checkbox', 'hidden', 'radio', 'reset', 'submit'];\\n\\n      if (tagName === 'input') {\\n        return allowedInputTypes.indexOf(el.type) === -1;\\n      } // The final test is by tag name. These tags will be excluded entirely.\\n\\n\\n      var excludedTags = ['textarea'];\\n      return excludedTags.indexOf(tagName) !== -1;\\n    }; // Bail out if the user is focused on an interactive form element.\\n\\n\\n    if (excludeElement(this.el_.ownerDocument.activeElement)) {\\n      return;\\n    }\\n\\n    if (typeof userActions.hotkeys === 'function') {\\n      userActions.hotkeys.call(this, event);\\n    } else {\\n      this.handleHotkeys(event);\\n    }\\n  }\\n  /**\\n   * Called when this Player receives a hotkey keydown event.\\n   * Supported player-wide hotkeys are:\\n   *\\n   *   f          - toggle fullscreen\\n   *   m          - toggle mute\\n   *   k or Space - toggle play/pause\\n   *\\n   * @param {EventTarget~Event} event\\n   *        The `keydown` event that caused this function to be called.\\n   */\\n  ;\\n\\n  _proto.handleHotkeys = function handleHotkeys(event) {\\n    var hotkeys = this.options_.userActions ? this.options_.userActions.hotkeys : {}; // set fullscreenKey, muteKey, playPauseKey from `hotkeys`, use defaults if not set\\n\\n    var _hotkeys$fullscreenKe = hotkeys.fullscreenKey,\\n        fullscreenKey = _hotkeys$fullscreenKe === void 0 ? function (keydownEvent) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'f');\\n    } : _hotkeys$fullscreenKe,\\n        _hotkeys$muteKey = hotkeys.muteKey,\\n        muteKey = _hotkeys$muteKey === void 0 ? function (keydownEvent) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'm');\\n    } : _hotkeys$muteKey,\\n        _hotkeys$playPauseKey = hotkeys.playPauseKey,\\n        playPauseKey = _hotkeys$playPauseKey === void 0 ? function (keydownEvent) {\\n      return keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'k') || keycode__WEBPACK_IMPORTED_MODULE_8___default.a.isEventKey(keydownEvent, 'Space');\\n    } : _hotkeys$playPauseKey;\\n\\n    if (fullscreenKey.call(this, event)) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var FSToggle = Component.getComponent('FullscreenToggle');\\n\\n      if (global_document__WEBPACK_IMPORTED_MODULE_1___default.a[this.fsApi_.fullscreenEnabled] !== false) {\\n        FSToggle.prototype.handleClick.call(this, event);\\n      }\\n    } else if (muteKey.call(this, event)) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var MuteToggle = Component.getComponent('MuteToggle');\\n      MuteToggle.prototype.handleClick.call(this, event);\\n    } else if (playPauseKey.call(this, event)) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      var PlayToggle = Component.getComponent('PlayToggle');\\n      PlayToggle.prototype.handleClick.call(this, event);\\n    }\\n  }\\n  /**\\n   * Check whether the player can play a given mimetype\\n   *\\n   * @see https://www.w3.org/TR/2011/WD-html5-20110113/video.html#dom-navigator-canplaytype\\n   *\\n   * @param {string} type\\n   *        The mimetype to check\\n   *\\n   * @return {string}\\n   *         'probably', 'maybe', or '' (empty string)\\n   */\\n  ;\\n\\n  _proto.canPlayType = function canPlayType(type) {\\n    var can; // Loop through each playback technology in the options order\\n\\n    for (var i = 0, j = this.options_.techOrder; i < j.length; i++) {\\n      var techName = j[i];\\n      var tech = Tech.getTech(techName); // Support old behavior of techs being registered as components.\\n      // Remove once that deprecated behavior is removed.\\n\\n      if (!tech) {\\n        tech = Component.getComponent(techName);\\n      } // Check if the current tech is defined before continuing\\n\\n\\n      if (!tech) {\\n        log.error(\\\"The \\\\\\\"\\\" + techName + \\\"\\\\\\\" tech is undefined. Skipped browser support check for that tech.\\\");\\n        continue;\\n      } // Check if the browser supports this technology\\n\\n\\n      if (tech.isSupported()) {\\n        can = tech.canPlayType(type);\\n\\n        if (can) {\\n          return can;\\n        }\\n      }\\n    }\\n\\n    return '';\\n  }\\n  /**\\n   * Select source based on tech-order or source-order\\n   * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\\n   * defaults to tech-order selection\\n   *\\n   * @param {Array} sources\\n   *        The sources for a media asset\\n   *\\n   * @return {Object|boolean}\\n   *         Object of source and tech order or false\\n   */\\n  ;\\n\\n  _proto.selectSource = function selectSource(sources) {\\n    var _this12 = this;\\n\\n    // Get only the techs specified in `techOrder` that exist and are supported by the\\n    // current platform\\n    var techs = this.options_.techOrder.map(function (techName) {\\n      return [techName, Tech.getTech(techName)];\\n    }).filter(function (_ref) {\\n      var techName = _ref[0],\\n          tech = _ref[1];\\n\\n      // Check if the current tech is defined before continuing\\n      if (tech) {\\n        // Check if the browser supports this technology\\n        return tech.isSupported();\\n      }\\n\\n      log.error(\\\"The \\\\\\\"\\\" + techName + \\\"\\\\\\\" tech is undefined. Skipped browser support check for that tech.\\\");\\n      return false;\\n    }); // Iterate over each `innerArray` element once per `outerArray` element and execute\\n    // `tester` with both. If `tester` returns a non-falsy value, exit early and return\\n    // that value.\\n\\n    var findFirstPassingTechSourcePair = function findFirstPassingTechSourcePair(outerArray, innerArray, tester) {\\n      var found;\\n      outerArray.some(function (outerChoice) {\\n        return innerArray.some(function (innerChoice) {\\n          found = tester(outerChoice, innerChoice);\\n\\n          if (found) {\\n            return true;\\n          }\\n        });\\n      });\\n      return found;\\n    };\\n\\n    var foundSourceAndTech;\\n\\n    var flip = function flip(fn) {\\n      return function (a, b) {\\n        return fn(b, a);\\n      };\\n    };\\n\\n    var finder = function finder(_ref2, source) {\\n      var techName = _ref2[0],\\n          tech = _ref2[1];\\n\\n      if (tech.canPlaySource(source, _this12.options_[techName.toLowerCase()])) {\\n        return {\\n          source: source,\\n          tech: techName\\n        };\\n      }\\n    }; // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\\n    // to select from them based on their priority.\\n\\n\\n    if (this.options_.sourceOrder) {\\n      // Source-first ordering\\n      foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\\n    } else {\\n      // Tech-first ordering\\n      foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\\n    }\\n\\n    return foundSourceAndTech || false;\\n  }\\n  /**\\n   * Get or set the video source.\\n   *\\n   * @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]\\n   *        A SourceObject, an array of SourceObjects, or a string referencing\\n   *        a URL to a media source. It is _highly recommended_ that an object\\n   *        or array of objects is used here, so that source selection\\n   *        algorithms can take the `type` into account.\\n   *\\n   *        If not provided, this method acts as a getter.\\n   *\\n   * @return {string|undefined}\\n   *         If the `source` argument is missing, returns the current source\\n   *         URL. Otherwise, returns nothing/undefined.\\n   */\\n  ;\\n\\n  _proto.src = function src(source) {\\n    var _this13 = this;\\n\\n    // getter usage\\n    if (typeof source === 'undefined') {\\n      return this.cache_.src || '';\\n    } // filter out invalid sources and turn our source into\\n    // an array of source objects\\n\\n\\n    var sources = filterSource(source); // if a source was passed in then it is invalid because\\n    // it was filtered to a zero length Array. So we have to\\n    // show an error\\n\\n    if (!sources.length) {\\n      this.setTimeout(function () {\\n        this.error({\\n          code: 4,\\n          message: this.localize(this.options_.notSupportedMessage)\\n        });\\n      }, 0);\\n      return;\\n    } // intial sources\\n\\n\\n    this.changingSrc_ = true;\\n    this.cache_.sources = sources;\\n    this.updateSourceCaches_(sources[0]); // middlewareSource is the source after it has been changed by middleware\\n\\n    setSource(this, sources[0], function (middlewareSource, mws) {\\n      _this13.middleware_ = mws; // since sourceSet is async we have to update the cache again after we select a source since\\n      // the source that is selected could be out of order from the cache update above this callback.\\n\\n      _this13.cache_.sources = sources;\\n\\n      _this13.updateSourceCaches_(middlewareSource);\\n\\n      var err = _this13.src_(middlewareSource);\\n\\n      if (err) {\\n        if (sources.length > 1) {\\n          return _this13.src(sources.slice(1));\\n        }\\n\\n        _this13.changingSrc_ = false; // We need to wrap this in a timeout to give folks a chance to add error event handlers\\n\\n        _this13.setTimeout(function () {\\n          this.error({\\n            code: 4,\\n            message: this.localize(this.options_.notSupportedMessage)\\n          });\\n        }, 0); // we could not find an appropriate tech, but let's still notify the delegate that this is it\\n        // this needs a better comment about why this is needed\\n\\n\\n        _this13.triggerReady();\\n\\n        return;\\n      }\\n\\n      setTech(mws, _this13.tech_);\\n    });\\n  }\\n  /**\\n   * Set the source object on the tech, returns a boolean that indicates whether\\n   * there is a tech that can play the source or not\\n   *\\n   * @param {Tech~SourceObject} source\\n   *        The source object to set on the Tech\\n   *\\n   * @return {boolean}\\n   *         - True if there is no Tech to playback this source\\n   *         - False otherwise\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.src_ = function src_(source) {\\n    var _this14 = this;\\n\\n    var sourceTech = this.selectSource([source]);\\n\\n    if (!sourceTech) {\\n      return true;\\n    }\\n\\n    if (!titleCaseEquals(sourceTech.tech, this.techName_)) {\\n      this.changingSrc_ = true; // load this technology with the chosen source\\n\\n      this.loadTech_(sourceTech.tech, sourceTech.source);\\n      this.tech_.ready(function () {\\n        _this14.changingSrc_ = false;\\n      });\\n      return false;\\n    } // wait until the tech is ready to set the source\\n    // and set it synchronously if possible (#2326)\\n\\n\\n    this.ready(function () {\\n      // The setSource tech method was added with source handlers\\n      // so older techs won't support it\\n      // We need to check the direct prototype for the case where subclasses\\n      // of the tech do not support source handlers\\n      if (this.tech_.constructor.prototype.hasOwnProperty('setSource')) {\\n        this.techCall_('setSource', source);\\n      } else {\\n        this.techCall_('src', source.src);\\n      }\\n\\n      this.changingSrc_ = false;\\n    }, true);\\n    return false;\\n  }\\n  /**\\n   * Begin loading the src data.\\n   */\\n  ;\\n\\n  _proto.load = function load() {\\n    this.techCall_('load');\\n  }\\n  /**\\n   * Reset the player. Loads the first tech in the techOrder,\\n   * removes all the text tracks in the existing `tech`,\\n   * and calls `reset` on the `tech`.\\n   */\\n  ;\\n\\n  _proto.reset = function reset() {\\n    var _this15 = this;\\n\\n    var PromiseClass = this.options_.Promise || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Promise;\\n\\n    if (this.paused() || !PromiseClass) {\\n      this.doReset_();\\n    } else {\\n      var playPromise = this.play();\\n      silencePromise(playPromise.then(function () {\\n        return _this15.doReset_();\\n      }));\\n    }\\n  };\\n\\n  _proto.doReset_ = function doReset_() {\\n    if (this.tech_) {\\n      this.tech_.clearTracks('text');\\n    }\\n\\n    this.resetCache_();\\n    this.poster('');\\n    this.loadTech_(this.options_.techOrder[0], null);\\n    this.techCall_('reset');\\n    this.resetControlBarUI_();\\n\\n    if (isEvented(this)) {\\n      this.trigger('playerreset');\\n    }\\n  }\\n  /**\\n   * Reset Control Bar's UI by calling sub-methods that reset\\n   * all of Control Bar's components\\n   */\\n  ;\\n\\n  _proto.resetControlBarUI_ = function resetControlBarUI_() {\\n    this.resetProgressBar_();\\n    this.resetPlaybackRate_();\\n    this.resetVolumeBar_();\\n  }\\n  /**\\n   * Reset tech's progress so progress bar is reset in the UI\\n   */\\n  ;\\n\\n  _proto.resetProgressBar_ = function resetProgressBar_() {\\n    this.currentTime(0);\\n    var _this$controlBar = this.controlBar,\\n        durationDisplay = _this$controlBar.durationDisplay,\\n        remainingTimeDisplay = _this$controlBar.remainingTimeDisplay;\\n\\n    if (durationDisplay) {\\n      durationDisplay.updateContent();\\n    }\\n\\n    if (remainingTimeDisplay) {\\n      remainingTimeDisplay.updateContent();\\n    }\\n  }\\n  /**\\n   * Reset Playback ratio\\n   */\\n  ;\\n\\n  _proto.resetPlaybackRate_ = function resetPlaybackRate_() {\\n    this.playbackRate(this.defaultPlaybackRate());\\n    this.handleTechRateChange_();\\n  }\\n  /**\\n   * Reset Volume bar\\n   */\\n  ;\\n\\n  _proto.resetVolumeBar_ = function resetVolumeBar_() {\\n    this.volume(1.0);\\n    this.trigger('volumechange');\\n  }\\n  /**\\n   * Returns all of the current source objects.\\n   *\\n   * @return {Tech~SourceObject[]}\\n   *         The current source objects\\n   */\\n  ;\\n\\n  _proto.currentSources = function currentSources() {\\n    var source = this.currentSource();\\n    var sources = []; // assume `{}` or `{ src }`\\n\\n    if (Object.keys(source).length !== 0) {\\n      sources.push(source);\\n    }\\n\\n    return this.cache_.sources || sources;\\n  }\\n  /**\\n   * Returns the current source object.\\n   *\\n   * @return {Tech~SourceObject}\\n   *         The current source object\\n   */\\n  ;\\n\\n  _proto.currentSource = function currentSource() {\\n    return this.cache_.source || {};\\n  }\\n  /**\\n   * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\\n   * Can be used in conjunction with `currentType` to assist in rebuilding the current source object.\\n   *\\n   * @return {string}\\n   *         The current source\\n   */\\n  ;\\n\\n  _proto.currentSrc = function currentSrc() {\\n    return this.currentSource() && this.currentSource().src || '';\\n  }\\n  /**\\n   * Get the current source type e.g. video/mp4\\n   * This can allow you rebuild the current source object so that you could load the same\\n   * source and tech later\\n   *\\n   * @return {string}\\n   *         The source MIME type\\n   */\\n  ;\\n\\n  _proto.currentType = function currentType() {\\n    return this.currentSource() && this.currentSource().type || '';\\n  }\\n  /**\\n   * Get or set the preload attribute\\n   *\\n   * @param {boolean} [value]\\n   *        - true means that we should preload\\n   *        - false means that we should not preload\\n   *\\n   * @return {string}\\n   *         The preload attribute value when getting\\n   */\\n  ;\\n\\n  _proto.preload = function preload(value) {\\n    if (value !== undefined) {\\n      this.techCall_('setPreload', value);\\n      this.options_.preload = value;\\n      return;\\n    }\\n\\n    return this.techGet_('preload');\\n  }\\n  /**\\n   * Get or set the autoplay option. When this is a boolean it will\\n   * modify the attribute on the tech. When this is a string the attribute on\\n   * the tech will be removed and `Player` will handle autoplay on loadstarts.\\n   *\\n   * @param {boolean|string} [value]\\n   *        - true: autoplay using the browser behavior\\n   *        - false: do not autoplay\\n   *        - 'play': call play() on every loadstart\\n   *        - 'muted': call muted() then play() on every loadstart\\n   *        - 'any': call play() on every loadstart. if that fails call muted() then play().\\n   *        - *: values other than those listed here will be set `autoplay` to true\\n   *\\n   * @return {boolean|string}\\n   *         The current value of autoplay when getting\\n   */\\n  ;\\n\\n  _proto.autoplay = function autoplay(value) {\\n    // getter usage\\n    if (value === undefined) {\\n      return this.options_.autoplay || false;\\n    }\\n\\n    var techAutoplay; // if the value is a valid string set it to that\\n\\n    if (typeof value === 'string' && /(any|play|muted)/.test(value)) {\\n      this.options_.autoplay = value;\\n      this.manualAutoplay_(value);\\n      techAutoplay = false; // any falsy value sets autoplay to false in the browser,\\n      // lets do the same\\n    } else if (!value) {\\n      this.options_.autoplay = false; // any other value (ie truthy) sets autoplay to true\\n    } else {\\n      this.options_.autoplay = true;\\n    }\\n\\n    techAutoplay = typeof techAutoplay === 'undefined' ? this.options_.autoplay : techAutoplay; // if we don't have a tech then we do not queue up\\n    // a setAutoplay call on tech ready. We do this because the\\n    // autoplay option will be passed in the constructor and we\\n    // do not need to set it twice\\n\\n    if (this.tech_) {\\n      this.techCall_('setAutoplay', techAutoplay);\\n    }\\n  }\\n  /**\\n   * Set or unset the playsinline attribute.\\n   * Playsinline tells the browser that non-fullscreen playback is preferred.\\n   *\\n   * @param {boolean} [value]\\n   *        - true means that we should try to play inline by default\\n   *        - false means that we should use the browser's default playback mode,\\n   *          which in most cases is inline. iOS Safari is a notable exception\\n   *          and plays fullscreen by default.\\n   *\\n   * @return {string|Player}\\n   *         - the current value of playsinline\\n   *         - the player when setting\\n   *\\n   * @see [Spec]{@link https://html.spec.whatwg.org/#attr-video-playsinline}\\n   */\\n  ;\\n\\n  _proto.playsinline = function playsinline(value) {\\n    if (value !== undefined) {\\n      this.techCall_('setPlaysinline', value);\\n      this.options_.playsinline = value;\\n      return this;\\n    }\\n\\n    return this.techGet_('playsinline');\\n  }\\n  /**\\n   * Get or set the loop attribute on the video element.\\n   *\\n   * @param {boolean} [value]\\n   *        - true means that we should loop the video\\n   *        - false means that we should not loop the video\\n   *\\n   * @return {boolean}\\n   *         The current value of loop when getting\\n   */\\n  ;\\n\\n  _proto.loop = function loop(value) {\\n    if (value !== undefined) {\\n      this.techCall_('setLoop', value);\\n      this.options_.loop = value;\\n      return;\\n    }\\n\\n    return this.techGet_('loop');\\n  }\\n  /**\\n   * Get or set the poster image source url\\n   *\\n   * @fires Player#posterchange\\n   *\\n   * @param {string} [src]\\n   *        Poster image source URL\\n   *\\n   * @return {string}\\n   *         The current value of poster when getting\\n   */\\n  ;\\n\\n  _proto.poster = function poster(src) {\\n    if (src === undefined) {\\n      return this.poster_;\\n    } // The correct way to remove a poster is to set as an empty string\\n    // other falsey values will throw errors\\n\\n\\n    if (!src) {\\n      src = '';\\n    }\\n\\n    if (src === this.poster_) {\\n      return;\\n    } // update the internal poster variable\\n\\n\\n    this.poster_ = src; // update the tech's poster\\n\\n    this.techCall_('setPoster', src);\\n    this.isPosterFromTech_ = false; // alert components that the poster has been set\\n\\n    /**\\n     * This event fires when the poster image is changed on the player.\\n     *\\n     * @event Player#posterchange\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('posterchange');\\n  }\\n  /**\\n   * Some techs (e.g. YouTube) can provide a poster source in an\\n   * asynchronous way. We want the poster component to use this\\n   * poster source so that it covers up the tech's controls.\\n   * (YouTube's play button). However we only want to use this\\n   * source if the player user hasn't set a poster through\\n   * the normal APIs.\\n   *\\n   * @fires Player#posterchange\\n   * @listens Tech#posterchange\\n   * @private\\n   */\\n  ;\\n\\n  _proto.handleTechPosterChange_ = function handleTechPosterChange_() {\\n    if ((!this.poster_ || this.options_.techCanOverridePoster) && this.tech_ && this.tech_.poster) {\\n      var newPoster = this.tech_.poster() || '';\\n\\n      if (newPoster !== this.poster_) {\\n        this.poster_ = newPoster;\\n        this.isPosterFromTech_ = true; // Let components know the poster has changed\\n\\n        this.trigger('posterchange');\\n      }\\n    }\\n  }\\n  /**\\n   * Get or set whether or not the controls are showing.\\n   *\\n   * @fires Player#controlsenabled\\n   *\\n   * @param {boolean} [bool]\\n   *        - true to turn controls on\\n   *        - false to turn controls off\\n   *\\n   * @return {boolean}\\n   *         The current value of controls when getting\\n   */\\n  ;\\n\\n  _proto.controls = function controls(bool) {\\n    if (bool === undefined) {\\n      return !!this.controls_;\\n    }\\n\\n    bool = !!bool; // Don't trigger a change event unless it actually changed\\n\\n    if (this.controls_ === bool) {\\n      return;\\n    }\\n\\n    this.controls_ = bool;\\n\\n    if (this.usingNativeControls()) {\\n      this.techCall_('setControls', bool);\\n    }\\n\\n    if (this.controls_) {\\n      this.removeClass('vjs-controls-disabled');\\n      this.addClass('vjs-controls-enabled');\\n      /**\\n       * @event Player#controlsenabled\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('controlsenabled');\\n\\n      if (!this.usingNativeControls()) {\\n        this.addTechControlsListeners_();\\n      }\\n    } else {\\n      this.removeClass('vjs-controls-enabled');\\n      this.addClass('vjs-controls-disabled');\\n      /**\\n       * @event Player#controlsdisabled\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('controlsdisabled');\\n\\n      if (!this.usingNativeControls()) {\\n        this.removeTechControlsListeners_();\\n      }\\n    }\\n  }\\n  /**\\n   * Toggle native controls on/off. Native controls are the controls built into\\n   * devices (e.g. default iPhone controls), Flash, or other techs\\n   * (e.g. Vimeo Controls)\\n   * **This should only be set by the current tech, because only the tech knows\\n   * if it can support native controls**\\n   *\\n   * @fires Player#usingnativecontrols\\n   * @fires Player#usingcustomcontrols\\n   *\\n   * @param {boolean} [bool]\\n   *        - true to turn native controls on\\n   *        - false to turn native controls off\\n   *\\n   * @return {boolean}\\n   *         The current value of native controls when getting\\n   */\\n  ;\\n\\n  _proto.usingNativeControls = function usingNativeControls(bool) {\\n    if (bool === undefined) {\\n      return !!this.usingNativeControls_;\\n    }\\n\\n    bool = !!bool; // Don't trigger a change event unless it actually changed\\n\\n    if (this.usingNativeControls_ === bool) {\\n      return;\\n    }\\n\\n    this.usingNativeControls_ = bool;\\n\\n    if (this.usingNativeControls_) {\\n      this.addClass('vjs-using-native-controls');\\n      /**\\n       * player is using the native device controls\\n       *\\n       * @event Player#usingnativecontrols\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('usingnativecontrols');\\n    } else {\\n      this.removeClass('vjs-using-native-controls');\\n      /**\\n       * player is using the custom HTML controls\\n       *\\n       * @event Player#usingcustomcontrols\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('usingcustomcontrols');\\n    }\\n  }\\n  /**\\n   * Set or get the current MediaError\\n   *\\n   * @fires Player#error\\n   *\\n   * @param  {MediaError|string|number} [err]\\n   *         A MediaError or a string/number to be turned\\n   *         into a MediaError\\n   *\\n   * @return {MediaError|null}\\n   *         The current MediaError when getting (or null)\\n   */\\n  ;\\n\\n  _proto.error = function error(err) {\\n    if (err === undefined) {\\n      return this.error_ || null;\\n    } // Suppress the first error message for no compatible source until\\n    // user interaction\\n\\n\\n    if (this.options_.suppressNotSupportedError && err && err.code === 4) {\\n      var triggerSuppressedError = function triggerSuppressedError() {\\n        this.error(err);\\n      };\\n\\n      this.options_.suppressNotSupportedError = false;\\n      this.any(['click', 'touchstart'], triggerSuppressedError);\\n      this.one('loadstart', function () {\\n        this.off(['click', 'touchstart'], triggerSuppressedError);\\n      });\\n      return;\\n    } // restoring to default\\n\\n\\n    if (err === null) {\\n      this.error_ = err;\\n      this.removeClass('vjs-error');\\n\\n      if (this.errorDisplay) {\\n        this.errorDisplay.close();\\n      }\\n\\n      return;\\n    }\\n\\n    this.error_ = new MediaError(err); // add the vjs-error classname to the player\\n\\n    this.addClass('vjs-error'); // log the name of the error type and any message\\n    // IE11 logs \\\"[object object]\\\" and required you to expand message to see error object\\n\\n    log.error(\\\"(CODE:\\\" + this.error_.code + \\\" \\\" + MediaError.errorTypes[this.error_.code] + \\\")\\\", this.error_.message, this.error_);\\n    /**\\n     * @event Player#error\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('error');\\n    return;\\n  }\\n  /**\\n   * Report user activity\\n   *\\n   * @param {Object} event\\n   *        Event object\\n   */\\n  ;\\n\\n  _proto.reportUserActivity = function reportUserActivity(event) {\\n    this.userActivity_ = true;\\n  }\\n  /**\\n   * Get/set if user is active\\n   *\\n   * @fires Player#useractive\\n   * @fires Player#userinactive\\n   *\\n   * @param {boolean} [bool]\\n   *        - true if the user is active\\n   *        - false if the user is inactive\\n   *\\n   * @return {boolean}\\n   *         The current value of userActive when getting\\n   */\\n  ;\\n\\n  _proto.userActive = function userActive(bool) {\\n    if (bool === undefined) {\\n      return this.userActive_;\\n    }\\n\\n    bool = !!bool;\\n\\n    if (bool === this.userActive_) {\\n      return;\\n    }\\n\\n    this.userActive_ = bool;\\n\\n    if (this.userActive_) {\\n      this.userActivity_ = true;\\n      this.removeClass('vjs-user-inactive');\\n      this.addClass('vjs-user-active');\\n      /**\\n       * @event Player#useractive\\n       * @type {EventTarget~Event}\\n       */\\n\\n      this.trigger('useractive');\\n      return;\\n    } // Chrome/Safari/IE have bugs where when you change the cursor it can\\n    // trigger a mousemove event. This causes an issue when you're hiding\\n    // the cursor when the user is inactive, and a mousemove signals user\\n    // activity. Making it impossible to go into inactive mode. Specifically\\n    // this happens in fullscreen when we really need to hide the cursor.\\n    //\\n    // When this gets resolved in ALL browsers it can be removed\\n    // https://code.google.com/p/chromium/issues/detail?id=103041\\n\\n\\n    if (this.tech_) {\\n      this.tech_.one('mousemove', function (e) {\\n        e.stopPropagation();\\n        e.preventDefault();\\n      });\\n    }\\n\\n    this.userActivity_ = false;\\n    this.removeClass('vjs-user-active');\\n    this.addClass('vjs-user-inactive');\\n    /**\\n     * @event Player#userinactive\\n     * @type {EventTarget~Event}\\n     */\\n\\n    this.trigger('userinactive');\\n  }\\n  /**\\n   * Listen for user activity based on timeout value\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.listenForUserActivity_ = function listenForUserActivity_() {\\n    var mouseInProgress;\\n    var lastMoveX;\\n    var lastMoveY;\\n    var handleActivity = bind(this, this.reportUserActivity);\\n\\n    var handleMouseMove = function handleMouseMove(e) {\\n      // #1068 - Prevent mousemove spamming\\n      // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\\n      if (e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\\n        lastMoveX = e.screenX;\\n        lastMoveY = e.screenY;\\n        handleActivity();\\n      }\\n    };\\n\\n    var handleMouseDown = function handleMouseDown() {\\n      handleActivity(); // For as long as the they are touching the device or have their mouse down,\\n      // we consider them active even if they're not moving their finger or mouse.\\n      // So we want to continue to update that they are active\\n\\n      this.clearInterval(mouseInProgress); // Setting userActivity=true now and setting the interval to the same time\\n      // as the activityCheck interval (250) should ensure we never miss the\\n      // next activityCheck\\n\\n      mouseInProgress = this.setInterval(handleActivity, 250);\\n    };\\n\\n    var handleMouseUpAndMouseLeave = function handleMouseUpAndMouseLeave(event) {\\n      handleActivity(); // Stop the interval that maintains activity if the mouse/touch is down\\n\\n      this.clearInterval(mouseInProgress);\\n    }; // Any mouse movement will be considered user activity\\n\\n\\n    this.on('mousedown', handleMouseDown);\\n    this.on('mousemove', handleMouseMove);\\n    this.on('mouseup', handleMouseUpAndMouseLeave);\\n    this.on('mouseleave', handleMouseUpAndMouseLeave);\\n    var controlBar = this.getChild('controlBar'); // Fixes bug on Android & iOS where when tapping progressBar (when control bar is displayed)\\n    // controlBar would no longer be hidden by default timeout.\\n\\n    if (controlBar && !IS_IOS && !IS_ANDROID) {\\n      controlBar.on('mouseenter', function (event) {\\n        this.player().cache_.inactivityTimeout = this.player().options_.inactivityTimeout;\\n        this.player().options_.inactivityTimeout = 0;\\n      });\\n      controlBar.on('mouseleave', function (event) {\\n        this.player().options_.inactivityTimeout = this.player().cache_.inactivityTimeout;\\n      });\\n    } // Listen for keyboard navigation\\n    // Shouldn't need to use inProgress interval because of key repeat\\n\\n\\n    this.on('keydown', handleActivity);\\n    this.on('keyup', handleActivity); // Run an interval every 250 milliseconds instead of stuffing everything into\\n    // the mousemove/touchmove function itself, to prevent performance degradation.\\n    // `this.reportUserActivity` simply sets this.userActivity_ to true, which\\n    // then gets picked up by this loop\\n    // http://ejohn.org/blog/learning-from-twitter/\\n\\n    var inactivityTimeout;\\n    this.setInterval(function () {\\n      // Check to see if mouse/touch activity has happened\\n      if (!this.userActivity_) {\\n        return;\\n      } // Reset the activity tracker\\n\\n\\n      this.userActivity_ = false; // If the user state was inactive, set the state to active\\n\\n      this.userActive(true); // Clear any existing inactivity timeout to start the timer over\\n\\n      this.clearTimeout(inactivityTimeout);\\n      var timeout = this.options_.inactivityTimeout;\\n\\n      if (timeout <= 0) {\\n        return;\\n      } // In <timeout> milliseconds, if no more activity has occurred the\\n      // user will be considered inactive\\n\\n\\n      inactivityTimeout = this.setTimeout(function () {\\n        // Protect against the case where the inactivityTimeout can trigger just\\n        // before the next user activity is picked up by the activity check loop\\n        // causing a flicker\\n        if (!this.userActivity_) {\\n          this.userActive(false);\\n        }\\n      }, timeout);\\n    }, 250);\\n  }\\n  /**\\n   * Gets or sets the current playback rate. A playback rate of\\n   * 1.0 represents normal speed and 0.5 would indicate half-speed\\n   * playback, for instance.\\n   *\\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\\n   *\\n   * @param {number} [rate]\\n   *       New playback rate to set.\\n   *\\n   * @return {number}\\n   *         The current playback rate when getting or 1.0\\n   */\\n  ;\\n\\n  _proto.playbackRate = function playbackRate(rate) {\\n    if (rate !== undefined) {\\n      // NOTE: this.cache_.lastPlaybackRate is set from the tech handler\\n      // that is registered above\\n      this.techCall_('setPlaybackRate', rate);\\n      return;\\n    }\\n\\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\\n      return this.cache_.lastPlaybackRate || this.techGet_('playbackRate');\\n    }\\n\\n    return 1.0;\\n  }\\n  /**\\n   * Gets or sets the current default playback rate. A default playback rate of\\n   * 1.0 represents normal speed and 0.5 would indicate half-speed playback, for instance.\\n   * defaultPlaybackRate will only represent what the initial playbackRate of a video was, not\\n   * not the current playbackRate.\\n   *\\n   * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-defaultplaybackrate\\n   *\\n   * @param {number} [rate]\\n   *       New default playback rate to set.\\n   *\\n   * @return {number|Player}\\n   *         - The default playback rate when getting or 1.0\\n   *         - the player when setting\\n   */\\n  ;\\n\\n  _proto.defaultPlaybackRate = function defaultPlaybackRate(rate) {\\n    if (rate !== undefined) {\\n      return this.techCall_('setDefaultPlaybackRate', rate);\\n    }\\n\\n    if (this.tech_ && this.tech_.featuresPlaybackRate) {\\n      return this.techGet_('defaultPlaybackRate');\\n    }\\n\\n    return 1.0;\\n  }\\n  /**\\n   * Gets or sets the audio flag\\n   *\\n   * @param {boolean} bool\\n   *        - true signals that this is an audio player\\n   *        - false signals that this is not an audio player\\n   *\\n   * @return {boolean}\\n   *         The current value of isAudio when getting\\n   */\\n  ;\\n\\n  _proto.isAudio = function isAudio(bool) {\\n    if (bool !== undefined) {\\n      this.isAudio_ = !!bool;\\n      return;\\n    }\\n\\n    return !!this.isAudio_;\\n  }\\n  /**\\n   * A helper method for adding a {@link TextTrack} to our\\n   * {@link TextTrackList}.\\n   *\\n   * In addition to the W3C settings we allow adding additional info through options.\\n   *\\n   * @see http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\\n   *\\n   * @param {string} [kind]\\n   *        the kind of TextTrack you are adding\\n   *\\n   * @param {string} [label]\\n   *        the label to give the TextTrack label\\n   *\\n   * @param {string} [language]\\n   *        the language to set on the TextTrack\\n   *\\n   * @return {TextTrack|undefined}\\n   *         the TextTrack that was added or undefined\\n   *         if there is no tech\\n   */\\n  ;\\n\\n  _proto.addTextTrack = function addTextTrack(kind, label, language) {\\n    if (this.tech_) {\\n      return this.tech_.addTextTrack(kind, label, language);\\n    }\\n  }\\n  /**\\n   * Create a remote {@link TextTrack} and an {@link HTMLTrackElement}.\\n   * When manualCleanup is set to false, the track will be automatically removed\\n   * on source changes.\\n   *\\n   * @param {Object} options\\n   *        Options to pass to {@link HTMLTrackElement} during creation. See\\n   *        {@link HTMLTrackElement} for object properties that you should use.\\n   *\\n   * @param {boolean} [manualCleanup=true] if set to false, the TextTrack will be\\n   *                                       removed on a source change\\n   *\\n   * @return {HtmlTrackElement}\\n   *         the HTMLTrackElement that was created and added\\n   *         to the HtmlTrackElementList and the remote\\n   *         TextTrackList\\n   *\\n   * @deprecated The default value of the \\\"manualCleanup\\\" parameter will default\\n   *             to \\\"false\\\" in upcoming versions of Video.js\\n   */\\n  ;\\n\\n  _proto.addRemoteTextTrack = function addRemoteTextTrack(options, manualCleanup) {\\n    if (this.tech_) {\\n      return this.tech_.addRemoteTextTrack(options, manualCleanup);\\n    }\\n  }\\n  /**\\n   * Remove a remote {@link TextTrack} from the respective\\n   * {@link TextTrackList} and {@link HtmlTrackElementList}.\\n   *\\n   * @param {Object} track\\n   *        Remote {@link TextTrack} to remove\\n   *\\n   * @return {undefined}\\n   *         does not return anything\\n   */\\n  ;\\n\\n  _proto.removeRemoteTextTrack = function removeRemoteTextTrack(obj) {\\n    if (obj === void 0) {\\n      obj = {};\\n    }\\n\\n    var _obj = obj,\\n        track = _obj.track;\\n\\n    if (!track) {\\n      track = obj;\\n    } // destructure the input into an object with a track argument, defaulting to arguments[0]\\n    // default the whole argument to an empty object if nothing was passed in\\n\\n\\n    if (this.tech_) {\\n      return this.tech_.removeRemoteTextTrack(track);\\n    }\\n  }\\n  /**\\n   * Gets available media playback quality metrics as specified by the W3C's Media\\n   * Playback Quality API.\\n   *\\n   * @see [Spec]{@link https://wicg.github.io/media-playback-quality}\\n   *\\n   * @return {Object|undefined}\\n   *         An object with supported media playback quality metrics or undefined if there\\n   *         is no tech or the tech does not support it.\\n   */\\n  ;\\n\\n  _proto.getVideoPlaybackQuality = function getVideoPlaybackQuality() {\\n    return this.techGet_('getVideoPlaybackQuality');\\n  }\\n  /**\\n   * Get video width\\n   *\\n   * @return {number}\\n   *         current video width\\n   */\\n  ;\\n\\n  _proto.videoWidth = function videoWidth() {\\n    return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\\n  }\\n  /**\\n   * Get video height\\n   *\\n   * @return {number}\\n   *         current video height\\n   */\\n  ;\\n\\n  _proto.videoHeight = function videoHeight() {\\n    return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\\n  }\\n  /**\\n   * The player's language code\\n   * NOTE: The language should be set in the player options if you want the\\n   * the controls to be built with a specific language. Changing the language\\n   * later will not update controls text.\\n   *\\n   * @param {string} [code]\\n   *        the language code to set the player to\\n   *\\n   * @return {string}\\n   *         The current language code when getting\\n   */\\n  ;\\n\\n  _proto.language = function language(code) {\\n    if (code === undefined) {\\n      return this.language_;\\n    }\\n\\n    this.language_ = String(code).toLowerCase();\\n  }\\n  /**\\n   * Get the player's language dictionary\\n   * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\\n   * Languages specified directly in the player options have precedence\\n   *\\n   * @return {Array}\\n   *         An array of of supported languages\\n   */\\n  ;\\n\\n  _proto.languages = function languages() {\\n    return mergeOptions(Player.prototype.options_.languages, this.languages_);\\n  }\\n  /**\\n   * returns a JavaScript object reperesenting the current track\\n   * information. **DOES not return it as JSON**\\n   *\\n   * @return {Object}\\n   *         Object representing the current of track info\\n   */\\n  ;\\n\\n  _proto.toJSON = function toJSON() {\\n    var options = mergeOptions(this.options_);\\n    var tracks = options.tracks;\\n    options.tracks = [];\\n\\n    for (var i = 0; i < tracks.length; i++) {\\n      var track = tracks[i]; // deep merge tracks and null out player so no circular references\\n\\n      track = mergeOptions(track);\\n      track.player = undefined;\\n      options.tracks[i] = track;\\n    }\\n\\n    return options;\\n  }\\n  /**\\n   * Creates a simple modal dialog (an instance of the {@link ModalDialog}\\n   * component) that immediately overlays the player with arbitrary\\n   * content and removes itself when closed.\\n   *\\n   * @param {string|Function|Element|Array|null} content\\n   *        Same as {@link ModalDialog#content}'s param of the same name.\\n   *        The most straight-forward usage is to provide a string or DOM\\n   *        element.\\n   *\\n   * @param {Object} [options]\\n   *        Extra options which will be passed on to the {@link ModalDialog}.\\n   *\\n   * @return {ModalDialog}\\n   *         the {@link ModalDialog} that was created\\n   */\\n  ;\\n\\n  _proto.createModal = function createModal(content, options) {\\n    var _this16 = this;\\n\\n    options = options || {};\\n    options.content = content || '';\\n    var modal = new ModalDialog(this, options);\\n    this.addChild(modal);\\n    modal.on('dispose', function () {\\n      _this16.removeChild(modal);\\n    });\\n    modal.open();\\n    return modal;\\n  }\\n  /**\\n   * Change breakpoint classes when the player resizes.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.updateCurrentBreakpoint_ = function updateCurrentBreakpoint_() {\\n    if (!this.responsive()) {\\n      return;\\n    }\\n\\n    var currentBreakpoint = this.currentBreakpoint();\\n    var currentWidth = this.currentWidth();\\n\\n    for (var i = 0; i < BREAKPOINT_ORDER.length; i++) {\\n      var candidateBreakpoint = BREAKPOINT_ORDER[i];\\n      var maxWidth = this.breakpoints_[candidateBreakpoint];\\n\\n      if (currentWidth <= maxWidth) {\\n        // The current breakpoint did not change, nothing to do.\\n        if (currentBreakpoint === candidateBreakpoint) {\\n          return;\\n        } // Only remove a class if there is a current breakpoint.\\n\\n\\n        if (currentBreakpoint) {\\n          this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]);\\n        }\\n\\n        this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]);\\n        this.breakpoint_ = candidateBreakpoint;\\n        break;\\n      }\\n    }\\n  }\\n  /**\\n   * Removes the current breakpoint.\\n   *\\n   * @private\\n   */\\n  ;\\n\\n  _proto.removeCurrentBreakpoint_ = function removeCurrentBreakpoint_() {\\n    var className = this.currentBreakpointClass();\\n    this.breakpoint_ = '';\\n\\n    if (className) {\\n      this.removeClass(className);\\n    }\\n  }\\n  /**\\n   * Get or set breakpoints on the player.\\n   *\\n   * Calling this method with an object or `true` will remove any previous\\n   * custom breakpoints and start from the defaults again.\\n   *\\n   * @param  {Object|boolean} [breakpoints]\\n   *         If an object is given, it can be used to provide custom\\n   *         breakpoints. If `true` is given, will set default breakpoints.\\n   *         If this argument is not given, will simply return the current\\n   *         breakpoints.\\n   *\\n   * @param  {number} [breakpoints.tiny]\\n   *         The maximum width for the \\\"vjs-layout-tiny\\\" class.\\n   *\\n   * @param  {number} [breakpoints.xsmall]\\n   *         The maximum width for the \\\"vjs-layout-x-small\\\" class.\\n   *\\n   * @param  {number} [breakpoints.small]\\n   *         The maximum width for the \\\"vjs-layout-small\\\" class.\\n   *\\n   * @param  {number} [breakpoints.medium]\\n   *         The maximum width for the \\\"vjs-layout-medium\\\" class.\\n   *\\n   * @param  {number} [breakpoints.large]\\n   *         The maximum width for the \\\"vjs-layout-large\\\" class.\\n   *\\n   * @param  {number} [breakpoints.xlarge]\\n   *         The maximum width for the \\\"vjs-layout-x-large\\\" class.\\n   *\\n   * @param  {number} [breakpoints.huge]\\n   *         The maximum width for the \\\"vjs-layout-huge\\\" class.\\n   *\\n   * @return {Object}\\n   *         An object mapping breakpoint names to maximum width values.\\n   */\\n  ;\\n\\n  _proto.breakpoints = function breakpoints(_breakpoints) {\\n    // Used as a getter.\\n    if (_breakpoints === undefined) {\\n      return assign(this.breakpoints_);\\n    }\\n\\n    this.breakpoint_ = '';\\n    this.breakpoints_ = assign({}, DEFAULT_BREAKPOINTS, _breakpoints); // When breakpoint definitions change, we need to update the currently\\n    // selected breakpoint.\\n\\n    this.updateCurrentBreakpoint_(); // Clone the breakpoints before returning.\\n\\n    return assign(this.breakpoints_);\\n  }\\n  /**\\n   * Get or set a flag indicating whether or not this player should adjust\\n   * its UI based on its dimensions.\\n   *\\n   * @param  {boolean} value\\n   *         Should be `true` if the player should adjust its UI based on its\\n   *         dimensions; otherwise, should be `false`.\\n   *\\n   * @return {boolean}\\n   *         Will be `true` if this player should adjust its UI based on its\\n   *         dimensions; otherwise, will be `false`.\\n   */\\n  ;\\n\\n  _proto.responsive = function responsive(value) {\\n    // Used as a getter.\\n    if (value === undefined) {\\n      return this.responsive_;\\n    }\\n\\n    value = Boolean(value);\\n    var current = this.responsive_; // Nothing changed.\\n\\n    if (value === current) {\\n      return;\\n    } // The value actually changed, set it.\\n\\n\\n    this.responsive_ = value; // Start listening for breakpoints and set the initial breakpoint if the\\n    // player is now responsive.\\n\\n    if (value) {\\n      this.on('playerresize', this.updateCurrentBreakpoint_);\\n      this.updateCurrentBreakpoint_(); // Stop listening for breakpoints if the player is no longer responsive.\\n    } else {\\n      this.off('playerresize', this.updateCurrentBreakpoint_);\\n      this.removeCurrentBreakpoint_();\\n    }\\n\\n    return value;\\n  }\\n  /**\\n   * Get current breakpoint name, if any.\\n   *\\n   * @return {string}\\n   *         If there is currently a breakpoint set, returns a the key from the\\n   *         breakpoints object matching it. Otherwise, returns an empty string.\\n   */\\n  ;\\n\\n  _proto.currentBreakpoint = function currentBreakpoint() {\\n    return this.breakpoint_;\\n  }\\n  /**\\n   * Get the current breakpoint class name.\\n   *\\n   * @return {string}\\n   *         The matching class name (e.g. `\\\"vjs-layout-tiny\\\"` or\\n   *         `\\\"vjs-layout-large\\\"`) for the current breakpoint. Empty string if\\n   *         there is no current breakpoint.\\n   */\\n  ;\\n\\n  _proto.currentBreakpointClass = function currentBreakpointClass() {\\n    return BREAKPOINT_CLASSES[this.breakpoint_] || '';\\n  }\\n  /**\\n   * An object that describes a single piece of media.\\n   *\\n   * Properties that are not part of this type description will be retained; so,\\n   * this can be viewed as a generic metadata storage mechanism as well.\\n   *\\n   * @see      {@link https://wicg.github.io/mediasession/#the-mediametadata-interface}\\n   * @typedef  {Object} Player~MediaObject\\n   *\\n   * @property {string} [album]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API.\\n   *\\n   * @property {string} [artist]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API.\\n   *\\n   * @property {Object[]} [artwork]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API. If not specified, will be populated via the `poster`, if\\n   *           available.\\n   *\\n   * @property {string} [poster]\\n   *           URL to an image that will display before playback.\\n   *\\n   * @property {Tech~SourceObject|Tech~SourceObject[]|string} [src]\\n   *           A single source object, an array of source objects, or a string\\n   *           referencing a URL to a media source. It is _highly recommended_\\n   *           that an object or array of objects is used here, so that source\\n   *           selection algorithms can take the `type` into account.\\n   *\\n   * @property {string} [title]\\n   *           Unused, except if this object is passed to the `MediaSession`\\n   *           API.\\n   *\\n   * @property {Object[]} [textTracks]\\n   *           An array of objects to be used to create text tracks, following\\n   *           the {@link https://www.w3.org/TR/html50/embedded-content-0.html#the-track-element|native track element format}.\\n   *           For ease of removal, these will be created as \\\"remote\\\" text\\n   *           tracks and set to automatically clean up on source changes.\\n   *\\n   *           These objects may have properties like `src`, `kind`, `label`,\\n   *           and `language`, see {@link Tech#createRemoteTextTrack}.\\n   */\\n\\n  /**\\n   * Populate the player using a {@link Player~MediaObject|MediaObject}.\\n   *\\n   * @param  {Player~MediaObject} media\\n   *         A media object.\\n   *\\n   * @param  {Function} ready\\n   *         A callback to be called when the player is ready.\\n   */\\n  ;\\n\\n  _proto.loadMedia = function loadMedia(media, ready) {\\n    var _this17 = this;\\n\\n    if (!media || typeof media !== 'object') {\\n      return;\\n    }\\n\\n    this.reset(); // Clone the media object so it cannot be mutated from outside.\\n\\n    this.cache_.media = mergeOptions(media);\\n    var _this$cache_$media = this.cache_.media,\\n        artwork = _this$cache_$media.artwork,\\n        poster = _this$cache_$media.poster,\\n        src = _this$cache_$media.src,\\n        textTracks = _this$cache_$media.textTracks; // If `artwork` is not given, create it using `poster`.\\n\\n    if (!artwork && poster) {\\n      this.cache_.media.artwork = [{\\n        src: poster,\\n        type: getMimetype(poster)\\n      }];\\n    }\\n\\n    if (src) {\\n      this.src(src);\\n    }\\n\\n    if (poster) {\\n      this.poster(poster);\\n    }\\n\\n    if (Array.isArray(textTracks)) {\\n      textTracks.forEach(function (tt) {\\n        return _this17.addRemoteTextTrack(tt, false);\\n      });\\n    }\\n\\n    this.ready(ready);\\n  }\\n  /**\\n   * Get a clone of the current {@link Player~MediaObject} for this player.\\n   *\\n   * If the `loadMedia` method has not been used, will attempt to return a\\n   * {@link Player~MediaObject} based on the current state of the player.\\n   *\\n   * @return {Player~MediaObject}\\n   */\\n  ;\\n\\n  _proto.getMedia = function getMedia() {\\n    if (!this.cache_.media) {\\n      var poster = this.poster();\\n      var src = this.currentSources();\\n      var textTracks = Array.prototype.map.call(this.remoteTextTracks(), function (tt) {\\n        return {\\n          kind: tt.kind,\\n          label: tt.label,\\n          language: tt.language,\\n          src: tt.src\\n        };\\n      });\\n      var media = {\\n        src: src,\\n        textTracks: textTracks\\n      };\\n\\n      if (poster) {\\n        media.poster = poster;\\n        media.artwork = [{\\n          src: media.poster,\\n          type: getMimetype(media.poster)\\n        }];\\n      }\\n\\n      return media;\\n    }\\n\\n    return mergeOptions(this.cache_.media);\\n  }\\n  /**\\n   * Gets tag settings\\n   *\\n   * @param {Element} tag\\n   *        The player tag\\n   *\\n   * @return {Object}\\n   *         An object containing all of the settings\\n   *         for a player tag\\n   */\\n  ;\\n\\n  Player.getTagSettings = function getTagSettings(tag) {\\n    var baseOptions = {\\n      sources: [],\\n      tracks: []\\n    };\\n    var tagOptions = getAttributes(tag);\\n    var dataSetup = tagOptions['data-setup'];\\n\\n    if (hasClass(tag, 'vjs-fill')) {\\n      tagOptions.fill = true;\\n    }\\n\\n    if (hasClass(tag, 'vjs-fluid')) {\\n      tagOptions.fluid = true;\\n    } // Check if data-setup attr exists.\\n\\n\\n    if (dataSetup !== null) {\\n      // Parse options JSON\\n      // If empty string, make it a parsable json object.\\n      var _safeParseTuple = safe_json_parse_tuple__WEBPACK_IMPORTED_MODULE_7___default()(dataSetup || '{}'),\\n          err = _safeParseTuple[0],\\n          data = _safeParseTuple[1];\\n\\n      if (err) {\\n        log.error(err);\\n      }\\n\\n      assign(tagOptions, data);\\n    }\\n\\n    assign(baseOptions, tagOptions); // Get tag children settings\\n\\n    if (tag.hasChildNodes()) {\\n      var children = tag.childNodes;\\n\\n      for (var i = 0, j = children.length; i < j; i++) {\\n        var child = children[i]; // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\\n\\n        var childName = child.nodeName.toLowerCase();\\n\\n        if (childName === 'source') {\\n          baseOptions.sources.push(getAttributes(child));\\n        } else if (childName === 'track') {\\n          baseOptions.tracks.push(getAttributes(child));\\n        }\\n      }\\n    }\\n\\n    return baseOptions;\\n  }\\n  /**\\n   * Determine whether or not flexbox is supported\\n   *\\n   * @return {boolean}\\n   *         - true if flexbox is supported\\n   *         - false if flexbox is not supported\\n   */\\n  ;\\n\\n  _proto.flexNotSupported_ = function flexNotSupported_() {\\n    var elem = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('i'); // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more\\n    // common flex features that we can rely on when checking for flex support.\\n\\n    return !('flexBasis' in elem.style || 'webkitFlexBasis' in elem.style || 'mozFlexBasis' in elem.style || 'msFlexBasis' in elem.style || // IE10-specific (2012 flex spec), available for completeness\\n    'msFlexOrder' in elem.style);\\n  };\\n\\n  return Player;\\n}(Component);\\n/**\\n * Get the {@link VideoTrackList}\\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#videotracklist\\n *\\n * @return {VideoTrackList}\\n *         the current video track list\\n *\\n * @method Player.prototype.videoTracks\\n */\\n\\n/**\\n * Get the {@link AudioTrackList}\\n * @link https://html.spec.whatwg.org/multipage/embedded-content.html#audiotracklist\\n *\\n * @return {AudioTrackList}\\n *         the current audio track list\\n *\\n * @method Player.prototype.audioTracks\\n */\\n\\n/**\\n * Get the {@link TextTrackList}\\n *\\n * @link http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\\n *\\n * @return {TextTrackList}\\n *         the current text track list\\n *\\n * @method Player.prototype.textTracks\\n */\\n\\n/**\\n * Get the remote {@link TextTrackList}\\n *\\n * @return {TextTrackList}\\n *         The current remote text track list\\n *\\n * @method Player.prototype.remoteTextTracks\\n */\\n\\n/**\\n * Get the remote {@link HtmlTrackElementList} tracks.\\n *\\n * @return {HtmlTrackElementList}\\n *         The current remote text track element list\\n *\\n * @method Player.prototype.remoteTextTrackEls\\n */\\n\\n\\nALL.names.forEach(function (name) {\\n  var props = ALL[name];\\n\\n  Player.prototype[props.getterName] = function () {\\n    if (this.tech_) {\\n      return this.tech_[props.getterName]();\\n    } // if we have not yet loadTech_, we create {video,audio,text}Tracks_\\n    // these will be passed to the tech during loading\\n\\n\\n    this[props.privateName] = this[props.privateName] || new props.ListClass();\\n    return this[props.privateName];\\n  };\\n});\\n/**\\n * Get or set the `Player`'s crossorigin option. For the HTML5 player, this\\n * sets the `crossOrigin` property on the `<video>` tag to control the CORS\\n * behavior.\\n *\\n * @see [Video Element Attributes]{@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin}\\n *\\n * @param {string} [value]\\n *        The value to set the `Player`'s crossorigin to. If an argument is\\n *        given, must be one of `anonymous` or `use-credentials`.\\n *\\n * @return {string|undefined}\\n *         - The current crossorigin value of the `Player` when getting.\\n *         - undefined when setting\\n */\\n\\nPlayer.prototype.crossorigin = Player.prototype.crossOrigin;\\n/**\\n * Global enumeration of players.\\n *\\n * The keys are the player IDs and the values are either the {@link Player}\\n * instance or `null` for disposed players.\\n *\\n * @type {Object}\\n */\\n\\nPlayer.players = {};\\nvar navigator = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.navigator;\\n/*\\n * Player instance options, surfaced using options\\n * options = Player.prototype.options_\\n * Make changes in options, not here.\\n *\\n * @type {Object}\\n * @private\\n */\\n\\nPlayer.prototype.options_ = {\\n  // Default order of fallback technology\\n  techOrder: Tech.defaultTechOrder_,\\n  html5: {},\\n  flash: {},\\n  // default inactivity timeout\\n  inactivityTimeout: 2000,\\n  // default playback rates\\n  playbackRates: [],\\n  // Add playback rate selection by adding rates\\n  // 'playbackRates': [0.5, 1, 1.5, 2],\\n  liveui: false,\\n  // Included control sets\\n  children: ['mediaLoader', 'posterImage', 'textTrackDisplay', 'loadingSpinner', 'bigPlayButton', 'liveTracker', 'controlBar', 'errorDisplay', 'textTrackSettings', 'resizeManager'],\\n  language: navigator && (navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language) || 'en',\\n  // locales and their language translations\\n  languages: {},\\n  // Default message to show when a video cannot be played.\\n  notSupportedMessage: 'No compatible source was found for this media.',\\n  fullscreen: {\\n    options: {\\n      navigationUI: 'hide'\\n    }\\n  },\\n  breakpoints: {},\\n  responsive: false\\n};\\n[\\n/**\\n * Returns whether or not the player is in the \\\"ended\\\" state.\\n *\\n * @return {Boolean} True if the player is in the ended state, false if not.\\n * @method Player#ended\\n */\\n'ended',\\n/**\\n * Returns whether or not the player is in the \\\"seeking\\\" state.\\n *\\n * @return {Boolean} True if the player is in the seeking state, false if not.\\n * @method Player#seeking\\n */\\n'seeking',\\n/**\\n * Returns the TimeRanges of the media that are currently available\\n * for seeking to.\\n *\\n * @return {TimeRanges} the seekable intervals of the media timeline\\n * @method Player#seekable\\n */\\n'seekable',\\n/**\\n * Returns the current state of network activity for the element, from\\n * the codes in the list below.\\n * - NETWORK_EMPTY (numeric value 0)\\n *   The element has not yet been initialised. All attributes are in\\n *   their initial states.\\n * - NETWORK_IDLE (numeric value 1)\\n *   The element's resource selection algorithm is active and has\\n *   selected a resource, but it is not actually using the network at\\n *   this time.\\n * - NETWORK_LOADING (numeric value 2)\\n *   The user agent is actively trying to download data.\\n * - NETWORK_NO_SOURCE (numeric value 3)\\n *   The element's resource selection algorithm is active, but it has\\n *   not yet found a resource to use.\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\\n * @return {number} the current network activity state\\n * @method Player#networkState\\n */\\n'networkState',\\n/**\\n * Returns a value that expresses the current state of the element\\n * with respect to rendering the current playback position, from the\\n * codes in the list below.\\n * - HAVE_NOTHING (numeric value 0)\\n *   No information regarding the media resource is available.\\n * - HAVE_METADATA (numeric value 1)\\n *   Enough of the resource has been obtained that the duration of the\\n *   resource is available.\\n * - HAVE_CURRENT_DATA (numeric value 2)\\n *   Data for the immediate current playback position is available.\\n * - HAVE_FUTURE_DATA (numeric value 3)\\n *   Data for the immediate current playback position is available, as\\n *   well as enough data for the user agent to advance the current\\n *   playback position in the direction of playback.\\n * - HAVE_ENOUGH_DATA (numeric value 4)\\n *   The user agent estimates that enough data is available for\\n *   playback to proceed uninterrupted.\\n *\\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\\n * @return {number} the current playback rendering state\\n * @method Player#readyState\\n */\\n'readyState'].forEach(function (fn) {\\n  Player.prototype[fn] = function () {\\n    return this.techGet_(fn);\\n  };\\n});\\nTECH_EVENTS_RETRIGGER.forEach(function (event) {\\n  Player.prototype[\\\"handleTech\\\" + toTitleCase(event) + \\\"_\\\"] = function () {\\n    return this.trigger(event);\\n  };\\n});\\n/**\\n * Fired when the player has initial duration and dimension information\\n *\\n * @event Player#loadedmetadata\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Fired when the player has downloaded data at the current playback position\\n *\\n * @event Player#loadeddata\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Fired when the current playback position has changed *\\n * During playback this is fired every 15-250 milliseconds, depending on the\\n * playback technology in use.\\n *\\n * @event Player#timeupdate\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Fired when the volume changes\\n *\\n * @event Player#volumechange\\n * @type {EventTarget~Event}\\n */\\n\\n/**\\n * Reports whether or not a player has a plugin available.\\n *\\n * This does not report whether or not the plugin has ever been initialized\\n * on this player. For that, [usingPlugin]{@link Player#usingPlugin}.\\n *\\n * @method Player#hasPlugin\\n * @param  {string}  name\\n *         The name of a plugin.\\n *\\n * @return {boolean}\\n *         Whether or not this player has the requested plugin available.\\n */\\n\\n/**\\n * Reports whether or not a player is using a plugin by name.\\n *\\n * For basic plugins, this only reports whether the plugin has _ever_ been\\n * initialized on this player.\\n *\\n * @method Player#usingPlugin\\n * @param  {string} name\\n *         The name of a plugin.\\n *\\n * @return {boolean}\\n *         Whether or not this player is using the requested plugin.\\n */\\n\\nComponent.registerComponent('Player', Player);\\n\\n/**\\n * The base plugin name.\\n *\\n * @private\\n * @constant\\n * @type {string}\\n */\\n\\nvar BASE_PLUGIN_NAME = 'plugin';\\n/**\\n * The key on which a player's active plugins cache is stored.\\n *\\n * @private\\n * @constant\\n * @type     {string}\\n */\\n\\nvar PLUGIN_CACHE_KEY = 'activePlugins_';\\n/**\\n * Stores registered plugins in a private space.\\n *\\n * @private\\n * @type    {Object}\\n */\\n\\nvar pluginStorage = {};\\n/**\\n * Reports whether or not a plugin has been registered.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of a plugin.\\n *\\n * @return {boolean}\\n *          Whether or not the plugin has been registered.\\n */\\n\\nvar pluginExists = function pluginExists(name) {\\n  return pluginStorage.hasOwnProperty(name);\\n};\\n/**\\n * Get a single registered plugin by name.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of a plugin.\\n *\\n * @return {Function|undefined}\\n *          The plugin (or undefined).\\n */\\n\\n\\nvar getPlugin = function getPlugin(name) {\\n  return pluginExists(name) ? pluginStorage[name] : undefined;\\n};\\n/**\\n * Marks a plugin as \\\"active\\\" on a player.\\n *\\n * Also, ensures that the player has an object for tracking active plugins.\\n *\\n * @private\\n * @param   {Player} player\\n *          A Video.js player instance.\\n *\\n * @param   {string} name\\n *          The name of a plugin.\\n */\\n\\n\\nvar markPluginAsActive = function markPluginAsActive(player, name) {\\n  player[PLUGIN_CACHE_KEY] = player[PLUGIN_CACHE_KEY] || {};\\n  player[PLUGIN_CACHE_KEY][name] = true;\\n};\\n/**\\n * Triggers a pair of plugin setup events.\\n *\\n * @private\\n * @param  {Player} player\\n *         A Video.js player instance.\\n *\\n * @param  {Plugin~PluginEventHash} hash\\n *         A plugin event hash.\\n *\\n * @param  {boolean} [before]\\n *         If true, prefixes the event name with \\\"before\\\". In other words,\\n *         use this to trigger \\\"beforepluginsetup\\\" instead of \\\"pluginsetup\\\".\\n */\\n\\n\\nvar triggerSetupEvent = function triggerSetupEvent(player, hash, before) {\\n  var eventName = (before ? 'before' : '') + 'pluginsetup';\\n  player.trigger(eventName, hash);\\n  player.trigger(eventName + ':' + hash.name, hash);\\n};\\n/**\\n * Takes a basic plugin function and returns a wrapper function which marks\\n * on the player that the plugin has been activated.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of the plugin.\\n *\\n * @param   {Function} plugin\\n *          The basic plugin.\\n *\\n * @return {Function}\\n *          A wrapper function for the given plugin.\\n */\\n\\n\\nvar createBasicPlugin = function createBasicPlugin(name, plugin) {\\n  var basicPluginWrapper = function basicPluginWrapper() {\\n    // We trigger the \\\"beforepluginsetup\\\" and \\\"pluginsetup\\\" events on the player\\n    // regardless, but we want the hash to be consistent with the hash provided\\n    // for advanced plugins.\\n    //\\n    // The only potentially counter-intuitive thing here is the `instance` in\\n    // the \\\"pluginsetup\\\" event is the value returned by the `plugin` function.\\n    triggerSetupEvent(this, {\\n      name: name,\\n      plugin: plugin,\\n      instance: null\\n    }, true);\\n    var instance = plugin.apply(this, arguments);\\n    markPluginAsActive(this, name);\\n    triggerSetupEvent(this, {\\n      name: name,\\n      plugin: plugin,\\n      instance: instance\\n    });\\n    return instance;\\n  };\\n\\n  Object.keys(plugin).forEach(function (prop) {\\n    basicPluginWrapper[prop] = plugin[prop];\\n  });\\n  return basicPluginWrapper;\\n};\\n/**\\n * Takes a plugin sub-class and returns a factory function for generating\\n * instances of it.\\n *\\n * This factory function will replace itself with an instance of the requested\\n * sub-class of Plugin.\\n *\\n * @private\\n * @param   {string} name\\n *          The name of the plugin.\\n *\\n * @param   {Plugin} PluginSubClass\\n *          The advanced plugin.\\n *\\n * @return {Function}\\n */\\n\\n\\nvar createPluginFactory = function createPluginFactory(name, PluginSubClass) {\\n  // Add a `name` property to the plugin prototype so that each plugin can\\n  // refer to itself by name.\\n  PluginSubClass.prototype.name = name;\\n  return function () {\\n    triggerSetupEvent(this, {\\n      name: name,\\n      plugin: PluginSubClass,\\n      instance: null\\n    }, true);\\n\\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n      args[_key] = arguments[_key];\\n    }\\n\\n    var instance = _babel_runtime_helpers_construct__WEBPACK_IMPORTED_MODULE_11___default()(PluginSubClass, [this].concat(args)); // The plugin is replaced by a function that returns the current instance.\\n\\n\\n    this[name] = function () {\\n      return instance;\\n    };\\n\\n    triggerSetupEvent(this, instance.getEventHash());\\n    return instance;\\n  };\\n};\\n/**\\n * Parent class for all advanced plugins.\\n *\\n * @mixes   module:evented~EventedMixin\\n * @mixes   module:stateful~StatefulMixin\\n * @fires   Player#beforepluginsetup\\n * @fires   Player#beforepluginsetup:$name\\n * @fires   Player#pluginsetup\\n * @fires   Player#pluginsetup:$name\\n * @listens Player#dispose\\n * @throws  {Error}\\n *          If attempting to instantiate the base {@link Plugin} class\\n *          directly instead of via a sub-class.\\n */\\n\\n\\nvar Plugin = /*#__PURE__*/function () {\\n  /**\\n   * Creates an instance of this class.\\n   *\\n   * Sub-classes should call `super` to ensure plugins are properly initialized.\\n   *\\n   * @param {Player} player\\n   *        A Video.js player instance.\\n   */\\n  function Plugin(player) {\\n    if (this.constructor === Plugin) {\\n      throw new Error('Plugin must be sub-classed; not directly instantiated.');\\n    }\\n\\n    this.player = player; // Make this object evented, but remove the added `trigger` method so we\\n    // use the prototype version instead.\\n\\n    evented(this);\\n    delete this.trigger;\\n    stateful(this, this.constructor.defaultState);\\n    markPluginAsActive(player, this.name); // Auto-bind the dispose method so we can use it as a listener and unbind\\n    // it later easily.\\n\\n    this.dispose = bind(this, this.dispose); // If the player is disposed, dispose the plugin.\\n\\n    player.on('dispose', this.dispose);\\n  }\\n  /**\\n   * Get the version of the plugin that was set on <pluginName>.VERSION\\n   */\\n\\n\\n  var _proto = Plugin.prototype;\\n\\n  _proto.version = function version() {\\n    return this.constructor.VERSION;\\n  }\\n  /**\\n   * Each event triggered by plugins includes a hash of additional data with\\n   * conventional properties.\\n   *\\n   * This returns that object or mutates an existing hash.\\n   *\\n   * @param   {Object} [hash={}]\\n   *          An object to be used as event an event hash.\\n   *\\n   * @return {Plugin~PluginEventHash}\\n   *          An event hash object with provided properties mixed-in.\\n   */\\n  ;\\n\\n  _proto.getEventHash = function getEventHash(hash) {\\n    if (hash === void 0) {\\n      hash = {};\\n    }\\n\\n    hash.name = this.name;\\n    hash.plugin = this.constructor;\\n    hash.instance = this;\\n    return hash;\\n  }\\n  /**\\n   * Triggers an event on the plugin object and overrides\\n   * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}.\\n   *\\n   * @param   {string|Object} event\\n   *          An event type or an object with a type property.\\n   *\\n   * @param   {Object} [hash={}]\\n   *          Additional data hash to merge with a\\n   *          {@link Plugin~PluginEventHash|PluginEventHash}.\\n   *\\n   * @return {boolean}\\n   *          Whether or not default was prevented.\\n   */\\n  ;\\n\\n  _proto.trigger = function trigger$1(event, hash) {\\n    if (hash === void 0) {\\n      hash = {};\\n    }\\n\\n    return trigger(this.eventBusEl_, event, this.getEventHash(hash));\\n  }\\n  /**\\n   * Handles \\\"statechanged\\\" events on the plugin. No-op by default, override by\\n   * subclassing.\\n   *\\n   * @abstract\\n   * @param    {Event} e\\n   *           An event object provided by a \\\"statechanged\\\" event.\\n   *\\n   * @param    {Object} e.changes\\n   *           An object describing changes that occurred with the \\\"statechanged\\\"\\n   *           event.\\n   */\\n  ;\\n\\n  _proto.handleStateChanged = function handleStateChanged(e) {}\\n  /**\\n   * Disposes a plugin.\\n   *\\n   * Subclasses can override this if they want, but for the sake of safety,\\n   * it's probably best to subscribe the \\\"dispose\\\" event.\\n   *\\n   * @fires Plugin#dispose\\n   */\\n  ;\\n\\n  _proto.dispose = function dispose() {\\n    var name = this.name,\\n        player = this.player;\\n    /**\\n     * Signals that a advanced plugin is about to be disposed.\\n     *\\n     * @event Plugin#dispose\\n     * @type  {EventTarget~Event}\\n     */\\n\\n    this.trigger('dispose');\\n    this.off();\\n    player.off('dispose', this.dispose); // Eliminate any possible sources of leaking memory by clearing up\\n    // references between the player and the plugin instance and nulling out\\n    // the plugin's state and replacing methods with a function that throws.\\n\\n    player[PLUGIN_CACHE_KEY][name] = false;\\n    this.player = this.state = null; // Finally, replace the plugin name on the player with a new factory\\n    // function, so that the plugin is ready to be set up again.\\n\\n    player[name] = createPluginFactory(name, pluginStorage[name]);\\n  }\\n  /**\\n   * Determines if a plugin is a basic plugin (i.e. not a sub-class of `Plugin`).\\n   *\\n   * @param   {string|Function} plugin\\n   *          If a string, matches the name of a plugin. If a function, will be\\n   *          tested directly.\\n   *\\n   * @return {boolean}\\n   *          Whether or not a plugin is a basic plugin.\\n   */\\n  ;\\n\\n  Plugin.isBasic = function isBasic(plugin) {\\n    var p = typeof plugin === 'string' ? getPlugin(plugin) : plugin;\\n    return typeof p === 'function' && !Plugin.prototype.isPrototypeOf(p.prototype);\\n  }\\n  /**\\n   * Register a Video.js plugin.\\n   *\\n   * @param   {string} name\\n   *          The name of the plugin to be registered. Must be a string and\\n   *          must not match an existing plugin or a method on the `Player`\\n   *          prototype.\\n   *\\n   * @param   {Function} plugin\\n   *          A sub-class of `Plugin` or a function for basic plugins.\\n   *\\n   * @return {Function}\\n   *          For advanced plugins, a factory function for that plugin. For\\n   *          basic plugins, a wrapper function that initializes the plugin.\\n   */\\n  ;\\n\\n  Plugin.registerPlugin = function registerPlugin(name, plugin) {\\n    if (typeof name !== 'string') {\\n      throw new Error(\\\"Illegal plugin name, \\\\\\\"\\\" + name + \\\"\\\\\\\", must be a string, was \\\" + typeof name + \\\".\\\");\\n    }\\n\\n    if (pluginExists(name)) {\\n      log.warn(\\\"A plugin named \\\\\\\"\\\" + name + \\\"\\\\\\\" already exists. You may want to avoid re-registering plugins!\\\");\\n    } else if (Player.prototype.hasOwnProperty(name)) {\\n      throw new Error(\\\"Illegal plugin name, \\\\\\\"\\\" + name + \\\"\\\\\\\", cannot share a name with an existing player method!\\\");\\n    }\\n\\n    if (typeof plugin !== 'function') {\\n      throw new Error(\\\"Illegal plugin for \\\\\\\"\\\" + name + \\\"\\\\\\\", must be a function, was \\\" + typeof plugin + \\\".\\\");\\n    }\\n\\n    pluginStorage[name] = plugin; // Add a player prototype method for all sub-classed plugins (but not for\\n    // the base Plugin class).\\n\\n    if (name !== BASE_PLUGIN_NAME) {\\n      if (Plugin.isBasic(plugin)) {\\n        Player.prototype[name] = createBasicPlugin(name, plugin);\\n      } else {\\n        Player.prototype[name] = createPluginFactory(name, plugin);\\n      }\\n    }\\n\\n    return plugin;\\n  }\\n  /**\\n   * De-register a Video.js plugin.\\n   *\\n   * @param  {string} name\\n   *         The name of the plugin to be de-registered. Must be a string that\\n   *         matches an existing plugin.\\n   *\\n   * @throws {Error}\\n   *         If an attempt is made to de-register the base plugin.\\n   */\\n  ;\\n\\n  Plugin.deregisterPlugin = function deregisterPlugin(name) {\\n    if (name === BASE_PLUGIN_NAME) {\\n      throw new Error('Cannot de-register base plugin.');\\n    }\\n\\n    if (pluginExists(name)) {\\n      delete pluginStorage[name];\\n      delete Player.prototype[name];\\n    }\\n  }\\n  /**\\n   * Gets an object containing multiple Video.js plugins.\\n   *\\n   * @param   {Array} [names]\\n   *          If provided, should be an array of plugin names. Defaults to _all_\\n   *          plugin names.\\n   *\\n   * @return {Object|undefined}\\n   *          An object containing plugin(s) associated with their name(s) or\\n   *          `undefined` if no matching plugins exist).\\n   */\\n  ;\\n\\n  Plugin.getPlugins = function getPlugins(names) {\\n    if (names === void 0) {\\n      names = Object.keys(pluginStorage);\\n    }\\n\\n    var result;\\n    names.forEach(function (name) {\\n      var plugin = getPlugin(name);\\n\\n      if (plugin) {\\n        result = result || {};\\n        result[name] = plugin;\\n      }\\n    });\\n    return result;\\n  }\\n  /**\\n   * Gets a plugin's version, if available\\n   *\\n   * @param   {string} name\\n   *          The name of a plugin.\\n   *\\n   * @return {string}\\n   *          The plugin's version or an empty string.\\n   */\\n  ;\\n\\n  Plugin.getPluginVersion = function getPluginVersion(name) {\\n    var plugin = getPlugin(name);\\n    return plugin && plugin.VERSION || '';\\n  };\\n\\n  return Plugin;\\n}();\\n/**\\n * Gets a plugin by name if it exists.\\n *\\n * @static\\n * @method   getPlugin\\n * @memberOf Plugin\\n * @param    {string} name\\n *           The name of a plugin.\\n *\\n * @returns  {Function|undefined}\\n *           The plugin (or `undefined`).\\n */\\n\\n\\nPlugin.getPlugin = getPlugin;\\n/**\\n * The name of the base plugin class as it is registered.\\n *\\n * @type {string}\\n */\\n\\nPlugin.BASE_PLUGIN_NAME = BASE_PLUGIN_NAME;\\nPlugin.registerPlugin(BASE_PLUGIN_NAME, Plugin);\\n/**\\n * Documented in player.js\\n *\\n * @ignore\\n */\\n\\nPlayer.prototype.usingPlugin = function (name) {\\n  return !!this[PLUGIN_CACHE_KEY] && this[PLUGIN_CACHE_KEY][name] === true;\\n};\\n/**\\n * Documented in player.js\\n *\\n * @ignore\\n */\\n\\n\\nPlayer.prototype.hasPlugin = function (name) {\\n  return !!pluginExists(name);\\n};\\n/**\\n * Signals that a plugin is about to be set up on a player.\\n *\\n * @event    Player#beforepluginsetup\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * Signals that a plugin is about to be set up on a player - by name. The name\\n * is the name of the plugin.\\n *\\n * @event    Player#beforepluginsetup:$name\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * Signals that a plugin has just been set up on a player.\\n *\\n * @event    Player#pluginsetup\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * Signals that a plugin has just been set up on a player - by name. The name\\n * is the name of the plugin.\\n *\\n * @event    Player#pluginsetup:$name\\n * @type     {Plugin~PluginEventHash}\\n */\\n\\n/**\\n * @typedef  {Object} Plugin~PluginEventHash\\n *\\n * @property {string} instance\\n *           For basic plugins, the return value of the plugin function. For\\n *           advanced plugins, the plugin instance on which the event is fired.\\n *\\n * @property {string} name\\n *           The name of the plugin.\\n *\\n * @property {string} plugin\\n *           For basic plugins, the plugin function. For advanced plugins, the\\n *           plugin class/constructor.\\n */\\n\\n/**\\n * @file extend.js\\n * @module extend\\n */\\n/**\\n * Used to subclass an existing class by emulating ES subclassing using the\\n * `extends` keyword.\\n *\\n * @function\\n * @example\\n * var MyComponent = videojs.extend(videojs.getComponent('Component'), {\\n *   myCustomMethod: function() {\\n *     // Do things in my method.\\n *   }\\n * });\\n *\\n * @param    {Function} superClass\\n *           The class to inherit from\\n *\\n * @param    {Object}   [subClassMethods={}]\\n *           Methods of the new class\\n *\\n * @return   {Function}\\n *           The new class with subClassMethods that inherited superClass.\\n */\\n\\nvar extend = function extend(superClass, subClassMethods) {\\n  if (subClassMethods === void 0) {\\n    subClassMethods = {};\\n  }\\n\\n  var subClass = function subClass() {\\n    superClass.apply(this, arguments);\\n  };\\n\\n  var methods = {};\\n\\n  if (typeof subClassMethods === 'object') {\\n    if (subClassMethods.constructor !== Object.prototype.constructor) {\\n      subClass = subClassMethods.constructor;\\n    }\\n\\n    methods = subClassMethods;\\n  } else if (typeof subClassMethods === 'function') {\\n    subClass = subClassMethods;\\n  }\\n\\n  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_12___default()(subClass, superClass); // this is needed for backward-compatibility and node compatibility.\\n\\n\\n  if (superClass) {\\n    subClass.super_ = superClass;\\n  } // Extend subObj's prototype with functions and other properties from props\\n\\n\\n  for (var name in methods) {\\n    if (methods.hasOwnProperty(name)) {\\n      subClass.prototype[name] = methods[name];\\n    }\\n  }\\n\\n  return subClass;\\n};\\n\\n/**\\n * @file video.js\\n * @module videojs\\n */\\n/**\\n * Normalize an `id` value by trimming off a leading `#`\\n *\\n * @private\\n * @param   {string} id\\n *          A string, maybe with a leading `#`.\\n *\\n * @return {string}\\n *          The string, without any leading `#`.\\n */\\n\\nvar normalizeId = function normalizeId(id) {\\n  return id.indexOf('#') === 0 ? id.slice(1) : id;\\n};\\n/**\\n * The `videojs()` function doubles as the main function for users to create a\\n * {@link Player} instance as well as the main library namespace.\\n *\\n * It can also be used as a getter for a pre-existing {@link Player} instance.\\n * However, we _strongly_ recommend using `videojs.getPlayer()` for this\\n * purpose because it avoids any potential for unintended initialization.\\n *\\n * Due to [limitations](https://github.com/jsdoc3/jsdoc/issues/955#issuecomment-313829149)\\n * of our JSDoc template, we cannot properly document this as both a function\\n * and a namespace, so its function signature is documented here.\\n *\\n * #### Arguments\\n * ##### id\\n * string|Element, **required**\\n *\\n * Video element or video element ID.\\n *\\n * ##### options\\n * Object, optional\\n *\\n * Options object for providing settings.\\n * See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\\n *\\n * ##### ready\\n * {@link Component~ReadyCallback}, optional\\n *\\n * A function to be called when the {@link Player} and {@link Tech} are ready.\\n *\\n * #### Return Value\\n *\\n * The `videojs()` function returns a {@link Player} instance.\\n *\\n * @namespace\\n *\\n * @borrows AudioTrack as AudioTrack\\n * @borrows Component.getComponent as getComponent\\n * @borrows module:computed-style~computedStyle as computedStyle\\n * @borrows module:events.on as on\\n * @borrows module:events.one as one\\n * @borrows module:events.off as off\\n * @borrows module:events.trigger as trigger\\n * @borrows EventTarget as EventTarget\\n * @borrows module:extend~extend as extend\\n * @borrows module:fn.bind as bind\\n * @borrows module:format-time.formatTime as formatTime\\n * @borrows module:format-time.resetFormatTime as resetFormatTime\\n * @borrows module:format-time.setFormatTime as setFormatTime\\n * @borrows module:merge-options.mergeOptions as mergeOptions\\n * @borrows module:middleware.use as use\\n * @borrows Player.players as players\\n * @borrows Plugin.registerPlugin as registerPlugin\\n * @borrows Plugin.deregisterPlugin as deregisterPlugin\\n * @borrows Plugin.getPlugins as getPlugins\\n * @borrows Plugin.getPlugin as getPlugin\\n * @borrows Plugin.getPluginVersion as getPluginVersion\\n * @borrows Tech.getTech as getTech\\n * @borrows Tech.registerTech as registerTech\\n * @borrows TextTrack as TextTrack\\n * @borrows module:time-ranges.createTimeRanges as createTimeRange\\n * @borrows module:time-ranges.createTimeRanges as createTimeRanges\\n * @borrows module:url.isCrossOrigin as isCrossOrigin\\n * @borrows module:url.parseUrl as parseUrl\\n * @borrows VideoTrack as VideoTrack\\n *\\n * @param  {string|Element} id\\n *         Video element or video element ID.\\n *\\n * @param  {Object} [options]\\n *         Options object for providing settings.\\n *         See: [Options Guide](https://docs.videojs.com/tutorial-options.html).\\n *\\n * @param  {Component~ReadyCallback} [ready]\\n *         A function to be called when the {@link Player} and {@link Tech} are\\n *         ready.\\n *\\n * @return {Player}\\n *         The `videojs()` function returns a {@link Player|Player} instance.\\n */\\n\\n\\nfunction videojs$1(id, options, ready) {\\n  var player = videojs$1.getPlayer(id);\\n\\n  if (player) {\\n    if (options) {\\n      log.warn(\\\"Player \\\\\\\"\\\" + id + \\\"\\\\\\\" is already initialised. Options will not be applied.\\\");\\n    }\\n\\n    if (ready) {\\n      player.ready(ready);\\n    }\\n\\n    return player;\\n  }\\n\\n  var el = typeof id === 'string' ? $('#' + normalizeId(id)) : id;\\n\\n  if (!isEl(el)) {\\n    throw new TypeError('The element or ID supplied is not valid. (videojs)');\\n  } // document.body.contains(el) will only check if el is contained within that one document.\\n  // This causes problems for elements in iframes.\\n  // Instead, use the element's ownerDocument instead of the global document.\\n  // This will make sure that the element is indeed in the dom of that document.\\n  // Additionally, check that the document in question has a default view.\\n  // If the document is no longer attached to the dom, the defaultView of the document will be null.\\n\\n\\n  if (!el.ownerDocument.defaultView || !el.ownerDocument.body.contains(el)) {\\n    log.warn('The element supplied is not included in the DOM');\\n  }\\n\\n  options = options || {};\\n  videojs$1.hooks('beforesetup').forEach(function (hookFunction) {\\n    var opts = hookFunction(el, mergeOptions(options));\\n\\n    if (!isObject(opts) || Array.isArray(opts)) {\\n      log.error('please return an object in beforesetup hooks');\\n      return;\\n    }\\n\\n    options = mergeOptions(options, opts);\\n  }); // We get the current \\\"Player\\\" component here in case an integration has\\n  // replaced it with a custom player.\\n\\n  var PlayerComponent = Component.getComponent('Player');\\n  player = new PlayerComponent(el, options, ready);\\n  videojs$1.hooks('setup').forEach(function (hookFunction) {\\n    return hookFunction(player);\\n  });\\n  return player;\\n}\\n/**\\n * An Object that contains lifecycle hooks as keys which point to an array\\n * of functions that are run when a lifecycle is triggered\\n *\\n * @private\\n */\\n\\n\\nvideojs$1.hooks_ = {};\\n/**\\n * Get a list of hooks for a specific lifecycle\\n *\\n * @param  {string} type\\n *         the lifecyle to get hooks from\\n *\\n * @param  {Function|Function[]} [fn]\\n *         Optionally add a hook (or hooks) to the lifecycle that your are getting.\\n *\\n * @return {Array}\\n *         an array of hooks, or an empty array if there are none.\\n */\\n\\nvideojs$1.hooks = function (type, fn) {\\n  videojs$1.hooks_[type] = videojs$1.hooks_[type] || [];\\n\\n  if (fn) {\\n    videojs$1.hooks_[type] = videojs$1.hooks_[type].concat(fn);\\n  }\\n\\n  return videojs$1.hooks_[type];\\n};\\n/**\\n * Add a function hook to a specific videojs lifecycle.\\n *\\n * @param {string} type\\n *        the lifecycle to hook the function to.\\n *\\n * @param {Function|Function[]}\\n *        The function or array of functions to attach.\\n */\\n\\n\\nvideojs$1.hook = function (type, fn) {\\n  videojs$1.hooks(type, fn);\\n};\\n/**\\n * Add a function hook that will only run once to a specific videojs lifecycle.\\n *\\n * @param {string} type\\n *        the lifecycle to hook the function to.\\n *\\n * @param {Function|Function[]}\\n *        The function or array of functions to attach.\\n */\\n\\n\\nvideojs$1.hookOnce = function (type, fn) {\\n  videojs$1.hooks(type, [].concat(fn).map(function (original) {\\n    var wrapper = function wrapper() {\\n      videojs$1.removeHook(type, wrapper);\\n      return original.apply(void 0, arguments);\\n    };\\n\\n    return wrapper;\\n  }));\\n};\\n/**\\n * Remove a hook from a specific videojs lifecycle.\\n *\\n * @param  {string} type\\n *         the lifecycle that the function hooked to\\n *\\n * @param  {Function} fn\\n *         The hooked function to remove\\n *\\n * @return {boolean}\\n *         The function that was removed or undef\\n */\\n\\n\\nvideojs$1.removeHook = function (type, fn) {\\n  var index = videojs$1.hooks(type).indexOf(fn);\\n\\n  if (index <= -1) {\\n    return false;\\n  }\\n\\n  videojs$1.hooks_[type] = videojs$1.hooks_[type].slice();\\n  videojs$1.hooks_[type].splice(index, 1);\\n  return true;\\n}; // Add default styles\\n\\n\\nif (global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VIDEOJS_NO_DYNAMIC_STYLE !== true && isReal()) {\\n  var style = $('.vjs-styles-defaults');\\n\\n  if (!style) {\\n    style = createStyleElement('vjs-styles-defaults');\\n    var head = $('head');\\n\\n    if (head) {\\n      head.insertBefore(style, head.firstChild);\\n    }\\n\\n    setTextContent(style, \\\"\\\\n      .video-js {\\\\n        width: 300px;\\\\n        height: 150px;\\\\n      }\\\\n\\\\n      .vjs-fluid {\\\\n        padding-top: 56.25%\\\\n      }\\\\n    \\\");\\n  }\\n} // Run Auto-load players\\n// You have to wait at least once in case this script is loaded after your\\n// video in the DOM (weird behavior only with minified version)\\n\\n\\nautoSetupTimeout(1, videojs$1);\\n/**\\n * Current Video.js version. Follows [semantic versioning](https://semver.org/).\\n *\\n * @type {string}\\n */\\n\\nvideojs$1.VERSION = version;\\n/**\\n * The global options object. These are the settings that take effect\\n * if no overrides are specified when the player is created.\\n *\\n * @type {Object}\\n */\\n\\nvideojs$1.options = Player.prototype.options_;\\n/**\\n * Get an object with the currently created players, keyed by player ID\\n *\\n * @return {Object}\\n *         The created players\\n */\\n\\nvideojs$1.getPlayers = function () {\\n  return Player.players;\\n};\\n/**\\n * Get a single player based on an ID or DOM element.\\n *\\n * This is useful if you want to check if an element or ID has an associated\\n * Video.js player, but not create one if it doesn't.\\n *\\n * @param   {string|Element} id\\n *          An HTML element - `<video>`, `<audio>`, or `<video-js>` -\\n *          or a string matching the `id` of such an element.\\n *\\n * @return {Player|undefined}\\n *          A player instance or `undefined` if there is no player instance\\n *          matching the argument.\\n */\\n\\n\\nvideojs$1.getPlayer = function (id) {\\n  var players = Player.players;\\n  var tag;\\n\\n  if (typeof id === 'string') {\\n    var nId = normalizeId(id);\\n    var player = players[nId];\\n\\n    if (player) {\\n      return player;\\n    }\\n\\n    tag = $('#' + nId);\\n  } else {\\n    tag = id;\\n  }\\n\\n  if (isEl(tag)) {\\n    var _tag = tag,\\n        _player = _tag.player,\\n        playerId = _tag.playerId; // Element may have a `player` property referring to an already created\\n    // player instance. If so, return that.\\n\\n    if (_player || players[playerId]) {\\n      return _player || players[playerId];\\n    }\\n  }\\n};\\n/**\\n * Returns an array of all current players.\\n *\\n * @return {Array}\\n *         An array of all players. The array will be in the order that\\n *         `Object.keys` provides, which could potentially vary between\\n *         JavaScript engines.\\n *\\n */\\n\\n\\nvideojs$1.getAllPlayers = function () {\\n  return (// Disposed players leave a key with a `null` value, so we need to make sure\\n    // we filter those out.\\n    Object.keys(Player.players).map(function (k) {\\n      return Player.players[k];\\n    }).filter(Boolean)\\n  );\\n};\\n\\nvideojs$1.players = Player.players;\\nvideojs$1.getComponent = Component.getComponent;\\n/**\\n * Register a component so it can referred to by name. Used when adding to other\\n * components, either through addChild `component.addChild('myComponent')` or through\\n * default children options  `{ children: ['myComponent'] }`.\\n *\\n * > NOTE: You could also just initialize the component before adding.\\n * `component.addChild(new MyComponent());`\\n *\\n * @param {string} name\\n *        The class name of the component\\n *\\n * @param {Component} comp\\n *        The component class\\n *\\n * @return {Component}\\n *         The newly registered component\\n */\\n\\nvideojs$1.registerComponent = function (name, comp) {\\n  if (Tech.isTech(comp)) {\\n    log.warn(\\\"The \\\" + name + \\\" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)\\\");\\n  }\\n\\n  Component.registerComponent.call(Component, name, comp);\\n};\\n\\nvideojs$1.getTech = Tech.getTech;\\nvideojs$1.registerTech = Tech.registerTech;\\nvideojs$1.use = use;\\n/**\\n * An object that can be returned by a middleware to signify\\n * that the middleware is being terminated.\\n *\\n * @type {object}\\n * @property {object} middleware.TERMINATOR\\n */\\n\\nObject.defineProperty(videojs$1, 'middleware', {\\n  value: {},\\n  writeable: false,\\n  enumerable: true\\n});\\nObject.defineProperty(videojs$1.middleware, 'TERMINATOR', {\\n  value: TERMINATOR,\\n  writeable: false,\\n  enumerable: true\\n});\\n/**\\n * A reference to the {@link module:browser|browser utility module} as an object.\\n *\\n * @type {Object}\\n * @see  {@link module:browser|browser}\\n */\\n\\nvideojs$1.browser = browser;\\n/**\\n * Use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED} instead; only\\n * included for backward-compatibility with 4.x.\\n *\\n * @deprecated Since version 5.0, use {@link module:browser.TOUCH_ENABLED|browser.TOUCH_ENABLED instead.\\n * @type {boolean}\\n */\\n\\nvideojs$1.TOUCH_ENABLED = TOUCH_ENABLED;\\nvideojs$1.extend = extend;\\nvideojs$1.mergeOptions = mergeOptions;\\nvideojs$1.bind = bind;\\nvideojs$1.registerPlugin = Plugin.registerPlugin;\\nvideojs$1.deregisterPlugin = Plugin.deregisterPlugin;\\n/**\\n * Deprecated method to register a plugin with Video.js\\n *\\n * @deprecated videojs.plugin() is deprecated; use videojs.registerPlugin() instead\\n *\\n * @param {string} name\\n *        The plugin name\\n *\\n * @param {Plugin|Function} plugin\\n *         The plugin sub-class or function\\n */\\n\\nvideojs$1.plugin = function (name, plugin) {\\n  log.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');\\n  return Plugin.registerPlugin(name, plugin);\\n};\\n\\nvideojs$1.getPlugins = Plugin.getPlugins;\\nvideojs$1.getPlugin = Plugin.getPlugin;\\nvideojs$1.getPluginVersion = Plugin.getPluginVersion;\\n/**\\n * Adding languages so that they're available to all players.\\n * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`\\n *\\n * @param {string} code\\n *        The language code or dictionary property\\n *\\n * @param {Object} data\\n *        The data values to be translated\\n *\\n * @return {Object}\\n *         The resulting language dictionary object\\n */\\n\\nvideojs$1.addLanguage = function (code, data) {\\n  var _mergeOptions;\\n\\n  code = ('' + code).toLowerCase();\\n  videojs$1.options.languages = mergeOptions(videojs$1.options.languages, (_mergeOptions = {}, _mergeOptions[code] = data, _mergeOptions));\\n  return videojs$1.options.languages[code];\\n};\\n/**\\n * A reference to the {@link module:log|log utility module} as an object.\\n *\\n * @type {Function}\\n * @see  {@link module:log|log}\\n */\\n\\n\\nvideojs$1.log = log;\\nvideojs$1.createLogger = createLogger$1;\\nvideojs$1.createTimeRange = videojs$1.createTimeRanges = createTimeRanges;\\nvideojs$1.formatTime = formatTime;\\nvideojs$1.setFormatTime = setFormatTime;\\nvideojs$1.resetFormatTime = resetFormatTime;\\nvideojs$1.parseUrl = parseUrl;\\nvideojs$1.isCrossOrigin = isCrossOrigin;\\nvideojs$1.EventTarget = EventTarget;\\nvideojs$1.on = on;\\nvideojs$1.one = one;\\nvideojs$1.off = off;\\nvideojs$1.trigger = trigger;\\n/**\\n * A cross-browser XMLHttpRequest wrapper.\\n *\\n * @function\\n * @param    {Object} options\\n *           Settings for the request.\\n *\\n * @return   {XMLHttpRequest|XDomainRequest}\\n *           The request object.\\n *\\n * @see      https://github.com/Raynos/xhr\\n */\\n\\nvideojs$1.xhr = _videojs_xhr__WEBPACK_IMPORTED_MODULE_9___default.a;\\nvideojs$1.TextTrack = TextTrack;\\nvideojs$1.AudioTrack = AudioTrack;\\nvideojs$1.VideoTrack = VideoTrack;\\n['isEl', 'isTextNode', 'createEl', 'hasClass', 'addClass', 'removeClass', 'toggleClass', 'setAttributes', 'getAttributes', 'emptyEl', 'appendContent', 'insertContent'].forEach(function (k) {\\n  videojs$1[k] = function () {\\n    log.warn(\\\"videojs.\\\" + k + \\\"() is deprecated; use videojs.dom.\\\" + k + \\\"() instead\\\");\\n    return Dom[k].apply(null, arguments);\\n  };\\n});\\nvideojs$1.computedStyle = computedStyle;\\n/**\\n * A reference to the {@link module:dom|DOM utility module} as an object.\\n *\\n * @type {Object}\\n * @see  {@link module:dom|dom}\\n */\\n\\nvideojs$1.dom = Dom;\\n/**\\n * A reference to the {@link module:url|URL utility module} as an object.\\n *\\n * @type {Object}\\n * @see  {@link module:url|url}\\n */\\n\\nvideojs$1.url = Url;\\nvideojs$1.defineLazyProperty = defineLazyProperty;\\n\\n/**\\n * @videojs/http-streaming\\n * @version 1.13.2\\n * @copyright 2020 Brightcove, Inc\\n * @license Apache-2.0\\n */\\n/**\\n * @file resolve-url.js - Handling how URLs are resolved and manipulated\\n */\\n\\nvar resolveUrl = function resolveUrl(baseURL, relativeURL) {\\n  // return early if we don't need to resolve\\n  if (/^[a-z]+:/i.test(relativeURL)) {\\n    return relativeURL;\\n  } // if the base URL is relative then combine with the current location\\n\\n\\n  if (!/\\\\/\\\\//i.test(baseURL)) {\\n    baseURL = url_toolkit__WEBPACK_IMPORTED_MODULE_13___default.a.buildAbsoluteURL(global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href, baseURL);\\n  }\\n\\n  return url_toolkit__WEBPACK_IMPORTED_MODULE_13___default.a.buildAbsoluteURL(baseURL, relativeURL);\\n};\\n/**\\n * Checks whether xhr request was redirected and returns correct url depending\\n * on `handleManifestRedirects` option\\n *\\n * @api private\\n *\\n * @param  {String} url - an url being requested\\n * @param  {XMLHttpRequest} req - xhr request result\\n *\\n * @return {String}\\n */\\n\\n\\nvar resolveManifestRedirect = function resolveManifestRedirect(handleManifestRedirect, url, req) {\\n  // To understand how the responseURL below is set and generated:\\n  // - https://fetch.spec.whatwg.org/#concept-response-url\\n  // - https://fetch.spec.whatwg.org/#atomic-http-redirect-handling\\n  if (handleManifestRedirect && req.responseURL && url !== req.responseURL) {\\n    return req.responseURL;\\n  }\\n\\n  return url;\\n};\\n\\nvar classCallCheck = function classCallCheck(instance, Constructor) {\\n  if (!(instance instanceof Constructor)) {\\n    throw new TypeError(\\\"Cannot call a class as a function\\\");\\n  }\\n};\\n\\nvar createClass = function () {\\n  function defineProperties(target, props) {\\n    for (var i = 0; i < props.length; i++) {\\n      var descriptor = props[i];\\n      descriptor.enumerable = descriptor.enumerable || false;\\n      descriptor.configurable = true;\\n      if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n      Object.defineProperty(target, descriptor.key, descriptor);\\n    }\\n  }\\n\\n  return function (Constructor, protoProps, staticProps) {\\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n    if (staticProps) defineProperties(Constructor, staticProps);\\n    return Constructor;\\n  };\\n}();\\n\\nvar get$1 = function get(object, property, receiver) {\\n  if (object === null) object = Function.prototype;\\n  var desc = Object.getOwnPropertyDescriptor(object, property);\\n\\n  if (desc === undefined) {\\n    var parent = Object.getPrototypeOf(object);\\n\\n    if (parent === null) {\\n      return undefined;\\n    } else {\\n      return get(parent, property, receiver);\\n    }\\n  } else if (\\\"value\\\" in desc) {\\n    return desc.value;\\n  } else {\\n    var getter = desc.get;\\n\\n    if (getter === undefined) {\\n      return undefined;\\n    }\\n\\n    return getter.call(receiver);\\n  }\\n};\\n\\nvar inherits = function inherits(subClass, superClass) {\\n  if (typeof superClass !== \\\"function\\\" && superClass !== null) {\\n    throw new TypeError(\\\"Super expression must either be null or a function, not \\\" + typeof superClass);\\n  }\\n\\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\\n    constructor: {\\n      value: subClass,\\n      enumerable: false,\\n      writable: true,\\n      configurable: true\\n    }\\n  });\\n  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\\n};\\n\\nvar possibleConstructorReturn = function possibleConstructorReturn(self, call) {\\n  if (!self) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return call && (typeof call === \\\"object\\\" || typeof call === \\\"function\\\") ? call : self;\\n};\\n\\nvar slicedToArray = function () {\\n  function sliceIterator(arr, i) {\\n    var _arr = [];\\n    var _n = true;\\n    var _d = false;\\n    var _e = undefined;\\n\\n    try {\\n      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\\n        _arr.push(_s.value);\\n\\n        if (i && _arr.length === i) break;\\n      }\\n    } catch (err) {\\n      _d = true;\\n      _e = err;\\n    } finally {\\n      try {\\n        if (!_n && _i[\\\"return\\\"]) _i[\\\"return\\\"]();\\n      } finally {\\n        if (_d) throw _e;\\n      }\\n    }\\n\\n    return _arr;\\n  }\\n\\n  return function (arr, i) {\\n    if (Array.isArray(arr)) {\\n      return arr;\\n    } else if (Symbol.iterator in Object(arr)) {\\n      return sliceIterator(arr, i);\\n    } else {\\n      throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance\\\");\\n    }\\n  };\\n}();\\n/**\\n * @file playlist-loader.js\\n *\\n * A state machine that manages the loading, caching, and updating of\\n * M3U8 playlists.\\n *\\n */\\n\\n\\nvar mergeOptions$1 = videojs$1.mergeOptions,\\n    EventTarget$1 = videojs$1.EventTarget,\\n    log$1 = videojs$1.log;\\n/**\\n * Loops through all supported media groups in master and calls the provided\\n * callback for each group\\n *\\n * @param {Object} master\\n *        The parsed master manifest object\\n * @param {Function} callback\\n *        Callback to call for each media group\\n */\\n\\nvar forEachMediaGroup = function forEachMediaGroup(master, callback) {\\n  ['AUDIO', 'SUBTITLES'].forEach(function (mediaType) {\\n    for (var groupKey in master.mediaGroups[mediaType]) {\\n      for (var labelKey in master.mediaGroups[mediaType][groupKey]) {\\n        var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];\\n        callback(mediaProperties, mediaType, groupKey, labelKey);\\n      }\\n    }\\n  });\\n};\\n/**\\n  * Returns a new array of segments that is the result of merging\\n  * properties from an older list of segments onto an updated\\n  * list. No properties on the updated playlist will be overridden.\\n  *\\n  * @param {Array} original the outdated list of segments\\n  * @param {Array} update the updated list of segments\\n  * @param {Number=} offset the index of the first update\\n  * segment in the original segment list. For non-live playlists,\\n  * this should always be zero and does not need to be\\n  * specified. For live playlists, it should be the difference\\n  * between the media sequence numbers in the original and updated\\n  * playlists.\\n  * @return a list of merged segment objects\\n  */\\n\\n\\nvar updateSegments = function updateSegments(original, update, offset) {\\n  var result = update.slice();\\n  offset = offset || 0;\\n  var length = Math.min(original.length, update.length + offset);\\n\\n  for (var i = offset; i < length; i++) {\\n    result[i - offset] = mergeOptions$1(original[i], result[i - offset]);\\n  }\\n\\n  return result;\\n};\\n\\nvar resolveSegmentUris = function resolveSegmentUris(segment, baseUri) {\\n  if (!segment.resolvedUri) {\\n    segment.resolvedUri = resolveUrl(baseUri, segment.uri);\\n  }\\n\\n  if (segment.key && !segment.key.resolvedUri) {\\n    segment.key.resolvedUri = resolveUrl(baseUri, segment.key.uri);\\n  }\\n\\n  if (segment.map && !segment.map.resolvedUri) {\\n    segment.map.resolvedUri = resolveUrl(baseUri, segment.map.uri);\\n  }\\n};\\n/**\\n  * Returns a new master playlist that is the result of merging an\\n  * updated media playlist into the original version. If the\\n  * updated media playlist does not match any of the playlist\\n  * entries in the original master playlist, null is returned.\\n  *\\n  * @param {Object} master a parsed master M3U8 object\\n  * @param {Object} media a parsed media M3U8 object\\n  * @return {Object} a new object that represents the original\\n  * master playlist with the updated media playlist merged in, or\\n  * null if the merge produced no change.\\n  */\\n\\n\\nvar updateMaster = function updateMaster(master, media) {\\n  var result = mergeOptions$1(master, {});\\n  var playlist = result.playlists[media.id];\\n\\n  if (!playlist) {\\n    return null;\\n  } // consider the playlist unchanged if the number of segments is equal, the media\\n  // sequence number is unchanged, and this playlist hasn't become the end of the playlist\\n\\n\\n  if (playlist.segments && media.segments && playlist.segments.length === media.segments.length && playlist.endList === media.endList && playlist.mediaSequence === media.mediaSequence) {\\n    return null;\\n  }\\n\\n  var mergedPlaylist = mergeOptions$1(playlist, media); // if the update could overlap existing segment information, merge the two segment lists\\n\\n  if (playlist.segments) {\\n    mergedPlaylist.segments = updateSegments(playlist.segments, media.segments, media.mediaSequence - playlist.mediaSequence);\\n  } // resolve any segment URIs to prevent us from having to do it later\\n\\n\\n  mergedPlaylist.segments.forEach(function (segment) {\\n    resolveSegmentUris(segment, mergedPlaylist.resolvedUri);\\n  }); // TODO Right now in the playlists array there are two references to each playlist, one\\n  // that is referenced by index, and one by URI. The index reference may no longer be\\n  // necessary.\\n\\n  for (var i = 0; i < result.playlists.length; i++) {\\n    if (result.playlists[i].id === media.id) {\\n      result.playlists[i] = mergedPlaylist;\\n    }\\n  }\\n\\n  result.playlists[media.id] = mergedPlaylist; // URI reference added for backwards compatibility\\n\\n  result.playlists[media.uri] = mergedPlaylist;\\n  return result;\\n};\\n\\nvar createPlaylistID = function createPlaylistID(index, uri) {\\n  return index + '-' + uri;\\n};\\n\\nvar setupMediaPlaylists = function setupMediaPlaylists(master) {\\n  // setup by-URI lookups and resolve media playlist URIs\\n  var i = master.playlists.length;\\n\\n  while (i--) {\\n    var playlist = master.playlists[i];\\n    playlist.resolvedUri = resolveUrl(master.uri, playlist.uri);\\n    playlist.id = createPlaylistID(i, playlist.uri);\\n    master.playlists[playlist.id] = playlist; // URI reference added for backwards compatibility\\n\\n    master.playlists[playlist.uri] = playlist;\\n\\n    if (!playlist.attributes) {\\n      // Although the spec states an #EXT-X-STREAM-INF tag MUST have a\\n      // BANDWIDTH attribute, we can play the stream without it. This means a poorly\\n      // formatted master playlist may not have an attribute list. An attributes\\n      // property is added here to prevent undefined references when we encounter\\n      // this scenario.\\n      playlist.attributes = {};\\n      log$1.warn('Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.');\\n    }\\n  }\\n};\\n\\nvar resolveMediaGroupUris = function resolveMediaGroupUris(master) {\\n  forEachMediaGroup(master, function (properties) {\\n    if (properties.uri) {\\n      properties.resolvedUri = resolveUrl(master.uri, properties.uri);\\n    }\\n  });\\n};\\n/**\\n * Calculates the time to wait before refreshing a live playlist\\n *\\n * @param {Object} media\\n *        The current media\\n * @param {Boolean} update\\n *        True if there were any updates from the last refresh, false otherwise\\n * @return {Number}\\n *         The time in ms to wait before refreshing the live playlist\\n */\\n\\n\\nvar refreshDelay = function refreshDelay(media, update) {\\n  var lastSegment = media.segments[media.segments.length - 1];\\n  var delay = void 0;\\n\\n  if (update && lastSegment && lastSegment.duration) {\\n    delay = lastSegment.duration * 1000;\\n  } else {\\n    // if the playlist is unchanged since the last reload or last segment duration\\n    // cannot be determined, try again after half the target duration\\n    delay = (media.targetDuration || 10) * 500;\\n  }\\n\\n  return delay;\\n};\\n/**\\n * Load a playlist from a remote location\\n *\\n * @class PlaylistLoader\\n * @extends Stream\\n * @param {String} srcUrl the url to start with\\n * @param {Boolean} withCredentials the withCredentials xhr option\\n * @constructor\\n */\\n\\n\\nvar PlaylistLoader = function (_EventTarget) {\\n  inherits(PlaylistLoader, _EventTarget);\\n\\n  function PlaylistLoader(srcUrl, hls) {\\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\\n    classCallCheck(this, PlaylistLoader);\\n\\n    var _this = possibleConstructorReturn(this, (PlaylistLoader.__proto__ || Object.getPrototypeOf(PlaylistLoader)).call(this));\\n\\n    var _options$withCredenti = options.withCredentials,\\n        withCredentials = _options$withCredenti === undefined ? false : _options$withCredenti,\\n        _options$handleManife = options.handleManifestRedirects,\\n        handleManifestRedirects = _options$handleManife === undefined ? false : _options$handleManife;\\n    _this.srcUrl = srcUrl;\\n    _this.hls_ = hls;\\n    _this.withCredentials = withCredentials;\\n    _this.handleManifestRedirects = handleManifestRedirects;\\n    var hlsOptions = hls.options_;\\n    _this.customTagParsers = hlsOptions && hlsOptions.customTagParsers || [];\\n    _this.customTagMappers = hlsOptions && hlsOptions.customTagMappers || [];\\n\\n    if (!_this.srcUrl) {\\n      throw new Error('A non-empty playlist URL is required');\\n    } // initialize the loader state\\n\\n\\n    _this.state = 'HAVE_NOTHING'; // live playlist staleness timeout\\n\\n    _this.on('mediaupdatetimeout', function () {\\n      if (_this.state !== 'HAVE_METADATA') {\\n        // only refresh the media playlist if no other activity is going on\\n        return;\\n      }\\n\\n      _this.state = 'HAVE_CURRENT_METADATA';\\n      _this.request = _this.hls_.xhr({\\n        uri: resolveUrl(_this.master.uri, _this.media().uri),\\n        withCredentials: _this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this.request) {\\n          return;\\n        }\\n\\n        if (error) {\\n          return _this.playlistRequestError(_this.request, _this.media(), 'HAVE_METADATA');\\n        }\\n\\n        _this.haveMetadata(_this.request, _this.media().uri, _this.media().id);\\n      });\\n    });\\n\\n    return _this;\\n  }\\n\\n  createClass(PlaylistLoader, [{\\n    key: 'playlistRequestError',\\n    value: function playlistRequestError(xhr, playlist, startingState) {\\n      var uri = playlist.uri,\\n          id = playlist.id; // any in-flight request is now finished\\n\\n      this.request = null;\\n\\n      if (startingState) {\\n        this.state = startingState;\\n      }\\n\\n      this.error = {\\n        playlist: this.master.playlists[id],\\n        status: xhr.status,\\n        message: 'HLS playlist request error at URL: ' + uri + '.',\\n        responseText: xhr.responseText,\\n        code: xhr.status >= 500 ? 4 : 2\\n      };\\n      this.trigger('error');\\n    } // update the playlist loader's state in response to a new or\\n    // updated playlist.\\n\\n  }, {\\n    key: 'haveMetadata',\\n    value: function haveMetadata(xhr, url, id) {\\n      var _this2 = this; // any in-flight request is now finished\\n\\n\\n      this.request = null;\\n      this.state = 'HAVE_METADATA';\\n      var parser = new m3u8_parser__WEBPACK_IMPORTED_MODULE_14__[\\\"Parser\\\"](); // adding custom tag parsers\\n\\n      this.customTagParsers.forEach(function (customParser) {\\n        return parser.addParser(customParser);\\n      }); // adding custom tag mappers\\n\\n      this.customTagMappers.forEach(function (mapper) {\\n        return parser.addTagMapper(mapper);\\n      });\\n      parser.push(xhr.responseText);\\n      parser.end();\\n      parser.manifest.uri = url;\\n      parser.manifest.id = id; // m3u8-parser does not attach an attributes property to media playlists so make\\n      // sure that the property is attached to avoid undefined reference errors\\n\\n      parser.manifest.attributes = parser.manifest.attributes || {}; // merge this playlist into the master\\n\\n      var update = updateMaster(this.master, parser.manifest);\\n      this.targetDuration = parser.manifest.targetDuration;\\n\\n      if (update) {\\n        this.master = update;\\n        this.media_ = this.master.playlists[id];\\n      } else {\\n        this.trigger('playlistunchanged');\\n      } // refresh live playlists after a target duration passes\\n\\n\\n      if (!this.media().endList) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this2.trigger('mediaupdatetimeout');\\n        }, refreshDelay(this.media(), !!update));\\n      }\\n\\n      this.trigger('loadedplaylist');\\n    }\\n    /**\\n     * Abort any outstanding work and clean up.\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.stopRequest();\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.finalRenditionTimeout);\\n      this.off();\\n    }\\n  }, {\\n    key: 'stopRequest',\\n    value: function stopRequest() {\\n      if (this.request) {\\n        var oldRequest = this.request;\\n        this.request = null;\\n        oldRequest.onreadystatechange = null;\\n        oldRequest.abort();\\n      }\\n    }\\n    /**\\n     * When called without any arguments, returns the currently\\n     * active media playlist. When called with a single argument,\\n     * triggers the playlist loader to asynchronously switch to the\\n     * specified media playlist. Calling this method while the\\n     * loader is in the HAVE_NOTHING causes an error to be emitted\\n     * but otherwise has no effect.\\n     *\\n     * @param {Object=} playlist the parsed media playlist\\n     * object to switch to\\n     * @param {Boolean=} is this the last available playlist\\n     *\\n     * @return {Playlist} the current loaded media\\n     */\\n\\n  }, {\\n    key: 'media',\\n    value: function media(playlist, isFinalRendition) {\\n      var _this3 = this; // getter\\n\\n\\n      if (!playlist) {\\n        return this.media_;\\n      } // setter\\n\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        throw new Error('Cannot switch media playlist from ' + this.state);\\n      } // find the playlist object if the target playlist has been\\n      // specified by URI\\n\\n\\n      if (typeof playlist === 'string') {\\n        if (!this.master.playlists[playlist]) {\\n          throw new Error('Unknown playlist URI: ' + playlist);\\n        }\\n\\n        playlist = this.master.playlists[playlist];\\n      }\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.finalRenditionTimeout);\\n\\n      if (isFinalRendition) {\\n        var delay = playlist.targetDuration / 2 * 1000 || 5 * 1000;\\n        this.finalRenditionTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.media.bind(this, playlist, false), delay);\\n        return;\\n      }\\n\\n      var startingState = this.state;\\n      var mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to fully loaded playlists immediately\\n\\n      if (this.master.playlists[playlist.id].endList) {\\n        // abort outstanding playlist requests\\n        if (this.request) {\\n          this.request.onreadystatechange = null;\\n          this.request.abort();\\n          this.request = null;\\n        }\\n\\n        this.state = 'HAVE_METADATA';\\n        this.media_ = playlist; // trigger media change if the active media has been updated\\n\\n        if (mediaChange) {\\n          this.trigger('mediachanging');\\n          this.trigger('mediachange');\\n        }\\n\\n        return;\\n      } // switching to the active playlist is a no-op\\n\\n\\n      if (!mediaChange) {\\n        return;\\n      }\\n\\n      this.state = 'SWITCHING_MEDIA'; // there is already an outstanding playlist request\\n\\n      if (this.request) {\\n        if (playlist.resolvedUri === this.request.url) {\\n          // requesting to switch to the same playlist multiple times\\n          // has no effect after the first\\n          return;\\n        }\\n\\n        this.request.onreadystatechange = null;\\n        this.request.abort();\\n        this.request = null;\\n      } // request the new playlist\\n\\n\\n      if (this.media_) {\\n        this.trigger('mediachanging');\\n      }\\n\\n      this.request = this.hls_.xhr({\\n        uri: playlist.resolvedUri,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this3.request) {\\n          return;\\n        }\\n\\n        playlist.resolvedUri = resolveManifestRedirect(_this3.handleManifestRedirects, playlist.resolvedUri, req);\\n\\n        if (error) {\\n          return _this3.playlistRequestError(_this3.request, playlist, startingState);\\n        }\\n\\n        _this3.haveMetadata(req, playlist.uri, playlist.id); // fire loadedmetadata the first time a media playlist is loaded\\n\\n\\n        if (startingState === 'HAVE_MASTER') {\\n          _this3.trigger('loadedmetadata');\\n        } else {\\n          _this3.trigger('mediachange');\\n        }\\n      });\\n    }\\n    /**\\n     * pause loading of the playlist\\n     */\\n\\n  }, {\\n    key: 'pause',\\n    value: function pause() {\\n      this.stopRequest();\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        // If we pause the loader before any data has been retrieved, its as if we never\\n        // started, so reset to an unstarted state.\\n        this.started = false;\\n      } // Need to restore state now that no activity is happening\\n\\n\\n      if (this.state === 'SWITCHING_MEDIA') {\\n        // if the loader was in the process of switching media, it should either return to\\n        // HAVE_MASTER or HAVE_METADATA depending on if the loader has loaded a media\\n        // playlist yet. This is determined by the existence of loader.media_\\n        if (this.media_) {\\n          this.state = 'HAVE_METADATA';\\n        } else {\\n          this.state = 'HAVE_MASTER';\\n        }\\n      } else if (this.state === 'HAVE_CURRENT_METADATA') {\\n        this.state = 'HAVE_METADATA';\\n      }\\n    }\\n    /**\\n     * start loading of the playlist\\n     */\\n\\n  }, {\\n    key: 'load',\\n    value: function load(isFinalRendition) {\\n      var _this4 = this;\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      var media = this.media();\\n\\n      if (isFinalRendition) {\\n        var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          return _this4.load();\\n        }, delay);\\n        return;\\n      }\\n\\n      if (!this.started) {\\n        this.start();\\n        return;\\n      }\\n\\n      if (media && !media.endList) {\\n        this.trigger('mediaupdatetimeout');\\n      } else {\\n        this.trigger('loadedplaylist');\\n      }\\n    }\\n    /**\\n     * start loading of the playlist\\n     */\\n\\n  }, {\\n    key: 'start',\\n    value: function start() {\\n      var _this5 = this;\\n\\n      this.started = true; // request the specified URL\\n\\n      this.request = this.hls_.xhr({\\n        uri: this.srcUrl,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this5.request) {\\n          return;\\n        } // clear the loader's request reference\\n\\n\\n        _this5.request = null;\\n\\n        if (error) {\\n          _this5.error = {\\n            status: req.status,\\n            message: 'HLS playlist request error at URL: ' + _this5.srcUrl + '.',\\n            responseText: req.responseText,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (_this5.state === 'HAVE_NOTHING') {\\n            _this5.started = false;\\n          }\\n\\n          return _this5.trigger('error');\\n        }\\n\\n        var parser = new m3u8_parser__WEBPACK_IMPORTED_MODULE_14__[\\\"Parser\\\"](); // adding custom tag parsers\\n\\n        _this5.customTagParsers.forEach(function (customParser) {\\n          return parser.addParser(customParser);\\n        }); // adding custom tag mappers\\n\\n\\n        _this5.customTagMappers.forEach(function (mapper) {\\n          return parser.addTagMapper(mapper);\\n        });\\n\\n        parser.push(req.responseText);\\n        parser.end();\\n        _this5.state = 'HAVE_MASTER';\\n        _this5.srcUrl = resolveManifestRedirect(_this5.handleManifestRedirects, _this5.srcUrl, req);\\n        parser.manifest.uri = _this5.srcUrl; // loaded a master playlist\\n\\n        if (parser.manifest.playlists) {\\n          _this5.master = parser.manifest;\\n          setupMediaPlaylists(_this5.master);\\n          resolveMediaGroupUris(_this5.master);\\n\\n          _this5.trigger('loadedplaylist');\\n\\n          if (!_this5.request) {\\n            // no media playlist was specifically selected so start\\n            // from the first listed one\\n            _this5.media(parser.manifest.playlists[0]);\\n          }\\n\\n          return;\\n        }\\n\\n        var id = createPlaylistID(0, _this5.srcUrl); // loaded a media playlist\\n        // infer a master playlist if none was previously requested\\n\\n        _this5.master = {\\n          mediaGroups: {\\n            'AUDIO': {},\\n            'VIDEO': {},\\n            'CLOSED-CAPTIONS': {},\\n            'SUBTITLES': {}\\n          },\\n          uri: global_window__WEBPACK_IMPORTED_MODULE_0___default.a.location.href,\\n          playlists: [{\\n            uri: _this5.srcUrl,\\n            id: id,\\n            resolvedUri: _this5.srcUrl,\\n            // m3u8-parser does not attach an attributes property to media playlists so make\\n            // sure that the property is attached to avoid undefined reference errors\\n            attributes: {}\\n          }]\\n        };\\n        _this5.master.playlists[id] = _this5.master.playlists[0]; // URI reference added for backwards compatibility\\n\\n        _this5.master.playlists[_this5.srcUrl] = _this5.master.playlists[0];\\n\\n        _this5.haveMetadata(req, _this5.srcUrl, id);\\n\\n        return _this5.trigger('loadedmetadata');\\n      });\\n    }\\n  }]);\\n  return PlaylistLoader;\\n}(EventTarget$1);\\n/**\\n * @file playlist.js\\n *\\n * Playlist related utilities.\\n */\\n\\n\\nvar createTimeRange = videojs$1.createTimeRange;\\n/**\\n * walk backward until we find a duration we can use\\n * or return a failure\\n *\\n * @param {Playlist} playlist the playlist to walk through\\n * @param {Number} endSequence the mediaSequence to stop walking on\\n */\\n\\nvar backwardDuration = function backwardDuration(playlist, endSequence) {\\n  var result = 0;\\n  var i = endSequence - playlist.mediaSequence; // if a start time is available for segment immediately following\\n  // the interval, use it\\n\\n  var segment = playlist.segments[i]; // Walk backward until we find the latest segment with timeline\\n  // information that is earlier than endSequence\\n\\n  if (segment) {\\n    if (typeof segment.start !== 'undefined') {\\n      return {\\n        result: segment.start,\\n        precise: true\\n      };\\n    }\\n\\n    if (typeof segment.end !== 'undefined') {\\n      return {\\n        result: segment.end - segment.duration,\\n        precise: true\\n      };\\n    }\\n  }\\n\\n  while (i--) {\\n    segment = playlist.segments[i];\\n\\n    if (typeof segment.end !== 'undefined') {\\n      return {\\n        result: result + segment.end,\\n        precise: true\\n      };\\n    }\\n\\n    result += segment.duration;\\n\\n    if (typeof segment.start !== 'undefined') {\\n      return {\\n        result: result + segment.start,\\n        precise: true\\n      };\\n    }\\n  }\\n\\n  return {\\n    result: result,\\n    precise: false\\n  };\\n};\\n/**\\n * walk forward until we find a duration we can use\\n * or return a failure\\n *\\n * @param {Playlist} playlist the playlist to walk through\\n * @param {Number} endSequence the mediaSequence to stop walking on\\n */\\n\\n\\nvar forwardDuration = function forwardDuration(playlist, endSequence) {\\n  var result = 0;\\n  var segment = void 0;\\n  var i = endSequence - playlist.mediaSequence; // Walk forward until we find the earliest segment with timeline\\n  // information\\n\\n  for (; i < playlist.segments.length; i++) {\\n    segment = playlist.segments[i];\\n\\n    if (typeof segment.start !== 'undefined') {\\n      return {\\n        result: segment.start - result,\\n        precise: true\\n      };\\n    }\\n\\n    result += segment.duration;\\n\\n    if (typeof segment.end !== 'undefined') {\\n      return {\\n        result: segment.end - result,\\n        precise: true\\n      };\\n    }\\n  } // indicate we didn't find a useful duration estimate\\n\\n\\n  return {\\n    result: -1,\\n    precise: false\\n  };\\n};\\n/**\\n  * Calculate the media duration from the segments associated with a\\n  * playlist. The duration of a subinterval of the available segments\\n  * may be calculated by specifying an end index.\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * @param {Number=} endSequence an exclusive upper boundary\\n  * for the playlist.  Defaults to playlist length.\\n  * @param {Number} expired the amount of time that has dropped\\n  * off the front of the playlist in a live scenario\\n  * @return {Number} the duration between the first available segment\\n  * and end index.\\n  */\\n\\n\\nvar intervalDuration = function intervalDuration(playlist, endSequence, expired) {\\n  var backward = void 0;\\n  var forward = void 0;\\n\\n  if (typeof endSequence === 'undefined') {\\n    endSequence = playlist.mediaSequence + playlist.segments.length;\\n  }\\n\\n  if (endSequence < playlist.mediaSequence) {\\n    return 0;\\n  } // do a backward walk to estimate the duration\\n\\n\\n  backward = backwardDuration(playlist, endSequence);\\n\\n  if (backward.precise) {\\n    // if we were able to base our duration estimate on timing\\n    // information provided directly from the Media Source, return\\n    // it\\n    return backward.result;\\n  } // walk forward to see if a precise duration estimate can be made\\n  // that way\\n\\n\\n  forward = forwardDuration(playlist, endSequence);\\n\\n  if (forward.precise) {\\n    // we found a segment that has been buffered and so it's\\n    // position is known precisely\\n    return forward.result;\\n  } // return the less-precise, playlist-based duration estimate\\n\\n\\n  return backward.result + expired;\\n};\\n/**\\n  * Calculates the duration of a playlist. If a start and end index\\n  * are specified, the duration will be for the subset of the media\\n  * timeline between those two indices. The total duration for live\\n  * playlists is always Infinity.\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * @param {Number=} endSequence an exclusive upper\\n  * boundary for the playlist. Defaults to the playlist media\\n  * sequence number plus its length.\\n  * @param {Number=} expired the amount of time that has\\n  * dropped off the front of the playlist in a live scenario\\n  * @return {Number} the duration between the start index and end\\n  * index.\\n  */\\n\\n\\nvar duration = function duration(playlist, endSequence, expired) {\\n  if (!playlist) {\\n    return 0;\\n  }\\n\\n  if (typeof expired !== 'number') {\\n    expired = 0;\\n  } // if a slice of the total duration is not requested, use\\n  // playlist-level duration indicators when they're present\\n\\n\\n  if (typeof endSequence === 'undefined') {\\n    // if present, use the duration specified in the playlist\\n    if (playlist.totalDuration) {\\n      return playlist.totalDuration;\\n    } // duration should be Infinity for live playlists\\n\\n\\n    if (!playlist.endList) {\\n      return global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Infinity;\\n    }\\n  } // calculate the total duration based on the segment durations\\n\\n\\n  return intervalDuration(playlist, endSequence, expired);\\n};\\n/**\\n  * Calculate the time between two indexes in the current playlist\\n  * neight the start- nor the end-index need to be within the current\\n  * playlist in which case, the targetDuration of the playlist is used\\n  * to approximate the durations of the segments\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * @param {Number} startIndex\\n  * @param {Number} endIndex\\n  * @return {Number} the number of seconds between startIndex and endIndex\\n  */\\n\\n\\nvar sumDurations = function sumDurations(playlist, startIndex, endIndex) {\\n  var durations = 0;\\n\\n  if (startIndex > endIndex) {\\n    var _ref = [endIndex, startIndex];\\n    startIndex = _ref[0];\\n    endIndex = _ref[1];\\n  }\\n\\n  if (startIndex < 0) {\\n    for (var i = startIndex; i < Math.min(0, endIndex); i++) {\\n      durations += playlist.targetDuration;\\n    }\\n\\n    startIndex = 0;\\n  }\\n\\n  for (var _i = startIndex; _i < endIndex; _i++) {\\n    durations += playlist.segments[_i].duration;\\n  }\\n\\n  return durations;\\n};\\n/**\\n * Determines the media index of the segment corresponding to the safe edge of the live\\n * window which is the duration of the last segment plus 2 target durations from the end\\n * of the playlist.\\n *\\n * A liveEdgePadding can be provided which will be used instead of calculating the safe live edge.\\n * This corresponds to suggestedPresentationDelay in DASH manifests.\\n *\\n * @param {Object} playlist\\n *        a media playlist object\\n * @param {Number} [liveEdgePadding]\\n *        A number in seconds indicating how far from the end we want to be.\\n *        If provided, this value is used instead of calculating the safe live index from the target durations.\\n *        Corresponds to suggestedPresentationDelay in DASH manifests.\\n * @return {Number}\\n *         The media index of the segment at the safe live point. 0 if there is no \\\"safe\\\"\\n *         point.\\n * @function safeLiveIndex\\n */\\n\\n\\nvar safeLiveIndex = function safeLiveIndex(playlist, liveEdgePadding) {\\n  if (!playlist.segments.length) {\\n    return 0;\\n  }\\n\\n  var i = playlist.segments.length;\\n  var lastSegmentDuration = playlist.segments[i - 1].duration || playlist.targetDuration;\\n  var safeDistance = typeof liveEdgePadding === 'number' ? liveEdgePadding : lastSegmentDuration + playlist.targetDuration * 2;\\n\\n  if (safeDistance === 0) {\\n    return i;\\n  }\\n\\n  var distanceFromEnd = 0;\\n\\n  while (i--) {\\n    distanceFromEnd += playlist.segments[i].duration;\\n\\n    if (distanceFromEnd >= safeDistance) {\\n      break;\\n    }\\n  }\\n\\n  return Math.max(0, i);\\n};\\n/**\\n * Calculates the playlist end time\\n *\\n * @param {Object} playlist a media playlist object\\n * @param {Number=} expired the amount of time that has\\n *                  dropped off the front of the playlist in a live scenario\\n * @param {Boolean|false} useSafeLiveEnd a boolean value indicating whether or not the\\n *                        playlist end calculation should consider the safe live end\\n *                        (truncate the playlist end by three segments). This is normally\\n *                        used for calculating the end of the playlist's seekable range.\\n *                        This takes into account the value of liveEdgePadding.\\n *                        Setting liveEdgePadding to 0 is equivalent to setting this to false.\\n * @param {Number} liveEdgePadding a number indicating how far from the end of the playlist we should be in seconds.\\n *                 If this is provided, it is used in the safe live end calculation.\\n *                 Setting useSafeLiveEnd=false or liveEdgePadding=0 are equivalent.\\n *                 Corresponds to suggestedPresentationDelay in DASH manifests.\\n * @returns {Number} the end time of playlist\\n * @function playlistEnd\\n */\\n\\n\\nvar playlistEnd = function playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding) {\\n  if (!playlist || !playlist.segments) {\\n    return null;\\n  }\\n\\n  if (playlist.endList) {\\n    return duration(playlist);\\n  }\\n\\n  if (expired === null) {\\n    return null;\\n  }\\n\\n  expired = expired || 0;\\n  var endSequence = useSafeLiveEnd ? safeLiveIndex(playlist, liveEdgePadding) : playlist.segments.length;\\n  return intervalDuration(playlist, playlist.mediaSequence + endSequence, expired);\\n};\\n/**\\n  * Calculates the interval of time that is currently seekable in a\\n  * playlist. The returned time ranges are relative to the earliest\\n  * moment in the specified playlist that is still available. A full\\n  * seekable implementation for live streams would need to offset\\n  * these values by the duration of content that has expired from the\\n  * stream.\\n  *\\n  * @param {Object} playlist a media playlist object\\n  * dropped off the front of the playlist in a live scenario\\n  * @param {Number=} expired the amount of time that has\\n  * dropped off the front of the playlist in a live scenario\\n  * @param {Number} liveEdgePadding how far from the end of the playlist we should be in seconds.\\n  *        Corresponds to suggestedPresentationDelay in DASH manifests.\\n  * @return {TimeRanges} the periods of time that are valid targets\\n  * for seeking\\n  */\\n\\n\\nvar seekable = function seekable(playlist, expired, liveEdgePadding) {\\n  var useSafeLiveEnd = true;\\n  var seekableStart = expired || 0;\\n  var seekableEnd = playlistEnd(playlist, expired, useSafeLiveEnd, liveEdgePadding);\\n\\n  if (seekableEnd === null) {\\n    return createTimeRange();\\n  }\\n\\n  return createTimeRange(seekableStart, seekableEnd);\\n};\\n\\nvar isWholeNumber = function isWholeNumber(num) {\\n  return num - Math.floor(num) === 0;\\n};\\n\\nvar roundSignificantDigit = function roundSignificantDigit(increment, num) {\\n  // If we have a whole number, just add 1 to it\\n  if (isWholeNumber(num)) {\\n    return num + increment * 0.1;\\n  }\\n\\n  var numDecimalDigits = num.toString().split('.')[1].length;\\n\\n  for (var i = 1; i <= numDecimalDigits; i++) {\\n    var scale = Math.pow(10, i);\\n    var temp = num * scale;\\n\\n    if (isWholeNumber(temp) || i === numDecimalDigits) {\\n      return (temp + increment) / scale;\\n    }\\n  }\\n};\\n\\nvar ceilLeastSignificantDigit = roundSignificantDigit.bind(null, 1);\\nvar floorLeastSignificantDigit = roundSignificantDigit.bind(null, -1);\\n/**\\n * Determine the index and estimated starting time of the segment that\\n * contains a specified playback position in a media playlist.\\n *\\n * @param {Object} playlist the media playlist to query\\n * @param {Number} currentTime The number of seconds since the earliest\\n * possible position to determine the containing segment for\\n * @param {Number} startIndex\\n * @param {Number} startTime\\n * @return {Object}\\n */\\n\\nvar getMediaInfoForTime = function getMediaInfoForTime(playlist, currentTime, startIndex, startTime) {\\n  var i = void 0;\\n  var segment = void 0;\\n  var numSegments = playlist.segments.length;\\n  var time = currentTime - startTime;\\n\\n  if (time < 0) {\\n    // Walk backward from startIndex in the playlist, adding durations\\n    // until we find a segment that contains `time` and return it\\n    if (startIndex > 0) {\\n      for (i = startIndex - 1; i >= 0; i--) {\\n        segment = playlist.segments[i];\\n        time += floorLeastSignificantDigit(segment.duration);\\n\\n        if (time > 0) {\\n          return {\\n            mediaIndex: i,\\n            startTime: startTime - sumDurations(playlist, startIndex, i)\\n          };\\n        }\\n      }\\n    } // We were unable to find a good segment within the playlist\\n    // so select the first segment\\n\\n\\n    return {\\n      mediaIndex: 0,\\n      startTime: currentTime\\n    };\\n  } // When startIndex is negative, we first walk forward to first segment\\n  // adding target durations. If we \\\"run out of time\\\" before getting to\\n  // the first segment, return the first segment\\n\\n\\n  if (startIndex < 0) {\\n    for (i = startIndex; i < 0; i++) {\\n      time -= playlist.targetDuration;\\n\\n      if (time < 0) {\\n        return {\\n          mediaIndex: 0,\\n          startTime: currentTime\\n        };\\n      }\\n    }\\n\\n    startIndex = 0;\\n  } // Walk forward from startIndex in the playlist, subtracting durations\\n  // until we find a segment that contains `time` and return it\\n\\n\\n  for (i = startIndex; i < numSegments; i++) {\\n    segment = playlist.segments[i];\\n    time -= ceilLeastSignificantDigit(segment.duration);\\n\\n    if (time < 0) {\\n      return {\\n        mediaIndex: i,\\n        startTime: startTime + sumDurations(playlist, startIndex, i)\\n      };\\n    }\\n  } // We are out of possible candidates so load the last one...\\n\\n\\n  return {\\n    mediaIndex: numSegments - 1,\\n    startTime: currentTime\\n  };\\n};\\n/**\\n * Check whether the playlist is blacklisted or not.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is blacklisted or not\\n * @function isBlacklisted\\n */\\n\\n\\nvar isBlacklisted = function isBlacklisted(playlist) {\\n  return playlist.excludeUntil && playlist.excludeUntil > Date.now();\\n};\\n/**\\n * Check whether the playlist is compatible with current playback configuration or has\\n * been blacklisted permanently for being incompatible.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is incompatible or not\\n * @function isIncompatible\\n */\\n\\n\\nvar isIncompatible = function isIncompatible(playlist) {\\n  return playlist.excludeUntil && playlist.excludeUntil === Infinity;\\n};\\n/**\\n * Check whether the playlist is enabled or not.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is enabled or not\\n * @function isEnabled\\n */\\n\\n\\nvar isEnabled = function isEnabled(playlist) {\\n  var blacklisted = isBlacklisted(playlist);\\n  return !playlist.disabled && !blacklisted;\\n};\\n/**\\n * Check whether the playlist has been manually disabled through the representations api.\\n *\\n * @param {Object} playlist the media playlist object\\n * @return {boolean} whether the playlist is disabled manually or not\\n * @function isDisabled\\n */\\n\\n\\nvar isDisabled = function isDisabled(playlist) {\\n  return playlist.disabled;\\n};\\n/**\\n * Returns whether the current playlist is an AES encrypted HLS stream\\n *\\n * @return {Boolean} true if it's an AES encrypted HLS stream\\n */\\n\\n\\nvar isAes = function isAes(media) {\\n  for (var i = 0; i < media.segments.length; i++) {\\n    if (media.segments[i].key) {\\n      return true;\\n    }\\n  }\\n\\n  return false;\\n};\\n/**\\n * Returns whether the current playlist contains fMP4\\n *\\n * @return {Boolean} true if the playlist contains fMP4\\n */\\n\\n\\nvar isFmp4 = function isFmp4(media) {\\n  for (var i = 0; i < media.segments.length; i++) {\\n    if (media.segments[i].map) {\\n      return true;\\n    }\\n  }\\n\\n  return false;\\n};\\n/**\\n * Checks if the playlist has a value for the specified attribute\\n *\\n * @param {String} attr\\n *        Attribute to check for\\n * @param {Object} playlist\\n *        The media playlist object\\n * @return {Boolean}\\n *         Whether the playlist contains a value for the attribute or not\\n * @function hasAttribute\\n */\\n\\n\\nvar hasAttribute = function hasAttribute(attr, playlist) {\\n  return playlist.attributes && playlist.attributes[attr];\\n};\\n/**\\n * Estimates the time required to complete a segment download from the specified playlist\\n *\\n * @param {Number} segmentDuration\\n *        Duration of requested segment\\n * @param {Number} bandwidth\\n *        Current measured bandwidth of the player\\n * @param {Object} playlist\\n *        The media playlist object\\n * @param {Number=} bytesReceived\\n *        Number of bytes already received for the request. Defaults to 0\\n * @return {Number|NaN}\\n *         The estimated time to request the segment. NaN if bandwidth information for\\n *         the given playlist is unavailable\\n * @function estimateSegmentRequestTime\\n */\\n\\n\\nvar estimateSegmentRequestTime = function estimateSegmentRequestTime(segmentDuration, bandwidth, playlist) {\\n  var bytesReceived = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\\n\\n  if (!hasAttribute('BANDWIDTH', playlist)) {\\n    return NaN;\\n  }\\n\\n  var size = segmentDuration * playlist.attributes.BANDWIDTH;\\n  return (size - bytesReceived * 8) / bandwidth;\\n};\\n/*\\n * Returns whether the current playlist is the lowest rendition\\n *\\n * @return {Boolean} true if on lowest rendition\\n */\\n\\n\\nvar isLowestEnabledRendition = function isLowestEnabledRendition(master, media) {\\n  if (master.playlists.length === 1) {\\n    return true;\\n  }\\n\\n  var currentBandwidth = media.attributes.BANDWIDTH || Number.MAX_VALUE;\\n  return master.playlists.filter(function (playlist) {\\n    if (!isEnabled(playlist)) {\\n      return false;\\n    }\\n\\n    return (playlist.attributes.BANDWIDTH || 0) < currentBandwidth;\\n  }).length === 0;\\n}; // exports\\n\\n\\nvar Playlist = {\\n  duration: duration,\\n  seekable: seekable,\\n  safeLiveIndex: safeLiveIndex,\\n  getMediaInfoForTime: getMediaInfoForTime,\\n  isEnabled: isEnabled,\\n  isDisabled: isDisabled,\\n  isBlacklisted: isBlacklisted,\\n  isIncompatible: isIncompatible,\\n  playlistEnd: playlistEnd,\\n  isAes: isAes,\\n  isFmp4: isFmp4,\\n  hasAttribute: hasAttribute,\\n  estimateSegmentRequestTime: estimateSegmentRequestTime,\\n  isLowestEnabledRendition: isLowestEnabledRendition\\n};\\n/**\\n * @file xhr.js\\n */\\n\\nvar videojsXHR = videojs$1.xhr,\\n    mergeOptions$1$1 = videojs$1.mergeOptions;\\n\\nvar xhrFactory = function xhrFactory() {\\n  var xhr = function XhrFunction(options, callback) {\\n    // Add a default timeout for all hls requests\\n    options = mergeOptions$1$1({\\n      timeout: 45e3\\n    }, options); // Allow an optional user-specified function to modify the option\\n    // object before we construct the xhr request\\n\\n    var beforeRequest = XhrFunction.beforeRequest || videojs$1.Hls.xhr.beforeRequest;\\n\\n    if (beforeRequest && typeof beforeRequest === 'function') {\\n      var newOptions = beforeRequest(options);\\n\\n      if (newOptions) {\\n        options = newOptions;\\n      }\\n    }\\n\\n    var request = videojsXHR(options, function (error, response) {\\n      var reqResponse = request.response;\\n\\n      if (!error && reqResponse) {\\n        request.responseTime = Date.now();\\n        request.roundTripTime = request.responseTime - request.requestTime;\\n        request.bytesReceived = reqResponse.byteLength || reqResponse.length;\\n\\n        if (!request.bandwidth) {\\n          request.bandwidth = Math.floor(request.bytesReceived / request.roundTripTime * 8 * 1000);\\n        }\\n      }\\n\\n      if (response.headers) {\\n        request.responseHeaders = response.headers;\\n      } // videojs.xhr now uses a specific code on the error\\n      // object to signal that a request has timed out instead\\n      // of setting a boolean on the request object\\n\\n\\n      if (error && error.code === 'ETIMEDOUT') {\\n        request.timedout = true;\\n      } // videojs.xhr no longer considers status codes outside of 200 and 0\\n      // (for file uris) to be errors, but the old XHR did, so emulate that\\n      // behavior. Status 206 may be used in response to byterange requests.\\n\\n\\n      if (!error && !request.aborted && response.statusCode !== 200 && response.statusCode !== 206 && response.statusCode !== 0) {\\n        error = new Error('XHR Failed with a response of: ' + (request && (reqResponse || request.responseText)));\\n      }\\n\\n      callback(error, request);\\n    });\\n    var originalAbort = request.abort;\\n\\n    request.abort = function () {\\n      request.aborted = true;\\n      return originalAbort.apply(request, arguments);\\n    };\\n\\n    request.uri = options.uri;\\n    request.requestTime = Date.now();\\n    return request;\\n  };\\n\\n  return xhr;\\n};\\n/**\\n * Turns segment byterange into a string suitable for use in\\n * HTTP Range requests\\n *\\n * @param {Object} byterange - an object with two values defining the start and end\\n *                             of a byte-range\\n */\\n\\n\\nvar byterangeStr = function byterangeStr(byterange) {\\n  var byterangeStart = void 0;\\n  var byterangeEnd = void 0; // `byterangeEnd` is one less than `offset + length` because the HTTP range\\n  // header uses inclusive ranges\\n\\n  byterangeEnd = byterange.offset + byterange.length - 1;\\n  byterangeStart = byterange.offset;\\n  return 'bytes=' + byterangeStart + '-' + byterangeEnd;\\n};\\n/**\\n * Defines headers for use in the xhr request for a particular segment.\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n */\\n\\n\\nvar segmentXhrHeaders = function segmentXhrHeaders(segment) {\\n  var headers = {};\\n\\n  if (segment.byterange) {\\n    headers.Range = byterangeStr(segment.byterange);\\n  }\\n\\n  return headers;\\n};\\n/**\\n * @file bin-utils.js\\n */\\n\\n/**\\n * convert a TimeRange to text\\n *\\n * @param {TimeRange} range the timerange to use for conversion\\n * @param {Number} i the iterator on the range to convert\\n */\\n\\n\\nvar textRange = function textRange(range, i) {\\n  return range.start(i) + '-' + range.end(i);\\n};\\n/**\\n * format a number as hex string\\n *\\n * @param {Number} e The number\\n * @param {Number} i the iterator\\n */\\n\\n\\nvar formatHexString = function formatHexString(e, i) {\\n  var value = e.toString(16);\\n  return '00'.substring(0, 2 - value.length) + value + (i % 2 ? ' ' : '');\\n};\\n\\nvar formatAsciiString = function formatAsciiString(e) {\\n  if (e >= 0x20 && e < 0x7e) {\\n    return String.fromCharCode(e);\\n  }\\n\\n  return '.';\\n};\\n/**\\n * Creates an object for sending to a web worker modifying properties that are TypedArrays\\n * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\\n *\\n * @param {Object} message\\n *        Object of properties and values to send to the web worker\\n * @return {Object}\\n *         Modified message with TypedArray values expanded\\n * @function createTransferableMessage\\n */\\n\\n\\nvar createTransferableMessage = function createTransferableMessage(message) {\\n  var transferable = {};\\n  Object.keys(message).forEach(function (key) {\\n    var value = message[key];\\n\\n    if (ArrayBuffer.isView(value)) {\\n      transferable[key] = {\\n        bytes: value.buffer,\\n        byteOffset: value.byteOffset,\\n        byteLength: value.byteLength\\n      };\\n    } else {\\n      transferable[key] = value;\\n    }\\n  });\\n  return transferable;\\n};\\n/**\\n * Returns a unique string identifier for a media initialization\\n * segment.\\n */\\n\\n\\nvar initSegmentId = function initSegmentId(initSegment) {\\n  var byterange = initSegment.byterange || {\\n    length: Infinity,\\n    offset: 0\\n  };\\n  return [byterange.length, byterange.offset, initSegment.resolvedUri].join(',');\\n};\\n/**\\n * Returns a unique string identifier for a media segment key.\\n */\\n\\n\\nvar segmentKeyId = function segmentKeyId(key) {\\n  return key.resolvedUri;\\n};\\n/**\\n * utils to help dump binary data to the console\\n */\\n\\n\\nvar hexDump = function hexDump(data) {\\n  var bytes = Array.prototype.slice.call(data);\\n  var step = 16;\\n  var result = '';\\n  var hex = void 0;\\n  var ascii = void 0;\\n\\n  for (var j = 0; j < bytes.length / step; j++) {\\n    hex = bytes.slice(j * step, j * step + step).map(formatHexString).join('');\\n    ascii = bytes.slice(j * step, j * step + step).map(formatAsciiString).join('');\\n    result += hex + ' ' + ascii + '\\\\n';\\n  }\\n\\n  return result;\\n};\\n\\nvar tagDump = function tagDump(_ref) {\\n  var bytes = _ref.bytes;\\n  return hexDump(bytes);\\n};\\n\\nvar textRanges = function textRanges(ranges) {\\n  var result = '';\\n  var i = void 0;\\n\\n  for (i = 0; i < ranges.length; i++) {\\n    result += textRange(ranges, i) + ' ';\\n  }\\n\\n  return result;\\n};\\n\\nvar utils = /*#__PURE__*/Object.freeze({\\n  createTransferableMessage: createTransferableMessage,\\n  initSegmentId: initSegmentId,\\n  segmentKeyId: segmentKeyId,\\n  hexDump: hexDump,\\n  tagDump: tagDump,\\n  textRanges: textRanges\\n}); // TODO handle fmp4 case where the timing info is accurate and doesn't involve transmux\\n// Add 25% to the segment duration to account for small discrepencies in segment timing.\\n// 25% was arbitrarily chosen, and may need to be refined over time.\\n\\nvar SEGMENT_END_FUDGE_PERCENT = 0.25;\\n/**\\n * Converts a player time (any time that can be gotten/set from player.currentTime(),\\n * e.g., any time within player.seekable().start(0) to player.seekable().end(0)) to a\\n * program time (any time referencing the real world (e.g., EXT-X-PROGRAM-DATE-TIME)).\\n *\\n * The containing segment is required as the EXT-X-PROGRAM-DATE-TIME serves as an \\\"anchor\\n * point\\\" (a point where we have a mapping from program time to player time, with player\\n * time being the post transmux start of the segment).\\n *\\n * For more details, see [this doc](../../docs/program-time-from-player-time.md).\\n *\\n * @param {Number} playerTime the player time\\n * @param {Object} segment the segment which contains the player time\\n * @return {Date} program time\\n */\\n\\nvar playerTimeToProgramTime = function playerTimeToProgramTime(playerTime, segment) {\\n  if (!segment.dateTimeObject) {\\n    // Can't convert without an \\\"anchor point\\\" for the program time (i.e., a time that can\\n    // be used to map the start of a segment with a real world time).\\n    return null;\\n  }\\n\\n  var transmuxerPrependedSeconds = segment.videoTimingInfo.transmuxerPrependedSeconds;\\n  var transmuxedStart = segment.videoTimingInfo.transmuxedPresentationStart; // get the start of the content from before old content is prepended\\n\\n  var startOfSegment = transmuxedStart + transmuxerPrependedSeconds;\\n  var offsetFromSegmentStart = playerTime - startOfSegment;\\n  return new Date(segment.dateTimeObject.getTime() + offsetFromSegmentStart * 1000);\\n};\\n\\nvar originalSegmentVideoDuration = function originalSegmentVideoDuration(videoTimingInfo) {\\n  return videoTimingInfo.transmuxedPresentationEnd - videoTimingInfo.transmuxedPresentationStart - videoTimingInfo.transmuxerPrependedSeconds;\\n};\\n/**\\n * Finds a segment that contains the time requested given as an ISO-8601 string. The\\n * returned segment might be an estimate or an accurate match.\\n *\\n * @param {String} programTime The ISO-8601 programTime to find a match for\\n * @param {Object} playlist A playlist object to search within\\n */\\n\\n\\nvar findSegmentForProgramTime = function findSegmentForProgramTime(programTime, playlist) {\\n  // Assumptions:\\n  //  - verifyProgramDateTimeTags has already been run\\n  //  - live streams have been started\\n  var dateTimeObject = void 0;\\n\\n  try {\\n    dateTimeObject = new Date(programTime);\\n  } catch (e) {\\n    return null;\\n  }\\n\\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\\n    return null;\\n  }\\n\\n  var segment = playlist.segments[0];\\n\\n  if (dateTimeObject < segment.dateTimeObject) {\\n    // Requested time is before stream start.\\n    return null;\\n  }\\n\\n  for (var i = 0; i < playlist.segments.length - 1; i++) {\\n    segment = playlist.segments[i];\\n    var nextSegmentStart = playlist.segments[i + 1].dateTimeObject;\\n\\n    if (dateTimeObject < nextSegmentStart) {\\n      break;\\n    }\\n  }\\n\\n  var lastSegment = playlist.segments[playlist.segments.length - 1];\\n  var lastSegmentStart = lastSegment.dateTimeObject;\\n  var lastSegmentDuration = lastSegment.videoTimingInfo ? originalSegmentVideoDuration(lastSegment.videoTimingInfo) : lastSegment.duration + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT;\\n  var lastSegmentEnd = new Date(lastSegmentStart.getTime() + lastSegmentDuration * 1000);\\n\\n  if (dateTimeObject > lastSegmentEnd) {\\n    // Beyond the end of the stream, or our best guess of the end of the stream.\\n    return null;\\n  }\\n\\n  if (dateTimeObject > lastSegmentStart) {\\n    segment = lastSegment;\\n  }\\n\\n  return {\\n    segment: segment,\\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : Playlist.duration(playlist, playlist.mediaSequence + playlist.segments.indexOf(segment)),\\n    // Although, given that all segments have accurate date time objects, the segment\\n    // selected should be accurate, unless the video has been transmuxed at some point\\n    // (determined by the presence of the videoTimingInfo object), the segment's \\\"player\\n    // time\\\" (the start time in the player) can't be considered accurate.\\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\\n  };\\n};\\n/**\\n * Finds a segment that contains the given player time(in seconds).\\n *\\n * @param {Number} time The player time to find a match for\\n * @param {Object} playlist A playlist object to search within\\n */\\n\\n\\nvar findSegmentForPlayerTime = function findSegmentForPlayerTime(time, playlist) {\\n  // Assumptions:\\n  // - there will always be a segment.duration\\n  // - we can start from zero\\n  // - segments are in time order\\n  if (!playlist || !playlist.segments || playlist.segments.length === 0) {\\n    return null;\\n  }\\n\\n  var segmentEnd = 0;\\n  var segment = void 0;\\n\\n  for (var i = 0; i < playlist.segments.length; i++) {\\n    segment = playlist.segments[i]; // videoTimingInfo is set after the segment is downloaded and transmuxed, and\\n    // should contain the most accurate values we have for the segment's player times.\\n    //\\n    // Use the accurate transmuxedPresentationEnd value if it is available, otherwise fall\\n    // back to an estimate based on the manifest derived (inaccurate) segment.duration, to\\n    // calculate an end value.\\n\\n    segmentEnd = segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationEnd : segmentEnd + segment.duration;\\n\\n    if (time <= segmentEnd) {\\n      break;\\n    }\\n  }\\n\\n  var lastSegment = playlist.segments[playlist.segments.length - 1];\\n\\n  if (lastSegment.videoTimingInfo && lastSegment.videoTimingInfo.transmuxedPresentationEnd < time) {\\n    // The time requested is beyond the stream end.\\n    return null;\\n  }\\n\\n  if (time > segmentEnd) {\\n    // The time is within or beyond the last segment.\\n    //\\n    // Check to see if the time is beyond a reasonable guess of the end of the stream.\\n    if (time > segmentEnd + lastSegment.duration * SEGMENT_END_FUDGE_PERCENT) {\\n      // Technically, because the duration value is only an estimate, the time may still\\n      // exist in the last segment, however, there isn't enough information to make even\\n      // a reasonable estimate.\\n      return null;\\n    }\\n\\n    segment = lastSegment;\\n  }\\n\\n  return {\\n    segment: segment,\\n    estimatedStart: segment.videoTimingInfo ? segment.videoTimingInfo.transmuxedPresentationStart : segmentEnd - segment.duration,\\n    // Because videoTimingInfo is only set after transmux, it is the only way to get\\n    // accurate timing values.\\n    type: segment.videoTimingInfo ? 'accurate' : 'estimate'\\n  };\\n};\\n/**\\n * Gives the offset of the comparisonTimestamp from the programTime timestamp in seconds.\\n * If the offset returned is positive, the programTime occurs after the\\n * comparisonTimestamp.\\n * If the offset is negative, the programTime occurs before the comparisonTimestamp.\\n *\\n * @param {String} comparisonTimeStamp An ISO-8601 timestamp to compare against\\n * @param {String} programTime The programTime as an ISO-8601 string\\n * @return {Number} offset\\n */\\n\\n\\nvar getOffsetFromTimestamp = function getOffsetFromTimestamp(comparisonTimeStamp, programTime) {\\n  var segmentDateTime = void 0;\\n  var programDateTime = void 0;\\n\\n  try {\\n    segmentDateTime = new Date(comparisonTimeStamp);\\n    programDateTime = new Date(programTime);\\n  } catch (e) {// TODO handle error\\n  }\\n\\n  var segmentTimeEpoch = segmentDateTime.getTime();\\n  var programTimeEpoch = programDateTime.getTime();\\n  return (programTimeEpoch - segmentTimeEpoch) / 1000;\\n};\\n/**\\n * Checks that all segments in this playlist have programDateTime tags.\\n *\\n * @param {Object} playlist A playlist object\\n */\\n\\n\\nvar verifyProgramDateTimeTags = function verifyProgramDateTimeTags(playlist) {\\n  if (!playlist.segments || playlist.segments.length === 0) {\\n    return false;\\n  }\\n\\n  for (var i = 0; i < playlist.segments.length; i++) {\\n    var segment = playlist.segments[i];\\n\\n    if (!segment.dateTimeObject) {\\n      return false;\\n    }\\n  }\\n\\n  return true;\\n};\\n/**\\n * Returns the programTime of the media given a playlist and a playerTime.\\n * The playlist must have programDateTime tags for a programDateTime tag to be returned.\\n * If the segments containing the time requested have not been buffered yet, an estimate\\n * may be returned to the callback.\\n *\\n * @param {Object} args\\n * @param {Object} args.playlist A playlist object to search within\\n * @param {Number} time A playerTime in seconds\\n * @param {Function} callback(err, programTime)\\n * @returns {String} err.message A detailed error message\\n * @returns {Object} programTime\\n * @returns {Number} programTime.mediaSeconds The streamTime in seconds\\n * @returns {String} programTime.programDateTime The programTime as an ISO-8601 String\\n */\\n\\n\\nvar getProgramTime = function getProgramTime(_ref) {\\n  var playlist = _ref.playlist,\\n      _ref$time = _ref.time,\\n      time = _ref$time === undefined ? undefined : _ref$time,\\n      callback = _ref.callback;\\n\\n  if (!callback) {\\n    throw new Error('getProgramTime: callback must be provided');\\n  }\\n\\n  if (!playlist || time === undefined) {\\n    return callback({\\n      message: 'getProgramTime: playlist and time must be provided'\\n    });\\n  }\\n\\n  var matchedSegment = findSegmentForPlayerTime(time, playlist);\\n\\n  if (!matchedSegment) {\\n    return callback({\\n      message: 'valid programTime was not found'\\n    });\\n  }\\n\\n  if (matchedSegment.type === 'estimate') {\\n    return callback({\\n      message: 'Accurate programTime could not be determined.' + ' Please seek to e.seekTime and try again',\\n      seekTime: matchedSegment.estimatedStart\\n    });\\n  }\\n\\n  var programTimeObject = {\\n    mediaSeconds: time\\n  };\\n  var programTime = playerTimeToProgramTime(time, matchedSegment.segment);\\n\\n  if (programTime) {\\n    programTimeObject.programDateTime = programTime.toISOString();\\n  }\\n\\n  return callback(null, programTimeObject);\\n};\\n/**\\n * Seeks in the player to a time that matches the given programTime ISO-8601 string.\\n *\\n * @param {Object} args\\n * @param {String} args.programTime A programTime to seek to as an ISO-8601 String\\n * @param {Object} args.playlist A playlist to look within\\n * @param {Number} args.retryCount The number of times to try for an accurate seek. Default is 2.\\n * @param {Function} args.seekTo A method to perform a seek\\n * @param {Boolean} args.pauseAfterSeek Whether to end in a paused state after seeking. Default is true.\\n * @param {Object} args.tech The tech to seek on\\n * @param {Function} args.callback(err, newTime) A callback to return the new time to\\n * @returns {String} err.message A detailed error message\\n * @returns {Number} newTime The exact time that was seeked to in seconds\\n */\\n\\n\\nvar seekToProgramTime = function seekToProgramTime(_ref2) {\\n  var programTime = _ref2.programTime,\\n      playlist = _ref2.playlist,\\n      _ref2$retryCount = _ref2.retryCount,\\n      retryCount = _ref2$retryCount === undefined ? 2 : _ref2$retryCount,\\n      seekTo = _ref2.seekTo,\\n      _ref2$pauseAfterSeek = _ref2.pauseAfterSeek,\\n      pauseAfterSeek = _ref2$pauseAfterSeek === undefined ? true : _ref2$pauseAfterSeek,\\n      tech = _ref2.tech,\\n      callback = _ref2.callback;\\n\\n  if (!callback) {\\n    throw new Error('seekToProgramTime: callback must be provided');\\n  }\\n\\n  if (typeof programTime === 'undefined' || !playlist || !seekTo) {\\n    return callback({\\n      message: 'seekToProgramTime: programTime, seekTo and playlist must be provided'\\n    });\\n  }\\n\\n  if (!playlist.endList && !tech.hasStarted_) {\\n    return callback({\\n      message: 'player must be playing a live stream to start buffering'\\n    });\\n  }\\n\\n  if (!verifyProgramDateTimeTags(playlist)) {\\n    return callback({\\n      message: 'programDateTime tags must be provided in the manifest ' + playlist.resolvedUri\\n    });\\n  }\\n\\n  var matchedSegment = findSegmentForProgramTime(programTime, playlist); // no match\\n\\n  if (!matchedSegment) {\\n    return callback({\\n      message: programTime + ' was not found in the stream'\\n    });\\n  }\\n\\n  var segment = matchedSegment.segment;\\n  var mediaOffset = getOffsetFromTimestamp(segment.dateTimeObject, programTime);\\n\\n  if (matchedSegment.type === 'estimate') {\\n    // we've run out of retries\\n    if (retryCount === 0) {\\n      return callback({\\n        message: programTime + ' is not buffered yet. Try again'\\n      });\\n    }\\n\\n    seekTo(matchedSegment.estimatedStart + mediaOffset);\\n    tech.one('seeked', function () {\\n      seekToProgramTime({\\n        programTime: programTime,\\n        playlist: playlist,\\n        retryCount: retryCount - 1,\\n        seekTo: seekTo,\\n        pauseAfterSeek: pauseAfterSeek,\\n        tech: tech,\\n        callback: callback\\n      });\\n    });\\n    return;\\n  } // Since the segment.start value is determined from the buffered end or ending time\\n  // of the prior segment, the seekToTime doesn't need to account for any transmuxer\\n  // modifications.\\n\\n\\n  var seekToTime = segment.start + mediaOffset;\\n\\n  var seekedCallback = function seekedCallback() {\\n    return callback(null, tech.currentTime());\\n  }; // listen for seeked event\\n\\n\\n  tech.one('seeked', seekedCallback); // pause before seeking as video.js will restore this state\\n\\n  if (pauseAfterSeek) {\\n    tech.pause();\\n  }\\n\\n  seekTo(seekToTime);\\n};\\n/**\\n * ranges\\n *\\n * Utilities for working with TimeRanges.\\n *\\n */\\n// Fudge factor to account for TimeRanges rounding\\n\\n\\nvar TIME_FUDGE_FACTOR = 1 / 30; // Comparisons between time values such as current time and the end of the buffered range\\n// can be misleading because of precision differences or when the current media has poorly\\n// aligned audio and video, which can cause values to be slightly off from what you would\\n// expect. This value is what we consider to be safe to use in such comparisons to account\\n// for these scenarios.\\n\\nvar SAFE_TIME_DELTA = TIME_FUDGE_FACTOR * 3;\\n\\nvar filterRanges = function filterRanges(timeRanges, predicate) {\\n  var results = [];\\n  var i = void 0;\\n\\n  if (timeRanges && timeRanges.length) {\\n    // Search for ranges that match the predicate\\n    for (i = 0; i < timeRanges.length; i++) {\\n      if (predicate(timeRanges.start(i), timeRanges.end(i))) {\\n        results.push([timeRanges.start(i), timeRanges.end(i)]);\\n      }\\n    }\\n  }\\n\\n  return videojs$1.createTimeRanges(results);\\n};\\n/**\\n * Attempts to find the buffered TimeRange that contains the specified\\n * time.\\n * @param {TimeRanges} buffered - the TimeRanges object to query\\n * @param {number} time  - the time to filter on.\\n * @returns {TimeRanges} a new TimeRanges object\\n */\\n\\n\\nvar findRange = function findRange(buffered, time) {\\n  return filterRanges(buffered, function (start, end) {\\n    return start - SAFE_TIME_DELTA <= time && end + SAFE_TIME_DELTA >= time;\\n  });\\n};\\n/**\\n * Returns the TimeRanges that begin later than the specified time.\\n * @param {TimeRanges} timeRanges - the TimeRanges object to query\\n * @param {number} time - the time to filter on.\\n * @returns {TimeRanges} a new TimeRanges object.\\n */\\n\\n\\nvar findNextRange = function findNextRange(timeRanges, time) {\\n  return filterRanges(timeRanges, function (start) {\\n    return start - TIME_FUDGE_FACTOR >= time;\\n  });\\n};\\n/**\\n * Returns gaps within a list of TimeRanges\\n * @param {TimeRanges} buffered - the TimeRanges object\\n * @return {TimeRanges} a TimeRanges object of gaps\\n */\\n\\n\\nvar findGaps = function findGaps(buffered) {\\n  if (buffered.length < 2) {\\n    return videojs$1.createTimeRanges();\\n  }\\n\\n  var ranges = [];\\n\\n  for (var i = 1; i < buffered.length; i++) {\\n    var start = buffered.end(i - 1);\\n    var end = buffered.start(i);\\n    ranges.push([start, end]);\\n  }\\n\\n  return videojs$1.createTimeRanges(ranges);\\n};\\n/**\\n * Gets a human readable string for a TimeRange\\n *\\n * @param {TimeRange} range\\n * @returns {String} a human readable string\\n */\\n\\n\\nvar printableRange = function printableRange(range) {\\n  var strArr = [];\\n\\n  if (!range || !range.length) {\\n    return '';\\n  }\\n\\n  for (var i = 0; i < range.length; i++) {\\n    strArr.push(range.start(i) + ' => ' + range.end(i));\\n  }\\n\\n  return strArr.join(', ');\\n};\\n/**\\n * Calculates the amount of time left in seconds until the player hits the end of the\\n * buffer and causes a rebuffer\\n *\\n * @param {TimeRange} buffered\\n *        The state of the buffer\\n * @param {Numnber} currentTime\\n *        The current time of the player\\n * @param {Number} playbackRate\\n *        The current playback rate of the player. Defaults to 1.\\n * @return {Number}\\n *         Time until the player has to start rebuffering in seconds.\\n * @function timeUntilRebuffer\\n */\\n\\n\\nvar timeUntilRebuffer = function timeUntilRebuffer(buffered, currentTime) {\\n  var playbackRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\\n  var bufferedEnd = buffered.length ? buffered.end(buffered.length - 1) : 0;\\n  return (bufferedEnd - currentTime) / playbackRate;\\n};\\n/**\\n * Converts a TimeRanges object into an array representation\\n * @param {TimeRanges} timeRanges\\n * @returns {Array}\\n */\\n\\n\\nvar timeRangesToArray = function timeRangesToArray(timeRanges) {\\n  var timeRangesList = [];\\n\\n  for (var i = 0; i < timeRanges.length; i++) {\\n    timeRangesList.push({\\n      start: timeRanges.start(i),\\n      end: timeRanges.end(i)\\n    });\\n  }\\n\\n  return timeRangesList;\\n};\\n/**\\n * @file create-text-tracks-if-necessary.js\\n */\\n\\n/**\\n * Create text tracks on video.js if they exist on a segment.\\n *\\n * @param {Object} sourceBuffer the VSB or FSB\\n * @param {Object} mediaSource the HTML media source\\n * @param {Object} segment the segment that may contain the text track\\n * @private\\n */\\n\\n\\nvar createTextTracksIfNecessary = function createTextTracksIfNecessary(sourceBuffer, mediaSource, segment) {\\n  var player = mediaSource.player_; // create an in-band caption track if one is present in the segment\\n\\n  if (segment.captions && segment.captions.length) {\\n    if (!sourceBuffer.inbandTextTracks_) {\\n      sourceBuffer.inbandTextTracks_ = {};\\n    }\\n\\n    for (var trackId in segment.captionStreams) {\\n      if (!sourceBuffer.inbandTextTracks_[trackId]) {\\n        player.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-608'\\n        });\\n        var track = player.textTracks().getTrackById(trackId);\\n\\n        if (track) {\\n          // Resuse an existing track with a CC# id because this was\\n          // very likely created by videojs-contrib-hls from information\\n          // in the m3u8 for us to use\\n          sourceBuffer.inbandTextTracks_[trackId] = track;\\n        } else {\\n          // Otherwise, create a track with the default `CC#` label and\\n          // without a language\\n          sourceBuffer.inbandTextTracks_[trackId] = player.addRemoteTextTrack({\\n            kind: 'captions',\\n            id: trackId,\\n            label: trackId\\n          }, false).track;\\n        }\\n      }\\n    }\\n  }\\n\\n  if (segment.metadata && segment.metadata.length && !sourceBuffer.metadataTrack_) {\\n    sourceBuffer.metadataTrack_ = player.addRemoteTextTrack({\\n      kind: 'metadata',\\n      label: 'Timed Metadata'\\n    }, false).track;\\n    sourceBuffer.metadataTrack_.inBandMetadataTrackDispatchType = segment.metadata.dispatchType;\\n  }\\n};\\n/**\\n * @file remove-cues-from-track.js\\n */\\n\\n/**\\n * Remove cues from a track on video.js.\\n *\\n * @param {Double} start start of where we should remove the cue\\n * @param {Double} end end of where the we should remove the cue\\n * @param {Object} track the text track to remove the cues from\\n * @private\\n */\\n\\n\\nvar removeCuesFromTrack = function removeCuesFromTrack(start, end, track) {\\n  var i = void 0;\\n  var cue = void 0;\\n\\n  if (!track) {\\n    return;\\n  }\\n\\n  if (!track.cues) {\\n    return;\\n  }\\n\\n  i = track.cues.length;\\n\\n  while (i--) {\\n    cue = track.cues[i]; // Remove any overlapping cue\\n\\n    if (cue.startTime <= end && cue.endTime >= start) {\\n      track.removeCue(cue);\\n    }\\n  }\\n};\\n/**\\n * @file add-text-track-data.js\\n */\\n\\n/**\\n * Define properties on a cue for backwards compatability,\\n * but warn the user that the way that they are using it\\n * is depricated and will be removed at a later date.\\n *\\n * @param {Cue} cue the cue to add the properties on\\n * @private\\n */\\n\\n\\nvar deprecateOldCue = function deprecateOldCue(cue) {\\n  Object.defineProperties(cue.frame, {\\n    id: {\\n      get: function get() {\\n        videojs$1.log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\\n        return cue.value.key;\\n      }\\n    },\\n    value: {\\n      get: function get() {\\n        videojs$1.log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\\n        return cue.value.data;\\n      }\\n    },\\n    privateData: {\\n      get: function get() {\\n        videojs$1.log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\\n        return cue.value.data;\\n      }\\n    }\\n  });\\n};\\n\\nvar durationOfVideo = function durationOfVideo(duration) {\\n  var dur = void 0;\\n\\n  if (isNaN(duration) || Math.abs(duration) === Infinity) {\\n    dur = Number.MAX_VALUE;\\n  } else {\\n    dur = duration;\\n  }\\n\\n  return dur;\\n};\\n/**\\n * Add text track data to a source handler given the captions and\\n * metadata from the buffer.\\n *\\n * @param {Object} sourceHandler the virtual source buffer\\n * @param {Array} captionArray an array of caption data\\n * @param {Array} metadataArray an array of meta data\\n * @private\\n */\\n\\n\\nvar addTextTrackData = function addTextTrackData(sourceHandler, captionArray, metadataArray) {\\n  var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\\n\\n  if (captionArray) {\\n    captionArray.forEach(function (caption) {\\n      var track = caption.stream;\\n      this.inbandTextTracks_[track].addCue(new Cue(caption.startTime + this.timestampOffset, caption.endTime + this.timestampOffset, caption.text));\\n    }, sourceHandler);\\n  }\\n\\n  if (metadataArray) {\\n    var videoDuration = durationOfVideo(sourceHandler.mediaSource_.duration);\\n    metadataArray.forEach(function (metadata) {\\n      var time = metadata.cueTime + this.timestampOffset; // if time isn't a finite number between 0 and Infinity, like NaN,\\n      // ignore this bit of metadata.\\n      // This likely occurs when you have an non-timed ID3 tag like TIT2,\\n      // which is the \\\"Title/Songname/Content description\\\" frame\\n\\n      if (typeof time !== 'number' || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.isNaN(time) || time < 0 || !(time < Infinity)) {\\n        return;\\n      }\\n\\n      metadata.frames.forEach(function (frame) {\\n        var cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\\n        cue.frame = frame;\\n        cue.value = frame;\\n        deprecateOldCue(cue);\\n        this.metadataTrack_.addCue(cue);\\n      }, this);\\n    }, sourceHandler); // Updating the metadeta cues so that\\n    // the endTime of each cue is the startTime of the next cue\\n    // the endTime of last cue is the duration of the video\\n\\n    if (sourceHandler.metadataTrack_ && sourceHandler.metadataTrack_.cues && sourceHandler.metadataTrack_.cues.length) {\\n      var cues = sourceHandler.metadataTrack_.cues;\\n      var cuesArray = []; // Create a copy of the TextTrackCueList...\\n      // ...disregarding cues with a falsey value\\n\\n      for (var i = 0; i < cues.length; i++) {\\n        if (cues[i]) {\\n          cuesArray.push(cues[i]);\\n        }\\n      } // Group cues by their startTime value\\n\\n\\n      var cuesGroupedByStartTime = cuesArray.reduce(function (obj, cue) {\\n        var timeSlot = obj[cue.startTime] || [];\\n        timeSlot.push(cue);\\n        obj[cue.startTime] = timeSlot;\\n        return obj;\\n      }, {}); // Sort startTimes by ascending order\\n\\n      var sortedStartTimes = Object.keys(cuesGroupedByStartTime).sort(function (a, b) {\\n        return Number(a) - Number(b);\\n      }); // Map each cue group's endTime to the next group's startTime\\n\\n      sortedStartTimes.forEach(function (startTime, idx) {\\n        var cueGroup = cuesGroupedByStartTime[startTime];\\n        var nextTime = Number(sortedStartTimes[idx + 1]) || videoDuration; // Map each cue's endTime the next group's startTime\\n\\n        cueGroup.forEach(function (cue) {\\n          cue.endTime = nextTime;\\n        });\\n      });\\n    }\\n  }\\n};\\n\\nvar win = typeof window !== 'undefined' ? window : {},\\n    TARGET = typeof Symbol === 'undefined' ? '__target' : Symbol(),\\n    SCRIPT_TYPE = 'application/javascript',\\n    BlobBuilder = win.BlobBuilder || win.WebKitBlobBuilder || win.MozBlobBuilder || win.MSBlobBuilder,\\n    URL = win.URL || win.webkitURL || URL && URL.msURL,\\n    Worker = win.Worker;\\n/**\\n * Returns a wrapper around Web Worker code that is constructible.\\n *\\n * @function shimWorker\\n *\\n * @param { String }    filename    The name of the file\\n * @param { Function }  fn          Function wrapping the code of the worker\\n */\\n\\nfunction shimWorker(filename, fn) {\\n  return function ShimWorker(forceFallback) {\\n    var o = this;\\n\\n    if (!fn) {\\n      return new Worker(filename);\\n    } else if (Worker && !forceFallback) {\\n      // Convert the function's inner code to a string to construct the worker\\n      var source = fn.toString().replace(/^function.+?{/, '').slice(0, -1),\\n          objURL = createSourceObject(source);\\n      this[TARGET] = new Worker(objURL);\\n      wrapTerminate(this[TARGET], objURL);\\n      return this[TARGET];\\n    } else {\\n      var selfShim = {\\n        postMessage: function postMessage(m) {\\n          if (o.onmessage) {\\n            setTimeout(function () {\\n              o.onmessage({\\n                data: m,\\n                target: selfShim\\n              });\\n            });\\n          }\\n        }\\n      };\\n      fn.call(selfShim);\\n\\n      this.postMessage = function (m) {\\n        setTimeout(function () {\\n          selfShim.onmessage({\\n            data: m,\\n            target: o\\n          });\\n        });\\n      };\\n\\n      this.isThisThread = true;\\n    }\\n  };\\n} // Test Worker capabilities\\n\\n\\nif (Worker) {\\n  var testWorker,\\n      objURL = createSourceObject('self.onmessage = function () {}'),\\n      testArray = new Uint8Array(1);\\n\\n  try {\\n    testWorker = new Worker(objURL); // Native browser on some Samsung devices throws for transferables, let's detect it\\n\\n    testWorker.postMessage(testArray, [testArray.buffer]);\\n  } catch (e) {\\n    Worker = null;\\n  } finally {\\n    URL.revokeObjectURL(objURL);\\n\\n    if (testWorker) {\\n      testWorker.terminate();\\n    }\\n  }\\n}\\n\\nfunction createSourceObject(str) {\\n  try {\\n    return URL.createObjectURL(new Blob([str], {\\n      type: SCRIPT_TYPE\\n    }));\\n  } catch (e) {\\n    var blob = new BlobBuilder();\\n    blob.append(str);\\n    return URL.createObjectURL(blob.getBlob(type));\\n  }\\n}\\n\\nfunction wrapTerminate(worker, objURL) {\\n  if (!worker || !objURL) return;\\n  var term = worker.terminate;\\n  worker.objURL = objURL;\\n\\n  worker.terminate = function () {\\n    if (worker.objURL) URL.revokeObjectURL(worker.objURL);\\n    term.call(worker);\\n  };\\n}\\n\\nvar TransmuxWorker = new shimWorker(\\\"./transmuxer-worker.worker.js\\\", function (window, document$$1) {\\n  var self = this;\\n\\n  var transmuxerWorker = function () {\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * A lightweight readable stream implemention that handles event dispatching.\\n     * Objects that inherit from streams should call init in their constructors.\\n     */\\n    var Stream = function Stream() {\\n      this.init = function () {\\n        var listeners = {};\\n        /**\\n         * Add a listener for a specified event type.\\n         * @param type {string} the event name\\n         * @param listener {function} the callback to be invoked when an event of\\n         * the specified type occurs\\n         */\\n\\n        this.on = function (type, listener) {\\n          if (!listeners[type]) {\\n            listeners[type] = [];\\n          }\\n\\n          listeners[type] = listeners[type].concat(listener);\\n        };\\n        /**\\n         * Remove a listener for a specified event type.\\n         * @param type {string} the event name\\n         * @param listener {function} a function previously registered for this\\n         * type of event through `on`\\n         */\\n\\n\\n        this.off = function (type, listener) {\\n          var index;\\n\\n          if (!listeners[type]) {\\n            return false;\\n          }\\n\\n          index = listeners[type].indexOf(listener);\\n          listeners[type] = listeners[type].slice();\\n          listeners[type].splice(index, 1);\\n          return index > -1;\\n        };\\n        /**\\n         * Trigger an event of the specified type on this stream. Any additional\\n         * arguments to this function are passed as parameters to event listeners.\\n         * @param type {string} the event name\\n         */\\n\\n\\n        this.trigger = function (type) {\\n          var callbacks, i, length, args;\\n          callbacks = listeners[type];\\n\\n          if (!callbacks) {\\n            return;\\n          } // Slicing the arguments on every invocation of this method\\n          // can add a significant amount of overhead. Avoid the\\n          // intermediate object creation for the common case of a\\n          // single callback argument\\n\\n\\n          if (arguments.length === 2) {\\n            length = callbacks.length;\\n\\n            for (i = 0; i < length; ++i) {\\n              callbacks[i].call(this, arguments[1]);\\n            }\\n          } else {\\n            args = [];\\n            i = arguments.length;\\n\\n            for (i = 1; i < arguments.length; ++i) {\\n              args.push(arguments[i]);\\n            }\\n\\n            length = callbacks.length;\\n\\n            for (i = 0; i < length; ++i) {\\n              callbacks[i].apply(this, args);\\n            }\\n          }\\n        };\\n        /**\\n         * Destroys the stream and cleans up.\\n         */\\n\\n\\n        this.dispose = function () {\\n          listeners = {};\\n        };\\n      };\\n    };\\n    /**\\n     * Forwards all `data` events on this stream to the destination stream. The\\n     * destination stream should provide a method `push` to receive the data\\n     * events as they arrive.\\n     * @param destination {stream} the stream that will receive all `data` events\\n     * @param autoFlush {boolean} if false, we will not call `flush` on the destination\\n     *                            when the current stream emits a 'done' event\\n     * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n     */\\n\\n\\n    Stream.prototype.pipe = function (destination) {\\n      this.on('data', function (data) {\\n        destination.push(data);\\n      });\\n      this.on('done', function (flushSource) {\\n        destination.flush(flushSource);\\n      });\\n      this.on('partialdone', function (flushSource) {\\n        destination.partialFlush(flushSource);\\n      });\\n      this.on('endedtimeline', function (flushSource) {\\n        destination.endTimeline(flushSource);\\n      });\\n      this.on('reset', function (flushSource) {\\n        destination.reset(flushSource);\\n      });\\n      return destination;\\n    }; // Default stream functions that are expected to be overridden to perform\\n    // actual work. These are provided by the prototype as a sort of no-op\\n    // implementation so that we don't have to check for their existence in the\\n    // `pipe` function above.\\n\\n\\n    Stream.prototype.push = function (data) {\\n      this.trigger('data', data);\\n    };\\n\\n    Stream.prototype.flush = function (flushSource) {\\n      this.trigger('done', flushSource);\\n    };\\n\\n    Stream.prototype.partialFlush = function (flushSource) {\\n      this.trigger('partialdone', flushSource);\\n    };\\n\\n    Stream.prototype.endTimeline = function (flushSource) {\\n      this.trigger('endedtimeline', flushSource);\\n    };\\n\\n    Stream.prototype.reset = function (flushSource) {\\n      this.trigger('reset', flushSource);\\n    };\\n\\n    var stream = Stream;\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * Functions that generate fragmented MP4s suitable for use with Media\\n     * Source Extensions.\\n     */\\n\\n    var UINT32_MAX = Math.pow(2, 32) - 1;\\n    var box, dinf, esds, ftyp, mdat, mfhd, minf, moof, moov, mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, traf, trex, trun, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND, VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ, STTS; // pre-calculate constants\\n\\n    (function () {\\n      var i;\\n      types = {\\n        avc1: [],\\n        // codingname\\n        avcC: [],\\n        btrt: [],\\n        dinf: [],\\n        dref: [],\\n        esds: [],\\n        ftyp: [],\\n        hdlr: [],\\n        mdat: [],\\n        mdhd: [],\\n        mdia: [],\\n        mfhd: [],\\n        minf: [],\\n        moof: [],\\n        moov: [],\\n        mp4a: [],\\n        // codingname\\n        mvex: [],\\n        mvhd: [],\\n        pasp: [],\\n        sdtp: [],\\n        smhd: [],\\n        stbl: [],\\n        stco: [],\\n        stsc: [],\\n        stsd: [],\\n        stsz: [],\\n        stts: [],\\n        styp: [],\\n        tfdt: [],\\n        tfhd: [],\\n        traf: [],\\n        trak: [],\\n        trun: [],\\n        trex: [],\\n        tkhd: [],\\n        vmhd: []\\n      }; // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\\n      // don't throw an error\\n\\n      if (typeof Uint8Array === 'undefined') {\\n        return;\\n      }\\n\\n      for (i in types) {\\n        if (types.hasOwnProperty(i)) {\\n          types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\\n        }\\n      }\\n\\n      MAJOR_BRAND = new Uint8Array(['i'.charCodeAt(0), 's'.charCodeAt(0), 'o'.charCodeAt(0), 'm'.charCodeAt(0)]);\\n      AVC1_BRAND = new Uint8Array(['a'.charCodeAt(0), 'v'.charCodeAt(0), 'c'.charCodeAt(0), '1'.charCodeAt(0)]);\\n      MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\\n      VIDEO_HDLR = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00, // pre_defined\\n      0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\\n      ]);\\n      AUDIO_HDLR = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00, // pre_defined\\n      0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\\n      ]);\\n      HDLR_TYPES = {\\n        video: VIDEO_HDLR,\\n        audio: AUDIO_HDLR\\n      };\\n      DREF = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x01, // entry_count\\n      0x00, 0x00, 0x00, 0x0c, // entry_size\\n      0x75, 0x72, 0x6c, 0x20, // 'url' type\\n      0x00, // version 0\\n      0x00, 0x00, 0x01 // entry_flags\\n      ]);\\n      SMHD = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, // balance, 0 means centered\\n      0x00, 0x00 // reserved\\n      ]);\\n      STCO = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00 // entry_count\\n      ]);\\n      STSC = STCO;\\n      STSZ = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x00, // sample_size\\n      0x00, 0x00, 0x00, 0x00 // sample_count\\n      ]);\\n      STTS = STCO;\\n      VMHD = new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x01, // flags\\n      0x00, 0x00, // graphicsmode\\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\\n      ]);\\n    })();\\n\\n    box = function box(type) {\\n      var payload = [],\\n          size = 0,\\n          i,\\n          result,\\n          view;\\n\\n      for (i = 1; i < arguments.length; i++) {\\n        payload.push(arguments[i]);\\n      }\\n\\n      i = payload.length; // calculate the total size we need to allocate\\n\\n      while (i--) {\\n        size += payload[i].byteLength;\\n      }\\n\\n      result = new Uint8Array(size + 8);\\n      view = new DataView(result.buffer, result.byteOffset, result.byteLength);\\n      view.setUint32(0, result.byteLength);\\n      result.set(type, 4); // copy the payload into the result\\n\\n      for (i = 0, size = 8; i < payload.length; i++) {\\n        result.set(payload[i], size);\\n        size += payload[i].byteLength;\\n      }\\n\\n      return result;\\n    };\\n\\n    dinf = function dinf() {\\n      return box(types.dinf, box(types.dref, DREF));\\n    };\\n\\n    esds = function esds(track) {\\n      return box(types.esds, new Uint8Array([0x00, // version\\n      0x00, 0x00, 0x00, // flags\\n      // ES_Descriptor\\n      0x03, // tag, ES_DescrTag\\n      0x19, // length\\n      0x00, 0x00, // ES_ID\\n      0x00, // streamDependenceFlag, URL_flag, reserved, streamPriority\\n      // DecoderConfigDescriptor\\n      0x04, // tag, DecoderConfigDescrTag\\n      0x11, // length\\n      0x40, // object type\\n      0x15, // streamType\\n      0x00, 0x06, 0x00, // bufferSizeDB\\n      0x00, 0x00, 0xda, 0xc0, // maxBitrate\\n      0x00, 0x00, 0xda, 0xc0, // avgBitrate\\n      // DecoderSpecificInfo\\n      0x05, // tag, DecoderSpecificInfoTag\\n      0x02, // length\\n      // ISO/IEC 14496-3, AudioSpecificConfig\\n      // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\\n      track.audioobjecttype << 3 | track.samplingfrequencyindex >>> 1, track.samplingfrequencyindex << 7 | track.channelcount << 3, 0x06, 0x01, 0x02 // GASpecificConfig\\n      ]));\\n    };\\n\\n    ftyp = function ftyp() {\\n      return box(types.ftyp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND, AVC1_BRAND);\\n    };\\n\\n    hdlr = function hdlr(type) {\\n      return box(types.hdlr, HDLR_TYPES[type]);\\n    };\\n\\n    mdat = function mdat(data) {\\n      return box(types.mdat, data);\\n    };\\n\\n    mdhd = function mdhd(track) {\\n      var result = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x02, // creation_time\\n      0x00, 0x00, 0x00, 0x03, // modification_time\\n      0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \\\"ticks\\\" per second\\n      track.duration >>> 24 & 0xFF, track.duration >>> 16 & 0xFF, track.duration >>> 8 & 0xFF, track.duration & 0xFF, // duration\\n      0x55, 0xc4, // 'und' language (undetermined)\\n      0x00, 0x00]); // Use the sample rate from the track metadata, when it is\\n      // defined. The sample rate can be parsed out of an ADTS header, for\\n      // instance.\\n\\n      if (track.samplerate) {\\n        result[12] = track.samplerate >>> 24 & 0xFF;\\n        result[13] = track.samplerate >>> 16 & 0xFF;\\n        result[14] = track.samplerate >>> 8 & 0xFF;\\n        result[15] = track.samplerate & 0xFF;\\n      }\\n\\n      return box(types.mdhd, result);\\n    };\\n\\n    mdia = function mdia(track) {\\n      return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\\n    };\\n\\n    mfhd = function mfhd(sequenceNumber) {\\n      return box(types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\\n      (sequenceNumber & 0xFF000000) >> 24, (sequenceNumber & 0xFF0000) >> 16, (sequenceNumber & 0xFF00) >> 8, sequenceNumber & 0xFF // sequence_number\\n      ]));\\n    };\\n\\n    minf = function minf(track) {\\n      return box(types.minf, track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD), dinf(), stbl(track));\\n    };\\n\\n    moof = function moof(sequenceNumber, tracks) {\\n      var trackFragments = [],\\n          i = tracks.length; // build traf boxes for each track fragment\\n\\n      while (i--) {\\n        trackFragments[i] = traf(tracks[i]);\\n      }\\n\\n      return box.apply(null, [types.moof, mfhd(sequenceNumber)].concat(trackFragments));\\n    };\\n    /**\\n     * Returns a movie box.\\n     * @param tracks {array} the tracks associated with this movie\\n     * @see ISO/IEC 14496-12:2012(E), section 8.2.1\\n     */\\n\\n\\n    moov = function moov(tracks) {\\n      var i = tracks.length,\\n          boxes = [];\\n\\n      while (i--) {\\n        boxes[i] = trak(tracks[i]);\\n      }\\n\\n      return box.apply(null, [types.moov, mvhd(0xffffffff)].concat(boxes).concat(mvex(tracks)));\\n    };\\n\\n    mvex = function mvex(tracks) {\\n      var i = tracks.length,\\n          boxes = [];\\n\\n      while (i--) {\\n        boxes[i] = trex(tracks[i]);\\n      }\\n\\n      return box.apply(null, [types.mvex].concat(boxes));\\n    };\\n\\n    mvhd = function mvhd(duration) {\\n      var bytes = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      0x00, 0x00, 0x00, 0x01, // creation_time\\n      0x00, 0x00, 0x00, 0x02, // modification_time\\n      0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \\\"ticks\\\" per second\\n      (duration & 0xFF000000) >> 24, (duration & 0xFF0000) >> 16, (duration & 0xFF00) >> 8, duration & 0xFF, // duration\\n      0x00, 0x01, 0x00, 0x00, // 1.0 rate\\n      0x01, 0x00, // 1.0 volume\\n      0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\\n      0xff, 0xff, 0xff, 0xff // next_track_ID\\n      ]);\\n      return box(types.mvhd, bytes);\\n    };\\n\\n    sdtp = function sdtp(track) {\\n      var samples = track.samples || [],\\n          bytes = new Uint8Array(4 + samples.length),\\n          flags,\\n          i; // leave the full box header (4 bytes) all zero\\n      // write the sample table\\n\\n      for (i = 0; i < samples.length; i++) {\\n        flags = samples[i].flags;\\n        bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\\n      }\\n\\n      return box(types.sdtp, bytes);\\n    };\\n\\n    stbl = function stbl(track) {\\n      return box(types.stbl, stsd(track), box(types.stts, STTS), box(types.stsc, STSC), box(types.stsz, STSZ), box(types.stco, STCO));\\n    };\\n\\n    (function () {\\n      var videoSample, audioSample;\\n\\n      stsd = function stsd(track) {\\n        return box(types.stsd, new Uint8Array([0x00, // version 0\\n        0x00, 0x00, 0x00, // flags\\n        0x00, 0x00, 0x00, 0x01]), track.type === 'video' ? videoSample(track) : audioSample(track));\\n      };\\n\\n      videoSample = function videoSample(track) {\\n        var sps = track.sps || [],\\n            pps = track.pps || [],\\n            sequenceParameterSets = [],\\n            pictureParameterSets = [],\\n            i,\\n            avc1Box; // assemble the SPSs\\n\\n        for (i = 0; i < sps.length; i++) {\\n          sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\\n          sequenceParameterSets.push(sps[i].byteLength & 0xFF); // sequenceParameterSetLength\\n\\n          sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\\n        } // assemble the PPSs\\n\\n\\n        for (i = 0; i < pps.length; i++) {\\n          pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\\n          pictureParameterSets.push(pps[i].byteLength & 0xFF);\\n          pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\\n        }\\n\\n        avc1Box = [types.avc1, new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x01, // data_reference_index\\n        0x00, 0x00, // pre_defined\\n        0x00, 0x00, // reserved\\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\\n        (track.width & 0xff00) >> 8, track.width & 0xff, // width\\n        (track.height & 0xff00) >> 8, track.height & 0xff, // height\\n        0x00, 0x48, 0x00, 0x00, // horizresolution\\n        0x00, 0x48, 0x00, 0x00, // vertresolution\\n        0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x01, // frame_count\\n        0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x6a, 0x73, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2d, 0x68, 0x6c, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname\\n        0x00, 0x18, // depth = 24\\n        0x11, 0x11 // pre_defined = -1\\n        ]), box(types.avcC, new Uint8Array([0x01, // configurationVersion\\n        track.profileIdc, // AVCProfileIndication\\n        track.profileCompatibility, // profile_compatibility\\n        track.levelIdc, // AVCLevelIndication\\n        0xff // lengthSizeMinusOne, hard-coded to 4 bytes\\n        ].concat([sps.length], // numOfSequenceParameterSets\\n        sequenceParameterSets, // \\\"SPS\\\"\\n        [pps.length], // numOfPictureParameterSets\\n        pictureParameterSets // \\\"PPS\\\"\\n        ))), box(types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\\n        0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\\n        0x00, 0x2d, 0xc6, 0xc0 // avgBitrate\\n        ]))];\\n\\n        if (track.sarRatio) {\\n          var hSpacing = track.sarRatio[0],\\n              vSpacing = track.sarRatio[1];\\n          avc1Box.push(box(types.pasp, new Uint8Array([(hSpacing & 0xFF000000) >> 24, (hSpacing & 0xFF0000) >> 16, (hSpacing & 0xFF00) >> 8, hSpacing & 0xFF, (vSpacing & 0xFF000000) >> 24, (vSpacing & 0xFF0000) >> 16, (vSpacing & 0xFF00) >> 8, vSpacing & 0xFF])));\\n        }\\n\\n        return box.apply(null, avc1Box);\\n      };\\n\\n      audioSample = function audioSample(track) {\\n        return box(types.mp4a, new Uint8Array([// SampleEntry, ISO/IEC 14496-12\\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x01, // data_reference_index\\n        // AudioSampleEntry, ISO/IEC 14496-12\\n        0x00, 0x00, 0x00, 0x00, // reserved\\n        0x00, 0x00, 0x00, 0x00, // reserved\\n        (track.channelcount & 0xff00) >> 8, track.channelcount & 0xff, // channelcount\\n        (track.samplesize & 0xff00) >> 8, track.samplesize & 0xff, // samplesize\\n        0x00, 0x00, // pre_defined\\n        0x00, 0x00, // reserved\\n        (track.samplerate & 0xff00) >> 8, track.samplerate & 0xff, 0x00, 0x00 // samplerate, 16.16\\n        // MP4AudioSampleEntry, ISO/IEC 14496-14\\n        ]), esds(track));\\n      };\\n    })();\\n\\n    tkhd = function tkhd(track) {\\n      var result = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x07, // flags\\n      0x00, 0x00, 0x00, 0x00, // creation_time\\n      0x00, 0x00, 0x00, 0x00, // modification_time\\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\\n      0x00, 0x00, 0x00, 0x00, // reserved\\n      (track.duration & 0xFF000000) >> 24, (track.duration & 0xFF0000) >> 16, (track.duration & 0xFF00) >> 8, track.duration & 0xFF, // duration\\n      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\\n      0x00, 0x00, // layer\\n      0x00, 0x00, // alternate_group\\n      0x01, 0x00, // non-audio track volume\\n      0x00, 0x00, // reserved\\n      0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\\n      (track.width & 0xFF00) >> 8, track.width & 0xFF, 0x00, 0x00, // width\\n      (track.height & 0xFF00) >> 8, track.height & 0xFF, 0x00, 0x00 // height\\n      ]);\\n      return box(types.tkhd, result);\\n    };\\n    /**\\n     * Generate a track fragment (traf) box. A traf box collects metadata\\n     * about tracks in a movie fragment (moof) box.\\n     */\\n\\n\\n    traf = function traf(track) {\\n      var trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable, dataOffset, upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\\n      trackFragmentHeader = box(types.tfhd, new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x3a, // flags\\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\\n      0x00, 0x00, 0x00, 0x01, // sample_description_index\\n      0x00, 0x00, 0x00, 0x00, // default_sample_duration\\n      0x00, 0x00, 0x00, 0x00, // default_sample_size\\n      0x00, 0x00, 0x00, 0x00 // default_sample_flags\\n      ]));\\n      upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / (UINT32_MAX + 1));\\n      lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % (UINT32_MAX + 1));\\n      trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([0x01, // version 1\\n      0x00, 0x00, 0x00, // flags\\n      // baseMediaDecodeTime\\n      upperWordBaseMediaDecodeTime >>> 24 & 0xFF, upperWordBaseMediaDecodeTime >>> 16 & 0xFF, upperWordBaseMediaDecodeTime >>> 8 & 0xFF, upperWordBaseMediaDecodeTime & 0xFF, lowerWordBaseMediaDecodeTime >>> 24 & 0xFF, lowerWordBaseMediaDecodeTime >>> 16 & 0xFF, lowerWordBaseMediaDecodeTime >>> 8 & 0xFF, lowerWordBaseMediaDecodeTime & 0xFF])); // the data offset specifies the number of bytes from the start of\\n      // the containing moof to the first payload byte of the associated\\n      // mdat\\n\\n      dataOffset = 32 + // tfhd\\n      20 + // tfdt\\n      8 + // traf header\\n      16 + // mfhd\\n      8 + // moof header\\n      8; // mdat header\\n      // audio tracks require less metadata\\n\\n      if (track.type === 'audio') {\\n        trackFragmentRun = trun(track, dataOffset);\\n        return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun);\\n      } // video tracks should contain an independent and disposable samples\\n      // box (sdtp)\\n      // generate one and adjust offsets to match\\n\\n\\n      sampleDependencyTable = sdtp(track);\\n      trackFragmentRun = trun(track, sampleDependencyTable.length + dataOffset);\\n      return box(types.traf, trackFragmentHeader, trackFragmentDecodeTime, trackFragmentRun, sampleDependencyTable);\\n    };\\n    /**\\n     * Generate a track box.\\n     * @param track {object} a track definition\\n     * @return {Uint8Array} the track box\\n     */\\n\\n\\n    trak = function trak(track) {\\n      track.duration = track.duration || 0xffffffff;\\n      return box(types.trak, tkhd(track), mdia(track));\\n    };\\n\\n    trex = function trex(track) {\\n      var result = new Uint8Array([0x00, // version 0\\n      0x00, 0x00, 0x00, // flags\\n      (track.id & 0xFF000000) >> 24, (track.id & 0xFF0000) >> 16, (track.id & 0xFF00) >> 8, track.id & 0xFF, // track_ID\\n      0x00, 0x00, 0x00, 0x01, // default_sample_description_index\\n      0x00, 0x00, 0x00, 0x00, // default_sample_duration\\n      0x00, 0x00, 0x00, 0x00, // default_sample_size\\n      0x00, 0x01, 0x00, 0x01 // default_sample_flags\\n      ]); // the last two bytes of default_sample_flags is the sample\\n      // degradation priority, a hint about the importance of this sample\\n      // relative to others. Lower the degradation priority for all sample\\n      // types other than video.\\n\\n      if (track.type !== 'video') {\\n        result[result.length - 1] = 0x00;\\n      }\\n\\n      return box(types.trex, result);\\n    };\\n\\n    (function () {\\n      var audioTrun, videoTrun, trunHeader; // This method assumes all samples are uniform. That is, if a\\n      // duration is present for the first sample, it will be present for\\n      // all subsequent samples.\\n      // see ISO/IEC 14496-12:2012, Section 8.8.8.1\\n\\n      trunHeader = function trunHeader(samples, offset) {\\n        var durationPresent = 0,\\n            sizePresent = 0,\\n            flagsPresent = 0,\\n            compositionTimeOffset = 0; // trun flag constants\\n\\n        if (samples.length) {\\n          if (samples[0].duration !== undefined) {\\n            durationPresent = 0x1;\\n          }\\n\\n          if (samples[0].size !== undefined) {\\n            sizePresent = 0x2;\\n          }\\n\\n          if (samples[0].flags !== undefined) {\\n            flagsPresent = 0x4;\\n          }\\n\\n          if (samples[0].compositionTimeOffset !== undefined) {\\n            compositionTimeOffset = 0x8;\\n          }\\n        }\\n\\n        return [0x00, // version 0\\n        0x00, durationPresent | sizePresent | flagsPresent | compositionTimeOffset, 0x01, // flags\\n        (samples.length & 0xFF000000) >>> 24, (samples.length & 0xFF0000) >>> 16, (samples.length & 0xFF00) >>> 8, samples.length & 0xFF, // sample_count\\n        (offset & 0xFF000000) >>> 24, (offset & 0xFF0000) >>> 16, (offset & 0xFF00) >>> 8, offset & 0xFF // data_offset\\n        ];\\n      };\\n\\n      videoTrun = function videoTrun(track, offset) {\\n        var bytes, samples, sample, i;\\n        samples = track.samples || [];\\n        offset += 8 + 12 + 16 * samples.length;\\n        bytes = trunHeader(samples, offset);\\n\\n        for (i = 0; i < samples.length; i++) {\\n          sample = samples[i];\\n          bytes = bytes.concat([(sample.duration & 0xFF000000) >>> 24, (sample.duration & 0xFF0000) >>> 16, (sample.duration & 0xFF00) >>> 8, sample.duration & 0xFF, // sample_duration\\n          (sample.size & 0xFF000000) >>> 24, (sample.size & 0xFF0000) >>> 16, (sample.size & 0xFF00) >>> 8, sample.size & 0xFF, // sample_size\\n          sample.flags.isLeading << 2 | sample.flags.dependsOn, sample.flags.isDependedOn << 6 | sample.flags.hasRedundancy << 4 | sample.flags.paddingValue << 1 | sample.flags.isNonSyncSample, sample.flags.degradationPriority & 0xF0 << 8, sample.flags.degradationPriority & 0x0F, // sample_flags\\n          (sample.compositionTimeOffset & 0xFF000000) >>> 24, (sample.compositionTimeOffset & 0xFF0000) >>> 16, (sample.compositionTimeOffset & 0xFF00) >>> 8, sample.compositionTimeOffset & 0xFF // sample_composition_time_offset\\n          ]);\\n        }\\n\\n        return box(types.trun, new Uint8Array(bytes));\\n      };\\n\\n      audioTrun = function audioTrun(track, offset) {\\n        var bytes, samples, sample, i;\\n        samples = track.samples || [];\\n        offset += 8 + 12 + 8 * samples.length;\\n        bytes = trunHeader(samples, offset);\\n\\n        for (i = 0; i < samples.length; i++) {\\n          sample = samples[i];\\n          bytes = bytes.concat([(sample.duration & 0xFF000000) >>> 24, (sample.duration & 0xFF0000) >>> 16, (sample.duration & 0xFF00) >>> 8, sample.duration & 0xFF, // sample_duration\\n          (sample.size & 0xFF000000) >>> 24, (sample.size & 0xFF0000) >>> 16, (sample.size & 0xFF00) >>> 8, sample.size & 0xFF]); // sample_size\\n        }\\n\\n        return box(types.trun, new Uint8Array(bytes));\\n      };\\n\\n      trun = function trun(track, offset) {\\n        if (track.type === 'audio') {\\n          return audioTrun(track, offset);\\n        }\\n\\n        return videoTrun(track, offset);\\n      };\\n    })();\\n\\n    var mp4Generator = {\\n      ftyp: ftyp,\\n      mdat: mdat,\\n      moof: moof,\\n      moov: moov,\\n      initSegment: function initSegment(tracks) {\\n        var fileType = ftyp(),\\n            movie = moov(tracks),\\n            result;\\n        result = new Uint8Array(fileType.byteLength + movie.byteLength);\\n        result.set(fileType);\\n        result.set(movie, fileType.byteLength);\\n        return result;\\n      }\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n    // Convert an array of nal units into an array of frames with each frame being\\n    // composed of the nal units that make up that frame\\n    // Also keep track of cummulative data about the frame from the nal units such\\n    // as the frame duration, starting pts, etc.\\n\\n    var groupNalsIntoFrames = function groupNalsIntoFrames(nalUnits) {\\n      var i,\\n          currentNal,\\n          currentFrame = [],\\n          frames = []; // TODO added for LHLS, make sure this is OK\\n\\n      frames.byteLength = 0;\\n      frames.nalCount = 0;\\n      frames.duration = 0;\\n      currentFrame.byteLength = 0;\\n\\n      for (i = 0; i < nalUnits.length; i++) {\\n        currentNal = nalUnits[i]; // Split on 'aud'-type nal units\\n\\n        if (currentNal.nalUnitType === 'access_unit_delimiter_rbsp') {\\n          // Since the very first nal unit is expected to be an AUD\\n          // only push to the frames array when currentFrame is not empty\\n          if (currentFrame.length) {\\n            currentFrame.duration = currentNal.dts - currentFrame.dts; // TODO added for LHLS, make sure this is OK\\n\\n            frames.byteLength += currentFrame.byteLength;\\n            frames.nalCount += currentFrame.length;\\n            frames.duration += currentFrame.duration;\\n            frames.push(currentFrame);\\n          }\\n\\n          currentFrame = [currentNal];\\n          currentFrame.byteLength = currentNal.data.byteLength;\\n          currentFrame.pts = currentNal.pts;\\n          currentFrame.dts = currentNal.dts;\\n        } else {\\n          // Specifically flag key frames for ease of use later\\n          if (currentNal.nalUnitType === 'slice_layer_without_partitioning_rbsp_idr') {\\n            currentFrame.keyFrame = true;\\n          }\\n\\n          currentFrame.duration = currentNal.dts - currentFrame.dts;\\n          currentFrame.byteLength += currentNal.data.byteLength;\\n          currentFrame.push(currentNal);\\n        }\\n      } // For the last frame, use the duration of the previous frame if we\\n      // have nothing better to go on\\n\\n\\n      if (frames.length && (!currentFrame.duration || currentFrame.duration <= 0)) {\\n        currentFrame.duration = frames[frames.length - 1].duration;\\n      } // Push the final frame\\n      // TODO added for LHLS, make sure this is OK\\n\\n\\n      frames.byteLength += currentFrame.byteLength;\\n      frames.nalCount += currentFrame.length;\\n      frames.duration += currentFrame.duration;\\n      frames.push(currentFrame);\\n      return frames;\\n    }; // Convert an array of frames into an array of Gop with each Gop being composed\\n    // of the frames that make up that Gop\\n    // Also keep track of cummulative data about the Gop from the frames such as the\\n    // Gop duration, starting pts, etc.\\n\\n\\n    var groupFramesIntoGops = function groupFramesIntoGops(frames) {\\n      var i,\\n          currentFrame,\\n          currentGop = [],\\n          gops = []; // We must pre-set some of the values on the Gop since we\\n      // keep running totals of these values\\n\\n      currentGop.byteLength = 0;\\n      currentGop.nalCount = 0;\\n      currentGop.duration = 0;\\n      currentGop.pts = frames[0].pts;\\n      currentGop.dts = frames[0].dts; // store some metadata about all the Gops\\n\\n      gops.byteLength = 0;\\n      gops.nalCount = 0;\\n      gops.duration = 0;\\n      gops.pts = frames[0].pts;\\n      gops.dts = frames[0].dts;\\n\\n      for (i = 0; i < frames.length; i++) {\\n        currentFrame = frames[i];\\n\\n        if (currentFrame.keyFrame) {\\n          // Since the very first frame is expected to be an keyframe\\n          // only push to the gops array when currentGop is not empty\\n          if (currentGop.length) {\\n            gops.push(currentGop);\\n            gops.byteLength += currentGop.byteLength;\\n            gops.nalCount += currentGop.nalCount;\\n            gops.duration += currentGop.duration;\\n          }\\n\\n          currentGop = [currentFrame];\\n          currentGop.nalCount = currentFrame.length;\\n          currentGop.byteLength = currentFrame.byteLength;\\n          currentGop.pts = currentFrame.pts;\\n          currentGop.dts = currentFrame.dts;\\n          currentGop.duration = currentFrame.duration;\\n        } else {\\n          currentGop.duration += currentFrame.duration;\\n          currentGop.nalCount += currentFrame.length;\\n          currentGop.byteLength += currentFrame.byteLength;\\n          currentGop.push(currentFrame);\\n        }\\n      }\\n\\n      if (gops.length && currentGop.duration <= 0) {\\n        currentGop.duration = gops[gops.length - 1].duration;\\n      }\\n\\n      gops.byteLength += currentGop.byteLength;\\n      gops.nalCount += currentGop.nalCount;\\n      gops.duration += currentGop.duration; // push the final Gop\\n\\n      gops.push(currentGop);\\n      return gops;\\n    };\\n    /*\\n     * Search for the first keyframe in the GOPs and throw away all frames\\n     * until that keyframe. Then extend the duration of the pulled keyframe\\n     * and pull the PTS and DTS of the keyframe so that it covers the time\\n     * range of the frames that were disposed.\\n     *\\n     * @param {Array} gops video GOPs\\n     * @returns {Array} modified video GOPs\\n     */\\n\\n\\n    var extendFirstKeyFrame = function extendFirstKeyFrame(gops) {\\n      var currentGop;\\n\\n      if (!gops[0][0].keyFrame && gops.length > 1) {\\n        // Remove the first GOP\\n        currentGop = gops.shift();\\n        gops.byteLength -= currentGop.byteLength;\\n        gops.nalCount -= currentGop.nalCount; // Extend the first frame of what is now the\\n        // first gop to cover the time period of the\\n        // frames we just removed\\n\\n        gops[0][0].dts = currentGop.dts;\\n        gops[0][0].pts = currentGop.pts;\\n        gops[0][0].duration += currentGop.duration;\\n      }\\n\\n      return gops;\\n    };\\n    /**\\n     * Default sample object\\n     * see ISO/IEC 14496-12:2012, section 8.6.4.3\\n     */\\n\\n\\n    var createDefaultSample = function createDefaultSample() {\\n      return {\\n        size: 0,\\n        flags: {\\n          isLeading: 0,\\n          dependsOn: 1,\\n          isDependedOn: 0,\\n          hasRedundancy: 0,\\n          degradationPriority: 0,\\n          isNonSyncSample: 1\\n        }\\n      };\\n    };\\n    /*\\n     * Collates information from a video frame into an object for eventual\\n     * entry into an MP4 sample table.\\n     *\\n     * @param {Object} frame the video frame\\n     * @param {Number} dataOffset the byte offset to position the sample\\n     * @return {Object} object containing sample table info for a frame\\n     */\\n\\n\\n    var sampleForFrame = function sampleForFrame(frame, dataOffset) {\\n      var sample = createDefaultSample();\\n      sample.dataOffset = dataOffset;\\n      sample.compositionTimeOffset = frame.pts - frame.dts;\\n      sample.duration = frame.duration;\\n      sample.size = 4 * frame.length; // Space for nal unit size\\n\\n      sample.size += frame.byteLength;\\n\\n      if (frame.keyFrame) {\\n        sample.flags.dependsOn = 2;\\n        sample.flags.isNonSyncSample = 0;\\n      }\\n\\n      return sample;\\n    }; // generate the track's sample table from an array of gops\\n\\n\\n    var generateSampleTable = function generateSampleTable(gops, baseDataOffset) {\\n      var h,\\n          i,\\n          sample,\\n          currentGop,\\n          currentFrame,\\n          dataOffset = baseDataOffset || 0,\\n          samples = [];\\n\\n      for (h = 0; h < gops.length; h++) {\\n        currentGop = gops[h];\\n\\n        for (i = 0; i < currentGop.length; i++) {\\n          currentFrame = currentGop[i];\\n          sample = sampleForFrame(currentFrame, dataOffset);\\n          dataOffset += sample.size;\\n          samples.push(sample);\\n        }\\n      }\\n\\n      return samples;\\n    }; // generate the track's raw mdat data from an array of gops\\n\\n\\n    var concatenateNalData = function concatenateNalData(gops) {\\n      var h,\\n          i,\\n          j,\\n          currentGop,\\n          currentFrame,\\n          currentNal,\\n          dataOffset = 0,\\n          nalsByteLength = gops.byteLength,\\n          numberOfNals = gops.nalCount,\\n          totalByteLength = nalsByteLength + 4 * numberOfNals,\\n          data = new Uint8Array(totalByteLength),\\n          view = new DataView(data.buffer); // For each Gop..\\n\\n      for (h = 0; h < gops.length; h++) {\\n        currentGop = gops[h]; // For each Frame..\\n\\n        for (i = 0; i < currentGop.length; i++) {\\n          currentFrame = currentGop[i]; // For each NAL..\\n\\n          for (j = 0; j < currentFrame.length; j++) {\\n            currentNal = currentFrame[j];\\n            view.setUint32(dataOffset, currentNal.data.byteLength);\\n            dataOffset += 4;\\n            data.set(currentNal.data, dataOffset);\\n            dataOffset += currentNal.data.byteLength;\\n          }\\n        }\\n      }\\n\\n      return data;\\n    }; // generate the track's sample table from a frame\\n\\n\\n    var generateSampleTableForFrame = function generateSampleTableForFrame(frame, baseDataOffset) {\\n      var sample,\\n          dataOffset = baseDataOffset || 0,\\n          samples = [];\\n      sample = sampleForFrame(frame, dataOffset);\\n      samples.push(sample);\\n      return samples;\\n    }; // generate the track's raw mdat data from a frame\\n\\n\\n    var concatenateNalDataForFrame = function concatenateNalDataForFrame(frame) {\\n      var i,\\n          currentNal,\\n          dataOffset = 0,\\n          nalsByteLength = frame.byteLength,\\n          numberOfNals = frame.length,\\n          totalByteLength = nalsByteLength + 4 * numberOfNals,\\n          data = new Uint8Array(totalByteLength),\\n          view = new DataView(data.buffer); // For each NAL..\\n\\n      for (i = 0; i < frame.length; i++) {\\n        currentNal = frame[i];\\n        view.setUint32(dataOffset, currentNal.data.byteLength);\\n        dataOffset += 4;\\n        data.set(currentNal.data, dataOffset);\\n        dataOffset += currentNal.data.byteLength;\\n      }\\n\\n      return data;\\n    };\\n\\n    var frameUtils = {\\n      groupNalsIntoFrames: groupNalsIntoFrames,\\n      groupFramesIntoGops: groupFramesIntoGops,\\n      extendFirstKeyFrame: extendFirstKeyFrame,\\n      generateSampleTable: generateSampleTable,\\n      concatenateNalData: concatenateNalData,\\n      generateSampleTableForFrame: generateSampleTableForFrame,\\n      concatenateNalDataForFrame: concatenateNalDataForFrame\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var highPrefix = [33, 16, 5, 32, 164, 27];\\n    var lowPrefix = [33, 65, 108, 84, 1, 2, 4, 8, 168, 2, 4, 8, 17, 191, 252];\\n\\n    var zeroFill = function zeroFill(count) {\\n      var a = [];\\n\\n      while (count--) {\\n        a.push(0);\\n      }\\n\\n      return a;\\n    };\\n\\n    var makeTable = function makeTable(metaTable) {\\n      return Object.keys(metaTable).reduce(function (obj, key) {\\n        obj[key] = new Uint8Array(metaTable[key].reduce(function (arr, part) {\\n          return arr.concat(part);\\n        }, []));\\n        return obj;\\n      }, {});\\n    }; // Frames-of-silence to use for filling in missing AAC frames\\n\\n\\n    var coneOfSilence = {\\n      96000: [highPrefix, [227, 64], zeroFill(154), [56]],\\n      88200: [highPrefix, [231], zeroFill(170), [56]],\\n      64000: [highPrefix, [248, 192], zeroFill(240), [56]],\\n      48000: [highPrefix, [255, 192], zeroFill(268), [55, 148, 128], zeroFill(54), [112]],\\n      44100: [highPrefix, [255, 192], zeroFill(268), [55, 163, 128], zeroFill(84), [112]],\\n      32000: [highPrefix, [255, 192], zeroFill(268), [55, 234], zeroFill(226), [112]],\\n      24000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 112], zeroFill(126), [224]],\\n      16000: [highPrefix, [255, 192], zeroFill(268), [55, 255, 128], zeroFill(268), [111, 255], zeroFill(269), [223, 108], zeroFill(195), [1, 192]],\\n      12000: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 253, 128], zeroFill(259), [56]],\\n      11025: [lowPrefix, zeroFill(268), [3, 127, 248], zeroFill(268), [6, 255, 240], zeroFill(268), [13, 255, 224], zeroFill(268), [27, 255, 192], zeroFill(268), [55, 175, 128], zeroFill(108), [112]],\\n      8000: [lowPrefix, zeroFill(268), [3, 121, 16], zeroFill(47), [7]]\\n    };\\n    var silence = makeTable(coneOfSilence);\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var ONE_SECOND_IN_TS = 90000,\\n        // 90kHz clock\\n    secondsToVideoTs,\\n        secondsToAudioTs,\\n        videoTsToSeconds,\\n        audioTsToSeconds,\\n        audioTsToVideoTs,\\n        videoTsToAudioTs,\\n        metadataTsToSeconds;\\n\\n    secondsToVideoTs = function secondsToVideoTs(seconds) {\\n      return seconds * ONE_SECOND_IN_TS;\\n    };\\n\\n    secondsToAudioTs = function secondsToAudioTs(seconds, sampleRate) {\\n      return seconds * sampleRate;\\n    };\\n\\n    videoTsToSeconds = function videoTsToSeconds(timestamp) {\\n      return timestamp / ONE_SECOND_IN_TS;\\n    };\\n\\n    audioTsToSeconds = function audioTsToSeconds(timestamp, sampleRate) {\\n      return timestamp / sampleRate;\\n    };\\n\\n    audioTsToVideoTs = function audioTsToVideoTs(timestamp, sampleRate) {\\n      return secondsToVideoTs(audioTsToSeconds(timestamp, sampleRate));\\n    };\\n\\n    videoTsToAudioTs = function videoTsToAudioTs(timestamp, sampleRate) {\\n      return secondsToAudioTs(videoTsToSeconds(timestamp), sampleRate);\\n    };\\n    /**\\n     * Adjust ID3 tag or caption timing information by the timeline pts values\\n     * (if keepOriginalTimestamps is false) and convert to seconds\\n     */\\n\\n\\n    metadataTsToSeconds = function metadataTsToSeconds(timestamp, timelineStartPts, keepOriginalTimestamps) {\\n      return videoTsToSeconds(keepOriginalTimestamps ? timestamp : timestamp - timelineStartPts);\\n    };\\n\\n    var clock = {\\n      ONE_SECOND_IN_TS: ONE_SECOND_IN_TS,\\n      secondsToVideoTs: secondsToVideoTs,\\n      secondsToAudioTs: secondsToAudioTs,\\n      videoTsToSeconds: videoTsToSeconds,\\n      audioTsToSeconds: audioTsToSeconds,\\n      audioTsToVideoTs: audioTsToVideoTs,\\n      videoTsToAudioTs: videoTsToAudioTs,\\n      metadataTsToSeconds: metadataTsToSeconds\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    /**\\n     * Sum the `byteLength` properties of the data in each AAC frame\\n     */\\n\\n    var sumFrameByteLengths = function sumFrameByteLengths(array) {\\n      var i,\\n          currentObj,\\n          sum = 0; // sum the byteLength's all each nal unit in the frame\\n\\n      for (i = 0; i < array.length; i++) {\\n        currentObj = array[i];\\n        sum += currentObj.data.byteLength;\\n      }\\n\\n      return sum;\\n    }; // Possibly pad (prefix) the audio track with silence if appending this track\\n    // would lead to the introduction of a gap in the audio buffer\\n\\n\\n    var prefixWithSilence = function prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime) {\\n      var baseMediaDecodeTimeTs,\\n          frameDuration = 0,\\n          audioGapDuration = 0,\\n          audioFillFrameCount = 0,\\n          audioFillDuration = 0,\\n          silentFrame,\\n          i,\\n          firstFrame;\\n\\n      if (!frames.length) {\\n        return;\\n      }\\n\\n      baseMediaDecodeTimeTs = clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate); // determine frame clock duration based on sample rate, round up to avoid overfills\\n\\n      frameDuration = Math.ceil(clock.ONE_SECOND_IN_TS / (track.samplerate / 1024));\\n\\n      if (audioAppendStartTs && videoBaseMediaDecodeTime) {\\n        // insert the shortest possible amount (audio gap or audio to video gap)\\n        audioGapDuration = baseMediaDecodeTimeTs - Math.max(audioAppendStartTs, videoBaseMediaDecodeTime); // number of full frames in the audio gap\\n\\n        audioFillFrameCount = Math.floor(audioGapDuration / frameDuration);\\n        audioFillDuration = audioFillFrameCount * frameDuration;\\n      } // don't attempt to fill gaps smaller than a single frame or larger\\n      // than a half second\\n\\n\\n      if (audioFillFrameCount < 1 || audioFillDuration > clock.ONE_SECOND_IN_TS / 2) {\\n        return;\\n      }\\n\\n      silentFrame = silence[track.samplerate];\\n\\n      if (!silentFrame) {\\n        // we don't have a silent frame pregenerated for the sample rate, so use a frame\\n        // from the content instead\\n        silentFrame = frames[0].data;\\n      }\\n\\n      for (i = 0; i < audioFillFrameCount; i++) {\\n        firstFrame = frames[0];\\n        frames.splice(0, 0, {\\n          data: silentFrame,\\n          dts: firstFrame.dts - frameDuration,\\n          pts: firstFrame.pts - frameDuration\\n        });\\n      }\\n\\n      track.baseMediaDecodeTime -= Math.floor(clock.videoTsToAudioTs(audioFillDuration, track.samplerate));\\n    }; // If the audio segment extends before the earliest allowed dts\\n    // value, remove AAC frames until starts at or after the earliest\\n    // allowed DTS so that we don't end up with a negative baseMedia-\\n    // DecodeTime for the audio track\\n\\n\\n    var trimAdtsFramesByEarliestDts = function trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts) {\\n      if (track.minSegmentDts >= earliestAllowedDts) {\\n        return adtsFrames;\\n      } // We will need to recalculate the earliest segment Dts\\n\\n\\n      track.minSegmentDts = Infinity;\\n      return adtsFrames.filter(function (currentFrame) {\\n        // If this is an allowed frame, keep it and record it's Dts\\n        if (currentFrame.dts >= earliestAllowedDts) {\\n          track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\\n          track.minSegmentPts = track.minSegmentDts;\\n          return true;\\n        } // Otherwise, discard it\\n\\n\\n        return false;\\n      });\\n    }; // generate the track's raw mdat data from an array of frames\\n\\n\\n    var generateSampleTable$1 = function generateSampleTable(frames) {\\n      var i,\\n          currentFrame,\\n          samples = [];\\n\\n      for (i = 0; i < frames.length; i++) {\\n        currentFrame = frames[i];\\n        samples.push({\\n          size: currentFrame.data.byteLength,\\n          duration: 1024 // For AAC audio, all samples contain 1024 samples\\n\\n        });\\n      }\\n\\n      return samples;\\n    }; // generate the track's sample table from an array of frames\\n\\n\\n    var concatenateFrameData = function concatenateFrameData(frames) {\\n      var i,\\n          currentFrame,\\n          dataOffset = 0,\\n          data = new Uint8Array(sumFrameByteLengths(frames));\\n\\n      for (i = 0; i < frames.length; i++) {\\n        currentFrame = frames[i];\\n        data.set(currentFrame.data, dataOffset);\\n        dataOffset += currentFrame.data.byteLength;\\n      }\\n\\n      return data;\\n    };\\n\\n    var audioFrameUtils = {\\n      prefixWithSilence: prefixWithSilence,\\n      trimAdtsFramesByEarliestDts: trimAdtsFramesByEarliestDts,\\n      generateSampleTable: generateSampleTable$1,\\n      concatenateFrameData: concatenateFrameData\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var ONE_SECOND_IN_TS$1 = clock.ONE_SECOND_IN_TS;\\n    /**\\n     * Store information about the start and end of the track and the\\n     * duration for each frame/sample we process in order to calculate\\n     * the baseMediaDecodeTime\\n     */\\n\\n    var collectDtsInfo = function collectDtsInfo(track, data) {\\n      if (typeof data.pts === 'number') {\\n        if (track.timelineStartInfo.pts === undefined) {\\n          track.timelineStartInfo.pts = data.pts;\\n        }\\n\\n        if (track.minSegmentPts === undefined) {\\n          track.minSegmentPts = data.pts;\\n        } else {\\n          track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\\n        }\\n\\n        if (track.maxSegmentPts === undefined) {\\n          track.maxSegmentPts = data.pts;\\n        } else {\\n          track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\\n        }\\n      }\\n\\n      if (typeof data.dts === 'number') {\\n        if (track.timelineStartInfo.dts === undefined) {\\n          track.timelineStartInfo.dts = data.dts;\\n        }\\n\\n        if (track.minSegmentDts === undefined) {\\n          track.minSegmentDts = data.dts;\\n        } else {\\n          track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\\n        }\\n\\n        if (track.maxSegmentDts === undefined) {\\n          track.maxSegmentDts = data.dts;\\n        } else {\\n          track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\\n        }\\n      }\\n    };\\n    /**\\n     * Clear values used to calculate the baseMediaDecodeTime between\\n     * tracks\\n     */\\n\\n\\n    var clearDtsInfo = function clearDtsInfo(track) {\\n      delete track.minSegmentDts;\\n      delete track.maxSegmentDts;\\n      delete track.minSegmentPts;\\n      delete track.maxSegmentPts;\\n    };\\n    /**\\n     * Calculate the track's baseMediaDecodeTime based on the earliest\\n     * DTS the transmuxer has ever seen and the minimum DTS for the\\n     * current track\\n     * @param track {object} track metadata configuration\\n     * @param keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at 0.\\n     */\\n\\n\\n    var calculateTrackBaseMediaDecodeTime = function calculateTrackBaseMediaDecodeTime(track, keepOriginalTimestamps) {\\n      var baseMediaDecodeTime,\\n          scale,\\n          minSegmentDts = track.minSegmentDts; // Optionally adjust the time so the first segment starts at zero.\\n\\n      if (!keepOriginalTimestamps) {\\n        minSegmentDts -= track.timelineStartInfo.dts;\\n      } // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\\n      // we want the start of the first segment to be placed\\n\\n\\n      baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime; // Add to that the distance this segment is from the very first\\n\\n      baseMediaDecodeTime += minSegmentDts; // baseMediaDecodeTime must not become negative\\n\\n      baseMediaDecodeTime = Math.max(0, baseMediaDecodeTime);\\n\\n      if (track.type === 'audio') {\\n        // Audio has a different clock equal to the sampling_rate so we need to\\n        // scale the PTS values into the clock rate of the track\\n        scale = track.samplerate / ONE_SECOND_IN_TS$1;\\n        baseMediaDecodeTime *= scale;\\n        baseMediaDecodeTime = Math.floor(baseMediaDecodeTime);\\n      }\\n\\n      return baseMediaDecodeTime;\\n    };\\n\\n    var trackDecodeInfo = {\\n      clearDtsInfo: clearDtsInfo,\\n      calculateTrackBaseMediaDecodeTime: calculateTrackBaseMediaDecodeTime,\\n      collectDtsInfo: collectDtsInfo\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * Reads in-band caption information from a video elementary\\n     * stream. Captions must follow the CEA-708 standard for injection\\n     * into an MPEG-2 transport streams.\\n     * @see https://en.wikipedia.org/wiki/CEA-708\\n     * @see https://www.gpo.gov/fdsys/pkg/CFR-2007-title47-vol1/pdf/CFR-2007-title47-vol1-sec15-119.pdf\\n     */\\n    // Supplemental enhancement information (SEI) NAL units have a\\n    // payload type field to indicate how they are to be\\n    // interpreted. CEAS-708 caption content is always transmitted with\\n    // payload type 0x04.\\n\\n    var USER_DATA_REGISTERED_ITU_T_T35 = 4,\\n        RBSP_TRAILING_BITS = 128;\\n    /**\\n      * Parse a supplemental enhancement information (SEI) NAL unit.\\n      * Stops parsing once a message of type ITU T T35 has been found.\\n      *\\n      * @param bytes {Uint8Array} the bytes of a SEI NAL unit\\n      * @return {object} the parsed SEI payload\\n      * @see Rec. ITU-T H.264, 7.3.2.3.1\\n      */\\n\\n    var parseSei = function parseSei(bytes) {\\n      var i = 0,\\n          result = {\\n        payloadType: -1,\\n        payloadSize: 0\\n      },\\n          payloadType = 0,\\n          payloadSize = 0; // go through the sei_rbsp parsing each each individual sei_message\\n\\n      while (i < bytes.byteLength) {\\n        // stop once we have hit the end of the sei_rbsp\\n        if (bytes[i] === RBSP_TRAILING_BITS) {\\n          break;\\n        } // Parse payload type\\n\\n\\n        while (bytes[i] === 0xFF) {\\n          payloadType += 255;\\n          i++;\\n        }\\n\\n        payloadType += bytes[i++]; // Parse payload size\\n\\n        while (bytes[i] === 0xFF) {\\n          payloadSize += 255;\\n          i++;\\n        }\\n\\n        payloadSize += bytes[i++]; // this sei_message is a 608/708 caption so save it and break\\n        // there can only ever be one caption message in a frame's sei\\n\\n        if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\\n          result.payloadType = payloadType;\\n          result.payloadSize = payloadSize;\\n          result.payload = bytes.subarray(i, i + payloadSize);\\n          break;\\n        } // skip the payload and parse the next message\\n\\n\\n        i += payloadSize;\\n        payloadType = 0;\\n        payloadSize = 0;\\n      }\\n\\n      return result;\\n    }; // see ANSI/SCTE 128-1 (2013), section 8.1\\n\\n\\n    var parseUserData = function parseUserData(sei) {\\n      // itu_t_t35_contry_code must be 181 (United States) for\\n      // captions\\n      if (sei.payload[0] !== 181) {\\n        return null;\\n      } // itu_t_t35_provider_code should be 49 (ATSC) for captions\\n\\n\\n      if ((sei.payload[1] << 8 | sei.payload[2]) !== 49) {\\n        return null;\\n      } // the user_identifier should be \\\"GA94\\\" to indicate ATSC1 data\\n\\n\\n      if (String.fromCharCode(sei.payload[3], sei.payload[4], sei.payload[5], sei.payload[6]) !== 'GA94') {\\n        return null;\\n      } // finally, user_data_type_code should be 0x03 for caption data\\n\\n\\n      if (sei.payload[7] !== 0x03) {\\n        return null;\\n      } // return the user_data_type_structure and strip the trailing\\n      // marker bits\\n\\n\\n      return sei.payload.subarray(8, sei.payload.length - 1);\\n    }; // see CEA-708-D, section 4.4\\n\\n\\n    var parseCaptionPackets = function parseCaptionPackets(pts, userData) {\\n      var results = [],\\n          i,\\n          count,\\n          offset,\\n          data; // if this is just filler, return immediately\\n\\n      if (!(userData[0] & 0x40)) {\\n        return results;\\n      } // parse out the cc_data_1 and cc_data_2 fields\\n\\n\\n      count = userData[0] & 0x1f;\\n\\n      for (i = 0; i < count; i++) {\\n        offset = i * 3;\\n        data = {\\n          type: userData[offset + 2] & 0x03,\\n          pts: pts\\n        }; // capture cc data when cc_valid is 1\\n\\n        if (userData[offset + 2] & 0x04) {\\n          data.ccData = userData[offset + 3] << 8 | userData[offset + 4];\\n          results.push(data);\\n        }\\n      }\\n\\n      return results;\\n    };\\n\\n    var discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\\n      var length = data.byteLength,\\n          emulationPreventionBytesPositions = [],\\n          i = 1,\\n          newLength,\\n          newData; // Find all `Emulation Prevention Bytes`\\n\\n      while (i < length - 2) {\\n        if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\\n          emulationPreventionBytesPositions.push(i + 2);\\n          i += 2;\\n        } else {\\n          i++;\\n        }\\n      } // If no Emulation Prevention Bytes were found just return the original\\n      // array\\n\\n\\n      if (emulationPreventionBytesPositions.length === 0) {\\n        return data;\\n      } // Create a new array to hold the NAL unit data\\n\\n\\n      newLength = length - emulationPreventionBytesPositions.length;\\n      newData = new Uint8Array(newLength);\\n      var sourceIndex = 0;\\n\\n      for (i = 0; i < newLength; sourceIndex++, i++) {\\n        if (sourceIndex === emulationPreventionBytesPositions[0]) {\\n          // Skip this byte\\n          sourceIndex++; // Remove this position index\\n\\n          emulationPreventionBytesPositions.shift();\\n        }\\n\\n        newData[i] = data[sourceIndex];\\n      }\\n\\n      return newData;\\n    }; // exports\\n\\n\\n    var captionPacketParser = {\\n      parseSei: parseSei,\\n      parseUserData: parseUserData,\\n      parseCaptionPackets: parseCaptionPackets,\\n      discardEmulationPreventionBytes: discardEmulationPreventionBytes,\\n      USER_DATA_REGISTERED_ITU_T_T35: USER_DATA_REGISTERED_ITU_T_T35\\n    }; // -----------------\\n    // Link To Transport\\n    // -----------------\\n\\n    var CaptionStream = function CaptionStream() {\\n      CaptionStream.prototype.init.call(this);\\n      this.captionPackets_ = [];\\n      this.ccStreams_ = [new Cea608Stream(0, 0), // eslint-disable-line no-use-before-define\\n      new Cea608Stream(0, 1), // eslint-disable-line no-use-before-define\\n      new Cea608Stream(1, 0), // eslint-disable-line no-use-before-define\\n      new Cea608Stream(1, 1) // eslint-disable-line no-use-before-define\\n      ];\\n      this.reset(); // forward data and done events from CCs to this CaptionStream\\n\\n      this.ccStreams_.forEach(function (cc) {\\n        cc.on('data', this.trigger.bind(this, 'data'));\\n        cc.on('partialdone', this.trigger.bind(this, 'partialdone'));\\n        cc.on('done', this.trigger.bind(this, 'done'));\\n      }, this);\\n    };\\n\\n    CaptionStream.prototype = new stream();\\n\\n    CaptionStream.prototype.push = function (event) {\\n      var sei, userData, newCaptionPackets; // only examine SEI NALs\\n\\n      if (event.nalUnitType !== 'sei_rbsp') {\\n        return;\\n      } // parse the sei\\n\\n\\n      sei = captionPacketParser.parseSei(event.escapedRBSP); // ignore everything but user_data_registered_itu_t_t35\\n\\n      if (sei.payloadType !== captionPacketParser.USER_DATA_REGISTERED_ITU_T_T35) {\\n        return;\\n      } // parse out the user data payload\\n\\n\\n      userData = captionPacketParser.parseUserData(sei); // ignore unrecognized userData\\n\\n      if (!userData) {\\n        return;\\n      } // Sometimes, the same segment # will be downloaded twice. To stop the\\n      // caption data from being processed twice, we track the latest dts we've\\n      // received and ignore everything with a dts before that. However, since\\n      // data for a specific dts can be split across packets on either side of\\n      // a segment boundary, we need to make sure we *don't* ignore the packets\\n      // from the *next* segment that have dts === this.latestDts_. By constantly\\n      // tracking the number of packets received with dts === this.latestDts_, we\\n      // know how many should be ignored once we start receiving duplicates.\\n\\n\\n      if (event.dts < this.latestDts_) {\\n        // We've started getting older data, so set the flag.\\n        this.ignoreNextEqualDts_ = true;\\n        return;\\n      } else if (event.dts === this.latestDts_ && this.ignoreNextEqualDts_) {\\n        this.numSameDts_--;\\n\\n        if (!this.numSameDts_) {\\n          // We've received the last duplicate packet, time to start processing again\\n          this.ignoreNextEqualDts_ = false;\\n        }\\n\\n        return;\\n      } // parse out CC data packets and save them for later\\n\\n\\n      newCaptionPackets = captionPacketParser.parseCaptionPackets(event.pts, userData);\\n      this.captionPackets_ = this.captionPackets_.concat(newCaptionPackets);\\n\\n      if (this.latestDts_ !== event.dts) {\\n        this.numSameDts_ = 0;\\n      }\\n\\n      this.numSameDts_++;\\n      this.latestDts_ = event.dts;\\n    };\\n\\n    CaptionStream.prototype.flushCCStreams = function (flushType) {\\n      this.ccStreams_.forEach(function (cc) {\\n        return flushType === 'flush' ? cc.flush() : cc.partialFlush();\\n      }, this);\\n    };\\n\\n    CaptionStream.prototype.flushStream = function (flushType) {\\n      // make sure we actually parsed captions before proceeding\\n      if (!this.captionPackets_.length) {\\n        this.flushCCStreams(flushType);\\n        return;\\n      } // In Chrome, the Array#sort function is not stable so add a\\n      // presortIndex that we can use to ensure we get a stable-sort\\n\\n\\n      this.captionPackets_.forEach(function (elem, idx) {\\n        elem.presortIndex = idx;\\n      }); // sort caption byte-pairs based on their PTS values\\n\\n      this.captionPackets_.sort(function (a, b) {\\n        if (a.pts === b.pts) {\\n          return a.presortIndex - b.presortIndex;\\n        }\\n\\n        return a.pts - b.pts;\\n      });\\n      this.captionPackets_.forEach(function (packet) {\\n        if (packet.type < 2) {\\n          // Dispatch packet to the right Cea608Stream\\n          this.dispatchCea608Packet(packet);\\n        } // this is where an 'else' would go for a dispatching packets\\n        // to a theoretical Cea708Stream that handles SERVICEn data\\n\\n      }, this);\\n      this.captionPackets_.length = 0;\\n      this.flushCCStreams(flushType);\\n    };\\n\\n    CaptionStream.prototype.flush = function () {\\n      return this.flushStream('flush');\\n    }; // Only called if handling partial data\\n\\n\\n    CaptionStream.prototype.partialFlush = function () {\\n      return this.flushStream('partialFlush');\\n    };\\n\\n    CaptionStream.prototype.reset = function () {\\n      this.latestDts_ = null;\\n      this.ignoreNextEqualDts_ = false;\\n      this.numSameDts_ = 0;\\n      this.activeCea608Channel_ = [null, null];\\n      this.ccStreams_.forEach(function (ccStream) {\\n        ccStream.reset();\\n      });\\n    }; // From the CEA-608 spec:\\n\\n    /*\\n     * When XDS sub-packets are interleaved with other services, the end of each sub-packet shall be followed\\n     * by a control pair to change to a different service. When any of the control codes from 0x10 to 0x1F is\\n     * used to begin a control code pair, it indicates the return to captioning or Text data. The control code pair\\n     * and subsequent data should then be processed according to the FCC rules. It may be necessary for the\\n     * line 21 data encoder to automatically insert a control code pair (i.e. RCL, RU2, RU3, RU4, RDC, or RTD)\\n     * to switch to captioning or Text.\\n    */\\n    // With that in mind, we ignore any data between an XDS control code and a\\n    // subsequent closed-captioning control code.\\n\\n\\n    CaptionStream.prototype.dispatchCea608Packet = function (packet) {\\n      // NOTE: packet.type is the CEA608 field\\n      if (this.setsTextOrXDSActive(packet)) {\\n        this.activeCea608Channel_[packet.type] = null;\\n      } else if (this.setsChannel1Active(packet)) {\\n        this.activeCea608Channel_[packet.type] = 0;\\n      } else if (this.setsChannel2Active(packet)) {\\n        this.activeCea608Channel_[packet.type] = 1;\\n      }\\n\\n      if (this.activeCea608Channel_[packet.type] === null) {\\n        // If we haven't received anything to set the active channel, or the\\n        // packets are Text/XDS data, discard the data; we don't want jumbled\\n        // captions\\n        return;\\n      }\\n\\n      this.ccStreams_[(packet.type << 1) + this.activeCea608Channel_[packet.type]].push(packet);\\n    };\\n\\n    CaptionStream.prototype.setsChannel1Active = function (packet) {\\n      return (packet.ccData & 0x7800) === 0x1000;\\n    };\\n\\n    CaptionStream.prototype.setsChannel2Active = function (packet) {\\n      return (packet.ccData & 0x7800) === 0x1800;\\n    };\\n\\n    CaptionStream.prototype.setsTextOrXDSActive = function (packet) {\\n      return (packet.ccData & 0x7100) === 0x0100 || (packet.ccData & 0x78fe) === 0x102a || (packet.ccData & 0x78fe) === 0x182a;\\n    }; // ----------------------\\n    // Session to Application\\n    // ----------------------\\n    // This hash maps non-ASCII, special, and extended character codes to their\\n    // proper Unicode equivalent. The first keys that are only a single byte\\n    // are the non-standard ASCII characters, which simply map the CEA608 byte\\n    // to the standard ASCII/Unicode. The two-byte keys that follow are the CEA608\\n    // character codes, but have their MSB bitmasked with 0x03 so that a lookup\\n    // can be performed regardless of the field and data channel on which the\\n    // character code was received.\\n\\n\\n    var CHARACTER_TRANSLATION = {\\n      0x2a: 0xe1,\\n      // á\\n      0x5c: 0xe9,\\n      // é\\n      0x5e: 0xed,\\n      // í\\n      0x5f: 0xf3,\\n      // ó\\n      0x60: 0xfa,\\n      // ú\\n      0x7b: 0xe7,\\n      // ç\\n      0x7c: 0xf7,\\n      // ÷\\n      0x7d: 0xd1,\\n      // Ñ\\n      0x7e: 0xf1,\\n      // ñ\\n      0x7f: 0x2588,\\n      // █\\n      0x0130: 0xae,\\n      // ®\\n      0x0131: 0xb0,\\n      // °\\n      0x0132: 0xbd,\\n      // ½\\n      0x0133: 0xbf,\\n      // ¿\\n      0x0134: 0x2122,\\n      // ™\\n      0x0135: 0xa2,\\n      // ¢\\n      0x0136: 0xa3,\\n      // £\\n      0x0137: 0x266a,\\n      // ♪\\n      0x0138: 0xe0,\\n      // à\\n      0x0139: 0xa0,\\n      //\\n      0x013a: 0xe8,\\n      // è\\n      0x013b: 0xe2,\\n      // â\\n      0x013c: 0xea,\\n      // ê\\n      0x013d: 0xee,\\n      // î\\n      0x013e: 0xf4,\\n      // ô\\n      0x013f: 0xfb,\\n      // û\\n      0x0220: 0xc1,\\n      // Á\\n      0x0221: 0xc9,\\n      // É\\n      0x0222: 0xd3,\\n      // Ó\\n      0x0223: 0xda,\\n      // Ú\\n      0x0224: 0xdc,\\n      // Ü\\n      0x0225: 0xfc,\\n      // ü\\n      0x0226: 0x2018,\\n      // ‘\\n      0x0227: 0xa1,\\n      // ¡\\n      0x0228: 0x2a,\\n      // *\\n      0x0229: 0x27,\\n      // '\\n      0x022a: 0x2014,\\n      // —\\n      0x022b: 0xa9,\\n      // ©\\n      0x022c: 0x2120,\\n      // ℠\\n      0x022d: 0x2022,\\n      // •\\n      0x022e: 0x201c,\\n      // “\\n      0x022f: 0x201d,\\n      // ”\\n      0x0230: 0xc0,\\n      // À\\n      0x0231: 0xc2,\\n      // Â\\n      0x0232: 0xc7,\\n      // Ç\\n      0x0233: 0xc8,\\n      // È\\n      0x0234: 0xca,\\n      // Ê\\n      0x0235: 0xcb,\\n      // Ë\\n      0x0236: 0xeb,\\n      // ë\\n      0x0237: 0xce,\\n      // Î\\n      0x0238: 0xcf,\\n      // Ï\\n      0x0239: 0xef,\\n      // ï\\n      0x023a: 0xd4,\\n      // Ô\\n      0x023b: 0xd9,\\n      // Ù\\n      0x023c: 0xf9,\\n      // ù\\n      0x023d: 0xdb,\\n      // Û\\n      0x023e: 0xab,\\n      // «\\n      0x023f: 0xbb,\\n      // »\\n      0x0320: 0xc3,\\n      // Ã\\n      0x0321: 0xe3,\\n      // ã\\n      0x0322: 0xcd,\\n      // Í\\n      0x0323: 0xcc,\\n      // Ì\\n      0x0324: 0xec,\\n      // ì\\n      0x0325: 0xd2,\\n      // Ò\\n      0x0326: 0xf2,\\n      // ò\\n      0x0327: 0xd5,\\n      // Õ\\n      0x0328: 0xf5,\\n      // õ\\n      0x0329: 0x7b,\\n      // {\\n      0x032a: 0x7d,\\n      // }\\n      0x032b: 0x5c,\\n      // \\\\\\n      0x032c: 0x5e,\\n      // ^\\n      0x032d: 0x5f,\\n      // _\\n      0x032e: 0x7c,\\n      // |\\n      0x032f: 0x7e,\\n      // ~\\n      0x0330: 0xc4,\\n      // Ä\\n      0x0331: 0xe4,\\n      // ä\\n      0x0332: 0xd6,\\n      // Ö\\n      0x0333: 0xf6,\\n      // ö\\n      0x0334: 0xdf,\\n      // ß\\n      0x0335: 0xa5,\\n      // ¥\\n      0x0336: 0xa4,\\n      // ¤\\n      0x0337: 0x2502,\\n      // │\\n      0x0338: 0xc5,\\n      // Å\\n      0x0339: 0xe5,\\n      // å\\n      0x033a: 0xd8,\\n      // Ø\\n      0x033b: 0xf8,\\n      // ø\\n      0x033c: 0x250c,\\n      // ┌\\n      0x033d: 0x2510,\\n      // ┐\\n      0x033e: 0x2514,\\n      // └\\n      0x033f: 0x2518 // ┘\\n\\n    };\\n\\n    var getCharFromCode = function getCharFromCode(code) {\\n      if (code === null) {\\n        return '';\\n      }\\n\\n      code = CHARACTER_TRANSLATION[code] || code;\\n      return String.fromCharCode(code);\\n    }; // the index of the last row in a CEA-608 display buffer\\n\\n\\n    var BOTTOM_ROW = 14; // This array is used for mapping PACs -> row #, since there's no way of\\n    // getting it through bit logic.\\n\\n    var ROWS = [0x1100, 0x1120, 0x1200, 0x1220, 0x1500, 0x1520, 0x1600, 0x1620, 0x1700, 0x1720, 0x1000, 0x1300, 0x1320, 0x1400, 0x1420]; // CEA-608 captions are rendered onto a 34x15 matrix of character\\n    // cells. The \\\"bottom\\\" row is the last element in the outer array.\\n\\n    var createDisplayBuffer = function createDisplayBuffer() {\\n      var result = [],\\n          i = BOTTOM_ROW + 1;\\n\\n      while (i--) {\\n        result.push('');\\n      }\\n\\n      return result;\\n    };\\n\\n    var Cea608Stream = function Cea608Stream(field, dataChannel) {\\n      Cea608Stream.prototype.init.call(this);\\n      this.field_ = field || 0;\\n      this.dataChannel_ = dataChannel || 0;\\n      this.name_ = 'CC' + ((this.field_ << 1 | this.dataChannel_) + 1);\\n      this.setConstants();\\n      this.reset();\\n\\n      this.push = function (packet) {\\n        var data, swap, char0, char1, text; // remove the parity bits\\n\\n        data = packet.ccData & 0x7f7f; // ignore duplicate control codes; the spec demands they're sent twice\\n\\n        if (data === this.lastControlCode_) {\\n          this.lastControlCode_ = null;\\n          return;\\n        } // Store control codes\\n\\n\\n        if ((data & 0xf000) === 0x1000) {\\n          this.lastControlCode_ = data;\\n        } else if (data !== this.PADDING_) {\\n          this.lastControlCode_ = null;\\n        }\\n\\n        char0 = data >>> 8;\\n        char1 = data & 0xff;\\n\\n        if (data === this.PADDING_) {\\n          return;\\n        } else if (data === this.RESUME_CAPTION_LOADING_) {\\n          this.mode_ = 'popOn';\\n        } else if (data === this.END_OF_CAPTION_) {\\n          // If an EOC is received while in paint-on mode, the displayed caption\\n          // text should be swapped to non-displayed memory as if it was a pop-on\\n          // caption. Because of that, we should explicitly switch back to pop-on\\n          // mode\\n          this.mode_ = 'popOn';\\n          this.clearFormatting(packet.pts); // if a caption was being displayed, it's gone now\\n\\n          this.flushDisplayed(packet.pts); // flip memory\\n\\n          swap = this.displayed_;\\n          this.displayed_ = this.nonDisplayed_;\\n          this.nonDisplayed_ = swap; // start measuring the time to display the caption\\n\\n          this.startPts_ = packet.pts;\\n        } else if (data === this.ROLL_UP_2_ROWS_) {\\n          this.rollUpRows_ = 2;\\n          this.setRollUp(packet.pts);\\n        } else if (data === this.ROLL_UP_3_ROWS_) {\\n          this.rollUpRows_ = 3;\\n          this.setRollUp(packet.pts);\\n        } else if (data === this.ROLL_UP_4_ROWS_) {\\n          this.rollUpRows_ = 4;\\n          this.setRollUp(packet.pts);\\n        } else if (data === this.CARRIAGE_RETURN_) {\\n          this.clearFormatting(packet.pts);\\n          this.flushDisplayed(packet.pts);\\n          this.shiftRowsUp_();\\n          this.startPts_ = packet.pts;\\n        } else if (data === this.BACKSPACE_) {\\n          if (this.mode_ === 'popOn') {\\n            this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n          } else {\\n            this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n          }\\n        } else if (data === this.ERASE_DISPLAYED_MEMORY_) {\\n          this.flushDisplayed(packet.pts);\\n          this.displayed_ = createDisplayBuffer();\\n        } else if (data === this.ERASE_NON_DISPLAYED_MEMORY_) {\\n          this.nonDisplayed_ = createDisplayBuffer();\\n        } else if (data === this.RESUME_DIRECT_CAPTIONING_) {\\n          if (this.mode_ !== 'paintOn') {\\n            // NOTE: This should be removed when proper caption positioning is\\n            // implemented\\n            this.flushDisplayed(packet.pts);\\n            this.displayed_ = createDisplayBuffer();\\n          }\\n\\n          this.mode_ = 'paintOn';\\n          this.startPts_ = packet.pts; // Append special characters to caption text\\n        } else if (this.isSpecialCharacter(char0, char1)) {\\n          // Bitmask char0 so that we can apply character transformations\\n          // regardless of field and data channel.\\n          // Then byte-shift to the left and OR with char1 so we can pass the\\n          // entire character code to `getCharFromCode`.\\n          char0 = (char0 & 0x03) << 8;\\n          text = getCharFromCode(char0 | char1);\\n          this[this.mode_](packet.pts, text);\\n          this.column_++; // Append extended characters to caption text\\n        } else if (this.isExtCharacter(char0, char1)) {\\n          // Extended characters always follow their \\\"non-extended\\\" equivalents.\\n          // IE if a \\\"è\\\" is desired, you'll always receive \\\"eè\\\"; non-compliant\\n          // decoders are supposed to drop the \\\"è\\\", while compliant decoders\\n          // backspace the \\\"e\\\" and insert \\\"è\\\".\\n          // Delete the previous character\\n          if (this.mode_ === 'popOn') {\\n            this.nonDisplayed_[this.row_] = this.nonDisplayed_[this.row_].slice(0, -1);\\n          } else {\\n            this.displayed_[this.row_] = this.displayed_[this.row_].slice(0, -1);\\n          } // Bitmask char0 so that we can apply character transformations\\n          // regardless of field and data channel.\\n          // Then byte-shift to the left and OR with char1 so we can pass the\\n          // entire character code to `getCharFromCode`.\\n\\n\\n          char0 = (char0 & 0x03) << 8;\\n          text = getCharFromCode(char0 | char1);\\n          this[this.mode_](packet.pts, text);\\n          this.column_++; // Process mid-row codes\\n        } else if (this.isMidRowCode(char0, char1)) {\\n          // Attributes are not additive, so clear all formatting\\n          this.clearFormatting(packet.pts); // According to the standard, mid-row codes\\n          // should be replaced with spaces, so add one now\\n\\n          this[this.mode_](packet.pts, ' ');\\n          this.column_++;\\n\\n          if ((char1 & 0xe) === 0xe) {\\n            this.addFormatting(packet.pts, ['i']);\\n          }\\n\\n          if ((char1 & 0x1) === 0x1) {\\n            this.addFormatting(packet.pts, ['u']);\\n          } // Detect offset control codes and adjust cursor\\n\\n        } else if (this.isOffsetControlCode(char0, char1)) {\\n          // Cursor position is set by indent PAC (see below) in 4-column\\n          // increments, with an additional offset code of 1-3 to reach any\\n          // of the 32 columns specified by CEA-608. So all we need to do\\n          // here is increment the column cursor by the given offset.\\n          this.column_ += char1 & 0x03; // Detect PACs (Preamble Address Codes)\\n        } else if (this.isPAC(char0, char1)) {\\n          // There's no logic for PAC -> row mapping, so we have to just\\n          // find the row code in an array and use its index :(\\n          var row = ROWS.indexOf(data & 0x1f20); // Configure the caption window if we're in roll-up mode\\n\\n          if (this.mode_ === 'rollUp') {\\n            // This implies that the base row is incorrectly set.\\n            // As per the recommendation in CEA-608(Base Row Implementation), defer to the number\\n            // of roll-up rows set.\\n            if (row - this.rollUpRows_ + 1 < 0) {\\n              row = this.rollUpRows_ - 1;\\n            }\\n\\n            this.setRollUp(packet.pts, row);\\n          }\\n\\n          if (row !== this.row_) {\\n            // formatting is only persistent for current row\\n            this.clearFormatting(packet.pts);\\n            this.row_ = row;\\n          } // All PACs can apply underline, so detect and apply\\n          // (All odd-numbered second bytes set underline)\\n\\n\\n          if (char1 & 0x1 && this.formatting_.indexOf('u') === -1) {\\n            this.addFormatting(packet.pts, ['u']);\\n          }\\n\\n          if ((data & 0x10) === 0x10) {\\n            // We've got an indent level code. Each successive even number\\n            // increments the column cursor by 4, so we can get the desired\\n            // column position by bit-shifting to the right (to get n/2)\\n            // and multiplying by 4.\\n            this.column_ = ((data & 0xe) >> 1) * 4;\\n          }\\n\\n          if (this.isColorPAC(char1)) {\\n            // it's a color code, though we only support white, which\\n            // can be either normal or italicized. white italics can be\\n            // either 0x4e or 0x6e depending on the row, so we just\\n            // bitwise-and with 0xe to see if italics should be turned on\\n            if ((char1 & 0xe) === 0xe) {\\n              this.addFormatting(packet.pts, ['i']);\\n            }\\n          } // We have a normal character in char0, and possibly one in char1\\n\\n        } else if (this.isNormalChar(char0)) {\\n          if (char1 === 0x00) {\\n            char1 = null;\\n          }\\n\\n          text = getCharFromCode(char0);\\n          text += getCharFromCode(char1);\\n          this[this.mode_](packet.pts, text);\\n          this.column_ += text.length;\\n        } // finish data processing\\n\\n      };\\n    };\\n\\n    Cea608Stream.prototype = new stream(); // Trigger a cue point that captures the current state of the\\n    // display buffer\\n\\n    Cea608Stream.prototype.flushDisplayed = function (pts) {\\n      var content = this.displayed_ // remove spaces from the start and end of the string\\n      .map(function (row) {\\n        try {\\n          return row.trim();\\n        } catch (e) {\\n          // Ordinarily, this shouldn't happen. However, caption\\n          // parsing errors should not throw exceptions and\\n          // break playback.\\n          // eslint-disable-next-line no-console\\n          console.error('Skipping malformed caption.');\\n          return '';\\n        }\\n      }) // combine all text rows to display in one cue\\n      .join('\\\\n') // and remove blank rows from the start and end, but not the middle\\n      .replace(/^\\\\n+|\\\\n+$/g, '');\\n\\n      if (content.length) {\\n        this.trigger('data', {\\n          startPts: this.startPts_,\\n          endPts: pts,\\n          text: content,\\n          stream: this.name_\\n        });\\n      }\\n    };\\n    /**\\n     * Zero out the data, used for startup and on seek\\n     */\\n\\n\\n    Cea608Stream.prototype.reset = function () {\\n      this.mode_ = 'popOn'; // When in roll-up mode, the index of the last row that will\\n      // actually display captions. If a caption is shifted to a row\\n      // with a lower index than this, it is cleared from the display\\n      // buffer\\n\\n      this.topRow_ = 0;\\n      this.startPts_ = 0;\\n      this.displayed_ = createDisplayBuffer();\\n      this.nonDisplayed_ = createDisplayBuffer();\\n      this.lastControlCode_ = null; // Track row and column for proper line-breaking and spacing\\n\\n      this.column_ = 0;\\n      this.row_ = BOTTOM_ROW;\\n      this.rollUpRows_ = 2; // This variable holds currently-applied formatting\\n\\n      this.formatting_ = [];\\n    };\\n    /**\\n     * Sets up control code and related constants for this instance\\n     */\\n\\n\\n    Cea608Stream.prototype.setConstants = function () {\\n      // The following attributes have these uses:\\n      // ext_ :    char0 for mid-row codes, and the base for extended\\n      //           chars (ext_+0, ext_+1, and ext_+2 are char0s for\\n      //           extended codes)\\n      // control_: char0 for control codes, except byte-shifted to the\\n      //           left so that we can do this.control_ | CONTROL_CODE\\n      // offset_:  char0 for tab offset codes\\n      //\\n      // It's also worth noting that control codes, and _only_ control codes,\\n      // differ between field 1 and field2. Field 2 control codes are always\\n      // their field 1 value plus 1. That's why there's the \\\"| field\\\" on the\\n      // control value.\\n      if (this.dataChannel_ === 0) {\\n        this.BASE_ = 0x10;\\n        this.EXT_ = 0x11;\\n        this.CONTROL_ = (0x14 | this.field_) << 8;\\n        this.OFFSET_ = 0x17;\\n      } else if (this.dataChannel_ === 1) {\\n        this.BASE_ = 0x18;\\n        this.EXT_ = 0x19;\\n        this.CONTROL_ = (0x1c | this.field_) << 8;\\n        this.OFFSET_ = 0x1f;\\n      } // Constants for the LSByte command codes recognized by Cea608Stream. This\\n      // list is not exhaustive. For a more comprehensive listing and semantics see\\n      // http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\\n      // Padding\\n\\n\\n      this.PADDING_ = 0x0000; // Pop-on Mode\\n\\n      this.RESUME_CAPTION_LOADING_ = this.CONTROL_ | 0x20;\\n      this.END_OF_CAPTION_ = this.CONTROL_ | 0x2f; // Roll-up Mode\\n\\n      this.ROLL_UP_2_ROWS_ = this.CONTROL_ | 0x25;\\n      this.ROLL_UP_3_ROWS_ = this.CONTROL_ | 0x26;\\n      this.ROLL_UP_4_ROWS_ = this.CONTROL_ | 0x27;\\n      this.CARRIAGE_RETURN_ = this.CONTROL_ | 0x2d; // paint-on mode\\n\\n      this.RESUME_DIRECT_CAPTIONING_ = this.CONTROL_ | 0x29; // Erasure\\n\\n      this.BACKSPACE_ = this.CONTROL_ | 0x21;\\n      this.ERASE_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2c;\\n      this.ERASE_NON_DISPLAYED_MEMORY_ = this.CONTROL_ | 0x2e;\\n    };\\n    /**\\n     * Detects if the 2-byte packet data is a special character\\n     *\\n     * Special characters have a second byte in the range 0x30 to 0x3f,\\n     * with the first byte being 0x11 (for data channel 1) or 0x19 (for\\n     * data channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are an special character\\n     */\\n\\n\\n    Cea608Stream.prototype.isSpecialCharacter = function (char0, char1) {\\n      return char0 === this.EXT_ && char1 >= 0x30 && char1 <= 0x3f;\\n    };\\n    /**\\n     * Detects if the 2-byte packet data is an extended character\\n     *\\n     * Extended characters have a second byte in the range 0x20 to 0x3f,\\n     * with the first byte being 0x12 or 0x13 (for data channel 1) or\\n     * 0x1a or 0x1b (for data channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are an extended character\\n     */\\n\\n\\n    Cea608Stream.prototype.isExtCharacter = function (char0, char1) {\\n      return (char0 === this.EXT_ + 1 || char0 === this.EXT_ + 2) && char1 >= 0x20 && char1 <= 0x3f;\\n    };\\n    /**\\n     * Detects if the 2-byte packet is a mid-row code\\n     *\\n     * Mid-row codes have a second byte in the range 0x20 to 0x2f, with\\n     * the first byte being 0x11 (for data channel 1) or 0x19 (for data\\n     * channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are a mid-row code\\n     */\\n\\n\\n    Cea608Stream.prototype.isMidRowCode = function (char0, char1) {\\n      return char0 === this.EXT_ && char1 >= 0x20 && char1 <= 0x2f;\\n    };\\n    /**\\n     * Detects if the 2-byte packet is an offset control code\\n     *\\n     * Offset control codes have a second byte in the range 0x21 to 0x23,\\n     * with the first byte being 0x17 (for data channel 1) or 0x1f (for\\n     * data channel 2).\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are an offset control code\\n     */\\n\\n\\n    Cea608Stream.prototype.isOffsetControlCode = function (char0, char1) {\\n      return char0 === this.OFFSET_ && char1 >= 0x21 && char1 <= 0x23;\\n    };\\n    /**\\n     * Detects if the 2-byte packet is a Preamble Address Code\\n     *\\n     * PACs have a first byte in the range 0x10 to 0x17 (for data channel 1)\\n     * or 0x18 to 0x1f (for data channel 2), with the second byte in the\\n     * range 0x40 to 0x7f.\\n     *\\n     * @param  {Integer} char0 The first byte\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the 2 bytes are a PAC\\n     */\\n\\n\\n    Cea608Stream.prototype.isPAC = function (char0, char1) {\\n      return char0 >= this.BASE_ && char0 < this.BASE_ + 8 && char1 >= 0x40 && char1 <= 0x7f;\\n    };\\n    /**\\n     * Detects if a packet's second byte is in the range of a PAC color code\\n     *\\n     * PAC color codes have the second byte be in the range 0x40 to 0x4f, or\\n     * 0x60 to 0x6f.\\n     *\\n     * @param  {Integer} char1 The second byte\\n     * @return {Boolean}       Whether the byte is a color PAC\\n     */\\n\\n\\n    Cea608Stream.prototype.isColorPAC = function (char1) {\\n      return char1 >= 0x40 && char1 <= 0x4f || char1 >= 0x60 && char1 <= 0x7f;\\n    };\\n    /**\\n     * Detects if a single byte is in the range of a normal character\\n     *\\n     * Normal text bytes are in the range 0x20 to 0x7f.\\n     *\\n     * @param  {Integer} char  The byte\\n     * @return {Boolean}       Whether the byte is a normal character\\n     */\\n\\n\\n    Cea608Stream.prototype.isNormalChar = function (_char) {\\n      return _char >= 0x20 && _char <= 0x7f;\\n    };\\n    /**\\n     * Configures roll-up\\n     *\\n     * @param  {Integer} pts         Current PTS\\n     * @param  {Integer} newBaseRow  Used by PACs to slide the current window to\\n     *                               a new position\\n     */\\n\\n\\n    Cea608Stream.prototype.setRollUp = function (pts, newBaseRow) {\\n      // Reset the base row to the bottom row when switching modes\\n      if (this.mode_ !== 'rollUp') {\\n        this.row_ = BOTTOM_ROW;\\n        this.mode_ = 'rollUp'; // Spec says to wipe memories when switching to roll-up\\n\\n        this.flushDisplayed(pts);\\n        this.nonDisplayed_ = createDisplayBuffer();\\n        this.displayed_ = createDisplayBuffer();\\n      }\\n\\n      if (newBaseRow !== undefined && newBaseRow !== this.row_) {\\n        // move currently displayed captions (up or down) to the new base row\\n        for (var i = 0; i < this.rollUpRows_; i++) {\\n          this.displayed_[newBaseRow - i] = this.displayed_[this.row_ - i];\\n          this.displayed_[this.row_ - i] = '';\\n        }\\n      }\\n\\n      if (newBaseRow === undefined) {\\n        newBaseRow = this.row_;\\n      }\\n\\n      this.topRow_ = newBaseRow - this.rollUpRows_ + 1;\\n    }; // Adds the opening HTML tag for the passed character to the caption text,\\n    // and keeps track of it for later closing\\n\\n\\n    Cea608Stream.prototype.addFormatting = function (pts, format) {\\n      this.formatting_ = this.formatting_.concat(format);\\n      var text = format.reduce(function (text, format) {\\n        return text + '<' + format + '>';\\n      }, '');\\n      this[this.mode_](pts, text);\\n    }; // Adds HTML closing tags for current formatting to caption text and\\n    // clears remembered formatting\\n\\n\\n    Cea608Stream.prototype.clearFormatting = function (pts) {\\n      if (!this.formatting_.length) {\\n        return;\\n      }\\n\\n      var text = this.formatting_.reverse().reduce(function (text, format) {\\n        return text + '</' + format + '>';\\n      }, '');\\n      this.formatting_ = [];\\n      this[this.mode_](pts, text);\\n    }; // Mode Implementations\\n\\n\\n    Cea608Stream.prototype.popOn = function (pts, text) {\\n      var baseRow = this.nonDisplayed_[this.row_]; // buffer characters\\n\\n      baseRow += text;\\n      this.nonDisplayed_[this.row_] = baseRow;\\n    };\\n\\n    Cea608Stream.prototype.rollUp = function (pts, text) {\\n      var baseRow = this.displayed_[this.row_];\\n      baseRow += text;\\n      this.displayed_[this.row_] = baseRow;\\n    };\\n\\n    Cea608Stream.prototype.shiftRowsUp_ = function () {\\n      var i; // clear out inactive rows\\n\\n      for (i = 0; i < this.topRow_; i++) {\\n        this.displayed_[i] = '';\\n      }\\n\\n      for (i = this.row_ + 1; i < BOTTOM_ROW + 1; i++) {\\n        this.displayed_[i] = '';\\n      } // shift displayed rows up\\n\\n\\n      for (i = this.topRow_; i < this.row_; i++) {\\n        this.displayed_[i] = this.displayed_[i + 1];\\n      } // clear out the bottom row\\n\\n\\n      this.displayed_[this.row_] = '';\\n    };\\n\\n    Cea608Stream.prototype.paintOn = function (pts, text) {\\n      var baseRow = this.displayed_[this.row_];\\n      baseRow += text;\\n      this.displayed_[this.row_] = baseRow;\\n    }; // exports\\n\\n\\n    var captionStream = {\\n      CaptionStream: CaptionStream,\\n      Cea608Stream: Cea608Stream\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var streamTypes = {\\n      H264_STREAM_TYPE: 0x1B,\\n      ADTS_STREAM_TYPE: 0x0F,\\n      METADATA_STREAM_TYPE: 0x15\\n    };\\n    var MAX_TS = 8589934592;\\n    var RO_THRESH = 4294967296;\\n    var TYPE_SHARED = 'shared';\\n\\n    var handleRollover = function handleRollover(value, reference) {\\n      var direction = 1;\\n\\n      if (value > reference) {\\n        // If the current timestamp value is greater than our reference timestamp and we detect a\\n        // timestamp rollover, this means the roll over is happening in the opposite direction.\\n        // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\\n        // point will be set to a small number, e.g. 1. The user then seeks backwards over the\\n        // rollover point. In loading this segment, the timestamp values will be very large,\\n        // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\\n        // the time stamp to be `value - 2^33`.\\n        direction = -1;\\n      } // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\\n      // cause an incorrect adjustment.\\n\\n\\n      while (Math.abs(reference - value) > RO_THRESH) {\\n        value += direction * MAX_TS;\\n      }\\n\\n      return value;\\n    };\\n\\n    var TimestampRolloverStream = function TimestampRolloverStream(type) {\\n      var lastDTS, referenceDTS;\\n      TimestampRolloverStream.prototype.init.call(this); // The \\\"shared\\\" type is used in cases where a stream will contain muxed\\n      // video and audio. We could use `undefined` here, but having a string\\n      // makes debugging a little clearer.\\n\\n      this.type_ = type || TYPE_SHARED;\\n\\n      this.push = function (data) {\\n        // Any \\\"shared\\\" rollover streams will accept _all_ data. Otherwise,\\n        // streams will only accept data that matches their type.\\n        if (this.type_ !== TYPE_SHARED && data.type !== this.type_) {\\n          return;\\n        }\\n\\n        if (referenceDTS === undefined) {\\n          referenceDTS = data.dts;\\n        }\\n\\n        data.dts = handleRollover(data.dts, referenceDTS);\\n        data.pts = handleRollover(data.pts, referenceDTS);\\n        lastDTS = data.dts;\\n        this.trigger('data', data);\\n      };\\n\\n      this.flush = function () {\\n        referenceDTS = lastDTS;\\n        this.trigger('done');\\n      };\\n\\n      this.endTimeline = function () {\\n        this.flush();\\n        this.trigger('endedtimeline');\\n      };\\n\\n      this.discontinuity = function () {\\n        referenceDTS = void 0;\\n        lastDTS = void 0;\\n      };\\n\\n      this.reset = function () {\\n        this.discontinuity();\\n        this.trigger('reset');\\n      };\\n    };\\n\\n    TimestampRolloverStream.prototype = new stream();\\n    var timestampRolloverStream = {\\n      TimestampRolloverStream: TimestampRolloverStream,\\n      handleRollover: handleRollover\\n    };\\n\\n    var percentEncode = function percentEncode(bytes, start, end) {\\n      var i,\\n          result = '';\\n\\n      for (i = start; i < end; i++) {\\n        result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\\n      }\\n\\n      return result;\\n    },\\n        // return the string representation of the specified byte range,\\n    // interpreted as UTf-8.\\n    parseUtf8 = function parseUtf8(bytes, start, end) {\\n      return decodeURIComponent(percentEncode(bytes, start, end));\\n    },\\n        // return the string representation of the specified byte range,\\n    // interpreted as ISO-8859-1.\\n    parseIso88591 = function parseIso88591(bytes, start, end) {\\n      return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\\n    },\\n        parseSyncSafeInteger = function parseSyncSafeInteger(data) {\\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\\n    },\\n        tagParsers = {\\n      TXXX: function TXXX(tag) {\\n        var i;\\n\\n        if (tag.data[0] !== 3) {\\n          // ignore frames with unrecognized character encodings\\n          return;\\n        }\\n\\n        for (i = 1; i < tag.data.length; i++) {\\n          if (tag.data[i] === 0) {\\n            // parse the text fields\\n            tag.description = parseUtf8(tag.data, 1, i); // do not include the null terminator in the tag value\\n\\n            tag.value = parseUtf8(tag.data, i + 1, tag.data.length).replace(/\\\\0*$/, '');\\n            break;\\n          }\\n        }\\n\\n        tag.data = tag.value;\\n      },\\n      WXXX: function WXXX(tag) {\\n        var i;\\n\\n        if (tag.data[0] !== 3) {\\n          // ignore frames with unrecognized character encodings\\n          return;\\n        }\\n\\n        for (i = 1; i < tag.data.length; i++) {\\n          if (tag.data[i] === 0) {\\n            // parse the description and URL fields\\n            tag.description = parseUtf8(tag.data, 1, i);\\n            tag.url = parseUtf8(tag.data, i + 1, tag.data.length);\\n            break;\\n          }\\n        }\\n      },\\n      PRIV: function PRIV(tag) {\\n        var i;\\n\\n        for (i = 0; i < tag.data.length; i++) {\\n          if (tag.data[i] === 0) {\\n            // parse the description and URL fields\\n            tag.owner = parseIso88591(tag.data, 0, i);\\n            break;\\n          }\\n        }\\n\\n        tag.privateData = tag.data.subarray(i + 1);\\n        tag.data = tag.privateData;\\n      }\\n    },\\n        _MetadataStream;\\n\\n    _MetadataStream = function MetadataStream(options) {\\n      var settings = {\\n        debug: !!(options && options.debug),\\n        // the bytes of the program-level descriptor field in MP2T\\n        // see ISO/IEC 13818-1:2013 (E), section 2.6 \\\"Program and\\n        // program element descriptors\\\"\\n        descriptor: options && options.descriptor\\n      },\\n          // the total size in bytes of the ID3 tag being parsed\\n      tagSize = 0,\\n          // tag data that is not complete enough to be parsed\\n      buffer = [],\\n          // the total number of bytes currently in the buffer\\n      bufferSize = 0,\\n          i;\\n\\n      _MetadataStream.prototype.init.call(this); // calculate the text track in-band metadata track dispatch type\\n      // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\\n\\n\\n      this.dispatchType = streamTypes.METADATA_STREAM_TYPE.toString(16);\\n\\n      if (settings.descriptor) {\\n        for (i = 0; i < settings.descriptor.length; i++) {\\n          this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\\n        }\\n      }\\n\\n      this.push = function (chunk) {\\n        var tag, frameStart, frameSize, frame, i, frameHeader;\\n\\n        if (chunk.type !== 'timed-metadata') {\\n          return;\\n        } // if data_alignment_indicator is set in the PES header,\\n        // we must have the start of a new ID3 tag. Assume anything\\n        // remaining in the buffer was malformed and throw it out\\n\\n\\n        if (chunk.dataAlignmentIndicator) {\\n          bufferSize = 0;\\n          buffer.length = 0;\\n        } // ignore events that don't look like ID3 data\\n\\n\\n        if (buffer.length === 0 && (chunk.data.length < 10 || chunk.data[0] !== 'I'.charCodeAt(0) || chunk.data[1] !== 'D'.charCodeAt(0) || chunk.data[2] !== '3'.charCodeAt(0))) {\\n          if (settings.debug) {\\n            // eslint-disable-next-line no-console\\n            console.log('Skipping unrecognized metadata packet');\\n          }\\n\\n          return;\\n        } // add this chunk to the data we've collected so far\\n\\n\\n        buffer.push(chunk);\\n        bufferSize += chunk.data.byteLength; // grab the size of the entire frame from the ID3 header\\n\\n        if (buffer.length === 1) {\\n          // the frame size is transmitted as a 28-bit integer in the\\n          // last four bytes of the ID3 header.\\n          // The most significant bit of each byte is dropped and the\\n          // results concatenated to recover the actual value.\\n          tagSize = parseSyncSafeInteger(chunk.data.subarray(6, 10)); // ID3 reports the tag size excluding the header but it's more\\n          // convenient for our comparisons to include it\\n\\n          tagSize += 10;\\n        } // if the entire frame has not arrived, wait for more data\\n\\n\\n        if (bufferSize < tagSize) {\\n          return;\\n        } // collect the entire frame so it can be parsed\\n\\n\\n        tag = {\\n          data: new Uint8Array(tagSize),\\n          frames: [],\\n          pts: buffer[0].pts,\\n          dts: buffer[0].dts\\n        };\\n\\n        for (i = 0; i < tagSize;) {\\n          tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\\n          i += buffer[0].data.byteLength;\\n          bufferSize -= buffer[0].data.byteLength;\\n          buffer.shift();\\n        } // find the start of the first frame and the end of the tag\\n\\n\\n        frameStart = 10;\\n\\n        if (tag.data[5] & 0x40) {\\n          // advance the frame start past the extended header\\n          frameStart += 4; // header size field\\n\\n          frameStart += parseSyncSafeInteger(tag.data.subarray(10, 14)); // clip any padding off the end\\n\\n          tagSize -= parseSyncSafeInteger(tag.data.subarray(16, 20));\\n        } // parse one or more ID3 frames\\n        // http://id3.org/id3v2.3.0#ID3v2_frame_overview\\n\\n\\n        do {\\n          // determine the number of bytes in this frame\\n          frameSize = parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\\n\\n          if (frameSize < 1) {\\n            // eslint-disable-next-line no-console\\n            return console.log('Malformed ID3 frame encountered. Skipping metadata parsing.');\\n          }\\n\\n          frameHeader = String.fromCharCode(tag.data[frameStart], tag.data[frameStart + 1], tag.data[frameStart + 2], tag.data[frameStart + 3]);\\n          frame = {\\n            id: frameHeader,\\n            data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\\n          };\\n          frame.key = frame.id;\\n\\n          if (tagParsers[frame.id]) {\\n            tagParsers[frame.id](frame); // handle the special PRIV frame used to indicate the start\\n            // time for raw AAC data\\n\\n            if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\\n              var d = frame.data,\\n                  size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\\n              size *= 4;\\n              size += d[7] & 0x03;\\n              frame.timeStamp = size; // in raw AAC, all subsequent data will be timestamped based\\n              // on the value of this frame\\n              // we couldn't have known the appropriate pts and dts before\\n              // parsing this ID3 tag so set those values now\\n\\n              if (tag.pts === undefined && tag.dts === undefined) {\\n                tag.pts = frame.timeStamp;\\n                tag.dts = frame.timeStamp;\\n              }\\n\\n              this.trigger('timestamp', frame);\\n            }\\n          }\\n\\n          tag.frames.push(frame);\\n          frameStart += 10; // advance past the frame header\\n\\n          frameStart += frameSize; // advance past the frame body\\n        } while (frameStart < tagSize);\\n\\n        this.trigger('data', tag);\\n      };\\n    };\\n\\n    _MetadataStream.prototype = new stream();\\n    var metadataStream = _MetadataStream;\\n    var TimestampRolloverStream$1 = timestampRolloverStream.TimestampRolloverStream; // object types\\n\\n    var _TransportPacketStream, _TransportParseStream, _ElementaryStream; // constants\\n\\n\\n    var MP2T_PACKET_LENGTH = 188,\\n        // bytes\\n    SYNC_BYTE = 0x47;\\n    /**\\n     * Splits an incoming stream of binary data into MPEG-2 Transport\\n     * Stream packets.\\n     */\\n\\n    _TransportPacketStream = function TransportPacketStream() {\\n      var buffer = new Uint8Array(MP2T_PACKET_LENGTH),\\n          bytesInBuffer = 0;\\n\\n      _TransportPacketStream.prototype.init.call(this); // Deliver new bytes to the stream.\\n\\n      /**\\n       * Split a stream of data into M2TS packets\\n      **/\\n\\n\\n      this.push = function (bytes) {\\n        var startIndex = 0,\\n            endIndex = MP2T_PACKET_LENGTH,\\n            everything; // If there are bytes remaining from the last segment, prepend them to the\\n        // bytes that were pushed in\\n\\n        if (bytesInBuffer) {\\n          everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\\n          everything.set(buffer.subarray(0, bytesInBuffer));\\n          everything.set(bytes, bytesInBuffer);\\n          bytesInBuffer = 0;\\n        } else {\\n          everything = bytes;\\n        } // While we have enough data for a packet\\n\\n\\n        while (endIndex < everything.byteLength) {\\n          // Look for a pair of start and end sync bytes in the data..\\n          if (everything[startIndex] === SYNC_BYTE && everything[endIndex] === SYNC_BYTE) {\\n            // We found a packet so emit it and jump one whole packet forward in\\n            // the stream\\n            this.trigger('data', everything.subarray(startIndex, endIndex));\\n            startIndex += MP2T_PACKET_LENGTH;\\n            endIndex += MP2T_PACKET_LENGTH;\\n            continue;\\n          } // If we get here, we have somehow become de-synchronized and we need to step\\n          // forward one byte at a time until we find a pair of sync bytes that denote\\n          // a packet\\n\\n\\n          startIndex++;\\n          endIndex++;\\n        } // If there was some data left over at the end of the segment that couldn't\\n        // possibly be a whole packet, keep it because it might be the start of a packet\\n        // that continues in the next segment\\n\\n\\n        if (startIndex < everything.byteLength) {\\n          buffer.set(everything.subarray(startIndex), 0);\\n          bytesInBuffer = everything.byteLength - startIndex;\\n        }\\n      };\\n      /**\\n       * Passes identified M2TS packets to the TransportParseStream to be parsed\\n      **/\\n\\n\\n      this.flush = function () {\\n        // If the buffer contains a whole packet when we are being flushed, emit it\\n        // and empty the buffer. Otherwise hold onto the data because it may be\\n        // important for decoding the next segment\\n        if (bytesInBuffer === MP2T_PACKET_LENGTH && buffer[0] === SYNC_BYTE) {\\n          this.trigger('data', buffer);\\n          bytesInBuffer = 0;\\n        }\\n\\n        this.trigger('done');\\n      };\\n\\n      this.endTimeline = function () {\\n        this.flush();\\n        this.trigger('endedtimeline');\\n      };\\n\\n      this.reset = function () {\\n        bytesInBuffer = 0;\\n        this.trigger('reset');\\n      };\\n    };\\n\\n    _TransportPacketStream.prototype = new stream();\\n    /**\\n     * Accepts an MP2T TransportPacketStream and emits data events with parsed\\n     * forms of the individual transport stream packets.\\n     */\\n\\n    _TransportParseStream = function TransportParseStream() {\\n      var parsePsi, parsePat, parsePmt, self;\\n\\n      _TransportParseStream.prototype.init.call(this);\\n\\n      self = this;\\n      this.packetsWaitingForPmt = [];\\n      this.programMapTable = undefined;\\n\\n      parsePsi = function parsePsi(payload, psi) {\\n        var offset = 0; // PSI packets may be split into multiple sections and those\\n        // sections may be split into multiple packets. If a PSI\\n        // section starts in this packet, the payload_unit_start_indicator\\n        // will be true and the first byte of the payload will indicate\\n        // the offset from the current position to the start of the\\n        // section.\\n\\n        if (psi.payloadUnitStartIndicator) {\\n          offset += payload[offset] + 1;\\n        }\\n\\n        if (psi.type === 'pat') {\\n          parsePat(payload.subarray(offset), psi);\\n        } else {\\n          parsePmt(payload.subarray(offset), psi);\\n        }\\n      };\\n\\n      parsePat = function parsePat(payload, pat) {\\n        pat.section_number = payload[7]; // eslint-disable-line camelcase\\n\\n        pat.last_section_number = payload[8]; // eslint-disable-line camelcase\\n        // skip the PSI header and parse the first PMT entry\\n\\n        self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\\n        pat.pmtPid = self.pmtPid;\\n      };\\n      /**\\n       * Parse out the relevant fields of a Program Map Table (PMT).\\n       * @param payload {Uint8Array} the PMT-specific portion of an MP2T\\n       * packet. The first byte in this array should be the table_id\\n       * field.\\n       * @param pmt {object} the object that should be decorated with\\n       * fields parsed from the PMT.\\n       */\\n\\n\\n      parsePmt = function parsePmt(payload, pmt) {\\n        var sectionLength, tableEnd, programInfoLength, offset; // PMTs can be sent ahead of the time when they should actually\\n        // take effect. We don't believe this should ever be the case\\n        // for HLS but we'll ignore \\\"forward\\\" PMT declarations if we see\\n        // them. Future PMT declarations have the current_next_indicator\\n        // set to zero.\\n\\n        if (!(payload[5] & 0x01)) {\\n          return;\\n        } // overwrite any existing program map table\\n\\n\\n        self.programMapTable = {\\n          video: null,\\n          audio: null,\\n          'timed-metadata': {}\\n        }; // the mapping table ends at the end of the current section\\n\\n        sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\\n        tableEnd = 3 + sectionLength - 4; // to determine where the table is, we have to figure out how\\n        // long the program info descriptors are\\n\\n        programInfoLength = (payload[10] & 0x0f) << 8 | payload[11]; // advance the offset to the first entry in the mapping table\\n\\n        offset = 12 + programInfoLength;\\n\\n        while (offset < tableEnd) {\\n          var streamType = payload[offset];\\n          var pid = (payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]; // only map a single elementary_pid for audio and video stream types\\n          // TODO: should this be done for metadata too? for now maintain behavior of\\n          //       multiple metadata streams\\n\\n          if (streamType === streamTypes.H264_STREAM_TYPE && self.programMapTable.video === null) {\\n            self.programMapTable.video = pid;\\n          } else if (streamType === streamTypes.ADTS_STREAM_TYPE && self.programMapTable.audio === null) {\\n            self.programMapTable.audio = pid;\\n          } else if (streamType === streamTypes.METADATA_STREAM_TYPE) {\\n            // map pid to stream type for metadata streams\\n            self.programMapTable['timed-metadata'][pid] = streamType;\\n          } // move to the next table entry\\n          // skip past the elementary stream descriptors, if present\\n\\n\\n          offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\\n        } // record the map on the packet as well\\n\\n\\n        pmt.programMapTable = self.programMapTable;\\n      };\\n      /**\\n       * Deliver a new MP2T packet to the next stream in the pipeline.\\n       */\\n\\n\\n      this.push = function (packet) {\\n        var result = {},\\n            offset = 4;\\n        result.payloadUnitStartIndicator = !!(packet[1] & 0x40); // pid is a 13-bit field starting at the last bit of packet[1]\\n\\n        result.pid = packet[1] & 0x1f;\\n        result.pid <<= 8;\\n        result.pid |= packet[2]; // if an adaption field is present, its length is specified by the\\n        // fifth byte of the TS packet header. The adaptation field is\\n        // used to add stuffing to PES packets that don't fill a complete\\n        // TS packet, and to specify some forms of timing and control data\\n        // that we do not currently use.\\n\\n        if ((packet[3] & 0x30) >>> 4 > 0x01) {\\n          offset += packet[offset] + 1;\\n        } // parse the rest of the packet based on the type\\n\\n\\n        if (result.pid === 0) {\\n          result.type = 'pat';\\n          parsePsi(packet.subarray(offset), result);\\n          this.trigger('data', result);\\n        } else if (result.pid === this.pmtPid) {\\n          result.type = 'pmt';\\n          parsePsi(packet.subarray(offset), result);\\n          this.trigger('data', result); // if there are any packets waiting for a PMT to be found, process them now\\n\\n          while (this.packetsWaitingForPmt.length) {\\n            this.processPes_.apply(this, this.packetsWaitingForPmt.shift());\\n          }\\n        } else if (this.programMapTable === undefined) {\\n          // When we have not seen a PMT yet, defer further processing of\\n          // PES packets until one has been parsed\\n          this.packetsWaitingForPmt.push([packet, offset, result]);\\n        } else {\\n          this.processPes_(packet, offset, result);\\n        }\\n      };\\n\\n      this.processPes_ = function (packet, offset, result) {\\n        // set the appropriate stream type\\n        if (result.pid === this.programMapTable.video) {\\n          result.streamType = streamTypes.H264_STREAM_TYPE;\\n        } else if (result.pid === this.programMapTable.audio) {\\n          result.streamType = streamTypes.ADTS_STREAM_TYPE;\\n        } else {\\n          // if not video or audio, it is timed-metadata or unknown\\n          // if unknown, streamType will be undefined\\n          result.streamType = this.programMapTable['timed-metadata'][result.pid];\\n        }\\n\\n        result.type = 'pes';\\n        result.data = packet.subarray(offset);\\n        this.trigger('data', result);\\n      };\\n    };\\n\\n    _TransportParseStream.prototype = new stream();\\n    _TransportParseStream.STREAM_TYPES = {\\n      h264: 0x1b,\\n      adts: 0x0f\\n    };\\n    /**\\n     * Reconsistutes program elementary stream (PES) packets from parsed\\n     * transport stream packets. That is, if you pipe an\\n     * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\\n     * events will be events which capture the bytes for individual PES\\n     * packets plus relevant metadata that has been extracted from the\\n     * container.\\n     */\\n\\n    _ElementaryStream = function ElementaryStream() {\\n      var self = this,\\n          // PES packet fragments\\n      video = {\\n        data: [],\\n        size: 0\\n      },\\n          audio = {\\n        data: [],\\n        size: 0\\n      },\\n          timedMetadata = {\\n        data: [],\\n        size: 0\\n      },\\n          programMapTable,\\n          parsePes = function parsePes(payload, pes) {\\n        var ptsDtsFlags; // get the packet length, this will be 0 for video\\n\\n        pes.packetLength = 6 + (payload[4] << 8 | payload[5]); // find out if this packets starts a new keyframe\\n\\n        pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0; // PES packets may be annotated with a PTS value, or a PTS value\\n        // and a DTS value. Determine what combination of values is\\n        // available to work with.\\n\\n        ptsDtsFlags = payload[7]; // PTS and DTS are normally stored as a 33-bit number.  Javascript\\n        // performs all bitwise operations on 32-bit integers but javascript\\n        // supports a much greater range (52-bits) of integer using standard\\n        // mathematical operations.\\n        // We construct a 31-bit value using bitwise operators over the 31\\n        // most significant bits and then multiply by 4 (equal to a left-shift\\n        // of 2) before we add the final 2 least significant bits of the\\n        // timestamp (equal to an OR.)\\n\\n        if (ptsDtsFlags & 0xC0) {\\n          // the PTS and DTS are not written out directly. For information\\n          // on how they are encoded, see\\n          // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\\n          pes.pts = (payload[9] & 0x0E) << 27 | (payload[10] & 0xFF) << 20 | (payload[11] & 0xFE) << 12 | (payload[12] & 0xFF) << 5 | (payload[13] & 0xFE) >>> 3;\\n          pes.pts *= 4; // Left shift by 2\\n\\n          pes.pts += (payload[13] & 0x06) >>> 1; // OR by the two LSBs\\n\\n          pes.dts = pes.pts;\\n\\n          if (ptsDtsFlags & 0x40) {\\n            pes.dts = (payload[14] & 0x0E) << 27 | (payload[15] & 0xFF) << 20 | (payload[16] & 0xFE) << 12 | (payload[17] & 0xFF) << 5 | (payload[18] & 0xFE) >>> 3;\\n            pes.dts *= 4; // Left shift by 2\\n\\n            pes.dts += (payload[18] & 0x06) >>> 1; // OR by the two LSBs\\n          }\\n        } // the data section starts immediately after the PES header.\\n        // pes_header_data_length specifies the number of header bytes\\n        // that follow the last byte of the field.\\n\\n\\n        pes.data = payload.subarray(9 + payload[8]);\\n      },\\n\\n      /**\\n        * Pass completely parsed PES packets to the next stream in the pipeline\\n       **/\\n      flushStream = function flushStream(stream$$1, type, forceFlush) {\\n        var packetData = new Uint8Array(stream$$1.size),\\n            event = {\\n          type: type\\n        },\\n            i = 0,\\n            offset = 0,\\n            packetFlushable = false,\\n            fragment; // do nothing if there is not enough buffered data for a complete\\n        // PES header\\n\\n        if (!stream$$1.data.length || stream$$1.size < 9) {\\n          return;\\n        }\\n\\n        event.trackId = stream$$1.data[0].pid; // reassemble the packet\\n\\n        for (i = 0; i < stream$$1.data.length; i++) {\\n          fragment = stream$$1.data[i];\\n          packetData.set(fragment.data, offset);\\n          offset += fragment.data.byteLength;\\n        } // parse assembled packet's PES header\\n\\n\\n        parsePes(packetData, event); // non-video PES packets MUST have a non-zero PES_packet_length\\n        // check that there is enough stream data to fill the packet\\n\\n        packetFlushable = type === 'video' || event.packetLength <= stream$$1.size; // flush pending packets if the conditions are right\\n\\n        if (forceFlush || packetFlushable) {\\n          stream$$1.size = 0;\\n          stream$$1.data.length = 0;\\n        } // only emit packets that are complete. this is to avoid assembling\\n        // incomplete PES packets due to poor segmentation\\n\\n\\n        if (packetFlushable) {\\n          self.trigger('data', event);\\n        }\\n      };\\n\\n      _ElementaryStream.prototype.init.call(this);\\n      /**\\n       * Identifies M2TS packet types and parses PES packets using metadata\\n       * parsed from the PMT\\n       **/\\n\\n\\n      this.push = function (data) {\\n        ({\\n          pat: function pat() {// we have to wait for the PMT to arrive as well before we\\n            // have any meaningful metadata\\n          },\\n          pes: function pes() {\\n            var stream$$1, streamType;\\n\\n            switch (data.streamType) {\\n              case streamTypes.H264_STREAM_TYPE:\\n              case streamTypes.H264_STREAM_TYPE:\\n                stream$$1 = video;\\n                streamType = 'video';\\n                break;\\n\\n              case streamTypes.ADTS_STREAM_TYPE:\\n                stream$$1 = audio;\\n                streamType = 'audio';\\n                break;\\n\\n              case streamTypes.METADATA_STREAM_TYPE:\\n                stream$$1 = timedMetadata;\\n                streamType = 'timed-metadata';\\n                break;\\n\\n              default:\\n                // ignore unknown stream types\\n                return;\\n            } // if a new packet is starting, we can flush the completed\\n            // packet\\n\\n\\n            if (data.payloadUnitStartIndicator) {\\n              flushStream(stream$$1, streamType, true);\\n            } // buffer this fragment until we are sure we've received the\\n            // complete payload\\n\\n\\n            stream$$1.data.push(data);\\n            stream$$1.size += data.data.byteLength;\\n          },\\n          pmt: function pmt() {\\n            var event = {\\n              type: 'metadata',\\n              tracks: []\\n            };\\n            programMapTable = data.programMapTable; // translate audio and video streams to tracks\\n\\n            if (programMapTable.video !== null) {\\n              event.tracks.push({\\n                timelineStartInfo: {\\n                  baseMediaDecodeTime: 0\\n                },\\n                id: +programMapTable.video,\\n                codec: 'avc',\\n                type: 'video'\\n              });\\n            }\\n\\n            if (programMapTable.audio !== null) {\\n              event.tracks.push({\\n                timelineStartInfo: {\\n                  baseMediaDecodeTime: 0\\n                },\\n                id: +programMapTable.audio,\\n                codec: 'adts',\\n                type: 'audio'\\n              });\\n            }\\n\\n            self.trigger('data', event);\\n          }\\n        })[data.type]();\\n      };\\n\\n      this.reset = function () {\\n        video.size = 0;\\n        video.data.length = 0;\\n        audio.size = 0;\\n        audio.data.length = 0;\\n        this.trigger('reset');\\n      };\\n      /**\\n       * Flush any remaining input. Video PES packets may be of variable\\n       * length. Normally, the start of a new video packet can trigger the\\n       * finalization of the previous packet. That is not possible if no\\n       * more video is forthcoming, however. In that case, some other\\n       * mechanism (like the end of the file) has to be employed. When it is\\n       * clear that no additional data is forthcoming, calling this method\\n       * will flush the buffered packets.\\n       */\\n\\n\\n      this.flushStreams_ = function () {\\n        // !!THIS ORDER IS IMPORTANT!!\\n        // video first then audio\\n        flushStream(video, 'video');\\n        flushStream(audio, 'audio');\\n        flushStream(timedMetadata, 'timed-metadata');\\n      };\\n\\n      this.flush = function () {\\n        this.flushStreams_();\\n        this.trigger('done');\\n      };\\n    };\\n\\n    _ElementaryStream.prototype = new stream();\\n    var m2ts = {\\n      PAT_PID: 0x0000,\\n      MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH,\\n      TransportPacketStream: _TransportPacketStream,\\n      TransportParseStream: _TransportParseStream,\\n      ElementaryStream: _ElementaryStream,\\n      TimestampRolloverStream: TimestampRolloverStream$1,\\n      CaptionStream: captionStream.CaptionStream,\\n      Cea608Stream: captionStream.Cea608Stream,\\n      MetadataStream: metadataStream\\n    };\\n\\n    for (var type in streamTypes) {\\n      if (streamTypes.hasOwnProperty(type)) {\\n        m2ts[type] = streamTypes[type];\\n      }\\n    }\\n\\n    var m2ts_1 = m2ts;\\n    var ONE_SECOND_IN_TS$2 = clock.ONE_SECOND_IN_TS;\\n\\n    var _AdtsStream;\\n\\n    var ADTS_SAMPLING_FREQUENCIES = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\\n    /*\\n     * Accepts a ElementaryStream and emits data events with parsed\\n     * AAC Audio Frames of the individual packets. Input audio in ADTS\\n     * format is unpacked and re-emitted as AAC frames.\\n     *\\n     * @see http://wiki.multimedia.cx/index.php?title=ADTS\\n     * @see http://wiki.multimedia.cx/?title=Understanding_AAC\\n     */\\n\\n    _AdtsStream = function AdtsStream(handlePartialSegments) {\\n      var buffer,\\n          frameNum = 0;\\n\\n      _AdtsStream.prototype.init.call(this);\\n\\n      this.push = function (packet) {\\n        var i = 0,\\n            frameLength,\\n            protectionSkipBytes,\\n            frameEnd,\\n            oldBuffer,\\n            sampleCount,\\n            adtsFrameDuration;\\n\\n        if (!handlePartialSegments) {\\n          frameNum = 0;\\n        }\\n\\n        if (packet.type !== 'audio') {\\n          // ignore non-audio data\\n          return;\\n        } // Prepend any data in the buffer to the input data so that we can parse\\n        // aac frames the cross a PES packet boundary\\n\\n\\n        if (buffer) {\\n          oldBuffer = buffer;\\n          buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\\n          buffer.set(oldBuffer);\\n          buffer.set(packet.data, oldBuffer.byteLength);\\n        } else {\\n          buffer = packet.data;\\n        } // unpack any ADTS frames which have been fully received\\n        // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\\n\\n\\n        while (i + 5 < buffer.length) {\\n          // Look for the start of an ADTS header..\\n          if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\\n            // If a valid header was not found,  jump one forward and attempt to\\n            // find a valid ADTS header starting at the next byte\\n            i++;\\n            continue;\\n          } // The protection skip bit tells us if we have 2 bytes of CRC data at the\\n          // end of the ADTS header\\n\\n\\n          protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2; // Frame length is a 13 bit integer starting 16 bits from the\\n          // end of the sync sequence\\n\\n          frameLength = (buffer[i + 3] & 0x03) << 11 | buffer[i + 4] << 3 | (buffer[i + 5] & 0xe0) >> 5;\\n          sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\\n          adtsFrameDuration = sampleCount * ONE_SECOND_IN_TS$2 / ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2];\\n          frameEnd = i + frameLength; // If we don't have enough data to actually finish this ADTS frame, return\\n          // and wait for more data\\n\\n          if (buffer.byteLength < frameEnd) {\\n            return;\\n          } // Otherwise, deliver the complete AAC frame\\n\\n\\n          this.trigger('data', {\\n            pts: packet.pts + frameNum * adtsFrameDuration,\\n            dts: packet.dts + frameNum * adtsFrameDuration,\\n            sampleCount: sampleCount,\\n            audioobjecttype: (buffer[i + 2] >>> 6 & 0x03) + 1,\\n            channelcount: (buffer[i + 2] & 1) << 2 | (buffer[i + 3] & 0xc0) >>> 6,\\n            samplerate: ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2],\\n            samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\\n            // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\\n            samplesize: 16,\\n            data: buffer.subarray(i + 7 + protectionSkipBytes, frameEnd)\\n          });\\n          frameNum++; // If the buffer is empty, clear it and return\\n\\n          if (buffer.byteLength === frameEnd) {\\n            buffer = undefined;\\n            return;\\n          } // Remove the finished frame from the buffer and start the process again\\n\\n\\n          buffer = buffer.subarray(frameEnd);\\n        }\\n      };\\n\\n      this.flush = function () {\\n        frameNum = 0;\\n        this.trigger('done');\\n      };\\n\\n      this.reset = function () {\\n        buffer = void 0;\\n        this.trigger('reset');\\n      };\\n\\n      this.endTimeline = function () {\\n        buffer = void 0;\\n        this.trigger('endedtimeline');\\n      };\\n    };\\n\\n    _AdtsStream.prototype = new stream();\\n    var adts = _AdtsStream;\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     */\\n\\n    var ExpGolomb;\\n    /**\\n     * Parser for exponential Golomb codes, a variable-bitwidth number encoding\\n     * scheme used by h264.\\n     */\\n\\n    ExpGolomb = function ExpGolomb(workingData) {\\n      var // the number of bytes left to examine in workingData\\n      workingBytesAvailable = workingData.byteLength,\\n          // the current word being examined\\n      workingWord = 0,\\n          // :uint\\n      // the number of bits left to examine in the current word\\n      workingBitsAvailable = 0; // :uint;\\n      // ():uint\\n\\n      this.length = function () {\\n        return 8 * workingBytesAvailable;\\n      }; // ():uint\\n\\n\\n      this.bitsAvailable = function () {\\n        return 8 * workingBytesAvailable + workingBitsAvailable;\\n      }; // ():void\\n\\n\\n      this.loadWord = function () {\\n        var position = workingData.byteLength - workingBytesAvailable,\\n            workingBytes = new Uint8Array(4),\\n            availableBytes = Math.min(4, workingBytesAvailable);\\n\\n        if (availableBytes === 0) {\\n          throw new Error('no bytes available');\\n        }\\n\\n        workingBytes.set(workingData.subarray(position, position + availableBytes));\\n        workingWord = new DataView(workingBytes.buffer).getUint32(0); // track the amount of workingData that has been processed\\n\\n        workingBitsAvailable = availableBytes * 8;\\n        workingBytesAvailable -= availableBytes;\\n      }; // (count:int):void\\n\\n\\n      this.skipBits = function (count) {\\n        var skipBytes; // :int\\n\\n        if (workingBitsAvailable > count) {\\n          workingWord <<= count;\\n          workingBitsAvailable -= count;\\n        } else {\\n          count -= workingBitsAvailable;\\n          skipBytes = Math.floor(count / 8);\\n          count -= skipBytes * 8;\\n          workingBytesAvailable -= skipBytes;\\n          this.loadWord();\\n          workingWord <<= count;\\n          workingBitsAvailable -= count;\\n        }\\n      }; // (size:int):uint\\n\\n\\n      this.readBits = function (size) {\\n        var bits = Math.min(workingBitsAvailable, size),\\n            // :uint\\n        valu = workingWord >>> 32 - bits; // :uint\\n        // if size > 31, handle error\\n\\n        workingBitsAvailable -= bits;\\n\\n        if (workingBitsAvailable > 0) {\\n          workingWord <<= bits;\\n        } else if (workingBytesAvailable > 0) {\\n          this.loadWord();\\n        }\\n\\n        bits = size - bits;\\n\\n        if (bits > 0) {\\n          return valu << bits | this.readBits(bits);\\n        }\\n\\n        return valu;\\n      }; // ():uint\\n\\n\\n      this.skipLeadingZeros = function () {\\n        var leadingZeroCount; // :uint\\n\\n        for (leadingZeroCount = 0; leadingZeroCount < workingBitsAvailable; ++leadingZeroCount) {\\n          if ((workingWord & 0x80000000 >>> leadingZeroCount) !== 0) {\\n            // the first bit of working word is 1\\n            workingWord <<= leadingZeroCount;\\n            workingBitsAvailable -= leadingZeroCount;\\n            return leadingZeroCount;\\n          }\\n        } // we exhausted workingWord and still have not found a 1\\n\\n\\n        this.loadWord();\\n        return leadingZeroCount + this.skipLeadingZeros();\\n      }; // ():void\\n\\n\\n      this.skipUnsignedExpGolomb = function () {\\n        this.skipBits(1 + this.skipLeadingZeros());\\n      }; // ():void\\n\\n\\n      this.skipExpGolomb = function () {\\n        this.skipBits(1 + this.skipLeadingZeros());\\n      }; // ():uint\\n\\n\\n      this.readUnsignedExpGolomb = function () {\\n        var clz = this.skipLeadingZeros(); // :uint\\n\\n        return this.readBits(clz + 1) - 1;\\n      }; // ():int\\n\\n\\n      this.readExpGolomb = function () {\\n        var valu = this.readUnsignedExpGolomb(); // :int\\n\\n        if (0x01 & valu) {\\n          // the number is odd if the low order bit is set\\n          return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\\n        }\\n\\n        return -1 * (valu >>> 1); // divide by two then make it negative\\n      }; // Some convenience functions\\n      // :Boolean\\n\\n\\n      this.readBoolean = function () {\\n        return this.readBits(1) === 1;\\n      }; // ():int\\n\\n\\n      this.readUnsignedByte = function () {\\n        return this.readBits(8);\\n      };\\n\\n      this.loadWord();\\n    };\\n\\n    var expGolomb = ExpGolomb;\\n\\n    var _H264Stream, _NalByteStream;\\n\\n    var PROFILES_WITH_OPTIONAL_SPS_DATA;\\n    /**\\n     * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\\n     */\\n\\n    _NalByteStream = function NalByteStream() {\\n      var syncPoint = 0,\\n          i,\\n          buffer;\\n\\n      _NalByteStream.prototype.init.call(this);\\n      /*\\n       * Scans a byte stream and triggers a data event with the NAL units found.\\n       * @param {Object} data Event received from H264Stream\\n       * @param {Uint8Array} data.data The h264 byte stream to be scanned\\n       *\\n       * @see H264Stream.push\\n       */\\n\\n\\n      this.push = function (data) {\\n        var swapBuffer;\\n\\n        if (!buffer) {\\n          buffer = data.data;\\n        } else {\\n          swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\\n          swapBuffer.set(buffer);\\n          swapBuffer.set(data.data, buffer.byteLength);\\n          buffer = swapBuffer;\\n        }\\n\\n        var len = buffer.byteLength; // Rec. ITU-T H.264, Annex B\\n        // scan for NAL unit boundaries\\n        // a match looks like this:\\n        // 0 0 1 .. NAL .. 0 0 1\\n        // ^ sync point        ^ i\\n        // or this:\\n        // 0 0 1 .. NAL .. 0 0 0\\n        // ^ sync point        ^ i\\n        // advance the sync point to a NAL start, if necessary\\n\\n        for (; syncPoint < len - 3; syncPoint++) {\\n          if (buffer[syncPoint + 2] === 1) {\\n            // the sync point is properly aligned\\n            i = syncPoint + 5;\\n            break;\\n          }\\n        }\\n\\n        while (i < len) {\\n          // look at the current byte to determine if we've hit the end of\\n          // a NAL unit boundary\\n          switch (buffer[i]) {\\n            case 0:\\n              // skip past non-sync sequences\\n              if (buffer[i - 1] !== 0) {\\n                i += 2;\\n                break;\\n              } else if (buffer[i - 2] !== 0) {\\n                i++;\\n                break;\\n              } // deliver the NAL unit if it isn't empty\\n\\n\\n              if (syncPoint + 3 !== i - 2) {\\n                this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\\n              } // drop trailing zeroes\\n\\n\\n              do {\\n                i++;\\n              } while (buffer[i] !== 1 && i < len);\\n\\n              syncPoint = i - 2;\\n              i += 3;\\n              break;\\n\\n            case 1:\\n              // skip past non-sync sequences\\n              if (buffer[i - 1] !== 0 || buffer[i - 2] !== 0) {\\n                i += 3;\\n                break;\\n              } // deliver the NAL unit\\n\\n\\n              this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\\n              syncPoint = i - 2;\\n              i += 3;\\n              break;\\n\\n            default:\\n              // the current byte isn't a one or zero, so it cannot be part\\n              // of a sync sequence\\n              i += 3;\\n              break;\\n          }\\n        } // filter out the NAL units that were delivered\\n\\n\\n        buffer = buffer.subarray(syncPoint);\\n        i -= syncPoint;\\n        syncPoint = 0;\\n      };\\n\\n      this.reset = function () {\\n        buffer = null;\\n        syncPoint = 0;\\n        this.trigger('reset');\\n      };\\n\\n      this.flush = function () {\\n        // deliver the last buffered NAL unit\\n        if (buffer && buffer.byteLength > 3) {\\n          this.trigger('data', buffer.subarray(syncPoint + 3));\\n        } // reset the stream state\\n\\n\\n        buffer = null;\\n        syncPoint = 0;\\n        this.trigger('done');\\n      };\\n\\n      this.endTimeline = function () {\\n        this.flush();\\n        this.trigger('endedtimeline');\\n      };\\n    };\\n\\n    _NalByteStream.prototype = new stream(); // values of profile_idc that indicate additional fields are included in the SPS\\n    // see Recommendation ITU-T H.264 (4/2013),\\n    // 7.3.2.1.1 Sequence parameter set data syntax\\n\\n    PROFILES_WITH_OPTIONAL_SPS_DATA = {\\n      100: true,\\n      110: true,\\n      122: true,\\n      244: true,\\n      44: true,\\n      83: true,\\n      86: true,\\n      118: true,\\n      128: true,\\n      138: true,\\n      139: true,\\n      134: true\\n    };\\n    /**\\n     * Accepts input from a ElementaryStream and produces H.264 NAL unit data\\n     * events.\\n     */\\n\\n    _H264Stream = function H264Stream() {\\n      var nalByteStream = new _NalByteStream(),\\n          self,\\n          trackId,\\n          currentPts,\\n          currentDts,\\n          discardEmulationPreventionBytes,\\n          readSequenceParameterSet,\\n          skipScalingList;\\n\\n      _H264Stream.prototype.init.call(this);\\n\\n      self = this;\\n      /*\\n       * Pushes a packet from a stream onto the NalByteStream\\n       *\\n       * @param {Object} packet - A packet received from a stream\\n       * @param {Uint8Array} packet.data - The raw bytes of the packet\\n       * @param {Number} packet.dts - Decode timestamp of the packet\\n       * @param {Number} packet.pts - Presentation timestamp of the packet\\n       * @param {Number} packet.trackId - The id of the h264 track this packet came from\\n       * @param {('video'|'audio')} packet.type - The type of packet\\n       *\\n       */\\n\\n      this.push = function (packet) {\\n        if (packet.type !== 'video') {\\n          return;\\n        }\\n\\n        trackId = packet.trackId;\\n        currentPts = packet.pts;\\n        currentDts = packet.dts;\\n        nalByteStream.push(packet);\\n      };\\n      /*\\n       * Identify NAL unit types and pass on the NALU, trackId, presentation and decode timestamps\\n       * for the NALUs to the next stream component.\\n       * Also, preprocess caption and sequence parameter NALUs.\\n       *\\n       * @param {Uint8Array} data - A NAL unit identified by `NalByteStream.push`\\n       * @see NalByteStream.push\\n       */\\n\\n\\n      nalByteStream.on('data', function (data) {\\n        var event = {\\n          trackId: trackId,\\n          pts: currentPts,\\n          dts: currentDts,\\n          data: data\\n        };\\n\\n        switch (data[0] & 0x1f) {\\n          case 0x05:\\n            event.nalUnitType = 'slice_layer_without_partitioning_rbsp_idr';\\n            break;\\n\\n          case 0x06:\\n            event.nalUnitType = 'sei_rbsp';\\n            event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\\n            break;\\n\\n          case 0x07:\\n            event.nalUnitType = 'seq_parameter_set_rbsp';\\n            event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\\n            event.config = readSequenceParameterSet(event.escapedRBSP);\\n            break;\\n\\n          case 0x08:\\n            event.nalUnitType = 'pic_parameter_set_rbsp';\\n            break;\\n\\n          case 0x09:\\n            event.nalUnitType = 'access_unit_delimiter_rbsp';\\n            break;\\n        } // This triggers data on the H264Stream\\n\\n\\n        self.trigger('data', event);\\n      });\\n      nalByteStream.on('done', function () {\\n        self.trigger('done');\\n      });\\n      nalByteStream.on('partialdone', function () {\\n        self.trigger('partialdone');\\n      });\\n      nalByteStream.on('reset', function () {\\n        self.trigger('reset');\\n      });\\n      nalByteStream.on('endedtimeline', function () {\\n        self.trigger('endedtimeline');\\n      });\\n\\n      this.flush = function () {\\n        nalByteStream.flush();\\n      };\\n\\n      this.partialFlush = function () {\\n        nalByteStream.partialFlush();\\n      };\\n\\n      this.reset = function () {\\n        nalByteStream.reset();\\n      };\\n\\n      this.endTimeline = function () {\\n        nalByteStream.endTimeline();\\n      };\\n      /**\\n       * Advance the ExpGolomb decoder past a scaling list. The scaling\\n       * list is optionally transmitted as part of a sequence parameter\\n       * set and is not relevant to transmuxing.\\n       * @param count {number} the number of entries in this scaling list\\n       * @param expGolombDecoder {object} an ExpGolomb pointed to the\\n       * start of a scaling list\\n       * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\\n       */\\n\\n\\n      skipScalingList = function skipScalingList(count, expGolombDecoder) {\\n        var lastScale = 8,\\n            nextScale = 8,\\n            j,\\n            deltaScale;\\n\\n        for (j = 0; j < count; j++) {\\n          if (nextScale !== 0) {\\n            deltaScale = expGolombDecoder.readExpGolomb();\\n            nextScale = (lastScale + deltaScale + 256) % 256;\\n          }\\n\\n          lastScale = nextScale === 0 ? lastScale : nextScale;\\n        }\\n      };\\n      /**\\n       * Expunge any \\\"Emulation Prevention\\\" bytes from a \\\"Raw Byte\\n       * Sequence Payload\\\"\\n       * @param data {Uint8Array} the bytes of a RBSP from a NAL\\n       * unit\\n       * @return {Uint8Array} the RBSP without any Emulation\\n       * Prevention Bytes\\n       */\\n\\n\\n      discardEmulationPreventionBytes = function discardEmulationPreventionBytes(data) {\\n        var length = data.byteLength,\\n            emulationPreventionBytesPositions = [],\\n            i = 1,\\n            newLength,\\n            newData; // Find all `Emulation Prevention Bytes`\\n\\n        while (i < length - 2) {\\n          if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\\n            emulationPreventionBytesPositions.push(i + 2);\\n            i += 2;\\n          } else {\\n            i++;\\n          }\\n        } // If no Emulation Prevention Bytes were found just return the original\\n        // array\\n\\n\\n        if (emulationPreventionBytesPositions.length === 0) {\\n          return data;\\n        } // Create a new array to hold the NAL unit data\\n\\n\\n        newLength = length - emulationPreventionBytesPositions.length;\\n        newData = new Uint8Array(newLength);\\n        var sourceIndex = 0;\\n\\n        for (i = 0; i < newLength; sourceIndex++, i++) {\\n          if (sourceIndex === emulationPreventionBytesPositions[0]) {\\n            // Skip this byte\\n            sourceIndex++; // Remove this position index\\n\\n            emulationPreventionBytesPositions.shift();\\n          }\\n\\n          newData[i] = data[sourceIndex];\\n        }\\n\\n        return newData;\\n      };\\n      /**\\n       * Read a sequence parameter set and return some interesting video\\n       * properties. A sequence parameter set is the H264 metadata that\\n       * describes the properties of upcoming video frames.\\n       * @param data {Uint8Array} the bytes of a sequence parameter set\\n       * @return {object} an object with configuration parsed from the\\n       * sequence parameter set, including the dimensions of the\\n       * associated video frames.\\n       */\\n\\n\\n      readSequenceParameterSet = function readSequenceParameterSet(data) {\\n        var frameCropLeftOffset = 0,\\n            frameCropRightOffset = 0,\\n            frameCropTopOffset = 0,\\n            frameCropBottomOffset = 0,\\n            sarScale = 1,\\n            expGolombDecoder,\\n            profileIdc,\\n            levelIdc,\\n            profileCompatibility,\\n            chromaFormatIdc,\\n            picOrderCntType,\\n            numRefFramesInPicOrderCntCycle,\\n            picWidthInMbsMinus1,\\n            picHeightInMapUnitsMinus1,\\n            frameMbsOnlyFlag,\\n            scalingListCount,\\n            sarRatio,\\n            aspectRatioIdc,\\n            i;\\n        expGolombDecoder = new expGolomb(data);\\n        profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\\n\\n        profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\\n\\n        levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\\n\\n        expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\\n        // some profiles have more optional data we don't need\\n\\n        if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\\n          chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\\n\\n          if (chromaFormatIdc === 3) {\\n            expGolombDecoder.skipBits(1); // separate_colour_plane_flag\\n          }\\n\\n          expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\\n\\n          expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\\n\\n          expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\\n\\n          if (expGolombDecoder.readBoolean()) {\\n            // seq_scaling_matrix_present_flag\\n            scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\\n\\n            for (i = 0; i < scalingListCount; i++) {\\n              if (expGolombDecoder.readBoolean()) {\\n                // seq_scaling_list_present_flag[ i ]\\n                if (i < 6) {\\n                  skipScalingList(16, expGolombDecoder);\\n                } else {\\n                  skipScalingList(64, expGolombDecoder);\\n                }\\n              }\\n            }\\n          }\\n        }\\n\\n        expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\\n\\n        picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\\n\\n        if (picOrderCntType === 0) {\\n          expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\\n        } else if (picOrderCntType === 1) {\\n          expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\\n\\n          expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\\n\\n          expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\\n\\n          numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\\n\\n          for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\\n            expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\\n          }\\n        }\\n\\n        expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\\n\\n        expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\\n\\n        picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\\n        picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\\n        frameMbsOnlyFlag = expGolombDecoder.readBits(1);\\n\\n        if (frameMbsOnlyFlag === 0) {\\n          expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\\n        }\\n\\n        expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\\n\\n        if (expGolombDecoder.readBoolean()) {\\n          // frame_cropping_flag\\n          frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\\n          frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\\n          frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\\n          frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\\n        }\\n\\n        if (expGolombDecoder.readBoolean()) {\\n          // vui_parameters_present_flag\\n          if (expGolombDecoder.readBoolean()) {\\n            // aspect_ratio_info_present_flag\\n            aspectRatioIdc = expGolombDecoder.readUnsignedByte();\\n\\n            switch (aspectRatioIdc) {\\n              case 1:\\n                sarRatio = [1, 1];\\n                break;\\n\\n              case 2:\\n                sarRatio = [12, 11];\\n                break;\\n\\n              case 3:\\n                sarRatio = [10, 11];\\n                break;\\n\\n              case 4:\\n                sarRatio = [16, 11];\\n                break;\\n\\n              case 5:\\n                sarRatio = [40, 33];\\n                break;\\n\\n              case 6:\\n                sarRatio = [24, 11];\\n                break;\\n\\n              case 7:\\n                sarRatio = [20, 11];\\n                break;\\n\\n              case 8:\\n                sarRatio = [32, 11];\\n                break;\\n\\n              case 9:\\n                sarRatio = [80, 33];\\n                break;\\n\\n              case 10:\\n                sarRatio = [18, 11];\\n                break;\\n\\n              case 11:\\n                sarRatio = [15, 11];\\n                break;\\n\\n              case 12:\\n                sarRatio = [64, 33];\\n                break;\\n\\n              case 13:\\n                sarRatio = [160, 99];\\n                break;\\n\\n              case 14:\\n                sarRatio = [4, 3];\\n                break;\\n\\n              case 15:\\n                sarRatio = [3, 2];\\n                break;\\n\\n              case 16:\\n                sarRatio = [2, 1];\\n                break;\\n\\n              case 255:\\n                {\\n                  sarRatio = [expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte(), expGolombDecoder.readUnsignedByte() << 8 | expGolombDecoder.readUnsignedByte()];\\n                  break;\\n                }\\n            }\\n\\n            if (sarRatio) {\\n              sarScale = sarRatio[0] / sarRatio[1];\\n            }\\n          }\\n        }\\n\\n        return {\\n          profileIdc: profileIdc,\\n          levelIdc: levelIdc,\\n          profileCompatibility: profileCompatibility,\\n          width: Math.ceil(((picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\\n          height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - frameCropTopOffset * 2 - frameCropBottomOffset * 2,\\n          sarRatio: sarRatio\\n        };\\n      };\\n    };\\n\\n    _H264Stream.prototype = new stream();\\n    var h264 = {\\n      H264Stream: _H264Stream,\\n      NalByteStream: _NalByteStream\\n    };\\n    /**\\n     * mux.js\\n     *\\n     * Copyright (c) Brightcove\\n     * Licensed Apache-2.0 https://github.com/videojs/mux.js/blob/master/LICENSE\\n     *\\n     * Utilities to detect basic properties and metadata about Aac data.\\n     */\\n\\n    var ADTS_SAMPLING_FREQUENCIES$1 = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\\n\\n    var isLikelyAacData = function isLikelyAacData(data) {\\n      if (data[0] === 'I'.charCodeAt(0) && data[1] === 'D'.charCodeAt(0) && data[2] === '3'.charCodeAt(0)) {\\n        return true;\\n      }\\n\\n      return false;\\n    };\\n\\n    var parseSyncSafeInteger$1 = function parseSyncSafeInteger(data) {\\n      return data[0] << 21 | data[1] << 14 | data[2] << 7 | data[3];\\n    }; // return a percent-encoded representation of the specified byte range\\n    // @see http://en.wikipedia.org/wiki/Percent-encoding\\n\\n\\n    var percentEncode$1 = function percentEncode(bytes, start, end) {\\n      var i,\\n          result = '';\\n\\n      for (i = start; i < end; i++) {\\n        result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\\n      }\\n\\n      return result;\\n    }; // return the string representation of the specified byte range,\\n    // interpreted as ISO-8859-1.\\n\\n\\n    var parseIso88591$1 = function parseIso88591(bytes, start, end) {\\n      return unescape(percentEncode$1(bytes, start, end)); // jshint ignore:line\\n    };\\n\\n    var parseId3TagSize = function parseId3TagSize(header, byteIndex) {\\n      var returnSize = header[byteIndex + 6] << 21 | header[byteIndex + 7] << 14 | header[byteIndex + 8] << 7 | header[byteIndex + 9],\\n          flags = header[byteIndex + 5],\\n          footerPresent = (flags & 16) >> 4;\\n\\n      if (footerPresent) {\\n        return returnSize + 20;\\n      }\\n\\n      return returnSize + 10;\\n    };\\n\\n    var parseAdtsSize = function parseAdtsSize(header, byteIndex) {\\n      var lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\\n          middle = header[byteIndex + 4] << 3,\\n          highTwo = header[byteIndex + 3] & 0x3 << 11;\\n      return highTwo | middle | lowThree;\\n    };\\n\\n    var parseType = function parseType(header, byteIndex) {\\n      if (header[byteIndex] === 'I'.charCodeAt(0) && header[byteIndex + 1] === 'D'.charCodeAt(0) && header[byteIndex + 2] === '3'.charCodeAt(0)) {\\n        return 'timed-metadata';\\n      } else if (header[byteIndex] & 0xff === 0xff && (header[byteIndex + 1] & 0xf0) === 0xf0) {\\n        return 'audio';\\n      }\\n\\n      return null;\\n    };\\n\\n    var parseSampleRate = function parseSampleRate(packet) {\\n      var i = 0;\\n\\n      while (i + 5 < packet.length) {\\n        if (packet[i] !== 0xFF || (packet[i + 1] & 0xF6) !== 0xF0) {\\n          // If a valid header was not found,  jump one forward and attempt to\\n          // find a valid ADTS header starting at the next byte\\n          i++;\\n          continue;\\n        }\\n\\n        return ADTS_SAMPLING_FREQUENCIES$1[(packet[i + 2] & 0x3c) >>> 2];\\n      }\\n\\n      return null;\\n    };\\n\\n    var parseAacTimestamp = function parseAacTimestamp(packet) {\\n      var frameStart, frameSize, frame, frameHeader; // find the start of the first frame and the end of the tag\\n\\n      frameStart = 10;\\n\\n      if (packet[5] & 0x40) {\\n        // advance the frame start past the extended header\\n        frameStart += 4; // header size field\\n\\n        frameStart += parseSyncSafeInteger$1(packet.subarray(10, 14));\\n      } // parse one or more ID3 frames\\n      // http://id3.org/id3v2.3.0#ID3v2_frame_overview\\n\\n\\n      do {\\n        // determine the number of bytes in this frame\\n        frameSize = parseSyncSafeInteger$1(packet.subarray(frameStart + 4, frameStart + 8));\\n\\n        if (frameSize < 1) {\\n          return null;\\n        }\\n\\n        frameHeader = String.fromCharCode(packet[frameStart], packet[frameStart + 1], packet[frameStart + 2], packet[frameStart + 3]);\\n\\n        if (frameHeader === 'PRIV') {\\n          frame = packet.subarray(frameStart + 10, frameStart + frameSize + 10);\\n\\n          for (var i = 0; i < frame.byteLength; i++) {\\n            if (frame[i] === 0) {\\n              var owner = parseIso88591$1(frame, 0, i);\\n\\n              if (owner === 'com.apple.streaming.transportStreamTimestamp') {\\n                var d = frame.subarray(i + 1);\\n                var size = (d[3] & 0x01) << 30 | d[4] << 22 | d[5] << 14 | d[6] << 6 | d[7] >>> 2;\\n                size *= 4;\\n                size += d[7] & 0x03;\\n                return size;\\n              }\\n\\n              break;\\n            }\\n          }\\n        }\\n\\n        frameStart += 10; // advance past the frame header\\n\\n        frameStart += frameSize; // advance past the frame body\\n      } while (frameStart < packet.byteLength);\\n\\n      return null;\\n    };\\n\\n    var utils = {\\n      isLikelyAacData: isLikelyAacData,\\n      parseId3TagSize: parseId3TagSize,\\n      parseAdtsSize: parseAdtsSize,\\n      parseType: parseType,\\n      parseSampleRate: parseSampleRate,\\n      parseAacTimestamp: parseAacTimestamp\\n    }; // Constants\\n\\n    var _AacStream;\\n    /**\\n     * Splits an incoming stream of binary data into ADTS and ID3 Frames.\\n     */\\n\\n\\n    _AacStream = function AacStream() {\\n      var everything = new Uint8Array(),\\n          timeStamp = 0;\\n\\n      _AacStream.prototype.init.call(this);\\n\\n      this.setTimestamp = function (timestamp) {\\n        timeStamp = timestamp;\\n      };\\n\\n      this.push = function (bytes) {\\n        var frameSize = 0,\\n            byteIndex = 0,\\n            bytesLeft,\\n            chunk,\\n            packet,\\n            tempLength; // If there are bytes remaining from the last segment, prepend them to the\\n        // bytes that were pushed in\\n\\n        if (everything.length) {\\n          tempLength = everything.length;\\n          everything = new Uint8Array(bytes.byteLength + tempLength);\\n          everything.set(everything.subarray(0, tempLength));\\n          everything.set(bytes, tempLength);\\n        } else {\\n          everything = bytes;\\n        }\\n\\n        while (everything.length - byteIndex >= 3) {\\n          if (everything[byteIndex] === 'I'.charCodeAt(0) && everything[byteIndex + 1] === 'D'.charCodeAt(0) && everything[byteIndex + 2] === '3'.charCodeAt(0)) {\\n            // Exit early because we don't have enough to parse\\n            // the ID3 tag header\\n            if (everything.length - byteIndex < 10) {\\n              break;\\n            } // check framesize\\n\\n\\n            frameSize = utils.parseId3TagSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\\n            // to emit a full packet\\n            // Add to byteIndex to support multiple ID3 tags in sequence\\n\\n            if (byteIndex + frameSize > everything.length) {\\n              break;\\n            }\\n\\n            chunk = {\\n              type: 'timed-metadata',\\n              data: everything.subarray(byteIndex, byteIndex + frameSize)\\n            };\\n            this.trigger('data', chunk);\\n            byteIndex += frameSize;\\n            continue;\\n          } else if ((everything[byteIndex] & 0xff) === 0xff && (everything[byteIndex + 1] & 0xf0) === 0xf0) {\\n            // Exit early because we don't have enough to parse\\n            // the ADTS frame header\\n            if (everything.length - byteIndex < 7) {\\n              break;\\n            }\\n\\n            frameSize = utils.parseAdtsSize(everything, byteIndex); // Exit early if we don't have enough in the buffer\\n            // to emit a full packet\\n\\n            if (byteIndex + frameSize > everything.length) {\\n              break;\\n            }\\n\\n            packet = {\\n              type: 'audio',\\n              data: everything.subarray(byteIndex, byteIndex + frameSize),\\n              pts: timeStamp,\\n              dts: timeStamp\\n            };\\n            this.trigger('data', packet);\\n            byteIndex += frameSize;\\n            continue;\\n          }\\n\\n          byteIndex++;\\n        }\\n\\n        bytesLeft = everything.length - byteIndex;\\n\\n        if (bytesLeft > 0) {\\n          everything = everything.subarray(byteIndex);\\n        } else {\\n          everything = new Uint8Array();\\n        }\\n      };\\n\\n      this.reset = function () {\\n        everything = new Uint8Array();\\n        this.trigger('reset');\\n      };\\n\\n      this.endTimeline = function () {\\n        everything = new Uint8Array();\\n        this.trigger('endedtimeline');\\n      };\\n    };\\n\\n    _AacStream.prototype = new stream();\\n    var aac = _AacStream;\\n    var H264Stream = h264.H264Stream;\\n    var isLikelyAacData$1 = utils.isLikelyAacData;\\n    var ONE_SECOND_IN_TS$3 = clock.ONE_SECOND_IN_TS; // constants\\n\\n    var AUDIO_PROPERTIES = ['audioobjecttype', 'channelcount', 'samplerate', 'samplingfrequencyindex', 'samplesize'];\\n    var VIDEO_PROPERTIES = ['width', 'height', 'profileIdc', 'levelIdc', 'profileCompatibility', 'sarRatio']; // object types\\n\\n    var _VideoSegmentStream, _AudioSegmentStream, _Transmuxer, _CoalesceStream;\\n    /**\\n     * Compare two arrays (even typed) for same-ness\\n     */\\n\\n\\n    var arrayEquals = function arrayEquals(a, b) {\\n      var i;\\n\\n      if (a.length !== b.length) {\\n        return false;\\n      } // compare the value of each element in the array\\n\\n\\n      for (i = 0; i < a.length; i++) {\\n        if (a[i] !== b[i]) {\\n          return false;\\n        }\\n      }\\n\\n      return true;\\n    };\\n\\n    var generateVideoSegmentTimingInfo = function generateVideoSegmentTimingInfo(baseMediaDecodeTime, startDts, startPts, endDts, endPts, prependedContentDuration) {\\n      var ptsOffsetFromDts = startPts - startDts,\\n          decodeDuration = endDts - startDts,\\n          presentationDuration = endPts - startPts; // The PTS and DTS values are based on the actual stream times from the segment,\\n      // however, the player time values will reflect a start from the baseMediaDecodeTime.\\n      // In order to provide relevant values for the player times, base timing info on the\\n      // baseMediaDecodeTime and the DTS and PTS durations of the segment.\\n\\n      return {\\n        start: {\\n          dts: baseMediaDecodeTime,\\n          pts: baseMediaDecodeTime + ptsOffsetFromDts\\n        },\\n        end: {\\n          dts: baseMediaDecodeTime + decodeDuration,\\n          pts: baseMediaDecodeTime + presentationDuration\\n        },\\n        prependedContentDuration: prependedContentDuration,\\n        baseMediaDecodeTime: baseMediaDecodeTime\\n      };\\n    };\\n    /**\\n     * Constructs a single-track, ISO BMFF media segment from AAC data\\n     * events. The output of this stream can be fed to a SourceBuffer\\n     * configured with a suitable initialization segment.\\n     * @param track {object} track metadata configuration\\n     * @param options {object} transmuxer options object\\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at 0.\\n     */\\n\\n\\n    _AudioSegmentStream = function AudioSegmentStream(track, options) {\\n      var adtsFrames = [],\\n          sequenceNumber = 0,\\n          earliestAllowedDts = 0,\\n          audioAppendStartTs = 0,\\n          videoBaseMediaDecodeTime = Infinity;\\n      options = options || {};\\n\\n      _AudioSegmentStream.prototype.init.call(this);\\n\\n      this.push = function (data) {\\n        trackDecodeInfo.collectDtsInfo(track, data);\\n\\n        if (track) {\\n          AUDIO_PROPERTIES.forEach(function (prop) {\\n            track[prop] = data[prop];\\n          });\\n        } // buffer audio data until end() is called\\n\\n\\n        adtsFrames.push(data);\\n      };\\n\\n      this.setEarliestDts = function (earliestDts) {\\n        earliestAllowedDts = earliestDts - track.timelineStartInfo.baseMediaDecodeTime;\\n      };\\n\\n      this.setVideoBaseMediaDecodeTime = function (baseMediaDecodeTime) {\\n        videoBaseMediaDecodeTime = baseMediaDecodeTime;\\n      };\\n\\n      this.setAudioAppendStart = function (timestamp) {\\n        audioAppendStartTs = timestamp;\\n      };\\n\\n      this.flush = function () {\\n        var frames, moof, mdat, boxes, frameDuration; // return early if no audio data has been observed\\n\\n        if (adtsFrames.length === 0) {\\n          this.trigger('done', 'AudioSegmentStream');\\n          return;\\n        }\\n\\n        frames = audioFrameUtils.trimAdtsFramesByEarliestDts(adtsFrames, track, earliestAllowedDts);\\n        track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\\n        audioFrameUtils.prefixWithSilence(track, frames, audioAppendStartTs, videoBaseMediaDecodeTime); // we have to build the index from byte locations to\\n        // samples (that is, adts frames) in the audio data\\n\\n        track.samples = audioFrameUtils.generateSampleTable(frames); // concatenate the audio data to constuct the mdat\\n\\n        mdat = mp4Generator.mdat(audioFrameUtils.concatenateFrameData(frames));\\n        adtsFrames = [];\\n        moof = mp4Generator.moof(sequenceNumber, [track]);\\n        boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // bump the sequence number for next time\\n\\n        sequenceNumber++;\\n        boxes.set(moof);\\n        boxes.set(mdat, moof.byteLength);\\n        trackDecodeInfo.clearDtsInfo(track);\\n        frameDuration = Math.ceil(ONE_SECOND_IN_TS$3 * 1024 / track.samplerate); // TODO this check was added to maintain backwards compatibility (particularly with\\n        // tests) on adding the timingInfo event. However, it seems unlikely that there's a\\n        // valid use-case where an init segment/data should be triggered without associated\\n        // frames. Leaving for now, but should be looked into.\\n\\n        if (frames.length) {\\n          this.trigger('timingInfo', {\\n            start: frames[0].pts,\\n            end: frames[0].pts + frames.length * frameDuration\\n          });\\n        }\\n\\n        this.trigger('data', {\\n          track: track,\\n          boxes: boxes\\n        });\\n        this.trigger('done', 'AudioSegmentStream');\\n      };\\n\\n      this.reset = function () {\\n        trackDecodeInfo.clearDtsInfo(track);\\n        adtsFrames = [];\\n        this.trigger('reset');\\n      };\\n    };\\n\\n    _AudioSegmentStream.prototype = new stream();\\n    /**\\n     * Constructs a single-track, ISO BMFF media segment from H264 data\\n     * events. The output of this stream can be fed to a SourceBuffer\\n     * configured with a suitable initialization segment.\\n     * @param track {object} track metadata configuration\\n     * @param options {object} transmuxer options object\\n     * @param options.alignGopsAtEnd {boolean} If true, start from the end of the\\n     *        gopsToAlignWith list when attempting to align gop pts\\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at 0.\\n     */\\n\\n    _VideoSegmentStream = function VideoSegmentStream(track, options) {\\n      var sequenceNumber = 0,\\n          nalUnits = [],\\n          gopsToAlignWith = [],\\n          config,\\n          pps;\\n      options = options || {};\\n\\n      _VideoSegmentStream.prototype.init.call(this);\\n\\n      delete track.minPTS;\\n      this.gopCache_ = [];\\n      /**\\n        * Constructs a ISO BMFF segment given H264 nalUnits\\n        * @param {Object} nalUnit A data event representing a nalUnit\\n        * @param {String} nalUnit.nalUnitType\\n        * @param {Object} nalUnit.config Properties for a mp4 track\\n        * @param {Uint8Array} nalUnit.data The nalUnit bytes\\n        * @see lib/codecs/h264.js\\n       **/\\n\\n      this.push = function (nalUnit) {\\n        trackDecodeInfo.collectDtsInfo(track, nalUnit); // record the track config\\n\\n        if (nalUnit.nalUnitType === 'seq_parameter_set_rbsp' && !config) {\\n          config = nalUnit.config;\\n          track.sps = [nalUnit.data];\\n          VIDEO_PROPERTIES.forEach(function (prop) {\\n            track[prop] = config[prop];\\n          }, this);\\n        }\\n\\n        if (nalUnit.nalUnitType === 'pic_parameter_set_rbsp' && !pps) {\\n          pps = nalUnit.data;\\n          track.pps = [nalUnit.data];\\n        } // buffer video until flush() is called\\n\\n\\n        nalUnits.push(nalUnit);\\n      };\\n      /**\\n        * Pass constructed ISO BMFF track and boxes on to the\\n        * next stream in the pipeline\\n       **/\\n\\n\\n      this.flush = function () {\\n        var frames,\\n            gopForFusion,\\n            gops,\\n            moof,\\n            mdat,\\n            boxes,\\n            prependedContentDuration = 0,\\n            firstGop,\\n            lastGop; // Throw away nalUnits at the start of the byte stream until\\n        // we find the first AUD\\n\\n        while (nalUnits.length) {\\n          if (nalUnits[0].nalUnitType === 'access_unit_delimiter_rbsp') {\\n            break;\\n          }\\n\\n          nalUnits.shift();\\n        } // Return early if no video data has been observed\\n\\n\\n        if (nalUnits.length === 0) {\\n          this.resetStream_();\\n          this.trigger('done', 'VideoSegmentStream');\\n          return;\\n        } // Organize the raw nal-units into arrays that represent\\n        // higher-level constructs such as frames and gops\\n        // (group-of-pictures)\\n\\n\\n        frames = frameUtils.groupNalsIntoFrames(nalUnits);\\n        gops = frameUtils.groupFramesIntoGops(frames); // If the first frame of this fragment is not a keyframe we have\\n        // a problem since MSE (on Chrome) requires a leading keyframe.\\n        //\\n        // We have two approaches to repairing this situation:\\n        // 1) GOP-FUSION:\\n        //    This is where we keep track of the GOPS (group-of-pictures)\\n        //    from previous fragments and attempt to find one that we can\\n        //    prepend to the current fragment in order to create a valid\\n        //    fragment.\\n        // 2) KEYFRAME-PULLING:\\n        //    Here we search for the first keyframe in the fragment and\\n        //    throw away all the frames between the start of the fragment\\n        //    and that keyframe. We then extend the duration and pull the\\n        //    PTS of the keyframe forward so that it covers the time range\\n        //    of the frames that were disposed of.\\n        //\\n        // #1 is far prefereable over #2 which can cause \\\"stuttering\\\" but\\n        // requires more things to be just right.\\n\\n        if (!gops[0][0].keyFrame) {\\n          // Search for a gop for fusion from our gopCache\\n          gopForFusion = this.getGopForFusion_(nalUnits[0], track);\\n\\n          if (gopForFusion) {\\n            // in order to provide more accurate timing information about the segment, save\\n            // the number of seconds prepended to the original segment due to GOP fusion\\n            prependedContentDuration = gopForFusion.duration;\\n            gops.unshift(gopForFusion); // Adjust Gops' metadata to account for the inclusion of the\\n            // new gop at the beginning\\n\\n            gops.byteLength += gopForFusion.byteLength;\\n            gops.nalCount += gopForFusion.nalCount;\\n            gops.pts = gopForFusion.pts;\\n            gops.dts = gopForFusion.dts;\\n            gops.duration += gopForFusion.duration;\\n          } else {\\n            // If we didn't find a candidate gop fall back to keyframe-pulling\\n            gops = frameUtils.extendFirstKeyFrame(gops);\\n          }\\n        } // Trim gops to align with gopsToAlignWith\\n\\n\\n        if (gopsToAlignWith.length) {\\n          var alignedGops;\\n\\n          if (options.alignGopsAtEnd) {\\n            alignedGops = this.alignGopsAtEnd_(gops);\\n          } else {\\n            alignedGops = this.alignGopsAtStart_(gops);\\n          }\\n\\n          if (!alignedGops) {\\n            // save all the nals in the last GOP into the gop cache\\n            this.gopCache_.unshift({\\n              gop: gops.pop(),\\n              pps: track.pps,\\n              sps: track.sps\\n            }); // Keep a maximum of 6 GOPs in the cache\\n\\n            this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\\n\\n            nalUnits = []; // return early no gops can be aligned with desired gopsToAlignWith\\n\\n            this.resetStream_();\\n            this.trigger('done', 'VideoSegmentStream');\\n            return;\\n          } // Some gops were trimmed. clear dts info so minSegmentDts and pts are correct\\n          // when recalculated before sending off to CoalesceStream\\n\\n\\n          trackDecodeInfo.clearDtsInfo(track);\\n          gops = alignedGops;\\n        }\\n\\n        trackDecodeInfo.collectDtsInfo(track, gops); // First, we have to build the index from byte locations to\\n        // samples (that is, frames) in the video data\\n\\n        track.samples = frameUtils.generateSampleTable(gops); // Concatenate the video data and construct the mdat\\n\\n        mdat = mp4Generator.mdat(frameUtils.concatenateNalData(gops));\\n        track.baseMediaDecodeTime = trackDecodeInfo.calculateTrackBaseMediaDecodeTime(track, options.keepOriginalTimestamps);\\n        this.trigger('processedGopsInfo', gops.map(function (gop) {\\n          return {\\n            pts: gop.pts,\\n            dts: gop.dts,\\n            byteLength: gop.byteLength\\n          };\\n        }));\\n        firstGop = gops[0];\\n        lastGop = gops[gops.length - 1];\\n        this.trigger('segmentTimingInfo', generateVideoSegmentTimingInfo(track.baseMediaDecodeTime, firstGop.dts, firstGop.pts, lastGop.dts + lastGop.duration, lastGop.pts + lastGop.duration, prependedContentDuration));\\n        this.trigger('timingInfo', {\\n          start: gops[0].pts,\\n          end: gops[gops.length - 1].pts + gops[gops.length - 1].duration\\n        }); // save all the nals in the last GOP into the gop cache\\n\\n        this.gopCache_.unshift({\\n          gop: gops.pop(),\\n          pps: track.pps,\\n          sps: track.sps\\n        }); // Keep a maximum of 6 GOPs in the cache\\n\\n        this.gopCache_.length = Math.min(6, this.gopCache_.length); // Clear nalUnits\\n\\n        nalUnits = [];\\n        this.trigger('baseMediaDecodeTime', track.baseMediaDecodeTime);\\n        this.trigger('timelineStartInfo', track.timelineStartInfo);\\n        moof = mp4Generator.moof(sequenceNumber, [track]); // it would be great to allocate this array up front instead of\\n        // throwing away hundreds of media segment fragments\\n\\n        boxes = new Uint8Array(moof.byteLength + mdat.byteLength); // Bump the sequence number for next time\\n\\n        sequenceNumber++;\\n        boxes.set(moof);\\n        boxes.set(mdat, moof.byteLength);\\n        this.trigger('data', {\\n          track: track,\\n          boxes: boxes\\n        });\\n        this.resetStream_(); // Continue with the flush process now\\n\\n        this.trigger('done', 'VideoSegmentStream');\\n      };\\n\\n      this.reset = function () {\\n        this.resetStream_();\\n        nalUnits = [];\\n        this.gopCache_.length = 0;\\n        gopsToAlignWith.length = 0;\\n        this.trigger('reset');\\n      };\\n\\n      this.resetStream_ = function () {\\n        trackDecodeInfo.clearDtsInfo(track); // reset config and pps because they may differ across segments\\n        // for instance, when we are rendition switching\\n\\n        config = undefined;\\n        pps = undefined;\\n      }; // Search for a candidate Gop for gop-fusion from the gop cache and\\n      // return it or return null if no good candidate was found\\n\\n\\n      this.getGopForFusion_ = function (nalUnit) {\\n        var halfSecond = 45000,\\n            // Half-a-second in a 90khz clock\\n        allowableOverlap = 10000,\\n            // About 3 frames @ 30fps\\n        nearestDistance = Infinity,\\n            dtsDistance,\\n            nearestGopObj,\\n            currentGop,\\n            currentGopObj,\\n            i; // Search for the GOP nearest to the beginning of this nal unit\\n\\n        for (i = 0; i < this.gopCache_.length; i++) {\\n          currentGopObj = this.gopCache_[i];\\n          currentGop = currentGopObj.gop; // Reject Gops with different SPS or PPS\\n\\n          if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) || !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\\n            continue;\\n          } // Reject Gops that would require a negative baseMediaDecodeTime\\n\\n\\n          if (currentGop.dts < track.timelineStartInfo.dts) {\\n            continue;\\n          } // The distance between the end of the gop and the start of the nalUnit\\n\\n\\n          dtsDistance = nalUnit.dts - currentGop.dts - currentGop.duration; // Only consider GOPS that start before the nal unit and end within\\n          // a half-second of the nal unit\\n\\n          if (dtsDistance >= -allowableOverlap && dtsDistance <= halfSecond) {\\n            // Always use the closest GOP we found if there is more than\\n            // one candidate\\n            if (!nearestGopObj || nearestDistance > dtsDistance) {\\n              nearestGopObj = currentGopObj;\\n              nearestDistance = dtsDistance;\\n            }\\n          }\\n        }\\n\\n        if (nearestGopObj) {\\n          return nearestGopObj.gop;\\n        }\\n\\n        return null;\\n      }; // trim gop list to the first gop found that has a matching pts with a gop in the list\\n      // of gopsToAlignWith starting from the START of the list\\n\\n\\n      this.alignGopsAtStart_ = function (gops) {\\n        var alignIndex, gopIndex, align, gop, byteLength, nalCount, duration, alignedGops;\\n        byteLength = gops.byteLength;\\n        nalCount = gops.nalCount;\\n        duration = gops.duration;\\n        alignIndex = gopIndex = 0;\\n\\n        while (alignIndex < gopsToAlignWith.length && gopIndex < gops.length) {\\n          align = gopsToAlignWith[alignIndex];\\n          gop = gops[gopIndex];\\n\\n          if (align.pts === gop.pts) {\\n            break;\\n          }\\n\\n          if (gop.pts > align.pts) {\\n            // this current gop starts after the current gop we want to align on, so increment\\n            // align index\\n            alignIndex++;\\n            continue;\\n          } // current gop starts before the current gop we want to align on. so increment gop\\n          // index\\n\\n\\n          gopIndex++;\\n          byteLength -= gop.byteLength;\\n          nalCount -= gop.nalCount;\\n          duration -= gop.duration;\\n        }\\n\\n        if (gopIndex === 0) {\\n          // no gops to trim\\n          return gops;\\n        }\\n\\n        if (gopIndex === gops.length) {\\n          // all gops trimmed, skip appending all gops\\n          return null;\\n        }\\n\\n        alignedGops = gops.slice(gopIndex);\\n        alignedGops.byteLength = byteLength;\\n        alignedGops.duration = duration;\\n        alignedGops.nalCount = nalCount;\\n        alignedGops.pts = alignedGops[0].pts;\\n        alignedGops.dts = alignedGops[0].dts;\\n        return alignedGops;\\n      }; // trim gop list to the first gop found that has a matching pts with a gop in the list\\n      // of gopsToAlignWith starting from the END of the list\\n\\n\\n      this.alignGopsAtEnd_ = function (gops) {\\n        var alignIndex, gopIndex, align, gop, alignEndIndex, matchFound;\\n        alignIndex = gopsToAlignWith.length - 1;\\n        gopIndex = gops.length - 1;\\n        alignEndIndex = null;\\n        matchFound = false;\\n\\n        while (alignIndex >= 0 && gopIndex >= 0) {\\n          align = gopsToAlignWith[alignIndex];\\n          gop = gops[gopIndex];\\n\\n          if (align.pts === gop.pts) {\\n            matchFound = true;\\n            break;\\n          }\\n\\n          if (align.pts > gop.pts) {\\n            alignIndex--;\\n            continue;\\n          }\\n\\n          if (alignIndex === gopsToAlignWith.length - 1) {\\n            // gop.pts is greater than the last alignment candidate. If no match is found\\n            // by the end of this loop, we still want to append gops that come after this\\n            // point\\n            alignEndIndex = gopIndex;\\n          }\\n\\n          gopIndex--;\\n        }\\n\\n        if (!matchFound && alignEndIndex === null) {\\n          return null;\\n        }\\n\\n        var trimIndex;\\n\\n        if (matchFound) {\\n          trimIndex = gopIndex;\\n        } else {\\n          trimIndex = alignEndIndex;\\n        }\\n\\n        if (trimIndex === 0) {\\n          return gops;\\n        }\\n\\n        var alignedGops = gops.slice(trimIndex);\\n        var metadata = alignedGops.reduce(function (total, gop) {\\n          total.byteLength += gop.byteLength;\\n          total.duration += gop.duration;\\n          total.nalCount += gop.nalCount;\\n          return total;\\n        }, {\\n          byteLength: 0,\\n          duration: 0,\\n          nalCount: 0\\n        });\\n        alignedGops.byteLength = metadata.byteLength;\\n        alignedGops.duration = metadata.duration;\\n        alignedGops.nalCount = metadata.nalCount;\\n        alignedGops.pts = alignedGops[0].pts;\\n        alignedGops.dts = alignedGops[0].dts;\\n        return alignedGops;\\n      };\\n\\n      this.alignGopsWith = function (newGopsToAlignWith) {\\n        gopsToAlignWith = newGopsToAlignWith;\\n      };\\n    };\\n\\n    _VideoSegmentStream.prototype = new stream();\\n    /**\\n     * A Stream that can combine multiple streams (ie. audio & video)\\n     * into a single output segment for MSE. Also supports audio-only\\n     * and video-only streams.\\n     * @param options {object} transmuxer options object\\n     * @param options.keepOriginalTimestamps {boolean} If true, keep the timestamps\\n     *        in the source; false to adjust the first segment to start at media timeline start.\\n     */\\n\\n    _CoalesceStream = function CoalesceStream(options, metadataStream) {\\n      // Number of Tracks per output segment\\n      // If greater than 1, we combine multiple\\n      // tracks into a single segment\\n      this.numberOfTracks = 0;\\n      this.metadataStream = metadataStream;\\n      options = options || {};\\n\\n      if (typeof options.remux !== 'undefined') {\\n        this.remuxTracks = !!options.remux;\\n      } else {\\n        this.remuxTracks = true;\\n      }\\n\\n      if (typeof options.keepOriginalTimestamps === 'boolean') {\\n        this.keepOriginalTimestamps = options.keepOriginalTimestamps;\\n      } else {\\n        this.keepOriginalTimestamps = false;\\n      }\\n\\n      this.pendingTracks = [];\\n      this.videoTrack = null;\\n      this.pendingBoxes = [];\\n      this.pendingCaptions = [];\\n      this.pendingMetadata = [];\\n      this.pendingBytes = 0;\\n      this.emittedTracks = 0;\\n\\n      _CoalesceStream.prototype.init.call(this); // Take output from multiple\\n\\n\\n      this.push = function (output) {\\n        // buffer incoming captions until the associated video segment\\n        // finishes\\n        if (output.text) {\\n          return this.pendingCaptions.push(output);\\n        } // buffer incoming id3 tags until the final flush\\n\\n\\n        if (output.frames) {\\n          return this.pendingMetadata.push(output);\\n        } // Add this track to the list of pending tracks and store\\n        // important information required for the construction of\\n        // the final segment\\n\\n\\n        this.pendingTracks.push(output.track);\\n        this.pendingBytes += output.boxes.byteLength; // TODO: is there an issue for this against chrome?\\n        // We unshift audio and push video because\\n        // as of Chrome 75 when switching from\\n        // one init segment to another if the video\\n        // mdat does not appear after the audio mdat\\n        // only audio will play for the duration of our transmux.\\n\\n        if (output.track.type === 'video') {\\n          this.videoTrack = output.track;\\n          this.pendingBoxes.push(output.boxes);\\n        }\\n\\n        if (output.track.type === 'audio') {\\n          this.audioTrack = output.track;\\n          this.pendingBoxes.unshift(output.boxes);\\n        }\\n      };\\n    };\\n\\n    _CoalesceStream.prototype = new stream();\\n\\n    _CoalesceStream.prototype.flush = function (flushSource) {\\n      var offset = 0,\\n          event = {\\n        captions: [],\\n        captionStreams: {},\\n        metadata: [],\\n        info: {}\\n      },\\n          caption,\\n          id3,\\n          initSegment,\\n          timelineStartPts = 0,\\n          i;\\n\\n      if (this.pendingTracks.length < this.numberOfTracks) {\\n        if (flushSource !== 'VideoSegmentStream' && flushSource !== 'AudioSegmentStream') {\\n          // Return because we haven't received a flush from a data-generating\\n          // portion of the segment (meaning that we have only recieved meta-data\\n          // or captions.)\\n          return;\\n        } else if (this.remuxTracks) {\\n          // Return until we have enough tracks from the pipeline to remux (if we\\n          // are remuxing audio and video into a single MP4)\\n          return;\\n        } else if (this.pendingTracks.length === 0) {\\n          // In the case where we receive a flush without any data having been\\n          // received we consider it an emitted track for the purposes of coalescing\\n          // `done` events.\\n          // We do this for the case where there is an audio and video track in the\\n          // segment but no audio data. (seen in several playlists with alternate\\n          // audio tracks and no audio present in the main TS segments.)\\n          this.emittedTracks++;\\n\\n          if (this.emittedTracks >= this.numberOfTracks) {\\n            this.trigger('done');\\n            this.emittedTracks = 0;\\n          }\\n\\n          return;\\n        }\\n      }\\n\\n      if (this.videoTrack) {\\n        timelineStartPts = this.videoTrack.timelineStartInfo.pts;\\n        VIDEO_PROPERTIES.forEach(function (prop) {\\n          event.info[prop] = this.videoTrack[prop];\\n        }, this);\\n      } else if (this.audioTrack) {\\n        timelineStartPts = this.audioTrack.timelineStartInfo.pts;\\n        AUDIO_PROPERTIES.forEach(function (prop) {\\n          event.info[prop] = this.audioTrack[prop];\\n        }, this);\\n      }\\n\\n      if (this.videoTrack || this.audioTrack) {\\n        if (this.pendingTracks.length === 1) {\\n          event.type = this.pendingTracks[0].type;\\n        } else {\\n          event.type = 'combined';\\n        }\\n\\n        this.emittedTracks += this.pendingTracks.length;\\n        initSegment = mp4Generator.initSegment(this.pendingTracks); // Create a new typed array to hold the init segment\\n\\n        event.initSegment = new Uint8Array(initSegment.byteLength); // Create an init segment containing a moov\\n        // and track definitions\\n\\n        event.initSegment.set(initSegment); // Create a new typed array to hold the moof+mdats\\n\\n        event.data = new Uint8Array(this.pendingBytes); // Append each moof+mdat (one per track) together\\n\\n        for (i = 0; i < this.pendingBoxes.length; i++) {\\n          event.data.set(this.pendingBoxes[i], offset);\\n          offset += this.pendingBoxes[i].byteLength;\\n        } // Translate caption PTS times into second offsets to match the\\n        // video timeline for the segment, and add track info\\n\\n\\n        for (i = 0; i < this.pendingCaptions.length; i++) {\\n          caption = this.pendingCaptions[i];\\n          caption.startTime = clock.metadataTsToSeconds(caption.startPts, timelineStartPts, this.keepOriginalTimestamps);\\n          caption.endTime = clock.metadataTsToSeconds(caption.endPts, timelineStartPts, this.keepOriginalTimestamps);\\n          event.captionStreams[caption.stream] = true;\\n          event.captions.push(caption);\\n        } // Translate ID3 frame PTS times into second offsets to match the\\n        // video timeline for the segment\\n\\n\\n        for (i = 0; i < this.pendingMetadata.length; i++) {\\n          id3 = this.pendingMetadata[i];\\n          id3.cueTime = clock.metadataTsToSeconds(id3.pts, timelineStartPts, this.keepOriginalTimestamps);\\n          event.metadata.push(id3);\\n        } // We add this to every single emitted segment even though we only need\\n        // it for the first\\n\\n\\n        event.metadata.dispatchType = this.metadataStream.dispatchType; // Reset stream state\\n\\n        this.pendingTracks.length = 0;\\n        this.videoTrack = null;\\n        this.pendingBoxes.length = 0;\\n        this.pendingCaptions.length = 0;\\n        this.pendingBytes = 0;\\n        this.pendingMetadata.length = 0; // Emit the built segment\\n        // We include captions and ID3 tags for backwards compatibility,\\n        // ideally we should send only video and audio in the data event\\n\\n        this.trigger('data', event); // Emit each caption to the outside world\\n        // Ideally, this would happen immediately on parsing captions,\\n        // but we need to ensure that video data is sent back first\\n        // so that caption timing can be adjusted to match video timing\\n\\n        for (i = 0; i < event.captions.length; i++) {\\n          caption = event.captions[i];\\n          this.trigger('caption', caption);\\n        } // Emit each id3 tag to the outside world\\n        // Ideally, this would happen immediately on parsing the tag,\\n        // but we need to ensure that video data is sent back first\\n        // so that ID3 frame timing can be adjusted to match video timing\\n\\n\\n        for (i = 0; i < event.metadata.length; i++) {\\n          id3 = event.metadata[i];\\n          this.trigger('id3Frame', id3);\\n        }\\n      } // Only emit `done` if all tracks have been flushed and emitted\\n\\n\\n      if (this.emittedTracks >= this.numberOfTracks) {\\n        this.trigger('done');\\n        this.emittedTracks = 0;\\n      }\\n    };\\n\\n    _CoalesceStream.prototype.setRemux = function (val) {\\n      this.remuxTracks = val;\\n    };\\n    /**\\n     * A Stream that expects MP2T binary data as input and produces\\n     * corresponding media segments, suitable for use with Media Source\\n     * Extension (MSE) implementations that support the ISO BMFF byte\\n     * stream format, like Chrome.\\n     */\\n\\n\\n    _Transmuxer = function Transmuxer(options) {\\n      var self = this,\\n          hasFlushed = true,\\n          videoTrack,\\n          audioTrack;\\n\\n      _Transmuxer.prototype.init.call(this);\\n\\n      options = options || {};\\n      this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\\n      this.transmuxPipeline_ = {};\\n\\n      this.setupAacPipeline = function () {\\n        var pipeline = {};\\n        this.transmuxPipeline_ = pipeline;\\n        pipeline.type = 'aac';\\n        pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\\n\\n        pipeline.aacStream = new aac();\\n        pipeline.audioTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('audio');\\n        pipeline.timedMetadataTimestampRolloverStream = new m2ts_1.TimestampRolloverStream('timed-metadata');\\n        pipeline.adtsStream = new adts();\\n        pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\\n        pipeline.headOfPipeline = pipeline.aacStream;\\n        pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream);\\n        pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream);\\n        pipeline.metadataStream.on('timestamp', function (frame) {\\n          pipeline.aacStream.setTimestamp(frame.timeStamp);\\n        });\\n        pipeline.aacStream.on('data', function (data) {\\n          if (data.type === 'timed-metadata' && !pipeline.audioSegmentStream) {\\n            audioTrack = audioTrack || {\\n              timelineStartInfo: {\\n                baseMediaDecodeTime: self.baseMediaDecodeTime\\n              },\\n              codec: 'adts',\\n              type: 'audio'\\n            }; // hook up the audio segment stream to the first track with aac data\\n\\n            pipeline.coalesceStream.numberOfTracks++;\\n            pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\\n            pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\\n\\n            pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\\n          } // emit pmt info\\n\\n\\n          self.trigger('trackinfo', {\\n            hasAudio: !!audioTrack,\\n            hasVideo: !!videoTrack\\n          });\\n        }); // Re-emit any data coming from the coalesce stream to the outside world\\n\\n        pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data')); // Let the consumer know we have finished flushing the entire pipeline\\n\\n        pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\\n      };\\n\\n      this.setupTsPipeline = function () {\\n        var pipeline = {};\\n        this.transmuxPipeline_ = pipeline;\\n        pipeline.type = 'ts';\\n        pipeline.metadataStream = new m2ts_1.MetadataStream(); // set up the parsing pipeline\\n\\n        pipeline.packetStream = new m2ts_1.TransportPacketStream();\\n        pipeline.parseStream = new m2ts_1.TransportParseStream();\\n        pipeline.elementaryStream = new m2ts_1.ElementaryStream();\\n        pipeline.timestampRolloverStream = new m2ts_1.TimestampRolloverStream();\\n        pipeline.adtsStream = new adts();\\n        pipeline.h264Stream = new H264Stream();\\n        pipeline.captionStream = new m2ts_1.CaptionStream();\\n        pipeline.coalesceStream = new _CoalesceStream(options, pipeline.metadataStream);\\n        pipeline.headOfPipeline = pipeline.packetStream; // disassemble MPEG2-TS packets into elementary streams\\n\\n        pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream); // !!THIS ORDER IS IMPORTANT!!\\n        // demux the streams\\n\\n        pipeline.timestampRolloverStream.pipe(pipeline.h264Stream);\\n        pipeline.timestampRolloverStream.pipe(pipeline.adtsStream);\\n        pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream); // Hook up CEA-608/708 caption stream\\n\\n        pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream);\\n        pipeline.elementaryStream.on('data', function (data) {\\n          var i;\\n\\n          if (data.type === 'metadata') {\\n            i = data.tracks.length; // scan the tracks listed in the metadata\\n\\n            while (i--) {\\n              if (!videoTrack && data.tracks[i].type === 'video') {\\n                videoTrack = data.tracks[i];\\n                videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\\n              } else if (!audioTrack && data.tracks[i].type === 'audio') {\\n                audioTrack = data.tracks[i];\\n                audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\\n              }\\n            } // hook up the video segment stream to the first track with h264 data\\n\\n\\n            if (videoTrack && !pipeline.videoSegmentStream) {\\n              pipeline.coalesceStream.numberOfTracks++;\\n              pipeline.videoSegmentStream = new _VideoSegmentStream(videoTrack, options);\\n              pipeline.videoSegmentStream.on('timelineStartInfo', function (timelineStartInfo) {\\n                // When video emits timelineStartInfo data after a flush, we forward that\\n                // info to the AudioSegmentStream, if it exists, because video timeline\\n                // data takes precedence.\\n                if (audioTrack) {\\n                  audioTrack.timelineStartInfo = timelineStartInfo; // On the first segment we trim AAC frames that exist before the\\n                  // very earliest DTS we have seen in video because Chrome will\\n                  // interpret any video track with a baseMediaDecodeTime that is\\n                  // non-zero as a gap.\\n\\n                  pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts);\\n                }\\n              });\\n              pipeline.videoSegmentStream.on('processedGopsInfo', self.trigger.bind(self, 'gopInfo'));\\n              pipeline.videoSegmentStream.on('segmentTimingInfo', self.trigger.bind(self, 'videoSegmentTimingInfo'));\\n              pipeline.videoSegmentStream.on('baseMediaDecodeTime', function (baseMediaDecodeTime) {\\n                if (audioTrack) {\\n                  pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime);\\n                }\\n              });\\n              pipeline.videoSegmentStream.on('timingInfo', self.trigger.bind(self, 'videoTimingInfo')); // Set up the final part of the video pipeline\\n\\n              pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream);\\n            }\\n\\n            if (audioTrack && !pipeline.audioSegmentStream) {\\n              // hook up the audio segment stream to the first track with aac data\\n              pipeline.coalesceStream.numberOfTracks++;\\n              pipeline.audioSegmentStream = new _AudioSegmentStream(audioTrack, options);\\n              pipeline.audioSegmentStream.on('timingInfo', self.trigger.bind(self, 'audioTimingInfo')); // Set up the final part of the audio pipeline\\n\\n              pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream);\\n            } // emit pmt info\\n\\n\\n            self.trigger('trackinfo', {\\n              hasAudio: !!audioTrack,\\n              hasVideo: !!videoTrack\\n            });\\n          }\\n        }); // Re-emit any data coming from the coalesce stream to the outside world\\n\\n        pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\\n        pipeline.coalesceStream.on('id3Frame', function (id3Frame) {\\n          id3Frame.dispatchType = pipeline.metadataStream.dispatchType;\\n          self.trigger('id3Frame', id3Frame);\\n        });\\n        pipeline.coalesceStream.on('caption', this.trigger.bind(this, 'caption')); // Let the consumer know we have finished flushing the entire pipeline\\n\\n        pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\\n      }; // hook up the segment streams once track metadata is delivered\\n\\n\\n      this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\\n        var pipeline = this.transmuxPipeline_;\\n\\n        if (!options.keepOriginalTimestamps) {\\n          this.baseMediaDecodeTime = baseMediaDecodeTime;\\n        }\\n\\n        if (audioTrack) {\\n          audioTrack.timelineStartInfo.dts = undefined;\\n          audioTrack.timelineStartInfo.pts = undefined;\\n          trackDecodeInfo.clearDtsInfo(audioTrack);\\n\\n          if (!options.keepOriginalTimestamps) {\\n            audioTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\\n          }\\n\\n          if (pipeline.audioTimestampRolloverStream) {\\n            pipeline.audioTimestampRolloverStream.discontinuity();\\n          }\\n        }\\n\\n        if (videoTrack) {\\n          if (pipeline.videoSegmentStream) {\\n            pipeline.videoSegmentStream.gopCache_ = [];\\n          }\\n\\n          videoTrack.timelineStartInfo.dts = undefined;\\n          videoTrack.timelineStartInfo.pts = undefined;\\n          trackDecodeInfo.clearDtsInfo(videoTrack);\\n          pipeline.captionStream.reset();\\n\\n          if (!options.keepOriginalTimestamps) {\\n            videoTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\\n          }\\n        }\\n\\n        if (pipeline.timestampRolloverStream) {\\n          pipeline.timestampRolloverStream.discontinuity();\\n        }\\n      };\\n\\n      this.setAudioAppendStart = function (timestamp) {\\n        if (audioTrack) {\\n          this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp);\\n        }\\n      };\\n\\n      this.setRemux = function (val) {\\n        var pipeline = this.transmuxPipeline_;\\n        options.remux = val;\\n\\n        if (pipeline && pipeline.coalesceStream) {\\n          pipeline.coalesceStream.setRemux(val);\\n        }\\n      };\\n\\n      this.alignGopsWith = function (gopsToAlignWith) {\\n        if (videoTrack && this.transmuxPipeline_.videoSegmentStream) {\\n          this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith);\\n        }\\n      }; // feed incoming data to the front of the parsing pipeline\\n\\n\\n      this.push = function (data) {\\n        if (hasFlushed) {\\n          var isAac = isLikelyAacData$1(data);\\n\\n          if (isAac && this.transmuxPipeline_.type !== 'aac') {\\n            this.setupAacPipeline();\\n          } else if (!isAac && this.transmuxPipeline_.type !== 'ts') {\\n            this.setupTsPipeline();\\n          }\\n\\n          hasFlushed = false;\\n        }\\n\\n        this.transmuxPipeline_.headOfPipeline.push(data);\\n      }; // flush any buffered data\\n\\n\\n      this.flush = function () {\\n        hasFlushed = true; // Start at the top of the pipeline and flush all pending work\\n\\n        this.transmuxPipeline_.headOfPipeline.flush();\\n      };\\n\\n      this.endTimeline = function () {\\n        this.transmuxPipeline_.headOfPipeline.endTimeline();\\n      };\\n\\n      this.reset = function () {\\n        if (this.transmuxPipeline_.headOfPipeline) {\\n          this.transmuxPipeline_.headOfPipeline.reset();\\n        }\\n      }; // Caption data has to be reset when seeking outside buffered range\\n\\n\\n      this.resetCaptions = function () {\\n        if (this.transmuxPipeline_.captionStream) {\\n          this.transmuxPipeline_.captionStream.reset();\\n        }\\n      };\\n    };\\n\\n    _Transmuxer.prototype = new stream();\\n    var transmuxer = {\\n      Transmuxer: _Transmuxer,\\n      VideoSegmentStream: _VideoSegmentStream,\\n      AudioSegmentStream: _AudioSegmentStream,\\n      AUDIO_PROPERTIES: AUDIO_PROPERTIES,\\n      VIDEO_PROPERTIES: VIDEO_PROPERTIES,\\n      // exported for testing\\n      generateVideoSegmentTimingInfo: generateVideoSegmentTimingInfo\\n    };\\n\\n    var classCallCheck = function classCallCheck(instance, Constructor) {\\n      if (!(instance instanceof Constructor)) {\\n        throw new TypeError(\\\"Cannot call a class as a function\\\");\\n      }\\n    };\\n\\n    var createClass = function () {\\n      function defineProperties(target, props) {\\n        for (var i = 0; i < props.length; i++) {\\n          var descriptor = props[i];\\n          descriptor.enumerable = descriptor.enumerable || false;\\n          descriptor.configurable = true;\\n          if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n          Object.defineProperty(target, descriptor.key, descriptor);\\n        }\\n      }\\n\\n      return function (Constructor, protoProps, staticProps) {\\n        if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n        if (staticProps) defineProperties(Constructor, staticProps);\\n        return Constructor;\\n      };\\n    }();\\n    /**\\n     * @file transmuxer-worker.js\\n     */\\n\\n    /**\\n     * Re-emits transmuxer events by converting them into messages to the\\n     * world outside the worker.\\n     *\\n     * @param {Object} transmuxer the transmuxer to wire events on\\n     * @private\\n     */\\n\\n\\n    var wireTransmuxerEvents = function wireTransmuxerEvents(self, transmuxer$$1) {\\n      transmuxer$$1.on('data', function (segment) {\\n        // transfer ownership of the underlying ArrayBuffer\\n        // instead of doing a copy to save memory\\n        // ArrayBuffers are transferable but generic TypedArrays are not\\n        // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\\n        var initArray = segment.initSegment;\\n        segment.initSegment = {\\n          data: initArray.buffer,\\n          byteOffset: initArray.byteOffset,\\n          byteLength: initArray.byteLength\\n        };\\n        var typedArray = segment.data;\\n        segment.data = typedArray.buffer;\\n        self.postMessage({\\n          action: 'data',\\n          segment: segment,\\n          byteOffset: typedArray.byteOffset,\\n          byteLength: typedArray.byteLength\\n        }, [segment.data]);\\n      });\\n\\n      if (transmuxer$$1.captionStream) {\\n        transmuxer$$1.captionStream.on('data', function (caption) {\\n          self.postMessage({\\n            action: 'caption',\\n            data: caption\\n          });\\n        });\\n      }\\n\\n      transmuxer$$1.on('done', function (data) {\\n        self.postMessage({\\n          action: 'done'\\n        });\\n      });\\n      transmuxer$$1.on('gopInfo', function (gopInfo) {\\n        self.postMessage({\\n          action: 'gopInfo',\\n          gopInfo: gopInfo\\n        });\\n      });\\n      transmuxer$$1.on('videoSegmentTimingInfo', function (videoSegmentTimingInfo) {\\n        self.postMessage({\\n          action: 'videoSegmentTimingInfo',\\n          videoSegmentTimingInfo: videoSegmentTimingInfo\\n        });\\n      });\\n    };\\n    /**\\n     * All incoming messages route through this hash. If no function exists\\n     * to handle an incoming message, then we ignore the message.\\n     *\\n     * @class MessageHandlers\\n     * @param {Object} options the options to initialize with\\n     */\\n\\n\\n    var MessageHandlers = function () {\\n      function MessageHandlers(self, options) {\\n        classCallCheck(this, MessageHandlers);\\n        this.options = options || {};\\n        this.self = self;\\n        this.init();\\n      }\\n      /**\\n       * initialize our web worker and wire all the events.\\n       */\\n\\n\\n      createClass(MessageHandlers, [{\\n        key: 'init',\\n        value: function init() {\\n          if (this.transmuxer) {\\n            this.transmuxer.dispose();\\n          }\\n\\n          this.transmuxer = new transmuxer.Transmuxer(this.options);\\n          wireTransmuxerEvents(this.self, this.transmuxer);\\n        }\\n        /**\\n         * Adds data (a ts segment) to the start of the transmuxer pipeline for\\n         * processing.\\n         *\\n         * @param {ArrayBuffer} data data to push into the muxer\\n         */\\n\\n      }, {\\n        key: 'push',\\n        value: function push(data) {\\n          // Cast array buffer to correct type for transmuxer\\n          var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\\n          this.transmuxer.push(segment);\\n        }\\n        /**\\n         * Recreate the transmuxer so that the next segment added via `push`\\n         * start with a fresh transmuxer.\\n         */\\n\\n      }, {\\n        key: 'reset',\\n        value: function reset() {\\n          this.init();\\n        }\\n        /**\\n         * Set the value that will be used as the `baseMediaDecodeTime` time for the\\n         * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\\n         * set relative to the first based on the PTS values.\\n         *\\n         * @param {Object} data used to set the timestamp offset in the muxer\\n         */\\n\\n      }, {\\n        key: 'setTimestampOffset',\\n        value: function setTimestampOffset(data) {\\n          var timestampOffset = data.timestampOffset || 0;\\n          this.transmuxer.setBaseMediaDecodeTime(Math.round(timestampOffset * 90000));\\n        }\\n      }, {\\n        key: 'setAudioAppendStart',\\n        value: function setAudioAppendStart(data) {\\n          this.transmuxer.setAudioAppendStart(Math.ceil(data.appendStart * 90000));\\n        }\\n        /**\\n         * Forces the pipeline to finish processing the last segment and emit it's\\n         * results.\\n         *\\n         * @param {Object} data event data, not really used\\n         */\\n\\n      }, {\\n        key: 'flush',\\n        value: function flush(data) {\\n          this.transmuxer.flush();\\n        }\\n      }, {\\n        key: 'resetCaptions',\\n        value: function resetCaptions() {\\n          this.transmuxer.resetCaptions();\\n        }\\n      }, {\\n        key: 'alignGopsWith',\\n        value: function alignGopsWith(data) {\\n          this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice());\\n        }\\n      }]);\\n      return MessageHandlers;\\n    }();\\n    /**\\n     * Our web wroker interface so that things can talk to mux.js\\n     * that will be running in a web worker. the scope is passed to this by\\n     * webworkify.\\n     *\\n     * @param {Object} self the scope for the web worker\\n     */\\n\\n\\n    var TransmuxerWorker = function TransmuxerWorker(self) {\\n      self.onmessage = function (event) {\\n        if (event.data.action === 'init' && event.data.options) {\\n          this.messageHandlers = new MessageHandlers(self, event.data.options);\\n          return;\\n        }\\n\\n        if (!this.messageHandlers) {\\n          this.messageHandlers = new MessageHandlers(self);\\n        }\\n\\n        if (event.data && event.data.action && event.data.action !== 'init') {\\n          if (this.messageHandlers[event.data.action]) {\\n            this.messageHandlers[event.data.action](event.data);\\n          }\\n        }\\n      };\\n    };\\n\\n    var transmuxerWorker = new TransmuxerWorker(self);\\n    return transmuxerWorker;\\n  }();\\n});\\n/**\\n * @file - codecs.js - Handles tasks regarding codec strings such as translating them to\\n * codec strings, or translating codec strings into objects that can be examined.\\n */\\n// Default codec parameters if none were provided for video and/or audio\\n\\nvar defaultCodecs = {\\n  videoCodec: 'avc1',\\n  videoObjectTypeIndicator: '.4d400d',\\n  // AAC-LC\\n  audioProfile: '2'\\n};\\n/**\\n * Replace the old apple-style `avc1.<dd>.<dd>` codec string with the standard\\n * `avc1.<hhhhhh>`\\n *\\n * @param {Array} codecs an array of codec strings to fix\\n * @return {Array} the translated codec array\\n * @private\\n */\\n\\nvar translateLegacyCodecs = function translateLegacyCodecs(codecs) {\\n  return codecs.map(function (codec) {\\n    return codec.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i, function (orig, profile, avcLevel) {\\n      var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\\n      var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\\n      return 'avc1.' + profileHex + '00' + avcLevelHex;\\n    });\\n  });\\n};\\n/**\\n * Parses a codec string to retrieve the number of codecs specified,\\n * the video codec and object type indicator, and the audio profile.\\n */\\n\\n\\nvar parseCodecs = function parseCodecs() {\\n  var codecs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\\n  var result = {\\n    codecCount: 0\\n  };\\n  var parsed = void 0;\\n  result.codecCount = codecs.split(',').length;\\n  result.codecCount = result.codecCount || 2; // parse the video codec\\n\\n  parsed = /(^|\\\\s|,)+(avc[13])([^ ,]*)/i.exec(codecs);\\n\\n  if (parsed) {\\n    result.videoCodec = parsed[2];\\n    result.videoObjectTypeIndicator = parsed[3];\\n  } // parse the last field of the audio codec\\n\\n\\n  result.audioProfile = /(^|\\\\s|,)+mp4a.[0-9A-Fa-f]+\\\\.([0-9A-Fa-f]+)/i.exec(codecs);\\n  result.audioProfile = result.audioProfile && result.audioProfile[2];\\n  return result;\\n};\\n/**\\n * Replace codecs in the codec string with the old apple-style `avc1.<dd>.<dd>` to the\\n * standard `avc1.<hhhhhh>`.\\n *\\n * @param codecString {String} the codec string\\n * @return {String} the codec string with old apple-style codecs replaced\\n *\\n * @private\\n */\\n\\n\\nvar mapLegacyAvcCodecs = function mapLegacyAvcCodecs(codecString) {\\n  return codecString.replace(/avc1\\\\.(\\\\d+)\\\\.(\\\\d+)/i, function (match) {\\n    return translateLegacyCodecs([match])[0];\\n  });\\n};\\n/**\\n * Build a media mime-type string from a set of parameters\\n * @param {String} type either 'audio' or 'video'\\n * @param {String} container either 'mp2t' or 'mp4'\\n * @param {Array} codecs an array of codec strings to add\\n * @return {String} a valid media mime-type\\n */\\n\\n\\nvar makeMimeTypeString = function makeMimeTypeString(type, container, codecs) {\\n  // The codecs array is filtered so that falsey values are\\n  // dropped and don't cause Array#join to create spurious\\n  // commas\\n  return type + '/' + container + '; codecs=\\\"' + codecs.filter(function (c) {\\n    return !!c;\\n  }).join(', ') + '\\\"';\\n};\\n/**\\n * Returns the type container based on information in the playlist\\n * @param {Playlist} media the current media playlist\\n * @return {String} a valid media container type\\n */\\n\\n\\nvar getContainerType = function getContainerType(media) {\\n  // An initialization segment means the media playlist is an iframe\\n  // playlist or is using the mp4 container. We don't currently\\n  // support iframe playlists, so assume this is signalling mp4\\n  // fragments.\\n  if (media.segments && media.segments.length && media.segments[0].map) {\\n    return 'mp4';\\n  }\\n\\n  return 'mp2t';\\n};\\n/**\\n * Returns a set of codec strings parsed from the playlist or the default\\n * codec strings if no codecs were specified in the playlist\\n * @param {Playlist} media the current media playlist\\n * @return {Object} an object with the video and audio codecs\\n */\\n\\n\\nvar getCodecs = function getCodecs(media) {\\n  // if the codecs were explicitly specified, use them instead of the\\n  // defaults\\n  var mediaAttributes = media.attributes || {};\\n\\n  if (mediaAttributes.CODECS) {\\n    return parseCodecs(mediaAttributes.CODECS);\\n  }\\n\\n  return defaultCodecs;\\n};\\n\\nvar audioProfileFromDefault = function audioProfileFromDefault(master, audioGroupId) {\\n  if (!master.mediaGroups.AUDIO || !audioGroupId) {\\n    return null;\\n  }\\n\\n  var audioGroup = master.mediaGroups.AUDIO[audioGroupId];\\n\\n  if (!audioGroup) {\\n    return null;\\n  }\\n\\n  for (var name in audioGroup) {\\n    var audioType = audioGroup[name];\\n\\n    if (audioType[\\\"default\\\"] && audioType.playlists) {\\n      // codec should be the same for all playlists within the audio type\\n      return parseCodecs(audioType.playlists[0].attributes.CODECS).audioProfile;\\n    }\\n  }\\n\\n  return null;\\n};\\n/**\\n * Calculates the MIME type strings for a working configuration of\\n * SourceBuffers to play variant streams in a master playlist. If\\n * there is no possible working configuration, an empty array will be\\n * returned.\\n *\\n * @param master {Object} the m3u8 object for the master playlist\\n * @param media {Object} the m3u8 object for the variant playlist\\n * @return {Array} the MIME type strings. If the array has more than\\n * one entry, the first element should be applied to the video\\n * SourceBuffer and the second to the audio SourceBuffer.\\n *\\n * @private\\n */\\n\\n\\nvar mimeTypesForPlaylist = function mimeTypesForPlaylist(master, media) {\\n  var containerType = getContainerType(media);\\n  var codecInfo = getCodecs(media);\\n  var mediaAttributes = media.attributes || {}; // Default condition for a traditional HLS (no demuxed audio/video)\\n\\n  var isMuxed = true;\\n  var isMaat = false;\\n\\n  if (!media) {\\n    // Not enough information\\n    return [];\\n  }\\n\\n  if (master.mediaGroups.AUDIO && mediaAttributes.AUDIO) {\\n    var audioGroup = master.mediaGroups.AUDIO[mediaAttributes.AUDIO]; // Handle the case where we are in a multiple-audio track scenario\\n\\n    if (audioGroup) {\\n      isMaat = true; // Start with the everything demuxed then...\\n\\n      isMuxed = false; // ...check to see if any audio group tracks are muxed (ie. lacking a uri)\\n\\n      for (var groupId in audioGroup) {\\n        // either a uri is present (if the case of HLS and an external playlist), or\\n        // playlists is present (in the case of DASH where we don't have external audio\\n        // playlists)\\n        if (!audioGroup[groupId].uri && !audioGroup[groupId].playlists) {\\n          isMuxed = true;\\n          break;\\n        }\\n      }\\n    }\\n  } // HLS with multiple-audio tracks must always get an audio codec.\\n  // Put another way, there is no way to have a video-only multiple-audio HLS!\\n\\n\\n  if (isMaat && !codecInfo.audioProfile) {\\n    if (!isMuxed) {\\n      // It is possible for codecs to be specified on the audio media group playlist but\\n      // not on the rendition playlist. This is mostly the case for DASH, where audio and\\n      // video are always separate (and separately specified).\\n      codecInfo.audioProfile = audioProfileFromDefault(master, mediaAttributes.AUDIO);\\n    }\\n\\n    if (!codecInfo.audioProfile) {\\n      videojs$1.log.warn('Multiple audio tracks present but no audio codec string is specified. ' + 'Attempting to use the default audio codec (mp4a.40.2)');\\n      codecInfo.audioProfile = defaultCodecs.audioProfile;\\n    }\\n  } // Generate the final codec strings from the codec object generated above\\n\\n\\n  var codecStrings = {};\\n\\n  if (codecInfo.videoCodec) {\\n    codecStrings.video = '' + codecInfo.videoCodec + codecInfo.videoObjectTypeIndicator;\\n  }\\n\\n  if (codecInfo.audioProfile) {\\n    codecStrings.audio = 'mp4a.40.' + codecInfo.audioProfile;\\n  } // Finally, make and return an array with proper mime-types depending on\\n  // the configuration\\n\\n\\n  var justAudio = makeMimeTypeString('audio', containerType, [codecStrings.audio]);\\n  var justVideo = makeMimeTypeString('video', containerType, [codecStrings.video]);\\n  var bothVideoAudio = makeMimeTypeString('video', containerType, [codecStrings.video, codecStrings.audio]);\\n\\n  if (isMaat) {\\n    if (!isMuxed && codecStrings.video) {\\n      return [justVideo, justAudio];\\n    }\\n\\n    if (!isMuxed && !codecStrings.video) {\\n      // There is no muxed content and no video codec string, so this is an audio only\\n      // stream with alternate audio.\\n      return [justAudio, justAudio];\\n    } // There exists the possiblity that this will return a `video/container`\\n    // mime-type for the first entry in the array even when there is only audio.\\n    // This doesn't appear to be a problem and simplifies the code.\\n\\n\\n    return [bothVideoAudio, justAudio];\\n  } // If there is no video codec at all, always just return a single\\n  // audio/<container> mime-type\\n\\n\\n  if (!codecStrings.video) {\\n    return [justAudio];\\n  } // When not using separate audio media groups, audio and video is\\n  // *always* muxed\\n\\n\\n  return [bothVideoAudio];\\n};\\n/**\\n * Parse a content type header into a type and parameters\\n * object\\n *\\n * @param {String} type the content type header\\n * @return {Object} the parsed content-type\\n * @private\\n */\\n\\n\\nvar parseContentType = function parseContentType(type) {\\n  var object = {\\n    type: '',\\n    parameters: {}\\n  };\\n  var parameters = type.trim().split(';'); // first parameter should always be content-type\\n\\n  object.type = parameters.shift().trim();\\n  parameters.forEach(function (parameter) {\\n    var pair = parameter.trim().split('=');\\n\\n    if (pair.length > 1) {\\n      var name = pair[0].replace(/\\\"/g, '').trim();\\n      var value = pair[1].replace(/\\\"/g, '').trim();\\n      object.parameters[name] = value;\\n    }\\n  });\\n  return object;\\n};\\n/**\\n * Check if a codec string refers to an audio codec.\\n *\\n * @param {String} codec codec string to check\\n * @return {Boolean} if this is an audio codec\\n * @private\\n */\\n\\n\\nvar isAudioCodec = function isAudioCodec(codec) {\\n  return /mp4a\\\\.\\\\d+.\\\\d+/i.test(codec);\\n};\\n/**\\n * Check if a codec string refers to a video codec.\\n *\\n * @param {String} codec codec string to check\\n * @return {Boolean} if this is a video codec\\n * @private\\n */\\n\\n\\nvar isVideoCodec = function isVideoCodec(codec) {\\n  return /avc1\\\\.[\\\\da-f]+/i.test(codec);\\n};\\n/**\\n * Returns a list of gops in the buffer that have a pts value of 3 seconds or more in\\n * front of current time.\\n *\\n * @param {Array} buffer\\n *        The current buffer of gop information\\n * @param {Number} currentTime\\n *        The current time\\n * @param {Double} mapping\\n *        Offset to map display time to stream presentation time\\n * @return {Array}\\n *         List of gops considered safe to append over\\n */\\n\\n\\nvar gopsSafeToAlignWith = function gopsSafeToAlignWith(buffer, currentTime, mapping) {\\n  if (typeof currentTime === 'undefined' || currentTime === null || !buffer.length) {\\n    return [];\\n  } // pts value for current time + 3 seconds to give a bit more wiggle room\\n\\n\\n  var currentTimePts = Math.ceil((currentTime - mapping + 3) * 90000);\\n  var i = void 0;\\n\\n  for (i = 0; i < buffer.length; i++) {\\n    if (buffer[i].pts > currentTimePts) {\\n      break;\\n    }\\n  }\\n\\n  return buffer.slice(i);\\n};\\n/**\\n * Appends gop information (timing and byteLength) received by the transmuxer for the\\n * gops appended in the last call to appendBuffer\\n *\\n * @param {Array} buffer\\n *        The current buffer of gop information\\n * @param {Array} gops\\n *        List of new gop information\\n * @param {boolean} replace\\n *        If true, replace the buffer with the new gop information. If false, append the\\n *        new gop information to the buffer in the right location of time.\\n * @return {Array}\\n *         Updated list of gop information\\n */\\n\\n\\nvar updateGopBuffer = function updateGopBuffer(buffer, gops, replace) {\\n  if (!gops.length) {\\n    return buffer;\\n  }\\n\\n  if (replace) {\\n    // If we are in safe append mode, then completely overwrite the gop buffer\\n    // with the most recent appeneded data. This will make sure that when appending\\n    // future segments, we only try to align with gops that are both ahead of current\\n    // time and in the last segment appended.\\n    return gops.slice();\\n  }\\n\\n  var start = gops[0].pts;\\n  var i = 0;\\n\\n  for (i; i < buffer.length; i++) {\\n    if (buffer[i].pts >= start) {\\n      break;\\n    }\\n  }\\n\\n  return buffer.slice(0, i).concat(gops);\\n};\\n/**\\n * Removes gop information in buffer that overlaps with provided start and end\\n *\\n * @param {Array} buffer\\n *        The current buffer of gop information\\n * @param {Double} start\\n *        position to start the remove at\\n * @param {Double} end\\n *        position to end the remove at\\n * @param {Double} mapping\\n *        Offset to map display time to stream presentation time\\n */\\n\\n\\nvar removeGopBuffer = function removeGopBuffer(buffer, start, end, mapping) {\\n  var startPts = Math.ceil((start - mapping) * 90000);\\n  var endPts = Math.ceil((end - mapping) * 90000);\\n  var updatedBuffer = buffer.slice();\\n  var i = buffer.length;\\n\\n  while (i--) {\\n    if (buffer[i].pts <= endPts) {\\n      break;\\n    }\\n  }\\n\\n  if (i === -1) {\\n    // no removal because end of remove range is before start of buffer\\n    return updatedBuffer;\\n  }\\n\\n  var j = i + 1;\\n\\n  while (j--) {\\n    if (buffer[j].pts <= startPts) {\\n      break;\\n    }\\n  } // clamp remove range start to 0 index\\n\\n\\n  j = Math.max(j, 0);\\n  updatedBuffer.splice(j, i - j + 1);\\n  return updatedBuffer;\\n};\\n\\nvar buffered = function buffered(videoBuffer, audioBuffer, audioDisabled) {\\n  var start = null;\\n  var end = null;\\n  var arity = 0;\\n  var extents = [];\\n  var ranges = []; // neither buffer has been created yet\\n\\n  if (!videoBuffer && !audioBuffer) {\\n    return videojs$1.createTimeRange();\\n  } // only one buffer is configured\\n\\n\\n  if (!videoBuffer) {\\n    return audioBuffer.buffered;\\n  }\\n\\n  if (!audioBuffer) {\\n    return videoBuffer.buffered;\\n  } // both buffers are configured\\n\\n\\n  if (audioDisabled) {\\n    return videoBuffer.buffered;\\n  } // both buffers are empty\\n\\n\\n  if (videoBuffer.buffered.length === 0 && audioBuffer.buffered.length === 0) {\\n    return videojs$1.createTimeRange();\\n  } // Handle the case where we have both buffers and create an\\n  // intersection of the two\\n\\n\\n  var videoBuffered = videoBuffer.buffered;\\n  var audioBuffered = audioBuffer.buffered;\\n  var count = videoBuffered.length; // A) Gather up all start and end times\\n\\n  while (count--) {\\n    extents.push({\\n      time: videoBuffered.start(count),\\n      type: 'start'\\n    });\\n    extents.push({\\n      time: videoBuffered.end(count),\\n      type: 'end'\\n    });\\n  }\\n\\n  count = audioBuffered.length;\\n\\n  while (count--) {\\n    extents.push({\\n      time: audioBuffered.start(count),\\n      type: 'start'\\n    });\\n    extents.push({\\n      time: audioBuffered.end(count),\\n      type: 'end'\\n    });\\n  } // B) Sort them by time\\n\\n\\n  extents.sort(function (a, b) {\\n    return a.time - b.time;\\n  }); // C) Go along one by one incrementing arity for start and decrementing\\n  //    arity for ends\\n\\n  for (count = 0; count < extents.length; count++) {\\n    if (extents[count].type === 'start') {\\n      arity++; // D) If arity is ever incremented to 2 we are entering an\\n      //    overlapping range\\n\\n      if (arity === 2) {\\n        start = extents[count].time;\\n      }\\n    } else if (extents[count].type === 'end') {\\n      arity--; // E) If arity is ever decremented to 1 we leaving an\\n      //    overlapping range\\n\\n      if (arity === 1) {\\n        end = extents[count].time;\\n      }\\n    } // F) Record overlapping ranges\\n\\n\\n    if (start !== null && end !== null) {\\n      ranges.push([start, end]);\\n      start = null;\\n      end = null;\\n    }\\n  }\\n\\n  return videojs$1.createTimeRanges(ranges);\\n};\\n/**\\n * @file virtual-source-buffer.js\\n */\\n\\n\\nvar ONE_SECOND_IN_TS = 90000; // We create a wrapper around the SourceBuffer so that we can manage the\\n// state of the `updating` property manually. We have to do this because\\n// Firefox changes `updating` to false long before triggering `updateend`\\n// events and that was causing strange problems in videojs-contrib-hls\\n\\nvar makeWrappedSourceBuffer = function makeWrappedSourceBuffer(mediaSource, mimeType) {\\n  var sourceBuffer = mediaSource.addSourceBuffer(mimeType);\\n  var wrapper = Object.create(null);\\n  wrapper.updating = false;\\n  wrapper.realBuffer_ = sourceBuffer;\\n\\n  var _loop = function _loop(key) {\\n    if (typeof sourceBuffer[key] === 'function') {\\n      wrapper[key] = function () {\\n        return sourceBuffer[key].apply(sourceBuffer, arguments);\\n      };\\n    } else if (typeof wrapper[key] === 'undefined') {\\n      Object.defineProperty(wrapper, key, {\\n        get: function get$$1() {\\n          return sourceBuffer[key];\\n        },\\n        set: function set$$1(v) {\\n          return sourceBuffer[key] = v;\\n        }\\n      });\\n    }\\n  };\\n\\n  for (var key in sourceBuffer) {\\n    _loop(key);\\n  }\\n\\n  return wrapper;\\n};\\n/**\\n * VirtualSourceBuffers exist so that we can transmux non native formats\\n * into a native format, but keep the same api as a native source buffer.\\n * It creates a transmuxer, that works in its own thread (a web worker) and\\n * that transmuxer muxes the data into a native format. VirtualSourceBuffer will\\n * then send all of that data to the naive sourcebuffer so that it is\\n * indestinguishable from a natively supported format.\\n *\\n * @param {HtmlMediaSource} mediaSource the parent mediaSource\\n * @param {Array} codecs array of codecs that we will be dealing with\\n * @class VirtualSourceBuffer\\n * @extends video.js.EventTarget\\n */\\n\\n\\nvar VirtualSourceBuffer = function (_videojs$EventTarget) {\\n  inherits(VirtualSourceBuffer, _videojs$EventTarget);\\n\\n  function VirtualSourceBuffer(mediaSource, codecs) {\\n    classCallCheck(this, VirtualSourceBuffer);\\n\\n    var _this = possibleConstructorReturn(this, (VirtualSourceBuffer.__proto__ || Object.getPrototypeOf(VirtualSourceBuffer)).call(this, videojs$1.EventTarget));\\n\\n    _this.timestampOffset_ = 0;\\n    _this.pendingBuffers_ = [];\\n    _this.bufferUpdating_ = false;\\n    _this.mediaSource_ = mediaSource;\\n    _this.codecs_ = codecs;\\n    _this.audioCodec_ = null;\\n    _this.videoCodec_ = null;\\n    _this.audioDisabled_ = false;\\n    _this.appendAudioInitSegment_ = true;\\n    _this.gopBuffer_ = [];\\n    _this.timeMapping_ = 0;\\n    _this.safeAppend_ = videojs$1.browser.IE_VERSION >= 11;\\n    var options = {\\n      remux: false,\\n      alignGopsAtEnd: _this.safeAppend_\\n    };\\n\\n    _this.codecs_.forEach(function (codec) {\\n      if (isAudioCodec(codec)) {\\n        _this.audioCodec_ = codec;\\n      } else if (isVideoCodec(codec)) {\\n        _this.videoCodec_ = codec;\\n      }\\n    }); // append muxed segments to their respective native buffers as\\n    // soon as they are available\\n\\n\\n    _this.transmuxer_ = new TransmuxWorker();\\n\\n    _this.transmuxer_.postMessage({\\n      action: 'init',\\n      options: options\\n    });\\n\\n    _this.transmuxer_.onmessage = function (event) {\\n      if (event.data.action === 'data') {\\n        return _this.data_(event);\\n      }\\n\\n      if (event.data.action === 'done') {\\n        return _this.done_(event);\\n      }\\n\\n      if (event.data.action === 'gopInfo') {\\n        return _this.appendGopInfo_(event);\\n      }\\n\\n      if (event.data.action === 'videoSegmentTimingInfo') {\\n        return _this.videoSegmentTimingInfo_(event.data.videoSegmentTimingInfo);\\n      }\\n    }; // this timestampOffset is a property with the side-effect of resetting\\n    // baseMediaDecodeTime in the transmuxer on the setter\\n\\n\\n    Object.defineProperty(_this, 'timestampOffset', {\\n      get: function get$$1() {\\n        return this.timestampOffset_;\\n      },\\n      set: function set$$1(val) {\\n        if (typeof val === 'number' && val >= 0) {\\n          this.timestampOffset_ = val;\\n          this.appendAudioInitSegment_ = true; // reset gop buffer on timestampoffset as this signals a change in timeline\\n\\n          this.gopBuffer_.length = 0;\\n          this.timeMapping_ = 0; // We have to tell the transmuxer to set the baseMediaDecodeTime to\\n          // the desired timestampOffset for the next segment\\n\\n          this.transmuxer_.postMessage({\\n            action: 'setTimestampOffset',\\n            timestampOffset: val\\n          });\\n        }\\n      }\\n    }); // setting the append window affects both source buffers\\n\\n    Object.defineProperty(_this, 'appendWindowStart', {\\n      get: function get$$1() {\\n        return (this.videoBuffer_ || this.audioBuffer_).appendWindowStart;\\n      },\\n      set: function set$$1(start) {\\n        if (this.videoBuffer_) {\\n          this.videoBuffer_.appendWindowStart = start;\\n        }\\n\\n        if (this.audioBuffer_) {\\n          this.audioBuffer_.appendWindowStart = start;\\n        }\\n      }\\n    }); // this buffer is \\\"updating\\\" if either of its native buffers are\\n\\n    Object.defineProperty(_this, 'updating', {\\n      get: function get$$1() {\\n        return !!(this.bufferUpdating_ || !this.audioDisabled_ && this.audioBuffer_ && this.audioBuffer_.updating || this.videoBuffer_ && this.videoBuffer_.updating);\\n      }\\n    }); // the buffered property is the intersection of the buffered\\n    // ranges of the native source buffers\\n\\n    Object.defineProperty(_this, 'buffered', {\\n      get: function get$$1() {\\n        return buffered(this.videoBuffer_, this.audioBuffer_, this.audioDisabled_);\\n      }\\n    });\\n    return _this;\\n  }\\n  /**\\n   * When we get a data event from the transmuxer\\n   * we call this function and handle the data that\\n   * was sent to us\\n   *\\n   * @private\\n   * @param {Event} event the data event from the transmuxer\\n   */\\n\\n\\n  createClass(VirtualSourceBuffer, [{\\n    key: 'data_',\\n    value: function data_(event) {\\n      var segment = event.data.segment; // Cast ArrayBuffer to TypedArray\\n\\n      segment.data = new Uint8Array(segment.data, event.data.byteOffset, event.data.byteLength);\\n      segment.initSegment = new Uint8Array(segment.initSegment.data, segment.initSegment.byteOffset, segment.initSegment.byteLength);\\n      createTextTracksIfNecessary(this, this.mediaSource_, segment); // Add the segments to the pendingBuffers array\\n\\n      this.pendingBuffers_.push(segment);\\n      return;\\n    }\\n    /**\\n     * When we get a done event from the transmuxer\\n     * we call this function and we process all\\n     * of the pending data that we have been saving in the\\n     * data_ function\\n     *\\n     * @private\\n     * @param {Event} event the done event from the transmuxer\\n     */\\n\\n  }, {\\n    key: 'done_',\\n    value: function done_(event) {\\n      // Don't process and append data if the mediaSource is closed\\n      if (this.mediaSource_.readyState === 'closed') {\\n        this.pendingBuffers_.length = 0;\\n        return;\\n      } // All buffers should have been flushed from the muxer\\n      // start processing anything we have received\\n\\n\\n      this.processPendingSegments_();\\n      return;\\n    }\\n  }, {\\n    key: 'videoSegmentTimingInfo_',\\n    value: function videoSegmentTimingInfo_(timingInfo) {\\n      var timingInfoInSeconds = {\\n        start: {\\n          decode: timingInfo.start.dts / ONE_SECOND_IN_TS,\\n          presentation: timingInfo.start.pts / ONE_SECOND_IN_TS\\n        },\\n        end: {\\n          decode: timingInfo.end.dts / ONE_SECOND_IN_TS,\\n          presentation: timingInfo.end.pts / ONE_SECOND_IN_TS\\n        },\\n        baseMediaDecodeTime: timingInfo.baseMediaDecodeTime / ONE_SECOND_IN_TS\\n      };\\n\\n      if (timingInfo.prependedContentDuration) {\\n        timingInfoInSeconds.prependedContentDuration = timingInfo.prependedContentDuration / ONE_SECOND_IN_TS;\\n      }\\n\\n      this.trigger({\\n        type: 'videoSegmentTimingInfo',\\n        videoSegmentTimingInfo: timingInfoInSeconds\\n      });\\n    }\\n    /**\\n     * Create our internal native audio/video source buffers and add\\n     * event handlers to them with the following conditions:\\n     * 1. they do not already exist on the mediaSource\\n     * 2. this VSB has a codec for them\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'createRealSourceBuffers_',\\n    value: function createRealSourceBuffers_() {\\n      var _this2 = this;\\n\\n      var types = ['audio', 'video'];\\n      types.forEach(function (type) {\\n        // Don't create a SourceBuffer of this type if we don't have a\\n        // codec for it\\n        if (!_this2[type + 'Codec_']) {\\n          return;\\n        } // Do nothing if a SourceBuffer of this type already exists\\n\\n\\n        if (_this2[type + 'Buffer_']) {\\n          return;\\n        }\\n\\n        var buffer = null; // If the mediasource already has a SourceBuffer for the codec\\n        // use that\\n\\n        if (_this2.mediaSource_[type + 'Buffer_']) {\\n          buffer = _this2.mediaSource_[type + 'Buffer_']; // In multiple audio track cases, the audio source buffer is disabled\\n          // on the main VirtualSourceBuffer by the HTMLMediaSource much earlier\\n          // than createRealSourceBuffers_ is called to create the second\\n          // VirtualSourceBuffer because that happens as a side-effect of\\n          // videojs-contrib-hls starting the audioSegmentLoader. As a result,\\n          // the audioBuffer is essentially \\\"ownerless\\\" and no one will toggle\\n          // the `updating` state back to false once the `updateend` event is received\\n          //\\n          // Setting `updating` to false manually will work around this\\n          // situation and allow work to continue\\n\\n          buffer.updating = false;\\n        } else {\\n          var codecProperty = type + 'Codec_';\\n          var mimeType = type + '/mp4;codecs=\\\"' + _this2[codecProperty] + '\\\"';\\n          buffer = makeWrappedSourceBuffer(_this2.mediaSource_.nativeMediaSource_, mimeType);\\n          _this2.mediaSource_[type + 'Buffer_'] = buffer;\\n        }\\n\\n        _this2[type + 'Buffer_'] = buffer; // Wire up the events to the SourceBuffer\\n\\n        ['update', 'updatestart', 'updateend'].forEach(function (event) {\\n          buffer.addEventListener(event, function () {\\n            // if audio is disabled\\n            if (type === 'audio' && _this2.audioDisabled_) {\\n              return;\\n            }\\n\\n            if (event === 'updateend') {\\n              _this2[type + 'Buffer_'].updating = false;\\n            }\\n\\n            var shouldTrigger = types.every(function (t) {\\n              // skip checking audio's updating status if audio\\n              // is not enabled\\n              if (t === 'audio' && _this2.audioDisabled_) {\\n                return true;\\n              } // if the other type is updating we don't trigger\\n\\n\\n              if (type !== t && _this2[t + 'Buffer_'] && _this2[t + 'Buffer_'].updating) {\\n                return false;\\n              }\\n\\n              return true;\\n            });\\n\\n            if (shouldTrigger) {\\n              return _this2.trigger(event);\\n            }\\n          });\\n        });\\n      });\\n    }\\n    /**\\n     * Emulate the native mediasource function, but our function will\\n     * send all of the proposed segments to the transmuxer so that we\\n     * can transmux them before we append them to our internal\\n     * native source buffers in the correct format.\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer\\n     * @param {Uint8Array} segment the segment to append to the buffer\\n     */\\n\\n  }, {\\n    key: 'appendBuffer',\\n    value: function appendBuffer(segment) {\\n      // Start the internal \\\"updating\\\" state\\n      this.bufferUpdating_ = true;\\n\\n      if (this.audioBuffer_ && this.audioBuffer_.buffered.length) {\\n        var audioBuffered = this.audioBuffer_.buffered;\\n        this.transmuxer_.postMessage({\\n          action: 'setAudioAppendStart',\\n          appendStart: audioBuffered.end(audioBuffered.length - 1)\\n        });\\n      }\\n\\n      if (this.videoBuffer_) {\\n        this.transmuxer_.postMessage({\\n          action: 'alignGopsWith',\\n          gopsToAlignWith: gopsSafeToAlignWith(this.gopBuffer_, this.mediaSource_.player_ ? this.mediaSource_.player_.currentTime() : null, this.timeMapping_)\\n        });\\n      }\\n\\n      this.transmuxer_.postMessage({\\n        action: 'push',\\n        // Send the typed-array of data as an ArrayBuffer so that\\n        // it can be sent as a \\\"Transferable\\\" and avoid the costly\\n        // memory copy\\n        data: segment.buffer,\\n        // To recreate the original typed-array, we need information\\n        // about what portion of the ArrayBuffer it was a view into\\n        byteOffset: segment.byteOffset,\\n        byteLength: segment.byteLength\\n      }, [segment.buffer]);\\n      this.transmuxer_.postMessage({\\n        action: 'flush'\\n      });\\n    }\\n    /**\\n     * Appends gop information (timing and byteLength) received by the transmuxer for the\\n     * gops appended in the last call to appendBuffer\\n     *\\n     * @param {Event} event\\n     *        The gopInfo event from the transmuxer\\n     * @param {Array} event.data.gopInfo\\n     *        List of gop info to append\\n     */\\n\\n  }, {\\n    key: 'appendGopInfo_',\\n    value: function appendGopInfo_(event) {\\n      this.gopBuffer_ = updateGopBuffer(this.gopBuffer_, event.data.gopInfo, this.safeAppend_);\\n    }\\n    /**\\n     * Emulate the native mediasource function and remove parts\\n     * of the buffer from any of our internal buffers that exist\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/remove\\n     * @param {Double} start position to start the remove at\\n     * @param {Double} end position to end the remove at\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end) {\\n      if (this.videoBuffer_) {\\n        this.videoBuffer_.updating = true;\\n        this.videoBuffer_.remove(start, end);\\n        this.gopBuffer_ = removeGopBuffer(this.gopBuffer_, start, end, this.timeMapping_);\\n      }\\n\\n      if (!this.audioDisabled_ && this.audioBuffer_) {\\n        this.audioBuffer_.updating = true;\\n        this.audioBuffer_.remove(start, end);\\n      } // Remove Metadata Cues (id3)\\n\\n\\n      removeCuesFromTrack(start, end, this.metadataTrack_); // Remove Any Captions\\n\\n      if (this.inbandTextTracks_) {\\n        for (var track in this.inbandTextTracks_) {\\n          removeCuesFromTrack(start, end, this.inbandTextTracks_[track]);\\n        }\\n      }\\n    }\\n    /**\\n     * Process any segments that the muxer has output\\n     * Concatenate segments together based on type and append them into\\n     * their respective sourceBuffers\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'processPendingSegments_',\\n    value: function processPendingSegments_() {\\n      var sortedSegments = {\\n        video: {\\n          segments: [],\\n          bytes: 0\\n        },\\n        audio: {\\n          segments: [],\\n          bytes: 0\\n        },\\n        captions: [],\\n        metadata: []\\n      };\\n\\n      if (!this.pendingBuffers_.length) {\\n        // We are no longer in the internal \\\"updating\\\" state\\n        this.trigger('updateend');\\n        this.bufferUpdating_ = false;\\n        return;\\n      } // Sort segments into separate video/audio arrays and\\n      // keep track of their total byte lengths\\n\\n\\n      sortedSegments = this.pendingBuffers_.reduce(function (segmentObj, segment) {\\n        var type = segment.type;\\n        var data = segment.data;\\n        var initSegment = segment.initSegment;\\n        segmentObj[type].segments.push(data);\\n        segmentObj[type].bytes += data.byteLength;\\n        segmentObj[type].initSegment = initSegment; // Gather any captions into a single array\\n\\n        if (segment.captions) {\\n          segmentObj.captions = segmentObj.captions.concat(segment.captions);\\n        }\\n\\n        if (segment.info) {\\n          segmentObj[type].info = segment.info;\\n        } // Gather any metadata into a single array\\n\\n\\n        if (segment.metadata) {\\n          segmentObj.metadata = segmentObj.metadata.concat(segment.metadata);\\n        }\\n\\n        return segmentObj;\\n      }, sortedSegments); // Create the real source buffers if they don't exist by now since we\\n      // finally are sure what tracks are contained in the source\\n\\n      if (!this.videoBuffer_ && !this.audioBuffer_) {\\n        // Remove any codecs that may have been specified by default but\\n        // are no longer applicable now\\n        if (sortedSegments.video.bytes === 0) {\\n          this.videoCodec_ = null;\\n        }\\n\\n        if (sortedSegments.audio.bytes === 0) {\\n          this.audioCodec_ = null;\\n        }\\n\\n        this.createRealSourceBuffers_();\\n      }\\n\\n      if (sortedSegments.audio.info) {\\n        this.mediaSource_.trigger({\\n          type: 'audioinfo',\\n          info: sortedSegments.audio.info\\n        });\\n      }\\n\\n      if (sortedSegments.video.info) {\\n        this.mediaSource_.trigger({\\n          type: 'videoinfo',\\n          info: sortedSegments.video.info\\n        });\\n      }\\n\\n      if (this.appendAudioInitSegment_) {\\n        if (!this.audioDisabled_ && this.audioBuffer_) {\\n          sortedSegments.audio.segments.unshift(sortedSegments.audio.initSegment);\\n          sortedSegments.audio.bytes += sortedSegments.audio.initSegment.byteLength;\\n        }\\n\\n        this.appendAudioInitSegment_ = false;\\n      }\\n\\n      var triggerUpdateend = false; // Merge multiple video and audio segments into one and append\\n\\n      if (this.videoBuffer_ && sortedSegments.video.bytes) {\\n        sortedSegments.video.segments.unshift(sortedSegments.video.initSegment);\\n        sortedSegments.video.bytes += sortedSegments.video.initSegment.byteLength;\\n        this.concatAndAppendSegments_(sortedSegments.video, this.videoBuffer_);\\n      } else if (this.videoBuffer_ && (this.audioDisabled_ || !this.audioBuffer_)) {\\n        // The transmuxer did not return any bytes of video, meaning it was all trimmed\\n        // for gop alignment. Since we have a video buffer and audio is disabled, updateend\\n        // will never be triggered by this source buffer, which will cause contrib-hls\\n        // to be stuck forever waiting for updateend. If audio is not disabled, updateend\\n        // will be triggered by the audio buffer, which will be sent upwards since the video\\n        // buffer will not be in an updating state.\\n        triggerUpdateend = true;\\n      } // Add text-track data for all\\n\\n\\n      addTextTrackData(this, sortedSegments.captions, sortedSegments.metadata);\\n\\n      if (!this.audioDisabled_ && this.audioBuffer_) {\\n        this.concatAndAppendSegments_(sortedSegments.audio, this.audioBuffer_);\\n      }\\n\\n      this.pendingBuffers_.length = 0;\\n\\n      if (triggerUpdateend) {\\n        this.trigger('updateend');\\n      } // We are no longer in the internal \\\"updating\\\" state\\n\\n\\n      this.bufferUpdating_ = false;\\n    }\\n    /**\\n     * Combine all segments into a single Uint8Array and then append them\\n     * to the destination buffer\\n     *\\n     * @param {Object} segmentObj\\n     * @param {SourceBuffer} destinationBuffer native source buffer to append data to\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'concatAndAppendSegments_',\\n    value: function concatAndAppendSegments_(segmentObj, destinationBuffer) {\\n      var offset = 0;\\n      var tempBuffer = void 0;\\n\\n      if (segmentObj.bytes) {\\n        tempBuffer = new Uint8Array(segmentObj.bytes); // Combine the individual segments into one large typed-array\\n\\n        segmentObj.segments.forEach(function (segment) {\\n          tempBuffer.set(segment, offset);\\n          offset += segment.byteLength;\\n        });\\n\\n        try {\\n          destinationBuffer.updating = true;\\n          destinationBuffer.appendBuffer(tempBuffer);\\n        } catch (error) {\\n          if (this.mediaSource_.player_) {\\n            this.mediaSource_.player_.error({\\n              code: -3,\\n              type: 'APPEND_BUFFER_ERR',\\n              message: error.message,\\n              originalError: error\\n            });\\n          }\\n        }\\n      }\\n    }\\n    /**\\n     * Emulate the native mediasource function. abort any soureBuffer\\n     * actions and throw out any un-appended data.\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/abort\\n     */\\n\\n  }, {\\n    key: 'abort',\\n    value: function abort() {\\n      if (this.videoBuffer_) {\\n        this.videoBuffer_.abort();\\n      }\\n\\n      if (!this.audioDisabled_ && this.audioBuffer_) {\\n        this.audioBuffer_.abort();\\n      }\\n\\n      if (this.transmuxer_) {\\n        this.transmuxer_.postMessage({\\n          action: 'reset'\\n        });\\n      }\\n\\n      this.pendingBuffers_.length = 0;\\n      this.bufferUpdating_ = false;\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      if (this.transmuxer_) {\\n        this.transmuxer_.terminate();\\n      }\\n\\n      this.trigger('dispose');\\n      this.off();\\n    }\\n  }]);\\n  return VirtualSourceBuffer;\\n}(videojs$1.EventTarget);\\n/**\\n * @file html-media-source.js\\n */\\n\\n/**\\n * Our MediaSource implementation in HTML, mimics native\\n * MediaSource where/if possible.\\n *\\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\\n * @class HtmlMediaSource\\n * @extends videojs.EventTarget\\n */\\n\\n\\nvar HtmlMediaSource = function (_videojs$EventTarget) {\\n  inherits(HtmlMediaSource, _videojs$EventTarget);\\n\\n  function HtmlMediaSource() {\\n    classCallCheck(this, HtmlMediaSource);\\n\\n    var _this = possibleConstructorReturn(this, (HtmlMediaSource.__proto__ || Object.getPrototypeOf(HtmlMediaSource)).call(this));\\n\\n    var property = void 0;\\n    _this.nativeMediaSource_ = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource(); // delegate to the native MediaSource's methods by default\\n\\n    for (property in _this.nativeMediaSource_) {\\n      if (!(property in HtmlMediaSource.prototype) && typeof _this.nativeMediaSource_[property] === 'function') {\\n        _this[property] = _this.nativeMediaSource_[property].bind(_this.nativeMediaSource_);\\n      }\\n    } // emulate `duration` and `seekable` until seeking can be\\n    // handled uniformly for live streams\\n    // see https://github.com/w3c/media-source/issues/5\\n\\n\\n    _this.duration_ = NaN;\\n    Object.defineProperty(_this, 'duration', {\\n      get: function get$$1() {\\n        if (this.duration_ === Infinity) {\\n          return this.duration_;\\n        }\\n\\n        return this.nativeMediaSource_.duration;\\n      },\\n      set: function set$$1(duration) {\\n        this.duration_ = duration;\\n\\n        if (duration !== Infinity) {\\n          this.nativeMediaSource_.duration = duration;\\n          return;\\n        }\\n      }\\n    });\\n    Object.defineProperty(_this, 'seekable', {\\n      get: function get$$1() {\\n        if (this.duration_ === Infinity) {\\n          return videojs$1.createTimeRanges([[0, this.nativeMediaSource_.duration]]);\\n        }\\n\\n        return this.nativeMediaSource_.seekable;\\n      }\\n    });\\n    Object.defineProperty(_this, 'readyState', {\\n      get: function get$$1() {\\n        return this.nativeMediaSource_.readyState;\\n      }\\n    });\\n    Object.defineProperty(_this, 'activeSourceBuffers', {\\n      get: function get$$1() {\\n        return this.activeSourceBuffers_;\\n      }\\n    }); // the list of virtual and native SourceBuffers created by this\\n    // MediaSource\\n\\n    _this.sourceBuffers = [];\\n    _this.activeSourceBuffers_ = [];\\n    /**\\n     * update the list of active source buffers based upon various\\n     * imformation from HLS and video.js\\n     *\\n     * @private\\n     */\\n\\n    _this.updateActiveSourceBuffers_ = function () {\\n      // Retain the reference but empty the array\\n      _this.activeSourceBuffers_.length = 0; // If there is only one source buffer, then it will always be active and audio will\\n      // be disabled based on the codec of the source buffer\\n\\n      if (_this.sourceBuffers.length === 1) {\\n        var sourceBuffer = _this.sourceBuffers[0];\\n        sourceBuffer.appendAudioInitSegment_ = true;\\n        sourceBuffer.audioDisabled_ = !sourceBuffer.audioCodec_;\\n\\n        _this.activeSourceBuffers_.push(sourceBuffer);\\n\\n        return;\\n      } // There are 2 source buffers, a combined (possibly video only) source buffer and\\n      // and an audio only source buffer.\\n      // By default, the audio in the combined virtual source buffer is enabled\\n      // and the audio-only source buffer (if it exists) is disabled.\\n\\n\\n      var disableCombined = false;\\n      var disableAudioOnly = true; // TODO: maybe we can store the sourcebuffers on the track objects?\\n      // safari may do something like this\\n\\n      for (var i = 0; i < _this.player_.audioTracks().length; i++) {\\n        var track = _this.player_.audioTracks()[i];\\n\\n        if (track.enabled && track.kind !== 'main') {\\n          // The enabled track is an alternate audio track so disable the audio in\\n          // the combined source buffer and enable the audio-only source buffer.\\n          disableCombined = true;\\n          disableAudioOnly = false;\\n          break;\\n        }\\n      }\\n\\n      _this.sourceBuffers.forEach(function (sourceBuffer, index) {\\n        /* eslinst-disable */\\n        // TODO once codecs are required, we can switch to using the codecs to determine\\n        //      what stream is the video stream, rather than relying on videoTracks\\n\\n        /* eslinst-enable */\\n        sourceBuffer.appendAudioInitSegment_ = true;\\n\\n        if (sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\\n          // combined\\n          sourceBuffer.audioDisabled_ = disableCombined;\\n        } else if (sourceBuffer.videoCodec_ && !sourceBuffer.audioCodec_) {\\n          // If the \\\"combined\\\" source buffer is video only, then we do not want\\n          // disable the audio-only source buffer (this is mostly for demuxed\\n          // audio and video hls)\\n          sourceBuffer.audioDisabled_ = true;\\n          disableAudioOnly = false;\\n        } else if (!sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\\n          // audio only\\n          // In the case of audio only with alternate audio and disableAudioOnly is true\\n          // this means we want to disable the audio on the alternate audio sourcebuffer\\n          // but not the main \\\"combined\\\" source buffer. The \\\"combined\\\" source buffer is\\n          // always at index 0, so this ensures audio won't be disabled in both source\\n          // buffers.\\n          sourceBuffer.audioDisabled_ = index ? disableAudioOnly : !disableAudioOnly;\\n\\n          if (sourceBuffer.audioDisabled_) {\\n            return;\\n          }\\n        }\\n\\n        _this.activeSourceBuffers_.push(sourceBuffer);\\n      });\\n    };\\n\\n    _this.onPlayerMediachange_ = function () {\\n      _this.sourceBuffers.forEach(function (sourceBuffer) {\\n        sourceBuffer.appendAudioInitSegment_ = true;\\n      });\\n    };\\n\\n    _this.onHlsReset_ = function () {\\n      _this.sourceBuffers.forEach(function (sourceBuffer) {\\n        if (sourceBuffer.transmuxer_) {\\n          sourceBuffer.transmuxer_.postMessage({\\n            action: 'resetCaptions'\\n          });\\n        }\\n      });\\n    };\\n\\n    _this.onHlsSegmentTimeMapping_ = function (event) {\\n      _this.sourceBuffers.forEach(function (buffer) {\\n        return buffer.timeMapping_ = event.mapping;\\n      });\\n    }; // Re-emit MediaSource events on the polyfill\\n\\n\\n    ['sourceopen', 'sourceclose', 'sourceended'].forEach(function (eventName) {\\n      this.nativeMediaSource_.addEventListener(eventName, this.trigger.bind(this));\\n    }, _this); // capture the associated player when the MediaSource is\\n    // successfully attached\\n\\n    _this.on('sourceopen', function (event) {\\n      // Get the player this MediaSource is attached to\\n      var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.querySelector('[src=\\\"' + _this.url_ + '\\\"]');\\n\\n      if (!video) {\\n        return;\\n      }\\n\\n      _this.player_ = videojs$1(video.parentNode);\\n\\n      if (!_this.player_) {\\n        return;\\n      } // hls-reset is fired by videojs.Hls on to the tech after the main SegmentLoader\\n      // resets its state and flushes the buffer\\n\\n\\n      _this.player_.tech_.on('hls-reset', _this.onHlsReset_); // hls-segment-time-mapping is fired by videojs.Hls on to the tech after the main\\n      // SegmentLoader inspects an MTS segment and has an accurate stream to display\\n      // time mapping\\n\\n\\n      _this.player_.tech_.on('hls-segment-time-mapping', _this.onHlsSegmentTimeMapping_);\\n\\n      if (_this.player_.audioTracks && _this.player_.audioTracks()) {\\n        _this.player_.audioTracks().on('change', _this.updateActiveSourceBuffers_);\\n\\n        _this.player_.audioTracks().on('addtrack', _this.updateActiveSourceBuffers_);\\n\\n        _this.player_.audioTracks().on('removetrack', _this.updateActiveSourceBuffers_);\\n      }\\n\\n      _this.player_.on('mediachange', _this.onPlayerMediachange_);\\n    });\\n\\n    _this.on('sourceended', function (event) {\\n      var duration = durationOfVideo(_this.duration);\\n\\n      for (var i = 0; i < _this.sourceBuffers.length; i++) {\\n        var sourcebuffer = _this.sourceBuffers[i];\\n        var cues = sourcebuffer.metadataTrack_ && sourcebuffer.metadataTrack_.cues;\\n\\n        if (cues && cues.length) {\\n          cues[cues.length - 1].endTime = duration;\\n        }\\n      }\\n    }); // explicitly terminate any WebWorkers that were created\\n    // by SourceHandlers\\n\\n\\n    _this.on('sourceclose', function (event) {\\n      this.sourceBuffers.forEach(function (sourceBuffer) {\\n        if (sourceBuffer.transmuxer_) {\\n          sourceBuffer.transmuxer_.terminate();\\n        }\\n      });\\n      this.sourceBuffers.length = 0;\\n\\n      if (!this.player_) {\\n        return;\\n      }\\n\\n      if (this.player_.audioTracks && this.player_.audioTracks()) {\\n        this.player_.audioTracks().off('change', this.updateActiveSourceBuffers_);\\n        this.player_.audioTracks().off('addtrack', this.updateActiveSourceBuffers_);\\n        this.player_.audioTracks().off('removetrack', this.updateActiveSourceBuffers_);\\n      } // We can only change this if the player hasn't been disposed of yet\\n      // because `off` eventually tries to use the el_ property. If it has\\n      // been disposed of, then don't worry about it because there are no\\n      // event handlers left to unbind anyway\\n\\n\\n      if (this.player_.el_) {\\n        this.player_.off('mediachange', this.onPlayerMediachange_);\\n      }\\n\\n      if (this.player_.tech_ && this.player_.tech_.el_) {\\n        this.player_.tech_.off('hls-reset', this.onHlsReset_);\\n        this.player_.tech_.off('hls-segment-time-mapping', this.onHlsSegmentTimeMapping_);\\n      }\\n    });\\n\\n    return _this;\\n  }\\n  /**\\n   * Add a range that that can now be seeked to.\\n   *\\n   * @param {Double} start where to start the addition\\n   * @param {Double} end where to end the addition\\n   * @private\\n   */\\n\\n\\n  createClass(HtmlMediaSource, [{\\n    key: 'addSeekableRange_',\\n    value: function addSeekableRange_(start, end) {\\n      var error = void 0;\\n\\n      if (this.duration !== Infinity) {\\n        error = new Error('MediaSource.addSeekableRange() can only be invoked ' + 'when the duration is Infinity');\\n        error.name = 'InvalidStateError';\\n        error.code = 11;\\n        throw error;\\n      }\\n\\n      if (end > this.nativeMediaSource_.duration || isNaN(this.nativeMediaSource_.duration)) {\\n        this.nativeMediaSource_.duration = end;\\n      }\\n    }\\n    /**\\n     * Add a source buffer to the media source.\\n     *\\n     * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer\\n     * @param {String} type the content-type of the content\\n     * @return {Object} the created source buffer\\n     */\\n\\n  }, {\\n    key: 'addSourceBuffer',\\n    value: function addSourceBuffer(type) {\\n      var buffer = void 0;\\n      var parsedType = parseContentType(type); // Create a VirtualSourceBuffer to transmux MPEG-2 transport\\n      // stream segments into fragmented MP4s\\n\\n      if (/^(video|audio)\\\\/mp2t$/i.test(parsedType.type)) {\\n        var codecs = [];\\n\\n        if (parsedType.parameters && parsedType.parameters.codecs) {\\n          codecs = parsedType.parameters.codecs.split(',');\\n          codecs = translateLegacyCodecs(codecs);\\n          codecs = codecs.filter(function (codec) {\\n            return isAudioCodec(codec) || isVideoCodec(codec);\\n          });\\n        }\\n\\n        if (codecs.length === 0) {\\n          codecs = ['avc1.4d400d', 'mp4a.40.2'];\\n        }\\n\\n        buffer = new VirtualSourceBuffer(this, codecs);\\n\\n        if (this.sourceBuffers.length !== 0) {\\n          // If another VirtualSourceBuffer already exists, then we are creating a\\n          // SourceBuffer for an alternate audio track and therefore we know that\\n          // the source has both an audio and video track.\\n          // That means we should trigger the manual creation of the real\\n          // SourceBuffers instead of waiting for the transmuxer to return data\\n          this.sourceBuffers[0].createRealSourceBuffers_();\\n          buffer.createRealSourceBuffers_(); // Automatically disable the audio on the first source buffer if\\n          // a second source buffer is ever created\\n\\n          this.sourceBuffers[0].audioDisabled_ = true;\\n        }\\n      } else {\\n        // delegate to the native implementation\\n        buffer = this.nativeMediaSource_.addSourceBuffer(type);\\n      }\\n\\n      this.sourceBuffers.push(buffer);\\n      return buffer;\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.off();\\n      this.sourceBuffers.forEach(function (buffer) {\\n        if (buffer.dispose) {\\n          buffer.dispose();\\n        }\\n      });\\n      this.sourceBuffers.length = 0;\\n    }\\n  }]);\\n  return HtmlMediaSource;\\n}(videojs$1.EventTarget);\\n/**\\n * @file videojs-contrib-media-sources.js\\n */\\n\\n\\nvar urlCount = 0; // ------------\\n// Media Source\\n// ------------\\n// store references to the media sources so they can be connected\\n// to a video element (a swf object)\\n// TODO: can we store this somewhere local to this module?\\n\\nvideojs$1.mediaSources = {};\\n/**\\n * Provide a method for a swf object to notify JS that a\\n * media source is now open.\\n *\\n * @param {String} msObjectURL string referencing the MSE Object URL\\n * @param {String} swfId the swf id\\n */\\n\\nvar open = function open(msObjectURL, swfId) {\\n  var mediaSource = videojs$1.mediaSources[msObjectURL];\\n\\n  if (mediaSource) {\\n    mediaSource.trigger({\\n      type: 'sourceopen',\\n      swfId: swfId\\n    });\\n  } else {\\n    throw new Error('Media Source not found (Video.js)');\\n  }\\n};\\n/**\\n * Check to see if the native MediaSource object exists and supports\\n * an MP4 container with both H.264 video and AAC-LC audio.\\n *\\n * @return {Boolean} if  native media sources are supported\\n */\\n\\n\\nvar supportsNativeMediaSources = function supportsNativeMediaSources() {\\n  return !!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource && !!global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported('video/mp4;codecs=\\\"avc1.4d400d,mp4a.40.2\\\"');\\n};\\n/**\\n * An emulation of the MediaSource API so that we can support\\n * native and non-native functionality. returns an instance of\\n * HtmlMediaSource.\\n *\\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/MediaSource\\n */\\n\\n\\nvar MediaSource = function MediaSource() {\\n  this.MediaSource = {\\n    open: open,\\n    supportsNativeMediaSources: supportsNativeMediaSources\\n  };\\n\\n  if (supportsNativeMediaSources()) {\\n    return new HtmlMediaSource();\\n  }\\n\\n  throw new Error('Cannot use create a virtual MediaSource for this video');\\n};\\n\\nMediaSource.open = open;\\nMediaSource.supportsNativeMediaSources = supportsNativeMediaSources;\\n/**\\n * A wrapper around the native URL for our MSE object\\n * implementation, this object is exposed under videojs.URL\\n *\\n * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/URL\\n */\\n\\nvar URL$1 = {\\n  /**\\n   * A wrapper around the native createObjectURL for our objects.\\n   * This function maps a native or emulated mediaSource to a blob\\n   * url so that it can be loaded into video.js\\n   *\\n   * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\\n   * @param {MediaSource} object the object to create a blob url to\\n   */\\n  createObjectURL: function createObjectURL(object) {\\n    var objectUrlPrefix = 'blob:vjs-media-source/';\\n    var url = void 0; // use the native MediaSource to generate an object URL\\n\\n    if (object instanceof HtmlMediaSource) {\\n      url = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.createObjectURL(object.nativeMediaSource_);\\n      object.url_ = url;\\n      return url;\\n    } // if the object isn't an emulated MediaSource, delegate to the\\n    // native implementation\\n\\n\\n    if (!(object instanceof HtmlMediaSource)) {\\n      url = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.URL.createObjectURL(object);\\n      object.url_ = url;\\n      return url;\\n    } // build a URL that can be used to map back to the emulated\\n    // MediaSource\\n\\n\\n    url = objectUrlPrefix + urlCount;\\n    urlCount++; // setup the mapping back to object\\n\\n    videojs$1.mediaSources[url] = object;\\n    return url;\\n  }\\n};\\nvideojs$1.MediaSource = MediaSource;\\nvideojs$1.URL = URL$1;\\nvar EventTarget$1$1 = videojs$1.EventTarget,\\n    mergeOptions$2 = videojs$1.mergeOptions;\\n/**\\n * Returns a new master manifest that is the result of merging an updated master manifest\\n * into the original version.\\n *\\n * @param {Object} oldMaster\\n *        The old parsed mpd object\\n * @param {Object} newMaster\\n *        The updated parsed mpd object\\n * @return {Object}\\n *         A new object representing the original master manifest with the updated media\\n *         playlists merged in\\n */\\n\\nvar updateMaster$1 = function updateMaster$$1(oldMaster, newMaster) {\\n  var noChanges = void 0;\\n  var update = mergeOptions$2(oldMaster, {\\n    // These are top level properties that can be updated\\n    duration: newMaster.duration,\\n    minimumUpdatePeriod: newMaster.minimumUpdatePeriod\\n  }); // First update the playlists in playlist list\\n\\n  for (var i = 0; i < newMaster.playlists.length; i++) {\\n    var playlistUpdate = updateMaster(update, newMaster.playlists[i]);\\n\\n    if (playlistUpdate) {\\n      update = playlistUpdate;\\n    } else {\\n      noChanges = true;\\n    }\\n  } // Then update media group playlists\\n\\n\\n  forEachMediaGroup(newMaster, function (properties, type, group, label) {\\n    if (properties.playlists && properties.playlists.length) {\\n      var id = properties.playlists[0].id;\\n\\n      var _playlistUpdate = updateMaster(update, properties.playlists[0]);\\n\\n      if (_playlistUpdate) {\\n        update = _playlistUpdate; // update the playlist reference within media groups\\n\\n        update.mediaGroups[type][group][label].playlists[0] = update.playlists[id];\\n        noChanges = false;\\n      }\\n    }\\n  });\\n\\n  if (noChanges) {\\n    return null;\\n  }\\n\\n  return update;\\n};\\n\\nvar generateSidxKey = function generateSidxKey(sidxInfo) {\\n  // should be non-inclusive\\n  var sidxByteRangeEnd = sidxInfo.byterange.offset + sidxInfo.byterange.length - 1;\\n  return sidxInfo.uri + '-' + sidxInfo.byterange.offset + '-' + sidxByteRangeEnd;\\n}; // SIDX should be equivalent if the URI and byteranges of the SIDX match.\\n// If the SIDXs have maps, the two maps should match,\\n// both `a` and `b` missing SIDXs is considered matching.\\n// If `a` or `b` but not both have a map, they aren't matching.\\n\\n\\nvar equivalentSidx = function equivalentSidx(a, b) {\\n  var neitherMap = Boolean(!a.map && !b.map);\\n  var equivalentMap = neitherMap || Boolean(a.map && b.map && a.map.byterange.offset === b.map.byterange.offset && a.map.byterange.length === b.map.byterange.length);\\n  return equivalentMap && a.uri === b.uri && a.byterange.offset === b.byterange.offset && a.byterange.length === b.byterange.length;\\n}; // exported for testing\\n\\n\\nvar compareSidxEntry = function compareSidxEntry(playlists, oldSidxMapping) {\\n  var newSidxMapping = {};\\n\\n  for (var id in playlists) {\\n    var playlist = playlists[id];\\n    var currentSidxInfo = playlist.sidx;\\n\\n    if (currentSidxInfo) {\\n      var key = generateSidxKey(currentSidxInfo);\\n\\n      if (!oldSidxMapping[key]) {\\n        break;\\n      }\\n\\n      var savedSidxInfo = oldSidxMapping[key].sidxInfo;\\n\\n      if (equivalentSidx(savedSidxInfo, currentSidxInfo)) {\\n        newSidxMapping[key] = oldSidxMapping[key];\\n      }\\n    }\\n  }\\n\\n  return newSidxMapping;\\n};\\n/**\\n *  A function that filters out changed items as they need to be requested separately.\\n *\\n *  The method is exported for testing\\n *\\n *  @param {Object} masterXml the mpd XML\\n *  @param {string} srcUrl the mpd url\\n *  @param {Date} clientOffset a time difference between server and client (passed through and not used)\\n *  @param {Object} oldSidxMapping the SIDX to compare against\\n */\\n\\n\\nvar filterChangedSidxMappings = function filterChangedSidxMappings(masterXml, srcUrl, clientOffset, oldSidxMapping) {\\n  // Don't pass current sidx mapping\\n  var master = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_15__[\\\"parse\\\"])(masterXml, {\\n    manifestUri: srcUrl,\\n    clientOffset: clientOffset\\n  });\\n  var videoSidx = compareSidxEntry(master.playlists, oldSidxMapping);\\n  var mediaGroupSidx = videoSidx;\\n  forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\\n    if (properties.playlists && properties.playlists.length) {\\n      var playlists = properties.playlists;\\n      mediaGroupSidx = mergeOptions$2(mediaGroupSidx, compareSidxEntry(playlists, oldSidxMapping));\\n    }\\n  });\\n  return mediaGroupSidx;\\n}; // exported for testing\\n\\n\\nvar requestSidx_ = function requestSidx_(sidxRange, playlist, xhr, options, finishProcessingFn) {\\n  var sidxInfo = {\\n    // resolve the segment URL relative to the playlist\\n    uri: resolveManifestRedirect(options.handleManifestRedirects, sidxRange.resolvedUri),\\n    // resolvedUri: sidxRange.resolvedUri,\\n    byterange: sidxRange.byterange,\\n    // the segment's playlist\\n    playlist: playlist\\n  };\\n  var sidxRequestOptions = videojs$1.mergeOptions(sidxInfo, {\\n    responseType: 'arraybuffer',\\n    headers: segmentXhrHeaders(sidxInfo)\\n  });\\n  return xhr(sidxRequestOptions, finishProcessingFn);\\n};\\n\\nvar DashPlaylistLoader = function (_EventTarget) {\\n  inherits(DashPlaylistLoader, _EventTarget); // DashPlaylistLoader must accept either a src url or a playlist because subsequent\\n  // playlist loader setups from media groups will expect to be able to pass a playlist\\n  // (since there aren't external URLs to media playlists with DASH)\\n\\n  function DashPlaylistLoader(srcUrlOrPlaylist, hls) {\\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\\n    var masterPlaylistLoader = arguments[3];\\n    classCallCheck(this, DashPlaylistLoader);\\n\\n    var _this = possibleConstructorReturn(this, (DashPlaylistLoader.__proto__ || Object.getPrototypeOf(DashPlaylistLoader)).call(this));\\n\\n    var _options$withCredenti = options.withCredentials,\\n        withCredentials = _options$withCredenti === undefined ? false : _options$withCredenti,\\n        _options$handleManife = options.handleManifestRedirects,\\n        handleManifestRedirects = _options$handleManife === undefined ? false : _options$handleManife;\\n    _this.hls_ = hls;\\n    _this.withCredentials = withCredentials;\\n    _this.handleManifestRedirects = handleManifestRedirects;\\n\\n    if (!srcUrlOrPlaylist) {\\n      throw new Error('A non-empty playlist URL or playlist is required');\\n    } // event naming?\\n\\n\\n    _this.on('minimumUpdatePeriod', function () {\\n      _this.refreshXml_();\\n    }); // live playlist staleness timeout\\n\\n\\n    _this.on('mediaupdatetimeout', function () {\\n      _this.refreshMedia_(_this.media().id);\\n    });\\n\\n    _this.state = 'HAVE_NOTHING';\\n    _this.loadedPlaylists_ = {}; // initialize the loader state\\n    // The masterPlaylistLoader will be created with a string\\n\\n    if (typeof srcUrlOrPlaylist === 'string') {\\n      _this.srcUrl = srcUrlOrPlaylist; // TODO: reset sidxMapping between period changes\\n      // once multi-period is refactored\\n\\n      _this.sidxMapping_ = {};\\n      return possibleConstructorReturn(_this);\\n    }\\n\\n    _this.setupChildLoader(masterPlaylistLoader, srcUrlOrPlaylist);\\n\\n    return _this;\\n  }\\n\\n  createClass(DashPlaylistLoader, [{\\n    key: 'setupChildLoader',\\n    value: function setupChildLoader(masterPlaylistLoader, playlist) {\\n      this.masterPlaylistLoader_ = masterPlaylistLoader;\\n      this.childPlaylist_ = playlist;\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.stopRequest();\\n      this.loadedPlaylists_ = {};\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaRequest_);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      this.off();\\n    }\\n  }, {\\n    key: 'hasPendingRequest',\\n    value: function hasPendingRequest() {\\n      return this.request || this.mediaRequest_;\\n    }\\n  }, {\\n    key: 'stopRequest',\\n    value: function stopRequest() {\\n      if (this.request) {\\n        var oldRequest = this.request;\\n        this.request = null;\\n        oldRequest.onreadystatechange = null;\\n        oldRequest.abort();\\n      }\\n    }\\n  }, {\\n    key: 'sidxRequestFinished_',\\n    value: function sidxRequestFinished_(playlist, master, startingState, doneFn) {\\n      var _this2 = this;\\n\\n      return function (err, request) {\\n        // disposed\\n        if (!_this2.request) {\\n          return;\\n        } // pending request is cleared\\n\\n\\n        _this2.request = null;\\n\\n        if (err) {\\n          _this2.error = {\\n            status: request.status,\\n            message: 'DASH playlist request error at URL: ' + playlist.uri,\\n            response: request.response,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (startingState) {\\n            _this2.state = startingState;\\n          }\\n\\n          _this2.trigger('error');\\n\\n          return doneFn(master, null);\\n        }\\n\\n        var bytes = new Uint8Array(request.response);\\n        var sidx = mux_js_lib_tools_mp4_inspector__WEBPACK_IMPORTED_MODULE_16___default.a.parseSidx(bytes.subarray(8));\\n        return doneFn(master, sidx);\\n      };\\n    }\\n  }, {\\n    key: 'media',\\n    value: function media(playlist) {\\n      var _this3 = this; // getter\\n\\n\\n      if (!playlist) {\\n        return this.media_;\\n      } // setter\\n\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        throw new Error('Cannot switch media playlist from ' + this.state);\\n      }\\n\\n      var startingState = this.state; // find the playlist object if the target playlist has been specified by URI\\n\\n      if (typeof playlist === 'string') {\\n        if (!this.master.playlists[playlist]) {\\n          throw new Error('Unknown playlist URI: ' + playlist);\\n        }\\n\\n        playlist = this.master.playlists[playlist];\\n      }\\n\\n      var mediaChange = !this.media_ || playlist.id !== this.media_.id; // switch to previously loaded playlists immediately\\n\\n      if (mediaChange && this.loadedPlaylists_[playlist.id] && this.loadedPlaylists_[playlist.id].endList) {\\n        this.state = 'HAVE_METADATA';\\n        this.media_ = playlist; // trigger media change if the active media has been updated\\n\\n        if (mediaChange) {\\n          this.trigger('mediachanging');\\n          this.trigger('mediachange');\\n        }\\n\\n        return;\\n      } // switching to the active playlist is a no-op\\n\\n\\n      if (!mediaChange) {\\n        return;\\n      } // switching from an already loaded playlist\\n\\n\\n      if (this.media_) {\\n        this.trigger('mediachanging');\\n      }\\n\\n      if (!playlist.sidx) {\\n        // Continue asynchronously if there is no sidx\\n        // wait one tick to allow haveMaster to run first on a child loader\\n        this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.haveMetadata.bind(this, {\\n          startingState: startingState,\\n          playlist: playlist\\n        }), 0); // exit early and don't do sidx work\\n\\n        return;\\n      } // we have sidx mappings\\n\\n\\n      var oldMaster = void 0;\\n      var sidxMapping = void 0; // sidxMapping is used when parsing the masterXml, so store\\n      // it on the masterPlaylistLoader\\n\\n      if (this.masterPlaylistLoader_) {\\n        oldMaster = this.masterPlaylistLoader_.master;\\n        sidxMapping = this.masterPlaylistLoader_.sidxMapping_;\\n      } else {\\n        oldMaster = this.master;\\n        sidxMapping = this.sidxMapping_;\\n      }\\n\\n      var sidxKey = generateSidxKey(playlist.sidx);\\n      sidxMapping[sidxKey] = {\\n        sidxInfo: playlist.sidx\\n      };\\n      this.request = requestSidx_(playlist.sidx, playlist, this.hls_.xhr, {\\n        handleManifestRedirects: this.handleManifestRedirects\\n      }, this.sidxRequestFinished_(playlist, oldMaster, startingState, function (newMaster, sidx) {\\n        if (!newMaster || !sidx) {\\n          throw new Error('failed to request sidx');\\n        } // update loader's sidxMapping with parsed sidx box\\n\\n\\n        sidxMapping[sidxKey].sidx = sidx; // everything is ready just continue to haveMetadata\\n\\n        _this3.haveMetadata({\\n          startingState: startingState,\\n          playlist: newMaster.playlists[playlist.id]\\n        });\\n      }));\\n    }\\n  }, {\\n    key: 'haveMetadata',\\n    value: function haveMetadata(_ref) {\\n      var startingState = _ref.startingState,\\n          playlist = _ref.playlist;\\n      this.state = 'HAVE_METADATA';\\n      this.loadedPlaylists_[playlist.id] = playlist;\\n      this.mediaRequest_ = null; // This will trigger loadedplaylist\\n\\n      this.refreshMedia_(playlist.id); // fire loadedmetadata the first time a media playlist is loaded\\n      // to resolve setup of media groups\\n\\n      if (startingState === 'HAVE_MASTER') {\\n        this.trigger('loadedmetadata');\\n      } else {\\n        // trigger media change if the active media has been updated\\n        this.trigger('mediachange');\\n      }\\n    }\\n  }, {\\n    key: 'pause',\\n    value: function pause() {\\n      this.stopRequest();\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\\n\\n      if (this.state === 'HAVE_NOTHING') {\\n        // If we pause the loader before any data has been retrieved, its as if we never\\n        // started, so reset to an unstarted state.\\n        this.started = false;\\n      }\\n    }\\n  }, {\\n    key: 'load',\\n    value: function load(isFinalRendition) {\\n      var _this4 = this;\\n\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.mediaUpdateTimeout);\\n      global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.minimumUpdatePeriodTimeout_);\\n      var media = this.media();\\n\\n      if (isFinalRendition) {\\n        var delay = media ? media.targetDuration / 2 * 1000 : 5 * 1000;\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          return _this4.load();\\n        }, delay);\\n        return;\\n      } // because the playlists are internal to the manifest, load should either load the\\n      // main manifest, or do nothing but trigger an event\\n\\n\\n      if (!this.started) {\\n        this.start();\\n        return;\\n      }\\n\\n      if (media && !media.endList) {\\n        this.trigger('mediaupdatetimeout');\\n      } else {\\n        this.trigger('loadedplaylist');\\n      }\\n    }\\n    /**\\n     * Parses the master xml string and updates playlist uri references\\n     *\\n     * @return {Object}\\n     *         The parsed mpd manifest object\\n     */\\n\\n  }, {\\n    key: 'parseMasterXml',\\n    value: function parseMasterXml() {\\n      var master = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_15__[\\\"parse\\\"])(this.masterXml_, {\\n        manifestUri: this.srcUrl,\\n        clientOffset: this.clientOffset_,\\n        sidxMapping: this.sidxMapping_\\n      });\\n      master.uri = this.srcUrl; // Set up phony URIs for the playlists since we won't have external URIs for DASH\\n      // but reference playlists by their URI throughout the project\\n      // TODO: Should we create the dummy uris in mpd-parser as well (leaning towards yes).\\n\\n      for (var i = 0; i < master.playlists.length; i++) {\\n        var phonyUri = 'placeholder-uri-' + i;\\n        master.playlists[i].uri = phonyUri;\\n      } // set up phony URIs for the media group playlists since we won't have external\\n      // URIs for DASH but reference playlists by their URI throughout the project\\n\\n\\n      forEachMediaGroup(master, function (properties, mediaType, groupKey, labelKey) {\\n        if (properties.playlists && properties.playlists.length) {\\n          var _phonyUri = 'placeholder-uri-' + mediaType + '-' + groupKey + '-' + labelKey;\\n\\n          var id = createPlaylistID(0, _phonyUri);\\n          properties.playlists[0].uri = _phonyUri;\\n          properties.playlists[0].id = id; // setup ID and URI references (URI for backwards compatibility)\\n\\n          master.playlists[id] = properties.playlists[0];\\n          master.playlists[_phonyUri] = properties.playlists[0];\\n        }\\n      });\\n      setupMediaPlaylists(master);\\n      resolveMediaGroupUris(master);\\n      return master;\\n    }\\n  }, {\\n    key: 'start',\\n    value: function start() {\\n      var _this5 = this;\\n\\n      this.started = true; // We don't need to request the master manifest again\\n      // Call this asynchronously to match the xhr request behavior below\\n\\n      if (this.masterPlaylistLoader_) {\\n        this.mediaRequest_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.haveMaster_.bind(this), 0);\\n        return;\\n      } // request the specified URL\\n\\n\\n      this.request = this.hls_.xhr({\\n        uri: this.srcUrl,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this5.request) {\\n          return;\\n        } // clear the loader's request reference\\n\\n\\n        _this5.request = null;\\n\\n        if (error) {\\n          _this5.error = {\\n            status: req.status,\\n            message: 'DASH playlist request error at URL: ' + _this5.srcUrl,\\n            responseText: req.responseText,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (_this5.state === 'HAVE_NOTHING') {\\n            _this5.started = false;\\n          }\\n\\n          return _this5.trigger('error');\\n        }\\n\\n        _this5.masterXml_ = req.responseText;\\n\\n        if (req.responseHeaders && req.responseHeaders.date) {\\n          _this5.masterLoaded_ = Date.parse(req.responseHeaders.date);\\n        } else {\\n          _this5.masterLoaded_ = Date.now();\\n        }\\n\\n        _this5.srcUrl = resolveManifestRedirect(_this5.handleManifestRedirects, _this5.srcUrl, req);\\n\\n        _this5.syncClientServerClock_(_this5.onClientServerClockSync_.bind(_this5));\\n      });\\n    }\\n    /**\\n     * Parses the master xml for UTCTiming node to sync the client clock to the server\\n     * clock. If the UTCTiming node requires a HEAD or GET request, that request is made.\\n     *\\n     * @param {Function} done\\n     *        Function to call when clock sync has completed\\n     */\\n\\n  }, {\\n    key: 'syncClientServerClock_',\\n    value: function syncClientServerClock_(done) {\\n      var _this6 = this;\\n\\n      var utcTiming = Object(mpd_parser__WEBPACK_IMPORTED_MODULE_15__[\\\"parseUTCTiming\\\"])(this.masterXml_); // No UTCTiming element found in the mpd. Use Date header from mpd request as the\\n      // server clock\\n\\n      if (utcTiming === null) {\\n        this.clientOffset_ = this.masterLoaded_ - Date.now();\\n        return done();\\n      }\\n\\n      if (utcTiming.method === 'DIRECT') {\\n        this.clientOffset_ = utcTiming.value - Date.now();\\n        return done();\\n      }\\n\\n      this.request = this.hls_.xhr({\\n        uri: resolveUrl(this.srcUrl, utcTiming.value),\\n        method: utcTiming.method,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this6.request) {\\n          return;\\n        }\\n\\n        if (error) {\\n          // sync request failed, fall back to using date header from mpd\\n          // TODO: log warning\\n          _this6.clientOffset_ = _this6.masterLoaded_ - Date.now();\\n          return done();\\n        }\\n\\n        var serverTime = void 0;\\n\\n        if (utcTiming.method === 'HEAD') {\\n          if (!req.responseHeaders || !req.responseHeaders.date) {\\n            // expected date header not preset, fall back to using date header from mpd\\n            // TODO: log warning\\n            serverTime = _this6.masterLoaded_;\\n          } else {\\n            serverTime = Date.parse(req.responseHeaders.date);\\n          }\\n        } else {\\n          serverTime = Date.parse(req.responseText);\\n        }\\n\\n        _this6.clientOffset_ = serverTime - Date.now();\\n        done();\\n      });\\n    }\\n  }, {\\n    key: 'haveMaster_',\\n    value: function haveMaster_() {\\n      this.state = 'HAVE_MASTER'; // clear media request\\n\\n      this.mediaRequest_ = null;\\n\\n      if (!this.masterPlaylistLoader_) {\\n        this.master = this.parseMasterXml(); // We have the master playlist at this point, so\\n        // trigger this to allow MasterPlaylistController\\n        // to make an initial playlist selection\\n\\n        this.trigger('loadedplaylist');\\n      } else if (!this.media_) {\\n        // no media playlist was specifically selected so select\\n        // the one the child playlist loader was created with\\n        this.media(this.childPlaylist_);\\n      }\\n    }\\n    /**\\n     * Handler for after client/server clock synchronization has happened. Sets up\\n     * xml refresh timer if specificed by the manifest.\\n     */\\n\\n  }, {\\n    key: 'onClientServerClockSync_',\\n    value: function onClientServerClockSync_() {\\n      var _this7 = this;\\n\\n      this.haveMaster_();\\n\\n      if (!this.hasPendingRequest() && !this.media_) {\\n        this.media(this.master.playlists[0]);\\n      } // TODO: minimumUpdatePeriod can have a value of 0. Currently the manifest will not\\n      // be refreshed when this is the case. The inter-op guide says that when the\\n      // minimumUpdatePeriod is 0, the manifest should outline all currently available\\n      // segments, but future segments may require an update. I think a good solution\\n      // would be to update the manifest at the same rate that the media playlists\\n      // are \\\"refreshed\\\", i.e. every targetDuration.\\n\\n\\n      if (this.master && this.master.minimumUpdatePeriod) {\\n        this.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this7.trigger('minimumUpdatePeriod');\\n        }, this.master.minimumUpdatePeriod);\\n      }\\n    }\\n    /**\\n     * Sends request to refresh the master xml and updates the parsed master manifest\\n     * TODO: Does the client offset need to be recalculated when the xml is refreshed?\\n     */\\n\\n  }, {\\n    key: 'refreshXml_',\\n    value: function refreshXml_() {\\n      var _this8 = this; // The srcUrl here *may* need to pass through handleManifestsRedirects when\\n      // sidx is implemented\\n\\n\\n      this.request = this.hls_.xhr({\\n        uri: this.srcUrl,\\n        withCredentials: this.withCredentials\\n      }, function (error, req) {\\n        // disposed\\n        if (!_this8.request) {\\n          return;\\n        } // clear the loader's request reference\\n\\n\\n        _this8.request = null;\\n\\n        if (error) {\\n          _this8.error = {\\n            status: req.status,\\n            message: 'DASH playlist request error at URL: ' + _this8.srcUrl,\\n            responseText: req.responseText,\\n            // MEDIA_ERR_NETWORK\\n            code: 2\\n          };\\n\\n          if (_this8.state === 'HAVE_NOTHING') {\\n            _this8.started = false;\\n          }\\n\\n          return _this8.trigger('error');\\n        }\\n\\n        _this8.masterXml_ = req.responseText; // This will filter out updated sidx info from the mapping\\n\\n        _this8.sidxMapping_ = filterChangedSidxMappings(_this8.masterXml_, _this8.srcUrl, _this8.clientOffset_, _this8.sidxMapping_);\\n\\n        var master = _this8.parseMasterXml();\\n\\n        var updatedMaster = updateMaster$1(_this8.master, master);\\n\\n        var currentSidxInfo = _this8.media().sidx;\\n\\n        if (updatedMaster) {\\n          if (currentSidxInfo) {\\n            var sidxKey = generateSidxKey(currentSidxInfo); // the sidx was updated, so the previous mapping was removed\\n\\n            if (!_this8.sidxMapping_[sidxKey]) {\\n              var playlist = _this8.media();\\n\\n              _this8.request = requestSidx_(playlist.sidx, playlist, _this8.hls_.xhr, {\\n                handleManifestRedirects: _this8.handleManifestRedirects\\n              }, _this8.sidxRequestFinished_(playlist, master, _this8.state, function (newMaster, sidx) {\\n                if (!newMaster || !sidx) {\\n                  throw new Error('failed to request sidx on minimumUpdatePeriod');\\n                } // update loader's sidxMapping with parsed sidx box\\n\\n\\n                _this8.sidxMapping_[sidxKey].sidx = sidx;\\n                _this8.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n                  _this8.trigger('minimumUpdatePeriod');\\n                }, _this8.master.minimumUpdatePeriod); // TODO: do we need to reload the current playlist?\\n\\n                _this8.refreshMedia_(_this8.media().id);\\n\\n                return;\\n              }));\\n            }\\n          } else {\\n            _this8.master = updatedMaster;\\n          }\\n        }\\n\\n        _this8.minimumUpdatePeriodTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this8.trigger('minimumUpdatePeriod');\\n        }, _this8.master.minimumUpdatePeriod);\\n      });\\n    }\\n    /**\\n     * Refreshes the media playlist by re-parsing the master xml and updating playlist\\n     * references. If this is an alternate loader, the updated parsed manifest is retrieved\\n     * from the master loader.\\n     */\\n\\n  }, {\\n    key: 'refreshMedia_',\\n    value: function refreshMedia_(mediaID) {\\n      var _this9 = this;\\n\\n      if (!mediaID) {\\n        throw new Error('refreshMedia_ must take a media id');\\n      }\\n\\n      var oldMaster = void 0;\\n      var newMaster = void 0;\\n\\n      if (this.masterPlaylistLoader_) {\\n        oldMaster = this.masterPlaylistLoader_.master;\\n        newMaster = this.masterPlaylistLoader_.parseMasterXml();\\n      } else {\\n        oldMaster = this.master;\\n        newMaster = this.parseMasterXml();\\n      }\\n\\n      var updatedMaster = updateMaster$1(oldMaster, newMaster);\\n\\n      if (updatedMaster) {\\n        if (this.masterPlaylistLoader_) {\\n          this.masterPlaylistLoader_.master = updatedMaster;\\n        } else {\\n          this.master = updatedMaster;\\n        }\\n\\n        this.media_ = updatedMaster.playlists[mediaID];\\n      } else {\\n        this.media_ = newMaster.playlists[mediaID];\\n        this.trigger('playlistunchanged');\\n      }\\n\\n      if (!this.media().endList) {\\n        this.mediaUpdateTimeout = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(function () {\\n          _this9.trigger('mediaupdatetimeout');\\n        }, refreshDelay(this.media(), !!updatedMaster));\\n      }\\n\\n      this.trigger('loadedplaylist');\\n    }\\n  }]);\\n  return DashPlaylistLoader;\\n}(EventTarget$1$1);\\n\\nvar logger = function logger(source) {\\n  if (videojs$1.log.debug) {\\n    return videojs$1.log.debug.bind(videojs$1, 'VHS:', source + ' >');\\n  }\\n\\n  return function () {};\\n};\\n\\nfunction noop() {}\\n/**\\n * @file source-updater.js\\n */\\n\\n/**\\n * A queue of callbacks to be serialized and applied when a\\n * MediaSource and its associated SourceBuffers are not in the\\n * updating state. It is used by the segment loader to update the\\n * underlying SourceBuffers when new data is loaded, for instance.\\n *\\n * @class SourceUpdater\\n * @param {MediaSource} mediaSource the MediaSource to create the\\n * SourceBuffer from\\n * @param {String} mimeType the desired MIME type of the underlying\\n * SourceBuffer\\n * @param {Object} sourceBufferEmitter an event emitter that fires when a source buffer is\\n * added to the media source\\n */\\n\\n\\nvar SourceUpdater = function () {\\n  function SourceUpdater(mediaSource, mimeType, type, sourceBufferEmitter) {\\n    classCallCheck(this, SourceUpdater);\\n    this.callbacks_ = [];\\n    this.pendingCallback_ = null;\\n    this.timestampOffset_ = 0;\\n    this.mediaSource = mediaSource;\\n    this.processedAppend_ = false;\\n    this.type_ = type;\\n    this.mimeType_ = mimeType;\\n    this.logger_ = logger('SourceUpdater[' + type + '][' + mimeType + ']');\\n\\n    if (mediaSource.readyState === 'closed') {\\n      mediaSource.addEventListener('sourceopen', this.createSourceBuffer_.bind(this, mimeType, sourceBufferEmitter));\\n    } else {\\n      this.createSourceBuffer_(mimeType, sourceBufferEmitter);\\n    }\\n  }\\n\\n  createClass(SourceUpdater, [{\\n    key: 'createSourceBuffer_',\\n    value: function createSourceBuffer_(mimeType, sourceBufferEmitter) {\\n      var _this = this;\\n\\n      this.sourceBuffer_ = this.mediaSource.addSourceBuffer(mimeType);\\n      this.logger_('created SourceBuffer');\\n\\n      if (sourceBufferEmitter) {\\n        sourceBufferEmitter.trigger('sourcebufferadded');\\n\\n        if (this.mediaSource.sourceBuffers.length < 2) {\\n          // There's another source buffer we must wait for before we can start updating\\n          // our own (or else we can get into a bad state, i.e., appending video/audio data\\n          // before the other video/audio source buffer is available and leading to a video\\n          // or audio only buffer).\\n          sourceBufferEmitter.on('sourcebufferadded', function () {\\n            _this.start_();\\n          });\\n          return;\\n        }\\n      }\\n\\n      this.start_();\\n    }\\n  }, {\\n    key: 'start_',\\n    value: function start_() {\\n      var _this2 = this;\\n\\n      this.started_ = true; // run completion handlers and process callbacks as updateend\\n      // events fire\\n\\n      this.onUpdateendCallback_ = function () {\\n        var pendingCallback = _this2.pendingCallback_;\\n        _this2.pendingCallback_ = null;\\n        _this2.sourceBuffer_.removing = false;\\n\\n        _this2.logger_('buffered [' + printableRange(_this2.buffered()) + ']');\\n\\n        if (pendingCallback) {\\n          pendingCallback();\\n        }\\n\\n        _this2.runCallback_();\\n      };\\n\\n      this.sourceBuffer_.addEventListener('updateend', this.onUpdateendCallback_);\\n      this.runCallback_();\\n    }\\n    /**\\n     * Aborts the current segment and resets the segment parser.\\n     *\\n     * @param {Function} done function to call when done\\n     * @see http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void\\n     */\\n\\n  }, {\\n    key: 'abort',\\n    value: function abort(done) {\\n      var _this3 = this;\\n\\n      if (this.processedAppend_) {\\n        this.queueCallback_(function () {\\n          _this3.sourceBuffer_.abort();\\n        }, done);\\n      }\\n    }\\n    /**\\n     * Queue an update to append an ArrayBuffer.\\n     *\\n     * @param {ArrayBuffer} bytes\\n     * @param {Function} done the function to call when done\\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data\\n     */\\n\\n  }, {\\n    key: 'appendBuffer',\\n    value: function appendBuffer(config, done) {\\n      var _this4 = this;\\n\\n      this.processedAppend_ = true;\\n      this.queueCallback_(function () {\\n        if (config.videoSegmentTimingInfoCallback) {\\n          _this4.sourceBuffer_.addEventListener('videoSegmentTimingInfo', config.videoSegmentTimingInfoCallback);\\n        }\\n\\n        _this4.sourceBuffer_.appendBuffer(config.bytes);\\n      }, function () {\\n        if (config.videoSegmentTimingInfoCallback) {\\n          _this4.sourceBuffer_.removeEventListener('videoSegmentTimingInfo', config.videoSegmentTimingInfoCallback);\\n        }\\n\\n        done();\\n      });\\n    }\\n    /**\\n     * Indicates what TimeRanges are buffered in the managed SourceBuffer.\\n     *\\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-buffered\\n     */\\n\\n  }, {\\n    key: 'buffered',\\n    value: function buffered() {\\n      if (!this.sourceBuffer_) {\\n        return videojs$1.createTimeRanges();\\n      }\\n\\n      return this.sourceBuffer_.buffered;\\n    }\\n    /**\\n     * Queue an update to remove a time range from the buffer.\\n     *\\n     * @param {Number} start where to start the removal\\n     * @param {Number} end where to end the removal\\n     * @param {Function} [done=noop] optional callback to be executed when the remove\\n     * operation is complete\\n     * @see http://www.w3.org/TR/media-source/#widl-SourceBuffer-remove-void-double-start-unrestricted-double-end\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end) {\\n      var _this5 = this;\\n\\n      var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;\\n\\n      if (this.processedAppend_) {\\n        this.queueCallback_(function () {\\n          _this5.logger_('remove [' + start + ' => ' + end + ']');\\n\\n          _this5.sourceBuffer_.removing = true;\\n\\n          _this5.sourceBuffer_.remove(start, end);\\n        }, done);\\n      }\\n    }\\n    /**\\n     * Whether the underlying sourceBuffer is updating or not\\n     *\\n     * @return {Boolean} the updating status of the SourceBuffer\\n     */\\n\\n  }, {\\n    key: 'updating',\\n    value: function updating() {\\n      // we are updating if the sourcebuffer is updating or\\n      return !this.sourceBuffer_ || this.sourceBuffer_.updating || // if we have a pending callback that is not our internal noop\\n      !!this.pendingCallback_ && this.pendingCallback_ !== noop;\\n    }\\n    /**\\n     * Set/get the timestampoffset on the SourceBuffer\\n     *\\n     * @return {Number} the timestamp offset\\n     */\\n\\n  }, {\\n    key: 'timestampOffset',\\n    value: function timestampOffset(offset) {\\n      var _this6 = this;\\n\\n      if (typeof offset !== 'undefined') {\\n        this.queueCallback_(function () {\\n          _this6.sourceBuffer_.timestampOffset = offset;\\n\\n          _this6.runCallback_();\\n        });\\n        this.timestampOffset_ = offset;\\n      }\\n\\n      return this.timestampOffset_;\\n    }\\n    /**\\n     * Queue a callback to run\\n     */\\n\\n  }, {\\n    key: 'queueCallback_',\\n    value: function queueCallback_(callback, done) {\\n      this.callbacks_.push([callback.bind(this), done]);\\n      this.runCallback_();\\n    }\\n    /**\\n     * Run a queued callback\\n     */\\n\\n  }, {\\n    key: 'runCallback_',\\n    value: function runCallback_() {\\n      var callbacks = void 0;\\n\\n      if (!this.updating() && this.callbacks_.length && this.started_) {\\n        callbacks = this.callbacks_.shift();\\n        this.pendingCallback_ = callbacks[1];\\n        callbacks[0]();\\n      }\\n    }\\n    /**\\n     * dispose of the source updater and the underlying sourceBuffer\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      var _this7 = this;\\n\\n      var disposeFn = function disposeFn() {\\n        if (_this7.sourceBuffer_ && _this7.mediaSource.readyState === 'open') {\\n          _this7.sourceBuffer_.abort();\\n        }\\n\\n        _this7.sourceBuffer_.removeEventListener('updateend', disposeFn);\\n      };\\n\\n      this.sourceBuffer_.removeEventListener('updateend', this.onUpdateendCallback_);\\n\\n      if (this.sourceBuffer_.removing) {\\n        this.sourceBuffer_.addEventListener('updateend', disposeFn);\\n      } else {\\n        disposeFn();\\n      }\\n    }\\n  }]);\\n  return SourceUpdater;\\n}();\\n\\nvar Config = {\\n  GOAL_BUFFER_LENGTH: 30,\\n  MAX_GOAL_BUFFER_LENGTH: 60,\\n  GOAL_BUFFER_LENGTH_RATE: 1,\\n  // 0.5 MB/s\\n  INITIAL_BANDWIDTH: 4194304,\\n  // A fudge factor to apply to advertised playlist bitrates to account for\\n  // temporary flucations in client bandwidth\\n  BANDWIDTH_VARIANCE: 1.2,\\n  // How much of the buffer must be filled before we consider upswitching\\n  BUFFER_LOW_WATER_LINE: 0,\\n  MAX_BUFFER_LOW_WATER_LINE: 30,\\n  BUFFER_LOW_WATER_LINE_RATE: 1\\n};\\nvar REQUEST_ERRORS = {\\n  FAILURE: 2,\\n  TIMEOUT: -101,\\n  ABORTED: -102\\n};\\n/**\\n * Abort all requests\\n *\\n * @param {Object} activeXhrs - an object that tracks all XHR requests\\n */\\n\\nvar abortAll = function abortAll(activeXhrs) {\\n  activeXhrs.forEach(function (xhr) {\\n    xhr.abort();\\n  });\\n};\\n/**\\n * Gather important bandwidth stats once a request has completed\\n *\\n * @param {Object} request - the XHR request from which to gather stats\\n */\\n\\n\\nvar getRequestStats = function getRequestStats(request) {\\n  return {\\n    bandwidth: request.bandwidth,\\n    bytesReceived: request.bytesReceived || 0,\\n    roundTripTime: request.roundTripTime || 0\\n  };\\n};\\n/**\\n * If possible gather bandwidth stats as a request is in\\n * progress\\n *\\n * @param {Event} progressEvent - an event object from an XHR's progress event\\n */\\n\\n\\nvar getProgressStats = function getProgressStats(progressEvent) {\\n  var request = progressEvent.target;\\n  var roundTripTime = Date.now() - request.requestTime;\\n  var stats = {\\n    bandwidth: Infinity,\\n    bytesReceived: 0,\\n    roundTripTime: roundTripTime || 0\\n  };\\n  stats.bytesReceived = progressEvent.loaded; // This can result in Infinity if stats.roundTripTime is 0 but that is ok\\n  // because we should only use bandwidth stats on progress to determine when\\n  // abort a request early due to insufficient bandwidth\\n\\n  stats.bandwidth = Math.floor(stats.bytesReceived / stats.roundTripTime * 8 * 1000);\\n  return stats;\\n};\\n/**\\n * Handle all error conditions in one place and return an object\\n * with all the information\\n *\\n * @param {Error|null} error - if non-null signals an error occured with the XHR\\n * @param {Object} request -  the XHR request that possibly generated the error\\n */\\n\\n\\nvar handleErrors = function handleErrors(error, request) {\\n  if (request.timedout) {\\n    return {\\n      status: request.status,\\n      message: 'HLS request timed-out at URL: ' + request.uri,\\n      code: REQUEST_ERRORS.TIMEOUT,\\n      xhr: request\\n    };\\n  }\\n\\n  if (request.aborted) {\\n    return {\\n      status: request.status,\\n      message: 'HLS request aborted at URL: ' + request.uri,\\n      code: REQUEST_ERRORS.ABORTED,\\n      xhr: request\\n    };\\n  }\\n\\n  if (error) {\\n    return {\\n      status: request.status,\\n      message: 'HLS request errored at URL: ' + request.uri,\\n      code: REQUEST_ERRORS.FAILURE,\\n      xhr: request\\n    };\\n  }\\n\\n  return null;\\n};\\n/**\\n * Handle responses for key data and convert the key data to the correct format\\n * for the decryption step later\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\\n *                                        this request\\n */\\n\\n\\nvar handleKeyResponse = function handleKeyResponse(segment, finishProcessingFn) {\\n  return function (error, request) {\\n    var response = request.response;\\n    var errorObj = handleErrors(error, request);\\n\\n    if (errorObj) {\\n      return finishProcessingFn(errorObj, segment);\\n    }\\n\\n    if (response.byteLength !== 16) {\\n      return finishProcessingFn({\\n        status: request.status,\\n        message: 'Invalid HLS key at URL: ' + request.uri,\\n        code: REQUEST_ERRORS.FAILURE,\\n        xhr: request\\n      }, segment);\\n    }\\n\\n    var view = new DataView(response);\\n    segment.key.bytes = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\\n    return finishProcessingFn(null, segment);\\n  };\\n};\\n/**\\n * Handle init-segment responses\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\\n *                                        this request\\n */\\n\\n\\nvar handleInitSegmentResponse = function handleInitSegmentResponse(segment, captionParser, finishProcessingFn) {\\n  return function (error, request) {\\n    var response = request.response;\\n    var errorObj = handleErrors(error, request);\\n\\n    if (errorObj) {\\n      return finishProcessingFn(errorObj, segment);\\n    } // stop processing if received empty content\\n\\n\\n    if (response.byteLength === 0) {\\n      return finishProcessingFn({\\n        status: request.status,\\n        message: 'Empty HLS segment content at URL: ' + request.uri,\\n        code: REQUEST_ERRORS.FAILURE,\\n        xhr: request\\n      }, segment);\\n    }\\n\\n    segment.map.bytes = new Uint8Array(request.response); // Initialize CaptionParser if it hasn't been yet\\n\\n    if (captionParser && !captionParser.isInitialized()) {\\n      captionParser.init();\\n    }\\n\\n    segment.map.timescales = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.timescale(segment.map.bytes);\\n    segment.map.videoTrackIds = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.videoTrackIds(segment.map.bytes);\\n    return finishProcessingFn(null, segment);\\n  };\\n};\\n/**\\n * Response handler for segment-requests being sure to set the correct\\n * property depending on whether the segment is encryped or not\\n * Also records and keeps track of stats that are used for ABR purposes\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} finishProcessingFn - a callback to execute to continue processing\\n *                                        this request\\n */\\n\\n\\nvar handleSegmentResponse = function handleSegmentResponse(segment, captionParser, finishProcessingFn) {\\n  return function (error, request) {\\n    var response = request.response;\\n    var errorObj = handleErrors(error, request);\\n    var parsed = void 0;\\n\\n    if (errorObj) {\\n      return finishProcessingFn(errorObj, segment);\\n    } // stop processing if received empty content\\n\\n\\n    if (response.byteLength === 0) {\\n      return finishProcessingFn({\\n        status: request.status,\\n        message: 'Empty HLS segment content at URL: ' + request.uri,\\n        code: REQUEST_ERRORS.FAILURE,\\n        xhr: request\\n      }, segment);\\n    }\\n\\n    segment.stats = getRequestStats(request);\\n\\n    if (segment.key) {\\n      segment.encryptedBytes = new Uint8Array(request.response);\\n    } else {\\n      segment.bytes = new Uint8Array(request.response);\\n    } // This is likely an FMP4 and has the init segment.\\n    // Run through the CaptionParser in case there are captions.\\n\\n\\n    if (captionParser && segment.map && segment.map.bytes) {\\n      // Initialize CaptionParser if it hasn't been yet\\n      if (!captionParser.isInitialized()) {\\n        captionParser.init();\\n      }\\n\\n      parsed = captionParser.parse(segment.bytes, segment.map.videoTrackIds, segment.map.timescales);\\n\\n      if (parsed && parsed.captions) {\\n        segment.captionStreams = parsed.captionStreams;\\n        segment.fmp4Captions = parsed.captions;\\n      }\\n    }\\n\\n    return finishProcessingFn(null, segment);\\n  };\\n};\\n/**\\n * Decrypt the segment via the decryption web worker\\n *\\n * @param {WebWorker} decrypter - a WebWorker interface to AES-128 decryption routines\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} doneFn - a callback that is executed after decryption has completed\\n */\\n\\n\\nvar decryptSegment = function decryptSegment(decrypter, segment, doneFn) {\\n  var decryptionHandler = function decryptionHandler(event) {\\n    if (event.data.source === segment.requestId) {\\n      decrypter.removeEventListener('message', decryptionHandler);\\n      var decrypted = event.data.decrypted;\\n      segment.bytes = new Uint8Array(decrypted.bytes, decrypted.byteOffset, decrypted.byteLength);\\n      return doneFn(null, segment);\\n    }\\n  };\\n\\n  decrypter.addEventListener('message', decryptionHandler);\\n  var keyBytes = void 0;\\n\\n  if (segment.key.bytes.slice) {\\n    keyBytes = segment.key.bytes.slice();\\n  } else {\\n    keyBytes = new Uint32Array(Array.prototype.slice.call(segment.key.bytes));\\n  } // this is an encrypted segment\\n  // incrementally decrypt the segment\\n\\n\\n  decrypter.postMessage(createTransferableMessage({\\n    source: segment.requestId,\\n    encrypted: segment.encryptedBytes,\\n    key: keyBytes,\\n    iv: segment.key.iv\\n  }), [segment.encryptedBytes.buffer, keyBytes.buffer]);\\n};\\n/**\\n * This function waits for all XHRs to finish (with either success or failure)\\n * before continueing processing via it's callback. The function gathers errors\\n * from each request into a single errors array so that the error status for\\n * each request can be examined later.\\n *\\n * @param {Object} activeXhrs - an object that tracks all XHR requests\\n * @param {WebWorker} decrypter - a WebWorker interface to AES-128 decryption routines\\n * @param {Function} doneFn - a callback that is executed after all resources have been\\n *                            downloaded and any decryption completed\\n */\\n\\n\\nvar waitForCompletion = function waitForCompletion(activeXhrs, decrypter, doneFn) {\\n  var count = 0;\\n  var didError = false;\\n  return function (error, segment) {\\n    if (didError) {\\n      return;\\n    }\\n\\n    if (error) {\\n      didError = true; // If there are errors, we have to abort any outstanding requests\\n\\n      abortAll(activeXhrs); // Even though the requests above are aborted, and in theory we could wait until we\\n      // handle the aborted events from those requests, there are some cases where we may\\n      // never get an aborted event. For instance, if the network connection is lost and\\n      // there were two requests, the first may have triggered an error immediately, while\\n      // the second request remains unsent. In that case, the aborted algorithm will not\\n      // trigger an abort: see https://xhr.spec.whatwg.org/#the-abort()-method\\n      //\\n      // We also can't rely on the ready state of the XHR, since the request that\\n      // triggered the connection error may also show as a ready state of 0 (unsent).\\n      // Therefore, we have to finish this group of requests immediately after the first\\n      // seen error.\\n\\n      return doneFn(error, segment);\\n    }\\n\\n    count += 1;\\n\\n    if (count === activeXhrs.length) {\\n      // Keep track of when *all* of the requests have completed\\n      segment.endOfAllRequests = Date.now();\\n\\n      if (segment.encryptedBytes) {\\n        return decryptSegment(decrypter, segment, doneFn);\\n      } // Otherwise, everything is ready just continue\\n\\n\\n      return doneFn(null, segment);\\n    }\\n  };\\n};\\n/**\\n * Simple progress event callback handler that gathers some stats before\\n * executing a provided callback with the `segment` object\\n *\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} progressFn - a callback that is executed each time a progress event\\n *                                is received\\n * @param {Event} event - the progress event object from XMLHttpRequest\\n */\\n\\n\\nvar handleProgress = function handleProgress(segment, progressFn) {\\n  return function (event) {\\n    segment.stats = videojs$1.mergeOptions(segment.stats, getProgressStats(event)); // record the time that we receive the first byte of data\\n\\n    if (!segment.stats.firstBytesReceivedAt && segment.stats.bytesReceived) {\\n      segment.stats.firstBytesReceivedAt = Date.now();\\n    }\\n\\n    return progressFn(event, segment);\\n  };\\n};\\n/**\\n * Load all resources and does any processing necessary for a media-segment\\n *\\n * Features:\\n *   decrypts the media-segment if it has a key uri and an iv\\n *   aborts *all* requests if *any* one request fails\\n *\\n * The segment object, at minimum, has the following format:\\n * {\\n *   resolvedUri: String,\\n *   [byterange]: {\\n *     offset: Number,\\n *     length: Number\\n *   },\\n *   [key]: {\\n *     resolvedUri: String\\n *     [byterange]: {\\n *       offset: Number,\\n *       length: Number\\n *     },\\n *     iv: {\\n *       bytes: Uint32Array\\n *     }\\n *   },\\n *   [map]: {\\n *     resolvedUri: String,\\n *     [byterange]: {\\n *       offset: Number,\\n *       length: Number\\n *     },\\n *     [bytes]: Uint8Array\\n *   }\\n * }\\n * ...where [name] denotes optional properties\\n *\\n * @param {Function} xhr - an instance of the xhr wrapper in xhr.js\\n * @param {Object} xhrOptions - the base options to provide to all xhr requests\\n * @param {WebWorker} decryptionWorker - a WebWorker interface to AES-128\\n *                                       decryption routines\\n * @param {Object} segment - a simplified copy of the segmentInfo object\\n *                           from SegmentLoader\\n * @param {Function} progressFn - a callback that receives progress events from the main\\n *                                segment's xhr request\\n * @param {Function} doneFn - a callback that is executed only once all requests have\\n *                            succeeded or failed\\n * @returns {Function} a function that, when invoked, immediately aborts all\\n *                     outstanding requests\\n */\\n\\n\\nvar mediaSegmentRequest = function mediaSegmentRequest(xhr, xhrOptions, decryptionWorker, captionParser, segment, progressFn, doneFn) {\\n  var activeXhrs = [];\\n  var finishProcessingFn = waitForCompletion(activeXhrs, decryptionWorker, doneFn); // optionally, request the decryption key\\n\\n  if (segment.key && !segment.key.bytes) {\\n    var keyRequestOptions = videojs$1.mergeOptions(xhrOptions, {\\n      uri: segment.key.resolvedUri,\\n      responseType: 'arraybuffer'\\n    });\\n    var keyRequestCallback = handleKeyResponse(segment, finishProcessingFn);\\n    var keyXhr = xhr(keyRequestOptions, keyRequestCallback);\\n    activeXhrs.push(keyXhr);\\n  } // optionally, request the associated media init segment\\n\\n\\n  if (segment.map && !segment.map.bytes) {\\n    var initSegmentOptions = videojs$1.mergeOptions(xhrOptions, {\\n      uri: segment.map.resolvedUri,\\n      responseType: 'arraybuffer',\\n      headers: segmentXhrHeaders(segment.map)\\n    });\\n    var initSegmentRequestCallback = handleInitSegmentResponse(segment, captionParser, finishProcessingFn);\\n    var initSegmentXhr = xhr(initSegmentOptions, initSegmentRequestCallback);\\n    activeXhrs.push(initSegmentXhr);\\n  }\\n\\n  var segmentRequestOptions = videojs$1.mergeOptions(xhrOptions, {\\n    uri: segment.resolvedUri,\\n    responseType: 'arraybuffer',\\n    headers: segmentXhrHeaders(segment)\\n  });\\n  var segmentRequestCallback = handleSegmentResponse(segment, captionParser, finishProcessingFn);\\n  var segmentXhr = xhr(segmentRequestOptions, segmentRequestCallback);\\n  segmentXhr.addEventListener('progress', handleProgress(segment, progressFn));\\n  activeXhrs.push(segmentXhr);\\n  return function () {\\n    return abortAll(activeXhrs);\\n  };\\n}; // Utilities\\n\\n/**\\n * Returns the CSS value for the specified property on an element\\n * using `getComputedStyle`. Firefox has a long-standing issue where\\n * getComputedStyle() may return null when running in an iframe with\\n * `display: none`.\\n *\\n * @see https://bugzilla.mozilla.org/show_bug.cgi?id=548397\\n * @param {HTMLElement} el the htmlelement to work on\\n * @param {string} the proprety to get the style for\\n */\\n\\n\\nvar safeGetComputedStyle = function safeGetComputedStyle(el, property) {\\n  var result = void 0;\\n\\n  if (!el) {\\n    return '';\\n  }\\n\\n  result = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.getComputedStyle(el);\\n\\n  if (!result) {\\n    return '';\\n  }\\n\\n  return result[property];\\n};\\n/**\\n * Resuable stable sort function\\n *\\n * @param {Playlists} array\\n * @param {Function} sortFn Different comparators\\n * @function stableSort\\n */\\n\\n\\nvar stableSort = function stableSort(array, sortFn) {\\n  var newArray = array.slice();\\n  array.sort(function (left, right) {\\n    var cmp = sortFn(left, right);\\n\\n    if (cmp === 0) {\\n      return newArray.indexOf(left) - newArray.indexOf(right);\\n    }\\n\\n    return cmp;\\n  });\\n};\\n/**\\n * A comparator function to sort two playlist object by bandwidth.\\n *\\n * @param {Object} left a media playlist object\\n * @param {Object} right a media playlist object\\n * @return {Number} Greater than zero if the bandwidth attribute of\\n * left is greater than the corresponding attribute of right. Less\\n * than zero if the bandwidth of right is greater than left and\\n * exactly zero if the two are equal.\\n */\\n\\n\\nvar comparePlaylistBandwidth = function comparePlaylistBandwidth(left, right) {\\n  var leftBandwidth = void 0;\\n  var rightBandwidth = void 0;\\n\\n  if (left.attributes.BANDWIDTH) {\\n    leftBandwidth = left.attributes.BANDWIDTH;\\n  }\\n\\n  leftBandwidth = leftBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n\\n  if (right.attributes.BANDWIDTH) {\\n    rightBandwidth = right.attributes.BANDWIDTH;\\n  }\\n\\n  rightBandwidth = rightBandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n  return leftBandwidth - rightBandwidth;\\n};\\n/**\\n * A comparator function to sort two playlist object by resolution (width).\\n * @param {Object} left a media playlist object\\n * @param {Object} right a media playlist object\\n * @return {Number} Greater than zero if the resolution.width attribute of\\n * left is greater than the corresponding attribute of right. Less\\n * than zero if the resolution.width of right is greater than left and\\n * exactly zero if the two are equal.\\n */\\n\\n\\nvar comparePlaylistResolution = function comparePlaylistResolution(left, right) {\\n  var leftWidth = void 0;\\n  var rightWidth = void 0;\\n\\n  if (left.attributes.RESOLUTION && left.attributes.RESOLUTION.width) {\\n    leftWidth = left.attributes.RESOLUTION.width;\\n  }\\n\\n  leftWidth = leftWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n\\n  if (right.attributes.RESOLUTION && right.attributes.RESOLUTION.width) {\\n    rightWidth = right.attributes.RESOLUTION.width;\\n  }\\n\\n  rightWidth = rightWidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE; // NOTE - Fallback to bandwidth sort as appropriate in cases where multiple renditions\\n  // have the same media dimensions/ resolution\\n\\n  if (leftWidth === rightWidth && left.attributes.BANDWIDTH && right.attributes.BANDWIDTH) {\\n    return left.attributes.BANDWIDTH - right.attributes.BANDWIDTH;\\n  }\\n\\n  return leftWidth - rightWidth;\\n};\\n/**\\n * Chooses the appropriate media playlist based on bandwidth and player size\\n *\\n * @param {Object} master\\n *        Object representation of the master manifest\\n * @param {Number} playerBandwidth\\n *        Current calculated bandwidth of the player\\n * @param {Number} playerWidth\\n *        Current width of the player element (should account for the device pixel ratio)\\n * @param {Number} playerHeight\\n *        Current height of the player element (should account for the device pixel ratio)\\n * @param {Boolean} limitRenditionByPlayerDimensions\\n *        True if the player width and height should be used during the selection, false otherwise\\n * @return {Playlist} the highest bitrate playlist less than the\\n * currently detected bandwidth, accounting for some amount of\\n * bandwidth variance\\n */\\n\\n\\nvar simpleSelector = function simpleSelector(master, playerBandwidth, playerWidth, playerHeight, limitRenditionByPlayerDimensions) {\\n  // convert the playlists to an intermediary representation to make comparisons easier\\n  var sortedPlaylistReps = master.playlists.map(function (playlist) {\\n    var width = void 0;\\n    var height = void 0;\\n    var bandwidth = void 0;\\n    width = playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.width;\\n    height = playlist.attributes.RESOLUTION && playlist.attributes.RESOLUTION.height;\\n    bandwidth = playlist.attributes.BANDWIDTH;\\n    bandwidth = bandwidth || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.Number.MAX_VALUE;\\n    return {\\n      bandwidth: bandwidth,\\n      width: width,\\n      height: height,\\n      playlist: playlist\\n    };\\n  });\\n  stableSort(sortedPlaylistReps, function (left, right) {\\n    return left.bandwidth - right.bandwidth;\\n  }); // filter out any playlists that have been excluded due to\\n  // incompatible configurations\\n\\n  sortedPlaylistReps = sortedPlaylistReps.filter(function (rep) {\\n    return !Playlist.isIncompatible(rep.playlist);\\n  }); // filter out any playlists that have been disabled manually through the representations\\n  // api or blacklisted temporarily due to playback errors.\\n\\n  var enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\\n    return Playlist.isEnabled(rep.playlist);\\n  });\\n\\n  if (!enabledPlaylistReps.length) {\\n    // if there are no enabled playlists, then they have all been blacklisted or disabled\\n    // by the user through the representations api. In this case, ignore blacklisting and\\n    // fallback to what the user wants by using playlists the user has not disabled.\\n    enabledPlaylistReps = sortedPlaylistReps.filter(function (rep) {\\n      return !Playlist.isDisabled(rep.playlist);\\n    });\\n  } // filter out any variant that has greater effective bitrate\\n  // than the current estimated bandwidth\\n\\n\\n  var bandwidthPlaylistReps = enabledPlaylistReps.filter(function (rep) {\\n    return rep.bandwidth * Config.BANDWIDTH_VARIANCE < playerBandwidth;\\n  });\\n  var highestRemainingBandwidthRep = bandwidthPlaylistReps[bandwidthPlaylistReps.length - 1]; // get all of the renditions with the same (highest) bandwidth\\n  // and then taking the very first element\\n\\n  var bandwidthBestRep = bandwidthPlaylistReps.filter(function (rep) {\\n    return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\\n  })[0]; // if we're not going to limit renditions by player size, make an early decision.\\n\\n  if (limitRenditionByPlayerDimensions === false) {\\n    var _chosenRep = bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\\n\\n    return _chosenRep ? _chosenRep.playlist : null;\\n  } // filter out playlists without resolution information\\n\\n\\n  var haveResolution = bandwidthPlaylistReps.filter(function (rep) {\\n    return rep.width && rep.height;\\n  }); // sort variants by resolution\\n\\n  stableSort(haveResolution, function (left, right) {\\n    return left.width - right.width;\\n  }); // if we have the exact resolution as the player use it\\n\\n  var resolutionBestRepList = haveResolution.filter(function (rep) {\\n    return rep.width === playerWidth && rep.height === playerHeight;\\n  });\\n  highestRemainingBandwidthRep = resolutionBestRepList[resolutionBestRepList.length - 1]; // ensure that we pick the highest bandwidth variant that have exact resolution\\n\\n  var resolutionBestRep = resolutionBestRepList.filter(function (rep) {\\n    return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\\n  })[0];\\n  var resolutionPlusOneList = void 0;\\n  var resolutionPlusOneSmallest = void 0;\\n  var resolutionPlusOneRep = void 0; // find the smallest variant that is larger than the player\\n  // if there is no match of exact resolution\\n\\n  if (!resolutionBestRep) {\\n    resolutionPlusOneList = haveResolution.filter(function (rep) {\\n      return rep.width > playerWidth || rep.height > playerHeight;\\n    }); // find all the variants have the same smallest resolution\\n\\n    resolutionPlusOneSmallest = resolutionPlusOneList.filter(function (rep) {\\n      return rep.width === resolutionPlusOneList[0].width && rep.height === resolutionPlusOneList[0].height;\\n    }); // ensure that we also pick the highest bandwidth variant that\\n    // is just-larger-than the video player\\n\\n    highestRemainingBandwidthRep = resolutionPlusOneSmallest[resolutionPlusOneSmallest.length - 1];\\n    resolutionPlusOneRep = resolutionPlusOneSmallest.filter(function (rep) {\\n      return rep.bandwidth === highestRemainingBandwidthRep.bandwidth;\\n    })[0];\\n  } // fallback chain of variants\\n\\n\\n  var chosenRep = resolutionPlusOneRep || resolutionBestRep || bandwidthBestRep || enabledPlaylistReps[0] || sortedPlaylistReps[0];\\n  return chosenRep ? chosenRep.playlist : null;\\n}; // Playlist Selectors\\n\\n/**\\n * Chooses the appropriate media playlist based on the most recent\\n * bandwidth estimate and the player size.\\n *\\n * Expects to be called within the context of an instance of HlsHandler\\n *\\n * @return {Playlist} the highest bitrate playlist less than the\\n * currently detected bandwidth, accounting for some amount of\\n * bandwidth variance\\n */\\n\\n\\nvar lastBandwidthSelector = function lastBandwidthSelector() {\\n  var pixelRatio = this.useDevicePixelRatio ? global_window__WEBPACK_IMPORTED_MODULE_0___default.a.devicePixelRatio || 1 : 1;\\n  return simpleSelector(this.playlists.master, this.systemBandwidth, parseInt(safeGetComputedStyle(this.tech_.el(), 'width'), 10) * pixelRatio, parseInt(safeGetComputedStyle(this.tech_.el(), 'height'), 10) * pixelRatio, this.limitRenditionByPlayerDimensions);\\n};\\n/**\\n * Chooses the appropriate media playlist based on the potential to rebuffer\\n *\\n * @param {Object} settings\\n *        Object of information required to use this selector\\n * @param {Object} settings.master\\n *        Object representation of the master manifest\\n * @param {Number} settings.currentTime\\n *        The current time of the player\\n * @param {Number} settings.bandwidth\\n *        Current measured bandwidth\\n * @param {Number} settings.duration\\n *        Duration of the media\\n * @param {Number} settings.segmentDuration\\n *        Segment duration to be used in round trip time calculations\\n * @param {Number} settings.timeUntilRebuffer\\n *        Time left in seconds until the player has to rebuffer\\n * @param {Number} settings.currentTimeline\\n *        The current timeline segments are being loaded from\\n * @param {SyncController} settings.syncController\\n *        SyncController for determining if we have a sync point for a given playlist\\n * @return {Object|null}\\n *         {Object} return.playlist\\n *         The highest bandwidth playlist with the least amount of rebuffering\\n *         {Number} return.rebufferingImpact\\n *         The amount of time in seconds switching to this playlist will rebuffer. A\\n *         negative value means that switching will cause zero rebuffering.\\n */\\n\\n\\nvar minRebufferMaxBandwidthSelector = function minRebufferMaxBandwidthSelector(settings) {\\n  var master = settings.master,\\n      currentTime = settings.currentTime,\\n      bandwidth = settings.bandwidth,\\n      duration$$1 = settings.duration,\\n      segmentDuration = settings.segmentDuration,\\n      timeUntilRebuffer = settings.timeUntilRebuffer,\\n      currentTimeline = settings.currentTimeline,\\n      syncController = settings.syncController; // filter out any playlists that have been excluded due to\\n  // incompatible configurations\\n\\n  var compatiblePlaylists = master.playlists.filter(function (playlist) {\\n    return !Playlist.isIncompatible(playlist);\\n  }); // filter out any playlists that have been disabled manually through the representations\\n  // api or blacklisted temporarily due to playback errors.\\n\\n  var enabledPlaylists = compatiblePlaylists.filter(Playlist.isEnabled);\\n\\n  if (!enabledPlaylists.length) {\\n    // if there are no enabled playlists, then they have all been blacklisted or disabled\\n    // by the user through the representations api. In this case, ignore blacklisting and\\n    // fallback to what the user wants by using playlists the user has not disabled.\\n    enabledPlaylists = compatiblePlaylists.filter(function (playlist) {\\n      return !Playlist.isDisabled(playlist);\\n    });\\n  }\\n\\n  var bandwidthPlaylists = enabledPlaylists.filter(Playlist.hasAttribute.bind(null, 'BANDWIDTH'));\\n  var rebufferingEstimates = bandwidthPlaylists.map(function (playlist) {\\n    var syncPoint = syncController.getSyncPoint(playlist, duration$$1, currentTimeline, currentTime); // If there is no sync point for this playlist, switching to it will require a\\n    // sync request first. This will double the request time\\n\\n    var numRequests = syncPoint ? 1 : 2;\\n    var requestTimeEstimate = Playlist.estimateSegmentRequestTime(segmentDuration, bandwidth, playlist);\\n    var rebufferingImpact = requestTimeEstimate * numRequests - timeUntilRebuffer;\\n    return {\\n      playlist: playlist,\\n      rebufferingImpact: rebufferingImpact\\n    };\\n  });\\n  var noRebufferingPlaylists = rebufferingEstimates.filter(function (estimate) {\\n    return estimate.rebufferingImpact <= 0;\\n  }); // Sort by bandwidth DESC\\n\\n  stableSort(noRebufferingPlaylists, function (a, b) {\\n    return comparePlaylistBandwidth(b.playlist, a.playlist);\\n  });\\n\\n  if (noRebufferingPlaylists.length) {\\n    return noRebufferingPlaylists[0];\\n  }\\n\\n  stableSort(rebufferingEstimates, function (a, b) {\\n    return a.rebufferingImpact - b.rebufferingImpact;\\n  });\\n  return rebufferingEstimates[0] || null;\\n};\\n/**\\n * Chooses the appropriate media playlist, which in this case is the lowest bitrate\\n * one with video.  If no renditions with video exist, return the lowest audio rendition.\\n *\\n * Expects to be called within the context of an instance of HlsHandler\\n *\\n * @return {Object|null}\\n *         {Object} return.playlist\\n *         The lowest bitrate playlist that contains a video codec.  If no such rendition\\n *         exists pick the lowest audio rendition.\\n */\\n\\n\\nvar lowestBitrateCompatibleVariantSelector = function lowestBitrateCompatibleVariantSelector() {\\n  // filter out any playlists that have been excluded due to\\n  // incompatible configurations or playback errors\\n  var playlists = this.playlists.master.playlists.filter(Playlist.isEnabled); // Sort ascending by bitrate\\n\\n  stableSort(playlists, function (a, b) {\\n    return comparePlaylistBandwidth(a, b);\\n  }); // Parse and assume that playlists with no video codec have no video\\n  // (this is not necessarily true, although it is generally true).\\n  //\\n  // If an entire manifest has no valid videos everything will get filtered\\n  // out.\\n\\n  var playlistsWithVideo = playlists.filter(function (playlist) {\\n    return parseCodecs(playlist.attributes.CODECS).videoCodec;\\n  });\\n  return playlistsWithVideo[0] || null;\\n};\\n/**\\n * Create captions text tracks on video.js if they do not exist\\n *\\n * @param {Object} inbandTextTracks a reference to current inbandTextTracks\\n * @param {Object} tech the video.js tech\\n * @param {Object} captionStreams the caption streams to create\\n * @private\\n */\\n\\n\\nvar createCaptionsTrackIfNotExists = function createCaptionsTrackIfNotExists(inbandTextTracks, tech, captionStreams) {\\n  for (var trackId in captionStreams) {\\n    if (!inbandTextTracks[trackId]) {\\n      tech.trigger({\\n        type: 'usage',\\n        name: 'hls-608'\\n      });\\n      var track = tech.textTracks().getTrackById(trackId);\\n\\n      if (track) {\\n        // Resuse an existing track with a CC# id because this was\\n        // very likely created by videojs-contrib-hls from information\\n        // in the m3u8 for us to use\\n        inbandTextTracks[trackId] = track;\\n      } else {\\n        // Otherwise, create a track with the default `CC#` label and\\n        // without a language\\n        inbandTextTracks[trackId] = tech.addRemoteTextTrack({\\n          kind: 'captions',\\n          id: trackId,\\n          label: trackId\\n        }, false).track;\\n      }\\n    }\\n  }\\n};\\n\\nvar addCaptionData = function addCaptionData(_ref) {\\n  var inbandTextTracks = _ref.inbandTextTracks,\\n      captionArray = _ref.captionArray,\\n      timestampOffset = _ref.timestampOffset;\\n\\n  if (!captionArray) {\\n    return;\\n  }\\n\\n  var Cue = window.WebKitDataCue || window.VTTCue;\\n  captionArray.forEach(function (caption) {\\n    var track = caption.stream;\\n    var startTime = caption.startTime;\\n    var endTime = caption.endTime;\\n\\n    if (!inbandTextTracks[track]) {\\n      return;\\n    }\\n\\n    startTime += timestampOffset;\\n    endTime += timestampOffset;\\n    inbandTextTracks[track].addCue(new Cue(startTime, endTime, caption.text));\\n  });\\n};\\n/**\\n * @file segment-loader.js\\n */\\n// in ms\\n\\n\\nvar CHECK_BUFFER_DELAY = 500;\\n/**\\n * Determines if we should call endOfStream on the media source based\\n * on the state of the buffer or if appened segment was the final\\n * segment in the playlist.\\n *\\n * @param {Object} playlist a media playlist object\\n * @param {Object} mediaSource the MediaSource object\\n * @param {Number} segmentIndex the index of segment we last appended\\n * @returns {Boolean} do we need to call endOfStream on the MediaSource\\n */\\n\\nvar detectEndOfStream = function detectEndOfStream(playlist, mediaSource, segmentIndex) {\\n  if (!playlist || !mediaSource) {\\n    return false;\\n  }\\n\\n  var segments = playlist.segments; // determine a few boolean values to help make the branch below easier\\n  // to read\\n\\n  var appendedLastSegment = segmentIndex === segments.length; // if we've buffered to the end of the video, we need to call endOfStream\\n  // so that MediaSources can trigger the `ended` event when it runs out of\\n  // buffered data instead of waiting for me\\n\\n  return playlist.endList && mediaSource.readyState === 'open' && appendedLastSegment;\\n};\\n\\nvar finite = function finite(num) {\\n  return typeof num === 'number' && isFinite(num);\\n};\\n\\nvar illegalMediaSwitch = function illegalMediaSwitch(loaderType, startingMedia, newSegmentMedia) {\\n  // Although these checks should most likely cover non 'main' types, for now it narrows\\n  // the scope of our checks.\\n  if (loaderType !== 'main' || !startingMedia || !newSegmentMedia) {\\n    return null;\\n  }\\n\\n  if (!newSegmentMedia.containsAudio && !newSegmentMedia.containsVideo) {\\n    return 'Neither audio nor video found in segment.';\\n  }\\n\\n  if (startingMedia.containsVideo && !newSegmentMedia.containsVideo) {\\n    return 'Only audio found in segment when we expected video.' + ' We can\\\\'t switch to audio only from a stream that had video.' + ' To get rid of this message, please add codec information to the manifest.';\\n  }\\n\\n  if (!startingMedia.containsVideo && newSegmentMedia.containsVideo) {\\n    return 'Video found in segment when we expected only audio.' + ' We can\\\\'t switch to a stream with video from an audio only stream.' + ' To get rid of this message, please add codec information to the manifest.';\\n  }\\n\\n  return null;\\n};\\n/**\\n * Calculates a time value that is safe to remove from the back buffer without interupting\\n * playback.\\n *\\n * @param {TimeRange} seekable\\n *        The current seekable range\\n * @param {Number} currentTime\\n *        The current time of the player\\n * @param {Number} targetDuration\\n *        The target duration of the current playlist\\n * @return {Number}\\n *         Time that is safe to remove from the back buffer without interupting playback\\n */\\n\\n\\nvar safeBackBufferTrimTime = function safeBackBufferTrimTime(seekable$$1, currentTime, targetDuration) {\\n  // 30 seconds before the playhead provides a safe default for trimming.\\n  //\\n  // Choosing a reasonable default is particularly important for high bitrate content and\\n  // VOD videos/live streams with large windows, as the buffer may end up overfilled and\\n  // throw an APPEND_BUFFER_ERR.\\n  var trimTime = currentTime - 30;\\n\\n  if (seekable$$1.length) {\\n    // Some live playlists may have a shorter window of content than the full allowed back\\n    // buffer. For these playlists, don't save content that's no longer within the window.\\n    trimTime = Math.max(trimTime, seekable$$1.start(0));\\n  } // Don't remove within target duration of the current time to avoid the possibility of\\n  // removing the GOP currently being played, as removing it can cause playback stalls.\\n\\n\\n  var maxTrimTime = currentTime - targetDuration;\\n  return Math.min(maxTrimTime, trimTime);\\n};\\n\\nvar segmentInfoString = function segmentInfoString(segmentInfo) {\\n  var _segmentInfo$segment = segmentInfo.segment,\\n      start = _segmentInfo$segment.start,\\n      end = _segmentInfo$segment.end,\\n      _segmentInfo$playlist = segmentInfo.playlist,\\n      seq = _segmentInfo$playlist.mediaSequence,\\n      id = _segmentInfo$playlist.id,\\n      _segmentInfo$playlist2 = _segmentInfo$playlist.segments,\\n      segments = _segmentInfo$playlist2 === undefined ? [] : _segmentInfo$playlist2,\\n      index = segmentInfo.mediaIndex,\\n      timeline = segmentInfo.timeline;\\n  return ['appending [' + index + '] of [' + seq + ', ' + (seq + segments.length) + '] from playlist [' + id + ']', '[' + start + ' => ' + end + '] in timeline [' + timeline + ']'].join(' ');\\n};\\n/**\\n * An object that manages segment loading and appending.\\n *\\n * @class SegmentLoader\\n * @param {Object} options required and optional options\\n * @extends videojs.EventTarget\\n */\\n\\n\\nvar SegmentLoader = function (_videojs$EventTarget) {\\n  inherits(SegmentLoader, _videojs$EventTarget);\\n\\n  function SegmentLoader(settings) {\\n    classCallCheck(this, SegmentLoader); // check pre-conditions\\n\\n    var _this = possibleConstructorReturn(this, (SegmentLoader.__proto__ || Object.getPrototypeOf(SegmentLoader)).call(this));\\n\\n    if (!settings) {\\n      throw new TypeError('Initialization settings are required');\\n    }\\n\\n    if (typeof settings.currentTime !== 'function') {\\n      throw new TypeError('No currentTime getter specified');\\n    }\\n\\n    if (!settings.mediaSource) {\\n      throw new TypeError('No MediaSource specified');\\n    } // public properties\\n\\n\\n    _this.bandwidth = settings.bandwidth;\\n    _this.throughput = {\\n      rate: 0,\\n      count: 0\\n    };\\n    _this.roundTrip = NaN;\\n\\n    _this.resetStats_();\\n\\n    _this.mediaIndex = null; // private settings\\n\\n    _this.hasPlayed_ = settings.hasPlayed;\\n    _this.currentTime_ = settings.currentTime;\\n    _this.seekable_ = settings.seekable;\\n    _this.seeking_ = settings.seeking;\\n    _this.duration_ = settings.duration;\\n    _this.mediaSource_ = settings.mediaSource;\\n    _this.hls_ = settings.hls;\\n    _this.loaderType_ = settings.loaderType;\\n    _this.startingMedia_ = void 0;\\n    _this.segmentMetadataTrack_ = settings.segmentMetadataTrack;\\n    _this.goalBufferLength_ = settings.goalBufferLength;\\n    _this.sourceType_ = settings.sourceType;\\n    _this.inbandTextTracks_ = settings.inbandTextTracks;\\n    _this.state_ = 'INIT'; // private instance variables\\n\\n    _this.checkBufferTimeout_ = null;\\n    _this.error_ = void 0;\\n    _this.currentTimeline_ = -1;\\n    _this.pendingSegment_ = null;\\n    _this.mimeType_ = null;\\n    _this.sourceUpdater_ = null;\\n    _this.xhrOptions_ = null; // Fragmented mp4 playback\\n\\n    _this.activeInitSegmentId_ = null;\\n    _this.initSegments_ = {}; // HLSe playback\\n\\n    _this.cacheEncryptionKeys_ = settings.cacheEncryptionKeys;\\n    _this.keyCache_ = {}; // Fmp4 CaptionParser\\n\\n    if (_this.loaderType_ === 'main') {\\n      _this.captionParser_ = new mux_js_lib_mp4_caption_parser__WEBPACK_IMPORTED_MODULE_18___default.a();\\n    } else {\\n      _this.captionParser_ = null;\\n    }\\n\\n    _this.decrypter_ = settings.decrypter; // Manages the tracking and generation of sync-points, mappings\\n    // between a time in the display time and a segment index within\\n    // a playlist\\n\\n    _this.syncController_ = settings.syncController;\\n    _this.syncPoint_ = {\\n      segmentIndex: 0,\\n      time: 0\\n    };\\n\\n    _this.triggerSyncInfoUpdate_ = function () {\\n      return _this.trigger('syncinfoupdate');\\n    };\\n\\n    _this.syncController_.on('syncinfoupdate', _this.triggerSyncInfoUpdate_);\\n\\n    _this.mediaSource_.addEventListener('sourceopen', function () {\\n      return _this.ended_ = false;\\n    }); // ...for determining the fetch location\\n\\n\\n    _this.fetchAtBuffer_ = false;\\n    _this.logger_ = logger('SegmentLoader[' + _this.loaderType_ + ']');\\n    Object.defineProperty(_this, 'state', {\\n      get: function get$$1() {\\n        return this.state_;\\n      },\\n      set: function set$$1(newState) {\\n        if (newState !== this.state_) {\\n          this.logger_(this.state_ + ' -> ' + newState);\\n          this.state_ = newState;\\n        }\\n      }\\n    });\\n    return _this;\\n  }\\n  /**\\n   * reset all of our media stats\\n   *\\n   * @private\\n   */\\n\\n\\n  createClass(SegmentLoader, [{\\n    key: 'resetStats_',\\n    value: function resetStats_() {\\n      this.mediaBytesTransferred = 0;\\n      this.mediaRequests = 0;\\n      this.mediaRequestsAborted = 0;\\n      this.mediaRequestsTimedout = 0;\\n      this.mediaRequestsErrored = 0;\\n      this.mediaTransferDuration = 0;\\n      this.mediaSecondsLoaded = 0;\\n    }\\n    /**\\n     * dispose of the SegmentLoader and reset to the default state\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.state = 'DISPOSED';\\n      this.pause();\\n      this.abort_();\\n\\n      if (this.sourceUpdater_) {\\n        this.sourceUpdater_.dispose();\\n      }\\n\\n      this.resetStats_();\\n\\n      if (this.captionParser_) {\\n        this.captionParser_.reset();\\n      }\\n\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n      }\\n\\n      if (this.syncController_ && this.triggerSyncInfoUpdate_) {\\n        this.syncController_.off('syncinfoupdate', this.triggerSyncInfoUpdate_);\\n      }\\n\\n      this.off();\\n    }\\n    /**\\n     * abort anything that is currently doing on with the SegmentLoader\\n     * and reset to a default state\\n     */\\n\\n  }, {\\n    key: 'abort',\\n    value: function abort() {\\n      if (this.state !== 'WAITING') {\\n        if (this.pendingSegment_) {\\n          this.pendingSegment_ = null;\\n        }\\n\\n        return;\\n      }\\n\\n      this.abort_(); // We aborted the requests we were waiting on, so reset the loader's state to READY\\n      // since we are no longer \\\"waiting\\\" on any requests. XHR callback is not always run\\n      // when the request is aborted. This will prevent the loader from being stuck in the\\n      // WAITING state indefinitely.\\n\\n      this.state = 'READY'; // don't wait for buffer check timeouts to begin fetching the\\n      // next segment\\n\\n      if (!this.paused()) {\\n        this.monitorBuffer_();\\n      }\\n    }\\n    /**\\n     * abort all pending xhr requests and null any pending segements\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'abort_',\\n    value: function abort_() {\\n      if (this.pendingSegment_) {\\n        this.pendingSegment_.abortRequests();\\n      } // clear out the segment being processed\\n\\n\\n      this.pendingSegment_ = null;\\n    }\\n    /**\\n     * set an error on the segment loader and null out any pending segements\\n     *\\n     * @param {Error} error the error to set on the SegmentLoader\\n     * @return {Error} the error that was set or that is currently set\\n     */\\n\\n  }, {\\n    key: 'error',\\n    value: function error(_error) {\\n      if (typeof _error !== 'undefined') {\\n        this.error_ = _error;\\n      }\\n\\n      this.pendingSegment_ = null;\\n      return this.error_;\\n    }\\n  }, {\\n    key: 'endOfStream',\\n    value: function endOfStream() {\\n      this.ended_ = true;\\n      this.pause();\\n      this.trigger('ended');\\n    }\\n    /**\\n     * Indicates which time ranges are buffered\\n     *\\n     * @return {TimeRange}\\n     *         TimeRange object representing the current buffered ranges\\n     */\\n\\n  }, {\\n    key: 'buffered_',\\n    value: function buffered_() {\\n      if (!this.sourceUpdater_) {\\n        return videojs$1.createTimeRanges();\\n      }\\n\\n      return this.sourceUpdater_.buffered();\\n    }\\n    /**\\n     * Gets and sets init segment for the provided map\\n     *\\n     * @param {Object} map\\n     *        The map object representing the init segment to get or set\\n     * @param {Boolean=} set\\n     *        If true, the init segment for the provided map should be saved\\n     * @return {Object}\\n     *         map object for desired init segment\\n     */\\n\\n  }, {\\n    key: 'initSegment',\\n    value: function initSegment(map) {\\n      var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\\n\\n      if (!map) {\\n        return null;\\n      }\\n\\n      var id = initSegmentId(map);\\n      var storedMap = this.initSegments_[id];\\n\\n      if (set$$1 && !storedMap && map.bytes) {\\n        this.initSegments_[id] = storedMap = {\\n          resolvedUri: map.resolvedUri,\\n          byterange: map.byterange,\\n          bytes: map.bytes,\\n          timescales: map.timescales,\\n          videoTrackIds: map.videoTrackIds\\n        };\\n      }\\n\\n      return storedMap || map;\\n    }\\n    /**\\n     * Gets and sets key for the provided key\\n     *\\n     * @param {Object} key\\n     *        The key object representing the key to get or set\\n     * @param {Boolean=} set\\n     *        If true, the key for the provided key should be saved\\n     * @return {Object}\\n     *         Key object for desired key\\n     */\\n\\n  }, {\\n    key: 'segmentKey',\\n    value: function segmentKey(key) {\\n      var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\\n\\n      if (!key) {\\n        return null;\\n      }\\n\\n      var id = segmentKeyId(key);\\n      var storedKey = this.keyCache_[id]; // TODO: We should use the HTTP Expires header to invalidate our cache per\\n      // https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-6.2.3\\n\\n      if (this.cacheEncryptionKeys_ && set$$1 && !storedKey && key.bytes) {\\n        this.keyCache_[id] = storedKey = {\\n          resolvedUri: key.resolvedUri,\\n          bytes: key.bytes\\n        };\\n      }\\n\\n      var result = {\\n        resolvedUri: (storedKey || key).resolvedUri\\n      };\\n\\n      if (storedKey) {\\n        result.bytes = storedKey.bytes;\\n      }\\n\\n      return result;\\n    }\\n    /**\\n     * Returns true if all configuration required for loading is present, otherwise false.\\n     *\\n     * @return {Boolean} True if the all configuration is ready for loading\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'couldBeginLoading_',\\n    value: function couldBeginLoading_() {\\n      return this.playlist_ && ( // the source updater is created when init_ is called, so either having a\\n      // source updater or being in the INIT state with a mimeType is enough\\n      // to say we have all the needed configuration to start loading.\\n      this.sourceUpdater_ || this.mimeType_ && this.state === 'INIT') && !this.paused();\\n    }\\n    /**\\n     * load a playlist and start to fill the buffer\\n     */\\n\\n  }, {\\n    key: 'load',\\n    value: function load() {\\n      // un-pause\\n      this.monitorBuffer_(); // if we don't have a playlist yet, keep waiting for one to be\\n      // specified\\n\\n      if (!this.playlist_) {\\n        return;\\n      } // not sure if this is the best place for this\\n\\n\\n      this.syncController_.setDateTimeMapping(this.playlist_); // if all the configuration is ready, initialize and begin loading\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        return this.init_();\\n      } // if we're in the middle of processing a segment already, don't\\n      // kick off an additional segment request\\n\\n\\n      if (!this.couldBeginLoading_() || this.state !== 'READY' && this.state !== 'INIT') {\\n        return;\\n      }\\n\\n      this.state = 'READY';\\n    }\\n    /**\\n     * Once all the starting parameters have been specified, begin\\n     * operation. This method should only be invoked from the INIT\\n     * state.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'init_',\\n    value: function init_() {\\n      this.state = 'READY';\\n      this.sourceUpdater_ = new SourceUpdater(this.mediaSource_, this.mimeType_, this.loaderType_, this.sourceBufferEmitter_);\\n      this.resetEverything();\\n      return this.monitorBuffer_();\\n    }\\n    /**\\n     * set a playlist on the segment loader\\n     *\\n     * @param {PlaylistLoader} media the playlist to set on the segment loader\\n     */\\n\\n  }, {\\n    key: 'playlist',\\n    value: function playlist(newPlaylist) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (!newPlaylist) {\\n        return;\\n      }\\n\\n      var oldPlaylist = this.playlist_;\\n      var segmentInfo = this.pendingSegment_;\\n      this.playlist_ = newPlaylist;\\n      this.xhrOptions_ = options; // when we haven't started playing yet, the start of a live playlist\\n      // is always our zero-time so force a sync update each time the playlist\\n      // is refreshed from the server\\n      //\\n      // Use the INIT state to determine if playback has started, as the playlist sync info\\n      // should be fixed once requests begin (as sync points are generated based on sync\\n      // info), but not before then.\\n\\n      if (this.state === 'INIT') {\\n        newPlaylist.syncInfo = {\\n          mediaSequence: newPlaylist.mediaSequence,\\n          time: 0\\n        };\\n      }\\n\\n      var oldId = null;\\n\\n      if (oldPlaylist) {\\n        if (oldPlaylist.id) {\\n          oldId = oldPlaylist.id;\\n        } else if (oldPlaylist.uri) {\\n          oldId = oldPlaylist.uri;\\n        }\\n      }\\n\\n      this.logger_('playlist update [' + oldId + ' => ' + (newPlaylist.id || newPlaylist.uri) + ']'); // in VOD, this is always a rendition switch (or we updated our syncInfo above)\\n      // in LIVE, we always want to update with new playlists (including refreshes)\\n\\n      this.trigger('syncinfoupdate'); // if we were unpaused but waiting for a playlist, start\\n      // buffering now\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        return this.init_();\\n      }\\n\\n      if (!oldPlaylist || oldPlaylist.uri !== newPlaylist.uri) {\\n        if (this.mediaIndex !== null) {\\n          // we must \\\"resync\\\" the segment loader when we switch renditions and\\n          // the segment loader is already synced to the previous rendition\\n          this.resyncLoader();\\n        } // the rest of this function depends on `oldPlaylist` being defined\\n\\n\\n        return;\\n      } // we reloaded the same playlist so we are in a live scenario\\n      // and we will likely need to adjust the mediaIndex\\n\\n\\n      var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence;\\n      this.logger_('live window shift [' + mediaSequenceDiff + ']'); // update the mediaIndex on the SegmentLoader\\n      // this is important because we can abort a request and this value must be\\n      // equal to the last appended mediaIndex\\n\\n      if (this.mediaIndex !== null) {\\n        this.mediaIndex -= mediaSequenceDiff;\\n      } // update the mediaIndex on the SegmentInfo object\\n      // this is important because we will update this.mediaIndex with this value\\n      // in `handleUpdateEnd_` after the segment has been successfully appended\\n\\n\\n      if (segmentInfo) {\\n        segmentInfo.mediaIndex -= mediaSequenceDiff; // we need to update the referenced segment so that timing information is\\n        // saved for the new playlist's segment, however, if the segment fell off the\\n        // playlist, we can leave the old reference and just lose the timing info\\n\\n        if (segmentInfo.mediaIndex >= 0) {\\n          segmentInfo.segment = newPlaylist.segments[segmentInfo.mediaIndex];\\n        }\\n      }\\n\\n      this.syncController_.saveExpiredSegmentInfo(oldPlaylist, newPlaylist);\\n    }\\n    /**\\n     * Prevent the loader from fetching additional segments. If there\\n     * is a segment request outstanding, it will finish processing\\n     * before the loader halts. A segment loader can be unpaused by\\n     * calling load().\\n     */\\n\\n  }, {\\n    key: 'pause',\\n    value: function pause() {\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n        this.checkBufferTimeout_ = null;\\n      }\\n    }\\n    /**\\n     * Returns whether the segment loader is fetching additional\\n     * segments when given the opportunity. This property can be\\n     * modified through calls to pause() and load().\\n     */\\n\\n  }, {\\n    key: 'paused',\\n    value: function paused() {\\n      return this.checkBufferTimeout_ === null;\\n    }\\n    /**\\n     * create/set the following mimetype on the SourceBuffer through a\\n     * SourceUpdater\\n     *\\n     * @param {String} mimeType the mime type string to use\\n     * @param {Object} sourceBufferEmitter an event emitter that fires when a source buffer\\n     * is added to the media source\\n     */\\n\\n  }, {\\n    key: 'mimeType',\\n    value: function mimeType(_mimeType, sourceBufferEmitter) {\\n      if (this.mimeType_) {\\n        return;\\n      }\\n\\n      this.mimeType_ = _mimeType;\\n      this.sourceBufferEmitter_ = sourceBufferEmitter; // if we were unpaused but waiting for a sourceUpdater, start\\n      // buffering now\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        this.init_();\\n      }\\n    }\\n    /**\\n     * Delete all the buffered data and reset the SegmentLoader\\n     * @param {Function} [done] an optional callback to be executed when the remove\\n     * operation is complete\\n     */\\n\\n  }, {\\n    key: 'resetEverything',\\n    value: function resetEverything(done) {\\n      this.ended_ = false;\\n      this.resetLoader(); // remove from 0, the earliest point, to Infinity, to signify removal of everything.\\n      // VTT Segment Loader doesn't need to do anything but in the regular SegmentLoader,\\n      // we then clamp the value to duration if necessary.\\n\\n      this.remove(0, Infinity, done); // clears fmp4 captions\\n\\n      if (this.captionParser_) {\\n        this.captionParser_.clearAllCaptions();\\n      }\\n\\n      this.trigger('reseteverything');\\n    }\\n    /**\\n     * Force the SegmentLoader to resync and start loading around the currentTime instead\\n     * of starting at the end of the buffer\\n     *\\n     * Useful for fast quality changes\\n     */\\n\\n  }, {\\n    key: 'resetLoader',\\n    value: function resetLoader() {\\n      this.fetchAtBuffer_ = false;\\n      this.resyncLoader();\\n    }\\n    /**\\n     * Force the SegmentLoader to restart synchronization and make a conservative guess\\n     * before returning to the simple walk-forward method\\n     */\\n\\n  }, {\\n    key: 'resyncLoader',\\n    value: function resyncLoader() {\\n      this.mediaIndex = null;\\n      this.syncPoint_ = null;\\n      this.abort();\\n    }\\n    /**\\n     * Remove any data in the source buffer between start and end times\\n     * @param {Number} start - the start time of the region to remove from the buffer\\n     * @param {Number} end - the end time of the region to remove from the buffer\\n     * @param {Function} [done] - an optional callback to be executed when the remove\\n     * operation is complete\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end, done) {\\n      // clamp end to duration if we need to remove everything.\\n      // This is due to a browser bug that causes issues if we remove to Infinity.\\n      // videojs/videojs-contrib-hls#1225\\n      if (end === Infinity) {\\n        end = this.duration_();\\n      }\\n\\n      if (this.sourceUpdater_) {\\n        this.sourceUpdater_.remove(start, end, done);\\n      }\\n\\n      removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\\n\\n      if (this.inbandTextTracks_) {\\n        for (var id in this.inbandTextTracks_) {\\n          removeCuesFromTrack(start, end, this.inbandTextTracks_[id]);\\n        }\\n      }\\n    }\\n    /**\\n     * (re-)schedule monitorBufferTick_ to run as soon as possible\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'monitorBuffer_',\\n    value: function monitorBuffer_() {\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n      }\\n\\n      this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorBufferTick_.bind(this), 1);\\n    }\\n    /**\\n     * As long as the SegmentLoader is in the READY state, periodically\\n     * invoke fillBuffer_().\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'monitorBufferTick_',\\n    value: function monitorBufferTick_() {\\n      if (this.state === 'READY') {\\n        this.fillBuffer_();\\n      }\\n\\n      if (this.checkBufferTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkBufferTimeout_);\\n      }\\n\\n      this.checkBufferTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorBufferTick_.bind(this), CHECK_BUFFER_DELAY);\\n    }\\n    /**\\n     * fill the buffer with segements unless the sourceBuffers are\\n     * currently updating\\n     *\\n     * Note: this function should only ever be called by monitorBuffer_\\n     * and never directly\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fillBuffer_',\\n    value: function fillBuffer_() {\\n      if (this.sourceUpdater_.updating()) {\\n        return;\\n      }\\n\\n      if (!this.syncPoint_) {\\n        this.syncPoint_ = this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\\n      } // see if we need to begin loading immediately\\n\\n\\n      var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);\\n\\n      if (!segmentInfo) {\\n        return;\\n      }\\n\\n      if (this.isEndOfStream_(segmentInfo.mediaIndex)) {\\n        this.endOfStream();\\n        return;\\n      }\\n\\n      if (segmentInfo.mediaIndex === this.playlist_.segments.length - 1 && this.mediaSource_.readyState === 'ended' && !this.seeking_()) {\\n        return;\\n      } // We will need to change timestampOffset of the sourceBuffer if:\\n      // - The segment.timeline !== this.currentTimeline\\n      //   (we are crossing a discontinuity somehow)\\n      // - The \\\"timestampOffset\\\" for the start of this segment is less than\\n      //   the currently set timestampOffset\\n      // Also, clear captions if we are crossing a discontinuity boundary\\n      // Previously, we changed the timestampOffset if the start of this segment\\n      // is less than the currently set timestampOffset but this isn't wanted\\n      // as it can produce bad behavior, especially around long running\\n      // live streams\\n\\n\\n      if (segmentInfo.timeline !== this.currentTimeline_) {\\n        this.syncController_.reset();\\n        segmentInfo.timestampOffset = segmentInfo.startOfSegment;\\n\\n        if (this.captionParser_) {\\n          this.captionParser_.clearAllCaptions();\\n        }\\n      }\\n\\n      this.loadSegment_(segmentInfo);\\n    }\\n    /**\\n     * Determines if this segment loader is at the end of it's stream.\\n     *\\n     * @param {Number} mediaIndex the index of segment we last appended\\n     * @param {Object} [playlist=this.playlist_] a media playlist object\\n     * @returns {Boolean} true if at end of stream, false otherwise.\\n     */\\n\\n  }, {\\n    key: 'isEndOfStream_',\\n    value: function isEndOfStream_(mediaIndex) {\\n      var playlist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.playlist_;\\n      return detectEndOfStream(playlist, this.mediaSource_, mediaIndex) && !this.sourceUpdater_.updating();\\n    }\\n    /**\\n     * Determines what segment request should be made, given current playback\\n     * state.\\n     *\\n     * @param {TimeRanges} buffered - the state of the buffer\\n     * @param {Object} playlist - the playlist object to fetch segments from\\n     * @param {Number} mediaIndex - the previous mediaIndex fetched or null\\n     * @param {Boolean} hasPlayed - a flag indicating whether we have played or not\\n     * @param {Number} currentTime - the playback position in seconds\\n     * @param {Object} syncPoint - a segment info object that describes the\\n     * @returns {Object} a segment request object that describes the segment to load\\n     */\\n\\n  }, {\\n    key: 'checkBuffer_',\\n    value: function checkBuffer_(buffered, playlist, mediaIndex, hasPlayed, currentTime, syncPoint) {\\n      var lastBufferedEnd = 0;\\n      var startOfSegment = void 0;\\n\\n      if (buffered.length) {\\n        lastBufferedEnd = buffered.end(buffered.length - 1);\\n      }\\n\\n      var bufferedTime = Math.max(0, lastBufferedEnd - currentTime);\\n\\n      if (!playlist.segments.length) {\\n        return null;\\n      } // if there is plenty of content buffered, and the video has\\n      // been played before relax for awhile\\n\\n\\n      if (bufferedTime >= this.goalBufferLength_()) {\\n        return null;\\n      } // if the video has not yet played once, and we already have\\n      // one segment downloaded do nothing\\n\\n\\n      if (!hasPlayed && bufferedTime >= 1) {\\n        return null;\\n      } // When the syncPoint is null, there is no way of determining a good\\n      // conservative segment index to fetch from\\n      // The best thing to do here is to get the kind of sync-point data by\\n      // making a request\\n\\n\\n      if (syncPoint === null) {\\n        mediaIndex = this.getSyncSegmentCandidate_(playlist);\\n        return this.generateSegmentInfo_(playlist, mediaIndex, null, true);\\n      } // Under normal playback conditions fetching is a simple walk forward\\n\\n\\n      if (mediaIndex !== null) {\\n        var segment = playlist.segments[mediaIndex];\\n        startOfSegment = lastBufferedEnd;\\n        return this.generateSegmentInfo_(playlist, mediaIndex + 1, startOfSegment, false);\\n      } // There is a sync-point but the lack of a mediaIndex indicates that\\n      // we need to make a good conservative guess about which segment to\\n      // fetch\\n\\n\\n      if (this.fetchAtBuffer_) {\\n        // Find the segment containing the end of the buffer\\n        var mediaSourceInfo = Playlist.getMediaInfoForTime(playlist, lastBufferedEnd, syncPoint.segmentIndex, syncPoint.time);\\n        mediaIndex = mediaSourceInfo.mediaIndex;\\n        startOfSegment = mediaSourceInfo.startTime;\\n      } else {\\n        // Find the segment containing currentTime\\n        var _mediaSourceInfo = Playlist.getMediaInfoForTime(playlist, currentTime, syncPoint.segmentIndex, syncPoint.time);\\n\\n        mediaIndex = _mediaSourceInfo.mediaIndex;\\n        startOfSegment = _mediaSourceInfo.startTime;\\n      }\\n\\n      return this.generateSegmentInfo_(playlist, mediaIndex, startOfSegment, false);\\n    }\\n    /**\\n     * The segment loader has no recourse except to fetch a segment in the\\n     * current playlist and use the internal timestamps in that segment to\\n     * generate a syncPoint. This function returns a good candidate index\\n     * for that process.\\n     *\\n     * @param {Object} playlist - the playlist object to look for a\\n     * @returns {Number} An index of a segment from the playlist to load\\n     */\\n\\n  }, {\\n    key: 'getSyncSegmentCandidate_',\\n    value: function getSyncSegmentCandidate_(playlist) {\\n      var _this2 = this;\\n\\n      if (this.currentTimeline_ === -1) {\\n        return 0;\\n      }\\n\\n      var segmentIndexArray = playlist.segments.map(function (s, i) {\\n        return {\\n          timeline: s.timeline,\\n          segmentIndex: i\\n        };\\n      }).filter(function (s) {\\n        return s.timeline === _this2.currentTimeline_;\\n      });\\n\\n      if (segmentIndexArray.length) {\\n        return segmentIndexArray[Math.min(segmentIndexArray.length - 1, 1)].segmentIndex;\\n      }\\n\\n      return Math.max(playlist.segments.length - 1, 0);\\n    }\\n  }, {\\n    key: 'generateSegmentInfo_',\\n    value: function generateSegmentInfo_(playlist, mediaIndex, startOfSegment, isSyncRequest) {\\n      if (mediaIndex < 0 || mediaIndex >= playlist.segments.length) {\\n        return null;\\n      }\\n\\n      var segment = playlist.segments[mediaIndex];\\n      return {\\n        requestId: 'segment-loader-' + Math.random(),\\n        // resolve the segment URL relative to the playlist\\n        uri: segment.resolvedUri,\\n        // the segment's mediaIndex at the time it was requested\\n        mediaIndex: mediaIndex,\\n        // whether or not to update the SegmentLoader's state with this\\n        // segment's mediaIndex\\n        isSyncRequest: isSyncRequest,\\n        startOfSegment: startOfSegment,\\n        // the segment's playlist\\n        playlist: playlist,\\n        // unencrypted bytes of the segment\\n        bytes: null,\\n        // when a key is defined for this segment, the encrypted bytes\\n        encryptedBytes: null,\\n        // The target timestampOffset for this segment when we append it\\n        // to the source buffer\\n        timestampOffset: null,\\n        // The timeline that the segment is in\\n        timeline: segment.timeline,\\n        // The expected duration of the segment in seconds\\n        duration: segment.duration,\\n        // retain the segment in case the playlist updates while doing an async process\\n        segment: segment\\n      };\\n    }\\n    /**\\n     * Determines if the network has enough bandwidth to complete the current segment\\n     * request in a timely manner. If not, the request will be aborted early and bandwidth\\n     * updated to trigger a playlist switch.\\n     *\\n     * @param {Object} stats\\n     *        Object containing stats about the request timing and size\\n     * @return {Boolean} True if the request was aborted, false otherwise\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'abortRequestEarly_',\\n    value: function abortRequestEarly_(stats) {\\n      if (this.hls_.tech_.paused() || // Don't abort if the current playlist is on the lowestEnabledRendition\\n      // TODO: Replace using timeout with a boolean indicating whether this playlist is\\n      //       the lowestEnabledRendition.\\n      !this.xhrOptions_.timeout || // Don't abort if we have no bandwidth information to estimate segment sizes\\n      !this.playlist_.attributes.BANDWIDTH) {\\n        return false;\\n      } // Wait at least 1 second since the first byte of data has been received before\\n      // using the calculated bandwidth from the progress event to allow the bitrate\\n      // to stabilize\\n\\n\\n      if (Date.now() - (stats.firstBytesReceivedAt || Date.now()) < 1000) {\\n        return false;\\n      }\\n\\n      var currentTime = this.currentTime_();\\n      var measuredBandwidth = stats.bandwidth;\\n      var segmentDuration = this.pendingSegment_.duration;\\n      var requestTimeRemaining = Playlist.estimateSegmentRequestTime(segmentDuration, measuredBandwidth, this.playlist_, stats.bytesReceived); // Subtract 1 from the timeUntilRebuffer so we still consider an early abort\\n      // if we are only left with less than 1 second when the request completes.\\n      // A negative timeUntilRebuffering indicates we are already rebuffering\\n\\n      var timeUntilRebuffer$$1 = timeUntilRebuffer(this.buffered_(), currentTime, this.hls_.tech_.playbackRate()) - 1; // Only consider aborting early if the estimated time to finish the download\\n      // is larger than the estimated time until the player runs out of forward buffer\\n\\n      if (requestTimeRemaining <= timeUntilRebuffer$$1) {\\n        return false;\\n      }\\n\\n      var switchCandidate = minRebufferMaxBandwidthSelector({\\n        master: this.hls_.playlists.master,\\n        currentTime: currentTime,\\n        bandwidth: measuredBandwidth,\\n        duration: this.duration_(),\\n        segmentDuration: segmentDuration,\\n        timeUntilRebuffer: timeUntilRebuffer$$1,\\n        currentTimeline: this.currentTimeline_,\\n        syncController: this.syncController_\\n      });\\n\\n      if (!switchCandidate) {\\n        return;\\n      }\\n\\n      var rebufferingImpact = requestTimeRemaining - timeUntilRebuffer$$1;\\n      var timeSavedBySwitching = rebufferingImpact - switchCandidate.rebufferingImpact;\\n      var minimumTimeSaving = 0.5; // If we are already rebuffering, increase the amount of variance we add to the\\n      // potential round trip time of the new request so that we are not too aggressive\\n      // with switching to a playlist that might save us a fraction of a second.\\n\\n      if (timeUntilRebuffer$$1 <= TIME_FUDGE_FACTOR) {\\n        minimumTimeSaving = 1;\\n      }\\n\\n      if (!switchCandidate.playlist || switchCandidate.playlist.uri === this.playlist_.uri || timeSavedBySwitching < minimumTimeSaving) {\\n        return false;\\n      } // set the bandwidth to that of the desired playlist being sure to scale by\\n      // BANDWIDTH_VARIANCE and add one so the playlist selector does not exclude it\\n      // don't trigger a bandwidthupdate as the bandwidth is artifial\\n\\n\\n      this.bandwidth = switchCandidate.playlist.attributes.BANDWIDTH * Config.BANDWIDTH_VARIANCE + 1;\\n      this.abort();\\n      this.trigger('earlyabort');\\n      return true;\\n    }\\n    /**\\n     * XHR `progress` event handler\\n     *\\n     * @param {Event}\\n     *        The XHR `progress` event\\n     * @param {Object} simpleSegment\\n     *        A simplified segment object copy\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleProgress_',\\n    value: function handleProgress_(event, simpleSegment) {\\n      if (!this.pendingSegment_ || simpleSegment.requestId !== this.pendingSegment_.requestId || this.abortRequestEarly_(simpleSegment.stats)) {\\n        return;\\n      }\\n\\n      this.trigger('progress');\\n    }\\n    /**\\n     * load a specific segment from a request into the buffer\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'loadSegment_',\\n    value: function loadSegment_(segmentInfo) {\\n      this.state = 'WAITING';\\n      this.pendingSegment_ = segmentInfo;\\n      this.trimBackBuffer_(segmentInfo);\\n      segmentInfo.abortRequests = mediaSegmentRequest(this.hls_.xhr, this.xhrOptions_, this.decrypter_, this.captionParser_, this.createSimplifiedSegmentObj_(segmentInfo), // progress callback\\n      this.handleProgress_.bind(this), this.segmentRequestFinished_.bind(this));\\n    }\\n    /**\\n     * trim the back buffer so that we don't have too much data\\n     * in the source buffer\\n     *\\n     * @private\\n     *\\n     * @param {Object} segmentInfo - the current segment\\n     */\\n\\n  }, {\\n    key: 'trimBackBuffer_',\\n    value: function trimBackBuffer_(segmentInfo) {\\n      var removeToTime = safeBackBufferTrimTime(this.seekable_(), this.currentTime_(), this.playlist_.targetDuration || 10); // Chrome has a hard limit of 150MB of\\n      // buffer and a very conservative \\\"garbage collector\\\"\\n      // We manually clear out the old buffer to ensure\\n      // we don't trigger the QuotaExceeded error\\n      // on the source buffer during subsequent appends\\n\\n      if (removeToTime > 0) {\\n        this.remove(0, removeToTime);\\n      }\\n    }\\n    /**\\n     * created a simplified copy of the segment object with just the\\n     * information necessary to perform the XHR and decryption\\n     *\\n     * @private\\n     *\\n     * @param {Object} segmentInfo - the current segment\\n     * @returns {Object} a simplified segment object copy\\n     */\\n\\n  }, {\\n    key: 'createSimplifiedSegmentObj_',\\n    value: function createSimplifiedSegmentObj_(segmentInfo) {\\n      var segment = segmentInfo.segment;\\n      var simpleSegment = {\\n        resolvedUri: segment.resolvedUri,\\n        byterange: segment.byterange,\\n        requestId: segmentInfo.requestId\\n      };\\n\\n      if (segment.key) {\\n        // if the media sequence is greater than 2^32, the IV will be incorrect\\n        // assuming 10s segments, that would be about 1300 years\\n        var iv = segment.key.iv || new Uint32Array([0, 0, 0, segmentInfo.mediaIndex + segmentInfo.playlist.mediaSequence]);\\n        simpleSegment.key = this.segmentKey(segment.key);\\n        simpleSegment.key.iv = iv;\\n      }\\n\\n      if (segment.map) {\\n        simpleSegment.map = this.initSegment(segment.map);\\n      }\\n\\n      return simpleSegment;\\n    }\\n    /**\\n     * Handle the callback from the segmentRequest function and set the\\n     * associated SegmentLoader state and errors if necessary\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'segmentRequestFinished_',\\n    value: function segmentRequestFinished_(error, simpleSegment) {\\n      // every request counts as a media request even if it has been aborted\\n      // or canceled due to a timeout\\n      this.mediaRequests += 1;\\n\\n      if (simpleSegment.stats) {\\n        this.mediaBytesTransferred += simpleSegment.stats.bytesReceived;\\n        this.mediaTransferDuration += simpleSegment.stats.roundTripTime;\\n      } // The request was aborted and the SegmentLoader has already been reset\\n\\n\\n      if (!this.pendingSegment_) {\\n        this.mediaRequestsAborted += 1;\\n        return;\\n      } // the request was aborted and the SegmentLoader has already started\\n      // another request. this can happen when the timeout for an aborted\\n      // request triggers due to a limitation in the XHR library\\n      // do not count this as any sort of request or we risk double-counting\\n\\n\\n      if (simpleSegment.requestId !== this.pendingSegment_.requestId) {\\n        return;\\n      } // an error occurred from the active pendingSegment_ so reset everything\\n\\n\\n      if (error) {\\n        this.pendingSegment_ = null;\\n        this.state = 'READY'; // the requests were aborted just record the aborted stat and exit\\n        // this is not a true error condition and nothing corrective needs\\n        // to be done\\n\\n        if (error.code === REQUEST_ERRORS.ABORTED) {\\n          this.mediaRequestsAborted += 1;\\n          return;\\n        }\\n\\n        this.pause(); // the error is really just that at least one of the requests timed-out\\n        // set the bandwidth to a very low value and trigger an ABR switch to\\n        // take emergency action\\n\\n        if (error.code === REQUEST_ERRORS.TIMEOUT) {\\n          this.mediaRequestsTimedout += 1;\\n          this.bandwidth = 1;\\n          this.roundTrip = NaN;\\n          this.trigger('bandwidthupdate');\\n          return;\\n        } // if control-flow has arrived here, then the error is real\\n        // emit an error event to blacklist the current playlist\\n\\n\\n        this.mediaRequestsErrored += 1;\\n        this.error(error);\\n        this.trigger('error');\\n        return;\\n      } // the response was a success so set any bandwidth stats the request\\n      // generated for ABR purposes\\n\\n\\n      this.bandwidth = simpleSegment.stats.bandwidth;\\n      this.roundTrip = simpleSegment.stats.roundTripTime; // if this request included an initialization segment, save that data\\n      // to the initSegment cache\\n\\n      if (simpleSegment.map) {\\n        simpleSegment.map = this.initSegment(simpleSegment.map, true);\\n      } // if this request included a segment key, save that data in the cache\\n\\n\\n      if (simpleSegment.key) {\\n        this.segmentKey(simpleSegment.key, true);\\n      }\\n\\n      this.processSegmentResponse_(simpleSegment);\\n    }\\n    /**\\n     * Move any important data from the simplified segment object\\n     * back to the real segment object for future phases\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'processSegmentResponse_',\\n    value: function processSegmentResponse_(simpleSegment) {\\n      var segmentInfo = this.pendingSegment_;\\n      segmentInfo.bytes = simpleSegment.bytes;\\n\\n      if (simpleSegment.map) {\\n        segmentInfo.segment.map.bytes = simpleSegment.map.bytes;\\n      }\\n\\n      segmentInfo.endOfAllRequests = simpleSegment.endOfAllRequests; // This has fmp4 captions, add them to text tracks\\n\\n      if (simpleSegment.fmp4Captions) {\\n        createCaptionsTrackIfNotExists(this.inbandTextTracks_, this.hls_.tech_, simpleSegment.captionStreams);\\n        addCaptionData({\\n          inbandTextTracks: this.inbandTextTracks_,\\n          captionArray: simpleSegment.fmp4Captions,\\n          // fmp4s will not have a timestamp offset\\n          timestampOffset: 0\\n        }); // Reset stored captions since we added parsed\\n        // captions to a text track at this point\\n\\n        if (this.captionParser_) {\\n          this.captionParser_.clearParsedCaptions();\\n        }\\n      }\\n\\n      this.handleSegment_();\\n    }\\n    /**\\n     * append a decrypted segement to the SourceBuffer through a SourceUpdater\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleSegment_',\\n    value: function handleSegment_() {\\n      var _this3 = this;\\n\\n      if (!this.pendingSegment_) {\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      var segmentInfo = this.pendingSegment_;\\n      var segment = segmentInfo.segment;\\n      var timingInfo = this.syncController_.probeSegmentInfo(segmentInfo); // When we have our first timing info, determine what media types this loader is\\n      // dealing with. Although we're maintaining extra state, it helps to preserve the\\n      // separation of segment loader from the actual source buffers.\\n\\n      if (typeof this.startingMedia_ === 'undefined' && timingInfo && ( // Guard against cases where we're not getting timing info at all until we are\\n      // certain that all streams will provide it.\\n      timingInfo.containsAudio || timingInfo.containsVideo)) {\\n        this.startingMedia_ = {\\n          containsAudio: timingInfo.containsAudio,\\n          containsVideo: timingInfo.containsVideo\\n        };\\n      }\\n\\n      var illegalMediaSwitchError = illegalMediaSwitch(this.loaderType_, this.startingMedia_, timingInfo);\\n\\n      if (illegalMediaSwitchError) {\\n        this.error({\\n          message: illegalMediaSwitchError,\\n          blacklistDuration: Infinity\\n        });\\n        this.trigger('error');\\n        return;\\n      }\\n\\n      if (segmentInfo.isSyncRequest) {\\n        this.trigger('syncinfoupdate');\\n        this.pendingSegment_ = null;\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      if (segmentInfo.timestampOffset !== null && segmentInfo.timestampOffset !== this.sourceUpdater_.timestampOffset()) {\\n        // Subtract any difference between the PTS and DTS times of the first frame\\n        // from the timeStampOffset (which currently equals the buffered.end) to prevent\\n        // creating any gaps in the buffer\\n        if (timingInfo && timingInfo.segmentTimestampInfo) {\\n          var ptsStartTime = timingInfo.segmentTimestampInfo[0].ptsTime;\\n          var dtsStartTime = timingInfo.segmentTimestampInfo[0].dtsTime;\\n          segmentInfo.timestampOffset -= ptsStartTime - dtsStartTime;\\n        }\\n\\n        this.sourceUpdater_.timestampOffset(segmentInfo.timestampOffset); // fired when a timestamp offset is set in HLS (can also identify discontinuities)\\n\\n        this.trigger('timestampoffset');\\n      }\\n\\n      var timelineMapping = this.syncController_.mappingForTimeline(segmentInfo.timeline);\\n\\n      if (timelineMapping !== null) {\\n        this.trigger({\\n          type: 'segmenttimemapping',\\n          mapping: timelineMapping\\n        });\\n      }\\n\\n      this.state = 'APPENDING'; // if the media initialization segment is changing, append it\\n      // before the content segment\\n\\n      if (segment.map) {\\n        var initId = initSegmentId(segment.map);\\n\\n        if (!this.activeInitSegmentId_ || this.activeInitSegmentId_ !== initId) {\\n          var initSegment = this.initSegment(segment.map);\\n          this.sourceUpdater_.appendBuffer({\\n            bytes: initSegment.bytes\\n          }, function () {\\n            _this3.activeInitSegmentId_ = initId;\\n          });\\n        }\\n      }\\n\\n      segmentInfo.byteLength = segmentInfo.bytes.byteLength;\\n\\n      if (typeof segment.start === 'number' && typeof segment.end === 'number') {\\n        this.mediaSecondsLoaded += segment.end - segment.start;\\n      } else {\\n        this.mediaSecondsLoaded += segment.duration;\\n      }\\n\\n      this.logger_(segmentInfoString(segmentInfo));\\n      this.sourceUpdater_.appendBuffer({\\n        bytes: segmentInfo.bytes,\\n        videoSegmentTimingInfoCallback: this.handleVideoSegmentTimingInfo_.bind(this, segmentInfo.requestId)\\n      }, this.handleUpdateEnd_.bind(this));\\n    }\\n  }, {\\n    key: 'handleVideoSegmentTimingInfo_',\\n    value: function handleVideoSegmentTimingInfo_(requestId, event) {\\n      if (!this.pendingSegment_ || requestId !== this.pendingSegment_.requestId) {\\n        return;\\n      }\\n\\n      var segment = this.pendingSegment_.segment;\\n\\n      if (!segment.videoTimingInfo) {\\n        segment.videoTimingInfo = {};\\n      }\\n\\n      segment.videoTimingInfo.transmuxerPrependedSeconds = event.videoSegmentTimingInfo.prependedContentDuration || 0;\\n      segment.videoTimingInfo.transmuxedPresentationStart = event.videoSegmentTimingInfo.start.presentation;\\n      segment.videoTimingInfo.transmuxedPresentationEnd = event.videoSegmentTimingInfo.end.presentation; // mainly used as a reference for debugging\\n\\n      segment.videoTimingInfo.baseMediaDecodeTime = event.videoSegmentTimingInfo.baseMediaDecodeTime;\\n    }\\n    /**\\n     * callback to run when appendBuffer is finished. detects if we are\\n     * in a good state to do things with the data we got, or if we need\\n     * to wait for more\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleUpdateEnd_',\\n    value: function handleUpdateEnd_() {\\n      if (!this.pendingSegment_) {\\n        this.state = 'READY';\\n\\n        if (!this.paused()) {\\n          this.monitorBuffer_();\\n        }\\n\\n        return;\\n      }\\n\\n      var segmentInfo = this.pendingSegment_;\\n      var segment = segmentInfo.segment;\\n      var isWalkingForward = this.mediaIndex !== null;\\n      this.pendingSegment_ = null;\\n      this.recordThroughput_(segmentInfo);\\n      this.addSegmentMetadataCue_(segmentInfo);\\n      this.state = 'READY';\\n      this.mediaIndex = segmentInfo.mediaIndex;\\n      this.fetchAtBuffer_ = true;\\n      this.currentTimeline_ = segmentInfo.timeline; // We must update the syncinfo to recalculate the seekable range before\\n      // the following conditional otherwise it may consider this a bad \\\"guess\\\"\\n      // and attempt to resync when the post-update seekable window and live\\n      // point would mean that this was the perfect segment to fetch\\n\\n      this.trigger('syncinfoupdate'); // If we previously appended a segment that ends more than 3 targetDurations before\\n      // the currentTime_ that means that our conservative guess was too conservative.\\n      // In that case, reset the loader state so that we try to use any information gained\\n      // from the previous request to create a new, more accurate, sync-point.\\n\\n      if (segment.end && this.currentTime_() - segment.end > segmentInfo.playlist.targetDuration * 3) {\\n        this.resetEverything();\\n        return;\\n      } // Don't do a rendition switch unless we have enough time to get a sync segment\\n      // and conservatively guess\\n\\n\\n      if (isWalkingForward) {\\n        this.trigger('bandwidthupdate');\\n      }\\n\\n      this.trigger('progress'); // any time an update finishes and the last segment is in the\\n      // buffer, end the stream. this ensures the \\\"ended\\\" event will\\n      // fire if playback reaches that point.\\n\\n      if (this.isEndOfStream_(segmentInfo.mediaIndex + 1, segmentInfo.playlist)) {\\n        this.endOfStream();\\n      }\\n\\n      if (!this.paused()) {\\n        this.monitorBuffer_();\\n      }\\n    }\\n    /**\\n     * Records the current throughput of the decrypt, transmux, and append\\n     * portion of the semgment pipeline. `throughput.rate` is a the cumulative\\n     * moving average of the throughput. `throughput.count` is the number of\\n     * data points in the average.\\n     *\\n     * @private\\n     * @param {Object} segmentInfo the object returned by loadSegment\\n     */\\n\\n  }, {\\n    key: 'recordThroughput_',\\n    value: function recordThroughput_(segmentInfo) {\\n      var rate = this.throughput.rate; // Add one to the time to ensure that we don't accidentally attempt to divide\\n      // by zero in the case where the throughput is ridiculously high\\n\\n      var segmentProcessingTime = Date.now() - segmentInfo.endOfAllRequests + 1; // Multiply by 8000 to convert from bytes/millisecond to bits/second\\n\\n      var segmentProcessingThroughput = Math.floor(segmentInfo.byteLength / segmentProcessingTime * 8 * 1000); // This is just a cumulative moving average calculation:\\n      //   newAvg = oldAvg + (sample - oldAvg) / (sampleCount + 1)\\n\\n      this.throughput.rate += (segmentProcessingThroughput - rate) / ++this.throughput.count;\\n    }\\n    /**\\n     * Adds a cue to the segment-metadata track with some metadata information about the\\n     * segment\\n     *\\n     * @private\\n     * @param {Object} segmentInfo\\n     *        the object returned by loadSegment\\n     * @method addSegmentMetadataCue_\\n     */\\n\\n  }, {\\n    key: 'addSegmentMetadataCue_',\\n    value: function addSegmentMetadataCue_(segmentInfo) {\\n      if (!this.segmentMetadataTrack_) {\\n        return;\\n      }\\n\\n      var segment = segmentInfo.segment;\\n      var start = segment.start;\\n      var end = segment.end; // Do not try adding the cue if the start and end times are invalid.\\n\\n      if (!finite(start) || !finite(end)) {\\n        return;\\n      }\\n\\n      removeCuesFromTrack(start, end, this.segmentMetadataTrack_);\\n      var Cue = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebKitDataCue || global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue;\\n      var value = {\\n        custom: segment.custom,\\n        dateTimeObject: segment.dateTimeObject,\\n        dateTimeString: segment.dateTimeString,\\n        bandwidth: segmentInfo.playlist.attributes.BANDWIDTH,\\n        resolution: segmentInfo.playlist.attributes.RESOLUTION,\\n        codecs: segmentInfo.playlist.attributes.CODECS,\\n        byteLength: segmentInfo.byteLength,\\n        uri: segmentInfo.uri,\\n        timeline: segmentInfo.timeline,\\n        playlist: segmentInfo.playlist.id,\\n        start: start,\\n        end: end\\n      };\\n      var data = JSON.stringify(value);\\n      var cue = new Cue(start, end, data); // Attach the metadata to the value property of the cue to keep consistency between\\n      // the differences of WebKitDataCue in safari and VTTCue in other browsers\\n\\n      cue.value = value;\\n      this.segmentMetadataTrack_.addCue(cue);\\n    }\\n  }]);\\n  return SegmentLoader;\\n}(videojs$1.EventTarget);\\n\\nvar uint8ToUtf8 = function uint8ToUtf8(uintArray) {\\n  return decodeURIComponent(escape(String.fromCharCode.apply(null, uintArray)));\\n};\\n/**\\n * @file vtt-segment-loader.js\\n */\\n\\n\\nvar VTT_LINE_TERMINATORS = new Uint8Array('\\\\n\\\\n'.split('').map(function (_char2) {\\n  return _char2.charCodeAt(0);\\n}));\\n/**\\n * An object that manages segment loading and appending.\\n *\\n * @class VTTSegmentLoader\\n * @param {Object} options required and optional options\\n * @extends videojs.EventTarget\\n */\\n\\nvar VTTSegmentLoader = function (_SegmentLoader) {\\n  inherits(VTTSegmentLoader, _SegmentLoader);\\n\\n  function VTTSegmentLoader(settings) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n    classCallCheck(this, VTTSegmentLoader); // SegmentLoader requires a MediaSource be specified or it will throw an error;\\n    // however, VTTSegmentLoader has no need of a media source, so delete the reference\\n\\n    var _this = possibleConstructorReturn(this, (VTTSegmentLoader.__proto__ || Object.getPrototypeOf(VTTSegmentLoader)).call(this, settings, options));\\n\\n    _this.mediaSource_ = null;\\n    _this.subtitlesTrack_ = null;\\n    _this.featuresNativeTextTracks_ = settings.featuresNativeTextTracks;\\n    return _this;\\n  }\\n  /**\\n   * Indicates which time ranges are buffered\\n   *\\n   * @return {TimeRange}\\n   *         TimeRange object representing the current buffered ranges\\n   */\\n\\n\\n  createClass(VTTSegmentLoader, [{\\n    key: 'buffered_',\\n    value: function buffered_() {\\n      if (!this.subtitlesTrack_ || !this.subtitlesTrack_.cues.length) {\\n        return videojs$1.createTimeRanges();\\n      }\\n\\n      var cues = this.subtitlesTrack_.cues;\\n      var start = cues[0].startTime;\\n      var end = cues[cues.length - 1].startTime;\\n      return videojs$1.createTimeRanges([[start, end]]);\\n    }\\n    /**\\n     * Gets and sets init segment for the provided map\\n     *\\n     * @param {Object} map\\n     *        The map object representing the init segment to get or set\\n     * @param {Boolean=} set\\n     *        If true, the init segment for the provided map should be saved\\n     * @return {Object}\\n     *         map object for desired init segment\\n     */\\n\\n  }, {\\n    key: 'initSegment',\\n    value: function initSegment(map) {\\n      var set$$1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\\n\\n      if (!map) {\\n        return null;\\n      }\\n\\n      var id = initSegmentId(map);\\n      var storedMap = this.initSegments_[id];\\n\\n      if (set$$1 && !storedMap && map.bytes) {\\n        // append WebVTT line terminators to the media initialization segment if it exists\\n        // to follow the WebVTT spec (https://w3c.github.io/webvtt/#file-structure) that\\n        // requires two or more WebVTT line terminators between the WebVTT header and the\\n        // rest of the file\\n        var combinedByteLength = VTT_LINE_TERMINATORS.byteLength + map.bytes.byteLength;\\n        var combinedSegment = new Uint8Array(combinedByteLength);\\n        combinedSegment.set(map.bytes);\\n        combinedSegment.set(VTT_LINE_TERMINATORS, map.bytes.byteLength);\\n        this.initSegments_[id] = storedMap = {\\n          resolvedUri: map.resolvedUri,\\n          byterange: map.byterange,\\n          bytes: combinedSegment\\n        };\\n      }\\n\\n      return storedMap || map;\\n    }\\n    /**\\n     * Returns true if all configuration required for loading is present, otherwise false.\\n     *\\n     * @return {Boolean} True if the all configuration is ready for loading\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'couldBeginLoading_',\\n    value: function couldBeginLoading_() {\\n      return this.playlist_ && this.subtitlesTrack_ && !this.paused();\\n    }\\n    /**\\n     * Once all the starting parameters have been specified, begin\\n     * operation. This method should only be invoked from the INIT\\n     * state.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'init_',\\n    value: function init_() {\\n      this.state = 'READY';\\n      this.resetEverything();\\n      return this.monitorBuffer_();\\n    }\\n    /**\\n     * Set a subtitle track on the segment loader to add subtitles to\\n     *\\n     * @param {TextTrack=} track\\n     *        The text track to add loaded subtitles to\\n     * @return {TextTrack}\\n     *        Returns the subtitles track\\n     */\\n\\n  }, {\\n    key: 'track',\\n    value: function track(_track) {\\n      if (typeof _track === 'undefined') {\\n        return this.subtitlesTrack_;\\n      }\\n\\n      this.subtitlesTrack_ = _track; // if we were unpaused but waiting for a sourceUpdater, start\\n      // buffering now\\n\\n      if (this.state === 'INIT' && this.couldBeginLoading_()) {\\n        this.init_();\\n      }\\n\\n      return this.subtitlesTrack_;\\n    }\\n    /**\\n     * Remove any data in the source buffer between start and end times\\n     * @param {Number} start - the start time of the region to remove from the buffer\\n     * @param {Number} end - the end time of the region to remove from the buffer\\n     */\\n\\n  }, {\\n    key: 'remove',\\n    value: function remove(start, end) {\\n      removeCuesFromTrack(start, end, this.subtitlesTrack_);\\n    }\\n    /**\\n     * fill the buffer with segements unless the sourceBuffers are\\n     * currently updating\\n     *\\n     * Note: this function should only ever be called by monitorBuffer_\\n     * and never directly\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fillBuffer_',\\n    value: function fillBuffer_() {\\n      var _this2 = this;\\n\\n      if (!this.syncPoint_) {\\n        this.syncPoint_ = this.syncController_.getSyncPoint(this.playlist_, this.duration_(), this.currentTimeline_, this.currentTime_());\\n      } // see if we need to begin loading immediately\\n\\n\\n      var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);\\n      segmentInfo = this.skipEmptySegments_(segmentInfo);\\n\\n      if (!segmentInfo) {\\n        return;\\n      }\\n\\n      if (this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline) === null) {\\n        // We don't have the timestamp offset that we need to sync subtitles.\\n        // Rerun on a timestamp offset or user interaction.\\n        var checkTimestampOffset = function checkTimestampOffset() {\\n          _this2.state = 'READY';\\n\\n          if (!_this2.paused()) {\\n            // if not paused, queue a buffer check as soon as possible\\n            _this2.monitorBuffer_();\\n          }\\n        };\\n\\n        this.syncController_.one('timestampoffset', checkTimestampOffset);\\n        this.state = 'WAITING_ON_TIMELINE';\\n        return;\\n      }\\n\\n      this.loadSegment_(segmentInfo);\\n    }\\n    /**\\n     * Prevents the segment loader from requesting segments we know contain no subtitles\\n     * by walking forward until we find the next segment that we don't know whether it is\\n     * empty or not.\\n     *\\n     * @param {Object} segmentInfo\\n     *        a segment info object that describes the current segment\\n     * @return {Object}\\n     *         a segment info object that describes the current segment\\n     */\\n\\n  }, {\\n    key: 'skipEmptySegments_',\\n    value: function skipEmptySegments_(segmentInfo) {\\n      while (segmentInfo && segmentInfo.segment.empty) {\\n        segmentInfo = this.generateSegmentInfo_(segmentInfo.playlist, segmentInfo.mediaIndex + 1, segmentInfo.startOfSegment + segmentInfo.duration, segmentInfo.isSyncRequest);\\n      }\\n\\n      return segmentInfo;\\n    }\\n    /**\\n     * append a decrypted segement to the SourceBuffer through a SourceUpdater\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleSegment_',\\n    value: function handleSegment_() {\\n      var _this3 = this;\\n\\n      if (!this.pendingSegment_ || !this.subtitlesTrack_) {\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      this.state = 'APPENDING';\\n      var segmentInfo = this.pendingSegment_;\\n      var segment = segmentInfo.segment; // Make sure that vttjs has loaded, otherwise, wait till it finished loading\\n\\n      if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT !== 'function' && this.subtitlesTrack_ && this.subtitlesTrack_.tech_) {\\n        var loadHandler = void 0;\\n\\n        var errorHandler = function errorHandler() {\\n          _this3.subtitlesTrack_.tech_.off('vttjsloaded', loadHandler);\\n\\n          _this3.error({\\n            message: 'Error loading vtt.js'\\n          });\\n\\n          _this3.state = 'READY';\\n\\n          _this3.pause();\\n\\n          _this3.trigger('error');\\n        };\\n\\n        loadHandler = function loadHandler() {\\n          _this3.subtitlesTrack_.tech_.off('vttjserror', errorHandler);\\n\\n          _this3.handleSegment_();\\n        };\\n\\n        this.state = 'WAITING_ON_VTTJS';\\n        this.subtitlesTrack_.tech_.one('vttjsloaded', loadHandler);\\n        this.subtitlesTrack_.tech_.one('vttjserror', errorHandler);\\n        return;\\n      }\\n\\n      segment.requested = true;\\n\\n      try {\\n        this.parseVTTCues_(segmentInfo);\\n      } catch (e) {\\n        this.error({\\n          message: e.message\\n        });\\n        this.state = 'READY';\\n        this.pause();\\n        return this.trigger('error');\\n      }\\n\\n      this.updateTimeMapping_(segmentInfo, this.syncController_.timelines[segmentInfo.timeline], this.playlist_);\\n\\n      if (segmentInfo.isSyncRequest) {\\n        this.trigger('syncinfoupdate');\\n        this.pendingSegment_ = null;\\n        this.state = 'READY';\\n        return;\\n      }\\n\\n      segmentInfo.byteLength = segmentInfo.bytes.byteLength;\\n      this.mediaSecondsLoaded += segment.duration;\\n\\n      if (segmentInfo.cues.length) {\\n        // remove any overlapping cues to prevent doubling\\n        this.remove(segmentInfo.cues[0].endTime, segmentInfo.cues[segmentInfo.cues.length - 1].endTime);\\n      }\\n\\n      segmentInfo.cues.forEach(function (cue) {\\n        _this3.subtitlesTrack_.addCue(_this3.featuresNativeTextTracks_ ? new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(cue.startTime, cue.endTime, cue.text) : cue);\\n      });\\n      this.handleUpdateEnd_();\\n    }\\n    /**\\n     * Uses the WebVTT parser to parse the segment response\\n     *\\n     * @param {Object} segmentInfo\\n     *        a segment info object that describes the current segment\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'parseVTTCues_',\\n    value: function parseVTTCues_(segmentInfo) {\\n      var decoder = void 0;\\n      var decodeBytesToString = false;\\n\\n      if (typeof global_window__WEBPACK_IMPORTED_MODULE_0___default.a.TextDecoder === 'function') {\\n        decoder = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.TextDecoder('utf8');\\n      } else {\\n        decoder = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.StringDecoder();\\n        decodeBytesToString = true;\\n      }\\n\\n      var parser = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.WebVTT.Parser(global_window__WEBPACK_IMPORTED_MODULE_0___default.a, global_window__WEBPACK_IMPORTED_MODULE_0___default.a.vttjs, decoder);\\n      segmentInfo.cues = [];\\n      segmentInfo.timestampmap = {\\n        MPEGTS: 0,\\n        LOCAL: 0\\n      };\\n      parser.oncue = segmentInfo.cues.push.bind(segmentInfo.cues);\\n\\n      parser.ontimestampmap = function (map) {\\n        return segmentInfo.timestampmap = map;\\n      };\\n\\n      parser.onparsingerror = function (error) {\\n        videojs$1.log.warn('Error encountered when parsing cues: ' + error.message);\\n      };\\n\\n      if (segmentInfo.segment.map) {\\n        var mapData = segmentInfo.segment.map.bytes;\\n\\n        if (decodeBytesToString) {\\n          mapData = uint8ToUtf8(mapData);\\n        }\\n\\n        parser.parse(mapData);\\n      }\\n\\n      var segmentData = segmentInfo.bytes;\\n\\n      if (decodeBytesToString) {\\n        segmentData = uint8ToUtf8(segmentData);\\n      }\\n\\n      parser.parse(segmentData);\\n      parser.flush();\\n    }\\n    /**\\n     * Updates the start and end times of any cues parsed by the WebVTT parser using\\n     * the information parsed from the X-TIMESTAMP-MAP header and a TS to media time mapping\\n     * from the SyncController\\n     *\\n     * @param {Object} segmentInfo\\n     *        a segment info object that describes the current segment\\n     * @param {Object} mappingObj\\n     *        object containing a mapping from TS to media time\\n     * @param {Object} playlist\\n     *        the playlist object containing the segment\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'updateTimeMapping_',\\n    value: function updateTimeMapping_(segmentInfo, mappingObj, playlist) {\\n      var segment = segmentInfo.segment;\\n\\n      if (!mappingObj) {\\n        // If the sync controller does not have a mapping of TS to Media Time for the\\n        // timeline, then we don't have enough information to update the cue\\n        // start/end times\\n        return;\\n      }\\n\\n      if (!segmentInfo.cues.length) {\\n        // If there are no cues, we also do not have enough information to figure out\\n        // segment timing. Mark that the segment contains no cues so we don't re-request\\n        // an empty segment.\\n        segment.empty = true;\\n        return;\\n      }\\n\\n      var timestampmap = segmentInfo.timestampmap;\\n      var diff = timestampmap.MPEGTS / 90000 - timestampmap.LOCAL + mappingObj.mapping;\\n      segmentInfo.cues.forEach(function (cue) {\\n        // First convert cue time to TS time using the timestamp-map provided within the vtt\\n        cue.startTime += diff;\\n        cue.endTime += diff;\\n      });\\n\\n      if (!playlist.syncInfo) {\\n        var firstStart = segmentInfo.cues[0].startTime;\\n        var lastStart = segmentInfo.cues[segmentInfo.cues.length - 1].startTime;\\n        playlist.syncInfo = {\\n          mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\\n          time: Math.min(firstStart, lastStart - segment.duration)\\n        };\\n      }\\n    }\\n  }]);\\n  return VTTSegmentLoader;\\n}(SegmentLoader);\\n/**\\n * @file ad-cue-tags.js\\n */\\n\\n/**\\n * Searches for an ad cue that overlaps with the given mediaTime\\n */\\n\\n\\nvar findAdCue = function findAdCue(track, mediaTime) {\\n  var cues = track.cues;\\n\\n  for (var i = 0; i < cues.length; i++) {\\n    var cue = cues[i];\\n\\n    if (mediaTime >= cue.adStartTime && mediaTime <= cue.adEndTime) {\\n      return cue;\\n    }\\n  }\\n\\n  return null;\\n};\\n\\nvar updateAdCues = function updateAdCues(media, track) {\\n  var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\\n\\n  if (!media.segments) {\\n    return;\\n  }\\n\\n  var mediaTime = offset;\\n  var cue = void 0;\\n\\n  for (var i = 0; i < media.segments.length; i++) {\\n    var segment = media.segments[i];\\n\\n    if (!cue) {\\n      // Since the cues will span for at least the segment duration, adding a fudge\\n      // factor of half segment duration will prevent duplicate cues from being\\n      // created when timing info is not exact (e.g. cue start time initialized\\n      // at 10.006677, but next call mediaTime is 10.003332 )\\n      cue = findAdCue(track, mediaTime + segment.duration / 2);\\n    }\\n\\n    if (cue) {\\n      if ('cueIn' in segment) {\\n        // Found a CUE-IN so end the cue\\n        cue.endTime = mediaTime;\\n        cue.adEndTime = mediaTime;\\n        mediaTime += segment.duration;\\n        cue = null;\\n        continue;\\n      }\\n\\n      if (mediaTime < cue.endTime) {\\n        // Already processed this mediaTime for this cue\\n        mediaTime += segment.duration;\\n        continue;\\n      } // otherwise extend cue until a CUE-IN is found\\n\\n\\n      cue.endTime += segment.duration;\\n    } else {\\n      if ('cueOut' in segment) {\\n        cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(mediaTime, mediaTime + segment.duration, segment.cueOut);\\n        cue.adStartTime = mediaTime; // Assumes tag format to be\\n        // #EXT-X-CUE-OUT:30\\n\\n        cue.adEndTime = mediaTime + parseFloat(segment.cueOut);\\n        track.addCue(cue);\\n      }\\n\\n      if ('cueOutCont' in segment) {\\n        // Entered into the middle of an ad cue\\n        var adOffset = void 0;\\n        var adTotal = void 0; // Assumes tag formate to be\\n        // #EXT-X-CUE-OUT-CONT:10/30\\n\\n        var _segment$cueOutCont$s = segment.cueOutCont.split('/').map(parseFloat);\\n\\n        var _segment$cueOutCont$s2 = slicedToArray(_segment$cueOutCont$s, 2);\\n\\n        adOffset = _segment$cueOutCont$s2[0];\\n        adTotal = _segment$cueOutCont$s2[1];\\n        cue = new global_window__WEBPACK_IMPORTED_MODULE_0___default.a.VTTCue(mediaTime, mediaTime + segment.duration, '');\\n        cue.adStartTime = mediaTime - adOffset;\\n        cue.adEndTime = cue.adStartTime + adTotal;\\n        track.addCue(cue);\\n      }\\n    }\\n\\n    mediaTime += segment.duration;\\n  }\\n};\\n/**\\n * @file sync-controller.js\\n */\\n\\n\\nvar tsprobe = mux_js_lib_tools_ts_inspector_js__WEBPACK_IMPORTED_MODULE_19___default.a.inspect;\\nvar syncPointStrategies = [// Stategy \\\"VOD\\\": Handle the VOD-case where the sync-point is *always*\\n//                the equivalence display-time 0 === segment-index 0\\n{\\n  name: 'VOD',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    if (duration$$1 !== Infinity) {\\n      var syncPoint = {\\n        time: 0,\\n        segmentIndex: 0\\n      };\\n      return syncPoint;\\n    }\\n\\n    return null;\\n  }\\n}, // Stategy \\\"ProgramDateTime\\\": We have a program-date-time tag in this playlist\\n{\\n  name: 'ProgramDateTime',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    if (!syncController.datetimeToDisplayTime) {\\n      return null;\\n    }\\n\\n    var segments = playlist.segments || [];\\n    var syncPoint = null;\\n    var lastDistance = null;\\n    currentTime = currentTime || 0;\\n\\n    for (var i = 0; i < segments.length; i++) {\\n      var segment = segments[i];\\n\\n      if (segment.dateTimeObject) {\\n        var segmentTime = segment.dateTimeObject.getTime() / 1000;\\n        var segmentStart = segmentTime + syncController.datetimeToDisplayTime;\\n        var distance = Math.abs(currentTime - segmentStart); // Once the distance begins to increase, or if distance is 0, we have passed\\n        // currentTime and can stop looking for better candidates\\n\\n        if (lastDistance !== null && (distance === 0 || lastDistance < distance)) {\\n          break;\\n        }\\n\\n        lastDistance = distance;\\n        syncPoint = {\\n          time: segmentStart,\\n          segmentIndex: i\\n        };\\n      }\\n    }\\n\\n    return syncPoint;\\n  }\\n}, // Stategy \\\"Segment\\\": We have a known time mapping for a timeline and a\\n//                    segment in the current timeline with timing data\\n{\\n  name: 'Segment',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    var segments = playlist.segments || [];\\n    var syncPoint = null;\\n    var lastDistance = null;\\n    currentTime = currentTime || 0;\\n\\n    for (var i = 0; i < segments.length; i++) {\\n      var segment = segments[i];\\n\\n      if (segment.timeline === currentTimeline && typeof segment.start !== 'undefined') {\\n        var distance = Math.abs(currentTime - segment.start); // Once the distance begins to increase, we have passed\\n        // currentTime and can stop looking for better candidates\\n\\n        if (lastDistance !== null && lastDistance < distance) {\\n          break;\\n        }\\n\\n        if (!syncPoint || lastDistance === null || lastDistance >= distance) {\\n          lastDistance = distance;\\n          syncPoint = {\\n            time: segment.start,\\n            segmentIndex: i\\n          };\\n        }\\n      }\\n    }\\n\\n    return syncPoint;\\n  }\\n}, // Stategy \\\"Discontinuity\\\": We have a discontinuity with a known\\n//                          display-time\\n{\\n  name: 'Discontinuity',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    var syncPoint = null;\\n    currentTime = currentTime || 0;\\n\\n    if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\\n      var lastDistance = null;\\n\\n      for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\\n        var segmentIndex = playlist.discontinuityStarts[i];\\n        var discontinuity = playlist.discontinuitySequence + i + 1;\\n        var discontinuitySync = syncController.discontinuities[discontinuity];\\n\\n        if (discontinuitySync) {\\n          var distance = Math.abs(currentTime - discontinuitySync.time); // Once the distance begins to increase, we have passed\\n          // currentTime and can stop looking for better candidates\\n\\n          if (lastDistance !== null && lastDistance < distance) {\\n            break;\\n          }\\n\\n          if (!syncPoint || lastDistance === null || lastDistance >= distance) {\\n            lastDistance = distance;\\n            syncPoint = {\\n              time: discontinuitySync.time,\\n              segmentIndex: segmentIndex\\n            };\\n          }\\n        }\\n      }\\n    }\\n\\n    return syncPoint;\\n  }\\n}, // Stategy \\\"Playlist\\\": We have a playlist with a known mapping of\\n//                     segment index to display time\\n{\\n  name: 'Playlist',\\n  run: function run(syncController, playlist, duration$$1, currentTimeline, currentTime) {\\n    if (playlist.syncInfo) {\\n      var syncPoint = {\\n        time: playlist.syncInfo.time,\\n        segmentIndex: playlist.syncInfo.mediaSequence - playlist.mediaSequence\\n      };\\n      return syncPoint;\\n    }\\n\\n    return null;\\n  }\\n}];\\n\\nvar SyncController = function (_videojs$EventTarget) {\\n  inherits(SyncController, _videojs$EventTarget);\\n\\n  function SyncController() {\\n    classCallCheck(this, SyncController); // Segment Loader state variables...\\n    // ...for synching across variants\\n\\n    var _this = possibleConstructorReturn(this, (SyncController.__proto__ || Object.getPrototypeOf(SyncController)).call(this));\\n\\n    _this.inspectCache_ = undefined; // ...for synching across variants\\n\\n    _this.timelines = [];\\n    _this.discontinuities = [];\\n    _this.datetimeToDisplayTime = null;\\n    _this.logger_ = logger('SyncController');\\n    return _this;\\n  }\\n  /**\\n   * Find a sync-point for the playlist specified\\n   *\\n   * A sync-point is defined as a known mapping from display-time to\\n   * a segment-index in the current playlist.\\n   *\\n   * @param {Playlist} playlist\\n   *        The playlist that needs a sync-point\\n   * @param {Number} duration\\n   *        Duration of the MediaSource (Infinite if playing a live source)\\n   * @param {Number} currentTimeline\\n   *        The last timeline from which a segment was loaded\\n   * @returns {Object}\\n   *          A sync-point object\\n   */\\n\\n\\n  createClass(SyncController, [{\\n    key: 'getSyncPoint',\\n    value: function getSyncPoint(playlist, duration$$1, currentTimeline, currentTime) {\\n      var syncPoints = this.runStrategies_(playlist, duration$$1, currentTimeline, currentTime);\\n\\n      if (!syncPoints.length) {\\n        // Signal that we need to attempt to get a sync-point manually\\n        // by fetching a segment in the playlist and constructing\\n        // a sync-point from that information\\n        return null;\\n      } // Now find the sync-point that is closest to the currentTime because\\n      // that should result in the most accurate guess about which segment\\n      // to fetch\\n\\n\\n      return this.selectSyncPoint_(syncPoints, {\\n        key: 'time',\\n        value: currentTime\\n      });\\n    }\\n    /**\\n     * Calculate the amount of time that has expired off the playlist during playback\\n     *\\n     * @param {Playlist} playlist\\n     *        Playlist object to calculate expired from\\n     * @param {Number} duration\\n     *        Duration of the MediaSource (Infinity if playling a live source)\\n     * @returns {Number|null}\\n     *          The amount of time that has expired off the playlist during playback. Null\\n     *          if no sync-points for the playlist can be found.\\n     */\\n\\n  }, {\\n    key: 'getExpiredTime',\\n    value: function getExpiredTime(playlist, duration$$1) {\\n      if (!playlist || !playlist.segments) {\\n        return null;\\n      }\\n\\n      var syncPoints = this.runStrategies_(playlist, duration$$1, playlist.discontinuitySequence, 0); // Without sync-points, there is not enough information to determine the expired time\\n\\n      if (!syncPoints.length) {\\n        return null;\\n      }\\n\\n      var syncPoint = this.selectSyncPoint_(syncPoints, {\\n        key: 'segmentIndex',\\n        value: 0\\n      }); // If the sync-point is beyond the start of the playlist, we want to subtract the\\n      // duration from index 0 to syncPoint.segmentIndex instead of adding.\\n\\n      if (syncPoint.segmentIndex > 0) {\\n        syncPoint.time *= -1;\\n      }\\n\\n      return Math.abs(syncPoint.time + sumDurations(playlist, syncPoint.segmentIndex, 0));\\n    }\\n    /**\\n     * Runs each sync-point strategy and returns a list of sync-points returned by the\\n     * strategies\\n     *\\n     * @private\\n     * @param {Playlist} playlist\\n     *        The playlist that needs a sync-point\\n     * @param {Number} duration\\n     *        Duration of the MediaSource (Infinity if playing a live source)\\n     * @param {Number} currentTimeline\\n     *        The last timeline from which a segment was loaded\\n     * @returns {Array}\\n     *          A list of sync-point objects\\n     */\\n\\n  }, {\\n    key: 'runStrategies_',\\n    value: function runStrategies_(playlist, duration$$1, currentTimeline, currentTime) {\\n      var syncPoints = []; // Try to find a sync-point in by utilizing various strategies...\\n\\n      for (var i = 0; i < syncPointStrategies.length; i++) {\\n        var strategy = syncPointStrategies[i];\\n        var syncPoint = strategy.run(this, playlist, duration$$1, currentTimeline, currentTime);\\n\\n        if (syncPoint) {\\n          syncPoint.strategy = strategy.name;\\n          syncPoints.push({\\n            strategy: strategy.name,\\n            syncPoint: syncPoint\\n          });\\n        }\\n      }\\n\\n      return syncPoints;\\n    }\\n    /**\\n     * Selects the sync-point nearest the specified target\\n     *\\n     * @private\\n     * @param {Array} syncPoints\\n     *        List of sync-points to select from\\n     * @param {Object} target\\n     *        Object specifying the property and value we are targeting\\n     * @param {String} target.key\\n     *        Specifies the property to target. Must be either 'time' or 'segmentIndex'\\n     * @param {Number} target.value\\n     *        The value to target for the specified key.\\n     * @returns {Object}\\n     *          The sync-point nearest the target\\n     */\\n\\n  }, {\\n    key: 'selectSyncPoint_',\\n    value: function selectSyncPoint_(syncPoints, target) {\\n      var bestSyncPoint = syncPoints[0].syncPoint;\\n      var bestDistance = Math.abs(syncPoints[0].syncPoint[target.key] - target.value);\\n      var bestStrategy = syncPoints[0].strategy;\\n\\n      for (var i = 1; i < syncPoints.length; i++) {\\n        var newDistance = Math.abs(syncPoints[i].syncPoint[target.key] - target.value);\\n\\n        if (newDistance < bestDistance) {\\n          bestDistance = newDistance;\\n          bestSyncPoint = syncPoints[i].syncPoint;\\n          bestStrategy = syncPoints[i].strategy;\\n        }\\n      }\\n\\n      this.logger_('syncPoint for [' + target.key + ': ' + target.value + '] chosen with strategy' + (' [' + bestStrategy + ']: [time:' + bestSyncPoint.time + ',') + (' segmentIndex:' + bestSyncPoint.segmentIndex + ']'));\\n      return bestSyncPoint;\\n    }\\n    /**\\n     * Save any meta-data present on the segments when segments leave\\n     * the live window to the playlist to allow for synchronization at the\\n     * playlist level later.\\n     *\\n     * @param {Playlist} oldPlaylist - The previous active playlist\\n     * @param {Playlist} newPlaylist - The updated and most current playlist\\n     */\\n\\n  }, {\\n    key: 'saveExpiredSegmentInfo',\\n    value: function saveExpiredSegmentInfo(oldPlaylist, newPlaylist) {\\n      var mediaSequenceDiff = newPlaylist.mediaSequence - oldPlaylist.mediaSequence; // When a segment expires from the playlist and it has a start time\\n      // save that information as a possible sync-point reference in future\\n\\n      for (var i = mediaSequenceDiff - 1; i >= 0; i--) {\\n        var lastRemovedSegment = oldPlaylist.segments[i];\\n\\n        if (lastRemovedSegment && typeof lastRemovedSegment.start !== 'undefined') {\\n          newPlaylist.syncInfo = {\\n            mediaSequence: oldPlaylist.mediaSequence + i,\\n            time: lastRemovedSegment.start\\n          };\\n          this.logger_('playlist refresh sync: [time:' + newPlaylist.syncInfo.time + ',' + (' mediaSequence: ' + newPlaylist.syncInfo.mediaSequence + ']'));\\n          this.trigger('syncinfoupdate');\\n          break;\\n        }\\n      }\\n    }\\n    /**\\n     * Save the mapping from playlist's ProgramDateTime to display. This should\\n     * only ever happen once at the start of playback.\\n     *\\n     * @param {Playlist} playlist - The currently active playlist\\n     */\\n\\n  }, {\\n    key: 'setDateTimeMapping',\\n    value: function setDateTimeMapping(playlist) {\\n      if (!this.datetimeToDisplayTime && playlist.segments && playlist.segments.length && playlist.segments[0].dateTimeObject) {\\n        var playlistTimestamp = playlist.segments[0].dateTimeObject.getTime() / 1000;\\n        this.datetimeToDisplayTime = -playlistTimestamp;\\n      }\\n    }\\n    /**\\n     * Reset the state of the inspection cache when we do a rendition\\n     * switch\\n     */\\n\\n  }, {\\n    key: 'reset',\\n    value: function reset() {\\n      this.inspectCache_ = undefined;\\n    }\\n    /**\\n     * Probe or inspect a fmp4 or an mpeg2-ts segment to determine the start\\n     * and end of the segment in it's internal \\\"media time\\\". Used to generate\\n     * mappings from that internal \\\"media time\\\" to the display time that is\\n     * shown on the player.\\n     *\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     */\\n\\n  }, {\\n    key: 'probeSegmentInfo',\\n    value: function probeSegmentInfo(segmentInfo) {\\n      var segment = segmentInfo.segment;\\n      var playlist = segmentInfo.playlist;\\n      var timingInfo = void 0;\\n\\n      if (segment.map) {\\n        timingInfo = this.probeMp4Segment_(segmentInfo);\\n      } else {\\n        timingInfo = this.probeTsSegment_(segmentInfo);\\n      }\\n\\n      if (timingInfo) {\\n        if (this.calculateSegmentTimeMapping_(segmentInfo, timingInfo)) {\\n          this.saveDiscontinuitySyncInfo_(segmentInfo); // If the playlist does not have sync information yet, record that information\\n          // now with segment timing information\\n\\n          if (!playlist.syncInfo) {\\n            playlist.syncInfo = {\\n              mediaSequence: playlist.mediaSequence + segmentInfo.mediaIndex,\\n              time: segment.start\\n            };\\n          }\\n        }\\n      }\\n\\n      return timingInfo;\\n    }\\n    /**\\n     * Probe an fmp4 segment to determine the start of the segment\\n     * in it's internal \\\"composition time\\\", which is equal to the base\\n     * media decode time plus the composition time offset value\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     * @return {object} The start and end time of the current segment in \\\"composition time\\\"\\n     */\\n\\n  }, {\\n    key: 'probeMp4Segment_',\\n    value: function probeMp4Segment_(segmentInfo) {\\n      var segment = segmentInfo.segment; // get timescales from init segment\\n\\n      var timescales = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.timescale(segment.map.bytes); // calculate composition start time using the timescales and information\\n      // contained within the media segment\\n\\n      var compositionStartTime = mux_js_lib_mp4_probe__WEBPACK_IMPORTED_MODULE_17___default.a.compositionStartTime(timescales, segmentInfo.bytes);\\n\\n      if (segmentInfo.timestampOffset !== null) {\\n        segmentInfo.timestampOffset -= compositionStartTime;\\n      }\\n\\n      return {\\n        start: compositionStartTime,\\n        end: compositionStartTime + segment.duration\\n      };\\n    }\\n    /**\\n     * Probe an mpeg2-ts segment to determine the start and end of the segment\\n     * in it's internal \\\"media time\\\".\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     * @return {object} The start and end time of the current segment in \\\"media time\\\"\\n     */\\n\\n  }, {\\n    key: 'probeTsSegment_',\\n    value: function probeTsSegment_(segmentInfo) {\\n      var timeInfo = tsprobe(segmentInfo.bytes, this.inspectCache_);\\n      var segmentStartTime = void 0;\\n      var segmentEndTime = void 0;\\n      var segmentTimestampInfo = void 0;\\n\\n      if (!timeInfo) {\\n        return null;\\n      }\\n\\n      if (timeInfo.video && timeInfo.video.length === 2) {\\n        this.inspectCache_ = timeInfo.video[1].dts;\\n        segmentStartTime = timeInfo.video[0].dtsTime;\\n        segmentEndTime = timeInfo.video[1].dtsTime;\\n        segmentTimestampInfo = timeInfo.video;\\n      } else if (timeInfo.audio && timeInfo.audio.length === 2) {\\n        this.inspectCache_ = timeInfo.audio[1].dts;\\n        segmentStartTime = timeInfo.audio[0].dtsTime;\\n        segmentEndTime = timeInfo.audio[1].dtsTime;\\n        segmentTimestampInfo = timeInfo.audio;\\n      }\\n\\n      var probedInfo = {\\n        segmentTimestampInfo: segmentTimestampInfo,\\n        start: segmentStartTime,\\n        end: segmentEndTime,\\n        containsVideo: timeInfo.video && timeInfo.video.length === 2,\\n        containsAudio: timeInfo.audio && timeInfo.audio.length === 2\\n      };\\n      return probedInfo;\\n    }\\n  }, {\\n    key: 'timestampOffsetForTimeline',\\n    value: function timestampOffsetForTimeline(timeline) {\\n      if (typeof this.timelines[timeline] === 'undefined') {\\n        return null;\\n      }\\n\\n      return this.timelines[timeline].time;\\n    }\\n  }, {\\n    key: 'mappingForTimeline',\\n    value: function mappingForTimeline(timeline) {\\n      if (typeof this.timelines[timeline] === 'undefined') {\\n        return null;\\n      }\\n\\n      return this.timelines[timeline].mapping;\\n    }\\n    /**\\n     * Use the \\\"media time\\\" for a segment to generate a mapping to \\\"display time\\\" and\\n     * save that display time to the segment.\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo\\n     *        The current active request information\\n     * @param {object} timingInfo\\n     *        The start and end time of the current segment in \\\"media time\\\"\\n     * @returns {Boolean}\\n     *          Returns false if segment time mapping could not be calculated\\n     */\\n\\n  }, {\\n    key: 'calculateSegmentTimeMapping_',\\n    value: function calculateSegmentTimeMapping_(segmentInfo, timingInfo) {\\n      var segment = segmentInfo.segment;\\n      var mappingObj = this.timelines[segmentInfo.timeline];\\n\\n      if (segmentInfo.timestampOffset !== null) {\\n        mappingObj = {\\n          time: segmentInfo.startOfSegment,\\n          mapping: segmentInfo.startOfSegment - timingInfo.start\\n        };\\n        this.timelines[segmentInfo.timeline] = mappingObj;\\n        this.trigger('timestampoffset');\\n        this.logger_('time mapping for timeline ' + segmentInfo.timeline + ': ' + ('[time: ' + mappingObj.time + '] [mapping: ' + mappingObj.mapping + ']'));\\n        segment.start = segmentInfo.startOfSegment;\\n        segment.end = timingInfo.end + mappingObj.mapping;\\n      } else if (mappingObj) {\\n        segment.start = timingInfo.start + mappingObj.mapping;\\n        segment.end = timingInfo.end + mappingObj.mapping;\\n      } else {\\n        return false;\\n      }\\n\\n      return true;\\n    }\\n    /**\\n     * Each time we have discontinuity in the playlist, attempt to calculate the location\\n     * in display of the start of the discontinuity and save that. We also save an accuracy\\n     * value so that we save values with the most accuracy (closest to 0.)\\n     *\\n     * @private\\n     * @param {SegmentInfo} segmentInfo - The current active request information\\n     */\\n\\n  }, {\\n    key: 'saveDiscontinuitySyncInfo_',\\n    value: function saveDiscontinuitySyncInfo_(segmentInfo) {\\n      var playlist = segmentInfo.playlist;\\n      var segment = segmentInfo.segment; // If the current segment is a discontinuity then we know exactly where\\n      // the start of the range and it's accuracy is 0 (greater accuracy values\\n      // mean more approximation)\\n\\n      if (segment.discontinuity) {\\n        this.discontinuities[segment.timeline] = {\\n          time: segment.start,\\n          accuracy: 0\\n        };\\n      } else if (playlist.discontinuityStarts && playlist.discontinuityStarts.length) {\\n        // Search for future discontinuities that we can provide better timing\\n        // information for and save that information for sync purposes\\n        for (var i = 0; i < playlist.discontinuityStarts.length; i++) {\\n          var segmentIndex = playlist.discontinuityStarts[i];\\n          var discontinuity = playlist.discontinuitySequence + i + 1;\\n          var mediaIndexDiff = segmentIndex - segmentInfo.mediaIndex;\\n          var accuracy = Math.abs(mediaIndexDiff);\\n\\n          if (!this.discontinuities[discontinuity] || this.discontinuities[discontinuity].accuracy > accuracy) {\\n            var time = void 0;\\n\\n            if (mediaIndexDiff < 0) {\\n              time = segment.start - sumDurations(playlist, segmentInfo.mediaIndex, segmentIndex);\\n            } else {\\n              time = segment.end + sumDurations(playlist, segmentInfo.mediaIndex + 1, segmentIndex);\\n            }\\n\\n            this.discontinuities[discontinuity] = {\\n              time: time,\\n              accuracy: accuracy\\n            };\\n          }\\n        }\\n      }\\n    }\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      this.trigger('dispose');\\n      this.off();\\n    }\\n  }]);\\n  return SyncController;\\n}(videojs$1.EventTarget);\\n\\nvar Decrypter$1 = new shimWorker(\\\"./decrypter-worker.worker.js\\\", function (window, document$$1) {\\n  var self = this;\\n\\n  var decrypterWorker = function () {\\n    /*\\n     * pkcs7.pad\\n     * https://github.com/brightcove/pkcs7\\n     *\\n     * Copyright (c) 2014 Brightcove\\n     * Licensed under the apache2 license.\\n     */\\n\\n    /**\\n     * Returns the subarray of a Uint8Array without PKCS#7 padding.\\n     * @param padded {Uint8Array} unencrypted bytes that have been padded\\n     * @return {Uint8Array} the unpadded bytes\\n     * @see http://tools.ietf.org/html/rfc5652\\n     */\\n    function unpad(padded) {\\n      return padded.subarray(0, padded.byteLength - padded[padded.byteLength - 1]);\\n    }\\n\\n    var classCallCheck = function classCallCheck(instance, Constructor) {\\n      if (!(instance instanceof Constructor)) {\\n        throw new TypeError(\\\"Cannot call a class as a function\\\");\\n      }\\n    };\\n\\n    var createClass = function () {\\n      function defineProperties(target, props) {\\n        for (var i = 0; i < props.length; i++) {\\n          var descriptor = props[i];\\n          descriptor.enumerable = descriptor.enumerable || false;\\n          descriptor.configurable = true;\\n          if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n          Object.defineProperty(target, descriptor.key, descriptor);\\n        }\\n      }\\n\\n      return function (Constructor, protoProps, staticProps) {\\n        if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n        if (staticProps) defineProperties(Constructor, staticProps);\\n        return Constructor;\\n      };\\n    }();\\n\\n    var inherits = function inherits(subClass, superClass) {\\n      if (typeof superClass !== \\\"function\\\" && superClass !== null) {\\n        throw new TypeError(\\\"Super expression must either be null or a function, not \\\" + typeof superClass);\\n      }\\n\\n      subClass.prototype = Object.create(superClass && superClass.prototype, {\\n        constructor: {\\n          value: subClass,\\n          enumerable: false,\\n          writable: true,\\n          configurable: true\\n        }\\n      });\\n      if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\\n    };\\n\\n    var possibleConstructorReturn = function possibleConstructorReturn(self, call) {\\n      if (!self) {\\n        throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n      }\\n\\n      return call && (typeof call === \\\"object\\\" || typeof call === \\\"function\\\") ? call : self;\\n    };\\n    /**\\n     * @file aes.js\\n     *\\n     * This file contains an adaptation of the AES decryption algorithm\\n     * from the Standford Javascript Cryptography Library. That work is\\n     * covered by the following copyright and permissions notice:\\n     *\\n     * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\\n     * All rights reserved.\\n     *\\n     * Redistribution and use in source and binary forms, with or without\\n     * modification, are permitted provided that the following conditions are\\n     * met:\\n     *\\n     * 1. Redistributions of source code must retain the above copyright\\n     *    notice, this list of conditions and the following disclaimer.\\n     *\\n     * 2. Redistributions in binary form must reproduce the above\\n     *    copyright notice, this list of conditions and the following\\n     *    disclaimer in the documentation and/or other materials provided\\n     *    with the distribution.\\n     *\\n     * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\\n     * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\\n     * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\\n     * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\\n     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\\n     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\\n     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\\n     * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\\n     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\\n     * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\\n     * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\\n     *\\n     * The views and conclusions contained in the software and documentation\\n     * are those of the authors and should not be interpreted as representing\\n     * official policies, either expressed or implied, of the authors.\\n     */\\n\\n    /**\\n     * Expand the S-box tables.\\n     *\\n     * @private\\n     */\\n\\n\\n    var precompute = function precompute() {\\n      var tables = [[[], [], [], [], []], [[], [], [], [], []]];\\n      var encTable = tables[0];\\n      var decTable = tables[1];\\n      var sbox = encTable[4];\\n      var sboxInv = decTable[4];\\n      var i = void 0;\\n      var x = void 0;\\n      var xInv = void 0;\\n      var d = [];\\n      var th = [];\\n      var x2 = void 0;\\n      var x4 = void 0;\\n      var x8 = void 0;\\n      var s = void 0;\\n      var tEnc = void 0;\\n      var tDec = void 0; // Compute double and third tables\\n\\n      for (i = 0; i < 256; i++) {\\n        th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\\n      }\\n\\n      for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\\n        // Compute sbox\\n        s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\\n        s = s >> 8 ^ s & 255 ^ 99;\\n        sbox[x] = s;\\n        sboxInv[s] = x; // Compute MixColumns\\n\\n        x8 = d[x4 = d[x2 = d[x]]];\\n        tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\\n        tEnc = d[s] * 0x101 ^ s * 0x1010100;\\n\\n        for (i = 0; i < 4; i++) {\\n          encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\\n          decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\\n        }\\n      } // Compactify. Considerable speedup on Firefox.\\n\\n\\n      for (i = 0; i < 5; i++) {\\n        encTable[i] = encTable[i].slice(0);\\n        decTable[i] = decTable[i].slice(0);\\n      }\\n\\n      return tables;\\n    };\\n\\n    var aesTables = null;\\n    /**\\n     * Schedule out an AES key for both encryption and decryption. This\\n     * is a low-level class. Use a cipher mode to do bulk encryption.\\n     *\\n     * @class AES\\n     * @param key {Array} The key as an array of 4, 6 or 8 words.\\n     */\\n\\n    var AES = function () {\\n      function AES(key) {\\n        classCallCheck(this, AES);\\n        /**\\n         * The expanded S-box and inverse S-box tables. These will be computed\\n         * on the client so that we don't have to send them down the wire.\\n         *\\n         * There are two tables, _tables[0] is for encryption and\\n         * _tables[1] is for decryption.\\n         *\\n         * The first 4 sub-tables are the expanded S-box with MixColumns. The\\n         * last (_tables[01][4]) is the S-box itself.\\n         *\\n         * @private\\n         */\\n        // if we have yet to precompute the S-box tables\\n        // do so now\\n\\n        if (!aesTables) {\\n          aesTables = precompute();\\n        } // then make a copy of that object for use\\n\\n\\n        this._tables = [[aesTables[0][0].slice(), aesTables[0][1].slice(), aesTables[0][2].slice(), aesTables[0][3].slice(), aesTables[0][4].slice()], [aesTables[1][0].slice(), aesTables[1][1].slice(), aesTables[1][2].slice(), aesTables[1][3].slice(), aesTables[1][4].slice()]];\\n        var i = void 0;\\n        var j = void 0;\\n        var tmp = void 0;\\n        var encKey = void 0;\\n        var decKey = void 0;\\n        var sbox = this._tables[0][4];\\n        var decTable = this._tables[1];\\n        var keyLen = key.length;\\n        var rcon = 1;\\n\\n        if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\\n          throw new Error('Invalid aes key size');\\n        }\\n\\n        encKey = key.slice(0);\\n        decKey = [];\\n        this._key = [encKey, decKey]; // schedule encryption keys\\n\\n        for (i = keyLen; i < 4 * keyLen + 28; i++) {\\n          tmp = encKey[i - 1]; // apply sbox\\n\\n          if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\\n            tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; // shift rows and add rcon\\n\\n            if (i % keyLen === 0) {\\n              tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\\n              rcon = rcon << 1 ^ (rcon >> 7) * 283;\\n            }\\n          }\\n\\n          encKey[i] = encKey[i - keyLen] ^ tmp;\\n        } // schedule decryption keys\\n\\n\\n        for (j = 0; i; j++, i--) {\\n          tmp = encKey[j & 3 ? i : i - 4];\\n\\n          if (i <= 4 || j < 4) {\\n            decKey[j] = tmp;\\n          } else {\\n            decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\\n          }\\n        }\\n      }\\n      /**\\n       * Decrypt 16 bytes, specified as four 32-bit words.\\n       *\\n       * @param {Number} encrypted0 the first word to decrypt\\n       * @param {Number} encrypted1 the second word to decrypt\\n       * @param {Number} encrypted2 the third word to decrypt\\n       * @param {Number} encrypted3 the fourth word to decrypt\\n       * @param {Int32Array} out the array to write the decrypted words\\n       * into\\n       * @param {Number} offset the offset into the output array to start\\n       * writing results\\n       * @return {Array} The plaintext.\\n       */\\n\\n\\n      AES.prototype.decrypt = function decrypt$$1(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\\n        var key = this._key[1]; // state variables a,b,c,d are loaded with pre-whitened data\\n\\n        var a = encrypted0 ^ key[0];\\n        var b = encrypted3 ^ key[1];\\n        var c = encrypted2 ^ key[2];\\n        var d = encrypted1 ^ key[3];\\n        var a2 = void 0;\\n        var b2 = void 0;\\n        var c2 = void 0; // key.length === 2 ?\\n\\n        var nInnerRounds = key.length / 4 - 2;\\n        var i = void 0;\\n        var kIndex = 4;\\n        var table = this._tables[1]; // load up the tables\\n\\n        var table0 = table[0];\\n        var table1 = table[1];\\n        var table2 = table[2];\\n        var table3 = table[3];\\n        var sbox = table[4]; // Inner rounds. Cribbed from OpenSSL.\\n\\n        for (i = 0; i < nInnerRounds; i++) {\\n          a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\\n          b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\\n          c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\\n          d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\\n          kIndex += 4;\\n          a = a2;\\n          b = b2;\\n          c = c2;\\n        } // Last round.\\n\\n\\n        for (i = 0; i < 4; i++) {\\n          out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\\n          a2 = a;\\n          a = b;\\n          b = c;\\n          c = d;\\n          d = a2;\\n        }\\n      };\\n\\n      return AES;\\n    }();\\n    /**\\n     * @file stream.js\\n     */\\n\\n    /**\\n     * A lightweight readable stream implemention that handles event dispatching.\\n     *\\n     * @class Stream\\n     */\\n\\n\\n    var Stream = function () {\\n      function Stream() {\\n        classCallCheck(this, Stream);\\n        this.listeners = {};\\n      }\\n      /**\\n       * Add a listener for a specified event type.\\n       *\\n       * @param {String} type the event name\\n       * @param {Function} listener the callback to be invoked when an event of\\n       * the specified type occurs\\n       */\\n\\n\\n      Stream.prototype.on = function on(type, listener) {\\n        if (!this.listeners[type]) {\\n          this.listeners[type] = [];\\n        }\\n\\n        this.listeners[type].push(listener);\\n      };\\n      /**\\n       * Remove a listener for a specified event type.\\n       *\\n       * @param {String} type the event name\\n       * @param {Function} listener  a function previously registered for this\\n       * type of event through `on`\\n       * @return {Boolean} if we could turn it off or not\\n       */\\n\\n\\n      Stream.prototype.off = function off(type, listener) {\\n        if (!this.listeners[type]) {\\n          return false;\\n        }\\n\\n        var index = this.listeners[type].indexOf(listener);\\n        this.listeners[type].splice(index, 1);\\n        return index > -1;\\n      };\\n      /**\\n       * Trigger an event of the specified type on this stream. Any additional\\n       * arguments to this function are passed as parameters to event listeners.\\n       *\\n       * @param {String} type the event name\\n       */\\n\\n\\n      Stream.prototype.trigger = function trigger(type) {\\n        var callbacks = this.listeners[type];\\n\\n        if (!callbacks) {\\n          return;\\n        } // Slicing the arguments on every invocation of this method\\n        // can add a significant amount of overhead. Avoid the\\n        // intermediate object creation for the common case of a\\n        // single callback argument\\n\\n\\n        if (arguments.length === 2) {\\n          var length = callbacks.length;\\n\\n          for (var i = 0; i < length; ++i) {\\n            callbacks[i].call(this, arguments[1]);\\n          }\\n        } else {\\n          var args = Array.prototype.slice.call(arguments, 1);\\n          var _length = callbacks.length;\\n\\n          for (var _i = 0; _i < _length; ++_i) {\\n            callbacks[_i].apply(this, args);\\n          }\\n        }\\n      };\\n      /**\\n       * Destroys the stream and cleans up.\\n       */\\n\\n\\n      Stream.prototype.dispose = function dispose() {\\n        this.listeners = {};\\n      };\\n      /**\\n       * Forwards all `data` events on this stream to the destination stream. The\\n       * destination stream should provide a method `push` to receive the data\\n       * events as they arrive.\\n       *\\n       * @param {Stream} destination the stream that will receive all `data` events\\n       * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\\n       */\\n\\n\\n      Stream.prototype.pipe = function pipe(destination) {\\n        this.on('data', function (data) {\\n          destination.push(data);\\n        });\\n      };\\n\\n      return Stream;\\n    }();\\n    /**\\n     * @file async-stream.js\\n     */\\n\\n    /**\\n     * A wrapper around the Stream class to use setTiemout\\n     * and run stream \\\"jobs\\\" Asynchronously\\n     *\\n     * @class AsyncStream\\n     * @extends Stream\\n     */\\n\\n\\n    var AsyncStream$$1 = function (_Stream) {\\n      inherits(AsyncStream$$1, _Stream);\\n\\n      function AsyncStream$$1() {\\n        classCallCheck(this, AsyncStream$$1);\\n\\n        var _this = possibleConstructorReturn(this, _Stream.call(this, Stream));\\n\\n        _this.jobs = [];\\n        _this.delay = 1;\\n        _this.timeout_ = null;\\n        return _this;\\n      }\\n      /**\\n       * process an async job\\n       *\\n       * @private\\n       */\\n\\n\\n      AsyncStream$$1.prototype.processJob_ = function processJob_() {\\n        this.jobs.shift()();\\n\\n        if (this.jobs.length) {\\n          this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n        } else {\\n          this.timeout_ = null;\\n        }\\n      };\\n      /**\\n       * push a job into the stream\\n       *\\n       * @param {Function} job the job to push into the stream\\n       */\\n\\n\\n      AsyncStream$$1.prototype.push = function push(job) {\\n        this.jobs.push(job);\\n\\n        if (!this.timeout_) {\\n          this.timeout_ = setTimeout(this.processJob_.bind(this), this.delay);\\n        }\\n      };\\n\\n      return AsyncStream$$1;\\n    }(Stream);\\n    /**\\n     * @file decrypter.js\\n     *\\n     * An asynchronous implementation of AES-128 CBC decryption with\\n     * PKCS#7 padding.\\n     */\\n\\n    /**\\n     * Convert network-order (big-endian) bytes into their little-endian\\n     * representation.\\n     */\\n\\n\\n    var ntoh = function ntoh(word) {\\n      return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\\n    };\\n    /**\\n     * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\\n     *\\n     * @param {Uint8Array} encrypted the encrypted bytes\\n     * @param {Uint32Array} key the bytes of the decryption key\\n     * @param {Uint32Array} initVector the initialization vector (IV) to\\n     * use for the first round of CBC.\\n     * @return {Uint8Array} the decrypted bytes\\n     *\\n     * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\\n     * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\\n     * @see https://tools.ietf.org/html/rfc2315\\n     */\\n\\n\\n    var decrypt$$1 = function decrypt$$1(encrypted, key, initVector) {\\n      // word-level access to the encrypted bytes\\n      var encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2);\\n      var decipher = new AES(Array.prototype.slice.call(key)); // byte and word-level access for the decrypted output\\n\\n      var decrypted = new Uint8Array(encrypted.byteLength);\\n      var decrypted32 = new Int32Array(decrypted.buffer); // temporary variables for working with the IV, encrypted, and\\n      // decrypted data\\n\\n      var init0 = void 0;\\n      var init1 = void 0;\\n      var init2 = void 0;\\n      var init3 = void 0;\\n      var encrypted0 = void 0;\\n      var encrypted1 = void 0;\\n      var encrypted2 = void 0;\\n      var encrypted3 = void 0; // iteration variable\\n\\n      var wordIx = void 0; // pull out the words of the IV to ensure we don't modify the\\n      // passed-in reference and easier access\\n\\n      init0 = initVector[0];\\n      init1 = initVector[1];\\n      init2 = initVector[2];\\n      init3 = initVector[3]; // decrypt four word sequences, applying cipher-block chaining (CBC)\\n      // to each decrypted block\\n\\n      for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\\n        // convert big-endian (network order) words into little-endian\\n        // (javascript order)\\n        encrypted0 = ntoh(encrypted32[wordIx]);\\n        encrypted1 = ntoh(encrypted32[wordIx + 1]);\\n        encrypted2 = ntoh(encrypted32[wordIx + 2]);\\n        encrypted3 = ntoh(encrypted32[wordIx + 3]); // decrypt the block\\n\\n        decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx); // XOR with the IV, and restore network byte-order to obtain the\\n        // plaintext\\n\\n        decrypted32[wordIx] = ntoh(decrypted32[wordIx] ^ init0);\\n        decrypted32[wordIx + 1] = ntoh(decrypted32[wordIx + 1] ^ init1);\\n        decrypted32[wordIx + 2] = ntoh(decrypted32[wordIx + 2] ^ init2);\\n        decrypted32[wordIx + 3] = ntoh(decrypted32[wordIx + 3] ^ init3); // setup the IV for the next round\\n\\n        init0 = encrypted0;\\n        init1 = encrypted1;\\n        init2 = encrypted2;\\n        init3 = encrypted3;\\n      }\\n\\n      return decrypted;\\n    };\\n    /**\\n     * The `Decrypter` class that manages decryption of AES\\n     * data through `AsyncStream` objects and the `decrypt`\\n     * function\\n     *\\n     * @param {Uint8Array} encrypted the encrypted bytes\\n     * @param {Uint32Array} key the bytes of the decryption key\\n     * @param {Uint32Array} initVector the initialization vector (IV) to\\n     * @param {Function} done the function to run when done\\n     * @class Decrypter\\n     */\\n\\n\\n    var Decrypter$$1 = function () {\\n      function Decrypter$$1(encrypted, key, initVector, done) {\\n        classCallCheck(this, Decrypter$$1);\\n        var step = Decrypter$$1.STEP;\\n        var encrypted32 = new Int32Array(encrypted.buffer);\\n        var decrypted = new Uint8Array(encrypted.byteLength);\\n        var i = 0;\\n        this.asyncStream_ = new AsyncStream$$1(); // split up the encryption job and do the individual chunks asynchronously\\n\\n        this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n\\n        for (i = step; i < encrypted32.length; i += step) {\\n          initVector = new Uint32Array([ntoh(encrypted32[i - 4]), ntoh(encrypted32[i - 3]), ntoh(encrypted32[i - 2]), ntoh(encrypted32[i - 1])]);\\n          this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i, i + step), key, initVector, decrypted));\\n        } // invoke the done() callback when everything is finished\\n\\n\\n        this.asyncStream_.push(function () {\\n          // remove pkcs#7 padding from the decrypted bytes\\n          done(null, unpad(decrypted));\\n        });\\n      }\\n      /**\\n       * a getter for step the maximum number of bytes to process at one time\\n       *\\n       * @return {Number} the value of step 32000\\n       */\\n\\n      /**\\n       * @private\\n       */\\n\\n\\n      Decrypter$$1.prototype.decryptChunk_ = function decryptChunk_(encrypted, key, initVector, decrypted) {\\n        return function () {\\n          var bytes = decrypt$$1(encrypted, key, initVector);\\n          decrypted.set(bytes, encrypted.byteOffset);\\n        };\\n      };\\n\\n      createClass(Decrypter$$1, null, [{\\n        key: 'STEP',\\n        get: function get$$1() {\\n          // 4 * 8000;\\n          return 32000;\\n        }\\n      }]);\\n      return Decrypter$$1;\\n    }();\\n    /**\\n     * @file bin-utils.js\\n     */\\n\\n    /**\\n     * Creates an object for sending to a web worker modifying properties that are TypedArrays\\n     * into a new object with seperated properties for the buffer, byteOffset, and byteLength.\\n     *\\n     * @param {Object} message\\n     *        Object of properties and values to send to the web worker\\n     * @return {Object}\\n     *         Modified message with TypedArray values expanded\\n     * @function createTransferableMessage\\n     */\\n\\n\\n    var createTransferableMessage = function createTransferableMessage(message) {\\n      var transferable = {};\\n      Object.keys(message).forEach(function (key) {\\n        var value = message[key];\\n\\n        if (ArrayBuffer.isView(value)) {\\n          transferable[key] = {\\n            bytes: value.buffer,\\n            byteOffset: value.byteOffset,\\n            byteLength: value.byteLength\\n          };\\n        } else {\\n          transferable[key] = value;\\n        }\\n      });\\n      return transferable;\\n    };\\n    /**\\n     * Our web worker interface so that things can talk to aes-decrypter\\n     * that will be running in a web worker. the scope is passed to this by\\n     * webworkify.\\n     *\\n     * @param {Object} self\\n     *        the scope for the web worker\\n     */\\n\\n\\n    var DecrypterWorker = function DecrypterWorker(self) {\\n      self.onmessage = function (event) {\\n        var data = event.data;\\n        var encrypted = new Uint8Array(data.encrypted.bytes, data.encrypted.byteOffset, data.encrypted.byteLength);\\n        var key = new Uint32Array(data.key.bytes, data.key.byteOffset, data.key.byteLength / 4);\\n        var iv = new Uint32Array(data.iv.bytes, data.iv.byteOffset, data.iv.byteLength / 4);\\n        /* eslint-disable no-new, handle-callback-err */\\n\\n        new Decrypter$$1(encrypted, key, iv, function (err, bytes) {\\n          self.postMessage(createTransferableMessage({\\n            source: data.source,\\n            decrypted: bytes\\n          }), [bytes.buffer]);\\n        });\\n        /* eslint-enable */\\n      };\\n    };\\n\\n    var decrypterWorker = new DecrypterWorker(self);\\n    return decrypterWorker;\\n  }();\\n});\\n/**\\n * Convert the properties of an HLS track into an audioTrackKind.\\n *\\n * @private\\n */\\n\\nvar audioTrackKind_ = function audioTrackKind_(properties) {\\n  var kind = properties[\\\"default\\\"] ? 'main' : 'alternative';\\n\\n  if (properties.characteristics && properties.characteristics.indexOf('public.accessibility.describes-video') >= 0) {\\n    kind = 'main-desc';\\n  }\\n\\n  return kind;\\n};\\n/**\\n * Pause provided segment loader and playlist loader if active\\n *\\n * @param {SegmentLoader} segmentLoader\\n *        SegmentLoader to pause\\n * @param {Object} mediaType\\n *        Active media type\\n * @function stopLoaders\\n */\\n\\n\\nvar stopLoaders = function stopLoaders(segmentLoader, mediaType) {\\n  segmentLoader.abort();\\n  segmentLoader.pause();\\n\\n  if (mediaType && mediaType.activePlaylistLoader) {\\n    mediaType.activePlaylistLoader.pause();\\n    mediaType.activePlaylistLoader = null;\\n  }\\n};\\n/**\\n * Start loading provided segment loader and playlist loader\\n *\\n * @param {PlaylistLoader} playlistLoader\\n *        PlaylistLoader to start loading\\n * @param {Object} mediaType\\n *        Active media type\\n * @function startLoaders\\n */\\n\\n\\nvar startLoaders = function startLoaders(playlistLoader, mediaType) {\\n  // Segment loader will be started after `loadedmetadata` or `loadedplaylist` from the\\n  // playlist loader\\n  mediaType.activePlaylistLoader = playlistLoader;\\n  playlistLoader.load();\\n};\\n/**\\n * Returns a function to be called when the media group changes. It performs a\\n * non-destructive (preserve the buffer) resync of the SegmentLoader. This is because a\\n * change of group is merely a rendition switch of the same content at another encoding,\\n * rather than a change of content, such as switching audio from English to Spanish.\\n *\\n * @param {String} type\\n *        MediaGroup type\\n * @param {Object} settings\\n *        Object containing required information for media groups\\n * @return {Function}\\n *         Handler for a non-destructive resync of SegmentLoader when the active media\\n *         group changes.\\n * @function onGroupChanged\\n */\\n\\n\\nvar onGroupChanged = function onGroupChanged(type, settings) {\\n  return function () {\\n    var _settings$segmentLoad = settings.segmentLoaders,\\n        segmentLoader = _settings$segmentLoad[type],\\n        mainSegmentLoader = _settings$segmentLoad.main,\\n        mediaType = settings.mediaTypes[type];\\n    var activeTrack = mediaType.activeTrack();\\n    var activeGroup = mediaType.activeGroup(activeTrack);\\n    var previousActiveLoader = mediaType.activePlaylistLoader;\\n    stopLoaders(segmentLoader, mediaType);\\n\\n    if (!activeGroup) {\\n      // there is no group active\\n      return;\\n    }\\n\\n    if (!activeGroup.playlistLoader) {\\n      if (previousActiveLoader) {\\n        // The previous group had a playlist loader but the new active group does not\\n        // this means we are switching from demuxed to muxed audio. In this case we want to\\n        // do a destructive reset of the main segment loader and not restart the audio\\n        // loaders.\\n        mainSegmentLoader.resetEverything();\\n      }\\n\\n      return;\\n    } // Non-destructive resync\\n\\n\\n    segmentLoader.resyncLoader();\\n    startLoaders(activeGroup.playlistLoader, mediaType);\\n  };\\n};\\n/**\\n * Returns a function to be called when the media track changes. It performs a\\n * destructive reset of the SegmentLoader to ensure we start loading as close to\\n * currentTime as possible.\\n *\\n * @param {String} type\\n *        MediaGroup type\\n * @param {Object} settings\\n *        Object containing required information for media groups\\n * @return {Function}\\n *         Handler for a destructive reset of SegmentLoader when the active media\\n *         track changes.\\n * @function onTrackChanged\\n */\\n\\n\\nvar onTrackChanged = function onTrackChanged(type, settings) {\\n  return function () {\\n    var _settings$segmentLoad2 = settings.segmentLoaders,\\n        segmentLoader = _settings$segmentLoad2[type],\\n        mainSegmentLoader = _settings$segmentLoad2.main,\\n        mediaType = settings.mediaTypes[type];\\n    var activeTrack = mediaType.activeTrack();\\n    var activeGroup = mediaType.activeGroup(activeTrack);\\n    var previousActiveLoader = mediaType.activePlaylistLoader;\\n    stopLoaders(segmentLoader, mediaType);\\n\\n    if (!activeGroup) {\\n      // there is no group active so we do not want to restart loaders\\n      return;\\n    }\\n\\n    if (!activeGroup.playlistLoader) {\\n      // when switching from demuxed audio/video to muxed audio/video (noted by no playlist\\n      // loader for the audio group), we want to do a destructive reset of the main segment\\n      // loader and not restart the audio loaders\\n      mainSegmentLoader.resetEverything();\\n      return;\\n    }\\n\\n    if (previousActiveLoader === activeGroup.playlistLoader) {\\n      // Nothing has actually changed. This can happen because track change events can fire\\n      // multiple times for a \\\"single\\\" change. One for enabling the new active track, and\\n      // one for disabling the track that was active\\n      startLoaders(activeGroup.playlistLoader, mediaType);\\n      return;\\n    }\\n\\n    if (segmentLoader.track) {\\n      // For WebVTT, set the new text track in the segmentloader\\n      segmentLoader.track(activeTrack);\\n    } // destructive reset\\n\\n\\n    segmentLoader.resetEverything();\\n    startLoaders(activeGroup.playlistLoader, mediaType);\\n  };\\n};\\n\\nvar onError = {\\n  /**\\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\\n   * an error.\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Error handler. Logs warning (or error if the playlist is blacklisted) to\\n   *         console and switches back to default audio track.\\n   * @function onError.AUDIO\\n   */\\n  AUDIO: function AUDIO(type, settings) {\\n    return function () {\\n      var segmentLoader = settings.segmentLoaders[type],\\n          mediaType = settings.mediaTypes[type],\\n          blacklistCurrentPlaylist = settings.blacklistCurrentPlaylist;\\n      stopLoaders(segmentLoader, mediaType); // switch back to default audio track\\n\\n      var activeTrack = mediaType.activeTrack();\\n      var activeGroup = mediaType.activeGroup();\\n      var id = (activeGroup.filter(function (group) {\\n        return group[\\\"default\\\"];\\n      })[0] || activeGroup[0]).id;\\n      var defaultTrack = mediaType.tracks[id];\\n\\n      if (activeTrack === defaultTrack) {\\n        // Default track encountered an error. All we can do now is blacklist the current\\n        // rendition and hope another will switch audio groups\\n        blacklistCurrentPlaylist({\\n          message: 'Problem encountered loading the default audio track.'\\n        });\\n        return;\\n      }\\n\\n      videojs$1.log.warn('Problem encountered loading the alternate audio track.' + 'Switching back to default.');\\n\\n      for (var trackId in mediaType.tracks) {\\n        mediaType.tracks[trackId].enabled = mediaType.tracks[trackId] === defaultTrack;\\n      }\\n\\n      mediaType.onTrackChanged();\\n    };\\n  },\\n\\n  /**\\n   * Returns a function to be called when a SegmentLoader or PlaylistLoader encounters\\n   * an error.\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Error handler. Logs warning to console and disables the active subtitle track\\n   * @function onError.SUBTITLES\\n   */\\n  SUBTITLES: function SUBTITLES(type, settings) {\\n    return function () {\\n      var segmentLoader = settings.segmentLoaders[type],\\n          mediaType = settings.mediaTypes[type];\\n      videojs$1.log.warn('Problem encountered loading the subtitle track.' + 'Disabling subtitle track.');\\n      stopLoaders(segmentLoader, mediaType);\\n      var track = mediaType.activeTrack();\\n\\n      if (track) {\\n        track.mode = 'disabled';\\n      }\\n\\n      mediaType.onTrackChanged();\\n    };\\n  }\\n};\\nvar setupListeners = {\\n  /**\\n   * Setup event listeners for audio playlist loader\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {PlaylistLoader|null} playlistLoader\\n   *        PlaylistLoader to register listeners on\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function setupListeners.AUDIO\\n   */\\n  AUDIO: function AUDIO(type, playlistLoader, settings) {\\n    if (!playlistLoader) {\\n      // no playlist loader means audio will be muxed with the video\\n      return;\\n    }\\n\\n    var tech = settings.tech,\\n        requestOptions = settings.requestOptions,\\n        segmentLoader = settings.segmentLoaders[type];\\n    playlistLoader.on('loadedmetadata', function () {\\n      var media = playlistLoader.media();\\n      segmentLoader.playlist(media, requestOptions); // if the video is already playing, or if this isn't a live video and preload\\n      // permits, start downloading segments\\n\\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('loadedplaylist', function () {\\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\\n\\n      if (!tech.paused()) {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('error', onError[type](type, settings));\\n  },\\n\\n  /**\\n   * Setup event listeners for subtitle playlist loader\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {PlaylistLoader|null} playlistLoader\\n   *        PlaylistLoader to register listeners on\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function setupListeners.SUBTITLES\\n   */\\n  SUBTITLES: function SUBTITLES(type, playlistLoader, settings) {\\n    var tech = settings.tech,\\n        requestOptions = settings.requestOptions,\\n        segmentLoader = settings.segmentLoaders[type],\\n        mediaType = settings.mediaTypes[type];\\n    playlistLoader.on('loadedmetadata', function () {\\n      var media = playlistLoader.media();\\n      segmentLoader.playlist(media, requestOptions);\\n      segmentLoader.track(mediaType.activeTrack()); // if the video is already playing, or if this isn't a live video and preload\\n      // permits, start downloading segments\\n\\n      if (!tech.paused() || media.endList && tech.preload() !== 'none') {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('loadedplaylist', function () {\\n      segmentLoader.playlist(playlistLoader.media(), requestOptions); // If the player isn't paused, ensure that the segment loader is running\\n\\n      if (!tech.paused()) {\\n        segmentLoader.load();\\n      }\\n    });\\n    playlistLoader.on('error', onError[type](type, settings));\\n  }\\n};\\nvar initialize = {\\n  /**\\n   * Setup PlaylistLoaders and AudioTracks for the audio groups\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function initialize.AUDIO\\n   */\\n  'AUDIO': function AUDIO(type, settings) {\\n    var hls = settings.hls,\\n        sourceType = settings.sourceType,\\n        segmentLoader = settings.segmentLoaders[type],\\n        requestOptions = settings.requestOptions,\\n        mediaGroups = settings.master.mediaGroups,\\n        _settings$mediaTypes$ = settings.mediaTypes[type],\\n        groups = _settings$mediaTypes$.groups,\\n        tracks = _settings$mediaTypes$.tracks,\\n        masterPlaylistLoader = settings.masterPlaylistLoader; // force a default if we have none\\n\\n    if (!mediaGroups[type] || Object.keys(mediaGroups[type]).length === 0) {\\n      mediaGroups[type] = {\\n        main: {\\n          \\\"default\\\": {\\n            \\\"default\\\": true\\n          }\\n        }\\n      };\\n    }\\n\\n    for (var groupId in mediaGroups[type]) {\\n      if (!groups[groupId]) {\\n        groups[groupId] = [];\\n      } // List of playlists that have an AUDIO attribute value matching the current\\n      // group ID\\n\\n\\n      for (var variantLabel in mediaGroups[type][groupId]) {\\n        var properties = mediaGroups[type][groupId][variantLabel];\\n        var playlistLoader = void 0;\\n\\n        if (properties.resolvedUri) {\\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, hls, requestOptions);\\n        } else if (properties.playlists && sourceType === 'dash') {\\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], hls, requestOptions, masterPlaylistLoader);\\n        } else {\\n          // no resolvedUri means the audio is muxed with the video when using this\\n          // audio track\\n          playlistLoader = null;\\n        }\\n\\n        properties = videojs$1.mergeOptions({\\n          id: variantLabel,\\n          playlistLoader: playlistLoader\\n        }, properties);\\n        setupListeners[type](type, properties.playlistLoader, settings);\\n        groups[groupId].push(properties);\\n\\n        if (typeof tracks[variantLabel] === 'undefined') {\\n          var track = new videojs$1.AudioTrack({\\n            id: variantLabel,\\n            kind: audioTrackKind_(properties),\\n            enabled: false,\\n            language: properties.language,\\n            \\\"default\\\": properties[\\\"default\\\"],\\n            label: variantLabel\\n          });\\n          tracks[variantLabel] = track;\\n        }\\n      }\\n    } // setup single error event handler for the segment loader\\n\\n\\n    segmentLoader.on('error', onError[type](type, settings));\\n  },\\n\\n  /**\\n   * Setup PlaylistLoaders and TextTracks for the subtitle groups\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function initialize.SUBTITLES\\n   */\\n  'SUBTITLES': function SUBTITLES(type, settings) {\\n    var tech = settings.tech,\\n        hls = settings.hls,\\n        sourceType = settings.sourceType,\\n        segmentLoader = settings.segmentLoaders[type],\\n        requestOptions = settings.requestOptions,\\n        mediaGroups = settings.master.mediaGroups,\\n        _settings$mediaTypes$2 = settings.mediaTypes[type],\\n        groups = _settings$mediaTypes$2.groups,\\n        tracks = _settings$mediaTypes$2.tracks,\\n        masterPlaylistLoader = settings.masterPlaylistLoader;\\n\\n    for (var groupId in mediaGroups[type]) {\\n      if (!groups[groupId]) {\\n        groups[groupId] = [];\\n      }\\n\\n      for (var variantLabel in mediaGroups[type][groupId]) {\\n        if (mediaGroups[type][groupId][variantLabel].forced) {\\n          // Subtitle playlists with the forced attribute are not selectable in Safari.\\n          // According to Apple's HLS Authoring Specification:\\n          //   If content has forced subtitles and regular subtitles in a given language,\\n          //   the regular subtitles track in that language MUST contain both the forced\\n          //   subtitles and the regular subtitles for that language.\\n          // Because of this requirement and that Safari does not add forced subtitles,\\n          // forced subtitles are skipped here to maintain consistent experience across\\n          // all platforms\\n          continue;\\n        }\\n\\n        var properties = mediaGroups[type][groupId][variantLabel];\\n        var playlistLoader = void 0;\\n\\n        if (sourceType === 'hls') {\\n          playlistLoader = new PlaylistLoader(properties.resolvedUri, hls, requestOptions);\\n        } else if (sourceType === 'dash') {\\n          playlistLoader = new DashPlaylistLoader(properties.playlists[0], hls, requestOptions, masterPlaylistLoader);\\n        }\\n\\n        properties = videojs$1.mergeOptions({\\n          id: variantLabel,\\n          playlistLoader: playlistLoader\\n        }, properties);\\n        setupListeners[type](type, properties.playlistLoader, settings);\\n        groups[groupId].push(properties);\\n\\n        if (typeof tracks[variantLabel] === 'undefined') {\\n          var track = tech.addRemoteTextTrack({\\n            id: variantLabel,\\n            kind: 'subtitles',\\n            \\\"default\\\": properties[\\\"default\\\"] && properties.autoselect,\\n            language: properties.language,\\n            label: variantLabel\\n          }, false).track;\\n          tracks[variantLabel] = track;\\n        }\\n      }\\n    } // setup single error event handler for the segment loader\\n\\n\\n    segmentLoader.on('error', onError[type](type, settings));\\n  },\\n\\n  /**\\n   * Setup TextTracks for the closed-caption groups\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @function initialize['CLOSED-CAPTIONS']\\n   */\\n  'CLOSED-CAPTIONS': function CLOSEDCAPTIONS(type, settings) {\\n    var tech = settings.tech,\\n        mediaGroups = settings.master.mediaGroups,\\n        _settings$mediaTypes$3 = settings.mediaTypes[type],\\n        groups = _settings$mediaTypes$3.groups,\\n        tracks = _settings$mediaTypes$3.tracks;\\n\\n    for (var groupId in mediaGroups[type]) {\\n      if (!groups[groupId]) {\\n        groups[groupId] = [];\\n      }\\n\\n      for (var variantLabel in mediaGroups[type][groupId]) {\\n        var properties = mediaGroups[type][groupId][variantLabel]; // We only support CEA608 captions for now, so ignore anything that\\n        // doesn't use a CCx INSTREAM-ID\\n\\n        if (!properties.instreamId.match(/CC\\\\d/)) {\\n          continue;\\n        } // No PlaylistLoader is required for Closed-Captions because the captions are\\n        // embedded within the video stream\\n\\n\\n        groups[groupId].push(videojs$1.mergeOptions({\\n          id: variantLabel\\n        }, properties));\\n\\n        if (typeof tracks[variantLabel] === 'undefined') {\\n          var track = tech.addRemoteTextTrack({\\n            id: properties.instreamId,\\n            kind: 'captions',\\n            \\\"default\\\": properties[\\\"default\\\"] && properties.autoselect,\\n            language: properties.language,\\n            label: variantLabel\\n          }, false).track;\\n          tracks[variantLabel] = track;\\n        }\\n      }\\n    }\\n  }\\n};\\n/**\\n * Returns a function used to get the active group of the provided type\\n *\\n * @param {String} type\\n *        MediaGroup type\\n * @param {Object} settings\\n *        Object containing required information for media groups\\n * @return {Function}\\n *         Function that returns the active media group for the provided type. Takes an\\n *         optional parameter {TextTrack} track. If no track is provided, a list of all\\n *         variants in the group, otherwise the variant corresponding to the provided\\n *         track is returned.\\n * @function activeGroup\\n */\\n\\nvar activeGroup = function activeGroup(type, settings) {\\n  return function (track) {\\n    var masterPlaylistLoader = settings.masterPlaylistLoader,\\n        groups = settings.mediaTypes[type].groups;\\n    var media = masterPlaylistLoader.media();\\n\\n    if (!media) {\\n      return null;\\n    }\\n\\n    var variants = null;\\n\\n    if (media.attributes[type]) {\\n      variants = groups[media.attributes[type]];\\n    }\\n\\n    variants = variants || groups.main;\\n\\n    if (typeof track === 'undefined') {\\n      return variants;\\n    }\\n\\n    if (track === null) {\\n      // An active track was specified so a corresponding group is expected. track === null\\n      // means no track is currently active so there is no corresponding group\\n      return null;\\n    }\\n\\n    return variants.filter(function (props) {\\n      return props.id === track.id;\\n    })[0] || null;\\n  };\\n};\\n\\nvar activeTrack = {\\n  /**\\n   * Returns a function used to get the active track of type provided\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Function that returns the active media track for the provided type. Returns\\n   *         null if no track is active\\n   * @function activeTrack.AUDIO\\n   */\\n  AUDIO: function AUDIO(type, settings) {\\n    return function () {\\n      var tracks = settings.mediaTypes[type].tracks;\\n\\n      for (var id in tracks) {\\n        if (tracks[id].enabled) {\\n          return tracks[id];\\n        }\\n      }\\n\\n      return null;\\n    };\\n  },\\n\\n  /**\\n   * Returns a function used to get the active track of type provided\\n   *\\n   * @param {String} type\\n   *        MediaGroup type\\n   * @param {Object} settings\\n   *        Object containing required information for media groups\\n   * @return {Function}\\n   *         Function that returns the active media track for the provided type. Returns\\n   *         null if no track is active\\n   * @function activeTrack.SUBTITLES\\n   */\\n  SUBTITLES: function SUBTITLES(type, settings) {\\n    return function () {\\n      var tracks = settings.mediaTypes[type].tracks;\\n\\n      for (var id in tracks) {\\n        if (tracks[id].mode === 'showing' || tracks[id].mode === 'hidden') {\\n          return tracks[id];\\n        }\\n      }\\n\\n      return null;\\n    };\\n  }\\n};\\n/**\\n * Setup PlaylistLoaders and Tracks for media groups (Audio, Subtitles,\\n * Closed-Captions) specified in the master manifest.\\n *\\n * @param {Object} settings\\n *        Object containing required information for setting up the media groups\\n * @param {SegmentLoader} settings.segmentLoaders.AUDIO\\n *        Audio segment loader\\n * @param {SegmentLoader} settings.segmentLoaders.SUBTITLES\\n *        Subtitle segment loader\\n * @param {SegmentLoader} settings.segmentLoaders.main\\n *        Main segment loader\\n * @param {Tech} settings.tech\\n *        The tech of the player\\n * @param {Object} settings.requestOptions\\n *        XHR request options used by the segment loaders\\n * @param {PlaylistLoader} settings.masterPlaylistLoader\\n *        PlaylistLoader for the master source\\n * @param {HlsHandler} settings.hls\\n *        HLS SourceHandler\\n * @param {Object} settings.master\\n *        The parsed master manifest\\n * @param {Object} settings.mediaTypes\\n *        Object to store the loaders, tracks, and utility methods for each media type\\n * @param {Function} settings.blacklistCurrentPlaylist\\n *        Blacklists the current rendition and forces a rendition switch.\\n * @function setupMediaGroups\\n */\\n\\nvar setupMediaGroups = function setupMediaGroups(settings) {\\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\\n    initialize[type](type, settings);\\n  });\\n  var mediaTypes = settings.mediaTypes,\\n      masterPlaylistLoader = settings.masterPlaylistLoader,\\n      tech = settings.tech,\\n      hls = settings.hls; // setup active group and track getters and change event handlers\\n\\n  ['AUDIO', 'SUBTITLES'].forEach(function (type) {\\n    mediaTypes[type].activeGroup = activeGroup(type, settings);\\n    mediaTypes[type].activeTrack = activeTrack[type](type, settings);\\n    mediaTypes[type].onGroupChanged = onGroupChanged(type, settings);\\n    mediaTypes[type].onTrackChanged = onTrackChanged(type, settings);\\n  }); // DO NOT enable the default subtitle or caption track.\\n  // DO enable the default audio track\\n\\n  var audioGroup = mediaTypes.AUDIO.activeGroup();\\n  var groupId = (audioGroup.filter(function (group) {\\n    return group[\\\"default\\\"];\\n  })[0] || audioGroup[0]).id;\\n  mediaTypes.AUDIO.tracks[groupId].enabled = true;\\n  mediaTypes.AUDIO.onTrackChanged();\\n  masterPlaylistLoader.on('mediachange', function () {\\n    ['AUDIO', 'SUBTITLES'].forEach(function (type) {\\n      return mediaTypes[type].onGroupChanged();\\n    });\\n  }); // custom audio track change event handler for usage event\\n\\n  var onAudioTrackChanged = function onAudioTrackChanged() {\\n    mediaTypes.AUDIO.onTrackChanged();\\n    tech.trigger({\\n      type: 'usage',\\n      name: 'hls-audio-change'\\n    });\\n  };\\n\\n  tech.audioTracks().addEventListener('change', onAudioTrackChanged);\\n  tech.remoteTextTracks().addEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\\n  hls.on('dispose', function () {\\n    tech.audioTracks().removeEventListener('change', onAudioTrackChanged);\\n    tech.remoteTextTracks().removeEventListener('change', mediaTypes.SUBTITLES.onTrackChanged);\\n  }); // clear existing audio tracks and add the ones we just created\\n\\n  tech.clearTracks('audio');\\n\\n  for (var id in mediaTypes.AUDIO.tracks) {\\n    tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id]);\\n  }\\n};\\n/**\\n * Creates skeleton object used to store the loaders, tracks, and utility methods for each\\n * media type\\n *\\n * @return {Object}\\n *         Object to store the loaders, tracks, and utility methods for each media type\\n * @function createMediaTypes\\n */\\n\\n\\nvar createMediaTypes = function createMediaTypes() {\\n  var mediaTypes = {};\\n  ['AUDIO', 'SUBTITLES', 'CLOSED-CAPTIONS'].forEach(function (type) {\\n    mediaTypes[type] = {\\n      groups: {},\\n      tracks: {},\\n      activePlaylistLoader: null,\\n      activeGroup: noop,\\n      activeTrack: noop,\\n      onGroupChanged: noop,\\n      onTrackChanged: noop\\n    };\\n  });\\n  return mediaTypes;\\n};\\n/**\\n * @file master-playlist-controller.js\\n */\\n\\n\\nvar ABORT_EARLY_BLACKLIST_SECONDS = 60 * 2;\\nvar Hls = void 0; // SegmentLoader stats that need to have each loader's\\n// values summed to calculate the final value\\n\\nvar loaderStats = ['mediaRequests', 'mediaRequestsAborted', 'mediaRequestsTimedout', 'mediaRequestsErrored', 'mediaTransferDuration', 'mediaBytesTransferred'];\\n\\nvar sumLoaderStat = function sumLoaderStat(stat) {\\n  return this.audioSegmentLoader_[stat] + this.mainSegmentLoader_[stat];\\n};\\n\\nvar shouldSwitchToMedia = function shouldSwitchToMedia(_ref) {\\n  var currentPlaylist = _ref.currentPlaylist,\\n      nextPlaylist = _ref.nextPlaylist,\\n      forwardBuffer = _ref.forwardBuffer,\\n      bufferLowWaterLine = _ref.bufferLowWaterLine,\\n      duration$$1 = _ref.duration,\\n      log = _ref.log; // we have no other playlist to switch to\\n\\n  if (!nextPlaylist) {\\n    videojs$1.log.warn('We received no playlist to switch to. Please check your stream.');\\n    return false;\\n  } // If the playlist is live, then we want to not take low water line into account.\\n  // This is because in LIVE, the player plays 3 segments from the end of the\\n  // playlist, and if `BUFFER_LOW_WATER_LINE` is greater than the duration availble\\n  // in those segments, a viewer will never experience a rendition upswitch.\\n\\n\\n  if (!currentPlaylist.endList) {\\n    return true;\\n  } // For the same reason as LIVE, we ignore the low water line when the VOD\\n  // duration is below the max potential low water line\\n\\n\\n  if (duration$$1 < Config.MAX_BUFFER_LOW_WATER_LINE) {\\n    return true;\\n  } // we want to switch down to lower resolutions quickly to continue playback, but\\n\\n\\n  if (nextPlaylist.attributes.BANDWIDTH < currentPlaylist.attributes.BANDWIDTH) {\\n    return true;\\n  } // ensure we have some buffer before we switch up to prevent us running out of\\n  // buffer while loading a higher rendition.\\n\\n\\n  if (forwardBuffer >= bufferLowWaterLine) {\\n    return true;\\n  }\\n\\n  return false;\\n};\\n/**\\n * the master playlist controller controller all interactons\\n * between playlists and segmentloaders. At this time this mainly\\n * involves a master playlist and a series of audio playlists\\n * if they are available\\n *\\n * @class MasterPlaylistController\\n * @extends videojs.EventTarget\\n */\\n\\n\\nvar MasterPlaylistController = function (_videojs$EventTarget) {\\n  inherits(MasterPlaylistController, _videojs$EventTarget);\\n\\n  function MasterPlaylistController(options) {\\n    classCallCheck(this, MasterPlaylistController);\\n\\n    var _this = possibleConstructorReturn(this, (MasterPlaylistController.__proto__ || Object.getPrototypeOf(MasterPlaylistController)).call(this));\\n\\n    var url = options.url,\\n        handleManifestRedirects = options.handleManifestRedirects,\\n        withCredentials = options.withCredentials,\\n        tech = options.tech,\\n        bandwidth = options.bandwidth,\\n        externHls = options.externHls,\\n        useCueTags = options.useCueTags,\\n        blacklistDuration = options.blacklistDuration,\\n        enableLowInitialPlaylist = options.enableLowInitialPlaylist,\\n        cacheEncryptionKeys = options.cacheEncryptionKeys,\\n        sourceType = options.sourceType;\\n\\n    if (!url) {\\n      throw new Error('A non-empty playlist URL is required');\\n    }\\n\\n    Hls = externHls;\\n    _this.withCredentials = withCredentials;\\n    _this.tech_ = tech;\\n    _this.hls_ = tech.hls;\\n    _this.sourceType_ = sourceType;\\n    _this.useCueTags_ = useCueTags;\\n    _this.blacklistDuration = blacklistDuration;\\n    _this.enableLowInitialPlaylist = enableLowInitialPlaylist;\\n\\n    if (_this.useCueTags_) {\\n      _this.cueTagsTrack_ = _this.tech_.addTextTrack('metadata', 'ad-cues');\\n      _this.cueTagsTrack_.inBandMetadataTrackDispatchType = '';\\n    }\\n\\n    _this.requestOptions_ = {\\n      withCredentials: withCredentials,\\n      handleManifestRedirects: handleManifestRedirects,\\n      timeout: null\\n    };\\n    _this.mediaTypes_ = createMediaTypes();\\n    _this.mediaSource = new videojs$1.MediaSource(); // load the media source into the player\\n\\n    _this.mediaSource.addEventListener('sourceopen', _this.handleSourceOpen_.bind(_this));\\n\\n    _this.seekable_ = videojs$1.createTimeRanges();\\n    _this.hasPlayed_ = false;\\n    _this.syncController_ = new SyncController(options);\\n    _this.segmentMetadataTrack_ = tech.addRemoteTextTrack({\\n      kind: 'metadata',\\n      label: 'segment-metadata'\\n    }, false).track;\\n    _this.decrypter_ = new Decrypter$1();\\n    _this.inbandTextTracks_ = {};\\n    var segmentLoaderSettings = {\\n      hls: _this.hls_,\\n      mediaSource: _this.mediaSource,\\n      currentTime: _this.tech_.currentTime.bind(_this.tech_),\\n      seekable: function seekable$$1() {\\n        return _this.seekable();\\n      },\\n      seeking: function seeking() {\\n        return _this.tech_.seeking();\\n      },\\n      duration: function duration$$1() {\\n        return _this.mediaSource.duration;\\n      },\\n      hasPlayed: function hasPlayed() {\\n        return _this.hasPlayed_;\\n      },\\n      goalBufferLength: function goalBufferLength() {\\n        return _this.goalBufferLength();\\n      },\\n      bandwidth: bandwidth,\\n      syncController: _this.syncController_,\\n      decrypter: _this.decrypter_,\\n      sourceType: _this.sourceType_,\\n      inbandTextTracks: _this.inbandTextTracks_,\\n      cacheEncryptionKeys: cacheEncryptionKeys\\n    };\\n    _this.masterPlaylistLoader_ = _this.sourceType_ === 'dash' ? new DashPlaylistLoader(url, _this.hls_, _this.requestOptions_) : new PlaylistLoader(url, _this.hls_, _this.requestOptions_);\\n\\n    _this.setupMasterPlaylistLoaderListeners_(); // setup segment loaders\\n    // combined audio/video or just video when alternate audio track is selected\\n\\n\\n    _this.mainSegmentLoader_ = new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\\n      segmentMetadataTrack: _this.segmentMetadataTrack_,\\n      loaderType: 'main'\\n    }), options); // alternate audio track\\n\\n    _this.audioSegmentLoader_ = new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\\n      loaderType: 'audio'\\n    }), options);\\n    _this.subtitleSegmentLoader_ = new VTTSegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings, {\\n      loaderType: 'vtt',\\n      featuresNativeTextTracks: _this.tech_.featuresNativeTextTracks\\n    }), options);\\n\\n    _this.setupSegmentLoaderListeners_(); // Create SegmentLoader stat-getters\\n\\n\\n    loaderStats.forEach(function (stat) {\\n      _this[stat + '_'] = sumLoaderStat.bind(_this, stat);\\n    });\\n    _this.logger_ = logger('MPC');\\n\\n    _this.masterPlaylistLoader_.load();\\n\\n    return _this;\\n  }\\n  /**\\n   * Register event handlers on the master playlist loader. A helper\\n   * function for construction time.\\n   *\\n   * @private\\n   */\\n\\n\\n  createClass(MasterPlaylistController, [{\\n    key: 'setupMasterPlaylistLoaderListeners_',\\n    value: function setupMasterPlaylistLoaderListeners_() {\\n      var _this2 = this;\\n\\n      this.masterPlaylistLoader_.on('loadedmetadata', function () {\\n        var media = _this2.masterPlaylistLoader_.media();\\n\\n        var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\\n        // timeout the request.\\n\\n        if (isLowestEnabledRendition(_this2.masterPlaylistLoader_.master, _this2.masterPlaylistLoader_.media())) {\\n          _this2.requestOptions_.timeout = 0;\\n        } else {\\n          _this2.requestOptions_.timeout = requestTimeout;\\n        } // if this isn't a live video and preload permits, start\\n        // downloading segments\\n\\n\\n        if (media.endList && _this2.tech_.preload() !== 'none') {\\n          _this2.mainSegmentLoader_.playlist(media, _this2.requestOptions_);\\n\\n          _this2.mainSegmentLoader_.load();\\n        }\\n\\n        setupMediaGroups({\\n          sourceType: _this2.sourceType_,\\n          segmentLoaders: {\\n            AUDIO: _this2.audioSegmentLoader_,\\n            SUBTITLES: _this2.subtitleSegmentLoader_,\\n            main: _this2.mainSegmentLoader_\\n          },\\n          tech: _this2.tech_,\\n          requestOptions: _this2.requestOptions_,\\n          masterPlaylistLoader: _this2.masterPlaylistLoader_,\\n          hls: _this2.hls_,\\n          master: _this2.master(),\\n          mediaTypes: _this2.mediaTypes_,\\n          blacklistCurrentPlaylist: _this2.blacklistCurrentPlaylist.bind(_this2)\\n        });\\n\\n        _this2.triggerPresenceUsage_(_this2.master(), media);\\n\\n        try {\\n          _this2.setupSourceBuffers_();\\n        } catch (e) {\\n          videojs$1.log.warn('Failed to create SourceBuffers', e);\\n          return _this2.mediaSource.endOfStream('decode');\\n        }\\n\\n        _this2.setupFirstPlay();\\n\\n        if (!_this2.mediaTypes_.AUDIO.activePlaylistLoader || _this2.mediaTypes_.AUDIO.activePlaylistLoader.media()) {\\n          _this2.trigger('selectedinitialmedia');\\n        } else {\\n          // We must wait for the active audio playlist loader to\\n          // finish setting up before triggering this event so the\\n          // representations API and EME setup is correct\\n          _this2.mediaTypes_.AUDIO.activePlaylistLoader.one('loadedmetadata', function () {\\n            _this2.trigger('selectedinitialmedia');\\n          });\\n        }\\n      });\\n      this.masterPlaylistLoader_.on('loadedplaylist', function () {\\n        var updatedPlaylist = _this2.masterPlaylistLoader_.media();\\n\\n        if (!updatedPlaylist) {\\n          // blacklist any variants that are not supported by the browser before selecting\\n          // an initial media as the playlist selectors do not consider browser support\\n          _this2.excludeUnsupportedVariants_();\\n\\n          var selectedMedia = void 0;\\n\\n          if (_this2.enableLowInitialPlaylist) {\\n            selectedMedia = _this2.selectInitialPlaylist();\\n          }\\n\\n          if (!selectedMedia) {\\n            selectedMedia = _this2.selectPlaylist();\\n          }\\n\\n          _this2.initialMedia_ = selectedMedia;\\n\\n          _this2.masterPlaylistLoader_.media(_this2.initialMedia_);\\n\\n          return;\\n        }\\n\\n        if (_this2.useCueTags_) {\\n          _this2.updateAdCues_(updatedPlaylist);\\n        } // TODO: Create a new event on the PlaylistLoader that signals\\n        // that the segments have changed in some way and use that to\\n        // update the SegmentLoader instead of doing it twice here and\\n        // on `mediachange`\\n\\n\\n        _this2.mainSegmentLoader_.playlist(updatedPlaylist, _this2.requestOptions_);\\n\\n        _this2.updateDuration(); // If the player isn't paused, ensure that the segment loader is running,\\n        // as it is possible that it was temporarily stopped while waiting for\\n        // a playlist (e.g., in case the playlist errored and we re-requested it).\\n\\n\\n        if (!_this2.tech_.paused()) {\\n          _this2.mainSegmentLoader_.load();\\n\\n          if (_this2.audioSegmentLoader_) {\\n            _this2.audioSegmentLoader_.load();\\n          }\\n        }\\n\\n        if (!updatedPlaylist.endList) {\\n          var addSeekableRange = function addSeekableRange() {\\n            var seekable$$1 = _this2.seekable();\\n\\n            if (seekable$$1.length !== 0) {\\n              _this2.mediaSource.addSeekableRange_(seekable$$1.start(0), seekable$$1.end(0));\\n            }\\n          };\\n\\n          if (_this2.duration() !== Infinity) {\\n            var onDurationchange = function onDurationchange() {\\n              if (_this2.duration() === Infinity) {\\n                addSeekableRange();\\n              } else {\\n                _this2.tech_.one('durationchange', onDurationchange);\\n              }\\n            };\\n\\n            _this2.tech_.one('durationchange', onDurationchange);\\n          } else {\\n            addSeekableRange();\\n          }\\n        }\\n      });\\n      this.masterPlaylistLoader_.on('error', function () {\\n        _this2.blacklistCurrentPlaylist(_this2.masterPlaylistLoader_.error);\\n      });\\n      this.masterPlaylistLoader_.on('mediachanging', function () {\\n        _this2.mainSegmentLoader_.abort();\\n\\n        _this2.mainSegmentLoader_.pause();\\n      });\\n      this.masterPlaylistLoader_.on('mediachange', function () {\\n        var media = _this2.masterPlaylistLoader_.media();\\n\\n        var requestTimeout = media.targetDuration * 1.5 * 1000; // If we don't have any more available playlists, we don't want to\\n        // timeout the request.\\n\\n        if (isLowestEnabledRendition(_this2.masterPlaylistLoader_.master, _this2.masterPlaylistLoader_.media())) {\\n          _this2.requestOptions_.timeout = 0;\\n        } else {\\n          _this2.requestOptions_.timeout = requestTimeout;\\n        } // TODO: Create a new event on the PlaylistLoader that signals\\n        // that the segments have changed in some way and use that to\\n        // update the SegmentLoader instead of doing it twice here and\\n        // on `loadedplaylist`\\n\\n\\n        _this2.mainSegmentLoader_.playlist(media, _this2.requestOptions_);\\n\\n        _this2.mainSegmentLoader_.load();\\n\\n        _this2.tech_.trigger({\\n          type: 'mediachange',\\n          bubbles: true\\n        });\\n      });\\n      this.masterPlaylistLoader_.on('playlistunchanged', function () {\\n        var updatedPlaylist = _this2.masterPlaylistLoader_.media();\\n\\n        var playlistOutdated = _this2.stuckAtPlaylistEnd_(updatedPlaylist);\\n\\n        if (playlistOutdated) {\\n          // Playlist has stopped updating and we're stuck at its end. Try to\\n          // blacklist it and switch to another playlist in the hope that that\\n          // one is updating (and give the player a chance to re-adjust to the\\n          // safe live point).\\n          _this2.blacklistCurrentPlaylist({\\n            message: 'Playlist no longer updating.'\\n          }); // useful for monitoring QoS\\n\\n\\n          _this2.tech_.trigger('playliststuck');\\n        }\\n      });\\n      this.masterPlaylistLoader_.on('renditiondisabled', function () {\\n        _this2.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-rendition-disabled'\\n        });\\n      });\\n      this.masterPlaylistLoader_.on('renditionenabled', function () {\\n        _this2.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-rendition-enabled'\\n        });\\n      });\\n    }\\n    /**\\n     * A helper function for triggerring presence usage events once per source\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'triggerPresenceUsage_',\\n    value: function triggerPresenceUsage_(master, media) {\\n      var mediaGroups = master.mediaGroups || {};\\n      var defaultDemuxed = true;\\n      var audioGroupKeys = Object.keys(mediaGroups.AUDIO);\\n\\n      for (var mediaGroup in mediaGroups.AUDIO) {\\n        for (var label in mediaGroups.AUDIO[mediaGroup]) {\\n          var properties = mediaGroups.AUDIO[mediaGroup][label];\\n\\n          if (!properties.uri) {\\n            defaultDemuxed = false;\\n          }\\n        }\\n      }\\n\\n      if (defaultDemuxed) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-demuxed'\\n        });\\n      }\\n\\n      if (Object.keys(mediaGroups.SUBTITLES).length) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-webvtt'\\n        });\\n      }\\n\\n      if (Hls.Playlist.isAes(media)) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-aes'\\n        });\\n      }\\n\\n      if (Hls.Playlist.isFmp4(media)) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-fmp4'\\n        });\\n      }\\n\\n      if (audioGroupKeys.length && Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length > 1) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-alternate-audio'\\n        });\\n      }\\n\\n      if (this.useCueTags_) {\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-playlist-cue-tags'\\n        });\\n      }\\n    }\\n    /**\\n     * Register event handlers on the segment loaders. A helper function\\n     * for construction time.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'setupSegmentLoaderListeners_',\\n    value: function setupSegmentLoaderListeners_() {\\n      var _this3 = this;\\n\\n      this.mainSegmentLoader_.on('bandwidthupdate', function () {\\n        var nextPlaylist = _this3.selectPlaylist();\\n\\n        var currentPlaylist = _this3.masterPlaylistLoader_.media();\\n\\n        var buffered = _this3.tech_.buffered();\\n\\n        var forwardBuffer = buffered.length ? buffered.end(buffered.length - 1) - _this3.tech_.currentTime() : 0;\\n\\n        var bufferLowWaterLine = _this3.bufferLowWaterLine();\\n\\n        if (shouldSwitchToMedia({\\n          currentPlaylist: currentPlaylist,\\n          nextPlaylist: nextPlaylist,\\n          forwardBuffer: forwardBuffer,\\n          bufferLowWaterLine: bufferLowWaterLine,\\n          duration: _this3.duration(),\\n          log: _this3.logger_\\n        })) {\\n          _this3.masterPlaylistLoader_.media(nextPlaylist);\\n        }\\n\\n        _this3.tech_.trigger('bandwidthupdate');\\n      });\\n      this.mainSegmentLoader_.on('progress', function () {\\n        _this3.trigger('progress');\\n      });\\n      this.mainSegmentLoader_.on('error', function () {\\n        _this3.blacklistCurrentPlaylist(_this3.mainSegmentLoader_.error());\\n      });\\n      this.mainSegmentLoader_.on('syncinfoupdate', function () {\\n        _this3.onSyncInfoUpdate_();\\n      });\\n      this.mainSegmentLoader_.on('timestampoffset', function () {\\n        _this3.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-timestamp-offset'\\n        });\\n      });\\n      this.audioSegmentLoader_.on('syncinfoupdate', function () {\\n        _this3.onSyncInfoUpdate_();\\n      });\\n      this.mainSegmentLoader_.on('ended', function () {\\n        _this3.onEndOfStream();\\n      });\\n      this.mainSegmentLoader_.on('earlyabort', function () {\\n        _this3.blacklistCurrentPlaylist({\\n          message: 'Aborted early because there isn\\\\'t enough bandwidth to complete the ' + 'request without rebuffering.'\\n        }, ABORT_EARLY_BLACKLIST_SECONDS);\\n      });\\n      this.mainSegmentLoader_.on('reseteverything', function () {\\n        // If playing an MTS stream, a videojs.MediaSource is listening for\\n        // hls-reset to reset caption parsing state in the transmuxer\\n        _this3.tech_.trigger('hls-reset');\\n      });\\n      this.mainSegmentLoader_.on('segmenttimemapping', function (event) {\\n        // If playing an MTS stream in html, a videojs.MediaSource is listening for\\n        // hls-segment-time-mapping update its internal mapping of stream to display time\\n        _this3.tech_.trigger({\\n          type: 'hls-segment-time-mapping',\\n          mapping: event.mapping\\n        });\\n      });\\n      this.audioSegmentLoader_.on('ended', function () {\\n        _this3.onEndOfStream();\\n      });\\n    }\\n  }, {\\n    key: 'mediaSecondsLoaded_',\\n    value: function mediaSecondsLoaded_() {\\n      return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded + this.mainSegmentLoader_.mediaSecondsLoaded);\\n    }\\n    /**\\n     * Call load on our SegmentLoaders\\n     */\\n\\n  }, {\\n    key: 'load',\\n    value: function load() {\\n      this.mainSegmentLoader_.load();\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        this.audioSegmentLoader_.load();\\n      }\\n\\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\\n        this.subtitleSegmentLoader_.load();\\n      }\\n    }\\n    /**\\n     * Re-tune playback quality level for the current player\\n     * conditions without performing destructive actions, like\\n     * removing already buffered content\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'smoothQualityChange_',\\n    value: function smoothQualityChange_() {\\n      var media = this.selectPlaylist();\\n\\n      if (media !== this.masterPlaylistLoader_.media()) {\\n        this.masterPlaylistLoader_.media(media);\\n        this.mainSegmentLoader_.resetLoader(); // don't need to reset audio as it is reset when media changes\\n      }\\n    }\\n    /**\\n     * Re-tune playback quality level for the current player\\n     * conditions. This method will perform destructive actions like removing\\n     * already buffered content in order to readjust the currently active\\n     * playlist quickly. This is good for manual quality changes\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fastQualityChange_',\\n    value: function fastQualityChange_() {\\n      var _this4 = this;\\n\\n      var media = this.selectPlaylist();\\n\\n      if (media === this.masterPlaylistLoader_.media()) {\\n        return;\\n      }\\n\\n      this.masterPlaylistLoader_.media(media); // Delete all buffered data to allow an immediate quality switch, then seek to give\\n      // the browser a kick to remove any cached frames from the previous rendtion (.04 seconds\\n      // ahead is roughly the minimum that will accomplish this across a variety of content\\n      // in IE and Edge, but seeking in place is sufficient on all other browsers)\\n      // Edge/IE bug: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14600375/\\n      // Chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=651904\\n\\n      this.mainSegmentLoader_.resetEverything(function () {\\n        // Since this is not a typical seek, we avoid the seekTo method which can cause segments\\n        // from the previously enabled rendition to load before the new playlist has finished loading\\n        if (videojs$1.browser.IE_VERSION || videojs$1.browser.IS_EDGE) {\\n          _this4.tech_.setCurrentTime(_this4.tech_.currentTime() + 0.04);\\n        } else {\\n          _this4.tech_.setCurrentTime(_this4.tech_.currentTime());\\n        }\\n      }); // don't need to reset audio as it is reset when media changes\\n    }\\n    /**\\n     * Begin playback.\\n     */\\n\\n  }, {\\n    key: 'play',\\n    value: function play() {\\n      if (this.setupFirstPlay()) {\\n        return;\\n      }\\n\\n      if (this.tech_.ended()) {\\n        this.tech_.setCurrentTime(0);\\n      }\\n\\n      if (this.hasPlayed_) {\\n        this.load();\\n      }\\n\\n      var seekable$$1 = this.tech_.seekable(); // if the viewer has paused and we fell out of the live window,\\n      // seek forward to the live point\\n\\n      if (this.tech_.duration() === Infinity) {\\n        if (this.tech_.currentTime() < seekable$$1.start(0)) {\\n          return this.tech_.setCurrentTime(seekable$$1.end(seekable$$1.length - 1));\\n        }\\n      }\\n    }\\n    /**\\n     * Seek to the latest media position if this is a live video and the\\n     * player and video are loaded and initialized.\\n     */\\n\\n  }, {\\n    key: 'setupFirstPlay',\\n    value: function setupFirstPlay() {\\n      var _this5 = this;\\n\\n      var media = this.masterPlaylistLoader_.media(); // Check that everything is ready to begin buffering for the first call to play\\n      //  If 1) there is no active media\\n      //     2) the player is paused\\n      //     3) the first play has already been setup\\n      // then exit early\\n\\n      if (!media || this.tech_.paused() || this.hasPlayed_) {\\n        return false;\\n      } // when the video is a live stream\\n\\n\\n      if (!media.endList) {\\n        var seekable$$1 = this.seekable();\\n\\n        if (!seekable$$1.length) {\\n          // without a seekable range, the player cannot seek to begin buffering at the live\\n          // point\\n          return false;\\n        }\\n\\n        if (videojs$1.browser.IE_VERSION && this.tech_.readyState() === 0) {\\n          // IE11 throws an InvalidStateError if you try to set currentTime while the\\n          // readyState is 0, so it must be delayed until the tech fires loadedmetadata.\\n          this.tech_.one('loadedmetadata', function () {\\n            _this5.trigger('firstplay');\\n\\n            _this5.tech_.setCurrentTime(seekable$$1.end(0));\\n\\n            _this5.hasPlayed_ = true;\\n          });\\n          return false;\\n        } // trigger firstplay to inform the source handler to ignore the next seek event\\n\\n\\n        this.trigger('firstplay'); // seek to the live point\\n\\n        this.tech_.setCurrentTime(seekable$$1.end(0));\\n      }\\n\\n      this.hasPlayed_ = true; // we can begin loading now that everything is ready\\n\\n      this.load();\\n      return true;\\n    }\\n    /**\\n     * handle the sourceopen event on the MediaSource\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'handleSourceOpen_',\\n    value: function handleSourceOpen_() {\\n      // Only attempt to create the source buffer if none already exist.\\n      // handleSourceOpen is also called when we are \\\"re-opening\\\" a source buffer\\n      // after `endOfStream` has been called (in response to a seek for instance)\\n      try {\\n        this.setupSourceBuffers_();\\n      } catch (e) {\\n        videojs$1.log.warn('Failed to create Source Buffers', e);\\n        return this.mediaSource.endOfStream('decode');\\n      } // if autoplay is enabled, begin playback. This is duplicative of\\n      // code in video.js but is required because play() must be invoked\\n      // *after* the media source has opened.\\n\\n\\n      if (this.tech_.autoplay()) {\\n        var playPromise = this.tech_.play(); // Catch/silence error when a pause interrupts a play request\\n        // on browsers which return a promise\\n\\n        if (typeof playPromise !== 'undefined' && typeof playPromise.then === 'function') {\\n          playPromise.then(null, function (e) {});\\n        }\\n      }\\n\\n      this.trigger('sourceopen');\\n    }\\n    /**\\n     * Calls endOfStream on the media source when all active stream types have called\\n     * endOfStream\\n     *\\n     * @param {string} streamType\\n     *        Stream type of the segment loader that called endOfStream\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'onEndOfStream',\\n    value: function onEndOfStream() {\\n      var isEndOfStream = this.mainSegmentLoader_.ended_;\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        // if the audio playlist loader exists, then alternate audio is active\\n        if (!this.mainSegmentLoader_.startingMedia_ || this.mainSegmentLoader_.startingMedia_.containsVideo) {\\n          // if we do not know if the main segment loader contains video yet or if we\\n          // definitively know the main segment loader contains video, then we need to wait\\n          // for both main and audio segment loaders to call endOfStream\\n          isEndOfStream = isEndOfStream && this.audioSegmentLoader_.ended_;\\n        } else {\\n          // otherwise just rely on the audio loader\\n          isEndOfStream = this.audioSegmentLoader_.ended_;\\n        }\\n      }\\n\\n      if (!isEndOfStream) {\\n        return;\\n      }\\n\\n      this.logger_('calling mediaSource.endOfStream()'); // on chrome calling endOfStream can sometimes cause an exception,\\n      // even when the media source is in a valid state.\\n\\n      try {\\n        this.mediaSource.endOfStream();\\n      } catch (e) {\\n        videojs$1.log.warn('Failed to call media source endOfStream', e);\\n      }\\n    }\\n    /**\\n     * Check if a playlist has stopped being updated\\n     * @param {Object} playlist the media playlist object\\n     * @return {boolean} whether the playlist has stopped being updated or not\\n     */\\n\\n  }, {\\n    key: 'stuckAtPlaylistEnd_',\\n    value: function stuckAtPlaylistEnd_(playlist) {\\n      var seekable$$1 = this.seekable();\\n\\n      if (!seekable$$1.length) {\\n        // playlist doesn't have enough information to determine whether we are stuck\\n        return false;\\n      }\\n\\n      var expired = this.syncController_.getExpiredTime(playlist, this.mediaSource.duration);\\n\\n      if (expired === null) {\\n        return false;\\n      } // does not use the safe live end to calculate playlist end, since we\\n      // don't want to say we are stuck while there is still content\\n\\n\\n      var absolutePlaylistEnd = Hls.Playlist.playlistEnd(playlist, expired);\\n      var currentTime = this.tech_.currentTime();\\n      var buffered = this.tech_.buffered();\\n\\n      if (!buffered.length) {\\n        // return true if the playhead reached the absolute end of the playlist\\n        return absolutePlaylistEnd - currentTime <= SAFE_TIME_DELTA;\\n      }\\n\\n      var bufferedEnd = buffered.end(buffered.length - 1); // return true if there is too little buffer left and buffer has reached absolute\\n      // end of playlist\\n\\n      return bufferedEnd - currentTime <= SAFE_TIME_DELTA && absolutePlaylistEnd - bufferedEnd <= SAFE_TIME_DELTA;\\n    }\\n    /**\\n     * Blacklists a playlist when an error occurs for a set amount of time\\n     * making it unavailable for selection by the rendition selection algorithm\\n     * and then forces a new playlist (rendition) selection.\\n     *\\n     * @param {Object=} error an optional error that may include the playlist\\n     * to blacklist\\n     * @param {Number=} blacklistDuration an optional number of seconds to blacklist the\\n     * playlist\\n     */\\n\\n  }, {\\n    key: 'blacklistCurrentPlaylist',\\n    value: function blacklistCurrentPlaylist() {\\n      var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n      var blacklistDuration = arguments[1];\\n      var currentPlaylist = void 0;\\n      var nextPlaylist = void 0; // If the `error` was generated by the playlist loader, it will contain\\n      // the playlist we were trying to load (but failed) and that should be\\n      // blacklisted instead of the currently selected playlist which is likely\\n      // out-of-date in this scenario\\n\\n      currentPlaylist = error.playlist || this.masterPlaylistLoader_.media();\\n      blacklistDuration = blacklistDuration || error.blacklistDuration || this.blacklistDuration; // If there is no current playlist, then an error occurred while we were\\n      // trying to load the master OR while we were disposing of the tech\\n\\n      if (!currentPlaylist) {\\n        this.error = error;\\n\\n        try {\\n          return this.mediaSource.endOfStream('network');\\n        } catch (e) {\\n          return this.trigger('error');\\n        }\\n      }\\n\\n      var isFinalRendition = this.masterPlaylistLoader_.master.playlists.filter(isEnabled).length === 1;\\n      var playlists = this.masterPlaylistLoader_.master.playlists;\\n\\n      if (playlists.length === 1) {\\n        // Never blacklisting this playlist because it's the only playlist\\n        videojs$1.log.warn('Problem encountered with the current ' + 'HLS playlist. Trying again since it is the only playlist.');\\n        this.tech_.trigger('retryplaylist');\\n        return this.masterPlaylistLoader_.load(isFinalRendition);\\n      }\\n\\n      if (isFinalRendition) {\\n        // Since we're on the final non-blacklisted playlist, and we're about to blacklist\\n        // it, instead of erring the player or retrying this playlist, clear out the current\\n        // blacklist. This allows other playlists to be attempted in case any have been\\n        // fixed.\\n        videojs$1.log.warn('Removing all playlists from the blacklist because the last ' + 'rendition is about to be blacklisted.');\\n        playlists.forEach(function (playlist) {\\n          if (playlist.excludeUntil !== Infinity) {\\n            delete playlist.excludeUntil;\\n          }\\n        }); // Technically we are retrying a playlist, in that we are simply retrying a previous\\n        // playlist. This is needed for users relying on the retryplaylist event to catch a\\n        // case where the player might be stuck and looping through \\\"dead\\\" playlists.\\n\\n        this.tech_.trigger('retryplaylist');\\n      } // Blacklist this playlist\\n\\n\\n      currentPlaylist.excludeUntil = Date.now() + blacklistDuration * 1000;\\n      this.tech_.trigger('blacklistplaylist');\\n      this.tech_.trigger({\\n        type: 'usage',\\n        name: 'hls-rendition-blacklisted'\\n      }); // Select a new playlist\\n\\n      nextPlaylist = this.selectPlaylist();\\n      videojs$1.log.warn('Problem encountered with the current HLS playlist.' + (error.message ? ' ' + error.message : '') + ' Switching to another playlist.');\\n      return this.masterPlaylistLoader_.media(nextPlaylist, isFinalRendition);\\n    }\\n    /**\\n     * Pause all segment loaders\\n     */\\n\\n  }, {\\n    key: 'pauseLoading',\\n    value: function pauseLoading() {\\n      this.mainSegmentLoader_.pause();\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        this.audioSegmentLoader_.pause();\\n      }\\n\\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\\n        this.subtitleSegmentLoader_.pause();\\n      }\\n    }\\n    /**\\n     * set the current time on all segment loaders\\n     *\\n     * @param {TimeRange} currentTime the current time to set\\n     * @return {TimeRange} the current time\\n     */\\n\\n  }, {\\n    key: 'setCurrentTime',\\n    value: function setCurrentTime(currentTime) {\\n      var buffered = findRange(this.tech_.buffered(), currentTime);\\n\\n      if (!(this.masterPlaylistLoader_ && this.masterPlaylistLoader_.media())) {\\n        // return immediately if the metadata is not ready yet\\n        return 0;\\n      } // it's clearly an edge-case but don't thrown an error if asked to\\n      // seek within an empty playlist\\n\\n\\n      if (!this.masterPlaylistLoader_.media().segments) {\\n        return 0;\\n      } // In flash playback, the segment loaders should be reset on every seek, even\\n      // in buffer seeks. If the seek location is already buffered, continue buffering as\\n      // usual\\n      // TODO: redo this comment\\n\\n\\n      if (buffered && buffered.length) {\\n        return currentTime;\\n      } // cancel outstanding requests so we begin buffering at the new\\n      // location\\n\\n\\n      this.mainSegmentLoader_.resetEverything();\\n      this.mainSegmentLoader_.abort();\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        this.audioSegmentLoader_.resetEverything();\\n        this.audioSegmentLoader_.abort();\\n      }\\n\\n      if (this.mediaTypes_.SUBTITLES.activePlaylistLoader) {\\n        this.subtitleSegmentLoader_.resetEverything();\\n        this.subtitleSegmentLoader_.abort();\\n      } // start segment loader loading in case they are paused\\n\\n\\n      this.load();\\n    }\\n    /**\\n     * get the current duration\\n     *\\n     * @return {TimeRange} the duration\\n     */\\n\\n  }, {\\n    key: 'duration',\\n    value: function duration$$1() {\\n      if (!this.masterPlaylistLoader_) {\\n        return 0;\\n      }\\n\\n      if (this.mediaSource) {\\n        return this.mediaSource.duration;\\n      }\\n\\n      return Hls.Playlist.duration(this.masterPlaylistLoader_.media());\\n    }\\n    /**\\n     * check the seekable range\\n     *\\n     * @return {TimeRange} the seekable range\\n     */\\n\\n  }, {\\n    key: 'seekable',\\n    value: function seekable$$1() {\\n      return this.seekable_;\\n    }\\n  }, {\\n    key: 'onSyncInfoUpdate_',\\n    value: function onSyncInfoUpdate_() {\\n      var audioSeekable = void 0;\\n\\n      if (!this.masterPlaylistLoader_) {\\n        return;\\n      }\\n\\n      var media = this.masterPlaylistLoader_.media();\\n\\n      if (!media) {\\n        return;\\n      }\\n\\n      var expired = this.syncController_.getExpiredTime(media, this.mediaSource.duration);\\n\\n      if (expired === null) {\\n        // not enough information to update seekable\\n        return;\\n      }\\n\\n      var suggestedPresentationDelay = this.masterPlaylistLoader_.master.suggestedPresentationDelay;\\n      var mainSeekable = Hls.Playlist.seekable(media, expired, suggestedPresentationDelay);\\n\\n      if (mainSeekable.length === 0) {\\n        return;\\n      }\\n\\n      if (this.mediaTypes_.AUDIO.activePlaylistLoader) {\\n        media = this.mediaTypes_.AUDIO.activePlaylistLoader.media();\\n        expired = this.syncController_.getExpiredTime(media, this.mediaSource.duration);\\n\\n        if (expired === null) {\\n          return;\\n        }\\n\\n        audioSeekable = Hls.Playlist.seekable(media, expired, suggestedPresentationDelay);\\n\\n        if (audioSeekable.length === 0) {\\n          return;\\n        }\\n      }\\n\\n      var oldEnd = void 0;\\n      var oldStart = void 0;\\n\\n      if (this.seekable_ && this.seekable_.length) {\\n        oldEnd = this.seekable_.end(0);\\n        oldStart = this.seekable_.start(0);\\n      }\\n\\n      if (!audioSeekable) {\\n        // seekable has been calculated based on buffering video data so it\\n        // can be returned directly\\n        this.seekable_ = mainSeekable;\\n      } else if (audioSeekable.start(0) > mainSeekable.end(0) || mainSeekable.start(0) > audioSeekable.end(0)) {\\n        // seekables are pretty far off, rely on main\\n        this.seekable_ = mainSeekable;\\n      } else {\\n        this.seekable_ = videojs$1.createTimeRanges([[audioSeekable.start(0) > mainSeekable.start(0) ? audioSeekable.start(0) : mainSeekable.start(0), audioSeekable.end(0) < mainSeekable.end(0) ? audioSeekable.end(0) : mainSeekable.end(0)]]);\\n      } // seekable is the same as last time\\n\\n\\n      if (this.seekable_ && this.seekable_.length) {\\n        if (this.seekable_.end(0) === oldEnd && this.seekable_.start(0) === oldStart) {\\n          return;\\n        }\\n      }\\n\\n      this.logger_('seekable updated [' + printableRange(this.seekable_) + ']');\\n      this.tech_.trigger('seekablechanged');\\n    }\\n    /**\\n     * Update the player duration\\n     */\\n\\n  }, {\\n    key: 'updateDuration',\\n    value: function updateDuration() {\\n      var _this6 = this;\\n\\n      var oldDuration = this.mediaSource.duration;\\n      var newDuration = Hls.Playlist.duration(this.masterPlaylistLoader_.media());\\n      var buffered = this.tech_.buffered();\\n\\n      var setDuration = function setDuration() {\\n        // on firefox setting the duration may sometimes cause an exception\\n        // even if the media source is open and source buffers are not\\n        // updating, something about the media source being in an invalid state.\\n        _this6.logger_('Setting duration from ' + _this6.mediaSource.duration + ' => ' + newDuration);\\n\\n        try {\\n          _this6.mediaSource.duration = newDuration;\\n        } catch (e) {\\n          videojs$1.log.warn('Failed to set media source duration', e);\\n        }\\n\\n        _this6.tech_.trigger('durationchange');\\n\\n        _this6.mediaSource.removeEventListener('sourceopen', setDuration);\\n      };\\n\\n      if (buffered.length > 0) {\\n        newDuration = Math.max(newDuration, buffered.end(buffered.length - 1));\\n      } // if the duration has changed, invalidate the cached value\\n\\n\\n      if (oldDuration !== newDuration) {\\n        // update the duration\\n        if (this.mediaSource.readyState !== 'open') {\\n          this.mediaSource.addEventListener('sourceopen', setDuration);\\n        } else {\\n          setDuration();\\n        }\\n      }\\n    }\\n    /**\\n     * dispose of the MasterPlaylistController and everything\\n     * that it controls\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      var _this7 = this;\\n\\n      this.trigger('dispose');\\n\\n      if (this.decrypter_) {\\n        this.decrypter_.terminate();\\n      }\\n\\n      this.masterPlaylistLoader_.dispose();\\n      this.mainSegmentLoader_.dispose();\\n      ['AUDIO', 'SUBTITLES'].forEach(function (type) {\\n        var groups = _this7.mediaTypes_[type].groups;\\n\\n        for (var id in groups) {\\n          groups[id].forEach(function (group) {\\n            if (group.playlistLoader) {\\n              group.playlistLoader.dispose();\\n            }\\n          });\\n        }\\n      });\\n      this.audioSegmentLoader_.dispose();\\n      this.subtitleSegmentLoader_.dispose();\\n      this.off();\\n\\n      if (this.mediaSource.dispose) {\\n        this.mediaSource.dispose();\\n      }\\n    }\\n    /**\\n     * return the master playlist object if we have one\\n     *\\n     * @return {Object} the master playlist object that we parsed\\n     */\\n\\n  }, {\\n    key: 'master',\\n    value: function master() {\\n      return this.masterPlaylistLoader_.master;\\n    }\\n    /**\\n     * return the currently selected playlist\\n     *\\n     * @return {Object} the currently selected playlist object that we parsed\\n     */\\n\\n  }, {\\n    key: 'media',\\n    value: function media() {\\n      // playlist loader will not return media if it has not been fully loaded\\n      return this.masterPlaylistLoader_.media() || this.initialMedia_;\\n    }\\n    /**\\n     * setup our internal source buffers on our segment Loaders\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'setupSourceBuffers_',\\n    value: function setupSourceBuffers_() {\\n      var media = this.masterPlaylistLoader_.media();\\n      var mimeTypes = void 0; // wait until a media playlist is available and the Media Source is\\n      // attached\\n\\n      if (!media || this.mediaSource.readyState !== 'open') {\\n        return;\\n      }\\n\\n      mimeTypes = mimeTypesForPlaylist(this.masterPlaylistLoader_.master, media);\\n\\n      if (mimeTypes.length < 1) {\\n        this.error = 'No compatible SourceBuffer configuration for the variant stream:' + media.resolvedUri;\\n        return this.mediaSource.endOfStream('decode');\\n      }\\n\\n      this.configureLoaderMimeTypes_(mimeTypes); // exclude any incompatible variant streams from future playlist\\n      // selection\\n\\n      this.excludeIncompatibleVariants_(media);\\n    }\\n  }, {\\n    key: 'configureLoaderMimeTypes_',\\n    value: function configureLoaderMimeTypes_(mimeTypes) {\\n      // If the content is demuxed, we can't start appending segments to a source buffer\\n      // until both source buffers are set up, or else the browser may not let us add the\\n      // second source buffer (it will assume we are playing either audio only or video\\n      // only).\\n      var sourceBufferEmitter = // If there is more than one mime type\\n      mimeTypes.length > 1 && // and the first mime type does not have muxed video and audio\\n      mimeTypes[0].indexOf(',') === -1 && // and the two mime types are different (they can be the same in the case of audio\\n      // only with alternate audio)\\n      mimeTypes[0] !== mimeTypes[1] ? // then we want to wait on the second source buffer\\n      new videojs$1.EventTarget() : // otherwise there is no need to wait as the content is either audio only,\\n      // video only, or muxed content.\\n      null;\\n      this.mainSegmentLoader_.mimeType(mimeTypes[0], sourceBufferEmitter);\\n\\n      if (mimeTypes[1]) {\\n        this.audioSegmentLoader_.mimeType(mimeTypes[1], sourceBufferEmitter);\\n      }\\n    }\\n    /**\\n     * Blacklists playlists with codecs that are unsupported by the browser.\\n     */\\n\\n  }, {\\n    key: 'excludeUnsupportedVariants_',\\n    value: function excludeUnsupportedVariants_() {\\n      this.master().playlists.forEach(function (variant) {\\n        if (variant.attributes.CODECS && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource && global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported && !global_window__WEBPACK_IMPORTED_MODULE_0___default.a.MediaSource.isTypeSupported('video/mp4; codecs=\\\"' + mapLegacyAvcCodecs(variant.attributes.CODECS) + '\\\"')) {\\n          variant.excludeUntil = Infinity;\\n        }\\n      });\\n    }\\n    /**\\n     * Blacklist playlists that are known to be codec or\\n     * stream-incompatible with the SourceBuffer configuration. For\\n     * instance, Media Source Extensions would cause the video element to\\n     * stall waiting for video data if you switched from a variant with\\n     * video and audio to an audio-only one.\\n     *\\n     * @param {Object} media a media playlist compatible with the current\\n     * set of SourceBuffers. Variants in the current master playlist that\\n     * do not appear to have compatible codec or stream configurations\\n     * will be excluded from the default playlist selection algorithm\\n     * indefinitely.\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'excludeIncompatibleVariants_',\\n    value: function excludeIncompatibleVariants_(media) {\\n      var codecCount = 2;\\n      var videoCodec = null;\\n      var codecs = void 0;\\n\\n      if (media.attributes.CODECS) {\\n        codecs = parseCodecs(media.attributes.CODECS);\\n        videoCodec = codecs.videoCodec;\\n        codecCount = codecs.codecCount;\\n      }\\n\\n      this.master().playlists.forEach(function (variant) {\\n        var variantCodecs = {\\n          codecCount: 2,\\n          videoCodec: null\\n        };\\n\\n        if (variant.attributes.CODECS) {\\n          variantCodecs = parseCodecs(variant.attributes.CODECS);\\n        } // if the streams differ in the presence or absence of audio or\\n        // video, they are incompatible\\n\\n\\n        if (variantCodecs.codecCount !== codecCount) {\\n          variant.excludeUntil = Infinity;\\n        } // if h.264 is specified on the current playlist, some flavor of\\n        // it must be specified on all compatible variants\\n\\n\\n        if (variantCodecs.videoCodec !== videoCodec) {\\n          variant.excludeUntil = Infinity;\\n        }\\n      });\\n    }\\n  }, {\\n    key: 'updateAdCues_',\\n    value: function updateAdCues_(media) {\\n      var offset = 0;\\n      var seekable$$1 = this.seekable();\\n\\n      if (seekable$$1.length) {\\n        offset = seekable$$1.start(0);\\n      }\\n\\n      updateAdCues(media, this.cueTagsTrack_, offset);\\n    }\\n    /**\\n     * Calculates the desired forward buffer length based on current time\\n     *\\n     * @return {Number} Desired forward buffer length in seconds\\n     */\\n\\n  }, {\\n    key: 'goalBufferLength',\\n    value: function goalBufferLength() {\\n      var currentTime = this.tech_.currentTime();\\n      var initial = Config.GOAL_BUFFER_LENGTH;\\n      var rate = Config.GOAL_BUFFER_LENGTH_RATE;\\n      var max = Math.max(initial, Config.MAX_GOAL_BUFFER_LENGTH);\\n      return Math.min(initial + currentTime * rate, max);\\n    }\\n    /**\\n     * Calculates the desired buffer low water line based on current time\\n     *\\n     * @return {Number} Desired buffer low water line in seconds\\n     */\\n\\n  }, {\\n    key: 'bufferLowWaterLine',\\n    value: function bufferLowWaterLine() {\\n      var currentTime = this.tech_.currentTime();\\n      var initial = Config.BUFFER_LOW_WATER_LINE;\\n      var rate = Config.BUFFER_LOW_WATER_LINE_RATE;\\n      var max = Math.max(initial, Config.MAX_BUFFER_LOW_WATER_LINE);\\n      return Math.min(initial + currentTime * rate, max);\\n    }\\n  }]);\\n  return MasterPlaylistController;\\n}(videojs$1.EventTarget);\\n/**\\n * Returns a function that acts as the Enable/disable playlist function.\\n *\\n * @param {PlaylistLoader} loader - The master playlist loader\\n\\n * @param {string} playlistID - id of the playlist\\n * @param {Function} changePlaylistFn - A function to be called after a\\n * playlist's enabled-state has been changed. Will NOT be called if a\\n * playlist's enabled-state is unchanged\\n * @param {Boolean=} enable - Value to set the playlist enabled-state to\\n * or if undefined returns the current enabled-state for the playlist\\n * @return {Function} Function for setting/getting enabled\\n */\\n\\n\\nvar enableFunction = function enableFunction(loader, playlistID, changePlaylistFn) {\\n  return function (enable) {\\n    var playlist = loader.master.playlists[playlistID];\\n    var incompatible = isIncompatible(playlist);\\n    var currentlyEnabled = isEnabled(playlist);\\n\\n    if (typeof enable === 'undefined') {\\n      return currentlyEnabled;\\n    }\\n\\n    if (enable) {\\n      delete playlist.disabled;\\n    } else {\\n      playlist.disabled = true;\\n    }\\n\\n    if (enable !== currentlyEnabled && !incompatible) {\\n      // Ensure the outside world knows about our changes\\n      changePlaylistFn();\\n\\n      if (enable) {\\n        loader.trigger('renditionenabled');\\n      } else {\\n        loader.trigger('renditiondisabled');\\n      }\\n    }\\n\\n    return enable;\\n  };\\n};\\n/**\\n * The representation object encapsulates the publicly visible information\\n * in a media playlist along with a setter/getter-type function (enabled)\\n * for changing the enabled-state of a particular playlist entry\\n *\\n * @class Representation\\n */\\n\\n\\nvar Representation = function Representation(hlsHandler, playlist, id) {\\n  classCallCheck(this, Representation);\\n  var mpc = hlsHandler.masterPlaylistController_,\\n      smoothQualityChange = hlsHandler.options_.smoothQualityChange; // Get a reference to a bound version of the quality change function\\n\\n  var changeType = smoothQualityChange ? 'smooth' : 'fast';\\n  var qualityChangeFunction = mpc[changeType + 'QualityChange_'].bind(mpc); // some playlist attributes are optional\\n\\n  if (playlist.attributes.RESOLUTION) {\\n    var resolution = playlist.attributes.RESOLUTION;\\n    this.width = resolution.width;\\n    this.height = resolution.height;\\n  }\\n\\n  this.bandwidth = playlist.attributes.BANDWIDTH; // The id is simply the ordinality of the media playlist\\n  // within the master playlist\\n\\n  this.id = id; // Partially-apply the enableFunction to create a playlist-\\n  // specific variant\\n\\n  this.enabled = enableFunction(hlsHandler.playlists, playlist.id, qualityChangeFunction);\\n};\\n/**\\n * A mixin function that adds the `representations` api to an instance\\n * of the HlsHandler class\\n * @param {HlsHandler} hlsHandler - An instance of HlsHandler to add the\\n * representation API into\\n */\\n\\n\\nvar renditionSelectionMixin = function renditionSelectionMixin(hlsHandler) {\\n  var playlists = hlsHandler.playlists; // Add a single API-specific function to the HlsHandler instance\\n\\n  hlsHandler.representations = function () {\\n    if (!playlists || !playlists.master || !playlists.master.playlists) {\\n      return [];\\n    }\\n\\n    return playlists.master.playlists.filter(function (media) {\\n      return !isIncompatible(media);\\n    }).map(function (e, i) {\\n      return new Representation(hlsHandler, e, e.id);\\n    });\\n  };\\n};\\n/**\\n * @file playback-watcher.js\\n *\\n * Playback starts, and now my watch begins. It shall not end until my death. I shall\\n * take no wait, hold no uncleared timeouts, father no bad seeks. I shall wear no crowns\\n * and win no glory. I shall live and die at my post. I am the corrector of the underflow.\\n * I am the watcher of gaps. I am the shield that guards the realms of seekable. I pledge\\n * my life and honor to the Playback Watch, for this Player and all the Players to come.\\n */\\n// Set of events that reset the playback-watcher time check logic and clear the timeout\\n\\n\\nvar timerCancelEvents = ['seeking', 'seeked', 'pause', 'playing', 'error'];\\n/**\\n * @class PlaybackWatcher\\n */\\n\\nvar PlaybackWatcher = function () {\\n  /**\\n   * Represents an PlaybackWatcher object.\\n   * @constructor\\n   * @param {object} options an object that includes the tech and settings\\n   */\\n  function PlaybackWatcher(options) {\\n    var _this = this;\\n\\n    classCallCheck(this, PlaybackWatcher);\\n    this.tech_ = options.tech;\\n    this.seekable = options.seekable;\\n    this.allowSeeksWithinUnsafeLiveWindow = options.allowSeeksWithinUnsafeLiveWindow;\\n    this.media = options.media;\\n    this.consecutiveUpdates = 0;\\n    this.lastRecordedTime = null;\\n    this.timer_ = null;\\n    this.checkCurrentTimeTimeout_ = null;\\n    this.logger_ = logger('PlaybackWatcher');\\n    this.logger_('initialize');\\n\\n    var canPlayHandler = function canPlayHandler() {\\n      return _this.monitorCurrentTime_();\\n    };\\n\\n    var waitingHandler = function waitingHandler() {\\n      return _this.techWaiting_();\\n    };\\n\\n    var cancelTimerHandler = function cancelTimerHandler() {\\n      return _this.cancelTimer_();\\n    };\\n\\n    var fixesBadSeeksHandler = function fixesBadSeeksHandler() {\\n      return _this.fixesBadSeeks_();\\n    };\\n\\n    this.tech_.on('seekablechanged', fixesBadSeeksHandler);\\n    this.tech_.on('waiting', waitingHandler);\\n    this.tech_.on(timerCancelEvents, cancelTimerHandler);\\n    this.tech_.on('canplay', canPlayHandler); // Define the dispose function to clean up our events\\n\\n    this.dispose = function () {\\n      _this.logger_('dispose');\\n\\n      _this.tech_.off('seekablechanged', fixesBadSeeksHandler);\\n\\n      _this.tech_.off('waiting', waitingHandler);\\n\\n      _this.tech_.off(timerCancelEvents, cancelTimerHandler);\\n\\n      _this.tech_.off('canplay', canPlayHandler);\\n\\n      if (_this.checkCurrentTimeTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(_this.checkCurrentTimeTimeout_);\\n      }\\n\\n      _this.cancelTimer_();\\n    };\\n  }\\n  /**\\n   * Periodically check current time to see if playback stopped\\n   *\\n   * @private\\n   */\\n\\n\\n  createClass(PlaybackWatcher, [{\\n    key: 'monitorCurrentTime_',\\n    value: function monitorCurrentTime_() {\\n      this.checkCurrentTime_();\\n\\n      if (this.checkCurrentTimeTimeout_) {\\n        global_window__WEBPACK_IMPORTED_MODULE_0___default.a.clearTimeout(this.checkCurrentTimeTimeout_);\\n      } // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\\n\\n\\n      this.checkCurrentTimeTimeout_ = global_window__WEBPACK_IMPORTED_MODULE_0___default.a.setTimeout(this.monitorCurrentTime_.bind(this), 250);\\n    }\\n    /**\\n     * The purpose of this function is to emulate the \\\"waiting\\\" event on\\n     * browsers that do not emit it when they are waiting for more\\n     * data to continue playback\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'checkCurrentTime_',\\n    value: function checkCurrentTime_() {\\n      if (this.tech_.seeking() && this.fixesBadSeeks_()) {\\n        this.consecutiveUpdates = 0;\\n        this.lastRecordedTime = this.tech_.currentTime();\\n        return;\\n      }\\n\\n      if (this.tech_.paused() || this.tech_.seeking()) {\\n        return;\\n      }\\n\\n      var currentTime = this.tech_.currentTime();\\n      var buffered = this.tech_.buffered();\\n\\n      if (this.lastRecordedTime === currentTime && (!buffered.length || currentTime + SAFE_TIME_DELTA >= buffered.end(buffered.length - 1))) {\\n        // If current time is at the end of the final buffered region, then any playback\\n        // stall is most likely caused by buffering in a low bandwidth environment. The tech\\n        // should fire a `waiting` event in this scenario, but due to browser and tech\\n        // inconsistencies. Calling `techWaiting_` here allows us to simulate\\n        // responding to a native `waiting` event when the tech fails to emit one.\\n        return this.techWaiting_();\\n      }\\n\\n      if (this.consecutiveUpdates >= 5 && currentTime === this.lastRecordedTime) {\\n        this.consecutiveUpdates++;\\n        this.waiting_();\\n      } else if (currentTime === this.lastRecordedTime) {\\n        this.consecutiveUpdates++;\\n      } else {\\n        this.consecutiveUpdates = 0;\\n        this.lastRecordedTime = currentTime;\\n      }\\n    }\\n    /**\\n     * Cancels any pending timers and resets the 'timeupdate' mechanism\\n     * designed to detect that we are stalled\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'cancelTimer_',\\n    value: function cancelTimer_() {\\n      this.consecutiveUpdates = 0;\\n\\n      if (this.timer_) {\\n        this.logger_('cancelTimer_');\\n        clearTimeout(this.timer_);\\n      }\\n\\n      this.timer_ = null;\\n    }\\n    /**\\n     * Fixes situations where there's a bad seek\\n     *\\n     * @return {Boolean} whether an action was taken to fix the seek\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'fixesBadSeeks_',\\n    value: function fixesBadSeeks_() {\\n      var seeking = this.tech_.seeking();\\n\\n      if (!seeking) {\\n        return false;\\n      }\\n\\n      var seekable = this.seekable();\\n      var currentTime = this.tech_.currentTime();\\n      var isAfterSeekableRange = this.afterSeekableWindow_(seekable, currentTime, this.media(), this.allowSeeksWithinUnsafeLiveWindow);\\n      var seekTo = void 0;\\n\\n      if (isAfterSeekableRange) {\\n        var seekableEnd = seekable.end(seekable.length - 1); // sync to live point (if VOD, our seekable was updated and we're simply adjusting)\\n\\n        seekTo = seekableEnd;\\n      }\\n\\n      if (this.beforeSeekableWindow_(seekable, currentTime)) {\\n        var seekableStart = seekable.start(0); // sync to the beginning of the live window\\n        // provide a buffer of .1 seconds to handle rounding/imprecise numbers\\n\\n        seekTo = seekableStart + SAFE_TIME_DELTA;\\n      }\\n\\n      if (typeof seekTo !== 'undefined') {\\n        this.logger_('Trying to seek outside of seekable at time ' + currentTime + ' with ' + ('seekable range ' + printableRange(seekable) + '. Seeking to ') + (seekTo + '.'));\\n        this.tech_.setCurrentTime(seekTo);\\n        return true;\\n      }\\n\\n      return false;\\n    }\\n    /**\\n     * Handler for situations when we determine the player is waiting.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'waiting_',\\n    value: function waiting_() {\\n      if (this.techWaiting_()) {\\n        return;\\n      } // All tech waiting checks failed. Use last resort correction\\n\\n\\n      var currentTime = this.tech_.currentTime();\\n      var buffered = this.tech_.buffered();\\n      var currentRange = findRange(buffered, currentTime); // Sometimes the player can stall for unknown reasons within a contiguous buffered\\n      // region with no indication that anything is amiss (seen in Firefox). Seeking to\\n      // currentTime is usually enough to kickstart the player. This checks that the player\\n      // is currently within a buffered region before attempting a corrective seek.\\n      // Chrome does not appear to continue `timeupdate` events after a `waiting` event\\n      // until there is ~ 3 seconds of forward buffer available. PlaybackWatcher should also\\n      // make sure there is ~3 seconds of forward buffer before taking any corrective action\\n      // to avoid triggering an `unknownwaiting` event when the network is slow.\\n\\n      if (currentRange.length && currentTime + 3 <= currentRange.end(0)) {\\n        this.cancelTimer_();\\n        this.tech_.setCurrentTime(currentTime);\\n        this.logger_('Stopped at ' + currentTime + ' while inside a buffered region ' + ('[' + currentRange.start(0) + ' -> ' + currentRange.end(0) + ']. Attempting to resume ') + 'playback by seeking to the current time.'); // unknown waiting corrections may be useful for monitoring QoS\\n\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-unknown-waiting'\\n        });\\n        return;\\n      }\\n    }\\n    /**\\n     * Handler for situations when the tech fires a `waiting` event\\n     *\\n     * @return {Boolean}\\n     *         True if an action (or none) was needed to correct the waiting. False if no\\n     *         checks passed\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'techWaiting_',\\n    value: function techWaiting_() {\\n      var seekable = this.seekable();\\n      var currentTime = this.tech_.currentTime();\\n\\n      if (this.tech_.seeking() && this.fixesBadSeeks_()) {\\n        // Tech is seeking or bad seek fixed, no action needed\\n        return true;\\n      }\\n\\n      if (this.tech_.seeking() || this.timer_ !== null) {\\n        // Tech is seeking or already waiting on another action, no action needed\\n        return true;\\n      }\\n\\n      if (this.beforeSeekableWindow_(seekable, currentTime)) {\\n        var livePoint = seekable.end(seekable.length - 1);\\n        this.logger_('Fell out of live window at time ' + currentTime + '. Seeking to ' + ('live point (seekable end) ' + livePoint));\\n        this.cancelTimer_();\\n        this.tech_.setCurrentTime(livePoint); // live window resyncs may be useful for monitoring QoS\\n\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-live-resync'\\n        });\\n        return true;\\n      }\\n\\n      var buffered = this.tech_.buffered();\\n      var nextRange = findNextRange(buffered, currentTime);\\n\\n      if (this.videoUnderflow_(nextRange, buffered, currentTime)) {\\n        // Even though the video underflowed and was stuck in a gap, the audio overplayed\\n        // the gap, leading currentTime into a buffered range. Seeking to currentTime\\n        // allows the video to catch up to the audio position without losing any audio\\n        // (only suffering ~3 seconds of frozen video and a pause in audio playback).\\n        this.cancelTimer_();\\n        this.tech_.setCurrentTime(currentTime); // video underflow may be useful for monitoring QoS\\n\\n        this.tech_.trigger({\\n          type: 'usage',\\n          name: 'hls-video-underflow'\\n        });\\n        return true;\\n      } // check for gap\\n\\n\\n      if (nextRange.length > 0) {\\n        var difference = nextRange.start(0) - currentTime;\\n        this.logger_('Stopped at ' + currentTime + ', setting timer for ' + difference + ', seeking ' + ('to ' + nextRange.start(0)));\\n        this.timer_ = setTimeout(this.skipTheGap_.bind(this), difference * 1000, currentTime);\\n        return true;\\n      } // All checks failed. Returning false to indicate failure to correct waiting\\n\\n\\n      return false;\\n    }\\n  }, {\\n    key: 'afterSeekableWindow_',\\n    value: function afterSeekableWindow_(seekable, currentTime, playlist) {\\n      var allowSeeksWithinUnsafeLiveWindow = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\\n\\n      if (!seekable.length) {\\n        // we can't make a solid case if there's no seekable, default to false\\n        return false;\\n      }\\n\\n      var allowedEnd = seekable.end(seekable.length - 1) + SAFE_TIME_DELTA;\\n      var isLive = !playlist.endList;\\n\\n      if (isLive && allowSeeksWithinUnsafeLiveWindow) {\\n        allowedEnd = seekable.end(seekable.length - 1) + playlist.targetDuration * 3;\\n      }\\n\\n      if (currentTime > allowedEnd) {\\n        return true;\\n      }\\n\\n      return false;\\n    }\\n  }, {\\n    key: 'beforeSeekableWindow_',\\n    value: function beforeSeekableWindow_(seekable, currentTime) {\\n      if (seekable.length && // can't fall before 0 and 0 seekable start identifies VOD stream\\n      seekable.start(0) > 0 && currentTime < seekable.start(0) - SAFE_TIME_DELTA) {\\n        return true;\\n      }\\n\\n      return false;\\n    }\\n  }, {\\n    key: 'videoUnderflow_',\\n    value: function videoUnderflow_(nextRange, buffered, currentTime) {\\n      if (nextRange.length === 0) {\\n        // Even if there is no available next range, there is still a possibility we are\\n        // stuck in a gap due to video underflow.\\n        var gap = this.gapFromVideoUnderflow_(buffered, currentTime);\\n\\n        if (gap) {\\n          this.logger_('Encountered a gap in video from ' + gap.start + ' to ' + gap.end + '. ' + ('Seeking to current time ' + currentTime));\\n          return true;\\n        }\\n      }\\n\\n      return false;\\n    }\\n    /**\\n     * Timer callback. If playback still has not proceeded, then we seek\\n     * to the start of the next buffered region.\\n     *\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'skipTheGap_',\\n    value: function skipTheGap_(scheduledCurrentTime) {\\n      var buffered = this.tech_.buffered();\\n      var currentTime = this.tech_.currentTime();\\n      var nextRange = findNextRange(buffered, currentTime);\\n      this.cancelTimer_();\\n\\n      if (nextRange.length === 0 || currentTime !== scheduledCurrentTime) {\\n        return;\\n      }\\n\\n      this.logger_('skipTheGap_:', 'currentTime:', currentTime, 'scheduled currentTime:', scheduledCurrentTime, 'nextRange start:', nextRange.start(0)); // only seek if we still have not played\\n\\n      this.tech_.setCurrentTime(nextRange.start(0) + TIME_FUDGE_FACTOR);\\n      this.tech_.trigger({\\n        type: 'usage',\\n        name: 'hls-gap-skip'\\n      });\\n    }\\n  }, {\\n    key: 'gapFromVideoUnderflow_',\\n    value: function gapFromVideoUnderflow_(buffered, currentTime) {\\n      // At least in Chrome, if there is a gap in the video buffer, the audio will continue\\n      // playing for ~3 seconds after the video gap starts. This is done to account for\\n      // video buffer underflow/underrun (note that this is not done when there is audio\\n      // buffer underflow/underrun -- in that case the video will stop as soon as it\\n      // encounters the gap, as audio stalls are more noticeable/jarring to a user than\\n      // video stalls). The player's time will reflect the playthrough of audio, so the\\n      // time will appear as if we are in a buffered region, even if we are stuck in a\\n      // \\\"gap.\\\"\\n      //\\n      // Example:\\n      // video buffer:   0 => 10.1, 10.2 => 20\\n      // audio buffer:   0 => 20\\n      // overall buffer: 0 => 10.1, 10.2 => 20\\n      // current time: 13\\n      //\\n      // Chrome's video froze at 10 seconds, where the video buffer encountered the gap,\\n      // however, the audio continued playing until it reached ~3 seconds past the gap\\n      // (13 seconds), at which point it stops as well. Since current time is past the\\n      // gap, findNextRange will return no ranges.\\n      //\\n      // To check for this issue, we see if there is a gap that starts somewhere within\\n      // a 3 second range (3 seconds +/- 1 second) back from our current time.\\n      var gaps = findGaps(buffered);\\n\\n      for (var i = 0; i < gaps.length; i++) {\\n        var start = gaps.start(i);\\n        var end = gaps.end(i); // gap is starts no more than 4 seconds back\\n\\n        if (currentTime - start < 4 && currentTime - start > 2) {\\n          return {\\n            start: start,\\n            end: end\\n          };\\n        }\\n      }\\n\\n      return null;\\n    }\\n  }]);\\n  return PlaybackWatcher;\\n}();\\n\\nvar defaultOptions = {\\n  errorInterval: 30,\\n  getSource: function getSource(next) {\\n    var tech = this.tech({\\n      IWillNotUseThisInPlugins: true\\n    });\\n    var sourceObj = tech.currentSource_;\\n    return next(sourceObj);\\n  }\\n};\\n/**\\n * Main entry point for the plugin\\n *\\n * @param {Player} player a reference to a videojs Player instance\\n * @param {Object} [options] an object with plugin options\\n * @private\\n */\\n\\nvar initPlugin = function initPlugin(player, options) {\\n  var lastCalled = 0;\\n  var seekTo = 0;\\n  var localOptions = videojs$1.mergeOptions(defaultOptions, options);\\n  player.ready(function () {\\n    player.trigger({\\n      type: 'usage',\\n      name: 'hls-error-reload-initialized'\\n    });\\n  });\\n  /**\\n   * Player modifications to perform that must wait until `loadedmetadata`\\n   * has been triggered\\n   *\\n   * @private\\n   */\\n\\n  var loadedMetadataHandler = function loadedMetadataHandler() {\\n    if (seekTo) {\\n      player.currentTime(seekTo);\\n    }\\n  };\\n  /**\\n   * Set the source on the player element, play, and seek if necessary\\n   *\\n   * @param {Object} sourceObj An object specifying the source url and mime-type to play\\n   * @private\\n   */\\n\\n\\n  var setSource = function setSource(sourceObj) {\\n    if (sourceObj === null || sourceObj === undefined) {\\n      return;\\n    }\\n\\n    seekTo = player.duration() !== Infinity && player.currentTime() || 0;\\n    player.one('loadedmetadata', loadedMetadataHandler);\\n    player.src(sourceObj);\\n    player.trigger({\\n      type: 'usage',\\n      name: 'hls-error-reload'\\n    });\\n    player.play();\\n  };\\n  /**\\n   * Attempt to get a source from either the built-in getSource function\\n   * or a custom function provided via the options\\n   *\\n   * @private\\n   */\\n\\n\\n  var errorHandler = function errorHandler() {\\n    // Do not attempt to reload the source if a source-reload occurred before\\n    // 'errorInterval' time has elapsed since the last source-reload\\n    if (Date.now() - lastCalled < localOptions.errorInterval * 1000) {\\n      player.trigger({\\n        type: 'usage',\\n        name: 'hls-error-reload-canceled'\\n      });\\n      return;\\n    }\\n\\n    if (!localOptions.getSource || typeof localOptions.getSource !== 'function') {\\n      videojs$1.log.error('ERROR: reloadSourceOnError - The option getSource must be a function!');\\n      return;\\n    }\\n\\n    lastCalled = Date.now();\\n    return localOptions.getSource.call(player, setSource);\\n  };\\n  /**\\n   * Unbind any event handlers that were bound by the plugin\\n   *\\n   * @private\\n   */\\n\\n\\n  var cleanupEvents = function cleanupEvents() {\\n    player.off('loadedmetadata', loadedMetadataHandler);\\n    player.off('error', errorHandler);\\n    player.off('dispose', cleanupEvents);\\n  };\\n  /**\\n   * Cleanup before re-initializing the plugin\\n   *\\n   * @param {Object} [newOptions] an object with plugin options\\n   * @private\\n   */\\n\\n\\n  var reinitPlugin = function reinitPlugin(newOptions) {\\n    cleanupEvents();\\n    initPlugin(player, newOptions);\\n  };\\n\\n  player.on('error', errorHandler);\\n  player.on('dispose', cleanupEvents); // Overwrite the plugin function so that we can correctly cleanup before\\n  // initializing the plugin\\n\\n  player.reloadSourceOnError = reinitPlugin;\\n};\\n/**\\n * Reload the source when an error is detected as long as there\\n * wasn't an error previously within the last 30 seconds\\n *\\n * @param {Object} [options] an object with plugin options\\n */\\n\\n\\nvar reloadSourceOnError = function reloadSourceOnError(options) {\\n  initPlugin(this, options);\\n};\\n\\nvar version$1 = \\\"1.13.2\\\";\\n/**\\n * @file videojs-http-streaming.js\\n *\\n * The main file for the HLS project.\\n * License: https://github.com/videojs/videojs-http-streaming/blob/master/LICENSE\\n */\\n\\nvar Hls$1 = {\\n  PlaylistLoader: PlaylistLoader,\\n  Playlist: Playlist,\\n  Decrypter: aes_decrypter__WEBPACK_IMPORTED_MODULE_20__[\\\"Decrypter\\\"],\\n  AsyncStream: aes_decrypter__WEBPACK_IMPORTED_MODULE_20__[\\\"AsyncStream\\\"],\\n  decrypt: aes_decrypter__WEBPACK_IMPORTED_MODULE_20__[\\\"decrypt\\\"],\\n  utils: utils,\\n  STANDARD_PLAYLIST_SELECTOR: lastBandwidthSelector,\\n  INITIAL_PLAYLIST_SELECTOR: lowestBitrateCompatibleVariantSelector,\\n  comparePlaylistBandwidth: comparePlaylistBandwidth,\\n  comparePlaylistResolution: comparePlaylistResolution,\\n  xhr: xhrFactory()\\n}; // Define getter/setters for config properites\\n\\n['GOAL_BUFFER_LENGTH', 'MAX_GOAL_BUFFER_LENGTH', 'GOAL_BUFFER_LENGTH_RATE', 'BUFFER_LOW_WATER_LINE', 'MAX_BUFFER_LOW_WATER_LINE', 'BUFFER_LOW_WATER_LINE_RATE', 'BANDWIDTH_VARIANCE'].forEach(function (prop) {\\n  Object.defineProperty(Hls$1, prop, {\\n    get: function get$$1() {\\n      videojs$1.log.warn('using Hls.' + prop + ' is UNSAFE be sure you know what you are doing');\\n      return Config[prop];\\n    },\\n    set: function set$$1(value) {\\n      videojs$1.log.warn('using Hls.' + prop + ' is UNSAFE be sure you know what you are doing');\\n\\n      if (typeof value !== 'number' || value < 0) {\\n        videojs$1.log.warn('value of Hls.' + prop + ' must be greater than or equal to 0');\\n        return;\\n      }\\n\\n      Config[prop] = value;\\n    }\\n  });\\n});\\nvar LOCAL_STORAGE_KEY$1 = 'videojs-vhs';\\n\\nvar simpleTypeFromSourceType = function simpleTypeFromSourceType(type) {\\n  var mpegurlRE = /^(audio|video|application)\\\\/(x-|vnd\\\\.apple\\\\.)?mpegurl/i;\\n\\n  if (mpegurlRE.test(type)) {\\n    return 'hls';\\n  }\\n\\n  var dashRE = /^application\\\\/dash\\\\+xml/i;\\n\\n  if (dashRE.test(type)) {\\n    return 'dash';\\n  }\\n\\n  return null;\\n};\\n/**\\n * Updates the selectedIndex of the QualityLevelList when a mediachange happens in hls.\\n *\\n * @param {QualityLevelList} qualityLevels The QualityLevelList to update.\\n * @param {PlaylistLoader} playlistLoader PlaylistLoader containing the new media info.\\n * @function handleHlsMediaChange\\n */\\n\\n\\nvar handleHlsMediaChange = function handleHlsMediaChange(qualityLevels, playlistLoader) {\\n  var newPlaylist = playlistLoader.media();\\n  var selectedIndex = -1;\\n\\n  for (var i = 0; i < qualityLevels.length; i++) {\\n    if (qualityLevels[i].id === newPlaylist.id) {\\n      selectedIndex = i;\\n      break;\\n    }\\n  }\\n\\n  qualityLevels.selectedIndex_ = selectedIndex;\\n  qualityLevels.trigger({\\n    selectedIndex: selectedIndex,\\n    type: 'change'\\n  });\\n};\\n/**\\n * Adds quality levels to list once playlist metadata is available\\n *\\n * @param {QualityLevelList} qualityLevels The QualityLevelList to attach events to.\\n * @param {Object} hls Hls object to listen to for media events.\\n * @function handleHlsLoadedMetadata\\n */\\n\\n\\nvar handleHlsLoadedMetadata = function handleHlsLoadedMetadata(qualityLevels, hls) {\\n  hls.representations().forEach(function (rep) {\\n    qualityLevels.addQualityLevel(rep);\\n  });\\n  handleHlsMediaChange(qualityLevels, hls.playlists);\\n}; // HLS is a source handler, not a tech. Make sure attempts to use it\\n// as one do not cause exceptions.\\n\\n\\nHls$1.canPlaySource = function () {\\n  return videojs$1.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\\\'s techOrder.');\\n};\\n\\nvar emeKeySystems = function emeKeySystems(keySystemOptions, mainSegmentLoader, audioSegmentLoader) {\\n  if (!keySystemOptions) {\\n    return keySystemOptions;\\n  }\\n\\n  var videoMimeType = void 0;\\n  var audioMimeType = void 0; // if there is a mimeType associated with the audioSegmentLoader, then the audio\\n  // and video mimeType and codec strings are already in the format we need to\\n  // pass with the other key systems\\n\\n  if (audioSegmentLoader.mimeType_) {\\n    videoMimeType = mainSegmentLoader.mimeType_;\\n    audioMimeType = audioSegmentLoader.mimeType_; // if there is no audioSegmentLoader mimeType, then we have to create the\\n    // the audio and video mimeType/codec strings from information extrapolated\\n    // from the mainSegmentLoader mimeType (ex. 'video/mp4; codecs=\\\"mp4, avc1\\\"' --\\x3e\\n    // 'video/mp4; codecs=\\\"avc1\\\"' and 'audio/mp4; codecs=\\\"mp4\\\"')\\n  } else {\\n    var parsedMimeType = parseContentType(mainSegmentLoader.mimeType_);\\n    var codecs = parsedMimeType.parameters.codecs.split(',');\\n    var audioCodec = void 0;\\n    var videoCodec = void 0;\\n    codecs.forEach(function (codec) {\\n      codec = codec.trim();\\n\\n      if (isAudioCodec(codec)) {\\n        audioCodec = codec;\\n      } else if (isVideoCodec(codec)) {\\n        videoCodec = codec;\\n      }\\n    });\\n    videoMimeType = parsedMimeType.type + '; codecs=\\\"' + videoCodec + '\\\"';\\n    audioMimeType = parsedMimeType.type.replace('video', 'audio') + '; codecs=\\\"' + audioCodec + '\\\"';\\n  } // upsert the content types based on the selected playlist\\n\\n\\n  var keySystemContentTypes = {};\\n  var videoPlaylist = mainSegmentLoader.playlist_;\\n\\n  for (var keySystem in keySystemOptions) {\\n    keySystemContentTypes[keySystem] = {\\n      audioContentType: audioMimeType,\\n      videoContentType: videoMimeType\\n    };\\n\\n    if (videoPlaylist.contentProtection && videoPlaylist.contentProtection[keySystem] && videoPlaylist.contentProtection[keySystem].pssh) {\\n      keySystemContentTypes[keySystem].pssh = videoPlaylist.contentProtection[keySystem].pssh;\\n    } // videojs-contrib-eme accepts the option of specifying: 'com.some.cdm': 'url'\\n    // so we need to prevent overwriting the URL entirely\\n\\n\\n    if (typeof keySystemOptions[keySystem] === 'string') {\\n      keySystemContentTypes[keySystem].url = keySystemOptions[keySystem];\\n    }\\n  }\\n\\n  return videojs$1.mergeOptions(keySystemOptions, keySystemContentTypes);\\n};\\n\\nvar setupEmeOptions = function setupEmeOptions(hlsHandler) {\\n  var mainSegmentLoader = hlsHandler.masterPlaylistController_.mainSegmentLoader_;\\n  var audioSegmentLoader = hlsHandler.masterPlaylistController_.audioSegmentLoader_;\\n  var player = videojs$1.players[hlsHandler.tech_.options_.playerId];\\n\\n  if (player.eme) {\\n    var sourceOptions = emeKeySystems(hlsHandler.source_.keySystems, mainSegmentLoader, audioSegmentLoader);\\n\\n    if (sourceOptions) {\\n      player.currentSource().keySystems = sourceOptions; // Works around https://bugs.chromium.org/p/chromium/issues/detail?id=895449\\n      // in non-IE11 browsers. In IE11 this is too early to initialize media keys\\n\\n      if (!(videojs$1.browser.IE_VERSION === 11) && player.eme.initializeMediaKeys) {\\n        player.eme.initializeMediaKeys();\\n      }\\n    }\\n  }\\n};\\n\\nvar getVhsLocalStorage = function getVhsLocalStorage() {\\n  if (!window.localStorage) {\\n    return null;\\n  }\\n\\n  var storedObject = window.localStorage.getItem(LOCAL_STORAGE_KEY$1);\\n\\n  if (!storedObject) {\\n    return null;\\n  }\\n\\n  try {\\n    return JSON.parse(storedObject);\\n  } catch (e) {\\n    // someone may have tampered with the value\\n    return null;\\n  }\\n};\\n\\nvar updateVhsLocalStorage = function updateVhsLocalStorage(options) {\\n  if (!window.localStorage) {\\n    return false;\\n  }\\n\\n  var objectToStore = getVhsLocalStorage();\\n  objectToStore = objectToStore ? videojs$1.mergeOptions(objectToStore, options) : options;\\n\\n  try {\\n    window.localStorage.setItem(LOCAL_STORAGE_KEY$1, JSON.stringify(objectToStore));\\n  } catch (e) {\\n    // Throws if storage is full (e.g., always on iOS 5+ Safari private mode, where\\n    // storage is set to 0).\\n    // https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem#Exceptions\\n    // No need to perform any operation.\\n    return false;\\n  }\\n\\n  return objectToStore;\\n};\\n/**\\n * Whether the browser has built-in HLS support.\\n */\\n\\n\\nHls$1.supportsNativeHls = function () {\\n  var video = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video'); // native HLS is definitely not supported if HTML5 video isn't\\n\\n  if (!videojs$1.getTech('Html5').isSupported()) {\\n    return false;\\n  } // HLS manifests can go by many mime-types\\n\\n\\n  var canPlay = [// Apple santioned\\n  'application/vnd.apple.mpegurl', // Apple sanctioned for backwards compatibility\\n  'audio/mpegurl', // Very common\\n  'audio/x-mpegurl', // Very common\\n  'application/x-mpegurl', // Included for completeness\\n  'video/x-mpegurl', 'video/mpegurl', 'application/mpegurl'];\\n  return canPlay.some(function (canItPlay) {\\n    return /maybe|probably/i.test(video.canPlayType(canItPlay));\\n  });\\n}();\\n\\nHls$1.supportsNativeDash = function () {\\n  if (!videojs$1.getTech('Html5').isSupported()) {\\n    return false;\\n  }\\n\\n  return /maybe|probably/i.test(global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('video').canPlayType('application/dash+xml'));\\n}();\\n\\nHls$1.supportsTypeNatively = function (type) {\\n  if (type === 'hls') {\\n    return Hls$1.supportsNativeHls;\\n  }\\n\\n  if (type === 'dash') {\\n    return Hls$1.supportsNativeDash;\\n  }\\n\\n  return false;\\n};\\n/**\\n * HLS is a source handler, not a tech. Make sure attempts to use it\\n * as one do not cause exceptions.\\n */\\n\\n\\nHls$1.isSupported = function () {\\n  return videojs$1.log.warn('HLS is no longer a tech. Please remove it from ' + 'your player\\\\'s techOrder.');\\n};\\n\\nvar Component$1 = videojs$1.getComponent('Component');\\n/**\\n * The Hls Handler object, where we orchestrate all of the parts\\n * of HLS to interact with video.js\\n *\\n * @class HlsHandler\\n * @extends videojs.Component\\n * @param {Object} source the soruce object\\n * @param {Tech} tech the parent tech object\\n * @param {Object} options optional and required options\\n */\\n\\nvar HlsHandler = function (_Component) {\\n  inherits(HlsHandler, _Component);\\n\\n  function HlsHandler(source, tech, options) {\\n    classCallCheck(this, HlsHandler); // tech.player() is deprecated but setup a reference to HLS for\\n    // backwards-compatibility\\n\\n    var _this = possibleConstructorReturn(this, (HlsHandler.__proto__ || Object.getPrototypeOf(HlsHandler)).call(this, tech, options.hls));\\n\\n    if (tech.options_ && tech.options_.playerId) {\\n      var _player = videojs$1(tech.options_.playerId);\\n\\n      if (!_player.hasOwnProperty('hls')) {\\n        Object.defineProperty(_player, 'hls', {\\n          get: function get$$1() {\\n            videojs$1.log.warn('player.hls is deprecated. Use player.tech().hls instead.');\\n            tech.trigger({\\n              type: 'usage',\\n              name: 'hls-player-access'\\n            });\\n            return _this;\\n          },\\n          configurable: true\\n        });\\n      } // Set up a reference to the HlsHandler from player.vhs. This allows users to start\\n      // migrating from player.tech_.hls... to player.vhs... for API access. Although this\\n      // isn't the most appropriate form of reference for video.js (since all APIs should\\n      // be provided through core video.js), it is a common pattern for plugins, and vhs\\n      // will act accordingly.\\n\\n\\n      _player.vhs = _this; // deprecated, for backwards compatibility\\n\\n      _player.dash = _this;\\n      _this.player_ = _player;\\n    }\\n\\n    _this.tech_ = tech;\\n    _this.source_ = source;\\n    _this.stats = {};\\n    _this.ignoreNextSeekingEvent_ = false;\\n\\n    _this.setOptions_();\\n\\n    if (_this.options_.overrideNative && tech.overrideNativeAudioTracks && tech.overrideNativeVideoTracks) {\\n      tech.overrideNativeAudioTracks(true);\\n      tech.overrideNativeVideoTracks(true);\\n    } else if (_this.options_.overrideNative && (tech.featuresNativeVideoTracks || tech.featuresNativeAudioTracks)) {\\n      // overriding native HLS only works if audio tracks have been emulated\\n      // error early if we're misconfigured\\n      throw new Error('Overriding native HLS requires emulated tracks. ' + 'See https://git.io/vMpjB');\\n    } // listen for fullscreenchange events for this player so that we\\n    // can adjust our quality selection quickly\\n\\n\\n    _this.on(global_document__WEBPACK_IMPORTED_MODULE_1___default.a, ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'], function (event) {\\n      var fullscreenElement = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.fullscreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.webkitFullscreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.mozFullScreenElement || global_document__WEBPACK_IMPORTED_MODULE_1___default.a.msFullscreenElement;\\n\\n      if (fullscreenElement && fullscreenElement.contains(_this.tech_.el())) {\\n        _this.masterPlaylistController_.smoothQualityChange_();\\n      }\\n    });\\n\\n    _this.on(_this.tech_, 'seeking', function () {\\n      if (this.ignoreNextSeekingEvent_) {\\n        this.ignoreNextSeekingEvent_ = false;\\n        return;\\n      }\\n\\n      this.setCurrentTime(this.tech_.currentTime());\\n    });\\n\\n    _this.on(_this.tech_, 'error', function () {\\n      if (this.masterPlaylistController_) {\\n        this.masterPlaylistController_.pauseLoading();\\n      }\\n    });\\n\\n    _this.on(_this.tech_, 'play', _this.play);\\n\\n    return _this;\\n  }\\n\\n  createClass(HlsHandler, [{\\n    key: 'setOptions_',\\n    value: function setOptions_() {\\n      var _this2 = this; // defaults\\n\\n\\n      this.options_.withCredentials = this.options_.withCredentials || false;\\n      this.options_.handleManifestRedirects = this.options_.handleManifestRedirects || false;\\n      this.options_.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions === false ? false : true;\\n      this.options_.useDevicePixelRatio = this.options_.useDevicePixelRatio || false;\\n      this.options_.smoothQualityChange = this.options_.smoothQualityChange || false;\\n      this.options_.useBandwidthFromLocalStorage = typeof this.source_.useBandwidthFromLocalStorage !== 'undefined' ? this.source_.useBandwidthFromLocalStorage : this.options_.useBandwidthFromLocalStorage || false;\\n      this.options_.customTagParsers = this.options_.customTagParsers || [];\\n      this.options_.customTagMappers = this.options_.customTagMappers || [];\\n      this.options_.cacheEncryptionKeys = this.options_.cacheEncryptionKeys || false;\\n\\n      if (typeof this.options_.blacklistDuration !== 'number') {\\n        this.options_.blacklistDuration = 5 * 60;\\n      }\\n\\n      if (typeof this.options_.bandwidth !== 'number') {\\n        if (this.options_.useBandwidthFromLocalStorage) {\\n          var storedObject = getVhsLocalStorage();\\n\\n          if (storedObject && storedObject.bandwidth) {\\n            this.options_.bandwidth = storedObject.bandwidth;\\n            this.tech_.trigger({\\n              type: 'usage',\\n              name: 'hls-bandwidth-from-local-storage'\\n            });\\n          }\\n\\n          if (storedObject && storedObject.throughput) {\\n            this.options_.throughput = storedObject.throughput;\\n            this.tech_.trigger({\\n              type: 'usage',\\n              name: 'hls-throughput-from-local-storage'\\n            });\\n          }\\n        }\\n      } // if bandwidth was not set by options or pulled from local storage, start playlist\\n      // selection at a reasonable bandwidth\\n\\n\\n      if (typeof this.options_.bandwidth !== 'number') {\\n        this.options_.bandwidth = Config.INITIAL_BANDWIDTH;\\n      } // If the bandwidth number is unchanged from the initial setting\\n      // then this takes precedence over the enableLowInitialPlaylist option\\n\\n\\n      this.options_.enableLowInitialPlaylist = this.options_.enableLowInitialPlaylist && this.options_.bandwidth === Config.INITIAL_BANDWIDTH; // grab options passed to player.src\\n\\n      ['withCredentials', 'useDevicePixelRatio', 'limitRenditionByPlayerDimensions', 'bandwidth', 'smoothQualityChange', 'customTagParsers', 'customTagMappers', 'handleManifestRedirects', 'cacheEncryptionKeys'].forEach(function (option) {\\n        if (typeof _this2.source_[option] !== 'undefined') {\\n          _this2.options_[option] = _this2.source_[option];\\n        }\\n      });\\n      this.limitRenditionByPlayerDimensions = this.options_.limitRenditionByPlayerDimensions;\\n      this.useDevicePixelRatio = this.options_.useDevicePixelRatio;\\n    }\\n    /**\\n     * called when player.src gets called, handle a new source\\n     *\\n     * @param {Object} src the source object to handle\\n     */\\n\\n  }, {\\n    key: 'src',\\n    value: function src(_src, type) {\\n      var _this3 = this; // do nothing if the src is falsey\\n\\n\\n      if (!_src) {\\n        return;\\n      }\\n\\n      this.setOptions_(); // add master playlist controller options\\n\\n      this.options_.url = this.source_.src;\\n      this.options_.tech = this.tech_;\\n      this.options_.externHls = Hls$1;\\n      this.options_.sourceType = simpleTypeFromSourceType(type); // Whenever we seek internally, we should update the tech\\n\\n      this.options_.seekTo = function (time) {\\n        _this3.tech_.setCurrentTime(time);\\n      };\\n\\n      this.masterPlaylistController_ = new MasterPlaylistController(this.options_);\\n      this.playbackWatcher_ = new PlaybackWatcher(videojs$1.mergeOptions(this.options_, {\\n        seekable: function seekable$$1() {\\n          return _this3.seekable();\\n        },\\n        media: function media() {\\n          return _this3.masterPlaylistController_.media();\\n        }\\n      }));\\n      this.masterPlaylistController_.on('error', function () {\\n        var player = videojs$1.players[_this3.tech_.options_.playerId];\\n        player.error(_this3.masterPlaylistController_.error);\\n      }); // `this` in selectPlaylist should be the HlsHandler for backwards\\n      // compatibility with < v2\\n\\n      this.masterPlaylistController_.selectPlaylist = this.selectPlaylist ? this.selectPlaylist.bind(this) : Hls$1.STANDARD_PLAYLIST_SELECTOR.bind(this);\\n      this.masterPlaylistController_.selectInitialPlaylist = Hls$1.INITIAL_PLAYLIST_SELECTOR.bind(this); // re-expose some internal objects for backwards compatibility with < v2\\n\\n      this.playlists = this.masterPlaylistController_.masterPlaylistLoader_;\\n      this.mediaSource = this.masterPlaylistController_.mediaSource; // Proxy assignment of some properties to the master playlist\\n      // controller. Using a custom property for backwards compatibility\\n      // with < v2\\n\\n      Object.defineProperties(this, {\\n        selectPlaylist: {\\n          get: function get$$1() {\\n            return this.masterPlaylistController_.selectPlaylist;\\n          },\\n          set: function set$$1(selectPlaylist) {\\n            this.masterPlaylistController_.selectPlaylist = selectPlaylist.bind(this);\\n          }\\n        },\\n        throughput: {\\n          get: function get$$1() {\\n            return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate;\\n          },\\n          set: function set$$1(throughput) {\\n            this.masterPlaylistController_.mainSegmentLoader_.throughput.rate = throughput; // By setting `count` to 1 the throughput value becomes the starting value\\n            // for the cumulative average\\n\\n            this.masterPlaylistController_.mainSegmentLoader_.throughput.count = 1;\\n          }\\n        },\\n        bandwidth: {\\n          get: function get$$1() {\\n            return this.masterPlaylistController_.mainSegmentLoader_.bandwidth;\\n          },\\n          set: function set$$1(bandwidth) {\\n            this.masterPlaylistController_.mainSegmentLoader_.bandwidth = bandwidth; // setting the bandwidth manually resets the throughput counter\\n            // `count` is set to zero that current value of `rate` isn't included\\n            // in the cumulative average\\n\\n            this.masterPlaylistController_.mainSegmentLoader_.throughput = {\\n              rate: 0,\\n              count: 0\\n            };\\n          }\\n        },\\n\\n        /**\\n         * `systemBandwidth` is a combination of two serial processes bit-rates. The first\\n         * is the network bitrate provided by `bandwidth` and the second is the bitrate of\\n         * the entire process after that - decryption, transmuxing, and appending - provided\\n         * by `throughput`.\\n         *\\n         * Since the two process are serial, the overall system bandwidth is given by:\\n         *   sysBandwidth = 1 / (1 / bandwidth + 1 / throughput)\\n         */\\n        systemBandwidth: {\\n          get: function get$$1() {\\n            var invBandwidth = 1 / (this.bandwidth || 1);\\n            var invThroughput = void 0;\\n\\n            if (this.throughput > 0) {\\n              invThroughput = 1 / this.throughput;\\n            } else {\\n              invThroughput = 0;\\n            }\\n\\n            var systemBitrate = Math.floor(1 / (invBandwidth + invThroughput));\\n            return systemBitrate;\\n          },\\n          set: function set$$1() {\\n            videojs$1.log.error('The \\\"systemBandwidth\\\" property is read-only');\\n          }\\n        }\\n      });\\n\\n      if (this.options_.bandwidth) {\\n        this.bandwidth = this.options_.bandwidth;\\n      }\\n\\n      if (this.options_.throughput) {\\n        this.throughput = this.options_.throughput;\\n      }\\n\\n      Object.defineProperties(this.stats, {\\n        bandwidth: {\\n          get: function get$$1() {\\n            return _this3.bandwidth || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequests: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequests_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequestsAborted: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequestsAborted_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequestsTimedout: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequestsTimedout_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaRequestsErrored: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaRequestsErrored_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaTransferDuration: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaTransferDuration_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaBytesTransferred: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaBytesTransferred_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        mediaSecondsLoaded: {\\n          get: function get$$1() {\\n            return _this3.masterPlaylistController_.mediaSecondsLoaded_() || 0;\\n          },\\n          enumerable: true\\n        },\\n        buffered: {\\n          get: function get$$1() {\\n            return timeRangesToArray(_this3.tech_.buffered());\\n          },\\n          enumerable: true\\n        },\\n        currentTime: {\\n          get: function get$$1() {\\n            return _this3.tech_.currentTime();\\n          },\\n          enumerable: true\\n        },\\n        currentSource: {\\n          get: function get$$1() {\\n            return _this3.tech_.currentSource_;\\n          },\\n          enumerable: true\\n        },\\n        currentTech: {\\n          get: function get$$1() {\\n            return _this3.tech_.name_;\\n          },\\n          enumerable: true\\n        },\\n        duration: {\\n          get: function get$$1() {\\n            return _this3.tech_.duration();\\n          },\\n          enumerable: true\\n        },\\n        master: {\\n          get: function get$$1() {\\n            return _this3.playlists.master;\\n          },\\n          enumerable: true\\n        },\\n        playerDimensions: {\\n          get: function get$$1() {\\n            return _this3.tech_.currentDimensions();\\n          },\\n          enumerable: true\\n        },\\n        seekable: {\\n          get: function get$$1() {\\n            return timeRangesToArray(_this3.tech_.seekable());\\n          },\\n          enumerable: true\\n        },\\n        timestamp: {\\n          get: function get$$1() {\\n            return Date.now();\\n          },\\n          enumerable: true\\n        },\\n        videoPlaybackQuality: {\\n          get: function get$$1() {\\n            return _this3.tech_.getVideoPlaybackQuality();\\n          },\\n          enumerable: true\\n        }\\n      });\\n      this.tech_.one('canplay', this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));\\n      this.tech_.on('bandwidthupdate', function () {\\n        if (_this3.options_.useBandwidthFromLocalStorage) {\\n          updateVhsLocalStorage({\\n            bandwidth: _this3.bandwidth,\\n            throughput: Math.round(_this3.throughput)\\n          });\\n        }\\n      });\\n      this.masterPlaylistController_.on('selectedinitialmedia', function () {\\n        // Add the manual rendition mix-in to HlsHandler\\n        renditionSelectionMixin(_this3);\\n        setupEmeOptions(_this3);\\n      }); // the bandwidth of the primary segment loader is our best\\n      // estimate of overall bandwidth\\n\\n      this.on(this.masterPlaylistController_, 'progress', function () {\\n        this.tech_.trigger('progress');\\n      }); // In the live case, we need to ignore the very first `seeking` event since\\n      // that will be the result of the seek-to-live behavior\\n\\n      this.on(this.masterPlaylistController_, 'firstplay', function () {\\n        this.ignoreNextSeekingEvent_ = true;\\n      });\\n      this.setupQualityLevels_(); // do nothing if the tech has been disposed already\\n      // this can occur if someone sets the src in player.ready(), for instance\\n\\n      if (!this.tech_.el()) {\\n        return;\\n      }\\n\\n      this.tech_.src(videojs$1.URL.createObjectURL(this.masterPlaylistController_.mediaSource));\\n    }\\n    /**\\n     * Initializes the quality levels and sets listeners to update them.\\n     *\\n     * @method setupQualityLevels_\\n     * @private\\n     */\\n\\n  }, {\\n    key: 'setupQualityLevels_',\\n    value: function setupQualityLevels_() {\\n      var _this4 = this;\\n\\n      var player = videojs$1.players[this.tech_.options_.playerId]; // if there isn't a player or there isn't a qualityLevels plugin\\n      // or qualityLevels_ listeners have already been setup, do nothing.\\n\\n      if (!player || !player.qualityLevels || this.qualityLevels_) {\\n        return;\\n      }\\n\\n      this.qualityLevels_ = player.qualityLevels();\\n      this.masterPlaylistController_.on('selectedinitialmedia', function () {\\n        handleHlsLoadedMetadata(_this4.qualityLevels_, _this4);\\n      });\\n      this.playlists.on('mediachange', function () {\\n        handleHlsMediaChange(_this4.qualityLevels_, _this4.playlists);\\n      });\\n    }\\n    /**\\n     * Begin playing the video.\\n     */\\n\\n  }, {\\n    key: 'play',\\n    value: function play() {\\n      this.masterPlaylistController_.play();\\n    }\\n    /**\\n     * a wrapper around the function in MasterPlaylistController\\n     */\\n\\n  }, {\\n    key: 'setCurrentTime',\\n    value: function setCurrentTime(currentTime) {\\n      this.masterPlaylistController_.setCurrentTime(currentTime);\\n    }\\n    /**\\n     * a wrapper around the function in MasterPlaylistController\\n     */\\n\\n  }, {\\n    key: 'duration',\\n    value: function duration$$1() {\\n      return this.masterPlaylistController_.duration();\\n    }\\n    /**\\n     * a wrapper around the function in MasterPlaylistController\\n     */\\n\\n  }, {\\n    key: 'seekable',\\n    value: function seekable$$1() {\\n      return this.masterPlaylistController_.seekable();\\n    }\\n    /**\\n     * Abort all outstanding work and cleanup.\\n     */\\n\\n  }, {\\n    key: 'dispose',\\n    value: function dispose() {\\n      if (this.playbackWatcher_) {\\n        this.playbackWatcher_.dispose();\\n      }\\n\\n      if (this.masterPlaylistController_) {\\n        this.masterPlaylistController_.dispose();\\n      }\\n\\n      if (this.qualityLevels_) {\\n        this.qualityLevels_.dispose();\\n      }\\n\\n      if (this.player_) {\\n        delete this.player_.vhs;\\n        delete this.player_.dash;\\n        delete this.player_.hls;\\n      }\\n\\n      if (this.tech_ && this.tech_.hls) {\\n        delete this.tech_.hls;\\n      }\\n\\n      get$1(HlsHandler.prototype.__proto__ || Object.getPrototypeOf(HlsHandler.prototype), 'dispose', this).call(this);\\n    }\\n  }, {\\n    key: 'convertToProgramTime',\\n    value: function convertToProgramTime(time, callback) {\\n      return getProgramTime({\\n        playlist: this.masterPlaylistController_.media(),\\n        time: time,\\n        callback: callback\\n      });\\n    } // the player must be playing before calling this\\n\\n  }, {\\n    key: 'seekToProgramTime',\\n    value: function seekToProgramTime$$1(programTime, callback) {\\n      var pauseAfterSeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\\n      var retryCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;\\n      return seekToProgramTime({\\n        programTime: programTime,\\n        playlist: this.masterPlaylistController_.media(),\\n        retryCount: retryCount,\\n        pauseAfterSeek: pauseAfterSeek,\\n        seekTo: this.options_.seekTo,\\n        tech: this.options_.tech,\\n        callback: callback\\n      });\\n    }\\n  }]);\\n  return HlsHandler;\\n}(Component$1);\\n/**\\n * The Source Handler object, which informs video.js what additional\\n * MIME types are supported and sets up playback. It is registered\\n * automatically to the appropriate tech based on the capabilities of\\n * the browser it is running in. It is not necessary to use or modify\\n * this object in normal usage.\\n */\\n\\n\\nvar HlsSourceHandler = {\\n  name: 'videojs-http-streaming',\\n  VERSION: version$1,\\n  canHandleSource: function canHandleSource(srcObj) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n    var localOptions = videojs$1.mergeOptions(videojs$1.options, options);\\n    return HlsSourceHandler.canPlayType(srcObj.type, localOptions);\\n  },\\n  handleSource: function handleSource(source, tech) {\\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\\n    var localOptions = videojs$1.mergeOptions(videojs$1.options, options);\\n    tech.hls = new HlsHandler(source, tech, localOptions);\\n    tech.hls.xhr = xhrFactory();\\n    tech.hls.src(source.src, source.type);\\n    return tech.hls;\\n  },\\n  canPlayType: function canPlayType(type) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    var _videojs$mergeOptions = videojs$1.mergeOptions(videojs$1.options, options),\\n        overrideNative = _videojs$mergeOptions.hls.overrideNative;\\n\\n    var supportedType = simpleTypeFromSourceType(type);\\n    var canUseMsePlayback = supportedType && (!Hls$1.supportsTypeNatively(supportedType) || overrideNative);\\n    return canUseMsePlayback ? 'maybe' : '';\\n  }\\n};\\n\\nif (typeof videojs$1.MediaSource === 'undefined' || typeof videojs$1.URL === 'undefined') {\\n  videojs$1.MediaSource = MediaSource;\\n  videojs$1.URL = URL$1;\\n} // register source handlers with the appropriate techs\\n\\n\\nif (MediaSource.supportsNativeMediaSources()) {\\n  videojs$1.getTech('Html5').registerSourceHandler(HlsSourceHandler, 0);\\n}\\n\\nvideojs$1.HlsHandler = HlsHandler;\\nvideojs$1.HlsSourceHandler = HlsSourceHandler;\\nvideojs$1.Hls = Hls$1;\\n\\nif (!videojs$1.use) {\\n  videojs$1.registerComponent('Hls', Hls$1);\\n}\\n\\nvideojs$1.options.hls = videojs$1.options.hls || {};\\n\\nif (videojs$1.registerPlugin) {\\n  videojs$1.registerPlugin('reloadSourceOnError', reloadSourceOnError);\\n} else {\\n  videojs$1.plugin('reloadSourceOnError', reloadSourceOnError);\\n}\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (videojs$1);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/dist/video.es.js?\")},\"../node_modules/video.js/dist/video.es.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./video.es.js */ \"../node_modules/video.js/dist/video.es.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/dist/video.es.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js\":function(module,exports){eval(\"function _assertThisInitialized(self) {\\n  if (self === void 0) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return self;\\n}\\n\\nmodule.exports = _assertThisInitialized;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js?\")},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./assertThisInitialized.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js\":function(module,exports,__webpack_require__){eval('var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed\");\\n\\nvar isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed\");\\n\\nfunction _construct(Parent, args, Class) {\\n  if (isNativeReflectConstruct()) {\\n    module.exports = _construct = Reflect.construct;\\n  } else {\\n    module.exports = _construct = function _construct(Parent, args, Class) {\\n      var a = [null];\\n      a.push.apply(a, args);\\n      var Constructor = Function.bind.apply(Parent, a);\\n      var instance = new Constructor();\\n      if (Class) setPrototypeOf(instance, Class.prototype);\\n      return instance;\\n    };\\n  }\\n\\n  return _construct.apply(null, arguments);\\n}\\n\\nmodule.exports = _construct;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./construct.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/construct.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js\":function(module,exports){eval(\"function _extends() {\\n  module.exports = _extends = Object.assign || function (target) {\\n    for (var i = 1; i < arguments.length; i++) {\\n      var source = arguments[i];\\n\\n      for (var key in source) {\\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\\n          target[key] = source[key];\\n        }\\n      }\\n    }\\n\\n    return target;\\n  };\\n\\n  return _extends.apply(this, arguments);\\n}\\n\\nmodule.exports = _extends;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js?\")},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./extends.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/extends.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js\":function(module,exports){eval(\"function _getPrototypeOf(o) {\\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\\n    return o.__proto__ || Object.getPrototypeOf(o);\\n  };\\n  return _getPrototypeOf(o);\\n}\\n\\nmodule.exports = _getPrototypeOf;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js?\")},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./getPrototypeOf.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/getPrototypeOf.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js\":function(module,exports,__webpack_require__){eval('var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed\");\\n\\nfunction _inherits(subClass, superClass) {\\n  if (typeof superClass !== \"function\" && superClass !== null) {\\n    throw new TypeError(\"Super expression must either be null or a function\");\\n  }\\n\\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\\n    constructor: {\\n      value: subClass,\\n      writable: true,\\n      configurable: true\\n    }\\n  });\\n  if (superClass) setPrototypeOf(subClass, superClass);\\n}\\n\\nmodule.exports = _inherits;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./inherits.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inherits.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js\":function(module,exports){eval(\"function _inheritsLoose(subClass, superClass) {\\n  subClass.prototype = Object.create(superClass.prototype);\\n  subClass.prototype.constructor = subClass;\\n  subClass.__proto__ = superClass;\\n}\\n\\nmodule.exports = _inheritsLoose;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js?\")},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./inheritsLoose.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/inheritsLoose.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\":function(module,exports){eval('function _isNativeReflectConstruct() {\\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\\n  if (Reflect.construct.sham) return false;\\n  if (typeof Proxy === \"function\") return true;\\n\\n  try {\\n    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\\n    return true;\\n  } catch (e) {\\n    return false;\\n  }\\n}\\n\\nmodule.exports = _isNativeReflectConstruct;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./isNativeReflectConstruct.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\":function(module,exports,__webpack_require__){eval('var _typeof = __webpack_require__(/*! ../helpers/typeof */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed\");\\n\\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/assertThisInitialized.js-exposed\");\\n\\nfunction _possibleConstructorReturn(self, call) {\\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\\n    return call;\\n  }\\n\\n  return assertThisInitialized(self);\\n}\\n\\nmodule.exports = _possibleConstructorReturn;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./possibleConstructorReturn.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js\":function(module,exports){eval(\"function _setPrototypeOf(o, p) {\\n  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\\n    o.__proto__ = p;\\n    return o;\\n  };\\n\\n  return _setPrototypeOf(o, p);\\n}\\n\\nmodule.exports = _setPrototypeOf;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js?\")},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./setPrototypeOf.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/setPrototypeOf.js-exposed?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js\":function(module,exports){eval('function _typeof(obj) {\\n  \"@babel/helpers - typeof\";\\n\\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\\n    module.exports = _typeof = function _typeof(obj) {\\n      return typeof obj;\\n    };\\n  } else {\\n    module.exports = _typeof = function _typeof(obj) {\\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\\n    };\\n  }\\n\\n  return _typeof(obj);\\n}\\n\\nmodule.exports = _typeof;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js?')},\"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./typeof.js */ \"../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/@babel/runtime/helpers/typeof.js-exposed?')},\"../node_modules/video.js/node_modules/global/document.js\":function(module,exports,__webpack_require__){eval(\"/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global :\\n    typeof window !== 'undefined' ? window : {}\\nvar minDoc = __webpack_require__(/*! min-document */ 0);\\n\\nvar doccy;\\n\\nif (typeof document !== 'undefined') {\\n    doccy = document;\\n} else {\\n    doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\\n\\n    if (!doccy) {\\n        doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\\n    }\\n}\\n\\nmodule.exports = doccy;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \\\"../node_modules/webpack/buildin/global.js\\\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/document.js?\")},\"../node_modules/video.js/node_modules/global/document.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./document.js */ \"../node_modules/video.js/node_modules/global/document.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/document.js-exposed?')},\"../node_modules/video.js/node_modules/global/window.js\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {var win;\\n\\nif (typeof window !== \"undefined\") {\\n    win = window;\\n} else if (typeof global !== \"undefined\") {\\n    win = global;\\n} else if (typeof self !== \"undefined\"){\\n    win = self;\\n} else {\\n    win = {};\\n}\\n\\nmodule.exports = win;\\n\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/window.js?')},\"../node_modules/video.js/node_modules/global/window.js-exposed\":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"videojs\"] = __webpack_require__(/*! -!./window.js */ \"../node_modules/video.js/node_modules/global/window.js\");\\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/video.js/node_modules/global/window.js-exposed?')},\"../node_modules/videojs-contextmenu/es5/plugin.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"/**\\n * @module plugin\\n */\\n\\n\\nObject.defineProperty(exports, '__esModule', {\\n  value: true\\n});\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\\n\\nvar _videoJs = __webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\");\\n\\nvar _videoJs2 = _interopRequireDefault(_videoJs);\\n\\n// vjs 5/6 cross compatibility.\\nvar registerPlugin = _videoJs2['default'].registerPlugin || _videoJs2['default'].plugin;\\n\\n/* eslint func-style: 0 */\\n\\nvar defaults = {\\n  cancel: true,\\n  sensitivity: 10,\\n  wait: 500,\\n  disabled: false\\n};\\n\\nvar EVENT_NAME = 'vjs-contextmenu';\\n\\n/**\\n * Abstracts a DOM standard event into a vjs-contextmenu event.\\n *\\n * @private\\n * @param  {Player} player\\n * @param  {Event} event\\n *         A triggering, native event.\\n * @return {Player}\\n */\\nfunction sendAbstractedEvent(player, event) {\\n  if (player.contextmenu.options.disabled) {\\n    // videojs-contextmenu is disabled\\n    return player;\\n  }\\n  var abstracted = {\\n    target: player,\\n    type: EVENT_NAME\\n  };\\n\\n  ['clientX', 'clientY', 'pageX', 'pageY', 'screenX', 'screenY'].forEach(function (k) {\\n    abstracted[k] = event[k];\\n  });\\n\\n  return player.trigger(abstracted);\\n}\\n\\n/**\\n * Handles both touchcancel and touchend events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleTouchEnd(e) {\\n  var current = this.contextmenu.current;\\n\\n  if (!current) {\\n    return;\\n  }\\n\\n  var wait = this.contextmenu.options.wait;\\n\\n  if (e.type === 'touchend' && Number(new Date()) - current.time >= wait) {\\n    sendAbstractedEvent(this, e);\\n  }\\n\\n  this.contextmenu.current = null;\\n}\\n\\n/**\\n * Handles touchmove events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleTouchMove(e) {\\n  var current = this.contextmenu.current;\\n\\n  if (!current) {\\n    return;\\n  }\\n\\n  var touch = e.touches[0];\\n  var sensitivity = this.contextmenu.options.sensitivity;\\n\\n  // Cancel the current touch if the pointer has moved in either direction\\n  // more than the sensitivity number of pixels.\\n  if (touch.screenX - current.screenX > sensitivity || touch.screenY - current.screenY > sensitivity) {\\n    this.contextmenu.current = null;\\n  }\\n}\\n\\n/**\\n * Handles touchstart events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleTouchStart(e) {\\n\\n  // We only care about the first touch point.\\n  if (this.contextmenu.current) {\\n    return;\\n  }\\n\\n  var touch = e.touches[0];\\n\\n  this.contextmenu.current = {\\n    screenX: touch.screenX,\\n    screenY: touch.screenY,\\n    time: Number(new Date())\\n  };\\n}\\n\\n/**\\n * Handles contextmenu events.\\n *\\n * @private\\n * @param  {Event} e\\n */\\nfunction handleContextMenu(e) {\\n  if (this.contextmenu.options.cancel && !this.contextmenu.options.disabled) {\\n    e.preventDefault();\\n  }\\n\\n  sendAbstractedEvent(this, e);\\n\\n  // If we get a \\\"contextmenu\\\" event, we can rely on that going forward\\n  // because this client supports it; so, we can stop listening for\\n  // touch events.\\n  this.off(['touchcancel', 'touchend'], handleTouchEnd);\\n  this.off('touchmove', handleTouchMove);\\n  this.off('touchstart', handleTouchStart);\\n}\\n\\n/**\\n * A cross-device context menu implementation for video.js players.\\n *\\n * @param    {Object}  [options={}]\\n * @param    {Boolean} [cancel=true]\\n *           Whether or not to cancel the native \\\"contextmenu\\\" event when\\n *           it is seen.\\n *\\n * @param    {Number} [sensitivity=10]\\n *           The maximum number of pixels a finger can move because a touch\\n *           is no longer considered to be \\\"held\\\".\\n *\\n * @param    {Number} [wait=500]\\n *           The minimum number of milliseconds a touch must be \\\"held\\\" before\\n *           it registers.\\n */\\nfunction contextmenu(options) {\\n  var _this = this;\\n\\n  this.contextmenu.options = _videoJs2['default'].mergeOptions(defaults, options);\\n  this.contextmenu.VERSION = '__VERSION__';\\n\\n  this.on('contextmenu', handleContextMenu);\\n  this.on(['touchcancel', 'touchend'], handleTouchEnd);\\n  this.on('touchmove', handleTouchMove);\\n  this.on('touchstart', handleTouchStart);\\n\\n  this.ready(function () {\\n    return _this.addClass(EVENT_NAME);\\n  });\\n}\\n\\nregisterPlugin('contextmenu', contextmenu);\\ncontextmenu.VERSION = '__VERSION__';\\n\\nexports['default'] = contextmenu;\\nmodule.exports = exports['default'];\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-contextmenu/es5/plugin.js?\")},\"../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js\":function(module,exports,__webpack_require__){eval('/*! @name videojs-contrib-ads @version 6.6.5 @license Apache-2.0 */\\n!function(e,t){ true?module.exports=t(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"),__webpack_require__(/*! global/window */ \"../node_modules/global/window.js\"),__webpack_require__(/*! global/document */ \"../node_modules/global/document.js\")):undefined}(this,function(e,t,n){\"use strict\";e=e&&e.hasOwnProperty(\"default\")?e.default:e,t=t&&t.hasOwnProperty(\"default\")?t.default:t,n=n&&n.hasOwnProperty(\"default\")?n.default:n;var a=\"6.6.5\";var o=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},r=function(e,t,n){o(0,n),e.trigger({type:t+n.type,originalEvent:n})},i=function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&r(e,\"content\",t):r(e,\"ad\",t))},s=function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(o(0,t),e.trigger(\"resumeended\")):r(e,\"ad\",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(r(e,\"content\",t),e.trigger(\"readyforpostroll\"))},d=function(e,t){if(!(\"loadstart\"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||\"loadeddata\"===t.type&&!e.ads._hasThereBeenALoadedData||\"loadedmetadata\"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())r(e,\"ad\",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;r(e,\"content\",t)}},l=function(e,t){e.ads.inAdBreak()?r(e,\"ad\",t):e.ads.isContentResuming()&&r(e,\"content\",t)};function u(e){\"playing\"===e.type?i(this,e):\"ended\"===e.type?s(this,e):\"loadstart\"===e.type||\"loadeddata\"===e.type||\"loadedmetadata\"===e.type?d(this,e):\"play\"===e.type?l(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?r(this,\"content\",e):r(this,\"ad\",e))}var c=function(e,t){return t?encodeURIComponent(e):e},h=function(e,t,n){if(e&&e[n])for(var a=e[n],o=Object.keys(a),r=0;r<o.length;r++){t[\"{mediainfo.\"+n+\".\"+o[r]+\"}\"]=a[o[r]]}};var f={processMetadataTracks:function(e,t){for(var n=e.textTracks(),a=function(n){\"metadata\"===n.kind&&(e.ads.cueTextTracks.setMetadataTrackMode(n),t(e,n))},o=0;o<n.length;o++)a(n[o]);n.addEventListener(\"addtrack\",function(e){a(e.track)})},setMetadataTrackMode:function(e){},getSupportedAdCue:function(e,t){return t},isSupportedAdCue:function(e,t){return!0},getCueId:function(e,t){return t.id}},p=function(e,t){return void 0!==t&&e.ads.includedCues[t]},g=function(e,t){void 0!==t&&\"\"!==t&&(e.ads.includedCues[t]=!0)};function v(){!1!==this.ads._shouldBlockPlay&&(this.paused()||(this.ads.debug(\"Playback was canceled by cancelContentPlay\"),this.pause()),this.ads._cancelledPlay=!0)}f.processAdTrack=function(t,n,a,o){t.ads.includedCues={};for(var r=0;r<n.length;r++){var i=n[r],s=this.getSupportedAdCue(t,i);if(!this.isSupportedAdCue(t,i))return void e.log.warn(\"Skipping as this is not a supported ad cue.\",i);var d=this.getCueId(t,i),l=i.startTime;if(p(t,d))return void e.log(\"Skipping ad already seen with ID \"+d);o&&o(t,s,d,l),a(t,s,d,l),g(t,d)}};var y={},m=e;y.isMiddlewareMediatorSupported=function(){return!m.browser.IS_IOS&&!m.browser.IS_ANDROID&&!!(m.use&&m.middleware&&m.middleware.TERMINATOR)},y.playMiddleware=function(t){return{setSource:function(e,t){t(null,e)},callPlay:function(){if(t.ads&&!0===t.ads._shouldBlockPlay)return t.ads.debug(\"Using playMiddleware to block content playback\"),t.ads._playBlocked=!0,m.middleware.TERMINATOR},play:function(n,a){t.ads&&t.ads._playBlocked&&n?(t.ads.debug(\"Play call to Tech was terminated.\"),t.trigger(\"play\"),t.addClass(\"vjs-has-started\"),t.ads._playBlocked=!1):a&&a.catch&&a.catch(function(n){\"NotAllowedError\"!==n.name||e.browser.IS_SAFARI||t.trigger(\"pause\")})}}},y.testHook=function(e){m=e};var A=y.playMiddleware,S=y.isMiddlewareMediatorSupported,_=function(){if(e.getPlugin)return Boolean(e.getPlugin(\"ads\"));var t=e.getComponent(\"Player\");return Boolean(t&&t.prototype.ads)};var P=function(){function e(){}return e.getState=function(t){if(t)return e.states_&&e.states_[t]?e.states_[t]:void 0},e.registerState=function(t,n){if(\"string\"!=typeof t||!t)throw new Error(\\'Illegal state name, \"\\'+t+\\'\"; must be a non-empty string.\\');return e.states_||(e.states_={}),e.states_[t]=n,n},e}(),b=function(){function t(e){this.player=e}t._getName=function(){return\"Anonymous State\"};var n=t.prototype;return n.transitionTo=function(e){var t=this.player;this.cleanup(t);var n=new e(t);t.ads._state=n,t.ads.debug(this.constructor._getName()+\" -> \"+n.constructor._getName());for(var a=arguments.length,o=new Array(a>1?a-1:0),r=1;r<a;r++)o[r-1]=arguments[r];n.init.apply(n,[t].concat(o))},n.init=function(){},n.cleanup=function(){},n.onPlay=function(){},n.onPlaying=function(){},n.onEnded=function(){},n.onAdEnded=function(){},n.onAdsReady=function(){e.log.warn(\"Unexpected adsready event\")},n.onAdsError=function(){},n.onAdsCanceled=function(){},n.onAdTimeout=function(){},n.onAdStarted=function(){},n.onContentChanged=function(){},n.onContentResumed=function(){},n.onReadyForPostroll=function(){e.log.warn(\"Unexpected readyforpostroll event\")},n.onNoPreroll=function(){},n.onNoPostroll=function(){},n.startLinearAdMode=function(){e.log.warn(\"Unexpected startLinearAdMode invocation (State via \"+this.constructor._getName()+\")\")},n.endLinearAdMode=function(){e.log.warn(\"Unexpected endLinearAdMode invocation (State via \"+this.constructor._getName()+\")\")},n.skipLinearAdMode=function(){e.log.warn(\"Unexpected skipLinearAdMode invocation (State via \"+this.constructor._getName()+\")\")},n.isAdState=function(){throw new Error(\"isAdState unimplemented for \"+this.constructor._getName())},n.isWaitingForAdBreak=function(){return!1},n.isContentResuming=function(){return!1},n.inAdBreak=function(){return!1},n.handleEvent=function(e){var t=this.player;\"play\"===e?this.onPlay(t):\"adsready\"===e?this.onAdsReady(t):\"adserror\"===e?this.onAdsError(t):\"adscanceled\"===e?this.onAdsCanceled(t):\"adtimeout\"===e?this.onAdTimeout(t):\"ads-ad-started\"===e?this.onAdStarted(t):\"contentchanged\"===e?this.onContentChanged(t):\"contentresumed\"===e?this.onContentResumed(t):\"readyforpostroll\"===e?this.onReadyForPostroll(t):\"playing\"===e?this.onPlaying(t):\"ended\"===e?this.onEnded(t):\"nopreroll\"===e?this.onNoPreroll(t):\"nopostroll\"===e?this.onNoPostroll(t):\"adended\"===e&&this.onAdEnded(t)},t}();function k(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}P.registerState(\"State\",b);var C=function(e){function t(t){var n;return(n=e.call(this,t)||this).contentResuming=!1,n.waitingForAdBreak=!1,n}k(t,e);var n=t.prototype;return n.isAdState=function(){return!0},n.onPlaying=function(){var e=P.getState(\"ContentPlayback\");this.contentResuming&&this.transitionTo(e)},n.onContentResumed=function(){var e=P.getState(\"ContentPlayback\");this.contentResuming&&this.transitionTo(e)},n.isWaitingForAdBreak=function(){return this.waitingForAdBreak},n.isContentResuming=function(){return this.contentResuming},n.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode},t}(b);P.registerState(\"AdState\",C);var T=function(e){function t(){return e.apply(this,arguments)||this}k(t,e);var n=t.prototype;return n.isAdState=function(){return!1},n.onContentChanged=function(e){var t=P.getState(\"BeforePreroll\"),n=P.getState(\"Preroll\");e.ads.debug(\"Received contentchanged event (ContentState)\"),e.paused()?this.transitionTo(t):(this.transitionTo(n,!1),e.pause(),e.ads._pausedOnContentupdate=!0)},t}(b);P.registerState(\"ContentState\",T);var w,R=function(t){function n(){return t.apply(this,arguments)||this}k(n,t),n._getName=function(){return\"AdsDone\"};var a=n.prototype;return a.init=function(e){e.ads._contentHasEnded=!0,e.trigger(\"ended\")},a.startLinearAdMode=function(){e.log.warn(\"Unexpected startLinearAdMode invocation (AdsDone)\")},n}(P.getState(\"ContentState\"));P.registerState(\"AdsDone\",R);var B={start:function(t){t.ads.debug(\"Starting ad break\"),t.ads._inLinearAdMode=!0,t.trigger(\"adstart\"),t.ads.shouldTakeSnapshots()&&(t.ads.snapshot=function(t){var n;n=e.browser.IS_IOS&&t.ads.isLive(t)&&t.seekable().length>0?t.currentTime()-t.seekable().end(0):t.currentTime();var a=t.$(\".vjs-tech\"),o=t.textTracks?t.textTracks():[],r=[],i={ended:t.ended(),currentSrc:t.currentSrc(),sources:t.currentSources(),src:t.tech_.src(),currentTime:n,type:t.currentType()};a&&(i.style=a.getAttribute(\"style\"));for(var s=0;s<o.length;s++){var d=o[s];r.push({track:d,mode:d.mode}),d.mode=\"disabled\"}return i.suppressedTracks=r,i}(t)),t.ads.shouldPlayContentBehindAd(t)&&(t.ads.preAdVolume_=t.volume(),t.volume(0)),t.addClass(\"vjs-ad-playing\"),t.hasClass(\"vjs-live\")&&t.removeClass(\"vjs-live\"),t.ads.removeNativePoster()},end:function(t,n){t.ads.debug(\"Ending ad break\"),void 0===n&&(n=function(){}),t.ads.adType=null,t.ads._inLinearAdMode=!1,t.trigger(\"adend\"),t.removeClass(\"vjs-ad-playing\"),t.ads.isLive(t)&&t.addClass(\"vjs-live\"),t.ads.shouldTakeSnapshots()?function(t,n){var a=t.ads.snapshot;if(void 0===n&&(n=function(){}),!0===t.ads.disableNextSnapshotRestore)return t.ads.disableNextSnapshotRestore=!1,delete t.ads.snapshot,void n();var o,r=t.$(\".vjs-tech\"),i=20,s=a.suppressedTracks,d=function(){for(var e=0;e<s.length;e++)(o=s[e]).track.mode=o.mode},l=function(){var n;if(e.browser.IS_IOS&&t.ads.isLive(t)){if(a.currentTime<0&&(n=t.seekable().length>0?t.seekable().end(0)+a.currentTime:t.currentTime(),t.currentTime(n)),t.paused()){var o=t.play();o&&o.catch&&o.catch(function(t){e.log.warn(\"Play promise rejected in IOS snapshot resume\",t)})}}else if(a.ended)t.currentTime(t.duration());else{t.currentTime(a.currentTime);var r=t.play();r&&r.catch&&r.catch(function(t){e.log.warn(\"Play promise rejected in snapshot resume\",t)})}t.ads.shouldRemoveAutoplay_&&(t.autoplay(!1),t.ads.shouldRemoveAutoplay_=!1)},u=function n(){if(t.off(\"contentcanplay\",n),w&&t.clearTimeout(w),(r=t.el().querySelector(\".vjs-tech\")).readyState>1)return l();if(void 0===r.seekable)return l();if(r.seekable.length>0)return l();if(i--)t.setTimeout(n,50);else try{l()}catch(t){e.log.warn(\"Failed to resume the content after an advertisement\",t)}};if(\"style\"in a&&r.setAttribute(\"style\",a.style||\"\"),t.ads.videoElementRecycled())t.one(\"resumeended\",function(){delete t.ads.snapshot,n()}),t.one(\"contentloadedmetadata\",d),e.browser.IS_IOS&&!t.autoplay()&&(t.autoplay(!0),t.ads.shouldRemoveAutoplay_=!0),t.src(a.sources),t.one(\"contentcanplay\",u),w=t.setTimeout(u,2e3);else{if(d(),!t.ended()){var c=t.play();c&&c.catch&&c.catch(function(t){e.log.warn(\"Play promise rejected in snapshot restore\",t)})}delete t.ads.snapshot,n()}}(t,n):(t.volume(t.ads.preAdVolume_),n())}},L=function(t){function n(){return t.apply(this,arguments)||this}k(n,t),n._getName=function(){return\"Preroll\"};var a=n.prototype;return a.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass(\"vjs-ad-loading\"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var a=e.ads.settings.timeout;\"number\"==typeof e.ads.settings.prerollTimeout&&(a=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout(function(){e.trigger(\"adtimeout\")},a),t?this.handleAdsReady():this.adsReady=!1},a.onAdsReady=function(t){t.ads.inAdBreak()?e.log.warn(\"Unexpected adsready event (Preroll)\"):(t.ads.debug(\"Received adsready event (Preroll)\"),this.handleAdsReady())},a.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},a.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug(\"Waiting for loadstart...\"),t.one(\"loadstart\",function(){t.ads.debug(\"Received loadstart event\"),e()}))},a.noPreroll=function(){var e=this;this.afterLoadStart(function(){e.player.ads.debug(\"Skipping prerolls due to nopreroll event (Preroll)\"),e.resumeAfterNoPreroll(e.player)})},a.readyForPreroll=function(){var e=this.player;this.afterLoadStart(function(){e.ads.debug(\"Triggered readyforpreroll event (Preroll)\"),e.trigger(\"readyforpreroll\")})},a.onAdsCanceled=function(e){var t=this;e.ads.debug(\"adscanceled (Preroll)\"),this.afterLoadStart(function(){t.resumeAfterNoPreroll(e)})},a.onAdsError=function(t){var n=this;e.log(\"adserror (Preroll)\"),this.inAdBreak()?t.ads.endLinearAdMode():this.afterLoadStart(function(){n.resumeAfterNoPreroll(t)})},a.startLinearAdMode=function(){var t=this.player;!this.adsReady||t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\"Unexpected startLinearAdMode invocation (Preroll)\"):(this.clearTimeout(t),t.ads.adType=\"preroll\",this.waitingForAdBreak=!1,B.start(t),t.ads._shouldBlockPlay=!1)},a.onAdStarted=function(e){e.removeClass(\"vjs-ad-loading\")},a.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass(\"vjs-ad-loading\"),e.addClass(\"vjs-ad-content-resuming\"),this.contentResuming=!0,B.end(e))},a.skipLinearAdMode=function(){var t=this,n=this.player;n.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\"Unexpected skipLinearAdMode invocation\"):this.afterLoadStart(function(){n.trigger(\"adskip\"),n.ads.debug(\"skipLinearAdMode (Preroll)\"),t.resumeAfterNoPreroll(n)})},a.onAdTimeout=function(e){var t=this;this.afterLoadStart(function(){e.ads.debug(\"adtimeout (Preroll)\"),t.resumeAfterNoPreroll(e)})},a.onNoPreroll=function(t){t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\"Unexpected nopreroll event (Preroll)\"):this.noPreroll()},a.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.paused()&&(e.ads._playRequested||e.ads._pausedOnContentupdate)){var t=e.play();t&&t.then&&t.then(null,function(e){})}},a.cleanup=function(t){t.ads._hasThereBeenALoadStartDuringPlayerLife||e.log.warn(\"Leaving Preroll state before loadstart event can cause issues.\"),this.cleanupPartial(t)},a.cleanupPartial=function(e){e.removeClass(\"vjs-ad-loading\"),e.removeClass(\"vjs-ad-content-resuming\"),this.clearTimeout(e)},a.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},n}(P.getState(\"AdState\"));P.registerState(\"Preroll\",L);var M=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\"BeforePreroll\"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!0},n.onAdsReady=function(e){e.ads.debug(\"Received adsready event (BeforePreroll)\"),this.adsReady=!0},n.onPlay=function(e){var t=P.getState(\"Preroll\");e.ads.debug(\"Received play event (BeforePreroll)\"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},n.onAdsCanceled=function(e){e.ads.debug(\"adscanceled (BeforePreroll)\"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug(\"adserror (BeforePreroll)\"),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug(\"Skipping prerolls due to nopreroll event (BeforePreroll)\"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger(\"adskip\"),e.ads.debug(\"skipLinearAdMode (BeforePreroll)\"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(P.getState(\"ContentState\"));P.registerState(\"BeforePreroll\",M);var j=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\"Midroll\"};var n=t.prototype;return n.init=function(e){e.ads.adType=\"midroll\",B.start(e),e.addClass(\"vjs-ad-loading\")},n.onAdStarted=function(e){e.removeClass(\"vjs-ad-loading\")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass(\"vjs-ad-content-resuming\"),e.removeClass(\"vjs-ad-loading\"),B.end(e))},n.onAdsError=function(e){this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass(\"vjs-ad-loading\"),e.removeClass(\"vjs-ad-content-resuming\")},t}(P.getState(\"AdState\"));P.registerState(\"Midroll\",j);var N=function(t){function n(){return t.apply(this,arguments)||this}k(n,t),n._getName=function(){return\"Postroll\"};var a=n.prototype;return a.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=P.getState(\"AdsDone\");this.transitionTo(t)}else{e.addClass(\"vjs-ad-loading\");var n=e.ads.settings.timeout;\"number\"==typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout(function(){e.trigger(\"adtimeout\")},n)}},a.startLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\"Unexpected startLinearAdMode invocation (Postroll)\"):(t.ads.adType=\"postroll\",t.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,B.start(t))},a.onAdStarted=function(e){e.removeClass(\"vjs-ad-loading\")},a.endLinearAdMode=function(){var e=this,t=this.player,n=P.getState(\"AdsDone\");this.inAdBreak()&&(t.removeClass(\"vjs-ad-loading\"),this.resumeContent(t),B.end(t,function(){e.transitionTo(n)}))},a.skipLinearAdMode=function(){var t=this.player;t.ads.inAdBreak()||this.isContentResuming()?e.log.warn(\"Unexpected skipLinearAdMode invocation\"):(t.ads.debug(\"Postroll abort (skipLinearAdMode)\"),t.trigger(\"adskip\"),this.abort(t))},a.onAdTimeout=function(e){e.ads.debug(\"Postroll abort (adtimeout)\"),this.abort(e)},a.onAdsError=function(e){e.ads.debug(\"Postroll abort (adserror)\"),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},a.onContentChanged=function(e){if(this.isContentResuming()){var t=P.getState(\"BeforePreroll\");this.transitionTo(t)}else if(!this.inAdBreak()){var n=P.getState(\"Preroll\");this.transitionTo(n)}},a.onNoPostroll=function(t){this.isContentResuming()||this.inAdBreak()?e.log.warn(\"Unexpected nopostroll event (Postroll)\"):this.abort(t)},a.resumeContent=function(e){this.contentResuming=!0,e.addClass(\"vjs-ad-content-resuming\")},a.abort=function(e){var t=P.getState(\"AdsDone\");this.resumeContent(e),e.removeClass(\"vjs-ad-loading\"),this.transitionTo(t)},a.cleanup=function(e){e.removeClass(\"vjs-ad-content-resuming\"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},n}(P.getState(\"AdState\"));P.registerState(\"Postroll\",N);var E=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\"ContentPlayback\"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug(\"Received adsready event (ContentPlayback)\"),e.ads.nopreroll_||(e.ads.debug(\"Triggered readyforpreroll event (ContentPlayback)\"),e.trigger(\"readyforpreroll\"))},n.onReadyForPostroll=function(e){var t=P.getState(\"Postroll\");e.ads.debug(\"Received readyforpostroll event\"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=P.getState(\"Midroll\");this.transitionTo(e)},t}(P.getState(\"ContentState\"));P.registerState(\"ContentPlayback\",E);var I=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\"StitchedContentPlayback\"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1},n.onContentChanged=function(){this.player.ads.debug(\"Received contentchanged event (\"+this.constructor._getName()+\")\")},n.startLinearAdMode=function(){var e=P.getState(\"StitchedAdRoll\");this.transitionTo(e)},t}(P.getState(\"ContentState\"));P.registerState(\"StitchedContentPlayback\",I);var x=function(e){function t(){return e.apply(this,arguments)||this}k(t,e),t._getName=function(){return\"StitchedAdRoll\"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType=\"stitched\",B.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger(\"ended\")},n.endLinearAdMode=function(){var e=P.getState(\"StitchedContentPlayback\");B.end(this.player),this.transitionTo(e)},t}(P.getState(\"AdState\"));P.registerState(\"StitchedAdRoll\",x);var D=y.isMiddlewareMediatorSupported,O=e.getTech(\"Html5\").Events,F={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0},U=function(o){var r=this,i=e.mergeOptions(F,o),s=[];O.concat([\"firstplay\",\"loadedalldata\"]).forEach(function(e){-1===s.indexOf(e)&&s.push(e)}),r.on(s,u),D()||function(t,n){n&&e.log(\"Using cancelContentPlay to block content playback\"),t.on(\"play\",v)}(r,i.debug),r.setTimeout(function(){r.ads._hasThereBeenALoadStartDuringPlayerLife||\"\"===r.src()||e.log.error(\"videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html\")},5e3),r.on(\"ended\",function(){r.hasClass(\"vjs-has-started\")||r.addClass(\"vjs-has-started\")}),r.on(\"contenttimeupdate\",function(){r.removeClass(\"vjs-waiting\")}),r.on([\"addurationchange\",\"adcanplay\"],function(){if(!r.ads.settings.stitchedAds&&!r.hasStarted()&&(!r.ads.snapshot||r.currentSrc()!==r.ads.snapshot.currentSrc)&&r.ads.inAdBreak()){var t=r.play();t&&t.catch&&t.catch(function(t){e.log.warn(\"Play promise rejected when playing ad\",t)})}}),r.on(\"nopreroll\",function(){r.ads.debug(\"Received nopreroll event\"),r.ads.nopreroll_=!0}),r.on(\"nopostroll\",function(){r.ads.debug(\"Received nopostroll event\"),r.ads.nopostroll_=!0}),r.on(\"playing\",function(){r.ads._cancelledPlay=!1,r.ads._pausedOnContentupdate=!1}),r.on(\"play\",function(){r.ads._playRequested=!0}),r.one(\"loadstart\",function(){r.ads._hasThereBeenALoadStartDuringPlayerLife=!0}),r.on(\"loadeddata\",function(){r.ads._hasThereBeenALoadedData=!0}),r.on(\"loadedmetadata\",function(){r.ads._hasThereBeenALoadedMetaData=!0}),r.ads=function(t){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:a,reset:function(){t.ads.disableNextSnapshotRestore=!1,t.ads._contentEnding=!1,t.ads._contentHasEnded=!1,t.ads.snapshot=null,t.ads.adType=null,t.ads._hasThereBeenALoadedData=!1,t.ads._hasThereBeenALoadedMetaData=!1,t.ads._cancelledPlay=!1,t.ads._shouldBlockPlay=!1,t.ads._playBlocked=!1,t.ads.nopreroll_=!1,t.ads.nopostroll_=!1,t.ads._playRequested=!1},startLinearAdMode:function(){t.ads._state.startLinearAdMode()},endLinearAdMode:function(){t.ads._state.endLinearAdMode()},skipLinearAdMode:function(){t.ads._state.skipLinearAdMode()},stitchedAds:function(t){return void 0!==t&&(e.log.warn(\"Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads.\"),this.settings.stitchedAds=!!t),this.settings.stitchedAds},videoElementRecycled:function(){if(t.ads.shouldPlayContentBehindAd(t))return!1;if(!this.snapshot)throw new Error(\"You cannot use videoElementRecycled while there is no snapshot.\");var e=t.tech_.src()!==this.snapshot.src,n=t.currentSrc()!==this.snapshot.currentSrc;return e||n},isLive:function(n){return void 0===n&&(n=t),\"boolean\"==typeof n.ads.settings.contentIsLive?n.ads.settings.contentIsLive:n.duration()===1/0||\"8\"===e.browser.IOS_VERSION&&0===n.duration()},shouldPlayContentBehindAd:function(n){if(void 0===n&&(n=t),n)return!!n.ads.settings.liveCuePoints&&!e.browser.IS_IOS&&!e.browser.IS_ANDROID&&n.duration()===1/0;throw new Error(\"shouldPlayContentBehindAd requires a player as a param\")},shouldTakeSnapshots:function(e){return void 0===e&&(e=t),!this.shouldPlayContentBehindAd(e)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var e=t.$(\".vjs-tech\");e&&e.removeAttribute(\"poster\")},debug:function(){if(this.settings.debug){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];1===n.length&&\"string\"==typeof n[0]?e.log(\"ADS: \"+n[0]):e.log.apply(e,[\"ADS:\"].concat(n))}}}}(r),r.ads.settings=i,i.stitchedAds=!!i.stitchedAds,i.stitchedAds?r.ads._state=new(P.getState(\"StitchedContentPlayback\"))(r):r.ads._state=new(P.getState(\"BeforePreroll\"))(r),r.ads._state.init(r),r.ads.cueTextTracks=f,r.ads.adMacroReplacement=function(a,o,r){var i=this,s={};a=a.replace(/{([^}=]+)=([^}]+)}/g,function(e,t,n){return s[\"{\"+t+\"}\"]=n,\"{\"+t+\"}\"}),void 0===o&&(o=!1);var d={};for(var l in void 0!==r&&(d=r),d[\"{player.id}\"]=this.options_[\"data-player\"],d[\"{mediainfo.id}\"]=this.mediainfo?this.mediainfo.id:\"\",d[\"{mediainfo.name}\"]=this.mediainfo?this.mediainfo.name:\"\",d[\"{mediainfo.duration}\"]=this.mediainfo?this.mediainfo.duration:\"\",d[\"{player.duration}\"]=this.duration(),d[\"{timestamp}\"]=(new Date).getTime(),d[\"{document.referrer}\"]=n.referrer,d[\"{window.location.href}\"]=t.location.href,d[\"{random}\"]=Math.floor(1e12*Math.random()),[\"description\",\"tags\",\"reference_id\",\"ad_keys\"].forEach(function(e){i.mediainfo&&i.mediainfo[e]?d[\"{mediainfo.\"+e+\"}\"]=i.mediainfo[e]:s[\"{mediainfo.\"+e+\"}\"]?d[\"{mediainfo.\"+e+\"}\"]=s[\"{mediainfo.\"+e+\"}\"]:d[\"{mediainfo.\"+e+\"}\"]=\"\"}),h(this.mediainfo,d,\"custom_fields\"),h(this.mediainfo,d,\"customFields\"),d)a=a.split(l).join(c(d[l],o));for(var u in a=a.replace(/{pageVariable\\\\.([^}]+)}/g,function(n,a){for(var r,i=t,d=a.split(\".\"),l=0;l<d.length;l++)l===d.length-1?r=i[d[l]]:i=i[d[l]];var u=typeof r;return null===r?\"null\":void 0===r?s[\"{pageVariable.\"+a+\"}\"]?s[\"{pageVariable.\"+a+\"}\"]:(e.log.warn(\\'Page variable \"\\'+a+\\'\" not found\\'),\"\"):\"string\"!==u&&\"number\"!==u&&\"boolean\"!==u?(e.log.warn(\\'Page variable \"\\'+a+\\'\" is not a supported type\\'),\"\"):c(String(r),o)}),s)a=a.replace(u,s[u]);return a}.bind(r),function(e){e.ads.contentSrc=e.currentSrc(),e.ads._seenInitialLoadstart=!1,e.on(\"loadstart\",function(){if(!e.ads.inAdBreak()){var t=e.currentSrc();t!==e.ads.contentSrc&&(e.ads._seenInitialLoadstart&&e.trigger({type:\"contentchanged\"}),e.trigger({type:\"contentupdate\",oldValue:e.ads.contentSrc,newValue:t}),e.ads.contentSrc=t),e.ads._seenInitialLoadstart=!0}})}(r),r.on(\"contentchanged\",r.ads.reset);var d=function(){var t=r.textTracks();if(!r.ads.shouldPlayContentBehindAd(r)&&r.ads.inAdBreak()&&r.tech_.featuresNativeTextTracks&&e.browser.IS_IOS&&!Array.isArray(r.textTracks()))for(var n=0;n<t.length;n++){var a=t[n];\"showing\"===a.mode&&(a.mode=\"disabled\")}};r.ready(function(){r.textTracks().addEventListener(\"change\",d)}),r.on([\"play\",\"playing\",\"ended\",\"adsready\",\"adscanceled\",\"adskip\",\"adserror\",\"adtimeout\",\"adended\",\"ads-ad-started\",\"contentchanged\",\"dispose\",\"contentresumed\",\"readyforpostroll\",\"nopreroll\",\"nopostroll\"],function(e){r.ads._state.handleEvent(e.type)}),r.on(\"dispose\",function(){r.ads.reset(),r.textTracks().removeEventListener(\"change\",d)})};return U.VERSION=a,function(t){!_(e)&&((e.registerPlugin||e.plugin)(\"ads\",t),S()&&!e.usingContribAdsMiddleware_&&(e.use(\"*\",A),e.usingContribAdsMiddleware_=!0,e.log.debug(\"Play middleware has been registered with videojs\")))}(U),U});\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js?')},\"../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\");\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/document */ \\\"../node_modules/global/document.js\\\");\\n/* harmony import */ var global_document__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_document__WEBPACK_IMPORTED_MODULE_1__);\\n/*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */\\n\\n\\n\\nfunction _inheritsLoose(subClass, superClass) {\\n  subClass.prototype = Object.create(superClass.prototype);\\n  subClass.prototype.constructor = subClass;\\n  subClass.__proto__ = superClass;\\n}\\n\\nfunction _assertThisInitialized(self) {\\n  if (self === void 0) {\\n    throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\");\\n  }\\n\\n  return self;\\n}\\n\\n/**\\n * A single QualityLevel.\\n *\\n * interface QualityLevel {\\n *   readonly attribute DOMString id;\\n *            attribute DOMString label;\\n *   readonly attribute long width;\\n *   readonly attribute long height;\\n *   readonly attribute long bitrate;\\n *            attribute boolean enabled;\\n * };\\n *\\n * @class QualityLevel\\n */\\n\\nvar QualityLevel =\\n/**\\n * Creates a QualityLevel\\n *\\n * @param {Representation|Object} representation The representation of the quality level\\n * @param {string}   representation.id        Unique id of the QualityLevel\\n * @param {number=}  representation.width     Resolution width of the QualityLevel\\n * @param {number=}  representation.height    Resolution height of the QualityLevel\\n * @param {number}   representation.bandwidth Bitrate of the QualityLevel\\n * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\\n */\\nfunction QualityLevel(representation) {\\n  var level = this; // eslint-disable-line\\n\\n  if (video_js__WEBPACK_IMPORTED_MODULE_0___default.a.browser.IS_IE8) {\\n    level = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('custom');\\n\\n    for (var prop in QualityLevel.prototype) {\\n      if (prop !== 'constructor') {\\n        level[prop] = QualityLevel.prototype[prop];\\n      }\\n    }\\n  }\\n\\n  level.id = representation.id;\\n  level.label = level.id;\\n  level.width = representation.width;\\n  level.height = representation.height;\\n  level.bitrate = representation.bandwidth;\\n  level.enabled_ = representation.enabled;\\n  Object.defineProperty(level, 'enabled', {\\n    /**\\n     * Get whether the QualityLevel is enabled.\\n     *\\n     * @return {boolean} True if the QualityLevel is enabled.\\n     */\\n    get: function get() {\\n      return level.enabled_();\\n    },\\n\\n    /**\\n     * Enable or disable the QualityLevel.\\n     *\\n     * @param {boolean} enable true to enable QualityLevel, false to disable.\\n     */\\n    set: function set(enable) {\\n      level.enabled_(enable);\\n    }\\n  });\\n  return level;\\n};\\n\\n/**\\n * A list of QualityLevels.\\n *\\n * interface QualityLevelList : EventTarget {\\n *   getter QualityLevel (unsigned long index);\\n *   readonly attribute unsigned long length;\\n *   readonly attribute long selectedIndex;\\n *\\n *   void addQualityLevel(QualityLevel qualityLevel)\\n *   void removeQualityLevel(QualityLevel remove)\\n *   QualityLevel? getQualityLevelById(DOMString id);\\n *\\n *   attribute EventHandler onchange;\\n *   attribute EventHandler onaddqualitylevel;\\n *   attribute EventHandler onremovequalitylevel;\\n * };\\n *\\n * @extends videojs.EventTarget\\n * @class QualityLevelList\\n */\\n\\nvar QualityLevelList =\\n/*#__PURE__*/\\nfunction (_videojs$EventTarget) {\\n  _inheritsLoose(QualityLevelList, _videojs$EventTarget);\\n\\n  function QualityLevelList() {\\n    var _this;\\n\\n    _this = _videojs$EventTarget.call(this) || this;\\n\\n    var list = _assertThisInitialized(_assertThisInitialized(_this)); // eslint-disable-line\\n\\n\\n    if (video_js__WEBPACK_IMPORTED_MODULE_0___default.a.browser.IS_IE8) {\\n      list = global_document__WEBPACK_IMPORTED_MODULE_1___default.a.createElement('custom');\\n\\n      for (var prop in QualityLevelList.prototype) {\\n        if (prop !== 'constructor') {\\n          list[prop] = QualityLevelList.prototype[prop];\\n        }\\n      }\\n    }\\n\\n    list.levels_ = [];\\n    list.selectedIndex_ = -1;\\n    /**\\n     * Get the index of the currently selected QualityLevel.\\n     *\\n     * @returns {number} The index of the selected QualityLevel. -1 if none selected.\\n     * @readonly\\n     */\\n\\n    Object.defineProperty(list, 'selectedIndex', {\\n      get: function get() {\\n        return list.selectedIndex_;\\n      }\\n    });\\n    /**\\n     * Get the length of the list of QualityLevels.\\n     *\\n     * @returns {number} The length of the list.\\n     * @readonly\\n     */\\n\\n    Object.defineProperty(list, 'length', {\\n      get: function get() {\\n        return list.levels_.length;\\n      }\\n    });\\n    return list || _assertThisInitialized(_this);\\n  }\\n  /**\\n   * Adds a quality level to the list.\\n   *\\n   * @param {Representation|Object} representation The representation of the quality level\\n   * @param {string}   representation.id        Unique id of the QualityLevel\\n   * @param {number=}  representation.width     Resolution width of the QualityLevel\\n   * @param {number=}  representation.height    Resolution height of the QualityLevel\\n   * @param {number}   representation.bandwidth Bitrate of the QualityLevel\\n   * @param {Function} representation.enabled   Callback to enable/disable QualityLevel\\n   * @return {QualityLevel} the QualityLevel added to the list\\n   * @method addQualityLevel\\n   */\\n\\n\\n  var _proto = QualityLevelList.prototype;\\n\\n  _proto.addQualityLevel = function addQualityLevel(representation) {\\n    var qualityLevel = this.getQualityLevelById(representation.id); // Do not add duplicate quality levels\\n\\n    if (qualityLevel) {\\n      return qualityLevel;\\n    }\\n\\n    var index = this.levels_.length;\\n    qualityLevel = new QualityLevel(representation);\\n\\n    if (!('' + index in this)) {\\n      Object.defineProperty(this, index, {\\n        get: function get() {\\n          return this.levels_[index];\\n        }\\n      });\\n    }\\n\\n    this.levels_.push(qualityLevel);\\n    this.trigger({\\n      qualityLevel: qualityLevel,\\n      type: 'addqualitylevel'\\n    });\\n    return qualityLevel;\\n  };\\n  /**\\n   * Removes a quality level from the list.\\n   *\\n   * @param {QualityLevel} remove QualityLevel to remove to the list.\\n   * @return {QualityLevel|null} the QualityLevel removed or null if nothing removed\\n   * @method removeQualityLevel\\n   */\\n\\n\\n  _proto.removeQualityLevel = function removeQualityLevel(qualityLevel) {\\n    var removed = null;\\n\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      if (this[i] === qualityLevel) {\\n        removed = this.levels_.splice(i, 1)[0];\\n\\n        if (this.selectedIndex_ === i) {\\n          this.selectedIndex_ = -1;\\n        } else if (this.selectedIndex_ > i) {\\n          this.selectedIndex_--;\\n        }\\n\\n        break;\\n      }\\n    }\\n\\n    if (removed) {\\n      this.trigger({\\n        qualityLevel: qualityLevel,\\n        type: 'removequalitylevel'\\n      });\\n    }\\n\\n    return removed;\\n  };\\n  /**\\n   * Searches for a QualityLevel with the given id.\\n   *\\n   * @param {string} id The id of the QualityLevel to find.\\n   * @return {QualityLevel|null} The QualityLevel with id, or null if not found.\\n   * @method getQualityLevelById\\n   */\\n\\n\\n  _proto.getQualityLevelById = function getQualityLevelById(id) {\\n    for (var i = 0, l = this.length; i < l; i++) {\\n      var level = this[i];\\n\\n      if (level.id === id) {\\n        return level;\\n      }\\n    }\\n\\n    return null;\\n  };\\n  /**\\n   * Resets the list of QualityLevels to empty\\n   *\\n   * @method dispose\\n   */\\n\\n\\n  _proto.dispose = function dispose() {\\n    this.selectedIndex_ = -1;\\n    this.levels_.length = 0;\\n  };\\n\\n  return QualityLevelList;\\n}(video_js__WEBPACK_IMPORTED_MODULE_0___default.a.EventTarget);\\n/**\\n * change - The selected QualityLevel has changed.\\n * addqualitylevel - A QualityLevel has been added to the QualityLevelList.\\n * removequalitylevel - A QualityLevel has been removed from the QualityLevelList.\\n */\\n\\n\\nQualityLevelList.prototype.allowedEvents_ = {\\n  change: 'change',\\n  addqualitylevel: 'addqualitylevel',\\n  removequalitylevel: 'removequalitylevel'\\n}; // emulate attribute EventHandler support to allow for feature detection\\n\\nfor (var event in QualityLevelList.prototype.allowedEvents_) {\\n  QualityLevelList.prototype['on' + event] = null;\\n}\\n\\nvar version = \\\"2.0.9\\\";\\n\\nvar registerPlugin = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.registerPlugin || video_js__WEBPACK_IMPORTED_MODULE_0___default.a.plugin;\\n/**\\n * Initialization function for the qualityLevels plugin. Sets up the QualityLevelList and\\n * event handlers.\\n *\\n * @param {Player} player Player object.\\n * @param {Object} options Plugin options object.\\n * @function initPlugin\\n */\\n\\nvar initPlugin = function initPlugin(player, options) {\\n  var originalPluginFn = player.qualityLevels;\\n  var qualityLevelList = new QualityLevelList();\\n\\n  var disposeHandler = function disposeHandler() {\\n    qualityLevelList.dispose();\\n    player.qualityLevels = originalPluginFn;\\n    player.off('dispose', disposeHandler);\\n  };\\n\\n  player.on('dispose', disposeHandler);\\n\\n  player.qualityLevels = function () {\\n    return qualityLevelList;\\n  };\\n\\n  player.qualityLevels.VERSION = version;\\n  return qualityLevelList;\\n};\\n/**\\n * A video.js plugin.\\n *\\n * In the plugin function, the value of `this` is a video.js `Player`\\n * instance. You cannot rely on the player being in a \\\"ready\\\" state here,\\n * depending on how the plugin is invoked. This may or may not be important\\n * to you; if not, remove the wait for \\\"ready\\\"!\\n *\\n * @param {Object} options Plugin options object\\n * @function qualityLevels\\n */\\n\\n\\nvar qualityLevels = function qualityLevels(options) {\\n  return initPlugin(this, video_js__WEBPACK_IMPORTED_MODULE_0___default.a.mergeOptions({}, options));\\n}; // Register the plugin with video.js.\\n\\n\\nregisterPlugin('qualityLevels', qualityLevels); // Include the version number.\\n\\nqualityLevels.VERSION = version;\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (qualityLevels);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js?\")},\"../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js\":function(module,__webpack_exports__,__webpack_require__){\"use strict\";eval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\");\\n/* harmony import */ var video_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(video_js__WEBPACK_IMPORTED_MODULE_0__);\\n/*! @name videojs-per-source-behaviors @version 2.1.0 @license Apache-2.0 */\\n\\n\\nvar version = \\\"2.1.0\\\";\\n\\nvar Html5 = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.getTech('Html5'); // Video.js 5/6 cross-compatibility.\\n\\nvar registerPlugin = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.registerPlugin || video_js__WEBPACK_IMPORTED_MODULE_0___default.a.plugin;\\n/**\\n * For the most part, these are the events that occur early in the lifecycle\\n * of a source, but there is considerable variability across browsers and\\n * devices (not to mention properties like autoplay and preload). As such, we\\n * listen to a bunch of events for source changes.\\n *\\n * @type {Array}\\n */\\n\\nvar CHANGE_DETECT_EVENTS = ['abort', 'emptied', 'loadstart', 'play'];\\n/**\\n * These events will indicate that the source is \\\"unstable\\\" (i.e. it might be\\n * about to change).\\n *\\n * @type {Array}\\n */\\n\\nvar UNSTABLE_EVENTS = ['abort', 'emptied'];\\n/**\\n * These are the ad loading and playback states we care about from\\n * contrib-ads 5.\\n *\\n * @type {Array}\\n */\\n\\nvar AD_STATES = ['ad-playback', 'ads-ready?', 'postroll?', 'preroll?'];\\n/**\\n * Whether or not a string represents an \\\"ad state\\\".\\n *\\n * @param  {string} s\\n *         The string to check\\n *\\n * @return {boolean}\\n *         If the string is an ad state\\n */\\n\\nvar isAdState = function isAdState(s) {\\n  return AD_STATES.indexOf(s) > -1;\\n};\\n/**\\n * Determine whether or not a player is using contrib-ads 6+.\\n *\\n * @param  {Player} p\\n *         The player\\n *\\n * @return {boolean}\\n *         if the player is using contrib-ads 6+\\n */\\n\\n\\nvar usingAds6Plus = function usingAds6Plus(p) {\\n  return p.usingPlugin('ads') && typeof p.ads.inAdBreak === 'function';\\n};\\n/**\\n * Whether or not the player should ignore an event due to ad states.\\n *\\n * @param  {Player} p\\n *         The player\\n *\\n * @param  {Event} e\\n *         An event object\\n *\\n * @return {boolean}\\n *         If the player is in an ad state\\n */\\n\\n\\nvar ignoreEvent = function ignoreEvent(p, e) {\\n  // No ads, no ad states to ignore!\\n  if (!p.usingPlugin('ads')) {\\n    return false;\\n  } // In contrib-ads 6+ we only care about non-loadstart events because\\n  // loadstart events _may_ happen during ad mode.\\n\\n\\n  if (usingAds6Plus(p)) {\\n    return p.ads.isInAdMode() && e.type !== 'loadstart';\\n  } // contrib-ads 5+\\n\\n\\n  return isAdState(p.ads.state);\\n};\\n/**\\n * Applies per-source behaviors to a video.js Player object.\\n */\\n\\n\\nvar perSourceBehaviors = function perSourceBehaviors() {\\n  var _this2 = this;\\n\\n  var perSrcListeners = [];\\n  var cachedSrc;\\n  var _disabled = false;\\n  var srcChangeTimer;\\n  var srcStable = true;\\n  /**\\n   * Creates an event binder function of a given type.\\n   *\\n   * @param  {boolean} isOne\\n   *         Rather than delegating to the player's `one()` method, we want to\\n   *         retain full control over when the listener is unbound (particularly\\n   *         due to the ability for per-source behaviors to be toggled on and\\n   *         off at will).\\n   *\\n   * @return {Function}\\n   *         the per source binder function\\n   */\\n\\n  var createPerSrcBinder = function createPerSrcBinder(isOne) {\\n    return function (first, second) {\\n      var _this = this;\\n\\n      // Do not bind new listeners when per-source behaviors are disabled.\\n      if (this.perSourceBehaviors.disabled()) {\\n        return;\\n      }\\n\\n      var isTargetPlayer = arguments.length === 2;\\n      var originalSrc = this.currentSrc(); // This array is the set of arguments to use for `on()` and `off()` methods\\n      // of the player.\\n\\n      var args = [first]; // Make sure we bind here so that a GUID is set on the original listener\\n      // and that it is bound to the proper context.\\n\\n      var originalListener = video_js__WEBPACK_IMPORTED_MODULE_0___default.a.bind(isTargetPlayer ? this : first, arguments[arguments.length - 1]); // The wrapped listener `subargs` are the arguments passed to the original\\n      // listener (i.e. the Event object and an additional data hash).\\n\\n      var wrappedListener = function wrappedListener() {\\n        var changed = _this.currentSrc() !== originalSrc; // Do not evaluate listeners if per-source behaviors are disabled.\\n\\n        if (_this.perSourceBehaviors.disabled()) {\\n          return;\\n        }\\n\\n        if (changed || isOne) {\\n          _this.off.apply(_this, args);\\n        }\\n\\n        if (!changed) {\\n          originalListener.apply(void 0, arguments);\\n        }\\n      }; // Make sure the wrapped listener and the original listener share a GUID,\\n      // so that video.js properly removes event bindings when `off()` is passed\\n      // the original listener!\\n\\n\\n      wrappedListener.guid = originalListener.guid; // If we are targeting a different object from the player, we need to include\\n      // the second argument.\\n\\n      if (!isTargetPlayer) {\\n        args.push(second);\\n      }\\n\\n      args.push(wrappedListener);\\n      perSrcListeners.push(args);\\n      return this.on.apply(this, args);\\n    };\\n  };\\n\\n  this.perSourceBehaviors = {\\n    /**\\n     * Disable per-source behaviors on this player.\\n     *\\n     * @return {boolean}\\n     */\\n    disable: video_js__WEBPACK_IMPORTED_MODULE_0___default.a.bind(this, function disable() {\\n      this.clearTimeout(srcChangeTimer);\\n      srcChangeTimer = null;\\n      _disabled = true;\\n      return _disabled;\\n    }),\\n\\n    /**\\n     * Whether per-source behaviors are disabled on this player.\\n     *\\n     * @return {boolean}\\n     *         if the per-source behaviors are disabled\\n     */\\n    disabled: function disabled() {\\n      return _disabled;\\n    },\\n\\n    /**\\n     * Enable per-source behaviors on this player.\\n     *\\n     * @return {boolean}\\n     *         always returns true\\n     */\\n    enable: function enable() {\\n      _disabled = false;\\n      return _disabled;\\n    },\\n\\n    /**\\n     * Whether per-source behaviors are disabled on this player.\\n     *\\n     * @return {boolean}\\n     *         if the per-source behaviors are enabled\\n     */\\n    enabled: function enabled() {\\n      return !_disabled;\\n    },\\n\\n    /**\\n     * Whether or not the source is \\\"stable\\\". This will return `true` if the\\n     * plugin feels that we may be about to change sources.\\n     *\\n     * @return {boolean}\\n     *         Whether the source is stable or not\\n     */\\n    isSrcStable: function isSrcStable() {\\n      return srcStable;\\n    },\\n    VERSION: version\\n  };\\n  /**\\n   * Bind an event listener on a per-source basis.\\n   *\\n   * @function onPerSrc\\n   * @param  {String|Array|Component|Element} first\\n   *         The event type(s) or target Component or Element.\\n   *\\n   * @param  {Function|String|Array} second\\n   *         The event listener or event type(s) (when `first` is target).\\n   *\\n   * @param  {Function} third\\n   *         The event listener (when `second` is event type(s)).\\n   *\\n   * @return {Player}\\n   */\\n\\n  this.onPerSrc = createPerSrcBinder();\\n  /**\\n   * Bind an event listener on a per-source basis. This listener can only\\n   * be called once.\\n   *\\n   * @function onePerSrc\\n   * @param  {String|Array|Component|Element} first\\n   *         The event type(s) or target Component or Element.\\n   *\\n   * @param  {Function|String|Array} second\\n   *         The event listener or event type(s) (when `first` is target).\\n   *\\n   * @param  {Function} third\\n   *         The event listener (when `second` is event type(s)).\\n   *\\n   * @return {Player}\\n   */\\n\\n  this.onePerSrc = createPerSrcBinder(true); // Clear out perSrcListeners cache on player dispose.\\n\\n  this.on('dispose', function () {\\n    perSrcListeners.length = 0;\\n  });\\n  this.on(CHANGE_DETECT_EVENTS, function (e) {\\n    // Bail-out conditions.\\n    if (_this2.perSourceBehaviors.disabled() || srcChangeTimer || ignoreEvent(_this2, e)) {\\n      return;\\n    } // If we did not previously detect that we were in an unstable state and\\n    // this was an event that qualifies as unstable, do that now. In the future,\\n    // we may want to restrict the conditions under which this is triggered by\\n    // checking networkState and/or readyState for reasonable values such as\\n    // NETWORK_NO_SOURCE and HAVE_NOTHING.\\n\\n\\n    if (srcStable && UNSTABLE_EVENTS.indexOf(e.type) > -1) {\\n      srcStable = false;\\n\\n      _this2.trigger('sourceunstable');\\n    } // Track any and all interim events from this one until the next tick\\n    // when we evaluate the timer.\\n\\n\\n    var interimEvents = [];\\n\\n    var addInterimEvent = function addInterimEvent(f) {\\n      return interimEvents.push({\\n        time: Date.now(),\\n        event: f\\n      });\\n    };\\n\\n    addInterimEvent(e);\\n\\n    _this2.on(Html5.Events, addInterimEvent);\\n\\n    srcChangeTimer = _this2.setTimeout(function () {\\n      var currentSrc = _this2.currentSrc();\\n\\n      srcStable = true;\\n      srcChangeTimer = null;\\n\\n      _this2.off(Html5.Events, addInterimEvent);\\n\\n      if (currentSrc && currentSrc !== cachedSrc) {\\n        // Remove per-source listeners explicitly when we know the source has\\n        // changed before we trigger the \\\"sourcechanged\\\" listener.\\n        perSrcListeners.forEach(function (args) {\\n          return _this2.off.apply(_this2, args);\\n        });\\n        perSrcListeners.length = 0;\\n\\n        _this2.trigger('sourcechanged', {\\n          interimEvents: interimEvents,\\n          from: cachedSrc,\\n          to: currentSrc\\n        });\\n\\n        cachedSrc = currentSrc;\\n      }\\n    }, 1);\\n  });\\n};\\n\\nperSourceBehaviors.VERSION = version;\\nregisterPlugin('perSourceBehaviors', perSourceBehaviors);\\n\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (perSourceBehaviors);\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js?\")},\"../node_modules/videojs-vtt.js/lib/browser-index.js\":function(module,exports,__webpack_require__){eval('/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \"License\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \"AS IS\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n// Default exports for Node. Export the extended versions of VTTCue and\\n// VTTRegion in Node since we likely want the capability to convert back and\\n// forth between JSON. If we don\\'t then it\\'s not that big of a deal since we\\'re\\n// off browser.\\n\\nvar window = __webpack_require__(/*! global/window */ \"../node_modules/global/window.js\");\\n\\nvar vttjs = module.exports = {\\n  WebVTT: __webpack_require__(/*! ./vtt.js */ \"../node_modules/videojs-vtt.js/lib/vtt.js\"),\\n  VTTCue: __webpack_require__(/*! ./vttcue.js */ \"../node_modules/videojs-vtt.js/lib/vttcue.js\"),\\n  VTTRegion: __webpack_require__(/*! ./vttregion.js */ \"../node_modules/videojs-vtt.js/lib/vttregion.js\")\\n};\\n\\nwindow.vttjs = vttjs;\\nwindow.WebVTT = vttjs.WebVTT;\\n\\nvar cueShim = vttjs.VTTCue;\\nvar regionShim = vttjs.VTTRegion;\\nvar nativeVTTCue = window.VTTCue;\\nvar nativeVTTRegion = window.VTTRegion;\\n\\nvttjs.shim = function() {\\n  window.VTTCue = cueShim;\\n  window.VTTRegion = regionShim;\\n};\\n\\nvttjs.restore = function() {\\n  window.VTTCue = nativeVTTCue;\\n  window.VTTRegion = nativeVTTRegion;\\n};\\n\\nif (!window.VTTCue) {\\n  vttjs.shim();\\n}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/browser-index.js?')},\"../node_modules/videojs-vtt.js/lib/vtt.js\":function(module,exports,__webpack_require__){eval('/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \"License\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \"AS IS\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\\nvar document = __webpack_require__(/*! global/document */ \"../node_modules/global/document.js\");\\n\\nvar _objCreate = Object.create || (function() {\\n  function F() {}\\n  return function(o) {\\n    if (arguments.length !== 1) {\\n      throw new Error(\\'Object.create shim only accepts one parameter.\\');\\n    }\\n    F.prototype = o;\\n    return new F();\\n  };\\n})();\\n\\n// Creates a new ParserError object from an errorData object. The errorData\\n// object should have default code and message properties. The default message\\n// property can be overriden by passing in a message parameter.\\n// See ParsingError.Errors below for acceptable errors.\\nfunction ParsingError(errorData, message) {\\n  this.name = \"ParsingError\";\\n  this.code = errorData.code;\\n  this.message = message || errorData.message;\\n}\\nParsingError.prototype = _objCreate(Error.prototype);\\nParsingError.prototype.constructor = ParsingError;\\n\\n// ParsingError metadata for acceptable ParsingErrors.\\nParsingError.Errors = {\\n  BadSignature: {\\n    code: 0,\\n    message: \"Malformed WebVTT signature.\"\\n  },\\n  BadTimeStamp: {\\n    code: 1,\\n    message: \"Malformed time stamp.\"\\n  }\\n};\\n\\n// Try to parse input as a time stamp.\\nfunction parseTimeStamp(input) {\\n\\n  function computeSeconds(h, m, s, f) {\\n    return (h | 0) * 3600 + (m | 0) * 60 + (s | 0) + (f | 0) / 1000;\\n  }\\n\\n  var m = input.match(/^(\\\\d+):(\\\\d{1,2})(:\\\\d{1,2})?\\\\.(\\\\d{3})/);\\n  if (!m) {\\n    return null;\\n  }\\n\\n  if (m[3]) {\\n    // Timestamp takes the form of [hours]:[minutes]:[seconds].[milliseconds]\\n    return computeSeconds(m[1], m[2], m[3].replace(\":\", \"\"), m[4]);\\n  } else if (m[1] > 59) {\\n    // Timestamp takes the form of [hours]:[minutes].[milliseconds]\\n    // First position is hours as it\\'s over 59.\\n    return computeSeconds(m[1], m[2], 0,  m[4]);\\n  } else {\\n    // Timestamp takes the form of [minutes]:[seconds].[milliseconds]\\n    return computeSeconds(0, m[1], m[2], m[4]);\\n  }\\n}\\n\\n// A settings object holds key/value pairs and will ignore anything but the first\\n// assignment to a specific key.\\nfunction Settings() {\\n  this.values = _objCreate(null);\\n}\\n\\nSettings.prototype = {\\n  // Only accept the first assignment to any key.\\n  set: function(k, v) {\\n    if (!this.get(k) && v !== \"\") {\\n      this.values[k] = v;\\n    }\\n  },\\n  // Return the value for a key, or a default value.\\n  // If \\'defaultKey\\' is passed then \\'dflt\\' is assumed to be an object with\\n  // a number of possible default values as properties where \\'defaultKey\\' is\\n  // the key of the property that will be chosen; otherwise it\\'s assumed to be\\n  // a single value.\\n  get: function(k, dflt, defaultKey) {\\n    if (defaultKey) {\\n      return this.has(k) ? this.values[k] : dflt[defaultKey];\\n    }\\n    return this.has(k) ? this.values[k] : dflt;\\n  },\\n  // Check whether we have a value for a key.\\n  has: function(k) {\\n    return k in this.values;\\n  },\\n  // Accept a setting if its one of the given alternatives.\\n  alt: function(k, v, a) {\\n    for (var n = 0; n < a.length; ++n) {\\n      if (v === a[n]) {\\n        this.set(k, v);\\n        break;\\n      }\\n    }\\n  },\\n  // Accept a setting if its a valid (signed) integer.\\n  integer: function(k, v) {\\n    if (/^-?\\\\d+$/.test(v)) { // integer\\n      this.set(k, parseInt(v, 10));\\n    }\\n  },\\n  // Accept a setting if its a valid percentage.\\n  percent: function(k, v) {\\n    var m;\\n    if ((m = v.match(/^([\\\\d]{1,3})(\\\\.[\\\\d]*)?%$/))) {\\n      v = parseFloat(v);\\n      if (v >= 0 && v <= 100) {\\n        this.set(k, v);\\n        return true;\\n      }\\n    }\\n    return false;\\n  }\\n};\\n\\n// Helper function to parse input into groups separated by \\'groupDelim\\', and\\n// interprete each group as a key/value pair separated by \\'keyValueDelim\\'.\\nfunction parseOptions(input, callback, keyValueDelim, groupDelim) {\\n  var groups = groupDelim ? input.split(groupDelim) : [input];\\n  for (var i in groups) {\\n    if (typeof groups[i] !== \"string\") {\\n      continue;\\n    }\\n    var kv = groups[i].split(keyValueDelim);\\n    if (kv.length !== 2) {\\n      continue;\\n    }\\n    var k = kv[0];\\n    var v = kv[1];\\n    callback(k, v);\\n  }\\n}\\n\\nfunction parseCue(input, cue, regionList) {\\n  // Remember the original input if we need to throw an error.\\n  var oInput = input;\\n  // 4.1 WebVTT timestamp\\n  function consumeTimeStamp() {\\n    var ts = parseTimeStamp(input);\\n    if (ts === null) {\\n      throw new ParsingError(ParsingError.Errors.BadTimeStamp,\\n                            \"Malformed timestamp: \" + oInput);\\n    }\\n    // Remove time stamp from input.\\n    input = input.replace(/^[^\\\\sa-zA-Z-]+/, \"\");\\n    return ts;\\n  }\\n\\n  // 4.4.2 WebVTT cue settings\\n  function consumeCueSettings(input, cue) {\\n    var settings = new Settings();\\n\\n    parseOptions(input, function (k, v) {\\n      switch (k) {\\n      case \"region\":\\n        // Find the last region we parsed with the same region id.\\n        for (var i = regionList.length - 1; i >= 0; i--) {\\n          if (regionList[i].id === v) {\\n            settings.set(k, regionList[i].region);\\n            break;\\n          }\\n        }\\n        break;\\n      case \"vertical\":\\n        settings.alt(k, v, [\"rl\", \"lr\"]);\\n        break;\\n      case \"line\":\\n        var vals = v.split(\",\"),\\n            vals0 = vals[0];\\n        settings.integer(k, vals0);\\n        settings.percent(k, vals0) ? settings.set(\"snapToLines\", false) : null;\\n        settings.alt(k, vals0, [\"auto\"]);\\n        if (vals.length === 2) {\\n          settings.alt(\"lineAlign\", vals[1], [\"start\", \"center\", \"end\"]);\\n        }\\n        break;\\n      case \"position\":\\n        vals = v.split(\",\");\\n        settings.percent(k, vals[0]);\\n        if (vals.length === 2) {\\n          settings.alt(\"positionAlign\", vals[1], [\"start\", \"center\", \"end\"]);\\n        }\\n        break;\\n      case \"size\":\\n        settings.percent(k, v);\\n        break;\\n      case \"align\":\\n        settings.alt(k, v, [\"start\", \"center\", \"end\", \"left\", \"right\"]);\\n        break;\\n      }\\n    }, /:/, /\\\\s/);\\n\\n    // Apply default values for any missing fields.\\n    cue.region = settings.get(\"region\", null);\\n    cue.vertical = settings.get(\"vertical\", \"\");\\n    try {\\n      cue.line = settings.get(\"line\", \"auto\");\\n    } catch (e) {}\\n    cue.lineAlign = settings.get(\"lineAlign\", \"start\");\\n    cue.snapToLines = settings.get(\"snapToLines\", true);\\n    cue.size = settings.get(\"size\", 100);\\n    // Safari still uses the old middle value and won\\'t accept center\\n    try {\\n      cue.align = settings.get(\"align\", \"center\");\\n    } catch (e) {\\n      cue.align = settings.get(\"align\", \"middle\");\\n    }\\n    try {\\n      cue.position = settings.get(\"position\", \"auto\");\\n    } catch (e) {\\n      cue.position = settings.get(\"position\", {\\n        start: 0,\\n        left: 0,\\n        center: 50,\\n        middle: 50,\\n        end: 100,\\n        right: 100\\n      }, cue.align);\\n    }\\n\\n\\n    cue.positionAlign = settings.get(\"positionAlign\", {\\n      start: \"start\",\\n      left: \"start\",\\n      center: \"center\",\\n      middle: \"center\",\\n      end: \"end\",\\n      right: \"end\"\\n    }, cue.align);\\n  }\\n\\n  function skipWhitespace() {\\n    input = input.replace(/^\\\\s+/, \"\");\\n  }\\n\\n  // 4.1 WebVTT cue timings.\\n  skipWhitespace();\\n  cue.startTime = consumeTimeStamp();   // (1) collect cue start time\\n  skipWhitespace();\\n  if (input.substr(0, 3) !== \"--\\x3e\") {     // (3) next characters must match \"--\\x3e\"\\n    throw new ParsingError(ParsingError.Errors.BadTimeStamp,\\n                           \"Malformed time stamp (time stamps must be separated by \\'--\\x3e\\'): \" +\\n                           oInput);\\n  }\\n  input = input.substr(3);\\n  skipWhitespace();\\n  cue.endTime = consumeTimeStamp();     // (5) collect cue end time\\n\\n  // 4.1 WebVTT cue settings list.\\n  skipWhitespace();\\n  consumeCueSettings(input, cue);\\n}\\n\\nvar TEXTAREA_ELEMENT = document.createElement(\"textarea\");\\n\\nvar TAG_NAME = {\\n  c: \"span\",\\n  i: \"i\",\\n  b: \"b\",\\n  u: \"u\",\\n  ruby: \"ruby\",\\n  rt: \"rt\",\\n  v: \"span\",\\n  lang: \"span\"\\n};\\n\\n// 5.1 default text color\\n// 5.2 default text background color is equivalent to text color with bg_ prefix\\nvar DEFAULT_COLOR_CLASS = {\\n  white: \\'rgba(255,255,255,1)\\',\\n  lime: \\'rgba(0,255,0,1)\\',\\n  cyan: \\'rgba(0,255,255,1)\\',\\n  red: \\'rgba(255,0,0,1)\\',\\n  yellow: \\'rgba(255,255,0,1)\\',\\n  magenta: \\'rgba(255,0,255,1)\\',\\n  blue: \\'rgba(0,0,255,1)\\',\\n  black: \\'rgba(0,0,0,1)\\'\\n};\\n\\nvar TAG_ANNOTATION = {\\n  v: \"title\",\\n  lang: \"lang\"\\n};\\n\\nvar NEEDS_PARENT = {\\n  rt: \"ruby\"\\n};\\n\\n// Parse content into a document fragment.\\nfunction parseContent(window, input) {\\n  function nextToken() {\\n    // Check for end-of-string.\\n    if (!input) {\\n      return null;\\n    }\\n\\n    // Consume \\'n\\' characters from the input.\\n    function consume(result) {\\n      input = input.substr(result.length);\\n      return result;\\n    }\\n\\n    var m = input.match(/^([^<]*)(<[^>]*>?)?/);\\n    // If there is some text before the next tag, return it, otherwise return\\n    // the tag.\\n    return consume(m[1] ? m[1] : m[2]);\\n  }\\n\\n  function unescape(s) {\\n    TEXTAREA_ELEMENT.innerHTML = s;\\n    s = TEXTAREA_ELEMENT.textContent;\\n    TEXTAREA_ELEMENT.textContent = \"\";\\n    return s;\\n  }\\n\\n  function shouldAdd(current, element) {\\n    return !NEEDS_PARENT[element.localName] ||\\n           NEEDS_PARENT[element.localName] === current.localName;\\n  }\\n\\n  // Create an element for this tag.\\n  function createElement(type, annotation) {\\n    var tagName = TAG_NAME[type];\\n    if (!tagName) {\\n      return null;\\n    }\\n    var element = window.document.createElement(tagName);\\n    var name = TAG_ANNOTATION[type];\\n    if (name && annotation) {\\n      element[name] = annotation.trim();\\n    }\\n    return element;\\n  }\\n\\n  var rootDiv = window.document.createElement(\"div\"),\\n      current = rootDiv,\\n      t,\\n      tagStack = [];\\n\\n  while ((t = nextToken()) !== null) {\\n    if (t[0] === \\'<\\') {\\n      if (t[1] === \"/\") {\\n        // If the closing tag matches, move back up to the parent node.\\n        if (tagStack.length &&\\n            tagStack[tagStack.length - 1] === t.substr(2).replace(\">\", \"\")) {\\n          tagStack.pop();\\n          current = current.parentNode;\\n        }\\n        // Otherwise just ignore the end tag.\\n        continue;\\n      }\\n      var ts = parseTimeStamp(t.substr(1, t.length - 2));\\n      var node;\\n      if (ts) {\\n        // Timestamps are lead nodes as well.\\n        node = window.document.createProcessingInstruction(\"timestamp\", ts);\\n        current.appendChild(node);\\n        continue;\\n      }\\n      var m = t.match(/^<([^.\\\\s/0-9>]+)(\\\\.[^\\\\s\\\\\\\\>]+)?([^>\\\\\\\\]+)?(\\\\\\\\?)>?$/);\\n      // If we can\\'t parse the tag, skip to the next tag.\\n      if (!m) {\\n        continue;\\n      }\\n      // Try to construct an element, and ignore the tag if we couldn\\'t.\\n      node = createElement(m[1], m[3]);\\n      if (!node) {\\n        continue;\\n      }\\n      // Determine if the tag should be added based on the context of where it\\n      // is placed in the cuetext.\\n      if (!shouldAdd(current, node)) {\\n        continue;\\n      }\\n      // Set the class list (as a list of classes, separated by space).\\n      if (m[2]) {\\n        var classes = m[2].split(\\'.\\');\\n\\n        classes.forEach(function(cl) {\\n          var bgColor = /^bg_/.test(cl);\\n          // slice out `bg_` if it\\'s a background color\\n          var colorName = bgColor ? cl.slice(3) : cl;\\n\\n          if (DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)) {\\n            var propName = bgColor ? \\'background-color\\' : \\'color\\';\\n            var propValue = DEFAULT_COLOR_CLASS[colorName];\\n\\n            node.style[propName] = propValue;\\n          }\\n        });\\n\\n        node.className = classes.join(\\' \\');\\n      }\\n      // Append the node to the current node, and enter the scope of the new\\n      // node.\\n      tagStack.push(m[1]);\\n      current.appendChild(node);\\n      current = node;\\n      continue;\\n    }\\n\\n    // Text nodes are leaf nodes.\\n    current.appendChild(window.document.createTextNode(unescape(t)));\\n  }\\n\\n  return rootDiv;\\n}\\n\\n// This is a list of all the Unicode characters that have a strong\\n// right-to-left category. What this means is that these characters are\\n// written right-to-left for sure. It was generated by pulling all the strong\\n// right-to-left characters out of the Unicode data table. That table can\\n// found at: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt\\nvar strongRTLRanges = [[0x5be, 0x5be], [0x5c0, 0x5c0], [0x5c3, 0x5c3], [0x5c6, 0x5c6],\\n [0x5d0, 0x5ea], [0x5f0, 0x5f4], [0x608, 0x608], [0x60b, 0x60b], [0x60d, 0x60d],\\n [0x61b, 0x61b], [0x61e, 0x64a], [0x66d, 0x66f], [0x671, 0x6d5], [0x6e5, 0x6e6],\\n [0x6ee, 0x6ef], [0x6fa, 0x70d], [0x70f, 0x710], [0x712, 0x72f], [0x74d, 0x7a5],\\n [0x7b1, 0x7b1], [0x7c0, 0x7ea], [0x7f4, 0x7f5], [0x7fa, 0x7fa], [0x800, 0x815],\\n [0x81a, 0x81a], [0x824, 0x824], [0x828, 0x828], [0x830, 0x83e], [0x840, 0x858],\\n [0x85e, 0x85e], [0x8a0, 0x8a0], [0x8a2, 0x8ac], [0x200f, 0x200f],\\n [0xfb1d, 0xfb1d], [0xfb1f, 0xfb28], [0xfb2a, 0xfb36], [0xfb38, 0xfb3c],\\n [0xfb3e, 0xfb3e], [0xfb40, 0xfb41], [0xfb43, 0xfb44], [0xfb46, 0xfbc1],\\n [0xfbd3, 0xfd3d], [0xfd50, 0xfd8f], [0xfd92, 0xfdc7], [0xfdf0, 0xfdfc],\\n [0xfe70, 0xfe74], [0xfe76, 0xfefc], [0x10800, 0x10805], [0x10808, 0x10808],\\n [0x1080a, 0x10835], [0x10837, 0x10838], [0x1083c, 0x1083c], [0x1083f, 0x10855],\\n [0x10857, 0x1085f], [0x10900, 0x1091b], [0x10920, 0x10939], [0x1093f, 0x1093f],\\n [0x10980, 0x109b7], [0x109be, 0x109bf], [0x10a00, 0x10a00], [0x10a10, 0x10a13],\\n [0x10a15, 0x10a17], [0x10a19, 0x10a33], [0x10a40, 0x10a47], [0x10a50, 0x10a58],\\n [0x10a60, 0x10a7f], [0x10b00, 0x10b35], [0x10b40, 0x10b55], [0x10b58, 0x10b72],\\n [0x10b78, 0x10b7f], [0x10c00, 0x10c48], [0x1ee00, 0x1ee03], [0x1ee05, 0x1ee1f],\\n [0x1ee21, 0x1ee22], [0x1ee24, 0x1ee24], [0x1ee27, 0x1ee27], [0x1ee29, 0x1ee32],\\n [0x1ee34, 0x1ee37], [0x1ee39, 0x1ee39], [0x1ee3b, 0x1ee3b], [0x1ee42, 0x1ee42],\\n [0x1ee47, 0x1ee47], [0x1ee49, 0x1ee49], [0x1ee4b, 0x1ee4b], [0x1ee4d, 0x1ee4f],\\n [0x1ee51, 0x1ee52], [0x1ee54, 0x1ee54], [0x1ee57, 0x1ee57], [0x1ee59, 0x1ee59],\\n [0x1ee5b, 0x1ee5b], [0x1ee5d, 0x1ee5d], [0x1ee5f, 0x1ee5f], [0x1ee61, 0x1ee62],\\n [0x1ee64, 0x1ee64], [0x1ee67, 0x1ee6a], [0x1ee6c, 0x1ee72], [0x1ee74, 0x1ee77],\\n [0x1ee79, 0x1ee7c], [0x1ee7e, 0x1ee7e], [0x1ee80, 0x1ee89], [0x1ee8b, 0x1ee9b],\\n [0x1eea1, 0x1eea3], [0x1eea5, 0x1eea9], [0x1eeab, 0x1eebb], [0x10fffd, 0x10fffd]];\\n\\nfunction isStrongRTLChar(charCode) {\\n  for (var i = 0; i < strongRTLRanges.length; i++) {\\n    var currentRange = strongRTLRanges[i];\\n    if (charCode >= currentRange[0] && charCode <= currentRange[1]) {\\n      return true;\\n    }\\n  }\\n\\n  return false;\\n}\\n\\nfunction determineBidi(cueDiv) {\\n  var nodeStack = [],\\n      text = \"\",\\n      charCode;\\n\\n  if (!cueDiv || !cueDiv.childNodes) {\\n    return \"ltr\";\\n  }\\n\\n  function pushNodes(nodeStack, node) {\\n    for (var i = node.childNodes.length - 1; i >= 0; i--) {\\n      nodeStack.push(node.childNodes[i]);\\n    }\\n  }\\n\\n  function nextTextNode(nodeStack) {\\n    if (!nodeStack || !nodeStack.length) {\\n      return null;\\n    }\\n\\n    var node = nodeStack.pop(),\\n        text = node.textContent || node.innerText;\\n    if (text) {\\n      // TODO: This should match all unicode type B characters (paragraph\\n      // separator characters). See issue #115.\\n      var m = text.match(/^.*(\\\\n|\\\\r)/);\\n      if (m) {\\n        nodeStack.length = 0;\\n        return m[0];\\n      }\\n      return text;\\n    }\\n    if (node.tagName === \"ruby\") {\\n      return nextTextNode(nodeStack);\\n    }\\n    if (node.childNodes) {\\n      pushNodes(nodeStack, node);\\n      return nextTextNode(nodeStack);\\n    }\\n  }\\n\\n  pushNodes(nodeStack, cueDiv);\\n  while ((text = nextTextNode(nodeStack))) {\\n    for (var i = 0; i < text.length; i++) {\\n      charCode = text.charCodeAt(i);\\n      if (isStrongRTLChar(charCode)) {\\n        return \"rtl\";\\n      }\\n    }\\n  }\\n  return \"ltr\";\\n}\\n\\nfunction computeLinePos(cue) {\\n  if (typeof cue.line === \"number\" &&\\n      (cue.snapToLines || (cue.line >= 0 && cue.line <= 100))) {\\n    return cue.line;\\n  }\\n  if (!cue.track || !cue.track.textTrackList ||\\n      !cue.track.textTrackList.mediaElement) {\\n    return -1;\\n  }\\n  var track = cue.track,\\n      trackList = track.textTrackList,\\n      count = 0;\\n  for (var i = 0; i < trackList.length && trackList[i] !== track; i++) {\\n    if (trackList[i].mode === \"showing\") {\\n      count++;\\n    }\\n  }\\n  return ++count * -1;\\n}\\n\\nfunction StyleBox() {\\n}\\n\\n// Apply styles to a div. If there is no div passed then it defaults to the\\n// div on \\'this\\'.\\nStyleBox.prototype.applyStyles = function(styles, div) {\\n  div = div || this.div;\\n  for (var prop in styles) {\\n    if (styles.hasOwnProperty(prop)) {\\n      div.style[prop] = styles[prop];\\n    }\\n  }\\n};\\n\\nStyleBox.prototype.formatStyle = function(val, unit) {\\n  return val === 0 ? 0 : val + unit;\\n};\\n\\n// Constructs the computed display state of the cue (a div). Places the div\\n// into the overlay which should be a block level element (usually a div).\\nfunction CueStyleBox(window, cue, styleOptions) {\\n  StyleBox.call(this);\\n  this.cue = cue;\\n\\n  // Parse our cue\\'s text into a DOM tree rooted at \\'cueDiv\\'. This div will\\n  // have inline positioning and will function as the cue background box.\\n  this.cueDiv = parseContent(window, cue.text);\\n  var styles = {\\n    color: \"rgba(255, 255, 255, 1)\",\\n    backgroundColor:  \"rgba(0, 0, 0, 0.8)\",\\n    position: \"relative\",\\n    left: 0,\\n    right: 0,\\n    top: 0,\\n    bottom: 0,\\n    display: \"inline\",\\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\\n                                                             : \"vertical-rl\",\\n    unicodeBidi: \"plaintext\"\\n  };\\n\\n  this.applyStyles(styles, this.cueDiv);\\n\\n  // Create an absolutely positioned div that will be used to position the cue\\n  // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS\\n  // mirrors of them except middle instead of center on Safari.\\n  this.div = window.document.createElement(\"div\");\\n  styles = {\\n    direction: determineBidi(this.cueDiv),\\n    writingMode: cue.vertical === \"\" ? \"horizontal-tb\"\\n                                     : cue.vertical === \"lr\" ? \"vertical-lr\"\\n                                                             : \"vertical-rl\",\\n    unicodeBidi: \"plaintext\",\\n    textAlign: cue.align === \"middle\" ? \"center\" : cue.align,\\n    font: styleOptions.font,\\n    whiteSpace: \"pre-line\",\\n    position: \"absolute\"\\n  };\\n\\n  this.applyStyles(styles);\\n  this.div.appendChild(this.cueDiv);\\n\\n  // Calculate the distance from the reference edge of the viewport to the text\\n  // position of the cue box. The reference edge will be resolved later when\\n  // the box orientation styles are applied.\\n  var textPos = 0;\\n  switch (cue.positionAlign) {\\n  case \"start\":\\n    textPos = cue.position;\\n    break;\\n  case \"center\":\\n    textPos = cue.position - (cue.size / 2);\\n    break;\\n  case \"end\":\\n    textPos = cue.position - cue.size;\\n    break;\\n  }\\n\\n  // Horizontal box orientation; textPos is the distance from the left edge of the\\n  // area to the left edge of the box and cue.size is the distance extending to\\n  // the right from there.\\n  if (cue.vertical === \"\") {\\n    this.applyStyles({\\n      left:  this.formatStyle(textPos, \"%\"),\\n      width: this.formatStyle(cue.size, \"%\")\\n    });\\n  // Vertical box orientation; textPos is the distance from the top edge of the\\n  // area to the top edge of the box and cue.size is the height extending\\n  // downwards from there.\\n  } else {\\n    this.applyStyles({\\n      top: this.formatStyle(textPos, \"%\"),\\n      height: this.formatStyle(cue.size, \"%\")\\n    });\\n  }\\n\\n  this.move = function(box) {\\n    this.applyStyles({\\n      top: this.formatStyle(box.top, \"px\"),\\n      bottom: this.formatStyle(box.bottom, \"px\"),\\n      left: this.formatStyle(box.left, \"px\"),\\n      right: this.formatStyle(box.right, \"px\"),\\n      height: this.formatStyle(box.height, \"px\"),\\n      width: this.formatStyle(box.width, \"px\")\\n    });\\n  };\\n}\\nCueStyleBox.prototype = _objCreate(StyleBox.prototype);\\nCueStyleBox.prototype.constructor = CueStyleBox;\\n\\n// Represents the co-ordinates of an Element in a way that we can easily\\n// compute things with such as if it overlaps or intersects with another Element.\\n// Can initialize it with either a StyleBox or another BoxPosition.\\nfunction BoxPosition(obj) {\\n  // Either a BoxPosition was passed in and we need to copy it, or a StyleBox\\n  // was passed in and we need to copy the results of \\'getBoundingClientRect\\'\\n  // as the object returned is readonly. All co-ordinate values are in reference\\n  // to the viewport origin (top left).\\n  var lh, height, width, top;\\n  if (obj.div) {\\n    height = obj.div.offsetHeight;\\n    width = obj.div.offsetWidth;\\n    top = obj.div.offsetTop;\\n\\n    var rects = (rects = obj.div.childNodes) && (rects = rects[0]) &&\\n                rects.getClientRects && rects.getClientRects();\\n    obj = obj.div.getBoundingClientRect();\\n    // In certain cases the outter div will be slightly larger then the sum of\\n    // the inner div\\'s lines. This could be due to bold text, etc, on some platforms.\\n    // In this case we should get the average line height and use that. This will\\n    // result in the desired behaviour.\\n    lh = rects ? Math.max((rects[0] && rects[0].height) || 0, obj.height / rects.length)\\n               : 0;\\n\\n  }\\n  this.left = obj.left;\\n  this.right = obj.right;\\n  this.top = obj.top || top;\\n  this.height = obj.height || height;\\n  this.bottom = obj.bottom || (top + (obj.height || height));\\n  this.width = obj.width || width;\\n  this.lineHeight = lh !== undefined ? lh : obj.lineHeight;\\n}\\n\\n// Move the box along a particular axis. Optionally pass in an amount to move\\n// the box. If no amount is passed then the default is the line height of the\\n// box.\\nBoxPosition.prototype.move = function(axis, toMove) {\\n  toMove = toMove !== undefined ? toMove : this.lineHeight;\\n  switch (axis) {\\n  case \"+x\":\\n    this.left += toMove;\\n    this.right += toMove;\\n    break;\\n  case \"-x\":\\n    this.left -= toMove;\\n    this.right -= toMove;\\n    break;\\n  case \"+y\":\\n    this.top += toMove;\\n    this.bottom += toMove;\\n    break;\\n  case \"-y\":\\n    this.top -= toMove;\\n    this.bottom -= toMove;\\n    break;\\n  }\\n};\\n\\n// Check if this box overlaps another box, b2.\\nBoxPosition.prototype.overlaps = function(b2) {\\n  return this.left < b2.right &&\\n         this.right > b2.left &&\\n         this.top < b2.bottom &&\\n         this.bottom > b2.top;\\n};\\n\\n// Check if this box overlaps any other boxes in boxes.\\nBoxPosition.prototype.overlapsAny = function(boxes) {\\n  for (var i = 0; i < boxes.length; i++) {\\n    if (this.overlaps(boxes[i])) {\\n      return true;\\n    }\\n  }\\n  return false;\\n};\\n\\n// Check if this box is within another box.\\nBoxPosition.prototype.within = function(container) {\\n  return this.top >= container.top &&\\n         this.bottom <= container.bottom &&\\n         this.left >= container.left &&\\n         this.right <= container.right;\\n};\\n\\n// Check if this box is entirely within the container or it is overlapping\\n// on the edge opposite of the axis direction passed. For example, if \"+x\" is\\n// passed and the box is overlapping on the left edge of the container, then\\n// return true.\\nBoxPosition.prototype.overlapsOppositeAxis = function(container, axis) {\\n  switch (axis) {\\n  case \"+x\":\\n    return this.left < container.left;\\n  case \"-x\":\\n    return this.right > container.right;\\n  case \"+y\":\\n    return this.top < container.top;\\n  case \"-y\":\\n    return this.bottom > container.bottom;\\n  }\\n};\\n\\n// Find the percentage of the area that this box is overlapping with another\\n// box.\\nBoxPosition.prototype.intersectPercentage = function(b2) {\\n  var x = Math.max(0, Math.min(this.right, b2.right) - Math.max(this.left, b2.left)),\\n      y = Math.max(0, Math.min(this.bottom, b2.bottom) - Math.max(this.top, b2.top)),\\n      intersectArea = x * y;\\n  return intersectArea / (this.height * this.width);\\n};\\n\\n// Convert the positions from this box to CSS compatible positions using\\n// the reference container\\'s positions. This has to be done because this\\n// box\\'s positions are in reference to the viewport origin, whereas, CSS\\n// values are in referecne to their respective edges.\\nBoxPosition.prototype.toCSSCompatValues = function(reference) {\\n  return {\\n    top: this.top - reference.top,\\n    bottom: reference.bottom - this.bottom,\\n    left: this.left - reference.left,\\n    right: reference.right - this.right,\\n    height: this.height,\\n    width: this.width\\n  };\\n};\\n\\n// Get an object that represents the box\\'s position without anything extra.\\n// Can pass a StyleBox, HTMLElement, or another BoxPositon.\\nBoxPosition.getSimpleBoxPosition = function(obj) {\\n  var height = obj.div ? obj.div.offsetHeight : obj.tagName ? obj.offsetHeight : 0;\\n  var width = obj.div ? obj.div.offsetWidth : obj.tagName ? obj.offsetWidth : 0;\\n  var top = obj.div ? obj.div.offsetTop : obj.tagName ? obj.offsetTop : 0;\\n\\n  obj = obj.div ? obj.div.getBoundingClientRect() :\\n                obj.tagName ? obj.getBoundingClientRect() : obj;\\n  var ret = {\\n    left: obj.left,\\n    right: obj.right,\\n    top: obj.top || top,\\n    height: obj.height || height,\\n    bottom: obj.bottom || (top + (obj.height || height)),\\n    width: obj.width || width\\n  };\\n  return ret;\\n};\\n\\n// Move a StyleBox to its specified, or next best, position. The containerBox\\n// is the box that contains the StyleBox, such as a div. boxPositions are\\n// a list of other boxes that the styleBox can\\'t overlap with.\\nfunction moveBoxToLinePosition(window, styleBox, containerBox, boxPositions) {\\n\\n  // Find the best position for a cue box, b, on the video. The axis parameter\\n  // is a list of axis, the order of which, it will move the box along. For example:\\n  // Passing [\"+x\", \"-x\"] will move the box first along the x axis in the positive\\n  // direction. If it doesn\\'t find a good position for it there it will then move\\n  // it along the x axis in the negative direction.\\n  function findBestPosition(b, axis) {\\n    var bestPosition,\\n        specifiedPosition = new BoxPosition(b),\\n        percentage = 1; // Highest possible so the first thing we get is better.\\n\\n    for (var i = 0; i < axis.length; i++) {\\n      while (b.overlapsOppositeAxis(containerBox, axis[i]) ||\\n             (b.within(containerBox) && b.overlapsAny(boxPositions))) {\\n        b.move(axis[i]);\\n      }\\n      // We found a spot where we aren\\'t overlapping anything. This is our\\n      // best position.\\n      if (b.within(containerBox)) {\\n        return b;\\n      }\\n      var p = b.intersectPercentage(containerBox);\\n      // If we\\'re outside the container box less then we were on our last try\\n      // then remember this position as the best position.\\n      if (percentage > p) {\\n        bestPosition = new BoxPosition(b);\\n        percentage = p;\\n      }\\n      // Reset the box position to the specified position.\\n      b = new BoxPosition(specifiedPosition);\\n    }\\n    return bestPosition || specifiedPosition;\\n  }\\n\\n  var boxPosition = new BoxPosition(styleBox),\\n      cue = styleBox.cue,\\n      linePos = computeLinePos(cue),\\n      axis = [];\\n\\n  // If we have a line number to align the cue to.\\n  if (cue.snapToLines) {\\n    var size;\\n    switch (cue.vertical) {\\n    case \"\":\\n      axis = [ \"+y\", \"-y\" ];\\n      size = \"height\";\\n      break;\\n    case \"rl\":\\n      axis = [ \"+x\", \"-x\" ];\\n      size = \"width\";\\n      break;\\n    case \"lr\":\\n      axis = [ \"-x\", \"+x\" ];\\n      size = \"width\";\\n      break;\\n    }\\n\\n    var step = boxPosition.lineHeight,\\n        position = step * Math.round(linePos),\\n        maxPosition = containerBox[size] + step,\\n        initialAxis = axis[0];\\n\\n    // If the specified intial position is greater then the max position then\\n    // clamp the box to the amount of steps it would take for the box to\\n    // reach the max position.\\n    if (Math.abs(position) > maxPosition) {\\n      position = position < 0 ? -1 : 1;\\n      position *= Math.ceil(maxPosition / step) * step;\\n    }\\n\\n    // If computed line position returns negative then line numbers are\\n    // relative to the bottom of the video instead of the top. Therefore, we\\n    // need to increase our initial position by the length or width of the\\n    // video, depending on the writing direction, and reverse our axis directions.\\n    if (linePos < 0) {\\n      position += cue.vertical === \"\" ? containerBox.height : containerBox.width;\\n      axis = axis.reverse();\\n    }\\n\\n    // Move the box to the specified position. This may not be its best\\n    // position.\\n    boxPosition.move(initialAxis, position);\\n\\n  } else {\\n    // If we have a percentage line value for the cue.\\n    var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;\\n\\n    switch (cue.lineAlign) {\\n    case \"center\":\\n      linePos -= (calculatedPercentage / 2);\\n      break;\\n    case \"end\":\\n      linePos -= calculatedPercentage;\\n      break;\\n    }\\n\\n    // Apply initial line position to the cue box.\\n    switch (cue.vertical) {\\n    case \"\":\\n      styleBox.applyStyles({\\n        top: styleBox.formatStyle(linePos, \"%\")\\n      });\\n      break;\\n    case \"rl\":\\n      styleBox.applyStyles({\\n        left: styleBox.formatStyle(linePos, \"%\")\\n      });\\n      break;\\n    case \"lr\":\\n      styleBox.applyStyles({\\n        right: styleBox.formatStyle(linePos, \"%\")\\n      });\\n      break;\\n    }\\n\\n    axis = [ \"+y\", \"-x\", \"+x\", \"-y\" ];\\n\\n    // Get the box position again after we\\'ve applied the specified positioning\\n    // to it.\\n    boxPosition = new BoxPosition(styleBox);\\n  }\\n\\n  var bestPosition = findBestPosition(boxPosition, axis);\\n  styleBox.move(bestPosition.toCSSCompatValues(containerBox));\\n}\\n\\nfunction WebVTT() {\\n  // Nothing\\n}\\n\\n// Helper to allow strings to be decoded instead of the default binary utf8 data.\\nWebVTT.StringDecoder = function() {\\n  return {\\n    decode: function(data) {\\n      if (!data) {\\n        return \"\";\\n      }\\n      if (typeof data !== \"string\") {\\n        throw new Error(\"Error - expected string data.\");\\n      }\\n      return decodeURIComponent(encodeURIComponent(data));\\n    }\\n  };\\n};\\n\\nWebVTT.convertCueToDOMTree = function(window, cuetext) {\\n  if (!window || !cuetext) {\\n    return null;\\n  }\\n  return parseContent(window, cuetext);\\n};\\n\\nvar FONT_SIZE_PERCENT = 0.05;\\nvar FONT_STYLE = \"sans-serif\";\\nvar CUE_BACKGROUND_PADDING = \"1.5%\";\\n\\n// Runs the processing model over the cues and regions passed to it.\\n// @param overlay A block level element (usually a div) that the computed cues\\n//                and regions will be placed into.\\nWebVTT.processCues = function(window, cues, overlay) {\\n  if (!window || !cues || !overlay) {\\n    return null;\\n  }\\n\\n  // Remove all previous children.\\n  while (overlay.firstChild) {\\n    overlay.removeChild(overlay.firstChild);\\n  }\\n\\n  var paddedOverlay = window.document.createElement(\"div\");\\n  paddedOverlay.style.position = \"absolute\";\\n  paddedOverlay.style.left = \"0\";\\n  paddedOverlay.style.right = \"0\";\\n  paddedOverlay.style.top = \"0\";\\n  paddedOverlay.style.bottom = \"0\";\\n  paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;\\n  overlay.appendChild(paddedOverlay);\\n\\n  // Determine if we need to compute the display states of the cues. This could\\n  // be the case if a cue\\'s state has been changed since the last computation or\\n  // if it has not been computed yet.\\n  function shouldCompute(cues) {\\n    for (var i = 0; i < cues.length; i++) {\\n      if (cues[i].hasBeenReset || !cues[i].displayState) {\\n        return true;\\n      }\\n    }\\n    return false;\\n  }\\n\\n  // We don\\'t need to recompute the cues\\' display states. Just reuse them.\\n  if (!shouldCompute(cues)) {\\n    for (var i = 0; i < cues.length; i++) {\\n      paddedOverlay.appendChild(cues[i].displayState);\\n    }\\n    return;\\n  }\\n\\n  var boxPositions = [],\\n      containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),\\n      fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;\\n  var styleOptions = {\\n    font: fontSize + \"px \" + FONT_STYLE\\n  };\\n\\n  (function() {\\n    var styleBox, cue;\\n\\n    for (var i = 0; i < cues.length; i++) {\\n      cue = cues[i];\\n\\n      // Compute the intial position and styles of the cue div.\\n      styleBox = new CueStyleBox(window, cue, styleOptions);\\n      paddedOverlay.appendChild(styleBox.div);\\n\\n      // Move the cue div to it\\'s correct line position.\\n      moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);\\n\\n      // Remember the computed div so that we don\\'t have to recompute it later\\n      // if we don\\'t have too.\\n      cue.displayState = styleBox.div;\\n\\n      boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox));\\n    }\\n  })();\\n};\\n\\nWebVTT.Parser = function(window, vttjs, decoder) {\\n  if (!decoder) {\\n    decoder = vttjs;\\n    vttjs = {};\\n  }\\n  if (!vttjs) {\\n    vttjs = {};\\n  }\\n\\n  this.window = window;\\n  this.vttjs = vttjs;\\n  this.state = \"INITIAL\";\\n  this.buffer = \"\";\\n  this.decoder = decoder || new TextDecoder(\"utf8\");\\n  this.regionList = [];\\n};\\n\\nWebVTT.Parser.prototype = {\\n  // If the error is a ParsingError then report it to the consumer if\\n  // possible. If it\\'s not a ParsingError then throw it like normal.\\n  reportOrThrowError: function(e) {\\n    if (e instanceof ParsingError) {\\n      this.onparsingerror && this.onparsingerror(e);\\n    } else {\\n      throw e;\\n    }\\n  },\\n  parse: function (data) {\\n    var self = this;\\n\\n    // If there is no data then we won\\'t decode it, but will just try to parse\\n    // whatever is in buffer already. This may occur in circumstances, for\\n    // example when flush() is called.\\n    if (data) {\\n      // Try to decode the data that we received.\\n      self.buffer += self.decoder.decode(data, {stream: true});\\n    }\\n\\n    function collectNextLine() {\\n      var buffer = self.buffer;\\n      var pos = 0;\\n      while (pos < buffer.length && buffer[pos] !== \\'\\\\r\\' && buffer[pos] !== \\'\\\\n\\') {\\n        ++pos;\\n      }\\n      var line = buffer.substr(0, pos);\\n      // Advance the buffer early in case we fail below.\\n      if (buffer[pos] === \\'\\\\r\\') {\\n        ++pos;\\n      }\\n      if (buffer[pos] === \\'\\\\n\\') {\\n        ++pos;\\n      }\\n      self.buffer = buffer.substr(pos);\\n      return line;\\n    }\\n\\n    // 3.4 WebVTT region and WebVTT region settings syntax\\n    function parseRegion(input) {\\n      var settings = new Settings();\\n\\n      parseOptions(input, function (k, v) {\\n        switch (k) {\\n        case \"id\":\\n          settings.set(k, v);\\n          break;\\n        case \"width\":\\n          settings.percent(k, v);\\n          break;\\n        case \"lines\":\\n          settings.integer(k, v);\\n          break;\\n        case \"regionanchor\":\\n        case \"viewportanchor\":\\n          var xy = v.split(\\',\\');\\n          if (xy.length !== 2) {\\n            break;\\n          }\\n          // We have to make sure both x and y parse, so use a temporary\\n          // settings object here.\\n          var anchor = new Settings();\\n          anchor.percent(\"x\", xy[0]);\\n          anchor.percent(\"y\", xy[1]);\\n          if (!anchor.has(\"x\") || !anchor.has(\"y\")) {\\n            break;\\n          }\\n          settings.set(k + \"X\", anchor.get(\"x\"));\\n          settings.set(k + \"Y\", anchor.get(\"y\"));\\n          break;\\n        case \"scroll\":\\n          settings.alt(k, v, [\"up\"]);\\n          break;\\n        }\\n      }, /=/, /\\\\s/);\\n\\n      // Create the region, using default values for any values that were not\\n      // specified.\\n      if (settings.has(\"id\")) {\\n        var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();\\n        region.width = settings.get(\"width\", 100);\\n        region.lines = settings.get(\"lines\", 3);\\n        region.regionAnchorX = settings.get(\"regionanchorX\", 0);\\n        region.regionAnchorY = settings.get(\"regionanchorY\", 100);\\n        region.viewportAnchorX = settings.get(\"viewportanchorX\", 0);\\n        region.viewportAnchorY = settings.get(\"viewportanchorY\", 100);\\n        region.scroll = settings.get(\"scroll\", \"\");\\n        // Register the region.\\n        self.onregion && self.onregion(region);\\n        // Remember the VTTRegion for later in case we parse any VTTCues that\\n        // reference it.\\n        self.regionList.push({\\n          id: settings.get(\"id\"),\\n          region: region\\n        });\\n      }\\n    }\\n\\n    // draft-pantos-http-live-streaming-20\\n    // https://tools.ietf.org/html/draft-pantos-http-live-streaming-20#section-3.5\\n    // 3.5 WebVTT\\n    function parseTimestampMap(input) {\\n      var settings = new Settings();\\n\\n      parseOptions(input, function(k, v) {\\n        switch(k) {\\n        case \"MPEGT\":\\n          settings.integer(k + \\'S\\', v);\\n          break;\\n        case \"LOCA\":\\n          settings.set(k + \\'L\\', parseTimeStamp(v));\\n          break;\\n        }\\n      }, /[^\\\\d]:/, /,/);\\n\\n      self.ontimestampmap && self.ontimestampmap({\\n        \"MPEGTS\": settings.get(\"MPEGTS\"),\\n        \"LOCAL\": settings.get(\"LOCAL\")\\n      });\\n    }\\n\\n    // 3.2 WebVTT metadata header syntax\\n    function parseHeader(input) {\\n      if (input.match(/X-TIMESTAMP-MAP/)) {\\n        // This line contains HLS X-TIMESTAMP-MAP metadata\\n        parseOptions(input, function(k, v) {\\n          switch(k) {\\n          case \"X-TIMESTAMP-MAP\":\\n            parseTimestampMap(v);\\n            break;\\n          }\\n        }, /=/);\\n      } else {\\n        parseOptions(input, function (k, v) {\\n          switch (k) {\\n          case \"Region\":\\n            // 3.3 WebVTT region metadata header syntax\\n            parseRegion(v);\\n            break;\\n          }\\n        }, /:/);\\n      }\\n\\n    }\\n\\n    // 5.1 WebVTT file parsing.\\n    try {\\n      var line;\\n      if (self.state === \"INITIAL\") {\\n        // We can\\'t start parsing until we have the first line.\\n        if (!/\\\\r\\\\n|\\\\n/.test(self.buffer)) {\\n          return this;\\n        }\\n\\n        line = collectNextLine();\\n\\n        var m = line.match(/^WEBVTT([ \\\\t].*)?$/);\\n        if (!m || !m[0]) {\\n          throw new ParsingError(ParsingError.Errors.BadSignature);\\n        }\\n\\n        self.state = \"HEADER\";\\n      }\\n\\n      var alreadyCollectedLine = false;\\n      while (self.buffer) {\\n        // We can\\'t parse a line until we have the full line.\\n        if (!/\\\\r\\\\n|\\\\n/.test(self.buffer)) {\\n          return this;\\n        }\\n\\n        if (!alreadyCollectedLine) {\\n          line = collectNextLine();\\n        } else {\\n          alreadyCollectedLine = false;\\n        }\\n\\n        switch (self.state) {\\n        case \"HEADER\":\\n          // 13-18 - Allow a header (metadata) under the WEBVTT line.\\n          if (/:/.test(line)) {\\n            parseHeader(line);\\n          } else if (!line) {\\n            // An empty line terminates the header and starts the body (cues).\\n            self.state = \"ID\";\\n          }\\n          continue;\\n        case \"NOTE\":\\n          // Ignore NOTE blocks.\\n          if (!line) {\\n            self.state = \"ID\";\\n          }\\n          continue;\\n        case \"ID\":\\n          // Check for the start of NOTE blocks.\\n          if (/^NOTE($|[ \\\\t])/.test(line)) {\\n            self.state = \"NOTE\";\\n            break;\\n          }\\n          // 19-29 - Allow any number of line terminators, then initialize new cue values.\\n          if (!line) {\\n            continue;\\n          }\\n          self.cue = new (self.vttjs.VTTCue || self.window.VTTCue)(0, 0, \"\");\\n          // Safari still uses the old middle value and won\\'t accept center\\n          try {\\n            self.cue.align = \"center\";\\n          } catch (e) {\\n            self.cue.align = \"middle\";\\n          }\\n          self.state = \"CUE\";\\n          // 30-39 - Check if self line contains an optional identifier or timing data.\\n          if (line.indexOf(\"--\\x3e\") === -1) {\\n            self.cue.id = line;\\n            continue;\\n          }\\n          // Process line as start of a cue.\\n          /*falls through*/\\n        case \"CUE\":\\n          // 40 - Collect cue timings and settings.\\n          try {\\n            parseCue(line, self.cue, self.regionList);\\n          } catch (e) {\\n            self.reportOrThrowError(e);\\n            // In case of an error ignore rest of the cue.\\n            self.cue = null;\\n            self.state = \"BADCUE\";\\n            continue;\\n          }\\n          self.state = \"CUETEXT\";\\n          continue;\\n        case \"CUETEXT\":\\n          var hasSubstring = line.indexOf(\"--\\x3e\") !== -1;\\n          // 34 - If we have an empty line then report the cue.\\n          // 35 - If we have the special substring \\'--\\x3e\\' then report the cue,\\n          // but do not collect the line as we need to process the current\\n          // one as a new cue.\\n          if (!line || hasSubstring && (alreadyCollectedLine = true)) {\\n            // We are done parsing self cue.\\n            self.oncue && self.oncue(self.cue);\\n            self.cue = null;\\n            self.state = \"ID\";\\n            continue;\\n          }\\n          if (self.cue.text) {\\n            self.cue.text += \"\\\\n\";\\n          }\\n          self.cue.text += line.replace(/\\\\u2028/g, \\'\\\\n\\').replace(/u2029/g, \\'\\\\n\\');\\n          continue;\\n        case \"BADCUE\": // BADCUE\\n          // 54-62 - Collect and discard the remaining cue.\\n          if (!line) {\\n            self.state = \"ID\";\\n          }\\n          continue;\\n        }\\n      }\\n    } catch (e) {\\n      self.reportOrThrowError(e);\\n\\n      // If we are currently parsing a cue, report what we have.\\n      if (self.state === \"CUETEXT\" && self.cue && self.oncue) {\\n        self.oncue(self.cue);\\n      }\\n      self.cue = null;\\n      // Enter BADWEBVTT state if header was not parsed correctly otherwise\\n      // another exception occurred so enter BADCUE state.\\n      self.state = self.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\\n    }\\n    return this;\\n  },\\n  flush: function () {\\n    var self = this;\\n    try {\\n      // Finish decoding the stream.\\n      self.buffer += self.decoder.decode();\\n      // Synthesize the end of the current cue or region.\\n      if (self.cue || self.state === \"HEADER\") {\\n        self.buffer += \"\\\\n\\\\n\";\\n        self.parse();\\n      }\\n      // If we\\'ve flushed, parsed, and we\\'re still on the INITIAL state then\\n      // that means we don\\'t have enough of the stream to parse the first\\n      // line.\\n      if (self.state === \"INITIAL\") {\\n        throw new ParsingError(ParsingError.Errors.BadSignature);\\n      }\\n    } catch(e) {\\n      self.reportOrThrowError(e);\\n    }\\n    self.onflush && self.onflush();\\n    return this;\\n  }\\n};\\n\\nmodule.exports = WebVTT;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/vtt.js?')},\"../node_modules/videojs-vtt.js/lib/vttcue.js\":function(module,exports){eval('/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \"License\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \"AS IS\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nvar autoKeyword = \"auto\";\\nvar directionSetting = {\\n  \"\": 1,\\n  \"lr\": 1,\\n  \"rl\": 1\\n};\\nvar alignSetting = {\\n  \"start\": 1,\\n  \"center\": 1,\\n  \"end\": 1,\\n  \"left\": 1,\\n  \"right\": 1,\\n  \"auto\": 1,\\n  \"line-left\": 1,\\n  \"line-right\": 1\\n};\\n\\nfunction findDirectionSetting(value) {\\n  if (typeof value !== \"string\") {\\n    return false;\\n  }\\n  var dir = directionSetting[value.toLowerCase()];\\n  return dir ? value.toLowerCase() : false;\\n}\\n\\nfunction findAlignSetting(value) {\\n  if (typeof value !== \"string\") {\\n    return false;\\n  }\\n  var align = alignSetting[value.toLowerCase()];\\n  return align ? value.toLowerCase() : false;\\n}\\n\\nfunction VTTCue(startTime, endTime, text) {\\n  /**\\n   * Shim implementation specific properties. These properties are not in\\n   * the spec.\\n   */\\n\\n  // Lets us know when the VTTCue\\'s data has changed in such a way that we need\\n  // to recompute its display state. This lets us compute its display state\\n  // lazily.\\n  this.hasBeenReset = false;\\n\\n  /**\\n   * VTTCue and TextTrackCue properties\\n   * http://dev.w3.org/html5/webvtt/#vttcue-interface\\n   */\\n\\n  var _id = \"\";\\n  var _pauseOnExit = false;\\n  var _startTime = startTime;\\n  var _endTime = endTime;\\n  var _text = text;\\n  var _region = null;\\n  var _vertical = \"\";\\n  var _snapToLines = true;\\n  var _line = \"auto\";\\n  var _lineAlign = \"start\";\\n  var _position = \"auto\";\\n  var _positionAlign = \"auto\";\\n  var _size = 100;\\n  var _align = \"center\";\\n\\n  Object.defineProperties(this, {\\n    \"id\": {\\n      enumerable: true,\\n      get: function() {\\n        return _id;\\n      },\\n      set: function(value) {\\n        _id = \"\" + value;\\n      }\\n    },\\n\\n    \"pauseOnExit\": {\\n      enumerable: true,\\n      get: function() {\\n        return _pauseOnExit;\\n      },\\n      set: function(value) {\\n        _pauseOnExit = !!value;\\n      }\\n    },\\n\\n    \"startTime\": {\\n      enumerable: true,\\n      get: function() {\\n        return _startTime;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \"number\") {\\n          throw new TypeError(\"Start time must be set to a number.\");\\n        }\\n        _startTime = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"endTime\": {\\n      enumerable: true,\\n      get: function() {\\n        return _endTime;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \"number\") {\\n          throw new TypeError(\"End time must be set to a number.\");\\n        }\\n        _endTime = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"text\": {\\n      enumerable: true,\\n      get: function() {\\n        return _text;\\n      },\\n      set: function(value) {\\n        _text = \"\" + value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"region\": {\\n      enumerable: true,\\n      get: function() {\\n        return _region;\\n      },\\n      set: function(value) {\\n        _region = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"vertical\": {\\n      enumerable: true,\\n      get: function() {\\n        return _vertical;\\n      },\\n      set: function(value) {\\n        var setting = findDirectionSetting(value);\\n        // Have to check for false because the setting an be an empty string.\\n        if (setting === false) {\\n          throw new SyntaxError(\"Vertical: an invalid or illegal direction string was specified.\");\\n        }\\n        _vertical = setting;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"snapToLines\": {\\n      enumerable: true,\\n      get: function() {\\n        return _snapToLines;\\n      },\\n      set: function(value) {\\n        _snapToLines = !!value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"line\": {\\n      enumerable: true,\\n      get: function() {\\n        return _line;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \"number\" && value !== autoKeyword) {\\n          throw new SyntaxError(\"Line: an invalid number or illegal string was specified.\");\\n        }\\n        _line = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"lineAlign\": {\\n      enumerable: true,\\n      get: function() {\\n        return _lineAlign;\\n      },\\n      set: function(value) {\\n        var setting = findAlignSetting(value);\\n        if (!setting) {\\n          console.warn(\"lineAlign: an invalid or illegal string was specified.\");\\n        } else {\\n          _lineAlign = setting;\\n          this.hasBeenReset = true;\\n        }\\n      }\\n    },\\n\\n    \"position\": {\\n      enumerable: true,\\n      get: function() {\\n        return _position;\\n      },\\n      set: function(value) {\\n        if (value < 0 || value > 100) {\\n          throw new Error(\"Position must be between 0 and 100.\");\\n        }\\n        _position = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"positionAlign\": {\\n      enumerable: true,\\n      get: function() {\\n        return _positionAlign;\\n      },\\n      set: function(value) {\\n        var setting = findAlignSetting(value);\\n        if (!setting) {\\n          console.warn(\"positionAlign: an invalid or illegal string was specified.\");\\n        } else {\\n          _positionAlign = setting;\\n          this.hasBeenReset = true;\\n        }\\n      }\\n    },\\n\\n    \"size\": {\\n      enumerable: true,\\n      get: function() {\\n        return _size;\\n      },\\n      set: function(value) {\\n        if (value < 0 || value > 100) {\\n          throw new Error(\"Size must be between 0 and 100.\");\\n        }\\n        _size = value;\\n        this.hasBeenReset = true;\\n      }\\n    },\\n\\n    \"align\": {\\n      enumerable: true,\\n      get: function() {\\n        return _align;\\n      },\\n      set: function(value) {\\n        var setting = findAlignSetting(value);\\n        if (!setting) {\\n          throw new SyntaxError(\"align: an invalid or illegal alignment string was specified.\");\\n        }\\n        _align = setting;\\n        this.hasBeenReset = true;\\n      }\\n    }\\n  });\\n\\n  /**\\n   * Other <track> spec defined properties\\n   */\\n\\n  // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#text-track-cue-display-state\\n  this.displayState = undefined;\\n}\\n\\n/**\\n * VTTCue methods\\n */\\n\\nVTTCue.prototype.getCueAsHTML = function() {\\n  // Assume WebVTT.convertCueToDOMTree is on the global.\\n  return WebVTT.convertCueToDOMTree(window, this.text);\\n};\\n\\nmodule.exports = VTTCue;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/vttcue.js?')},\"../node_modules/videojs-vtt.js/lib/vttregion.js\":function(module,exports){eval('/**\\n * Copyright 2013 vtt.js Contributors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \"License\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *   http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \"AS IS\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nvar scrollSetting = {\\n  \"\": true,\\n  \"up\": true\\n};\\n\\nfunction findScrollSetting(value) {\\n  if (typeof value !== \"string\") {\\n    return false;\\n  }\\n  var scroll = scrollSetting[value.toLowerCase()];\\n  return scroll ? value.toLowerCase() : false;\\n}\\n\\nfunction isValidPercentValue(value) {\\n  return typeof value === \"number\" && (value >= 0 && value <= 100);\\n}\\n\\n// VTTRegion shim http://dev.w3.org/html5/webvtt/#vttregion-interface\\nfunction VTTRegion() {\\n  var _width = 100;\\n  var _lines = 3;\\n  var _regionAnchorX = 0;\\n  var _regionAnchorY = 100;\\n  var _viewportAnchorX = 0;\\n  var _viewportAnchorY = 100;\\n  var _scroll = \"\";\\n\\n  Object.defineProperties(this, {\\n    \"width\": {\\n      enumerable: true,\\n      get: function() {\\n        return _width;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\"Width must be between 0 and 100.\");\\n        }\\n        _width = value;\\n      }\\n    },\\n    \"lines\": {\\n      enumerable: true,\\n      get: function() {\\n        return _lines;\\n      },\\n      set: function(value) {\\n        if (typeof value !== \"number\") {\\n          throw new TypeError(\"Lines must be set to a number.\");\\n        }\\n        _lines = value;\\n      }\\n    },\\n    \"regionAnchorY\": {\\n      enumerable: true,\\n      get: function() {\\n        return _regionAnchorY;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\"RegionAnchorX must be between 0 and 100.\");\\n        }\\n        _regionAnchorY = value;\\n      }\\n    },\\n    \"regionAnchorX\": {\\n      enumerable: true,\\n      get: function() {\\n        return _regionAnchorX;\\n      },\\n      set: function(value) {\\n        if(!isValidPercentValue(value)) {\\n          throw new Error(\"RegionAnchorY must be between 0 and 100.\");\\n        }\\n        _regionAnchorX = value;\\n      }\\n    },\\n    \"viewportAnchorY\": {\\n      enumerable: true,\\n      get: function() {\\n        return _viewportAnchorY;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\"ViewportAnchorY must be between 0 and 100.\");\\n        }\\n        _viewportAnchorY = value;\\n      }\\n    },\\n    \"viewportAnchorX\": {\\n      enumerable: true,\\n      get: function() {\\n        return _viewportAnchorX;\\n      },\\n      set: function(value) {\\n        if (!isValidPercentValue(value)) {\\n          throw new Error(\"ViewportAnchorX must be between 0 and 100.\");\\n        }\\n        _viewportAnchorX = value;\\n      }\\n    },\\n    \"scroll\": {\\n      enumerable: true,\\n      get: function() {\\n        return _scroll;\\n      },\\n      set: function(value) {\\n        var setting = findScrollSetting(value);\\n        // Have to check for false as an empty string is a legal value.\\n        if (setting === false) {\\n          console.warn(\"Scroll: an invalid or illegal string was specified.\");\\n        } else {\\n          _scroll = setting;\\n        }\\n      }\\n    }\\n  });\\n}\\n\\nmodule.exports = VTTRegion;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/videojs-vtt.js/lib/vttregion.js?')},\"../node_modules/webfontloader/webfontloader.js\":function(module,exports,__webpack_require__){eval('var __WEBPACK_AMD_DEFINE_RESULT__;/* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function p(a,b,c){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(\"native code\")?aa:ba;return p.apply(null,arguments)}var q=Date.now||function(){return+new Date};function ca(a,b){this.a=a;this.o=b||a;this.c=this.o.document}var da=!!window.FontFace;function t(a,b,c,d){b=a.c.createElement(b);if(c)for(var e in c)c.hasOwnProperty(e)&&(\"style\"==e?b.style.cssText=c[e]:b.setAttribute(e,c[e]));d&&b.appendChild(a.c.createTextNode(d));return b}function u(a,b,c){a=a.c.getElementsByTagName(b)[0];a||(a=document.documentElement);a.insertBefore(c,a.lastChild)}function v(a){a.parentNode&&a.parentNode.removeChild(a)}\\nfunction w(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\\\\s+/),e=0;e<b.length;e+=1){for(var f=!1,g=0;g<d.length;g+=1)if(b[e]===d[g]){f=!0;break}f||d.push(b[e])}b=[];for(e=0;e<d.length;e+=1){f=!1;for(g=0;g<c.length;g+=1)if(d[e]===c[g]){f=!0;break}f||b.push(d[e])}a.className=b.join(\" \").replace(/\\\\s+/g,\" \").replace(/^\\\\s+|\\\\s+$/,\"\")}function y(a,b){for(var c=a.className.split(/\\\\s+/),d=0,e=c.length;d<e;d++)if(c[d]==b)return!0;return!1}\\nfunction ea(a){return a.o.location.hostname||a.a.location.hostname}function z(a,b,c){function d(){m&&e&&f&&(m(g),m=null)}b=t(a,\"link\",{rel:\"stylesheet\",href:b,media:\"all\"});var e=!1,f=!0,g=null,m=c||null;da?(b.onload=function(){e=!0;d()},b.onerror=function(){e=!0;g=Error(\"Stylesheet failed to load\");d()}):setTimeout(function(){e=!0;d()},0);u(a,\"head\",b)}\\nfunction A(a,b,c,d){var e=a.c.getElementsByTagName(\"head\")[0];if(e){var f=t(a,\"script\",{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyState&&\"loaded\"!=this.readyState&&\"complete\"!=this.readyState||(g=!0,c&&c(null),f.onload=f.onreadystatechange=null,\"HEAD\"==f.parentNode.tagName&&e.removeChild(f))};e.appendChild(f);setTimeout(function(){g||(g=!0,c&&c(Error(\"Script load timeout\")))},d||5E3);return f}return null};function B(){this.a=0;this.c=null}function C(a){a.a++;return function(){a.a--;D(a)}}function E(a,b){a.c=b;D(a)}function D(a){0==a.a&&a.c&&(a.c(),a.c=null)};function F(a){this.a=a||\"-\"}F.prototype.c=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\\\\W_]+/g,\"\").toLowerCase());return b.join(this.a)};function G(a,b){this.c=a;this.f=4;this.a=\"n\";var c=(b||\"n4\").match(/^([nio])([1-9])$/i);c&&(this.a=c[1],this.f=parseInt(c[2],10))}function fa(a){return H(a)+\" \"+(a.f+\"00\")+\" 300px \"+I(a.c)}function I(a){var b=[];a=a.split(/,\\\\s*/);for(var c=0;c<a.length;c++){var d=a[c].replace(/[\\'\"]/g,\"\");-1!=d.indexOf(\" \")||/^\\\\d/.test(d)?b.push(\"\\'\"+d+\"\\'\"):b.push(d)}return b.join(\",\")}function J(a){return a.a+a.f}function H(a){var b=\"normal\";\"o\"===a.a?b=\"oblique\":\"i\"===a.a&&(b=\"italic\");return b}\\nfunction ga(a){var b=4,c=\"n\",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function ha(a,b){this.c=a;this.f=a.o.document.documentElement;this.h=b;this.a=new F(\"-\");this.j=!1!==b.events;this.g=!1!==b.classes}function ia(a){a.g&&w(a.f,[a.a.c(\"wf\",\"loading\")]);K(a,\"loading\")}function L(a){if(a.g){var b=y(a.f,a.a.c(\"wf\",\"active\")),c=[],d=[a.a.c(\"wf\",\"loading\")];b||c.push(a.a.c(\"wf\",\"inactive\"));w(a.f,c,d)}K(a,\"inactive\")}function K(a,b,c){if(a.j&&a.h[b])if(c)a.h[b](c.c,J(c));else a.h[b]()};function ja(){this.c={}}function ka(a,b,c){var d=[],e;for(e in b)if(b.hasOwnProperty(e)){var f=a.c[e];f&&d.push(f(b[e],c))}return d};function M(a,b){this.c=a;this.f=b;this.a=t(this.c,\"span\",{\"aria-hidden\":\"true\"},this.f)}function N(a){u(a.c,\"body\",a.a)}function O(a){return\"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:\"+I(a.c)+\";\"+(\"font-style:\"+H(a)+\";font-weight:\"+(a.f+\"00\")+\";\")};function P(a,b,c,d,e,f){this.g=a;this.j=b;this.a=d;this.c=c;this.f=e||3E3;this.h=f||void 0}P.prototype.start=function(){var a=this.c.o.document,b=this,c=q(),d=new Promise(function(d,e){function f(){q()-c>=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,d){e=setTimeout(d,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null);b.g(b.a)},function(){b.j(b.a)})};function Q(a,b,c,d,e,f,g){this.v=a;this.B=b;this.c=c;this.a=d;this.s=g||\"BESbswy\";this.f={};this.w=e||3E3;this.u=f||null;this.m=this.j=this.h=this.g=null;this.g=new M(this.c,this.s);this.h=new M(this.c,this.s);this.j=new M(this.c,this.s);this.m=new M(this.c,this.s);a=new G(this.a.c+\",serif\",J(this.a));a=O(a);this.g.a.style.cssText=a;a=new G(this.a.c+\",sans-serif\",J(this.a));a=O(a);this.h.a.style.cssText=a;a=new G(\"serif\",J(this.a));a=O(a);this.j.a.style.cssText=a;a=new G(\"sans-serif\",J(this.a));a=\\nO(a);this.m.a.style.cssText=a;N(this.g);N(this.h);N(this.j);N(this.m)}var R={D:\"serif\",C:\"sans-serif\"},S=null;function T(){if(null===S){var a=/AppleWebKit\\\\/([0-9]+)(?:\\\\.([0-9]+))/.exec(window.navigator.userAgent);S=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return S}Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f[\"sans-serif\"]=this.m.a.offsetWidth;this.A=q();U(this)};\\nfunction la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.f[R[d]]&&c===a.f[R[d]])return!0;return!1}function U(a){var b=a.g.a.offsetWidth,c=a.h.a.offsetWidth,d;(d=b===a.f.serif&&c===a.f[\"sans-serif\"])||(d=T()&&la(a,b,c));d?q()-a.A>=a.w?T()&&la(a,b,c)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):ma(a):V(a,a.v)}function ma(a){setTimeout(p(function(){U(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.m.a);b(this.a)},a),0)};function W(a,b,c){this.c=a;this.a=b;this.f=0;this.m=this.j=!1;this.s=c}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c(\"wf\",a.c,J(a).toString(),\"active\")],[b.a.c(\"wf\",a.c,J(a).toString(),\"loading\"),b.a.c(\"wf\",a.c,J(a).toString(),\"inactive\")]);K(b,\"fontactive\",a);this.m=!0;na(this)};\\nW.prototype.h=function(a){var b=this.a;if(b.g){var c=y(b.f,b.a.c(\"wf\",a.c,J(a).toString(),\"active\")),d=[],e=[b.a.c(\"wf\",a.c,J(a).toString(),\"loading\")];c||d.push(b.a.c(\"wf\",a.c,J(a).toString(),\"inactive\"));w(b.f,d,e)}K(b,\"fontinactive\",a);na(this)};function na(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&w(a.f,[a.a.c(\"wf\",\"active\")],[a.a.c(\"wf\",\"loading\"),a.a.c(\"wf\",\"inactive\")]),K(a,\"active\")):L(a.a))};function oa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}oa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;pa(this,new ha(this.c,a),a)};\\nfunction qa(a,b,c,d,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,m=d||null||{};if(0===c.length&&f)L(b.a);else{b.f+=c.length;f&&(b.j=f);var h,l=[];for(h=0;h<c.length;h++){var k=c[h],n=m[k.c],r=b.a,x=k;r.g&&w(r.f,[r.a.c(\"wf\",x.c,J(x).toString(),\"loading\")]);K(r,\"fontloading\",x);r=null;if(null===X)if(window.FontFace){var x=/Gecko.*Firefox\\\\/(\\\\d+)/.exec(window.navigator.userAgent),xa=/OS X.*Version\\\\/10\\\\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);\\nX=x?42<parseInt(x[1],10):xa?!1:!0}else X=!1;X?r=new P(p(b.g,b),p(b.h,b),b.c,k,b.s,n):r=new Q(p(b.g,b),p(b.h,b),b.c,k,b.s,a,n);l.push(r)}for(h=0;h<l.length;h++)l[h].start()}},0)}function pa(a,b,c){var d=[],e=c.timeout;ia(b);var d=ka(a.a,c,a.c),f=new W(a.c,b,e);a.h=d.length;b=0;for(c=d.length;b<c;b++)d[b].load(function(b,d,c){qa(a,f,b,d,c)})};function ra(a,b){this.c=a;this.a=b}\\nra.prototype.load=function(a){function b(){if(f[\"__mti_fntLst\"+d]){var c=f[\"__mti_fntLst\"+d](),e=[],h;if(c)for(var l=0;l<c.length;l++){var k=c[l].fontfamily;void 0!=c[l].fontStyle&&void 0!=c[l].fontWeight?(h=c[l].fontStyle+c[l].fontWeight,e.push(new G(k,h))):e.push(new G(k))}a(e)}else setTimeout(function(){b()},50)}var c=this,d=c.a.projectId,e=c.a.version;if(d){var f=c.c.o;A(this.c,(c.a.api||\"https://fast.fonts.net/jsapi\")+\"/\"+d+\".js\"+(e?\"?v=\"+e:\"\"),function(e){e?a([]):(f[\"__MonotypeConfiguration__\"+\\nd]=function(){return c.a},b())}).id=\"__MonotypeAPIScript__\"+d}else a([])};function sa(a,b){this.c=a;this.a=b}sa.prototype.load=function(a){var b,c,d=this.a.urls||[],e=this.a.families||[],f=this.a.testStrings||{},g=new B;b=0;for(c=d.length;b<c;b++)z(this.c,d[b],C(g));var m=[];b=0;for(c=e.length;b<c;b++)if(d=e[b].split(\":\"),d[1])for(var h=d[1].split(\",\"),l=0;l<h.length;l+=1)m.push(new G(d[0],h[l]));else m.push(new G(d[0]));E(g,function(){a(m,f)})};function ta(a,b){a?this.c=a:this.c=ua;this.a=[];this.f=[];this.g=b||\"\"}var ua=\"https://fonts.googleapis.com/css\";function va(a,b){for(var c=b.length,d=0;d<c;d++){var e=b[d].split(\":\");3==e.length&&a.f.push(e.pop());var f=\"\";2==e.length&&\"\"!=e[1]&&(f=\":\");a.a.push(e.join(f))}}\\nfunction wa(a){if(0==a.a.length)throw Error(\"No fonts to load!\");if(-1!=a.c.indexOf(\"kit=\"))return a.c;for(var b=a.a.length,c=[],d=0;d<b;d++)c.push(a.a[d].replace(/ /g,\"+\"));b=a.c+\"?family=\"+c.join(\"%7C\");0<a.f.length&&(b+=\"&subset=\"+a.f.join(\",\"));0<a.g.length&&(b+=\"&text=\"+encodeURIComponent(a.g));return b};function ya(a){this.f=a;this.a=[];this.c={}}\\nvar za={latin:\"BESbswy\",\"latin-ext\":\"\\\\u00e7\\\\u00f6\\\\u00fc\\\\u011f\\\\u015f\",cyrillic:\"\\\\u0439\\\\u044f\\\\u0416\",greek:\"\\\\u03b1\\\\u03b2\\\\u03a3\",khmer:\"\\\\u1780\\\\u1781\\\\u1782\",Hanuman:\"\\\\u1780\\\\u1781\\\\u1782\"},Aa={thin:\"1\",extralight:\"2\",\"extra-light\":\"2\",ultralight:\"2\",\"ultra-light\":\"2\",light:\"3\",regular:\"4\",book:\"4\",medium:\"5\",\"semi-bold\":\"6\",semibold:\"6\",\"demi-bold\":\"6\",demibold:\"6\",bold:\"7\",\"extra-bold\":\"8\",extrabold:\"8\",\"ultra-bold\":\"8\",ultrabold:\"8\",black:\"9\",heavy:\"9\",l:\"3\",r:\"4\",b:\"7\"},Ba={i:\"i\",italic:\"i\",n:\"n\",normal:\"n\"},\\nCa=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;\\nfunction Da(a){for(var b=a.f.length,c=0;c<b;c++){var d=a.f[c].split(\":\"),e=d[0].replace(/\\\\+/g,\" \"),f=[\"n4\"];if(2<=d.length){var g;var m=d[1];g=[];if(m)for(var m=m.split(\",\"),h=m.length,l=0;l<h;l++){var k;k=m[l];if(k.match(/^[\\\\w-]+$/)){var n=Ca.exec(k.toLowerCase());if(null==n)k=\"\";else{k=n[2];k=null==k||\"\"==k?\"n\":Ba[k];n=n[1];if(null==n||\"\"==n)n=\"4\";else var r=Aa[n],n=r?r:isNaN(n)?\"4\":n.substr(0,1);k=[k,n].join(\"\")}}else k=\"\";k&&g.push(k)}0<g.length&&(f=g);3==d.length&&(d=d[2],g=[],d=d?d.split(\",\"):\\ng,0<d.length&&(d=za[d[0]])&&(a.c[e]=d))}a.c[e]||(d=za[e])&&(a.c[e]=d);for(d=0;d<f.length;d+=1)a.a.push(new G(e,f[d]))}};function Ea(a,b){this.c=a;this.a=b}var Fa={Arimo:!0,Cousine:!0,Tinos:!0};Ea.prototype.load=function(a){var b=new B,c=this.c,d=new ta(this.a.api,this.a.text),e=this.a.families;va(d,e);var f=new ya(e);Da(f);z(c,wa(d),C(b));E(b,function(){a(f.a,f.c,Fa)})};function Ga(a,b){this.c=a;this.a=b}Ga.prototype.load=function(a){var b=this.a.id,c=this.c.o;b?A(this.c,(this.a.api||\"https://use.typekit.net\")+\"/\"+b+\".js\",function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var e=[],f=0;f<b.length;f+=2)for(var g=b[f],m=b[f+1],h=0;h<m.length;h++)e.push(new G(g,m[h]));try{c.Typekit.load({events:!1,classes:!1,async:!0})}catch(l){}a(e)}},2E3):a([])};function Ha(a,b){this.c=a;this.f=b;this.a=[]}Ha.prototype.load=function(a){var b=this.f.id,c=this.c.o,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,m=c.fonts.length;g<m;++g){var h=c.fonts[g];d.a.push(new G(h.name,ga(\"font-weight:\"+h.weight+\";font-style:\"+h.style)))}a(d.a)},A(this.c,(this.f.api||\"https://f.fontdeck.com/s/css/js/\")+ea(this.c)+\"/\"+b+\".js\",function(b){b&&a([])})):a([])};var Y=new oa(window);Y.a.c.custom=function(a,b){return new sa(b,a)};Y.a.c.fontdeck=function(a,b){return new Ha(b,a)};Y.a.c.monotype=function(a,b){return new ra(b,a)};Y.a.c.typekit=function(a,b){return new Ga(b,a)};Y.a.c.google=function(a,b){return new Ea(b,a)};var Z={load:p(Y.load,Y)}; true?!(__WEBPACK_AMD_DEFINE_RESULT__ = (function(){return Z}).call(exports, __webpack_require__, exports, module),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined;}());\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/webfontloader/webfontloader.js?')},\"../node_modules/webpack/buildin/global.js\":function(module,exports){eval('var g;\\n\\n// This works in non-strict mode\\ng = (function() {\\n\\treturn this;\\n})();\\n\\ntry {\\n\\t// This works if eval is allowed (see CSP)\\n\\tg = g || new Function(\"return this\")();\\n} catch (e) {\\n\\t// This works if the window reference is available\\n\\tif (typeof window === \"object\") g = window;\\n}\\n\\n// g can still be undefined, but nothing to do about it...\\n// We return undefined, instead of nothing here, so it\\'s\\n// easier to handle this case. if(!global) { ...}\\n\\nmodule.exports = g;\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/webpack/buildin/global.js?')},\"../node_modules/xmldom/dom-parser.js\":function(module,exports,__webpack_require__){eval(\"function DOMParser(options){\\r\\n\\tthis.options = options ||{locator:{}};\\r\\n\\t\\r\\n}\\r\\nDOMParser.prototype.parseFromString = function(source,mimeType){\\r\\n\\tvar options = this.options;\\r\\n\\tvar sax =  new XMLReader();\\r\\n\\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\\r\\n\\tvar errorHandler = options.errorHandler;\\r\\n\\tvar locator = options.locator;\\r\\n\\tvar defaultNSMap = options.xmlns||{};\\r\\n\\tvar entityMap = {'lt':'<','gt':'>','amp':'&','quot':'\\\"','apos':\\\"'\\\"}\\r\\n\\tif(locator){\\r\\n\\t\\tdomBuilder.setDocumentLocator(locator)\\r\\n\\t}\\r\\n\\t\\r\\n\\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\\r\\n\\tsax.domBuilder = options.domBuilder || domBuilder;\\r\\n\\tif(/\\\\/x?html?$/.test(mimeType)){\\r\\n\\t\\tentityMap.nbsp = '\\\\xa0';\\r\\n\\t\\tentityMap.copy = '\\\\xa9';\\r\\n\\t\\tdefaultNSMap['']= 'http://www.w3.org/1999/xhtml';\\r\\n\\t}\\r\\n\\tdefaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';\\r\\n\\tif(source){\\r\\n\\t\\tsax.parse(source,defaultNSMap,entityMap);\\r\\n\\t}else{\\r\\n\\t\\tsax.errorHandler.error(\\\"invalid doc source\\\");\\r\\n\\t}\\r\\n\\treturn domBuilder.doc;\\r\\n}\\r\\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\\r\\n\\tif(!errorImpl){\\r\\n\\t\\tif(domBuilder instanceof DOMHandler){\\r\\n\\t\\t\\treturn domBuilder;\\r\\n\\t\\t}\\r\\n\\t\\terrorImpl = domBuilder ;\\r\\n\\t}\\r\\n\\tvar errorHandler = {}\\r\\n\\tvar isCallback = errorImpl instanceof Function;\\r\\n\\tlocator = locator||{}\\r\\n\\tfunction build(key){\\r\\n\\t\\tvar fn = errorImpl[key];\\r\\n\\t\\tif(!fn && isCallback){\\r\\n\\t\\t\\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\\r\\n\\t\\t}\\r\\n\\t\\terrorHandler[key] = fn && function(msg){\\r\\n\\t\\t\\tfn('[xmldom '+key+']\\\\t'+msg+_locator(locator));\\r\\n\\t\\t}||function(){};\\r\\n\\t}\\r\\n\\tbuild('warning');\\r\\n\\tbuild('error');\\r\\n\\tbuild('fatalError');\\r\\n\\treturn errorHandler;\\r\\n}\\r\\n\\r\\n//console.log('#\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n####')\\r\\n/**\\r\\n * +ContentHandler+ErrorHandler\\r\\n * +LexicalHandler+EntityResolver2\\r\\n * -DeclHandler-DTDHandler \\r\\n * \\r\\n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\\r\\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\\r\\n */\\r\\nfunction DOMHandler() {\\r\\n    this.cdata = false;\\r\\n}\\r\\nfunction position(locator,node){\\r\\n\\tnode.lineNumber = locator.lineNumber;\\r\\n\\tnode.columnNumber = locator.columnNumber;\\r\\n}\\r\\n/**\\r\\n * @see org.xml.sax.ContentHandler#startDocument\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\\r\\n */ \\r\\nDOMHandler.prototype = {\\r\\n\\tstartDocument : function() {\\r\\n    \\tthis.doc = new DOMImplementation().createDocument(null, null, null);\\r\\n    \\tif (this.locator) {\\r\\n        \\tthis.doc.documentURI = this.locator.systemId;\\r\\n    \\t}\\r\\n\\t},\\r\\n\\tstartElement:function(namespaceURI, localName, qName, attrs) {\\r\\n\\t\\tvar doc = this.doc;\\r\\n\\t    var el = doc.createElementNS(namespaceURI, qName||localName);\\r\\n\\t    var len = attrs.length;\\r\\n\\t    appendElement(this, el);\\r\\n\\t    this.currentElement = el;\\r\\n\\t    \\r\\n\\t\\tthis.locator && position(this.locator,el)\\r\\n\\t    for (var i = 0 ; i < len; i++) {\\r\\n\\t        var namespaceURI = attrs.getURI(i);\\r\\n\\t        var value = attrs.getValue(i);\\r\\n\\t        var qName = attrs.getQName(i);\\r\\n\\t\\t\\tvar attr = doc.createAttributeNS(namespaceURI, qName);\\r\\n\\t\\t\\tthis.locator &&position(attrs.getLocator(i),attr);\\r\\n\\t\\t\\tattr.value = attr.nodeValue = value;\\r\\n\\t\\t\\tel.setAttributeNode(attr)\\r\\n\\t    }\\r\\n\\t},\\r\\n\\tendElement:function(namespaceURI, localName, qName) {\\r\\n\\t\\tvar current = this.currentElement\\r\\n\\t\\tvar tagName = current.tagName;\\r\\n\\t\\tthis.currentElement = current.parentNode;\\r\\n\\t},\\r\\n\\tstartPrefixMapping:function(prefix, uri) {\\r\\n\\t},\\r\\n\\tendPrefixMapping:function(prefix) {\\r\\n\\t},\\r\\n\\tprocessingInstruction:function(target, data) {\\r\\n\\t    var ins = this.doc.createProcessingInstruction(target, data);\\r\\n\\t    this.locator && position(this.locator,ins)\\r\\n\\t    appendElement(this, ins);\\r\\n\\t},\\r\\n\\tignorableWhitespace:function(ch, start, length) {\\r\\n\\t},\\r\\n\\tcharacters:function(chars, start, length) {\\r\\n\\t\\tchars = _toString.apply(this,arguments)\\r\\n\\t\\t//console.log(chars)\\r\\n\\t\\tif(chars){\\r\\n\\t\\t\\tif (this.cdata) {\\r\\n\\t\\t\\t\\tvar charNode = this.doc.createCDATASection(chars);\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\tvar charNode = this.doc.createTextNode(chars);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(this.currentElement){\\r\\n\\t\\t\\t\\tthis.currentElement.appendChild(charNode);\\r\\n\\t\\t\\t}else if(/^\\\\s*$/.test(chars)){\\r\\n\\t\\t\\t\\tthis.doc.appendChild(charNode);\\r\\n\\t\\t\\t\\t//process xml\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tthis.locator && position(this.locator,charNode)\\r\\n\\t\\t}\\r\\n\\t},\\r\\n\\tskippedEntity:function(name) {\\r\\n\\t},\\r\\n\\tendDocument:function() {\\r\\n\\t\\tthis.doc.normalize();\\r\\n\\t},\\r\\n\\tsetDocumentLocator:function (locator) {\\r\\n\\t    if(this.locator = locator){// && !('lineNumber' in locator)){\\r\\n\\t    \\tlocator.lineNumber = 0;\\r\\n\\t    }\\r\\n\\t},\\r\\n\\t//LexicalHandler\\r\\n\\tcomment:function(chars, start, length) {\\r\\n\\t\\tchars = _toString.apply(this,arguments)\\r\\n\\t    var comm = this.doc.createComment(chars);\\r\\n\\t    this.locator && position(this.locator,comm)\\r\\n\\t    appendElement(this, comm);\\r\\n\\t},\\r\\n\\t\\r\\n\\tstartCDATA:function() {\\r\\n\\t    //used in characters() methods\\r\\n\\t    this.cdata = true;\\r\\n\\t},\\r\\n\\tendCDATA:function() {\\r\\n\\t    this.cdata = false;\\r\\n\\t},\\r\\n\\t\\r\\n\\tstartDTD:function(name, publicId, systemId) {\\r\\n\\t\\tvar impl = this.doc.implementation;\\r\\n\\t    if (impl && impl.createDocumentType) {\\r\\n\\t        var dt = impl.createDocumentType(name, publicId, systemId);\\r\\n\\t        this.locator && position(this.locator,dt)\\r\\n\\t        appendElement(this, dt);\\r\\n\\t    }\\r\\n\\t},\\r\\n\\t/**\\r\\n\\t * @see org.xml.sax.ErrorHandler\\r\\n\\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\\r\\n\\t */\\r\\n\\twarning:function(error) {\\r\\n\\t\\tconsole.warn('[xmldom warning]\\\\t'+error,_locator(this.locator));\\r\\n\\t},\\r\\n\\terror:function(error) {\\r\\n\\t\\tconsole.error('[xmldom error]\\\\t'+error,_locator(this.locator));\\r\\n\\t},\\r\\n\\tfatalError:function(error) {\\r\\n\\t\\tconsole.error('[xmldom fatalError]\\\\t'+error,_locator(this.locator));\\r\\n\\t    throw error;\\r\\n\\t}\\r\\n}\\r\\nfunction _locator(l){\\r\\n\\tif(l){\\r\\n\\t\\treturn '\\\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\\r\\n\\t}\\r\\n}\\r\\nfunction _toString(chars,start,length){\\r\\n\\tif(typeof chars == 'string'){\\r\\n\\t\\treturn chars.substr(start,length)\\r\\n\\t}else{//java sax connect width xmldom on rhino(what about: \\\"? && !(chars instanceof String)\\\")\\r\\n\\t\\tif(chars.length >= start+length || start){\\r\\n\\t\\t\\treturn new java.lang.String(chars,start,length)+'';\\r\\n\\t\\t}\\r\\n\\t\\treturn chars;\\r\\n\\t}\\r\\n}\\r\\n\\r\\n/*\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\\r\\n * used method of org.xml.sax.ext.LexicalHandler:\\r\\n *  #comment(chars, start, length)\\r\\n *  #startCDATA()\\r\\n *  #endCDATA()\\r\\n *  #startDTD(name, publicId, systemId)\\r\\n *\\r\\n *\\r\\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\\r\\n *  #endDTD()\\r\\n *  #startEntity(name)\\r\\n *  #endEntity(name)\\r\\n *\\r\\n *\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\\r\\n * IGNORED method of org.xml.sax.ext.DeclHandler\\r\\n * \\t#attributeDecl(eName, aName, type, mode, value)\\r\\n *  #elementDecl(name, model)\\r\\n *  #externalEntityDecl(name, publicId, systemId)\\r\\n *  #internalEntityDecl(name, value)\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\\r\\n * IGNORED method of org.xml.sax.EntityResolver2\\r\\n *  #resolveEntity(String name,String publicId,String baseURI,String systemId)\\r\\n *  #resolveEntity(publicId, systemId)\\r\\n *  #getExternalSubset(name, baseURI)\\r\\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\\r\\n * IGNORED method of org.xml.sax.DTDHandler\\r\\n *  #notationDecl(name, publicId, systemId) {};\\r\\n *  #unparsedEntityDecl(name, publicId, systemId, notationName) {};\\r\\n */\\r\\n\\\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\\\".replace(/\\\\w+/g,function(key){\\r\\n\\tDOMHandler.prototype[key] = function(){return null}\\r\\n})\\r\\n\\r\\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\\r\\nfunction appendElement (hander,node) {\\r\\n    if (!hander.currentElement) {\\r\\n        hander.doc.appendChild(node);\\r\\n    } else {\\r\\n        hander.currentElement.appendChild(node);\\r\\n    }\\r\\n}//appendChild and setAttributeNS are preformance key\\r\\n\\r\\n//if(typeof require == 'function'){\\r\\n\\tvar XMLReader = __webpack_require__(/*! ./sax */ \\\"../node_modules/xmldom/sax.js\\\").XMLReader;\\r\\n\\tvar DOMImplementation = exports.DOMImplementation = __webpack_require__(/*! ./dom */ \\\"../node_modules/xmldom/dom.js\\\").DOMImplementation;\\r\\n\\texports.XMLSerializer = __webpack_require__(/*! ./dom */ \\\"../node_modules/xmldom/dom.js\\\").XMLSerializer ;\\r\\n\\texports.DOMParser = DOMParser;\\r\\n//}\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/xmldom/dom-parser.js?\")},\"../node_modules/xmldom/dom.js\":function(module,exports){eval(\"/*\\n * DOM Level 2\\n * Object DOMException\\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\\n */\\n\\nfunction copy(src,dest){\\n\\tfor(var p in src){\\n\\t\\tdest[p] = src[p];\\n\\t}\\n}\\n/**\\n^\\\\w+\\\\.prototype\\\\.([_\\\\w]+)\\\\s*=\\\\s*((?:.*\\\\{\\\\s*?[\\\\r\\\\n][\\\\s\\\\S]*?^})|\\\\S.*?(?=[;\\\\r\\\\n]));?\\n^\\\\w+\\\\.prototype\\\\.([_\\\\w]+)\\\\s*=\\\\s*(\\\\S.*?(?=[;\\\\r\\\\n]));?\\n */\\nfunction _extends(Class,Super){\\n\\tvar pt = Class.prototype;\\n\\tif(Object.create){\\n\\t\\tvar ppt = Object.create(Super.prototype)\\n\\t\\tpt.__proto__ = ppt;\\n\\t}\\n\\tif(!(pt instanceof Super)){\\n\\t\\tfunction t(){};\\n\\t\\tt.prototype = Super.prototype;\\n\\t\\tt = new t();\\n\\t\\tcopy(pt,t);\\n\\t\\tClass.prototype = pt = t;\\n\\t}\\n\\tif(pt.constructor != Class){\\n\\t\\tif(typeof Class != 'function'){\\n\\t\\t\\tconsole.error(\\\"unknow Class:\\\"+Class)\\n\\t\\t}\\n\\t\\tpt.constructor = Class\\n\\t}\\n}\\nvar htmlns = 'http://www.w3.org/1999/xhtml' ;\\n// Node Types\\nvar NodeType = {}\\nvar ELEMENT_NODE                = NodeType.ELEMENT_NODE                = 1;\\nvar ATTRIBUTE_NODE              = NodeType.ATTRIBUTE_NODE              = 2;\\nvar TEXT_NODE                   = NodeType.TEXT_NODE                   = 3;\\nvar CDATA_SECTION_NODE          = NodeType.CDATA_SECTION_NODE          = 4;\\nvar ENTITY_REFERENCE_NODE       = NodeType.ENTITY_REFERENCE_NODE       = 5;\\nvar ENTITY_NODE                 = NodeType.ENTITY_NODE                 = 6;\\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\\nvar COMMENT_NODE                = NodeType.COMMENT_NODE                = 8;\\nvar DOCUMENT_NODE               = NodeType.DOCUMENT_NODE               = 9;\\nvar DOCUMENT_TYPE_NODE          = NodeType.DOCUMENT_TYPE_NODE          = 10;\\nvar DOCUMENT_FRAGMENT_NODE      = NodeType.DOCUMENT_FRAGMENT_NODE      = 11;\\nvar NOTATION_NODE               = NodeType.NOTATION_NODE               = 12;\\n\\n// ExceptionCode\\nvar ExceptionCode = {}\\nvar ExceptionMessage = {};\\nvar INDEX_SIZE_ERR              = ExceptionCode.INDEX_SIZE_ERR              = ((ExceptionMessage[1]=\\\"Index size error\\\"),1);\\nvar DOMSTRING_SIZE_ERR          = ExceptionCode.DOMSTRING_SIZE_ERR          = ((ExceptionMessage[2]=\\\"DOMString size error\\\"),2);\\nvar HIERARCHY_REQUEST_ERR       = ExceptionCode.HIERARCHY_REQUEST_ERR       = ((ExceptionMessage[3]=\\\"Hierarchy request error\\\"),3);\\nvar WRONG_DOCUMENT_ERR          = ExceptionCode.WRONG_DOCUMENT_ERR          = ((ExceptionMessage[4]=\\\"Wrong document\\\"),4);\\nvar INVALID_CHARACTER_ERR       = ExceptionCode.INVALID_CHARACTER_ERR       = ((ExceptionMessage[5]=\\\"Invalid character\\\"),5);\\nvar NO_DATA_ALLOWED_ERR         = ExceptionCode.NO_DATA_ALLOWED_ERR         = ((ExceptionMessage[6]=\\\"No data allowed\\\"),6);\\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\\\"No modification allowed\\\"),7);\\nvar NOT_FOUND_ERR               = ExceptionCode.NOT_FOUND_ERR               = ((ExceptionMessage[8]=\\\"Not found\\\"),8);\\nvar NOT_SUPPORTED_ERR           = ExceptionCode.NOT_SUPPORTED_ERR           = ((ExceptionMessage[9]=\\\"Not supported\\\"),9);\\nvar INUSE_ATTRIBUTE_ERR         = ExceptionCode.INUSE_ATTRIBUTE_ERR         = ((ExceptionMessage[10]=\\\"Attribute in use\\\"),10);\\n//level2\\nvar INVALID_STATE_ERR        \\t= ExceptionCode.INVALID_STATE_ERR        \\t= ((ExceptionMessage[11]=\\\"Invalid state\\\"),11);\\nvar SYNTAX_ERR               \\t= ExceptionCode.SYNTAX_ERR               \\t= ((ExceptionMessage[12]=\\\"Syntax error\\\"),12);\\nvar INVALID_MODIFICATION_ERR \\t= ExceptionCode.INVALID_MODIFICATION_ERR \\t= ((ExceptionMessage[13]=\\\"Invalid modification\\\"),13);\\nvar NAMESPACE_ERR            \\t= ExceptionCode.NAMESPACE_ERR           \\t= ((ExceptionMessage[14]=\\\"Invalid namespace\\\"),14);\\nvar INVALID_ACCESS_ERR       \\t= ExceptionCode.INVALID_ACCESS_ERR      \\t= ((ExceptionMessage[15]=\\\"Invalid access\\\"),15);\\n\\n\\nfunction DOMException(code, message) {\\n\\tif(message instanceof Error){\\n\\t\\tvar error = message;\\n\\t}else{\\n\\t\\terror = this;\\n\\t\\tError.call(this, ExceptionMessage[code]);\\n\\t\\tthis.message = ExceptionMessage[code];\\n\\t\\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\\n\\t}\\n\\terror.code = code;\\n\\tif(message) this.message = this.message + \\\": \\\" + message;\\n\\treturn error;\\n};\\nDOMException.prototype = Error.prototype;\\ncopy(ExceptionCode,DOMException)\\n/**\\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\\n * The items in the NodeList are accessible via an integral index, starting from 0.\\n */\\nfunction NodeList() {\\n};\\nNodeList.prototype = {\\n\\t/**\\n\\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\\n\\t * @standard level1\\n\\t */\\n\\tlength:0, \\n\\t/**\\n\\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\\n\\t * @standard level1\\n\\t * @param index  unsigned long \\n\\t *   Index into the collection.\\n\\t * @return Node\\n\\t * \\tThe node at the indexth position in the NodeList, or null if that is not a valid index. \\n\\t */\\n\\titem: function(index) {\\n\\t\\treturn this[index] || null;\\n\\t},\\n\\ttoString:function(isHTML,nodeFilter){\\n\\t\\tfor(var buf = [], i = 0;i<this.length;i++){\\n\\t\\t\\tserializeToString(this[i],buf,isHTML,nodeFilter);\\n\\t\\t}\\n\\t\\treturn buf.join('');\\n\\t}\\n};\\nfunction LiveNodeList(node,refresh){\\n\\tthis._node = node;\\n\\tthis._refresh = refresh\\n\\t_updateLiveList(this);\\n}\\nfunction _updateLiveList(list){\\n\\tvar inc = list._node._inc || list._node.ownerDocument._inc;\\n\\tif(list._inc != inc){\\n\\t\\tvar ls = list._refresh(list._node);\\n\\t\\t//console.log(ls.length)\\n\\t\\t__set__(list,'length',ls.length);\\n\\t\\tcopy(ls,list);\\n\\t\\tlist._inc = inc;\\n\\t}\\n}\\nLiveNodeList.prototype.item = function(i){\\n\\t_updateLiveList(this);\\n\\treturn this[i];\\n}\\n\\n_extends(LiveNodeList,NodeList);\\n/**\\n * \\n * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.\\n * NamedNodeMap objects in the DOM are live.\\n * used for attributes or DocumentType entities \\n */\\nfunction NamedNodeMap() {\\n};\\n\\nfunction _findNodeIndex(list,node){\\n\\tvar i = list.length;\\n\\twhile(i--){\\n\\t\\tif(list[i] === node){return i}\\n\\t}\\n}\\n\\nfunction _addNamedNode(el,list,newAttr,oldAttr){\\n\\tif(oldAttr){\\n\\t\\tlist[_findNodeIndex(list,oldAttr)] = newAttr;\\n\\t}else{\\n\\t\\tlist[list.length++] = newAttr;\\n\\t}\\n\\tif(el){\\n\\t\\tnewAttr.ownerElement = el;\\n\\t\\tvar doc = el.ownerDocument;\\n\\t\\tif(doc){\\n\\t\\t\\toldAttr && _onRemoveAttribute(doc,el,oldAttr);\\n\\t\\t\\t_onAddAttribute(doc,el,newAttr);\\n\\t\\t}\\n\\t}\\n}\\nfunction _removeNamedNode(el,list,attr){\\n\\t//console.log('remove attr:'+attr)\\n\\tvar i = _findNodeIndex(list,attr);\\n\\tif(i>=0){\\n\\t\\tvar lastIndex = list.length-1\\n\\t\\twhile(i<lastIndex){\\n\\t\\t\\tlist[i] = list[++i]\\n\\t\\t}\\n\\t\\tlist.length = lastIndex;\\n\\t\\tif(el){\\n\\t\\t\\tvar doc = el.ownerDocument;\\n\\t\\t\\tif(doc){\\n\\t\\t\\t\\t_onRemoveAttribute(doc,el,attr);\\n\\t\\t\\t\\tattr.ownerElement = null;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}else{\\n\\t\\tthrow DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))\\n\\t}\\n}\\nNamedNodeMap.prototype = {\\n\\tlength:0,\\n\\titem:NodeList.prototype.item,\\n\\tgetNamedItem: function(key) {\\n//\\t\\tif(key.indexOf(':')>0 || key == 'xmlns'){\\n//\\t\\t\\treturn null;\\n//\\t\\t}\\n\\t\\t//console.log()\\n\\t\\tvar i = this.length;\\n\\t\\twhile(i--){\\n\\t\\t\\tvar attr = this[i];\\n\\t\\t\\t//console.log(attr.nodeName,key)\\n\\t\\t\\tif(attr.nodeName == key){\\n\\t\\t\\t\\treturn attr;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n\\tsetNamedItem: function(attr) {\\n\\t\\tvar el = attr.ownerElement;\\n\\t\\tif(el && el!=this._ownerElement){\\n\\t\\t\\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\\n\\t\\t}\\n\\t\\tvar oldAttr = this.getNamedItem(attr.nodeName);\\n\\t\\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\\n\\t\\treturn oldAttr;\\n\\t},\\n\\t/* returns Node */\\n\\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\\n\\t\\tvar el = attr.ownerElement, oldAttr;\\n\\t\\tif(el && el!=this._ownerElement){\\n\\t\\t\\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\\n\\t\\t}\\n\\t\\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\\n\\t\\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\\n\\t\\treturn oldAttr;\\n\\t},\\n\\n\\t/* returns Node */\\n\\tremoveNamedItem: function(key) {\\n\\t\\tvar attr = this.getNamedItem(key);\\n\\t\\t_removeNamedNode(this._ownerElement,this,attr);\\n\\t\\treturn attr;\\n\\t\\t\\n\\t\\t\\n\\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\\n\\t\\n\\t//for level2\\n\\tremoveNamedItemNS:function(namespaceURI,localName){\\n\\t\\tvar attr = this.getNamedItemNS(namespaceURI,localName);\\n\\t\\t_removeNamedNode(this._ownerElement,this,attr);\\n\\t\\treturn attr;\\n\\t},\\n\\tgetNamedItemNS: function(namespaceURI, localName) {\\n\\t\\tvar i = this.length;\\n\\t\\twhile(i--){\\n\\t\\t\\tvar node = this[i];\\n\\t\\t\\tif(node.localName == localName && node.namespaceURI == namespaceURI){\\n\\t\\t\\t\\treturn node;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn null;\\n\\t}\\n};\\n/**\\n * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490\\n */\\nfunction DOMImplementation(/* Object */ features) {\\n\\tthis._features = {};\\n\\tif (features) {\\n\\t\\tfor (var feature in features) {\\n\\t\\t\\t this._features = features[feature];\\n\\t\\t}\\n\\t}\\n};\\n\\nDOMImplementation.prototype = {\\n\\thasFeature: function(/* string */ feature, /* string */ version) {\\n\\t\\tvar versions = this._features[feature.toLowerCase()];\\n\\t\\tif (versions && (!version || version in versions)) {\\n\\t\\t\\treturn true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateDocument:function(namespaceURI,  qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR\\n\\t\\tvar doc = new Document();\\n\\t\\tdoc.implementation = this;\\n\\t\\tdoc.childNodes = new NodeList();\\n\\t\\tdoc.doctype = doctype;\\n\\t\\tif(doctype){\\n\\t\\t\\tdoc.appendChild(doctype);\\n\\t\\t}\\n\\t\\tif(qualifiedName){\\n\\t\\t\\tvar root = doc.createElementNS(namespaceURI,qualifiedName);\\n\\t\\t\\tdoc.appendChild(root);\\n\\t\\t}\\n\\t\\treturn doc;\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR\\n\\t\\tvar node = new DocumentType();\\n\\t\\tnode.name = qualifiedName;\\n\\t\\tnode.nodeName = qualifiedName;\\n\\t\\tnode.publicId = publicId;\\n\\t\\tnode.systemId = systemId;\\n\\t\\t// Introduced in DOM Level 2:\\n\\t\\t//readonly attribute DOMString        internalSubset;\\n\\t\\t\\n\\t\\t//TODO:..\\n\\t\\t//  readonly attribute NamedNodeMap     entities;\\n\\t\\t//  readonly attribute NamedNodeMap     notations;\\n\\t\\treturn node;\\n\\t}\\n};\\n\\n\\n/**\\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\\n */\\n\\nfunction Node() {\\n};\\n\\nNode.prototype = {\\n\\tfirstChild : null,\\n\\tlastChild : null,\\n\\tpreviousSibling : null,\\n\\tnextSibling : null,\\n\\tattributes : null,\\n\\tparentNode : null,\\n\\tchildNodes : null,\\n\\townerDocument : null,\\n\\tnodeValue : null,\\n\\tnamespaceURI : null,\\n\\tprefix : null,\\n\\tlocalName : null,\\n\\t// Modified in DOM Level 2:\\n\\tinsertBefore:function(newChild, refChild){//raises \\n\\t\\treturn _insertBefore(this,newChild,refChild);\\n\\t},\\n\\treplaceChild:function(newChild, oldChild){//raises \\n\\t\\tthis.insertBefore(newChild,oldChild);\\n\\t\\tif(oldChild){\\n\\t\\t\\tthis.removeChild(oldChild);\\n\\t\\t}\\n\\t},\\n\\tremoveChild:function(oldChild){\\n\\t\\treturn _removeChild(this,oldChild);\\n\\t},\\n\\tappendChild:function(newChild){\\n\\t\\treturn this.insertBefore(newChild,null);\\n\\t},\\n\\thasChildNodes:function(){\\n\\t\\treturn this.firstChild != null;\\n\\t},\\n\\tcloneNode:function(deep){\\n\\t\\treturn cloneNode(this.ownerDocument||this,this,deep);\\n\\t},\\n\\t// Modified in DOM Level 2:\\n\\tnormalize:function(){\\n\\t\\tvar child = this.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tvar next = child.nextSibling;\\n\\t\\t\\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\\n\\t\\t\\t\\tthis.removeChild(next);\\n\\t\\t\\t\\tchild.appendData(next.data);\\n\\t\\t\\t}else{\\n\\t\\t\\t\\tchild.normalize();\\n\\t\\t\\t\\tchild = next;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n  \\t// Introduced in DOM Level 2:\\n\\tisSupported:function(feature, version){\\n\\t\\treturn this.ownerDocument.implementation.hasFeature(feature,version);\\n\\t},\\n    // Introduced in DOM Level 2:\\n    hasAttributes:function(){\\n    \\treturn this.attributes.length>0;\\n    },\\n    lookupPrefix:function(namespaceURI){\\n    \\tvar el = this;\\n    \\twhile(el){\\n    \\t\\tvar map = el._nsMap;\\n    \\t\\t//console.dir(map)\\n    \\t\\tif(map){\\n    \\t\\t\\tfor(var n in map){\\n    \\t\\t\\t\\tif(map[n] == namespaceURI){\\n    \\t\\t\\t\\t\\treturn n;\\n    \\t\\t\\t\\t}\\n    \\t\\t\\t}\\n    \\t\\t}\\n    \\t\\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\\n    \\t}\\n    \\treturn null;\\n    },\\n    // Introduced in DOM Level 3:\\n    lookupNamespaceURI:function(prefix){\\n    \\tvar el = this;\\n    \\twhile(el){\\n    \\t\\tvar map = el._nsMap;\\n    \\t\\t//console.dir(map)\\n    \\t\\tif(map){\\n    \\t\\t\\tif(prefix in map){\\n    \\t\\t\\t\\treturn map[prefix] ;\\n    \\t\\t\\t}\\n    \\t\\t}\\n    \\t\\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\\n    \\t}\\n    \\treturn null;\\n    },\\n    // Introduced in DOM Level 3:\\n    isDefaultNamespace:function(namespaceURI){\\n    \\tvar prefix = this.lookupPrefix(namespaceURI);\\n    \\treturn prefix == null;\\n    }\\n};\\n\\n\\nfunction _xmlEncoder(c){\\n\\treturn c == '<' && '&lt;' ||\\n         c == '>' && '&gt;' ||\\n         c == '&' && '&amp;' ||\\n         c == '\\\"' && '&quot;' ||\\n         '&#'+c.charCodeAt()+';'\\n}\\n\\n\\ncopy(NodeType,Node);\\ncopy(NodeType,Node.prototype);\\n\\n/**\\n * @param callback return true for continue,false for break\\n * @return boolean true: break visit;\\n */\\nfunction _visitNode(node,callback){\\n\\tif(callback(node)){\\n\\t\\treturn true;\\n\\t}\\n\\tif(node = node.firstChild){\\n\\t\\tdo{\\n\\t\\t\\tif(_visitNode(node,callback)){return true}\\n        }while(node=node.nextSibling)\\n    }\\n}\\n\\n\\n\\nfunction Document(){\\n}\\nfunction _onAddAttribute(doc,el,newAttr){\\n\\tdoc && doc._inc++;\\n\\tvar ns = newAttr.namespaceURI ;\\n\\tif(ns == 'http://www.w3.org/2000/xmlns/'){\\n\\t\\t//update namespace\\n\\t\\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\\n\\t}\\n}\\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\\n\\tdoc && doc._inc++;\\n\\tvar ns = newAttr.namespaceURI ;\\n\\tif(ns == 'http://www.w3.org/2000/xmlns/'){\\n\\t\\t//update namespace\\n\\t\\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\\n\\t}\\n}\\nfunction _onUpdateChild(doc,el,newChild){\\n\\tif(doc && doc._inc){\\n\\t\\tdoc._inc++;\\n\\t\\t//update childNodes\\n\\t\\tvar cs = el.childNodes;\\n\\t\\tif(newChild){\\n\\t\\t\\tcs[cs.length++] = newChild;\\n\\t\\t}else{\\n\\t\\t\\t//console.log(1)\\n\\t\\t\\tvar child = el.firstChild;\\n\\t\\t\\tvar i = 0;\\n\\t\\t\\twhile(child){\\n\\t\\t\\t\\tcs[i++] = child;\\n\\t\\t\\t\\tchild =child.nextSibling;\\n\\t\\t\\t}\\n\\t\\t\\tcs.length = i;\\n\\t\\t}\\n\\t}\\n}\\n\\n/**\\n * attributes;\\n * children;\\n * \\n * writeable properties:\\n * nodeValue,Attr:value,CharacterData:data\\n * prefix\\n */\\nfunction _removeChild(parentNode,child){\\n\\tvar previous = child.previousSibling;\\n\\tvar next = child.nextSibling;\\n\\tif(previous){\\n\\t\\tprevious.nextSibling = next;\\n\\t}else{\\n\\t\\tparentNode.firstChild = next\\n\\t}\\n\\tif(next){\\n\\t\\tnext.previousSibling = previous;\\n\\t}else{\\n\\t\\tparentNode.lastChild = previous;\\n\\t}\\n\\t_onUpdateChild(parentNode.ownerDocument,parentNode);\\n\\treturn child;\\n}\\n/**\\n * preformance key(refChild == null)\\n */\\nfunction _insertBefore(parentNode,newChild,nextChild){\\n\\tvar cp = newChild.parentNode;\\n\\tif(cp){\\n\\t\\tcp.removeChild(newChild);//remove and update\\n\\t}\\n\\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\\n\\t\\tvar newFirst = newChild.firstChild;\\n\\t\\tif (newFirst == null) {\\n\\t\\t\\treturn newChild;\\n\\t\\t}\\n\\t\\tvar newLast = newChild.lastChild;\\n\\t}else{\\n\\t\\tnewFirst = newLast = newChild;\\n\\t}\\n\\tvar pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;\\n\\n\\tnewFirst.previousSibling = pre;\\n\\tnewLast.nextSibling = nextChild;\\n\\t\\n\\t\\n\\tif(pre){\\n\\t\\tpre.nextSibling = newFirst;\\n\\t}else{\\n\\t\\tparentNode.firstChild = newFirst;\\n\\t}\\n\\tif(nextChild == null){\\n\\t\\tparentNode.lastChild = newLast;\\n\\t}else{\\n\\t\\tnextChild.previousSibling = newLast;\\n\\t}\\n\\tdo{\\n\\t\\tnewFirst.parentNode = parentNode;\\n\\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\\n\\t_onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);\\n\\t//console.log(parentNode.lastChild.nextSibling == null)\\n\\tif (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {\\n\\t\\tnewChild.firstChild = newChild.lastChild = null;\\n\\t}\\n\\treturn newChild;\\n}\\nfunction _appendSingleChild(parentNode,newChild){\\n\\tvar cp = newChild.parentNode;\\n\\tif(cp){\\n\\t\\tvar pre = parentNode.lastChild;\\n\\t\\tcp.removeChild(newChild);//remove and update\\n\\t\\tvar pre = parentNode.lastChild;\\n\\t}\\n\\tvar pre = parentNode.lastChild;\\n\\tnewChild.parentNode = parentNode;\\n\\tnewChild.previousSibling = pre;\\n\\tnewChild.nextSibling = null;\\n\\tif(pre){\\n\\t\\tpre.nextSibling = newChild;\\n\\t}else{\\n\\t\\tparentNode.firstChild = newChild;\\n\\t}\\n\\tparentNode.lastChild = newChild;\\n\\t_onUpdateChild(parentNode.ownerDocument,parentNode,newChild);\\n\\treturn newChild;\\n\\t//console.log(\\\"__aa\\\",parentNode.lastChild.nextSibling == null)\\n}\\nDocument.prototype = {\\n\\t//implementation : null,\\n\\tnodeName :  '#document',\\n\\tnodeType :  DOCUMENT_NODE,\\n\\tdoctype :  null,\\n\\tdocumentElement :  null,\\n\\t_inc : 1,\\n\\t\\n\\tinsertBefore :  function(newChild, refChild){//raises \\n\\t\\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\\n\\t\\t\\tvar child = newChild.firstChild;\\n\\t\\t\\twhile(child){\\n\\t\\t\\t\\tvar next = child.nextSibling;\\n\\t\\t\\t\\tthis.insertBefore(child,refChild);\\n\\t\\t\\t\\tchild = next;\\n\\t\\t\\t}\\n\\t\\t\\treturn newChild;\\n\\t\\t}\\n\\t\\tif(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){\\n\\t\\t\\tthis.documentElement = newChild;\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;\\n\\t},\\n\\tremoveChild :  function(oldChild){\\n\\t\\tif(this.documentElement == oldChild){\\n\\t\\t\\tthis.documentElement = null;\\n\\t\\t}\\n\\t\\treturn _removeChild(this,oldChild);\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\timportNode : function(importedNode,deep){\\n\\t\\treturn importNode(this,importedNode,deep);\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tgetElementById :\\tfunction(id){\\n\\t\\tvar rtv = null;\\n\\t\\t_visitNode(this.documentElement,function(node){\\n\\t\\t\\tif(node.nodeType == ELEMENT_NODE){\\n\\t\\t\\t\\tif(node.getAttribute('id') == id){\\n\\t\\t\\t\\t\\trtv = node;\\n\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t})\\n\\t\\treturn rtv;\\n\\t},\\n\\t\\n\\t//document factory method:\\n\\tcreateElement :\\tfunction(tagName){\\n\\t\\tvar node = new Element();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.nodeName = tagName;\\n\\t\\tnode.tagName = tagName;\\n\\t\\tnode.childNodes = new NodeList();\\n\\t\\tvar attrs\\t= node.attributes = new NamedNodeMap();\\n\\t\\tattrs._ownerElement = node;\\n\\t\\treturn node;\\n\\t},\\n\\tcreateDocumentFragment :\\tfunction(){\\n\\t\\tvar node = new DocumentFragment();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.childNodes = new NodeList();\\n\\t\\treturn node;\\n\\t},\\n\\tcreateTextNode :\\tfunction(data){\\n\\t\\tvar node = new Text();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.appendData(data)\\n\\t\\treturn node;\\n\\t},\\n\\tcreateComment :\\tfunction(data){\\n\\t\\tvar node = new Comment();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.appendData(data)\\n\\t\\treturn node;\\n\\t},\\n\\tcreateCDATASection :\\tfunction(data){\\n\\t\\tvar node = new CDATASection();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.appendData(data)\\n\\t\\treturn node;\\n\\t},\\n\\tcreateProcessingInstruction :\\tfunction(target,data){\\n\\t\\tvar node = new ProcessingInstruction();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.tagName = node.target = target;\\n\\t\\tnode.nodeValue= node.data = data;\\n\\t\\treturn node;\\n\\t},\\n\\tcreateAttribute :\\tfunction(name){\\n\\t\\tvar node = new Attr();\\n\\t\\tnode.ownerDocument\\t= this;\\n\\t\\tnode.name = name;\\n\\t\\tnode.nodeName\\t= name;\\n\\t\\tnode.localName = name;\\n\\t\\tnode.specified = true;\\n\\t\\treturn node;\\n\\t},\\n\\tcreateEntityReference :\\tfunction(name){\\n\\t\\tvar node = new EntityReference();\\n\\t\\tnode.ownerDocument\\t= this;\\n\\t\\tnode.nodeName\\t= name;\\n\\t\\treturn node;\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateElementNS :\\tfunction(namespaceURI,qualifiedName){\\n\\t\\tvar node = new Element();\\n\\t\\tvar pl = qualifiedName.split(':');\\n\\t\\tvar attrs\\t= node.attributes = new NamedNodeMap();\\n\\t\\tnode.childNodes = new NodeList();\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.nodeName = qualifiedName;\\n\\t\\tnode.tagName = qualifiedName;\\n\\t\\tnode.namespaceURI = namespaceURI;\\n\\t\\tif(pl.length == 2){\\n\\t\\t\\tnode.prefix = pl[0];\\n\\t\\t\\tnode.localName = pl[1];\\n\\t\\t}else{\\n\\t\\t\\t//el.prefix = null;\\n\\t\\t\\tnode.localName = qualifiedName;\\n\\t\\t}\\n\\t\\tattrs._ownerElement = node;\\n\\t\\treturn node;\\n\\t},\\n\\t// Introduced in DOM Level 2:\\n\\tcreateAttributeNS :\\tfunction(namespaceURI,qualifiedName){\\n\\t\\tvar node = new Attr();\\n\\t\\tvar pl = qualifiedName.split(':');\\n\\t\\tnode.ownerDocument = this;\\n\\t\\tnode.nodeName = qualifiedName;\\n\\t\\tnode.name = qualifiedName;\\n\\t\\tnode.namespaceURI = namespaceURI;\\n\\t\\tnode.specified = true;\\n\\t\\tif(pl.length == 2){\\n\\t\\t\\tnode.prefix = pl[0];\\n\\t\\t\\tnode.localName = pl[1];\\n\\t\\t}else{\\n\\t\\t\\t//el.prefix = null;\\n\\t\\t\\tnode.localName = qualifiedName;\\n\\t\\t}\\n\\t\\treturn node;\\n\\t}\\n};\\n_extends(Document,Node);\\n\\n\\nfunction Element() {\\n\\tthis._nsMap = {};\\n};\\nElement.prototype = {\\n\\tnodeType : ELEMENT_NODE,\\n\\thasAttribute : function(name){\\n\\t\\treturn this.getAttributeNode(name)!=null;\\n\\t},\\n\\tgetAttribute : function(name){\\n\\t\\tvar attr = this.getAttributeNode(name);\\n\\t\\treturn attr && attr.value || '';\\n\\t},\\n\\tgetAttributeNode : function(name){\\n\\t\\treturn this.attributes.getNamedItem(name);\\n\\t},\\n\\tsetAttribute : function(name, value){\\n\\t\\tvar attr = this.ownerDocument.createAttribute(name);\\n\\t\\tattr.value = attr.nodeValue = \\\"\\\" + value;\\n\\t\\tthis.setAttributeNode(attr)\\n\\t},\\n\\tremoveAttribute : function(name){\\n\\t\\tvar attr = this.getAttributeNode(name)\\n\\t\\tattr && this.removeAttributeNode(attr);\\n\\t},\\n\\t\\n\\t//four real opeartion method\\n\\tappendChild:function(newChild){\\n\\t\\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\\n\\t\\t\\treturn this.insertBefore(newChild,null);\\n\\t\\t}else{\\n\\t\\t\\treturn _appendSingleChild(this,newChild);\\n\\t\\t}\\n\\t},\\n\\tsetAttributeNode : function(newAttr){\\n\\t\\treturn this.attributes.setNamedItem(newAttr);\\n\\t},\\n\\tsetAttributeNodeNS : function(newAttr){\\n\\t\\treturn this.attributes.setNamedItemNS(newAttr);\\n\\t},\\n\\tremoveAttributeNode : function(oldAttr){\\n\\t\\t//console.log(this == oldAttr.ownerElement)\\n\\t\\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\\n\\t},\\n\\t//get real attribute name,and remove it by removeAttributeNode\\n\\tremoveAttributeNS : function(namespaceURI, localName){\\n\\t\\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\\n\\t\\told && this.removeAttributeNode(old);\\n\\t},\\n\\t\\n\\thasAttributeNS : function(namespaceURI, localName){\\n\\t\\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\\n\\t},\\n\\tgetAttributeNS : function(namespaceURI, localName){\\n\\t\\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\\n\\t\\treturn attr && attr.value || '';\\n\\t},\\n\\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\\n\\t\\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\\n\\t\\tattr.value = attr.nodeValue = \\\"\\\" + value;\\n\\t\\tthis.setAttributeNode(attr)\\n\\t},\\n\\tgetAttributeNodeNS : function(namespaceURI, localName){\\n\\t\\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\\n\\t},\\n\\t\\n\\tgetElementsByTagName : function(tagName){\\n\\t\\treturn new LiveNodeList(this,function(base){\\n\\t\\t\\tvar ls = [];\\n\\t\\t\\t_visitNode(base,function(node){\\n\\t\\t\\t\\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\\n\\t\\t\\t\\t\\tls.push(node);\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\t\\t\\treturn ls;\\n\\t\\t});\\n\\t},\\n\\tgetElementsByTagNameNS : function(namespaceURI, localName){\\n\\t\\treturn new LiveNodeList(this,function(base){\\n\\t\\t\\tvar ls = [];\\n\\t\\t\\t_visitNode(base,function(node){\\n\\t\\t\\t\\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\\n\\t\\t\\t\\t\\tls.push(node);\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\t\\t\\treturn ls;\\n\\t\\t\\t\\n\\t\\t});\\n\\t}\\n};\\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\\n\\n\\n_extends(Element,Node);\\nfunction Attr() {\\n};\\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\\n_extends(Attr,Node);\\n\\n\\nfunction CharacterData() {\\n};\\nCharacterData.prototype = {\\n\\tdata : '',\\n\\tsubstringData : function(offset, count) {\\n\\t\\treturn this.data.substring(offset, offset+count);\\n\\t},\\n\\tappendData: function(text) {\\n\\t\\ttext = this.data+text;\\n\\t\\tthis.nodeValue = this.data = text;\\n\\t\\tthis.length = text.length;\\n\\t},\\n\\tinsertData: function(offset,text) {\\n\\t\\tthis.replaceData(offset,0,text);\\n\\t\\n\\t},\\n\\tappendChild:function(newChild){\\n\\t\\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\\n\\t},\\n\\tdeleteData: function(offset, count) {\\n\\t\\tthis.replaceData(offset,count,\\\"\\\");\\n\\t},\\n\\treplaceData: function(offset, count, text) {\\n\\t\\tvar start = this.data.substring(0,offset);\\n\\t\\tvar end = this.data.substring(offset+count);\\n\\t\\ttext = start + text + end;\\n\\t\\tthis.nodeValue = this.data = text;\\n\\t\\tthis.length = text.length;\\n\\t}\\n}\\n_extends(CharacterData,Node);\\nfunction Text() {\\n};\\nText.prototype = {\\n\\tnodeName : \\\"#text\\\",\\n\\tnodeType : TEXT_NODE,\\n\\tsplitText : function(offset) {\\n\\t\\tvar text = this.data;\\n\\t\\tvar newText = text.substring(offset);\\n\\t\\ttext = text.substring(0, offset);\\n\\t\\tthis.data = this.nodeValue = text;\\n\\t\\tthis.length = text.length;\\n\\t\\tvar newNode = this.ownerDocument.createTextNode(newText);\\n\\t\\tif(this.parentNode){\\n\\t\\t\\tthis.parentNode.insertBefore(newNode, this.nextSibling);\\n\\t\\t}\\n\\t\\treturn newNode;\\n\\t}\\n}\\n_extends(Text,CharacterData);\\nfunction Comment() {\\n};\\nComment.prototype = {\\n\\tnodeName : \\\"#comment\\\",\\n\\tnodeType : COMMENT_NODE\\n}\\n_extends(Comment,CharacterData);\\n\\nfunction CDATASection() {\\n};\\nCDATASection.prototype = {\\n\\tnodeName : \\\"#cdata-section\\\",\\n\\tnodeType : CDATA_SECTION_NODE\\n}\\n_extends(CDATASection,CharacterData);\\n\\n\\nfunction DocumentType() {\\n};\\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\\n_extends(DocumentType,Node);\\n\\nfunction Notation() {\\n};\\nNotation.prototype.nodeType = NOTATION_NODE;\\n_extends(Notation,Node);\\n\\nfunction Entity() {\\n};\\nEntity.prototype.nodeType = ENTITY_NODE;\\n_extends(Entity,Node);\\n\\nfunction EntityReference() {\\n};\\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\\n_extends(EntityReference,Node);\\n\\nfunction DocumentFragment() {\\n};\\nDocumentFragment.prototype.nodeName =\\t\\\"#document-fragment\\\";\\nDocumentFragment.prototype.nodeType =\\tDOCUMENT_FRAGMENT_NODE;\\n_extends(DocumentFragment,Node);\\n\\n\\nfunction ProcessingInstruction() {\\n}\\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\\n_extends(ProcessingInstruction,Node);\\nfunction XMLSerializer(){}\\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\\n\\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\\n}\\nNode.prototype.toString = nodeSerializeToString;\\nfunction nodeSerializeToString(isHtml,nodeFilter){\\n\\tvar buf = [];\\n\\tvar refNode = this.nodeType == 9?this.documentElement:this;\\n\\tvar prefix = refNode.prefix;\\n\\tvar uri = refNode.namespaceURI;\\n\\t\\n\\tif(uri && prefix == null){\\n\\t\\t//console.log(prefix)\\n\\t\\tvar prefix = refNode.lookupPrefix(uri);\\n\\t\\tif(prefix == null){\\n\\t\\t\\t//isHTML = true;\\n\\t\\t\\tvar visibleNamespaces=[\\n\\t\\t\\t{namespace:uri,prefix:null}\\n\\t\\t\\t//{namespace:uri,prefix:''}\\n\\t\\t\\t]\\n\\t\\t}\\n\\t}\\n\\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\\n\\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\\n\\treturn buf.join('');\\n}\\nfunction needNamespaceDefine(node,isHTML, visibleNamespaces) {\\n\\tvar prefix = node.prefix||'';\\n\\tvar uri = node.namespaceURI;\\n\\tif (!prefix && !uri){\\n\\t\\treturn false;\\n\\t}\\n\\tif (prefix === \\\"xml\\\" && uri === \\\"http://www.w3.org/XML/1998/namespace\\\" \\n\\t\\t|| uri == 'http://www.w3.org/2000/xmlns/'){\\n\\t\\treturn false;\\n\\t}\\n\\t\\n\\tvar i = visibleNamespaces.length \\n\\t//console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)\\n\\twhile (i--) {\\n\\t\\tvar ns = visibleNamespaces[i];\\n\\t\\t// get namespace prefix\\n\\t\\t//console.log(node.nodeType,node.tagName,ns.prefix,prefix)\\n\\t\\tif (ns.prefix == prefix){\\n\\t\\t\\treturn ns.namespace != uri;\\n\\t\\t}\\n\\t}\\n\\t//console.log(isHTML,uri,prefix=='')\\n\\t//if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){\\n\\t//\\treturn false;\\n\\t//}\\n\\t//node.flag = '11111'\\n\\t//console.error(3,true,node.flag,node.prefix,node.namespaceURI)\\n\\treturn true;\\n}\\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\\n\\tif(nodeFilter){\\n\\t\\tnode = nodeFilter(node);\\n\\t\\tif(node){\\n\\t\\t\\tif(typeof node == 'string'){\\n\\t\\t\\t\\tbuf.push(node);\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t}else{\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t//buf.sort.apply(attrs, attributeSorter);\\n\\t}\\n\\tswitch(node.nodeType){\\n\\tcase ELEMENT_NODE:\\n\\t\\tif (!visibleNamespaces) visibleNamespaces = [];\\n\\t\\tvar startVisibleNamespaces = visibleNamespaces.length;\\n\\t\\tvar attrs = node.attributes;\\n\\t\\tvar len = attrs.length;\\n\\t\\tvar child = node.firstChild;\\n\\t\\tvar nodeName = node.tagName;\\n\\t\\t\\n\\t\\tisHTML =  (htmlns === node.namespaceURI) ||isHTML \\n\\t\\tbuf.push('<',nodeName);\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\tfor(var i=0;i<len;i++){\\n\\t\\t\\t// add namespaces for attributes\\n\\t\\t\\tvar attr = attrs.item(i);\\n\\t\\t\\tif (attr.prefix == 'xmlns') {\\n\\t\\t\\t\\tvisibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });\\n\\t\\t\\t}else if(attr.nodeName == 'xmlns'){\\n\\t\\t\\t\\tvisibleNamespaces.push({ prefix: '', namespace: attr.value });\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tfor(var i=0;i<len;i++){\\n\\t\\t\\tvar attr = attrs.item(i);\\n\\t\\t\\tif (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {\\n\\t\\t\\t\\tvar prefix = attr.prefix||'';\\n\\t\\t\\t\\tvar uri = attr.namespaceURI;\\n\\t\\t\\t\\tvar ns = prefix ? ' xmlns:' + prefix : \\\" xmlns\\\";\\n\\t\\t\\t\\tbuf.push(ns, '=\\\"' , uri , '\\\"');\\n\\t\\t\\t\\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\\n\\t\\t\\t}\\n\\t\\t\\tserializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t}\\n\\t\\t// add namespace for current node\\t\\t\\n\\t\\tif (needNamespaceDefine(node,isHTML, visibleNamespaces)) {\\n\\t\\t\\tvar prefix = node.prefix||'';\\n\\t\\t\\tvar uri = node.namespaceURI;\\n\\t\\t\\tvar ns = prefix ? ' xmlns:' + prefix : \\\" xmlns\\\";\\n\\t\\t\\tbuf.push(ns, '=\\\"' , uri , '\\\"');\\n\\t\\t\\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){\\n\\t\\t\\tbuf.push('>');\\n\\t\\t\\t//if is cdata child node\\n\\t\\t\\tif(isHTML && /^script$/i.test(nodeName)){\\n\\t\\t\\t\\twhile(child){\\n\\t\\t\\t\\t\\tif(child.data){\\n\\t\\t\\t\\t\\t\\tbuf.push(child.data);\\n\\t\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t\\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tchild = child.nextSibling;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else\\n\\t\\t\\t{\\n\\t\\t\\t\\twhile(child){\\n\\t\\t\\t\\t\\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t\\t\\t\\tchild = child.nextSibling;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tbuf.push('</',nodeName,'>');\\n\\t\\t}else{\\n\\t\\t\\tbuf.push('/>');\\n\\t\\t}\\n\\t\\t// remove added visible namespaces\\n\\t\\t//visibleNamespaces.length = startVisibleNamespaces;\\n\\t\\treturn;\\n\\tcase DOCUMENT_NODE:\\n\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\tvar child = node.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\\n\\t\\t\\tchild = child.nextSibling;\\n\\t\\t}\\n\\t\\treturn;\\n\\tcase ATTRIBUTE_NODE:\\n\\t\\treturn buf.push(' ',node.name,'=\\\"',node.value.replace(/[<&\\\"]/g,_xmlEncoder),'\\\"');\\n\\tcase TEXT_NODE:\\n\\t\\treturn buf.push(node.data.replace(/[<&]/g,_xmlEncoder));\\n\\tcase CDATA_SECTION_NODE:\\n\\t\\treturn buf.push( '<![CDATA[',node.data,']]>');\\n\\tcase COMMENT_NODE:\\n\\t\\treturn buf.push( \\\"\\x3c!--\\\",node.data,\\\"--\\x3e\\\");\\n\\tcase DOCUMENT_TYPE_NODE:\\n\\t\\tvar pubid = node.publicId;\\n\\t\\tvar sysid = node.systemId;\\n\\t\\tbuf.push('<!DOCTYPE ',node.name);\\n\\t\\tif(pubid){\\n\\t\\t\\tbuf.push(' PUBLIC \\\"',pubid);\\n\\t\\t\\tif (sysid && sysid!='.') {\\n\\t\\t\\t\\tbuf.push( '\\\" \\\"',sysid);\\n\\t\\t\\t}\\n\\t\\t\\tbuf.push('\\\">');\\n\\t\\t}else if(sysid && sysid!='.'){\\n\\t\\t\\tbuf.push(' SYSTEM \\\"',sysid,'\\\">');\\n\\t\\t}else{\\n\\t\\t\\tvar sub = node.internalSubset;\\n\\t\\t\\tif(sub){\\n\\t\\t\\t\\tbuf.push(\\\" [\\\",sub,\\\"]\\\");\\n\\t\\t\\t}\\n\\t\\t\\tbuf.push(\\\">\\\");\\n\\t\\t}\\n\\t\\treturn;\\n\\tcase PROCESSING_INSTRUCTION_NODE:\\n\\t\\treturn buf.push( \\\"<?\\\",node.target,\\\" \\\",node.data,\\\"?>\\\");\\n\\tcase ENTITY_REFERENCE_NODE:\\n\\t\\treturn buf.push( '&',node.nodeName,';');\\n\\t//case ENTITY_NODE:\\n\\t//case NOTATION_NODE:\\n\\tdefault:\\n\\t\\tbuf.push('??',node.nodeName);\\n\\t}\\n}\\nfunction importNode(doc,node,deep){\\n\\tvar node2;\\n\\tswitch (node.nodeType) {\\n\\tcase ELEMENT_NODE:\\n\\t\\tnode2 = node.cloneNode(false);\\n\\t\\tnode2.ownerDocument = doc;\\n\\t\\t//var attrs = node2.attributes;\\n\\t\\t//var len = attrs.length;\\n\\t\\t//for(var i=0;i<len;i++){\\n\\t\\t\\t//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\\n\\t\\t//}\\n\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\tbreak;\\n\\tcase ATTRIBUTE_NODE:\\n\\t\\tdeep = true;\\n\\t\\tbreak;\\n\\t//case ENTITY_REFERENCE_NODE:\\n\\t//case PROCESSING_INSTRUCTION_NODE:\\n\\t////case TEXT_NODE:\\n\\t//case CDATA_SECTION_NODE:\\n\\t//case COMMENT_NODE:\\n\\t//\\tdeep = false;\\n\\t//\\tbreak;\\n\\t//case DOCUMENT_NODE:\\n\\t//case DOCUMENT_TYPE_NODE:\\n\\t//cannot be imported.\\n\\t//case ENTITY_NODE:\\n\\t//case NOTATION_NODE:\\n\\t//can not hit in level3\\n\\t//default:throw e;\\n\\t}\\n\\tif(!node2){\\n\\t\\tnode2 = node.cloneNode(false);//false\\n\\t}\\n\\tnode2.ownerDocument = doc;\\n\\tnode2.parentNode = null;\\n\\tif(deep){\\n\\t\\tvar child = node.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tnode2.appendChild(importNode(doc,child,deep));\\n\\t\\t\\tchild = child.nextSibling;\\n\\t\\t}\\n\\t}\\n\\treturn node2;\\n}\\n//\\n//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\\n//\\t\\t\\t\\t\\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\\nfunction cloneNode(doc,node,deep){\\n\\tvar node2 = new node.constructor();\\n\\tfor(var n in node){\\n\\t\\tvar v = node[n];\\n\\t\\tif(typeof v != 'object' ){\\n\\t\\t\\tif(v != node2[n]){\\n\\t\\t\\t\\tnode2[n] = v;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\tif(node.childNodes){\\n\\t\\tnode2.childNodes = new NodeList();\\n\\t}\\n\\tnode2.ownerDocument = doc;\\n\\tswitch (node2.nodeType) {\\n\\tcase ELEMENT_NODE:\\n\\t\\tvar attrs\\t= node.attributes;\\n\\t\\tvar attrs2\\t= node2.attributes = new NamedNodeMap();\\n\\t\\tvar len = attrs.length\\n\\t\\tattrs2._ownerElement = node2;\\n\\t\\tfor(var i=0;i<len;i++){\\n\\t\\t\\tnode2.setAttributeNode(cloneNode(doc,attrs.item(i),true));\\n\\t\\t}\\n\\t\\tbreak;;\\n\\tcase ATTRIBUTE_NODE:\\n\\t\\tdeep = true;\\n\\t}\\n\\tif(deep){\\n\\t\\tvar child = node.firstChild;\\n\\t\\twhile(child){\\n\\t\\t\\tnode2.appendChild(cloneNode(doc,child,deep));\\n\\t\\t\\tchild = child.nextSibling;\\n\\t\\t}\\n\\t}\\n\\treturn node2;\\n}\\n\\nfunction __set__(object,key,value){\\n\\tobject[key] = value\\n}\\n//do dynamic\\ntry{\\n\\tif(Object.defineProperty){\\n\\t\\tObject.defineProperty(LiveNodeList.prototype,'length',{\\n\\t\\t\\tget:function(){\\n\\t\\t\\t\\t_updateLiveList(this);\\n\\t\\t\\t\\treturn this.$$length;\\n\\t\\t\\t}\\n\\t\\t});\\n\\t\\tObject.defineProperty(Node.prototype,'textContent',{\\n\\t\\t\\tget:function(){\\n\\t\\t\\t\\treturn getTextContent(this);\\n\\t\\t\\t},\\n\\t\\t\\tset:function(data){\\n\\t\\t\\t\\tswitch(this.nodeType){\\n\\t\\t\\t\\tcase ELEMENT_NODE:\\n\\t\\t\\t\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\t\\t\\t\\twhile(this.firstChild){\\n\\t\\t\\t\\t\\t\\tthis.removeChild(this.firstChild);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tif(data || String(data)){\\n\\t\\t\\t\\t\\t\\tthis.appendChild(this.ownerDocument.createTextNode(data));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tdefault:\\n\\t\\t\\t\\t\\t//TODO:\\n\\t\\t\\t\\t\\tthis.data = data;\\n\\t\\t\\t\\t\\tthis.value = data;\\n\\t\\t\\t\\t\\tthis.nodeValue = data;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t})\\n\\t\\t\\n\\t\\tfunction getTextContent(node){\\n\\t\\t\\tswitch(node.nodeType){\\n\\t\\t\\tcase ELEMENT_NODE:\\n\\t\\t\\tcase DOCUMENT_FRAGMENT_NODE:\\n\\t\\t\\t\\tvar buf = [];\\n\\t\\t\\t\\tnode = node.firstChild;\\n\\t\\t\\t\\twhile(node){\\n\\t\\t\\t\\t\\tif(node.nodeType!==7 && node.nodeType !==8){\\n\\t\\t\\t\\t\\t\\tbuf.push(getTextContent(node));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tnode = node.nextSibling;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn buf.join('');\\n\\t\\t\\tdefault:\\n\\t\\t\\t\\treturn node.nodeValue;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t__set__ = function(object,key,value){\\n\\t\\t\\t//console.log(value)\\n\\t\\t\\tobject['$$'+key] = value\\n\\t\\t}\\n\\t}\\n}catch(e){//ie8\\n}\\n\\n//if(typeof require == 'function'){\\n\\texports.DOMImplementation = DOMImplementation;\\n\\texports.XMLSerializer = XMLSerializer;\\n//}\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/xmldom/dom.js?\")},\"../node_modules/xmldom/sax.js\":function(module,exports){eval(\"//[4]   \\tNameStartChar\\t   ::=   \\t\\\":\\\" | [A-Z] | \\\"_\\\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\\r\\n//[4a]   \\tNameChar\\t   ::=   \\tNameStartChar | \\\"-\\\" | \\\".\\\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\\r\\n//[5]   \\tName\\t   ::=   \\tNameStartChar (NameChar)*\\r\\nvar nameStartChar = /[A-Z_a-z\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD]///\\\\u10000-\\\\uEFFFF\\r\\nvar nameChar = new RegExp(\\\"[\\\\\\\\-\\\\\\\\.0-9\\\"+nameStartChar.source.slice(1,-1)+\\\"\\\\\\\\u00B7\\\\\\\\u0300-\\\\\\\\u036F\\\\\\\\u203F-\\\\\\\\u2040]\\\");\\r\\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\\\:'+nameStartChar.source+nameChar.source+'*)?$');\\r\\n//var tagNamePattern = /^[a-zA-Z_][\\\\w\\\\-\\\\.]*(?:\\\\:[a-zA-Z_][\\\\w\\\\-\\\\.]*)?$/\\r\\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\\r\\n\\r\\n//S_TAG,\\tS_ATTR,\\tS_EQ,\\tS_ATTR_NOQUOT_VALUE\\r\\n//S_ATTR_SPACE,\\tS_ATTR_END,\\tS_TAG_SPACE, S_TAG_CLOSE\\r\\nvar S_TAG = 0;//tag name offerring\\r\\nvar S_ATTR = 1;//attr name offerring \\r\\nvar S_ATTR_SPACE=2;//attr name end and space offer\\r\\nvar S_EQ = 3;//=space?\\r\\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\\r\\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\\r\\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\\r\\nvar S_TAG_CLOSE = 7;//closed el<el />\\r\\n\\r\\nfunction XMLReader(){\\r\\n\\t\\r\\n}\\r\\n\\r\\nXMLReader.prototype = {\\r\\n\\tparse:function(source,defaultNSMap,entityMap){\\r\\n\\t\\tvar domBuilder = this.domBuilder;\\r\\n\\t\\tdomBuilder.startDocument();\\r\\n\\t\\t_copy(defaultNSMap ,defaultNSMap = {})\\r\\n\\t\\tparse(source,defaultNSMap,entityMap,\\r\\n\\t\\t\\t\\tdomBuilder,this.errorHandler);\\r\\n\\t\\tdomBuilder.endDocument();\\r\\n\\t}\\r\\n}\\r\\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\\r\\n\\tfunction fixedFromCharCode(code) {\\r\\n\\t\\t// String.prototype.fromCharCode does not supports\\r\\n\\t\\t// > 2 bytes unicode chars directly\\r\\n\\t\\tif (code > 0xffff) {\\r\\n\\t\\t\\tcode -= 0x10000;\\r\\n\\t\\t\\tvar surrogate1 = 0xd800 + (code >> 10)\\r\\n\\t\\t\\t\\t, surrogate2 = 0xdc00 + (code & 0x3ff);\\r\\n\\r\\n\\t\\t\\treturn String.fromCharCode(surrogate1, surrogate2);\\r\\n\\t\\t} else {\\r\\n\\t\\t\\treturn String.fromCharCode(code);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tfunction entityReplacer(a){\\r\\n\\t\\tvar k = a.slice(1,-1);\\r\\n\\t\\tif(k in entityMap){\\r\\n\\t\\t\\treturn entityMap[k]; \\r\\n\\t\\t}else if(k.charAt(0) === '#'){\\r\\n\\t\\t\\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\\r\\n\\t\\t}else{\\r\\n\\t\\t\\terrorHandler.error('entity not found:'+a);\\r\\n\\t\\t\\treturn a;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tfunction appendText(end){//has some bugs\\r\\n\\t\\tif(end>start){\\r\\n\\t\\t\\tvar xt = source.substring(start,end).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\tlocator&&position(start);\\r\\n\\t\\t\\tdomBuilder.characters(xt,0,end-start);\\r\\n\\t\\t\\tstart = end\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tfunction position(p,m){\\r\\n\\t\\twhile(p>=lineEnd && (m = linePattern.exec(source))){\\r\\n\\t\\t\\tlineStart = m.index;\\r\\n\\t\\t\\tlineEnd = lineStart + m[0].length;\\r\\n\\t\\t\\tlocator.lineNumber++;\\r\\n\\t\\t\\t//console.log('line++:',locator,startPos,endPos)\\r\\n\\t\\t}\\r\\n\\t\\tlocator.columnNumber = p-lineStart+1;\\r\\n\\t}\\r\\n\\tvar lineStart = 0;\\r\\n\\tvar lineEnd = 0;\\r\\n\\tvar linePattern = /.*(?:\\\\r\\\\n?|\\\\n)|.*$/g\\r\\n\\tvar locator = domBuilder.locator;\\r\\n\\t\\r\\n\\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\\r\\n\\tvar closeMap = {};\\r\\n\\tvar start = 0;\\r\\n\\twhile(true){\\r\\n\\t\\ttry{\\r\\n\\t\\t\\tvar tagStart = source.indexOf('<',start);\\r\\n\\t\\t\\tif(tagStart<0){\\r\\n\\t\\t\\t\\tif(!source.substr(start).match(/^\\\\s*$/)){\\r\\n\\t\\t\\t\\t\\tvar doc = domBuilder.doc;\\r\\n\\t    \\t\\t\\tvar text = doc.createTextNode(source.substr(start));\\r\\n\\t    \\t\\t\\tdoc.appendChild(text);\\r\\n\\t    \\t\\t\\tdomBuilder.currentElement = text;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\treturn;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(tagStart>start){\\r\\n\\t\\t\\t\\tappendText(tagStart);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tswitch(source.charAt(tagStart+1)){\\r\\n\\t\\t\\tcase '/':\\r\\n\\t\\t\\t\\tvar end = source.indexOf('>',tagStart+3);\\r\\n\\t\\t\\t\\tvar tagName = source.substring(tagStart+2,end);\\r\\n\\t\\t\\t\\tvar config = parseStack.pop();\\r\\n\\t\\t\\t\\tif(end<0){\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t        \\t\\ttagName = source.substring(tagStart+2).replace(/[\\\\s<].*/,'');\\r\\n\\t        \\t\\t//console.error('#@@@@@@'+tagName)\\r\\n\\t        \\t\\terrorHandler.error(\\\"end tag name: \\\"+tagName+' is not complete:'+config.tagName);\\r\\n\\t        \\t\\tend = tagStart+1+tagName.length;\\r\\n\\t        \\t}else if(tagName.match(/\\\\s</)){\\r\\n\\t        \\t\\ttagName = tagName.replace(/[\\\\s<].*/,'');\\r\\n\\t        \\t\\terrorHandler.error(\\\"end tag name: \\\"+tagName+' maybe not complete');\\r\\n\\t        \\t\\tend = tagStart+1+tagName.length;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//console.error(parseStack.length,parseStack)\\r\\n\\t\\t\\t\\t//console.error(config);\\r\\n\\t\\t\\t\\tvar localNSMap = config.localNSMap;\\r\\n\\t\\t\\t\\tvar endMatch = config.tagName == tagName;\\r\\n\\t\\t\\t\\tvar endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()\\r\\n\\t\\t        if(endIgnoreCaseMach){\\r\\n\\t\\t        \\tdomBuilder.endElement(config.uri,config.localName,tagName);\\r\\n\\t\\t\\t\\t\\tif(localNSMap){\\r\\n\\t\\t\\t\\t\\t\\tfor(var prefix in localNSMap){\\r\\n\\t\\t\\t\\t\\t\\t\\tdomBuilder.endPrefixMapping(prefix) ;\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tif(!endMatch){\\r\\n\\t\\t            \\terrorHandler.fatalError(\\\"end tag name: \\\"+tagName+' is not match the current start tagName:'+config.tagName );\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t        }else{\\r\\n\\t\\t        \\tparseStack.push(config)\\r\\n\\t\\t        }\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tend++;\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t// end elment\\r\\n\\t\\t\\tcase '?':// <?...?>\\r\\n\\t\\t\\t\\tlocator&&position(tagStart);\\r\\n\\t\\t\\t\\tend = parseInstruction(source,tagStart,domBuilder);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase '!':// <!doctype,<![CDATA,\\x3c!--\\r\\n\\t\\t\\t\\tlocator&&position(tagStart);\\r\\n\\t\\t\\t\\tend = parseDCC(source,tagStart,domBuilder,errorHandler);\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tdefault:\\r\\n\\t\\t\\t\\tlocator&&position(tagStart);\\r\\n\\t\\t\\t\\tvar el = new ElementAttributes();\\r\\n\\t\\t\\t\\tvar currentNSMap = parseStack[parseStack.length-1].currentNSMap;\\r\\n\\t\\t\\t\\t//elStartEnd\\r\\n\\t\\t\\t\\tvar end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);\\r\\n\\t\\t\\t\\tvar len = el.length;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){\\r\\n\\t\\t\\t\\t\\tel.closed = true;\\r\\n\\t\\t\\t\\t\\tif(!entityMap.nbsp){\\r\\n\\t\\t\\t\\t\\t\\terrorHandler.warning('unclosed xml attribute');\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(locator && len){\\r\\n\\t\\t\\t\\t\\tvar locator2 = copyLocator(locator,{});\\r\\n\\t\\t\\t\\t\\t//try{//attribute position fixed\\r\\n\\t\\t\\t\\t\\tfor(var i = 0;i<len;i++){\\r\\n\\t\\t\\t\\t\\t\\tvar a = el[i];\\r\\n\\t\\t\\t\\t\\t\\tposition(a.offset);\\r\\n\\t\\t\\t\\t\\t\\ta.locator = copyLocator(locator,{});\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t//}catch(e){console.error('@@@@@'+e)}\\r\\n\\t\\t\\t\\t\\tdomBuilder.locator = locator2\\r\\n\\t\\t\\t\\t\\tif(appendElement(el,domBuilder,currentNSMap)){\\r\\n\\t\\t\\t\\t\\t\\tparseStack.push(el)\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tdomBuilder.locator = locator;\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\tif(appendElement(el,domBuilder,currentNSMap)){\\r\\n\\t\\t\\t\\t\\t\\tparseStack.push(el)\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){\\r\\n\\t\\t\\t\\t\\tend = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\tend++;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}catch(e){\\r\\n\\t\\t\\terrorHandler.error('element parse error: '+e)\\r\\n\\t\\t\\t//errorHandler.error('element parse error: '+e);\\r\\n\\t\\t\\tend = -1;\\r\\n\\t\\t\\t//throw e;\\r\\n\\t\\t}\\r\\n\\t\\tif(end>start){\\r\\n\\t\\t\\tstart = end;\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t//TODO: 这里有可能sax回退,有位置错误风险\\r\\n\\t\\t\\tappendText(Math.max(tagStart,start)+1);\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\\r\\nfunction copyLocator(f,t){\\r\\n\\tt.lineNumber = f.lineNumber;\\r\\n\\tt.columnNumber = f.columnNumber;\\r\\n\\treturn t;\\r\\n}\\r\\n\\r\\n/**\\r\\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\\r\\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\\r\\n */\\r\\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\\r\\n\\tvar attrName;\\r\\n\\tvar value;\\r\\n\\tvar p = ++start;\\r\\n\\tvar s = S_TAG;//status\\r\\n\\twhile(true){\\r\\n\\t\\tvar c = source.charAt(p);\\r\\n\\t\\tswitch(c){\\r\\n\\t\\tcase '=':\\r\\n\\t\\t\\tif(s === S_ATTR){//attrName\\r\\n\\t\\t\\t\\tattrName = source.slice(start,p);\\r\\n\\t\\t\\t\\ts = S_EQ;\\r\\n\\t\\t\\t}else if(s === S_ATTR_SPACE){\\r\\n\\t\\t\\t\\ts = S_EQ;\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t//fatalError: equal must after attrName or space after attrName\\r\\n\\t\\t\\t\\tthrow new Error('attribute equal must after attrName');\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase '\\\\'':\\r\\n\\t\\tcase '\\\"':\\r\\n\\t\\t\\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\\r\\n\\t\\t\\t\\t){//equal\\r\\n\\t\\t\\t\\tif(s === S_ATTR){\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute value must after \\\"=\\\"')\\r\\n\\t\\t\\t\\t\\tattrName = source.slice(start,p)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tstart = p+1;\\r\\n\\t\\t\\t\\tp = source.indexOf(c,start)\\r\\n\\t\\t\\t\\tif(p>0){\\r\\n\\t\\t\\t\\t\\tvalue = source.slice(start,p).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\t\\tel.add(attrName,value,start-1);\\r\\n\\t\\t\\t\\t\\ts = S_ATTR_END;\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\t//fatalError: no end quot match\\r\\n\\t\\t\\t\\t\\tthrow new Error('attribute value no end \\\\''+c+'\\\\' match');\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}else if(s == S_ATTR_NOQUOT_VALUE){\\r\\n\\t\\t\\t\\tvalue = source.slice(start,p).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\t//console.log(attrName,value,start,p)\\r\\n\\t\\t\\t\\tel.add(attrName,value,start);\\r\\n\\t\\t\\t\\t//console.dir(el)\\r\\n\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+attrName+'\\\" missed start quot('+c+')!!');\\r\\n\\t\\t\\t\\tstart = p+1;\\r\\n\\t\\t\\t\\ts = S_ATTR_END\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t//fatalError: no equal before\\r\\n\\t\\t\\t\\tthrow new Error('attribute value must after \\\"=\\\"');\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase '/':\\r\\n\\t\\t\\tswitch(s){\\r\\n\\t\\t\\tcase S_TAG:\\r\\n\\t\\t\\t\\tel.setTagName(source.slice(start,p));\\r\\n\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\tcase S_TAG_SPACE:\\r\\n\\t\\t\\tcase S_TAG_CLOSE:\\r\\n\\t\\t\\t\\ts =S_TAG_CLOSE;\\r\\n\\t\\t\\t\\tel.closed = true;\\r\\n\\t\\t\\tcase S_ATTR_NOQUOT_VALUE:\\r\\n\\t\\t\\tcase S_ATTR:\\r\\n\\t\\t\\tcase S_ATTR_SPACE:\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t//case S_EQ:\\r\\n\\t\\t\\tdefault:\\r\\n\\t\\t\\t\\tthrow new Error(\\\"attribute invalid close char('/')\\\")\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tbreak;\\r\\n\\t\\tcase ''://end document\\r\\n\\t\\t\\t//throw new Error('unexpected end of input')\\r\\n\\t\\t\\terrorHandler.error('unexpected end of input');\\r\\n\\t\\t\\tif(s == S_TAG){\\r\\n\\t\\t\\t\\tel.setTagName(source.slice(start,p));\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn p;\\r\\n\\t\\tcase '>':\\r\\n\\t\\t\\tswitch(s){\\r\\n\\t\\t\\tcase S_TAG:\\r\\n\\t\\t\\t\\tel.setTagName(source.slice(start,p));\\r\\n\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\tcase S_TAG_SPACE:\\r\\n\\t\\t\\tcase S_TAG_CLOSE:\\r\\n\\t\\t\\t\\tbreak;//normal\\r\\n\\t\\t\\tcase S_ATTR_NOQUOT_VALUE://Compatible state\\r\\n\\t\\t\\tcase S_ATTR:\\r\\n\\t\\t\\t\\tvalue = source.slice(start,p);\\r\\n\\t\\t\\t\\tif(value.slice(-1) === '/'){\\r\\n\\t\\t\\t\\t\\tel.closed  = true;\\r\\n\\t\\t\\t\\t\\tvalue = value.slice(0,-1)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\tcase S_ATTR_SPACE:\\r\\n\\t\\t\\t\\tif(s === S_ATTR_SPACE){\\r\\n\\t\\t\\t\\t\\tvalue = attrName;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tif(s == S_ATTR_NOQUOT_VALUE){\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+value+'\\\" missed quot(\\\")!!');\\r\\n\\t\\t\\t\\t\\tel.add(attrName,value.replace(/&#?\\\\w+;/g,entityReplacer),start)\\r\\n\\t\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t\\tif(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){\\r\\n\\t\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+value+'\\\" missed value!! \\\"'+value+'\\\" instead!!')\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tel.add(value,value,start)\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\tcase S_EQ:\\r\\n\\t\\t\\t\\tthrow new Error('attribute value missed!!');\\r\\n\\t\\t\\t}\\r\\n//\\t\\t\\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\\r\\n\\t\\t\\treturn p;\\r\\n\\t\\t/*xml space '\\\\x20' | #x9 | #xD | #xA; */\\r\\n\\t\\tcase '\\\\u0080':\\r\\n\\t\\t\\tc = ' ';\\r\\n\\t\\tdefault:\\r\\n\\t\\t\\tif(c<= ' '){//space\\r\\n\\t\\t\\t\\tswitch(s){\\r\\n\\t\\t\\t\\tcase S_TAG:\\r\\n\\t\\t\\t\\t\\tel.setTagName(source.slice(start,p));//tagName\\r\\n\\t\\t\\t\\t\\ts = S_TAG_SPACE;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_ATTR:\\r\\n\\t\\t\\t\\t\\tattrName = source.slice(start,p)\\r\\n\\t\\t\\t\\t\\ts = S_ATTR_SPACE;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_ATTR_NOQUOT_VALUE:\\r\\n\\t\\t\\t\\t\\tvar value = source.slice(start,p).replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+value+'\\\" missed quot(\\\")!!');\\r\\n\\t\\t\\t\\t\\tel.add(attrName,value,start)\\r\\n\\t\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\t\\t\\ts = S_TAG_SPACE;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t//case S_TAG_SPACE:\\r\\n\\t\\t\\t\\t//case S_EQ:\\r\\n\\t\\t\\t\\t//case S_ATTR_SPACE:\\r\\n\\t\\t\\t\\t//\\tvoid();break;\\r\\n\\t\\t\\t\\t//case S_TAG_CLOSE:\\r\\n\\t\\t\\t\\t\\t//ignore warning\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}else{//not space\\r\\n//S_TAG,\\tS_ATTR,\\tS_EQ,\\tS_ATTR_NOQUOT_VALUE\\r\\n//S_ATTR_SPACE,\\tS_ATTR_END,\\tS_TAG_SPACE, S_TAG_CLOSE\\r\\n\\t\\t\\t\\tswitch(s){\\r\\n\\t\\t\\t\\t//case S_TAG:void();break;\\r\\n\\t\\t\\t\\t//case S_ATTR:void();break;\\r\\n\\t\\t\\t\\t//case S_ATTR_NOQUOT_VALUE:void();break;\\r\\n\\t\\t\\t\\tcase S_ATTR_SPACE:\\r\\n\\t\\t\\t\\t\\tvar tagName =  el.tagName;\\r\\n\\t\\t\\t\\t\\tif(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){\\r\\n\\t\\t\\t\\t\\t\\terrorHandler.warning('attribute \\\"'+attrName+'\\\" missed value!! \\\"'+attrName+'\\\" instead2!!')\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tel.add(attrName,attrName,start);\\r\\n\\t\\t\\t\\t\\tstart = p;\\r\\n\\t\\t\\t\\t\\ts = S_ATTR;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_ATTR_END:\\r\\n\\t\\t\\t\\t\\terrorHandler.warning('attribute space is required\\\"'+attrName+'\\\"!!')\\r\\n\\t\\t\\t\\tcase S_TAG_SPACE:\\r\\n\\t\\t\\t\\t\\ts = S_ATTR;\\r\\n\\t\\t\\t\\t\\tstart = p;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_EQ:\\r\\n\\t\\t\\t\\t\\ts = S_ATTR_NOQUOT_VALUE;\\r\\n\\t\\t\\t\\t\\tstart = p;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase S_TAG_CLOSE:\\r\\n\\t\\t\\t\\t\\tthrow new Error(\\\"elements closed character '/' and '>' must be connected to\\\");\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}//end outer switch\\r\\n\\t\\t//console.log('p++',p)\\r\\n\\t\\tp++;\\r\\n\\t}\\r\\n}\\r\\n/**\\r\\n * @return true if has new namespace define\\r\\n */\\r\\nfunction appendElement(el,domBuilder,currentNSMap){\\r\\n\\tvar tagName = el.tagName;\\r\\n\\tvar localNSMap = null;\\r\\n\\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\\r\\n\\tvar i = el.length;\\r\\n\\twhile(i--){\\r\\n\\t\\tvar a = el[i];\\r\\n\\t\\tvar qName = a.qName;\\r\\n\\t\\tvar value = a.value;\\r\\n\\t\\tvar nsp = qName.indexOf(':');\\r\\n\\t\\tif(nsp>0){\\r\\n\\t\\t\\tvar prefix = a.prefix = qName.slice(0,nsp);\\r\\n\\t\\t\\tvar localName = qName.slice(nsp+1);\\r\\n\\t\\t\\tvar nsPrefix = prefix === 'xmlns' && localName\\r\\n\\t\\t}else{\\r\\n\\t\\t\\tlocalName = qName;\\r\\n\\t\\t\\tprefix = null\\r\\n\\t\\t\\tnsPrefix = qName === 'xmlns' && ''\\r\\n\\t\\t}\\r\\n\\t\\t//can not set prefix,because prefix !== ''\\r\\n\\t\\ta.localName = localName ;\\r\\n\\t\\t//prefix == null for no ns prefix attribute \\r\\n\\t\\tif(nsPrefix !== false){//hack!!\\r\\n\\t\\t\\tif(localNSMap == null){\\r\\n\\t\\t\\t\\tlocalNSMap = {}\\r\\n\\t\\t\\t\\t//console.log(currentNSMap,0)\\r\\n\\t\\t\\t\\t_copy(currentNSMap,currentNSMap={})\\r\\n\\t\\t\\t\\t//console.log(currentNSMap,1)\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\\r\\n\\t\\t\\ta.uri = 'http://www.w3.org/2000/xmlns/'\\r\\n\\t\\t\\tdomBuilder.startPrefixMapping(nsPrefix, value) \\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tvar i = el.length;\\r\\n\\twhile(i--){\\r\\n\\t\\ta = el[i];\\r\\n\\t\\tvar prefix = a.prefix;\\r\\n\\t\\tif(prefix){//no prefix attribute has no namespace\\r\\n\\t\\t\\tif(prefix === 'xml'){\\r\\n\\t\\t\\t\\ta.uri = 'http://www.w3.org/XML/1998/namespace';\\r\\n\\t\\t\\t}if(prefix !== 'xmlns'){\\r\\n\\t\\t\\t\\ta.uri = currentNSMap[prefix || '']\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\tvar nsp = tagName.indexOf(':');\\r\\n\\tif(nsp>0){\\r\\n\\t\\tprefix = el.prefix = tagName.slice(0,nsp);\\r\\n\\t\\tlocalName = el.localName = tagName.slice(nsp+1);\\r\\n\\t}else{\\r\\n\\t\\tprefix = null;//important!!\\r\\n\\t\\tlocalName = el.localName = tagName;\\r\\n\\t}\\r\\n\\t//no prefix element has default namespace\\r\\n\\tvar ns = el.uri = currentNSMap[prefix || ''];\\r\\n\\tdomBuilder.startElement(ns,localName,tagName,el);\\r\\n\\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\\r\\n\\t//localNSMap = null\\r\\n\\tif(el.closed){\\r\\n\\t\\tdomBuilder.endElement(ns,localName,tagName);\\r\\n\\t\\tif(localNSMap){\\r\\n\\t\\t\\tfor(prefix in localNSMap){\\r\\n\\t\\t\\t\\tdomBuilder.endPrefixMapping(prefix) \\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}else{\\r\\n\\t\\tel.currentNSMap = currentNSMap;\\r\\n\\t\\tel.localNSMap = localNSMap;\\r\\n\\t\\t//parseStack.push(el);\\r\\n\\t\\treturn true;\\r\\n\\t}\\r\\n}\\r\\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\\r\\n\\tif(/^(?:script|textarea)$/i.test(tagName)){\\r\\n\\t\\tvar elEndStart =  source.indexOf('</'+tagName+'>',elStartEnd);\\r\\n\\t\\tvar text = source.substring(elStartEnd+1,elEndStart);\\r\\n\\t\\tif(/[&<]/.test(text)){\\r\\n\\t\\t\\tif(/^script$/i.test(tagName)){\\r\\n\\t\\t\\t\\t//if(!/\\\\]\\\\]>/.test(text)){\\r\\n\\t\\t\\t\\t\\t//lexHandler.startCDATA();\\r\\n\\t\\t\\t\\t\\tdomBuilder.characters(text,0,text.length);\\r\\n\\t\\t\\t\\t\\t//lexHandler.endCDATA();\\r\\n\\t\\t\\t\\t\\treturn elEndStart;\\r\\n\\t\\t\\t\\t//}\\r\\n\\t\\t\\t}//}else{//text area\\r\\n\\t\\t\\t\\ttext = text.replace(/&#?\\\\w+;/g,entityReplacer);\\r\\n\\t\\t\\t\\tdomBuilder.characters(text,0,text.length);\\r\\n\\t\\t\\t\\treturn elEndStart;\\r\\n\\t\\t\\t//}\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn elStartEnd+1;\\r\\n}\\r\\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\\r\\n\\t//if(tagName in closeMap){\\r\\n\\tvar pos = closeMap[tagName];\\r\\n\\tif(pos == null){\\r\\n\\t\\t//console.log(tagName)\\r\\n\\t\\tpos =  source.lastIndexOf('</'+tagName+'>')\\r\\n\\t\\tif(pos<elStartEnd){//忘记闭合\\r\\n\\t\\t\\tpos = source.lastIndexOf('</'+tagName)\\r\\n\\t\\t}\\r\\n\\t\\tcloseMap[tagName] =pos\\r\\n\\t}\\r\\n\\treturn pos<elStartEnd;\\r\\n\\t//} \\r\\n}\\r\\nfunction _copy(source,target){\\r\\n\\tfor(var n in source){target[n] = source[n]}\\r\\n}\\r\\nfunction parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'\\r\\n\\tvar next= source.charAt(start+2)\\r\\n\\tswitch(next){\\r\\n\\tcase '-':\\r\\n\\t\\tif(source.charAt(start + 3) === '-'){\\r\\n\\t\\t\\tvar end = source.indexOf('--\\x3e',start+4);\\r\\n\\t\\t\\t//append comment source.substring(4,end)//\\x3c!--\\r\\n\\t\\t\\tif(end>start){\\r\\n\\t\\t\\t\\tdomBuilder.comment(source,start+4,end-start-4);\\r\\n\\t\\t\\t\\treturn end+3;\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\terrorHandler.error(\\\"Unclosed comment\\\");\\r\\n\\t\\t\\t\\treturn -1;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t//error\\r\\n\\t\\t\\treturn -1;\\r\\n\\t\\t}\\r\\n\\tdefault:\\r\\n\\t\\tif(source.substr(start+3,6) == 'CDATA['){\\r\\n\\t\\t\\tvar end = source.indexOf(']]>',start+9);\\r\\n\\t\\t\\tdomBuilder.startCDATA();\\r\\n\\t\\t\\tdomBuilder.characters(source,start+9,end-start-9);\\r\\n\\t\\t\\tdomBuilder.endCDATA() \\r\\n\\t\\t\\treturn end+3;\\r\\n\\t\\t}\\r\\n\\t\\t//<!DOCTYPE\\r\\n\\t\\t//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) \\r\\n\\t\\tvar matchs = split(source,start);\\r\\n\\t\\tvar len = matchs.length;\\r\\n\\t\\tif(len>1 && /!doctype/i.test(matchs[0][0])){\\r\\n\\t\\t\\tvar name = matchs[1][0];\\r\\n\\t\\t\\tvar pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]\\r\\n\\t\\t\\tvar sysid = len>4 && matchs[4][0];\\r\\n\\t\\t\\tvar lastMatch = matchs[len-1]\\r\\n\\t\\t\\tdomBuilder.startDTD(name,pubid && pubid.replace(/^(['\\\"])(.*?)\\\\1$/,'$2'),\\r\\n\\t\\t\\t\\t\\tsysid && sysid.replace(/^(['\\\"])(.*?)\\\\1$/,'$2'));\\r\\n\\t\\t\\tdomBuilder.endDTD();\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn lastMatch.index+lastMatch[0].length\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn -1;\\r\\n}\\r\\n\\r\\n\\r\\n\\r\\nfunction parseInstruction(source,start,domBuilder){\\r\\n\\tvar end = source.indexOf('?>',start);\\r\\n\\tif(end){\\r\\n\\t\\tvar match = source.substring(start,end).match(/^<\\\\?(\\\\S*)\\\\s*([\\\\s\\\\S]*?)\\\\s*$/);\\r\\n\\t\\tif(match){\\r\\n\\t\\t\\tvar len = match[0].length;\\r\\n\\t\\t\\tdomBuilder.processingInstruction(match[1], match[2]) ;\\r\\n\\t\\t\\treturn end+2;\\r\\n\\t\\t}else{//error\\r\\n\\t\\t\\treturn -1;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn -1;\\r\\n}\\r\\n\\r\\n/**\\r\\n * @param source\\r\\n */\\r\\nfunction ElementAttributes(source){\\r\\n\\t\\r\\n}\\r\\nElementAttributes.prototype = {\\r\\n\\tsetTagName:function(tagName){\\r\\n\\t\\tif(!tagNamePattern.test(tagName)){\\r\\n\\t\\t\\tthrow new Error('invalid tagName:'+tagName)\\r\\n\\t\\t}\\r\\n\\t\\tthis.tagName = tagName\\r\\n\\t},\\r\\n\\tadd:function(qName,value,offset){\\r\\n\\t\\tif(!tagNamePattern.test(qName)){\\r\\n\\t\\t\\tthrow new Error('invalid attribute:'+qName)\\r\\n\\t\\t}\\r\\n\\t\\tthis[this.length++] = {qName:qName,value:value,offset:offset}\\r\\n\\t},\\r\\n\\tlength:0,\\r\\n\\tgetLocalName:function(i){return this[i].localName},\\r\\n\\tgetLocator:function(i){return this[i].locator},\\r\\n\\tgetQName:function(i){return this[i].qName},\\r\\n\\tgetURI:function(i){return this[i].uri},\\r\\n\\tgetValue:function(i){return this[i].value}\\r\\n//\\t,getIndex:function(uri, localName)){\\r\\n//\\t\\tif(localName){\\r\\n//\\t\\t\\t\\r\\n//\\t\\t}else{\\r\\n//\\t\\t\\tvar qName = uri\\r\\n//\\t\\t}\\r\\n//\\t},\\r\\n//\\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\\r\\n//\\tgetType:function(uri,localName){}\\r\\n//\\tgetType:function(i){},\\r\\n}\\r\\n\\r\\n\\r\\n\\r\\n\\r\\nfunction _set_proto_(thiz,parent){\\r\\n\\tthiz.__proto__ = parent;\\r\\n\\treturn thiz;\\r\\n}\\r\\nif(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){\\r\\n\\t_set_proto_ = function(thiz,parent){\\r\\n\\t\\tfunction p(){};\\r\\n\\t\\tp.prototype = parent;\\r\\n\\t\\tp = new p();\\r\\n\\t\\tfor(parent in thiz){\\r\\n\\t\\t\\tp[parent] = thiz[parent];\\r\\n\\t\\t}\\r\\n\\t\\treturn p;\\r\\n\\t}\\r\\n}\\r\\n\\r\\nfunction split(source,start){\\r\\n\\tvar match;\\r\\n\\tvar buf = [];\\r\\n\\tvar reg = /'[^']+'|\\\"[^\\\"]+\\\"|[^\\\\s<>\\\\/=]+=?|(\\\\/?\\\\s*>|<)/g;\\r\\n\\treg.lastIndex = start;\\r\\n\\treg.exec(source);//skip <\\r\\n\\twhile(match = reg.exec(source)){\\r\\n\\t\\tbuf.push(match);\\r\\n\\t\\tif(match[1])return buf;\\r\\n\\t}\\r\\n}\\r\\n\\r\\nexports.XMLReader = XMLReader;\\r\\n\\r\\n\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/../node_modules/xmldom/sax.js?\")},\"./assets/styles/components/playlist.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/playlist.scss?\")},\"./assets/styles/components/thumbnail.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/thumbnail.scss?\")},\"./assets/styles/components/title-bar.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/title-bar.scss?\")},\"./assets/styles/components/triangle-volume-bar.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/components/triangle-volume-bar.scss?\")},\"./assets/styles/main.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./assets/styles/main.scss?\")},\"./components/component-utils.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nvar hide = function hide(el) {\\n  el.style.display = 'none';\\n};\\n\\nvar show = function show(el) {\\n  el.style.display = '';\\n};\\n\\nvar setText = function setText(el, text) {\\n  if (!text || text.length <= 0) {\\n    el.innerText = '';\\n    hide(el);\\n    return;\\n  }\\n\\n  el.innerText = text;\\n  show(el);\\n};\\n\\nmodule.exports = {\\n  hide: hide,\\n  show: show,\\n  setText: setText\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/component-utils.js?\")},\"./components/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nObject.defineProperty(exports, \"JumpForwardButton\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _jump10Plus.default;\\n  }\\n});\\nObject.defineProperty(exports, \"JumpBackButton\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _jump10Minus.default;\\n  }\\n});\\nObject.defineProperty(exports, \"LogoButton\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _logoButton.default;\\n  }\\n});\\nObject.defineProperty(exports, \"PlaylistPanel\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _playlistPanel.default;\\n  }\\n});\\nObject.defineProperty(exports, \"ProgressControlEventsBlocker\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _progressControlEventsBlocker.default;\\n  }\\n});\\nObject.defineProperty(exports, \"RecommendationsOverlay\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _recommendationsOverlay.default;\\n  }\\n});\\nObject.defineProperty(exports, \"ShoppablePanel\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _shoppablePanel.default;\\n  }\\n});\\nObject.defineProperty(exports, \"TitleBar\", {\\n  enumerable: true,\\n  get: function get() {\\n    return _titleBar.default;\\n  }\\n});\\n\\nvar _jump10Plus = _interopRequireDefault(__webpack_require__(/*! ./jumpButtons/jump-10-plus */ \"./components/jumpButtons/jump-10-plus.js\"));\\n\\nvar _jump10Minus = _interopRequireDefault(__webpack_require__(/*! ./jumpButtons/jump-10-minus */ \"./components/jumpButtons/jump-10-minus.js\"));\\n\\nvar _logoButton = _interopRequireDefault(__webpack_require__(/*! ./logoButton/logo-button */ \"./components/logoButton/logo-button.js\"));\\n\\nvar _playlistPanel = _interopRequireDefault(__webpack_require__(/*! ./playlist/panel/playlist-panel */ \"./components/playlist/panel/playlist-panel.js\"));\\n\\nvar _progressControlEventsBlocker = _interopRequireDefault(__webpack_require__(/*! ./progress-control-events-blocker/progress-control-events-blocker */ \"./components/progress-control-events-blocker/progress-control-events-blocker.js\"));\\n\\nvar _recommendationsOverlay = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay */ \"./components/recommendations-overlay/index.js\"));\\n\\nvar _shoppablePanel = _interopRequireDefault(__webpack_require__(/*! ./shoppable-bar/panel/shoppable-panel */ \"./components/shoppable-bar/panel/shoppable-panel.js\"));\\n\\nvar _titleBar = _interopRequireDefault(__webpack_require__(/*! ./title-bar/title-bar */ \"./components/title-bar/title-bar.js\"));\\n\\n__webpack_require__(/*! assets/styles/components/triangle-volume-bar.scss */ \"./assets/styles/components/triangle-volume-bar.scss\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/index.js?')},\"./components/jumpButtons/jump-10-minus.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar JumpBackButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(JumpBackButton, _ClickableComponent);\\n\\n  var _super = _createSuper(JumpBackButton);\\n\\n  function JumpBackButton() {\\n    _classCallCheck(this, JumpBackButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(JumpBackButton, [{\\n    key: \"handleClick\",\\n    value: function handleClick(event) {\\n      _get(_getPrototypeOf(JumpBackButton.prototype), \"handleClick\", this).call(this, event);\\n\\n      this.player().currentTime(this.player().currentTime() - 10);\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      return _video.default.dom.createEl(\\'button\\', {\\n        className: \\'vjs-control vjs-icon-skip-10-min vjs-button\\'\\n      });\\n    }\\n  }]);\\n\\n  return JumpBackButton;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent(\\'JumpBackButton\\', JumpBackButton);\\n\\nvar _default = JumpBackButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/jumpButtons/jump-10-minus.js?')},\"./components/jumpButtons/jump-10-plus.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar JumpForwardButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(JumpForwardButton, _ClickableComponent);\\n\\n  var _super = _createSuper(JumpForwardButton);\\n\\n  function JumpForwardButton() {\\n    _classCallCheck(this, JumpForwardButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(JumpForwardButton, [{\\n    key: \"handleClick\",\\n    value: function handleClick(event) {\\n      _get(_getPrototypeOf(JumpForwardButton.prototype), \"handleClick\", this).call(this, event);\\n\\n      this.player().currentTime(this.player().currentTime() + 10);\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      return _video.default.dom.createEl(\\'button\\', {\\n        className: \\'vjs-control vjs-icon-skip-10-plus vjs-button\\'\\n      });\\n    }\\n  }]);\\n\\n  return JumpForwardButton;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent(\\'JumpForwardButton\\', JumpForwardButton);\\n\\nvar _default = JumpForwardButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/jumpButtons/jump-10-plus.js?')},\"./components/logoButton/logo-button.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\n__webpack_require__(/*! ./logo-button.scss */ \"./components/logoButton/logo-button.scss\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar LIGHT_BG_ICON = \\'https://res.cloudinary.com/cloudinary-marketing/image/upload/v1597164189/creative_source/Logo/Cloud%20Glyph/cloudinary_cloud_glyph_regular.svg\\';\\nvar DARK_BG_ICON = \\'https://res.cloudinary.com/cloudinary-marketing/image/upload/v1597164191/creative_source/Logo/Cloud%20Glyph/cloudinary_cloud_glyph_white.svg\\'; // support VJS5 & VJS6 at the same time\\n\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar LogoButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(LogoButton, _ClickableComponent);\\n\\n  var _super = _createSuper(LogoButton);\\n\\n  function LogoButton() {\\n    _classCallCheck(this, LogoButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(LogoButton, [{\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var opts = this.options_.playerOptions;\\n      var display = opts.showLogo ? \\'block\\' : \\'none\\';\\n      var bgIcon = \\'\\';\\n\\n      if (opts.logoImageUrl) {\\n        bgIcon = opts.logoImageUrl;\\n      } else {\\n        var isLight = opts.class.indexOf(\\'cld-video-player-skin-light\\') > -1 || opts.skin === \\'light\\';\\n        bgIcon = isLight ? LIGHT_BG_ICON : DARK_BG_ICON;\\n      }\\n\\n      return _video.default.dom.createEl(\\'a\\', {}, {\\n        class: \\'vjs-control vjs-cloudinary-button vjs-button\\',\\n        href: opts.logoOnclickUrl,\\n        target: \\'_blank\\',\\n        style: \"display: \".concat(display, \"; background-image: url(\").concat(bgIcon, \")\")\\n      });\\n    }\\n  }]);\\n\\n  return LogoButton;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent(\\'logoButton\\', LogoButton);\\n\\nvar _default = LogoButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/logoButton/logo-button.js?')},\"./components/logoButton/logo-button.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/logoButton/logo-button.scss?\")},\"./components/playlist/components/upcoming-video-overlay.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! ./upcoming-video-overlay.scss */ \\\"./components/playlist/components/upcoming-video-overlay.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar UpcomingVideoOverlay = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(UpcomingVideoOverlay, _ClickableComponent);\\n\\n  var _super = _createSuper(UpcomingVideoOverlay);\\n\\n  function UpcomingVideoOverlay(player) {\\n    var _this;\\n\\n    _classCallCheck(this, UpcomingVideoOverlay);\\n\\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n      args[_key - 1] = arguments[_key];\\n    }\\n\\n    _this = _super.call.apply(_super, [this, player].concat(args));\\n\\n    var show = function show() {\\n      if (_typeof(_this.player().ima) === 'object' && _this.player().ima.getAdsManager()) {\\n        if (!_this.player().ima.getAdsManager().getCurrentAd() || _this.player().ima.getAdsManager().getCurrentAd().isLinear()) {\\n          _this.addClass('vjs-upcoming-video-show');\\n        }\\n      } else {\\n        _this.addClass('vjs-upcoming-video-show');\\n      }\\n    };\\n\\n    var hide = function hide() {\\n      _this.removeClass('vjs-upcoming-video-show');\\n    };\\n\\n    var disableTransition = function disableTransition(block) {\\n      _this.addClass('disable-transition');\\n\\n      block();\\n\\n      _this.removeClass('disable-transition');\\n    };\\n\\n    var onPlaylistItemChange = function onPlaylistItemChange(_, event) {\\n      hide();\\n      disableTransition(function () {\\n        if (event.next) {\\n          _this.setItem(event.next);\\n        }\\n      });\\n    };\\n\\n    player.on('upcomingvideoshow', show);\\n    player.on('upcomingvideohide', hide);\\n    player.on('playlistitemchanged', onPlaylistItemChange);\\n    return _this;\\n  }\\n\\n  _createClass(UpcomingVideoOverlay, [{\\n    key: \\\"setTitle\\\",\\n    value: function setTitle(source) {\\n      var title = this.getChild('upcomingVideoOverlayContent').getChild('upcomingVideoOverlayBar').getChild('upcomingVideoOverlayTitle');\\n      title.setContent(source.info().title || source.publicId());\\n    }\\n  }, {\\n    key: \\\"setItem\\\",\\n    value: function setItem(source) {\\n      this._source = source;\\n      var maxWidth = parseInt(window.getComputedStyle(this.el(), null).getPropertyValue('max-width'), 10);\\n      var maxHeight = Math.round(maxWidth * (9 / 16.0));\\n      var transformation = {\\n        crop: 'pad',\\n        background: 'auto:predominant',\\n        width: maxWidth,\\n        height: maxHeight\\n      };\\n      var content = this.getChild('upcomingVideoOverlayContent');\\n      this.setTitle(source);\\n      content.el().style.backgroundImage = \\\"url(\\\".concat(this._source.poster().url({\\n        transformation: transformation\\n      }), \\\")\\\");\\n    }\\n  }, {\\n    key: \\\"handleClick\\\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(UpcomingVideoOverlay.prototype), \\\"handleClick\\\", this).call(this, event);\\n\\n      this.player().cloudinary.playlist().playNext();\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(UpcomingVideoOverlay.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-upcoming-video'\\n      });\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlay;\\n}(ClickableComponent);\\n\\nvar UpcomingVideoOverlayContent = /*#__PURE__*/function (_Component) {\\n  _inherits(UpcomingVideoOverlayContent, _Component);\\n\\n  var _super2 = _createSuper(UpcomingVideoOverlayContent);\\n\\n  function UpcomingVideoOverlayContent() {\\n    _classCallCheck(this, UpcomingVideoOverlayContent);\\n\\n    return _super2.apply(this, arguments);\\n  }\\n\\n  _createClass(UpcomingVideoOverlayContent, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      // Content wraps image and bar\\n      return _get(_getPrototypeOf(UpcomingVideoOverlayContent.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'aspect-ratio-content'\\n      });\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlayContent;\\n}(Component);\\n\\nvar UpcomingVideoOverlayTitle = /*#__PURE__*/function (_Component2) {\\n  _inherits(UpcomingVideoOverlayTitle, _Component2);\\n\\n  var _super3 = _createSuper(UpcomingVideoOverlayTitle);\\n\\n  function UpcomingVideoOverlayTitle() {\\n    _classCallCheck(this, UpcomingVideoOverlayTitle);\\n\\n    return _super3.apply(this, arguments);\\n  }\\n\\n  _createClass(UpcomingVideoOverlayTitle, [{\\n    key: \\\"setContent\\\",\\n    value: function setContent(title) {\\n      this._contentSpan.innerText = title;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(UpcomingVideoOverlayTitle.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-control vjs-upcoming-video-title'\\n      });\\n\\n      var container = dom.createEl('div', {\\n        className: 'vjs-upcoming-video-title-display',\\n        innerHTML: '<span class=\\\"vjs-control-text\\\">Next up</span>Next up: '\\n      });\\n      this._contentSpan = dom.createEl('span', {\\n        className: 'vjs-upcoming-video-title-display-label'\\n      });\\n      container.appendChild(this._contentSpan);\\n      el.appendChild(container);\\n      return el;\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlayTitle;\\n}(Component);\\n\\nvar UpcomingVideoOverlayBar = /*#__PURE__*/function (_Component3) {\\n  _inherits(UpcomingVideoOverlayBar, _Component3);\\n\\n  var _super4 = _createSuper(UpcomingVideoOverlayBar);\\n\\n  function UpcomingVideoOverlayBar() {\\n    _classCallCheck(this, UpcomingVideoOverlayBar);\\n\\n    return _super4.apply(this, arguments);\\n  }\\n\\n  _createClass(UpcomingVideoOverlayBar, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(UpcomingVideoOverlayBar.prototype), \\\"createEl\\\", this).call(this, 'div', {\\n        className: 'vjs-upcoming-video-bar'\\n      });\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return UpcomingVideoOverlayBar;\\n}(Component);\\n\\nUpcomingVideoOverlay.prototype.options_ = {\\n  children: ['upcomingVideoOverlayContent']\\n};\\n\\n_video.default.registerComponent('upcomingVideoOverlay', UpcomingVideoOverlay);\\n\\nUpcomingVideoOverlayContent.prototype.options_ = {\\n  children: ['upcomingVideoOverlayBar']\\n};\\n\\n_video.default.registerComponent('upcomingVideoOverlayContent', UpcomingVideoOverlayContent);\\n\\nUpcomingVideoOverlayBar.prototype.options_ = {\\n  children: ['upcomingVideoOverlayTitle', 'playlistNextButton']\\n};\\n\\n_video.default.registerComponent('upcomingVideoOverlayBar', UpcomingVideoOverlayBar);\\n\\n_video.default.registerComponent('upcomingVideoOverlayTitle', UpcomingVideoOverlayTitle);\\n\\nvar _default = UpcomingVideoOverlay;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/components/upcoming-video-overlay.js?\")},\"./components/playlist/components/upcoming-video-overlay.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/components/upcoming-video-overlay.scss?\")},\"./components/playlist/layout/playlist-layout-custom.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlistLayout = _interopRequireDefault(__webpack_require__(/*! ./playlist-layout */ \"./components/playlist/layout/playlist-layout.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar PlaylistLayoutCustom = /*#__PURE__*/function (_PlaylistLayout) {\\n  _inherits(PlaylistLayoutCustom, _PlaylistLayout);\\n\\n  var _super = _createSuper(PlaylistLayoutCustom);\\n\\n  function PlaylistLayoutCustom() {\\n    _classCallCheck(this, PlaylistLayoutCustom);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(PlaylistLayoutCustom, [{\\n    key: \"getCls\",\\n    value: function getCls() {\\n      var cls = _get(_getPrototypeOf(PlaylistLayoutCustom.prototype), \"getCls\", this).call(this);\\n\\n      cls.push(\\'cld-plw-custom\\');\\n      return cls;\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistLayoutCustom.prototype), \"createEl\", this).call(this);\\n\\n      this.options_.renderTo.appendChild(el);\\n      return el;\\n    }\\n  }]);\\n\\n  return PlaylistLayoutCustom;\\n}(_playlistLayout.default);\\n\\nvar _default = PlaylistLayoutCustom;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout-custom.js?')},\"./components/playlist/layout/playlist-layout-horizontal.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlistLayout = _interopRequireDefault(__webpack_require__(/*! ./playlist-layout */ \"./components/playlist/layout/playlist-layout.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar PlaylistLayoutHorizontal = /*#__PURE__*/function (_PlaylistLayout) {\\n  _inherits(PlaylistLayoutHorizontal, _PlaylistLayout);\\n\\n  var _super = _createSuper(PlaylistLayoutHorizontal);\\n\\n  function PlaylistLayoutHorizontal(player, options) {\\n    _classCallCheck(this, PlaylistLayoutHorizontal);\\n\\n    options.wrap = true;\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(PlaylistLayoutHorizontal, [{\\n    key: \"getCls\",\\n    value: function getCls() {\\n      var cls = _get(_getPrototypeOf(PlaylistLayoutHorizontal.prototype), \"getCls\", this).call(this);\\n\\n      cls.push(\\'cld-plw-horizontal\\');\\n      return cls;\\n    }\\n  }]);\\n\\n  return PlaylistLayoutHorizontal;\\n}(_playlistLayout.default);\\n\\nvar _default = PlaylistLayoutHorizontal;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout-horizontal.js?')},\"./components/playlist/layout/playlist-layout-vertical.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlistLayout = _interopRequireDefault(__webpack_require__(/*! ./playlist-layout */ \"./components/playlist/layout/playlist-layout.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar PlaylistLayoutVertical = /*#__PURE__*/function (_PlaylistLayout) {\\n  _inherits(PlaylistLayoutVertical, _PlaylistLayout);\\n\\n  var _super = _createSuper(PlaylistLayoutVertical);\\n\\n  function PlaylistLayoutVertical(player, options) {\\n    _classCallCheck(this, PlaylistLayoutVertical);\\n\\n    options.wrap = true;\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(PlaylistLayoutVertical, [{\\n    key: \"getCls\",\\n    value: function getCls() {\\n      var cls = _get(_getPrototypeOf(PlaylistLayoutVertical.prototype), \"getCls\", this).call(this);\\n\\n      cls.push(\\'cld-plw-vertical\\');\\n      return cls;\\n    }\\n  }]);\\n\\n  return PlaylistLayoutVertical;\\n}(_playlistLayout.default);\\n\\nvar _default = PlaylistLayoutVertical;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout-vertical.js?')},\"./components/playlist/layout/playlist-layout.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _dom = __webpack_require__(/*! ../../../utils/dom */ \"./utils/dom.js\");\\n\\nvar _cssPrefix = __webpack_require__(/*! ../../../utils/css-prefix */ \"./utils/css-prefix.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\\n\\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\\n\\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar OPTIONS_DEFAULT = {\\n  wrap: false\\n};\\n\\nvar PlaylistLayout = /*#__PURE__*/function (_Component) {\\n  _inherits(PlaylistLayout, _Component);\\n\\n  var _super = _createSuper(PlaylistLayout);\\n\\n  function PlaylistLayout(player, options) {\\n    var _thisSuper, _this;\\n\\n    _classCallCheck(this, PlaylistLayout);\\n\\n    var layoutOptions = _objectSpread(_objectSpread({}, OPTIONS_DEFAULT), options);\\n\\n    _this = _super.call(this, player, layoutOptions);\\n    _this.player_ = player;\\n\\n    _this.setCls();\\n\\n    var fluidHandler = function fluidHandler(e, fluid) {\\n      _this.options_.fluid = fluid;\\n\\n      _this.removeCls();\\n\\n      _this.setCls();\\n    };\\n\\n    var wrapVideoWithLayout = function wrapVideoWithLayout() {\\n      var el = _this.el();\\n\\n      _this.videoWrap_ = dom.createEl(\\'div\\', {\\n        className: \\'cld-plw-col-player\\'\\n      });\\n      _this.contentEl_ = _this.contentEl_ = dom.createEl(\\'div\\', {\\n        className: \\'cld-plw-col-list\\'\\n      });\\n      (0, _dom.wrap)(_this.player().el(), el);\\n      el.appendChild(_this.videoWrap_);\\n      el.appendChild(_this.contentEl_);\\n      (0, _dom.wrap)(_this.player().el(), _this.videoWrap_);\\n    };\\n\\n    if (layoutOptions.wrap) {\\n      wrapVideoWithLayout();\\n    }\\n\\n    player.on(\\'fluid\\', fluidHandler);\\n\\n    _this.addChild(\\'PlaylistPanel\\', _this.options_);\\n\\n    _this.dispose = function () {\\n      _this.removeLayout();\\n\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(PlaylistLayout.prototype)), \"dispose\", _thisSuper).call(_thisSuper);\\n\\n      player.off(\\'fluid\\', fluidHandler);\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(PlaylistLayout, [{\\n    key: \"getCls\",\\n    value: function getCls() {\\n      var cls = [\\'cld-video-player\\', \\'cld-plw-layout\\'];\\n      cls.push((0, _cssPrefix.skinClassPrefix)(this.player()));\\n      cls.push((0, _cssPrefix.playerClassPrefix)(this.player()));\\n\\n      if (this.options_.fluid) {\\n        cls.push(\\'cld-plw-layout-fluid\\');\\n      }\\n\\n      return cls;\\n    }\\n  }, {\\n    key: \"setCls\",\\n    value: function setCls() {\\n      var _this2 = this;\\n\\n      this.removeClass((0, _cssPrefix.skinClassPrefix)(this));\\n      this.getCls().forEach(function (cls) {\\n        _this2.addClass(cls);\\n      });\\n    }\\n  }, {\\n    key: \"removeCls\",\\n    value: function removeCls() {\\n      var _this3 = this;\\n\\n      this.getCls().forEach(function (cls) {\\n        _this3.removeClass(cls);\\n      });\\n    }\\n  }, {\\n    key: \"update\",\\n    value: function update(optionToChange, options) {\\n      this.options(options);\\n      this.removeChild(\\'PlaylistPanel\\');\\n      this.addChild(\\'PlaylistPanel\\', this.options_);\\n      this.trigger(\\'playlistlayoutupdate\\');\\n    }\\n  }, {\\n    key: \"removeLayout\",\\n    value: function removeLayout() {\\n      var parentElem = this.el().parentElement;\\n\\n      if (this.el().parentElement) {\\n        parentElem.appendChild(this.player().el());\\n      }\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistLayout.prototype), \"createEl\", this).call(this, \\'div\\'); // Apply font styles on wrapper div.\\n\\n\\n      el.style.fontFamily = this.player().el().style.fontFamily;\\n      return el;\\n    }\\n  }]);\\n\\n  return PlaylistLayout;\\n}(Component);\\n\\n_video.default.registerComponent(\\'playlistLayout\\', PlaylistLayout);\\n\\nvar _default = PlaylistLayout;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/layout/playlist-layout.js?')},\"./components/playlist/panel/playlist-panel-item.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _thumbnail = _interopRequireDefault(__webpack_require__(/*! ../thumbnail/thumbnail */ \"./components/playlist/thumbnail/thumbnail.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\nvar DEFAULT_OPTIONS = {\\n  source: null,\\n  next: false\\n};\\n\\nvar PlaylistPanelItem = /*#__PURE__*/function (_Thumbnail) {\\n  _inherits(PlaylistPanelItem, _Thumbnail);\\n\\n  var _super = _createSuper(PlaylistPanelItem);\\n\\n  function PlaylistPanelItem(player, options) {\\n    _classCallCheck(this, PlaylistPanelItem);\\n\\n    options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(PlaylistPanelItem, [{\\n    key: \"handleClick\",\\n    value: function handleClick(event) {\\n      _get(_getPrototypeOf(PlaylistPanelItem.prototype), \"handleClick\", this).call(this, event);\\n\\n      this.play();\\n    }\\n  }, {\\n    key: \"play\",\\n    value: function play() {\\n      var item = this.getItem();\\n      var list = this.player().cloudinary.playlist().list();\\n      var index = list.indexOf(item);\\n\\n      if (index === -1) {\\n        throw new Error(\\'Invalid playlist item...\\');\\n      }\\n\\n      this.player().cloudinary.playlist().playAtIndex(index);\\n    }\\n  }, {\\n    key: \"isCurrent\",\\n    value: function isCurrent() {\\n      return this.options_.current;\\n    }\\n  }, {\\n    key: \"getTitle\",\\n    value: function getTitle() {\\n      return _get(_getPrototypeOf(PlaylistPanelItem.prototype), \"getTitle\", this).call(this);\\n    }\\n  }, {\\n    key: \"getDuration\",\\n    value: function getDuration() {\\n      return _get(_getPrototypeOf(PlaylistPanelItem.prototype), \"getDuration\", this).call(this);\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistPanelItem.prototype), \"createEl\", this).call(this);\\n\\n      el.classList.add(\\'cld-plw-panel-item\\');\\n      var info = dom.createEl(\\'div\\', {\\n        className: \\'cld-plw-item-info-wrap\\'\\n      });\\n      var titleWrap = dom.createEl(\\'div\\', {\\n        className: \\'cld-plw-item-title\\'\\n      });\\n\\n      if (this.isCurrent()) {\\n        el.classList.add(\\'cld-plw-panel-item-active\\');\\n        var currEl = dom.createEl(\\'span\\', {\\n          className: \\'cld-plw-item-title-curr\\'\\n        }, {}, \\'Now Playing: \\');\\n        titleWrap.appendChild(currEl);\\n      }\\n\\n      var title = dom.createEl(\\'span\\', {\\n        className: \\'cld-plw-item-title\\'\\n      }, {}, this.getTitle());\\n      titleWrap.appendChild(title);\\n      var duration = dom.createEl(\\'div\\', {\\n        className: \\'cld-plw-item-duration\\'\\n      }, {}, this.getDuration());\\n      info.appendChild(titleWrap);\\n      info.appendChild(duration);\\n\\n      if (el) {\\n        el.appendChild(info);\\n      }\\n\\n      el.appendChild(info);\\n      return el;\\n    }\\n  }]);\\n\\n  return PlaylistPanelItem;\\n}(_thumbnail.default);\\n\\n_video.default.registerComponent(\\'playlistPanelItem\\', PlaylistPanelItem);\\n\\nvar _default = PlaylistPanelItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/panel/playlist-panel-item.js?')},\"./components/playlist/panel/playlist-panel.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\n__webpack_require__(/*! assets/styles/components/playlist.scss */ \"./assets/styles/components/playlist.scss\");\\n\\nvar _playlistPanelItem = _interopRequireDefault(__webpack_require__(/*! ./playlist-panel-item */ \"./components/playlist/panel/playlist-panel-item.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar PlaylistPanel = /*#__PURE__*/function (_Component) {\\n  _inherits(PlaylistPanel, _Component);\\n\\n  var _super = _createSuper(PlaylistPanel);\\n\\n  function PlaylistPanel(player) {\\n    var _thisSuper, _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, PlaylistPanel);\\n\\n    _this = _super.call(this, player, options);\\n\\n    var itemChangeHandler = function itemChangeHandler() {\\n      _this.render();\\n    };\\n\\n    player.on(\\'playlistitemchanged\\', itemChangeHandler);\\n\\n    _this.render();\\n\\n    _this.dispose = function () {\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(PlaylistPanel.prototype)), \"dispose\", _thisSuper).call(_thisSuper);\\n\\n      player.off(\\'playlistitemchanged\\', itemChangeHandler);\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(PlaylistPanel, [{\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(PlaylistPanel.prototype), \"createEl\", this).call(this);\\n\\n      el.classList.add(\\'cld-plw-panel\\');\\n      return el;\\n    }\\n  }, {\\n    key: \"removeAll\",\\n    value: function removeAll() {\\n      var childrens = this.children();\\n\\n      for (var i = childrens.length - 1; i >= 0; --i) {\\n        this.removeChild(childrens[i]);\\n      }\\n    }\\n  }, {\\n    key: \"getItems\",\\n    value: function getItems() {\\n      var playlist = this.player().cloudinary.playlist();\\n      var repeat = playlist._repeat;\\n\\n      if (this.options_.showAll) {\\n        return playlist.list();\\n      }\\n\\n      var items = [];\\n      var numOfItems = this.options_.total;\\n      var index = playlist.currentIndex();\\n      var source = playlist.list()[index];\\n      items.push(source);\\n\\n      while (items.length < numOfItems) {\\n        index = playlist.nextIndex(index);\\n\\n        if (index === -1) {\\n          if (!repeat && items.length > 0) {\\n            break;\\n          }\\n\\n          index = 0;\\n        }\\n\\n        source = playlist.list()[index];\\n        items.push(source);\\n      }\\n\\n      return items;\\n    }\\n  }, {\\n    key: \"render\",\\n    value: function render() {\\n      var _this2 = this;\\n\\n      var items = this.getItems();\\n      this.removeAll();\\n      items.forEach(function (source, index) {\\n        var playlistItem = new _playlistPanelItem.default(_this2.player(), _video.default.mergeOptions(_this2.options_, {\\n          item: source,\\n          next: index === 1,\\n          current: index === 0\\n        }));\\n\\n        _this2.addChild(playlistItem);\\n      });\\n    }\\n  }]);\\n\\n  return PlaylistPanel;\\n}(Component);\\n\\n_video.default.registerComponent(\\'playlistPanel\\', PlaylistPanel);\\n\\nvar _default = PlaylistPanel;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/panel/playlist-panel.js?')},\"./components/playlist/playlist-widget.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _playlistLayoutHorizontal = _interopRequireDefault(__webpack_require__(/*! ./layout/playlist-layout-horizontal */ \\\"./components/playlist/layout/playlist-layout-horizontal.js\\\"));\\n\\nvar _playlistLayoutVertical = _interopRequireDefault(__webpack_require__(/*! ./layout/playlist-layout-vertical */ \\\"./components/playlist/layout/playlist-layout-vertical.js\\\"));\\n\\nvar _playlistLayoutCustom = _interopRequireDefault(__webpack_require__(/*! ./layout/playlist-layout-custom */ \\\"./components/playlist/layout/playlist-layout-custom.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\\n\\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\\n\\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\\n\\nvar OPTIONS_DEFAULTS = {\\n  fluid: false,\\n  show: true,\\n  direction: 'vertical',\\n  total: 4,\\n  selector: false,\\n  renderTo: []\\n};\\n\\nvar modifyOptions = function modifyOptions(player, opt) {\\n  var options = _objectSpread(_objectSpread({}, OPTIONS_DEFAULTS), opt);\\n\\n  if (options.show && typeof options.selector === 'string') {\\n    options.useDefaultLayout = false;\\n    options.useCustomLayout = true;\\n    options.renderTo = document.querySelector(options.selector);\\n    options.showAll = true;\\n\\n    if (!options.renderTo.length === 0) {\\n      throw new Error(\\\"Couldn't find element(s) by selector '\\\".concat(options.selector, \\\"' for playlist\\\"));\\n    }\\n  }\\n\\n  if (options.show && !options.selector) {\\n    options.useDefaultLayout = true;\\n    options.useCustomLayout = false;\\n  }\\n\\n  options.direction = options.direction.toLowerCase() === 'horizontal' ? 'horizontal' : 'vertical';\\n  options.skin = player.options_.skin;\\n  return options;\\n};\\n\\nvar PlaylistWidget = /*#__PURE__*/function () {\\n  function PlaylistWidget(player) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, PlaylistWidget);\\n\\n    options = modifyOptions(player, options);\\n    this.options_ = options;\\n    this.player_ = player;\\n    this.render();\\n\\n    var fluidHandler = function fluidHandler(e, fluid) {\\n      _this.options_.fluid = fluid;\\n    };\\n\\n    player.on('fluid', fluidHandler);\\n\\n    this.options = function (options) {\\n      if (!options) {\\n        return _this.options_;\\n      }\\n\\n      _this.options_ = _video.default.mergeOptions(_this.options_, options);\\n      player.trigger('playlistwidgetoption', _this.options_.playlistWidget);\\n      return _this.options_;\\n    };\\n\\n    this.dispose = function () {\\n      _this.layout_.dispose();\\n\\n      player.off('fluid', fluidHandler);\\n    };\\n  }\\n\\n  _createClass(PlaylistWidget, [{\\n    key: \\\"render\\\",\\n    value: function render() {\\n      if (this.options_.useDefaultLayout) {\\n        if (this.options_.direction === 'horizontal') {\\n          this.layout_ = new _playlistLayoutHorizontal.default(this.player_, this.options_);\\n        } else {\\n          this.layout_ = new _playlistLayoutVertical.default(this.player_, this.options_);\\n        }\\n      }\\n\\n      if (this.options_.useCustomLayout) {\\n        this.layout_ = new _playlistLayoutCustom.default(this.player_, this.options_);\\n      }\\n    }\\n  }, {\\n    key: \\\"getLayout\\\",\\n    value: function getLayout() {\\n      return this.layout_;\\n    }\\n  }, {\\n    key: \\\"update\\\",\\n    value: function update(optionName, optionValue) {\\n      this.options(optionValue);\\n\\n      if (optionName === 'direction') {\\n        this.layout_.removeLayout();\\n        this.layout_.dispose();\\n        this.render();\\n      } else {\\n        this.layout_.update(optionName, this.options_);\\n      }\\n    }\\n  }, {\\n    key: \\\"setSkin\\\",\\n    value: function setSkin() {\\n      this.layout_.setCls();\\n    }\\n  }, {\\n    key: \\\"total\\\",\\n    value: function total() {\\n      var _total = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : OPTIONS_DEFAULTS.total;\\n\\n      _total = parseInt(_total, 10);\\n\\n      if (_total !== this.options_.total && typeof _total === 'number' && _total > 0) {\\n        this.update('total', {\\n          total: _total\\n        });\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"direction\\\",\\n    value: function direction() {\\n      var _direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : OPTIONS_DEFAULTS.direction;\\n\\n      if (_direction === 'horizontal' || _direction === 'vertical') {\\n        this.update('direction', {\\n          direction: _direction\\n        });\\n      }\\n\\n      return this;\\n    }\\n  }]);\\n\\n  return PlaylistWidget;\\n}();\\n\\nvar _default = PlaylistWidget;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/playlist-widget.js?\")},\"./components/playlist/playlist.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! plugins/cloudinary/models/video-source */ \"./plugins/cloudinary/models/video-source.js\"));\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \"./utils/type-inference.js\");\\n\\n__webpack_require__(/*! components/playlist/components/upcoming-video-overlay */ \"./components/playlist/components/upcoming-video-overlay.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar DEFAULT_AUTO_ADVANCE = 0;\\nvar DEFAULT_PRESENT_UPCOMING = 10;\\nvar UPCOMING_VIDEO_TRANSITION = 1;\\n\\nvar Playlist = /*#__PURE__*/function () {\\n  function Playlist(context) {\\n    var _this = this;\\n\\n    var sources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\\n\\n    var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\\n        _ref$repeat = _ref.repeat,\\n        repeat = _ref$repeat === void 0 ? false : _ref$repeat,\\n        _ref$autoAdvance = _ref.autoAdvance,\\n        autoAdvance = _ref$autoAdvance === void 0 ? false : _ref$autoAdvance,\\n        _ref$presentUpcoming = _ref.presentUpcoming,\\n        presentUpcoming = _ref$presentUpcoming === void 0 ? false : _ref$presentUpcoming;\\n\\n    _classCallCheck(this, Playlist);\\n\\n    var _context = context;\\n    var _sources = [];\\n    var _currentIndex = null;\\n    var _autoAdvance = null;\\n    var _presentUpcoming = null;\\n    var _defaultRecResolverCache = {};\\n    var _recommendationsHandler = null;\\n\\n    this.enqueue = function (source) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      var src = source instanceof _videoSource.default ? source : buildSource(source, options);\\n\\n      _sources.push(src);\\n\\n      return src;\\n    };\\n\\n    this.currentIndex = function (index) {\\n      if (index === undefined) {\\n        return _currentIndex;\\n      }\\n\\n      if (index >= _this.length() || index < 0) {\\n        throw new Error(\\'Invalid playlist index.\\');\\n      }\\n\\n      _currentIndex = index;\\n\\n      var current = _this.currentSource();\\n\\n      var itemBuilder = recommendationItemBuilder(current);\\n\\n      if (!current.recommendations()) {\\n        current.recommendations(defaultRecommendationsResolver(current));\\n      }\\n\\n      _context.source(current, {\\n        recommendationOptions: {\\n          disableAutoShow: true,\\n          itemBuilder: itemBuilder\\n        }\\n      });\\n\\n      var eventData = {\\n        playlist: _this,\\n        current: current,\\n        next: _this.next()\\n      };\\n\\n      _this.player().trigger(\\'playlistitemchanged\\', eventData);\\n\\n      refreshRecommendations();\\n      refreshTextTracks();\\n      return current;\\n    };\\n\\n    this.presentUpcoming = function (delay) {\\n      _presentUpcoming = _presentUpcoming || {};\\n\\n      if (delay === undefined) {\\n        return _presentUpcoming.delay;\\n      }\\n\\n      if (delay === true) {\\n        delay = DEFAULT_PRESENT_UPCOMING;\\n      } else if (delay === false) {\\n        delay = false;\\n      } else if (!(0, _typeInference.isInteger)(delay) || delay < 0) {\\n        throw new Error(\\'presentUpcoming \\\\\\'delay\\\\\\' must be either a boolean or a positive integer.\\');\\n      }\\n\\n      _presentUpcoming.delay = delay;\\n      setupPresentUpcoming();\\n      return _presentUpcoming.delay;\\n    };\\n\\n    this.autoAdvance = function (delay) {\\n      _autoAdvance = _autoAdvance || {};\\n\\n      if (delay === undefined) {\\n        return _autoAdvance.delay;\\n      }\\n\\n      if (delay === true) {\\n        delay = DEFAULT_AUTO_ADVANCE;\\n      } else if (delay === false) {\\n        delay = false;\\n      } else if (!(0, _typeInference.isInteger)(delay) || delay < 0) {\\n        throw new Error(\\'Auto advance \\\\\\'delay\\\\\\' must be either a boolean or a positive integer.\\');\\n      }\\n\\n      _autoAdvance.delay = delay;\\n      setupAutoAdvance();\\n      return _autoAdvance.delay;\\n    };\\n\\n    this.list = function () {\\n      return _sources;\\n    };\\n\\n    this.player = function () {\\n      return _context.player;\\n    };\\n\\n    this.dispose = function () {\\n      resetAutoAdvance();\\n      resetPresentUpcoming();\\n      resetRecommendations();\\n    };\\n\\n    this.resetState = function () {\\n      _this.repeat(repeat);\\n\\n      _this.autoAdvance(autoAdvance);\\n\\n      _this.presentUpcoming(presentUpcoming);\\n    };\\n\\n    var setupAutoAdvance = function setupAutoAdvance() {\\n      resetAutoAdvance();\\n      var delay = _autoAdvance.delay;\\n\\n      if (delay === false) {\\n        return;\\n      }\\n\\n      var trigger = function trigger() {\\n        if (_this.player().ended()) {\\n          _autoAdvance.timeout = setTimeout(function () {\\n            _this.playNext();\\n          }, delay * 1000);\\n        }\\n      };\\n\\n      _autoAdvance = {\\n        delay: delay,\\n        trigger: trigger\\n      };\\n\\n      _context.on(\\'ended\\', _autoAdvance.trigger);\\n    };\\n\\n    var resetAutoAdvance = function resetAutoAdvance() {\\n      if (!_autoAdvance) {\\n        _autoAdvance = {};\\n      }\\n\\n      if (_autoAdvance.timeout) {\\n        clearTimeout(_autoAdvance.timeout);\\n      }\\n\\n      if (_autoAdvance.trigger) {\\n        _context.off(\\'ended\\', _autoAdvance.trigger);\\n      }\\n\\n      _autoAdvance.timeout = null;\\n      _autoAdvance.trigger = null;\\n    };\\n\\n    var setupPresentUpcoming = function setupPresentUpcoming() {\\n      resetPresentUpcoming();\\n      var delay = _presentUpcoming.delay;\\n\\n      if (delay === false) {\\n        return;\\n      }\\n\\n      _presentUpcoming.trigger = function () {\\n        var currentTime = _this.player().currentTime();\\n\\n        var duration = _this.player().duration();\\n\\n        var remainingTime = duration - currentTime;\\n\\n        if (remainingTime < UPCOMING_VIDEO_TRANSITION + 0.5) {\\n          if (_presentUpcoming.showTriggered) {\\n            _this.player().trigger(\\'upcomingvideohide\\');\\n\\n            _presentUpcoming.showTriggered = false;\\n          }\\n        } else if (remainingTime <= _presentUpcoming.delay && !_presentUpcoming.showTriggered && !_this.player().loop()) {\\n          _this.player().trigger(\\'upcomingvideoshow\\');\\n\\n          _presentUpcoming.showTriggered = true;\\n        } else if (_presentUpcoming.showTriggered && (remainingTime > _presentUpcoming.delay || _this.player().loop())) {\\n          _this.player().trigger(\\'upcomingvideohide\\');\\n\\n          _presentUpcoming.showTriggered = false;\\n        }\\n      };\\n\\n      _context.on(\\'timeupdate\\', _presentUpcoming.trigger);\\n    };\\n\\n    var resetPresentUpcoming = function resetPresentUpcoming() {\\n      _this.player().trigger(\\'upcomingvideohide\\');\\n\\n      if (!_presentUpcoming) {\\n        _presentUpcoming = {};\\n      }\\n\\n      if (_presentUpcoming.trigger) {\\n        _context.off(\\'timeupdate\\', _presentUpcoming.trigger);\\n      }\\n\\n      _presentUpcoming.trigger = null;\\n      _presentUpcoming.showTriggered = false;\\n    };\\n\\n    var resetRecommendations = function resetRecommendations() {\\n      if (_recommendationsHandler) {\\n        _context.off(\\'ended\\', _recommendationsHandler);\\n      }\\n    };\\n\\n    var refreshRecommendations = function refreshRecommendations() {\\n      resetRecommendations();\\n\\n      _recommendationsHandler = function _recommendationsHandler() {\\n        if (_this.autoAdvance() === false && _context.autoShowRecommendations()) {\\n          _this.player().trigger(\\'recommendationsshow\\');\\n        }\\n      };\\n\\n      _context.on(\\'ended\\', _recommendationsHandler);\\n    };\\n\\n    var recommendationItemBuilder = function recommendationItemBuilder(source) {\\n      var defaultResolver = _defaultRecResolverCache[source.objectId];\\n\\n      if (source.recommendations() && (!defaultResolver || source.recommendations() !== defaultResolver)) {\\n        return;\\n      }\\n\\n      return function (source) {\\n        return {\\n          source: source,\\n          action: function action() {\\n            return _this.playItem(source);\\n          }\\n        };\\n      };\\n    };\\n\\n    var defaultRecommendationsResolver = function defaultRecommendationsResolver(source) {\\n      var defaultResolver = _defaultRecResolverCache[source.objectId];\\n\\n      if (defaultResolver) {\\n        return defaultResolver;\\n      }\\n\\n      _defaultRecResolverCache[source.objectId] = function () {\\n        var index = _this.list().indexOf(source);\\n\\n        var items = [];\\n        var numOfItems = Math.min(4, _this.length() - 1);\\n\\n        while (items.length < numOfItems) {\\n          index = _this.nextIndex(index);\\n\\n          if (index === -1) {\\n            break;\\n          }\\n\\n          var _source = _this.list()[index];\\n\\n          items.push(_source);\\n        }\\n\\n        return items;\\n      };\\n\\n      return _defaultRecResolverCache[source.objectId];\\n    };\\n\\n    var refreshTextTracks = function refreshTextTracks() {\\n      _this.player().trigger(\\'refreshTextTracks\\', _this.currentSource().textTracks());\\n    };\\n\\n    var buildSource = function buildSource(source) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return _context.buildSource(source, options);\\n    };\\n\\n    sources.forEach(function (source) {\\n      return _this.enqueue(source);\\n    });\\n    this.resetState();\\n  }\\n\\n  _createClass(Playlist, [{\\n    key: \"playItem\",\\n    value: function playItem(item) {\\n      var index = this.list().indexOf(item);\\n\\n      if (index === -1) {\\n        throw new Error(\\'Invalid playlist item.\\');\\n      }\\n\\n      this.playAtIndex(index);\\n    }\\n  }, {\\n    key: \"playAtIndex\",\\n    value: function playAtIndex(index) {\\n      this.currentIndex(index);\\n      this.player().play();\\n      return this.currentSource();\\n    }\\n  }, {\\n    key: \"currentSource\",\\n    value: function currentSource() {\\n      return this.list()[this.currentIndex()];\\n    }\\n  }, {\\n    key: \"removeAt\",\\n    value: function removeAt(index) {\\n      if (index >= this.length() || index < 0) {\\n        throw new Error(\\'Invalid playlist index.\\');\\n      }\\n\\n      this._sources.splice(index, 1);\\n\\n      return this;\\n    }\\n  }, {\\n    key: \"repeat\",\\n    value: function repeat(_repeat) {\\n      if (_repeat === undefined) {\\n        return this._repeat;\\n      }\\n\\n      this._repeat = !!_repeat;\\n      return this._repeat;\\n    }\\n  }, {\\n    key: \"first\",\\n    value: function first() {\\n      return this.list()[0];\\n    }\\n  }, {\\n    key: \"last\",\\n    value: function last() {\\n      return this.list()[this.length() - 1];\\n    }\\n  }, {\\n    key: \"next\",\\n    value: function next() {\\n      var nextIndex = this.nextIndex();\\n\\n      if (nextIndex === -1) {\\n        return null;\\n      }\\n\\n      return this.list()[nextIndex];\\n    }\\n  }, {\\n    key: \"nextIndex\",\\n    value: function nextIndex(index) {\\n      index = index !== undefined ? index : this.currentIndex();\\n\\n      if (index >= this.length() || index < 0) {\\n        throw new Error(\\'Invalid playlist index.\\');\\n      }\\n\\n      var isLast = index === this.length() - 1;\\n      var nextIndex = index + 1;\\n\\n      if (isLast) {\\n        if (this.repeat()) {\\n          nextIndex = 0;\\n        } else {\\n          return -1;\\n        }\\n      }\\n\\n      return nextIndex;\\n    }\\n  }, {\\n    key: \"previousIndex\",\\n    value: function previousIndex() {\\n      if (this.isFirst()) {\\n        return -1;\\n      }\\n\\n      return this.currentIndex() - 1;\\n    }\\n  }, {\\n    key: \"playFirst\",\\n    value: function playFirst() {\\n      return this.playAtIndex(0);\\n    }\\n  }, {\\n    key: \"playLast\",\\n    value: function playLast() {\\n      var lastIndex = this.list().length - 1;\\n      return this.playAtIndex(lastIndex);\\n    }\\n  }, {\\n    key: \"isLast\",\\n    value: function isLast() {\\n      return this.currentIndex() >= this.length() - 1;\\n    }\\n  }, {\\n    key: \"isFirst\",\\n    value: function isFirst() {\\n      return this.currentIndex() === 0;\\n    }\\n  }, {\\n    key: \"length\",\\n    value: function length() {\\n      return this.list().length;\\n    }\\n  }, {\\n    key: \"playNext\",\\n    value: function playNext() {\\n      var nextIndex = this.nextIndex();\\n\\n      if (nextIndex === -1) {\\n        return null;\\n      }\\n\\n      return this.playAtIndex(nextIndex);\\n    }\\n  }, {\\n    key: \"playPrevious\",\\n    value: function playPrevious() {\\n      var previousIndex = this.previousIndex();\\n\\n      if (previousIndex === -1) {\\n        return null;\\n      }\\n\\n      return this.playAtIndex(previousIndex);\\n    }\\n  }]);\\n\\n  return Playlist;\\n}();\\n\\nvar _default = Playlist;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/playlist.js?')},\"./components/playlist/thumbnail/thumbnail.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\n__webpack_require__(/*! ../../../assets/styles/components/thumbnail.scss */ \"./assets/styles/components/thumbnail.scss\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// Get the ClickableComponent base class from Video.js\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar THUMB_DEFAULT_WIDTH = 300;\\nvar DEFAULT_OPTIONS = {\\n  item: null,\\n  transformation: {\\n    width: THUMB_DEFAULT_WIDTH,\\n    aspect_ratio: \\'16:9\\',\\n    crop: \\'pad\\',\\n    background: \\'black\\'\\n  }\\n};\\n\\nvar Thumbnail = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(Thumbnail, _ClickableComponent);\\n\\n  var _super = _createSuper(Thumbnail);\\n\\n  function Thumbnail(player, options) {\\n    _classCallCheck(this, Thumbnail);\\n\\n    options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(Thumbnail, [{\\n    key: \"getItem\",\\n    value: function getItem() {\\n      return this.options_.item;\\n    }\\n  }, {\\n    key: \"getTitle\",\\n    value: function getTitle() {\\n      return this.getItem().info().title;\\n    }\\n  }, {\\n    key: \"getDuration\",\\n    value: function getDuration() {\\n      return \\' \\'; // this.getItem().info().title;\\n    }\\n  }, {\\n    key: \"getThumbnail\",\\n    value: function getThumbnail() {\\n      return this.getItem().poster().url({\\n        transformation: this.options_.transformation\\n      });\\n    }\\n  }, {\\n    key: \"handleClick\",\\n    value: function handleClick(e) {\\n      e.preventDefault();\\n    }\\n  }, {\\n    key: \"createControlTextEl\",\\n    value: function createControlTextEl() {\\n      return;\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \\'a\\';\\n\\n      var el = _get(_getPrototypeOf(Thumbnail.prototype), \"createEl\", this).call(this, tag, {\\n        className: \\'cld-thumbnail\\',\\n        href: \\'#\\'\\n      });\\n\\n      var img = _get(_getPrototypeOf(Thumbnail.prototype), \"createEl\", this).call(this, \\'img\\', {\\n        className: \\'cld-thumbnail-img\\',\\n        src: this.getThumbnail()\\n      });\\n\\n      el.appendChild(img);\\n      el.style.backgroundImage = \"url(\\'\".concat(this.getThumbnail(), \"\\')\");\\n      return el;\\n    }\\n  }]);\\n\\n  return Thumbnail;\\n}(ClickableComponent);\\n\\nvar _default = Thumbnail;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/playlist/thumbnail/thumbnail.js?')},\"./components/progress-control-events-blocker/progress-control-events-blocker.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar ProgressControlEventsBlocker = /*#__PURE__*/function (_Component) {\\n  _inherits(ProgressControlEventsBlocker, _Component);\\n\\n  var _super = _createSuper(ProgressControlEventsBlocker);\\n\\n  function ProgressControlEventsBlocker(player) {\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ProgressControlEventsBlocker);\\n\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(ProgressControlEventsBlocker, [{\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ProgressControlEventsBlocker.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'vjs-progress-control-events-blocker\\'\\n      });\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ProgressControlEventsBlocker;\\n}(Component);\\n\\n_video.default.registerComponent(\\'progressControlEventsBlocker\\', ProgressControlEventsBlocker);\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/progress-control-events-blocker/progress-control-events-blocker.js?')},\"./components/qualitySelector/quality-selector.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/qualitySelector/quality-selector.scss?\")},\"./components/qualitySelector/qualitySelector.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar djs = _interopRequireWildcard(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\n__webpack_require__(/*! videojs-per-source-behaviors */ \\\"../node_modules/videojs-per-source-behaviors/dist/videojs-per-source-behaviors.es.js\\\");\\n\\n__webpack_require__(/*! videojs-contrib-quality-levels */ \\\"../node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.es.js\\\");\\n\\n__webpack_require__(/*! ../../plugins/videojs-http-source-selector/plugin */ \\\"./plugins/videojs-http-source-selector/plugin.js\\\");\\n\\nvar _find = __webpack_require__(/*! ../../utils/find */ \\\"./utils/find.js\\\");\\n\\n__webpack_require__(/*! ./quality-selector.scss */ \\\"./components/qualitySelector/quality-selector.scss\\\");\\n\\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \\\"function\\\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\\n\\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \\\"object\\\" && typeof obj !== \\\"function\\\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\\n\\nvar qualitySelector = {\\n  init: function init(player) {\\n    // Handle DASH sources, HLS are handled internally.\\n    if (player && player.qualityLevels && player.dash && player.dash.mediaPlayer) {\\n      var MediaPlayer = djs.default.MediaPlayer;\\n      player.dash.qualityLevels = player.qualityLevels();\\n\\n      player.dash.mediaPlayer.getAutoSwitchQualityFor = function (type) {\\n        var dashPlayer = player.dash.mediaPlayer;\\n        var settings = dashPlayer.getSettings();\\n\\n        if (settings) {\\n          return settings.streaming.abr.autoSwitchBitrate[type];\\n        }\\n\\n        return true;\\n      };\\n\\n      player.dash.mediaPlayer.setAutoSwitchQualityFor = function (type, val) {\\n        var dashPlayer = player.dash.mediaPlayer;\\n        var upSettings = {\\n          streaming: {\\n            abr: {\\n              autoSwitchBitrate: {}\\n            }\\n          }\\n        };\\n        upSettings.streaming.abr.autoSwitchBitrate[type] = val;\\n        dashPlayer.updateSettings(upSettings);\\n      }; // When loaded, build quality-level list.\\n\\n\\n      player.dash.mediaPlayer.on(MediaPlayer.events.PLAYBACK_METADATA_LOADED, function () {\\n        var videoRates = player.dash.mediaPlayer.getBitrateInfoListFor('video');\\n        var audioRates = player.dash.mediaPlayer.getBitrateInfoListFor('audio');\\n\\n        if (videoRates.length > 0) {\\n          var normalizeFactor = videoRates[videoRates.length - 1].bitrate;\\n          player.dash.audioMapper = videoRates.map(function (rate) {\\n            return Math.round(rate.bitrate / normalizeFactor * (audioRates.length - 1));\\n          });\\n          videoRates.forEach(function (vrate) {\\n            player.dash.qualityLevels.addQualityLevel({\\n              id: vrate.bitrate,\\n              width: vrate.width,\\n              height: vrate.height,\\n              bandwidth: vrate.bitrate,\\n              selected: true,\\n              enabled: function enabled(val) {\\n                var _this = this;\\n\\n                if (val !== undefined) {\\n                  this.selected = val;\\n\\n                  if (val === true) {\\n                    var selectedIdx = (0, _find.findIndex)(player.qualityLevels().levels_, function (l) {\\n                      return l.id === _this.id;\\n                    });\\n                    player.qualityLevels().selectedIndex_ = selectedIdx;\\n                    player.qualityLevels().trigger({\\n                      type: 'change',\\n                      selectedIndex: selectedIdx\\n                    });\\n                  }\\n                } else {\\n                  return this.selected !== undefined ? this.selected : true;\\n                }\\n              }\\n            });\\n          });\\n        }\\n      }); // Pass qualityLevels 'change' event into the DASH player.\\n\\n      player.qualityLevels().on('change', function (event) {\\n        var enabledQualities = player.dash.qualityLevels.levels_.filter(function (q) {\\n          return q.enabled;\\n        });\\n\\n        if (enabledQualities.length === 1) {\\n          player.dash.mediaPlayer.setQualityFor('video', event.selectedIndex);\\n          player.dash.mediaPlayer.setQualityFor('audio', player.dash.audioMapper[event.selectedIndex]);\\n        } else if (!player.dash.mediaPlayer.getAutoSwitchQualityFor('video')) {\\n          player.dash.mediaPlayer.setAutoSwitchQualityFor('video', true);\\n          player.dash.mediaPlayer.setAutoSwitchQualityFor('audio', true);\\n        }\\n      }); // Handle 'change' event on the DASH player\\n\\n      /*\\n      player.dash.mediaPlayer.on(\\n        MediaPlayer.events.QUALITY_CHANGE_REQUESTED,\\n        (event) => {\\n          if (event.mediaType === 'video') {\\n            player.dash.qualityLevels.selectedIndex_ = event.newQuality;\\n            player.dash.qualityLevels.trigger({\\n              selectedIndex: event.newQuality,\\n              type: 'change'\\n            });\\n          }\\n        }\\n      );\\n      */\\n    }\\n  },\\n  // Show selector only if more then one option available\\n  setVisibility: function setVisibility(player) {\\n    var sourceMenuButton = player.controlBar.getChild('sourceMenuButton');\\n\\n    if (sourceMenuButton) {\\n      var qualityLevels = player.qualityLevels();\\n\\n      if (qualityLevels && qualityLevels.length > 1) {\\n        var levels = qualityLevels.levels_.filter(function (q) {\\n          return q.enabled;\\n        });\\n\\n        if (levels.length === 1) {\\n          var idx = qualityLevels.levels_.findIndex(function (l) {\\n            return l.id === levels[0].id;\\n          });\\n          sourceMenuButton.children()[1].children()[idx].selected(true);\\n        } else {\\n          sourceMenuButton.children()[1].children()[0].selected(true);\\n          sourceMenuButton.children()[1].children().forEach(function (item, i) {\\n            if (i > 0) {\\n              item.selected(false);\\n            }\\n          });\\n        }\\n\\n        sourceMenuButton.show();\\n      } else {\\n        sourceMenuButton.hide();\\n      } // ToDo: if there are multiple sources with same height (i.e. 720p)\\n      // add a bitrate indicator to distinguish them.\\n      // Labels: 720p => 1280x720 @ 3500Kbps\\n      // sourceMenuButton.items.forEach((item) => {\\n      //   const level = qualityLevels.levels_.find(ql => ql.height + 'p' === item.options_.label);\\n      //   if (level) {\\n      //     item.el_.innerText = level.width + 'x' + level.height + (level.bitrate ? ' @ ' + (Math.round(level.bitrate / 100)) + 'Kbps' : '');\\n      //   }\\n      // });\\n\\n    }\\n  }\\n};\\nvar _default = qualitySelector;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/qualitySelector/qualitySelector.js?\")},\"./components/recommendations-overlay/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _recommendationsOverlay = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay */ \"./components/recommendations-overlay/recommendations-overlay.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar _default = _recommendationsOverlay.default;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/index.js?')},\"./components/recommendations-overlay/recommendations-overlay-content.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _recommendationsOverlayPrimaryItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-primary-item */ \"./components/recommendations-overlay/recommendations-overlay-primary-item.js\"));\\n\\nvar _recommendationsOverlaySecondaryItemsContainer = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-secondary-items-container */ \"./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar RecommendationsOverlayContent = /*#__PURE__*/function (_Component) {\\n  _inherits(RecommendationsOverlayContent, _Component);\\n\\n  var _super = _createSuper(RecommendationsOverlayContent);\\n\\n  function RecommendationsOverlayContent(player) {\\n    var _this;\\n\\n    _classCallCheck(this, RecommendationsOverlayContent);\\n\\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n      args[_key - 1] = arguments[_key];\\n    }\\n\\n    _this = _super.call.apply(_super, [this, player].concat(args));\\n    _this._content = new AspectRatioContent(player);\\n\\n    _this.addChild(_this._content);\\n\\n    return _this;\\n  }\\n\\n  _createClass(RecommendationsOverlayContent, [{\\n    key: \"setItems\",\\n    value: function setItems(primary) {\\n      var _this$_content;\\n\\n      for (var _len2 = arguments.length, secondary = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n        secondary[_key2 - 1] = arguments[_key2];\\n      }\\n\\n      (_this$_content = this._content).setItems.apply(_this$_content, [primary].concat(secondary));\\n    }\\n  }, {\\n    key: \"clearItems\",\\n    value: function clearItems() {\\n      this._content._primary.clearItem();\\n\\n      this._content._secondaryContainer.clearItems();\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      return _get(_getPrototypeOf(RecommendationsOverlayContent.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'vjs-recommendations-overlay-content\\'\\n      });\\n    }\\n  }]);\\n\\n  return RecommendationsOverlayContent;\\n}(Component);\\n\\nvar AspectRatioContent = /*#__PURE__*/function (_Component2) {\\n  _inherits(AspectRatioContent, _Component2);\\n\\n  var _super2 = _createSuper(AspectRatioContent);\\n\\n  function AspectRatioContent(player) {\\n    var _this2;\\n\\n    _classCallCheck(this, AspectRatioContent);\\n\\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\\n      args[_key3 - 1] = arguments[_key3];\\n    }\\n\\n    _this2 = _super2.call.apply(_super2, [this, player].concat(args));\\n    _this2._primary = new _recommendationsOverlayPrimaryItem.default(player);\\n    _this2._secondaryContainer = new _recommendationsOverlaySecondaryItemsContainer.default(player);\\n\\n    _this2.addChild(_this2._primary);\\n\\n    _this2.addChild(_this2._secondaryContainer);\\n\\n    return _this2;\\n  }\\n\\n  _createClass(AspectRatioContent, [{\\n    key: \"setItems\",\\n    value: function setItems(primary) {\\n      var _this$_secondaryConta;\\n\\n      this._primary.setItem(primary);\\n\\n      for (var _len4 = arguments.length, secondary = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\\n        secondary[_key4 - 1] = arguments[_key4];\\n      }\\n\\n      (_this$_secondaryConta = this._secondaryContainer).setItems.apply(_this$_secondaryConta, secondary);\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      return _get(_getPrototypeOf(AspectRatioContent.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'aspect-ratio-content\\'\\n      });\\n    }\\n  }]);\\n\\n  return AspectRatioContent;\\n}(Component);\\n\\nvar _default = RecommendationsOverlayContent;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-content.js?')},\"./components/recommendations-overlay/recommendations-overlay-hide-button.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar RecommendationOverlayHideButton = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(RecommendationOverlayHideButton, _ClickableComponent);\\n\\n  var _super = _createSuper(RecommendationOverlayHideButton);\\n\\n  function RecommendationOverlayHideButton() {\\n    _classCallCheck(this, RecommendationOverlayHideButton);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationOverlayHideButton, [{\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationOverlayHideButton.prototype), \"createEl\", this).call(this, \\'span\\', {\\n        className: \\'vjs-recommendations-overlay-hide vjs-icon-close\\'\\n      });\\n\\n      return el;\\n    }\\n  }, {\\n    key: \"handleClick\",\\n    value: function handleClick() {\\n      this.options_.clickHandler();\\n    }\\n  }]);\\n\\n  return RecommendationOverlayHideButton;\\n}(ClickableComponent);\\n\\nvar _default = RecommendationOverlayHideButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-hide-button.js?')},\"./components/recommendations-overlay/recommendations-overlay-item.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar RecommendationsOverlayItem = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(RecommendationsOverlayItem, _ClickableComponent);\\n\\n  var _super = _createSuper(RecommendationsOverlayItem);\\n\\n  function RecommendationsOverlayItem() {\\n    _classCallCheck(this, RecommendationsOverlayItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlayItem, [{\\n    key: \"setItem\",\\n    value: function setItem(item) {\\n      var action = item.action,\\n          source = item.source;\\n      this.source = source;\\n      var info = source.info();\\n      this.setTitle(info.title || source.publicId());\\n      this.setPoster(this.source.poster().url({\\n        transformation: {\\n          aspect_ratio: \\'16:9\\',\\n          crop: \\'pad\\',\\n          background: \\'black\\'\\n        }\\n      }));\\n      this.setAction(action);\\n    }\\n  }, {\\n    key: \"setTitle\",\\n    value: function setTitle(text) {\\n      this.title.innerText = text;\\n    }\\n  }, {\\n    key: \"setAction\",\\n    value: function setAction(action) {\\n      this.action = action;\\n    }\\n  }, {\\n    key: \"handleClick\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(RecommendationsOverlayItem.prototype), \"handleClick\", this).call(this);\\n\\n      this.player().trigger(\\'recommendationshide\\');\\n      this.action();\\n    }\\n  }]);\\n\\n  return RecommendationsOverlayItem;\\n}(ClickableComponent);\\n\\nvar _default = RecommendationsOverlayItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-item.js?')},\"./components/recommendations-overlay/recommendations-overlay-primary-item.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _recommendationsOverlayItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-item */ \"./components/recommendations-overlay/recommendations-overlay-item.js\"));\\n\\nvar _componentUtils = _interopRequireDefault(__webpack_require__(/*! ../component-utils */ \"./components/component-utils.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar RecommendationsOverlayPrimaryItem = /*#__PURE__*/function (_RecommendationsOverl) {\\n  _inherits(RecommendationsOverlayPrimaryItem, _RecommendationsOverl);\\n\\n  var _super = _createSuper(RecommendationsOverlayPrimaryItem);\\n\\n  function RecommendationsOverlayPrimaryItem() {\\n    _classCallCheck(this, RecommendationsOverlayPrimaryItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlayPrimaryItem, [{\\n    key: \"setItem\",\\n    value: function setItem(item) {\\n      _get(_getPrototypeOf(RecommendationsOverlayPrimaryItem.prototype), \"setItem\", this).call(this, item);\\n\\n      var info = this.source.info();\\n      this.setTitle(info.title);\\n      this.setSubtitle(info.subtitle);\\n\\n      if (info.description) {\\n        var descLength = 300;\\n        var description = info.description.length > descLength ? info.description.substring(0, descLength) + \\'...\\' : info.description;\\n        this.setDescription(description);\\n      }\\n    }\\n  }, {\\n    key: \"setPoster\",\\n    value: function setPoster(url) {\\n      this.poster.style.backgroundImage = \"url(\\'\".concat(url, \"\\')\");\\n    }\\n  }, {\\n    key: \"setTitle\",\\n    value: function setTitle(text) {\\n      _componentUtils.default.setText(this.title, text);\\n    }\\n  }, {\\n    key: \"setSubtitle\",\\n    value: function setSubtitle(text) {\\n      _componentUtils.default.setText(this.subtitle, text);\\n    }\\n  }, {\\n    key: \"setDescription\",\\n    value: function setDescription(text) {\\n      _componentUtils.default.setText(this.description, text);\\n    }\\n  }, {\\n    key: \"clearItem\",\\n    value: function clearItem() {\\n      this.setTitle(\\'\\');\\n      this.setSubtitle(\\'\\');\\n      this.setDescription(\\'\\');\\n      this.poster.style.backgroundImage = null;\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationsOverlayPrimaryItem.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'vjs-recommendations-overlay-item vjs-recommendations-overlay-item-primary\\'\\n      });\\n\\n      this.poster = dom.createEl(\\'div\\', {\\n        className: \\'vjs-recommendations-overlay-item-primary-image\\'\\n      });\\n      this.title = dom.createEl(\\'h2\\');\\n      this.title.innerHTML = \\'\\';\\n      this.subtitle = dom.createEl(\\'h3\\');\\n      this.subtitle.innerHTML = \\'\\';\\n      this.description = dom.createEl(\\'p\\');\\n      this.description.innerHTML = \\'\\';\\n      this.content = dom.createEl(\\'div\\', {\\n        className: \\'vjs-recommendations-overlay-item-info vjs-recommendations-overlay-item-primary-content\\'\\n      });\\n      this.content.appendChild(this.title);\\n      this.content.appendChild(this.subtitle);\\n      this.content.appendChild(this.description);\\n      el.appendChild(this.poster);\\n      el.appendChild(this.content);\\n      return el;\\n    }\\n  }]);\\n\\n  return RecommendationsOverlayPrimaryItem;\\n}(_recommendationsOverlayItem.default);\\n\\nvar _default = RecommendationsOverlayPrimaryItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-primary-item.js?')},\"./components/recommendations-overlay/recommendations-overlay-secondary-item.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _recommendationsOverlayItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-item */ \"./components/recommendations-overlay/recommendations-overlay-item.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar RecommendationsOverlaySecondaryItem = /*#__PURE__*/function (_RecommendationsOverl) {\\n  _inherits(RecommendationsOverlaySecondaryItem, _RecommendationsOverl);\\n\\n  var _super = _createSuper(RecommendationsOverlaySecondaryItem);\\n\\n  function RecommendationsOverlaySecondaryItem() {\\n    _classCallCheck(this, RecommendationsOverlaySecondaryItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlaySecondaryItem, [{\\n    key: \"setItem\",\\n    value: function setItem(item) {\\n      _get(_getPrototypeOf(RecommendationsOverlaySecondaryItem.prototype), \"setItem\", this).call(this, item);\\n\\n      this.setDuration(\\'\\');\\n    }\\n  }, {\\n    key: \"setPoster\",\\n    value: function setPoster(url) {\\n      this.el().style.backgroundImage = \"url(\\'\".concat(url, \"\\')\");\\n    }\\n  }, {\\n    key: \"setDuration\",\\n    value: function setDuration(text) {\\n      this.duration.innerText = text;\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationsOverlaySecondaryItem.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'vjs-recommendations-overlay-item vjs-recommendations-overlay-item-secondary\\'\\n      });\\n\\n      this.title = dom.createEl(\\'span\\', {\\n        className: \\'vjs-recommendations-overlay-item-secondary-title\\'\\n      });\\n      this.title.innerHTML = \\'\\';\\n      this.duration = dom.createEl(\\'span\\', {\\n        className: \\'vjs-recommendations-overlay-item-secondary-duration\\'\\n      });\\n      this.duration.innerHTML = \\'\\';\\n      var caption = dom.createEl(\\'div\\', {\\n        className: \\'vjs-recommendations-overlay-item-info\\'\\n      });\\n      caption.appendChild(this.title);\\n      caption.appendChild(this.duration);\\n      el.appendChild(caption);\\n      return el;\\n    }\\n  }, {\\n    key: \"handleClick\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(RecommendationsOverlaySecondaryItem.prototype), \"handleClick\", this).call(this);\\n\\n      this.action();\\n    }\\n  }]);\\n\\n  return RecommendationsOverlaySecondaryItem;\\n}(_recommendationsOverlayItem.default);\\n\\nvar _default = RecommendationsOverlaySecondaryItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-secondary-item.js?')},\"./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _recommendationsOverlaySecondaryItem = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-secondary-item */ \"./components/recommendations-overlay/recommendations-overlay-secondary-item.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar RecommendationsOverlaySecondaryItemsContainer = /*#__PURE__*/function (_Component) {\\n  _inherits(RecommendationsOverlaySecondaryItemsContainer, _Component);\\n\\n  var _super = _createSuper(RecommendationsOverlaySecondaryItemsContainer);\\n\\n  function RecommendationsOverlaySecondaryItemsContainer() {\\n    _classCallCheck(this, RecommendationsOverlaySecondaryItemsContainer);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(RecommendationsOverlaySecondaryItemsContainer, [{\\n    key: \"setItems\",\\n    value: function setItems() {\\n      var _this = this;\\n\\n      for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {\\n        items[_key] = arguments[_key];\\n      }\\n\\n      this.clearItems();\\n\\n      if (!items) {\\n        return;\\n      }\\n\\n      items.forEach(function (item) {\\n        var component = new _recommendationsOverlaySecondaryItem.default(_this.player());\\n        component.setItem(item);\\n\\n        _this.addChild(component);\\n      });\\n    }\\n  }, {\\n    key: \"clearItems\",\\n    value: function clearItems() {\\n      var childrenSize = this.children().length;\\n\\n      for (var i = 0; i < childrenSize; ++i) {\\n        this.removeChild(this.children()[0]);\\n      }\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      return _get(_getPrototypeOf(RecommendationsOverlaySecondaryItemsContainer.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'vjs-recommendations-overlay-item-secondary-container\\'\\n      });\\n    }\\n  }]);\\n\\n  return RecommendationsOverlaySecondaryItemsContainer;\\n}(Component);\\n\\nvar _default = RecommendationsOverlaySecondaryItemsContainer;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay-secondary-items-container.js?')},\"./components/recommendations-overlay/recommendations-overlay.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _recommendationsOverlayContent = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-content */ \"./components/recommendations-overlay/recommendations-overlay-content.js\"));\\n\\nvar _recommendationsOverlayHideButton = _interopRequireDefault(__webpack_require__(/*! ./recommendations-overlay-hide-button */ \"./components/recommendations-overlay/recommendations-overlay-hide-button.js\"));\\n\\n__webpack_require__(/*! ./recommendations-overlay.scss */ \"./components/recommendations-overlay/recommendations-overlay.scss\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\\n\\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\\n\\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MAXIMUM_ITEMS = 4;\\n\\nvar Component = _video.default.getComponent(\\'Component\\'); // TODO: Use Video.js\\'s ModalDialog instead. It handles clicking block logic.\\n\\n\\nvar RecommendationsOverlay = /*#__PURE__*/function (_Component) {\\n  _inherits(RecommendationsOverlay, _Component);\\n\\n  var _super = _createSuper(RecommendationsOverlay);\\n\\n  function RecommendationsOverlay(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, RecommendationsOverlay);\\n\\n    for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\\n      args[_key - 2] = arguments[_key];\\n    }\\n\\n    _this = _super.call.apply(_super, [this, player].concat(args));\\n    _this._content = new _recommendationsOverlayContent.default(player);\\n\\n    _this.addChild(_this._content);\\n\\n    _this.addChild(_construct(_recommendationsOverlayHideButton.default, [player, {\\n      clickHandler: function clickHandler() {\\n        _this.close();\\n      }\\n    }].concat(args)));\\n\\n    _this.on(player, \\'recommendationschanged\\', function (_, eventData) {\\n      var _this2;\\n\\n      (_this2 = _this).setItems.apply(_this2, _toConsumableArray(eventData.items));\\n    });\\n\\n    _this.on(player, \\'recommendationsnoshow\\', _this.setDoNotOpen);\\n\\n    _this.on(player, \\'recommendationsshow\\', _this.open);\\n\\n    _this.on(player, \\'recommendationshide\\', _this.close);\\n\\n    _this.on(player, \\'cldsourcechanged\\', function () {\\n      _this.clearItems();\\n\\n      _this.close();\\n    });\\n\\n    _this.doNotOpen = false;\\n    return _this;\\n  }\\n\\n  _createClass(RecommendationsOverlay, [{\\n    key: \"setDoNotOpen\",\\n    value: function setDoNotOpen() {\\n      this.doNotOpen = true;\\n    }\\n  }, {\\n    key: \"open\",\\n    value: function open() {\\n      if (!this.doNotOpen) {\\n        // Only show controls on close if they were visible from the first place\\n        this._showControlsOnClose = this.player().controls();\\n        this.player().controls(false);\\n        this.el().style.visibility = \\'visible\\';\\n      }\\n    }\\n  }, {\\n    key: \"clearItems\",\\n    value: function clearItems() {\\n      this._content.clearItems();\\n    }\\n  }, {\\n    key: \"close\",\\n    value: function close() {\\n      this.el().style.visibility = \\'hidden\\';\\n\\n      if (this._showControlsOnClose) {\\n        this.player().controls(true);\\n      }\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(RecommendationsOverlay.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        className: \\'vjs-recommendations-overlay\\'\\n      });\\n\\n      _video.default.dom.addClass(el, \\'vjs-recommendations-overlay\\');\\n\\n      return el;\\n    }\\n  }, {\\n    key: \"setItems\",\\n    value: function setItems(primary) {\\n      var _this$_content;\\n\\n      for (var _len2 = arguments.length, secondary = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n        secondary[_key2 - 1] = arguments[_key2];\\n      }\\n\\n      this.doNotOpen = false;\\n      secondary = secondary.slice(0, MAXIMUM_ITEMS - 1);\\n\\n      (_this$_content = this._content).setItems.apply(_this$_content, [primary].concat(_toConsumableArray(secondary)));\\n    }\\n  }, {\\n    key: \"handleClick\",\\n    value: function handleClick() {\\n      this.stopPropagation();\\n    }\\n  }, {\\n    key: \"dispose\",\\n    value: function dispose() {\\n      _get(_getPrototypeOf(RecommendationsOverlay.prototype), \"dispose\", this).call(this);\\n    }\\n  }]);\\n\\n  return RecommendationsOverlay;\\n}(Component);\\n\\n_video.default.registerComponent(\\'recommendationsOverlay\\', RecommendationsOverlay);\\n\\nvar _default = RecommendationsOverlay;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay.js?')},\"./components/recommendations-overlay/recommendations-overlay.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/recommendations-overlay/recommendations-overlay.scss?\")},\"./components/shoppable-bar/layout/bar-layout.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _matches = __webpack_require__(/*! utils/matches */ \\\"./utils/matches.js\\\");\\n\\nvar _shoppableProductsOverlay = _interopRequireDefault(__webpack_require__(/*! ./shoppable-products-overlay */ \\\"./components/shoppable-bar/layout/shoppable-products-overlay.js\\\"));\\n\\nvar _shoppablePanelToggle = _interopRequireDefault(__webpack_require__(/*! ./shoppable-panel-toggle */ \\\"./components/shoppable-bar/layout/shoppable-panel-toggle.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ShoppableBarLayout = /*#__PURE__*/function (_Component) {\\n  _inherits(ShoppableBarLayout, _Component);\\n\\n  var _super = _createSuper(ShoppableBarLayout);\\n\\n  function ShoppableBarLayout(player, options) {\\n    var _thisSuper, _this;\\n\\n    _classCallCheck(this, ShoppableBarLayout);\\n\\n    _this = _super.call(this, player, options);\\n    _this.player_ = player;\\n\\n    _this.player().addClass('cld-shoppable-panel');\\n\\n    _this.player().addClass('shoppable-panel-hidden');\\n\\n    _this.contentWrpEl_ = dom.createEl('div', {\\n      className: 'cld-spbl-bar'\\n    });\\n    _this.contentBannerEl_ = dom.createEl('div', {\\n      className: 'cld-spbl-banner-msg base-color-text'\\n    }, {}, _this.options_.bannerMsg || 'Shop the Video');\\n\\n    _this.contentWrpEl_.appendChild(_this.contentBannerEl_);\\n\\n    var productsOverlay = new _shoppableProductsOverlay.default(_this.player_, _this.options_);\\n\\n    _this.contentWrpEl_.appendChild(productsOverlay.el_);\\n\\n    _this.contentEl_ = dom.createEl('div', {\\n      className: 'cld-spbl-bar-inner'\\n    });\\n\\n    _this.contentWrpEl_.appendChild(_this.contentEl_);\\n\\n    _this.player().el().appendChild(_this.contentWrpEl_);\\n\\n    _this.addChild(new _shoppablePanelToggle.default(_this.player_, {\\n      toggleIcon: _this.options_.toggleIcon,\\n      clickHandler: function clickHandler() {\\n        _this.togglePanel();\\n      }\\n    }));\\n\\n    _this.addChild('ShoppablePanel', _this.options_);\\n\\n    _this.dispose = function () {\\n      _this.removeLayout();\\n\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(ShoppableBarLayout.prototype)), \\\"dispose\\\", _thisSuper).call(_thisSuper);\\n    };\\n\\n    _this.togglePanel = function (open) {\\n      if (open === true) {\\n        // Open\\n        _this.player().removeClass('shoppable-panel-hidden');\\n\\n        _this.player().addClass('shoppable-panel-visible');\\n      } else if (open === false) {\\n        // Close\\n        _this.player().removeClass('shoppable-panel-visible');\\n\\n        _this.player().addClass('shoppable-panel-hidden');\\n      } else {\\n        // Toggle\\n        _this.player().toggleClass('shoppable-panel-hidden');\\n\\n        _this.player().toggleClass('shoppable-panel-visible');\\n      }\\n\\n      var eventName = _this.player().hasClass('shoppable-panel-visible') ? 'productBarMax' : 'productBarMin';\\n\\n      _this.player().trigger(eventName);\\n    }; // Open shoppable\\n\\n\\n    if (_this.options_.startState === 'open') {\\n      _this.togglePanel(true);\\n    } // On play start\\n\\n\\n    _this.player_.on('play', function () {\\n      if (_this.player_.currentTime() < 0.01) {\\n        // Open shoppable on-play\\n        if (_this.options_.startState === 'openOnPlay') {\\n          _this.togglePanel(true, _this.options_.autoClose);\\n        } // Auto-close shoppable\\n\\n\\n        if (_this.options_.autoClose && _this.options_.startState.indexOf('open') !== -1) {\\n          setTimeout(function () {\\n            // Keep it open while hovered\\n            if (!(0, _matches.elMatches)(_this.contentEl_, ':hover')) {\\n              _this.togglePanel(false);\\n            } else {\\n              _this.contentEl_.addEventListener('mouseleave', function () {\\n                _this.togglePanel(false);\\n              }, {\\n                once: true\\n              });\\n            }\\n          }, _this.options_.autoClose * 1000);\\n        }\\n      }\\n    });\\n\\n    return _this;\\n  }\\n\\n  _createClass(ShoppableBarLayout, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ShoppableBarLayout.prototype), \\\"createEl\\\", this).call(this, 'div');\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ShoppableBarLayout;\\n}(Component);\\n\\n_video.default.registerComponent('shoppableBarLayout', ShoppableBarLayout);\\n\\nvar _default = ShoppableBarLayout;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/layout/bar-layout.js?\")},\"./components/shoppable-bar/layout/shoppable-panel-toggle.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ClickableComponent = _video.default.getComponent(\\'ClickableComponent\\');\\n\\nvar ShoppablePanelToggle = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(ShoppablePanelToggle, _ClickableComponent);\\n\\n  var _super = _createSuper(ShoppablePanelToggle);\\n\\n  function ShoppablePanelToggle(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, ShoppablePanelToggle);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options_ = options;\\n    return _this;\\n  }\\n\\n  _createClass(ShoppablePanelToggle, [{\\n    key: \"handleClick\",\\n    value: function handleClick(event) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n      this.options_.clickHandler();\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var iconProps = {};\\n      var iconAttrs = {};\\n\\n      if (this.options_.toggleIcon) {\\n        iconProps = {\\n          className: \\'cld-spbl-toggle-icon cld-spbl-toggle-custom-icon vjs-icon-close\\'\\n        };\\n        iconAttrs = {\\n          style: \"background-image: url(\".concat(this.options_.toggleIcon, \")\")\\n        };\\n      } else {\\n        iconProps = {\\n          className: \\'cld-spbl-toggle-icon vjs-icon-cart\\'\\n        };\\n      }\\n\\n      var icon = dom.createEl(\\'span\\', iconProps, iconAttrs);\\n\\n      var el = _get(_getPrototypeOf(ShoppablePanelToggle.prototype), \"createEl\", this).call(this, \\'a\\', {\\n        className: \\'cld-spbl-toggle base-color-bg\\'\\n      });\\n\\n      el.appendChild(icon);\\n      this.player_.on(\\'productBarMin\\', function () {\\n        setTimeout(function () {\\n          icon.classList.add(\\'animate\\');\\n          setTimeout(function () {\\n            icon.classList.remove(\\'animate\\');\\n          }, 1000);\\n        }, 500);\\n      });\\n      return el;\\n    }\\n  }]);\\n\\n  return ShoppablePanelToggle;\\n}(ClickableComponent);\\n\\n_video.default.registerComponent(\\'shoppablePanelToggle\\', ShoppablePanelToggle);\\n\\nvar _default = ShoppablePanelToggle;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/layout/shoppable-panel-toggle.js?')},\"./components/shoppable-bar/layout/shoppable-products-overlay.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _time = __webpack_require__(/*! utils/time */ \\\"./utils/time.js\\\");\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ShoppableProductsOverlay = /*#__PURE__*/function (_Component) {\\n  _inherits(ShoppableProductsOverlay, _Component);\\n\\n  var _super = _createSuper(ShoppableProductsOverlay);\\n\\n  function ShoppableProductsOverlay(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppableProductsOverlay);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options_ = options;\\n    _this.player_ = player;\\n\\n    _this.player_.on('showProductsOverlay', function () {\\n      _this.renderProducts();\\n    });\\n\\n    _this.dispose = function () {\\n      _this.layout_.dispose();\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(ShoppableProductsOverlay, [{\\n    key: \\\"renderProducts\\\",\\n    value: function renderProducts() {\\n      var _this2 = this;\\n\\n      // Close products side-panel\\n      this.player_.removeClass('shoppable-panel-visible');\\n      this.player_.addClass('shoppable-panel-hidden');\\n      this.player_.addClass('shoppable-products-overlay');\\n      this.layout_.innerHTML = ''; // Filter products with appearance on currentTime\\n\\n      var currentTime = this.player_.currentTime();\\n      var currentProducts = this.options_.products.filter(function (product) {\\n        return product.hotspots && product.hotspots.some(function (a) {\\n          return (0, _time.parseTime)(a.time) === currentTime;\\n        });\\n      });\\n      currentProducts.forEach(function (product) {\\n        var hotspot = (0, _find.find)(product.hotspots, function (hs) {\\n          return (0, _time.parseTime)(hs.time) === currentTime;\\n        });\\n        var productName = dom.createEl('div', {\\n          className: 'cld-spbl-product-hotspot-name'\\n        }, {}, product.productName);\\n        var productTooltip = dom.createEl('div', {\\n          className: 'cld-spbl-product-tooltip cld-spbl-product-tooltip-' + hotspot.tooltipPosition\\n        }, {}, productName);\\n        var productHotSpot = dom.createEl('a', {\\n          className: 'cld-spbl-product-hotspot accent-color-text',\\n          href: hotspot.clickUrl,\\n          target: '_blank'\\n        }, {\\n          style: 'left:' + hotspot.x + '; top:' + hotspot.y + ';'\\n        }, productTooltip);\\n\\n        _this2.layout_.appendChild(productHotSpot);\\n      }); // Remove\\n\\n      this.player_.one('seeking', function (e) {\\n        return _this2.clearLayout(e);\\n      });\\n      this.player_.one('play', function (e) {\\n        return _this2.clearLayout(e);\\n      });\\n    }\\n  }, {\\n    key: \\\"clearLayout\\\",\\n    value: function clearLayout() {\\n      this.layout_.innerHTML = '';\\n      this.player_.removeClass('shoppable-products-overlay');\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      this.layout_ = dom.createEl('div', {\\n        className: 'cld-spbl-products-overlay'\\n      });\\n      return this.layout_;\\n    }\\n  }]);\\n\\n  return ShoppableProductsOverlay;\\n}(Component);\\n\\n_video.default.registerComponent('ShoppableProductsOverlay', ShoppableProductsOverlay);\\n\\nvar _default = ShoppableProductsOverlay;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/layout/shoppable-products-overlay.js?\")},\"./components/shoppable-bar/panel/shoppable-panel-item.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _matches = __webpack_require__(/*! utils/matches */ \\\"./utils/matches.js\\\");\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar ClickableComponent = _video.default.getComponent('ClickableComponent');\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ShoppablePanelItem = /*#__PURE__*/function (_ClickableComponent) {\\n  _inherits(ShoppablePanelItem, _ClickableComponent);\\n\\n  var _super = _createSuper(ShoppablePanelItem);\\n\\n  function ShoppablePanelItem(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, ShoppablePanelItem);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options_ = options;\\n    _this.isDragged = false;\\n    return _this;\\n  }\\n\\n  _createClass(ShoppablePanelItem, [{\\n    key: \\\"handleClick\\\",\\n    value: function handleClick(event) {\\n      event.preventDefault();\\n      event.stopPropagation();\\n\\n      if (!(0, _matches.elMatches)(this.el_, '.dragged .cld-spbl-item')) {\\n        // Prevent click event if dragged\\n        this.options_.clickHandler(event);\\n      }\\n\\n      this.isDragged = false;\\n    }\\n  }, {\\n    key: \\\"getTitle\\\",\\n    value: function getTitle() {\\n      return this.options_.conf.title;\\n    }\\n  }, {\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ShoppablePanelItem.prototype), \\\"createEl\\\", this).call(this, 'a', {\\n        className: 'cld-spbl-item base-color-bg accent-color-text',\\n        href: '#'\\n      });\\n\\n      el.setAttribute('data-product-id', this.options_.conf.productId || '');\\n      el.setAttribute('data-product-name', this.options_.conf.productName || '');\\n\\n      if (this.options_.conf.onHover) {\\n        addOnHover(el, this.options_.conf.onHover, this.options_.item.cloudinaryConfig());\\n      }\\n\\n      if (this.options_.conf.onClick) {\\n        addOnClick(el, this.options_.conf.onClick);\\n      }\\n\\n      var img = _get(_getPrototypeOf(ShoppablePanelItem.prototype), \\\"createEl\\\", this).call(this, 'img', {\\n        className: 'cld-spbl-img cld-vp-responsive'\\n      }, {\\n        'data-src': this.options_.item.url()\\n      });\\n\\n      el.appendChild(img);\\n\\n      if (this.getTitle()) {\\n        var info = dom.createEl('div', {\\n          className: 'cld-spbl-item-info base-color-semi-bg text-color-text'\\n        });\\n        var title = dom.createEl('span', {\\n          className: 'cld-spbl-item-title'\\n        }, {}, this.getTitle());\\n        info.appendChild(title);\\n        el.appendChild(info);\\n      }\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ShoppablePanelItem;\\n}(ClickableComponent);\\n\\nvar addOnHover = function addOnHover(el, conf, cldConf) {\\n  el.setAttribute('data-hover-action', conf.action);\\n\\n  if (conf.action === 'overlay') {\\n    var overlayText = dom.createEl('span', {\\n      className: 'cld-spbl-overlay-text base-color-text'\\n    }, {}, conf.args);\\n    var overlay = dom.createEl('span', {\\n      className: 'cld-spbl-overlay text-color-semi-bg base-color-text'\\n    }, {\\n      title: conf.args\\n    }, overlayText);\\n    el.appendChild(overlay);\\n  } else {\\n    var switchImgSource = new _imageSource.default(conf.args.publicId, {\\n      cloudinaryConfig: cldConf,\\n      transformation: conf.args.transformation\\n    });\\n    var hoverImg = dom.createEl('img', {\\n      className: 'cld-spbl-img cld-spbl-hover-img cld-vp-responsive'\\n    }, {\\n      'data-src': switchImgSource.url()\\n    });\\n    el.appendChild(hoverImg);\\n  }\\n};\\n\\nvar addOnClick = function addOnClick(el, conf) {\\n  el.setAttribute('data-click-action', conf.action);\\n  el.setAttribute('data-pause', conf.pause);\\n\\n  if (conf.action === 'seek') {\\n    el.setAttribute('data-seek', conf.args.time);\\n  } else if (conf.action === 'goto') {\\n    el.setAttribute('data-goto-url', conf.args.url);\\n  }\\n};\\n\\n_video.default.registerComponent('shoppablePanelItem', ShoppablePanelItem);\\n\\nvar _default = ShoppablePanelItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/panel/shoppable-panel-item.js?\")},\"./components/shoppable-bar/panel/shoppable-panel.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _throttle = __webpack_require__(/*! utils/throttle */ \\\"./utils/throttle.js\\\");\\n\\nvar _time = __webpack_require__(/*! utils/time */ \\\"./utils/time.js\\\");\\n\\n__webpack_require__(/*! assets/styles/components/playlist.scss */ \\\"./assets/styles/components/playlist.scss\\\");\\n\\nvar _shoppablePanelItem = _interopRequireDefault(__webpack_require__(/*! ./shoppable-panel-item */ \\\"./components/shoppable-bar/panel/shoppable-panel-item.js\\\"));\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ../../../plugins/cloudinary/models/image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \\\"undefined\\\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent('Component');\\n\\nvar ShoppablePanel = /*#__PURE__*/function (_Component) {\\n  _inherits(ShoppablePanel, _Component);\\n\\n  var _super = _createSuper(ShoppablePanel);\\n\\n  function ShoppablePanel(player) {\\n    var _thisSuper, _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppablePanel);\\n\\n    _this = _super.call(this, player, options);\\n    _this.options = options;\\n\\n    var itemChangeHandler = function itemChangeHandler() {\\n      _this.render();\\n    };\\n\\n    player.on('shoppableitemchanged', itemChangeHandler);\\n\\n    _this.render();\\n\\n    _this.dispose = function () {\\n      _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(ShoppablePanel.prototype)), \\\"dispose\\\", _thisSuper).call(_thisSuper);\\n\\n      player.off('shoppableitemchanged', itemChangeHandler);\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(ShoppablePanel, [{\\n    key: \\\"createEl\\\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ShoppablePanel.prototype), \\\"createEl\\\", this).call(this);\\n\\n      ['cld-spbl-panel', 'base-color-bg'].map(function (cls) {\\n        return el.classList.add(cls);\\n      });\\n      return el;\\n    }\\n  }, {\\n    key: \\\"removeAll\\\",\\n    value: function removeAll() {\\n      var childrens = this.children();\\n\\n      for (var i = childrens.length - 1; i >= 0; --i) {\\n        this.removeChild(childrens[i]);\\n      }\\n    }\\n  }, {\\n    key: \\\"getItems\\\",\\n    value: function getItems() {\\n      var _this2 = this;\\n\\n      var cloudinaryConfig = this.player_.cloudinary.cloudinaryConfig();\\n      return this.options.products.map(function (product) {\\n        if (product.onHover && _typeof(product.onHover.args) === 'object') {\\n          product.onHover.args.transformation = (0, _assign.assign)({}, _this2.options.transformation, product.onHover.args.transformation);\\n        }\\n\\n        var conf = {\\n          productId: product.productId,\\n          productName: product.productName,\\n          title: product.title,\\n          onHover: product.onHover,\\n          onClick: product.onClick,\\n          startTime: product.startTime,\\n          endTime: product.endTime\\n        };\\n        var imageSource = new _imageSource.default(product.publicId, {\\n          cloudinaryConfig: cloudinaryConfig,\\n          transformation: (0, _assign.assign)({}, _this2.options.transformation, product.transformation)\\n        });\\n        return {\\n          imageSrc: imageSource,\\n          conf: conf\\n        };\\n      });\\n    }\\n  }, {\\n    key: \\\"scrollToActiveItem\\\",\\n    value: function scrollToActiveItem() {\\n      var activeItems = this.el_.getElementsByClassName('active');\\n\\n      if (activeItems.length > 0) {\\n        var toScroll = activeItems[0].offsetTop - 12; // Test for native scrollTo support (IE will fail)\\n\\n        if ('scrollBehavior' in document.documentElement.style) {\\n          this.el_.scrollTo({\\n            top: toScroll,\\n            behavior: 'smooth'\\n          });\\n        } else {\\n          this.el_.scrollTop = toScroll;\\n        }\\n      }\\n    }\\n  }, {\\n    key: \\\"render\\\",\\n    value: function render() {\\n      var _this3 = this;\\n\\n      this.removeAll();\\n      var items = this.getItems();\\n      var throttledScrollToActiveItem = (0, _throttle.throttle)(function () {\\n        return _this3.scrollToActiveItem();\\n      }, 1000);\\n      items.forEach(function (item, index) {\\n        var shoppablePanelItem = new _shoppablePanelItem.default(_this3.player(), {\\n          item: item.imageSrc,\\n          conf: item.conf,\\n          next: index === 1,\\n          current: index === 0,\\n          clickHandler: function clickHandler(e) {\\n            var target = e.currentTarget || e.target;\\n            var evName = _this3.player_.ended() ? 'productClickPost' : 'productClick';\\n\\n            _this3.player_.trigger(evName, {\\n              productId: target.dataset.productId,\\n              productName: target.dataset.productName\\n            }); // Go to URL, or seek video (set currentTime)\\n\\n\\n            if (target.dataset.clickAction === 'goto') {\\n              window.open(target.dataset.gotoUrl, '_blank');\\n            } else if (target.dataset.clickAction === 'seek') {\\n              var gotoSecs = (0, _time.parseTime)(target.dataset.seek);\\n\\n              if (gotoSecs !== null) {\\n                _this3.player_.addClass('vjs-has-started'); // Hide the poster image\\n\\n\\n                if (_this3.player_.postModal) {\\n                  _this3.player_.postModal.close();\\n                }\\n\\n                _this3.player_.currentTime(gotoSecs); // Close products side-panel\\n\\n\\n                _this3.player_.removeClass('shoppable-panel-visible');\\n\\n                _this3.player_.addClass('shoppable-panel-hidden');\\n\\n                _this3.player_.addClass('shoppable-products-overlay'); // Wait for the time update and show the tooltips\\n\\n\\n                _this3.player_.one('seeked', function () {\\n                  return _this3.player_.trigger('showProductsOverlay');\\n                });\\n              }\\n            } // pause - true (default), false, or number of seconds\\n\\n\\n            if (target.dataset.pause !== 'false') {\\n              _this3.player_.pause();\\n\\n              if ((0, _time.parseTime)(target.dataset.pause)) {\\n                setTimeout(function () {\\n                  _this3.player_.play();\\n                }, (0, _time.parseTime)(target.dataset.pause) * 1000);\\n              }\\n            }\\n          }\\n        });\\n        shoppablePanelItem.on('mouseover', function (e) {\\n          var target = e.currentTarget || e.target;\\n          var evName = _this3.player_.ended() ? 'productHoverPost' : 'productHover';\\n\\n          _this3.player_.trigger(evName, {\\n            productId: target.dataset.productId,\\n            productName: target.dataset.productName\\n          });\\n        });\\n\\n        if (typeof item.conf.startTime !== 'undefined' && typeof item.conf.endTime !== 'undefined') {\\n          _this3.player_.on('timeupdate', function () {\\n            var time = _this3.player_.currentTime();\\n\\n            if (time >= item.conf.startTime && time < item.conf.endTime) {\\n              shoppablePanelItem.el_.classList.add('active');\\n              throttledScrollToActiveItem();\\n            } else if (shoppablePanelItem.el_.classList.contains('active')) {\\n              shoppablePanelItem.el_.classList.remove('active');\\n            }\\n          });\\n        }\\n\\n        _this3.addChild(shoppablePanelItem);\\n      });\\n    }\\n  }]);\\n\\n  return ShoppablePanel;\\n}(Component);\\n\\n_video.default.registerComponent('shoppablePanel', ShoppablePanel);\\n\\nvar _default = ShoppablePanel;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/panel/shoppable-panel.js?\")},\"./components/shoppable-bar/shoppable-post-widget.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _shoppablePanel = _interopRequireDefault(__webpack_require__(/*! ./panel/shoppable-panel.js */ \\\"./components/shoppable-bar/panel/shoppable-panel.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\\n\\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\\n\\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ShoppablePostWidget = /*#__PURE__*/function () {\\n  function ShoppablePostWidget(player) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppablePostWidget);\\n\\n    this.options_ = _objectSpread(_objectSpread({}, options), {}, {\\n      postPlay: true\\n    });\\n    this.player_ = player;\\n    this.render(); // Handle drag-to-scroll\\n\\n    this.handleDragToScroll();\\n\\n    this.dispose = function () {\\n      _this.layout_.dispose();\\n    };\\n  }\\n\\n  _createClass(ShoppablePostWidget, [{\\n    key: \\\"handleDragToScroll\\\",\\n    value: function handleDragToScroll() {\\n      var postModal = this.player_.postModal.el_;\\n      var slider = postModal.querySelector('.cld-spbl-panel');\\n      var isDown = false;\\n      var startX = 0;\\n      var scrollLeft = 0;\\n      slider.addEventListener('mousedown', function (e) {\\n        isDown = true;\\n        startX = e.pageX - slider.offsetLeft;\\n        scrollLeft = slider.scrollLeft;\\n      });\\n      document.addEventListener('mouseup', function (e) {\\n        isDown = false;\\n        setTimeout(function () {\\n          slider.classList.remove('dragged');\\n        }, 300);\\n        var x = e.pageX - slider.offsetLeft;\\n        var walk = x - startX;\\n\\n        if (Math.abs(walk) > 5) {\\n          e.preventDefault();\\n        }\\n      });\\n      document.addEventListener('mousemove', function (e) {\\n        if (!isDown) {\\n          return;\\n        }\\n\\n        e.preventDefault();\\n        var x = e.pageX - slider.offsetLeft;\\n        var walk = x - startX;\\n        slider.scrollLeft = scrollLeft - walk;\\n\\n        if (Math.abs(walk) > 5 && !slider.classList.contains('dragged')) {\\n          slider.classList.add('dragged');\\n        }\\n      });\\n    }\\n  }, {\\n    key: \\\"render\\\",\\n    value: function render() {\\n      var _this2 = this;\\n\\n      this.player_.postModal = null;\\n      var el = dom.createEl('div', {\\n        className: 'cld-spbl-post-play'\\n      });\\n      var panel = new _shoppablePanel.default(this.player_, this.options_);\\n      var title = dom.createEl('div', {\\n        className: 'cld-spbl-post-title base-color-text'\\n      }, {}, this.options_.bannerMsg || 'Shop the Video'); // Background - poster + blur effect\\n\\n      var bgSrc = this.player_.cloudinary.currentPoster();\\n      bgSrc.transformation([bgSrc.transformation().toOptions(), {\\n        effect: 'blur:3000'\\n      }]);\\n      var panelBg = dom.createEl('div', {\\n        className: 'cld-spbl-post-play-bg',\\n        style: 'background-image: url(\\\"' + bgSrc.url() + '\\\")'\\n      });\\n      var replayBtn = dom.createEl('button', {\\n        className: 'cld-spbl-replay-btn base-color-bg vjs-icon-replay',\\n        onclick: function onclick() {\\n          _this2.player_.trigger('replay');\\n\\n          _this2.player_.postModal.close();\\n\\n          _this2.player_.play();\\n        }\\n      }, {}, 'Replay');\\n      el.appendChild(panelBg);\\n      el.appendChild(title);\\n      el.appendChild(panel.el());\\n      el.appendChild(replayBtn);\\n      this.player_.postModal = this.player_.createModal(el, {\\n        name: 'postModal',\\n        uncloseable: true\\n      });\\n      this.player_.addClass('cld-spbl-post-modal');\\n      this.player_.postModal.on('beforemodalclose', function () {\\n        _this2.player_.removeClass('cld-spbl-post-modal');\\n      });\\n    }\\n  }]);\\n\\n  return ShoppablePostWidget;\\n}();\\n\\nvar _default = ShoppablePostWidget;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/shoppable-post-widget.js?\")},\"./components/shoppable-bar/shoppable-widget.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _barLayout = _interopRequireDefault(__webpack_require__(/*! ./layout/bar-layout */ \"./components/shoppable-bar/layout/bar-layout.js\"));\\n\\nvar _shoppablePostWidget = _interopRequireDefault(__webpack_require__(/*! ./shoppable-post-widget */ \"./components/shoppable-bar/shoppable-post-widget.js\"));\\n\\n__webpack_require__(/*! ./shoppable-widget.scss */ \"./components/shoppable-bar/shoppable-widget.scss\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\\n\\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\\n\\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\\n\\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\\n\\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar OPTIONS_DEFAULTS = {\\n  location: \\'right\\',\\n  toggleIcon: \\'\\',\\n  width: \\'20%\\',\\n  startState: \\'openOnPlay\\',\\n  autoClose: 2,\\n  transformation: {\\n    quality: \\'auto\\',\\n    width: \\'auto\\',\\n    fetch_format: \\'auto\\',\\n    crop: \\'scale\\'\\n  },\\n  products: [],\\n  showPostPlayOverlay: false\\n};\\n\\nvar ShoppableWidget = /*#__PURE__*/function () {\\n  function ShoppableWidget(player) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ShoppableWidget);\\n\\n    this.options_ = _video.default.mergeOptions(OPTIONS_DEFAULTS, options);\\n    this.player_ = player;\\n\\n    this.init = function () {\\n      _this.render();\\n    };\\n\\n    if (this.options_.showPostPlayOverlay) {\\n      this.player_.on(\\'ended\\', function () {\\n        _this.player_.addChild(new _shoppablePostWidget.default(_this.player_, _this.options_)); // Handle responsive images.\\n\\n\\n        _this.player_.player_.cloudinary.cloudinaryConfig().responsive({\\n          responsive_class: \\'cld-vp-responsive\\'\\n        });\\n      });\\n    }\\n\\n    var injectCSS = function injectCSS(css) {\\n      var style = document.createElement(\\'style\\');\\n      style.innerHTML = css;\\n      player.el_.appendChild(style);\\n    };\\n\\n    var width = this.options_.width;\\n    injectCSS(\"\\\\n      .cld-spbl-bar-inner {\\\\n        transform: translateX(\".concat(width, \");\\\\n      }\\\\n      .shoppable-panel-visible .vjs-control-bar {\\\\n        width: calc(100% - \").concat(width, \");\\\\n      }\\\\n      .cld-spbl-toggle {\\\\n        right: \").concat(width, \";\\\\n      }\\\\n      .cld-spbl-panel {\\\\n        width: \").concat(width, \";\\\\n      }\\\\n    \"));\\n\\n    var resizeHandler = function resizeHandler() {\\n      var shoppableBarBreakpoints = [[\\'sm\\', 0, 80], [\\'md\\', 81, 110], [\\'lg\\', 111, 170]];\\n      var shoppableBarWidth = parseFloat(_this.options_.width) / 100.0 * player.el_.clientWidth;\\n      var inRange = false;\\n\\n      if (shoppableBarWidth) {\\n        var _iterator = _createForOfIteratorHelper(shoppableBarBreakpoints),\\n            _step;\\n\\n        try {\\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\\n            var _step$value = _slicedToArray(_step.value, 3),\\n                name = _step$value[0],\\n                min = _step$value[1],\\n                max = _step$value[2];\\n\\n            if (shoppableBarWidth > min && shoppableBarWidth <= max) {\\n              _this.layout_.contentWrpEl_.setAttribute(\\'size\\', name);\\n\\n              inRange = name;\\n            }\\n          }\\n        } catch (err) {\\n          _iterator.e(err);\\n        } finally {\\n          _iterator.f();\\n        }\\n\\n        if (!inRange) {\\n          _this.layout_.contentWrpEl_.removeAttribute(\\'size\\');\\n        }\\n      }\\n    };\\n\\n    this.player_.on(\\'resize\\', resizeHandler);\\n    window.addEventListener(\\'resize\\', resizeHandler);\\n\\n    this.dispose = function () {\\n      _this.player_.off(\\'resize\\', resizeHandler);\\n\\n      window.removeEventListener(\\'resize\\', resizeHandler);\\n\\n      _this.layout_.dispose();\\n    };\\n  }\\n\\n  _createClass(ShoppableWidget, [{\\n    key: \"render\",\\n    value: function render() {\\n      var _this2 = this;\\n\\n      this.layout_ = new _barLayout.default(this.player_, this.options_);\\n      this.player_.on(\\'loadeddata\\', function () {\\n        // Handle responsive images.\\n        _this2.player_.player_.cloudinary.cloudinaryConfig().responsive({\\n          responsive_class: \\'cld-vp-responsive\\'\\n        });\\n      });\\n    }\\n  }]);\\n\\n  return ShoppableWidget;\\n}();\\n\\nvar _default = ShoppableWidget;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/shoppable-widget.js?')},\"./components/shoppable-bar/shoppable-widget.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/shoppable-bar/shoppable-widget.scss?\")},\"./components/title-bar/title-bar.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\n__webpack_require__(/*! assets/styles/components/title-bar.scss */ \"./assets/styles/components/title-bar.scss\");\\n\\nvar _componentUtils = _interopRequireDefault(__webpack_require__(/*! ../component-utils */ \"./components/component-utils.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\n// support VJS5 & VJS6 at the same time\\nvar dom = _video.default.dom || _video.default;\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar TitleBar = /*#__PURE__*/function (_Component) {\\n  _inherits(TitleBar, _Component);\\n\\n  var _super = _createSuper(TitleBar);\\n\\n  function TitleBar(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, TitleBar);\\n\\n    _this = _super.call(this, player, options);\\n\\n    _this.on(player, \\'cldsourcechanged\\', function (_, _ref) {\\n      var source = _ref.source;\\n      return _this.setItem(source);\\n    });\\n\\n    _this.setItem = function (source) {\\n      if (!source) {\\n        _this.setTitle(\\'\\');\\n\\n        _this.setSubtitle(\\'\\');\\n\\n        return;\\n      }\\n\\n      var info = source.info();\\n\\n      _this.setTitle(info.title);\\n\\n      _this.setSubtitle(info.subtitle);\\n    };\\n\\n    _this.setTitle = function (text) {\\n      _componentUtils.default.setText(_this.titleEl, text);\\n\\n      refresh();\\n      return text;\\n    };\\n\\n    _this.setSubtitle = function (text) {\\n      _componentUtils.default.setText(_this.subtitleEl, text);\\n\\n      refresh();\\n      return text;\\n    };\\n\\n    var titleValue = function titleValue() {\\n      return _this.titleEl.innerText;\\n    };\\n\\n    var subtitleValue = function subtitleValue() {\\n      return _this.subtitleEl.innerText;\\n    };\\n\\n    var refresh = function refresh() {\\n      if (!titleValue() && !subtitleValue()) {\\n        _this.hide();\\n\\n        return;\\n      }\\n\\n      _this.show();\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(TitleBar, [{\\n    key: \"createEl\",\\n    value: function createEl() {\\n      this.titleEl = dom.createEl(\\'div\\', {\\n        className: \\'vjs-title-bar-title\\'\\n      });\\n      this.subtitleEl = dom.createEl(\\'div\\', {\\n        className: \\'vjs-title-bar-subtitle\\'\\n      });\\n\\n      var el = _get(_getPrototypeOf(TitleBar.prototype), \"createEl\", this).call(this, \\'div\\', {\\n        append: this.titleEl,\\n        className: \\'vjs-title-bar\\'\\n      });\\n\\n      el.appendChild(this.titleEl);\\n      el.appendChild(this.subtitleEl);\\n      return el;\\n    }\\n  }]);\\n\\n  return TitleBar;\\n}(Component);\\n\\n_video.default.registerComponent(\\'titleBar\\', TitleBar);\\n\\nvar _default = TitleBar;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./components/title-bar/title-bar.js?')},\"./config/defaults.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _contextMenuContent = _interopRequireDefault(__webpack_require__(/*! ../plugins/context-menu/contextMenuContent */ \\\"./plugins/context-menu/contextMenuContent.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar _default = {\\n  logoOnclickUrl: 'https://cloudinary.com/',\\n  showLogo: true,\\n  showJumpControls: false,\\n  skin: 'dark',\\n  controls: false,\\n  controlBar: {\\n    'pictureInPictureToggle': false\\n  },\\n  preload: false,\\n  loop: false,\\n  muted: false,\\n  posterOptions: {},\\n  sourceTypes: ['webm/vp9', 'mp4/h265', 'mp4'],\\n  contextMenu: {\\n    content: _contextMenuContent.default\\n  },\\n  floatingWhenNotVisible: false,\\n  hideContextMenu: false,\\n  analytics: false,\\n  playedEventPercents: [25, 50, 75, 100]\\n};\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./config/defaults.js?\")},\"./extended-events.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = exports.normalizeEventsParam = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _events = _interopRequireDefault(__webpack_require__(/*! events */ \\\"../node_modules/events/events.js\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \\\"./utils/type-inference.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar EVENT_DEFAULTS = {\\n  percentsplayed: {\\n    percents: [25, 50, 75, 100]\\n  }\\n};\\nvar DEFAULT_EVENTS = ['percentsplayed', 'pausenoseek', 'seek', 'mute', 'unmute', 'qualitychanged'];\\nvar DEFAULT_OPTIONS = {\\n  events: DEFAULT_EVENTS\\n}; // Emits the following additional events:\\n// percentsplayed, timeplayed, pausenoseek, seek, mute, unmute\\n\\nvar ExtendedEvents = /*#__PURE__*/function (_EventEmitter) {\\n  _inherits(ExtendedEvents, _EventEmitter);\\n\\n  var _super = _createSuper(ExtendedEvents);\\n\\n  function ExtendedEvents(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ExtendedEvents);\\n\\n    _this = _super.call(this);\\n    _this.player = player;\\n    options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n    var _muteData = {\\n      lastState: undefined\\n    };\\n    var _seekStart = 0;\\n    var _seekEnd = 0;\\n    var _seeking = false;\\n    var _percentsTracked = [];\\n    var _timesTracked = [];\\n    var _currentSource = null;\\n    var _ended = false;\\n\\n    var volumechange = function volumechange(event) {\\n      if (_this.player.muted() && _muteData.lastState !== 'muted') {\\n        _muteData.lastState = 'muted';\\n\\n        _this.emit('mute', event);\\n      } else if (!_this.player.muted() && _muteData.lastState !== 'unmuted') {\\n        _muteData.lastState = 'unmuted';\\n\\n        _this.emit('unmute', event);\\n      }\\n    };\\n\\n    var timeupdate = function timeupdate(event) {\\n      var currentTime = _this.player.currentTime();\\n\\n      var duration = _this.player.duration();\\n\\n      var _emit = function _emit(type, data) {\\n        data.originalType = 'timeupdate';\\n\\n        _this.emit(type, event, data);\\n      };\\n\\n      if (_this.events.percentsplayed) {\\n        _this.events.percentsplayed.percents.forEach(function (percent) {\\n          if (playedAtPercentage(currentTime, duration, percent) && _percentsTracked.indexOf(percent) === -1) {\\n            _percentsTracked.push(percent);\\n\\n            _emit('percentsplayed', {\\n              percent: percent\\n            });\\n          }\\n        });\\n      }\\n\\n      if (_this.events.timeplayed) {\\n        var timeplayed = _this.events.timeplayed;\\n        var times = timeplayed.interval ? [Math.floor(currentTime / timeplayed.interval) * timeplayed.interval] : timeplayed.times;\\n        times.forEach(function (time) {\\n          if (playedAtTime(currentTime, time) && _timesTracked.indexOf(time) === -1) {\\n            _timesTracked.push(time);\\n\\n            _emit('timeplayed', {\\n              time: time\\n            });\\n          }\\n        });\\n      }\\n\\n      if (_this.events.seek) {\\n        _seekStart = _seekEnd;\\n        _seekEnd = currentTime;\\n\\n        if (Math.abs(_seekStart - _seekEnd) > 1) {\\n          _seeking = true;\\n\\n          _emit('seek', {\\n            seekStart: _seekStart,\\n            seekEnd: _seekEnd\\n          });\\n        }\\n      }\\n    };\\n\\n    var pause = function pause(event) {\\n      var currentTime = Math.round(_this.player.currentTime());\\n      var duration = Math.round(_this.player.duration());\\n\\n      if (currentTime !== duration && !_seeking) {\\n        _this.emit('pausenoseek', event);\\n      }\\n    };\\n\\n    var play = function play() {\\n      _seeking = false;\\n    };\\n\\n    var replay = function replay() {\\n      if (_ended) {\\n        _this.player.trigger('replay');\\n\\n        _ended = false;\\n      }\\n    };\\n\\n    var loadedmetadata = function loadedmetadata() {\\n      if (_this.player.currentSource().src !== _currentSource) {\\n        resetPerVideoState();\\n        _currentSource = _this.player.currentSource().src;\\n      }\\n    };\\n\\n    var adaptiveEvents = function adaptiveEvents(event) {\\n      var ee = _assertThisInitialized(_this);\\n\\n      var tracks = _this.player.textTracks();\\n\\n      var segmentMetadataTrack = null;\\n\\n      for (var i = 0; i < tracks.length; i++) {\\n        if (tracks[i].label === 'segment-metadata') {\\n          segmentMetadataTrack = tracks[i];\\n        }\\n      }\\n\\n      var previousResolution = null;\\n\\n      if (segmentMetadataTrack) {\\n        segmentMetadataTrack.on('cuechange', function () {\\n          var activeCue = segmentMetadataTrack.activeCues[0];\\n\\n          if (activeCue) {\\n            var currentRes = activeCue.value.resolution;\\n\\n            if (previousResolution !== currentRes) {\\n              var data = {\\n                from: previousResolution,\\n                to: currentRes\\n              };\\n              ee.emit('qualitychanged', event, data);\\n            }\\n\\n            previousResolution = currentRes;\\n          }\\n        });\\n      }\\n    };\\n\\n    var resetState = function resetState() {\\n      _muteData = {\\n        lastState: undefined\\n      };\\n      _seekStart = _seekEnd = 0;\\n      _seeking = false;\\n      resetPerVideoState();\\n    };\\n\\n    var resetPerVideoState = function resetPerVideoState() {\\n      _percentsTracked = [];\\n      _timesTracked = [];\\n    };\\n\\n    var ended = function ended() {\\n      _ended = true;\\n    };\\n\\n    _this.events = normalizeEventsParam(options.events, EVENT_DEFAULTS);\\n    resetState();\\n\\n    _this.player.on('play', replay.bind(_assertThisInitialized(_this)));\\n\\n    _this.player.on('ended', ended.bind(_assertThisInitialized(_this)));\\n\\n    if (_this.events.percentsplayed || _this.events.timeplayed || _this.events.seek || _this.events.totaltimeplayed) {\\n      _this.player.on('timeupdate', timeupdate.bind(_assertThisInitialized(_this)));\\n    }\\n\\n    if (_this.events.mute || _this.events.unmute) {\\n      _this.player.on('volumechange', volumechange.bind(_assertThisInitialized(_this)));\\n    }\\n\\n    if (_this.events.pausenoseek) {\\n      _this.player.on('pause', pause.bind(_assertThisInitialized(_this)));\\n\\n      _this.player.on('play', play.bind(_assertThisInitialized(_this)));\\n    }\\n\\n    _this.player.on('loadedmetadata', loadedmetadata.bind(_assertThisInitialized(_this)));\\n\\n    _this.player.on('loadeddata', adaptiveEvents.bind(_assertThisInitialized(_this)));\\n\\n    return _this;\\n  }\\n\\n  return ExtendedEvents;\\n}(_events.default);\\n\\nvar normalizeEventsParam = function normalizeEventsParam(events, defaults) {\\n  var normalized = events;\\n\\n  if (events.constructor.name === 'Array') {\\n    normalized = events.reduce(function (agg, item) {\\n      var eventDefaults = defaults[item] || {};\\n\\n      if ((0, _typeInference.isPlainObject)(item)) {\\n        agg[item.type] = (0, _assign.assign)({}, eventDefaults, item);\\n      } else {\\n        agg[item] = eventDefaults;\\n      }\\n\\n      return agg;\\n    }, {});\\n  }\\n\\n  return normalized;\\n};\\n\\nexports.normalizeEventsParam = normalizeEventsParam;\\n\\nvar playedAtPercentage = function playedAtPercentage(currentTime, duration, percentageCheckpoint) {\\n  var graceRangeSeconds = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.5;\\n  var checkPoint = duration * percentageCheckpoint / 100;\\n  return playedAtTime(currentTime, checkPoint, graceRangeSeconds);\\n};\\n\\nvar playedAtTime = function playedAtTime(currentTime, checkpoint) {\\n  var graceRangeSeconds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.5;\\n  return currentTime <= checkpoint + graceRangeSeconds && currentTime >= checkpoint - graceRangeSeconds;\\n};\\n\\nvar _default = ExtendedEvents;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./extended-events.js?\")},\"./index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\n__webpack_require__(/*! assets/styles/main.scss */ \"./assets/styles/main.scss\");\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \"cloudinary-core\"));\\n\\nvar _videoPlayer = _interopRequireDefault(__webpack_require__(/*! ./video-player */ \"./video-player.js\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \"./utils/assign.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n_cloudinaryCore.default.VideoPlayer = _videoPlayer.default;\\nvar proto = _cloudinaryCore.default.Cloudinary.prototype;\\n\\nproto.videoPlayer = function (id) {\\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n  var ready = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\\n  (0, _assign.assign)(options, {\\n    cloudinaryConfig: this\\n  });\\n  return new _videoPlayer.default(id, options, ready);\\n};\\n\\nproto.videoPlayers = function (selector) {\\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n  var ready = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\\n  (0, _assign.assign)(options, {\\n    cloudinaryConfig: this\\n  });\\n  return _videoPlayer.default.all(selector, options, ready);\\n};\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./index.js?')},\"./mixins/eventable.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Eventable = function Eventable(superclass) {\\n  return /*#__PURE__*/function (_superclass) {\\n    _inherits(_class, _superclass);\\n\\n    var _super = _createSuper(_class);\\n\\n    function _class() {\\n      var _this;\\n\\n      _classCallCheck(this, _class);\\n\\n      _this = _super.call(this);\\n      var eventable = {\\n        data: {},\\n        handlers: {}\\n      };\\n\\n      _this.on = function () {\\n        var _this$videojs;\\n\\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\\n          args[_key] = arguments[_key];\\n        }\\n\\n        var lastIndex = args.length - 1;\\n        var func = args[lastIndex];\\n\\n        eventable.handlers[func] = function (event) {\\n          event.Player = _assertThisInitialized(_this);\\n\\n          for (var _len2 = arguments.length, _args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n            _args[_key2 - 1] = arguments[_key2];\\n          }\\n\\n          func.apply(void 0, [event].concat(_args));\\n        };\\n\\n        args[lastIndex] = eventable.handlers[func];\\n        return (_this$videojs = _this.videojs).on.apply(_this$videojs, args);\\n      };\\n\\n      _this.one = function () {\\n        var _this$videojs2;\\n\\n        for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n          args[_key3] = arguments[_key3];\\n        }\\n\\n        var lastIndex = args.length - 1;\\n        var func = args[lastIndex];\\n\\n        eventable.handlers[func] = function (event) {\\n          event.Player = _assertThisInitialized(_this);\\n\\n          for (var _len4 = arguments.length, _args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\\n            _args[_key4 - 1] = arguments[_key4];\\n          }\\n\\n          func.apply(void 0, [event].concat(_args));\\n          delete eventable.handlers[func];\\n        };\\n\\n        args[lastIndex] = eventable.handlers[func];\\n        return (_this$videojs2 = _this.videojs).one.apply(_this$videojs2, args);\\n      };\\n\\n      _this.off = function () {\\n        var _this$videojs3;\\n\\n        for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\\n          args[_key5] = arguments[_key5];\\n        }\\n\\n        var lastIndex = args.length - 1;\\n        var func = args[lastIndex];\\n        args[lastIndex] = eventable.handlers[func];\\n\\n        var res = (_this$videojs3 = _this.videojs).off.apply(_this$videojs3, args);\\n\\n        delete eventable.handlers[func];\\n        return res;\\n      };\\n\\n      _this.trigger = function () {\\n        var _this$videojs4;\\n\\n        (_this$videojs4 = _this.videojs).trigger.apply(_this$videojs4, arguments);\\n      };\\n\\n      return _this;\\n    }\\n\\n    return _class;\\n  }(superclass);\\n};\\n\\nvar _default = Eventable;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./mixins/eventable.js?')},\"./mixins/playlistable.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _playlist2 = _interopRequireDefault(__webpack_require__(/*! components/playlist/playlist */ \"./components/playlist/playlist.js\"));\\n\\nvar _promisePolyfill = _interopRequireDefault(__webpack_require__(/*! promise-polyfill */ \"../node_modules/promise-polyfill/promise.js\"));\\n\\nvar _fetchBrowser = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill/build/fetch-browser */ \"../node_modules/fetch-ponyfill/build/fetch-browser.js\"));\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \"./utils/slicing.js\");\\n\\nvar _api = __webpack_require__(/*! utils/api */ \"./utils/api.js\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \"./utils/assign.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar _fetchPF = (0, _fetchBrowser.default)({\\n  Promise: _promisePolyfill.default\\n}),\\n    fetch = _fetchPF.fetch;\\n\\nvar LIST_BY_TAG_PARAMS = {\\n  format: \\'json\\',\\n  resource_type: \\'video\\',\\n  type: \\'list\\'\\n};\\n\\nvar Playlistable = function Playlistable(superclass) {\\n  return /*#__PURE__*/function (_superclass) {\\n    _inherits(_class, _superclass);\\n\\n    var _super = _createSuper(_class);\\n\\n    function _class(player) {\\n      var _this;\\n\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      _classCallCheck(this, _class);\\n\\n      _this = _super.call(this);\\n      var _chainTarget = (0, _slicing.sliceProperties)(options, \\'chainTarget\\').chainTarget;\\n      var _playlist = null;\\n      var _playlistDisposer = null;\\n\\n      _this.playlist = function (sources) {\\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n        if (sources === undefined) {\\n          return _playlist;\\n        }\\n\\n        if (_this.playlist()) {\\n          _this.disposePlaylist();\\n        }\\n\\n        createPlaylist(sources, options);\\n        player.trigger(\\'playlistcreated\\');\\n        return _chainTarget;\\n      };\\n\\n      _this.disposePlaylist = function () {\\n        player.removeClass(\\'vjs-playlist\\');\\n\\n        var playlist = _this.playlist();\\n\\n        _playlist = undefined;\\n        playlist.dispose();\\n\\n        _this.off(\\'cldsourcechanged\\', _playlistDisposer);\\n      };\\n\\n      var createPlaylist = function createPlaylist(sources, options) {\\n        if (sources instanceof _playlist2.default) {\\n          _playlist = sources;\\n\\n          _playlist.resetState();\\n\\n          _playlist.currentIndex(_playlist.currentIndex());\\n        } else {\\n          _playlist = new _playlist2.default(_assertThisInitialized(_this), sources, options);\\n\\n          _playlist.currentIndex(0);\\n        }\\n\\n        _playlistDisposer = addSourceChangedListener();\\n        player.addClass(\\'vjs-playlist\\');\\n      };\\n\\n      var addSourceChangedListener = function addSourceChangedListener() {\\n        var disposer = function disposer() {\\n          if (_this.playlist() && !_this.playlist().currentSource().contains(_this.player.currentSource())) {\\n            _this.disposePlaylist();\\n          }\\n        };\\n\\n        _this.on(\\'cldsourcechanged\\', disposer);\\n\\n        return disposer;\\n      };\\n\\n      return _this;\\n    }\\n\\n    _createClass(_class, [{\\n      key: \"playlistByTag\",\\n      value: function playlistByTag(tag) {\\n        var _this2 = this;\\n\\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n        return this.sourcesByTag(tag, options).then(function (sources) {\\n          return _this2.playlist(sources, options);\\n        });\\n      }\\n    }, {\\n      key: \"sourcesByTag\",\\n      value: function sourcesByTag(tag) {\\n        var _this3 = this;\\n\\n        var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n        var url = this.cloudinaryConfig().url(tag, LIST_BY_TAG_PARAMS);\\n        return fetch(url).then(function (result) {\\n          return result.json();\\n        }).then(function (json) {\\n          var resources = (0, _api.normalizeJsonResponse)(json.resources);\\n\\n          if (options.sorter) {\\n            resources.sort(options.sorter);\\n          }\\n\\n          var sources = resources.map(function (resource) {\\n            var sourceParams = options.sourceParams || {};\\n\\n            if (typeof sourceParams === \\'function\\') {\\n              sourceParams = sourceParams(resource);\\n            }\\n\\n            var info = resource.context && resource.context.custom || {};\\n            var source = (0, _assign.assign)({\\n              info: info\\n            }, sourceParams, {\\n              publicId: resource.publicId\\n            });\\n            return _this3.buildSource(source);\\n          });\\n          return sources;\\n        });\\n      }\\n    }]);\\n\\n    return _class;\\n  }(superclass);\\n};\\n\\nvar _default = Playlistable;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./mixins/playlistable.js?')},\"./plugins/analytics/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _extendedEvents2 = _interopRequireWildcard(__webpack_require__(/*! extended-events */ \\\"./extended-events.js\\\"));\\n\\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \\\"function\\\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\\n\\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \\\"object\\\" && typeof obj !== \\\"function\\\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar DEFAULT_EVENTS = ['play', 'pause', 'ended', 'volumechange', 'resize', 'error', 'fullscreenchange', 'start', 'videoload', 'percentsplayed', 'seek', 'playerload'];\\nvar EVENT_DEFAULTS = {\\n  percentsplayed: {\\n    percents: [25, 50, 75, 100]\\n  }\\n};\\nvar DEFAULT_OPTIONS = {\\n  events: DEFAULT_EVENTS,\\n  category: 'Video',\\n  defaultLabel: function defaultLabel(player) {\\n    return player.cloudinary && player.cloudinary.currentPublicId() || player.currentSource().src;\\n  }\\n};\\n\\nvar AnalyticsPlugin = function AnalyticsPlugin(player) {\\n  var _this = this;\\n\\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, AnalyticsPlugin);\\n\\n  this.player = player;\\n  options = _video.default.mergeOptions(DEFAULT_OPTIONS, options);\\n  this.events = (0, _extendedEvents2.normalizeEventsParam)(options.events, EVENT_DEFAULTS);\\n  var extendedEvents = (0, _slicing.sliceProperties)(this.events, 'percentsplayed', 'timeplayed', 'pause', 'seek');\\n\\n  if (extendedEvents.pause) {\\n    delete extendedEvents.pause;\\n    extendedEvents.pausenoseek = {};\\n  }\\n\\n  var _extendedEvents = new _extendedEvents2.default(player, {\\n    events: extendedEvents\\n  });\\n\\n  var _defaultLabel = options.defaultLabel;\\n  var _category = options.category;\\n  var _currentSource = null;\\n  var _startTracked = null;\\n  var _endTracked = null;\\n\\n  this.init = function () {\\n    var playerload = function playerload() {\\n      _this.track({\\n        action: 'Player Load',\\n        label: window.location.href,\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var videoload = function videoload() {\\n      _this.track({\\n        action: 'Video Load',\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var play = function play() {\\n      _this.track({\\n        action: 'Play'\\n      });\\n    };\\n\\n    var start = function start() {\\n      if (_startTracked) {\\n        _this.track({\\n          action: 'Start'\\n        });\\n\\n        _startTracked = true;\\n      }\\n    };\\n\\n    var pause = function pause() {\\n      _this.track({\\n        action: 'Pause'\\n      });\\n    };\\n\\n    var ended = function ended() {\\n      if (!_endTracked) {\\n        _this.track({\\n          action: 'Ended',\\n          nonInteraction: true\\n        });\\n\\n        _endTracked = true;\\n      }\\n    };\\n\\n    var error = function error() {\\n      _this.track({\\n        action: 'Error',\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var volumechange = function volumechange() {\\n      var value = _this.player.muted() ? 0 : _this.player.volume();\\n\\n      _this.track({\\n        action: 'Volume Change',\\n        value: value\\n      });\\n    };\\n\\n    var resize = function resize() {\\n      var action = \\\"Resize - \\\".concat(_this.player.width(), \\\"x\\\").concat(_this.player.height(), \\\"}\\\");\\n\\n      _this.track({\\n        action: action\\n      });\\n    };\\n\\n    var fullscreenchange = function fullscreenchange() {\\n      var action = _this.player.isFullscreen() ? 'Enter Fullscreen' : 'Exit Fullscreen';\\n\\n      _this.track({\\n        action: action\\n      });\\n    };\\n\\n    var percentsplayed = function percentsplayed(event, data) {\\n      var percent = data.percent;\\n\\n      _this.track({\\n        action: \\\"\\\".concat(percent, \\\" Percents Played\\\"),\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var timeplayed = function timeplayed(event, data) {\\n      var time = data.time;\\n\\n      _this.track({\\n        action: \\\"\\\".concat(time, \\\" Seconds Played\\\"),\\n        value: time,\\n        nonInteraction: true\\n      });\\n    };\\n\\n    var seek = function seek(event, data) {\\n      var seekStart = data.seekStart,\\n          seekEnd = data.seekEnd;\\n\\n      _this.track({\\n        action: 'Seek Start',\\n        value: seekStart\\n      });\\n\\n      _this.track({\\n        action: 'Seek End',\\n        value: seekEnd\\n      });\\n    };\\n\\n    var loadedmetadata = function loadedmetadata() {\\n      if (_this.player.currentSource().src !== _currentSource) {\\n        resetState();\\n        _currentSource = _this.player.currentSource().src;\\n\\n        if (_this.events.videoload) {\\n          videoload();\\n        }\\n      }\\n    };\\n\\n    var shoppableProductHover = function shoppableProductHover(event, data) {\\n      _this.track({\\n        action: 'productHover',\\n        label: data.productName\\n      });\\n    };\\n\\n    var shoppableProductClick = function shoppableProductClick(event, data) {\\n      _this.track({\\n        action: 'productClick',\\n        label: data.productName\\n      });\\n    };\\n\\n    var shoppableBarMax = function shoppableBarMax() {\\n      _this.track({\\n        action: 'shoppableBar',\\n        label: 'opened'\\n      });\\n    };\\n\\n    var shoppableBarMin = function shoppableBarMin() {\\n      _this.track({\\n        action: 'shoppableBar',\\n        label: 'closed'\\n      });\\n    };\\n\\n    var shoppableReplay = function shoppableReplay() {\\n      _this.track({\\n        action: 'replay'\\n      });\\n    };\\n\\n    var shoppableProductClickPost = function shoppableProductClickPost(event, data) {\\n      _this.track({\\n        action: 'productClickPostPlay',\\n        label: data.productName\\n      });\\n    };\\n\\n    var shoppableProductHoverPost = function shoppableProductHoverPost(event, data) {\\n      _this.track({\\n        action: 'productHoverPostPlay',\\n        label: data.productName\\n      });\\n    };\\n\\n    if (_this.events.shoppable) {\\n      _this.player.on('productHover', shoppableProductHover.bind(_this));\\n\\n      _this.player.on('productClick', shoppableProductClick.bind(_this));\\n\\n      _this.player.on('productHoverPost', shoppableProductHoverPost.bind(_this));\\n\\n      _this.player.on('productClickPost', shoppableProductClickPost.bind(_this));\\n\\n      _this.player.on('productBarMin', shoppableBarMin.bind(_this));\\n\\n      _this.player.on('productBarMax', shoppableBarMax.bind(_this));\\n\\n      _this.player.on('replay', shoppableReplay.bind(_this));\\n    }\\n\\n    if (_this.events.play) {\\n      _this.player.on('play', play.bind(_this));\\n    }\\n\\n    if (_this.events.ended) {\\n      _this.player.on('ended', ended.bind(_this));\\n    }\\n\\n    if (_this.events.volumechange) {\\n      _this.player.on('volumechange', volumechange.bind(_this));\\n    }\\n\\n    if (_this.events.resize) {\\n      _this.player.on('resize', resize.bind(_this));\\n    }\\n\\n    if (_this.events.error) {\\n      _this.player.on('error', error.bind(_this));\\n    }\\n\\n    if (_this.events.start) {\\n      _this.player.on('playing', start.bind(_this));\\n    }\\n\\n    if (_this.events.fullscreenchange) {\\n      _this.player.on('fullscreenchange', fullscreenchange.bind(_this));\\n    }\\n\\n    if (_this.events.percentsplayed) {\\n      _extendedEvents.on('percentsplayed', percentsplayed.bind(_this));\\n    }\\n\\n    if (_this.events.timeplayed) {\\n      _extendedEvents.on('timeplayed', timeplayed.bind(_this));\\n    }\\n\\n    if (_this.events.pause) {\\n      _extendedEvents.on('pausenoseek', pause.bind(_this));\\n    }\\n\\n    if (_this.events.seek) {\\n      _extendedEvents.on('seek', seek.bind(_this));\\n    }\\n\\n    if (_this.events.playerload) {\\n      playerload();\\n    }\\n\\n    _this.player.on('loadedmetadata', loadedmetadata.bind(_this));\\n  };\\n\\n  this.track = function (_ref) {\\n    var action = _ref.action,\\n        label = _ref.label,\\n        _ref$value = _ref.value,\\n        value = _ref$value === void 0 ? null : _ref$value,\\n        _ref$nonInteraction = _ref.nonInteraction,\\n        nonInteraction = _ref$nonInteraction === void 0 ? false : _ref$nonInteraction;\\n    var eventData = {\\n      eventCategory: _category,\\n      eventAction: action,\\n      eventLabel: label || _defaultLabel(_this.player),\\n      eventValue: value || Math.round(_this.player.currentTime()),\\n      nonInteraction: nonInteraction\\n    };\\n    window.ga('send', 'event', eventData);\\n  };\\n\\n  var resetState = function resetState() {\\n    _currentSource = '';\\n    _startTracked = false;\\n    _endTracked = false;\\n  };\\n\\n  resetState();\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new AnalyticsPlugin(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/analytics/index.js?\")},\"./plugins/autoplay-on-scroll/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _positioning = __webpack_require__(/*! utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar defaults = {\\n  fraction: 0.5,\\n  isMuted: true\\n};\\n\\nvar AutoplayOnScrollPlugin = function AutoplayOnScrollPlugin(player) {\\n  var _this = this;\\n\\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, AutoplayOnScrollPlugin);\\n\\n  opts = (0, _assign.assign)({}, defaults, opts);\\n  this.player = player;\\n\\n  var _options = (0, _slicing.sliceProperties)(opts, 'fraction');\\n\\n  var _pausedByScroll = false;\\n  var _playedByScroll = false;\\n  var _pauseHandler = null;\\n  var _playHandler = null;\\n\\n  this.init = function () {\\n    registerEventHandlers();\\n    checkViewportState();\\n  };\\n\\n  var clearEventHandlers = function clearEventHandlers() {\\n    window.removeEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.removeEventListener('load', checkViewportState, false);\\n    window.removeEventListener('scroll', checkViewportState, false);\\n    window.removeEventListener('resize', checkViewportState, false);\\n\\n    _this.player.off('pause', _pauseHandler);\\n\\n    _this.player.off('play', _playHandler);\\n  };\\n\\n  var pause = function pause() {\\n    _pausedByScroll = true;\\n    _playedByScroll = false;\\n\\n    _this.player.pause();\\n  };\\n\\n  var play = function play() {\\n    _pausedByScroll = false;\\n    _playedByScroll = true;\\n\\n    _this.player.play();\\n  };\\n\\n  var checkViewportState = function checkViewportState() {\\n    var visible = (0, _positioning.isElementInViewport)(_this.player.el(), {\\n      fraction: _options.fraction\\n    });\\n\\n    if (visible) {\\n      if (_this.player.paused()) {\\n        play();\\n      }\\n    } else if (!_this.player.paused() && !_this.player.activePlugins_.floatingPlayer) {\\n      pause();\\n    }\\n  };\\n\\n  var registerEventHandlers = function registerEventHandlers() {\\n    // TODO: find a better replacement for 'pause' since it's being triggered\\n    // by 'buffering' as well.\\n    _pauseHandler = function _pauseHandler() {\\n      if (!_this.player.waiting && !_pausedByScroll) {\\n        clearEventHandlers();\\n      }\\n    };\\n\\n    _playHandler = function _playHandler() {\\n      if (!_playedByScroll) {\\n        clearEventHandlers();\\n      }\\n    };\\n\\n    window.addEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.addEventListener('load', checkViewportState, false);\\n    window.addEventListener('scroll', checkViewportState, false);\\n    window.addEventListener('resize', checkViewportState, false);\\n\\n    _this.player.on('pause', _pauseHandler);\\n\\n    _this.player.on('play', _playHandler);\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new AutoplayOnScrollPlugin(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/autoplay-on-scroll/index.js?\")},\"./plugins/cloudinary/common.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.codecToSrcTransformation = exports.h264avcToString = exports.codecShorthandTrans = exports.cloudinaryErrorsConverter = exports.mergeTransformation = exports.mergeCloudinaryConfig = exports.isSrcEqual = exports.normalizeOptions = void 0;\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \\\"cloudinary-core\\\"));\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \\\"./utils/type-inference.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nvar normalizeOptions = function normalizeOptions(publicId, options) {\\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\\n      _ref$tolerateMissingI = _ref.tolerateMissingId,\\n      tolerateMissingId = _ref$tolerateMissingI === void 0 ? false : _ref$tolerateMissingI;\\n\\n  if ((0, _typeInference.isPlainObject)(publicId)) {\\n    var _options = (0, _assign.assign)({}, publicId);\\n\\n    publicId = (0, _slicing.sliceAndUnsetProperties)(_options, 'publicId').publicId;\\n\\n    if (!(0, _typeInference.isString)(publicId) && !tolerateMissingId) {\\n      throw new Error('Source is missing \\\\'publicId\\\\'.');\\n    }\\n\\n    if (options) {\\n      options = (0, _assign.assign)({}, _options, options);\\n    }\\n  }\\n\\n  return {\\n    publicId: publicId,\\n    options: options\\n  };\\n};\\n\\nexports.normalizeOptions = normalizeOptions;\\n\\nvar isSrcEqual = function isSrcEqual(source1, source2) {\\n  var src1 = source1;\\n  var src2 = source2;\\n\\n  if (_typeof(source1) === 'object') {\\n    src1 = source1.src;\\n  }\\n\\n  if (_typeof(source2) === 'object') {\\n    src2 = source2.src;\\n  }\\n\\n  if (/^\\\\/\\\\//.test(src1)) {\\n    src2 = src2.slice(src2.indexOf('//'));\\n  }\\n\\n  if (/^\\\\/\\\\//.test(src2)) {\\n    src1 = src1.slice(src1.indexOf('//'));\\n  }\\n\\n  return src1 === src2;\\n};\\n\\nexports.isSrcEqual = isSrcEqual;\\n\\nvar mergeCloudinaryConfig = function mergeCloudinaryConfig(config1, config2) {\\n  if (config1.constructor.name === 'Cloudinary' && config1.config) {\\n    config1 = config1.config();\\n  }\\n\\n  var newConfig = new _cloudinaryCore.default.Cloudinary(config1);\\n\\n  if (config2.constructor.name === 'Cloudinary' && config2.config) {\\n    config2 = config1.config();\\n  }\\n\\n  return newConfig.config(config2);\\n};\\n\\nexports.mergeCloudinaryConfig = mergeCloudinaryConfig;\\n\\nvar mergeTransformation = function mergeTransformation(transformation1, transformation2) {\\n  if (transformation1.constructor.name === 'Transformation' && transformation1.toOptions) {\\n    transformation1 = transformation1.toOptions();\\n  }\\n\\n  var newTransformation = new _cloudinaryCore.default.Transformation(transformation1);\\n  return newTransformation.fromOptions(transformation2);\\n};\\n\\nexports.mergeTransformation = mergeTransformation;\\n\\nvar cloudinaryErrorsConverter = function cloudinaryErrorsConverter(_ref2) {\\n  var errorMsg = _ref2.errorMsg,\\n      publicId = _ref2.publicId,\\n      cloudName = _ref2.cloudName,\\n      statusCode = _ref2.statusCode;\\n  var msg = 'Video cannot be played';\\n  var error = {\\n    code: 10,\\n    message: \\\"\\\".concat(msg).concat(errorMsg ? '- ' + errorMsg : ''),\\n    statusCode: statusCode\\n  };\\n  var err = errorMsg.toLowerCase();\\n\\n  if (err.startsWith('unknown customer')) {\\n    error.code = 11;\\n    error.message = \\\"\\\".concat(msg, \\\" Unknown cloud-name \\\").concat(cloudName);\\n  }\\n\\n  if (err.startsWith('resource not found')) {\\n    error.code = 12;\\n    error.message = \\\"\\\".concat(msg, \\\" Public ID \\\").concat(publicId, \\\" not found\\\");\\n  }\\n\\n  if (err.startsWith('private resource')) {\\n    error.code = 13;\\n    error.message = \\\"\\\".concat(msg, \\\" Private video\\\");\\n  }\\n\\n  if (err.startsWith('unauthenticated access')) {\\n    error.message = \\\"\\\".concat(msg, \\\" Requires authentication\\\");\\n    error.code = 14;\\n  }\\n\\n  return error;\\n};\\n\\nexports.cloudinaryErrorsConverter = cloudinaryErrorsConverter;\\n\\nvar codecShorthandTrans = function codecShorthandTrans(short) {\\n  var transTable = {\\n    h265: 'hev1.1.6.L93.B0',\\n    vp9: 'vp09.00.50.08',\\n    h264: 'avc1.42E01E'\\n  };\\n  return transTable[short] ? transTable[short] : short;\\n};\\n\\nexports.codecShorthandTrans = codecShorthandTrans;\\nvar ISOAVC_MAP = {\\n  'avc1': 'h264',\\n  'avc2': 'h264',\\n  'svc1': 'Scalable Video Coding',\\n  'mvc1': 'Multiview Video Coding',\\n  'mvc2': 'Multiview Video Coding'\\n};\\nvar PROFILE = {\\n  '0': 'No',\\n  //  0             - *** when profile=RCDO and level=0 - \\\"RCDO\\\"  - RCDO bitstream MUST obey to all the constraints of the Baseline profile\\n  '42': 'baseline',\\n  // 66 in-decimal\\n  '4d': 'main',\\n  // 77 in-decimal\\n  '58': 'extended',\\n  // 88 in-decimal\\n  '64': 'high',\\n  // 100 in-decimal\\n  '6e': 'high 10',\\n  // 110 in-decimal\\n  '7a': 'high 4:2:2',\\n  // 122 in-decimal\\n  'f4': 'high 4:4:4',\\n  // 244 in-decimal\\n  '2c': 'CAVLC 4:4:4',\\n  // 44 in-decimal\\n  // profiles for SVC - Scalable Video Coding extension to H.264\\n  '53': 'Scalable Baseline',\\n  // 83 in-decimal\\n  '56': 'Scalable High',\\n  // 86 in-decimal\\n  // profiles for MVC - Multiview Video Coding extension to H.264\\n  '80': 'Stereo High',\\n  // 128 in-decimal\\n  '76': 'Multiview High',\\n  // 118 in-decimal\\n  '8a': 'Multiview Depth High' // 138 in-decimal\\n\\n};\\n\\nfunction avcotiToStr(s) {\\n  var REGEX = /([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i;\\n\\n  if (REGEX.test(s) === false) {\\n    throw new Error('error: please provide a 3-bytes hex-sequence for example: 42001e');\\n  }\\n\\n  var matches = s.match(REGEX);\\n  matches.shift(); // kills first one (regex matchs entire string)\\n\\n  var profile_idc = matches[0];\\n  profile_idc = PROFILE[profile_idc];\\n  profile_idc = typeof profile_idc === 'string' ? profile_idc : 'Unknown'; // explicit fix.\\n  // constraint_set_flags  = matches[1]; //maybe some other time..\\n\\n  var level_idc = matches[2];\\n  level_idc = parseInt(level_idc, 16); // will give something like 30  (integer thirty)\\n\\n  level_idc = String(level_idc).split('').join('.'); // will give something like \\\"3.0\\\"\\n\\n  return \\\"\\\".concat(profile_idc, \\\":\\\").concat(level_idc);\\n}\\n\\nvar h264avcToString = function h264avcToString(s) {\\n  var REGEX = /(avc1|avc2|svc1|mvc1|mvc2)\\\\.([0-9a-f]{6})/i;\\n\\n  if (REGEX.test('avc1.42001e') === false) {\\n    throw new Error('Codec string is not formatted according to H.264/AVC standards for example avc1.42001e (maybe an iOS friendly version...)');\\n  }\\n\\n  var matches = s.match(REGEX);\\n\\n  if (matches !== null) {\\n    matches.shift(); // first one is the entire-string.\\n\\n    var vc_codec = ISOAVC_MAP[matches[0]];\\n    var avc_codec = typeof avc_codec === 'string' ? avc_codec : 'Unknown'; // explicit fix\\n\\n    return vc_codec + ':' + avcotiToStr(matches[1]);\\n  }\\n\\n  return s;\\n};\\n\\nexports.h264avcToString = h264avcToString;\\n\\nvar codecToSrcTransformation = function codecToSrcTransformation(codec) {\\n  if (!codec) {\\n    return {};\\n  }\\n\\n  switch (codec) {\\n    case 'vp9':\\n      return {\\n        video_codec: 'vp9'\\n      };\\n\\n    case 'hev1':\\n      return {\\n        video_codec: 'h265'\\n      };\\n\\n    case 'h264':\\n      return {\\n        video_codec: 'h264:baseline:3.0'\\n      };\\n\\n    default:\\n      return {\\n        video_codec: h264avcToString(codec)\\n      };\\n  }\\n};\\n\\nexports.codecToSrcTransformation = codecToSrcTransformation;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/common.js?\")},\"./plugins/cloudinary/event-handler-registry.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _find = __webpack_require__(/*! utils/find */ \"./utils/find.js\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar EventHandlerRegistry = /*#__PURE__*/function () {\\n  function EventHandlerRegistry(emitter) {\\n    _classCallCheck(this, EventHandlerRegistry);\\n\\n    this._emitter = emitter;\\n    this._eventHandlers = [];\\n  }\\n\\n  _createClass(EventHandlerRegistry, [{\\n    key: \"on\",\\n    value: function on(type, handler) {\\n      this._eventHandlers.push({\\n        type: type,\\n        handler: handler\\n      });\\n\\n      this._emitter.on(type, handler);\\n    }\\n  }, {\\n    key: \"one\",\\n    value: function one(type, handler) {\\n      var _this = this;\\n\\n      var wrapper = function wrapper() {\\n        handler.apply(void 0, arguments);\\n\\n        _this.off(type, handler);\\n      };\\n\\n      this._eventHandlers.push({\\n        type: type,\\n        handler: handler,\\n        wrapper: wrapper\\n      });\\n\\n      this._emitter.one(type, handler);\\n    }\\n  }, {\\n    key: \"off\",\\n    value: function off(type, handler) {\\n      var index = (0, _find.findIndex)(this._eventHandlers, function (event) {\\n        return event.type === type && event.handler === handler;\\n      });\\n\\n      if (index === -1) {\\n        return;\\n      }\\n\\n      var event = this._eventHandlers[index];\\n\\n      this._emitter.off(type, event.wrapper || event.handler);\\n\\n      this._eventHandlers.splice(index, 1);\\n    }\\n  }, {\\n    key: \"removeAllListeners\",\\n    value: function removeAllListeners() {\\n      var _this2 = this;\\n\\n      this._eventHandlers.forEach(function (event) {\\n        _this2.off(event);\\n      });\\n    }\\n  }]);\\n\\n  return EventHandlerRegistry;\\n}();\\n\\nvar _default = EventHandlerRegistry;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/event-handler-registry.js?')},\"./plugins/cloudinary/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\nexports.CONSTRUCTOR_PARAMS = void 0;\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \\\"cloudinary-core\\\"));\\n\\nvar _mixin2 = __webpack_require__(/*! utils/mixin */ \\\"./utils/mixin.js\\\");\\n\\nvar _applyWithProps = __webpack_require__(/*! utils/apply-with-props */ \\\"./utils/apply-with-props.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _cloudinary = __webpack_require__(/*! utils/cloudinary */ \\\"./utils/cloudinary.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _common = __webpack_require__(/*! ./common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _playlistable = _interopRequireDefault(__webpack_require__(/*! mixins/playlistable */ \\\"./mixins/playlistable.js\\\"));\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! ./models/video-source */ \\\"./plugins/cloudinary/models/video-source.js\\\"));\\n\\nvar _eventHandlerRegistry = _interopRequireDefault(__webpack_require__(/*! ./event-handler-registry */ \\\"./plugins/cloudinary/event-handler-registry.js\\\"));\\n\\nvar _audioSource = _interopRequireDefault(__webpack_require__(/*! ./models/audio-source */ \\\"./plugins/cloudinary/models/audio-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar DEFAULT_PARAMS = {\\n  transformation: {},\\n  sourceTypes: [],\\n  sourceTransformation: [],\\n  posterOptions: {}\\n};\\nvar CONSTRUCTOR_PARAMS = ['cloudinaryConfig', 'transformation', 'sourceTypes', 'sourceTransformation', 'posterOptions', 'autoShowRecommendations'];\\nexports.CONSTRUCTOR_PARAMS = CONSTRUCTOR_PARAMS;\\n\\nvar CloudinaryContext = /*#__PURE__*/function (_mixin) {\\n  _inherits(CloudinaryContext, _mixin);\\n\\n  var _super = _createSuper(CloudinaryContext);\\n\\n  function CloudinaryContext(player) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, CloudinaryContext);\\n\\n    _this = _super.call(this, player, options);\\n    _this.player = player;\\n    options = (0, _assign.assign)({}, DEFAULT_PARAMS, options);\\n    var _source = null;\\n    var _sources = null;\\n    var _lastSource = null;\\n    var _lastPlaylist = null;\\n    var _posterOptions = null;\\n    var _cloudinaryConfig = null;\\n    var _transformation = null;\\n    var _sourceTypes = null;\\n    var _sourceTransformation = null;\\n    var _chainTarget = options.chainTarget;\\n    var _playerEvents = null;\\n    var _recommendations = null;\\n    var _autoShowRecommendations = false;\\n\\n    _this.source = function (source) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      options = (0, _assign.assign)({}, options);\\n\\n      if (!source) {\\n        return _source;\\n      }\\n\\n      var src = null;\\n\\n      if (source instanceof _videoSource.default) {\\n        src = source;\\n      } else {\\n        var _normalizeOptions = (0, _common.normalizeOptions)(source, options),\\n            publicId = _normalizeOptions.publicId,\\n            _options = _normalizeOptions.options;\\n\\n        src = _this.buildSource(publicId, _options);\\n      }\\n\\n      if (src.recommendations()) {\\n        var recommendations = src.recommendations();\\n        var itemBuilder = null;\\n        var disableAutoShow = false;\\n\\n        if (options.recommendationOptions) {\\n          var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options.recommendationOptions, 'disableAutoShow', 'itemBuilder');\\n\\n          disableAutoShow = _sliceAndUnsetPropert.disableAutoShow;\\n          itemBuilder = _sliceAndUnsetPropert.itemBuilder;\\n        }\\n\\n        setRecommendations(recommendations, {\\n          disableAutoShow: disableAutoShow,\\n          itemBuilder: itemBuilder\\n        });\\n      } else {\\n        unsetRecommendations();\\n      }\\n\\n      _source = src;\\n\\n      if (!options.skipRefresh) {\\n        refresh();\\n      }\\n\\n      _this.player.trigger('cldsourcechanged', {\\n        source: src\\n      });\\n\\n      return _chainTarget;\\n    };\\n\\n    _this.buildSource = function (publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      var builtSrc = null;\\n\\n      var _normalizeOptions2 = (0, _common.normalizeOptions)(publicId, options);\\n\\n      publicId = _normalizeOptions2.publicId;\\n      options = _normalizeOptions2.options;\\n      options.cloudinaryConfig = (0, _common.mergeCloudinaryConfig)(_this.cloudinaryConfig(), options.cloudinaryConfig || {});\\n      options.transformation = (0, _common.mergeTransformation)(_this.transformation(), options.transformation || {});\\n      options.sourceTransformation = options.sourceTransformation || _this.sourceTransformation();\\n      options.sourceTypes = options.sourceTypes || _this.sourceTypes();\\n      options.poster = options.poster || posterOptionsForCurrent();\\n      options.queryParams = options.usageReport ? {\\n        _s: \\\"vp-\\\".concat(\\\"1.5.3\\\")\\n      } : {};\\n\\n      if (options.sourceTypes.indexOf('audio') > -1) {\\n        builtSrc = new _audioSource.default(publicId, options);\\n      } else {\\n        builtSrc = new _videoSource.default(publicId, options);\\n      }\\n\\n      return builtSrc;\\n    };\\n\\n    _this.posterOptions = function (options) {\\n      if (!options) {\\n        return _posterOptions;\\n      }\\n\\n      _posterOptions = options;\\n      return _chainTarget;\\n    };\\n\\n    _this.cloudinaryConfig = function (config) {\\n      if (!config) {\\n        return _cloudinaryConfig;\\n      }\\n\\n      _cloudinaryConfig = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Cloudinary, config);\\n      return _chainTarget;\\n    };\\n\\n    _this.transformation = function (trans) {\\n      if (!trans) {\\n        return _transformation;\\n      }\\n\\n      _transformation = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Transformation, trans);\\n      return _chainTarget;\\n    };\\n\\n    _this.sourceTypes = function (types) {\\n      if (!types) {\\n        return _sourceTypes;\\n      }\\n\\n      _sourceTypes = types;\\n      return _chainTarget;\\n    };\\n\\n    _this.getCurrentSources = function () {\\n      return _sources;\\n    };\\n\\n    _this.sourceTransformation = function (trans) {\\n      if (!trans) {\\n        return _sourceTransformation;\\n      }\\n\\n      _sourceTransformation = trans;\\n      return _chainTarget;\\n    };\\n\\n    _this.on = function () {\\n      var _playerEvents2;\\n\\n      return (_playerEvents2 = _playerEvents).on.apply(_playerEvents2, arguments);\\n    };\\n\\n    _this.one = function () {\\n      var _playerEvents3;\\n\\n      return (_playerEvents3 = _playerEvents).one.apply(_playerEvents3, arguments);\\n    };\\n\\n    _this.off = function () {\\n      var _playerEvents4;\\n\\n      return (_playerEvents4 = _playerEvents).off.apply(_playerEvents4, arguments);\\n    };\\n\\n    _this.autoShowRecommendations = function (autoShow) {\\n      if (autoShow === undefined) {\\n        return _autoShowRecommendations;\\n      }\\n\\n      _autoShowRecommendations = autoShow;\\n      return _chainTarget;\\n    };\\n\\n    _this.dispose = function () {\\n      if (_this.playlist()) {\\n        _this.disposePlaylist();\\n      }\\n\\n      unsetRecommendations();\\n      _source = undefined;\\n\\n      _playerEvents.removeAllListeners();\\n    };\\n\\n    var setRecommendations = function setRecommendations(recommendations, _ref) {\\n      var _ref$disableAutoShow = _ref.disableAutoShow,\\n          disableAutoShow = _ref$disableAutoShow === void 0 ? false : _ref$disableAutoShow,\\n          _ref$itemBuilder = _ref.itemBuilder,\\n          itemBuilder = _ref$itemBuilder === void 0 ? null : _ref$itemBuilder;\\n      unsetRecommendations();\\n\\n      if (!Array.isArray(recommendations) && typeof recommendations !== 'function' && !recommendations.then) {\\n        throw new Error('\\\"recommendations\\\" must be either an array or a function');\\n      }\\n\\n      _recommendations = {};\\n\\n      itemBuilder = itemBuilder || function (source) {\\n        return {\\n          source: source instanceof _videoSource.default ? source : _this.buildSource(source),\\n          action: function action() {\\n            return _this.source(source);\\n          }\\n        };\\n      };\\n\\n      _recommendations.sourceChangedHandler = function () {\\n        var trigger = function trigger(sources) {\\n          if (typeof sources !== 'undefined' && sources.length > 0) {\\n            var items = sources.map(function (_source) {\\n              return itemBuilder(_source);\\n            });\\n\\n            _this.player.trigger('recommendationschanged', {\\n              items: items\\n            });\\n          } else {\\n            _this.player.trigger('recommendationsnoshow');\\n          }\\n\\n          _recommendations.sources = sources;\\n        };\\n\\n        if (typeof recommendations === 'function') {\\n          trigger(recommendations());\\n        } else if (recommendations.then) {\\n          recommendations.then(trigger);\\n        } else {\\n          trigger(recommendations);\\n        }\\n      };\\n\\n      _this.one('cldsourcechanged', _recommendations.sourceChangedHandler);\\n\\n      _recommendations.endedHandler = function () {\\n        if (!disableAutoShow && _this.autoShowRecommendations()) {\\n          _this.player.trigger('recommendationsshow');\\n        }\\n      };\\n\\n      _this.on('ended', _recommendations.endedHandler);\\n    };\\n\\n    var unsetRecommendations = function unsetRecommendations() {\\n      if (_recommendations) {\\n        _this.off('cldsourcechanged', _recommendations.sourceChangedHandler);\\n\\n        _this.off('ended', _recommendations.endedHandler);\\n\\n        delete _recommendations.endedHandler;\\n        delete _recommendations.sourceChangedHandler;\\n      }\\n\\n      _recommendations = null;\\n    };\\n\\n    var refresh = function refresh() {\\n      var src = _this.source();\\n\\n      if (src.poster()) {\\n        _this.player.poster(src.poster().url());\\n      }\\n\\n      _sources = src.generateSources().filter(function (src) {\\n        if (src.isAdaptive) {\\n          var codec = src.type.split('; ')[1] || null;\\n\\n          if (codec && 'MediaSource' in window) {\\n            var typeStr = \\\"video/mp4; \\\".concat(src.type.split('; ')[1] || '');\\n            return MediaSource.isTypeSupported(typeStr);\\n          }\\n        }\\n\\n        return true;\\n      });\\n\\n      _this.player.src(_sources);\\n\\n      _lastSource = src;\\n      _lastPlaylist = _this.playlist();\\n    };\\n\\n    var posterOptionsForCurrent = function posterOptionsForCurrent() {\\n      var opts = (0, _assign.assign)({}, _this.posterOptions());\\n\\n      if (opts.transformation) {\\n        if ((opts.transformation.width || opts.transformation.height) && !opts.transformation.crop) {\\n          opts.transformation.crop = 'scale';\\n        }\\n      }\\n\\n      opts.transformation = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Transformation, opts.transformation || {}); // Set poster dimensions to player actual size.\\n      // (unless they were explicitly set via `posterOptions`)\\n\\n      var playerEl = _this.player.el();\\n\\n      if (playerEl && playerEl.clientWidth && playerEl.clientHeight && !(0, _cloudinary.isKeyInTransformation)(opts.transformation, 'width') && !(0, _cloudinary.isKeyInTransformation)(opts.transformation, 'height')) {\\n        var roundUp100 = function roundUp100(val) {\\n          return 100 * Math.ceil(val / 100);\\n        };\\n\\n        opts.transformation.width(roundUp100(playerEl.clientWidth)).height(roundUp100(playerEl.clientHeight)).crop('limit');\\n      }\\n\\n      return opts;\\n    }; // Handle external (non-cloudinary plugin) source changes (e.g. by ad plugins)\\n\\n\\n    var syncState = function syncState(_, data) {\\n      var src = data.to; // When source is cloudinary's\\n\\n      if (_lastSource && _lastSource.contains(src)) {\\n        // If plugin state doesn't have an active VideoSource\\n        if (!_this.source()) {\\n          // We might have been running a playlist, reset playlist's state.\\n          if (_lastPlaylist) {\\n            _this.playlist(_lastPlaylist);\\n          } // Rebuild last source state without calling vjs's 'src' and 'poster'\\n\\n\\n          _this.source(_lastSource, {\\n            skipRefresh: true\\n          });\\n        }\\n      } else {\\n        // Used by cloudinary-only components\\n        _this.player.trigger('cldsourcechanged', {}); // When source isn't cloudinary's - reset the plugin's state.\\n\\n\\n        _this.dispose();\\n      }\\n    };\\n\\n    _playerEvents = new _eventHandlerRegistry.default(_this.player);\\n\\n    var constructorParams = _slicing.sliceAndUnsetProperties.apply(void 0, [options].concat(CONSTRUCTOR_PARAMS));\\n\\n    (0, _applyWithProps.applyWithProps)(_assertThisInitialized(_this), constructorParams);\\n\\n    _this.on('sourcechanged', syncState);\\n\\n    return _this;\\n  }\\n\\n  _createClass(CloudinaryContext, [{\\n    key: \\\"currentSourceType\\\",\\n    value: function currentSourceType() {\\n      return this.source().getType();\\n    }\\n  }, {\\n    key: \\\"currentPublicId\\\",\\n    value: function currentPublicId() {\\n      return this.source() && this.source().publicId();\\n    }\\n  }, {\\n    key: \\\"currentPoster\\\",\\n    value: function currentPoster() {\\n      return this.source() && this.source().poster();\\n    }\\n  }]);\\n\\n  return CloudinaryContext;\\n}((0, _mixin2.mixin)(_playlistable.default));\\n\\nfunction _default() {\\n  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  options.chainTarget = options.chainTarget || this;\\n  this.cloudinary = new CloudinaryContext(this, options);\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/index.js?\")},\"./plugins/cloudinary/models/audio-source.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! ./video-source */ \"./plugins/cloudinary/models/video-source.js\"));\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ./image-source */ \"./plugins/cloudinary/models/image-source.js\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \"./plugins/cloudinary/common.js\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \"./utils/slicing.js\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \"./utils/assign.js\");\\n\\nvar _querystring = __webpack_require__(/*! utils/querystring */ \"./utils/querystring.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar DEFAULT_POSTER_PARAMS = {\\n  format: \\'jpg\\',\\n  resource_type: \\'video\\',\\n  transformation: {\\n    flags: \\'waveform\\'\\n  }\\n};\\nvar COMMON_AUDIO_FORMATS = [\\'mp3\\', \\'ogg\\', \\'wav\\', \\'mp4\\'];\\nvar AUDIO_SUFFIX_REMOVAL_PATTERN = RegExp(\"\\\\\\\\.(\".concat(COMMON_AUDIO_FORMATS.join(\\'|\\'), \")$$\"));\\nvar DEFAULT_AUDIO_PARAMS = {\\n  resource_type: \\'video\\',\\n  type: \\'upload\\',\\n  transformation: []\\n};\\n\\nvar AudioSource = /*#__PURE__*/function (_VideoSource) {\\n  _inherits(AudioSource, _VideoSource);\\n\\n  var _super = _createSuper(AudioSource);\\n\\n  function AudioSource(publicId) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, AudioSource);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n    publicId = publicId.replace(AUDIO_SUFFIX_REMOVAL_PATTERN, \\'\\');\\n    options = (0, _assign.assign)({}, DEFAULT_AUDIO_PARAMS, options);\\n\\n    var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options, \\'poster\\'),\\n        poster = _sliceAndUnsetPropert.poster;\\n\\n    _this = _super.call(this, publicId, options);\\n    var _poster = null;\\n    _this._type = \\'AudioSource\\';\\n\\n    _this.poster = function (publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (!publicId) {\\n        return _poster;\\n      }\\n\\n      if (publicId instanceof _imageSource.default) {\\n        _poster = publicId;\\n        return _assertThisInitialized(_this);\\n      }\\n\\n      var _normalizeOptions2 = (0, _common.normalizeOptions)(publicId, options, {\\n        tolerateMissingId: true\\n      });\\n\\n      publicId = _normalizeOptions2.publicId;\\n      options = _normalizeOptions2.options;\\n\\n      if (!publicId) {\\n        publicId = _this.publicId();\\n        options = (0, _assign.assign)({}, options, DEFAULT_POSTER_PARAMS);\\n      }\\n\\n      options.cloudinaryConfig = options.cloudinaryConfig || _this.cloudinaryConfig();\\n      _poster = new _imageSource.default(publicId, options);\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.poster(poster);\\n\\n    _this.getPoster = function () {\\n      return _poster;\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(AudioSource, [{\\n    key: \"generateSources\",\\n    value: function generateSources() {\\n      var _this2 = this;\\n\\n      return this.sourceTypes().map(function (sourceType) {\\n        if (sourceType === \\'audio\\') {\\n          var format = \\'mp3\\';\\n          var opts = {};\\n          var srcTransformation = _this2.sourceTransformation()[sourceType] || [_this2.transformation()];\\n\\n          if (srcTransformation) {\\n            opts.transformation = srcTransformation;\\n          }\\n\\n          (0, _assign.assign)(opts, {\\n            resource_type: \\'video\\',\\n            format: format\\n          });\\n          var queryString = \\'\\';\\n\\n          if (_this2.queryParams()) {\\n            queryString = (0, _querystring.objectToQuerystring)(_this2.queryParams());\\n          }\\n\\n          var src = \"\".concat(_this2.config().url(_this2.publicId(), opts)).concat(queryString);\\n          var type = \\'video/mp4\\';\\n          return {\\n            type: type,\\n            src: src,\\n            cldSrc: _this2,\\n            poster: _this2.getPoster().url()\\n          };\\n        } else {\\n          return null;\\n        }\\n      }, this);\\n    }\\n  }]);\\n\\n  return AudioSource;\\n}(_videoSource.default);\\n\\nvar _default = AudioSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/audio-source.js?')},\"./plugins/cloudinary/models/base-source.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _cloudinaryCore = _interopRequireDefault(__webpack_require__(/*! cloudinary-core */ \"cloudinary-core\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \"./plugins/cloudinary/common.js\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \"./utils/slicing.js\");\\n\\nvar _cloudinary = __webpack_require__(/*! utils/cloudinary */ \"./utils/cloudinary.js\");\\n\\nvar _querystring = __webpack_require__(/*! utils/querystring */ \"./utils/querystring.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nvar BaseSource = /*#__PURE__*/function () {\\n  function BaseSource(publicId) {\\n    var _this = this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, BaseSource);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n    var _publicId = null;\\n    var _cloudinaryConfig = null;\\n    var _transformation = null;\\n    var _resourceConfig = null;\\n    var _queryParams = null;\\n\\n    this.publicId = function (publicId) {\\n      if (!publicId) {\\n        return _publicId;\\n      }\\n\\n      _publicId = publicId;\\n      return _this;\\n    };\\n\\n    this.cloudinaryConfig = function (config) {\\n      if (!config) {\\n        return _cloudinaryConfig;\\n      }\\n\\n      _cloudinaryConfig = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Cloudinary, config);\\n      return _this;\\n    };\\n\\n    this.resourceConfig = function (config) {\\n      if (!config) {\\n        return _resourceConfig;\\n      }\\n\\n      _resourceConfig = config;\\n      return _this;\\n    };\\n\\n    this.transformation = function (trans) {\\n      if (!trans) {\\n        return _transformation;\\n      }\\n\\n      _transformation = (0, _cloudinary.getCloudinaryInstanceOf)(_cloudinaryCore.default.Transformation, trans);\\n      return _this;\\n    };\\n\\n    this.queryParams = function (params) {\\n      if (!params) {\\n        return _queryParams;\\n      }\\n\\n      _queryParams = params;\\n      return _this;\\n    };\\n\\n    this.getType = function () {\\n      return _this._type;\\n    };\\n\\n    var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options, \\'cloudinaryConfig\\'),\\n        cloudinaryConfig = _sliceAndUnsetPropert.cloudinaryConfig;\\n\\n    if (!cloudinaryConfig) {\\n      throw new Error(\\'Source is missing \\\\\\'cloudinaryConfig\\\\\\'.\\');\\n    }\\n\\n    this.cloudinaryConfig(cloudinaryConfig);\\n\\n    var _sliceAndUnsetPropert2 = (0, _slicing.sliceAndUnsetProperties)(options, \\'transformation\\'),\\n        transformation = _sliceAndUnsetPropert2.transformation;\\n\\n    this.transformation(transformation);\\n\\n    var _sliceAndUnsetPropert3 = (0, _slicing.sliceAndUnsetProperties)(options, \\'queryParams\\'),\\n        queryParams = _sliceAndUnsetPropert3.queryParams;\\n\\n    this.queryParams(queryParams);\\n    this.resourceConfig(options);\\n    this.publicId(publicId);\\n  }\\n\\n  _createClass(BaseSource, [{\\n    key: \"config\",\\n    value: function config() {\\n      var cld = new _cloudinaryCore.default.Cloudinary(this.cloudinaryConfig().config());\\n      cld.config(this.resourceConfig());\\n      return cld;\\n    }\\n  }, {\\n    key: \"url\",\\n    value: function url() {\\n      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\\n          transformation = _ref.transformation;\\n\\n      var url = this.config().url(this.publicId(), {\\n        transformation: transformation || this.transformation()\\n      });\\n      var queryString = \\'\\';\\n\\n      if (this.queryParams()) {\\n        queryString = (0, _querystring.objectToQuerystring)(this.queryParams());\\n      }\\n\\n      return \"\".concat(url).concat(queryString);\\n    }\\n  }]);\\n\\n  return BaseSource;\\n}();\\n\\nvar _default = BaseSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/base-source.js?')},\"./plugins/cloudinary/models/image-source.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _baseSource = _interopRequireDefault(__webpack_require__(/*! ./base-source */ \"./plugins/cloudinary/models/base-source.js\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \"./plugins/cloudinary/common.js\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \"./utils/assign.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar COMMON_IMAGE_FORMATS = [\\'jpg\\', \\'png\\', \\'gif\\', \\'webp\\'];\\nvar IMAGE_SUFFIX_REMOVAL_PATTERN = RegExp(\"\\\\\\\\.(\".concat(COMMON_IMAGE_FORMATS.join(\\'|\\'), \")$$\"));\\nvar DEFAULT_IMAGE_PARAMS = {\\n  resource_type: \\'image\\',\\n  type: \\'upload\\',\\n  transformation: []\\n};\\n\\nvar ImageSource = /*#__PURE__*/function (_BaseSource) {\\n  _inherits(ImageSource, _BaseSource);\\n\\n  var _super = _createSuper(ImageSource);\\n\\n  function ImageSource(publicId) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, ImageSource);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n    publicId = publicId.replace(IMAGE_SUFFIX_REMOVAL_PATTERN, \\'\\');\\n    options = (0, _assign.assign)({}, DEFAULT_IMAGE_PARAMS, options);\\n    _this = _super.call(this, publicId, options);\\n    _this._type = \\'ImageSource\\';\\n    return _this;\\n  }\\n\\n  return ImageSource;\\n}(_baseSource.default);\\n\\nvar _default = ImageSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/image-source.js?')},\"./plugins/cloudinary/models/video-source.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _baseSource = _interopRequireDefault(__webpack_require__(/*! ./base-source */ \\\"./plugins/cloudinary/models/base-source.js\\\"));\\n\\nvar _imageSource = _interopRequireDefault(__webpack_require__(/*! ./image-source */ \\\"./plugins/cloudinary/models/image-source.js\\\"));\\n\\nvar _common = __webpack_require__(/*! ../common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _querystring = __webpack_require__(/*! utils/querystring */ \\\"./utils/querystring.js\\\");\\n\\nvar _cloudinary = __webpack_require__(/*! utils/cloudinary */ \\\"./utils/cloudinary.js\\\");\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\\n\\nfunction _nonIterableRest() { throw new TypeError(\\\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \\\"undefined\\\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\\\"return\\\"] != null) _i[\\\"return\\\"](); } finally { if (_d) throw _e; } } return _arr; }\\n\\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar DEFAULT_POSTER_PARAMS = {\\n  format: 'jpg',\\n  resource_type: 'video'\\n};\\nvar DEFAULT_VIDEO_SOURCE_TYPES = ['webm/vp9', 'mp4/h265', 'mp4'];\\nvar DEFAULT_VIDEO_PARAMS = {\\n  resource_type: 'video',\\n  type: 'upload',\\n  transformation: [],\\n  sourceTransformation: {},\\n  sourceTypes: DEFAULT_VIDEO_SOURCE_TYPES,\\n  recommendations: null,\\n  info: {}\\n};\\nvar VIDEO_SUFFIX_REMOVAL_PATTERN = RegExp(\\\"\\\\\\\\.(\\\".concat(DEFAULT_VIDEO_SOURCE_TYPES.join('|'), \\\")$$\\\")); // eslint-disable-next-line no-control-regex\\n\\nvar URL_PATTERN = RegExp('https?:\\\\\\\\/\\\\\\\\/(www\\\\\\\\.)?[-a-zA-Z0-9@:%._\\\\+~#=]{1,256}\\\\\\\\.[a-zA-Z0-9()]{1,6}\\\\\\\\b([-a-zA-Z0-9()@:%_\\\\+.~#?&/=]*)');\\nvar objectId = 0;\\n\\nvar generateId = function generateId() {\\n  return objectId++;\\n};\\n\\nvar VideoSource = /*#__PURE__*/function (_BaseSource) {\\n  _inherits(VideoSource, _BaseSource);\\n\\n  var _super = _createSuper(VideoSource);\\n\\n  function VideoSource(publicId) {\\n    var _this;\\n\\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n    _classCallCheck(this, VideoSource);\\n\\n    var isRawUrl = URL_PATTERN.test(publicId);\\n\\n    var _normalizeOptions = (0, _common.normalizeOptions)(publicId, options);\\n\\n    publicId = _normalizeOptions.publicId;\\n    options = _normalizeOptions.options;\\n\\n    if (!isRawUrl) {\\n      publicId = publicId.replace(VIDEO_SUFFIX_REMOVAL_PATTERN, '');\\n    }\\n\\n    options = (0, _assign.assign)({}, DEFAULT_VIDEO_PARAMS, options);\\n\\n    if (!options.poster) {\\n      options.poster = (0, _assign.assign)({\\n        publicId: publicId\\n      }, DEFAULT_POSTER_PARAMS);\\n    }\\n\\n    var _sliceAndUnsetPropert = (0, _slicing.sliceAndUnsetProperties)(options, 'poster', 'sourceTypes', 'sourceTransformation', 'info', 'recommendations', 'textTracks'),\\n        poster = _sliceAndUnsetPropert.poster,\\n        sourceTypes = _sliceAndUnsetPropert.sourceTypes,\\n        sourceTransformation = _sliceAndUnsetPropert.sourceTransformation,\\n        info = _sliceAndUnsetPropert.info,\\n        recommendations = _sliceAndUnsetPropert.recommendations,\\n        textTracks = _sliceAndUnsetPropert.textTracks;\\n\\n    _this = _super.call(this, publicId, options);\\n    var _poster = null;\\n    var _sourceTypes = null;\\n    var _sourceTransformation = null;\\n    var _info = null;\\n    var _recommendations = null;\\n    var _textTracks = null;\\n    _this._type = 'VideoSource';\\n    _this.isRawUrl = isRawUrl;\\n\\n    _this.poster = function (publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (!publicId) {\\n        return _poster;\\n      }\\n\\n      if (publicId instanceof _imageSource.default) {\\n        _poster = publicId;\\n        return _assertThisInitialized(_this);\\n      }\\n\\n      var _normalizeOptions2 = (0, _common.normalizeOptions)(publicId, options, {\\n        tolerateMissingId: true\\n      });\\n\\n      publicId = _normalizeOptions2.publicId;\\n      options = _normalizeOptions2.options;\\n\\n      if (!publicId) {\\n        publicId = _this.publicId();\\n        options = (0, _assign.assign)({}, options, DEFAULT_POSTER_PARAMS);\\n      }\\n\\n      options.cloudinaryConfig = options.cloudinaryConfig || _this.cloudinaryConfig();\\n      _poster = new _imageSource.default(publicId, options);\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.sourceTypes = function (types) {\\n      if (!types) {\\n        return _sourceTypes;\\n      }\\n\\n      _sourceTypes = types;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.sourceTransformation = function (trans) {\\n      if (!trans) {\\n        return _sourceTransformation;\\n      }\\n\\n      _sourceTransformation = trans;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.info = function (info) {\\n      if (!info) {\\n        return _info;\\n      }\\n\\n      _info = info;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.recommendations = function (recommends) {\\n      if (recommends === undefined) {\\n        return _recommendations;\\n      }\\n\\n      _recommendations = recommends;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.textTracks = function (textTracks) {\\n      if (textTracks === undefined) {\\n        return _textTracks;\\n      }\\n\\n      _textTracks = textTracks;\\n      return _assertThisInitialized(_this);\\n    };\\n\\n    _this.poster(poster);\\n\\n    _this.sourceTypes(sourceTypes);\\n\\n    _this.sourceTransformation(sourceTransformation);\\n\\n    _this.info(info);\\n\\n    _this.recommendations(recommendations);\\n\\n    _this.textTracks(textTracks);\\n\\n    _this.objectId = generateId();\\n    return _this;\\n  }\\n\\n  _createClass(VideoSource, [{\\n    key: \\\"contains\\\",\\n    value: function contains(source) {\\n      var sources = this.generateSources();\\n      return sources.some(function (_source) {\\n        return (0, _common.isSrcEqual)(_source, source);\\n      });\\n    }\\n  }, {\\n    key: \\\"generateSources\\\",\\n    value: function generateSources() {\\n      var _this2 = this;\\n\\n      if (this.isRawUrl) {\\n        var type = this.sourceTypes().length > 1 ? null : this.sourceTypes()[0];\\n        return [this.generateRawSource(this.publicId(), type)];\\n      }\\n\\n      var isIe = typeof navigator !== 'undefined' && (/MSIE/.test(navigator.userAgent) || /Trident\\\\//.test(navigator.appVersion));\\n      var srcs = this.sourceTypes().map(function (sourceType) {\\n        var src = null;\\n\\n        var srcTransformation = _this2.sourceTransformation()[sourceType] || _this2.transformation();\\n\\n        var format = normalizeFormat(sourceType);\\n        var isAdaptive = ['mpd', 'm3u8'].indexOf(format) !== -1;\\n        var opts = {};\\n\\n        if (srcTransformation) {\\n          opts.transformation = Array.isArray(srcTransformation) ? srcTransformation : [srcTransformation];\\n        }\\n\\n        (0, _assign.assign)(opts, {\\n          resource_type: 'video',\\n          format: format\\n        });\\n        var type = null;\\n        var codecTrans = null;\\n        var hasCodecSrcTrans = (0, _cloudinary.isKeyInTransformation)(opts.transformation, 'video_codec') || (0, _cloudinary.isKeyInTransformation)(opts.transformation, 'streaming_profile');\\n\\n        var _formatToMimeTypeAndT = formatToMimeTypeAndTransformation(sourceType);\\n\\n        var _formatToMimeTypeAndT2 = _slicedToArray(_formatToMimeTypeAndT, 2);\\n\\n        type = _formatToMimeTypeAndT2[0];\\n        codecTrans = _formatToMimeTypeAndT2[1];\\n\\n        // If user's transformation include video_codec then don't add another video codec to transformation\\n        if (codecTrans && !hasCodecSrcTrans) {\\n          opts.transformation.push(codecTrans);\\n        }\\n\\n        if (opts.format === 'auto') {\\n          delete opts.format;\\n        }\\n\\n        var queryString = _this2.queryParams() ? (0, _querystring.objectToQuerystring)(_this2.queryParams()) : '';\\n        src = _this2.config().url(_this2.publicId(), opts); // if src is a url that already contains query params then replace '?' with '&'\\n\\n        src += src.indexOf('?') > -1 ? queryString.replace('?', '&') : queryString;\\n        return {\\n          type: type,\\n          src: src,\\n          cldSrc: _this2,\\n          isAdaptive: isAdaptive\\n        };\\n      });\\n\\n      if (isIe) {\\n        return srcs.filter(function (s) {\\n          return s.type !== 'video/mp4; codec=\\\"hev1.1.6.L93.B0\\\"';\\n        });\\n      } else if (_video.default.browser.IS_ANY_SAFARI) {\\n        // filter out dash on safari\\n        return srcs.filter(function (s) {\\n          return s.type.indexOf('application/dash+xml') === -1;\\n        });\\n      } else {\\n        return srcs;\\n      }\\n    }\\n  }, {\\n    key: \\\"generateRawSource\\\",\\n    value: function generateRawSource(url, type) {\\n      var t = type || url.split('.').pop();\\n      var isAdaptive = !!CONTAINER_MIME_TYPES[t];\\n\\n      if (isAdaptive) {\\n        type = CONTAINER_MIME_TYPES[t][0];\\n      } else {\\n        type = type ? \\\"video/\\\".concat(type) : null;\\n      }\\n\\n      return {\\n        type: type,\\n        src: url,\\n        cldSrc: this,\\n        isAdaptive: isAdaptive\\n      };\\n    }\\n  }]);\\n\\n  return VideoSource;\\n}(_baseSource.default);\\n\\nvar CONTAINER_MIME_TYPES = {\\n  dash: ['application/dash+xml'],\\n  hls: ['application/x-mpegURL'],\\n  mpd: ['application/dash+xml'],\\n  m3u8: ['application/x-mpegURL']\\n};\\n\\nfunction formatToMimeTypeAndTransformation(format) {\\n  var _format$toLowerCase$s = format.toLowerCase().split('\\\\/'),\\n      _format$toLowerCase$s2 = _slicedToArray(_format$toLowerCase$s, 2),\\n      container = _format$toLowerCase$s2[0],\\n      codec = _format$toLowerCase$s2[1];\\n\\n  var result = CONTAINER_MIME_TYPES[container];\\n  var transformation = null;\\n\\n  if (!result) {\\n    result = [\\\"video/\\\".concat(container), transformation];\\n  }\\n\\n  if (codec) {\\n    transformation = (0, _common.codecToSrcTransformation)(codec);\\n    result = [\\\"\\\".concat(result[0], \\\"; codecs=\\\\\\\"\\\").concat((0, _common.codecShorthandTrans)(codec), \\\"\\\\\\\"\\\"), transformation];\\n  }\\n\\n  return result;\\n}\\n\\nvar FORMAT_MAPPINGS = {\\n  hls: 'm3u8',\\n  dash: 'mpd'\\n};\\n\\nfunction normalizeFormat(format) {\\n  format = format.toLowerCase().split('\\\\/').shift();\\n  var res = FORMAT_MAPPINGS[format];\\n\\n  if (!res) {\\n    res = format.split('\\\\/').shift();\\n  }\\n\\n  return res;\\n}\\n\\nvar _default = VideoSource;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/cloudinary/models/video-source.js?\")},\"./plugins/colors/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nvar _cssPrefix = __webpack_require__(/*! utils/css-prefix */ \\\"./utils/css-prefix.js\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar playerColors = \\\"\\\\n  .PLAYER-CLASS-PREFIX {\\\\n    --color-accent: --accent-color;\\\\n    --color-base: --base-color;\\\\n    --color-text: --text-color;\\\\n\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-time-tooltip,\\\\n  .PLAYER-CLASS-PREFIX .vjs-mouse-display:after,\\\\n  .PLAYER-CLASS-PREFIX .vjs-play-progress:after {\\\\n    color: --base-color;\\\\n    background-color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-slider {\\\\n    background-color: rgba(--accent-color, 0.3);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-load-progress,\\\\n  .PLAYER-CLASS-PREFIX .vjs-load-progress div {\\\\n    background: rgba(--accent-color, 0.2);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-level,\\\\n  .PLAYER-CLASS-PREFIX .vjs-play-progress {\\\\n    background: --accent-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-vertical {\\\\n    background-color: rgba(--base-color, 0.7);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-panel-horizontal .vjs-control:before {\\\\n    border-color: transparent transparent rgba(--accent-color, 0.4) transparent;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-volume-panel-horizontal .vjs-volume-level:before {\\\\n    border-color: transparent transparent --accent-color transparent;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay {\\\\n    color: --text-color;\\\\n    background-color: rgba(--base-color, 0.4);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item {\\\\n    box-shadow: 0 0.5em 1.2em 0px --base-color;\\\\n    color: --text-color;\\\\n    border: 1px solid --text-color !important;\\\\n    position: relative;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item:active,\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item:hover {\\\\n    border: 1px solid --accent-color !important;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content .vjs-menu-item:active,\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content .vjs-menu-item:hover {\\\\n    color: --text-color;\\\\n    background-color: --accent-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX.vjs-ad-playing .vjs-progress-control .vjs-play-progress {\\\\n    background: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX.cld-plw-layout {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-plw-item-info-wrap {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-plw-panel-item {\\\\n    border-color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-video-player-floater-close polygon {\\\\n    fill: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-spbl-product-hotspot:after {\\\\n    background: --base-color;\\\\n    box-shadow: 0 0 0 4px --accent-color, 0 0 0 8px rgba(--text-color, 0.24);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-spbl-product-tooltip {\\\\n    color: --base-color;\\\\n    background: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .base-color-semi-bg {\\\\n    background: rgba(--base-color, 0.7);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .text-color-semi-bg {\\\\n    background: rgba(--text-color, 0.7);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .text-color-text {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .base-color-text {\\\\n    color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .accent-color-text {\\\\n    color: --accent-color;\\\\n  }\\\\n\\\";\\nvar darkOnlyColors = \\\"\\\\n\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .base-color-bg,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-control-bar,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-big-play-button,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-dark .vjs-menu-button\\\\n  .vjs-menu-content {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar {\\\\n    background-image: linear-gradient(--base-color, rgba(255, 255, 255, 0) 100%);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary .vjs-recommendations-overlay-item-primary-content {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary div {\\\\n    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 80%);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video {\\\\n    border: 1px solid rgba(--text-color, 0.5);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video .vjs-upcoming-video-bar {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content {\\\\n    background-color: rgba(--base-color, 0.6);\\\\n  }\\\\n\\\";\\nvar lightOnlyColors = \\\"\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar {\\\\n    flex-direction: row;\\\\n    justify-content: left;\\\\n    height: 3.6em;\\\\n    background: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-title-bar div {\\\\n    width: auto;\\\\n    padding: 0 inherit;\\\\n    margin: 0;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .base-color-bg,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-control-bar,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-big-play-button,\\\\n  .PLAYER-CLASS-PREFIX.cld-video-player-skin-light .vjs-menu-button .vjs-menu-content {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary .vjs-recommendations-overlay-item-primary-content {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary:active .vjs-recommendations-overlay-item-primary-content,\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-primary:hover .vjs-recommendations-overlay-item-primary-content {\\\\n    color: --base-color;\\\\n    background-color: rgba(--accent-color, 0.8);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary:active div,\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary:hover div {\\\\n    color: --base-color;\\\\n    background-color: rgba(--accent-color, 0.8);\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-recommendations-overlay .vjs-recommendations-overlay-item.vjs-recommendations-overlay-item-secondary div {\\\\n    background: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video {\\\\n    border: 1px solid --text-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-upcoming-video .vjs-upcoming-video-bar {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .vjs-context-menu-ui .vjs-menu-content {\\\\n    background-color: --base-color;\\\\n  }\\\\n\\\\n  .PLAYER-CLASS-PREFIX .cld-plw-item-info-wrap {\\\\n    color: --text-color;\\\\n  }\\\\n\\\\n  @media only screen and (max-width: 768px) {\\\\n    .PLAYER-CLASS-PREFIX.cld-plw-vertical .cld-plw-item-info-wrap {\\\\n      color: --accent-color;\\\\n    }\\\\n  }\\\\n\\\";\\nvar defaults = {\\n  colorsDark: {\\n    'base': '#000000',\\n    'accent': '#FF620C',\\n    'text': '#FFFFFF'\\n  },\\n  colorsLight: {\\n    'base': '#FFFFFF',\\n    'accent': '#0078FF',\\n    'text': '#0E2F5A'\\n  }\\n};\\n\\nvar Colors = function Colors(player) {\\n  var _this = this;\\n\\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, Colors);\\n\\n  this.player = player;\\n  var skinDefaults = this.player.options_.skin === 'light' ? defaults.colorsLight : defaults.colorsDark;\\n  opts.colors = (0, _assign.assign)({}, skinDefaults, opts.colors);\\n\\n  this.init = function () {\\n    injectCSS(parseStyles(playerColors));\\n\\n    if (_this.player.options_.skin === 'light') {\\n      injectCSS(parseStyles(lightOnlyColors));\\n    } else {\\n      injectCSS(parseStyles(darkOnlyColors));\\n    }\\n  };\\n\\n  var injectCSS = function injectCSS(css) {\\n    var style = document.createElement('style');\\n    style.innerHTML = css;\\n\\n    _this.player.el_.appendChild(style);\\n  };\\n\\n  var hexToRgb = function hexToRgb(hex) {\\n    // Expand shorthand form (e.g. \\\"03F\\\") to full form (e.g. \\\"0033FF\\\")\\n    var shorthandRegex = /^#?([a-f\\\\d])([a-f\\\\d])([a-f\\\\d])$/i;\\n    hex = hex.replace(shorthandRegex, function (m, r, g, b) {\\n      return r + r + g + g + b + b;\\n    }); // '#0080C0' to '0, 128, 192'\\n\\n    var result = /^#?([a-f\\\\d]{2})([a-f\\\\d]{2})([a-f\\\\d]{2})$/i.exec(hex);\\n    return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;\\n  };\\n\\n  var parseStyles = function parseStyles(styles) {\\n    var parsed = styles // wrapper class\\n    .replace(/PLAYER\\\\-CLASS\\\\-PREFIX/g, (0, _cssPrefix.playerClassPrefix)(_this.player)) // rgba first\\n    .replace(/rgba\\\\(\\\\-\\\\-base\\\\-color/g, 'rgba(' + hexToRgb(opts.colors.base)).replace(/rgba\\\\(\\\\-\\\\-accent\\\\-color/g, 'rgba(' + hexToRgb(opts.colors.accent)).replace(/rgba\\\\(\\\\-\\\\-text\\\\-color/g, 'rgba(' + hexToRgb(opts.colors.text)) // solid colors\\n    .replace(/\\\\-\\\\-base\\\\-color/g, opts.colors.base).replace(/\\\\-\\\\-accent\\\\-color/g, opts.colors.accent).replace(/\\\\-\\\\-text\\\\-color/g, opts.colors.text);\\n    return parsed;\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new Colors(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/colors/index.js?\")},\"./plugins/context-menu/components/context-menu-item.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MenuItem = _video.default.getComponent(\\'MenuItem\\');\\n\\nvar ContextMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _inherits(ContextMenuItem, _MenuItem);\\n\\n  var _super = _createSuper(ContextMenuItem);\\n\\n  function ContextMenuItem() {\\n    _classCallCheck(this, ContextMenuItem);\\n\\n    return _super.apply(this, arguments);\\n  }\\n\\n  _createClass(ContextMenuItem, [{\\n    key: \"handleClick\",\\n    value: function handleClick() {\\n      _get(_getPrototypeOf(ContextMenuItem.prototype), \"handleClick\", this).call(this);\\n\\n      this.options_.listener();\\n    }\\n  }]);\\n\\n  return ContextMenuItem;\\n}(MenuItem);\\n\\nvar _default = ContextMenuItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/components/context-menu-item.js?')},\"./plugins/context-menu/components/context-menu.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _contextMenuItem = _interopRequireDefault(__webpack_require__(/*! ./context-menu-item */ \"./plugins/context-menu/components/context-menu-item.js\"));\\n\\nvar _positioning = __webpack_require__(/*! ../../../utils/positioning */ \"./utils/positioning.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Menu = _video.default.getComponent(\\'Menu\\'); // support VJS5 & VJS6 at the same time\\n\\n\\nvar dom = _video.default.dom || _video.default;\\n\\nvar ContextMenu = /*#__PURE__*/function (_Menu) {\\n  _inherits(ContextMenu, _Menu);\\n\\n  var _super = _createSuper(ContextMenu);\\n\\n  function ContextMenu(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, ContextMenu);\\n\\n    _this = _super.call(this, player, options); // Each menu component has its own `dispose` method that can be\\n    // safely bound and unbound to events while maintaining its context.\\n\\n    _this.dispose = _video.default.bind(_assertThisInitialized(_this), _this.dispose);\\n    options.content.forEach(function (c) {\\n      var fn = null;\\n\\n      if (typeof c.listener === \\'function\\') {\\n        fn = c.listener;\\n      } else if (typeof c.href === \\'string\\') {\\n        fn = function fn() {\\n          return window.open(c.href);\\n        };\\n      } else {\\n        fn = function fn() {\\n          return true;\\n        };\\n      }\\n\\n      var that = _assertThisInitialized(_this);\\n\\n      _this.addItem(new _contextMenuItem.default(player, {\\n        label: c.label,\\n        listener: _video.default.bind(player, function () {\\n          fn(this);\\n          window.setTimeout(function () {\\n            that.dispose();\\n          }, 1);\\n        })\\n      }));\\n    });\\n    return _this;\\n  }\\n\\n  _createClass(ContextMenu, [{\\n    key: \"setPosition\",\\n    value: function setPosition(left, top) {\\n      (0, _positioning.setPosition)(this.el(), left, top);\\n    }\\n  }, {\\n    key: \"createEl\",\\n    value: function createEl() {\\n      var el = _get(_getPrototypeOf(ContextMenu.prototype), \"createEl\", this).call(this);\\n\\n      dom.addClass(el, \\'vjs-context-menu-ui\\');\\n\\n      if (this.options_.position) {\\n        var _this$options_$positi = this.options_.position,\\n            left = _this$options_$positi.left,\\n            top = _this$options_$positi.top;\\n        this.setPosition(left, top);\\n      }\\n\\n      return el;\\n    }\\n  }]);\\n\\n  return ContextMenu;\\n}(Menu);\\n\\nvar _default = ContextMenu;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/components/context-menu.js?')},\"./plugins/context-menu/context-menu.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/context-menu.scss?\")},\"./plugins/context-menu/contextMenuContent.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar contextMenuContent = function contextMenuContent(player) {\\n  var isLooping = player.loop();\\n  var isPaused = player.paused();\\n  var isMuted = player.muted();\\n  var isFullscreen = player.isFullscreen();\\n  var aboutMenuItem = {\\n    label: '<span class=\\\"player-version\\\">Cloudinary Player v' + \\\"1.5.3\\\" + '</span>'\\n  };\\n\\n  if (!player.controls()) {\\n    return [aboutMenuItem];\\n  }\\n\\n  return [{\\n    label: isLooping ? 'Unloop' : 'Loop',\\n    listener: function listener() {\\n      player.loop(!isLooping);\\n    }\\n  }, {\\n    label: isPaused ? 'Play' : 'Pause',\\n    listener: function listener() {\\n      if (isPaused) {\\n        player.play();\\n      } else {\\n        player.pause();\\n      }\\n    }\\n  }, {\\n    label: isMuted ? 'Unmute' : 'Mute',\\n    listener: function listener() {\\n      player.muted(!isMuted);\\n    }\\n  }, {\\n    label: isFullscreen ? 'Exit Fullscreen' : 'Fullscreen',\\n    listener: function listener() {\\n      if (isFullscreen) {\\n        player.exitFullscreen();\\n      } else {\\n        player.requestFullscreen();\\n      }\\n    }\\n  }, aboutMenuItem];\\n};\\n\\nvar _default = contextMenuContent;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/contextMenuContent.js?\")},\"./plugins/context-menu/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\n__webpack_require__(/*! ./context-menu.scss */ \\\"./plugins/context-menu/context-menu.scss\\\");\\n\\n__webpack_require__(/*! videojs-contextmenu */ \\\"../node_modules/videojs-contextmenu/es5/plugin.js\\\");\\n\\nvar _contextMenu2 = _interopRequireDefault(__webpack_require__(/*! ./components/context-menu */ \\\"./plugins/context-menu/components/context-menu.js\\\"));\\n\\nvar _positioning = __webpack_require__(/*! utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar defaults = {\\n  showNativeOnRecurringEvent: false\\n};\\n\\nvar ContextMenuPlugin = function ContextMenuPlugin(player, opts) {\\n  var _this = this;\\n\\n  _classCallCheck(this, ContextMenuPlugin);\\n\\n  if (!Array.isArray(opts.content) && typeof opts.content !== 'function') {\\n    throw new Error('\\\"content\\\" required');\\n  }\\n\\n  opts = (0, _assign.assign)({}, defaults, opts);\\n  this.player = player;\\n\\n  var _options = (0, _slicing.sliceProperties)(opts, 'content', 'showNativeOnRecurringEvent');\\n\\n  this.init = function () {\\n    // If we are not already providing \\\"vjs-contextmenu\\\" events, do so.\\n    _this.player.contextmenu();\\n\\n    _this.player.on('vjs-contextmenu', onContextMenu);\\n\\n    _this.player.ready(function () {\\n      return _this.player.addClass('vjs-context-menu');\\n    });\\n  };\\n\\n  var getMenuPosition = function getMenuPosition(e) {\\n    // Calc menu size\\n    var menuEl = _this.menu.el(); // Must append to element to get bounding rect\\n\\n\\n    menuEl.style.visibility = 'hidden';\\n\\n    _this.player.el().appendChild(menuEl);\\n\\n    var menuSize = menuEl.getBoundingClientRect();\\n\\n    _this.player.el().removeChild(menuEl);\\n\\n    menuEl.style.visibility = 'visible';\\n    var ptrPosition = (0, _positioning.getPointerPosition)(_this.player.el(), e);\\n\\n    var playerSize = _this.player.el().getBoundingClientRect();\\n\\n    var ptrTop = playerSize.height - playerSize.height * ptrPosition.y + 1;\\n    var ptrLeft = Math.round(playerSize.width * ptrPosition.x) + 1;\\n    var top = ptrTop;\\n    var left = ptrLeft; // Correct top when menu can't fit fully height-wise when pointer is at it's top left corner\\n\\n    if (ptrTop + menuSize.height > playerSize.height) {\\n      var difference = ptrTop + menuSize.height - playerSize.height;\\n      top = difference > menuSize.height / 2 ? ptrTop - menuSize.height - 1 : playerSize.height - menuSize.height;\\n    } // Correct left where menu can't fit fully width-wise when pointer is at it's top left corner\\n\\n\\n    if (ptrLeft + menuSize.width > playerSize.width) {\\n      var _difference = ptrLeft + menuSize.width - playerSize.width;\\n\\n      left = _difference > menuSize.width / 2 ? ptrLeft - menuSize.width - 1 : playerSize.width - menuSize.width;\\n    } // Correct top and left in cases that menu is positioned on the pointer\\n\\n\\n    if (top < ptrTop && left < ptrLeft) {\\n      top = ptrTop - menuSize.height - 1;\\n      left = ptrLeft - menuSize.width - 1;\\n    } // Make sure that we're still in bounds after the corrections.\\n\\n\\n    top = Math.max(0, top);\\n    left = Math.max(0, left);\\n    return {\\n      left: left,\\n      top: top\\n    };\\n  };\\n\\n  var onContextMenu = function onContextMenu(e) {\\n    if (_this.menu) {\\n      _this.menu.dispose();\\n\\n      if (_options.showNativeOnRecurringEvent) {\\n        // If this event happens while the custom menu is open, close it and do\\n        // nothing else. This will cause native contextmenu events to be intercepted\\n        // once again; so, the next time a contextmenu event is encountered, we'll\\n        // open the custom menu.\\n        return;\\n      }\\n    } // Stop canceling the native contextmenu event until further notice.\\n\\n\\n    if (_options.showNativeOnRecurringEvent) {\\n      _this.player.contextmenu.options.cancel = false;\\n    }\\n\\n    e.preventDefault(); // Allow dynamically setting the menu labels based on player\\n\\n    var content = _options.content;\\n\\n    if (typeof content === 'function') {\\n      content = content(_this.player);\\n    }\\n\\n    _this.menu = new _contextMenu2.default(_this.player, {\\n      content: content\\n    });\\n\\n    var _getMenuPosition = getMenuPosition(e),\\n        left = _getMenuPosition.left,\\n        top = _getMenuPosition.top;\\n\\n    _this.menu.setPosition(left, top); // This is to handle a bug where firefox triggers both 'contextmenu' and 'click'\\n    // events on rightclick, causing menu to open and then immediately close.\\n\\n\\n    var clickHandler = function clickHandler(_e) {\\n      if (!(_e.type === 'click' && (_e.which === 3 || _e.button === 2))) {\\n        _this.menu.dispose();\\n      }\\n    };\\n\\n    _this.menu.on('dispose', function () {\\n      // Begin canceling contextmenu events again, so subsequent events will\\n      // cause the custom menu to be displayed again.\\n      _this.player.contextmenu.options.cancel = true;\\n\\n      _this.player.removeChild(_this.menu);\\n\\n      _video.default.off(document, ['click', 'tap'], clickHandler);\\n\\n      delete _this.menu;\\n    });\\n\\n    _this.player.addChild(_this.menu);\\n\\n    _video.default.on(document, ['click', 'tap'], clickHandler);\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new ContextMenuPlugin(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/context-menu/index.js?\")},\"./plugins/dash/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = dashPlugin;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \"../node_modules/dashjs/build/es5/index.js\"));\\n\\nvar _videojsDash = _interopRequireDefault(__webpack_require__(/*! plugins/dash/videojs-dash */ \"./plugins/dash/videojs-dash.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// eslint-disable-next-line no-unused-vars\\nfunction dashPlugin() {\\n  var dashInit = function dashInit(player, mediaPlayer) {\\n    // eslint-disable-next-line new-cap\\n    mediaPlayer = _dashjs.default.MediaPlayer().create();\\n    var settings = {\\n      streaming: {\\n        liveDelayFragmentCount: null\\n      }\\n    };\\n    mediaPlayer.updateSettings(settings);\\n    mediaPlayer.on(_dashjs.default.MediaPlayer.events.PLAYBACK_STALLED, function (a) {\\n      console.log(a);\\n      console.log(\\'stalled\\');\\n    });\\n  }; // Triggered on \\'beforeinitialize\\'\\n\\n\\n  _video.default.Html5DashJS.hook(\\'beforeinitialize\\', dashInit);\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/index.js?')},\"./plugins/dash/setup-audio-tracks.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = setupAudioTracks;\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n/**\\n * Setup audio tracks. Take the tracks from dash and add the tracks to videojs. Listen for when\\n * videojs changes tracks and apply that to the dash player because videojs doesn't do this\\n * natively.\\n *\\n * @private\\n * @param {videojs} player the videojs player instance\\n * @param {videojs.tech} tech the videojs tech being used\\n */\\nfunction handlePlaybackMetadataLoaded(player, tech) {\\n  var mediaPlayer = player.dash.mediaPlayer;\\n  var dashAudioTracks = mediaPlayer.getTracksFor('audio');\\n  var videojsAudioTracks = player.audioTracks();\\n\\n  function generateIdFromTrackIndex(index) {\\n    return \\\"dash-audio-\\\".concat(index);\\n  }\\n\\n  function findDashAudioTrack(subDashAudioTracks, videojsAudioTrack) {\\n    return (0, _find.find)(subDashAudioTracks, function (track) {\\n      return generateIdFromTrackIndex(track.index) === videojsAudioTrack.id;\\n    });\\n  } // Safari creates a single native `AudioTrack` (not `videojs.AudioTrack`) when loading. Clear all\\n  // automatically generated audio tracks so we can create them all ourself.\\n\\n\\n  if (videojsAudioTracks.length) {\\n    tech.clearTracks(['audio']);\\n  }\\n\\n  var currentAudioTrack = mediaPlayer.getCurrentTrackFor('audio');\\n  dashAudioTracks.forEach(function (dashTrack) {\\n    var localizedLabel = null;\\n\\n    if (Array.isArray(dashTrack.labels)) {\\n      for (var i = 0; i < dashTrack.labels.length; i++) {\\n        if (dashTrack.labels[i].lang && player.language().indexOf(dashTrack.labels[i].lang.toLowerCase()) !== -1) {\\n          localizedLabel = dashTrack.labels[i];\\n          break;\\n        }\\n      }\\n    }\\n\\n    var label = null;\\n\\n    if (localizedLabel) {\\n      label = localizedLabel.text;\\n    } else if (Array.isArray(dashTrack.labels) && dashTrack.labels.length === 1) {\\n      label = dashTrack.labels[0].text;\\n    } else {\\n      label = dashTrack.lang;\\n\\n      if (dashTrack.roles && dashTrack.roles.length) {\\n        label += ' (' + dashTrack.roles.join(', ') + ')';\\n      }\\n    } // Add the track to the player's audio track list.\\n\\n\\n    videojsAudioTracks.addTrack(new _video.default.AudioTrack({\\n      enabled: dashTrack === currentAudioTrack,\\n      id: generateIdFromTrackIndex(dashTrack.index),\\n      kind: dashTrack.kind || 'main',\\n      label: label,\\n      language: dashTrack.lang\\n    }));\\n  });\\n\\n  var audioTracksChangeHandler = function audioTracksChangeHandler() {\\n    for (var i = 0; i < videojsAudioTracks.length; i++) {\\n      var track = videojsAudioTracks[i];\\n\\n      if (track.enabled) {\\n        // Find the audio track we just selected by the id\\n        var dashAudioTrack = findDashAudioTrack(dashAudioTracks, track); // Set is as the current track\\n\\n        mediaPlayer.setCurrentTrack(dashAudioTrack); // Stop looping\\n        // eslint-disable-next-line no-continue\\n\\n        continue;\\n      }\\n    }\\n  };\\n\\n  videojsAudioTracks.addEventListener('change', audioTracksChangeHandler);\\n  player.dash.mediaPlayer.on(_dashjs.default.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE, function () {\\n    videojsAudioTracks.removeEventListener('change', audioTracksChangeHandler);\\n  });\\n}\\n/*\\n * Call `handlePlaybackMetadataLoaded` when `mediaPlayer` emits\\n * `dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED`.\\n */\\n\\n\\nfunction setupAudioTracks(player, tech) {\\n  // When `dashjs` finishes loading metadata, create audio tracks for `video.js`.\\n  player.dash.mediaPlayer.on(_dashjs.default.MediaPlayer.events.PLAYBACK_METADATA_LOADED, handlePlaybackMetadataLoaded.bind(null, player, tech));\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/setup-audio-tracks.js?\")},\"./plugins/dash/setup-text-tracks.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = setupTextTracks;\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \\\"../node_modules/dashjs/build/es5/index.js\\\"));\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _window = _interopRequireDefault(__webpack_require__(/*! global/window */ \\\"../node_modules/global/window.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction find(l, f) {\\n  for (var i = 0; i < l.length; i++) {\\n    if (f(l[i])) {\\n      return l[i];\\n    }\\n  }\\n}\\n/*\\n * Attach text tracks from dash.js to videojs\\n *\\n * @param {videojs} player the videojs player instance\\n * @param {array} tracks the tracks loaded by dash.js to attach to videojs\\n *\\n * @private\\n */\\n\\n\\nfunction attachDashTextTracksToVideojs(player, tech, tracks) {\\n  var trackDictionary = []; // Add remote tracks\\n\\n  var tracksAttached = tracks // Map input data to match HTMLTrackElement spec\\n  // https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement\\n  .map(function (track) {\\n    var localizedLabel = null;\\n\\n    if (Array.isArray(track.labels)) {\\n      for (var i = 0; i < track.labels.length; i++) {\\n        if (track.labels[i].lang && player.language().indexOf(track.labels[i].lang.toLowerCase()) !== -1) {\\n          localizedLabel = track.labels[i];\\n          break;\\n        }\\n      }\\n    }\\n\\n    var label = null;\\n\\n    if (localizedLabel) {\\n      label = localizedLabel.text;\\n    } else if (Array.isArray(track.labels) && track.labels.length === 1) {\\n      label = track.labels[0].text;\\n    } else {\\n      label = track.lang || track.label;\\n    }\\n\\n    return {\\n      dashTrack: track,\\n      trackConfig: {\\n        label: label,\\n        language: track.lang,\\n        srclang: track.lang,\\n        kind: track.kind\\n      }\\n    };\\n  }) // Add track to videojs track list\\n  .map(function (_ref) {\\n    var trackConfig = _ref.trackConfig,\\n        dashTrack = _ref.dashTrack;\\n    var remoteTextTrack = player.addRemoteTextTrack(trackConfig, false);\\n    trackDictionary.push({\\n      textTrack: remoteTextTrack.track,\\n      dashTrack: dashTrack\\n    }); // Don't add the cues becuase we're going to let dash handle it natively. This will ensure\\n    // that dash handle external time text files and fragmented text tracks.\\n    //\\n    // Example file with external time text files:\\n    // https://storage.googleapis.com/shaka-demo-assets/sintel-mp4-wvtt/dash.mpd\\n\\n    return remoteTextTrack;\\n  });\\n  /*\\n   * Scan `videojs.textTracks()` to find one that is showing. Set the dash text track.\\n   */\\n\\n  function updateActiveDashTextTrack() {\\n    var dashMediaPlayer = player.dash.mediaPlayer;\\n    var textTracks = player.textTracks();\\n    var activeTextTrackIndex = -1; // Iterate through the tracks and find the one marked as showing. If none are showing,\\n    // `activeTextTrackIndex` will be set to `-1`, disabling text tracks.\\n\\n    var _loop = function _loop(i) {\\n      var textTrack = textTracks[i];\\n\\n      if (textTrack.mode === 'showing') {\\n        // Find the dash track we want to use\\n\\n        /* jshint loopfunc: true */\\n        var dictionaryLookupResult = find(trackDictionary, function (track) {\\n          return track.textTrack === textTrack;\\n        });\\n        /* jshint loopfunc: false */\\n\\n        var dashTrackToActivate = dictionaryLookupResult ? dictionaryLookupResult.dashTrack : null; // If we found a track, get it's index.\\n\\n        if (dashTrackToActivate) {\\n          activeTextTrackIndex = tracks.indexOf(dashTrackToActivate);\\n        }\\n      }\\n    };\\n\\n    for (var i = 0; i < textTracks.length; i += 1) {\\n      _loop(i);\\n    } // If the text track has changed, then set it in dash\\n\\n\\n    if (activeTextTrackIndex !== dashMediaPlayer.getCurrentTextTrackIndex()) {\\n      dashMediaPlayer.setTextTrack(activeTextTrackIndex);\\n    }\\n  } // Update dash when videojs's selected text track changes.\\n\\n\\n  player.textTracks().on('change', updateActiveDashTextTrack); // Cleanup event listeners whenever we start loading a new source\\n\\n  player.dash.mediaPlayer.on(_dashjs.default.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE, function () {\\n    player.textTracks().off('change', updateActiveDashTextTrack);\\n  }); // Initialize the text track on our first run-through\\n\\n  updateActiveDashTextTrack();\\n  return tracksAttached;\\n}\\n/*\\n * Wait for dash to emit `TEXT_TRACKS_ADDED` and then attach the text tracks loaded by dash if\\n * we're not using native text tracks.\\n *\\n * @param {videojs} player the videojs player instance\\n * @private\\n */\\n\\n\\nfunction setupTextTracks(player, tech, options) {\\n  // Clear VTTCue if it was shimmed by vttjs and let dash.js use TextTrackCue.\\n  // This is necessary because dash.js creates text tracks\\n  // using addTextTrack which is incompatible with vttjs.VTTCue in IE11\\n  if (_window.default.VTTCue && !/\\\\[native code\\\\]/.test(_window.default.VTTCue.toString())) {\\n    _window.default.VTTCue = false;\\n  } // Store the tracks that we've added so we can remove them later.\\n\\n\\n  var dashTracksAttachedToVideoJs = []; // We're relying on the user to disable native captions. Show an error if they didn't do so.\\n\\n  if (tech.featuresNativeTextTracks) {\\n    _video.default.log.error('You must pass {html: {nativeCaptions: false}} in the videojs constructor ' + 'to use text tracks in videojs-contrib-dash');\\n\\n    return;\\n  }\\n\\n  var mediaPlayer = player.dash.mediaPlayer; // Clear the tracks that we added. We don't clear them all because someone else can add tracks.\\n\\n  function clearDashTracks() {\\n    dashTracksAttachedToVideoJs.forEach(player.removeRemoteTextTrack.bind(player));\\n    dashTracksAttachedToVideoJs = [];\\n  } // eslint-disable-next-line no-unused-vars\\n\\n\\n  function handleTextTracksAdded(_ref2) {\\n    var index = _ref2.index,\\n        tracks = _ref2.tracks;\\n    // Stop listening for this event. We only want to hear it once.\\n    mediaPlayer.off(_dashjs.default.MediaPlayer.events.TEXT_TRACKS_ADDED, handleTextTracksAdded); // Cleanup old tracks\\n\\n    clearDashTracks();\\n\\n    if (!tracks.length) {\\n      // Don't try to add text tracks if there aren't any\\n      return;\\n    } // Save the tracks so we can remove them later\\n\\n\\n    dashTracksAttachedToVideoJs = attachDashTextTracksToVideojs(player, tech, tracks, options);\\n  } // Attach dash text tracks whenever we dash emits `TEXT_TRACKS_ADDED`.\\n\\n\\n  mediaPlayer.on(_dashjs.default.MediaPlayer.events.TEXT_TRACKS_ADDED, handleTextTracksAdded); // When the player can play, remove the initialization events. We might not have received\\n  // TEXT_TRACKS_ADDED` so we have to stop listening for it or we'll get errors when we load new\\n  // videos and are listening for the same event in multiple places, including cleaned up\\n  // mediaPlayers.\\n\\n  mediaPlayer.on(_dashjs.default.MediaPlayer.events.CAN_PLAY, function () {\\n    mediaPlayer.off(_dashjs.default.MediaPlayer.events.TEXT_TRACKS_ADDED, handleTextTracksAdded);\\n  });\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/setup-text-tracks.js?\")},\"./plugins/dash/videojs-dash.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _window = _interopRequireDefault(__webpack_require__(/*! global/window */ \"../node_modules/global/window.js\"));\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _dashjs = _interopRequireDefault(__webpack_require__(/*! dashjs */ \"../node_modules/dashjs/build/es5/index.js\"));\\n\\nvar _setupAudioTracks = _interopRequireDefault(__webpack_require__(/*! ./setup-audio-tracks */ \"./plugins/dash/setup-audio-tracks.js\"));\\n\\nvar _setupTextTracks = _interopRequireDefault(__webpack_require__(/*! ./setup-text-tracks */ \"./plugins/dash/setup-text-tracks.js\"));\\n\\nvar _document = _interopRequireDefault(__webpack_require__(/*! global/document */ \"../node_modules/global/document.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\\n\\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\\n\\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n/**\\n * videojs-contrib-dash\\n *\\n * Use Dash.js to playback DASH content inside of Video.js via a SourceHandler\\n */\\n\\n\\nvar Html5DashJS = /*#__PURE__*/function (_Component) {\\n  _inherits(Html5DashJS, _Component);\\n\\n  var _super = _createSuper(Html5DashJS);\\n\\n  function Html5DashJS(source, tech, options) {\\n    var _this;\\n\\n    _classCallCheck(this, Html5DashJS);\\n\\n    _this = _super.call(this, source, tech, options); // Get options from tech if not provided for backwards compatibility\\n\\n    options = options || tech.options_;\\n    _this.player = (0, _video.default)(options.playerId);\\n    _this.player.dash = _this.player.dash || {};\\n    _this.tech_ = tech;\\n    _this.el_ = tech.el();\\n    _this.elParent_ = _this.el_.parentNode;\\n    _this.hasFiniteDuration_ = false; // Do nothing if the src is falsey\\n\\n    if (!source.src) {\\n      return _possibleConstructorReturn(_this);\\n    } // While the manifest is loading and Dash.js has not finished initializing\\n    // we must defer events and functions calls with isReady_ and then `triggerReady`\\n    // again later once everything is setup\\n\\n\\n    tech.isReady_ = false;\\n\\n    if (Html5DashJS.updateSourceData) {\\n      _video.default.log.warn(\\'updateSourceData has been deprecated.\\' + \\' Please switch to using hook(\"updatesource\", callback).\\');\\n\\n      source = Html5DashJS.updateSourceData(source);\\n    } // call updatesource hooks\\n\\n\\n    Html5DashJS.hooks(\\'updatesource\\').forEach(function (hook) {\\n      source = hook(source);\\n    });\\n    var manifestSource = source.src;\\n    _this.keySystemOptions_ = Html5DashJS.buildDashJSProtData(source.keySystemOptions); // eslint-disable-next-line new-cap\\n\\n    _this.player.dash.mediaPlayer = _dashjs.default.MediaPlayer().create();\\n    _this.mediaPlayer_ = _this.player.dash.mediaPlayer; // For whatever reason, we need to call setTextDefaultEnabled(false) to get\\n    // VTT captions to show, even though we\\'re doing virtually the same thing\\n    // in setup-text-tracks.js\\n\\n    _this.mediaPlayer_.setTextDefaultEnabled(false); // Log MedaPlayer messages through video.js\\n\\n\\n    if (Html5DashJS.useVideoJSDebug) {\\n      _video.default.log.warn(\\'useVideoJSDebug has been deprecated.\\' + \\' Please switch to using hook(\"beforeinitialize\", callback).\\');\\n\\n      Html5DashJS.useVideoJSDebug(_this.mediaPlayer_);\\n    }\\n\\n    if (Html5DashJS.beforeInitialize) {\\n      _video.default.log.warn(\\'beforeInitialize has been deprecated.\\' + \\' Please switch to using hook(\"beforeinitialize\", callback).\\');\\n\\n      Html5DashJS.beforeInitialize(_this.player, _this.mediaPlayer_);\\n    }\\n\\n    Html5DashJS.hooks(\\'beforeinitialize\\').forEach(function (hook) {\\n      hook(_this.player, _this.mediaPlayer_);\\n    }); // Must run controller before these two lines or else there is no\\n    // element to bind to.\\n\\n    _this.mediaPlayer_.initialize(); // Retrigger a dash.js-specific error event as a player error\\n    // See src/streaming/utils/ErrorHandler.js in dash.js code\\n    // Handled with error (playback is stopped):\\n    // - capabilityError\\n    // - downloadError\\n    // - manifestError\\n    // - mediaSourceError\\n    // - mediaKeySessionError\\n    // Not handled:\\n    // - timedTextError (video can still play)\\n    // - mediaKeyMessageError (only fires under \\'might not work\\' circumstances)\\n    // eslint-disable-next-line complexity\\n\\n\\n    _this.retriggerError_ = function (event) {\\n      if (event.type === \\'error\\') {\\n        /* initialize errros for ref https://cdn.dashjs.org/latest/jsdoc/core_errors_Errors.js.html\\n          map to general init error\\n        */\\n        if (event.error.code >= 10 && event.error.code <= 35) {\\n          _this.player.error({\\n            code: 4,\\n            dashjsErrorCode: event.error.code,\\n            message: event.error.message\\n          });\\n        } else if (event.error.code < 10) {\\n          // network errors\\n          _this.player.error({\\n            code: event.error.code,\\n            dashjsErrorCode: event.error.code,\\n            message: event.error.message\\n          });\\n        } else if (event.error.code >= 100 && event.error.code <= 114) {\\n          // Protection Errors  https://cdn.dashjs.org/latest/jsdoc/streaming_protection_errors_ProtectionErrors.js.html\\n          _this.player.error({\\n            code: 5,\\n            dashjsErrorCode: event.error.code,\\n            message: event.error.message\\n          });\\n        } else {\\n          _this.player.error({\\n            code: event.error.code,\\n            message: event.error.message\\n          });\\n        }\\n      } // only reset the dash player in 10ms async, so that the rest of the\\n      // calling function finishes\\n\\n\\n      setTimeout(function () {\\n        _this.mediaPlayer_.reset();\\n      }, 10);\\n    };\\n\\n    _this.mediaPlayer_.on(_dashjs.default.MediaPlayer.events.ERROR, _this.retriggerError_);\\n\\n    _this.getDuration_ = function (event) {\\n      var periods = event.data.Period_asArray;\\n      var oldHasFiniteDuration = _this.hasFiniteDuration_;\\n\\n      if (event.data.mediaPresentationDuration || periods[periods.length - 1].duration) {\\n        _this.hasFiniteDuration_ = true;\\n      } else {\\n        // in case we run into a weird situation where we\\'re VOD but then\\n        // switch to live\\n        _this.hasFiniteDuration_ = false;\\n      }\\n\\n      if (_this.hasFiniteDuration_ !== oldHasFiniteDuration) {\\n        _this.player.trigger(\\'durationchange\\');\\n      }\\n    };\\n\\n    _this.mediaPlayer_.on(_dashjs.default.MediaPlayer.events.MANIFEST_LOADED, _this.getDuration_); // Apply all dash options that are set\\n\\n\\n    if (options.dash) {\\n      Object.keys(options.dash).forEach(function (key) {\\n        var _this$mediaPlayer_;\\n\\n        var dashOptionsKey = \\'set\\' + key.charAt(0).toUpperCase() + key.slice(1);\\n        var value = options.dash[key]; // eslint-disable-next-line no-prototype-builtins\\n\\n        if (_this.mediaPlayer_.hasOwnProperty(dashOptionsKey)) {\\n          // Providing a key without `set` prefix is now deprecated.\\n          _video.default.log.warn(\\'Using dash options in videojs-contrib-dash without the set prefix \\' + \"has been deprecated. Change \\'\".concat(key, \"\\' to \\'\").concat(dashOptionsKey, \"\\'\")); // Set key so it will still work\\n\\n\\n          key = dashOptionsKey;\\n        } // eslint-disable-next-line no-prototype-builtins\\n\\n\\n        if (!_this.mediaPlayer_.hasOwnProperty(key)) {\\n          _video.default.log.warn(\"Warning: dash configuration option unrecognized: \".concat(key));\\n\\n          return;\\n        } // Guarantee `value` is an array\\n\\n\\n        if (!Array.isArray(value)) {\\n          value = [value];\\n        }\\n\\n        (_this$mediaPlayer_ = _this.mediaPlayer_)[key].apply(_this$mediaPlayer_, _toConsumableArray(value));\\n      });\\n    }\\n\\n    _this.mediaPlayer_.attachView(_this.el_); // Dash.js autoplays by default, video.js will handle autoplay\\n\\n\\n    _this.mediaPlayer_.setAutoPlay(false); // Setup audio tracks\\n    // eslint-disable-next-line no-useless-call\\n\\n\\n    _setupAudioTracks.default.call(null, _this.player, tech); // Setup text tracks\\n    // eslint-disable-next-line no-useless-call\\n\\n\\n    _setupTextTracks.default.call(null, _this.player, tech, options); // Attach the source with any protection data\\n\\n\\n    _this.mediaPlayer_.setProtectionData(_this.keySystemOptions_);\\n\\n    _this.mediaPlayer_.attachSource(manifestSource);\\n\\n    _this.tech_.triggerReady(); // map videojs seek\\n\\n\\n    _this.on(_this.tech_, \\'seeking\\', function () {\\n      // handle seek the same way as in dash.js\\n      _this.mediaPlayer_.seek((_this.tech_.currentTime() - 8).toFixed(2));\\n    });\\n\\n    return _this;\\n  }\\n  /*\\n   * Iterate over the `keySystemOptions` array and convert each object into\\n   * the type of object Dash.js expects in the `protData` argument.\\n   *\\n   * Also rename \\'licenseUrl\\' property in the options to an \\'serverURL\\' property\\n   */\\n\\n\\n  _createClass(Html5DashJS, [{\\n    key: \"dispose\",\\n    value: function dispose() {\\n      if (this.mediaPlayer_) {\\n        this.mediaPlayer_.off(_dashjs.default.MediaPlayer.events.ERROR, this.retriggerError_);\\n        this.mediaPlayer_.off(_dashjs.default.MediaPlayer.events.MANIFEST_LOADED, this.getDuration_);\\n        this.mediaPlayer_.reset();\\n      }\\n\\n      if (this.player.dash) {\\n        delete this.player.dash;\\n      }\\n    }\\n  }, {\\n    key: \"duration\",\\n    value: function duration() {\\n      if (this.mediaPlayer_.isDynamic() && !this.hasFiniteDuration_) {\\n        return Infinity;\\n      }\\n\\n      return this.mediaPlayer_.duration();\\n    }\\n    /**\\n     * Get a list of hooks for a specific lifecycle\\n     *\\n     * @param {string} type the lifecycle to get hooks from\\n     * @param {Function=|Function[]=} hook Optionally add a hook tothe lifecycle\\n     * @return {Array} an array of hooks or epty if none\\n     * @method hooks\\n     */\\n\\n  }], [{\\n    key: \"buildDashJSProtData\",\\n    value: function buildDashJSProtData(keySystemOptions) {\\n      var output = {};\\n\\n      if (!keySystemOptions || !Array.isArray(keySystemOptions)) {\\n        return null;\\n      }\\n\\n      for (var i = 0; i < keySystemOptions.length; i++) {\\n        var keySystem = keySystemOptions[i];\\n\\n        var options = _video.default.mergeOptions({}, keySystem.options);\\n\\n        if (options.licenseUrl) {\\n          options.serverURL = options.licenseUrl;\\n          delete options.licenseUrl;\\n        }\\n\\n        output[keySystem.name] = options;\\n      }\\n\\n      return output;\\n    }\\n  }, {\\n    key: \"hooks\",\\n    value: function hooks(type, hook) {\\n      Html5DashJS.hooks_[type] = Html5DashJS.hooks_[type] || [];\\n\\n      if (hook) {\\n        Html5DashJS.hooks_[type] = Html5DashJS.hooks_[type].concat(hook);\\n      }\\n\\n      return Html5DashJS.hooks_[type];\\n    }\\n    /**\\n     * Add a function hook to a specific dash lifecycle\\n     *\\n     * @param {string} type the lifecycle to hook the function to\\n     * @param {Function|Function[]} hook the function or array of functions to attach\\n     * @method hook\\n     */\\n\\n  }, {\\n    key: \"hook\",\\n    value: function hook(type, _hook) {\\n      Html5DashJS.hooks(type, _hook);\\n    }\\n    /**\\n     * Remove a hook from a specific dash lifecycle.\\n     *\\n     * @param {string} type the lifecycle that the function hooked to\\n     * @param {Function} hook The hooked function to remove\\n     * @return {boolean} True if the function was removed, false if not found\\n     * @method removeHook\\n     */\\n\\n  }, {\\n    key: \"removeHook\",\\n    value: function removeHook(type, hook) {\\n      var index = Html5DashJS.hooks(type).indexOf(hook);\\n\\n      if (index === -1) {\\n        return false;\\n      }\\n\\n      Html5DashJS.hooks_[type] = Html5DashJS.hooks_[type].slice();\\n      Html5DashJS.hooks_[type].splice(index, 1);\\n      return true;\\n    }\\n  }]);\\n\\n  return Html5DashJS;\\n}(Component);\\n\\nHtml5DashJS.hooks_ = {};\\n\\nvar canHandleKeySystems = function canHandleKeySystems(source) {\\n  // copy the source\\n  source = JSON.parse(JSON.stringify(source));\\n\\n  if (Html5DashJS.updateSourceData) {\\n    _video.default.log.warn(\\'updateSourceData has been deprecated.\\' + \\' Please switch to using hook(\"updatesource\", callback).\\');\\n\\n    source = Html5DashJS.updateSourceData(source);\\n  } // call updatesource hooks\\n\\n\\n  Html5DashJS.hooks(\\'updatesource\\').forEach(function (hook) {\\n    source = hook(source);\\n  });\\n\\n  var videoEl = _document.default.createElement(\\'video\\');\\n\\n  if (source.keySystemOptions && !(_window.default.navigator.requestMediaKeySystemAccess || // IE11 Win 8.1\\n  videoEl.msSetMediaKeys)) {\\n    return false;\\n  }\\n\\n  return true;\\n};\\n\\n_video.default.DashSourceHandler = function () {\\n  return {\\n    canHandleSource: function canHandleSource(source) {\\n      var dashExtRE = /\\\\.mpd/i;\\n\\n      if (!canHandleKeySystems(source)) {\\n        return \\'\\';\\n      }\\n\\n      if (_video.default.DashSourceHandler.canPlayType(source.type)) {\\n        return \\'probably\\';\\n      } else if (dashExtRE.test(source.src)) {\\n        return \\'maybe\\';\\n      }\\n\\n      return \\'\\';\\n    },\\n    handleSource: function handleSource(source, tech, options) {\\n      return new Html5DashJS(source, tech, options);\\n    },\\n    canPlayType: function canPlayType(type) {\\n      return _video.default.DashSourceHandler.canPlayType(type);\\n    }\\n  };\\n};\\n\\n_video.default.DashSourceHandler.canPlayType = function (type) {\\n  var dashTypeRE = /^application\\\\/dash\\\\+xml/i;\\n\\n  if (dashTypeRE.test(type)) {\\n    return \\'probably\\';\\n  }\\n\\n  return \\'\\';\\n}; // Only add the SourceHandler if the browser supports MediaSourceExtensions\\n\\n\\nif (_window.default.MediaSource) {\\n  // eslint-disable-next-line new-cap\\n  _video.default.getTech(\\'Html5\\').registerSourceHandler(_video.default.DashSourceHandler(), 0);\\n}\\n\\n_video.default.Html5DashJS = Html5DashJS;\\nvar _default = Html5DashJS;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/dash/videojs-dash.js?')},\"./plugins/floating-player/floating-player.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/floating-player/floating-player.scss?\")},\"./plugins/floating-player/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = _default;\\n\\nvar _positioning = __webpack_require__(/*! utils/positioning */ \\\"./utils/positioning.js\\\");\\n\\nvar _slicing = __webpack_require__(/*! utils/slicing */ \\\"./utils/slicing.js\\\");\\n\\nvar _assign = __webpack_require__(/*! utils/assign */ \\\"./utils/assign.js\\\");\\n\\n__webpack_require__(/*! ./floating-player.scss */ \\\"./plugins/floating-player/floating-player.scss\\\");\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nvar defaults = {\\n  fraction: 0.5,\\n  collapsedWidth: 300,\\n  floatTo: 'right'\\n};\\n\\nvar FloatingPlayer = function FloatingPlayer(player) {\\n  var _this = this;\\n\\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n  _classCallCheck(this, FloatingPlayer);\\n\\n  opts = (0, _assign.assign)({}, defaults, opts); // Handle non left-right values.\\n\\n  if (opts.floatTo && opts.floatTo !== 'left' && opts.floatTo !== 'right') {\\n    opts.floatTo = defaults.floatTo;\\n  }\\n\\n  this.player = player;\\n\\n  var _options = (0, _slicing.sliceProperties)(opts, 'fraction');\\n\\n  var _floater = null;\\n  var _floated = false;\\n  var _wrapped = false;\\n\\n  this.init = function () {\\n    registerEventHandlers();\\n  };\\n\\n  var wrapInner = function wrapInner(parent) {\\n    var wrapper = document.createElement('div');\\n    parent.appendChild(wrapper);\\n\\n    while (parent.firstChild !== wrapper) {\\n      wrapper.appendChild(parent.firstChild);\\n    }\\n\\n    return wrapper;\\n  };\\n\\n  var removeWindowEventHandlers = function removeWindowEventHandlers() {\\n    window.removeEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.removeEventListener('load', checkViewportState, false);\\n    window.removeEventListener('scroll', checkViewportState, false);\\n    window.removeEventListener('resize', checkViewportState, false);\\n  };\\n\\n  var addWindowEventHandlers = function addWindowEventHandlers() {\\n    window.addEventListener('DOMContentLoaded', checkViewportState, false);\\n    window.addEventListener('load', checkViewportState, false);\\n    window.addEventListener('scroll', checkViewportState, false);\\n    window.addEventListener('resize', checkViewportState, false);\\n  };\\n\\n  var registerEventHandlers = function registerEventHandlers() {\\n    _this.player.on('play', checkViewportState);\\n\\n    _this.player.on('play', addWindowEventHandlers); // this.player.on('pause', removeWindowEventHandlers);\\n\\n\\n    _this.player.on('dispose', removeWindowEventHandlers);\\n  };\\n\\n  var float = function float() {\\n    var el = _this.player.el();\\n\\n    var elRect = el.getBoundingClientRect();\\n\\n    if (!_wrapped) {\\n      // Create floater element\\n      _floater = wrapInner(el);\\n\\n      _floater.setAttribute('class', 'cld-video-player-floater cld-video-player-floater-bottom-' + opts.floatTo);\\n\\n      _floater.setAttribute('style', ['width: ' + opts.collapsedWidth + 'px;', 'top: ' + elRect.top + 'px;', 'left: ' + elRect.left + 'px;', 'right: ' + (document.documentElement.clientWidth - elRect.right) + 'px;', 'bottom: ' + (document.documentElement.clientHeight - elRect.bottom) + 'px;'].join('')); // Create inner element\\n\\n\\n      var inner = wrapInner(_floater);\\n      inner.setAttribute('class', 'cld-video-player-floater-inner');\\n      inner.setAttribute('style', 'padding-bottom: ' + 100 * elRect.height / elRect.width + '%;');\\n      var close = document.createElement('button');\\n      close.setAttribute('class', 'cld-video-player-floater-close');\\n      close.innerHTML = '<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"12\\\" height=\\\"12\\\" viewBox=\\\"0 0 12 12\\\"><polygon fill-rule=\\\"evenodd\\\" points=\\\"370 7.41 368.59 6 364 10.59 359.41 6 358 7.41 362.59 12 358 16.59 359.41 18 364 13.41 368.59 18 370 16.59 365.41 12\\\" transform=\\\"translate(-358 -6)\\\"/></svg>';\\n\\n      close.onclick = function () {\\n        unfloat();\\n        disable();\\n      };\\n\\n      _floater.appendChild(close);\\n\\n      _wrapped = true;\\n    }\\n\\n    setTimeout(function () {\\n      _floater.classList.add('cld-video-player-floating');\\n    });\\n    _floated = true;\\n  };\\n\\n  var unfloat = function unfloat() {\\n    _floater.classList.remove('cld-video-player-floating');\\n\\n    _floated = false;\\n  };\\n\\n  var disable = function disable() {\\n    removeWindowEventHandlers();\\n\\n    _this.player.off('play', checkViewportState);\\n\\n    _this.player.off('play', addWindowEventHandlers);\\n  };\\n\\n  var checkViewportState = function checkViewportState() {\\n    var visible = (0, _positioning.isElementInViewport)(_this.player.el(), {\\n      fraction: _options.fraction\\n    });\\n\\n    if (visible) {\\n      if (_floated) {\\n        unfloat();\\n      }\\n    } else if (!_floated) {\\n      float();\\n    }\\n  };\\n};\\n\\nfunction _default() {\\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\\n  new FloatingPlayer(this, opts).init();\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/floating-player/index.js?\")},\"./plugins/ima/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\n/* eslint-disable */\\n\\n/**\\n * Copyright 2014 Google Inc.\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n *     http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n *\\n * IMA SDK integration plugin for Video.js. For more information see\\n * https://www.github.com/googleads/videojs-ima\\n */\\n(function (factory) {\\n  if (true) {\\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"), __webpack_require__(/*! videojs-contrib-ads */ \\\"../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js\\\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (videojs) {\\n      factory(window, document, videojs.default || videojs);\\n    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\\n\\t\\t\\t\\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n  } else { var vjs; }\\n})(function (window, document, videojs) {\\n  \\\"use strict\\\";\\n\\n  var extend = function extend(obj) {\\n    var arg;\\n    var index;\\n    var key;\\n\\n    for (index = 1; index < arguments.length; index++) {\\n      arg = arguments[index];\\n\\n      for (key in arg) {\\n        if (arg.hasOwnProperty(key)) {\\n          obj[key] = arg[key];\\n        }\\n      }\\n    }\\n\\n    return obj;\\n  };\\n\\n  var ima_defaults = {\\n    debug: false,\\n    timeout: 5000,\\n    prerollTimeout: 100,\\n    adLabel: 'Advertisement',\\n    showControlsForAds: true,\\n    showControlsForJSAds: true,\\n    adsRenderingSettings: {\\n      uiElements: []\\n    }\\n  };\\n  var eventTypes = videojs.browser.IS_ANDROID || videojs.browser.IS_IOS ? {\\n    click: 'touchend',\\n    mousedown: 'touchstart',\\n    mouseup: 'touchend',\\n    mousemove: 'touchmove'\\n  } : {\\n    click: 'click',\\n    mousedown: 'mousedown',\\n    mouseup: 'mouseup',\\n    mousemove: 'mousemove'\\n  };\\n\\n  var init = function init(options, readyCallback) {\\n    this.ima = new ImaPlugin(this, options, readyCallback);\\n  };\\n\\n  var ImaPlugin = function ImaPlugin(player, options, readyCallback) {\\n    this.player = player;\\n    /**\\n     * Assigns the unique id and class names to the given element as well as the style class\\n     * @param element\\n     * @param controlName\\n     * @private\\n     */\\n\\n    var assignControlAttributes_ = function (element, controlName) {\\n      element.id = this.controlPrefix + controlName;\\n      element.className = this.controlPrefix + controlName + ' ' + controlName;\\n    }.bind(this);\\n    /**\\n     * Returns a regular expression to test a string for the given className\\n     * @param className\\n     * @returns {RegExp}\\n     * @private\\n     */\\n\\n\\n    var getClassRegexp_ = function getClassRegexp_(className) {\\n      // Matches on\\n      // (beginning of string OR NOT word char)\\n      // classname\\n      // (negative lookahead word char OR end of string)\\n      return new RegExp('(^|[^A-Za-z-])' + className + '((?![A-Za-z-])|$)', 'gi');\\n    };\\n    /**\\n     * Adds a class to the given element if it doesn't already have the class\\n     * @param element\\n     * @param classToAdd\\n     * @private\\n     */\\n\\n\\n    var addClass_ = function addClass_(element, classToAdd) {\\n      if (getClassRegexp_(classToAdd).test(element.className)) {\\n        return element;\\n      }\\n\\n      return element.className = element.className.trim() + ' ' + classToAdd;\\n    };\\n    /**\\n     * Removes a class from the given element if it has the given class\\n     * @param element\\n     * @param classToRemove\\n     * @private\\n     */\\n\\n\\n    var removeClass_ = function removeClass_(element, classToRemove) {\\n      var classRegexp = getClassRegexp_(classToRemove);\\n\\n      if (!classRegexp.test(element.className)) {\\n        return element;\\n      }\\n\\n      return element.className = element.className.trim().replace(classRegexp, '');\\n    };\\n    /**\\n     * Creates the ad container passed to the IMA SDK.\\n     * @private\\n     */\\n\\n\\n    var createAdContainer_ = function () {\\n      // The adContainerDiv is the DOM of the element that will house\\n      // the ads and ad controls.\\n      this.vjsControls = this.player.getChild('controlBar');\\n      this.adContainerDiv = this.vjsControls.el().parentNode.appendChild(document.createElement('div'));\\n      assignControlAttributes_(this.adContainerDiv, 'ima-ad-container');\\n      this.adContainerDiv.style.position = \\\"absolute\\\";\\n      this.adContainerDiv.addEventListener('mouseenter', showAdControls_, false);\\n      this.adContainerDiv.addEventListener('mouseleave', hideAdControls_, false);\\n      createControls_();\\n      this.adDisplayContainer = new google.ima.AdDisplayContainer(this.adContainerDiv, this.contentPlayer);\\n      this.showAdContainer(!this.settings.manual);\\n    }.bind(this);\\n    /**\\n     * Creates the controls for the ad.\\n     * @private\\n     */\\n\\n\\n    var createControls_ = function () {\\n      this.controlsDiv = document.createElement('div');\\n      assignControlAttributes_(this.controlsDiv, 'ima-controls-div');\\n      this.controlsDiv.style.width = '100%';\\n      this.countdownDiv = document.createElement('div');\\n      assignControlAttributes_(this.countdownDiv, 'ima-countdown-div');\\n      this.countdownDiv.innerHTML = this.settings.adLabel;\\n      this.countdownDiv.style.display = this.showCountdown ? '' : 'none';\\n      this.seekBarDiv = document.createElement('div');\\n      assignControlAttributes_(this.seekBarDiv, 'ima-seek-bar-div');\\n      this.seekBarDiv.style.width = '100%';\\n      this.progressDiv = document.createElement('div');\\n      assignControlAttributes_(this.progressDiv, 'ima-progress-div');\\n      this.playPauseDiv = document.createElement('div');\\n      assignControlAttributes_(this.playPauseDiv, 'ima-play-pause-div');\\n      addClass_(this.playPauseDiv, 'ima-playing');\\n      this.playPauseDiv.addEventListener(eventTypes.click, onAdPlayPauseClick_, false);\\n      this.muteDiv = document.createElement('div');\\n      assignControlAttributes_(this.muteDiv, 'ima-mute-div');\\n      addClass_(this.muteDiv, 'ima-non-muted');\\n      this.muteDiv.addEventListener(eventTypes.click, onAdMuteClick_, false);\\n      this.sliderDiv = document.createElement('div');\\n      assignControlAttributes_(this.sliderDiv, 'ima-slider-div');\\n      this.sliderDiv.addEventListener(eventTypes.mousedown, onAdVolumeSliderMouseDown_, false);\\n      this.sliderLevelDiv = document.createElement('div');\\n      assignControlAttributes_(this.sliderLevelDiv, 'ima-slider-level-div');\\n      this.fullscreenDiv = document.createElement('div');\\n      assignControlAttributes_(this.fullscreenDiv, 'ima-fullscreen-div');\\n      addClass_(this.fullscreenDiv, 'ima-non-fullscreen');\\n      this.fullscreenDiv.addEventListener(eventTypes.click, onAdFullscreenClick_, false);\\n      this.adContainerDiv.appendChild(this.controlsDiv);\\n      this.controlsDiv.appendChild(this.seekBarDiv);\\n      this.controlsDiv.appendChild(this.playPauseDiv);\\n      this.controlsDiv.appendChild(this.muteDiv);\\n      this.controlsDiv.appendChild(this.sliderDiv);\\n      this.controlsDiv.appendChild(this.fullscreenDiv);\\n      this.seekBarDiv.appendChild(this.progressDiv);\\n      this.sliderDiv.appendChild(this.sliderLevelDiv);\\n\\n      if (this.settings.vjsControls) {\\n        this.initVjsControls();\\n        this.controlsDiv.style.display = 'none';\\n        this.vjsControls.el().appendChild(this.countdownDiv);\\n      } else {\\n        this.controlsDiv.appendChild(this.countdownDiv);\\n      }\\n    }.bind(this);\\n\\n    this.showAdContainer = function (show) {\\n      this.adContainerDiv.style.display = show ? 'block' : 'none';\\n      this.player.toggleClass('vjs-ima-ad', show);\\n    }.bind(this);\\n    /**\\n     * Initializes the AdDisplayContainer. On mobile, this must be done as a\\n     * result of user action.\\n     */\\n\\n\\n    this.initializeAdDisplayContainer = function () {\\n      this.adDisplayContainerInitialized = true;\\n      this.adDisplayContainer.initialize();\\n    }.bind(this);\\n    /**\\n     * Creates the AdsRequest and request ads through the AdsLoader.\\n     */\\n\\n\\n    this.requestAds = function () {\\n      if (!this.adDisplayContainerInitialized) {\\n        this.adDisplayContainer.initialize();\\n      }\\n\\n      var adsRequest = new google.ima.AdsRequest();\\n\\n      if (this.settings.adTagUrl) {\\n        adsRequest.adTagUrl = this.settings.adTagUrl;\\n      } else {\\n        adsRequest.adsResponse = this.settings.adsResponse;\\n      }\\n\\n      if (this.settings.forceNonLinearFullSlot) {\\n        adsRequest.forceNonLinearFullSlot = true;\\n      }\\n\\n      adsRequest.linearAdSlotWidth = this.getPlayerWidth();\\n      adsRequest.linearAdSlotHeight = this.getPlayerHeight();\\n      adsRequest.nonLinearAdSlotWidth = this.settings.nonLinearWidth || this.getPlayerWidth();\\n      adsRequest.nonLinearAdSlotHeight = this.settings.nonLinearHeight || this.getPlayerHeight() / 3;\\n      adsRequest.vastLoadTimeout = Math.max(this.settings.prerollTimeout, this.settings.postrollTimeout);\\n      this.adsLoader.requestAds(adsRequest);\\n    }.bind(this);\\n    /**\\n     * Listener for the ADS_MANAGER_LOADED event. Creates the AdsManager,\\n     * sets up event listeners, and triggers the 'adsready' event for\\n     * videojs-ads-contrib.\\n     * @private\\n     */\\n\\n\\n    var onAdsManagerLoaded_ = function (adsManagerLoadedEvent) {\\n      this.adsManager = adsManagerLoadedEvent.getAdsManager(this.contentPlayheadTracker, this.adsRenderingSettings);\\n      this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, onAdError_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY, onAdBreakReady_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED, onAllAdsCompleted_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED, onAdLoaded_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED, onAdStarted_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK, onAdPlayPauseClick_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE, this.onAdComplete_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED, this.onAdComplete_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED, this.onAdPaused_);\\n      this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED, this.onAdResumed_);\\n      var eventsMap = {\\n        'load': google.ima.AdEvent.Type.LOADED,\\n        'ad-started': google.ima.AdEvent.Type.STARTED,\\n        'click': google.ima.AdEvent.Type.CLICK,\\n        'ad-ended': google.ima.AdEvent.Type.COMPLETE,\\n        'ad-skipped': google.ima.AdEvent.Type.SKIPPED,\\n        'first-quartile': google.ima.AdEvent.Type.FIRST_QUARTILE,\\n        'midpoint': google.ima.AdEvent.Type.MIDPOINT,\\n        'third-quartile': google.ima.AdEvent.Type.THIRD_QUARTILE,\\n        'impression': google.ima.AdEvent.Type.IMPRESSION,\\n        'pause': google.ima.AdEvent.Type.PAUSED,\\n        'play': google.ima.AdEvent.Type.RESUMED,\\n        'mute': google.ima.AdEvent.Type.VOLUME_MUTED,\\n        'allpods-completed': google.ima.AdEvent.Type.ALL_ADS_COMPLETED\\n      };\\n      Object.keys(eventsMap).forEach(function (event) {\\n        this.adsManager.addEventListener(eventsMap[event], function () {\\n          this.player.trigger('ads-' + event);\\n        }.bind(this));\\n      }.bind(this));\\n      setAdMuted(this.player.muted());\\n\\n      if (!this.autoPlayAdBreaks) {\\n        try {\\n          var initWidth = this.getPlayerWidth();\\n          var initHeight = this.getPlayerHeight();\\n          this.adsManagerDimensions.width = initWidth;\\n          this.adsManagerDimensions.height = initHeight;\\n          this.adsManager.init(initWidth, initHeight, google.ima.ViewMode.NORMAL);\\n          this.adsManager.setVolume(this.player.muted() ? 0 : this.player.volume());\\n        } catch (adError) {\\n          onAdError_(adError);\\n        }\\n      }\\n\\n      var cuepoints = this.adsManager.getCuePoints();\\n      var foundpreroll = !cuepoints.length; // no playlist, just preroll\\n\\n      var foundpostroll = false;\\n      ;\\n      cuepoints.forEach(function (offset) {\\n        if (!offset) foundpreroll = true;else if (offset == -1) foundpostroll = true;\\n      });\\n      if (!foundpreroll) this.player.trigger('nopreroll');\\n      if (!foundpostroll) this.player.trigger('nopostroll');\\n      if (cuepoints.length) this.player.trigger('ads-cuepoints', cuepoints);\\n      this.player.trigger('adsready');\\n    }.bind(this);\\n    /**\\n     * DEPRECATED: Use startFromReadyCallback\\n     * Start ad playback, or content video playback in the absence of a\\n     * pre-roll.\\n     */\\n\\n\\n    this.start = function () {\\n      window.console.log('WARNING: player.ima.start is deprecated. Use ' + 'player.ima.startFromReadyCallback instead.');\\n    };\\n    /**\\n     * Start ad playback, or content video playback in the absence of a\\n     * pre-roll. **NOTE**: This method only needs to be called if you provide\\n     * your own readyCallback as the second parameter to player.ima(). If you\\n     * only provide options and do not provide your own readyCallback,\\n     * **DO NOT** call this method. If you do provide your own readyCallback,\\n     * you should call this method in the last line of that callback. For more\\n     * info, see this method's usage in our advanced and playlist examples.\\n     */\\n\\n\\n    this.startFromReadyCallback = function () {\\n      if (this.autoPlayAdBreaks && this.adsManager) {\\n        try {\\n          this.adsManager.init(this.getPlayerWidth(), this.getPlayerHeight(), google.ima.ViewMode.NORMAL);\\n          this.adsManager.setVolume(this.player.muted() ? 0 : this.player.volume());\\n          this.adsManager.start();\\n        } catch (adError) {\\n          onAdError_(adError);\\n        }\\n      }\\n    }.bind(this);\\n    /**\\n     * Listener for errors fired by the AdsLoader.\\n     * @param {google.ima.AdErrorEvent} event The error event thrown by the\\n     *     AdsLoader. See\\n     *     https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdError.Type\\n     * @private\\n     */\\n\\n\\n    var onAdsLoaderError_ = function (event) {\\n      console.log('AdsLoader error: ' + event.getError());\\n      this.showAdContainer(false);\\n\\n      if (this.adsManager) {\\n        this.adsManager.destroy();\\n      }\\n\\n      this.player.trigger({\\n        type: 'adserror',\\n        data: {\\n          AdError: event.getError(),\\n          AdErrorEvent: event\\n        }\\n      });\\n    }.bind(this);\\n    /**\\n     * Listener for errors thrown by the AdsManager.\\n     * @param {google.ima.AdErrorEvent} adErrorEvent The error event thrown by\\n     *     the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdError_ = function (adErrorEvent) {\\n      var errorMessage = adErrorEvent.getError !== undefined ? adErrorEvent.getError() : adErrorEvent.stack;\\n      console.log('Ad error: ' + errorMessage);\\n      this.adsActive = false;\\n      this.adPlaying = false;\\n      this.restoreLoop();\\n      this.vjsControls.show();\\n      this.adsManager.destroy();\\n      this.showAdContainer(false);\\n      this.updateVjsControls();\\n      this.player.trigger({\\n        type: 'adserror',\\n        data: {\\n          AdError: errorMessage,\\n          AdErrorEvent: adErrorEvent\\n        }\\n      });\\n    }.bind(this);\\n    /**\\n     * Listener for AD_BREAK_READY. Passes event on to publisher's listener.\\n     * @param {google.ima.AdEvent} adEvent AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdBreakReady_ = function (adEvent) {\\n      this.adBreakReadyListener(adEvent);\\n    }.bind(this);\\n    /**\\n     * Called by publishers in manual ad break playback mode to start an ad\\n     * break.\\n     */\\n\\n\\n    this.playAdBreak = function () {\\n      if (!this.autoPlayAdBreaks) {\\n        this.adsManager.start();\\n      }\\n    }.bind(this);\\n\\n    this.resetLoop = function () {\\n      this.contentLoop = this.contentPlayer && this.contentPlayer.loop;\\n\\n      if (this.contentLoop) {\\n        this.contentPlayer.loop = false;\\n      }\\n    }.bind(this);\\n\\n    this.restoreLoop = function () {\\n      if (this.contentLoop) {\\n        this.contentPlayer.loop = true;\\n        this.contentLoop = false;\\n      }\\n    }.bind(this);\\n    /**\\n     * Pauses the content video and displays the ad container so ads can play.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    this.onContentPauseRequested_ = function (adEvent) {\\n      this.contentSource = this.player.currentSrc();\\n      this.resetLoop();\\n      this.player.off('contentended', this.localContentEndedListener);\\n      this.player.ads.startLinearAdMode();\\n      this.showAdContainer(true);\\n      var contentType = adEvent.getAd().getContentType();\\n\\n      if (!this.settings.vjsControls || !this.settings.showControlsForAds) {\\n        if (!this.settings.showControlsForAds || contentType === 'application/javascript' && !this.settings.showControlsForJSAds) {\\n          this.controlsDiv.style.display = 'none';\\n        } else {\\n          this.controlsDiv.style.display = 'block';\\n        }\\n\\n        this.vjsControls.hide();\\n      }\\n\\n      showPlayButton();\\n      this.player.pause();\\n      this.adsActive = true;\\n      this.adPlaying = true;\\n      this.updateVjsControls();\\n    }.bind(this);\\n    /**\\n     * Resumes content video and hides the ad container.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    this.onContentResumeRequested_ = function (adEvent) {\\n      this.contentResumeTimer = clearTimeout(this.contentResumeTimer);\\n      this.restoreLoop();\\n      this.adsActive = false;\\n      this.adPlaying = false;\\n      this.player.on('contentended', this.localContentEndedListener);\\n\\n      if (this.currentAd == null || // hide for post-roll only playlist\\n      this.currentAd.isLinear()) {\\n        // don't hide for non-linear ads\\n        this.showAdContainer(false);\\n      }\\n\\n      this.vjsControls.show();\\n      this.player.ads.endLinearAdMode();\\n      this.countdownDiv.innerHTML = '';\\n      this.updateVjsControls();\\n    }.bind(this);\\n    /**\\n     * Records that ads have completed and calls contentAndAdsEndedListeners\\n     * if content is also complete.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAllAdsCompleted_ = function (adEvent) {\\n      this.allAdsCompleted = true;\\n      this.showAdContainer(false);\\n\\n      if (this.contentComplete == true) {\\n        if (this.contentPlayer.src && !/^blob:/.test(this.contentPlayer.src) && this.contentSource && this.contentPlayer.src != this.contentSource) {\\n          this.player.src(this.contentSource);\\n        }\\n\\n        this.player.trigger('');\\n\\n        for (var index in this.contentAndAdsEndedListeners) {\\n          this.contentAndAdsEndedListeners[index]();\\n        }\\n      }\\n    }.bind(this);\\n    /**\\n     * Starts the content video when a non-linear ad is loaded.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdLoaded_ = function (adEvent) {\\n      if (!adEvent.getAd().isLinear() && !this.player.ended()) {\\n        this.player.ads.endLinearAdMode();\\n        this.player.play();\\n      }\\n    }.bind(this);\\n    /**\\n     * Starts the interval timer to check the current ad time when an ad starts\\n     * playing.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    var onAdStarted_ = function (adEvent) {\\n      this.currentAd = adEvent.getAd();\\n\\n      if (this.currentAd.isLinear()) {\\n        this.adTrackingTimer = setInterval(onAdPlayheadTrackerInterval_, 250); // Don't bump container when controls are shown\\n\\n        removeClass_(this.adContainerDiv, 'bumpable-ima-ad-container');\\n      } else {\\n        // Bump container when controls are shown\\n        addClass_(this.adContainerDiv, 'bumpable-ima-ad-container');\\n        this.player.addClass('vjs-ima-non-linear');\\n        this.showAdContainer(true);\\n      }\\n    }.bind(this);\\n    /**\\n     * Clears the interval timer for current ad time when an ad completes.\\n     * @param {google.ima.AdEvent} adEvent The AdEvent thrown by the AdsManager.\\n     * @private\\n     */\\n\\n\\n    this.onAdComplete_ = function (adEvent) {\\n      if (this.currentAd.isLinear()) {\\n        clearInterval(this.adTrackingTimer);\\n        var pod = this.currentAd.getAdPodInfo();\\n\\n        if (pod && pod.getAdPosition() < pod.getTotalAds()) {\\n          this.player.trigger('ads-pod-ended');\\n          return;\\n        } // this is the final ad so we excpect ima sdk to trigger\\n        // CONTENT_RESUME_REQUESTED, but for some reason it isn't triggered\\n        // reliably on iOS, so we fake it\\n\\n\\n        this.contentResumeTimer = setTimeout(function () {\\n          this.onContentResumeRequested_(null);\\n        }.bind(this), 1000);\\n      } else {\\n        this.player.removeClass('vjs-ima-non-linear');\\n      }\\n    }.bind(this);\\n\\n    this.onAdPaused_ = function (adEvent) {\\n      showPauseButton();\\n      this.adPlaying = false;\\n    }.bind(this);\\n\\n    this.onAdResumed_ = function (adEvent) {\\n      showPlayButton();\\n      this.adPlaying = true;\\n    }.bind(this);\\n\\n    var formatTime = function formatTime(time) {\\n      var m = Math.floor(time / 60);\\n      var s = Math.floor(time % 60);\\n\\n      if (s.toString().length < 2) {\\n        s = '0' + s;\\n      }\\n\\n      return m + ':' + s;\\n    };\\n    /**\\n     * Gets the current time and duration of the ad and calls the method to\\n     * update the ad UI.\\n     * @private\\n     */\\n\\n\\n    var onAdPlayheadTrackerInterval_ = function () {\\n      var remainingTime = this.adsManager.getRemainingTime();\\n      var duration = this.currentAd.getDuration();\\n      var currentTime = duration - remainingTime;\\n      currentTime = currentTime > 0 ? currentTime : 0;\\n      var isPod = false;\\n      var totalAds = 0;\\n      var adPosition;\\n\\n      if (this.currentAd.getAdPodInfo()) {\\n        isPod = true;\\n        adPosition = this.currentAd.getAdPodInfo().getAdPosition();\\n        totalAds = this.currentAd.getAdPodInfo().getTotalAds();\\n      } // Update countdown timer data\\n\\n\\n      var podCount = ': ';\\n\\n      if (isPod && totalAds > 1) {\\n        podCount = ' (' + adPosition + ' of ' + totalAds + '): ';\\n      }\\n\\n      this.countdownDiv.innerHTML = this.settings.adLabel + podCount + formatTime(remainingTime); // Update UI\\n\\n      var playProgressRatio = currentTime / duration;\\n      var playProgressPercent = playProgressRatio * 100;\\n      this.progressDiv.style.width = playProgressPercent + '%';\\n      this.updateVjsControls();\\n    }.bind(this);\\n\\n    this.getPlayerWidth = function () {\\n      var retVal = parseInt(getComputedStyle(this.player.el()).width, 10) || this.player.width();\\n      return retVal;\\n    }.bind(this);\\n\\n    this.getPlayerHeight = function () {\\n      var retVal = parseInt(getComputedStyle(this.player.el()).height, 10) || this.player.height();\\n      return retVal;\\n    }.bind(this);\\n    /**\\n     * Hides the ad controls on mouseout.\\n     * @private\\n     */\\n\\n\\n    var hideAdControls_ = function () {\\n      this.controlsDiv.style.height = '14px';\\n      this.playPauseDiv.style.display = 'none';\\n      this.muteDiv.style.display = 'none';\\n      this.sliderDiv.style.display = 'none';\\n      this.fullscreenDiv.style.display = 'none';\\n    }.bind(this);\\n    /**\\n     * Shows ad controls on mouseover.\\n     * @private\\n     */\\n\\n\\n    var showAdControls_ = function () {\\n      this.controlsDiv.style.height = '37px';\\n      this.playPauseDiv.style.display = 'block';\\n      this.muteDiv.style.display = 'block';\\n      this.sliderDiv.style.display = 'block';\\n      this.fullscreenDiv.style.display = 'block';\\n    }.bind(this);\\n    /**\\n     * Show pause and hide play button\\n     */\\n\\n\\n    var showPauseButton = function () {\\n      addClass_(this.playPauseDiv, 'ima-paused');\\n      removeClass_(this.playPauseDiv, 'ima-playing');\\n    }.bind(this);\\n    /**\\n     * Show play and hide pause button\\n     */\\n\\n\\n    var showPlayButton = function () {\\n      addClass_(this.playPauseDiv, 'ima-playing');\\n      removeClass_(this.playPauseDiv, 'ima-paused');\\n    }.bind(this);\\n    /**\\n     * Listener for clicks on the play/pause button during ad playback.\\n     * @private\\n     */\\n\\n\\n    var onAdPlayPauseClick_ = function () {\\n      if (this.adPlaying) {\\n        showPauseButton();\\n        this.adsManager.pause();\\n        this.adPlaying = false;\\n      } else {\\n        showPlayButton();\\n        this.adsManager.resume();\\n        this.adPlaying = true;\\n      }\\n    }.bind(this);\\n    /**\\n     * Listener for clicks on the mute button during ad playback.\\n     * @private\\n     */\\n\\n\\n    var onAdMuteClick_ = function () {\\n      setAdMuted(!this.adMuted);\\n    }.bind(this);\\n    /* Listener for mouse down events during ad playback. Used for volume.\\n     * @private\\n     */\\n\\n\\n    var onAdVolumeSliderMouseDown_ = function onAdVolumeSliderMouseDown_() {\\n      document.addEventListener(eventTypes.mouseup, onMouseUp_, false);\\n      document.addEventListener(eventTypes.mousemove, onMouseMove_, false);\\n    };\\n    /* Mouse movement listener used for volume slider.\\n     * @private\\n     */\\n\\n\\n    var onMouseMove_ = function onMouseMove_(event) {\\n      setVolumeSlider_(event);\\n    };\\n    /* Mouse release listener used for volume slider.\\n     * @private\\n     */\\n\\n\\n    var onMouseUp_ = function onMouseUp_(event) {\\n      setVolumeSlider_(event);\\n      document.removeEventListener(eventTypes.mousemove, onMouseMove_);\\n      document.removeEventListener(eventTypes.mouseup, onMouseUp_);\\n    };\\n    /* Utility function to set volume and associated UI\\n     * @private\\n     */\\n\\n\\n    var setVolumeSlider_ = function (event) {\\n      var clientX = event.changedTouches ? event.changedTouches[0].clientX : event.clientX;\\n      var percent = (clientX - this.sliderDiv.getBoundingClientRect().left) / this.sliderDiv.offsetWidth;\\n      percent *= 100; //Bounds value 0-100 if mouse is outside slider region.\\n\\n      percent = Math.min(Math.max(percent, 0), 100);\\n      this.sliderLevelDiv.style.width = percent + \\\"%\\\";\\n      this.player.volume(percent / 100); //0-1\\n\\n      this.adsManager.setVolume(percent / 100);\\n\\n      if (this.player.volume() == 0) {\\n        addClass_(this.muteDiv, 'ima-muted');\\n        removeClass_(this.muteDiv, 'ima-non-muted');\\n        this.player.muted(true);\\n        this.adMuted = true;\\n      } else {\\n        addClass_(this.muteDiv, 'ima-non-muted');\\n        removeClass_(this.muteDiv, 'ima-muted');\\n        this.player.muted(false);\\n        this.adMuted = false;\\n      }\\n    }.bind(this);\\n    /**\\n     * Listener for clicks on the fullscreen button during ad playback.\\n     * @private\\n     */\\n\\n\\n    var onAdFullscreenClick_ = function () {\\n      if (this.player.isFullscreen()) {\\n        this.player.exitFullscreen();\\n      } else {\\n        this.player.requestFullscreen();\\n      }\\n    }.bind(this);\\n    /**\\n     * Listens for the video.js player to change its fullscreen status. This\\n     * keeps the fullscreen-ness of the AdContainer in sync with the player.\\n     * @private\\n     */\\n\\n\\n    var onFullscreenChange_ = function () {\\n      if (this.player.isFullscreen()) {\\n        addClass_(this.fullscreenDiv, 'ima-fullscreen');\\n        removeClass_(this.fullscreenDiv, 'ima-non-fullscreen');\\n\\n        if (this.adsManager) {\\n          this.adsManager.resize(window.screen.width, window.screen.height, google.ima.ViewMode.FULLSCREEN);\\n        }\\n      } else {\\n        addClass_(this.fullscreenDiv, 'ima-non-fullscreen');\\n        removeClass_(this.fullscreenDiv, 'ima-fullscreen');\\n\\n        if (this.adsManager) {\\n          this.adsManager.resize(this.getPlayerWidth(), this.getPlayerHeight(), google.ima.ViewMode.NORMAL);\\n        }\\n      }\\n    }.bind(this);\\n    /**\\n     * Listens for the video.js player to change its volume. This keeps the ad\\n     * volume in sync with the content volume if the volume of the player is\\n     * changed while content is playing\\n     * @private\\n     */\\n\\n\\n    var onVolumeChange_ = function () {\\n      var newVolume = this.player.muted() ? 0 : this.player.volume();\\n\\n      if (this.adsManager) {\\n        this.adsManager.setVolume(newVolume);\\n      } // Update UI\\n\\n\\n      if (newVolume == 0) {\\n        this.adMuted = true;\\n        addClass_(this.muteDiv, 'ima-muted');\\n        removeClass_(this.muteDiv, 'ima-non-muted');\\n        this.sliderLevelDiv.style.width = '0%';\\n      } else {\\n        this.adMuted = false;\\n        addClass_(this.muteDiv, 'ima-non-muted');\\n        removeClass_(this.muteDiv, 'ima-muted');\\n        this.sliderLevelDiv.style.width = newVolume * 100 + '%';\\n      }\\n    }.bind(this);\\n    /**\\n     * Seeks content to 00:00:00. This is used as an event handler for the\\n     * loadedmetadata event, since seeking is not possible until that event has\\n     * fired.\\n     * @private\\n     */\\n\\n\\n    var seekContentToZero_ = function () {\\n      this.player.off('loadedmetadata', seekContentToZero_);\\n      this.player.currentTime(0);\\n    }.bind(this);\\n    /**\\n     * Seeks content to 00:00:00 and starts playback. This is used as an event\\n     * handler for the loadedmetadata event, since seeking is not possible until\\n     * that event has fired.\\n     * @private\\n     */\\n\\n\\n    var playContentFromZero_ = function () {\\n      this.player.off('loadedmetadata', playContentFromZero_);\\n      this.player.currentTime(0);\\n      this.player.play();\\n    }.bind(this);\\n    /**\\n     * Destroys the AdsManager, sets it to null, and calls contentComplete to\\n     * reset correlators. Once this is done it requests ads again to keep the\\n     * inventory available.\\n     * @private\\n     */\\n\\n\\n    var resetIMA_ = function () {\\n      this.adsActive = false;\\n      this.adPlaying = false;\\n      this.restoreLoop();\\n      this.player.on('contentended', this.localContentEndedListener);\\n\\n      if (this.currentAd && this.currentAd.isLinear()) {\\n        this.showAdContainer(false);\\n      }\\n\\n      this.vjsControls.show();\\n      this.player.ads.endLinearAdMode();\\n      this.contentPlayheadTracker.currentTime = 0;\\n      this.countdownDiv.innerHTML = '';\\n      this.updateVjsControls();\\n\\n      if (this.adTrackingTimer) {\\n        // If this is called while an ad is playing, stop trying to get that\\n        // ad's current time.\\n        clearInterval(this.adTrackingTimer);\\n      }\\n\\n      if (this.adsManager) {\\n        this.adsManager.destroy();\\n        this.adsManager = null;\\n      }\\n\\n      if (this.adsLoader && !this.contentComplete) {\\n        this.adsLoader.contentComplete();\\n      }\\n\\n      this.contentComplete = false;\\n      this.allAdsCompleted = false;\\n    }.bind(this);\\n    /**\\n     * Ads an EventListener to the AdsManager. For a list of available events,\\n     * see\\n     * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\\n     * @param {google.ima.AdEvent.Type} event The AdEvent.Type for which to listen.\\n     * @param {function} callback The method to call when the event is fired.\\n     */\\n\\n\\n    this.addEventListener = function (event, callback) {\\n      if (this.adsManager) {\\n        this.adsManager.addEventListener(event, callback);\\n      }\\n    }.bind(this);\\n    /**\\n     * Returns the instance of the AdsManager.\\n     * @return {google.ima.AdsManager} The AdsManager being used by the plugin.\\n     */\\n\\n\\n    this.getAdsManager = function () {\\n      return this.adsManager;\\n    }.bind(this);\\n    /**\\n     * DEPRECATED: Use setContentWithAdTag.\\n     * Sets the content of the video player. You should use this method instead\\n     * of setting the content src directly to ensure the proper ad tag is\\n     * requested when the video content is loaded.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?string} adTag The ad tag to be requested when the content loads.\\n     *     Leave blank to use the existing ad tag.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     */\\n\\n\\n    this.setContent = function (contentSrc, adTag, playOnLoad) {\\n      window.console.log('WARNING: player.ima.setContent is deprecated. Use ' + 'player.ima.setContentWithAdTag instead.');\\n      this.setContentWithAdTag(contentSrc, adTag, playOnLoad);\\n    }.bind(this);\\n    /**\\n     * Sets the content of the video player. You should use this method instead\\n     * of setting the content src directly to ensure the proper ad tag is\\n     * requested when the video content is loaded.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?string} adTag The ad tag to be requested when the content loads.\\n     *     Leave blank to use the existing ad tag.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     */\\n\\n\\n    this.setContentWithAdTag = function (contentSrc, adTag, playOnLoad) {\\n      resetIMA_();\\n      this.settings.adTagUrl = adTag ? adTag : this.settings.adTagUrl;\\n      changeSource_(contentSrc, playOnLoad);\\n    }.bind(this);\\n    /**\\n     * Sets the content of the video player. You should use this method instead\\n     * of setting the content src directly to ensure the proper ads response is\\n     * used when the video content is loaded.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?string} adsResponse The ads response to be requested when the\\n     *     content loads. Leave blank to use the existing ads response.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     */\\n\\n\\n    this.setContentWithAdsResponse = function (contentSrc, adsResponse, playOnLoad) {\\n      resetIMA_();\\n      this.settings.adsResponse = adsResponse ? adsResponse : this.settings.adsResponse;\\n      changeSource_(contentSrc, playOnLoad);\\n    }.bind(this);\\n    /**\\n     * Plays an ad immediately\\n     * @param {?string} adTag The ad tag to be requested.\\n     *     Leave blank to use the existing ad tag.\\n     */\\n\\n\\n    this.playAd = function (adTag) {\\n      resetIMA_();\\n      this.settings.adTagUrl = adTag ? adTag : this.settings.adTagUrl; // this.showAdContainer(true);\\n      // this.vjsControls.hide();\\n\\n      this.requestAds();\\n    }.bind(this);\\n    /**\\n     * Changes the player source.\\n     * @param {?string} contentSrc The URI for the content to be played. Leave\\n     *     blank to use the existing content.\\n     * @param {?boolean} playOnLoad True to play the content once it has loaded,\\n     *     false to only load the content but not start playback.\\n     * @private\\n     */\\n\\n\\n    var changeSource_ = function (contentSrc, playOnLoad) {\\n      // Only try to pause the player when initialised with a source already\\n      if (!!this.player.currentSrc()) {\\n        this.player.currentTime(0);\\n        this.player.pause();\\n      }\\n\\n      if (contentSrc) {\\n        this.player.src(contentSrc);\\n      }\\n\\n      if (playOnLoad) {\\n        this.player.on('loadedmetadata', playContentFromZero_);\\n      } else {\\n        this.player.on('loadedmetadata', seekContentToZero_);\\n      }\\n    }.bind(this);\\n\\n    var setAdMuted = function (mute) {\\n      if (mute) {\\n        addClass_(this.muteDiv, 'ima-muted');\\n        removeClass_(this.muteDiv, 'ima-non-muted');\\n        this.adsManager.setVolume(0); // Bubble down to content player\\n\\n        this.player.muted(true);\\n        this.adMuted = true;\\n        this.sliderLevelDiv.style.width = \\\"0%\\\";\\n      } else {\\n        addClass_(this.muteDiv, 'ima-non-muted');\\n        removeClass_(this.muteDiv, 'ima-muted');\\n        this.adsManager.setVolume(this.player.volume()); // Bubble down to content player\\n\\n        this.player.muted(false);\\n        this.adMuted = false;\\n        this.sliderLevelDiv.style.width = this.player.volume() * 100 + \\\"%\\\";\\n      }\\n    }.bind(this);\\n    /**\\n     * Adds a listener for the 'contentended' event of the video player. This should be\\n     * used instead of setting an 'contentended' listener directly to ensure that the\\n     * ima can do proper cleanup of the SDK before other event listeners\\n     * are called.\\n     * @param {function} listener The listener to be called when content completes.\\n     */\\n\\n\\n    this.addContentEndedListener = function (listener) {\\n      this.contentEndedListeners.push(listener);\\n    }.bind(this);\\n    /**\\n     * Adds a listener that will be called when content and all ads have\\n     * finished playing.\\n     * @param {function} listener The listener to be called when content and ads complete.\\n     */\\n\\n\\n    this.addContentAndAdsEndedListener = function (listener) {\\n      this.contentAndAdsEndedListeners.push(listener);\\n    }.bind(this);\\n    /**\\n     * Sets the listener to be called to trigger manual ad break playback.\\n     * @param {function} listener The listener to be called to trigger manual ad break playback.\\n     */\\n\\n\\n    this.setAdBreakReadyListener = function (listener) {\\n      this.adBreakReadyListener = listener;\\n    }.bind(this);\\n    /**\\n     * Pauses the ad.\\n     */\\n\\n\\n    this.pauseAd = function () {\\n      if (this.adsActive && this.adPlaying) {\\n        showPauseButton();\\n        this.adsManager.pause();\\n        this.adPlaying = false;\\n      }\\n    }.bind(this);\\n    /**\\n     * Resumes the ad.\\n     */\\n\\n\\n    this.resumeAd = function () {\\n      if (this.adsActive && !this.adPlaying) {\\n        showPlayButton();\\n        this.adsManager.resume();\\n        this.adPlaying = true;\\n      }\\n    }.bind(this);\\n    /**\\n     * Set up intervals to check for seeking and update current video time.\\n     * @private\\n     */\\n\\n\\n    var setUpPlayerIntervals_ = function () {\\n      this.updateTimeIntervalHandle = setInterval(updateCurrentTime_, this.seekCheckInterval);\\n      this.seekCheckIntervalHandle = setInterval(checkForSeeking_, this.seekCheckInterval);\\n      this.resizeCheckIntervalHandle = setInterval(checkForResize_, this.resizeCheckInterval);\\n    }.bind(this);\\n    /**\\n     * Updates the start time of the video\\n     * @private\\n     */\\n\\n\\n    var updateStartTime_ = function () {\\n      var cur = this.player.currentTime();\\n      if (!cur || this.player.ads.state != 'content-playback') return; // first time that isn't zero is our start time, but only if it's\\n      // more than the 1sec\\n\\n      if (cur < 1) cur = 0;\\n      this.contentPlayheadTracker.startTime = cur;\\n      this.player.off('timeupdate', updateStartTime_);\\n    }.bind(this);\\n    /**\\n     * Updates the current time of the video\\n     * @private\\n     */\\n\\n\\n    var updateCurrentTime_ = function () {\\n      if (this.player.ads.state == 'content-playback' && !this.contentPlayheadTracker.seeking && this.contentPlayheadTracker.startTime >= 0) {\\n        this.contentPlayheadTracker.currentTime = this.player.currentTime() - this.contentPlayheadTracker.startTime;\\n      }\\n    }.bind(this);\\n    /**\\n     * Detects when the user is seeking through a video.\\n     * This is used to prevent mid-rolls from playing while a user is seeking.\\n     *\\n     * There *is* a seeking property of the HTML5 video element, but it's not\\n     * properly implemented on all platforms (e.g. mobile safari), so we have to\\n     * check ourselves to be sure.\\n     *\\n     * @private\\n     */\\n\\n\\n    var checkForSeeking_ = function () {\\n      if (this.player.ads.state != 'content-playback') return;\\n      var tempCurrentTime = this.player.currentTime();\\n      var diff = (tempCurrentTime - this.contentPlayheadTracker.previousTime) * 1000;\\n\\n      if (Math.abs(diff) > this.seekCheckInterval + this.seekThreshold) {\\n        this.contentPlayheadTracker.seeking = true;\\n      } else {\\n        this.contentPlayheadTracker.seeking = false;\\n      }\\n\\n      this.contentPlayheadTracker.previousTime = this.player.currentTime();\\n    }.bind(this);\\n    /**\\n     * Detects when the player is resized (for fluid support) and resizes the\\n     * ads manager to match.\\n     *\\n     * @private\\n     */\\n\\n\\n    var checkForResize_ = function () {\\n      var currentWidth = this.getPlayerWidth();\\n      var currentHeight = this.getPlayerHeight();\\n\\n      if (this.adsManager && (currentWidth != this.adsManagerDimensions.width || currentHeight != this.adsManagerDimensions.height)) {\\n        this.adsManagerDimensions.width = currentWidth;\\n        this.adsManagerDimensions.height = currentHeight;\\n        this.adsManager.resize(currentWidth, currentHeight, google.ima.ViewMode.NORMAL);\\n      }\\n    }.bind(this);\\n    /**\\n     * Changes the flag to show or hide the ad countdown timer.\\n     *\\n     * @param {boolean} showCountdownIn Show or hide the countdown timer.\\n     */\\n\\n\\n    this.setShowCountdown = function (showCountdownIn) {\\n      this.showCountdown = showCountdownIn;\\n      this.countdownDiv.style.display = this.showCountdown ? '' : 'none';\\n    }.bind(this);\\n    /**\\n     * Current plugin version.\\n     */\\n\\n\\n    this.VERSION = '0.2.0';\\n    /**\\n     * Stores user-provided settings.\\n     */\\n\\n    this.settings;\\n    /**\\n     * Used to prefix videojs ima\\n     */\\n\\n    this.controlPrefix;\\n    /**\\n     * Video element playing content.\\n     */\\n\\n    this.contentPlayer;\\n    /**\\n     * Boolean flag to show or hide the ad countdown timer.\\n     */\\n\\n    this.showCountdown;\\n    /**\\n     * Boolena flag to enable manual ad break playback.\\n     */\\n\\n    this.autoPlayAdBreaks;\\n    /**\\n     * Video.js control bar.\\n     */\\n\\n    this.vjsControls;\\n    /**\\n     * Div used as an ad container.\\n     */\\n\\n    this.adContainerDiv;\\n    /**\\n     * Div used to display ad controls.\\n     */\\n\\n    this.controlsDiv;\\n    /**\\n     * Div used to display ad countdown timer.\\n     */\\n\\n    this.countdownDiv;\\n    /**\\n     * Div used to display add seek bar.\\n     */\\n\\n    this.seekBarDiv;\\n    /**\\n     * Div used to display ad progress (in seek bar).\\n     */\\n\\n    this.progressDiv;\\n    /**\\n     * Div used to display ad play/pause button.\\n     */\\n\\n    this.playPauseDiv;\\n    /**\\n     * Div used to display ad mute button.\\n     */\\n\\n    this.muteDiv;\\n    /**\\n     * Div used by the volume slider.\\n     */\\n\\n    this.sliderDiv;\\n    /**\\n     * Volume slider level visuals\\n     */\\n\\n    this.sliderLevelDiv;\\n    /**\\n     * Div used to display ad fullscreen button.\\n     */\\n\\n    this.fullscreenDiv;\\n    /**\\n     * IMA SDK AdDisplayContainer.\\n     */\\n\\n    this.adDisplayContainer;\\n    /**\\n     * True if the AdDisplayContainer has been initialized. False otherwise.\\n     */\\n\\n    this.adDisplayContainerInitialized = false;\\n    /**\\n     * IMA SDK AdsLoader\\n     */\\n\\n    this.adsLoader;\\n    /**\\n     * IMA SDK AdsManager\\n     */\\n\\n    this.adsManager;\\n    /**\\n     * IMA SDK AdsRenderingSettings.\\n     */\\n\\n    this.adsRenderingSettings = null;\\n    /**\\n     * Ad tag URL. Should return VAST, VMAP, or ad rules.\\n     */\\n\\n    this.adTagUrl;\\n    /**\\n     * VAST, VMAP, or ad rules response. Used in lieu of fetching a response\\n     * from an ad tag URL.\\n     */\\n\\n    this.adsResponse;\\n    /**\\n     * Current IMA SDK Ad.\\n     */\\n\\n    this.currentAd;\\n    /**\\n     * Timer used to track content progress.\\n     */\\n\\n    this.contentTrackingTimer;\\n    /**\\n     * Timer used to track ad progress.\\n     */\\n\\n    this.adTrackingTimer;\\n    /**\\n     * True if ads are currently displayed, false otherwise.\\n     * True regardless of ad pause state if an ad is currently being displayed.\\n     */\\n\\n    this.adsActive = false;\\n    /**\\n     * True if ad is currently playing, false if ad is paused or ads are not\\n     * currently displayed.\\n     */\\n\\n    this.adPlaying = false;\\n    /**\\n     * True if the ad is muted, false otherwise.\\n     */\\n\\n    this.adMuted = false;\\n    /**\\n     * True if our content video has completed, false otherwise.\\n     */\\n\\n    this.contentComplete = false;\\n    /**\\n     * True if ALL_ADS_COMPLETED has fired, false until then.\\n     */\\n\\n    this.allAdsCompleted = false;\\n    /**\\n     * Handle to interval that repeatedly updates current time.\\n     */\\n\\n    this.updateTimeIntervalHandle;\\n    /**\\n     * Handle to interval that repeatedly checks for seeking.\\n     */\\n\\n    this.seekCheckIntervalHandle;\\n    /**\\n     * Interval (ms) on which to check if the user is seeking through the\\n     * content.\\n     */\\n\\n    this.seekCheckInterval = 1000;\\n    /**\\n     * Handle to interval that repeatedly checks for player resize.\\n     */\\n\\n    this.resizeCheckIntervalHandle;\\n    /**\\n     * Interval (ms) to check for player resize for fluid support.\\n     */\\n\\n    this.resizeCheckInterval = 250;\\n    /**\\n     * Threshold by which to judge user seeking. We check every 1000 ms to see\\n     * if the user is seeking. In order for us to decide that they are *not*\\n     * seeking, the content video playhead must only change by 900-1100 ms\\n     * between checks. Any greater change and we assume the user is seeking\\n     * through the video.\\n     */\\n\\n    this.seekThreshold = 100;\\n    /**\\n     * Stores data for the content playhead tracker.\\n     */\\n\\n    this.contentPlayheadTracker = {\\n      currentTime: 0,\\n      previousTime: 0,\\n      seeking: false,\\n      duration: 0,\\n      startTime: -1\\n    };\\n    /**\\n     * Stores data for the ad playhead tracker.\\n     */\\n\\n    this.adPlayheadTracker = {\\n      currentTime: 0,\\n      duration: 0,\\n      isPod: false,\\n      adPosition: 0,\\n      totalAds: 0\\n    };\\n    /**\\n     * Stores the dimensions for the ads manager.\\n     */\\n\\n    this.adsManagerDimensions = {\\n      width: 0,\\n      height: 0\\n    };\\n    /**\\n     * Content ended listeners passed by the publisher to the plugin. Publishers\\n     * should allow the plugin to handle content ended to ensure proper support\\n     * of custom ad playback.\\n     */\\n\\n    this.contentEndedListeners = [];\\n    /**\\n     * Content and ads ended listeners passed by the publisher to the plugin.\\n     * These will be called when the plugin detects that content *and all\\n     * ads* have completed. This differs from the contentEndedListeners in that\\n     * contentEndedListeners will fire between content ending and a post-roll\\n     * playing, whereas the contentAndAdsEndedListeners will fire after the\\n     * post-roll completes.\\n     */\\n\\n    this.contentAndAdsEndedListeners = [];\\n    /**\\n     * Listener to be called to trigger manual ad break playback.\\n     */\\n\\n    this.adBreakReadyListener = function () {\\n      console.log('Please set adBreakReadyListener');\\n    };\\n    /**\\n     * Stores the content source so we can re-populate it manually after a\\n     * post-roll on iOS.\\n     */\\n\\n\\n    this.contentSource = '';\\n    /**\\n     * Local content ended listener for contentComplete.\\n     */\\n\\n    this.localContentEndedListener = function () {\\n      if (this.adsLoader && !this.contentComplete) {\\n        this.adsLoader.contentComplete();\\n        this.contentComplete = true;\\n      }\\n\\n      for (var index in this.contentEndedListeners) {\\n        this.contentEndedListeners[index]();\\n      }\\n\\n      if (this.allAdsCompleted) {\\n        for (var index in this.contentAndAdsEndedListeners) {\\n          this.contentAndAdsEndedListeners[index]();\\n        }\\n      }\\n\\n      clearInterval(this.updateTimeIntervalHandle);\\n      clearInterval(this.seekCheckIntervalHandle);\\n      clearInterval(this.resizeCheckIntervalHandle);\\n\\n      if (this.player.el()) {\\n        this.player.one('play', setUpPlayerIntervals_);\\n      }\\n    }.bind(this);\\n\\n    this.playerDisposedListener = function () {\\n      this.contentEndedListeners, this.contentAndAdsEndedListeners = [], [];\\n      this.contentComplete = true;\\n      this.player.off('contentended', this.localContentEndedListener);\\n      this.player.off('timeupdate', updateStartTime_); // Bug fix: https://github.com/googleads/videojs-ima/issues/306\\n\\n      if (this.player.ads.adTimeoutTimeout) {\\n        clearTimeout(this.player.ads.adTimeoutTimeout);\\n      }\\n\\n      var intervalsToClear = [this.updateTimeIntervalHandle, this.seekCheckIntervalHandle, this.adTrackingTimer, this.resizeCheckIntervalHandle];\\n\\n      for (var index in intervalsToClear) {\\n        var interval = intervalsToClear[index];\\n\\n        if (interval) {\\n          clearInterval(interval);\\n        }\\n      }\\n\\n      if (this.adsManager) {\\n        this.adsManager.destroy();\\n        this.adsManager = null;\\n      }\\n    }.bind(this);\\n\\n    this.initVjsControls = function () {\\n      var _this = this;\\n\\n      var override = function override(cls, obj, method, fn, always) {\\n        var orig = cls.prototype[method];\\n        return obj[method] = function () {\\n          return _this.adsActive || always ? fn && fn.apply(this, arguments) : orig && orig.apply(this, arguments);\\n        };\\n      };\\n\\n      var overrideHandler = function overrideHandler(cls, obj, target, event, method, fn, always) {\\n        var orig = cls.prototype[method];\\n        var handler = override(cls, obj, method, fn);\\n\\n        if (target) {\\n          obj.off(target, event, orig);\\n          obj.on(target, event, handler);\\n        } else {\\n          obj.off(event, orig);\\n          obj.on(event, handler);\\n        }\\n      };\\n\\n      var PlayToggle = videojs.getComponent('PlayToggle');\\n      var playToggle = this.vjsControls.playToggle;\\n      overrideHandler(PlayToggle, playToggle, null, ['tap', 'click'], 'handleClick', function () {\\n        onAdPlayPauseClick_();\\n\\n        if (_this.adPlaying) {\\n          this.handlePlay();\\n        } else {\\n          this.handlePause();\\n        }\\n      });\\n      override(PlayToggle, playToggle, 'update', function () {\\n        var paused = _this.adsActive ? !_this.adPlaying : player.paused();\\n        this.toggleClass('vjs-play-control-ad', _this.adsActive);\\n        this.toggleClass('vjs-paused', paused);\\n        this.toggleClass('vjs-playing', !paused);\\n        var text = paused ? 'Play' : 'Pause';\\n        if (text != this.controlText()) this.controlText(text);\\n      }, true);\\n      overrideHandler(PlayToggle, playToggle, player, 'play', 'handlePlay', function () {\\n        this.update();\\n      }, true);\\n      overrideHandler(PlayToggle, playToggle, player, 'pause', 'handlePause', function () {\\n        this.update();\\n      }, true);\\n      var SeekBar = videojs.getComponent('SeekBar');\\n      var DvrSeekBar = videojs.getComponent('DvrSeekBar');\\n      var seekBar = this.vjsControls.progressControl.seekBar;\\n\\n      var getPercent = function getPercent() {\\n        var duration = _this.currentAd && _this.currentAd.getDuration();\\n\\n        if (!duration || duration < 0) {\\n          return 0;\\n        }\\n\\n        var remainingTime = _this.adsManager.getRemainingTime();\\n\\n        var currentTime = Math.max(duration - remainingTime, 0);\\n        return currentTime / duration;\\n      };\\n\\n      override(SeekBar, seekBar, 'getPercent', getPercent);\\n\\n      if (DvrSeekBar) {\\n        override(DvrSeekBar, seekBar, 'getPercent', getPercent);\\n      }\\n\\n      overrideHandler(SeekBar, seekBar, null, ['mousedown', 'touchstart'], 'handleMouseDown', null);\\n      overrideHandler(SeekBar, seekBar, null, 'focus', 'handleFocus', null);\\n      var DurationDisplay = videojs.getComponent('DurationDisplay');\\n      var durationDisplay = this.vjsControls.durationDisplay;\\n      overrideHandler(DurationDisplay, durationDisplay, player, ['timeupdate', 'loadedmetadata'], 'updateContent', function () {\\n        var duration = _this.currentAd && _this.currentAd.getDuration();\\n\\n        if (duration && duration != this.duration_) {\\n          this.duration_ = duration;\\n          this.contentEl_.innerHTML = '<span class=\\\"vjs-control-text\\\">' + this.localize('Duration Time') + '</span> ' + formatTime(duration);\\n        }\\n      });\\n      var CurrentTimeDisplay = videojs.getComponent('CurrentTimeDisplay');\\n      var currentTimeDisplay = this.vjsControls.currentTimeDisplay;\\n      overrideHandler(CurrentTimeDisplay, currentTimeDisplay, player, ['timeupdate', 'loadedmetadata'], 'updateContent', function () {\\n        var duration = _this.currentAd && _this.currentAd.getDuration();\\n\\n        if (!duration) {\\n          return;\\n        }\\n\\n        var time = duration - _this.adsManager.getRemainingTime();\\n\\n        var formattedTime = formatTime(time);\\n\\n        if (formattedTime !== this.formattedTime_) {\\n          this.formattedTime_ = formattedTime;\\n          this.contentEl_.innerHTML = '<span class=\\\"vjs-control-text\\\">' + this.localize('Current Time') + '</span> ' + formattedTime;\\n        }\\n      });\\n    }.bind(this);\\n\\n    this.updateVjsControls = function () {\\n      if (!this.settings.vjsControls) {\\n        return;\\n      }\\n\\n      this.player.toggleClass('vjs-ad-paused', this.adsActive && !this.adPlaying);\\n      var controls = this.vjsControls;\\n      controls.playToggle.update();\\n      controls.progressControl.seekBar.update();\\n      controls.durationDisplay.updateContent();\\n      controls.currentTimeDisplay.updateContent();\\n      var duration = this.currentAd && this.currentAd.getDuration();\\n      var display = !this.adsActive || duration && duration >= 0 ? '' : 'none';\\n      controls.durationDisplay.el().style.display = display;\\n      controls.currentTimeDisplay.el().style.display = display;\\n      controls.timeDivider.el().style.display = display;\\n    }.bind(this);\\n\\n    var getPosition = function getPosition(el) {\\n      var box = el.getBoundingClientRect();\\n      var docEl = document.documentElement;\\n      var body = document.body;\\n      var clientLeft = docEl.clientLeft || body.clientLeft || 0;\\n      var scrollLeft = window.pageXOffset || body.scrollLeft;\\n      var left = box.left + scrollLeft - clientLeft;\\n      var clientTop = docEl.clientTop || body.clientTop || 0;\\n      var scrollTop = window.pageYOffset || body.scrollTop;\\n      var top = box.top + scrollTop - clientTop;\\n      return {\\n        left: left,\\n        top: top,\\n        width: box.width,\\n        height: box.height\\n      };\\n    }; // proxy click events to the video element when non-linear ad is active\\n\\n\\n    this.proxyClickEvents = function () {\\n      var events = videojs && videojs.browser && videojs.browser.IS_ANDROID || videojs.browser.IS_IOS ? ['touchstart', 'touchend'] : ['click', 'dblclick', 'mousedown', 'mouseup'];\\n\\n      var player = this.player,\\n          el = player.el(),\\n          _this = this;\\n\\n      events.forEach(function (eventName) {\\n        el.addEventListener(eventName, function (e) {\\n          var ad = _this.currentAd,\\n              t = e.target;\\n\\n          if (!ad || ad.isLinear() || t.nodeName != 'IFRAME' || e.isTrusted) {\\n            return;\\n          } // ignore clicks on ad ui elements\\n\\n\\n          var adWidth = ad.getWidth() || ad.getVastMediaWidth();\\n          var adHeight = ad.getHeight() || ad.getVastMediaHeight();\\n          var pos = getPosition(t);\\n          var touch = e.touches && e.touches[0];\\n          var x = touch ? touch.pageX : e.clientX;\\n          var y = touch ? touch.pageY : e.clientY;\\n          var adRight = pos.left + pos.width - (pos.width - adWidth) / 2;\\n          var adTop = pos.top + pos.height - adHeight - 4; // click on close button\\n\\n          if (x < adRight && x > adRight - 40 && y > adTop && y < adTop + 30) {\\n            return;\\n          } // click on recall button\\n\\n\\n          if (x > pos.left + pos.width / 2 - 15 && x < pos.left + pos.width / 2 + 15 && y > pos.top + pos.height - 15) {\\n            return;\\n          }\\n\\n          var newEvent;\\n          var opt = {};\\n\\n          for (var key in e) {\\n            opt[key] = e[key];\\n          }\\n\\n          opt.bubbles = false;\\n\\n          try {\\n            newEvent = new e.constructor(e.type, opt);\\n          } catch (err) {\\n            // special case for IE11\\n            newEvent = document.createEvent('MouseEvent');\\n            newEvent.initMouseEvent(e.type, opt.bubbles, opt.cancelable, opt.view, opt.detail, opt.screenX, opt.screenY, opt.clientX, opt.clientY, opt.ctrlKey, opt.altKey, opt.shiftKey, opt.metaKey, opt.button, null);\\n          }\\n\\n          newEvent.stopPropagation();\\n          player.tech_.trigger(newEvent);\\n        });\\n      });\\n    }.bind(this);\\n\\n    this.settings = extend({}, ima_defaults, options || {});\\n    this.settings.adLabel = this.player.localize(this.settings.adLabel); // Currently this isn't used but I can see it being needed in the future, so\\n    // to avoid implementation problems with later updates I'm requiring it.\\n\\n    if (!this.settings['id']) {\\n      window.console.log('Error: must provide id of video.js div');\\n      return;\\n    }\\n\\n    this.controlPrefix = this.settings.id + '_' || false;\\n    this.contentPlayer = this.player.$('.vjs-tech'); // Default showing countdown timer to true.\\n\\n    this.showCountdown = true;\\n\\n    if (this.settings['showCountdown'] === false) {\\n      this.showCountdown = false;\\n    }\\n\\n    this.autoPlayAdBreaks = true;\\n\\n    if (this.settings['autoPlayAdBreaks'] === false) {\\n      this.autoPlayAdBreaks = false;\\n    }\\n\\n    var contrib_ads_defaults = {\\n      debug: this.settings.debug,\\n      timeout: this.settings.timeout,\\n      prerollTimeout: this.settings.prerollTimeout,\\n      postrollTimeout: this.settings.postrollTimeout\\n    };\\n    var ads_plugin_settings = extend({}, contrib_ads_defaults, options['contribAdsSettings'] || {});\\n    player.ads(ads_plugin_settings);\\n    player.one('play', setUpPlayerIntervals_);\\n    player.on('contentended', this.localContentEndedListener);\\n    player.on('dispose', this.playerDisposedListener);\\n    player.on('timeupdate', updateStartTime_);\\n    this.adsRenderingSettings = new google.ima.AdsRenderingSettings();\\n    this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;\\n\\n    if (this.settings['adsRenderingSettings']) {\\n      for (var setting in this.settings['adsRenderingSettings']) {\\n        this.adsRenderingSettings[setting] = this.settings['adsRenderingSettings'][setting];\\n      }\\n    }\\n\\n    if (this.settings['locale']) {\\n      google.ima.settings.setLocale(this.settings['locale']);\\n    }\\n\\n    createAdContainer_();\\n    this.adsLoader = new google.ima.AdsLoader(this.adDisplayContainer);\\n    this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED);\\n\\n    if (this.settings.vpaidAllowed == false) {\\n      this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED);\\n    }\\n\\n    if (this.settings.vpaidMode) {\\n      this.adsLoader.getSettings().setVpaidMode(this.settings.vpaidMode);\\n    }\\n\\n    if (this.settings.locale) {\\n      this.adsLoader.getSettings().setLocale(this.settings.locale);\\n    }\\n\\n    if (this.settings.numRedirects) {\\n      this.adsLoader.getSettings().setNumRedirects(this.settings.numRedirects);\\n    }\\n\\n    this.adsLoader.getSettings().setPlayerType('videojs-ima');\\n    this.adsLoader.getSettings().setPlayerVersion(this.VERSION);\\n    this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks);\\n    this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, onAdsManagerLoaded_, false);\\n    this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, onAdsLoaderError_, false);\\n\\n    if (!readyCallback) {\\n      readyCallback = this.startFromReadyCallback;\\n    }\\n\\n    player.on('readyforpreroll', readyCallback);\\n    player.ready(function () {\\n      player.on('fullscreenchange', onFullscreenChange_);\\n      player.on('volumechange', onVolumeChange_);\\n    });\\n    this.proxyClickEvents();\\n  };\\n\\n  videojs.registerPlugin('ima', init);\\n});\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/ima/index.js?\")},\"./plugins/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\n__webpack_require__(/*! videojs-contrib-ads */ \"../node_modules/videojs-contrib-ads/dist/videojs-contrib-ads.min.js\");\\n\\n__webpack_require__(/*! ./ima */ \"./plugins/ima/index.js\");\\n\\nvar _dash = _interopRequireDefault(__webpack_require__(/*! ./dash */ \"./plugins/dash/index.js\"));\\n\\nvar _interactivePlugin = _interopRequireDefault(__webpack_require__(/*! ./interactive-plugin */ \"./plugins/interactive-plugin/index.js\"));\\n\\n__webpack_require__(/*! ./videojs-http-source-selector/plugin */ \"./plugins/videojs-http-source-selector/plugin.js\");\\n\\nvar _autoplayOnScroll = _interopRequireDefault(__webpack_require__(/*! ./autoplay-on-scroll */ \"./plugins/autoplay-on-scroll/index.js\"));\\n\\nvar _floatingPlayer = _interopRequireDefault(__webpack_require__(/*! ./floating-player */ \"./plugins/floating-player/index.js\"));\\n\\nvar _colors = _interopRequireDefault(__webpack_require__(/*! ./colors */ \"./plugins/colors/index.js\"));\\n\\nvar _contextMenu = _interopRequireDefault(__webpack_require__(/*! ./context-menu */ \"./plugins/context-menu/index.js\"));\\n\\nvar _cloudinary = _interopRequireDefault(__webpack_require__(/*! ./cloudinary */ \"./plugins/cloudinary/index.js\"));\\n\\nvar _analytics = _interopRequireDefault(__webpack_require__(/*! ./analytics */ \"./plugins/analytics/index.js\"));\\n\\nvar _vttThumbnails = _interopRequireDefault(__webpack_require__(/*! ./vtt-thumbnails */ \"./plugins/vtt-thumbnails/index.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// #if (!process.env.WEBPACK_BUILD_LIGHT)\\n// #endif\\nvar plugins = {\\n  autoplayOnScroll: _autoplayOnScroll.default,\\n  floatingPlayer: _floatingPlayer.default,\\n  colors: _colors.default,\\n  contextMenu: _contextMenu.default,\\n  cloudinary: _cloudinary.default,\\n  analytics: _analytics.default,\\n  vttThumbnails: _vttThumbnails.default,\\n  // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n  interactive: _interactivePlugin.default,\\n  dashPlugin: _dash.default // #endif\\n\\n};\\nvar _default = plugins;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/index.js?')},\"./plugins/interactive-plugin/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = interactivePlugin;\\n\\nvar _shoppableWidget = _interopRequireDefault(__webpack_require__(/*! ../../components/shoppable-bar/shoppable-widget */ \"./components/shoppable-bar/shoppable-widget.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction interactivePlugin(player, options) {\\n  // Shoppable Video\\n  if (options.shoppable) {\\n    new _shoppableWidget.default(player, options.shoppable).init();\\n  }\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/interactive-plugin/index.js?')},\"./plugins/videojs-http-source-selector/components/SourceMenuButton.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nvar _SourceMenuItem = _interopRequireDefault(__webpack_require__(/*! ./SourceMenuItem */ \"./plugins/videojs-http-source-selector/components/SourceMenuItem.js\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MenuButton = _video.default.getComponent(\\'MenuButton\\');\\n\\nvar SourceMenuButton = /*#__PURE__*/function (_MenuButton) {\\n  _inherits(SourceMenuButton, _MenuButton);\\n\\n  var _super = _createSuper(SourceMenuButton);\\n\\n  function SourceMenuButton(player, options) {\\n    var _this;\\n\\n    _classCallCheck(this, SourceMenuButton);\\n\\n    _this = _super.call(this, player, options); // eslint-disable-next-line prefer-rest-params\\n\\n    MenuButton.apply(_assertThisInitialized(_this), arguments);\\n\\n    var qualityLevels = _this.player().qualityLevels(); // Handle options: We accept an options.default value of ( high || low )\\n    // This determines a bias to set initial resolution selection.\\n\\n\\n    if (options && options.default) {\\n      if (options.default === \\'low\\') {\\n        for (var i = 0; i < qualityLevels.length; i++) {\\n          qualityLevels[i].enabled = i === 0;\\n        }\\n      } else if (options.default === \\'high\\') {\\n        for (var _i = 0; _i < qualityLevels.length; _i++) {\\n          qualityLevels[_i].enabled = _i === qualityLevels.length - 1;\\n        }\\n      }\\n    } // Bind update to qualityLevels changes\\n\\n\\n    _this.player().qualityLevels().on([\\'addqualitylevel\\'], _video.default.bind(_assertThisInitialized(_this), _this.update));\\n\\n    return _this;\\n  }\\n\\n  _createClass(SourceMenuButton, [{\\n    key: \"createEl\",\\n    value: function createEl() {\\n      return _video.default.dom.createEl(\\'div\\', {\\n        className: \\'vjs-http-source-selector vjs-menu-button vjs-menu-button-popup vjs-control vjs-button\\'\\n      });\\n    }\\n  }, {\\n    key: \"buildCSSClass\",\\n    value: function buildCSSClass() {\\n      return MenuButton.prototype.buildCSSClass.call(this) + \\' vjs-icon-cog\\';\\n    }\\n  }, {\\n    key: \"update\",\\n    value: function update() {\\n      return MenuButton.prototype.update.call(this);\\n    }\\n  }, {\\n    key: \"createItems\",\\n    value: function createItems() {\\n      var menuItems = [];\\n      var levels = this.player().qualityLevels();\\n      var labels = [];\\n\\n      for (var i = 0; i < levels.length; i++) {\\n        var index = levels.length - (i + 1);\\n        var selected = index === levels.selectedIndex; // Display height if height metadata is provided with the stream, else use bitrate\\n\\n        var label = \"\".concat(index);\\n        var sortVal = index;\\n\\n        if (levels[index].height) {\\n          label = \"\".concat(levels[index].height, \"p\");\\n          sortVal = parseInt(levels[index].height, 10);\\n        } else if (levels[index].bitrate) {\\n          label = \"\".concat(Math.floor(levels[index].bitrate / 1e3), \" kbps\");\\n          sortVal = parseInt(levels[index].bitrate, 10);\\n        } // Skip duplicate labels\\n\\n\\n        if (labels.indexOf(label) >= 0) {\\n          // eslint-disable-next-line no-continue\\n          continue;\\n        }\\n\\n        labels.push(label);\\n        menuItems.push(new _SourceMenuItem.default(this.player_, {\\n          label: label,\\n          index: index,\\n          selected: selected,\\n          sortVal: sortVal\\n        }));\\n      } // If there are multiple quality levels, offer an \\'auto\\' option\\n\\n\\n      if (levels.length > 1) {\\n        menuItems.push(new _SourceMenuItem.default(this.player_, {\\n          label: \\'Auto\\',\\n          index: levels.length,\\n          selected: false,\\n          sortVal: 99999\\n        }));\\n      } // Sort menu items by their label name with Auto always first\\n\\n\\n      menuItems.sort(function (a, b) {\\n        if (a.options_.sortVal < b.options_.sortVal) {\\n          return 1;\\n        } else if (a.options_.sortVal > b.options_.sortVal) {\\n          return -1;\\n        } else {\\n          return 0;\\n        }\\n      });\\n      return menuItems;\\n    }\\n  }]);\\n\\n  return SourceMenuButton;\\n}(MenuButton);\\n\\nvar _default = SourceMenuButton;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/videojs-http-source-selector/components/SourceMenuButton.js?')},\"./plugins/videojs-http-source-selector/components/SourceMenuItem.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \"../node_modules/video.js/dist/video.es.js-exposed\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\\n\\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn\\'t been initialised - super() hasn\\'t been called\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nvar MenuItem = _video.default.getComponent(\\'MenuItem\\');\\n\\nvar Component = _video.default.getComponent(\\'Component\\');\\n\\nvar SourceMenuItem = /*#__PURE__*/function (_MenuItem) {\\n  _inherits(SourceMenuItem, _MenuItem);\\n\\n  var _super = _createSuper(SourceMenuItem);\\n\\n  function SourceMenuItem(player, options) {\\n    _classCallCheck(this, SourceMenuItem);\\n\\n    options.selectable = true;\\n    options.multiSelectable = false;\\n    return _super.call(this, player, options);\\n  }\\n\\n  _createClass(SourceMenuItem, [{\\n    key: \"handleClick\",\\n    value: function handleClick() {\\n      var selected = this.options_;\\n      console.log(\\'Changing quality to:\\', selected.label);\\n\\n      _get(_getPrototypeOf(SourceMenuItem.prototype), \"handleClick\", this).call(this);\\n\\n      var levels = this.player().qualityLevels();\\n      var isAuto = selected.index === levels.length;\\n\\n      for (var i = 0; i < levels.length; i++) {\\n        if (isAuto) {\\n          // If this is the Auto option, enable all renditions for adaptive selection\\n          levels[i].enabled = true;\\n        } else if (selected.index === i) {\\n          levels[i].enabled = true;\\n        } else {\\n          levels[i].enabled = false;\\n        }\\n      }\\n\\n      if (isAuto) {\\n        this.deselectRest(6);\\n      } else {\\n        this.deselectRest(selected.index);\\n      }\\n    }\\n  }, {\\n    key: \"deselectRest\",\\n    value: function deselectRest(idx) {\\n      if (this.parentComponent_) {\\n        this.parentComponent_.children().forEach(function (item) {\\n          item.selected(idx === item.options_.index);\\n        });\\n      }\\n    }\\n  }, {\\n    key: \"update\",\\n    value: function update() {\\n      var selectedIndex = this.player().qualityLevels().selectedIndex;\\n      this.selected(this.options_.index === selectedIndex);\\n    }\\n  }]);\\n\\n  return SourceMenuItem;\\n}(MenuItem);\\n\\nComponent.registerComponent(\\'SourceMenuItem\\', SourceMenuItem);\\nvar _default = SourceMenuItem;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/videojs-http-source-selector/components/SourceMenuItem.js?')},\"./plugins/videojs-http-source-selector/plugin.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _SourceMenuButton = _interopRequireDefault(__webpack_require__(/*! ./components/SourceMenuButton */ \\\"./plugins/videojs-http-source-selector/components/SourceMenuButton.js\\\"));\\n\\nvar _SourceMenuItem = _interopRequireDefault(__webpack_require__(/*! ./components/SourceMenuItem */ \\\"./plugins/videojs-http-source-selector/components/SourceMenuItem.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// Default options for the plugin.\\nvar defaults = {}; // Cross-compatibility for Video.js 5 and 6.\\n\\nvar registerPlugin = _video.default.registerPlugin || _video.default.plugin; // const dom = videojs.dom || videojs;\\n\\n/**\\n* Function to invoke when the player is ready.\\n*\\n* This is a great place for your plugin to initialize itself. When this\\n* function is called, the player will have its DOM and child components\\n* in place.\\n*\\n* @function onPlayerReady\\n* @param    {Player} player\\n*           A Video.js player object.\\n*\\n* @param    {Object} [options={}]\\n*           A plain object containing options for the plugin.\\n*/\\n\\nvar onPlayerReady = function onPlayerReady(player) {\\n  player.addClass('vjs-http-source-selector');\\n  console.log('videojs-http-source-selector initialized!');\\n  console.log('player.techName_:' + player.techName_); // This plugin only supports level selection for HLS playback\\n\\n  if (player.techName_ !== 'Html5') {\\n    return false;\\n  }\\n  /**\\n  *\\n  * We have to wait for the manifest to load before we can scan renditions for resolutions/bitrates to populate selections\\n  *\\n  **/\\n\\n\\n  player.on(['loadedmetadata'], function () {\\n    _video.default.log('loadmetadata event'); // hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.httpSourceSelector() functions called.\\n\\n\\n    if (player.videojs_http_source_selector_initialized === 'undefined' || player.videojs_http_source_selector_initialized === true) {\\n      console.log('player.videojs_http_source_selector_initialized == true');\\n    } else {\\n      console.log('player.videojs_http_source_selector_initialized == false');\\n      player.videojs_http_source_selector_initialized = true;\\n      var controlBar = player.controlBar,\\n          fullscreenToggle = controlBar.getChild('fullscreenToggle').el();\\n      controlBar.el().insertBefore(controlBar.addChild('SourceMenuButton').el(), fullscreenToggle);\\n    }\\n  });\\n};\\n/**\\n  * A video.js plugin.\\n  *\\n  * In the plugin function, the value of `this` is a video.js `Player`\\n  * instance. You cannot rely on the player being in a \\\"ready\\\" state here,\\n  * depending on how the plugin is invoked. This may or may not be important\\n  * to you; if not, remove the wait for \\\"ready\\\"!\\n  *\\n  * @function httpSourceSelector\\n  * @param    {Object} [options={}]\\n  *           An object of options left to the plugin author to define.\\n  */\\n\\n\\nvar httpSourceSelector = function httpSourceSelector(options) {\\n  var _this = this;\\n\\n  this.ready(function () {\\n    onPlayerReady(_this, _video.default.mergeOptions(defaults, options)); // this.getChild('controlBar').addChild('SourceMenuButton', {});\\n  });\\n\\n  _video.default.registerComponent('SourceMenuButton', _SourceMenuButton.default);\\n\\n  _video.default.registerComponent('SourceMenuItem', _SourceMenuItem.default);\\n}; // Register the plugin with video.js.\\n\\n\\nregisterPlugin('httpSourceSelector', httpSourceSelector);\\nvar _default = httpSourceSelector;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/videojs-http-source-selector/plugin.js?\")},\"./plugins/vtt-thumbnails/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _promisePolyfill = _interopRequireDefault(__webpack_require__(/*! promise-polyfill */ \\\"../node_modules/promise-polyfill/promise.js\\\"));\\n\\n__webpack_require__(/*! ./vtt-thumbnails.scss */ \\\"./plugins/vtt-thumbnails/vtt-thumbnails.scss\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n// Default options for the plugin.\\nvar defaults = {}; // Cache for image elements\\n\\nvar cache = {};\\n/**\\n * Function to invoke when the player is ready.\\n *\\n * This is a great place for your plugin to initialize itself. When this\\n * function is called, the player will have its DOM and child components\\n * in place.\\n *\\n * @function onPlayerReady\\n * @param    {Player} player\\n *           A Video.js player object.\\n *\\n * @param    {Object} [options={}]\\n *           A plain object containing options for the plugin.\\n */\\n\\nvar onPlayerReady = function onPlayerReady(player, options) {\\n  player.addClass('vjs-vtt-thumbnails');\\n  player.vttThumbnails = new VttThumbnailsPlugin(player, options);\\n};\\n/**\\n * A video.js plugin.\\n *\\n * In the plugin function, the value of `this` is a video.js `Player`\\n * instance. You cannot rely on the player being in a \\\"ready\\\" state here,\\n * depending on how the plugin is invoked. This may or may not be important\\n * to you; if not, remove the wait for \\\"ready\\\"!\\n *\\n * @function vttThumbnails\\n * @param    {Object} [options={}]\\n *           An object of options left to the plugin author to define.\\n */\\n\\n\\nvar vttThumbnails = function vttThumbnails(options) {\\n  var _this = this;\\n\\n  this.ready(function () {\\n    onPlayerReady(_this, _video.default.mergeOptions(defaults, options));\\n  });\\n};\\n/**\\n * VTT Thumbnails class.\\n *\\n * This class performs all functions related to displaying the vtt\\n * thumbnails.\\n */\\n\\n\\nvar VttThumbnailsPlugin = function () {\\n  /**\\n   * Plugin class constructor, called by videojs on\\n   * ready event.\\n   *\\n   * @function  constructor\\n   * @param    {Player} player\\n   *           A Video.js player object.\\n   *\\n   * @param    {Object} [options={}]\\n   *           A plain object containing options for the plugin.\\n   */\\n  function VttThumbnailsPlugin(player, options) {\\n    this.player = player;\\n    this.options = options;\\n    this.listenForDurationChange();\\n    this.initializeThumbnails();\\n    this.registeredEvents = {};\\n    return this;\\n  }\\n\\n  VttThumbnailsPlugin.prototype.src = function src(source) {\\n    this.resetPlugin();\\n    this.options.src = source;\\n    this.initializeThumbnails();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.detach = function detach() {\\n    this.resetPlugin();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.resetPlugin = function resetPlugin() {\\n    if (this.thumbnailHolder) {\\n      this.thumbnailHolder.parentNode.removeChild(this.thumbnailHolder);\\n    }\\n\\n    if (this.progressBar) {\\n      this.progressBar.removeEventListener('mouseenter', this.registeredEvents.progressBarMouseEnter);\\n      this.progressBar.removeEventListener('mouseleave', this.registeredEvents.progressBarMouseLeave);\\n      this.progressBar.removeEventListener('mousemove', this.registeredEvents.progressBarMouseMove);\\n    }\\n\\n    delete this.registeredEvents.progressBarMouseEnter;\\n    delete this.registeredEvents.progressBarMouseLeave;\\n    delete this.registeredEvents.progressBarMouseMove;\\n    delete this.progressBar;\\n    delete this.vttData;\\n    delete this.thumbnailHolder;\\n    delete this.lastStyle;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.listenForDurationChange = function listenForDurationChange() {\\n    this.player.on('durationchange', function () {// ToDo\\n    });\\n  };\\n  /**\\n   * Bootstrap the plugin.\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.initializeThumbnails = function initializeThumbnails() {\\n    var _this2 = this;\\n\\n    if (!this.options.src) {\\n      return;\\n    }\\n\\n    var baseUrl = this.getBaseUrl();\\n    var url = this.getFullyQualifiedUrl(this.options.src, baseUrl);\\n    this.getVttFile(url).then(function (data) {\\n      _this2.vttData = _this2.processVtt(data);\\n\\n      _this2.setupThumbnailElement();\\n    });\\n  };\\n  /**\\n   * Builds a base URL should we require one.\\n   *\\n   * @returns {string}\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.getBaseUrl = function getBaseUrl() {\\n    return [window.location.protocol, '//', window.location.hostname, window.location.port ? ':' + window.location.port : '', window.location.pathname].join('').split(/([^\\\\/]*)$/gi).shift();\\n  };\\n  /**\\n   * Grabs the contents of the VTT file.\\n   *\\n   * @param url\\n   * @returns {Promise}\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.getVttFile = function getVttFile(url) {\\n    var _this3 = this;\\n\\n    return new _promisePolyfill.default(function (resolve) {\\n      var req = new XMLHttpRequest();\\n      req.data = {\\n        resolve: resolve\\n      };\\n      req.addEventListener('load', _this3.vttFileLoaded);\\n      req.open('GET', url);\\n      req.send();\\n    });\\n  };\\n  /**\\n   * Callback for loaded VTT file.\\n   */\\n\\n\\n  VttThumbnailsPlugin.prototype.vttFileLoaded = function vttFileLoaded() {\\n    this.data.resolve(this.responseText);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.setupThumbnailElement = function setupThumbnailElement() {\\n    var _this4 = this;\\n\\n    var mouseDisplay = this.player.$('.vjs-mouse-display');\\n    this.progressBar = this.player.$('.vjs-progress-control');\\n    var thumbHolder = document.createElement('div');\\n    thumbHolder.setAttribute('class', 'vjs-vtt-thumbnail-display');\\n    this.progressBar.appendChild(thumbHolder);\\n    this.thumbnailHolder = thumbHolder;\\n    var timeHolder = document.createElement('div');\\n    timeHolder.setAttribute('class', 'vjs-vtt-time-display');\\n    this.thumbnailHolder.appendChild(timeHolder);\\n    this.timeHolder = timeHolder;\\n\\n    if (mouseDisplay) {\\n      mouseDisplay.classList.add('vjs-hidden');\\n    }\\n\\n    this.registeredEvents.progressBarMouseEnter = function () {\\n      return _this4.onBarMouseenter();\\n    };\\n\\n    this.registeredEvents.progressBarMouseLeave = function () {\\n      return _this4.onBarMouseleave();\\n    };\\n\\n    this.progressBar.addEventListener('mouseenter', this.registeredEvents.progressBarMouseEnter);\\n    this.progressBar.addEventListener('mouseleave', this.registeredEvents.progressBarMouseLeave);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.onBarMouseenter = function onBarMouseenter() {\\n    var _this5 = this;\\n\\n    if (this.progressBar.offsetWidth < 400) {\\n      // Don't show in small players\\n      return;\\n    }\\n\\n    this.mouseMoveCallback = function (e) {\\n      _this5.onBarMousemove(e);\\n    };\\n\\n    this.registeredEvents.progressBarMouseMove = this.mouseMoveCallback;\\n    this.progressBar.addEventListener('mousemove', this.registeredEvents.progressBarMouseMove);\\n    this.showThumbnailHolder();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.onBarMouseleave = function onBarMouseleave() {\\n    if (this.registeredEvents.progressBarMouseMove) {\\n      this.progressBar.removeEventListener('mousemove', this.registeredEvents.progressBarMouseMove);\\n    }\\n\\n    this.hideThumbnailHolder();\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getXCoord = function getXCoord(bar, mouseX) {\\n    var rect = bar.getBoundingClientRect();\\n    var docEl = document.documentElement;\\n    return mouseX - (rect.left + (window.pageXOffset || docEl.scrollLeft || 0));\\n  };\\n\\n  VttThumbnailsPlugin.prototype.onBarMousemove = function onBarMousemove(event) {\\n    this.updateThumbnailStyle(_video.default.dom.getPointerPosition(this.progressBar, event).x, this.progressBar.offsetWidth);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getStyleForTime = function getStyleForTime(time) {\\n    for (var i = 0; i < this.vttData.length; ++i) {\\n      var item = this.vttData[i];\\n\\n      if (time >= item.start && time < item.end) {\\n        // Cache miss\\n        if (item.css.url && !cache[item.css.url]) {\\n          var image = new Image();\\n          image.src = item.css.url;\\n          cache[item.css.url] = image;\\n        }\\n\\n        return item.css;\\n      }\\n    }\\n  };\\n\\n  VttThumbnailsPlugin.prototype.showThumbnailHolder = function showThumbnailHolder() {\\n    this.thumbnailHolder.style.opacity = '1';\\n  };\\n\\n  VttThumbnailsPlugin.prototype.hideThumbnailHolder = function hideThumbnailHolder() {\\n    this.thumbnailHolder.style.opacity = '0';\\n  };\\n\\n  VttThumbnailsPlugin.prototype.updateThumbnailStyle = function updateThumbnailStyle(percent, width) {\\n    var duration = this.player.duration();\\n    var time = percent * duration;\\n    var currentStyle = this.getStyleForTime(time);\\n\\n    if (!currentStyle) {\\n      return this.hideThumbnailHolder();\\n    }\\n\\n    var xPos = percent * width;\\n    var thumbnailWidth = parseInt(currentStyle.width, 10);\\n    var halfthumbnailWidth = thumbnailWidth / 2;\\n    var marginRight = width - (xPos + halfthumbnailWidth);\\n    var marginLeft = xPos - halfthumbnailWidth;\\n\\n    if (marginLeft > 0 && marginRight > 0) {\\n      this.thumbnailHolder.style.transform = 'translateX(' + (xPos - halfthumbnailWidth) + 'px)';\\n    } else if (marginLeft <= 0) {\\n      this.thumbnailHolder.style.transform = 'translateX(' + 0 + 'px)';\\n    } else if (marginRight <= 0) {\\n      this.thumbnailHolder.style.transform = 'translateX(' + (width - thumbnailWidth) + 'px)';\\n    }\\n\\n    this.timeHolder.innerHTML = this.getTimestampFromSeconds(time);\\n\\n    if (this.lastStyle && this.lastStyle === currentStyle) {\\n      return;\\n    }\\n\\n    this.lastStyle = currentStyle;\\n\\n    for (var style in currentStyle) {\\n      if (Object.prototype.hasOwnProperty.call(currentStyle, style)) {\\n        this.thumbnailHolder.style[style] = currentStyle[style];\\n      }\\n    }\\n  };\\n\\n  VttThumbnailsPlugin.prototype.processVtt = function processVtt(data) {\\n    var _this6 = this;\\n\\n    var processedVtts = [];\\n    var vttDefinitions = data.split(/[\\\\r\\\\n][\\\\r\\\\n]/i);\\n    vttDefinitions.forEach(function (vttDef) {\\n      if (vttDef.match(/([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?( ?--\\x3e ?)([0-9]{2}:)?([0-9]{2}:)?[0-9]{2}(.[0-9]{3})?[\\\\r\\\\n]{1}.*/gi)) {\\n        var vttDefSplit = vttDef.split(/[\\\\r\\\\n]/i);\\n        var vttTiming = vttDefSplit[0];\\n        var vttTimingSplit = vttTiming.split(/ ?--\\x3e ?/i);\\n        var vttTimeStart = vttTimingSplit[0];\\n        var vttTimeEnd = vttTimingSplit[1];\\n        var vttImageFullPath = vttDefSplit[1];\\n        var vttImageDef = vttImageFullPath.split('\\\\/').pop();\\n\\n        var vttCssDef = _this6.getVttCss(vttImageDef);\\n\\n        processedVtts.push({\\n          start: _this6.getSecondsFromTimestamp(vttTimeStart),\\n          end: _this6.getSecondsFromTimestamp(vttTimeEnd),\\n          css: vttCssDef\\n        });\\n      }\\n    });\\n    return processedVtts;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getFullyQualifiedUrl = function getFullyQualifiedUrl(path, base) {\\n    // ToDo: remove this? also remove trim?\\n    if (path.indexOf('//') >= 0) {\\n      // We have a fully qualified path.\\n      return path;\\n    } else if (base.indexOf('//') === 0) {\\n      // We don't have a fully qualified path, but need to\\n      // be careful with trimming.\\n      return [base.replace(/\\\\/$/gi, ''), this.trim(path, '/')].join('/');\\n    } else if (base.indexOf('//') > 0) {\\n      // We don't have a fully qualified path, and should\\n      // trim both sides of base and path.\\n      return [this.trim(base, '/'), this.trim(path, '/')].join('/');\\n    } // If all else fails.\\n\\n\\n    return path;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getPropsFromDef = function getPropsFromDef(def) {\\n    var imageDefSplit = def.split(/#xywh=/i);\\n    var imageUrl = imageDefSplit[0];\\n    var imageCoords = imageDefSplit[1];\\n    var splitCoords = imageCoords.match(/[0-9]+/gi);\\n    return {\\n      x: splitCoords[0],\\n      y: splitCoords[1],\\n      w: splitCoords[2],\\n      h: splitCoords[3],\\n      image: imageUrl\\n    };\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getVttCss = function getVttCss(vttImageDef) {\\n    var cssObj = {}; // If there isn't a protocol, use the VTT source URL.\\n\\n    var baseSplit = '';\\n\\n    if (this.options.src.indexOf('//') >= 0) {\\n      baseSplit = this.options.src.split(/([^\\\\/]*)$/gi).shift();\\n    } else {\\n      baseSplit = this.getBaseUrl() + this.options.src.split(/([^\\\\/]*)$/gi).shift();\\n    }\\n\\n    vttImageDef = this.getFullyQualifiedUrl(vttImageDef, baseSplit);\\n\\n    if (!vttImageDef.match(/#xywh=/i)) {\\n      cssObj.background = 'url(\\\"' + vttImageDef + '\\\")';\\n      return cssObj;\\n    }\\n\\n    var imageProps = this.getPropsFromDef(vttImageDef);\\n    cssObj.background = 'url(\\\"' + imageProps.image + '\\\") no-repeat -' + imageProps.x + 'px -' + imageProps.y + 'px';\\n    cssObj.width = imageProps.w + 'px';\\n    cssObj.height = imageProps.h + 'px';\\n    cssObj.url = imageProps.image;\\n    return cssObj;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.doconstructTimestamp = function doconstructTimestamp(timestamp) {\\n    var splitStampMilliseconds = timestamp.split('.');\\n    var timeParts = splitStampMilliseconds[0];\\n    var timePartsSplit = timeParts.split(':');\\n    return {\\n      milliseconds: parseInt(splitStampMilliseconds[1], 10) || 0,\\n      seconds: parseInt(timePartsSplit.pop(), 10) || 0,\\n      minutes: parseInt(timePartsSplit.pop(), 10) || 0,\\n      hours: parseInt(timePartsSplit.pop(), 10) || 0\\n    };\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getSecondsFromTimestamp = function getSecondsFromTimestamp(timestamp) {\\n    var timestampParts = this.doconstructTimestamp(timestamp);\\n    return parseInt(timestampParts.hours * (60 * 60) + timestampParts.minutes * 60 + timestampParts.seconds + timestampParts.milliseconds / 1000, 10);\\n  };\\n\\n  VttThumbnailsPlugin.prototype.getTimestampFromSeconds = function getTimestampFromSeconds(totalSeconds) {\\n    var minutes = Math.floor(totalSeconds / 60);\\n    var seconds = Math.floor(totalSeconds % 60);\\n\\n    if (seconds < 10) {\\n      seconds = '0' + seconds;\\n    }\\n\\n    return minutes + ':' + seconds;\\n  };\\n\\n  VttThumbnailsPlugin.prototype.trim = function trim(str, charlist) {\\n    var whitespace = [' ', '\\\\n', '\\\\r', '\\\\t', '\\\\f', '\\\\x0b', '\\\\xa0', \\\"\\\\u2000\\\", \\\"\\\\u2001\\\", \\\"\\\\u2002\\\", \\\"\\\\u2003\\\", \\\"\\\\u2004\\\", \\\"\\\\u2005\\\", \\\"\\\\u2006\\\", \\\"\\\\u2007\\\", \\\"\\\\u2008\\\", \\\"\\\\u2009\\\", \\\"\\\\u200A\\\", \\\"\\\\u200B\\\", \\\"\\\\u2028\\\", \\\"\\\\u2029\\\", \\\"\\\\u3000\\\"].join('');\\n    var l = 0;\\n    var i = 0;\\n    str += '';\\n\\n    if (charlist) {\\n      whitespace = (charlist + '').replace(/([[\\\\]().?/*{}+$^:])/g, '$1');\\n    }\\n\\n    l = str.length;\\n\\n    for (i = 0; i < l; i++) {\\n      if (whitespace.indexOf(str.charAt(i)) === -1) {\\n        str = str.substring(i);\\n        break;\\n      }\\n    }\\n\\n    l = str.length;\\n\\n    for (i = l - 1; i >= 0; i--) {\\n      if (whitespace.indexOf(str.charAt(i)) === -1) {\\n        str = str.substring(0, i + 1);\\n        break;\\n      }\\n    }\\n\\n    return whitespace.indexOf(str.charAt(0)) === -1 ? str : '';\\n  };\\n\\n  return VttThumbnailsPlugin;\\n}();\\n\\nvar _default = vttThumbnails;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/vtt-thumbnails/index.js?\")},\"./plugins/vtt-thumbnails/vtt-thumbnails.scss\":function(module,exports,__webpack_require__){eval(\"// extracted by mini-css-extract-plugin\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./plugins/vtt-thumbnails/vtt-thumbnails.scss?\")},\"./utils/api.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.normalizeJsonResponse = void 0;\\n\\nvar _typeInference = __webpack_require__(/*! utils/type-inference */ \"./utils/type-inference.js\");\\n\\nvar _string = __webpack_require__(/*! utils/string */ \"./utils/string.js\");\\n\\nvar _time = __webpack_require__(/*! utils/time */ \"./utils/time.js\");\\n\\nvar TIME_FIELDS = [\\'created_at\\', \\'updated_at\\'];\\n\\nvar normalizeJsonResponse = function normalizeJsonResponse(obj) {\\n  var agg = {};\\n\\n  if ((0, _typeInference.isPlainObject)(obj)) {\\n    Object.keys(obj).reduce(function (agg, key) {\\n      var newKey = (0, _string.camelize)(key);\\n\\n      if (TIME_FIELDS.indexOf(key) !== -1) {\\n        agg[newKey] = new Date((0, _time.parseISO8601)(obj[key]));\\n      } else {\\n        agg[newKey] = normalizeJsonResponse(obj[key]);\\n      }\\n\\n      return agg;\\n    }, agg);\\n    return agg;\\n  } else if (Array.isArray(obj)) {\\n    return obj.map(function (item) {\\n      return normalizeJsonResponse(item);\\n    });\\n  } else {\\n    return obj;\\n  }\\n};\\n\\nexports.normalizeJsonResponse = normalizeJsonResponse;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/api.js?')},\"./utils/apply-with-props.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.applyWithProps = applyWithProps;\\n\\nvar _assign = __webpack_require__(/*! ./assign */ \"./utils/assign.js\");\\n\\nfunction applyWithProps(context, obj) {\\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\\n      _ref$order = _ref.order,\\n      order = _ref$order === void 0 ? null : _ref$order;\\n\\n  var _obj = obj;\\n\\n  var apply = function apply(key) {\\n    var value = obj[key];\\n\\n    if (value === undefined) {\\n      return;\\n    }\\n\\n    if (context[key] && typeof context[key] === \\'function\\') {\\n      context[key](value);\\n    }\\n  };\\n\\n  if (order) {\\n    _obj = (0, _assign.assign)({}, obj);\\n    order.forEach(function (key) {\\n      apply(key);\\n      delete _obj[key];\\n    });\\n  }\\n\\n  Object.keys(_obj).forEach(function (key) {\\n    apply(key);\\n  });\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/apply-with-props.js?')},\"./utils/assign.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.assign = assign;\\n\\n/**\\n * Object.assign-style object shallow merge/extend.\\n *\\n * @param  {Object} target\\n * @param  {Object} ...sources\\n * @return {Object}\\n */\\nfunction assign(target) {\\n  for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n    sources[_key - 1] = arguments[_key];\\n  }\\n\\n  if (Object.assign) {\\n    return Object.assign.apply(Object, [target].concat(sources));\\n  }\\n\\n  sources.forEach(function (source) {\\n    if (!source) {\\n      return;\\n    }\\n\\n    Object.keys(source).forEach(function (key) {\\n      var value = source[key];\\n      target[key] = value;\\n    });\\n  });\\n  return target;\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/assign.js?')},\"./utils/attributes-normalizer.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.normalizeAttributes = void 0;\\n\\nvar _string = __webpack_require__(/*! ./string */ \\\"./utils/string.js\\\");\\n\\nvar CLD_ATTR_REGEX = /^(data-cld-)(\\\\w+)/;\\nvar normalizers = {};\\n\\nfunction coerce(string) {\\n  var val = null; // Boolean\\n\\n  if (string === '') {\\n    return true;\\n  } // Complex object\\n\\n\\n  try {\\n    val = JSON.parse(string);\\n  } catch (e) {// Continue execution in case str is not parsable\\n  }\\n\\n  if (val) {\\n    return val;\\n  } // Number\\n\\n\\n  val = Number(string);\\n\\n  if (val) {\\n    return val;\\n  } // TODO: Parse date?\\n  //\\n\\n\\n  return string;\\n}\\n\\nvar normalizeDefault = function normalizeDefault(value) {\\n  return coerce(value);\\n};\\n\\nvar normalizeAttributes = function normalizeAttributes(elem) {\\n  var obj = {};\\n\\n  if (elem && elem.attributes && elem.attributes.length > 0) {\\n    var attrs = elem.attributes;\\n\\n    for (var i = attrs.length - 1; i >= 0; i--) {\\n      var attrName = attrs[i].name;\\n      var attrVal = attrs[i].value;\\n\\n      if (attrName.match(CLD_ATTR_REGEX)) {\\n        attrName = (0, _string.camelize)(attrName.replace(CLD_ATTR_REGEX, '$2'));\\n      } // check for known booleans\\n      // the matching element property will return a value for typeof\\n      // if (typeof elem[attrName] === 'boolean' || KNOWN_BOOLEANS[attrName]) {\\n\\n\\n      if (typeof elem[attrName] === 'boolean') {\\n        // the value of an included boolean attribute is typically an empty\\n        // string ('') which would equal false if we just check for a false value.\\n        // we also don't want support bad code like autoplay='false'\\n        attrVal = attrVal !== null;\\n      } else {\\n        var normalizer = normalizers[attrName] || normalizeDefault;\\n        attrVal = normalizer(attrVal);\\n      }\\n\\n      obj[attrName] = attrVal;\\n    }\\n  }\\n\\n  return obj;\\n};\\n\\nexports.normalizeAttributes = normalizeAttributes;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/attributes-normalizer.js?\")},\"./utils/cloudinary.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.getCloudinaryInstanceOf = getCloudinaryInstanceOf;\\nexports.filterAndAddTextTracks = exports.isKeyInTransformation = exports.handleCldError = void 0;\\n\\nvar _promisePolyfill = _interopRequireDefault(__webpack_require__(/*! promise-polyfill */ \\\"../node_modules/promise-polyfill/promise.js\\\"));\\n\\nvar _fetchBrowser = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill/build/fetch-browser */ \\\"../node_modules/fetch-ponyfill/build/fetch-browser.js\\\"));\\n\\nvar _common = __webpack_require__(/*! ../plugins/cloudinary/common */ \\\"./plugins/cloudinary/common.js\\\");\\n\\nvar _find = __webpack_require__(/*! utils/find */ \\\"./utils/find.js\\\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar _fetchPF = (0, _fetchBrowser.default)({\\n  Promise: _promisePolyfill.default\\n}),\\n    fetch = _fetchPF.fetch;\\n\\nvar GET_ERROR_DEFAULT_REQUEST = {\\n  method: 'head'\\n};\\nvar ERROR_WITH_GET_REQUEST = {\\n  method: 'get',\\n  credentials: 'include',\\n  headers: {\\n    'Content-Range': 'bytes=0-0'\\n  }\\n};\\n\\nvar handleCldError = function handleCldError(that, options) {\\n  var cloudName = that.cloudinaryConfig().config().cloud_name;\\n  var opts = options.fetchErrorUsingGet ? ERROR_WITH_GET_REQUEST : GET_ERROR_DEFAULT_REQUEST;\\n  var srcs = that.videojs.cloudinary.getCurrentSources();\\n\\n  if (srcs.length > 1) {\\n    _promisePolyfill.default.all(srcs.map(function (s) {\\n      return fetch(s.src, opts);\\n    })).then(function (res) {\\n      var filtered = [];\\n      res.forEach(function (r) {\\n        if (r.status >= 200 && r.status < 399 && r.url !== '') {\\n          var parsedUri = parseUri(r.url);\\n          filtered.push(parsedUri.host + parsedUri.path);\\n        }\\n      });\\n\\n      if (filtered.length === 0) {\\n        var errorMsg = res[0].headers.get('x-cld-error') || '';\\n        that.videojs.error((0, _common.cloudinaryErrorsConverter)({\\n          errorMsg: errorMsg,\\n          publicId: that.currentPublicId(),\\n          cloudName: cloudName,\\n          error: res[0],\\n          statusCode: res[0].status\\n        }));\\n      } else {\\n        var goodSrcs = srcs.filter(function (s) {\\n          var origUrl = parseUri(s.src);\\n          return filtered.indexOf(origUrl.host + origUrl.path) !== -1 && s.try !== true;\\n        });\\n\\n        if (goodSrcs && goodSrcs.length) {\\n          console.log('Trying urls: ' + JSON.stringify(goodSrcs));\\n          goodSrcs.forEach(function (s) {\\n            s.try = true;\\n          });\\n          that.videojs.autoplay(that.videojs.autoplay() || that.playWasCalled);\\n          that.videojs.src(goodSrcs);\\n        } else {\\n          console.log('No urls left to try so stopping');\\n          that.videojs.error({\\n            code: 6,\\n            message: 'No supported media sources'\\n          });\\n        }\\n      }\\n    }).catch(function (error) {\\n      return that.videojs.error({\\n        code: 7,\\n        message: error && error.message ? error.message : 'Failed to test sources'\\n      });\\n    });\\n  } else {\\n    that.videojs.error({\\n      code: 6,\\n      message: 'No supported media sources'\\n    });\\n  }\\n}; // for IE 11\\n\\n\\nexports.handleCldError = handleCldError;\\n\\nfunction parseUri(str) {\\n  var o = {\\n    strictMode: false,\\n    key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'],\\n    q: {\\n      name: 'queryKey',\\n      parser: /(?:^|&)([^&=]*)=?([^&]*)/g\\n    },\\n    parser: {\\n      strict: /^(?:([^:\\\\/?#]+):)?(?:\\\\/\\\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\\\/?#]*)(?::(\\\\d*))?))?((((?:[^?#\\\\/]*\\\\/)*)([^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)/,\\n      loose: /^(?:(?![^:@]+:[^:@\\\\/]*@)([^:\\\\/?#.]+):)?(?:\\\\/\\\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\\\/?#]*)(?::(\\\\d*))?)(((\\\\/(?:[^?#](?![^?#\\\\/]*\\\\.[^?#\\\\/.]+(?:[?#]|$)))*\\\\/?)?([^?#\\\\/]*))(?:\\\\?([^#]*))?(?:#(.*))?)/\\n    }\\n  };\\n  var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\\n  var uri = {};\\n  var i = 14;\\n\\n  while (i--) {\\n    uri[o.key[i]] = m[i] || '';\\n  }\\n\\n  uri[o.q.name] = {};\\n  uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\\n    if ($1) {\\n      uri[o.q.name][$1] = $2;\\n    }\\n  });\\n  return uri;\\n}\\n\\nfunction getCloudinaryInstanceOf(Klass, obj) {\\n  if (Array.isArray(obj)) {\\n    return obj.map(function (e) {\\n      return getCloudinaryInstanceOf(Klass, e);\\n    });\\n  }\\n\\n  if (obj instanceof Klass) {\\n    return obj;\\n  } else {\\n    return new Klass(obj);\\n  }\\n}\\n/**\\n * Check if key exist in transformation\\n * @param transformation\\n * @param key\\n * @returns true if key exists in transformation, false otherwise\\n */\\n\\n\\nvar isKeyInTransformation = function isKeyInTransformation(transformation, key) {\\n  if (!transformation || !key) {\\n    return false;\\n  } // transformation is an array so run this function for each item\\n\\n\\n  if (Array.isArray(transformation)) {\\n    return !!(0, _find.find)(transformation, function (t) {\\n      return isKeyInTransformation(t, key);\\n    });\\n  } // transformation is a Transformation object so use getValue() to check key\\n\\n\\n  if (transformation.getValue) {\\n    return !!transformation.getValue(key);\\n  } // transformation is an Object so just check for key existence in object\\n\\n\\n  return !!transformation[key];\\n};\\n\\nexports.isKeyInTransformation = isKeyInTransformation;\\n\\nvar filterAndAddTextTracks = function filterAndAddTextTracks(tracks, videojs) {\\n  tracks.forEach(function (track) {\\n    fetch(track.src, GET_ERROR_DEFAULT_REQUEST).then(function (r) {\\n      if (r.status >= 200 && r.status <= 399) {\\n        videojs.addRemoteTextTrack(track, true);\\n      }\\n    });\\n  });\\n};\\n\\nexports.filterAndAddTextTracks = filterAndAddTextTracks;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/cloudinary.js?\")},\"./utils/css-prefix.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.setSkinClassPrefix = exports.skinClass = exports.skinClassPrefix = exports.playerClassPrefix = exports.CLASS_PREFIX = void 0;\\n\\nvar _string = __webpack_require__(/*! ./string */ \"./utils/string.js\");\\n\\nvar _defaults = _interopRequireDefault(__webpack_require__(/*! ../config/defaults */ \"./config/defaults.js\"));\\n\\nvar _find = __webpack_require__(/*! ./find */ \"./utils/find.js\");\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar CLASS_PREFIX = \\'cld-video-player\\';\\nexports.CLASS_PREFIX = CLASS_PREFIX;\\nvar SKIN_CLASS_PREFIX = \"\".concat(CLASS_PREFIX, \"-skin-\");\\n\\nvar playerClassPrefix = function playerClassPrefix(componentInstance) {\\n  return \"\".concat(CLASS_PREFIX, \"-\").concat(componentInstance.id_);\\n};\\n\\nexports.playerClassPrefix = playerClassPrefix;\\n\\nvar skinClass = function skinClass(skin) {\\n  return \"\".concat(SKIN_CLASS_PREFIX).concat(skin);\\n};\\n\\nexports.skinClass = skinClass;\\n\\nvar skinClassPrefix = function skinClassPrefix(componentInstance) {\\n  var currentSkin = (0, _find.find)(componentInstance.el().classList, function (cls) {\\n    return (0, _string.startsWith)(cls, SKIN_CLASS_PREFIX);\\n  });\\n  return currentSkin;\\n};\\n\\nexports.skinClassPrefix = skinClassPrefix;\\n\\nvar setSkinClassPrefix = function setSkinClassPrefix(componentInstance, name) {\\n  var currentSkinPrefix = skinClassPrefix(componentInstance);\\n  var skinName = name ? name.replace(SKIN_CLASS_PREFIX, \\'\\') : false;\\n  var newSkinPrefix = \\'\\';\\n\\n  if (skinName) {\\n    // From html class\\n    newSkinPrefix = skinClass(skinName);\\n  } else if (componentInstance.options_.skin) {\\n    // From JS config\\n    newSkinPrefix = skinClass(componentInstance.options_.skin);\\n  } else {\\n    // Defult\\n    newSkinPrefix = skinClass(_defaults.default.skin);\\n  }\\n\\n  if (newSkinPrefix !== currentSkinPrefix) {\\n    if (currentSkinPrefix) {\\n      componentInstance.removeClass(currentSkinPrefix);\\n    }\\n\\n    componentInstance.addClass(newSkinPrefix);\\n  }\\n\\n  if (skinName && componentInstance.options_.skin !== skinName) {\\n    componentInstance.options_.skin = skinName;\\n  }\\n};\\n\\nexports.setSkinClassPrefix = setSkinClassPrefix;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/css-prefix.js?')},\"./utils/dom.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.wrap = void 0;\\n\\nvar wrap = function wrap(el, wrapper) {\\n  el.parentNode.insertBefore(wrapper, el);\\n  wrapper.appendChild(el);\\n  return wrapper;\\n};\\n\\nexports.wrap = wrap;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/dom.js?')},\"./utils/find.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.find = find;\\nexports.findIndex = findIndex;\\nexports.findElementAndIndex = findElementAndIndex;\\n\\nfunction find(list, callback) {\\n  if (Array.prototype.find && Array.isArray(list)) {\\n    return list.find(callback);\\n  }\\n\\n  return findElementAndIndex(list, callback)[0];\\n}\\n\\nfunction findIndex(list, callback) {\\n  if (Array.prototype.findIndex) {\\n    return list.findIndex(callback);\\n  }\\n\\n  return findElementAndIndex(list, callback)[1];\\n}\\n\\nfunction findElementAndIndex(list, callback) {\\n  for (var i = 0; i < list.length; i++) {\\n    var element = list[i];\\n\\n    if (callback(element, i, list)) {\\n      return [element, i];\\n    }\\n  }\\n\\n  return [undefined, -1];\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/find.js?')},\"./utils/fontFace.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.fontFace = void 0;\\n\\nvar _webfontloader = _interopRequireDefault(__webpack_require__(/*! webfontloader */ \\\"../node_modules/webfontloader/webfontloader.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nvar FONT_FAMILY = 'Fira Sans';\\n\\nvar fontFace = function fontFace(elem, options) {\\n  var fontFace = options.cloudinary.fontFace; // Default font-face is \\\"Fira sans\\\"\\n\\n  if (typeof fontFace === 'undefined') {\\n    fontFace = FONT_FAMILY;\\n  }\\n\\n  if (fontFace && fontFace !== 'inherit') {\\n    _webfontloader.default.load({\\n      google: {\\n        families: [fontFace]\\n      }\\n    });\\n\\n    elem.style.fontFamily = fontFace;\\n  } else if (fontFace === 'inherit') {\\n    elem.style.fontFamily = 'inherit';\\n  }\\n};\\n\\nexports.fontFace = fontFace;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/fontFace.js?\")},\"./utils/groupBy.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.groupBy = void 0;\\n\\nvar groupBy = function groupBy(collection, iteratee) {\\n  return collection.reduce(function (result, value, key) {\\n    key = iteratee(value);\\n\\n    if (Object.prototype.hasOwnProperty.call(result, key)) {\\n      result[key].push(value);\\n    } else {\\n      result[key] = [value];\\n    }\\n\\n    return result;\\n  }, {});\\n};\\n\\nexports.groupBy = groupBy;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/groupBy.js?')},\"./utils/index.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar assign = _interopRequireWildcard(__webpack_require__(/*! ./assign */ \"./utils/assign.js\"));\\n\\nvar slicing = _interopRequireWildcard(__webpack_require__(/*! ./slicing */ \"./utils/slicing.js\"));\\n\\nvar positioning = _interopRequireWildcard(__webpack_require__(/*! ./positioning */ \"./utils/positioning.js\"));\\n\\nvar string = _interopRequireWildcard(__webpack_require__(/*! ./string */ \"./utils/string.js\"));\\n\\nvar cloudinaryUtils = _interopRequireWildcard(__webpack_require__(/*! ./cloudinary */ \"./utils/cloudinary.js\"));\\n\\nvar applyWithProps = _interopRequireWildcard(__webpack_require__(/*! ./apply-with-props */ \"./utils/apply-with-props.js\"));\\n\\nvar groupBy = _interopRequireWildcard(__webpack_require__(/*! ./groupBy */ \"./utils/groupBy.js\"));\\n\\nvar mixin = _interopRequireWildcard(__webpack_require__(/*! ./mixin */ \"./utils/mixin.js\"));\\n\\nvar fontFace = _interopRequireWildcard(__webpack_require__(/*! ./fontFace */ \"./utils/fontFace.js\"));\\n\\nvar playButton = _interopRequireWildcard(__webpack_require__(/*! ./playButton */ \"./utils/playButton.js\"));\\n\\nvar cssPrefix = _interopRequireWildcard(__webpack_require__(/*! ./css-prefix */ \"./utils/css-prefix.js\"));\\n\\nvar normalizeAttributes = _interopRequireWildcard(__webpack_require__(/*! ./attributes-normalizer */ \"./utils/attributes-normalizer.js\"));\\n\\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\\n\\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\\n\\nvar Utils = assign.assign({}, assign, slicing, positioning, string, cloudinaryUtils, fontFace, playButton, groupBy, applyWithProps, mixin, cssPrefix, normalizeAttributes);\\nvar _default = Utils;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/index.js?')},\"./utils/matches.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.elMatches = void 0;\\n\\n// Test for matches()/\\nvar elMatches = function elMatches(el, selector) {\\n  var p = Element.prototype;\\n\\n  var f = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || function (s) {\\n    return [].indexOf.call(document.querySelectorAll(s), this) !== -1;\\n  };\\n\\n  return f.call(el, selector);\\n};\\n\\nexports.elMatches = elMatches;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/matches.js?')},\"./utils/mixin.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.mixin = mixin;\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\\n\\nfunction mixin() {\\n  for (var _len = arguments.length, mixins = new Array(_len), _key = 0; _key < _len; _key++) {\\n    mixins[_key] = arguments[_key];\\n  }\\n\\n  return mixins.reduce(function (c, mixin) {\\n    return mixin(c);\\n  }, function Blank() {\\n    _classCallCheck(this, Blank);\\n  });\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/mixin.js?')},\"./utils/playButton.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.playButton = void 0;\\n\\nvar playButton = function playButton(elem, options) {\\n  if (options.bigPlayButton === 'init') {\\n    elem.classList.add('vjs-big-play-button-init-only');\\n    options.bigPlayButton = true;\\n  }\\n};\\n\\nexports.playButton = playButton;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/playButton.js?\")},\"./utils/positioning.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.getElementPosition = getElementPosition;\\nexports.getPointerPosition = getPointerPosition;\\nexports.isElementInViewport = isElementInViewport;\\nexports.setPosition = setPosition;\\n\\nfunction getElementPosition(el) {\\n  var box = el.getBoundingClientRect();\\n  var body = document.body;\\n  var docEl = document.documentElement;\\n  var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\\n  var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\\n  var clientTop = docEl.clientTop || body.clientTop || 0;\\n  var clientLeft = docEl.clientLeft || body.clientLeft || 0;\\n  var top = box.top + scrollTop - clientTop;\\n  var left = box.left + scrollLeft - clientLeft;\\n  return {\\n    top: Math.round(top),\\n    left: Math.round(left)\\n  };\\n}\\n/**\\n * Get pointer position in element\\n * Returns an object with x and y coordinates.\\n * The base on the coordinates are the bottom left of the element.\\n *\\n * @function getPointerPosition\\n * @param {Element} el Element on which to get the pointer position on\\n * @param {Event} event Event object\\n * @return {Object}\\n *         This object will have x and y coordinates corresponding to the\\n *         mouse position\\n */\\n\\n\\nfunction getPointerPosition(el, event) {\\n  var position = {};\\n  var box = getElementPosition(el);\\n  var boxW = el.offsetWidth;\\n  var boxH = el.offsetHeight;\\n  var boxY = box.top;\\n  var boxX = box.left;\\n  var pageY = event.pageY;\\n  var pageX = event.pageX;\\n\\n  if (event.changedTouches) {\\n    pageX = event.changedTouches[0].pageX;\\n    pageY = event.changedTouches[0].pageY;\\n  }\\n\\n  position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH));\\n  position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\\n  return position;\\n}\\n\\nfunction isElementInViewport(el, _ref) {\\n  var fraction = _ref.fraction;\\n  var topLeft = getElementPosition(el);\\n  var x = topLeft.left;\\n  var y = topLeft.top;\\n  var h = el.offsetHeight;\\n  var w = el.offsetWidth;\\n  var r = x + w;\\n  var b = y + h;\\n  var visibleX = Math.max(0, Math.min(w, window.pageXOffset + window.innerWidth - x, r - window.pageXOffset));\\n  var visibleY = Math.max(0, Math.min(w, window.pageYOffset + window.innerHeight - y, b - window.pageYOffset));\\n  var visible = visibleX * visibleY / (w * h);\\n  return visible > fraction;\\n}\\n\\nfunction setPosition(el, left, top) {\\n  el.style.left = \"\".concat(left, \"px\");\\n  el.style.top = \"\".concat(top, \"px\");\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/positioning.js?')},\"./utils/querystring.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.objectToQuerystring = void 0;\\n\\nvar objectToQuerystring = function objectToQuerystring(obj) {\\n  var keys = Object.keys(obj);\\n\\n  if (!keys.length) {\\n    return \\'\\';\\n  }\\n\\n  var query = keys.map(function (key) {\\n    return \"\".concat(key, \"=\").concat(obj[key]);\\n  }).join(\\'&\\');\\n  return \"?\".concat(query);\\n};\\n\\nexports.objectToQuerystring = objectToQuerystring;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/querystring.js?')},\"./utils/slicing.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.sliceProperties = sliceProperties;\\nexports.sliceAndUnsetProperties = sliceAndUnsetProperties;\\n\\nfunction _sliceProperties(obj, isUnset) {\\n  for (var _len = arguments.length, props = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\\n    props[_key - 2] = arguments[_key];\\n  }\\n\\n  return props.reduce(function (acc, prop) {\\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) {\\n      acc[prop] = obj[prop];\\n\\n      if (isUnset) {\\n        delete obj[prop];\\n      }\\n    }\\n\\n    return acc;\\n  }, {});\\n}\\n\\nfunction sliceProperties(obj) {\\n  for (var _len2 = arguments.length, props = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\\n    props[_key2 - 1] = arguments[_key2];\\n  }\\n\\n  return _sliceProperties.apply(void 0, [obj, false].concat(props));\\n}\\n\\nfunction sliceAndUnsetProperties(obj) {\\n  for (var _len3 = arguments.length, props = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\\n    props[_key3 - 1] = arguments[_key3];\\n  }\\n\\n  return _sliceProperties.apply(void 0, [obj, true].concat(props));\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/slicing.js?')},\"./utils/string.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.camelize = camelize;\\nexports.startsWith = startsWith;\\n\\nfunction camelize(str) {\\n  return str.replace(/[_.-](\\\\w|$)/g, function (_, x) {\\n    return x.toUpperCase();\\n  });\\n}\\n\\nfunction startsWith(str, searchStr, position) {\\n  if (String.prototype.startsWith) {\\n    return str.startsWith(searchStr, position);\\n  } else {\\n    var _position = _position || 0;\\n\\n    return str.indexOf(searchStr, _position) === _position;\\n  }\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/string.js?')},\"./utils/throttle.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.throttle = throttle;\\n\\n/**\\n * Wraps the given function, `fn`, with a new function that only invokes `fn`\\n * at most once per every `wait` milliseconds.\\n *\\n * @function\\n * @param    {Function} fn\\n *           The function to be throttled.\\n *\\n * @param    {number}   wait\\n *           The number of milliseconds by which to throttle.\\n *\\n * @return   {Function}\\n */\\nfunction throttle(fn, wait) {\\n  var last = window.performance.now();\\n\\n  var throttled = function throttled() {\\n    var now = window.performance.now();\\n\\n    if (now - last >= wait) {\\n      fn.apply(void 0, arguments);\\n      last = now;\\n    }\\n  };\\n\\n  return throttled;\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/throttle.js?')},\"./utils/time.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.parseTime = exports.parseISO8601 = void 0;\\n\\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\\n\\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\\n\\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\\n\\n// https://github.com/csnover/js-iso8601/blob/master/iso8601.js\\nvar numericKeys = [1, 4, 5, 6, 7, 10, 11];\\n\\nvar parseISO8601 = function parseISO8601(date) {\\n  var timestamp = 0;\\n  var struct = 0;\\n  var minutesOffset = 0; // ES5 §15.9.4.2 states that the string should attempt to be parsed as a Date Time String Format string\\n  // before falling back to any implementation-specific date parsing, so that’s what we do, even if native\\n  // implementations could be faster\\n  //              1 YYYY                2 MM       3 DD           4 HH    5 mm       6 ss        7 msec        8 Z 9 ±    10 tzHH    11 tzmm\\n\\n  if (struct = /^(\\\\d{4}|[+\\\\-]\\\\d{6})(?:-(\\\\d{2})(?:-(\\\\d{2}))?)?(?:T(\\\\d{2}):(\\\\d{2})(?::(\\\\d{2})(?:\\\\.(\\\\d{3}))?)?(?:(Z)|([+\\\\-])(\\\\d{2})(?::(\\\\d{2}))?)?)?$/.exec(date)) {\\n    // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\\n    for (var i = 0, k; k = numericKeys[i]; ++i) {\\n      struct[k] = +struct[k] || 0;\\n    } // allow undefined days and months\\n\\n\\n    struct[2] = (+struct[2] || 1) - 1;\\n    struct[3] = +struct[3] || 1;\\n\\n    if (struct[8] !== \\'Z\\' && struct[9] !== undefined) {\\n      minutesOffset = struct[10] * 60 + struct[11];\\n\\n      if (struct[9] === \\'+\\') {\\n        minutesOffset = 0 - minutesOffset;\\n      }\\n    }\\n\\n    timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\\n  } else {\\n    timestamp = NaN;\\n  }\\n\\n  return timestamp;\\n}; // Convert time string i.e. \\'2:40\\' to seconds number (160)\\n// Also allows h:m:s format and mm:ss, m:s etc.\\n\\n\\nexports.parseISO8601 = parseISO8601;\\n\\nvar parseTime = function parseTime(hms) {\\n  var _hms$split$reverse = hms.split(\\':\\').reverse(),\\n      _hms$split$reverse2 = _slicedToArray(_hms$split$reverse, 3),\\n      seconds = _hms$split$reverse2[0],\\n      minutes = _hms$split$reverse2[1],\\n      hours = _hms$split$reverse2[2];\\n\\n  var sum = null;\\n\\n  if (!isNaN(seconds)) {\\n    sum = (+hours || 0) * 60 * 60 + (+minutes || 0) * 60 + +seconds;\\n  }\\n\\n  return sum;\\n};\\n\\nexports.parseTime = parseTime;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/time.js?')},\"./utils/type-inference.js\":function(module,exports,__webpack_require__){\"use strict\";eval('\\n\\nObject.defineProperty(exports, \"__esModule\", {\\n  value: true\\n});\\nexports.isPlainObject = isPlainObject;\\nexports.isString = isString;\\nexports.isInteger = isInteger;\\n\\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction isPlainObject(obj) {\\n  return obj !== null && _typeof(obj) === \\'object\\' && Object.prototype.toString.call(obj) === \\'[object Object]\\';\\n}\\n\\nfunction isString(obj) {\\n  return obj instanceof String || typeof obj === \\'string\\';\\n}\\n\\nfunction isInteger(data) {\\n  return typeof data === \\'number\\' && data % 1 === 0;\\n}\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./utils/type-inference.js?')},\"./video-player.js\":function(module,exports,__webpack_require__){\"use strict\";eval(\"\\n\\nObject.defineProperty(exports, \\\"__esModule\\\", {\\n  value: true\\n});\\nexports.default = void 0;\\n\\nvar _video = _interopRequireDefault(__webpack_require__(/*! video.js */ \\\"../node_modules/video.js/dist/video.es.js-exposed\\\"));\\n\\nvar _isObj = _interopRequireDefault(__webpack_require__(/*! is-obj */ \\\"../node_modules/is-obj/index.js\\\"));\\n\\n__webpack_require__(/*! ./components */ \\\"./components/index.js\\\");\\n\\nvar _plugins = _interopRequireDefault(__webpack_require__(/*! plugins */ \\\"./plugins/index.js\\\"));\\n\\nvar _utils = _interopRequireDefault(__webpack_require__(/*! utils */ \\\"./utils/index.js\\\"));\\n\\nvar _defaults = _interopRequireDefault(__webpack_require__(/*! config/defaults */ \\\"./config/defaults.js\\\"));\\n\\nvar _eventable = _interopRequireDefault(__webpack_require__(/*! mixins/eventable */ \\\"./mixins/eventable.js\\\"));\\n\\nvar _extendedEvents = _interopRequireDefault(__webpack_require__(/*! extended-events */ \\\"./extended-events.js\\\"));\\n\\nvar _playlistWidget2 = _interopRequireDefault(__webpack_require__(/*! ./components/playlist/playlist-widget */ \\\"./components/playlist/playlist-widget.js\\\"));\\n\\nvar _qualitySelector = _interopRequireDefault(__webpack_require__(/*! ./components/qualitySelector/qualitySelector.js */ \\\"./components/qualitySelector/qualitySelector.js\\\"));\\n\\nvar _videoSource = _interopRequireDefault(__webpack_require__(/*! ./plugins/cloudinary/models/video-source */ \\\"./plugins/cloudinary/models/video-source.js\\\"));\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\\n\\nfunction _typeof(obj) { \\\"@babel/helpers - typeof\\\"; if (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \\\"function\\\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \\\"symbol\\\" : typeof obj; }; } return _typeof(obj); }\\n\\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\\\"Cannot call a class as a function\\\"); } }\\n\\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\\\"value\\\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\\n\\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\\n\\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \\\"function\\\" && superClass !== null) { throw new TypeError(\\\"Super expression must either be null or a function\\\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\\n\\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\\n\\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\\n\\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \\\"object\\\" || typeof call === \\\"function\\\")) { return call; } return _assertThisInitialized(self); }\\n\\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\\\"this hasn't been initialised - super() hasn't been called\\\"); } return self; }\\n\\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \\\"undefined\\\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \\\"function\\\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\\n\\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\\n\\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\\n\\nfunction _nonIterableSpread() { throw new TypeError(\\\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\\\"); }\\n\\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \\\"string\\\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \\\"Object\\\" && o.constructor) n = o.constructor.name; if (n === \\\"Map\\\" || n === \\\"Set\\\") return Array.from(o); if (n === \\\"Arguments\\\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\\n\\nfunction _iterableToArray(iter) { if (typeof Symbol !== \\\"undefined\\\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\\n\\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\\n\\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\\n\\nvar CLOUDINARY_PARAMS = ['cloudinaryConfig', 'transformation', 'sourceTypes', 'sourceTransformation', 'posterOptions', 'autoShowRecommendations', 'fontFace', 'secure'];\\nvar PLAYER_PARAMS = CLOUDINARY_PARAMS.concat(['publicId', 'source', 'autoplayMode', 'playedEventPercents', 'playedEventTimes', 'analytics', 'fluid', 'ima', 'playlistWidget', 'hideContextMenu', 'colors', 'floatingWhenNotVisible', 'ads', 'showJumpControls', 'textTracks', 'qualitySelector', 'fetchErrorUsingGet', 'seekThumbnails']);\\nvar DEFAULT_HLS_OPTIONS = {\\n  html5: {\\n    handlePartialData: false,\\n    hls: {\\n      overrideNative: _video.default && _video.default.browser ? !_video.default.browser.IS_IOS && !_video.default.browser.IS_SAFARI : true\\n    }\\n  }\\n}; // Register all plugins\\n\\nObject.keys(_plugins.default).forEach(function (key) {\\n  _video.default.registerPlugin(key, _plugins.default[key]);\\n});\\n\\nvar normalizeAutoplay = function normalizeAutoplay(options) {\\n  var autoplayMode = options.autoplayMode;\\n\\n  if (autoplayMode) {\\n    switch (autoplayMode) {\\n      case 'always':\\n        options.autoplay = true;\\n        break;\\n\\n      case 'on-scroll':\\n      case 'never':\\n      default:\\n        options.autoplay = false;\\n    }\\n  }\\n};\\n\\nvar resolveVideoElement = function resolveVideoElement(elem) {\\n  if (typeof elem === 'string') {\\n    var id = elem; // Adjust for jQuery ID syntax\\n\\n    if (id.indexOf('#') === 0) {\\n      id = id.slice(1);\\n    }\\n\\n    try {\\n      elem = document.querySelector(\\\"#\\\".concat(id)) || _video.default.getPlayer(id);\\n    } catch (e) {\\n      elem = null;\\n    }\\n\\n    if (!elem) {\\n      throw new Error(\\\"Could not find element with id \\\".concat(id));\\n    }\\n  }\\n\\n  if (!elem.tagName) {\\n    throw new Error('Must specify either an element or an element id.');\\n  } else if (elem.tagName !== 'VIDEO') {\\n    throw new Error('Element is not a video tag.');\\n  }\\n\\n  return elem;\\n};\\n\\nvar extractOptions = function extractOptions(elem, options) {\\n  var elemOptions = _utils.default.normalizeAttributes(elem);\\n\\n  if (_video.default.dom.hasClass(elem, 'cld-fluid') || _video.default.dom.hasClass(elem, 'vjs-fluid')) {\\n    options.fluid = true;\\n  } // Default HLS options < Default options < Markup options < Player options\\n\\n\\n  options = _utils.default.assign({}, DEFAULT_HLS_OPTIONS, _defaults.default, elemOptions, options); // In case of 'autoplay on scroll', we need to make sure normal HTML5 autoplay is off\\n\\n  normalizeAutoplay(options); // VideoPlayer specific options\\n\\n  var playerOptions = _utils.default.sliceAndUnsetProperties.apply(_utils.default, [options].concat(_toConsumableArray(PLAYER_PARAMS))); // Cloudinary plugin specific options\\n\\n\\n  playerOptions.cloudinary = _utils.default.sliceAndUnsetProperties.apply(_utils.default, [playerOptions].concat(CLOUDINARY_PARAMS)); // Allow explicitly passing options to videojs using the `videojs` namespace, in order\\n  // to avoid param name conflicts:\\n  // VideoPlayer.new({ controls: true, videojs: { controls: false })\\n\\n  if (options.videojs) {\\n    _utils.default.assign(options, options.videojs);\\n\\n    delete options.videojs;\\n  }\\n\\n  return {\\n    playerOptions: playerOptions,\\n    videojsOptions: options\\n  };\\n};\\n\\nvar overrideDefaultVideojsComponents = function overrideDefaultVideojsComponents() {\\n  var Player = _video.default.getComponent('Player');\\n\\n  var children = Player.prototype.options_.children; // Add TitleBar as default\\n\\n  children.push('titleBar');\\n  children.push('upcomingVideoOverlay');\\n  children.push('recommendationsOverlay');\\n\\n  var ControlBar = _video.default.getComponent('ControlBar');\\n\\n  if (ControlBar) {\\n    children = ControlBar.prototype.options_.children; // Add space instead of the progress control (which we deattached from the controlBar, and absolutely positioned it above it)\\n    // Also add a blank div underneath the progress control to stop bubbling up pointer events.\\n\\n    children.splice(children.indexOf('progressControl'), 0, 'spacer', 'progressControlEventsBlocker'); // Add 'play-previous' and 'play-next' buttons around the 'play-toggle'\\n\\n    children.splice(children.indexOf('playToggle'), 1, 'playlistPreviousButton', 'JumpBackButton', 'playToggle', 'JumpForwardButton', 'playlistNextButton'); // Position the 'logo-button' button right next to 'fullscreenToggle'\\n\\n    children.splice(children.indexOf('fullscreenToggle'), 1, 'logoButton', 'fullscreenToggle');\\n  }\\n};\\n\\noverrideDefaultVideojsComponents();\\nvar _allowUsageReport = true;\\n\\nvar VideoPlayer = /*#__PURE__*/function (_Utils$mixin) {\\n  _inherits(VideoPlayer, _Utils$mixin);\\n\\n  var _super = _createSuper(VideoPlayer);\\n\\n  function VideoPlayer(elem, options, ready) {\\n    var _this;\\n\\n    _classCallCheck(this, VideoPlayer);\\n\\n    _this = _super.call(this);\\n    elem = resolveVideoElement(elem);\\n    options = extractOptions(elem, options);\\n\\n    var onReady = function onReady() {\\n      setExtendedEvents(); // Load first video (mainly to support video tag 'source' and 'public-id' attributes)\\n\\n      var source = _options.source || _options.publicId;\\n\\n      if (source) {\\n        _this.source(source, _options);\\n      }\\n    };\\n\\n    var setExtendedEvents = function setExtendedEvents() {\\n      var events = [];\\n\\n      if (_options.playedEventPercents) {\\n        var percentsplayed = {\\n          type: 'percentsplayed',\\n          percents: _options.playedEventPercents\\n        };\\n        events.push(percentsplayed);\\n      }\\n\\n      if (_options.playedEventTimes) {\\n        var timeplayed = {\\n          type: 'timeplayed',\\n          times: _options.playedEventTimes\\n        };\\n        events.push(timeplayed);\\n      }\\n\\n      events.push.apply(events, ['seek', 'mute', 'unmute', 'qualitychanged']);\\n      var extendedEvents = new _extendedEvents.default(_this.videojs, {\\n        events: events\\n      });\\n      var normalizedEvents = extendedEvents.events;\\n      Object.keys(normalizedEvents).forEach(function (_event) {\\n        var handler = function handler(event, data) {\\n          _this.videojs.trigger({\\n            type: _event,\\n            eventData: data\\n          });\\n        };\\n\\n        extendedEvents.on(_event, handler);\\n      });\\n    };\\n\\n    var setCssClasses = function setCssClasses() {\\n      _this.videojs.addClass(_utils.default.CLASS_PREFIX);\\n\\n      _this.videojs.addClass(_utils.default.playerClassPrefix(_this.videojs));\\n\\n      _utils.default.setSkinClassPrefix(_this.videojs, _utils.default.skinClassPrefix(_this.videojs));\\n\\n      if (_video.default.browser.IE_VERSION === 11) {\\n        _this.videojs.addClass('cld-ie11');\\n      }\\n    };\\n\\n    var initPlugins = function initPlugins(loaded) {\\n      // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n      _this.adsEnabled = initIma(loaded); // #endif\\n\\n      initAutoplay();\\n      initContextMenu();\\n      initPerSrcBehaviors();\\n      initCloudinary();\\n      initAnalytics();\\n      initFloatingPlayer();\\n      initColors();\\n      initTextTracks();\\n      initSeekThumbs();\\n    };\\n\\n    var initIma = function initIma(loaded) {\\n      if (!loaded.contribAdsLoaded || !loaded.imaAdsLoaded) {\\n        if (_options.ads) {\\n          if (!loaded.contribAdsLoaded) {\\n            console.log('contribAds is not loaded');\\n          }\\n\\n          if (!loaded.imaAdsLoaded) {\\n            console.log('imaSdk is not loaded');\\n          }\\n        }\\n\\n        return false;\\n      }\\n\\n      if (!_options.ads) {\\n        _options.ads = {};\\n      }\\n\\n      var opts = _options.ads;\\n\\n      if (Object.keys(opts).length === 0) {\\n        return false;\\n      }\\n\\n      var adTagUrl = opts.adTagUrl,\\n          prerollTimeout = opts.prerollTimeout,\\n          postrollTimeout = opts.postrollTimeout,\\n          showCountdown = opts.showCountdown,\\n          adLabel = opts.adLabel,\\n          autoPlayAdBreaks = opts.autoPlayAdBreaks,\\n          locale = opts.locale;\\n\\n      _this.videojs.ima({\\n        id: _this.el().id,\\n        adTagUrl: adTagUrl,\\n        disableFlashAds: true,\\n        prerollTimeout: prerollTimeout || 5000,\\n        postrollTimeout: postrollTimeout || 5000,\\n        showCountdown: showCountdown !== false,\\n        adLabel: adLabel || 'Advertisement',\\n        locale: locale || 'en',\\n        autoPlayAdBreaks: autoPlayAdBreaks !== false,\\n        debug: true\\n      });\\n\\n      return true;\\n    };\\n\\n    var initAutoplay = function initAutoplay() {\\n      var autoplayMode = _options.autoplayMode;\\n\\n      if (autoplayMode === 'on-scroll') {\\n        _this.videojs.autoplayOnScroll();\\n      }\\n    };\\n\\n    var initContextMenu = function initContextMenu() {\\n      if (!options.playerOptions.hideContextMenu) {\\n        _this.videojs.contextMenu(_defaults.default.contextMenu);\\n      }\\n    };\\n\\n    var initFloatingPlayer = function initFloatingPlayer() {\\n      if (options.playerOptions.floatingWhenNotVisible) {\\n        _this.videojs.floatingPlayer({\\n          'floatTo': options.playerOptions.floatingWhenNotVisible\\n        });\\n      }\\n    };\\n\\n    var initColors = function initColors() {\\n      _this.videojs.colors(options.playerOptions.colors ? {\\n        'colors': options.playerOptions.colors\\n      } : {});\\n    };\\n\\n    var initPerSrcBehaviors = function initPerSrcBehaviors() {\\n      if (_this.videojs.perSourceBehaviors) {\\n        _this.videojs.perSourceBehaviors();\\n      }\\n    };\\n\\n    var initCloudinary = function initCloudinary() {\\n      var opts = _options.cloudinary;\\n      opts.chainTarget = _assertThisInitialized(_this);\\n\\n      if (opts.secure !== false) {\\n        _options.cloudinary.cloudinaryConfig.config('secure', true);\\n      }\\n\\n      _this.videojs.cloudinary(_options.cloudinary);\\n    };\\n\\n    var initAnalytics = function initAnalytics() {\\n      var analyticsOpts = _options.analytics;\\n\\n      if (analyticsOpts) {\\n        var opts = _typeof(analyticsOpts) === 'object' ? analyticsOpts : {};\\n\\n        _this.videojs.analytics(opts);\\n      }\\n    };\\n\\n    var _playlistWidget = null;\\n\\n    var initPlaylistWidget = function initPlaylistWidget() {\\n      _this.videojs.on('playlistcreated', function () {\\n        if (_playlistWidget) {\\n          _playlistWidget.dispose();\\n        }\\n\\n        var plwOptions = _options.playlistWidget;\\n\\n        if ((0, _isObj.default)(plwOptions)) {\\n          if (_options.fluid) {\\n            plwOptions.fluid = true;\\n          }\\n\\n          if (_options.cloudinary.fontFace) {\\n            plwOptions.fontFace = _options.cloudinary.fontFace;\\n          }\\n\\n          _playlistWidget = new _playlistWidget2.default(_this.videojs, plwOptions);\\n        }\\n      });\\n    };\\n\\n    var initJumpButtons = function initJumpButtons() {\\n      if (!_options.showJumpControls && _this.videojs.controlBar) {\\n        _this.videojs.controlBar.removeChild('JumpForwardButton');\\n\\n        _this.videojs.controlBar.removeChild('JumpBackButton');\\n      }\\n    }; // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n\\n\\n    _this.initQualitySelector = function () {\\n      if (_options.qualitySelector !== false) {\\n        if (_video.default.browser.IE_VERSION === null) {\\n          _this.videojs.httpSourceSelector({\\n            default: 'auto'\\n          });\\n        }\\n\\n        _this.videojs.on('loadedmetadata', function () {\\n          _qualitySelector.default.init(_this.videojs);\\n        }); // Show only if more then one option available\\n\\n\\n        _this.videojs.on('loadeddata', function () {\\n          _qualitySelector.default.setVisibility(_this.videojs);\\n        });\\n      }\\n    }; // #endif\\n\\n\\n    var initTextTracks = function initTextTracks() {\\n      _this.videojs.on('refreshTextTracks', function (e, tracks) {\\n        _this.setTextTracks(tracks);\\n      });\\n    };\\n\\n    _this.setTextTracks = function (conf) {\\n      // remove current text tracks\\n      var currentTracks = _this.videojs.remoteTextTracks();\\n\\n      if (currentTracks) {\\n        for (var i = currentTracks.tracks_.length - 1; i >= 0; i--) {\\n          _this.videojs.removeRemoteTextTrack(currentTracks.tracks_[i]);\\n        }\\n      }\\n\\n      if (conf) {\\n        var tracks = Object.keys(conf);\\n        var allTracks = [];\\n\\n        for (var _i = 0, _tracks = tracks; _i < _tracks.length; _i++) {\\n          var track = _tracks[_i];\\n\\n          if (Array.isArray(conf[track])) {\\n            var trks = conf[track];\\n\\n            for (var _i2 = 0; _i2 < trks.length; _i2++) {\\n              var cnf = trks[_i2];\\n              allTracks.push(buildTextTrackObj(track, cnf));\\n            }\\n          } else {\\n            allTracks.push(buildTextTrackObj(track, conf[track]));\\n          }\\n        }\\n\\n        _utils.default.filterAndAddTextTracks(allTracks, _this.videojs);\\n      }\\n    };\\n\\n    var initSeekThumbs = function initSeekThumbs() {\\n      if (_options.seekThumbnails) {\\n        _this.videojs.on('cldsourcechanged', function (e, _ref) {\\n          var source = _ref.source;\\n\\n          if ( // Bail if...\\n          source.getType() === 'AudioSource' || // it's an audio player\\n          _this.videojs && _this.videojs.activePlugins_ && _this.videojs.activePlugins_.vr // It's a VR (i.e. 360) video\\n          ) {\\n              return;\\n            }\\n\\n          var cloudinaryConfig = source.cloudinaryConfig();\\n          var publicId = source.publicId();\\n          var transformations = source.transformation().toOptions();\\n\\n          if (transformations && transformations.streaming_profile) {\\n            delete transformations.streaming_profile;\\n          }\\n\\n          transformations.flags = transformations.flags || [];\\n          transformations.flags.push('sprite'); // build VTT url\\n\\n          var vttSrc = cloudinaryConfig.video_url(publicId + '.vtt', {\\n            transformation: transformations\\n          }); // vttThumbnails must be called differently on init and on source update.\\n\\n          if (typeof _this.videojs.vttThumbnails === 'function') {\\n            _this.videojs.vttThumbnails({\\n              src: vttSrc\\n            });\\n          } else {\\n            _this.videojs.vttThumbnails.src(vttSrc);\\n          }\\n        });\\n      }\\n    };\\n\\n    var buildTextTrackObj = function buildTextTrackObj(type, conf) {\\n      return {\\n        kind: type,\\n        label: conf.label,\\n        srclang: conf.language,\\n        default: !!conf.default,\\n        src: conf.url\\n      };\\n    };\\n\\n    var _options = options.playerOptions;\\n    var _vjs_options = options.videojsOptions; // Make sure to add 'video-js' class before creating videojs instance\\n\\n    elem.classList.add('video-js'); // Handle WebFont loading\\n\\n    _utils.default.fontFace(elem, _options); // Handle play button options\\n\\n\\n    _utils.default.playButton(elem, _vjs_options); // Dash plugin - available in full (not light) build only\\n\\n\\n    if (_plugins.default.dashPlugin) {\\n      _plugins.default.dashPlugin();\\n    }\\n\\n    _this.videojs = (0, _video.default)(elem, _vjs_options);\\n\\n    if (_vjs_options.muted) {\\n      _this.videojs.volume(0.4);\\n    }\\n\\n    if (_options.fluid) {\\n      _this.fluid(_options.fluid);\\n    }\\n    /* global google */\\n\\n\\n    var loaded = {\\n      contribAdsLoaded: typeof _this.videojs.ads === 'function',\\n      imaAdsLoaded: (typeof google === \\\"undefined\\\" ? \\\"undefined\\\" : _typeof(google)) === 'object' && _typeof(google.ima) === 'object'\\n    };\\n    setCssClasses();\\n    initPlugins(loaded);\\n    initPlaylistWidget();\\n    initJumpButtons();\\n\\n    _this.videojs.on('error', function () {\\n      var error = _this.videojs.error();\\n\\n      if (error) {\\n        var type = _this.videojs.cloudinary.currentSourceType();\\n\\n        if (error.code === 4 && (type === 'VideoSource' || type === 'AudioSource')) {\\n          _this.videojs.error(null);\\n\\n          _utils.default.handleCldError(_assertThisInitialized(_this), _options);\\n        } else {\\n          _this.videojs.clearTimeout(_this.reTryId);\\n        }\\n      }\\n    });\\n\\n    _this.videojs.ready(function () {\\n      onReady();\\n\\n      if (ready) {\\n        ready(_assertThisInitialized(_this));\\n      }\\n    });\\n\\n    if (_this.adsEnabled) {\\n      if (Object.keys(options.playerOptions.ads).length > 0 && _typeof(_this.videojs.ima) === 'object') {\\n        if (options.playerOptions.ads.adsInPlaylist === 'first-video') {\\n          _this.videojs.one('sourcechanged', function () {\\n            _this.videojs.ima.playAd();\\n          });\\n        } else {\\n          _this.videojs.on('sourcechanged', function () {\\n            _this.videojs.ima.playAd();\\n          });\\n        }\\n      }\\n    }\\n\\n    _this.nbCalls = 0;\\n\\n    _this.reTryVideo = function (maxNumberOfCalls, timeout) {\\n      if (!_this.isVideoReady()) {\\n        if (_this.nbCalls < maxNumberOfCalls) {\\n          _this.nbCalls++;\\n          _this.reTryId = _this.videojs.setTimeout(_this.reTryVideo, timeout);\\n        } else {\\n          var e = new Error('Video is not ready please try later');\\n\\n          _this.videojs.trigger('error', e);\\n        }\\n      }\\n    };\\n\\n    _this.isVideoReady = function () {\\n      var s = _this.videojs.readyState();\\n\\n      if (s >= (/iPad|iPhone|iPod/.test(navigator.userAgent) ? 1 : 4)) {\\n        _this.nbCalls = 0;\\n        return true;\\n      }\\n\\n      return false;\\n    };\\n\\n    _this.playlistWidget = function (options) {\\n      if (!options && !_playlistWidget) {\\n        return false;\\n      }\\n\\n      if (!options && _playlistWidget) {\\n        return _playlistWidget;\\n      }\\n\\n      if ((0, _isObj.default)(options)) {\\n        _playlistWidget.options(options);\\n      }\\n\\n      return _playlistWidget;\\n    };\\n\\n    return _this;\\n  }\\n\\n  _createClass(VideoPlayer, [{\\n    key: \\\"cloudinaryConfig\\\",\\n    value: function cloudinaryConfig(config) {\\n      return this.videojs.cloudinary.cloudinaryConfig(config);\\n    }\\n  }, {\\n    key: \\\"currentPublicId\\\",\\n    value: function currentPublicId() {\\n      return this.videojs.cloudinary.currentPublicId();\\n    }\\n  }, {\\n    key: \\\"currentSourceUrl\\\",\\n    value: function currentSourceUrl() {\\n      return this.videojs.currentSource().src;\\n    }\\n  }, {\\n    key: \\\"currentPoster\\\",\\n    value: function currentPoster() {\\n      return this.videojs.cloudinary.currentPoster();\\n    }\\n  }, {\\n    key: \\\"source\\\",\\n    value: function source(publicId) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n\\n      if (publicId instanceof _videoSource.default) {\\n        return this.videojs.cloudinary.source(publicId, options);\\n      } // Interactive plugin - available in full (not light) build only\\n\\n\\n      if (this.videojs.interactive) {\\n        this.videojs.interactive(this.videojs, options);\\n      }\\n\\n      if (VideoPlayer.allowUsageReport()) {\\n        options.usageReport = true;\\n      }\\n\\n      this.setTextTracks(options.textTracks); // #if (!process.env.WEBPACK_BUILD_LIGHT)\\n\\n      this.initQualitySelector(); // #endif\\n\\n      clearTimeout(this.reTryVideo);\\n      this.nbCalls = 0;\\n      var maxTries = this.videojs.options_.maxTries || 3;\\n      var videoReadyTimeout = this.videojs.options_.videoTimeout || 55000;\\n      this.reTryVideo(maxTries, videoReadyTimeout);\\n      return this.videojs.cloudinary.source(publicId, options);\\n    }\\n  }, {\\n    key: \\\"posterOptions\\\",\\n    value: function posterOptions(options) {\\n      return this.videojs.cloudinary.posterOptions(options);\\n    }\\n  }, {\\n    key: \\\"skin\\\",\\n    value: function skin(name) {\\n      if (name !== undefined && typeof name === 'string') {\\n        _utils.default.setSkinClassPrefix(this.videojs, name);\\n\\n        if (this.playlistWidget()) {\\n          this.playlistWidget().setSkin();\\n        }\\n      }\\n\\n      return _utils.default.skinClassPrefix(this.videojs);\\n    }\\n  }, {\\n    key: \\\"playlist\\\",\\n    value: function playlist(sources) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return this.videojs.cloudinary.playlist(sources, options);\\n    }\\n  }, {\\n    key: \\\"playlistByTag\\\",\\n    value: function playlistByTag(tag) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return this.videojs.cloudinary.playlistByTag(tag, options);\\n    }\\n  }, {\\n    key: \\\"sourcesByTag\\\",\\n    value: function sourcesByTag(tag) {\\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\\n      return this.videojs.cloudinary.sourcesByTag(tag, options);\\n    }\\n  }, {\\n    key: \\\"fluid\\\",\\n    value: function fluid(bool) {\\n      if (bool === undefined) {\\n        return this.videojs.fluid();\\n      }\\n\\n      if (bool) {\\n        this.videojs.addClass('cld-fluid');\\n      } else {\\n        this.videojs.removeClass('cld-fluid');\\n      }\\n\\n      this.videojs.fluid(bool);\\n      this.videojs.trigger('fluid', bool);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"play\\\",\\n    value: function play() {\\n      this.playWasCalled = true;\\n      this.videojs.play();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"stop\\\",\\n    value: function stop() {\\n      this.pause();\\n      this.currentTime(0);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"playPrevious\\\",\\n    value: function playPrevious() {\\n      this.playlist().playPrevious();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"playNext\\\",\\n    value: function playNext() {\\n      this.playlist().playNext();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"transformation\\\",\\n    value: function transformation(trans) {\\n      return this.videojs.cloudinary.transformation(trans);\\n    }\\n  }, {\\n    key: \\\"sourceTypes\\\",\\n    value: function sourceTypes(types) {\\n      return this.videojs.cloudinary.sourceTypes(types);\\n    }\\n  }, {\\n    key: \\\"sourceTransformation\\\",\\n    value: function sourceTransformation(trans) {\\n      return this.videojs.cloudinary.sourceTransformation(trans);\\n    }\\n  }, {\\n    key: \\\"autoShowRecommendations\\\",\\n    value: function autoShowRecommendations(autoShow) {\\n      return this.videojs.cloudinary.autoShowRecommendations(autoShow);\\n    }\\n  }, {\\n    key: \\\"duration\\\",\\n    value: function duration() {\\n      return this.videojs.duration();\\n    }\\n  }, {\\n    key: \\\"height\\\",\\n    value: function height(dimension) {\\n      if (!dimension) {\\n        return this.videojs.height();\\n      }\\n\\n      this.videojs.height(dimension);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"width\\\",\\n    value: function width(dimension) {\\n      if (!dimension) {\\n        return this.videojs.width();\\n      }\\n\\n      this.videojs.width(dimension);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"volume\\\",\\n    value: function volume(_volume) {\\n      if (!_volume) {\\n        return this.videojs.volume();\\n      }\\n\\n      this.videojs.volume(_volume);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"mute\\\",\\n    value: function mute() {\\n      if (!this.isMuted()) {\\n        this.videojs.muted(true);\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"unmute\\\",\\n    value: function unmute() {\\n      if (this.isMuted()) {\\n        this.videojs.muted(false);\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"isMuted\\\",\\n    value: function isMuted() {\\n      return this.videojs.muted();\\n    }\\n  }, {\\n    key: \\\"pause\\\",\\n    value: function pause() {\\n      this.videojs.pause();\\n      return this;\\n    }\\n  }, {\\n    key: \\\"currentTime\\\",\\n    value: function currentTime(offsetSeconds) {\\n      if (!offsetSeconds && offsetSeconds !== 0) {\\n        return this.videojs.currentTime();\\n      }\\n\\n      this.videojs.currentTime(offsetSeconds);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"maximize\\\",\\n    value: function maximize() {\\n      if (!this.isMaximized()) {\\n        this.videojs.requestFullscreen();\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"exitMaximize\\\",\\n    value: function exitMaximize() {\\n      if (this.isMaximized()) {\\n        this.videojs.exitFullscreen();\\n      }\\n\\n      return this;\\n    }\\n  }, {\\n    key: \\\"isMaximized\\\",\\n    value: function isMaximized() {\\n      return this.videojs.isFullscreen();\\n    }\\n  }, {\\n    key: \\\"dispose\\\",\\n    value: function dispose() {\\n      this.videojs.dispose();\\n    }\\n  }, {\\n    key: \\\"controls\\\",\\n    value: function controls(bool) {\\n      if (bool === undefined) {\\n        return this.videojs.controls();\\n      }\\n\\n      this.videojs.controls(bool);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"ima\\\",\\n    value: function ima() {\\n      return {\\n        playAd: this.videojs.ima.playAd\\n      };\\n    }\\n  }, {\\n    key: \\\"loop\\\",\\n    value: function loop(bool) {\\n      if (bool === undefined) {\\n        return this.videojs.loop();\\n      }\\n\\n      this.videojs.loop(bool);\\n      return this;\\n    }\\n  }, {\\n    key: \\\"el\\\",\\n    value: function el() {\\n      return this.videojs.el();\\n    }\\n  }], [{\\n    key: \\\"all\\\",\\n    value: function all(selector) {\\n      var nodeList = document.querySelectorAll(selector);\\n      var players = [];\\n\\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\\n        args[_key - 1] = arguments[_key];\\n      }\\n\\n      for (var i = 0; i < nodeList.length; i++) {\\n        players.push(_construct(VideoPlayer, [nodeList[i]].concat(args)));\\n      }\\n\\n      return players;\\n    }\\n  }, {\\n    key: \\\"allowUsageReport\\\",\\n    value: function allowUsageReport(bool) {\\n      if (bool === undefined) {\\n        return _allowUsageReport;\\n      }\\n\\n      _allowUsageReport = !!bool;\\n      return _allowUsageReport;\\n    }\\n  }]);\\n\\n  return VideoPlayer;\\n}(_utils.default.mixin(_eventable.default));\\n\\nvar _default = VideoPlayer;\\nexports.default = _default;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/./video-player.js?\")},0:function(module,exports){eval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/min-document_(ignored)?\")},1:function(module,exports){eval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/min-document_(ignored)?\")},2:function(module,exports){eval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/util_(ignored)?\")},3:function(module,exports){eval(\"/* (ignored) */\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/util_(ignored)?\")},\"cloudinary-core\":function(module,exports){eval(\"module.exports = __WEBPACK_EXTERNAL_MODULE_cloudinary_core__;\\n\\n//# sourceURL=webpack://cloudinaryVideoPlayer/external_%7B%22commonjs%22:%22cloudinary-core%22,%22commonjs2%22:%22cloudinary-core%22,%22amd%22:%22cloudinary-core%22,%22root%22:%22cloudinary%22%7D?\")}})},module.exports=factory(__webpack_require__(14934))}}]);"],"names":["self","webpackChunk_N_E","push","module","__unused_webpack_exports","__webpack_require__","factory","window","__WEBPACK_EXTERNAL_MODULE_cloudinary_core__","e","n","t","r","exports","a","i","l","call","m","c","d","o","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","eval","__webpack_exports__"],"sourceRoot":""}